@ingit/cli-darwin-x64 0.3.2 → 0.3.4
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/client/assets/{SettingsDialog-DFNU7q7m.js → SettingsDialog-CaMorEla.js} +1 -1
- package/client/assets/asm-Cn6kfRg8.js +1 -0
- package/client/assets/bash-CptvmnJ_.js +1 -0
- package/client/assets/bf-DEJ4lRL0.js +1 -0
- package/client/assets/c-Cct9r9Td.js +1 -0
- package/client/assets/css-CccPCtcE.js +1 -0
- package/client/assets/csv-CFmeyRa-.js +1 -0
- package/client/assets/diff-HjZ63woV.js +1 -0
- package/client/assets/docker-DkKN8cWa.js +1 -0
- package/client/assets/git-BAbMmzbU.js +1 -0
- package/client/assets/go-BijrNcPh.js +1 -0
- package/client/assets/html-CA8WawHi.js +1 -0
- package/client/assets/http-C4KktKS_.js +1 -0
- package/client/assets/index-Ct9jgAhg.js +677 -0
- package/client/assets/ini-C8KFcdOG.js +1 -0
- package/client/assets/java-B2tygPvv.js +1 -0
- package/client/assets/js-Brnoocvr.js +1 -0
- package/client/assets/jsdoc-Dalx2yOp.js +1 -0
- package/client/assets/json-BDzjkGhh.js +1 -0
- package/client/assets/languages-YvcwcNAo.js +1 -0
- package/client/assets/leanpub-md-DaBiWoVw.js +2 -0
- package/client/assets/log-bauMLv7S.js +1 -0
- package/client/assets/lua-C6NMZR_Q.js +1 -0
- package/client/assets/make-BUMR9kX3.js +1 -0
- package/client/assets/md-ueNMRzJS.js +2 -0
- package/client/assets/pl-R_hP-AdI.js +1 -0
- package/client/assets/plain-jYHz9int.js +1 -0
- package/client/assets/py-DFv_lSPZ.js +1 -0
- package/client/assets/regex-JBXmLE2I.js +1 -0
- package/client/assets/rs-C6-_90Ze.js +1 -0
- package/client/assets/sql-BXbkiBJ0.js +1 -0
- package/client/assets/todo-DP7rq1XD.js +1 -0
- package/client/assets/toml-9XbwREvu.js +1 -0
- package/client/assets/ts-C7Zq0x-b.js +1 -0
- package/client/assets/uri-TvvAqCeR.js +1 -0
- package/client/assets/xml-CIS15X3I.js +1 -0
- package/client/assets/yaml-BYsgzStX.js +1 -0
- package/client/index.html +1 -1
- package/ingit +0 -0
- package/libziggit.dylib +0 -0
- package/package.json +1 -1
- package/client/assets/index-BDkkP1MR.js +0 -677
|
@@ -1,677 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{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})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function E(e,t){return ee(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=E(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(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 D=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)},O={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=O,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ee(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,D)}catch(e){D(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-T<w)}function E(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ee());){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&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(E)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=E,te=function(){re.postMessage(null)}}else te=function(){_(E,0)};function ie(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=o(((e,t)=>{t.exports=p()})),h=o((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=o((e=>{var t=m(),n=f(),r=g();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,h=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),ee=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),te=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case ee:return`SuspenseList`;case ne:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case E:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case te:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function pe(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function k(e,t){de++,ue[de]=e.current,e.current=t}var me=fe(null),he=fe(null),ge=fe(null),_e=fe(null);function ve(e,t){switch(k(ge,t),k(he,e),k(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(me),k(me,e)}function ye(){pe(me),pe(he),pe(ge)}function be(e){e.memoizedState!==null&&k(_e,e);var t=me.current,n=Qd(t,e.type);t!==n&&(k(he,e),k(me,n))}function xe(e){he.current===e&&(pe(me),pe(he)),_e.current===e&&(pe(_e),sp._currentValue=le)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1<e.stack.indexOf(`
|
|
2
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
-
`+Se+e+Ce}var Te=!1;function Ee(e,t){if(!e||Te)return``;Te=!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{Te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?we(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we(`Lazy`);case 13:return e.child!==t&&t!==null?we(`Suspense Fallback`):we(`Suspense`);case 19:return we(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return we(`Activity`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,je=t.unstable_cancelCallback,Me=t.unstable_shouldYield,Ne=t.unstable_requestPaint,A=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(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 nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(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-Ge(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&&ot(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function st(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ct(e,t){var n=t&-t;return n=n&42?1:lt(n),(n&(e.suspendedLanes|t))===0?n:0}function lt(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 ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=O.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function ft(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var pt=Math.random().toString(36).slice(2),mt=`__reactFiber$`+pt,j=`__reactProps$`+pt,ht=`__reactContainer$`+pt,gt=`__reactEvents$`+pt,M=`__reactListeners$`+pt,_t=`__reactHandles$`+pt,vt=`__reactResources$`+pt,yt=`__reactMarker$`+pt;function bt(e){delete e[mt],delete e[j],delete e[gt],delete e[M],delete e[_t]}function xt(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ht]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xf(e);e!==null;){if(n=e[mt])return n;e=xf(e)}return t}e=n,n=e.parentNode}return null}function St(e){if(e=e[mt]||e[ht]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ct(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function wt(e){var t=e[vt];return t||=e[vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Tt(e){e[yt]=!0}var Et=new Set,Dt={};function Ot(e,t){kt(e,t),kt(e+`Capture`,t)}function kt(e,t){for(Dt[e]=t,e=0;e<t.length;e++)Et.add(t[e])}var At=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]*$`),N={},jt={};function Mt(e){return ke.call(jt,e)?!0:ke.call(N,e)?!1:At.test(e)?jt[e]=!0:(N[e]=!0,!1)}function Nt(e,t,n){if(Mt(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 Pt(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 Ft(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 It(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Lt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Rt(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 zt(e){if(!e._valueTracker){var t=Lt(e)?`checked`:`value`;e._valueTracker=Rt(e,t,``+e[t])}}function Bt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Lt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function P(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 Vt=/[\n"\\]/g;function Ht(e){return e.replace(Vt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ut(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=``+It(t)):e.value!==``+It(t)&&(e.value=``+It(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Gt(e,o,It(n)):Gt(e,o,It(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=``+It(s):e.removeAttribute(`name`)}function Wt(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)){zt(e);return}n=n==null?``:``+It(n),t=t==null?n:``+It(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),zt(e)}function Gt(e,t,n){t===`number`&&P(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Kt(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=``+It(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 qt(e,t,n){if(t!=null&&(t=``+It(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+It(n)}function Jt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ce(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=It(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),zt(e)}function Yt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xt=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 Zt(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||Xt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Qt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Zt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Zt(e,o,t[o])}function $t(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 en=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`]]),tn=/^[\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 nn(e){return tn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function rn(){}var an=null;function on(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sn=null,cn=null;function ln(e){var t=St(e);if(t&&(e=t.stateNode)){var n=e[j]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ut(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="`+Ht(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[j]||null;if(!a)throw Error(i(90));Ut(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Bt(r)}break a;case`textarea`:qt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Kt(e,!!n.multiple,t,!1)}}}var un=!1;function dn(e,t,n){if(un)return e(t,n);un=!0;try{return e(t)}finally{if(un=!1,(sn!==null||cn!==null)&&(Ou(),sn&&(t=sn,e=cn,cn=sn=null,ln(t),e)))for(t=0;t<e.length;t++)ln(e[t])}}function fn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[j]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var pn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),mn=!1;if(pn)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){mn=!0}}),window.addEventListener(`test`,hn,hn),window.removeEventListener(`test`,hn,hn)}catch{mn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.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 vn=i.slice(e,1<r?1-r:void 0)}function bn(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 xn(){return!0}function Sn(){return!1}function Cn(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)?xn:Sn,this.isPropagationStopped=Sn,this}return p(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=xn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=xn)},persist:function(){},isPersistent:xn}),t}var wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tn=Cn(wn),En=p({},wn,{view:0,detail:0}),Dn=Cn(En),On,kn,An,jn=p({},En,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hn,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!==An&&(An&&e.type===`mousemove`?(On=e.screenX-An.screenX,kn=e.screenY-An.screenY):kn=On=0,An=e),On)},movementY:function(e){return`movementY`in e?e.movementY:kn}}),Mn=Cn(jn),Nn=Cn(p({},jn,{dataTransfer:0})),Pn=Cn(p({},En,{relatedTarget:0})),Fn=Cn(p({},wn,{animationName:0,elapsedTime:0,pseudoElement:0})),In=Cn(p({},wn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Ln=Cn(p({},wn,{data:0})),Rn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},zn={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`},Bn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bn[e])?!!t[e]:!1}function Hn(){return Vn}var Un=Cn(p({},En,{key:function(e){if(e.key){var t=Rn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=bn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hn,charCode:function(e){return e.type===`keypress`?bn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?bn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Wn=Cn(p({},jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Gn=Cn(p({},En,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hn})),Kn=Cn(p({},wn,{propertyName:0,elapsedTime:0,pseudoElement:0})),qn=Cn(p({},jn,{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})),Jn=Cn(p({},wn,{newState:0,oldState:0})),Yn=[9,13,27,32],Xn=pn&&`CompositionEvent`in window,Zn=null;pn&&`documentMode`in document&&(Zn=document.documentMode);var Qn=pn&&`TextEvent`in window&&!Zn,$n=pn&&(!Xn||Zn&&8<Zn&&11>=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=yn(),vn=_n=gn=null,ir=!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 $n&&t.locale!==`ko`?null:t.data;default:return null}}var sr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!sr[e.type]:t===`textarea`}function lr(e,t,n,r){sn?cn?cn.push(r):cn=[r]:sn=r,t=Fd(t,`onChange`),0<t.length&&(n=new Tn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ur=null,dr=null;function fr(e){Od(e,0)}function pr(e){if(Bt(Ct(e)))return e}function mr(e,t){if(e===`change`)return t}var hr=!1;if(pn){var gr;if(pn){var _r=`oninput`in document;if(!_r){var vr=document.createElement(`div`);vr.setAttribute(`oninput`,`return;`),_r=typeof vr.oninput==`function`}gr=_r}else gr=!1;hr=gr&&(!document.documentMode||9<document.documentMode)}function yr(){ur&&(ur.detachEvent(`onpropertychange`,br),dr=ur=null)}function br(e){if(e.propertyName===`value`&&pr(dr)){var t=[];lr(t,dr,e,on(e)),dn(fr,t)}}function xr(e,t,n){e===`focusin`?(yr(),ur=t,dr=n,ur.attachEvent(`onpropertychange`,br)):e===`focusout`&&yr()}function Sr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return pr(dr)}function Cr(e,t){if(e===`click`)return pr(t)}function wr(e,t){if(e===`input`||e===`change`)return pr(t)}function Tr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Er=typeof Object.is==`function`?Object.is:Tr;function Dr(e,t){if(Er(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(!ke.call(t,i)||!Er(e[i],t[i]))return!1}return!0}function Or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kr(e,t){var n=Or(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=Or(n)}}function Ar(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ar(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=P(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=P(e.document)}return t}function Mr(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 Nr=pn&&`documentMode`in document&&11>=document.documentMode,Pr=null,Fr=null,Ir=null,Lr=!1;function Rr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lr||Pr==null||Pr!==P(r)||(r=Pr,`selectionStart`in r&&Mr(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}),Ir&&Dr(Ir,r)||(Ir=r,r=Fd(Fr,`onSelect`),0<r.length&&(t=new Tn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Pr)))}function zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Br={animationend:zr(`Animation`,`AnimationEnd`),animationiteration:zr(`Animation`,`AnimationIteration`),animationstart:zr(`Animation`,`AnimationStart`),transitionrun:zr(`Transition`,`TransitionRun`),transitionstart:zr(`Transition`,`TransitionStart`),transitioncancel:zr(`Transition`,`TransitionCancel`),transitionend:zr(`Transition`,`TransitionEnd`)},Vr={},Hr={};pn&&(Hr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Br.animationend.animation,delete Br.animationiteration.animation,delete Br.animationstart.animation),`TransitionEvent`in window||delete Br.transitionend.transition);function Ur(e){if(Vr[e])return Vr[e];if(!Br[e])return e;var t=Br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hr)return Vr[e]=t[n];return e}var Wr=Ur(`animationend`),Gr=Ur(`animationiteration`),Kr=Ur(`animationstart`),qr=Ur(`transitionrun`),Jr=Ur(`transitionstart`),Yr=Ur(`transitioncancel`),Xr=Ur(`transitionend`),Zr=new Map,Qr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Qr.push(`scrollEnd`);function $r(e,t){Zr.set(e,t),Ot(t,[e])}var ei=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)},ti=[],ni=0,ri=0;function ii(){for(var e=ni,t=ri=ni=0;t<e;){var n=ti[t];ti[t++]=null;var r=ti[t];ti[t++]=null;var i=ti[t];ti[t++]=null;var a=ti[t];if(ti[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&&ci(n,i,a)}}function ai(e,t,n,r){ti[ni++]=e,ti[ni++]=t,ti[ni++]=n,ti[ni++]=r,ri|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function oi(e,t,n,r){return ai(e,t,n,r),li(e)}function si(e,t){return ai(e,null,null,t),li(e)}function ci(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-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function li(e){if(50<yu)throw yu=0,bu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ui={};function di(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 fi(e,t,n,r){return new di(e,t,n,r)}function pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mi(e,t){var n=e.alternate;return n===null?(n=fi(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 hi(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 gi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)pi(e)&&(s=1);else if(typeof e==`string`)s=W(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ne:return e=fi(31,n,t,a),e.elementType=ne,e.lanes=o,e;case y:return _i(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=fi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=fi(13,n,t,a),e.elementType=T,e.lanes=o,e;case ee:return e=fi(19,n,t,a),e.elementType=ee,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case E:s=14;break a;case te:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=fi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function _i(e,t,n,r){return e=fi(7,e,r,t),e.lanes=n,e}function vi(e,t,n){return e=fi(6,e,null,t),e.lanes=n,e}function yi(e){var t=fi(18,null,null,0);return t.stateNode=e,t}function bi(e,t,n){return t=fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xi=new WeakMap;function Si(e,t){if(typeof e==`object`&&e){var n=xi.get(e);return n===void 0?(t={value:e,source:t,stack:Oe(t)},xi.set(e,t),t):n}return{value:e,source:t,stack:Oe(t)}}var Ci=[],wi=0,Ti=null,Ei=0,Di=[],Oi=0,ki=null,Ai=1,ji=``;function Mi(e,t){Ci[wi++]=Ei,Ci[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-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ai=1<<32-Ge(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=Ci[--wi],Ci[wi]=null,Ei=Ci[--wi],Ci[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(i(519));function Hi(e){throw Ji(Si(Error(i(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[mt]=e,t[j]=r,n){case`dialog`:U(`cancel`,t),U(`close`,t);break;case`iframe`:case`object`:case`embed`:U(`load`,t);break;case`video`:case`audio`:for(n=0;n<Ed.length;n++)U(Ed[n],t);break;case`source`:U(`error`,t);break;case`img`:case`image`:case`link`:U(`error`,t),U(`load`,t);break;case`details`:U(`toggle`,t);break;case`input`:U(`invalid`,t),Wt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:U(`invalid`,t);break;case`textarea`:U(`invalid`,t),Jt(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||Vd(t.textContent,n)?(r.popover!=null&&(U(`beforetoggle`,t),U(`toggle`,t)),r.onScroll!=null&&U(`scroll`,t),r.onScrollEnd!=null&&U(`scrollend`,t),r.onClick!=null&&(t.onclick=rn),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`)||$d(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(i(317));Ri=bf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ri=bf(e)}else t===27?(t=Ri,cf(e.type)?(e=yf,yf=null,Ri=e):Ri=t):Ri=Li?vf(e.stateNode.nextSibling):null;return!0}function Ki(){Ri=Li=null,F=!1}function qi(){var e=zi;return e!==null&&(au===null?au=e:au.push.apply(au,e),zi=null),e}function Ji(e){zi===null?zi=[e]:zi.push(e)}var Yi=fe(null),Xi=null,Zi=null;function Qi(e,t,n){k(Yi,t._currentValue),t._currentValue=n}function I(e){e._currentValue=Yi.current,pe(Yi)}function $i(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ea(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),$i(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),$i(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ta(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Er(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===_e.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sp]:e.push(sp))}a=a.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!Er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Xi=e,Zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Xi,e)}function aa(e,t){return Xi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Zi===null){if(e===null)throw Error(i(308));Zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zi=Zi.next=t;return n}var sa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function _a(e,t){if(pa===null){var n=pa=[];ma=0,ha=bd(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(va,va),t}function va(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ya(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 ba=D.S;D.S=function(e,t){cu=A(),typeof t==`object`&&t&&typeof t.then==`function`&&_a(e,t),ba!==null&&ba(e,t)};var xa=fe(null);function Sa(){var e=xa.current;return e===null?Gl.pooledCache:e}function Ca(e,t){t===null?k(xa,xa.current):k(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:ua._currentValue,pool:e}}var Ta=Error(i(460)),Ea=Error(i(474)),Da=Error(i(542)),L={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(rn,rn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(rn,rn);else{if(e=Gl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,Ta}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,Ta):e}}var ja=null;function Ma(){if(ja===null)throw Error(i(459));var e=ja;return ja=null,e}function Na(e){if(e===Ta||e===Da)throw Error(i(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===h?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=mi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=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=vi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===te&&Aa(i)===t.type)?(t=a(t,n.props),La(t,n),t.return=e,t):(t=gi(n.type,n.key,n.props,null,e.mode,r),La(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=bi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=_i(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=gi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case v:return t=bi(t,e.mode,n),t.return=e,t;case te:return t=Aa(t),f(e,t,n)}if(ce(t)||ae(t))return t=_i(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===C)return f(e,aa(e,t),n);Ra(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 te:return n=Aa(n),p(e,t,n,r)}if(ce(n)||ae(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===C)return p(e,t,aa(e,n),r);Ra(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 te:return r=Aa(r),m(e,t,n,r,i)}if(ce(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ia(r),i);if(r.$$typeof===C)return m(e,t,n,aa(t,r),i);Ra(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),F&&Mi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return 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),a=o(g,a,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(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),F&&Mi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return F&&Mi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),F&&Mi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===te&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=_i(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=gi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=bi(o,e.mode,c),c.return=e,e=c}return s(e);case te:return o=Aa(o),b(e,r,o,c)}if(ce(o))return h(e,r,o,c);if(ae(o)){if(l=ae(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ia(o),c);if(o.$$typeof===C)return b(e,r,aa(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=vi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=b(e,t,n,r);return Pa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(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 Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Wl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=li(e),ci(e,null,n),t}return ai(e,r,t,n),li(e)}function R(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,st(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ja=!1;function Ya(){if(Ja){var e=ga;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Ha=!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,m=f!==s.lane;if(m?(H&f)===f:(r&f)===f){f!==0&&f===ha&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ha=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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),$l|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Za(n[e],t)}var $a=fe(null),eo=fe(0);function to(e,t){e=Zl,k(eo,e),k($a,t),Zl=e|t.baseLanes}function no(){k(eo,Zl),k($a,$a.current)}function ro(){Zl=eo.current,pe($a),pe(eo)}var io=fe(null),ao=null;function oo(e){var t=e.alternate;k(fo,fo.current&1),k(io,e),ao===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(ao=e)}function so(e){k(fo,fo.current),k(io,e),ao===null&&(ao=e)}function co(e){e.tag===22?(k(fo,fo.current),k(io,e),ao===null&&(ao=e)):lo(e)}function lo(){k(fo,fo.current),k(io,io.current)}function uo(e){pe(io),ao===e&&(ao=null),pe(fo)}var fo=fe(0);function po(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hf(n)||gf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mo=0,z=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return mo=a,z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Us:Ws,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){D.H=Hs;var t=ho!==null&&ho.next!==null;if(mo=0,go=ho=z=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&na(e)&&(sc=!0))}function Oo(e,t,n,r){z=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Gs,o=t(n,r)}while(vo);return o}function ko(){var e=D.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(z.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}mo=0,go=ho=z=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?z.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=z.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?z.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw z.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?z.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=ka(So,e,t),t=z,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return ia(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=z.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=z.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),z.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=re;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(mo&f)===f:(H&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ha&&(d=!0);else if((mo&p)===p){u=u.next,p===ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,z.lanes|=p,$l|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,z.lanes|=f,$l|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Er(o,e.memoizedState)&&(sc=!0,d&&(n=ga,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Er(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=z,a=Po(),o=F;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Er((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),Gl===null)throw Error(i(349));o||mo&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=z.updateQueue,t===null?(t=Fo(),z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function Jo(e){var t=si(e,2);t!==null&&Cu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};D.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=D.T,o={};D.T=o;try{var s=n(i,r),c=D.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),D.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(F){var n=Gl.formState;if(n!==null){a:{var r=z;if(F){if(Ri){b:{for(var i=Ri,a=Bi;i.nodeType!==8;){if(!a){i=null;break b}if(i=vf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ri=vf(i.nextSibling),r=i.data===`F!`;break a}}Hi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,z,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,z,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,z,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),ho,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Ta?Da:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(z.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=ho;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=z.updateQueue,t===null&&(t=Fo(),z.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();z.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(z.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){z.flags|=4;var t=z.updateQueue;if(t===null)t=Fo(),z.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(Wl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||mo&1073741824&&!(H&261930)?e.memoizedState=t:(e.memoizedState=n,e=Su(),z.lanes|=e,$l|=e,n)}function Ts(e,t,n,r){return Er(n,t)?n:$a.current===null?!(mo&42)||mo&1073741824&&!(H&261930)?(sc=!0,e.memoizedState=n):(e=Su(),z.lanes|=e,$l|=e,t):(e=ws(e,n,r),Er(e,t)||(sc=!0),e)}function Es(e,t,n,r,i){var a=O.p;O.p=a!==0&&8>a?a:8;var o=D.T,s={};D.T=s,Rs(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,ya(c,r),xu(e)):Ls(e,t,r,xu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},xu())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,le,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},xu())}function js(){return ia(sp)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=xu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(Cu(r,t,n),R(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=xu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=oi(e,t,n,r),n!==null&&(Cu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,xu())}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,Er(s,o))return ai(e,t,i,0),Gl===null&&ii(),!1}catch{}if(n=oi(e,t,i,r),n!==null)return Cu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:bd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=oi(e,n,r,2),t!==null&&Cu(t,e,2)}function zs(e){var t=e.alternate;return e===z||t!==null&&t===z}function Bs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var Hs={readContext:ia,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Hs.useEffectEvent=wo;var Us={readContext:ia,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){We(!0);try{n(t)}finally{We(!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,z,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,z,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,z,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=z,a=No();if(F){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Gl===null)throw Error(i(349));H&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Gl.identifierPrefix;if(F){var n=ji,r=Ai;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,z,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,z)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(Wl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:ia,use:Lo,useCallback:Ss,useContext:ia,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:ia,use:Lo,useCallback:Ss,useContext:ia,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return ho===null?ws(n,e,t):Ts(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Cu(t,e,r),R(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Cu(t,e,r),R(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xu(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(Cu(t,e,n),R(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?!Dr(n,r)||!Dr(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=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){ei(e)}function Qs(e){console.error(e)}function $s(e){ei(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Ga(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(du===null?du=new Set([this]):du.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ta(t,n,a,!0),n=io.current,n!==null){switch(n.tag){case 31:case 13:return ao===null?Fu():n.alternate===null&&Ql===0&&(Ql=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===L?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),ed(e,r,a)),!1;case 22:return n.flags|=65536,r===L?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)),ed(e,r,a)),!1}throw Error(i(435,n.tag))}return ed(e,r,a),Fu(),!1}if(F)return t=io.current,t===null?(r!==Vi&&(t=Error(i(423),{cause:r}),Ji(Si(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Si(r,n),a=nc(e.stateNode,r,a),qa(e,a),Ql!==4&&(Ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Vi&&(e=Error(i(422),{cause:r}),Ji(Si(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Si(o,n),iu===null?iu=[o]:iu.push(o),Ql!==4&&(Ql=2),t===null)return!0;r=Si(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),qa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(du===null||!du.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),qa(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ra(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(F&&s&&Pi(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=gi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Dr:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Dr(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?no():to(t,a),co(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),no(),lo(t)):(Ca(t,a.cachePool),to(t,a),lo(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),no(),co(t),e!==null&&ta(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ba(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,uo(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(F){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(so(t),(e=Ri)?(e=mf(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=yi(e),n.return=t,t.child=n,Li=t,Ri=null)):e=null,e===null)throw Hi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(so(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||ta(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=Gl,r!==null&&(s=ct(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,si(e,s),Cu(r,e,s),oc;Fu(),t=gc(e,t,n)}else e=o.treeContext,Ri=vf(s.nextSibling),Li=t,F=!0,zi=null,Bi=!1,e!==null&&Ii(t,e),t=hc(t,r),t.flags|=4096;return t}return e=mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return ra(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(F&&r&&Pi(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Nc(e,t,a)):(F&&r&&Pi(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=ui,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):ui,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),Xa(t,r,a,i),Ya(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ui,typeof u==`object`&&u&&(o=ia(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ys(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Xa(t,r,a,i),Ya(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Ha||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,Wa(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ui,typeof l==`object`&&l&&(c=ia(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ys(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Xa(t,r,a,i),Ya();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Ha||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(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=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return Ki(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:wa()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=nu),e}function Ec(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(fo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(F){if(a?oo(t):lo(t),(e=Ri)?(e=mf(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=yi(e),n.return=t,t.child=n,Li=t,Ri=null)):e=null,e===null)throw Hi(t);return gf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(lo(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=_i(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(oo(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(oo(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(lo(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=_i(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(lo(t),t.child=e.child,t.flags|=128,t=null);else if(oo(t),gf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ji({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(sc||ta(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=Gl,s!==null&&(r=ct(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,si(e,r),Cu(s,e,r),oc;hf(c)||Fu(),t=kc(e,t,n)}else hf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ri=vf(c.nextSibling),Li=t,F=!0,zi=null,Bi=!1,e!==null&&Ii(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return a?(lo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=mi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=_i(c,a,n,null),c.flags|=2):c=mi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=wa():(l=ua._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(oo(t),n=e.child,e=n.sibling,n=mi(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 Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=fi(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ba(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$i(e.return,t,n)}function jc(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 Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=fo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,k(fo,o),cc(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&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&po(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&po(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$l|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&na(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),Qi(t,ua,e.memoizedState.cache),Ki();break;case 27:case 5:be(t);break;case 4:ve(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,so(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(oo(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(oo(t),t.flags|=128,null);oo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),k(fo,fo.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Qi(t,ua,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return sc=!1,Fc(e,t,n);sc=!!(e.flags&131072)}else sc=!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=Aa(t.elementType),t.type=e,typeof e==`function`)pi(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===E){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=se(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Wa(e,t),Xa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Qi(t,ua,r),r!==o.cache&&ea(t,[ua],n,!0),Ya(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==a){a=Si(Error(i(424)),t),Ji(a),t=Sc(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=vf(e.firstChild),Li=t,F=!0,zi=null,Bi=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ki(),r===a){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=zf(t.type,null,t.pendingProps,null))?t.memoizedState=n:F||(n=t.type,e=t.pendingProps,r=Xd(ge.current).createElement(n),r[mt]=t,r[j]=e,Wd(r,n,e),Tt(r),t.stateNode=r):t.memoizedState=zf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return be(t),e===null&&F&&(r=t.stateNode=Sf(t.type,t.pendingProps,ge.current),Li=t,Bi=!0,a=Ri,cf(t.type)?(yf=a,Ri=vf(r.firstChild)):Ri=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&F&&((a=r=Ri)&&(r=ff(r,t.type,t.pendingProps,Bi),r===null?a=!1:(t.stateNode=r,Li=t,Ri=vf(r.firstChild),Bi=!1,a=!0)),a||Hi(t)),be(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,$d(a,o)?r=null:s!==null&&$d(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),sp._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&F&&((e=n=Ri)&&(n=pf(n,t.pendingProps,Bi),n===null?e=!1:(t.stateNode=n,Li=t,Ri=null,e=!0)),e||Hi(t)),null;case 13:return Ec(e,t,n);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Qi(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ra(t),a=ia(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return ra(t),r=ia(ua),e===null?(a=Sa(),a===null&&(a=Gl,o=da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ua(t),Qi(t,ua,a)):((e.lanes&n)!==0&&(Wa(e,t),Xa(t,null,null,n),Ya()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Qi(t,ua,r),r!==a.cache&&ea(t,[ua],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Qi(t,ua,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(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(Mu())e.flags|=8192;else throw ja=L,Ea}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$f(t))if(Mu())e.flags|=8192;else throw ja=L,Ea}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,ru|=t)}function Vc(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 Hc(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 Uc(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 Hc(t),null;case 1:return Hc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),I(ua),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gi(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qi())),Hc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(Hc(t),Rc(t,a,null,r,n)):(Hc(t),zc(t,o))):o?o===e.memoizedState?(Hc(t),t.flags&=-16777217):(Lc(t),Hc(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),Hc(t),Rc(t,a,e,r,n)),null;case 27:if(xe(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}e=me.current,Gi(t)?Ui(t,e):(e=Sf(a,r,n),t.stateNode=e,Lc(t))}return Hc(t),null;case 5:if(xe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}if(o=me.current,Gi(t))Ui(t,o);else{var s=Xd(ge.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[mt]=t,o[j]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Wd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return Hc(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Li,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Vd(e.nodeValue,n)),e||Hi(t,!0)}else e=Xd(e).createTextNode(r),e[mt]=t,t.stateNode=e}return Hc(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(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[mt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(i(558))}return Hc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[mt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),a=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),Hc(t),null);case 4:return ye(),e===null&&jd(t.stateNode.containerInfo),Hc(t),null;case 10:return I(t.type),Hc(t),null;case 19:if(pe(fo),r=t.memoizedState,r===null)return Hc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Vc(r,!1);else{if(Ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=po(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)hi(n,e),n=n.sibling;return k(fo,fo.current&1|2),F&&Mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&A()>lu&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=po(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!F)return Hc(t),null}else 2*A()-r.renderingStartTime>lu&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Hc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=A(),e.sibling=null,n=fo.current,k(fo,a?n&1|2:n&1),F&&Mi(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Hc(t),t.subtreeFlags&6&&(t.flags|=8192)):Hc(t),n=t.updateQueue,n!==null&&Bc(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&&pe(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),I(ua),Hc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Wc(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(ua),ye(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(fo),null;case 4:return ye(),null;case 10:return I(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&pe(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return I(ua),null;case 25:return null;default:return null}}function Gc(e,t){switch(Fi(t),t.tag){case 3:I(ua),ye();break;case 26:case 27:case 5:xe(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:pe(fo);break;case 10:I(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&pe(xa);break;case 24:I(ua)}}function Kc(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){$u(t,t.return,e)}}function qc(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){$u(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){$u(t,t.return,e)}}function Jc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){$u(e,e.return,t)}}}function Yc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){$u(e,t,n)}}function Xc(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){$u(e,t,n)}}function Zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){$u(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){$u(e,t,n)}else n.current=null}function Qc(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){$u(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;Gd(r,e.type,n,t),r[j]=t}catch(t){$u(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cf(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(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&&cf(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 nl(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=rn));else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e,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&&cf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wd(t,r,n),t[mt]=e,t[j]=n}catch(t){$u(e,e.return,t)}}var al=!1,ol=!1,sl=!1,cl=typeof WeakSet==`function`?WeakSet:Set,ll=null;function ul(e,t){if(e=e.containerInfo,Jd=gp,e=jr(e),Mr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Yd={focusedElem:e,selectionRange:n},gp=!1,ll=t;ll!==null;)if(t=ll,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ll=e;else for(;ll!==null;){switch(t=ll,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){$u(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)df(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:df(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ll=e;break}ll=t.return}}function dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Tl(e,n),r&4&&Kc(5,n);break;case 1:if(Tl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){$u(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){$u(n,n.return,e)}}r&64&&Jc(n),r&512&&Xc(n,n.return);break;case 3:if(Tl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Qa(e,t)}catch(e){$u(n,n.return,e)}}break;case 27:t===null&&r&4&&il(n);case 26:case 5:Tl(e,n),t===null&&r&4&&Qc(n),r&512&&Xc(n,n.return);break;case 12:Tl(e,n);break;case 31:Tl(e,n),r&4&&gl(e,n);break;case 13:Tl(e,n),r&4&&_l(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=rd.bind(null,n),_f(e,n))));break;case 22:if(r=n.memoizedState!==null||al,!r){t=t!==null&&t.memoizedState!==null||ol,i=al;var a=ol;al=r,(ol=t)&&!a?Dl(e,n,(n.subtreeFlags&8772)!=0):Tl(e,n),al=i,ol=a}break;case 30:break;default:Tl(e,n)}}function fl(e){var t=e.alternate;t!==null&&(e.alternate=null,fl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(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 B=null,pl=!1;function ml(e,t,n){for(n=n.child;n!==null;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:ol||Zc(n,t),ml(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ol||Zc(n,t);var r=B,i=pl;cf(n.type)&&(B=n.stateNode,pl=!1),ml(e,t,n),Cf(n.stateNode),B=r,pl=i;break;case 5:ol||Zc(n,t);case 6:if(r=B,i=pl,B=null,ml(e,t,n),B=r,pl=i,B!==null)if(pl)try{(B.nodeType===9?B.body:B.nodeName===`HTML`?B.ownerDocument.body:B).removeChild(n.stateNode)}catch(e){$u(n,t,e)}else try{B.removeChild(n.stateNode)}catch(e){$u(n,t,e)}break;case 18:B!==null&&(pl?(e=B,lf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Vp(e)):lf(B,n.stateNode));break;case 4:r=B,i=pl,B=n.stateNode.containerInfo,pl=!0,ml(e,t,n),B=r,pl=i;break;case 0:case 11:case 14:case 15:qc(2,n,t),ol||qc(4,n,t),ml(e,t,n);break;case 1:ol||(Zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Yc(n,t,r)),ml(e,t,n);break;case 21:ml(e,t,n);break;case 22:ol=(r=ol)||n.memoizedState!==null,ml(e,t,n),ol=r;break;default:ml(e,t,n)}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Vp(e)}catch(e){$u(t,t.return,e)}}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Vp(e)}catch(e){$u(t,t.return,e)}}function vl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cl),t;default:throw Error(i(435,e.tag))}}function yl(e,t){var n=vl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=id.bind(null,e,t);t.then(r,r)}})}function bl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(cf(c.type)){B=c.stateNode,pl=!1;break a}break;case 5:B=c.stateNode,pl=!1;break a;case 3:case 4:B=c.stateNode.containerInfo,pl=!0;break a}c=c.return}if(B===null)throw Error(i(160));hl(o,s,a),B=null,pl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sl(t,e),t=t.sibling}var xl=null;function Sl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bl(t,e),Cl(e),r&4&&(qc(3,e,e.return),Kc(3,e),qc(5,e,e.return));break;case 1:bl(t,e),Cl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&64&&al&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=xl;if(bl(t,e),Cl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[yt]||o[mt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Wd(o,r,n),o[mt]=e,Tt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Zf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[mt]=e,Tt(o),r=o}e.stateNode=r}else Qf(a,e.type,e.stateNode);else e.stateNode=Kf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&$c(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Qf(a,e.type,e.stateNode):Kf(a,r,e.memoizedProps))}break;case 27:bl(t,e),Cl(e),r&512&&(ol||n===null||Zc(n,n.return)),n!==null&&r&4&&$c(e,e.memoizedProps,n.memoizedProps);break;case 5:if(bl(t,e),Cl(e),r&512&&(ol||n===null||Zc(n,n.return)),e.flags&32){a=e.stateNode;try{Yt(a,``)}catch(t){$u(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,$c(e,a,n===null?a:n.memoizedProps)),r&1024&&(sl=!0);break;case 6:if(bl(t,e),Cl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){$u(e,e.return,t)}}break;case 3:if(Xf=null,a=xl,xl=Ef(t.containerInfo),bl(t,e),xl=a,Cl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Vp(t.containerInfo)}catch(t){$u(e,e.return,t)}sl&&(sl=!1,wl(e));break;case 4:r=xl,xl=Ef(e.stateNode.containerInfo),bl(t,e),Cl(e),xl=r;break;case 12:bl(t,e),Cl(e);break;case 31:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 13:bl(t,e),Cl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(su=A()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=al,d=ol;if(al=u||a,ol=d||l,bl(t,e),ol=d,al=u,Cl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||al||ol||El(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){$u(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){$u(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?uf(m,!0):uf(l.stateNode,!1)}catch(e){$u(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,yl(e,n))));break;case 19:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 30:break;case 21:break;default:bl(t,e),Cl(e)}}function Cl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(el(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;rl(e,tl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Yt(o,``),n.flags&=-33),rl(e,tl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;nl(e,tl(e),s);break;default:throw Error(i(161))}}catch(t){$u(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Tl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dl(e,t.alternate,t),t=t.sibling}function El(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qc(4,t,t.return),El(t);break;case 1:Zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Yc(t,t.return,n),El(t);break;case 27:Cf(t.stateNode);case 26:case 5:Zc(t,t.return),El(t);break;case 22:t.memoizedState===null&&El(t);break;case 30:El(t);break;default:El(t)}e=e.sibling}}function Dl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Dl(i,a,n),Kc(4,a);break;case 1:if(Dl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){$u(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Za(c[i],s)}catch(e){$u(r,r.return,e)}}n&&o&64&&Jc(a),Xc(a,a.return);break;case 27:il(a);case 26:case 5:Dl(i,a,n),n&&r===null&&o&4&&Qc(a),Xc(a,a.return);break;case 12:Dl(i,a,n);break;case 31:Dl(i,a,n),n&&o&4&&gl(i,a);break;case 13:Dl(i,a,n),n&&o&4&&_l(i,a);break;case 22:a.memoizedState===null&&Dl(i,a,n),Xc(a,a.return);break;case 30:break;default:Dl(i,a,n)}t=t.sibling}}function Ol(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&fa(n))}function kl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function Al(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jl(e,t,n,r),t=t.sibling}function jl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Al(e,t,n,r),i&2048&&Kc(9,t);break;case 1:Al(e,t,n,r);break;case 3:Al(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e)));break;case 12:if(i&2048){Al(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){$u(t,t.return,e)}}else Al(e,t,n,r);break;case 31:Al(e,t,n,r);break;case 13:Al(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Al(e,t,n,r):(a._visibility|=2,Ml(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Al(e,t,n,r):Nl(e,t),i&2048&&Ol(o,t);break;case 24:Al(e,t,n,r),i&2048&&kl(t.alternate,t);break;default:Al(e,t,n,r)}}function Ml(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ml(a,o,s,c,i),Kc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ml(a,o,s,c,i)):u._visibility&2?Ml(a,o,s,c,i):Nl(a,o),i&&l&2048&&Ol(o.alternate,o);break;case 24:Ml(a,o,s,c,i),i&&l&2048&&kl(o.alternate,o);break;default:Ml(a,o,s,c,i)}t=t.sibling}}function Nl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Nl(n,r),i&2048&&Ol(r.alternate,r);break;case 24:Nl(n,r),i&2048&&kl(r.alternate,r);break;default:Nl(n,r)}t=t.sibling}}var Pl=8192;function Fl(e,t,n){if(e.subtreeFlags&Pl)for(e=e.child;e!==null;)Il(e,t,n),e=e.sibling}function Il(e,t,n){switch(e.tag){case 26:Fl(e,t,n),e.flags&Pl&&e.memoizedState!==null&&ep(n,xl,e.memoizedState,e.memoizedProps);break;case 5:Fl(e,t,n);break;case 3:case 4:var r=xl;xl=Ef(e.stateNode.containerInfo),Fl(e,t,n),xl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Pl,Pl=16777216,Fl(e,t,n),Pl=r):Fl(e,t,n));break;default:Fl(e,t,n)}}function Ll(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Vl(r,e)}Ll(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zl(e),e=e.sibling}function zl(e){switch(e.tag){case 0:case 11:case 15:Rl(e),e.flags&2048&&qc(9,e,e.return);break;case 3:Rl(e);break;case 12:Rl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bl(e)):Rl(e);break;default:Rl(e)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Vl(r,e)}Ll(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qc(8,t,t.return),Bl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bl(t));break;default:Bl(t)}e=e.sibling}}function Vl(e,t){for(;ll!==null;){var n=ll;switch(n.tag){case 0:case 11:case 15:qc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ll=r;else a:for(n=e;ll!==null;){r=ll;var i=r.sibling,a=r.return;if(fl(r),r===n){ll=null;break a}if(i!==null){i.return=a,ll=i;break a}ll=a}}}var Hl={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},Ul=typeof WeakMap==`function`?WeakMap:Map,Wl=0,Gl=null,V=null,H=0,Kl=0,ql=null,Jl=!1,Yl=!1,Xl=!1,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=null,au=null,ou=!1,su=0,cu=0,lu=1/0,uu=null,du=null,fu=0,pu=null,mu=null,hu=0,gu=0,_u=null,vu=null,yu=0,bu=null;function xu(){return Wl&2&&H!==0?H&-H:D.T===null?dt():bd()}function Su(){if(nu===0)if(!(H&536870912)||F){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),nu=e}else nu=536870912;return e=io.current,e!==null&&(e.flags|=32),nu}function Cu(e,t,n){(e===Gl&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)&&(Au(e,0),Du(e,H,nu,!1)),it(e,n),(!(Wl&2)||e!==Gl)&&(e===Gl&&(!(Wl&2)&&(eu|=n),Ql===4&&Du(e,H,nu,!1)),fd(e))}function wu(e,t,n){if(Wl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),a=r?Ru(e,t):Iu(e,t,!0),o=r;do{if(a===0){Yl&&!r&&Du(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Eu(n)){a=Iu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=iu;var l=c.current.memoizedState.isDehydrated;if(l&&(Au(c,s).flags|=256),s=Iu(c,s,!1),s!==2){if(Xl&&!l){c.errorRecoveryDisabledLanes|=o,eu|=o,a=4;break a}o=au,au=a,o!==null&&(au===null?au=o:au.push.apply(au,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Au(e,0),Du(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Du(r,t,nu,!Jl);break a;case 2:au=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=su+300-A(),10<a)){if(Du(r,t,nu,!Jl),$e(r,0,!0)!==0)break a;hu=t,r.timeoutHandle=nf(Tu.bind(null,r,n,au,uu,ou,t,nu,eu,ru,Jl,o,`Throttled`,-0,0),a);break a}Tu(r,n,au,uu,ou,t,nu,eu,ru,Jl,o,null,-0,0)}}break}while(1);fd(e)}function Tu(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:rn},Il(t,a,d);var m=(a&62914560)===a?su-A():(a&4194048)===a?cu-A():0;if(m=np(d,m),m!==null){hu=a,e.cancelPendingCommit=m(Gu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Du(e,a,o,!l);return}}Gu(e,t,a,n,r,i,o,s,c)}function Eu(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(!Er(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 Du(e,t,n,r){t&=~tu,t&=~eu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ot(e,n,t)}function Ou(){return Wl&6?!0:(pd(0,!1),!1)}function ku(){if(V!==null){if(Kl===0)var e=V.return;else e=V,Zi=Xi=null,Mo(e),Pa=null,Fa=0,e=V;for(;e!==null;)Gc(e.alternate,e),e=e.return;V=null}}function Au(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,rf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),hu=0,ku(),Gl=e,V=n=mi(e.current,null),H=t,Kl=0,ql=null,Jl=!1,Yl=et(e,t),Xl=!1,ru=nu=tu=eu=$l=Ql=0,au=iu=null,ou=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ge(r),a=1<<i;t|=e[i],r&=~a}return Zl=t,ii(),n}function ju(e,t){z=null,D.H=Hs,t===Ta||t===Da?(t=Ma(),Kl=3):t===Ea?(t=Ma(),Kl=4):Kl=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ql=t,V===null&&(Ql=1,ec(e,Si(t,e.current)))}function Mu(){var e=io.current;return e===null?!0:(H&4194048)===H?ao===null:(H&62914560)===H||H&536870912?e===ao:!1}function Nu(){var e=D.H;return D.H=Hs,e===null?Hs:e}function Pu(){var e=D.A;return D.A=Hl,e}function Fu(){Ql=4,Jl||(H&4194048)!==H&&io.current!==null||(Yl=!0),!($l&134217727)&&!(eu&134217727)||Gl===null||Du(Gl,H,nu,!1)}function Iu(e,t,n){var r=Wl;Wl|=2;var i=Nu(),a=Pu();(Gl!==e||H!==t)&&(uu=null,Au(e,t)),t=!1;var o=Ql;a:do try{if(Kl!==0&&V!==null){var s=V,c=ql;switch(Kl){case 8:ku(),o=6;break a;case 3:case 2:case 9:case 6:io.current===null&&(t=!0);var l=Kl;if(Kl=0,ql=null,Hu(e,s,c,l),n&&Yl){o=0;break a}break;default:l=Kl,Kl=0,ql=null,Hu(e,s,c,l)}}Lu(),o=Ql;break}catch(t){ju(e,t)}while(1);return t&&e.shellSuspendCounter++,Zi=Xi=null,Wl=r,D.H=i,D.A=a,V===null&&(Gl=null,H=0,ii()),o}function Lu(){for(;V!==null;)Bu(V)}function Ru(e,t){var n=Wl;Wl|=2;var r=Nu(),a=Pu();Gl!==e||H!==t?(uu=null,lu=A()+500,Au(e,t)):Yl=et(e,t);a:do try{if(Kl!==0&&V!==null){t=V;var o=ql;b:switch(Kl){case 1:Kl=0,ql=null,Hu(e,t,o,1);break;case 2:case 9:if(Oa(o)){Kl=0,ql=null,Vu(t);break}t=function(){Kl!==2&&Kl!==9||Gl!==e||(Kl=7),fd(e)},o.then(t,t);break a;case 3:Kl=7;break a;case 4:Kl=5;break a;case 7:Oa(o)?(Kl=0,ql=null,Vu(t)):(Kl=0,ql=null,Hu(e,t,o,7));break;case 5:var s=null;switch(V.tag){case 26:s=V.memoizedState;case 5:case 27:var c=V;if(s?$f(s):c.stateNode.complete){Kl=0,ql=null;var l=c.sibling;if(l!==null)V=l;else{var u=c.return;u===null?V=null:(V=u,Uu(u))}break b}}Kl=0,ql=null,Hu(e,t,o,5);break;case 6:Kl=0,ql=null,Hu(e,t,o,6);break;case 8:ku(),Ql=6;break a;default:throw Error(i(462))}}zu();break}catch(t){ju(e,t)}while(1);return Zi=Xi=null,D.H=r,D.A=a,Wl=n,V===null?(Gl=null,H=0,ii(),Ql):0}function zu(){for(;V!==null&&!Me();)Bu(V)}function Bu(e){var t=Ic(e.alternate,e,Zl);e.memoizedProps=e.pendingProps,t===null?Uu(e):V=t}function Vu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,H);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,H);break;case 5:Mo(t);default:Gc(n,t),t=V=hi(t,Zl),t=Ic(n,t,Zl)}e.memoizedProps=e.pendingProps,t===null?Uu(e):V=t}function Hu(e,t,n,r){Zi=Xi=null,Mo(t),Pa=null,Fa=0;var i=t.return;try{if(ac(e,i,t,n,H)){Ql=1,ec(e,Si(n,e.current)),V=null;return}}catch(t){if(i!==null)throw V=i,t;Ql=1,ec(e,Si(n,e.current)),V=null;return}t.flags&32768?(F||r===1?e=!0:Yl||H&536870912?e=!1:(Jl=e=!0,(r===2||r===9||r===3||r===6)&&(r=io.current,r!==null&&r.tag===13&&(r.flags|=16384))),Wu(t,e)):Uu(t)}function Uu(e){var t=e;do{if(t.flags&32768){Wu(t,Jl);return}e=t.return;var n=Uc(t.alternate,t,Zl);if(n!==null){V=n;return}if(t=t.sibling,t!==null){V=t;return}V=t=e}while(t!==null);Ql===0&&(Ql=5)}function Wu(e,t){do{var n=Wc(e.alternate,e);if(n!==null){n.flags&=32767,V=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){V=e;return}V=e=n}while(e!==null);Ql=6,V=null}function Gu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Xu();while(fu!==0);if(Wl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ri,at(e,n,o,s,c,l),e===Gl&&(V=Gl=null,H=0),mu=t,pu=e,hu=n,gu=o,_u=a,vu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ad(Le,function(){return Zu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=D.T,D.T=null,a=O.p,O.p=2,s=Wl,Wl|=4;try{ul(e,t,n)}finally{Wl=s,O.p=a,D.T=r}}fu=1,Ku(),qu(),Ju()}}function Ku(){if(fu===1){fu=0;var e=pu,t=mu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=Wl;Wl|=4;try{Sl(t,e);var a=Yd,o=jr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ar(s.ownerDocument.documentElement,s)){if(c!==null&&Mr(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 _=kr(s,h),v=kr(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}}gp=!!Jd,Yd=Jd=null}finally{Wl=i,O.p=r,D.T=n}}e.current=t,fu=2}}function qu(){if(fu===2){fu=0;var e=pu,t=mu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=Wl;Wl|=4;try{dl(e,t.alternate,t)}finally{Wl=i,O.p=r,D.T=n}}fu=3}}function Ju(){if(fu===4||fu===3){fu=0,Ne();var e=pu,t=mu,n=hu,r=vu;t.subtreeFlags&10256||t.flags&10256?fu=5:(fu=0,mu=pu=null,Yu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(du=null),ut(n),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=D.T,i=O.p,O.p=2,D.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{D.T=t,O.p=i}}hu&3&&Xu(),fd(e),i=e.pendingLanes,n&261930&&i&42?e===bu?yu++:(yu=0,bu=e):yu=0,pd(0,!1)}}function Yu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Xu(){return Ku(),qu(),Ju(),Zu()}function Zu(){if(fu!==5)return!1;var e=pu,t=gu;gu=0;var n=ut(hu),r=D.T,a=O.p;try{O.p=32>n?32:n,D.T=null,n=_u,_u=null;var o=pu,s=hu;if(fu=0,mu=pu=null,hu=0,Wl&6)throw Error(i(331));var c=Wl;if(Wl|=4,zl(o.current),jl(o,o.current,s,n),Wl=c,pd(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{O.p=a,D.T=r,Yu(e,t)}}function Qu(e,t,n){t=Si(n,t),t=nc(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(it(e,2),fd(e))}function $u(e,t,n){if(e.tag===3)Qu(e,e,n);else for(;t!==null;){if(t.tag===3){Qu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(du===null||!du.has(r))){e=Si(n,e),n=rc(2),r=Ka(t,n,2),r!==null&&(ic(n,r,t,e),it(r,2),fd(r));break}}t=t.return}}function ed(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ul;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Xl=!0,i.add(n),e=td.bind(null,e,t,n),t.then(e,e))}function td(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Gl===e&&(H&n)===n&&(Ql===4||Ql===3&&(H&62914560)===H&&300>A()-su?!(Wl&2)&&Au(e,0):tu|=n,ru===H&&(ru=0)),fd(e)}function nd(e,t){t===0&&(t=nt()),e=si(e,t),e!==null&&(it(e,t),fd(e))}function rd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nd(e,n)}function id(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),nd(e,n)}function ad(e,t){return Ae(e,t)}var od=null,sd=null,cd=!1,ld=!1,ud=!1,dd=0;function fd(e){e!==sd&&e.next===null&&(sd===null?od=sd=e:sd=sd.next=e),ld=!0,cd||(cd=!0,yd())}function pd(e,t){if(!ud&&ld){ud=!0;do for(var n=!1,r=od;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-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,vd(r,a))}else a=H,a=$e(r,r===Gl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,vd(r,a));r=r.next}while(n);ud=!1}}function md(){hd()}function hd(){ld=cd=!1;var e=0;dd!==0&&tf()&&(e=dd);for(var t=A(),n=null,r=od;r!==null;){var i=r.next,a=gd(r,t);a===0?(r.next=null,n===null?od=i:n.next=i,i===null&&(sd=n)):(n=r,(e!==0||a&3)&&(ld=!0)),r=i}fu!==0&&fu!==5||pd(e,!1),dd!==0&&(dd=0)}function gd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Gl,n=H,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&je(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&je(r),ut(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=_d.bind(null,e),n=Ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&je(r),e.callbackPriority=2,e.callbackNode=null,2}function _d(e,t){if(fu!==0&&fu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Xu()&&e.callbackNode!==n)return null;var r=H;return r=$e(e,e===Gl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wu(e,r,t),gd(e,A()),e.callbackNode!=null&&e.callbackNode===n?_d.bind(null,e):null)}function vd(e,t){if(Xu())return null;wu(e,t,!0)}function yd(){of(function(){Wl&6?Ae(Fe,md):hd()})}function bd(){if(dd===0){var e=ha;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),dd=e}return dd}function xd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:nn(``+e)}function Sd(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 Cd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=xd((i[j]||null).action),o=r.submitter;o&&(t=(t=o[j]||null)?xd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Tn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(dd!==0){var e=o?Sd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Sd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var wd=0;wd<Qr.length;wd++){var Td=Qr[wd];$r(Td.toLowerCase(),`on`+(Td[0].toUpperCase()+Td.slice(1)))}$r(Wr,`onAnimationEnd`),$r(Gr,`onAnimationIteration`),$r(Kr,`onAnimationStart`),$r(`dblclick`,`onDoubleClick`),$r(`focusin`,`onFocus`),$r(`focusout`,`onBlur`),$r(qr,`onTransitionRun`),$r(Jr,`onTransitionStart`),$r(Yr,`onTransitionCancel`),$r(Xr,`onTransitionEnd`),kt(`onMouseEnter`,[`mouseout`,`mouseover`]),kt(`onMouseLeave`,[`mouseout`,`mouseover`]),kt(`onPointerEnter`,[`pointerout`,`pointerover`]),kt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ot(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ot(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ot(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ot(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Ed=`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(` `),Dd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Ed));function Od(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){ei(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){ei(e)}i.currentTarget=null,a=c}}}}function U(e,t){var n=t[gt];n===void 0&&(n=t[gt]=new Set);var r=e+`__bubble`;n.has(r)||(Md(t,e,2,!1),n.add(r))}function kd(e,t,n){var r=0;t&&(r|=4),Md(n,e,r,t)}var Ad=`_reactListening`+Math.random().toString(36).slice(2);function jd(e){if(!e[Ad]){e[Ad]=!0,Et.forEach(function(t){t!==`selectionchange`&&(Dd.has(t)||kd(t,!1,e),kd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,kd(`selectionchange`,!1,t))}}function Md(e,t,n,r){switch(Cp(t)){case 2:var i=_p;break;case 8:i=vp;break;default:i=yp}n=i.bind(null,t,n,e),i=void 0,!mn||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 Nd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=xt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}dn(function(){var r=a,i=on(n),s=[];a:{var c=Zr.get(e);if(c!==void 0){var l=Tn,u=e;switch(e){case`keypress`:if(bn(n)===0)break a;case`keydown`:case`keyup`:l=Un;break;case`focusin`:u=`focus`,l=Pn;break;case`focusout`:u=`blur`,l=Pn;break;case`beforeblur`:case`afterblur`:l=Pn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Mn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Nn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Gn;break;case Wr:case Gr:case Kr:l=Fn;break;case Xr:l=Kn;break;case`scroll`:case`scrollend`:l=Dn;break;case`wheel`:l=qn;break;case`copy`:case`cut`:case`paste`:l=In;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Wn;break;case`toggle`:case`beforetoggle`:l=Jn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=fn(m,p),g!=null&&d.push(Pd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==an&&(u=n.relatedTarget||n.fromElement)&&(xt(u)||u[ht]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?xt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Mn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Wn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Ct(l),h=u==null?c:Ct(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,xt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Id,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ld(s,c,l,d,!1),u!==null&&f!==null&&Ld(s,f,u,d,!0)}}a:{if(c=r?Ct(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=mr;else if(cr(c))if(hr)v=wr;else{v=Sr;var y=xr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&$t(r.elementType)&&(v=mr):v=Cr;if(v&&=v(e,r)){lr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Gt(c,`number`,c.value)}switch(y=r?Ct(r):window,e){case`focusin`:(cr(y)||y.contentEditable===`true`)&&(Pr=y,Fr=r,Ir=null);break;case`focusout`:Ir=Fr=Pr=null;break;case`mousedown`:Lr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Lr=!1,Rr(s,n,i);break;case`selectionchange`:if(Nr)break;case`keydown`:case`keyup`:Rr(s,n,i)}var b;if(Xn)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 ir?nr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&($n&&n.locale!==`ko`&&(ir||x!==`onCompositionStart`?x===`onCompositionEnd`&&ir&&(b=yn()):(gn=i,_n=`value`in gn?gn.value:gn.textContent,ir=!0)),y=Fd(r,x),0<y.length&&(x=new Ln(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=rr(n),b!==null&&(x.data=b)))),(b=Qn?ar(e,n):or(e,n))&&(x=Fd(r,`onBeforeInput`),0<x.length&&(y=new Ln(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Cd(s,e,r,n,i)}Od(s,t)})}function Pd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fd(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=fn(e,n),i!=null&&r.unshift(Pd(e,i,a)),i=fn(e,t),i!=null&&r.push(Pd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Id(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(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=fn(n,a),l!=null&&o.unshift(Pd(n,l,c))):i||(l=fn(n,a),l!=null&&o.push(Pd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Rd=/\r\n?/g,zd=/\u0000|\uFFFD/g;function Bd(e){return(typeof e==`string`?e:``+e).replace(Rd,`
|
|
9
|
-
`).replace(zd,``)}function Vd(e,t){return t=Bd(t),Bd(e)===t}function Hd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Yt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Yt(e,``+r);break;case`className`:Pt(e,`class`,r);break;case`tabIndex`:Pt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Pt(e,n,r);break;case`style`:Qt(e,r,o);break;case`data`:if(t!==`object`){Pt(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=nn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Hd(e,t,`name`,a.name,a,null),Hd(e,t,`formEncType`,a.formEncType,a,null),Hd(e,t,`formMethod`,a.formMethod,a,null),Hd(e,t,`formTarget`,a.formTarget,a,null)):(Hd(e,t,`encType`,a.encType,a,null),Hd(e,t,`method`,a.method,a,null),Hd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=nn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=rn);break;case`onScroll`:r!=null&&U(`scroll`,e);break;case`onScrollEnd`:r!=null&&U(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=nn(``+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`:U(`beforetoggle`,e),U(`toggle`,e),Nt(e,`popover`,r);break;case`xlinkActuate`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Nt(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=en.get(n)||n,Nt(e,n,r))}}function Ud(e,t,n,r,a,o){switch(n){case`style`:Qt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Yt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Yt(e,``+r);break;case`onScroll`:r!=null&&U(`scroll`,e);break;case`onScrollEnd`:r!=null&&U(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=rn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Dt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[j]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Nt(e,n,r)}}}function Wd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:U(`error`,e),U(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,o,s,n,null)}}a&&Hd(e,t,`srcSet`,n.srcSet,n,null),r&&Hd(e,t,`src`,n.src,n,null);return;case`input`:U(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Hd(e,t,r,d,n,null)}}Wt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in U(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Hd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Kt(e,!!r,n,!0):Kt(e,!!r,t,!1);return;case`textarea`:for(s in U(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Hd(e,t,s,c,n,null)}Jt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Hd(e,t,l,r,n,null)}return;case`dialog`:U(`beforetoggle`,e),U(`toggle`,e),U(`cancel`,e),U(`close`,e);break;case`iframe`:case`object`:U(`load`,e);break;case`video`:case`audio`:for(r=0;r<Ed.length;r++)U(Ed[r],e);break;case`image`:U(`error`,e),U(`load`,e);break;case`details`:U(`toggle`,e);break;case`embed`:case`source`:case`link`:U(`error`,e),U(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,u,r,n,null)}return;default:if($t(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ud(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Hd(e,t,c,r,n,null))}function Gd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Hd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Hd(e,t,p,m,r,f)}}Ut(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Hd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Hd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Kt(e,!!n,n?[]:``,!1):Kt(e,!!n,t,!0)):Kt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Hd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Hd(e,t,s,a,r,o)}qt(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:Hd(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:Hd(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)&&Hd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Hd(e,t,u,p,r,m)}return;default:if($t(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ud(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||Ud(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Hd(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||Hd(e,t,f,p,r,m)}function Kd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function qd(){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&&Kd(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&&Kd(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 Jd=null,Yd=null;function Xd(e){return e.nodeType===9?e:e.ownerDocument}function Zd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function $d(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 ef=null;function tf(){var e=window.event;return e&&e.type===`popstate`?e===ef?!1:(ef=e,!0):(ef=null,!1)}var nf=typeof setTimeout==`function`?setTimeout:void 0,rf=typeof clearTimeout==`function`?clearTimeout:void 0,af=typeof Promise==`function`?Promise:void 0,of=typeof queueMicrotask==`function`?queueMicrotask:af===void 0?nf:function(e){return af.resolve(null).then(e).catch(sf)};function sf(e){setTimeout(function(){throw e})}function cf(e){return e===`head`}function lf(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),Vp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Cf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Cf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[yt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Cf(e.ownerDocument.body);n=i}while(n);Vp(t)}function uf(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 df(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`:df(n),bt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function ff(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[yt])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=vf(e.nextSibling),e===null)break}return null}function pf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=vf(e.nextSibling),e===null))return null;return e}function mf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=vf(e.nextSibling),e===null))return null;return e}function hf(e){return e.data===`$?`||e.data===`$~`}function gf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function _f(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 vf(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 yf=null;function bf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return vf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function xf(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 Sf(e,t,n){switch(t=Xd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Cf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var wf=new Map,Tf=new Set;function Ef(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Df=O.d;O.d={f:Of,r:kf,D:Mf,C:Nf,L:Pf,m:Ff,X:Lf,S:If,M:Rf};function Of(){var e=Df.f(),t=Ou();return e||t}function kf(e){var t=St(e);t!==null&&t.tag===5&&t.type===`form`?As(t):Df.r(e)}var Af=typeof document>`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=wt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);Tt(c),Wd(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,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=p({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=ge.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=wt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=wt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.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},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=wt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ht(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(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}),Wd(t,`link`,n),Tt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ht(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),Wd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,Tt(a),a):(r=n,(a=wf.get(o))&&(r=p({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Tt(a),Wd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(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 Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Xf=null;function Zf(e,t,n){if(Xf===null){var r=new Map,i=Xf=new Map;i.set(n,r)}else i=Xf,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[yt]||a[mt]||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 Qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function W(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 $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(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=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(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=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&tp===0&&(tp=62500*qd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.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=rp.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 sp={$$typeof:C,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function cp(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=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(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 lp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new cp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=fi(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function up(e){return e?(e=ui,e):ui}function dp(e,t,n,r,i,a){i=up(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(Cu(n,e,t),R(n,e,t))}function fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pp(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=si(e,67108864);t!==null&&Cu(t,e,67108864),pp(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=xu();t=lt(t);var n=si(e,t);n!==null&&Cu(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=2,yp(e,t,n,r)}finally{O.p=a,D.T=i}}function vp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=8,yp(e,t,n,r)}finally{O.p=a,D.T=i}}function yp(e,t,n,r){if(gp){var i=bp(r);if(i===null)Nd(e,t,r,xp,n),jp(e,r);else if(Np(i,e,t,n,r))r.stopPropagation();else if(jp(e,r),t&4&&-1<Ap.indexOf(e)){for(;i!==null;){var a=St(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}fd(a),!(Wl&6)&&(lu=A()+500,pd(0,!1))}}break;case 31:case 13:s=si(a,2),s!==null&&Cu(s,a,2),Ou(),pp(a,2)}if(a=bp(r),a===null&&Nd(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}function bp(e){return e=on(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=xt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xp=e,null}function Cp(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(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var wp=!1,G=null,Tp=null,Ep=null,Dp=new Map,Op=new Map,kp=[],Ap=`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 jp(e,t){switch(e){case`focusin`:case`focusout`:G=null;break;case`dragenter`:case`dragleave`:Tp=null;break;case`mouseover`:case`mouseout`:Ep=null;break;case`pointerover`:case`pointerout`:Dp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Op.delete(t.pointerId)}}function Mp(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=St(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Np(e,t,n,r,i){switch(t){case`focusin`:return G=Mp(G,e,t,n,r,i),!0;case`dragenter`:return Tp=Mp(Tp,e,t,n,r,i),!0;case`mouseover`:return Ep=Mp(Ep,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Dp.set(a,Mp(Dp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Op.set(a,Mp(Op.get(a)||null,e,t,n,r,i)),!0}return!1}function Pp(e){var t=xt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ft(e.priority,function(){hp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){hp(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 Fp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);an=r,n.target.dispatchEvent(r),an=null}else return t=St(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ip(e,t,n){Fp(e)&&n.delete(t)}function Lp(){wp=!1,G!==null&&Fp(G)&&(G=null),Tp!==null&&Fp(Tp)&&(Tp=null),Ep!==null&&Fp(Ep)&&(Ep=null),Dp.forEach(Ip),Op.forEach(Ip)}function Rp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Lp)))}var zp=null;function Bp(e){zp!==e&&(zp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){zp===e&&(zp=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(Sp(r||n)===null)continue;break}var a=St(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Vp(e){function t(t){return Rp(t,e)}G!==null&&Rp(G,e),Tp!==null&&Rp(Tp,e),Ep!==null&&Rp(Ep,e),Dp.forEach(t),Op.forEach(t);for(var n=0;n<kp.length;n++){var r=kp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<kp.length&&(n=kp[0],n.blockedOn===null);)Pp(n),n.blockedOn===null&&kp.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[j]||null;if(typeof a==`function`)o||Bp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[j]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Bp(n)}}}function Hp(){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 Up(e){this._internalRoot=e}Wp.prototype.render=Up.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dp(n,xu(),e,t,null,null)},Wp.prototype.unmount=Up.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),Ou(),t[ht]=null}};function Wp(e){this._internalRoot=e}Wp.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<kp.length&&t!==0&&t<kp[n].priority;n++);kp.splice(n,0,e),n===0&&Pp(e)}};var Gp=n.version;if(Gp!==`19.2.8`)throw Error(i(527,Gp,`19.2.8`));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Kp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:D,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qp.isDisabled&&qp.supportsFiber)try{He=qp.inject(Kp),Ue=qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lp(e,1,!1,null,null,n,r,null,o,s,c,Hp),e[ht]=t.current,jd(e),new Up(t)}})),v=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=u(),b=c(f(),1),x=v(),S=e=>Symbol.iterator in e,C=e=>`entries`in e,w=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},T=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function ee(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:S(e)&&S(t)?C(e)&&C(t)?w(e,t):T(e,t):w({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function E(e){let t=b.useRef(void 0);return n=>{let r=e(n);return ee(t.current,r)?t.current:t.current=r}}var te=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},ne=(e=>e?te(e):te),re=e=>e;function ie(e,t=re){let n=b.useSyncExternalStore(e.subscribe,b.useCallback(()=>t(e.getState()),[e,t]),b.useCallback(()=>t(e.getInitialState()),[e,t]));return b.useDebugValue(n),n}var ae=e=>{let t=ne(e),n=e=>ie(t,e);return Object.assign(n,t),n},oe=(e=>e?ae(e):ae);function se(e){return e[0]??{}}function ce(e){return Array.isArray(e)?e:e==null?[]:[e]}function D(e){return typeof e.bytes==`function`?e.bytes():e.arrayBuffer()}var O=`orpc`,le=`@orpc/shared`,ue=`1.14.13`,de=class extends Error{constructor(...e){super(...e),this.name=`AbortError`}};function fe(e){let t=Promise.resolve();return(...n)=>t=t.catch(()=>{}).then(()=>e(...n))}var pe=2,k=`__${le}@${ue}/otel/config__`;function me(){return globalThis[k]}function he(e,t={},n){return(me()?.tracer)?.startSpan(e,t,n)}function ge(e,t,n={}){if(!e)return;let r=_e(t);e.recordException(r),(!n.signal?.aborted||n.signal.reason!==t)&&e.setStatus({code:pe,message:r.message})}function _e(e){if(e instanceof Error){let t={message:e.message,name:e.name,stack:e.stack};return`code`in e&&(typeof e.code==`string`||typeof e.code==`number`)&&(t.code=e.code),t}return{message:String(e)}}async function ve({name:e,context:t,...n},r){let i=me()?.tracer;if(!i)return r();let a=async e=>{try{return await r(e)}catch(t){throw ge(e,t,n),t}finally{e.end()}};return t?i.startActiveSpan(e,n,t,a):i.startActiveSpan(e,n,a)}async function ye(e,t){let n=me();if(!e||!n)return t();let r=n.trace.setSpan(n.context.active(),e);return n.context.with(r,t)}var be=class{openIds=new Set;queues=new Map;waiters=new Map;get length(){return this.openIds.size}get waiterIds(){return Array.from(this.waiters.keys())}hasBufferedItems(e){return!!this.queues.get(e)?.length}open(e){this.openIds.add(e)}isOpen(e){return this.openIds.has(e)}push(e,t){this.assertOpen(e);let n=this.waiters.get(e);if(n?.length)n.shift()[0](t),n.length===0&&this.waiters.delete(e);else{let n=this.queues.get(e);n?n.push(t):this.queues.set(e,[t])}}async pull(e){this.assertOpen(e);let t=this.queues.get(e);if(t?.length){let n=t.shift();return t.length===0&&this.queues.delete(e),n}return new Promise((t,n)=>{let r=this.waiters.get(e),i=[t,n];r?r.push(i):this.waiters.set(e,[i])})}close({id:e,reason:t}={}){if(e===void 0){this.waiters.forEach((e,n)=>{let r=t??new de(`[AsyncIdQueue] Queue[${n}] was closed or aborted while waiting for pulling.`);e.forEach(([,e])=>e(r))}),this.waiters.clear(),this.openIds.clear(),this.queues.clear();return}let n=t??new de(`[AsyncIdQueue] Queue[${e}] was closed or aborted while waiting for pulling.`);this.waiters.get(e)?.forEach(([,e])=>e(n)),this.waiters.delete(e),this.openIds.delete(e),this.queues.delete(e)}assertOpen(e){if(!this.isOpen(e))throw Error(`[AsyncIdQueue] Cannot access queue[${e}] because it is not open or aborted.`)}};function xe(e){return!e||typeof e!=`object`?!1:`next`in e&&typeof e.next==`function`&&Symbol.asyncIterator in e&&typeof e[Symbol.asyncIterator]==`function`}var Se=Symbol.asyncDispose??Symbol.for(`asyncDispose`),Ce=class{#e=!1;#t=!1;#n;#r;constructor(e,t){this.#n=t,this.#r=fe(async()=>{if(this.#e)return{done:!0,value:void 0};try{let t=await e();return t.done&&(this.#e=!0),t}catch(e){throw this.#e=!0,e}finally{this.#e&&!this.#t&&(this.#t=!0,await this.#n(`next`))}})}next(){return this.#r()}async return(e){return this.#e=!0,this.#t||(this.#t=!0,await this.#n(`return`)),{done:!0,value:e}}async throw(e){throw this.#e=!0,this.#t||(this.#t=!0,await this.#n(`throw`)),e}async[Se](){this.#e=!0,this.#t||(this.#t=!0,await this.#n(`dispose`))}[Symbol.asyncIterator](){return this}};function we({name:e,...t},n){let r;return new Ce(async()=>{r??=he(e);try{let e=await ye(r,()=>n.next());return r?.addEvent(e.done?`completed`:`yielded`),e}catch(e){throw ge(r,e,t),e}},async e=>{try{e!==`next`&&await ye(r,()=>n.return?.())}catch(e){throw ge(r,e,t),e}finally{r?.end()}})}var Te=class{index=BigInt(1);generate(){let e=this.index.toString(36);return this.index++,e}};function Ee(e,t,n){let r=(t,i)=>{let a=e[i];return a?a({...t,next:(e=t)=>r(e,i+1)}):n(t)};return r(t,0)}function De(e){return JSON.stringify(e)}function Oe(e){return Ae(e)?Object.getPrototypeOf(e)?.constructor:null}function ke(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||!t||!t.constructor}function Ae(e){return!!e&&(typeof e==`object`||typeof e==`function`)}function je(e){if(Array.isArray(e))return e.map(je);if(ke(e)){let t={};for(let n in e)t[n]=je(e[n]);for(let n of Object.getOwnPropertySymbols(e))t[n]=je(e[n]);return t}return e}function Me(e,...t){return typeof e==`function`?e(...t):e}function Ne(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return t!==`then`||typeof r!=`function`?r:new Proxy(r,{apply(t,n,r){if(r.length!==2||r.some(e=>!Pe(e)))return Reflect.apply(t,n,r);let i=!0;r[0].call(n,Ne(new Proxy(e,{get:(e,t,n)=>{if(i&&t===`then`){i=!1;return}return Reflect.get(e,t,n)}})))}})}})}var A=/^\s*function\s*\(\)\s*\{\s*\[native code\]\s*\}\s*$/;function Pe(e){return typeof e==`function`&&A.test(e.toString())}function Fe(e){try{return decodeURIComponent(e)}catch{return e}}var Ie=`@orpc/client`,Le=`1.14.13`,Re={BAD_REQUEST:{status:400,message:`Bad Request`},UNAUTHORIZED:{status:401,message:`Unauthorized`},FORBIDDEN:{status:403,message:`Forbidden`},NOT_FOUND:{status:404,message:`Not Found`},METHOD_NOT_SUPPORTED:{status:405,message:`Method Not Supported`},NOT_ACCEPTABLE:{status:406,message:`Not Acceptable`},TIMEOUT:{status:408,message:`Request Timeout`},CONFLICT:{status:409,message:`Conflict`},PRECONDITION_FAILED:{status:412,message:`Precondition Failed`},PAYLOAD_TOO_LARGE:{status:413,message:`Payload Too Large`},UNSUPPORTED_MEDIA_TYPE:{status:415,message:`Unsupported Media Type`},UNPROCESSABLE_CONTENT:{status:422,message:`Unprocessable Content`},TOO_MANY_REQUESTS:{status:429,message:`Too Many Requests`},CLIENT_CLOSED_REQUEST:{status:499,message:`Client Closed Request`},INTERNAL_SERVER_ERROR:{status:500,message:`Internal Server Error`},NOT_IMPLEMENTED:{status:501,message:`Not Implemented`},BAD_GATEWAY:{status:502,message:`Bad Gateway`},SERVICE_UNAVAILABLE:{status:503,message:`Service Unavailable`},GATEWAY_TIMEOUT:{status:504,message:`Gateway Timeout`}};function ze(e,t){return t??Re[e]?.status??500}function Be(e,t){return t||Re[e]?.message||e}var Ve,He=class e extends Error{defined;code;status;data;static{let t=Symbol.for(`__${Ie}@${Le}/error/ORPC_ERROR_CONSTRUCTORS__`);globalThis[t]??=new WeakSet,Ve=globalThis[t],Ve.add(e)}constructor(e,...t){let n=se(t);if(n.status!==void 0&&!We(n.status))throw Error(`[ORPCError] Invalid error status code.`);let r=Be(e,n.message);super(r,n),this.code=e,this.status=ze(e,n.status),this.defined=n.defined??!1,this.data=n.data}toJSON(){return{defined:this.defined,code:this.code,status:this.status,message:this.message,data:this.data}}static[Symbol.hasInstance](e){if(Ve.has(this)){let t=Oe(e);if(t&&Ve.has(t))return!0}return super[Symbol.hasInstance](e)}};function Ue(e){return e instanceof He?e:new He(`INTERNAL_SERVER_ERROR`,{message:`Internal server error`,cause:e})}function We(e){return e<200||e>=400}function Ge(e){if(!ke(e))return!1;let t=[`defined`,`code`,`status`,`message`,`data`];return!Object.keys(e).some(e=>!t.includes(e))&&`defined`in e&&typeof e.defined==`boolean`&&`code`in e&&typeof e.code==`string`&&`status`in e&&typeof e.status==`number`&&We(e.status)&&`message`in e&&typeof e.message==`string`}function Ke(e,t={}){return new He(e.code,{...t,...e})}var qe=class extends TypeError{},Je=class extends Error{data;constructor(e){super(e?.message??`An error event was received`,e),this.data=e?.data}};TransformStream;var Ye=/\r\n|[\n\r]/;function Xe(e){return Ye.test(e)}function Ze(e){if(Xe(e))throw new qe(`Event's id must not contain a carriage return or newline character`)}function Qe(e){if(!Number.isInteger(e)||e<0)throw new qe(`Event's retry must be a integer and >= 0`)}function $e(e){if(Xe(e))throw new qe(`Event's comment must not contain a carriage return or newline character`)}var et=Symbol(`ORPC_EVENT_SOURCE_META`);function tt(e,t){if(t.id===void 0&&t.retry===void 0&&!t.comments?.length)return e;if(t.id!==void 0&&Ze(t.id),t.retry!==void 0&&Qe(t.retry),t.comments!==void 0)for(let e of t.comments)$e(e);return new Proxy(e,{get(e,n,r){return n===et?t:Reflect.get(e,n,r)}})}function nt(e){return Ae(e)?Reflect.get(e,et):void 0}function rt(e,t=`inline`){return`${t}; filename="${e.replace(/[^\x20-\x7E]/g,`_`).replace(/"/g,`\\"`)}"; filename*=utf-8''${encodeURIComponent(e).replace(/['()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`).replace(/%(7C|60|5E)/g,(e,t)=>String.fromCharCode(Number.parseInt(t,16)))}`}function it(e){let t=e.match(/filename\*=(UTF-8'')?([^;]*)/i);if(t&&typeof t[2]==`string`)return Fe(t[2]);let n=e.match(/filename="((?:\\"|[^"])*)"/i);if(n&&typeof n[1]==`string`)return n[1].replace(/\\"/g,`"`)}function at(e,t){let n={...e};for(let e in t)Array.isArray(t[e])?n[e]=[...ce(n[e]),...t[e]]:t[e]!==void 0&&(Array.isArray(n[e])?n[e]=[...n[e],t[e]]:n[e]===void 0?n[e]=t[e]:n[e]=[n[e],t[e]]);return n}function ot(e){if(typeof e==`string`||e===void 0)return e;if(e.length!==0)return e.join(`, `)}function st(e){return!!(ot(e[`content-type`])?.startsWith(`text/event-stream`)&&ot(e[`content-disposition`])===void 0)}function ct(e,t){let n=async e=>{let n=await t.error(e);if(n!==e){let t=nt(e);t&&Ae(n)&&(n=tt(n,t))}return n};return new Ce(async()=>{let{done:r,value:i}=await(async()=>{try{return await e.next()}catch(e){throw await n(e)}})(),a=await t.value(i,r);if(a!==i){let e=nt(i);e&&Ae(a)&&(a=tt(a,e))}return{done:r,value:a}},async()=>{try{await e.return?.()}catch(e){throw await n(e)}})}function lt(e){return{...e,context:e.context??{}}}function ut(e,t={}){let n=t.path??[];return Ne(new Proxy(async(...[t,r={}])=>await e.call(n,t,lt(r)),{get(r,i){return typeof i==`string`?ut(e,{...t,path:[...n,i]}):Reflect.get(r,i)}}))}var dt=/^http:\/\/orpc\//,ft=(e=>(e[e.REQUEST=1]=`REQUEST`,e[e.RESPONSE=2]=`RESPONSE`,e[e.EVENT_ITERATOR=3]=`EVENT_ITERATOR`,e[e.ABORT_SIGNAL=4]=`ABORT_SIGNAL`,e))(ft||{});function pt(e,t,n){if(t===3){let r=n;return{i:e,t,p:{e:r.event,d:r.data,m:r.meta}}}if(t===4)return{i:e,t,p:n};let r=n;return{i:e,p:{u:r.url.toString().replace(dt,`/`),b:r.body,h:Object.keys(r.headers).length>0?r.headers:void 0,m:r.method===`POST`?void 0:r.method}}}function mt(e){let t=e.i,n=e.t;if(n===3){let r=e.p;return[t,n,{event:r.e,data:r.d,meta:r.m}]}if(n===4)return[t,n,e.p];let r=e.p;return[t,2,{status:r.s??200,headers:r.h??{},body:r.b}]}async function j(e,t,n){if(t===3||t===4)return vt(pt(e,t,n));let r=n,{body:i,headers:a}=await gt(r.body,r.headers),o=pt(e,1,{...r,body:i instanceof Blob?void 0:i,headers:a});return i instanceof Blob?vt(o,i):vt(o)}async function ht(e){let{json:t,buffer:n}=await yt(e),[r,i,a]=mt(t);if(i===3||i===4)return[r,i,a];let o=a,s=await M(o.headers,o.body,n);return[r,i,{...o,body:s}]}async function gt(e,t){let n={...t},r=n[`content-disposition`];if(delete n[`content-type`],delete n[`content-disposition`],e instanceof Blob)return n[`content-type`]=e.type,n[`content-disposition`]=r??rt(e instanceof File?e.name:`blob`),{body:e,headers:n};if(e instanceof FormData){let t=new Response(e);return n[`content-type`]=t.headers.get(`content-type`),{body:await t.blob(),headers:n}}return e instanceof URLSearchParams?(n[`content-type`]=`application/x-www-form-urlencoded`,{body:e.toString(),headers:n}):xe(e)?(n[`content-type`]=`text/event-stream`,{body:void 0,headers:n}):{body:e,headers:n}}async function M(e,t,n){let r=ot(e[`content-type`]),i=ot(e[`content-disposition`]);if(typeof i==`string`){let e=it(i)??`blob`;return new File(n===void 0?[]:[n],e,{type:r})}return r?.startsWith(`multipart/form-data`)?new Response(n,{headers:{"content-type":r}}).formData():r?.startsWith(`application/x-www-form-urlencoded`)&&typeof t==`string`?new URLSearchParams(t):t}var _t=255;async function vt(e,t){let n=De(e);return t===void 0||t.size===0?n:D(new Blob([new TextEncoder().encode(n),new Uint8Array([_t]),t]))}async function yt(e){if(typeof e==`string`)return{json:JSON.parse(e)};let t=e instanceof Uint8Array?e:new Uint8Array(e),n=t.indexOf(_t);if(n===-1){let e=new TextDecoder().decode(t);return{json:JSON.parse(e)}}let r=new TextDecoder().decode(t.subarray(0,n)),i=t.subarray(n+1);return{json:JSON.parse(r),buffer:i}}function bt(e,t,n,r={}){let i;return new Ce(async()=>{i??=he(`consume_event_iterator_stream`);try{let n=await ye(i,()=>e.pull(t));switch(n.event){case`message`:{let e=n.data;return n.meta&&Ae(e)&&(e=tt(e,n.meta)),i?.addEvent(`message`),{value:e,done:!1}}case`error`:{let e=new Je({data:n.data});throw n.meta&&(e=tt(e,n.meta)),i?.addEvent(`error`),e}case`done`:{let e=n.data;return n.meta&&Ae(e)&&(e=tt(e,n.meta)),i?.addEvent(`done`),{value:e,done:!0}}}}catch(e){throw e instanceof Je||ge(i,e,r),e}},async e=>{try{e!==`next`&&i?.addEvent(`cancelled`),await ye(i,()=>n(e))}catch(e){throw ge(i,e,r),e}finally{i?.end()}})}function xt(e,t){return ve({name:`stream_event_iterator`},async n=>{for(;;){let r=await(async()=>{try{let{value:t,done:r}=await e.next();return r?(n?.addEvent(`done`),{event:`done`,data:t,meta:nt(t)}):(n?.addEvent(`message`),{event:`message`,data:t,meta:nt(t)})}catch(e){if(e instanceof Je)return n?.addEvent(`error`),{event:`error`,data:e.data,meta:nt(e)};try{await t({event:`error`,data:void 0})}catch(t){throw ge(n,e),t}throw e}})(),i=!1;try{let n=await t(r);if(r.event===`done`||r.event===`error`)return;if(n===`abort`){i=!0,await e.return?.();return}}catch(t){if(!i)try{await e.return?.()}catch(e){throw ge(n,t),e}throw t}}})}var St=class{peer;constructor(e){this.peer=new Ct(async([t,n,r])=>{await e(await j(t,n,r))})}get length(){return this.peer.length}open(e){return this.peer.open(e)}async request(e){return this.peer.request(e)}async message(e){return this.peer.message(await ht(e))}close(e={}){return this.peer.close(e)}},Ct=class{idGenerator=new Te;responseQueue=new be;serverEventIteratorQueue=new be;serverControllers=new Map;cleanupFns=new Map;send;constructor(e){this.send=async t=>{let n=t[0];this.serverControllers.has(n)&&await e(t)}}get length(){return(+this.responseQueue.length+this.serverEventIteratorQueue.length+this.serverControllers.size+this.cleanupFns.size)/4}open(e){this.serverEventIteratorQueue.open(e),this.responseQueue.open(e);let t=new AbortController;return this.serverControllers.set(e,t),this.cleanupFns.set(e,[]),t}async request(e){let t=e.signal;return ve({name:`send_peer_request`,signal:t},async()=>{if(t?.aborted)throw t.reason;let n=this.idGenerator.generate(),r=this.open(n);try{let i=me();if(i){let t=je(e.headers);i.propagation.inject(i.context.active(),t),e={...e,headers:t}}if(await this.send([n,ft.REQUEST,e]),t?.aborted)throw await this.send([n,ft.ABORT_SIGNAL,void 0]),t.reason;let a;if(t?.addEventListener(`abort`,a=async()=>{await this.send([n,ft.ABORT_SIGNAL,void 0]),this.close({id:n,reason:t.reason})},{once:!0}),this.cleanupFns.get(n)?.push(()=>{t?.removeEventListener(`abort`,a)}),xe(e.body)){let t=e.body;xt(t,async e=>r.signal.aborted?`abort`:(await this.send([n,ft.EVENT_ITERATOR,e]),`next`))}let o=await this.responseQueue.pull(n);if(st(o.headers)){let e=bt(this.serverEventIteratorQueue,n,async e=>{try{e!==`next`&&await this.send([n,ft.ABORT_SIGNAL,void 0])}finally{this.close({id:n})}},{signal:t});return{...o,body:e}}return this.close({id:n}),o}catch(e){throw this.close({id:n,reason:e}),e}})}async message([e,t,n]){if(t===ft.ABORT_SIGNAL){this.serverControllers.get(e)?.abort();return}if(t===ft.EVENT_ITERATOR){this.serverEventIteratorQueue.isOpen(e)&&this.serverEventIteratorQueue.push(e,n);return}this.responseQueue.isOpen(e)&&this.responseQueue.push(e,n)}close(e={}){e.id===void 0?(this.serverControllers.forEach(t=>t.abort(e.reason)),this.serverControllers.clear(),this.cleanupFns.forEach(e=>e.forEach(e=>e())),this.cleanupFns.clear()):(this.serverControllers.get(e.id)?.abort(e.reason),this.serverControllers.delete(e.id),this.cleanupFns.get(e.id)?.forEach(e=>e()),this.cleanupFns.delete(e.id)),this.responseQueue.close(e),this.serverEventIteratorQueue.close(e)}};function wt(e,t={}){return e.forEach((e,n)=>{Array.isArray(t[n])?t[n].push(e):t[n]===void 0?t[n]=e:t[n]=[t[n],e]}),t}var Tt=class{plugins;constructor(e=[]){this.plugins=[...e].sort((e,t)=>(e.order??0)-(t.order??0))}init(e){for(let t of this.plugins)t.init?.(e)}},Et=class{constructor(e,t,n={}){this.codec=e,this.sender=t,new Tt(n.plugins).init(n),this.interceptors=ce(n.interceptors),this.clientInterceptors=ce(n.clientInterceptors)}interceptors;clientInterceptors;call(e,t,n){return ve({name:`${O}.${e.join(`/`)}`,signal:n.signal},r=>(r?.setAttribute(`rpc.system`,O),r?.setAttribute(`rpc.method`,e.join(`.`)),xe(t)&&(t=we({name:`consume_event_iterator_input`,signal:n.signal},t)),Ee(this.interceptors,{...n,path:e,input:t},async({path:e,input:t,...n})=>{let i=me(),a,o=i?.trace.getActiveSpan()??r;o&&i&&(a=i?.trace.setSpan(i.context.active(),o));let s=await ve({name:`encode_request`,context:a},()=>this.codec.encode(e,t,n)),c=await Ee(this.clientInterceptors,{...n,input:t,path:e,request:s},({input:e,path:t,request:n,...r})=>ve({name:`send_request`,signal:r.signal,context:a},()=>this.sender.call(n,r,t,e))),l=await ve({name:`decode_response`,context:a},()=>this.codec.decode(c,n,e,t));return xe(l)?we({name:`consume_event_iterator_output`,signal:n.signal},l):l})))}},Dt={BIGINT:0,DATE:1,NAN:2,UNDEFINED:3,URL:4,REGEXP:5,SET:6,MAP:7},Ot=class{customSerializers;constructor(e={}){if(this.customSerializers=e.customJsonSerializers??[],this.customSerializers.length!==new Set(this.customSerializers.map(e=>e.type)).size)throw Error(`Custom serializer type must be unique.`)}serialize(e,t=[],n=[],r=[],i=[]){for(let a of this.customSerializers)if(a.condition(e)){let o=this.serialize(a.serialize(e),t,n,r,i);return n.push([a.type,...t]),o}if(e instanceof Blob)return r.push(t),i.push(e),[e,n,r,i];if(typeof e==`bigint`)return n.push([Dt.BIGINT,...t]),[e.toString(),n,r,i];if(e instanceof Date)return n.push([Dt.DATE,...t]),Number.isNaN(e.getTime())?[null,n,r,i]:[e.toISOString(),n,r,i];if(Number.isNaN(e))return n.push([Dt.NAN,...t]),[null,n,r,i];if(e instanceof URL)return n.push([Dt.URL,...t]),[e.toString(),n,r,i];if(e instanceof RegExp)return n.push([Dt.REGEXP,...t]),[e.toString(),n,r,i];if(e instanceof Set){let a=this.serialize(Array.from(e),t,n,r,i);return n.push([Dt.SET,...t]),a}if(e instanceof Map){let a=this.serialize(Array.from(e.entries()),t,n,r,i);return n.push([Dt.MAP,...t]),a}if(Array.isArray(e))return[e.map((e,a)=>e===void 0?(n.push([Dt.UNDEFINED,...t,a]),null):this.serialize(e,[...t,a],n,r,i)[0]),n,r,i];if(ke(e)){let a={};for(let o in e)o===`toJSON`&&typeof e[o]==`function`||(a[o]=this.serialize(e[o],[...t,o],n,r,i)[0]);return[a,n,r,i]}return[e,n,r,i]}deserialize(e,t,n,r){let i={data:e};n&&r&&n.forEach((e,t)=>{let n=i,a=`data`;e.forEach(e=>{if(n=n[a],a=e,!Object.hasOwn(n,a))throw Error(`Security error: accessing non-existent path during deserialization. Path segment: ${a}`)}),n[a]=r(t)});for(let e of t){let t=e[0],n=i,r=`data`;for(let t=1;t<e.length;t++)if(n=n[r],r=e[t],!Object.hasOwn(n,r))throw Error(`Security error: accessing non-existent path during deserialization. Path segment: ${r}`);for(let e of this.customSerializers)if(e.type===t){n[r]=e.deserialize(n[r]);break}switch(t){case Dt.BIGINT:n[r]=BigInt(n[r]);break;case Dt.DATE:n[r]=new Date(n[r]??`Invalid Date`);break;case Dt.NAN:n[r]=NaN;break;case Dt.UNDEFINED:n[r]=void 0;break;case Dt.URL:n[r]=new URL(n[r]);break;case Dt.REGEXP:{let[,e,t]=n[r].match(/^\/(.*)\/([a-z]*)$/);n[r]=new RegExp(e,t);break}case Dt.SET:n[r]=new Set(n[r]);break;case Dt.MAP:n[r]=new Map(n[r]);break}}return i.data}};function kt(e){return`/${e.map(encodeURIComponent).join(`/`)}`}function At(e){return typeof e.forEach==`function`?wt(e):e}function N(e){return Object.entries(Re).find(([,t])=>t.status===e)?.[0]??`MALFORMED_ORPC_ERROR_RESPONSE`}var jt=class{constructor(e,t){this.serializer=e,this.baseUrl=t.url,this.maxUrlLength=t.maxUrlLength??2083,this.fallbackMethod=t.fallbackMethod??`POST`,this.expectedMethod=t.method??this.fallbackMethod,this.headers=t.headers??{}}baseUrl;maxUrlLength;fallbackMethod;expectedMethod;headers;async encode(e,t,n){let r=At(await Me(this.headers,n,e,t));n.lastEventId!==void 0&&(r=at(r,{"last-event-id":n.lastEventId}));let i=await Me(this.expectedMethod,n,e,t),a=await Me(this.baseUrl,n,e,t),o=new URL(a);o.pathname=`${o.pathname.replace(/\/$/,``)}${kt(e)}`;let s=this.serializer.serialize(t);if(i===`GET`&&!(s instanceof FormData)&&!xe(s)){let a=await Me(this.maxUrlLength,n,e,t),c=new URL(o);if(c.searchParams.append(`data`,De(s)),c.toString().length<=a)return{body:void 0,method:i,headers:r,url:c,signal:n.signal}}return{url:o,method:i===`GET`?this.fallbackMethod:i,headers:r,body:s,signal:n.signal}}async decode(e){let t=!We(e.status),n=await(async()=>{let t=!1;try{let n=await e.body();return t=!0,this.serializer.deserialize(n)}catch(e){throw Error(t?`Invalid RPC response format.`:`Cannot parse response body, please check the response body and content-type.`,{cause:e})}})();if(!t)throw Ge(n)?Ke(n):new He(N(e.status),{status:e.status,data:{...e,body:n}});return n}},Mt=class{constructor(e){this.jsonSerializer=e}serialize(e){return xe(e)?ct(e,{value:async e=>this.#e(e,!1),error:async e=>new Je({data:this.#e(Ue(e).toJSON(),!1),cause:e})}):this.#e(e,!0)}#e(e,t){let[n,r,i,a]=this.jsonSerializer.serialize(e),o=r.length===0?void 0:r;if(!t||a.length===0)return{json:n,meta:o};let s=new FormData;return s.set(`data`,De({json:n,meta:o,maps:i})),a.forEach((e,t)=>{s.set(t.toString(),e)}),s}deserialize(e){return xe(e)?ct(e,{value:async e=>this.#t(e),error:async e=>{if(!(e instanceof Je))return e;let t=this.#t(e.data);return Ge(t)?Ke(t,{cause:e}):new Je({data:t,cause:e})}}):this.#t(e)}#t(e){if(e===void 0)return;if(!(e instanceof FormData))return this.jsonSerializer.deserialize(e.json,e.meta??[]);let t=JSON.parse(e.get(`data`));return this.jsonSerializer.deserialize(t.json,t.meta??[],t.maps,t=>e.get(t.toString()))}},Nt=class extends Et{constructor(e,t){let n=new jt(new Mt(new Ot(t)),t);super(n,e,t)}},Pt=0,Ft=1,It=class{peer;constructor(e){this.peer=new St(async t=>{if(e.websocket.readyState===Pt&&await new Promise(t=>{let n=()=>{e.websocket.removeEventListener(`open`,n),e.websocket.removeEventListener(`close`,n),t()};e.websocket.addEventListener(`open`,n,{once:!0}),e.websocket.addEventListener(`close`,n,{once:!0})}),e.websocket.readyState!==Ft)throw Error(`Cannot send message, WebSocket is not open.`);return e.websocket.send(t)}),e.websocket.addEventListener(`message`,async e=>{let t=e.data instanceof Blob?await D(e.data):e.data;this.peer.message(t)}),e.websocket.addEventListener(`close`,()=>{this.peer.close()})}async call(e,t,n,r){let i=await this.peer.request(e);return{...i,body:()=>Promise.resolve(i.body)}}},Lt=class extends Nt{constructor(e){let t=new It(e);super(t,{...e,url:`http://orpc`})}},Rt=null,zt=null;function Bt(){return`${location.protocol===`https:`?`wss:`:`ws:`}//${location.host}/rpc`}function P(){if(Rt&&zt&&zt.readyState<=WebSocket.OPEN)return Rt;let e=new WebSocket(Bt());return e.addEventListener(`close`,()=>{zt===e&&(zt=null,Rt=null)}),zt=e,Rt=ut(new Lt({websocket:e})),Rt}function Vt(e){return e instanceof Error&&/AsyncIdQueue|closed or aborted|WebSocket/i.test(e.message)}function Ht(e){return P().openRepo(e)}async function Ut(e){let t=await P().openTerminal({repoId:e});if(!t.ok)throw Error(t.error??`Could not open a terminal`)}function Wt(){return P().getRecentRepos({})}function Gt(e){return P().discoverRepos({folder:e})}function Kt(e){return P().listDirectory({folder:e})}function qt(e){return P().getRefs({repoId:e})}function Jt(e){return P().getRemotes({repoId:e})}function Yt(e){return P().getDefaultRemote({repoId:e})}function Xt(e,t){return P().setDefaultRemote({repoId:e,name:t})}function Zt(e){return P().getGithubForkSuggestion({repoId:e})}function Qt(e,t,n){return P().addRemote({repoId:e,name:t,url:n})}function $t(e,t){return P().removeRemote({repoId:e,name:t})}function en(e){return P().getWorktrees({repoId:e})}function tn(e,t){return P().removeWorktree({repoId:e,path:t})}function nn(e){return P().getWorktreeChanges({repoId:e})}function rn(e){return P().getStashes({repoId:e})}function an(e,t){return P().getStashDiff({repoId:e,stashSha:t})}function on(e,t,n,r){return P().getStashFileDiff({repoId:e,stashSha:t,path:n,oldPath:r})}function sn(e,t){return P().stashAction({repoId:e,action:`create`,message:t})}function cn(e,t){return P().stashAction({repoId:e,action:`apply`,stashSha:t})}function ln(e,t){return P().stashAction({repoId:e,action:`drop`,stashSha:t})}function un(e,t,n){return P().stageAction({repoId:e,action:t,paths:n})}function dn(e,t,n,r){return P().installAndResolveLockfile({repoId:e,path:t,fileName:n,command:r})}function fn(e,t,n,r){return P().getWorktreeFileDiff({repoId:e,path:t,area:n,oldPath:r})}function pn(e,t,n,r){return P().commit({repoId:e,message:t,noVerify:n,amend:r})}function mn(e,t){return P().queryHistory(t)}function hn(e,t){return P().getCommitDetail({repoId:e,sha:t})}function gn(e,t){return P().getCommitAuthor({repoId:e,sha:t})}function _n(e,t){return P().getCommitDiff({repoId:e,sha:t})}function vn(e,t,n,r){return P().getCommitFileDiff({repoId:e,sha:t,path:n,oldPath:r})}function yn(e,t){return P().getCommitPRs({repoId:e,sha:t})}function bn(e,t){return P().getCommitCIStatuses({repoId:e,shas:t})}function xn(e,t,n,r){return P().commitAction({repoId:e,action:t,sha:n,message:r})}function Sn(e,t){return P().getMergePreview({repoId:e,refName:t})}function Cn(e,t){return P().mergeRef({repoId:e,refName:t})}function wn(e,t){return P().rebaseRef({repoId:e,refName:t})}function Tn(e,t){return P().abortOperation({repoId:e,operation:t})}function En(e,t){return P().continueOperation({repoId:e,operation:t})}function Dn(e,t,n,r,i,a){return P().refAction({repoId:e,action:t,refName:n,sha:r,force:i,remote:a})}function On(e,t,n){return P().getReflog({repoId:e,ref:t,maxCount:n})}function kn(){return P().listAgentSessions({})}function An(e,t){return P().focusAgentSession({pid:e,cwd:t})}function jn(){return P().installWindowCalls({})}var Mn=class{activeLanes=new Map;reserved=new Map;nextSideFromCenter=`right`;firstParentChildren;constructor(e,t){this.firstParentChildren=t??new Map}reserveLane(e,t){this.reserved.set(e,t),this.activeLanes.set(t,e)}assignLane(e,t){let n=this.reserved.get(e);if(n!==void 0)this.reserved.delete(e),this.activeLanes.set(n,e);else{let r=t[0],i=r?this.reserved.get(r):void 0;n=i===void 0?this.findFreeLane():this.findFreeLaneNear(i),this.activeLanes.set(n,e)}if(t.length===0)return this.activeLanes.delete(n),n;let r=t[0];this.reserved.has(r)?this.reserved.get(r)===n?this.activeLanes.set(n,r):this.activeLanes.delete(n):(this.reserved.set(r,n),this.activeLanes.set(n,r));for(let e=1;e<t.length;e++){let n=t[e];if(!this.reserved.has(n)){let e=this.findOccupiedLineLane(n)??this.findFreeLaneOutsideCluster();this.reserved.set(n,e),this.activeLanes.set(e,n)}}return n}findOccupiedLineLane(e){let t=new Set([e]),n=this.firstParentChildren.get(e)??[];for(;n.length>0&&t.size<=128;){let e=[];for(let r of n){if(t.has(r))continue;t.add(r);let n=this.reserved.get(r);if(n!==void 0&&this.isLaneHeldBy(n,t))return n;e.push(...this.firstParentChildren.get(r)??[])}n=e}}isLaneHeldBy(e,t){let n=this.activeLanes.get(e);return n===void 0||t.has(n)}findFreeLane(){if(!this.activeLanes.has(0))return 0;for(let e=1;;e++){let t=this.activeLanes.has(-e)?void 0:-e,n=this.activeLanes.has(e)?void 0:e;if(!(t===void 0&&n===void 0))return this.pickLaneFromCenter(t,n)}}findFreeLaneNear(e){for(let t=1;;t++){let n=e-t,r=e+t,i=!this.activeLanes.has(n),a=!this.activeLanes.has(r);if(!(!i&&!a))return e<0?i?n:r:e>0?a?r:n:this.pickLaneFromCenter(i?n:void 0,a?r:void 0)}}findFreeLaneOutsideCluster(){if(this.activeLanes.size===0)return this.findFreeLane();let e=1/0,t=-1/0;for(let n of this.activeLanes.keys())n<e&&(e=n),n>t&&(t=n);return this.pickLaneFromCenter(e-1,t+1)}pickLaneFromCenter(e,t){if(e===void 0&&t===void 0)throw Error(`pickLaneFromCenter requires at least one candidate lane`);if(e===void 0)return this.recordChosenSide(`right`),t;if(t===void 0)return this.recordChosenSide(`left`),e;let n=this.sideLoad(`left`),r=this.sideLoad(`right`);if(n<r)return this.recordChosenSide(`left`),e;if(r<n)return this.recordChosenSide(`right`),t;let i=this.nextSideFromCenter;return this.recordChosenSide(i),i===`left`?e:t}sideLoad(e){let t=0;for(let n of this.activeLanes.keys())e===`left`&&n<0&&t++,e===`right`&&n>0&&t++;return t}recordChosenSide(e){this.nextSideFromCenter=e===`left`?`right`:`left`}snapshot(){return{activeLanes:[...this.activeLanes.entries()].sort((e,t)=>e[0]-t[0]).map(([e,t])=>({lane:e,sha:t})),nextSideFromCenter:this.nextSideFromCenter}}restore(e){this.activeLanes=new Map,this.reserved=new Map,this.nextSideFromCenter=e.nextSideFromCenter;for(let t of e.activeLanes)this.activeLanes.set(t.lane,t.sha),this.reserved.set(t.sha,t.lane)}};function Nn(e,t){let n=t===void 0?void 0:Math.max(0,Math.floor(t));if(n===0)return new Map(e.map(e=>[e.sha,0]));let{segments:r,centerMergeTargetIds:i,preferredChildByParent:a}=Pn(e),o=new Map(r.map(e=>[e.id,e])),s=In(r,o,n,i),c=new Map;for(let e of r)if(e.lane===0)for(let t of e.shas)c.set(t,0);return Bn(r.filter(e=>s.get(e.id)===`left`),`left`,c,o,n,i),Bn(r.filter(e=>s.get(e.id)===`right`),`right`,c,o,n,i),n!==void 0&&Gn(r,c,n),Wn(e,c,a),c}function Pn(e){let t=new Map(e.map(e=>[e.sha,e])),n=new Map;for(let t of e){let e=t.parentShas[0];if(!e)continue;let r=n.get(e);r?r.push(t):n.set(e,[t])}let r=new Set;for(let n of e)for(let e of n.parentShas.slice(1)){let i=t.get(e);i&&(n.lane===0&&i.lane!==0?r.add(i.sha):n.lane!==0&&i.lane===0&&r.add(n.sha))}let i=new Map;for(let n of e){let e=(i.get(n.sha)??0)+ +!!r.has(n.sha);i.set(n.sha,e);let a=n.parentShas[0];a&&t.has(a)&&i.set(a,Math.max(i.get(a)??0,e))}let a=new Map;for(let[e,r]of n){if(r.length<2)continue;let n=t.get(e);if(!n||n.lane===0)continue;let o=r.find(e=>e.lane===n.lane);if(!o)continue;let s=o,c=i.get(s.sha)??0;for(let e of r){let t=i.get(e.sha)??0;Math.sign(e.lane)===Math.sign(s.lane)&&t>=2&&t>c&&(s=e,c=t)}s.sha!==o.sha&&a.set(e,s.sha)}let o=new Map(e.map(e=>[e.sha,e.sha])),s=e=>{let t=o.get(e);if(t===e)return e;let n=s(t);return o.set(e,n),n},c=(e,t)=>{let n=s(e),r=s(t);n!==r&&o.set(r,n)};for(let n of e){let e=n.parentShas[0],r=e?t.get(e):void 0;r?.lane===n.lane&&c(n.sha,r.sha)}let l=new Set([...r].map(e=>s(e)));for(let r of e){if(r.lane===0)continue;let e=r.parentShas[0],i=e?t.get(e):void 0;!i||i.lane===0||i.lane===r.lane||new Set((n.get(i.sha)??[]).map(e=>s(e.sha)).filter(e=>l.has(e))).size===1&&l.has(s(r.sha))&&l.has(s(i.sha))&&c(r.sha,i.sha)}let u=new Map;for(let n of e){let e=s(n.sha),r=u.get(e);r||(r={id:e,lane:n.lane,shas:[],startRow:n.row,endRow:n.row,continuity:0,maxConcurrency:1},u.set(e,r)),r.shas.push(n.sha),r.startRow=Math.min(r.startRow,n.row),r.endRow=Math.max(r.endRow,n.row);let i=n.parentShas[0],a=i?t.get(i):void 0;a&&(r.continuity+=Math.abs(a.row-n.row),a.lane!==n.lane&&Fn(r,a.row))}for(let n of e)for(let e of n.parentShas.slice(1)){let r=t.get(e);if(!r)continue;let i=u.get(s(r.sha));i&&(i.continuity+=Math.abs(r.row-n.row),Fn(i,n.row))}for(let n of e){let e=n.parentShas[0],r=e?t.get(e):void 0;if(!r)continue;let i=u.get(s(n.sha)),a=u.get(s(r.sha));i&&a&&i.id!==a.id&&i.lane!==0&&a.lane!==0&&(i.inwardSegmentId??=a.id)}let d=new Set;for(let e of l)d.add(s(e));return{segments:[...u.values()],centerMergeTargetIds:d,preferredChildByParent:a}}function Fn(e,t){e.startRow=Math.min(e.startRow,t),e.endRow=Math.max(e.endRow,t)}function In(e,t,n,r){let i=new Map,a=new Set,o={left:0,right:0},s=e.filter(e=>{if(e.lane===0||!r?.has(e.id))return!1;let n=e.inwardSegmentId?t.get(e.inwardSegmentId):void 0;return!n||n.lane===0}).sort(Vn);for(let e of s){let t=o.right<=o.left?`right`:`left`;i.set(e.id,t),o[t]++}let c=e=>{let n=i.get(e.id);if(n)return n;if(a.has(e.id))return e.lane<0?`left`:`right`;a.add(e.id);let r=e.inwardSegmentId?t.get(e.inwardSegmentId):void 0,o=r&&r.lane!==0?c(r):e.lane<0?`left`:`right`;return a.delete(e.id),i.set(e.id,o),o};for(let t of e)t.lane!==0&&c(t);return n!==void 0&&Ln(e,t,n,i),i}function Ln(e,t,n,r){let i={left:new Map,right:new Map},a=new Map,o=new Set,s=e=>{let n=a.get(e.id);if(n)return n;if(o.has(e.id))return e.id;o.add(e.id);let r=e.inwardSegmentId?t.get(e.inwardSegmentId):void 0,i=r&&r.lane!==0?s(r):e.id;return o.delete(e.id),a.set(e.id,i),i},c=new Map;for(let t of e){if(t.lane===0)continue;let e=s(t),n=c.get(e);n?n.push(t):c.set(e,[t])}let l=[...c.entries()].sort((e,n)=>{let r=e[1].reduce((e,t)=>e+t.continuity,0);return n[1].reduce((e,t)=>e+t.continuity,0)-r||Vn(t.get(e[0]),t.get(n[0]))});for(let[e,a]of l){let o=t.get(e),s=r.get(o.id)??(o.lane<0?`left`:`right`),c=s===`left`?`right`:`left`,l=Rn(a,i[s],n),u=Rn(a,i[c],n)<l?c:s;for(let e of a)r.set(e.id,u);zn(a,i[u],n)}}function Rn(e,t,n){return zn(e,new Map([...t].map(([e,t])=>[e,[...t]])),n)}function zn(e,t,n){let r=0;for(let i of[...e].sort(Vn)){let e=qn(i,t,n,Math.min(Math.abs(i.lane),n)),a=t.get(e)??[];r+=a.reduce((e,t)=>e+Zn(i,t),0),a.length>0?a.push(i):t.set(e,[i])}return r}function Bn(e,t,n,r,i,a){if(e.length===0)return;let o=new Map,s=new Map,c=e.filter(e=>{if(a?.has(e.id))return!1;let t=e.inwardSegmentId?r.get(e.inwardSegmentId):void 0;return t!==void 0&&t.lane!==0}),l=new Set(c.map(e=>e.id)),u=e.filter(e=>!l.has(e.id));Hn(u);let d=i??Math.max(0,...u.map(e=>Math.abs(e.lane))),f=u.filter(e=>a?.has(e.id)).sort(Vn);for(let e of f){let r=Yn(e,o,1,d,1);r??=i===void 0?Jn(e,o,d+1):qn(e,o,d,1),Un(e,r,t,n,o,s)}let p=[...u].filter(e=>!a?.has(e.id)).sort(Vn);for(let e of p){let r=i===void 0?e.maxConcurrency:Math.min(e.maxConcurrency,d),a=Yn(e,o,r,1,-1);a===void 0&&(a=Yn(e,o,r+1,d,1)),a??=i===void 0?Math.abs(e.lane):qn(e,o,d,Math.min(Math.abs(e.lane),d)),Un(e,a,t,n,o,s)}let m=new Set(c);for(;m.size>0;){let e=[...m].filter(e=>e.inwardSegmentId!==void 0&&s.has(e.inwardSegmentId)).sort((e,t)=>s.get(e.inwardSegmentId)-s.get(t.inwardSegmentId)||e.continuity-t.continuity||e.endRow-e.startRow-(t.endRow-t.startRow)||e.startRow-t.startRow||e.id.localeCompare(t.id));if(e.length===0){for(let e of m){let r=Math.max(1,Math.abs(e.lane));Un(e,i===void 0?Jn(e,o,r):Kn(e,o,i,Math.min(r,i)),t,n,o,s)}break}for(let r of e){let e=s.get(r.inwardSegmentId);Un(r,i===void 0?Jn(r,o,e+1):Kn(r,o,i,Math.min(e+1,i),e),t,n,o,s),m.delete(r)}}}function Vn(e,t){return t.continuity-e.continuity||t.endRow-t.startRow-(e.endRow-e.startRow)||e.startRow-t.startRow||Math.abs(e.lane)-Math.abs(t.lane)||e.id.localeCompare(t.id)}function Hn(e){let t=[...e].sort((e,t)=>e.startRow-t.startRow),n=[];for(let e of t){n=n.filter(t=>t.endRow>=e.startRow),n.push(e);let t=n.length;for(let e of n)e.maxConcurrency=Math.max(e.maxConcurrency,t)}}function Un(e,t,n,r,i,a){let o=i.get(t);o?o.push(e):i.set(t,[e]),a.set(e.id,t);let s=n===`left`?-t:t;for(let t of e.shas)r.set(t,s)}function Wn(e,t,n){if(n.size===0)return;let r=new Map(e.map(e=>[e.sha,e])),i=new Map;for(let t of e){let e=t.parentShas[0];if(!e)continue;let n=i.get(e);n?n.push(t):i.set(e,[t])}for(let[a,o]of n){let n=r.get(a),s=r.get(o);if(!n||!s)continue;let c=(i.get(a)??[]).find(e=>e.lane===n.lane);if(!c)continue;let l=t.get(a),u=t.get(c.sha),d=t.get(o);if(l===void 0||u!==l||d===void 0||d===l||d===0||Math.sign(d)!==Math.sign(l))continue;let f=[],p=n;for(;p&&p.lane===n.lane&&t.get(p.sha)===l;){f.push(p);let e=p.parentShas[0];p=e?r.get(e):void 0}if(f.length===0)continue;let m=new Set(f.map(e=>e.sha)),{startRow:h,endRow:g}=f.reduce((e,t)=>({startRow:Math.min(e.startRow,t.row),endRow:Math.max(e.endRow,t.row)}),{startRow:1/0,endRow:-1/0}),_=(e,t)=>Math.max(Math.min(e,t),h)<Math.min(Math.max(e,t),g),v=!0;for(let n of e){if(m.has(n.sha))continue;let e=t.get(n.sha);if(e===d&&n.row>=h&&n.row<=g){v=!1;break}let i=n.parentShas[0],a=i?r.get(i):void 0;if(n.sha!==o&&e===d&&a&&_(n.row,a.row)){v=!1;break}for(let e of n.parentShas.slice(1)){let i=r.get(e);if(i&&!m.has(i.sha)&&t.get(i.sha)===d&&_(n.row,i.row)){v=!1;break}}if(!v)break}if(v)for(let e of f)t.set(e.sha,d)}}function Gn(e,t,n){if(n<1)return;let r=e.filter(e=>e.lane!==0),i=new Map(r.map(e=>[e.id,t.get(e.shas[0])??0])),a=Array.from({length:n*2},(e,t)=>{let r=t%n+1;return t<n?r:-r}),o=[...r].sort((e,t)=>e.continuity-t.continuity||e.endRow-e.startRow-(t.endRow-t.startRow)||t.startRow-e.startRow||e.id.localeCompare(t.id)),s=(e,t)=>r.reduce((n,r)=>r.id===e.id||i.get(r.id)!==t?n:n+Zn(e,r),0),c=!0;for(;c;){c=!1;for(let e of o){let n=i.get(e.id),r=s(e,n);if(r===0)continue;let o=n,l=r,u=1/0;for(let t of a){if(Math.sign(t)!==Math.sign(n))continue;let i=s(e,t),a=Math.abs(t-n);(i<l||i===l&&i<r&&a<u)&&(o=t,l=i,u=a)}if(!(o===n||l>=r)){i.set(e.id,o);for(let n of e.shas)t.set(n,o);c=!0}}}}function Kn(e,t,n,r,i){let a=Yn(e,t,r,n,1);return a===i&&(a=void 0),a===void 0&&(a=Yn(e,t,1,r-1,1),a===i&&(a=void 0)),a??qn(e,t,n,r,i)}function qn(e,t,n,r,i){let a=1,o=1/0,s=1/0;for(let c=1;c<=n;c++){if(n>1&&c===i)continue;let l=(t.get(c)??[]).reduce((t,n)=>t+Zn(e,n),0),u=Math.abs(c-r);(l<o||l===o&&u<s||l===o&&u===s&&c<a)&&(a=c,o=l,s=u)}return a}function Jn(e,t,n){for(let r=n;;r++)if((t.get(r)??[]).every(t=>!Xn(e,t)))return r}function Yn(e,t,n,r,i){for(let a=n;i>0?a<=r:a>=r;a+=i)if((t.get(a)??[]).every(t=>!Xn(e,t)))return a}function Xn(e,t){return e.startRow<=t.endRow&&t.startRow<=e.endRow}function Zn(e,t){let n=Math.max(e.startRow,t.startRow),r=Math.min(e.endRow,t.endRow);return r<n?0:r-n+1}function Qn(e,t,n){let r=[];for(let{sha:i,parentShas:a,row:o,lane:s}of e)for(let e=0;e<a.length;e++){let i=a[e],c=t.get(i)??-1,l=n.get(i)??s,u;u=e===0?s===l?`linear`:`fork`:`merge`,r.push({fromRow:o,toRow:c,fromLane:s,toLane:l,kind:u})}return r}var $n=class{id;repoId;scope;ordering;entries=[];shaIndex=new Map;firstParentChildren=new Map;constructor(e,t,n,r){this.id=e,this.repoId=t,this.scope=n,this.ordering=r}appendEntries(e){let t=this.entries.length;for(let n=0;n<e.length;n++){let{sha:r,parentShas:i}=e[n],a=t+n;this.entries.push({sha:r,parentShas:i,row:a}),this.shaIndex.set(r,a);let o=i[0];if(o){let e=this.firstParentChildren.get(o);e?e.push(r):this.firstParentChildren.set(o,[r])}}}getWindow(e,t,n){let r=Math.max(0,e-t),i=Math.min(this.entries.length-1,e+n);return{entries:this.entries.slice(r,i+1),startRow:r,endRow:i}}findRow(e){return this.shaIndex.get(e)}totalRows(){return this.entries.length}getKnownParentShas(e){return e.filter(e=>this.shaIndex.has(e))}checkpoint(e=256){let t=[],n=new Mn(void 0,this.firstParentChildren);for(let r=0;r<this.entries.length;r++){let i=this.entries[r];r%e===0&&t.push({row:i.row,sha:i.sha,laneSnapshot:n.snapshot()}),n.assignLane(i.sha,this.getKnownParentShas(i.parentShas))}return t}restoreFrom(e,t){t.restore(e.laneSnapshot)}computeGeometry(e,t,n,r){let i=Math.max(0,e),a=Math.min(this.entries.length-1,t),o=new Mn(void 0,this.firstParentChildren);if(r){let e=r;for(;e!==void 0;){o.reserveLane(e,0);let t=this.shaIndex.get(e);if(t===void 0)break;let n=this.entries[t];e=n.parentShas.length>0?n.parentShas[0]:void 0}}let s=0;n&&n.row<=i&&(this.restoreFrom(n,o),s=n.row);for(let e=s;e<i;e++){let t=this.entries[e];o.assignLane(t.sha,this.getKnownParentShas(t.parentShas))}let c=new Map,l=[];for(let e=i;e<=a;e++){let t=this.entries[e],n=o.assignLane(t.sha,this.getKnownParentShas(t.parentShas));c.set(t.sha,n),l.push({sha:t.sha,parentShas:t.parentShas,row:t.row,lane:n})}let u=Nn(l);for(let e of l)e.lane=u.get(e.sha)??e.lane,c.set(e.sha,e.lane);let d=new Map,f=new Map(c);for(let e of this.entries)d.set(e.sha,e.row);return{lanes:c,edges:Qn(l,d,f)}}};function er(e,t){return{...e,headSha:t,staged:[]}}function tr(e,t,n){let r={...e,headSha:t};if(n)return{...r,branch:n};let{branch:i,...a}=r;return a}var nr=0;function rr(e){return nr+=1,`optimistic-${e}-${Date.now().toString(36)}-${nr}`}function ir(e){return{authorName:e.authorName,authorEmail:e.authorEmail,authorUnix:e.authorUnix,committerUnix:e.committerUnix,subject:e.subject,additions:e.additions,deletions:e.deletions,locChanged:e.locChanged,bodyPreview:e.bodyPreview}}function ar(e){return e.find(e=>e.kind===`head`&&e.isCurrent)??null}function or(e,t){return e.find(e=>e.shortName===t)??null}function sr(e){return e.peeledSha??e.targetSha}function cr(e,t){let n=new Set,r=[e];for(;r.length>0;){let e=r.pop();if(n.has(e))continue;n.add(e);let i=t.get(e);if(i)for(let e of i)n.has(e)||r.push(e)}return n}function lr(e,t,n){let r=new $n(`optimistic`,`optimistic`,{kind:`all`},`date`);r.appendEntries(e.map(e=>({sha:e.sha,parentShas:e.parentShas})));let{lanes:i}=r.computeGeometry(0,e.length-1,void 0,n??void 0),a=new Map;for(let e of t){let t=sr(e),n=a.get(t);n?n.push(e.shortName):a.set(t,[e.shortName])}return e.map((e,t)=>({row:t,sha:e.sha,parentShas:e.parentShas,authorName:e.meta.authorName,authorEmail:e.meta.authorEmail,authorUnix:e.meta.authorUnix,committerUnix:e.meta.committerUnix,subject:e.meta.subject,additions:e.meta.additions,deletions:e.meta.deletions,locChanged:e.meta.locChanged,bodyPreview:e.meta.bodyPreview,refNames:a.get(e.sha)??[],lane:i.get(e.sha)??0}))}function ur(e){return e.map(e=>({sha:e.sha,parentShas:e.parentShas,meta:ir(e)}))}function dr(e,t){return e.map(e=>{if(e.kind!==`head`)return e;let n=t!==null&&e.shortName===t;return!!e.isCurrent===n?e:{...e,isCurrent:n}})}function fr(e,t,n){return e.map(e=>e.kind===`head`&&e.shortName===t?{...e,targetSha:n,peeledSha:void 0}:e)}function pr(e,t,n,r){if(e.length===0)return null;let i=dr(t,n);return{rows:lr(ur(e),i,r),refs:i,headSha:r}}function mr(e,t,n,r){if(e.length===0)return null;let i=or(t,n);if(!i||i.kind!==`head`)return null;let a=fr(t,n,r),o=ar(a),s=o?o.targetSha:null;return{rows:lr(ur(e),a,s),refs:a,headSha:s}}function hr(e,t,n){let r=ar(t);if(!r)return null;let i=e.find(e=>e.sha===n);if(!i)return null;let a=i.parentShas[0];if(!a)return null;let o=t.some(e=>e!==r&&sr(e)===n&&e.shortName!==r.shortName),s=ur(e);o||(s=s.filter(e=>e.sha!==n));let c=fr(t,r.shortName,a);return{rows:lr(s,c,a),refs:c,headSha:a}}function gr(e,t,n){let r=ar(t);if(!r)return null;let i=new Map(e.map(e=>[e.sha,e])),a=[],o=new Set,s=r.targetSha;for(;s&&!o.has(s);){o.add(s);let e=i.get(s);if(!e)return null;if(a.push(e),s===n)break;s=e.parentShas[0]}return a.at(-1)?.sha!==n||a.length<2||a.some(e=>e.parentShas.length>1)?null:a}function _r(e,t,n,r){let i=ar(t),a=gr(e,t,n);if(!i||!a)return null;let o=new Set(a.map(e=>e.sha)),s=new Map(e.map(e=>[e.sha,e.parentShas])),c=new Set;for(let e of t){if(e.kind===`head`&&e.shortName===i.shortName)continue;let t=cr(sr(e),s);for(let e of o)t.has(e)&&c.add(e)}let l=a[a.length-1],u=Math.floor(Date.now()/1e3),d=rr(`squash`),f={sha:d,parentShas:l.parentShas.slice(0,1),meta:{...ir(l),committerUnix:u,subject:r,additions:a.reduce((e,t)=>e+t.additions,0),deletions:a.reduce((e,t)=>e+t.deletions,0),locChanged:a.reduce((e,t)=>e+t.locChanged,0),bodyPreview:void 0}},p=ur(e).filter(e=>!o.has(e.sha)||c.has(e.sha)),m=fr(t,i.shortName,d);return{rows:lr([f,...p],m,d),refs:m,headSha:d}}function vr(e,t,n,r){let i=ar(t);if(!i)return null;let a=i.targetSha;if(!e.some(e=>e.sha===a))return null;let o=Math.floor(Date.now()/1e3),s=rr(r),c=[{sha:s,parentShas:[a],meta:{authorName:``,authorEmail:``,authorUnix:o,committerUnix:o,subject:n,additions:0,deletions:0,locChanged:0}},...ur(e)],l=fr(t,i.shortName,s);return{rows:lr(c,l,s),refs:l,headSha:s}}function yr(e,t,n){let r=ar(t);if(!r)return null;let i=r.targetSha,a=e.find(e=>e.sha===i);if(!a)return null;let o=rr(`amend`),s={sha:o,parentShas:a.parentShas,meta:{...ir(a),subject:n}},c=t.some(e=>e!==r&&e.shortName!==r.shortName&&sr(e)===i)?[s,...ur(e)]:ur(e).map(e=>e.sha===i?s:e),l=fr(t,r.shortName,o);return{rows:lr(c,l,o),refs:l,headSha:o}}function br(e,t,n){let r=ar(t);if(!r)return null;let i=or(t,n);if(!i)return null;let a=r.targetSha,o=sr(i);if(!e.some(e=>e.sha===a))return null;let s=new Map(e.map(e=>[e.sha,e.parentShas])),c=cr(o,s);if(cr(a,s).has(o))return null;if(c.has(a)){if(!e.some(e=>e.sha===o))return null;let n=fr(t,r.shortName,o);return{rows:lr(ur(e),n,o),refs:n,headSha:o}}if(!e.some(e=>e.sha===o))return null;let l=Math.floor(Date.now()/1e3),u=rr(`merge`),d=[{sha:u,parentShas:[a,o],meta:{authorName:``,authorEmail:``,authorUnix:l,committerUnix:l,subject:`Merge ${n}`,additions:0,deletions:0,locChanged:0}},...ur(e)],f=fr(t,r.shortName,u);return{rows:lr(d,f,u),refs:f,headSha:u}}function xr(e,t,n){let r=ar(t);if(!r)return null;let i=or(t,n);if(!i)return null;let a=r.targetSha,o=sr(i);if(!e.some(e=>e.sha===a)||!e.some(e=>e.sha===o))return null;let s=new Map(e.map(e=>[e.sha,e.parentShas])),c=cr(a,s),l=cr(o,s);if(l.has(a)){let n=fr(t,r.shortName,o);return{rows:lr(ur(e),n,o),refs:n,headSha:o}}let u=e.filter(e=>c.has(e.sha)&&!l.has(e.sha));if(u.length===0||u.some(e=>e.parentShas.length>1))return null;let d=new Set(u.map(e=>e.sha)),f=u[u.length-1],p=ur(e).filter(e=>!d.has(e.sha));if(!p.some(e=>e.sha===o))return null;let m=Math.floor(Date.now()/1e3),h=[...u.map(e=>({sha:e.sha,parentShas:e.sha===f.sha?[o]:e.parentShas,meta:{...ir(e),committerUnix:m}})),...p],g=t.slice();return{rows:lr(h,g,a),refs:g,headSha:a}}function Sr(e,t,n){let r=ar(t),i=or(t,n);if(!r||!i)return`history-not-loaded`;let a=r.targetSha,o=sr(i);if(!e.some(e=>e.sha===a)||!e.some(e=>e.sha===o))return`history-not-loaded`;let s=new Map(e.map(e=>[e.sha,e.parentShas])),c=cr(a,s),l=cr(o,s);return e.filter(e=>c.has(e.sha)&&!l.has(e.sha)).some(e=>e.parentShas.length>1)?`merge-commits`:null}function Cr(e,t,n){return e+t>=n/2}function wr(e,t,n){return n&&e!==t}function Tr(e,t){if(!e||e.rows.every((e,n)=>t.rows[n]?.sha===e.sha))return t;let n=new Set(e.rows.map(e=>e.sha)),r=t.rows.filter(e=>!n.has(e.sha));return r.length===0?{...e,hasMoreAfter:t.hasMoreAfter}:{...t,rows:[...e.rows,...r],edges:[...e.edges,...t.edges],hasMoreBefore:e.hasMoreBefore}}var Er=80,Dr=.2,Or=3,kr=[`#89b4fa`,`#a6e3a1`,`#f9e2af`,`#f38ba8`,`#cba6f7`,`#94e2d5`,`#fab387`,`#74c7ec`,`#f5c2e7`,`#b4befe`];function Ar(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return t}function jr(e){return kr[(e%kr.length+kr.length)%kr.length]}function Mr(e){let t=e;return t^=t>>>16,t=Math.imul(t,2146121005),t^=t>>>15,t=Math.imul(t,2221713035),t^=t>>>16,t>>>0}function Nr(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Pr(e,t,n){let r=t/100,i=n/100,a=(1-Math.abs(2*i-1))*r,o=(e%360+360)%360/60,s=a*(1-Math.abs(o%2-1)),[c,l,u]=o<1?[a,s,0]:o<2?[s,a,0]:o<3?[0,a,s]:o<4?[0,s,a]:o<5?[s,0,a]:[a,0,s],d=i-a/2;return`#${[c,l,u].map(e=>Math.round((e+d)*255).toString(16).padStart(2,`0`)).join(``)}`}function Fr(e){let t=Mr(Nr(e));return Pr(t%360,64+(t>>>9)%17,68+(t>>>17)%9)}function Ir(e,t){let n=Math.max(0,e),r=n/2,i=(n>=480?Math.floor(Or/2):0)*80+80/2,a=Math.max(0,r-i),o=Math.min(Math.max(0,t),Math.max(0,a-120)),s=Math.min(520,Math.max(Er,n*Dr)),c=Math.min(s,Math.max(0,a-80)),l=120+o,u=80+c,d=Math.max(80/2,Math.min(r-l,n-r-u));return{extraLeftGutter:o,rightGutter:c,maxLaneRadius:Math.max(0,Math.floor((d-80/2)/80)),laneCenterX:r,layoutWidth:n}}function Lr(e,t,n,r){let i=Math.max(n,.1),a=Math.max(0,e),o=Math.max(0,t);return{...Ir(a/i,r),laneCenterX:(a/2-o)/i,layoutWidth:Math.max(0,a-o)/i}}function Rr(e,t){if(e.length===0)return{laneCenterX:t.laneCenterX,laneRadius:t.maxLaneRadius,totalWidth:t.layoutWidth};let n=1/0,r=-1/0;for(let t of e)n=Math.min(n,t.lane),r=Math.max(r,t.lane);let i=t.maxLaneRadius,a=-((n+r)/2)*80,o=(-i-n)*80,s=(i-r)*80,c=Math.max(o,Math.min(s,a));return{laneCenterX:t.laneCenterX+c,laneRadius:i,totalWidth:t.layoutWidth}}function zr(e,t){let n=Nn(e,t),r=!1,i=e.map(e=>{let t=n.get(e.sha)??0;return t===e.lane?e:(r=!0,{...e,lane:t})});return r?i:e}function Br(e,t){let n=t.get(e);return n?Fr(n):kr[Ar(e)%kr.length]}function Vr(e){return e.length===0?null:e.find(e=>!e.includes(`/`))||(e.find(e=>e.includes(`/`)&&e!==`origin`&&e!==`HEAD`)??null)}function Hr(e,t=0,n=520,r){let i=1/0,a=-1/0,o=[],s=new Map,c=new Map;for(let t=0;t<e.length;t++){let n=e[t];n.lane<i&&(i=n.lane),n.lane>a&&(a=n.lane),c.set(n.sha,n)}let l=Number.isFinite(i)?i:0,u=Number.isFinite(a)?a:0,d=r?.laneRadius??Math.max(Math.abs(l),Math.abs(u)),f=160+t;for(let t=0;t<e.length;t++){let n=e[t],i={row:n,x:r?r.laneCenterX+n.lane*80:f+(n.lane+d)*80,y:152+t*56,idx:t};o.push(i),s.set(n.sha,i)}let p=new Map;for(let t of e){let e=Vr(t.refNames);if(!e)continue;let n=t.sha;for(;n&&!p.has(n);){p.set(n,e);let t=c.get(n);if(!t||t.parentShas.length===0)break;n=t.parentShas[0]}}let m=new Map;for(let e of o)m.set(e.row.sha,Br(e.row.sha,p));return{nodes:o,shaToNode:s,shaToBranch:p,shaToColor:m,maxLane:a,totalWidth:r?.totalWidth??200+t+(d*2+1)*80+n,totalHeight:e.length*56+80+112}}function Ur(e,t){let n=e.nodes.map((e,n)=>({...e,row:t[n]}));return{...e,nodes:n,shaToNode:new Map(n.map(e=>[e.row.sha,e]))}}function Wr(e,t){if(!t)return e;let n=e.findIndex(e=>e.refNames.includes(t));if(n<=0)return e;let r=e[n],i=r.lane,a=new Map;for(let t=0;t<n;t++){let n=e[t].parentShas[0];if(!n)continue;let r=a.get(n);r?r.push(t):a.set(n,[t])}let o=new Set,s=[r.sha],c=new Set;for(;s.length>0;){let t=s.pop();if(!c.has(t)){c.add(t);for(let n of a.get(t)??[]){let t=e[n];t.lane===i&&(o.add(n),s.push(t.sha))}}}if(o.size===0)return e;let l=Math.min(...o),u=Math.max(0,l-1),d=n-1,f=new Map(e.map((e,t)=>[e.sha,t])),p=t=>{for(let n=0;n<e.length;n++){if(o.has(n))continue;let r=e[n];if(r.lane===t&&u<=n&&n<=d)return!1;let i=f.get(r.parentShas[0]??``);if(!(i===void 0||r.lane!==t)&&e[i].lane===t&&Math.min(n,i)<=d&&u<=Math.max(n,i))return!1}return!0},m=Math.max(i,...e.map(e=>e.lane)),h=Math.max(i+1,m);for(;!p(h);)h++;return e.map((e,t)=>o.has(t)?{...e,lane:h}:e)}var Gr=12,Kr=new WeakMap,qr=new Map,Jr={requests:0,referenceHits:0,topologyHits:0,builds:0,totalBuildMs:0};function Yr(e){return e?e.staged.length+e.unstaged.length:0}function Xr(e){return e.find(e=>e.isCurrent)?.shortName??null}function Zr(e,t,n){return`${e??``}\u0000${+!!t}\u0000${n}`}function Qr(e,t){let n=`${t}|${e.length}`;for(let t of e)n+=`\u0001${t.sha}\u0002${t.lane}\u0002${t.parentShas.join(`,`)}\u0002${t.refNames.join(`,`)}`;return n}function $r(){return typeof performance>`u`?Date.now():performance.now()}function ei(e,t){if(qr.delete(e),qr.set(e,t),qr.size>Gr){let e=qr.keys().next().value;e!==void 0&&qr.delete(e)}}function ti(e,t,n,r){if(!e||e.rows.length===0)return null;Jr.requests++;let i=e.rows,a=Xr(t),o=Yr(n)>0,s=r?260:0,c=Zr(a,o,s),l=Kr.get(i),u=l?.get(c);if(u)return Jr.referenceHits++,u;let d=o?Wr(i,a):i,f=Qr(d,s),p=qr.get(f),m;if(p)Jr.topologyHits++,m=p.rows===d?p.layout:Ur(p.layout,d),ei(f,{rows:d,layout:m});else{let e=$r();m=Hr(d,s),Jr.totalBuildMs+=$r()-e,Jr.builds++,ei(f,{rows:d,layout:m})}let h={currentBranch:a,renderedRows:d,layout:m},g=l??new Map;return g.set(c,h),l||Kr.set(i,g),h}function ni(){return{status:`no-repo`,repoId:null,repoPath:null,currentWorktreePath:null,totalCommitCount:0,recentRepos:[],discoveredFolder:null,discoveredRepos:[],remotes:[],selectedRemoteName:null,githubForkSuggestion:null,githubUrl:null,openError:null}}function ri(){return{refs:[],historyWindow:null,graphModel:null,reflog:null,reflogLoading:!1,reflogMaxCount:300,selectedSha:null,selectedRefName:null,scrollToSha:null,scrollToKey:0,commitDetail:null,commitDiff:null,commitPRs:[],commitAuthorAvatars:{},mergePreview:null,loadingMore:!1,commitCIStatus:{},pendingMutation:!1,pendingCheckout:!1,graphAnimationSuppressToken:0}}function ii(e,t){return`${e}:${t}`}function ai(e,t){return`${e}:${t}`}function oi(e,t){return`${e}:${t}`}function si(){return{stashes:[],selectedStashSha:null,stashDiff:null,stashFileDiffs:{},worktrees:[],worktreeChanges:null,worktreeSelected:!1,worktreeCommitMessage:``,worktreeFileDiffs:{},commitFileDiffs:{}}}var ci=.1;function li(e,t){try{let n=localStorage.getItem(e);return n===null?t:n===`true`}catch{return t}}function ui(e){return Number.isFinite(e)?Math.max(ci,Math.min(3,e)):1}function di(e){let t=ui(e);try{localStorage.setItem(`graphZoom`,String(t))}catch{}return t}function fi(){try{let e=localStorage.getItem(`graphZoom`);return e===null?1:ui(Number(e))}catch{return 1}}function pi(){return{viewMode:`history`,errorDialog:null,showCommitMessages:li(`showCommitMessages`,!0),showGutterColors:li(`showGutterColors`,!1),graphZoom:fi()}}var mi=100,hi=1e3,gi=500,_i=12,vi=3e4,yi=13e4,bi=class extends Error{constructor(){super(`The operation timed out`),this.name=`MutationTimeoutError`}};function xi(e,t){return new Promise((n,r)=>{let i=setTimeout(()=>r(new bi),t);e.then(e=>{clearTimeout(i),n(e)},e=>{clearTimeout(i),r(e)})})}function Si(e){return e.startsWith(`optimistic-`)||e.startsWith(`preview:`)}function Ci(e){return new Set(e.unstaged.filter(e=>e.status===`U`).map(e=>e.path)).size}function wi(e){return e.staged.length+e.unstaged.length}function Ti(e,t,n,r){if(!n){e({pendingMutation:!0,...r?{selectedSha:null,selectedRefName:r,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}:{}});return}e(e=>({pendingMutation:!0,refs:n.refs,historyWindow:Di(t.historyWindow,n.rows),selectedSha:r?null:n.headSha,selectedRefName:r??null,scrollToSha:n.headSha,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}))}function Ei(e){return{refs:e.refs,historyWindow:e.historyWindow,worktreeChanges:e.worktreeChanges,selectedSha:e.selectedSha,selectedRefName:e.selectedRefName,scrollToSha:e.scrollToSha,totalCommitCount:e.totalCommitCount,mergePreview:e.mergePreview,commitDetail:e.commitDetail,commitDiff:e.commitDiff,commitPRs:e.commitPRs,commitFileDiffs:e.commitFileDiffs}}function Di(e,t){return e?{...e,rows:t,totalRowsKnown:t.length,checkpointsKnownUntilRow:Math.max(0,t.length-1)}:null}function Oi(e){return Promise.all([qt(e),mn(e,{repoId:e,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:hi,firstParent:!1,topoOrder:!0})])}async function ki(e){let[[t,n],r,i]=await Promise.all([Oi(e),nn(e),en(e)]);return[t,n,r,i]}function Ai(e){return Promise.all([qt(e),mn(e,{repoId:e,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:hi,firstParent:!1,topoOrder:!0}),nn(e),en(e),rn(e),Jt(e)])}function ji(e,t){Promise.all([hn(e,t),_n(e,t)]).then(([e,n])=>{I.getState().selectedSha===t&&I.setState({commitDetail:e,commitDiff:n})}).catch(e=>console.error(`Failed to load commit detail:`,e)),I.getState().githubUrl&&(Mi(e,t),yn(e,t).then(e=>{I.getState().selectedSha===t&&I.setState({commitPRs:e})}).catch(()=>{})),I.getState().fetchCommitCIStatusesIfNeeded([t])}function Mi(e,t){let n=I.getState();!n.githubUrl||t in n.commitAuthorAvatars||gn(e,t).then(({avatarUrl:n})=>{I.getState().repoId===e&&I.setState(e=>({commitAuthorAvatars:{...e.commitAuthorAvatars,[t]:n}}))}).catch(()=>{})}function Ni(e){let t=e.find(e=>e.kind===`head`&&e.isCurrent);if(!t)return null;if(t.upstream){let n=e.find(e=>e.kind===`remote`&&e.name===t.upstream);if(n)return n.peeledSha??n.targetSha}return t.peeledSha??t.targetSha}function Pi(e,t){return e.rows.some(e=>e.sha===t)}function Fi(){let e=window.location.hash;return e.startsWith(`#/repository`)?new URLSearchParams(e.split(`?`)[1]??``).get(`path`):null}function Ii(e){window.location.hash=`#/repository?path=${encodeURIComponent(e)}`}function Li(){window.history.replaceState(null,``,`${window.location.pathname}${window.location.search}`)}var Ri=0;function F(e){return e instanceof Error&&e.message.includes(`No session found`)}function zi(e,t){return[t,...e.filter(e=>e!==t)].slice(0,_i)}function Bi(e,t){return t&&e.some(e=>e.name===t)?t:e.find(e=>e.name===`origin`)?.name??e[0]?.name??null}async function Vi(e,t,n,r){let i=++Ri;t({status:`loading`,repoId:null,repoPath:null,currentWorktreePath:null,totalCommitCount:0,refs:[],remotes:[],selectedRemoteName:null,githubForkSuggestion:null,stashes:[],selectedStashSha:null,stashDiff:null,stashFileDiffs:{},worktrees:[],historyWindow:null,selectedSha:null,selectedRefName:null,scrollToSha:null,commitDetail:null,commitDiff:null,commitPRs:[],commitAuthorAvatars:{},commitCIStatus:{},mergePreview:null,githubUrl:null,openError:null,loadingMore:!1,worktreeChanges:null,worktreeSelected:!1,worktreeCommitMessage:``,worktreeFileDiffs:{},commitFileDiffs:{},reflog:null,reflogLoading:!1,pendingMutation:!1,pendingCheckout:!1});try{let r=await Ht({path:e});if(i!==Ri)return;let a=r.githubUrl?Zt(r.repoId).catch(()=>null):Promise.resolve(null),[o,s,c,l,u,d]=await Promise.all([qt(r.repoId),mn(r.repoId,{repoId:r.repoId,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:mi,firstParent:!1,topoOrder:!0}),en(r.repoId),rn(r.repoId),Jt(r.repoId),Yt(r.repoId)]);if(i!==Ri)return;let f=o.find(e=>e.isCurrent)?.targetSha??r.head.sha,p=Bi(u,d!==null&&u.some(e=>e.name===d)?d:null);Ii(r.currentWorktreePath),Gi.clear(),qi(),t(e=>({status:`ready`,repoId:r.repoId,repoPath:r.currentWorktreePath,currentWorktreePath:r.currentWorktreePath,totalCommitCount:Math.max(r.totalCommitCount,s.rows.length),recentRepos:zi(n().recentRepos,r.currentWorktreePath),githubUrl:r.githubUrl,refs:o,remotes:u,selectedRemoteName:p,stashes:l,worktrees:c,historyWindow:s,commitAuthorAvatars:{},commitCIStatus:{},openError:null,selectedRefName:null,scrollToSha:f,scrollToKey:e.scrollToKey+1,mergePreview:null,worktreeChanges:null,worktreeSelected:!1,worktreeFileDiffs:{},commitFileDiffs:{},reflog:null,reflogMaxCount:300})),a.then(e=>{i===Ri&&n().repoId===r.repoId&&t({githubForkSuggestion:e})}),n().viewMode===`reflog`&&n().loadReflog(),n().loadWorktreeChanges()}catch(e){if(i!==Ri)return;let a=n().recentRepos;try{a=await Wt()}catch(e){console.error(`Failed to load recent repositories:`,e)}if(i!==Ri)return;t({status:`no-repo`,recentRepos:a,openError:r.showOpenError?e instanceof Error?e.message:`Failed to open repository`:null})}}var Hi=1e4,Ui=10*6e4,Wi=new Set([`success`,`failure`,`neutral`]),Gi=new Map,Ki=null;function qi(){Ki!==null&&(clearInterval(Ki),Ki=null)}function Ji(){Ki===null&&(Ki=setInterval(Xi,Hi))}function Yi(e){let{repoId:t}=I.getState();!t||e.length===0||bn(t,e).then(n=>{I.getState().repoId===t&&I.setState(t=>{let r={...t.commitCIStatus};for(let t of e){let e=n[t];r[t]=e?{state:e.state,runs:e.runs??[]}:{state:`none`,runs:[]}}return{commitCIStatus:r}})}).catch(e=>console.warn(`[CI] poll fetch failed`,e))}function Xi(){let{repoId:e,commitCIStatus:t}=I.getState();if(!e){qi();return}let n=Date.now(),r=new Set;for(let[e,i]of Gi){let a=t[e]?.state;n>i||a!==void 0&&Wi.has(a)?Gi.delete(e):r.add(e)}for(let[e,n]of Object.entries(t))n.state===`pending`&&r.add(e);if(r.size===0){qi();return}Yi([...r])}var Zi=new Set([`historyWindow`,`refs`,`worktreeChanges`,`showCommitMessages`]);function Qi(e){return Object.keys(e).some(e=>Zi.has(e))}var I=oe((e,t)=>{let n=t=>{e(e=>{let n=typeof t==`function`?t(e):t;if(!Qi(n))return n;let r={...e,...n};return{...n,graphModel:ti(r.historyWindow,r.refs,r.worktreeChanges,r.showCommitMessages)}})};return{...ni(),...ri(),...si(),...pi(),setShowCommitMessages:e=>{try{localStorage.setItem(`showCommitMessages`,String(e))}catch{}n({showCommitMessages:e})},setShowGutterColors:e=>{try{localStorage.setItem(`showGutterColors`,String(e))}catch{}n({showGutterColors:e})},setGraphZoom:e=>{let t=di(e);n({graphZoom:t})},setWorktreeCommitMessage:e=>n({worktreeCommitMessage:e}),reloadFromServer:async()=>{let{repoPath:e}=t(),r=t().repoId;if(!(!r||!e)&&!t().pendingMutation)try{let i,a,o,s,c,l;try{[i,a,o,s,c,l]=await Ai(r)}catch(t){if(F(t)||Vt(t)){let t=await Ht({path:e});r=t.repoId,n({repoId:r,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount});let u=await Ai(r);i=u[0],a=u[1],o=u[2],s=u[3],c=u[4],l=u[5]}else throw t}n(e=>({refs:i,remotes:l,selectedRemoteName:Bi(l,e.selectedRemoteName),stashes:c,selectedStashSha:e.selectedStashSha&&c.some(t=>t.sha===e.selectedStashSha)?e.selectedStashSha:null,stashDiff:e.selectedStashSha&&c.some(t=>t.sha===e.selectedStashSha)?e.stashDiff:null,stashFileDiffs:e.selectedStashSha&&c.some(t=>t.sha===e.selectedStashSha)?e.stashFileDiffs:{},worktrees:s,historyWindow:a,totalCommitCount:Math.max(e.totalCommitCount,a.rows.length),mergePreview:null,worktreeChanges:o,worktreeFileDiffs:{},worktreeSelected:Ci(o)>0||wi(o)>0&&e.worktreeSelected})),t().viewMode===`reflog`&&t().loadReflog()}catch(e){console.error(`Failed to reload repository state:`,e)}},loadWorktrees:async()=>{let{repoId:e}=t();if(e)try{let r=await en(e);t().repoId===e&&n({worktrees:r})}catch(e){console.error(`Failed to load linked worktrees:`,e)}},removeWorktree:async e=>{let{repoId:r}=t();if(!r)return!1;try{let i=await tn(r,e);return t().repoId===r&&n({worktrees:i.worktrees}),!0}catch(e){return t().showError(`Remove worktree failed`,e),!1}},selectRemote:async e=>{let{repoId:r,remotes:i,selectedRemoteName:a}=t();if(!(!r||!i.some(t=>t.name===e))){n({selectedRemoteName:e});try{await Xt(r,e)}catch(i){if(t().repoId===r&&t().selectedRemoteName===e){let e=Bi(t().remotes,a);n({selectedRemoteName:e})}t().showError(`Set default remote failed`,i)}}},addRemote:async(e,r)=>{let{repoId:i}=t();if(!i)return!1;try{let a=await Qt(i,e.trim(),r.trim());if(t().repoId===i){let e=Bi(a.remotes,t().selectedRemoteName);n(t=>({remotes:a.remotes,selectedRemoteName:e,githubForkSuggestion:t.githubForkSuggestion?.url===r.trim()?null:t.githubForkSuggestion}))}return!0}catch(e){return t().showError(`Add remote failed`,e),!1}},removeRemote:async e=>{let{repoId:r}=t();if(!r)return!1;try{let i=await $t(r,e);if(t().repoId===r){let e=Bi(i.remotes,t().selectedRemoteName);n(t=>({remotes:i.remotes,selectedRemoteName:e})),await t().reloadFromServer();let a=await Zt(r).catch(()=>null);t().repoId===r&&n({githubForkSuggestion:a})}return!0}catch(e){return t().showError(`Remove remote failed`,e),!1}},loadWorktreeChanges:async()=>{let{repoId:e}=t();if(e)try{let r=await nn(e);if(t().repoId!==e)return;n(e=>({worktreeChanges:r,worktreeFileDiffs:{},worktreeSelected:Ci(r)>0||wi(r)>0&&e.worktreeSelected}))}catch(e){console.error(`Failed to load worktree changes:`,e)}},createStash:async e=>{let{repoId:r}=t();if(!r||t().pendingMutation)return!1;n({pendingMutation:!0});try{let i=await xi(sn(r,e?.trim()||void 0),vi);return t().repoId===r?(n(e=>({pendingMutation:!1,stashes:i.stashes,worktreeChanges:i.changes,worktreeFileDiffs:{},worktreeSelected:wi(i.changes)>0&&e.worktreeSelected})),!0):!1}catch(e){return t().repoId===r&&n({pendingMutation:!1}),t().showError(`Stash failed`,e),!1}},applyStash:async e=>{let{repoId:r}=t();if(!r||t().pendingMutation)return!1;n({pendingMutation:!0});try{let i=await xi(cn(r,e),vi);return t().repoId===r?(n({pendingMutation:!1,stashes:i.stashes,selectedStashSha:null,stashDiff:null,stashFileDiffs:{},worktreeChanges:i.changes,worktreeFileDiffs:{},worktreeSelected:wi(i.changes)>0}),!0):!1}catch(e){try{let[e,i]=await Promise.all([rn(r),nn(r)]);t().repoId===r&&n({pendingMutation:!1,stashes:e,selectedStashSha:null,stashDiff:null,stashFileDiffs:{},worktreeChanges:i,worktreeFileDiffs:{},worktreeSelected:wi(i)>0})}catch{t().repoId===r&&n({pendingMutation:!1})}return t().showError(`Apply stash failed`,e),!1}},dropStash:async e=>{let{repoId:r}=t();if(!r||t().pendingMutation)return!1;n({pendingMutation:!0});try{let i=await xi(ln(r,e),vi);return t().repoId===r?(n(t=>({pendingMutation:!1,stashes:i.stashes,worktreeChanges:i.changes,selectedStashSha:t.selectedStashSha===e?null:t.selectedStashSha,stashDiff:t.selectedStashSha===e?null:t.stashDiff,stashFileDiffs:t.selectedStashSha===e?{}:t.stashFileDiffs})),!0):!1}catch(e){return t().repoId===r&&n({pendingMutation:!1}),t().showError(`Drop stash failed`,e),!1}},selectStash:e=>{let{repoId:r}=t();n({selectedStashSha:e,stashDiff:null,stashFileDiffs:{},worktreeSelected:!1,selectedSha:null,selectedRefName:null,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}),r&&an(r,e).then(i=>{t().repoId===r&&t().selectedStashSha===e&&n({stashDiff:i})}).catch(n=>{t().repoId===r&&t().selectedStashSha===e&&t().showError(`Load stash details failed`,n)})},loadStashFileDiff:async(e,r)=>{let{repoId:i}=t();if(!i)return;let a=oi(e,r.path),o=t().stashFileDiffs[a];if(!(o&&(o.loading||o.patchText!==void 0))){n(e=>({stashFileDiffs:{...e.stashFileDiffs,[a]:{loading:!0}}}));try{let o=await on(i,e,r.path,r.oldPath);if(t().repoId!==i||t().selectedStashSha!==e)return;n(e=>({stashFileDiffs:{...e.stashFileDiffs,[a]:{loading:!1,patchText:o.patchText,isBinary:o.isBinary,imageDiff:o.imageDiff}}}))}catch(r){if(t().repoId!==i||t().selectedStashSha!==e)return;n(e=>({stashFileDiffs:{...e.stashFileDiffs,[a]:{loading:!1,error:r instanceof Error?r.message:`Failed to load diff`}}}))}}},loadWorktreeFileDiff:async(e,r)=>{let{repoId:i}=t();if(!i)return;let a=ii(r,e.path),o=t().worktreeFileDiffs[a];if(!(o&&(o.loading||o.patchText!==void 0))){n(e=>({worktreeFileDiffs:{...e.worktreeFileDiffs,[a]:{loading:!0}}}));try{let t=await fn(i,e.path,r,e.oldPath);n(e=>({worktreeFileDiffs:{...e.worktreeFileDiffs,[a]:{loading:!1,patchText:t.patchText,isBinary:t.isBinary,imageDiff:t.imageDiff}}}))}catch(e){n(t=>({worktreeFileDiffs:{...t.worktreeFileDiffs,[a]:{loading:!1,error:e instanceof Error?e.message:`Failed to load diff`}}}))}}},loadCommitFileDiff:async(e,r)=>{let{repoId:i}=t();if(!i)return;let a=ai(e,r.path),o=t().commitFileDiffs[a];if(!(o&&(o.loading||o.patchText!==void 0))){n(e=>({commitFileDiffs:{...e.commitFileDiffs,[a]:{loading:!0}}}));try{let t=await vn(i,e,r.path,r.oldPath);n(e=>({commitFileDiffs:{...e.commitFileDiffs,[a]:{loading:!1,patchText:t.patchText,isBinary:t.isBinary,imageDiff:t.imageDiff}}}))}catch(e){n(t=>({commitFileDiffs:{...t.commitFileDiffs,[a]:{loading:!1,error:e instanceof Error?e.message:`Failed to load diff`}}}))}}},performCommit:async(e,r,i=!1)=>{let{repoPath:a}=t(),o=t().repoId;if(!o||!a||t().pendingMutation)return!1;let s=Ei(t()),c=s.historyWindow?.rows??[],l=e.split(`
|
|
10
|
-
`)[0],u=i?yr(c,s.refs,l):vr(c,s.refs,l,`commit`),d=t().worktreeChanges,f=t().worktreeFileDiffs,p=d?er(d,u?.headSha??d.headSha):null;n(u?{pendingMutation:!0,refs:u.refs,historyWindow:Di(s.historyWindow,u.rows),worktreeChanges:p,worktreeFileDiffs:{}}:{pendingMutation:!0,worktreeChanges:p,worktreeFileDiffs:{}});let m;try{m=await xi((async()=>{try{return await pn(o,e,r,i)}catch(t){if(F(t)){let t=await Ht({path:a});return o=t.repoId,n({repoId:o,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await pn(o,e,r,i)}throw t}})(),yi)}catch(e){return n({...s,pendingMutation:!1,worktreeChanges:d,worktreeFileDiffs:f}),t().showError(`Commit failed`,e),!1}let[h,g]=await Oi(o);return n(e=>({pendingMutation:!1,graphAnimationSuppressToken:u?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:h,historyWindow:g,totalCommitCount:Math.max(i?e.totalCommitCount:e.totalCommitCount+1,g.rows.length),worktreeChanges:m.changes,worktreeFileDiffs:{}})),t().viewMode===`reflog`&&t().loadReflog(),!0},selectWorktree:()=>{n({worktreeSelected:!0,selectedStashSha:null,stashDiff:null,stashFileDiffs:{},selectedSha:null,selectedRefName:null,commitDetail:null,commitDiff:null,commitPRs:[],mergePreview:null,commitFileDiffs:{}}),t().loadWorktreeChanges()},runStageAction:async(e,r)=>{let{repoPath:i}=t(),a=t().repoId;if(!a||!i)return!1;try{let t;try{t=await un(a,e,r)}catch(o){if(!F(o)&&!Vt(o))throw o;let s=await Ht({path:i});a=s.repoId,n({repoId:a,githubUrl:s.githubUrl,totalCommitCount:s.totalCommitCount}),t=await un(a,e,r)}return n({worktreeChanges:t,worktreeFileDiffs:{}}),!0}catch(n){return t().showError(e.startsWith(`discard`)?`Discard changes failed`:`Staging action failed`,n),!1}},setViewMode:e=>{n({viewMode:e}),e===`reflog`&&!t().reflog&&t().loadReflog()},loadReflog:async()=>{let{repoPath:e,reflogMaxCount:r}=t(),i=t().repoId;if(!(!i||!e)){n({reflogLoading:!0});try{let t;try{t=await On(i,`HEAD`,r)}catch(a){if(F(a)||Vt(a)){let a=await Ht({path:e});i=a.repoId,n({repoId:i,githubUrl:a.githubUrl,totalCommitCount:a.totalCommitCount}),t=await On(i,`HEAD`,r)}else throw a}n({reflog:t})}catch(e){console.error(`Failed to load reflog:`,e),t().showError(`Failed to load reflog`,e)}finally{n({reflogLoading:!1})}}},loadMoreReflog:async()=>{t().reflogLoading||(n({reflogMaxCount:t().reflogMaxCount+300}),await t().loadReflog())},recoverBranch:async(e,r)=>{await t().performRefAction(`create`,e,r),n({selectedSha:r}),t().loadReflog()},fetchCommitCIStatusesIfNeeded:e=>{let{repoId:r,commitCIStatus:i}=t();if(!r)return;let a=e.filter(e=>!Si(e)&&i[e]===void 0);a.length!==0&&(n(e=>{let t={...e.commitCIStatus};for(let e of a)t[e]={state:`loading`,runs:[]};return{commitCIStatus:t}}),bn(r,a).then(e=>{n(t=>{let n={...t.commitCIStatus};for(let t of a){let r=e[t];n[t]=r?{state:r.state,runs:r.runs??[]}:{state:`none`,runs:[]}}return{commitCIStatus:n}})}).catch(e=>{console.warn(`[CI] batch fetch failed`,e),n(e=>{let t={...e.commitCIStatus};for(let e of a)t[e]={state:`none`,runs:[]};return{commitCIStatus:t}})}))},watchCommitCIStatus:e=>{Gi.set(e,Date.now()+Ui),Yi([e]),Ji()},showError:(e,t,r)=>{let i=t instanceof Error?t.message:typeof t==`string`?t:`Unknown error`;n({errorDialog:{title:e,message:i,action:r}})},dismissError:()=>n({errorDialog:null}),openRepoByPath:async e=>{await Vi(e,n,t,{showOpenError:!0})},closeRepo:()=>{Ri+=1,Gi.clear(),qi(),Li(),n({status:`no-repo`,repoId:null,repoPath:null,currentWorktreePath:null,totalCommitCount:0,refs:[],remotes:[],selectedRemoteName:null,githubForkSuggestion:null,stashes:[],selectedStashSha:null,stashDiff:null,stashFileDiffs:{},worktrees:[],historyWindow:null,selectedSha:null,selectedRefName:null,scrollToSha:null,commitDetail:null,commitDiff:null,commitPRs:[],commitAuthorAvatars:{},mergePreview:null,githubUrl:null,openError:null,loadingMore:!1,commitCIStatus:{},worktreeChanges:null,worktreeSelected:!1,worktreeCommitMessage:``,worktreeFileDiffs:{},commitFileDiffs:{},pendingMutation:!1,pendingCheckout:!1,reflog:null,reflogLoading:!1,reflogMaxCount:300,viewMode:`history`})},loadRecentRepos:async()=>{try{n({recentRepos:await Wt()})}catch(e){console.error(`Failed to load recent repositories:`,e)}},loadDiscoveredRepos:async e=>{try{let{folder:t,repos:r}=await Gt(e);n({discoveredFolder:t,discoveredRepos:r})}catch(e){console.error(`Failed to discover repositories:`,e)}},openFromUrl:()=>{let e=Fi();t().loadRecentRepos(),t().loadDiscoveredRepos(),!(e&&e===t().repoPath)&&(e?t().openRepoByPath(e):Vi(`.`,n,t,{showOpenError:!1}))},selectCommit:e=>{n({selectedSha:e,selectedStashSha:null,stashDiff:null,stashFileDiffs:{},worktreeSelected:!1,scrollToSha:null,scrollToKey:t().scrollToKey,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{}});let{repoId:r,githubUrl:i}=t();r&&(t().fetchCommitCIStatusesIfNeeded([e]),Promise.all([hn(r,e),_n(r,e)]).then(([r,i])=>{t().selectedSha===e&&n({commitDetail:r,commitDiff:i})}).catch(e=>console.error(`Failed to load commit detail:`,e)),i&&(Mi(r,e),yn(r,e).then(r=>{t().selectedSha===e&&n({commitPRs:r})}).catch(()=>{})))},selectRef:e=>{t().selectCommit(e.targetSha)},selectGraphRef:e=>{let{repoId:r}=t();n({selectedSha:null,selectedStashSha:null,stashDiff:null,stashFileDiffs:{},worktreeSelected:!1,selectedRefName:e,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}),r&&Sn(r,e).then(r=>{t().selectedRefName===e&&n({mergePreview:r})}).catch(()=>{})},clearGraphRefSelection:()=>{n({selectedSha:null,selectedStashSha:null,stashDiff:null,stashFileDiffs:{},worktreeSelected:!1,selectedRefName:null,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})},ensureMergePreview:async e=>{let{repoId:r,mergePreview:i}=t();if(!r)return null;if(i?.sourceRefName===e)return i;let a=await Sn(r,e);return t().selectedRefName===e&&n({mergePreview:a}),a},navigateTo:async e=>{let{historyWindow:r,repoId:i}=t();if(r?.rows.some(t=>t.sha===e))n(t=>({viewMode:`history`,selectedSha:e,selectedStashSha:null,stashDiff:null,stashFileDiffs:{},selectedRefName:null,worktreeSelected:!1,scrollToSha:e,scrollToKey:t.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}));else if(i){let r=!1,a=t().historyWindow?.rows.length??hi;for(let t=0;t<3&&!r;t++){a=Math.min(a*3,1e4);try{let t=await mn(i,{repoId:i,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:a,firstParent:!1,topoOrder:!0});if(r=t.rows.some(t=>t.sha===e||t.sha.startsWith(e)),n(n=>({viewMode:`history`,historyWindow:r?t:Tr(n.historyWindow,t),selectedSha:e,selectedStashSha:null,stashDiff:null,stashFileDiffs:{},selectedRefName:null,worktreeSelected:!1,scrollToSha:r?e:null,scrollToKey:r?n.scrollToKey+1:n.scrollToKey,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),!r&&!t.hasMoreAfter)break}catch(e){console.error(`Failed to load history for navigation:`,e);break}}if(!r)try{let t=await mn(i,{repoId:i,scope:{kind:`all`},anchor:{kind:`sha`,value:e},beforeRows:0,afterRows:hi,firstParent:!1,topoOrder:!0});r=t.rows.some(t=>t.sha===e||t.sha.startsWith(e)),r&&n(n=>({viewMode:`history`,historyWindow:t,selectedSha:e,selectedStashSha:null,stashDiff:null,stashFileDiffs:{},selectedRefName:null,worktreeSelected:!1,scrollToSha:e,scrollToKey:n.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}))}catch(e){console.error(`Failed to load history anchored at commit:`,e)}r||console.warn(`Commit ${e} not found in history`)}let{repoId:a}=t();a&&(t().fetchCommitCIStatusesIfNeeded([e]),Mi(a,e),Promise.all([hn(a,e),_n(a,e)]).then(([r,i])=>{t().selectedSha===e&&n({commitDetail:r,commitDiff:i})}).catch(()=>{}))},requestMore:async e=>{let{repoId:r,historyWindow:i,loadingMore:a}=t();if(!(!r||!i||a)&&!(e===`down`&&!i.hasMoreAfter)){n({loadingMore:!0});try{let e=await mn(r,{repoId:r,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:i.rows.length+gi,firstParent:!1,topoOrder:!0});n(t=>({historyWindow:Tr(t.historyWindow,e)}))}catch(e){console.error(`Failed to load more history:`,e)}finally{n({loadingMore:!1})}}},performRefAction:async(e,r,i,a)=>{let{repoPath:o}=t(),s=t().repoId;if(!s||!o||t().pendingMutation)return;let c=e===`push`||e===`fetch`?t().selectedRemoteName??void 0:void 0,l=Ei(t()),u=l.historyWindow?.rows??[],d=null;e===`checkout`?d=pr(u,l.refs,r,i):(e===`move`||e===`reset`)&&(d=mr(u,l.refs,r,i));let f=e===`checkout`?d?.refs.find(e=>e.kind===`head`&&e.isCurrent)?.shortName??null:null,p=e===`checkout`&&l.worktreeChanges?tr(l.worktreeChanges,i,f):l.worktreeChanges;n(d?{pendingMutation:!0,...e===`checkout`?{pendingCheckout:!0,worktreeChanges:p}:{},refs:d.refs,historyWindow:Di(l.historyWindow,d.rows),mergePreview:null,...e===`move`?{selectedRefName:r,selectedSha:i,scrollToSha:null,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{}}:{selectedRefName:null}}:{pendingMutation:!0,...e===`checkout`?{pendingCheckout:!0,worktreeChanges:p}:{}});try{await xi((async()=>{try{await Dn(s,e,r,i,a,c)}catch(t){if(e!==`checkout`&&(F(t)||Vt(t))){let t=await Ht({path:o});s=t.repoId,n({repoId:s,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await Dn(s,e,r,i,a,c)}else throw t}})(),vi)}catch(t){if(e===`checkout`)try{if(F(t)||Vt(t)){let e=await Ht({path:o});s=e.repoId,n({repoId:s,githubUrl:e.githubUrl,totalCommitCount:e.totalCommitCount})}let[e,r,i,a,c,u]=await Ai(s),d=l.refs.find(e=>e.kind===`head`&&e.isCurrent),f=e.find(e=>e.kind===`head`&&e.isCurrent),p=f?.shortName!==d?.shortName||f?.targetSha!==d?.targetSha,m=f?.targetSha??i.headSha;n(t=>({...p?{selectedSha:m,selectedRefName:null,scrollToSha:m,scrollToKey:t.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}:l,pendingMutation:!1,pendingCheckout:!1,refs:e,remotes:u,stashes:c,worktrees:a,historyWindow:r,totalCommitCount:Math.max(t.totalCommitCount,r.rows.length),worktreeChanges:i,worktreeFileDiffs:{},worktreeSelected:wi(i)>0?p||t.worktreeSelected:!1})),p&&ji(s,m)}catch{n({...l,pendingMutation:!1,pendingCheckout:!1})}else n({...l,pendingMutation:!1});throw t}if(e===`checkout`){let[e,r,i,a]=await ki(s);n(t=>({pendingMutation:!1,pendingCheckout:!1,graphAnimationSuppressToken:d?t.graphAnimationSuppressToken+1:t.graphAnimationSuppressToken,refs:e,historyWindow:r,totalCommitCount:Math.max(t.totalCommitCount,r.rows.length),worktreeChanges:i,worktreeFileDiffs:{},worktreeSelected:Ci(i)>0||wi(i)>0&&t.worktreeSelected,worktrees:a,selectedRefName:null,mergePreview:null})),t().viewMode===`reflog`&&t().loadReflog();return}let[m,h]=await Oi(s);if(t().loadWorktreeChanges(),t().loadWorktrees(),e===`fetch`){let e=Ni(m),r=e&&Pi(h,e)?e:null;n(e=>({pendingMutation:!1,refs:m,historyWindow:h,totalCommitCount:Math.max(e.totalCommitCount,h.rows.length),selectedSha:r??e.selectedSha,selectedRefName:null,scrollToSha:r??e.scrollToSha,scrollToKey:r?e.scrollToKey+1:e.scrollToKey,commitDetail:r?null:e.commitDetail,commitDiff:r?null:e.commitDiff,commitPRs:r?[]:e.commitPRs,commitFileDiffs:r?{}:e.commitFileDiffs,mergePreview:null})),r&&ji(s,r),t().viewMode===`reflog`&&t().loadReflog();return}if(e===`move`){n(e=>({pendingMutation:!1,graphAnimationSuppressToken:d?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:m,historyWindow:h,selectedRefName:r,selectedSha:i,scrollToSha:null,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),ji(s,i);return}if(e===`push`&&t().watchCommitCIStatus(i),e===`create`||e===`create-tag`){n(e=>({pendingMutation:!1,graphAnimationSuppressToken:d?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:m,historyWindow:h,selectedRefName:r,selectedSha:i,scrollToSha:null,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),ji(s,i);return}n(e=>({pendingMutation:!1,pendingCheckout:!1,graphAnimationSuppressToken:d?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:m,historyWindow:h,selectedRefName:null,mergePreview:null}))},performCommitAction:async(e,r,i)=>{let{repoPath:a}=t(),o=t().repoId;if(!o||!a||t().pendingMutation)return;let s=Ei(t()),c=s.historyWindow?.rows??[],l=null;if(e===`uncommit`)l=hr(c,s.refs,r);else if(e===`squash`)l=_r(c,s.refs,r,i??``);else{let t=c.find(e=>e.sha===r),n=e===`revert`?`Revert "${t?.subject??r.slice(0,8)}"`:t?.subject??r.slice(0,8);l=vr(c,s.refs,n,e)}Ti(n,s,l);let u;try{u=await xi((async()=>{try{return await xn(o,e,r,i)}catch(t){if(F(t)){let t=await Ht({path:a});return o=t.repoId,n({repoId:o,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await xn(o,e,r,i)}throw t}})(),vi)}catch(e){throw n({...s,pendingMutation:!1}),e}let[d,f]=await Oi(o),p=u.headSha,m=e===`squash`?gr(c,s.refs,r)?.length??1:0,h=e===`uncommit`?-1:e===`squash`?1-m:1;n(e=>({pendingMutation:!1,graphAnimationSuppressToken:l?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:d,historyWindow:f,totalCommitCount:Math.max(e.totalCommitCount+h,f.rows.length),selectedSha:p,selectedRefName:null,scrollToSha:p,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),ji(o,p),t().loadWorktreeChanges(),t().viewMode===`reflog`&&t().loadReflog()},performMergeRef:async e=>{let{repoPath:r}=t(),i=t().repoId;if(!i||!r||t().pendingMutation)return;let a=Ei(t()),o=br(a.historyWindow?.rows??[],a.refs,e),s=a.refs.find(e=>e.kind===`head`&&e.isCurrent)?.shortName;Ti(n,a,o,s);let c;try{c=await xi((async()=>{try{return await Cn(i,e)}catch(t){if(F(t)){let t=await Ht({path:r});return i=t.repoId,n({repoId:i,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await Cn(i,e)}throw t}})(),vi)}catch(e){let t=null;try{t=await nn(i)}catch(e){console.error(`Failed to load worktree after failed merge:`,e)}throw n({...a,pendingMutation:!1,...t?{worktreeChanges:t,worktreeFileDiffs:{},worktreeSelected:Ci(t)>0}:{}}),e}let[l,u]=await Oi(i),d=c.headSha,f=l.find(e=>e.kind===`head`&&e.isCurrent)?.shortName??s;n(e=>({pendingMutation:!1,graphAnimationSuppressToken:o?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:l,historyWindow:u,totalCommitCount:Math.max(e.totalCommitCount+1,u.rows.length),selectedSha:f?null:d,selectedRefName:f??null,scrollToSha:d,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),f||ji(i,d),t().loadWorktreeChanges()},performRebaseRef:async e=>{let{repoPath:r}=t(),i=t().repoId;if(!i||!r||t().pendingMutation)return;let a=Ei(t()),o=xr(a.historyWindow?.rows??[],a.refs,e);Ti(n,a,o);let s;try{s=await xi((async()=>{try{return await wn(i,e)}catch(t){if(F(t)){let t=await Ht({path:r});return i=t.repoId,n({repoId:i,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await wn(i,e)}throw t}})(),vi)}catch(e){let t=null,r=null,o=null;try{[t,r,o]=await Promise.all([qt(i),mn(i,{repoId:i,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:hi,firstParent:!1,topoOrder:!0}),nn(i)])}catch(e){console.error(`Failed to load graph after failed rebase:`,e)}throw n(e=>!t||!r?{...a,pendingMutation:!1,...o?{worktreeChanges:o,worktreeFileDiffs:{},worktreeSelected:Ci(o)>0}:{}}:{pendingMutation:!1,refs:t,historyWindow:r,totalCommitCount:Math.max(e.totalCommitCount,r.rows.length),selectedSha:null,selectedRefName:null,scrollToSha:o?.headSha??null,scrollToKey:o?e.scrollToKey+1:e.scrollToKey,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null,worktreeChanges:o,worktreeFileDiffs:{},worktreeSelected:o?Ci(o)>0:e.worktreeSelected}),e}let[c,l]=await Oi(i),u=s.headSha;n(e=>({pendingMutation:!1,graphAnimationSuppressToken:o?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:c,historyWindow:l,totalCommitCount:Math.max(e.totalCommitCount,l.rows.length),selectedSha:u,selectedRefName:null,scrollToSha:u,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),ji(i,u),t().loadWorktreeChanges()},abortInProgressOperation:async e=>{let{repoPath:r}=t(),i=t().repoId;if(!(!i||!r)&&!t().pendingMutation){n({pendingMutation:!0});try{let a;try{a=await Tn(i,e)}catch(t){if(F(t)){let t=await Ht({path:r});i=t.repoId,n({repoId:i,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),a=await Tn(i,e)}else throw t}let[o,s]=await Oi(i),c=a.headSha;n(e=>({pendingMutation:!1,refs:o,historyWindow:s,totalCommitCount:Math.max(e.totalCommitCount,s.rows.length),selectedSha:c,selectedRefName:null,scrollToSha:c,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null,worktreeChanges:a.changes,worktreeFileDiffs:{},worktreeSelected:wi(a.changes)>0})),ji(i,c),t().viewMode===`reflog`&&t().loadReflog()}catch(r){n({pendingMutation:!1}),t().showError(`Abort ${e} failed`,r)}}},continueInProgressOperation:async e=>{let{repoPath:r}=t(),i=t().repoId;if(!(!i||!r)&&!t().pendingMutation){n({pendingMutation:!0});try{let a;try{a=await En(i,e)}catch(t){if(F(t)){let t=await Ht({path:r});i=t.repoId,n({repoId:i,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),a=await En(i,e)}else throw t}let[o,s]=await Oi(i),c=a.headSha;n(e=>({pendingMutation:!1,refs:o,historyWindow:s,totalCommitCount:Math.max(e.totalCommitCount,s.rows.length),selectedSha:c,selectedRefName:null,scrollToSha:c,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null,worktreeChanges:a.changes,worktreeFileDiffs:{},worktreeSelected:wi(a.changes)>0})),ji(i,c),t().viewMode===`reflog`&&t().loadReflog()}catch(r){let a=null,o=null,s=null;try{[a,o,s]=await Promise.all([qt(i),mn(i,{repoId:i,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:hi,firstParent:!1,topoOrder:!0}),nn(i)])}catch(e){console.error(`Failed to reload state after failed continue:`,e)}n(e=>({pendingMutation:!1,...a&&o?{refs:a,historyWindow:o,totalCommitCount:Math.max(e.totalCommitCount,o.rows.length)}:{},...s?{worktreeChanges:s,worktreeFileDiffs:{},worktreeSelected:Ci(s)>0||e.worktreeSelected}:{}})),t().showError(`Continue ${e} failed`,r)}}},checkoutSha:async e=>{let{repoPath:r}=t(),i=t().repoId;if(!i||!r||t().pendingMutation)return;let a=Ei(t()),o=pr(a.historyWindow?.rows??[],a.refs,null,e),s=a.worktreeChanges?tr(a.worktreeChanges,e,null):null;n(o?{pendingMutation:!0,pendingCheckout:!0,refs:o.refs,historyWindow:Di(a.historyWindow,o.rows),worktreeChanges:s,selectedRefName:null,mergePreview:null}:{pendingMutation:!0,pendingCheckout:!0,worktreeChanges:s});try{await xi((async()=>{try{await Dn(i,`checkout`,e,e)}catch(t){if(F(t))i=(await Ht({path:r})).repoId,n({repoId:i}),await Dn(i,`checkout`,e,e);else throw t}})(),vi)}catch(e){throw n({...a,pendingMutation:!1,pendingCheckout:!1}),e}let[c,l,u,d]=await ki(i);n(e=>({pendingMutation:!1,pendingCheckout:!1,graphAnimationSuppressToken:o?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:c,historyWindow:l,totalCommitCount:Math.max(e.totalCommitCount,l.rows.length),worktreeChanges:u,worktreeFileDiffs:{},worktreeSelected:Ci(u)>0||wi(u)>0&&e.worktreeSelected,worktrees:d,selectedRefName:null,mergePreview:null})),t().viewMode===`reflog`&&t().loadReflog()}}}),$i=5e3;function ea(e){let t=[],n=new Map;for(let r of e){if(r.kind!==`ide`){t.push({...r,count:1});continue}let e=`${r.agent}\0${r.ide}\0${r.cwd}`,i=n.get(e);if(i)i.count+=1;else{let i={...r,count:1};n.set(e,i),t.push(i)}}return t}function ta(e,t=e=>e.cwd){let n=new Map;for(let r of ea(e)){let e=t(r),i=n.get(e);i||(i={cwd:e,sessions:[]},n.set(e,i)),i.sessions.push(r)}return[...n.values()]}function na(e){return e.kind===`ide`?e.ide??`ide`:e.kind===`terminal`?e.tty?.replace(`/dev/`,``)??`terminal`:`background`}function ra(){let[e,t]=(0,b.useState)([]),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(!1),c=I(e=>e.showError),l=(0,b.useCallback)(async()=>{let e=await kn();t(e.sessions),r(e.capabilities)},[]);return(0,b.useEffect)(()=>{let e=!1,n=()=>{kn().then(n=>{e||(t(n.sessions),r(n.capabilities))}).catch(()=>{})};n();let i=setInterval(n,$i);return()=>{e=!0,clearInterval(i)}},[]),{sessions:e,capabilities:n,focusingPid:i,installing:o,focus:(0,b.useCallback)(async e=>{a(e.pid),console.info(`[agent-focus] click`,{pid:e.pid,cwd:e.cwd,tty:e.tty,kind:e.kind});try{let t=await An(e.pid,e.cwd);return console.info(`[agent-focus] response`,t),t.ok?!0:(c(`Could not focus agent session`,t.error??`Unknown error`),!1)}catch(e){return console.error(`[agent-focus] request failed`,e),c(`Could not focus agent session`,e),!1}finally{a(null)}},[c]),install:(0,b.useCallback)(async()=>{s(!0);try{let e=await jn();if(!e.ok){c(`Extension install failed`,e.error??`Unknown error`);return}await l().catch(()=>{})}catch(e){c(`Extension install failed`,e)}finally{s(!1)}},[l,c]),canInstallWindowCalls:n?.canInstallWindowCalls===!0&&!n.canFocusTerminals&&e.some(e=>e.kind===`terminal`)}}var ia=`#D97757`,aa=[[12,6.6],[16.2,8.6],[17.3,13.2],[14.3,16.9],[9.7,16.9],[6.7,13.2],[7.8,8.6]];function oa({agent:e,size:t=12,busy:n=!1}){let r=(0,b.useId)(),i={width:t,height:t,style:{flexShrink:0,animation:n?`agent-icon-pulse 1.2s ease-in-out infinite`:void 0},"aria-label":e,role:`img`};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`style`,{children:`@keyframes agent-icon-pulse { 50% { opacity: 0.25; } }`}),e===`claude`?(0,y.jsx)(`svg`,{viewBox:`0 0 24 24`,...i,children:(0,y.jsxs)(`g`,{stroke:ia,strokeWidth:`2.8`,strokeLinecap:`round`,children:[(0,y.jsx)(`line`,{x1:`12`,y1:`2.5`,x2:`12`,y2:`21.5`}),(0,y.jsx)(`line`,{x1:`2.5`,y1:`12`,x2:`21.5`,y2:`12`}),(0,y.jsx)(`line`,{x1:`5.3`,y1:`5.3`,x2:`18.7`,y2:`18.7`}),(0,y.jsx)(`line`,{x1:`18.7`,y1:`5.3`,x2:`5.3`,y2:`18.7`})]})}):(0,y.jsxs)(`svg`,{viewBox:`0 0 24 24`,...i,children:[(0,y.jsx)(`defs`,{children:(0,y.jsxs)(`linearGradient`,{id:r,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,y.jsx)(`stop`,{offset:`0`,stopColor:`#9a86ee`}),(0,y.jsx)(`stop`,{offset:`1`,stopColor:`#3d31ee`})]})}),(0,y.jsxs)(`g`,{fill:`url(#${r})`,children:[aa.map(([e,t])=>(0,y.jsx)(`circle`,{cx:e,cy:t,r:5},`${e}-${t}`)),(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`6.5`})]}),(0,y.jsxs)(`g`,{stroke:`#fff`,strokeWidth:`2.1`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`,children:[(0,y.jsx)(`path`,{d:`M8.8 9 L11.8 12 L8.8 15`}),(0,y.jsx)(`line`,{x1:`13.4`,y1:`15`,x2:`16.8`,y2:`15`})]})]})]})}var sa=8;function ca(e){return e.replace(/[\\/]+$/,``).split(/[\\/]/).filter(Boolean).pop()??e}function la(e){return e.replace(/[^a-z0-9_-]/gi,`_`)}function ua(e){if(e.trim().length===0)return null;let t=e.lastIndexOf(`/`),n=e.lastIndexOf(`\\`),r=Math.max(t,n);if(r===-1)return{folder:`.`,prefix:e};let i=e.slice(r+1),a=e[r],o=e.slice(0,r);return/^[A-Za-z]:$/.test(o)&&(o+=a),o||=e.startsWith(`/`)||e.startsWith(`\\`)?a:`.`,{folder:o,prefix:i}}function da(e){let t=e.replace(/[\\/]+$/,``)||e,n=t.includes(`\\`)&&!t.includes(`/`)?`\\`:`/`;if(/^[A-Za-z]:[\\/]/.test(t)){let e=`${t.slice(0,2)}${n}`,r=[{label:e,path:e}],i=e;for(let e of t.slice(3).split(/[\\/]+/).filter(Boolean))i=i.endsWith(n)?`${i}${e}`:`${i}${n}${e}`,r.push({label:e,path:i});return r}if(t.startsWith(`/`)||t.startsWith(`\\`)){let e=[{label:`/`,path:`/`}],n=``;for(let r of t.split(/[\\/]+/).filter(Boolean))n=`${n}/${r}`,e.push({label:r,path:n});return e}let r=``;return t.split(/[\\/]+/).filter(Boolean).map(e=>(r=r?`${r}${n}${e}`:e,{label:e,path:r}))}function fa({onOpen:e,error:t,recentRepos:n,discoveredFolder:r,discoveredRepos:i=[]}){let{sessions:a,focusingPid:o,focus:s}=ra(),[c,l]=(0,b.useState)(``),[u,d]=(0,b.useState)(null),[f,p]=(0,b.useState)({}),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(!1),[v,x]=(0,b.useState)(!1),[S,C]=(0,b.useState)([]),[w,T]=(0,b.useState)(0),ee=(0,b.useCallback)(async(e,t)=>{e&&p(t=>({...t,[e]:{...t[e],expanded:!0,loading:!0,error:void 0}}));try{let n=await Kt(e);p(e=>({...e,[n.path]:{listing:n,expanded:!0,loading:!1,error:n.error}})),(!e||t?.makeRoot)&&d(n.path)}catch(t){let n=t instanceof Error?t.message:`Unable to read directory`;e&&p(t=>({...t,[e]:{...t[e],expanded:!0,loading:!1,error:n}}))}},[]);(0,b.useEffect)(()=>{ee(void 0,{makeRoot:!0})},[ee]),(0,b.useEffect)(()=>{if(!m){_(!1),x(!1);return}let e=ua(c);if(!e){C([]),_(!1),x(!1);return}let t=!1,n=window.setTimeout(()=>{x(!0),Kt(e.folder).then(n=>{if(t)return;let r=e.prefix.toLowerCase(),i=n.entries.filter(e=>r.length===0||e.name.toLowerCase().startsWith(r)).slice(0,sa);C(i),T(0),_(m&&i.length>0)}).catch(()=>{t||(C([]),_(!1))}).finally(()=>{t||x(!1)})},120);return()=>{t=!0,window.clearTimeout(n)}},[c,m]);function E(t){t.preventDefault();let n=c.trim();n&&e(n)}function te(e){l(e.path),_(!1),T(0)}function ne(e){if(!g||S.length===0){e.key===`Escape`&&_(!1);return}if(e.key===`ArrowDown`){e.preventDefault(),T(e=>(e+1)%S.length);return}if(e.key===`ArrowUp`){e.preventDefault(),T(e=>(e-1+S.length)%S.length);return}if(e.key===`Tab`||e.key===`Enter`){e.preventDefault(),te(S[w]);return}e.key===`Escape`&&(e.preventDefault(),_(!1))}function re(e){let t=f[e.path];if(t?.expanded){p(n=>({...n,[e.path]:{...t,expanded:!1}}));return}if(t?.listing){p(n=>({...n,[e.path]:{...t,expanded:!0}}));return}ee(e.path)}function ie(t,n){let r=f[t],i=r?.listing?.entries??[];return r?.error?(0,y.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:34+n*18},children:r.error}):!r?.loading&&i.length===0?(0,y.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:34+n*18},children:`No folders`}):i.map(t=>{let r=f[t.path],i=r?.expanded??!1,a=r?.loading??!1;return(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{className:`repo-open-tree-row${t.isGitRepo?` repo-open-tree-row-repo`:``}`,onClick:()=>l(t.path),onDoubleClick:()=>{t.isGitRepo&&e(t.path)},style:{paddingLeft:10+n*18},children:[(0,y.jsx)(`button`,{type:`button`,className:`repo-open-expand`,onClick:e=>{e.stopPropagation(),re(t)},"aria-label":i?`Collapse ${t.name}`:`Expand ${t.name}`,"aria-controls":`folder-${la(t.path)}`,title:i?`Collapse`:`Expand`,children:a?`...`:i?`-`:`+`}),(0,y.jsx)(`span`,{className:`repo-open-folder-name`,children:t.name}),t.isGitRepo&&(0,y.jsx)(`span`,{className:`repo-open-repo-badge`,children:`repo`}),t.isGitRepo&&(0,y.jsx)(`button`,{type:`button`,className:`repo-open-row-action`,onClick:n=>{n.stopPropagation(),e(t.path)},children:`Open`})]}),i&&(0,y.jsx)(`div`,{id:`folder-${la(t.path)}`,children:r?.loading?(0,y.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:34+(n+1)*18},children:`Loading...`}):ie(t.path,n+1)})]},t.path)})}let ae=ta(a.filter(e=>e.gitRoot!==null),e=>e.gitRoot),oe=u?f[u]?.listing:null,se=!u||f[u]?.loading,ce=m&&(v||g&&S.length>0);return(0,y.jsxs)(`div`,{className:`repo-open-page`,children:[(0,y.jsx)(`style`,{children:`
|
|
11
|
-
.repo-open-page {
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
height: 100%;
|
|
16
|
-
width: 100%;
|
|
17
|
-
background: #171820;
|
|
18
|
-
color: #d7dae5;
|
|
19
|
-
padding: 24px;
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.repo-open-stack {
|
|
24
|
-
width: min(1360px, 100%);
|
|
25
|
-
max-height: 100%;
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
gap: 16px;
|
|
29
|
-
min-height: 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.repo-open-agents-card {
|
|
33
|
-
flex-shrink: 0;
|
|
34
|
-
max-height: 42%;
|
|
35
|
-
overflow: auto;
|
|
36
|
-
overscroll-behavior: contain;
|
|
37
|
-
background: linear-gradient(180deg, #262a3a 0%, #222430 100%);
|
|
38
|
-
border: 1px solid #4a5366;
|
|
39
|
-
border-radius: 8px;
|
|
40
|
-
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
|
|
41
|
-
padding: 14px 16px 16px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.repo-open-agents-brand {
|
|
45
|
-
display: flex;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
margin-bottom: 8px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.repo-open-agents-logo {
|
|
51
|
-
width: 34px;
|
|
52
|
-
height: 34px;
|
|
53
|
-
display: block;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.repo-open-agents-title {
|
|
57
|
-
color: #eef0f6;
|
|
58
|
-
font-size: 14px;
|
|
59
|
-
font-weight: 650;
|
|
60
|
-
margin-bottom: 10px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.repo-open-agents-grid {
|
|
64
|
-
display: grid;
|
|
65
|
-
grid-template-columns: repeat(auto-fill, minmax(min(760px, 100%), 1fr));
|
|
66
|
-
gap: 8px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.repo-open-shell {
|
|
70
|
-
flex: 1;
|
|
71
|
-
width: 100%;
|
|
72
|
-
min-height: 380px;
|
|
73
|
-
background: #222430;
|
|
74
|
-
border: 1px solid #343847;
|
|
75
|
-
border-radius: 8px;
|
|
76
|
-
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
|
|
77
|
-
display: flex;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.repo-open-version {
|
|
83
|
-
flex-shrink: 0;
|
|
84
|
-
align-self: center;
|
|
85
|
-
color: #777d8e;
|
|
86
|
-
font-size: 12px;
|
|
87
|
-
line-height: 1;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.repo-open-header {
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
justify-content: space-between;
|
|
94
|
-
gap: 16px;
|
|
95
|
-
padding: 18px 20px;
|
|
96
|
-
border-bottom: 1px solid #343847;
|
|
97
|
-
background: #1d1f29;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.repo-open-title {
|
|
101
|
-
margin: 0;
|
|
102
|
-
font-size: 18px;
|
|
103
|
-
line-height: 1.2;
|
|
104
|
-
font-weight: 650;
|
|
105
|
-
color: #eef0f6;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.repo-open-form {
|
|
109
|
-
display: flex;
|
|
110
|
-
align-items: center;
|
|
111
|
-
gap: 8px;
|
|
112
|
-
min-width: min(520px, 58%);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.repo-open-input-wrap {
|
|
116
|
-
position: relative;
|
|
117
|
-
flex: 1;
|
|
118
|
-
min-width: 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.repo-open-input {
|
|
122
|
-
flex: 1;
|
|
123
|
-
min-width: 0;
|
|
124
|
-
width: 100%;
|
|
125
|
-
height: 32px;
|
|
126
|
-
background: #171820;
|
|
127
|
-
border: 1px solid #3d4253;
|
|
128
|
-
border-radius: 5px;
|
|
129
|
-
color: #eef0f6;
|
|
130
|
-
font-size: 13px;
|
|
131
|
-
padding: 0 10px;
|
|
132
|
-
outline: none;
|
|
133
|
-
font-family: inherit;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.repo-open-input:focus {
|
|
137
|
-
border-color: #6ea8fe;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.repo-open-path-suggestions {
|
|
141
|
-
position: absolute;
|
|
142
|
-
z-index: 20;
|
|
143
|
-
top: calc(100% + 6px);
|
|
144
|
-
left: 0;
|
|
145
|
-
right: 0;
|
|
146
|
-
max-height: 238px;
|
|
147
|
-
overflow: auto;
|
|
148
|
-
overscroll-behavior: contain;
|
|
149
|
-
padding: 5px;
|
|
150
|
-
border: 1px solid #3d4253;
|
|
151
|
-
border-radius: 6px;
|
|
152
|
-
background: #171820;
|
|
153
|
-
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.repo-open-path-suggestion {
|
|
157
|
-
width: 100%;
|
|
158
|
-
min-width: 0;
|
|
159
|
-
min-height: 34px;
|
|
160
|
-
display: flex;
|
|
161
|
-
align-items: center;
|
|
162
|
-
gap: 8px;
|
|
163
|
-
padding: 6px 8px;
|
|
164
|
-
border: none;
|
|
165
|
-
border-radius: 4px;
|
|
166
|
-
background: transparent;
|
|
167
|
-
color: #d7dae5;
|
|
168
|
-
font: inherit;
|
|
169
|
-
text-align: left;
|
|
170
|
-
cursor: pointer;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.repo-open-path-suggestion-active,
|
|
174
|
-
.repo-open-path-suggestion:hover {
|
|
175
|
-
background: #2a2e3b;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.repo-open-path-suggestion-main {
|
|
179
|
-
flex: 1;
|
|
180
|
-
min-width: 0;
|
|
181
|
-
display: flex;
|
|
182
|
-
flex-direction: column;
|
|
183
|
-
gap: 2px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.repo-open-path-suggestion-name,
|
|
187
|
-
.repo-open-path-suggestion-path {
|
|
188
|
-
max-width: 100%;
|
|
189
|
-
overflow: hidden;
|
|
190
|
-
text-overflow: ellipsis;
|
|
191
|
-
white-space: nowrap;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.repo-open-path-suggestion-name {
|
|
195
|
-
color: #eef0f6;
|
|
196
|
-
font-size: 13px;
|
|
197
|
-
font-weight: 650;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.repo-open-path-suggestion-path {
|
|
201
|
-
color: #8f96a8;
|
|
202
|
-
font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.repo-open-path-suggestions-loading {
|
|
206
|
-
min-height: 30px;
|
|
207
|
-
display: flex;
|
|
208
|
-
align-items: center;
|
|
209
|
-
padding: 0 8px;
|
|
210
|
-
color: #8f96a8;
|
|
211
|
-
font-size: 12px;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.repo-open-button,
|
|
215
|
-
.repo-open-row-action,
|
|
216
|
-
.repo-open-root-action,
|
|
217
|
-
.repo-open-root-nav {
|
|
218
|
-
border: 1px solid #4a5366;
|
|
219
|
-
border-radius: 5px;
|
|
220
|
-
background: #2b3140;
|
|
221
|
-
color: #f1f3f8;
|
|
222
|
-
font: inherit;
|
|
223
|
-
font-size: 12px;
|
|
224
|
-
cursor: pointer;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.repo-open-button {
|
|
228
|
-
height: 32px;
|
|
229
|
-
padding: 0 14px;
|
|
230
|
-
font-weight: 650;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.repo-open-button:disabled {
|
|
234
|
-
cursor: default;
|
|
235
|
-
color: #777d8e;
|
|
236
|
-
background: #242733;
|
|
237
|
-
border-color: #343847;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.repo-open-body {
|
|
241
|
-
flex: 1;
|
|
242
|
-
min-height: 0;
|
|
243
|
-
display: grid;
|
|
244
|
-
grid-template-columns: minmax(0, 1fr) 460px;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.repo-open-explorer {
|
|
248
|
-
min-width: 0;
|
|
249
|
-
min-height: 0;
|
|
250
|
-
display: flex;
|
|
251
|
-
flex-direction: column;
|
|
252
|
-
overflow: hidden;
|
|
253
|
-
border-right: 1px solid #343847;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.repo-open-explorer-head {
|
|
257
|
-
display: flex;
|
|
258
|
-
align-items: center;
|
|
259
|
-
gap: 8px;
|
|
260
|
-
min-height: 44px;
|
|
261
|
-
padding: 0 12px;
|
|
262
|
-
border-bottom: 1px solid #343847;
|
|
263
|
-
background: #20232d;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.repo-open-root-nav {
|
|
267
|
-
width: 30px;
|
|
268
|
-
height: 26px;
|
|
269
|
-
padding: 0;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.repo-open-root-nav:disabled {
|
|
273
|
-
cursor: default;
|
|
274
|
-
color: #5f6575;
|
|
275
|
-
border-color: #343847;
|
|
276
|
-
background: #222430;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.repo-open-root-path {
|
|
280
|
-
flex: 1;
|
|
281
|
-
min-width: 0;
|
|
282
|
-
display: flex;
|
|
283
|
-
align-items: center;
|
|
284
|
-
gap: 2px;
|
|
285
|
-
overflow: auto hidden;
|
|
286
|
-
scrollbar-width: none;
|
|
287
|
-
white-space: nowrap;
|
|
288
|
-
font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
289
|
-
color: #aeb5c6;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.repo-open-root-path::-webkit-scrollbar {
|
|
293
|
-
display: none;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.repo-open-root-crumb {
|
|
297
|
-
flex: 0 0 auto;
|
|
298
|
-
max-width: 160px;
|
|
299
|
-
overflow: hidden;
|
|
300
|
-
text-overflow: ellipsis;
|
|
301
|
-
white-space: nowrap;
|
|
302
|
-
border: 1px solid transparent;
|
|
303
|
-
border-radius: 4px;
|
|
304
|
-
background: transparent;
|
|
305
|
-
color: #aeb5c6;
|
|
306
|
-
font: inherit;
|
|
307
|
-
padding: 3px 5px;
|
|
308
|
-
cursor: pointer;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.repo-open-root-crumb:hover {
|
|
312
|
-
border-color: #3d4253;
|
|
313
|
-
background: #2a2e3b;
|
|
314
|
-
color: #eef0f6;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.repo-open-root-separator {
|
|
318
|
-
flex: 0 0 auto;
|
|
319
|
-
color: #596072;
|
|
320
|
-
font-size: 11px;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.repo-open-root-action {
|
|
324
|
-
height: 26px;
|
|
325
|
-
padding: 0 10px;
|
|
326
|
-
color: #b7f0c0;
|
|
327
|
-
border-color: #3f7350;
|
|
328
|
-
background: #213229;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.repo-open-tree {
|
|
332
|
-
flex: 1;
|
|
333
|
-
min-width: 0;
|
|
334
|
-
min-height: 0;
|
|
335
|
-
overflow: auto;
|
|
336
|
-
overscroll-behavior: contain;
|
|
337
|
-
padding: 8px 0;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.repo-open-tree-row {
|
|
341
|
-
display: flex;
|
|
342
|
-
align-items: center;
|
|
343
|
-
gap: 8px;
|
|
344
|
-
min-height: 30px;
|
|
345
|
-
padding-top: 0;
|
|
346
|
-
padding-right: 10px;
|
|
347
|
-
padding-bottom: 0;
|
|
348
|
-
color: #c7ccd8;
|
|
349
|
-
cursor: default;
|
|
350
|
-
box-sizing: border-box;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.repo-open-tree-row:hover {
|
|
354
|
-
background: #2a2e3b;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.repo-open-tree-row-repo {
|
|
358
|
-
color: #eef0f6;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.repo-open-expand {
|
|
362
|
-
width: 20px;
|
|
363
|
-
height: 20px;
|
|
364
|
-
flex: 0 0 20px;
|
|
365
|
-
display: inline-flex;
|
|
366
|
-
align-items: center;
|
|
367
|
-
justify-content: center;
|
|
368
|
-
border: 1px solid transparent;
|
|
369
|
-
border-radius: 4px;
|
|
370
|
-
background: transparent;
|
|
371
|
-
color: #8f96a8;
|
|
372
|
-
font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
373
|
-
cursor: pointer;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.repo-open-expand:hover {
|
|
377
|
-
border-color: #3d4253;
|
|
378
|
-
background: #20232d;
|
|
379
|
-
color: #d7dae5;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.repo-open-folder-name {
|
|
383
|
-
flex: 1;
|
|
384
|
-
min-width: 0;
|
|
385
|
-
overflow: hidden;
|
|
386
|
-
text-overflow: ellipsis;
|
|
387
|
-
white-space: nowrap;
|
|
388
|
-
font-size: 13px;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.repo-open-repo-badge {
|
|
392
|
-
flex: 0 0 auto;
|
|
393
|
-
border: 1px solid #3f7350;
|
|
394
|
-
border-radius: 4px;
|
|
395
|
-
padding: 2px 6px;
|
|
396
|
-
color: #b7f0c0;
|
|
397
|
-
background: #213229;
|
|
398
|
-
font-size: 11px;
|
|
399
|
-
line-height: 1;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.repo-open-row-action {
|
|
403
|
-
height: 24px;
|
|
404
|
-
padding: 0 9px;
|
|
405
|
-
color: #eef0f6;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.repo-open-tree-empty {
|
|
409
|
-
min-height: 28px;
|
|
410
|
-
display: flex;
|
|
411
|
-
align-items: center;
|
|
412
|
-
color: #777d8e;
|
|
413
|
-
font-size: 12px;
|
|
414
|
-
box-sizing: border-box;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
.repo-open-side {
|
|
418
|
-
min-width: 0;
|
|
419
|
-
min-height: 0;
|
|
420
|
-
display: flex;
|
|
421
|
-
flex-direction: column;
|
|
422
|
-
gap: 18px;
|
|
423
|
-
padding: 16px;
|
|
424
|
-
overflow: auto;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.repo-open-section {
|
|
428
|
-
display: flex;
|
|
429
|
-
flex-direction: column;
|
|
430
|
-
gap: 8px;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.repo-open-section-title {
|
|
434
|
-
color: #8f96a8;
|
|
435
|
-
font-size: 12px;
|
|
436
|
-
font-weight: 650;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.repo-open-list {
|
|
440
|
-
display: flex;
|
|
441
|
-
flex-direction: column;
|
|
442
|
-
gap: 6px;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.repo-open-list-button {
|
|
446
|
-
display: flex;
|
|
447
|
-
flex-direction: column;
|
|
448
|
-
align-items: flex-start;
|
|
449
|
-
gap: 3px;
|
|
450
|
-
min-width: 0;
|
|
451
|
-
border: 1px solid #343847;
|
|
452
|
-
border-radius: 6px;
|
|
453
|
-
background: #1d1f29;
|
|
454
|
-
color: #d7dae5;
|
|
455
|
-
cursor: pointer;
|
|
456
|
-
padding: 9px 10px;
|
|
457
|
-
text-align: left;
|
|
458
|
-
font: inherit;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.repo-open-list-button:hover {
|
|
462
|
-
border-color: #4a5366;
|
|
463
|
-
background: #242835;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
.repo-open-list-name {
|
|
467
|
-
max-width: 100%;
|
|
468
|
-
overflow: hidden;
|
|
469
|
-
text-overflow: ellipsis;
|
|
470
|
-
white-space: nowrap;
|
|
471
|
-
font-size: 13px;
|
|
472
|
-
font-weight: 650;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.repo-open-list-path,
|
|
476
|
-
.repo-open-folder-caption {
|
|
477
|
-
max-width: 100%;
|
|
478
|
-
overflow: hidden;
|
|
479
|
-
text-overflow: ellipsis;
|
|
480
|
-
white-space: nowrap;
|
|
481
|
-
font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
482
|
-
color: #8f96a8;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
.repo-open-claude-row {
|
|
486
|
-
position: relative;
|
|
487
|
-
padding-right: 62px;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
.repo-open-agent-name {
|
|
491
|
-
display: inline-flex;
|
|
492
|
-
align-items: center;
|
|
493
|
-
gap: 7px;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
.repo-open-claude-chips {
|
|
497
|
-
display: flex;
|
|
498
|
-
flex-wrap: wrap;
|
|
499
|
-
gap: 5px;
|
|
500
|
-
margin-top: 3px;
|
|
501
|
-
min-width: 0;
|
|
502
|
-
max-width: 100%;
|
|
503
|
-
align-self: stretch;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
.repo-open-claude-chip {
|
|
507
|
-
border: 1px solid #3d4253;
|
|
508
|
-
border-radius: 4px;
|
|
509
|
-
background: #20232d;
|
|
510
|
-
color: #aeb5c6;
|
|
511
|
-
padding: 3px 8px;
|
|
512
|
-
font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
513
|
-
cursor: pointer;
|
|
514
|
-
flex: 1 1 80%;
|
|
515
|
-
min-width: 0;
|
|
516
|
-
max-width: 80%;
|
|
517
|
-
overflow: hidden;
|
|
518
|
-
text-overflow: ellipsis;
|
|
519
|
-
white-space: nowrap;
|
|
520
|
-
text-align: left;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
.repo-open-claude-chip:hover:not(:disabled) {
|
|
524
|
-
border-color: #6ea8fe;
|
|
525
|
-
color: #eef0f6;
|
|
526
|
-
background: #262c3c;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
.repo-open-claude-chip-busy {
|
|
530
|
-
border-color: #d8b45a;
|
|
531
|
-
color: #ecd08a;
|
|
532
|
-
animation: repo-open-chip-pulse 1.2s ease-in-out infinite;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
@keyframes repo-open-chip-pulse {
|
|
536
|
-
50% { opacity: 0.55; }
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
.repo-open-claude-chip:disabled {
|
|
540
|
-
cursor: default;
|
|
541
|
-
color: #5f6575;
|
|
542
|
-
border-color: #2c2f3b;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
.repo-open-claude-open {
|
|
546
|
-
position: absolute;
|
|
547
|
-
top: 50%;
|
|
548
|
-
right: 10px;
|
|
549
|
-
transform: translateY(-50%);
|
|
550
|
-
height: 24px;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
.repo-open-error {
|
|
554
|
-
margin: 0;
|
|
555
|
-
color: #ff9ca8;
|
|
556
|
-
font-size: 12px;
|
|
557
|
-
line-height: 1.4;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
@media (max-width: 760px) {
|
|
561
|
-
.repo-open-page {
|
|
562
|
-
padding: 12px;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
.repo-open-shell {
|
|
566
|
-
height: 100%;
|
|
567
|
-
min-height: 0;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.repo-open-header {
|
|
571
|
-
align-items: stretch;
|
|
572
|
-
flex-direction: column;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
.repo-open-form {
|
|
576
|
-
min-width: 0;
|
|
577
|
-
width: 100%;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
.repo-open-body {
|
|
581
|
-
grid-template-columns: 1fr;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
.repo-open-explorer {
|
|
585
|
-
min-height: 340px;
|
|
586
|
-
border-right: none;
|
|
587
|
-
border-bottom: 1px solid #343847;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
.repo-open-agents-grid {
|
|
591
|
-
grid-template-columns: 1fr;
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
`}),(0,y.jsxs)(`div`,{className:`repo-open-stack`,children:[ae.length>0&&(0,y.jsxs)(`section`,{className:`repo-open-agents-card`,children:[(0,y.jsx)(`div`,{className:`repo-open-agents-brand`,children:(0,y.jsx)(`img`,{className:`repo-open-agents-logo`,src:`/press-kit/ingit-icon-mark-light.svg`,alt:`ingit`})}),(0,y.jsx)(`div`,{className:`repo-open-agents-title`,children:`Running agent sessions`}),(0,y.jsx)(`div`,{className:`repo-open-agents-grid`,children:ae.map(t=>(0,y.jsxs)(`div`,{className:`repo-open-list-button repo-open-claude-row`,children:[(0,y.jsxs)(`span`,{className:`repo-open-list-name repo-open-agent-name`,children:[[...new Set(t.sessions.map(e=>e.agent))].map(e=>(0,y.jsx)(oa,{agent:e,size:15,busy:t.sessions.some(t=>t.agent===e&&t.busy)},e)),ca(t.cwd)]}),(0,y.jsx)(`span`,{className:`repo-open-list-path`,children:t.cwd}),(0,y.jsx)(`span`,{className:`repo-open-claude-chips`,children:t.sessions.map(e=>(0,y.jsx)(`button`,{type:`button`,className:`repo-open-claude-chip${e.busy?` repo-open-claude-chip-busy`:``}`,disabled:!e.focusable||o!==null,title:e.focusable?`Focus this session's window — ${na(e)} (pid ${e.pid})`:`${na(e)} (pid ${e.pid}) — window focus unavailable for this session`,onClick:()=>void s(e),children:o===e.pid?`focusing…`:`${e.title??`${e.agent===`codex`?`codex `:``}${na(e)}`}${e.count>1?` ×${e.count}`:``}`},`${e.pid}:${e.cwd}`))}),(0,y.jsx)(`button`,{type:`button`,className:`repo-open-row-action repo-open-claude-open`,onClick:()=>e(t.cwd),children:`Open`})]},t.cwd))})]}),(0,y.jsxs)(`div`,{className:`repo-open-shell`,children:[(0,y.jsxs)(`div`,{className:`repo-open-header`,children:[(0,y.jsx)(`h1`,{className:`repo-open-title`,children:`Open repository`}),(0,y.jsxs)(`form`,{onSubmit:E,className:`repo-open-form`,children:[(0,y.jsxs)(`div`,{className:`repo-open-input-wrap`,children:[(0,y.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),onFocus:()=>{h(!0),S.length>0&&_(!0)},onBlur:()=>{h(!1),_(!1)},onKeyDown:ne,placeholder:`/home/user/my-project`,className:`repo-open-input`,autoComplete:`off`,role:`combobox`,"aria-expanded":ce,"aria-controls":`repo-open-path-suggestions`,"aria-autocomplete":`list`}),ce&&(0,y.jsx)(`div`,{id:`repo-open-path-suggestions`,className:`repo-open-path-suggestions`,role:`listbox`,children:v&&S.length===0?(0,y.jsx)(`div`,{className:`repo-open-path-suggestions-loading`,children:`Loading...`}):S.map((e,t)=>(0,y.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===w,className:`repo-open-path-suggestion${t===w?` repo-open-path-suggestion-active`:``}`,onMouseEnter:()=>T(t),onMouseDown:t=>{t.preventDefault(),te(e)},children:[(0,y.jsxs)(`span`,{className:`repo-open-path-suggestion-main`,children:[(0,y.jsx)(`span`,{className:`repo-open-path-suggestion-name`,children:e.name}),(0,y.jsx)(`span`,{className:`repo-open-path-suggestion-path`,children:e.path})]}),e.isGitRepo&&(0,y.jsx)(`span`,{className:`repo-open-repo-badge`,children:`repo`})]},e.path))})]}),(0,y.jsx)(`button`,{type:`submit`,disabled:!c.trim(),className:`repo-open-button`,children:`Open`})]})]}),(0,y.jsxs)(`div`,{className:`repo-open-body`,children:[(0,y.jsxs)(`section`,{className:`repo-open-explorer`,"aria-label":`Folder tree`,children:[(0,y.jsxs)(`div`,{className:`repo-open-explorer-head`,children:[(0,y.jsx)(`button`,{type:`button`,className:`repo-open-root-nav`,disabled:!oe?.parentPath,onClick:()=>{oe?.parentPath&&ee(oe.parentPath,{makeRoot:!0})},title:`Parent folder`,"aria-label":`Parent folder`,children:`..`}),(0,y.jsx)(`div`,{className:`repo-open-root-path`,children:oe?da(oe.path).map((e,t,n)=>(0,y.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,minWidth:0},children:[t>0&&!/^(\/|[A-Za-z]:[\\/])$/.test(n[t-1].label)&&(0,y.jsx)(`span`,{className:`repo-open-root-separator`,children:`/`}),(0,y.jsx)(`button`,{type:`button`,className:`repo-open-root-crumb`,onClick:()=>void ee(e.path,{makeRoot:!0}),title:e.path,children:e.label})]},e.path)):`Loading...`}),oe?.isGitRepo&&(0,y.jsx)(`button`,{type:`button`,className:`repo-open-root-action`,onClick:()=>e(oe.path),children:`Open`})]}),(0,y.jsxs)(`div`,{className:`repo-open-tree`,children:[se&&(0,y.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:16},children:`Loading...`}),u&&!se&&ie(u,0)]})]}),(0,y.jsxs)(`aside`,{className:`repo-open-side`,children:[t&&(0,y.jsx)(`p`,{className:`repo-open-error`,children:t}),n.length>0&&(0,y.jsxs)(`section`,{className:`repo-open-section`,children:[(0,y.jsx)(`div`,{className:`repo-open-section-title`,children:`Recent repositories`}),(0,y.jsx)(`div`,{className:`repo-open-list`,children:n.map(t=>(0,y.jsxs)(`button`,{type:`button`,onClick:()=>e(t),className:`repo-open-list-button`,children:[(0,y.jsx)(`span`,{className:`repo-open-list-name`,children:ca(t)}),(0,y.jsx)(`span`,{className:`repo-open-list-path`,children:t})]},t))})]}),i.length>0&&(0,y.jsxs)(`section`,{className:`repo-open-section`,children:[(0,y.jsx)(`div`,{className:`repo-open-section-title`,children:`Repositories`}),r&&(0,y.jsx)(`div`,{className:`repo-open-folder-caption`,children:r}),(0,y.jsx)(`div`,{className:`repo-open-list`,children:i.map(t=>(0,y.jsxs)(`button`,{type:`button`,onClick:()=>e(t),className:`repo-open-list-button`,children:[(0,y.jsx)(`span`,{className:`repo-open-list-name`,children:ca(t)}),(0,y.jsx)(`span`,{className:`repo-open-list-path`,children:t})]},t))})]})]})]})]}),(0,y.jsxs)(`div`,{className:`repo-open-version`,children:[`v`,`0.3.2`]})]})]})}var pa={head:`Branches`,tag:`Tags`},ma=[`head`,`remote`,`tag`];function ha({refs:e,remotes:t,selectedRemoteName:n,githubForkSuggestion:r,stashes:i,worktrees:a,onSelectRef:o,onSelectStash:s,onSelectStashParent:c,onOpenWorktree:l,onRemoveWorktree:u,onSelectRemote:d,onAddRemote:f,onRemoveRemote:p,selectedStashSha:m,selectedSha:h,onClose:g,onOpenSettings:_,settingsOpen:v=!1}){let[x,S]=(0,b.useState)({head:!0,remote:!0,tag:!0}),[C,w]=(0,b.useState)(``),[T,ee]=(0,b.useState)(!1),[E,te]=(0,b.useState)(!0),[ne,re]=(0,b.useState)(null),[ie,ae]=(0,b.useState)(!1),[oe,se]=(0,b.useState)(``),[ce,D]=(0,b.useState)(``),[O,le]=(0,b.useState)(!1),[ue,de]=(0,b.useState)(!1),[fe,pe]=(0,b.useState)(null),[k,me]=(0,b.useState)(null),[he,ge]=(0,b.useState)(null);(0,b.useEffect)(()=>{!ie||!r||(se(e=>e||r.remoteName),D(e=>e||r.url))},[ie,r]);let _e=C.toLowerCase(),ve=a.filter(e=>!_e||e.path.toLowerCase().includes(_e)||e.branchShortName?.toLowerCase().includes(_e)),ye=t.filter(e=>!_e||e.name.toLowerCase().includes(_e)||e.url.toLowerCase().includes(_e)),be={head:[],tag:[]};for(let t of e)_e&&!t.shortName.toLowerCase().includes(_e)||t.kind!==`remote`&&be[t.kind].push(t);function xe(e){S(t=>({...t,[e]:!t[e]}))}async function Se(e){if(!(e.isCurrent||ne)&&window.confirm(`Remove the worktree at ${e.path}? Git will refuse if it contains uncommitted changes.`)){re(e.path);try{await u(e.path)}finally{re(null)}}}async function Ce(e){e.preventDefault();let t=oe.trim(),n=ce.trim();if(!(!t||!n||O)){le(!0);try{await f(t,n)&&(se(``),D(``),ae(!1))}finally{le(!1)}}}async function we(e){if(!fe&&window.confirm(`Remove remote "${e.name}"? This also removes its remote-tracking refs from this repository.`)){pe(e.name);try{await p(e.name)}finally{pe(null)}}}return(0,y.jsxs)(`div`,{style:{width:250,flexShrink:0,height:`100%`,background:`#181825`,borderRight:`1px solid #313244`,display:`flex`,flexDirection:`column`,overflowY:`auto`,userSelect:`none`},children:[(0,y.jsxs)(`div`,{style:{padding:`8px 14px`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,color:`#6c7086`,textTransform:`uppercase`,borderBottom:`1px solid #313244`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[`Refs`,(0,y.jsx)(`button`,{onClick:g,title:`Hide refs`,style:{background:`none`,border:`none`,color:`#6c7086`,cursor:`pointer`,fontSize:14,padding:`0 2px`,lineHeight:1},children:`✕`})]}),(0,y.jsx)(`div`,{style:{padding:`6px 10px`,borderBottom:`1px solid #313244`},children:(0,y.jsx)(`input`,{type:`text`,value:C,onChange:e=>w(e.target.value),placeholder:`Filter refs, remotes, and worktrees...`,style:{width:`100%`,background:`#1e1e2e`,border:`1px solid #45475a`,borderRadius:4,color:`#cdd6f4`,fontSize:12,padding:`5px 8px`,outline:`none`,fontFamily:`inherit`},onFocus:e=>{e.currentTarget.style.borderColor=`#89b4fa`},onBlur:e=>{e.currentTarget.style.borderColor=`#45475a`}})}),(0,y.jsxs)(`div`,{style:{margin:`8px 10px 4px`,border:`1px solid #704752`,borderRadius:7,background:`#55323c`,overflow:`hidden`,flexShrink:0},children:[(0,y.jsx)(`div`,{style:{display:`flex`,alignItems:`stretch`},children:(0,y.jsxs)(`button`,{type:`button`,onClick:()=>ee(e=>!e),"aria-expanded":T,style:{flex:1,minWidth:0,display:`flex`,alignItems:`center`,gap:7,padding:`7px 9px`,border:`none`,background:`transparent`,color:`#f5e0dc`,fontFamily:`inherit`,fontSize:12,fontWeight:700,textAlign:`left`,cursor:`pointer`},children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-block`,transform:T?`rotate(90deg)`:`rotate(0deg)`,transition:`transform 0.15s`,color:`#d7a6b2`,fontSize:9},children:`▶`}),`Stashes`,(0,y.jsx)(`span`,{style:{marginLeft:`auto`,minWidth:16,padding:`1px 5px`,borderRadius:8,background:`#311f25aa`,color:`#d7a6b2`,fontSize:10,fontWeight:600,textAlign:`center`},children:i.length})]})}),T&&(0,y.jsx)(`div`,{style:{borderTop:`1px solid #704752`},children:i.length===0?(0,y.jsx)(`div`,{style:{padding:`9px 10px 5px`,color:`#c4939f`,fontSize:11},children:`No stashed changes`}):(0,y.jsx)(`div`,{children:i.map(e=>{let t=ga(e.message);return(0,y.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-pressed":m===e.sha,onClick:()=>s(e.sha),onKeyDown:t=>{t.target===t.currentTarget&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),s(e.sha))},style:{padding:`8px 9px`,borderBottom:`1px solid #704752`,display:`flex`,flexDirection:`column`,gap:5,background:m===e.sha?`#f5c2e71a`:`transparent`,boxShadow:m===e.sha?`inset 3px 0 #f5c2e7`:`none`,cursor:`pointer`},children:[(0,y.jsx)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:7},children:(0,y.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,y.jsx)(`div`,{title:e.message,style:{color:`#f5e0dc`,fontSize:11,fontWeight:650,lineHeight:1.35,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t.message||e.selector}),(0,y.jsxs)(`div`,{style:{marginTop:2,color:`#c4939f`,fontSize:9.5},children:[e.selector,t.context?` · ${t.context}`:``,` · `,_a(e.createdAt)]})]})}),(0,y.jsxs)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),c(e.parentSha)},title:`Go to ${e.parentSha}`,style:{alignSelf:`flex-start`,padding:0,border:`none`,background:`none`,color:`#89b4fa`,fontFamily:`monospace`,fontSize:10,cursor:`pointer`,textDecoration:`underline`,textUnderlineOffset:2},children:[`parent `,e.parentSha.slice(0,8)]})]},e.sha)})})})]}),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`button`,{type:`button`,onClick:()=>te(e=>!e),"aria-expanded":C?!0:E,style:{width:`100%`,display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,background:`none`,border:`none`,color:`#a6adc8`,fontSize:12,fontWeight:600,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`},children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-block`,transform:!C&&!E?`rotate(-90deg)`:`rotate(0deg)`,transition:`transform 0.15s`,fontSize:10,lineHeight:1},children:`▼`}),`Worktrees`,(0,y.jsx)(`span`,{style:{marginLeft:`auto`,background:`#313244`,borderRadius:8,padding:`1px 6px`,fontSize:10,color:`#6c7086`,fontWeight:500},children:ve.length})]}),(C||E)&&(0,y.jsx)(`div`,{children:ve.length===0?(0,y.jsx)(`div`,{style:{padding:`5px 14px 7px 28px`,color:`#6c7086`,fontSize:11},children:`No matching worktrees`}):ve.map(e=>{let t=ya(e),n=ne===e.path;return(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`stretch`,paddingLeft:20},children:[(0,y.jsxs)(`button`,{type:`button`,onClick:()=>{e.isCurrent||l(e.path)},title:e.isCurrent?`${e.path} (current worktree)`:`Open ${e.path}`,disabled:e.isCurrent,style:{minWidth:0,flex:1,display:`flex`,alignItems:`center`,gap:7,padding:`5px 6px 5px 8px`,background:`none`,border:`none`,color:e.isCurrent?`#a6e3a1`:`#cdd6f4`,cursor:e.isCurrent?`default`:`pointer`,textAlign:`left`,fontFamily:`inherit`},children:[(0,y.jsx)(ba,{current:e.isCurrent}),(0,y.jsxs)(`span`,{style:{minWidth:0,flex:1},children:[(0,y.jsx)(`span`,{style:{display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontSize:12,fontWeight:e.isCurrent?700:500},children:t}),(0,y.jsx)(`span`,{style:{display:`block`,marginTop:1,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:`#6c7086`,fontSize:9.5},children:e.path})]})]}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>{Se(e)},disabled:e.isCurrent||ne!==null,title:e.isCurrent?`The current worktree cannot be removed`:`Remove worktree ${e.path}`,"aria-label":n?`Removing worktree ${t}`:`Remove worktree ${t}`,style:{width:32,flexShrink:0,display:`grid`,placeItems:`center`,padding:0,border:`none`,background:`none`,color:n?`#f9e2af`:`#f38ba8`,cursor:e.isCurrent||ne!==null?`default`:`pointer`,opacity:e.isCurrent?.25:ne&&!n?.4:.8},children:(0,y.jsx)(xa,{})})]},e.path)})})]}),ma.map(e=>{if(e===`remote`){let i=!C&&x.remote;return(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,y.jsxs)(`button`,{type:`button`,onClick:()=>xe(`remote`),"aria-expanded":!i,style:{minWidth:0,flex:1,display:`flex`,alignItems:`center`,gap:6,padding:`6px 6px 6px 14px`,background:`none`,border:`none`,color:`#a6adc8`,fontSize:12,fontWeight:600,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`},children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-block`,transform:i?`rotate(-90deg)`:`rotate(0deg)`,transition:`transform 0.15s`,fontSize:10,lineHeight:1},children:`▼`}),`Remotes`,(0,y.jsx)(`span`,{style:{marginLeft:`auto`,background:`#313244`,borderRadius:8,padding:`1px 6px`,fontSize:10,color:`#6c7086`,fontWeight:500},children:ye.length})]})}),!i&&(0,y.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[ie&&(0,y.jsxs)(`form`,{onSubmit:e=>{Ce(e)},style:{order:1,margin:`2px 10px 7px 20px`,padding:8,display:`flex`,flexDirection:`column`,gap:6,border:`1px solid #45475a`,borderRadius:6,background:`#1e1e2e`},children:[r&&(0,y.jsxs)(`button`,{type:`button`,onClick:()=>{se(r.remoteName),D(r.url)},title:`Use ${r.fullName} as a remote`,"aria-label":`Use GitHub fork ${r.fullName}`,disabled:O,style:{display:`flex`,alignItems:`center`,gap:7,padding:`6px 7px`,border:`1px solid #89b4fa55`,borderRadius:4,background:`#89b4fa14`,color:`#cdd6f4`,fontFamily:`inherit`,textAlign:`left`,cursor:O?`default`:`pointer`},children:[(0,y.jsx)(Ca,{}),(0,y.jsxs)(`span`,{style:{minWidth:0,flex:1},children:[(0,y.jsx)(`span`,{style:{display:`block`,color:`#89b4fa`,fontSize:10,fontWeight:700},children:`Your GitHub fork`}),(0,y.jsx)(`span`,{style:{display:`block`,marginTop:1,overflow:`hidden`,fontSize:10,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r.fullName})]}),(0,y.jsx)(`span`,{style:{color:`#89b4fa`,fontSize:9,fontWeight:700},children:`Use`})]}),(0,y.jsx)(`input`,{type:`text`,value:oe,onChange:e=>se(e.target.value),placeholder:`Name (for example, origin)`,"aria-label":`Remote name`,autoFocus:!0,disabled:O,style:{width:`100%`,padding:`5px 7px`,border:`1px solid #45475a`,borderRadius:4,outline:`none`,background:`#181825`,color:`#cdd6f4`,fontFamily:`inherit`,fontSize:11}}),(0,y.jsx)(`input`,{type:`text`,value:ce,onChange:e=>D(e.target.value),placeholder:`Repository URL`,"aria-label":`Remote URL`,disabled:O,style:{width:`100%`,padding:`5px 7px`,border:`1px solid #45475a`,borderRadius:4,outline:`none`,background:`#181825`,color:`#cdd6f4`,fontFamily:`inherit`,fontSize:11}}),(0,y.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:5},children:[(0,y.jsx)(`button`,{type:`button`,onClick:()=>{se(``),D(``)},disabled:O||!oe&&!ce,style:{marginRight:`auto`,padding:`4px 8px`,border:`none`,borderRadius:4,background:`transparent`,color:`#6c7086`,fontFamily:`inherit`,fontSize:10,cursor:O||!oe&&!ce?`default`:`pointer`,opacity:O||!oe&&!ce?.5:1},children:`Clear`}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>ae(!1),disabled:O,style:{padding:`4px 8px`,border:`none`,borderRadius:4,background:`transparent`,color:`#a6adc8`,fontFamily:`inherit`,fontSize:10,cursor:O?`default`:`pointer`},children:`Cancel`}),(0,y.jsx)(`button`,{type:`submit`,disabled:O||!oe.trim()||!ce.trim(),style:{padding:`4px 9px`,border:`1px solid #89b4fa66`,borderRadius:4,background:`#89b4fa22`,color:`#89b4fa`,fontFamily:`inherit`,fontSize:10,fontWeight:700,cursor:O||!oe.trim()||!ce.trim()?`default`:`pointer`,opacity:O||!oe.trim()||!ce.trim()?.5:1},children:O?`Adding…`:`Add`})]})]}),ye.length===0?(0,y.jsx)(`div`,{style:{padding:`5px 14px 7px 28px`,color:`#6c7086`,fontSize:11},children:t.length===0?`No remotes configured`:`No matching remotes`}):ye.map(e=>{let t=fe===e.name,r=n===e.name,i=k===e.name||he===e.name||t;return(0,y.jsxs)(`div`,{onMouseEnter:()=>me(e.name),onMouseLeave:()=>me(null),style:{minWidth:0,display:`flex`,alignItems:`center`,background:r?`#89b4fa18`:`transparent`},children:[(0,y.jsxs)(`button`,{type:`button`,onClick:()=>{d(e.name)},title:`Select ${e.name}\n${e.url}`,"aria-label":`Select remote ${e.name}`,"aria-pressed":r,style:{minWidth:0,flex:1,display:`flex`,alignItems:`center`,gap:6,padding:`5px 6px 5px 28px`,border:`none`,background:`transparent`,fontFamily:`inherit`,textAlign:`left`,cursor:`pointer`},children:[(0,y.jsx)(va,{kind:`remote`,isCurrent:r}),(0,y.jsxs)(`span`,{style:{minWidth:0,flex:1},children:[(0,y.jsx)(`span`,{style:{display:`block`,overflow:`hidden`,color:r?`#89b4fa`:`#cdd6f4`,fontSize:12,fontWeight:600,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.name}),(0,y.jsx)(`span`,{style:{display:`block`,marginTop:1,overflow:`hidden`,color:r?`#a6adc8`:`#6c7086`,fontSize:9.5,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.url})]})]}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>{we(e)},onFocus:()=>ge(e.name),onBlur:()=>ge(null),disabled:fe!==null,title:`Remove remote ${e.name}`,"aria-label":t?`Removing remote ${e.name}`:`Remove remote ${e.name}`,style:{width:32,alignSelf:`stretch`,flexShrink:0,display:`grid`,placeItems:`center`,padding:0,border:`none`,background:`transparent`,color:t?`#f9e2af`:`#f38ba8`,cursor:fe?`default`:`pointer`,opacity:+!!i,transition:`opacity 0.12s ease`},children:(0,y.jsx)(Sa,{})})]},e.name)}),(0,y.jsxs)(`button`,{type:`button`,onClick:()=>ae(e=>!e),onMouseEnter:()=>de(!0),onMouseLeave:()=>de(!1),title:`Add remote`,"aria-label":`Add remote`,"aria-pressed":ie,style:{width:`100%`,minHeight:36,position:`relative`,display:`grid`,placeItems:`center`,padding:0,border:`none`,background:ie?`#89b4fa18`:ue?`#313244`:`transparent`,color:ie||ue?`#89b4fa`:`#a6adc8`,fontFamily:`inherit`,fontSize:26,fontWeight:300,lineHeight:1,cursor:`pointer`,transition:`background 0.12s ease, color 0.12s ease`},children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,children:`+`}),(0,y.jsx)(`span`,{"aria-hidden":`true`,style:{position:`absolute`,left:`calc(50% + 18px)`,color:`#a6adc8`,fontSize:10,fontWeight:600,lineHeight:1,opacity:+!!ue,transform:ue?`translateX(0)`:`translateX(-3px)`,transition:`opacity 0.12s ease, transform 0.12s ease`,whiteSpace:`nowrap`},children:`add remote`})]})]})]},e)}let i=be[e];if(i.length===0)return null;let a=!C&&x[e];return(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`button`,{onClick:()=>xe(e),style:{width:`100%`,display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,background:`none`,border:`none`,color:`#a6adc8`,fontSize:12,fontWeight:600,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`},children:[(0,y.jsx)(`span`,{style:{display:`inline-block`,transform:a?`rotate(-90deg)`:`rotate(0deg)`,transition:`transform 0.15s`,fontSize:10,lineHeight:1},children:`▼`}),pa[e],(0,y.jsx)(`span`,{style:{marginLeft:`auto`,background:`#313244`,borderRadius:8,padding:`1px 6px`,fontSize:10,color:`#6c7086`,fontWeight:500},children:i.length})]}),!a&&(0,y.jsx)(`div`,{children:i.map(e=>{let t=e.targetSha===h;return(0,y.jsxs)(`button`,{onClick:()=>o(e),title:e.name,style:{width:`100%`,display:`flex`,alignItems:`center`,gap:8,padding:`5px 14px 5px 28px`,background:t?`#313244`:`none`,border:`none`,color:t?`#89b4fa`:`#cdd6f4`,fontSize:13,fontWeight:e.isCurrent?700:`normal`,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`,overflow:`hidden`},children:[(0,y.jsx)(va,{kind:e.kind,isCurrent:e.isCurrent}),(0,y.jsx)(`span`,{style:{flex:1,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.shortName}),(e.ahead!=null||e.behind!=null)&&(0,y.jsxs)(`span`,{style:{display:`flex`,gap:4,flexShrink:0,fontSize:11},children:[e.ahead!=null&&e.ahead>0&&(0,y.jsxs)(`span`,{style:{color:`#a6e3a1`},children:[`↑`,e.ahead]}),e.behind!=null&&e.behind>0&&(0,y.jsxs)(`span`,{style:{color:`#f38ba8`},children:[`↓`,e.behind]})]})]},e.name)})})]},e)}),(0,y.jsx)(`div`,{style:{marginTop:`auto`,padding:`10px`,borderTop:`1px solid #313244`},children:(0,y.jsxs)(`button`,{type:`button`,onClick:_,title:`Open settings`,"aria-label":`Open settings`,style:{width:`100%`,display:`flex`,alignItems:`center`,gap:8,padding:`7px 10px`,borderRadius:5,border:`1px solid #313244`,background:v?`#89b4fa20`:`transparent`,color:v?`#89b4fa`:`#a6adc8`,fontSize:12,fontWeight:600,fontFamily:`inherit`,cursor:`pointer`},children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,style:{color:v?`#89b4fa`:`#6c7086`},children:`⚙`}),`Settings`]})})]})}function ga(e){let t=/^(?:WIP )?on ([^:]+):\s*(.*)$/i.exec(e);return t?{message:t[2]??e,context:`on ${t[1]}`}:{message:e,context:``}}function _a(e){return new Date(e*1e3).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function va({kind:e,isCurrent:t}){let n={flexShrink:0,fontSize:11,width:14,textAlign:`center`};return e===`head`?(0,y.jsx)(`span`,{style:{...n,color:t?`#a6e3a1`:`#89b4fa`},children:t?`●`:`⎇`}):e===`remote`?(0,y.jsx)(`span`,{style:{...n,color:t?`#89b4fa`:`#94e2d5`},children:t?`●`:`◉`}):(0,y.jsx)(`span`,{style:{...n,color:`#f9e2af`},children:`◆`})}function ya(e){return e.branchShortName?e.branchShortName:e.detached&&e.headSha?`Detached at ${e.headSha.slice(0,8)}`:e.path.replace(/[\\/]+$/,``).split(/[\\/]+/).at(-1)||e.path}function ba({current:e}){return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,width:`13`,height:`13`,viewBox:`0 0 16 16`,fill:`none`,style:{flexShrink:0},children:[(0,y.jsx)(`circle`,{cx:`4`,cy:`3`,r:`2`,fill:e?`#a6e3a1`:`#94e2d5`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`5`,r:`2`,fill:e?`#a6e3a1`:`#94e2d5`}),(0,y.jsx)(`circle`,{cx:`8`,cy:`13`,r:`2`,fill:e?`#a6e3a1`:`#94e2d5`}),(0,y.jsx)(`path`,{d:`M4 5v2.5A2.5 2.5 0 0 0 6.5 10H8m4-3v.5A2.5 2.5 0 0 1 9.5 10H8v1`,stroke:e?`#a6e3a1`:`#94e2d5`,strokeWidth:`1.4`,strokeLinecap:`round`})]})}function xa(){return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,width:`13`,height:`13`,viewBox:`0 0 16 16`,fill:`none`,children:[(0,y.jsx)(`path`,{d:`M3.5 5h9m-6-2h3l.75 2h-4.5l.75-2Z`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,y.jsx)(`path`,{d:`M5 5.5 5.5 13h5l.5-7.5M7 7.5v3.5m2-3.5v3.5`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Sa(){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,children:(0,y.jsx)(`path`,{d:`m2.5 2.5 7 7m0-7-7 7`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`})})}function Ca(){return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,width:`14`,height:`14`,viewBox:`0 0 16 16`,fill:`none`,style:{flexShrink:0},children:[(0,y.jsx)(`circle`,{cx:`4`,cy:`3`,r:`2`,stroke:`currentColor`,strokeWidth:`1.3`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`5`,r:`2`,stroke:`currentColor`,strokeWidth:`1.3`}),(0,y.jsx)(`circle`,{cx:`8`,cy:`13`,r:`2`,stroke:`currentColor`,strokeWidth:`1.3`}),(0,y.jsx)(`path`,{d:`M4 5v2.5A2.5 2.5 0 0 0 6.5 10H8m4-3v.5A2.5 2.5 0 0 1 9.5 10H8v1`,stroke:`currentColor`,strokeWidth:`1.3`,strokeLinecap:`round`})]})}var wa=g(),Ta=Object.defineProperty,Ea=(e,t)=>{let n={};for(var r in e)Ta(n,r,{get:e[r],enumerable:!0});return t||Ta(n,Symbol.toStringTag,{value:`Module`}),n},Da=Ua(),L=e=>Ra(e,Da),Oa=Ua();L.write=e=>Ra(e,Oa);var ka=Ua();L.onStart=e=>Ra(e,ka);var Aa=Ua();L.onFrame=e=>Ra(e,Aa);var ja=Ua();L.onFinish=e=>Ra(e,ja);var Ma=[];L.setTimeout=(e,t)=>{let n=L.now()+t,r=()=>{let e=Ma.findIndex(e=>e.cancel==r);~e&&Ma.splice(e,1),Ia-=+!!~e},i={time:n,handler:e,cancel:r};return Ma.splice(Na(n),0,i),Ia+=1,za(),i};var Na=e=>~(~Ma.findIndex(t=>t.time>e)||~Ma.length);L.cancel=e=>{ka.delete(e),Aa.delete(e),ja.delete(e),Da.delete(e),Oa.delete(e)},L.sync=e=>{La=!0,L.batchedUpdates(e),La=!1},L.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,L.onStart(n)}return r.handler=e,r.cancel=()=>{ka.delete(n),t=null},r};var Pa=typeof window<`u`?window.requestAnimationFrame:()=>{};L.use=e=>Pa=e,L.now=typeof performance<`u`?()=>performance.now():Date.now,L.batchedUpdates=e=>e(),L.catch=console.error,L.frameLoop=`always`,L.onDemand=()=>{},L.advance=()=>{L.frameLoop===`demand`?Ha():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var Fa=-1,Ia=0,La=!1;function Ra(e,t){La?(t.delete(e),e(0)):(t.add(e),za(),L.frameLoop===`demand`&&L.onDemand())}function za(){Fa<0&&(Fa=0,L.frameLoop!==`demand`&&Pa(Va))}function Ba(){Fa=-1}function Va(){~Fa&&(Pa(Va),L.batchedUpdates(Ha))}function Ha(){let e=Fa;Fa=L.now();let t=Na(Fa);if(t&&(Wa(Ma.splice(0,t),e=>e.handler()),Ia-=t),!Ia){Ba();return}ka.flush(),Da.flush(e?Math.min(64,Fa-e):16.667),Aa.flush(),Oa.flush(),ja.flush(),L.frameLoop===`demand`&&Ia>0&&L.onDemand()}function Ua(){let e=new Set,t=e;return{add(n){Ia+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return Ia-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Ia-=t.size,Wa(t,t=>t(n)&&e.add(t)),Ia+=e.size,t=e)}}}function Wa(e,t){e.forEach(e=>{try{t(e)}catch(e){L.catch(e)}})}function Ga(){}var Ka=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),R={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:(e=>typeof e==`function`),str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function qa(e,t){if(R.arr(e)){if(!R.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Ja=(e,t)=>e.forEach(t);function Ya(e,t,n){if(R.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Xa=e=>R.und(e)?[]:R.arr(e)?e:[e];function Za(e,t){if(e.size){let n=Array.from(e);e.clear(),Ja(n,t)}}var Qa=(e,...t)=>Za(e,e=>e(...t)),$a=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),eo=Ea({assign:()=>oo,colors:()=>ro,createStringInterpolator:()=>to,skipAnimation:()=>io,to:()=>no,willAdvance:()=>ao}),to,no,ro=null,io=!1,ao=Ga,oo=e=>{e.to&&(no=e.to),e.now&&(L.now=e.now),e.colors!==void 0&&(ro=e.colors),e.skipAnimation!=null&&(io=e.skipAnimation),e.createStringInterpolator&&(to=e.createStringInterpolator),e.requestAnimationFrame&&L.use(e.requestAnimationFrame),e.batchedUpdates&&(L.batchedUpdates=e.batchedUpdates),e.willAdvance&&(ao=e.willAdvance),e.frameLoop&&(L.frameLoop=e.frameLoop),e.onDemand&&(L.onDemand=e.onDemand)},so=new Set,co=[],lo=[],uo=0,fo={get idle(){return!so.size&&!co.length},start(e){uo>e.priority?(so.add(e),L.onStart(po)):(mo(e),L(ho))},advance:ho,sort(e){if(uo)L.onFrame(()=>fo.sort(e));else{let t=co.indexOf(e);~t&&(co.splice(t,1),z(e))}},clear(){co=[],so.clear()}};function po(){so.forEach(mo),so.clear(),L(ho)}function mo(e){co.includes(e)||z(e)}function z(e){co.splice(go(co,t=>t.priority>e.priority),0,e)}function ho(e){let t=lo;for(let n=0;n<co.length;n++){let r=co[n];uo=r.priority,r.idle||(ao(r),r.advance(e),r.idle||t.push(r))}return uo=0,lo=co,lo.length=0,co=t,co.length>0}function go(e,t){let n=e.findIndex(t);return n<0?e.length:n}var _o=(e,t,n)=>Math.min(Math.max(n,e),t),vo={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},yo=`[-+]?\\d*\\.?\\d+`,bo=`[-+]?\\d*\\.?\\d+%`;function xo(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var So=RegExp(`rgb`+xo(yo,yo,yo)),Co=RegExp(`rgba`+xo(yo,yo,yo,yo)),wo=RegExp(`hsl`+xo(yo,bo,bo)),To=RegExp(`hsla`+xo(yo,bo,bo,yo)),Eo=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Do=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Oo=/^#([0-9a-fA-F]{6})$/,ko=/^#([0-9a-fA-F]{8})$/;function Ao(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Oo.exec(e))?parseInt(t[1]+`ff`,16)>>>0:ro&&ro[e]!==void 0?ro[e]:(t=So.exec(e))?(No(t[1])<<24|No(t[2])<<16|No(t[3])<<8|255)>>>0:(t=Co.exec(e))?(No(t[1])<<24|No(t[2])<<16|No(t[3])<<8|Fo(t[4]))>>>0:(t=Eo.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=ko.exec(e))?parseInt(t[1],16)>>>0:(t=Do.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=wo.exec(e))?(Mo(Po(t[1]),Io(t[2]),Io(t[3]))|255)>>>0:(t=To.exec(e))?(Mo(Po(t[1]),Io(t[2]),Io(t[3]))|Fo(t[4]))>>>0:null}function jo(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Mo(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=jo(i,r,e+1/3),o=jo(i,r,e),s=jo(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function No(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Po(e){return(parseFloat(e)%360+360)%360/360}function Fo(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Io(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Lo(e){let t=Ao(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var Ro=(e,t,n)=>{if(R.fun(e))return e;if(R.arr(e))return Ro({range:e,output:t,extrapolate:n});if(R.str(e.output[0]))return to(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=Bo(e,a);return zo(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function zo(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function Bo(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Vo=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return _o(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},Ho=1.70158,Uo=Ho*1.525,Wo=2.70158,Go=2*Math.PI/3,Ko=2*Math.PI/4.5,qo=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Jo={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>Wo*e*e*e-Ho*e*e,easeOutBack:e=>1+Wo*(e-1)**3+Ho*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(3.5949095*2*e-Uo)/2:((2*e-2)**2*(3.5949095*(e*2-2)+Uo)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*Go),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*Go)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*Ko))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*Ko)/2+1,easeInBounce:e=>1-qo(1-e),easeOutBounce:qo,easeInOutBounce:e=>e<.5?(1-qo(1-2*e))/2:(1+qo(2*e-1))/2,steps:Vo},Yo=Symbol.for(`FluidValue.get`),Xo=Symbol.for(`FluidValue.observers`),Zo=e=>!!(e&&e[Yo]),Qo=e=>e&&e[Yo]?e[Yo]():e,$o=e=>e[Xo]||null;function es(e,t){e.eventObserved?e.eventObserved(t):e(t)}function ts(e,t){let n=e[Xo];n&&n.forEach(e=>{es(e,t)})}var ns=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);rs(this,e)}},rs=(e,t)=>os(e,Yo,t);function is(e,t){if(e[Yo]){let n=e[Xo];n||os(e,Xo,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function as(e,t){let n=e[Xo];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[Xo]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var os=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ss=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,cs=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ls=RegExp(`(${ss.source})(%|[a-z]+)`,`i`),us=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ds=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,fs=e=>{let[t,n]=ps(e);if(!t||$a())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&ds.test(n)?fs(n):n||e},ps=e=>{let t=ds.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},ms,hs=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,gs=e=>e.match(ss)??[],_s=e=>{ms||=ro?RegExp(`(${Object.keys(ro).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>Qo(e).replace(ds,fs).replace(cs,Lo).replace(ms,Lo)),n=t.map(e=>gs(e).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>Ro({...e,output:t})),i=e.range||[0,1],a=t.map(e=>gs(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!ls.test(t[0])&&t.find(e=>ls.test(e))?.replace(ss,``),s=0;return t[0].replace(ss,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(us,hs)}},vs=`react-spring: `,ys=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${vs}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},bs=ys(console.warn);function xs(){bs(`${vs}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Ss=ys(console.warn);function Cs(){Ss(`${vs}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function ws(e){return R.str(e)&&(e[0]==`#`||/\d/.test(e)||!$a()&&ds.test(e)||e in(ro||{}))}var Ts=$a()?b.useEffect:b.useLayoutEffect,Es=()=>{let e=(0,b.useRef)(!1);return Ts(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ds(){let e=(0,b.useState)()[1],t=Es();return()=>{t.current&&e(Math.random())}}var Os=e=>(0,b.useEffect)(e,ks),ks=[];function As(e){let t=(0,b.useRef)(void 0);return(0,b.useEffect)(()=>{t.current=e}),t.current}var js=Symbol.for(`Animated:node`),Ms=e=>!!e&&e[js]===e,Ns=e=>e&&e[js],Ps=(e,t)=>Ka(e,js,t),Fs=e=>e&&e[js]&&e[js].getPayload(),Is=class{constructor(){Ps(this,this)}getPayload(){return this.payload||[]}},Ls=class e extends Is{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,R.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return R.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,R.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Rs=class e extends Ls{constructor(e){super(0),this._string=null,this._toString=Ro({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(R.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Ro({output:[this.getValue(),e]})),this._value=0,super.reset()}},zs={dependencies:null},Bs=class extends Is{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Ya(this.source,(n,r)=>{Ms(n)?t[r]=n.getValue(e):Zo(n)?t[r]=Qo(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Ja(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return Ya(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){zs.dependencies&&Zo(e)&&zs.dependencies.add(e);let t=Fs(e);t&&Ja(t,e=>this.add(e))}},Vs=class e extends Bs{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(Hs)),!0)}};function Hs(e){return(ws(e)?Rs:Ls).create(e)}function Us(e){let t=Ns(e);return t?t.constructor:R.arr(e)?Vs:ws(e)?Rs:Ls}var Ws=(e,t)=>{let n=!R.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,b.forwardRef)((r,i)=>{let a=(0,b.useRef)(null),o=n&&(0,b.useCallback)(e=>{a.current=qs(i,e)},[i]),[s,c]=Ks(r,t),l=Ds(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new Gs(u,c),f=(0,b.useRef)(void 0);Ts(()=>(f.current=d,Ja(c,e=>is(e,d)),()=>{f.current&&(Ja(f.current.deps,e=>as(e,f.current)),L.cancel(f.current.update))})),(0,b.useEffect)(u,[]),Os(()=>()=>{let e=f.current;Ja(e.deps,t=>as(t,e))});let p=t.getComponentProps(s.getValue());return b.createElement(e,{...p,ref:o})})},Gs=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&L.write(this.update)}};function Ks(e,t){let n=new Set;return zs.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Bs(e),zs.dependencies=null,[e,n]}function qs(e,t){return e&&(R.fun(e)?e(t):e.current=t),t}var Js=Symbol.for(`AnimatedComponent`),Ys=new WeakMap,Xs=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Bs(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=Zs(e)||`Anonymous`;if(R.str(e))e=a[e]||(a[e]=Ws(e,i));else{let t=e[Js]??Ys.get(e);if(!t){t=Ws(e,i);try{e[Js]=t}catch{}Ys.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return Ya(e,(t,n)=>{R.arr(e)&&(n=Zs(t)),a[n]=a(t)}),{animated:a}},Zs=e=>R.str(e)?e:e&&R.str(e.displayName)?e.displayName:R.fun(e)&&e.name||null;function Qs(e,...t){return R.fun(e)?e(...t):e}var $s=(e,t)=>e===!0||!!(t&&e&&(R.fun(e)?e(t):Xa(e).includes(t))),ec=(e,t)=>R.obj(e)?t&&e[t]:e,tc=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,nc=e=>e,rc=(e,t=nc)=>{let n=ic;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);R.und(n)||(r[i]=n)}return r},ic=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],ac={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function oc(e){let t={},n=0;if(Ya(e,(e,r)=>{ac[r]||(t[r]=e,n++)}),n)return t}function sc(e){let t=oc(e);if(t){let n={to:t};return Ya(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function cc(e){let t=Qo(e);return R.arr(t)?t.map(cc):ws(t)?eo.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function lc(e){for(let t in e)return!0;return!1}function uc(e){return R.fun(e)||R.arr(e)&&R.obj(e[0])}function dc(e,t){e.ref?.delete(e),t?.delete(e)}function fc(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var pc={...{default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}}.default,mass:1,damping:1,easing:Jo.linear,clamp:!1},mc=class{constructor(){this.velocity=0,Object.assign(this,pc)}};function hc(e,t,n){n&&(n={...n},gc(n,t),t={...n,...t}),gc(e,t),Object.assign(e,t);for(let t in pc)e[t]??(e[t]=pc[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return R.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function gc(e,t){if(!R.und(t.decay))e.duration=void 0;else{let n=!R.und(t.tension)||!R.und(t.friction);(n||!R.und(t.frequency)||!R.und(t.damping)||!R.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var _c=[],vc=class{constructor(){this.changed=!1,this.values=_c,this.toValues=null,this.fromValues=_c,this.config=new mc,this.immediate=!1}};function yc(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=$s(n.cancel??r?.cancel,t);if(u)p();else{R.und(n.pause)||(i.paused=$s(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||$s(e,t)),c=Qs(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-L.now()}function f(){c>0&&!eo.skipAnimation?(i.delayed=!0,l=L.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(e){s(e)}}})}var bc=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?Cc(e.get()):t.every(e=>e.noop)?xc(e.get()):Sc(e.get(),t.every(e=>e.finished)),xc=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Sc=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Cc=e=>({value:e,cancelled:!0,finished:!1});function wc(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=rc(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&Cc(r)||i!==n.asyncId&&Sc(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new Ec,o=new Dc;return(async()=>{p(a);let s=R.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,Ya(l,(e,t)=>{R.und(s[t])&&(s[t]=e)}),eo.skipAnimation){if(++m>1024)throw Tc(n),o.result=Sc(r,!1),d(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},g;try{let t;t=R.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),g=Sc(r.get(),!0,!1)}catch(e){if(e instanceof Ec)g=e.result;else if(e instanceof Dc)g=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return R.fun(o)&&L.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function Tc(e,t){Za(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Ec=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Dc=class extends Error{constructor(){super(`SkipAnimationSignal`)}},Oc=e=>e instanceof Ac,kc=1,Ac=class extends ns{constructor(...e){super(...e),this.id=kc++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Ns(this);return e&&e.getValue()}to(...e){return eo.to(this,e)}interpolate(...e){return xs(),eo.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){ts(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||fo.sort(this),ts(this,{type:`priority`,parent:this,priority:e})}},jc=Symbol.for(`SpringPhase`),Mc=1,Nc=2,Pc=4,Fc=e=>(e[jc]&Mc)>0,Ic=e=>(e[jc]&Nc)>0,Lc=e=>(e[jc]&Pc)>0,Rc=(e,t)=>t?e[jc]|=3:e[jc]&=-3,zc=(e,t)=>t?e[jc]|=Pc:e[jc]&=-5,Bc=class extends Ac{constructor(e,t){if(super(),this.animation=new vc,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!R.und(e)||!R.und(t)){let n=R.obj(e)?{...e}:{...t,from:e};R.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ic(this)||this._state.asyncTo)||Lc(this)}get goal(){return Qo(this.animation.to)}get velocity(){let e=Ns(this);return e instanceof Ls?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return Fc(this)}get isAnimating(){return Ic(this)}get isPaused(){return Lc(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=Fs(r.to);!o&&Zo(r.to)&&(i=Xa(Qo(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==Rs?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=R.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,Math.min(1,Math.abs(l-n)*.001)));if(!R.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!R.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=Ns(this),c=s.getValue();if(t){let e=Qo(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return L.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ic(this)){let{to:e,config:t}=this.animation;L.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return R.und(e)?(n=this.queue||[],this.queue=[]):n=[R.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>bc(this,e))}stop(e){let{to:t}=this.animation;return R.und(t)||this._focus(this.get()),Tc(this._state,e&&this._lastCallId),L.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=R.obj(n)?n[t]:n,(n==null||uc(n))&&(n=void 0),r=R.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return Fc(this)||(e.reverse&&([n,r]=[r,n]),r=Qo(r),R.und(r)?Ns(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,rc(e,(e,t)=>/^on/.test(t)?ec(e,n):e)),qc(this,e,`onProps`),Jc(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return yc(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Lc(this)||(zc(this,!0),Qa(a.pauseQueue),Jc(this,`onPause`,Sc(this,Vc(this,this.animation.to)),this))},resume:()=>{Lc(this)&&(zc(this,!1),Ic(this)&&this._resume(),Qa(a.resumeQueue),Jc(this,`onResume`,Sc(this,Vc(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=Hc(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Cc(this));let r=!R.und(e.to),i=!R.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Cc(this));let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||R.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!qa(d,l);f&&(s.from=d),d=Qo(d);let p=!qa(u,c);p&&this._focus(u);let m=uc(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&!h.decay&&(h.velocity=0),t.config&&!m&&hc(h,Qs(t.config,a),t.config===o.config?void 0:Qs(o.config,a));let v=Ns(this);if(!v||R.und(u))return n(Sc(this,!0));let y=R.und(t.reset)?i&&!t.default:!R.und(d)&&$s(t.reset,a),b=y?d:this.get(),x=cc(u),S=R.num(x)||R.arr(x)||ws(x),C=!m&&(!S||$s(o.immediate||t.immediate,a));if(p){let e=Us(u);if(e!==v.constructor)if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}let w=v.constructor,T=Zo(u),ee=!1;if(!T){let e=y||!Fc(this)&&f;(p||e)&&(ee=qa(cc(b),x),T=!ee),(!qa(s.immediate,C)&&!C||!qa(h.decay,g)||!qa(h.velocity,_))&&(T=!0)}if(ee&&Ic(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||Zo(c))&&(s.values=v.getPayload(),s.toValues=Zo(u)?null:w==Rs?[1]:Xa(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;Ja(Kc,e=>qc(this,t,e));let r=Sc(this,Vc(this,c));Qa(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&L.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?Qs(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(wc(t.to,t,this._state,this)):T?this._start():Ic(this)&&!p?this._pendingCalls.add(n):n(xc(b))}_focus(e){let t=this.animation;e!==t.to&&($o(this)&&this._detach(),t.to=e,$o(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Zo(t)&&(is(t,this),Oc(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Zo(e)&&as(e,this)}_set(e,t=!0){let n=Qo(e);if(!R.und(n)){let e=Ns(this);if(!e||!qa(n,e.getValue())){let r=Us(n);!e||e.constructor!=r?Ps(this,r.create(n)):e.setValue(n),e&&L.batchedUpdates(()=>{this._onChange(n,t)})}}return Ns(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,Jc(this,`onStart`,Sc(this,Vc(this,e.to)),this))}_onChange(e,t){let n=Sc(e,!1);t||(this._onStart(),Qs(this.animation.onChange,n,this)),Qs(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;Ns(this).reset(Qo(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),Ic(this)||(Rc(this,!0),Lc(this)||this._resume())}_resume(){eo.skipAnimation?this.finish():fo.start(this)}_stop(e,t){if(Ic(this)){Rc(this,!1);let n=this.animation;Ja(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),ts(this,{type:`idle`,parent:this});let r=t?Cc(this.get()):Sc(this.get(),Vc(this,e??n.to));Qa(this._pendingCalls,r),n.changed=!1,Jc(this,`onRest`,r,this)}}};function Vc(e,t){let n=cc(t);return qa(cc(e.get()),n)}function Hc(e,t=e.loop,n=e.to){let r=Qs(t);if(r){let i=r!==!0&&sc(r),a=(i||e).reverse,o=!i||i.reset;return Uc({...e,loop:t,default:!1,pause:void 0,to:!a||uc(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Uc(e){let{to:t,from:n}=e=sc(e),r=new Set;return R.obj(t)&&Gc(t,r),R.obj(n)&&Gc(n,r),e.keys=r.size?Array.from(r):null,e}function Wc(e){let t=Uc(e);return R.und(t.default)&&(t.default=rc(t)),t}function Gc(e,t){Ya(e,(e,n)=>e!=null&&t.add(n))}var Kc=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function qc(e,t,n){e.animation[n]=t[n]===tc(t,n)?void 0:ec(t[n],e.key)}function Jc(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Yc=[`onStart`,`onChange`,`onRest`],Xc=1,Zc=class{constructor(e,t){this.id=Xc++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];R.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Uc(e)),this}start(e){let{queue:t}=this;return e?t=Xa(e).map(Uc):this.queue=[],this._flush?this._flush(this,t):(il(this,t),Qc(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;Ja(Xa(t),t=>n[t].stop(!!e))}else Tc(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(R.und(e))this.start({pause:!0});else{let t=this.springs;Ja(Xa(e),e=>t[e].pause())}return this}resume(e){if(R.und(e))this.start({pause:!1});else{let t=this.springs;Ja(Xa(e),e=>t[e].resume())}return this}each(e){Ya(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(e)}}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,Za(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&Za(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,Za(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;L.onFrame(this._onFrame)}};function Qc(e,t){return Promise.all(t.map(t=>$c(e,t))).then(t=>bc(e,t))}async function $c(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=R.obj(t.default)&&t.default;o&&(t.loop=!1);let u=t,d=!n&&!u.parentId&&`loop`in t?++e._lastLoopId:n?u.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let f=R.arr(i)||R.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):Ja(Yc,n=>{let r=t[n];if(R.fun(r)){let i=e._events[n];t[n]=(({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})}),l&&(l[n]=t[n])}});let p=e._state;t.pause===!p.paused?(p.paused=t.pause,Qa(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=t.cancel===!0||tc(t,`cancel`)===!0;(f||h&&p.asyncId)&&m.push(yc(++e._lastAsyncId,{props:t,state:p,actions:{pause:Ga,resume:Ga,start(t,n){h?(Tc(p,e._lastAsyncId),n(Cc(e))):(t.onRest=s,n(wc(f,t,p,e)))}}})),p.paused&&await new Promise(e=>{p.resumeQueue.add(e)});let g=bc(e,await Promise.all(m));if(o&&g.finished&&!(n&&g.noop)&&d===e._lastLoopId){let n=Hc(t,o,i);if(n)return n.loopId=d,e._onLoopReset?.forEach(e=>e()),il(e,[n]),$c(e,n,!0)}return c&&L.batchedUpdates(()=>c(g,e,e.item)),g}function el(e,t){let n={...e.springs};return t&&Ja(Xa(t),e=>{R.und(e.keys)&&(e=Uc(e)),R.obj(e.to)||(e={...e,to:void 0}),rl(n,e,e=>nl(e))}),tl(e,n),n}function tl(e,t){Ya(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,is(t,e))})}function nl(e,t){let n=new Bc;return n.key=e,t&&is(n,t),n}function rl(e,t,n){t.keys&&Ja(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function il(e,t){Ja(t,t=>{rl(e.springs,t,t=>nl(t,e))})}var al=b.createContext({pause:!1,immediate:!1}),ol=()=>{let e=[],t=function(t){Cs();let r=[];return Ja(e,(e,i)=>{if(R.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Ja(e,e=>e.pause(...arguments)),this},t.resume=function(){return Ja(e,e=>e.resume(...arguments)),this},t.set=function(t){Ja(e,(e,n)=>{let r=R.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return Ja(e,(e,r)=>{if(R.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return Ja(e,e=>e.stop(...arguments)),this},t.update=function(t){return Ja(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return R.fun(e)?e(n,t):e};return t._getProps=n,t};function sl(e,t,n){let r=R.fun(t)&&t;r&&!n&&(n=[]);let i=(0,b.useMemo)(()=>r||arguments.length==3?ol():void 0,[]),a=(0,b.useRef)(0),o=Ds(),s=(0,b.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=el(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?Qc(e,t):new Promise(r=>{tl(e,n),s.queue.push(()=>{r(Qc(e,t))}),o()})}}),[]),c=(0,b.useRef)([...s.ctrls]),l=(0,b.useRef)([]),u=(0,b.useRef)([]);u.current=[];let d=As(e)||0;(0,b.useMemo)(()=>{Ja(c.current.slice(e,d),e=>{dc(e,i),e.stop(!0)}),c.current.length=e,f(d,e)},[e]),(0,b.useMemo)(()=>{f(0,Math.min(d,e))},n);function f(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new Zc(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=Wc(n))}}let p=c.current.map((e,t)=>el(e,l.current[t])),m=(0,b.useContext)(al),h=m!==As(m)&&lc(m);Ts(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],Ja(e,e=>e()));let t=l.current.length>0?l.current:u.current;Ja(c.current,(e,n)=>{i?.add(e),h&&e.start({default:m});let r=t[n];r&&(fc(e,r.ref),e.ref?e.queue.push({...r,default:R.obj(r.default)?{...r.default}:r.default}):e.start(r))}),l.current.length>0&&(u.current=l.current),l.current=[]}),Os(()=>()=>{Ja(s.ctrls,e=>e.stop(!0))});let g=p.map(e=>({...e}));return i?[g,i]:g}function cl(e,t){let n=R.fun(e),[[r],i]=sl(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var ll=class extends Ac{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Ro(...t);let n=this._get(),r=Us(n);Ps(this,r.create(n))}advance(e){let t=this._get();qa(t,this.get())||(Ns(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&dl(this._active)&&fl(this)}_get(){let e=R.arr(this.source)?this.source.map(Qo):Xa(Qo(this.source));return this.calc(...e)}_start(){this.idle&&!dl(this._active)&&(this.idle=!1,Ja(Fs(this),e=>{e.done=!1}),eo.skipAnimation?(L.batchedUpdates(()=>this.advance()),fl(this)):fo.start(this))}_attach(){let e=1;Ja(Xa(this.source),t=>{Zo(t)&&is(t,this),Oc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Ja(Xa(this.source),e=>{Zo(e)&&as(e,this)}),this._active.clear(),fl(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=Xa(this.source).reduce((e,t)=>Math.max(e,(Oc(t)?t.priority:0)+1),0))}};function ul(e){return e.idle!==!1}function dl(e){return!e.size||Array.from(e).every(ul)}function fl(e){e.idle||(e.idle=!0,Ja(Fs(e),e=>{e.done=!0}),ts(e,{type:`idle`,parent:e}))}var B=(e,...t)=>new ll(e,t);eo.assign({createStringInterpolator:_s,to:(e,t)=>new ll(e,t)}),fo.advance;var pl=/^--/;function ml(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!pl.test(e)&&!(_l.hasOwnProperty(e)&&_l[e])?t+`px`:(``+t).trim()}var hl={};function gl(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:hl[t]||(hl[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=ml(t,i[t]);pl.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var _l={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vl=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),yl=[`Webkit`,`Ms`,`Moz`,`O`];_l=Object.keys(_l).reduce((e,t)=>(yl.forEach(n=>e[vl(n,t)]=e[t]),e),_l);var bl=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,xl=/^(translate)/,Sl=/^(rotate|skew)/,Cl=(e,t)=>R.num(e)&&e!==0?e+t:e,wl=(e,t)=>R.arr(e)?e.every(e=>wl(e,t)):R.num(e)?e===t:parseFloat(e)===t,Tl=class extends Bs{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>Cl(e,`px`)).join(`,`)})`,wl(e,0)])),Ya(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(bl.test(t)){if(delete r[t],R.und(e))return;let n=xl.test(t)?`px`:Sl.test(t)?`deg`:``;i.push(Xa(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${Cl(i,n)})`,wl(i,0)]:e=>[`${t}(${e.map(e=>Cl(e,n)).join(`,`)})`,wl(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new El(i,a)),super(r)}},El=class extends ns{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return Ja(this.inputs,(n,r)=>{let i=Qo(n[0]),[a,o]=this.transforms[r](R.arr(i)?i:n.map(Qo));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&Ja(this.inputs,e=>Ja(e,e=>Zo(e)&&is(e,this)))}observerRemoved(e){e==0&&Ja(this.inputs,e=>Ja(e,e=>Zo(e)&&as(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),ts(this,e)}},Dl=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`);eo.assign({batchedUpdates:wa.unstable_batchedUpdates,createStringInterpolator:_s,colors:vo});var Ol=Xs(Dl,{applyAnimatedValues:gl,createAnimatedStyle:e=>new Tl(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,kl=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L`.split(`.`),Al=[[697,698,`ON`],[706,719,`ON`],[722,735,`ON`],[741,749,`ON`],[751,767,`ON`],[768,879,`NSM`],[884,885,`ON`],[894,894,`ON`],[900,901,`ON`],[903,903,`ON`],[1014,1014,`ON`],[1155,1161,`NSM`],[1418,1418,`ON`],[1421,1422,`ON`],[1423,1423,`ET`],[1424,1424,`R`],[1425,1469,`NSM`],[1470,1470,`R`],[1471,1471,`NSM`],[1472,1472,`R`],[1473,1474,`NSM`],[1475,1475,`R`],[1476,1477,`NSM`],[1478,1478,`R`],[1479,1479,`NSM`],[1480,1535,`R`],[1536,1541,`AN`],[1542,1543,`ON`],[1544,1544,`AL`],[1545,1546,`ET`],[1547,1547,`AL`],[1548,1548,`CS`],[1549,1549,`AL`],[1550,1551,`ON`],[1552,1562,`NSM`],[1563,1610,`AL`],[1611,1631,`NSM`],[1632,1641,`AN`],[1642,1642,`ET`],[1643,1644,`AN`],[1645,1647,`AL`],[1648,1648,`NSM`],[1649,1749,`AL`],[1750,1756,`NSM`],[1757,1757,`AN`],[1758,1758,`ON`],[1759,1764,`NSM`],[1765,1766,`AL`],[1767,1768,`NSM`],[1769,1769,`ON`],[1770,1773,`NSM`],[1774,1775,`AL`],[1776,1785,`EN`],[1786,1808,`AL`],[1809,1809,`NSM`],[1810,1839,`AL`],[1840,1866,`NSM`],[1867,1957,`AL`],[1958,1968,`NSM`],[1969,1983,`AL`],[1984,2026,`R`],[2027,2035,`NSM`],[2036,2037,`R`],[2038,2041,`ON`],[2042,2044,`R`],[2045,2045,`NSM`],[2046,2069,`R`],[2070,2073,`NSM`],[2074,2074,`R`],[2075,2083,`NSM`],[2084,2084,`R`],[2085,2087,`NSM`],[2088,2088,`R`],[2089,2093,`NSM`],[2094,2136,`R`],[2137,2139,`NSM`],[2140,2143,`R`],[2144,2191,`AL`],[2192,2193,`AN`],[2194,2198,`AL`],[2199,2207,`NSM`],[2208,2249,`AL`],[2250,2273,`NSM`],[2274,2274,`AN`],[2275,2306,`NSM`],[2362,2362,`NSM`],[2364,2364,`NSM`],[2369,2376,`NSM`],[2381,2381,`NSM`],[2385,2391,`NSM`],[2402,2403,`NSM`],[2433,2433,`NSM`],[2492,2492,`NSM`],[2497,2500,`NSM`],[2509,2509,`NSM`],[2530,2531,`NSM`],[2546,2547,`ET`],[2555,2555,`ET`],[2558,2558,`NSM`],[2561,2562,`NSM`],[2620,2620,`NSM`],[2625,2626,`NSM`],[2631,2632,`NSM`],[2635,2637,`NSM`],[2641,2641,`NSM`],[2672,2673,`NSM`],[2677,2677,`NSM`],[2689,2690,`NSM`],[2748,2748,`NSM`],[2753,2757,`NSM`],[2759,2760,`NSM`],[2765,2765,`NSM`],[2786,2787,`NSM`],[2801,2801,`ET`],[2810,2815,`NSM`],[2817,2817,`NSM`],[2876,2876,`NSM`],[2879,2879,`NSM`],[2881,2884,`NSM`],[2893,2893,`NSM`],[2901,2902,`NSM`],[2914,2915,`NSM`],[2946,2946,`NSM`],[3008,3008,`NSM`],[3021,3021,`NSM`],[3059,3064,`ON`],[3065,3065,`ET`],[3066,3066,`ON`],[3072,3072,`NSM`],[3076,3076,`NSM`],[3132,3132,`NSM`],[3134,3136,`NSM`],[3142,3144,`NSM`],[3146,3149,`NSM`],[3157,3158,`NSM`],[3170,3171,`NSM`],[3192,3198,`ON`],[3201,3201,`NSM`],[3260,3260,`NSM`],[3276,3277,`NSM`],[3298,3299,`NSM`],[3328,3329,`NSM`],[3387,3388,`NSM`],[3393,3396,`NSM`],[3405,3405,`NSM`],[3426,3427,`NSM`],[3457,3457,`NSM`],[3530,3530,`NSM`],[3538,3540,`NSM`],[3542,3542,`NSM`],[3633,3633,`NSM`],[3636,3642,`NSM`],[3647,3647,`ET`],[3655,3662,`NSM`],[3761,3761,`NSM`],[3764,3772,`NSM`],[3784,3790,`NSM`],[3864,3865,`NSM`],[3893,3893,`NSM`],[3895,3895,`NSM`],[3897,3897,`NSM`],[3898,3901,`ON`],[3953,3966,`NSM`],[3968,3972,`NSM`],[3974,3975,`NSM`],[3981,3991,`NSM`],[3993,4028,`NSM`],[4038,4038,`NSM`],[4141,4144,`NSM`],[4146,4151,`NSM`],[4153,4154,`NSM`],[4157,4158,`NSM`],[4184,4185,`NSM`],[4190,4192,`NSM`],[4209,4212,`NSM`],[4226,4226,`NSM`],[4229,4230,`NSM`],[4237,4237,`NSM`],[4253,4253,`NSM`],[4957,4959,`NSM`],[5008,5017,`ON`],[5120,5120,`ON`],[5760,5760,`WS`],[5787,5788,`ON`],[5906,5908,`NSM`],[5938,5939,`NSM`],[5970,5971,`NSM`],[6002,6003,`NSM`],[6068,6069,`NSM`],[6071,6077,`NSM`],[6086,6086,`NSM`],[6089,6099,`NSM`],[6107,6107,`ET`],[6109,6109,`NSM`],[6128,6137,`ON`],[6144,6154,`ON`],[6155,6157,`NSM`],[6158,6158,`BN`],[6159,6159,`NSM`],[6277,6278,`NSM`],[6313,6313,`NSM`],[6432,6434,`NSM`],[6439,6440,`NSM`],[6450,6450,`NSM`],[6457,6459,`NSM`],[6464,6464,`ON`],[6468,6469,`ON`],[6622,6655,`ON`],[6679,6680,`NSM`],[6683,6683,`NSM`],[6742,6742,`NSM`],[6744,6750,`NSM`],[6752,6752,`NSM`],[6754,6754,`NSM`],[6757,6764,`NSM`],[6771,6780,`NSM`],[6783,6783,`NSM`],[6832,6877,`NSM`],[6880,6891,`NSM`],[6912,6915,`NSM`],[6964,6964,`NSM`],[6966,6970,`NSM`],[6972,6972,`NSM`],[6978,6978,`NSM`],[7019,7027,`NSM`],[7040,7041,`NSM`],[7074,7077,`NSM`],[7080,7081,`NSM`],[7083,7085,`NSM`],[7142,7142,`NSM`],[7144,7145,`NSM`],[7149,7149,`NSM`],[7151,7153,`NSM`],[7212,7219,`NSM`],[7222,7223,`NSM`],[7376,7378,`NSM`],[7380,7392,`NSM`],[7394,7400,`NSM`],[7405,7405,`NSM`],[7412,7412,`NSM`],[7416,7417,`NSM`],[7616,7679,`NSM`],[8125,8125,`ON`],[8127,8129,`ON`],[8141,8143,`ON`],[8157,8159,`ON`],[8173,8175,`ON`],[8189,8190,`ON`],[8192,8202,`WS`],[8203,8205,`BN`],[8207,8207,`R`],[8208,8231,`ON`],[8232,8232,`WS`],[8233,8233,`B`],[8234,8238,`BN`],[8239,8239,`CS`],[8240,8244,`ET`],[8245,8259,`ON`],[8260,8260,`CS`],[8261,8286,`ON`],[8287,8287,`WS`],[8288,8303,`BN`],[8304,8304,`EN`],[8308,8313,`EN`],[8314,8315,`ES`],[8316,8318,`ON`],[8320,8329,`EN`],[8330,8331,`ES`],[8332,8334,`ON`],[8352,8399,`ET`],[8400,8432,`NSM`],[8448,8449,`ON`],[8451,8454,`ON`],[8456,8457,`ON`],[8468,8468,`ON`],[8470,8472,`ON`],[8478,8483,`ON`],[8485,8485,`ON`],[8487,8487,`ON`],[8489,8489,`ON`],[8494,8494,`ET`],[8506,8507,`ON`],[8512,8516,`ON`],[8522,8525,`ON`],[8528,8543,`ON`],[8585,8587,`ON`],[8592,8721,`ON`],[8722,8722,`ES`],[8723,8723,`ET`],[8724,9013,`ON`],[9083,9108,`ON`],[9110,9257,`ON`],[9280,9290,`ON`],[9312,9351,`ON`],[9352,9371,`EN`],[9450,9899,`ON`],[9901,10239,`ON`],[10496,11123,`ON`],[11126,11263,`ON`],[11493,11498,`ON`],[11503,11505,`NSM`],[11513,11519,`ON`],[11647,11647,`NSM`],[11744,11775,`NSM`],[11776,11869,`ON`],[11904,11929,`ON`],[11931,12019,`ON`],[12032,12245,`ON`],[12272,12287,`ON`],[12288,12288,`WS`],[12289,12292,`ON`],[12296,12320,`ON`],[12330,12333,`NSM`],[12336,12336,`ON`],[12342,12343,`ON`],[12349,12351,`ON`],[12441,12442,`NSM`],[12443,12444,`ON`],[12448,12448,`ON`],[12539,12539,`ON`],[12736,12773,`ON`],[12783,12783,`ON`],[12829,12830,`ON`],[12880,12895,`ON`],[12924,12926,`ON`],[12977,12991,`ON`],[13004,13007,`ON`],[13175,13178,`ON`],[13278,13279,`ON`],[13311,13311,`ON`],[19904,19967,`ON`],[42128,42182,`ON`],[42509,42511,`ON`],[42607,42610,`NSM`],[42611,42611,`ON`],[42612,42621,`NSM`],[42622,42623,`ON`],[42654,42655,`NSM`],[42736,42737,`NSM`],[42752,42785,`ON`],[42888,42888,`ON`],[43010,43010,`NSM`],[43014,43014,`NSM`],[43019,43019,`NSM`],[43045,43046,`NSM`],[43048,43051,`ON`],[43052,43052,`NSM`],[43064,43065,`ET`],[43124,43127,`ON`],[43204,43205,`NSM`],[43232,43249,`NSM`],[43263,43263,`NSM`],[43302,43309,`NSM`],[43335,43345,`NSM`],[43392,43394,`NSM`],[43443,43443,`NSM`],[43446,43449,`NSM`],[43452,43453,`NSM`],[43493,43493,`NSM`],[43561,43566,`NSM`],[43569,43570,`NSM`],[43573,43574,`NSM`],[43587,43587,`NSM`],[43596,43596,`NSM`],[43644,43644,`NSM`],[43696,43696,`NSM`],[43698,43700,`NSM`],[43703,43704,`NSM`],[43710,43711,`NSM`],[43713,43713,`NSM`],[43756,43757,`NSM`],[43766,43766,`NSM`],[43882,43883,`ON`],[44005,44005,`NSM`],[44008,44008,`NSM`],[44013,44013,`NSM`],[64285,64285,`R`],[64286,64286,`NSM`],[64287,64296,`R`],[64297,64297,`ES`],[64298,64335,`R`],[64336,64450,`AL`],[64451,64466,`ON`],[64467,64829,`AL`],[64830,64847,`ON`],[64848,64911,`AL`],[64912,64913,`ON`],[64914,64967,`AL`],[64968,64975,`ON`],[64976,65007,`BN`],[65008,65020,`AL`],[65021,65023,`ON`],[65024,65039,`NSM`],[65040,65049,`ON`],[65056,65071,`NSM`],[65072,65103,`ON`],[65104,65104,`CS`],[65105,65105,`ON`],[65106,65106,`CS`],[65108,65108,`ON`],[65109,65109,`CS`],[65110,65118,`ON`],[65119,65119,`ET`],[65120,65121,`ON`],[65122,65123,`ES`],[65124,65126,`ON`],[65128,65128,`ON`],[65129,65130,`ET`],[65131,65131,`ON`],[65136,65278,`AL`],[65279,65279,`BN`],[65281,65282,`ON`],[65283,65285,`ET`],[65286,65290,`ON`],[65291,65291,`ES`],[65292,65292,`CS`],[65293,65293,`ES`],[65294,65295,`CS`],[65296,65305,`EN`],[65306,65306,`CS`],[65307,65312,`ON`],[65339,65344,`ON`],[65371,65381,`ON`],[65504,65505,`ET`],[65506,65508,`ON`],[65509,65510,`ET`],[65512,65518,`ON`],[65520,65528,`BN`],[65529,65533,`ON`],[65534,65535,`BN`],[65793,65793,`ON`],[65856,65932,`ON`],[65936,65948,`ON`],[65952,65952,`ON`],[66045,66045,`NSM`],[66272,66272,`NSM`],[66273,66299,`EN`],[66422,66426,`NSM`],[67584,67870,`R`],[67871,67871,`ON`],[67872,68096,`R`],[68097,68099,`NSM`],[68100,68100,`R`],[68101,68102,`NSM`],[68103,68107,`R`],[68108,68111,`NSM`],[68112,68151,`R`],[68152,68154,`NSM`],[68155,68158,`R`],[68159,68159,`NSM`],[68160,68324,`R`],[68325,68326,`NSM`],[68327,68408,`R`],[68409,68415,`ON`],[68416,68863,`R`],[68864,68899,`AL`],[68900,68903,`NSM`],[68904,68911,`AL`],[68912,68921,`AN`],[68922,68927,`AL`],[68928,68937,`AN`],[68938,68968,`R`],[68969,68973,`NSM`],[68974,68974,`ON`],[68975,69215,`R`],[69216,69246,`AN`],[69247,69290,`R`],[69291,69292,`NSM`],[69293,69311,`R`],[69312,69327,`AL`],[69328,69336,`ON`],[69337,69369,`AL`],[69370,69375,`NSM`],[69376,69423,`R`],[69424,69445,`AL`],[69446,69456,`NSM`],[69457,69487,`AL`],[69488,69505,`R`],[69506,69509,`NSM`],[69510,69631,`R`],[69633,69633,`NSM`],[69688,69702,`NSM`],[69714,69733,`ON`],[69744,69744,`NSM`],[69747,69748,`NSM`],[69759,69761,`NSM`],[69811,69814,`NSM`],[69817,69818,`NSM`],[69826,69826,`NSM`],[69888,69890,`NSM`],[69927,69931,`NSM`],[69933,69940,`NSM`],[70003,70003,`NSM`],[70016,70017,`NSM`],[70070,70078,`NSM`],[70089,70092,`NSM`],[70095,70095,`NSM`],[70191,70193,`NSM`],[70196,70196,`NSM`],[70198,70199,`NSM`],[70206,70206,`NSM`],[70209,70209,`NSM`],[70367,70367,`NSM`],[70371,70378,`NSM`],[70400,70401,`NSM`],[70459,70460,`NSM`],[70464,70464,`NSM`],[70502,70508,`NSM`],[70512,70516,`NSM`],[70587,70592,`NSM`],[70606,70606,`NSM`],[70608,70608,`NSM`],[70610,70610,`NSM`],[70625,70626,`NSM`],[70712,70719,`NSM`],[70722,70724,`NSM`],[70726,70726,`NSM`],[70750,70750,`NSM`],[70835,70840,`NSM`],[70842,70842,`NSM`],[70847,70848,`NSM`],[70850,70851,`NSM`],[71090,71093,`NSM`],[71100,71101,`NSM`],[71103,71104,`NSM`],[71132,71133,`NSM`],[71219,71226,`NSM`],[71229,71229,`NSM`],[71231,71232,`NSM`],[71264,71276,`ON`],[71339,71339,`NSM`],[71341,71341,`NSM`],[71344,71349,`NSM`],[71351,71351,`NSM`],[71453,71453,`NSM`],[71455,71455,`NSM`],[71458,71461,`NSM`],[71463,71467,`NSM`],[71727,71735,`NSM`],[71737,71738,`NSM`],[71995,71996,`NSM`],[71998,71998,`NSM`],[72003,72003,`NSM`],[72148,72151,`NSM`],[72154,72155,`NSM`],[72160,72160,`NSM`],[72193,72198,`NSM`],[72201,72202,`NSM`],[72243,72248,`NSM`],[72251,72254,`NSM`],[72263,72263,`NSM`],[72273,72278,`NSM`],[72281,72283,`NSM`],[72330,72342,`NSM`],[72344,72345,`NSM`],[72544,72544,`NSM`],[72546,72548,`NSM`],[72550,72550,`NSM`],[72752,72758,`NSM`],[72760,72765,`NSM`],[72850,72871,`NSM`],[72874,72880,`NSM`],[72882,72883,`NSM`],[72885,72886,`NSM`],[73009,73014,`NSM`],[73018,73018,`NSM`],[73020,73021,`NSM`],[73023,73029,`NSM`],[73031,73031,`NSM`],[73104,73105,`NSM`],[73109,73109,`NSM`],[73111,73111,`NSM`],[73459,73460,`NSM`],[73472,73473,`NSM`],[73526,73530,`NSM`],[73536,73536,`NSM`],[73538,73538,`NSM`],[73562,73562,`NSM`],[73685,73692,`ON`],[73693,73696,`ET`],[73697,73713,`ON`],[78912,78912,`NSM`],[78919,78933,`NSM`],[90398,90409,`NSM`],[90413,90415,`NSM`],[92912,92916,`NSM`],[92976,92982,`NSM`],[94031,94031,`NSM`],[94095,94098,`NSM`],[94178,94178,`ON`],[94180,94180,`NSM`],[113821,113822,`NSM`],[113824,113827,`BN`],[117760,117973,`ON`],[118e3,118009,`EN`],[118010,118012,`ON`],[118016,118451,`ON`],[118458,118480,`ON`],[118496,118512,`ON`],[118528,118573,`NSM`],[118576,118598,`NSM`],[119143,119145,`NSM`],[119155,119162,`BN`],[119163,119170,`NSM`],[119173,119179,`NSM`],[119210,119213,`NSM`],[119273,119274,`ON`],[119296,119361,`ON`],[119362,119364,`NSM`],[119365,119365,`ON`],[119552,119638,`ON`],[120513,120513,`ON`],[120539,120539,`ON`],[120571,120571,`ON`],[120597,120597,`ON`],[120629,120629,`ON`],[120655,120655,`ON`],[120687,120687,`ON`],[120713,120713,`ON`],[120745,120745,`ON`],[120771,120771,`ON`],[120782,120831,`EN`],[121344,121398,`NSM`],[121403,121452,`NSM`],[121461,121461,`NSM`],[121476,121476,`NSM`],[121499,121503,`NSM`],[121505,121519,`NSM`],[122880,122886,`NSM`],[122888,122904,`NSM`],[122907,122913,`NSM`],[122915,122916,`NSM`],[122918,122922,`NSM`],[123023,123023,`NSM`],[123184,123190,`NSM`],[123566,123566,`NSM`],[123628,123631,`NSM`],[123647,123647,`ET`],[124140,124143,`NSM`],[124398,124399,`NSM`],[124643,124643,`NSM`],[124646,124646,`NSM`],[124654,124655,`NSM`],[124661,124661,`NSM`],[124928,125135,`R`],[125136,125142,`NSM`],[125143,125251,`R`],[125252,125258,`NSM`],[125259,126063,`R`],[126064,126143,`AL`],[126144,126207,`R`],[126208,126287,`AL`],[126288,126463,`R`],[126464,126703,`AL`],[126704,126705,`ON`],[126706,126719,`AL`],[126720,126975,`R`],[126976,127019,`ON`],[127024,127123,`ON`],[127136,127150,`ON`],[127153,127167,`ON`],[127169,127183,`ON`],[127185,127221,`ON`],[127232,127242,`EN`],[127243,127247,`ON`],[127279,127279,`ON`],[127338,127343,`ON`],[127405,127405,`ON`],[127584,127589,`ON`],[127744,128728,`ON`],[128732,128748,`ON`],[128752,128764,`ON`],[128768,128985,`ON`],[128992,129003,`ON`],[129008,129008,`ON`],[129024,129035,`ON`],[129040,129095,`ON`],[129104,129113,`ON`],[129120,129159,`ON`],[129168,129197,`ON`],[129200,129211,`ON`],[129216,129217,`ON`],[129232,129240,`ON`],[129280,129623,`ON`],[129632,129645,`ON`],[129648,129660,`ON`],[129664,129674,`ON`],[129678,129734,`ON`],[129736,129736,`ON`],[129741,129756,`ON`],[129759,129770,`ON`],[129775,129784,`ON`],[129792,129938,`ON`],[129940,130031,`ON`],[130032,130041,`EN`],[130042,130042,`ON`],[131070,131071,`BN`],[196606,196607,`BN`],[262142,262143,`BN`],[327678,327679,`BN`],[393214,393215,`BN`],[458750,458751,`BN`],[524286,524287,`BN`],[589822,589823,`BN`],[655358,655359,`BN`],[720894,720895,`BN`],[786430,786431,`BN`],[851966,851967,`BN`],[917502,917759,`BN`],[917760,917999,`NSM`],[918e3,921599,`BN`],[983038,983039,`BN`],[1048574,1048575,`BN`],[1114110,1114111,`BN`]];function jl(e){if(e<=255)return kl[e];let t=0,n=Al.length-1;for(;t<=n;){let r=t+n>>1,i=Al[r];if(e<i[0]){n=r-1;continue}if(e>i[1]){t=r+1;continue}return i[2]}return`L`}function Ml(e){let t=e.length;if(t===0)return null;let n=Array(t),r=!1;for(let i=0;i<t;){let a=e.charCodeAt(i),o=a,s=1;if(a>=55296&&a<=56319&&i+1<t){let t=e.charCodeAt(i+1);t>=56320&&t<=57343&&(o=(a-55296<<10)+(t-56320)+65536,s=2)}let c=jl(o);(c===`R`||c===`AL`||c===`AN`)&&(r=!0);for(let e=0;e<s;e++)n[i+e]=c;i+=s}if(!r)return null;let i=0;for(let e=0;e<t;e++){let t=n[e];if(t===`L`){i=0;break}if(t===`R`||t===`AL`){i=1;break}}let a=new Int8Array(t);for(let e=0;e<t;e++)a[e]=i;let o=i&1?`R`:`L`,s=o,c=s;for(let e=0;e<t;e++)n[e]===`NSM`?n[e]=c:c=n[e];c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`AL`?`AN`:`EN`:(t===`R`||t===`L`||t===`AL`)&&(c=t)}for(let e=0;e<t;e++)n[e]===`AL`&&(n[e]=`R`);for(let e=1;e<t-1;e++)n[e]===`ES`&&n[e-1]===`EN`&&n[e+1]===`EN`&&(n[e]=`EN`),n[e]===`CS`&&(n[e-1]===`EN`||n[e-1]===`AN`)&&n[e+1]===n[e-1]&&(n[e]=n[e-1]);for(let e=0;e<t;e++){if(n[e]!==`EN`)continue;let r;for(r=e-1;r>=0&&n[r]===`ET`;r--)n[r]=`EN`;for(r=e+1;r<t&&n[r]===`ET`;r++)n[r]=`EN`}for(let e=0;e<t;e++){let t=n[e];(t===`WS`||t===`ES`||t===`ET`||t===`CS`)&&(n[e]=`ON`)}c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`L`?`L`:`EN`:(t===`R`||t===`L`)&&(c=t)}for(let e=0;e<t;e++){if(n[e]!==`ON`)continue;let r=e+1;for(;r<t&&n[r]===`ON`;)r++;let i=e>0?n[e-1]:s,a=r<t?n[r]:s,o=i===`L`?`L`:`R`;if(o===(a===`L`?`L`:`R`))for(let t=e;t<r;t++)n[t]=o;e=r-1}for(let e=0;e<t;e++)n[e]===`ON`&&(n[e]=o);for(let e=0;e<t;e++){let t=n[e];a[e]&1?(t===`L`||t===`AN`||t===`EN`)&&a[e]++:t===`R`?a[e]++:(t===`AN`||t===`EN`)&&(a[e]+=2)}return a}function Nl(e,t){let n=Ml(e);if(n===null)return null;let r=new Int8Array(t.length);for(let e=0;e<t.length;e++)r[e]=n[t[e]];return r}var Pl=/[ \t\n\r\f]+/g,Fl=/[\t\n\r\f]| {2,}|^ | $/;function Il(e){let t=e??`normal`;return t===`pre-wrap`?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Ll(e){if(!Fl.test(e))return e;let t=e.replace(Pl,` `);return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Rl(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
|
|
595
|
-
`).replace(/[\r\f]/g,`
|
|
596
|
-
`):e}var zl=null,Bl;function Vl(){return zl===null&&(zl=new Intl.Segmenter(Bl,{granularity:`word`})),zl}var Hl=/\p{Script=Arabic}/u,Ul=/\p{M}/u,Wl=/\p{Nd}/u;function Gl(e){return Hl.test(e)}function V(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function H(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){if(V((n-55296<<10)+(r-56320)+65536))return!0;t++;continue}}if(V(n))return!0}}return!1}function Kl(e){let t=uu(e);return t!==null&&(Ql.has(t)||tu.has(t))}var ql=new Set([`\xA0`,` `,``,``]),Jl=new Set([`-`,`‐`,`–`,`—`]);function Yl(e){let t=uu(e);return t!==null&&ql.has(t)}function Xl(e){let t=uu(e);return t!==null&&Jl.has(t)}function Zl(e,t){return Yl(e)?!1:!t||!(Kl(e)||Xl(e))}var Ql=new Set(`,...!.:.;.?.、.。.・.).〕.〉.》.」.』.】.〗.〙.〛.ー.々.〻.ゝ.ゞ.ヽ.ヾ`.split(`.`)),$l=new Set([`"`,`(`,`[`,`{`,`¡`,`¿`,`“`,`‘`,`‚`,`„`,`«`,`‹`,`⸘`,`(`,`〔`,`〈`,`《`,`「`,`『`,`【`,`〖`,`〘`,`〚`]),eu=new Set([`'`,`’`]),tu=new Set(`.(,(!(?(:(;(،(؛(؟(।(॥(၊(။(၌(၍(၏()(](}(%("(”(’(»(›(…`.split(`(`)),nu=new Set([`:`,`.`,`،`,`؛`]),ru=new Set([`၏`]),iu=new Set([`”`,`’`,`»`,`›`,`」`,`』`,`】`,`》`,`〉`,`〕`,`)`]);function au(e){if(cu(e))return!0;let t=!1;for(let n of e){if(tu.has(n)||hu(n)){t=!0;continue}if(!(t&&Ul.test(n)))return!1}return t}function ou(e){for(let t of e)if(!Ql.has(t)&&!tu.has(t))return!1;return e.length>0}function su(e){if(cu(e))return!0;for(let t of e)if(!$l.has(t)&&!eu.has(t)&&!Ul.test(t)&&!hu(t))return!1;return e.length>0}function cu(e){let t=!1;for(let n of e)if(!(n===`\\`||Ul.test(n))){if($l.has(n)||tu.has(n)||eu.has(n)){t=!0;continue}return!1}return t}function lu(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let r=e.charCodeAt(n);if(r<56320||r>57343)return n;let i=n-1;if(i<0)return n;let a=e.charCodeAt(i);return a>=55296&&a<=56319?i:n}function uu(e){if(e.length===0)return null;let t=lu(e,e.length);return e.slice(t)}function du(e){for(let t of e)if(!Ul.test(t))return t;return null}function fu(e){for(let t=e.length;t>0;){let n=lu(e,t),r=e.slice(n,t);if(!Ul.test(r))return r;t=n}return null}var pu=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function mu(e,t){for(let n=0;n<t.length;n+=2)if(e>=t[n]&&e<=t[n+1])return!0;return!1}function hu(e){let t=e.codePointAt(0);return t!==void 0&&mu(t,pu)}function gu(e){let t=fu(e);return t!==null&&hu(t)}function _u(e){let t=du(e);return t!==null&&Wl.test(t)}function vu(e){let t=Array.from(e),n=t.length;for(;n>0;){let e=t[n-1];if(Ul.test(e)){n--;continue}if($l.has(e)||eu.has(e)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(``),tail:t.slice(n).join(``)}}function yu(e,t,n){return n===`text`&&!t&&e.length===1&&e!==`-`&&e!==`—`?e:null}function bu(e,t,n,r){let i=t[r],a=e[r];if(i==null)return a;let o=n[r];if(a.length===o)return a;let s=i.repeat(o);return e[r]=s,s}function xu(e,t){return e&&t!==null&&nu.has(t)}function Su(e){let t=uu(e);return t!==null&&ru.has(t)}function Cu(e){if(e.length<2||e[0]!==` `)return null;let t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:` `,marks:t}:null}function wu(e){let t=e.length;for(;t>0;){let n=lu(e,t),r=e.slice(n,t);if(iu.has(r))return!0;if(!tu.has(r))return!1;t=n}return!1}function Tu(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===` `)return`preserved-space`;if(e===` `)return`tab`;if(t.preserveHardBreaks&&e===`
|
|
597
|
-
`)return`hard-break`}return e===` `?`space`:e===`\xA0`||e===` `||e===``||e===``?`glue`:e===``?`zero-width-break`:e===``?`soft-hyphen`:`text`}var Eu=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Du(e){return e.length===1?e[0]:e.join(``)}function Ou(e,t){let n=[];for(let t=e.length-1;t>=0;t--)n.push(e[t]);return n.push(t),Du(n)}function ku(e,t,n,r){if(!Eu.test(e))return[{text:e,isWordLike:t,kind:`text`,start:n}];let i=[],a=null,o=[],s=n,c=!1,l=0;for(let u of e){let e=Tu(u,r),d=e===`text`&&t;if(a!==null&&e===a&&d===c){o.push(u),l+=u.length;continue}a!==null&&i.push({text:Du(o),isWordLike:c,kind:a,start:s}),a=e,o=[u],s=n+l,c=d,l+=u.length}return a!==null&&i.push({text:Du(o),isWordLike:c,kind:a,start:s}),i}function Au(e){return e===`space`||e===`preserved-space`||e===`zero-width-break`||e===`hard-break`}var ju=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Mu(e,t){let n=e.texts[t];return n.startsWith(`www.`)?!0:ju.test(n)&&t+1<e.len&&e.kinds[t+1]===`text`&&e.texts[t+1]===`//`}function Nu(e){return e.includes(`?`)&&(e.includes(`://`)||e.startsWith(`www.`))}function Pu(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let i=0;i<e.len;i++){if(r[i]!==`text`||!Mu(e,i))continue;let a=[t[i]],o=i+1;for(;o<e.len&&!Au(r[o]);){a.push(t[o]),n[i]=!0;let e=t[o].includes(`?`);if(r[o]=`text`,t[o]=``,o++,e)break}t[i]=Du(a)}let a=0;for(let e=0;e<t.length;e++){let o=t[e];o.length!==0&&(a!==e&&(t[a]=o,n[a]=n[e],r[a]=r[e],i[a]=i[e]),a++)}return t.length=a,n.length=a,r.length=a,i.length=a,{len:a,texts:t,isWordLike:n,kinds:r,starts:i}}function Fu(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a];if(t.push(o),n.push(e.isWordLike[a]),r.push(e.kinds[a]),i.push(e.starts[a]),!Nu(o))continue;let s=a+1;if(s>=e.len||Au(e.kinds[s]))continue;let c=[],l=e.starts[s],u=s;for(;u<e.len&&!Au(e.kinds[u]);)c.push(e.texts[u]),u++;c.length>0&&(t.push(Du(c)),n.push(!0),r.push(`text`),i.push(l),a=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}var Iu=new Set([`:`,`-`,`/`,`×`,`,`,`.`,`+`,`–`,`—`]),Lu=/[\p{P}\p{S}\p{Co}]/u,Ru=/\p{Emoji_Presentation}/u,zu=new Set([`?`,`֊`,`-`,`‐`,`‒`,`–`,`—`,`…`,`‼`,`‽`,`⁉`]);function Bu(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function Vu(e){let t=e.charCodeAt(0);return t<128?Bu(t):!zu.has(e)&&!Ru.test(e)&&Lu.test(e)}function Hu(e){let t=!1;for(let n of e)if(!Ul.test(n)){if(!Vu(n))return!1;t=!0}return t}function Uu(e){for(let t=e.length;t>0;){let n=lu(e,t),r=e.slice(n,t);if(Ul.test(r)){t=n;continue}return Vu(r)||hu(r)}return!1}function Wu(e,t,n,r){let i=!t&&Hu(e),a=!r&&Hu(n),o=gu(e),s=(t||o)&&Uu(e);return!i&&!a&&!s||H(e)||H(n)?!1:(t||i||o)&&(r||a)}function Gu(e){for(let t of e)if(Wl.test(t))return!0;return!1}function Ku(e){if(e.length===0)return!1;for(let t of e)if(!(Wl.test(t)||Iu.has(t)))return!1;return!0}function qu(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a],s=e.kinds[a];if(s===`text`&&Ku(o)&&Gu(o)){let s=[o],c=a+1;for(;c<e.len&&e.kinds[c]===`text`&&Ku(e.texts[c]);)s.push(e.texts[c]),c++;t.push(Du(s)),n.push(!0),r.push(`text`),i.push(e.starts[a]),a=c-1;continue}t.push(o),n.push(e.isWordLike[a]),r.push(s),i.push(e.starts[a])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function Ju(e){let t=[],n=[],r=[],i=[],a=0;for(;a<e.len;){let o=e.texts[a],s=e.kinds[a],c=e.isWordLike[a];if(s===`text`){let s=[o],l=a+1,u=c;for(;l<e.len&&e.kinds[l]===`text`&&Wu(e.texts[l-1],e.isWordLike[l-1],e.texts[l],e.isWordLike[l]);){let t=e.texts[l];s.push(t),u||=e.isWordLike[l],l++}if(l>a+1){t.push(Du(s)),n.push(u),r.push(`text`),i.push(e.starts[a]),a=l;continue}}t.push(o),n.push(c),r.push(s),i.push(e.starts[a]),a++}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function Yu(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a];if(e.kinds[a]===`text`&&o.includes(`-`)){let s=o.split(`-`),c=s.length>1;for(let e=0;e<s.length;e++){let t=s[e];if(!c)break;(t.length===0||!Gu(t)||!Ku(t))&&(c=!1)}if(c){let o=0;for(let c=0;c<s.length;c++){let l=s[c],u=c<s.length-1?`${l}-`:l;t.push(u),n.push(!0),r.push(`text`),i.push(e.starts[a]+o),o+=u.length}continue}}t.push(o),n.push(e.isWordLike[a]),r.push(e.kinds[a]),i.push(e.starts[a])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function Xu(e){let t=[],n=[],r=[],i=[],a=0;for(;a<e.len;){let o=[e.texts[a]],s=e.isWordLike[a],c=e.kinds[a],l=e.starts[a];if(c===`glue`){let u=[o[0]],d=l;for(a++;a<e.len&&e.kinds[a]===`glue`;)u.push(e.texts[a]),a++;let f=Du(u);if(a<e.len&&e.kinds[a]===`text`)o[0]=f,o.push(e.texts[a]),s=e.isWordLike[a],c=`text`,l=d,a++;else{t.push(f),n.push(!1),r.push(`glue`),i.push(d);continue}}else a++;if(c===`text`)for(;a<e.len&&e.kinds[a]===`glue`;){let t=[];for(;a<e.len&&e.kinds[a]===`glue`;)t.push(e.texts[a]),a++;let n=Du(t);if(a<e.len&&e.kinds[a]===`text`){o.push(n,e.texts[a]),s||=e.isWordLike[a],a++;continue}o.push(n)}t.push(Du(o)),n.push(s),r.push(c),i.push(l)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function Zu(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let e=0;e<t.length-1;e++){if(r[e]!==`text`||r[e+1]!==`text`||!H(t[e])||!H(t[e+1]))continue;let n=vu(t[e]);n!==null&&(t[e]=n.head,t[e+1]=n.tail+t[e+1],i[e+1]=i[e]+n.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function Qu(e,t,n){let r=Vl(),i=0,a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=[];for(let _ of r.segment(e))for(let e of ku(_.segment,_.isWordLike??!1,_.index,n)){let n=e.kind===`text`,r=yu(e.text,e.isWordLike,e.kind),_=H(e.text),v=Gl(e.text),y=uu(e.text),b=wu(e.text),x=Su(e.text),S=i-1;function C(){u[S]!==null&&(o[S]=[bu(a,u,d,S)],u[S]=null),o[S].push(e.text),s[S]=s[S]||e.isWordLike,f[S]=f[S]||_,p[S]=p[S]||v,m[S]=b,h[S]=x,g[S]=xu(p[S],y)}t.carryCJKAfterClosingQuote&&n&&i>0&&c[S]===`text`&&_&&f[S]&&m[S]||n&&i>0&&c[S]===`text`&&ou(e.text)&&f[S]||n&&i>0&&c[S]===`text`&&h[S]?C():n&&i>0&&c[S]===`text`&&e.isWordLike&&v&&g[S]?(C(),s[S]=!0):r!==null&&i>0&&c[S]===`text`&&u[S]===r?d[S]=(d[S]??1)+1:n&&!e.isWordLike&&i>0&&c[S]===`text`&&!f[S]&&(au(e.text)||e.text===`-`&&s[S])?C():(a[i]=e.text,o[i]=[e.text],s[i]=e.isWordLike,c[i]=e.kind,l[i]=e.start,u[i]=r,d[i]=r===null?0:1,f[i]=_,p[i]=v,m[i]=b,h[i]=x,g[i]=xu(v,y),i++)}for(let e=0;e<i;e++){if(u[e]!==null){a[e]=bu(a,u,d,e);continue}a[e]=Du(o[e])}for(let e=1;e<i;e++)c[e]===`text`&&!s[e]&&cu(a[e])&&c[e-1]===`text`&&!f[e-1]&&(a[e-1]+=a[e],s[e-1]=s[e-1]||s[e],a[e]=``);let _=Array.from({length:i},()=>null),v=-1;for(let e=i-1;e>=0;e--){let t=a[e];if(t.length!==0){if(c[e]===`text`&&!s[e]&&v>=0&&c[v]===`text`&&(su(t)||t===`-`&&_u(a[v]))){let n=_[v]??[];n.push(t),_[v]=n,l[v]=l[e],a[e]=``;continue}v=e}}for(let e=0;e<i;e++){let t=_[e];t!=null&&(a[e]=Ou(t,a[e]))}let y=0;for(let e=0;e<i;e++){let t=a[e];t.length!==0&&(y!==e&&(a[y]=t,s[y]=s[e],c[y]=c[e],l[y]=l[e]),y++)}a.length=y,s.length=y,c.length=y,l.length=y;let b=Zu(Ju(Yu(qu(Fu(Pu(Xu({len:y,texts:a,isWordLike:s,kinds:c,starts:l})))))));for(let e=0;e<b.len-1;e++){let t=Cu(b.texts[e]);t!==null&&(b.kinds[e]!==`space`&&b.kinds[e]!==`preserved-space`||b.kinds[e+1]!==`text`||!Gl(b.texts[e+1])||(b.texts[e]=t.space,b.isWordLike[e]=!1,b.kinds[e]=b.kinds[e]===`preserved-space`?`preserved-space`:`space`,b.texts[e+1]=t.marks+b.texts[e+1],b.starts[e+1]=b.starts[e]+t.space.length))}return b}function $u(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],r=0;for(let t=0;t<e.len;t++)e.kinds[t]===`hard-break`&&(n.push({startSegmentIndex:r,endSegmentIndex:t,consumedEndSegmentIndex:t+1}),r=t+1);return r<e.len&&n.push({startSegmentIndex:r,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function ed(e,t,n){if(t.len<=1)return t;let r=[],i=[],a=[],o=[],s=-1,c=!1;function l(e){r.push(t.texts[e]),i.push(t.isWordLike[e]),a.push(`text`),o.push(t.starts[e])}function u(n,s){let c=!1;for(let e=n;e<s;e++)c||=t.isWordLike[e];let l=t.starts[n],u=s<t.len?t.starts[s]:e.length;r.push(e.slice(l,u)),i.push(c),a.push(`text`),o.push(l)}function d(e){if(!(s<0)){if(c)s+1===e?l(s):u(s,e);else for(let t=s;t<e;t++)l(t);s=-1,c=!1}}for(let e=0;e<t.len;e++){let l=t.texts[e],u=t.kinds[e];if(u===`text`){s>=0&&!Zl(t.texts[e-1],n)&&d(e),s<0&&(s=e),c||=H(l);continue}d(e),r.push(l),i.push(t.isWordLike[e]),a.push(u),o.push(t.starts[e])}return d(t.len),{len:r.length,texts:r,isWordLike:i,kinds:a,starts:o}}function td(e,t,n=`normal`,r=`normal`){let i=Il(n),a=i.mode===`pre-wrap`?Rl(e):Ll(e);if(a.length===0)return{normalized:a,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let o=Qu(a,t,i),s=r===`keep-all`?ed(a,o,t.breakKeepAllAfterPunctuation):o;return{normalized:a,chunks:$u(s,i),...s}}var nd=null,rd=new Map,id=null,ad=96,od=/\p{Emoji_Presentation}/u,sd=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,cd=null,ld=new Map;function ud(){if(nd!==null)return nd;if(typeof OffscreenCanvas<`u`)return nd=new OffscreenCanvas(1,1).getContext(`2d`),nd;if(typeof document<`u`)return nd=document.createElement(`canvas`).getContext(`2d`),nd;throw Error(`Text measurement requires OffscreenCanvas or a DOM canvas context.`)}function dd(e){let t=rd.get(e);return t||(t=new Map,rd.set(e,t)),t}function fd(e,t){let n=t.get(e);return n===void 0&&(n={width:ud().measureText(e).width,containsCJK:H(e)},t.set(e,n)),n}function pd(){if(id!==null)return id;if(typeof navigator>`u`)return id={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},id;let e=navigator.userAgent,t=navigator.vendor===`Apple Computer, Inc.`&&e.includes(`Safari/`)&&!e.includes(`Chrome/`)&&!e.includes(`Chromium/`)&&!e.includes(`CriOS/`)&&!e.includes(`FxiOS/`)&&!e.includes(`EdgiOS/`),n=e.includes(`Chrome/`)||e.includes(`Chromium/`)||e.includes(`CriOS/`)||e.includes(`Edg/`);return id={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},id}function md(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function hd(){return cd===null&&(cd=new Intl.Segmenter(void 0,{granularity:`grapheme`})),cd}function gd(e){return od.test(e)||e.includes(`️`)}function _d(e){return sd.test(e)}function vd(e,t){let n=ld.get(e);if(n!==void 0)return n;let r=ud();r.font=e;let i=r.measureText(`😀`).width;if(n=0,i>t+.5&&typeof document<`u`&&document.body!==null){let t=document.createElement(`span`);t.style.font=e,t.style.display=`inline-block`,t.style.visibility=`hidden`,t.style.position=`absolute`,t.textContent=`😀`,document.body.appendChild(t);let r=t.getBoundingClientRect().width;document.body.removeChild(t),i-r>.5&&(n=i-r)}return ld.set(e,n),n}function yd(e){let t=0,n=hd();for(let r of n.segment(e))gd(r.segment)&&t++;return t}function bd(e,t){return t.emojiCount===void 0&&(t.emojiCount=yd(e)),t.emojiCount}function xd(e,t,n){return n===0?t.width:t.width-bd(e,t)*n}function Sd(e,t,n,r,i){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===i)return t.breakableFitAdvances;t.breakableFitMode=i;let a=hd(),o=[];for(let t of a.segment(e))o.push(t.segment);if(o.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(i===`sum-graphemes`){let e=[];for(let t of o){let i=fd(t,n);e.push(xd(t,i,r))}return t.breakableFitAdvances=e,t.breakableFitAdvances}if(i===`pair-context`||o.length>ad){let e=[],i=null,a=0;for(let t of o){let o=xd(t,fd(t,n),r);if(i===null)e.push(o);else{let o=i+t,s=fd(o,n);e.push(xd(o,s,r)-a)}i=t,a=o}return t.breakableFitAdvances=e,t.breakableFitAdvances}let s=[],c=``,l=0;for(let e of o){c+=e;let t=fd(c,n),i=xd(c,t,r);s.push(i-l),l=i}return t.breakableFitAdvances=s,t.breakableFitAdvances}function Cd(e,t){let n=ud();n.font=e;let r=dd(e),i=md(e);return{cache:r,fontSize:i,emojiCorrection:t?vd(e,i):0}}function wd(e){return e===`space`||e===`zero-width-break`||e===`soft-hyphen`}function Td(e){return e===`space`||e===`preserved-space`||e===`tab`||e===`zero-width-break`||e===`soft-hyphen`}function Ed(e,t,n=e.widths.length){for(;t<n;){let n=e.kinds[t];if(!wd(n))break;t++}return t}function Dd(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function Od(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function U(e,t){return t===0?0:e+t}function kd(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function Ad(e,t,n,r,i){return U(r,t===`tab`?i+kd(e,n):e.lineEndFitAdvances[n])}function jd(e,t,n,r){return U(r,t===`tab`?0:e.lineEndFitAdvances[n])}function Md(e,t,n,r,i){return U(r,t===`tab`?i:e.lineEndPaintAdvances[n])}function Nd(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Pd(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Fd(e,t,n){let r=t;for(;r<e.length&&e[r]<n;)r++;return r}function Id(e,t,n,r,i){if(e.letterSpacing===0)return 0;if(i>0)return e.spacingGraphemeCounts[r]>0?e.letterSpacing:0;for(let i=r-1;i>=t;i--){let a=e.kinds[i];if(!(a===`space`||a===`zero-width-break`||a===`hard-break`)){if(a===`soft-hyphen`){if(i===r-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function Ld(e,t,n,r,i,a){return t+Id(e,n,r,i,a)}function Rd(e,t,n){let{widths:r,kinds:i,breakableFitAdvances:a,breakablePreferredBreaks:o}=e;if(r.length===0)return 0;let s=t+pd().lineFitEpsilon,c=0,l=0,u=!1,d=0,f=0,p=0,m=0,h=-1,g=0;function _(){h=-1,g=0}function v(e=p,t=m,r=l){c++,n?.(r,d,f,e,t),l=0,u=!1,_()}function y(e,t){u=!0,d=e,f=0,p=e+1,m=0,l=t}function b(e,t,n){u=!0,d=e,f=t,p=e,m=t+1,l=n}function x(e,t){if(!u){y(e,t);return}l+=t,p=e+1,m=0}function S(e,t){let n=a[e],r=o[e]??null,i=r===null?-1:Fd(r,0,t+1),c=-1,d=0,f=t;for(;f<n.length;){let a=n[f];if(!u)b(e,f,a);else if(l+a>s){if(r!==null&&c>t){v(e,c,d),f=c,i=Fd(r,i,f+1),c=-1,d=0;continue}v(),b(e,f,a)}else l+=a,p=e,m=f+1;let o=f+1;r!==null&&r[i]===o&&(c=o,d=l,i++),f++}u&&p===e&&m===n.length&&(p=e+1,m=0)}let C=0;for(;C<r.length&&!(!u&&(C=Ed(e,C),C>=r.length));){let e=r[C],t=i[C],n=Td(t);if(!u){e>s&&a[C]!==null?S(C,0):y(C,e),n&&(h=C+1,g=l-e),C++;continue}if(l+e>s){if(n){x(C,e),v(C+1,0,l-e),C++;continue}if(h>=0){if(p>h||p===h&&m>0){v();continue}v(h,0,g);continue}if(e>s&&a[C]!==null){v(),S(C,0),C++;continue}v();continue}x(C,e),n&&(h=C+1,g=l-e),C++}return u&&v(),c}function zd(e,t,n){if(e.simpleLineWalkFastPath)return Rd(e,t,n);let{widths:r,kinds:i,breakableFitAdvances:a,breakablePreferredBreaks:o,discretionaryHyphenWidth:s,chunks:c}=e;if(r.length===0||c.length===0)return 0;let l=pd(),u=t+l.lineFitEpsilon,d=0,f=0,p=!1,m=0,h=0,g=0,_=0,v=-1,y=0,b=0,x=null;function S(){v=-1,y=0,b=0,x=null}function C(){return x===`soft-hyphen`&&v===g&&_===0?b:f}function w(t=g,r=_,i){d++,n!==void 0&&n(Ld(e,i??C(),m,h,t,r),m,h,t,r),f=0,p=!1,S()}function T(e,t){p=!0,m=e,h=0,g=e+1,_=0,f=t}function ee(e,t,n){p=!0,m=e,h=t,g=e,_=t+1,f=n}function E(e,t){if(!p){T(e,t);return}f+=t,g=e+1,_=0}function te(t,n,r,i,a,o){if(!n)return;let s=jd(e,t,r,a),c=Md(e,t,r,a,i);v=r+1,y=f-o+s,b=f-o+c,x=t}function ne(t,n){let r=a[t],i=o[t]??null,s=i===null?-1:Fd(i,0,n+1),c=-1,l=0,d=n;for(;d<r.length;){let a=r[d];if(!p)ee(t,d,a);else{let r=Nd(e,!0,a),o=f+r;if(Pd(e,o)>u){if(i!==null&&c>n){w(t,c,l),d=c,s=Fd(i,s,d+1),c=-1,l=0;continue}w(),ee(t,d,a)}else f=o,g=t,_=d+1}let o=d+1;i!==null&&i[s]===o&&(c=o,l=f,s++),d++}p&&g===t&&_===r.length&&(g=t+1,_=0)}function re(e){d++,n?.(0,e.startSegmentIndex,0,e.consumedEndSegmentIndex,0),S()}for(let t=0;t<c.length;t++){let n=c[t];if(n.startSegmentIndex===n.endSegmentIndex){re(n);continue}p=!1,f=0,m=n.startSegmentIndex,h=0,g=n.startSegmentIndex,_=0,S();let o=n.startSegmentIndex;for(;o<n.endSegmentIndex&&!(!p&&(o=Ed(e,o,n.endSegmentIndex),o>=n.endSegmentIndex));){let t=i[o],n=Td(t),c=Od(e,p,o),d=t===`tab`?Dd(f+c,e.tabStopAdvance):r[o],m=c+d,h=Ad(e,t,o,c,d);if(t===`soft-hyphen`){p&&(g=o+1,_=0,v=o+1,y=f+s,b=f+s,x=t),o++;continue}if(!p){h>u&&a[o]!==null?ne(o,0):T(o,d),te(t,n,o,d,c,m),o++;continue}if(f+h>u){let r=f+jd(e,t,o,c),i=f+Md(e,t,o,c,d);if(x===`soft-hyphen`&&l.preferEarlySoftHyphenBreak&&y<=u){w(v,0,b);continue}if(n&&r<=u){E(o,m),w(o+1,0,i),o++;continue}if(v>=0&&y<=u){if(g>v||g===v&&_>0){w();continue}let e=v;w(e,0,b),o=e;continue}if(h>u&&a[o]!==null){w(),ne(o,0),o++;continue}w();continue}E(o,m),te(t,n,o,d,c,m),o++}if(p){let e=v===n.consumedEndSegmentIndex?b:f;w(n.consumedEndSegmentIndex,0,e)}}return d}var Bd=null;function Vd(){return Bd===null&&(Bd=new Intl.Segmenter(void 0,{granularity:`grapheme`})),Bd}function Hd(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function Ud(e,t){let n=[],r=[],i=0,a=!1,o=!1,s=!1;function c(){r.length!==0&&(n.push({text:r.length===1?r[0]:r.join(``),start:i}),r=[],a=!1,o=!1,s=!1)}function l(e,t,n){r=[e],i=t,a=n,o=wu(e),s=$l.has(e)}function u(e,t){r.push(e),a||=t;let n=wu(e);e.length===1&&tu.has(e)?o||=n:o=n,s=!1}for(let n of Vd().segment(e)){let e=n.segment,i=H(e);if(r.length===0){l(e,n.index,i);continue}if(s||Ql.has(e)||tu.has(e)||t.carryCJKAfterClosingQuote&&i&&o){u(e,i);continue}if(!a&&!i){u(e,i);continue}c(),l(e,n.index,i)}return c(),n}function Wd(e,t,n){if(t.length<=1)return t;let r=[],i=-1,a=!1;function o(n,i){let a=t[n].start,o=i<t.length?t[i].start:e.length;r.push({text:e.slice(a,o),start:a})}function s(e){if(!(i<0)){if(a)i+1===e?r.push(t[i]):o(i,e);else for(let n=i;n<e;n++)r.push(t[n]);i=-1,a=!1}}for(let e=0;e<t.length;e++){let r=t[e];i>=0&&!Zl(t[e-1].text,n)&&s(e),i<0&&(i=e),a||=H(r.text)}return s(t.length),r}function Gd(e,t){if(t===`zero-width-break`||t===`soft-hyphen`||t===`hard-break`)return 0;if(t===`tab`)return 1;let n=0,r=Vd();for(let t of r.segment(e))n++;return n}function Kd(e){return e===`-`||e===`֊`||e===`‐`||e===`‒`||e===`–`||e===`—`}function qd(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;let t=[],n=0;for(let r of Vd().segment(e))n++,Kd(r.segment)&&t.push(n);return t.length===0?null:t}function Jd(e,t,n){return t>1?e+(t-1)*n:e}function Yd(e,t,n,r,i){let a=pd(),{cache:o,emojiCorrection:s}=Cd(t,_d(e.normalized)),c=xd(`-`,fd(`-`,o),s)+(i===0?0:i*2),l=xd(` `,fd(` `,o),s)*8,u=i!==0;if(e.len===0)return Hd(n);let d=[],f=[],p=[],m=[],h=e.chunks.length<=1&&!u,g=n?[]:null,_=[],v=[],y=[],b=n?[]:null,x=Array.from({length:e.len});function S(e,t,n,r,i,a,o,s,c){i!==`text`&&i!==`space`&&i!==`zero-width-break`&&(h=!1),d.push(t),f.push(n),p.push(r),m.push(i),g?.push(a),_.push(o),v.push(s),u&&y.push(c),b!==null&&b.push(e)}function C(e,t,n,c,l){let d=fd(e,o),f=u?Gd(e,t):0,p=Jd(xd(e,d,s),f,i),m=t===`space`||t===`preserved-space`||t===`zero-width-break`?0:p,h=m===0?0:m+(f>0?i:0),g=t===`space`||t===`zero-width-break`?0:p;if(l&&c&&e.length>1){let c=`sum-graphemes`;i===0?Ku(e)?c=`pair-context`:a.preferPrefixWidthsForBreakableRuns&&(c=`segment-prefixes`):c=`segment-prefixes`;let l=Sd(e,d,o,s,c);S(e,p,h,g,t,n,l,l===null||r===`keep-all`?null:qd(e),f);return}S(e,p,h,g,t,n,null,null,f)}for(let t=0;t<e.len;t++){x[t]=d.length;let n=e.texts[t],i=e.isWordLike[t],s=e.kinds[t],l=e.starts[t];if(s===`soft-hyphen`){S(n,0,c,c,s,l,null,null,0);continue}if(s===`hard-break`){S(n,0,0,0,s,l,null,null,0);continue}if(s===`tab`){S(n,0,0,0,s,l,null,null,u?Gd(n,s):0);continue}let f=fd(n,o);if(s===`text`&&f.containsCJK){let e=Ud(n,a),t=r===`keep-all`?Wd(n,e,a.breakKeepAllAfterPunctuation):e;for(let e=0;e<t.length;e++){let n=t[e];C(n.text,`text`,l+n.start,i,r===`keep-all`||!H(n.text))}continue}C(n,s,l,i,!0)}let w=Xd(e.chunks,x,d.length),T=g===null?null:Nl(e.normalized,g);return b===null?{widths:d,lineEndFitAdvances:f,lineEndPaintAdvances:p,kinds:m,simpleLineWalkFastPath:h,segLevels:T,breakableFitAdvances:_,breakablePreferredBreaks:v,letterSpacing:i,spacingGraphemeCounts:y,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:w}:{widths:d,lineEndFitAdvances:f,lineEndPaintAdvances:p,kinds:m,simpleLineWalkFastPath:h,segLevels:T,breakableFitAdvances:_,breakablePreferredBreaks:v,letterSpacing:i,spacingGraphemeCounts:y,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:w,segments:b}}function Xd(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a.startSegmentIndex<t.length?t[a.startSegmentIndex]:n,s=a.endSegmentIndex<t.length?t[a.endSegmentIndex]:n,c=a.consumedEndSegmentIndex<t.length?t[a.consumedEndSegmentIndex]:n;r.push({startSegmentIndex:o,endSegmentIndex:s,consumedEndSegmentIndex:c})}return r}function Zd(e,t,n,r){let i=r?.wordBreak??`normal`,a=r?.letterSpacing??0;return Yd(td(e,pd(),r?.whiteSpace,i),t,n,i,a)}function Qd(e,t,n){return Zd(e,t,!0,n)}function $d(e){return e}function ef(e){let t=0;return zd($d(e),1/0,e=>{e>t&&(t=e)}),t}function tf(e){let t=e.toLowerCase().replace(/^←\s*/,``);return t.includes(`force push`)?`force-push`:t.includes(`cherry`)?`cherry-pick`:t.includes(`uncommit`)?`uncommit`:t.includes(`squash`)?`squash`:t.includes(`revert`)?`revert`:t.includes(`rebase`)?`rebase`:t.includes(`merge`)?`merge`:t.includes(`checkout`)?`checkout`:t.includes(`fetch`)?`fetch`:t.includes(`push`)?`push`:t.includes(`delete`)||t.includes(`discard`)?`delete`:t.includes(`unstage`)?`unstage`:t.includes(`stage`)?`stage`:t.includes(`stash`)?`stash`:t.includes(`move`)?`move`:t.includes(`reset`)?`reset`:t.includes(`branch`)?`branch`:t.includes(`tag`)?`tag`:`checkout`}function nf({name:e,size:t=14}){let n={fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`};return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:t,height:t,viewBox:`0 0 24 24`,style:{flex:`0 0 auto`},children:[e===`branch`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`circle`,{...n,cx:`6`,cy:`6`,r:`3`}),(0,y.jsx)(`circle`,{...n,cx:`18`,cy:`18`,r:`3`}),(0,y.jsx)(`path`,{...n,d:`M6 9v9`}),(0,y.jsx)(`path`,{...n,d:`M9 18h6`})]}),e===`checkout`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M5 12h14`}),(0,y.jsx)(`path`,{...n,d:`m13 6 6 6-6 6`}),(0,y.jsx)(`path`,{...n,d:`M5 5v14`})]}),e===`cherry-pick`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`circle`,{...n,cx:`7`,cy:`7`,r:`3`}),(0,y.jsx)(`circle`,{...n,cx:`17`,cy:`17`,r:`3`}),(0,y.jsx)(`path`,{...n,d:`M10 7h2a5 5 0 0 1 5 5v2`})]}),e===`delete`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M3 6h18`}),(0,y.jsx)(`path`,{...n,d:`M8 6V4h8v2`}),(0,y.jsx)(`path`,{...n,d:`m19 6-1 14H6L5 6`}),(0,y.jsx)(`path`,{...n,d:`M10 11v5`}),(0,y.jsx)(`path`,{...n,d:`M14 11v5`})]}),e===`fetch`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M12 5v12`}),(0,y.jsx)(`path`,{...n,d:`m7 12 5 5 5-5`}),(0,y.jsx)(`path`,{...n,d:`M5 20h14`})]}),e===`force-push`&&(0,y.jsx)(`path`,{...n,d:`M13 2 4 14h7l-1 8 10-13h-7l0-7Z`}),e===`merge`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`circle`,{...n,cx:`6`,cy:`6`,r:`3`}),(0,y.jsx)(`circle`,{...n,cx:`6`,cy:`18`,r:`3`}),(0,y.jsx)(`circle`,{...n,cx:`18`,cy:`18`,r:`3`}),(0,y.jsx)(`path`,{...n,d:`M6 9v6`}),(0,y.jsx)(`path`,{...n,d:`M9 6h1a8 8 0 0 1 8 8v1`})]}),e===`move`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M3 12h18`}),(0,y.jsx)(`path`,{...n,d:`m8 7-5 5 5 5`}),(0,y.jsx)(`path`,{...n,d:`m16 7 5 5-5 5`})]}),e===`push`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M12 19V5`}),(0,y.jsx)(`path`,{...n,d:`m7 10 5-5 5 5`}),(0,y.jsx)(`path`,{...n,d:`M5 20h14`})]}),e===`rebase`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`circle`,{...n,cx:`6`,cy:`6`,r:`3`}),(0,y.jsx)(`circle`,{...n,cx:`6`,cy:`18`,r:`3`}),(0,y.jsx)(`circle`,{...n,cx:`18`,cy:`12`,r:`3`}),(0,y.jsx)(`path`,{...n,d:`M6 9v6`}),(0,y.jsx)(`path`,{...n,d:`M9 6h2a7 7 0 0 1 7 7`})]}),e===`reset`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M4 7v6h6`}),(0,y.jsx)(`path`,{...n,d:`M20 17a8 8 0 0 1-14.9-4`}),(0,y.jsx)(`path`,{...n,d:`M4 13A8 8 0 0 1 19 8`})]}),e===`revert`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.7 2.7L3 8`}),(0,y.jsx)(`path`,{...n,d:`M3 3v5h5`})]}),e===`stage`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M12 5v14`}),(0,y.jsx)(`path`,{...n,d:`M5 12h14`})]}),e===`stash`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M4 4h16v6H4z`}),(0,y.jsx)(`path`,{...n,d:`M6 10v10h12V10`}),(0,y.jsx)(`path`,{...n,d:`M9 14h6`})]}),e===`squash`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M5 5h14`}),(0,y.jsx)(`path`,{...n,d:`M5 12h14`}),(0,y.jsx)(`path`,{...n,d:`M5 19h14`}),(0,y.jsx)(`path`,{...n,d:`m12 8 3 4-3 4`})]}),e===`tag`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M20 10 10 20 4 14V4h10l6 6Z`}),(0,y.jsx)(`circle`,{...n,cx:`9`,cy:`9`,r:`1`})]}),e===`unstage`&&(0,y.jsx)(`path`,{...n,d:`M5 12h14`}),e===`uncommit`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...n,d:`M9 14 4 9l5-5`}),(0,y.jsx)(`path`,{...n,d:`M4 9h10a6 6 0 0 1 0 12h-1`})]})]})}function rf({size:e=13}){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:e,height:e,viewBox:`0 0 24 24`,style:{flex:`0 0 auto`},children:(0,y.jsx)(`path`,{d:`M12 3a9 9 0 0 1 9 9`,fill:`none`,stroke:`currentColor`,strokeWidth:2.4,strokeLinecap:`round`,children:(0,y.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 12 12`,to:`360 12 12`,dur:`0.8s`,repeatCount:`indefinite`})})})}function af({label:e,onClick:t,tone:n,onMouseEnter:r,onMouseLeave:i}){let a=n===`success`?`#0b1020`:n===`warning`?`#fff7d6`:n===`squash`?`#1e102f`:n===`merge`?`#fff7ff`:`#fff7ed`,o=n===`success`?`#6d9658`:n===`warning`?`#d8a43a`:n===`squash`?`#9f75d9`:n===`merge`?`#b764d9`:`#9a3412`,s=n===`success`?`#8dcf78`:n===`warning`?`#b88a25`:n===`squash`?`#cba6f7`:n===`merge`?`#c77de4`:`#b45309`,c=n===`success`?`#9cda89`:n===`warning`?`#c99a30`:n===`squash`?`#d8b9fb`:n===`merge`?`#d08bea`:`#c26115`;return(0,y.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),t()},style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minWidth:104,height:30,padding:`0 12px`,background:s,border:`1px solid ${o}`,borderRadius:7,color:a,fontSize:10,fontWeight:700,cursor:`pointer`,fontFamily:`inherit`,whiteSpace:`nowrap`,position:`relative`,zIndex:8,boxShadow:`0 10px 24px rgba(0,0,0,0.35)`,gap:6,lineHeight:1},onMouseEnter:e=>{e.currentTarget.style.background=c},onMouseLeave:e=>{e.currentTarget.style.background=s},onPointerEnter:r,onPointerLeave:i,onFocus:r,onBlur:i,onKeyDown:r,children:[(0,y.jsx)(nf,{name:tf(e)}),(0,y.jsx)(`span`,{children:e})]})}function of({label:e,onClick:t,tone:n,size:r=`default`,variant:i=`solid`,disabled:a=!1,loading:o=!1,iconOnly:s=!1}){let c=r===`compact`,l=i===`ghost`,u=a||o,d=n===`danger`?`#5c2430`:n===`warning`?`#7a4e11`:n===`success`?`#2c4231`:`#2f3348`,f=n===`danger`?`#6a2b39`:n===`warning`?`#8a5a16`:n===`success`?`#37523d`:`#3a4058`,p=n===`danger`?`#8b3a4a`:n===`warning`?`#d19128`:n===`success`?`#588a5c`:`#4a4f68`,m=n===`danger`?`#f5a6b8`:n===`warning`?`#f9d28b`:n===`success`?`#a6e3a1`:l?`#bac2de`:`#cdd6f4`;return(0,y.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),!u&&t()},disabled:u,"aria-busy":o||void 0,"aria-label":s?e:void 0,title:s?e:void 0,style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minWidth:s?c?24:30:c?72:84,height:c?20:28,padding:s?0:c?`0 8px`:`0 10px`,background:l?`rgba(24,24,37,0.5)`:d,border:l?`1px solid transparent`:`1px solid ${p}`,color:m,fontSize:10,fontWeight:600,cursor:u?`default`:`pointer`,opacity:a&&!o?.62:1,borderRadius:c?6:7,fontFamily:`inherit`,whiteSpace:`nowrap`,gap:c?5:6,lineHeight:1},onMouseEnter:e=>{u||(e.currentTarget.style.background=l?`rgba(49,50,68,0.8)`:f)},onMouseLeave:e=>{u||(e.currentTarget.style.background=l?`rgba(24,24,37,0.5)`:d)},children:[o?(0,y.jsx)(rf,{size:c?12:13}):(0,y.jsx)(nf,{name:tf(e),size:c?12:13}),!s&&(0,y.jsx)(`span`,{children:e})]})}var sf=2e4,cf=new Set([`g`,`path`,`circle`,`ellipse`,`line`,`polyline`,`polygon`,`rect`]),lf=new Set([`title`,`desc`,`metadata`]),uf={d:`d`,fill:`fill`,stroke:`stroke`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"stroke-miterlimit":`strokeMiterlimit`,"stroke-dasharray":`strokeDasharray`,"stroke-dashoffset":`strokeDashoffset`,"fill-rule":`fillRule`,"clip-rule":`clipRule`,opacity:`opacity`,"fill-opacity":`fillOpacity`,"stroke-opacity":`strokeOpacity`,transform:`transform`,cx:`cx`,cy:`cy`,r:`r`,rx:`rx`,ry:`ry`,x:`x`,y:`y`,x1:`x1`,x2:`x2`,y1:`y1`,y2:`y2`,width:`width`,height:`height`,points:`points`,"vector-effect":`vectorEffect`},df=new Set([`fill`,`stroke`]),ff=/^[+\-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?(?:px)?$/i,pf=/^[\d\s,.+\-eE]+$/,mf=/^[\d\s,.+\-eEa-zA-Z]+$/,hf=/^[\d\s,.+\-eEa-zA-Z()]+$/,gf=new Map;function _f(e){let t=e.trim().toLowerCase();return t===`none`||t===`transparent`?`none`:`currentColor`}function vf(e,t){let n=t.trim();return!n||n.length>5e3?null:df.has(e)?_f(n):e===`d`?mf.test(n)?n:null:e===`points`?pf.test(n)?n:null:e===`transform`?hf.test(n)?n:null:e===`vector-effect`?n===`non-scaling-stroke`?n:null:e===`fill-rule`||e===`clip-rule`?n===`evenodd`||n===`nonzero`?n:null:e===`stroke-linecap`?[`butt`,`round`,`square`].includes(n)?n:null:e===`stroke-linejoin`?[`arcs`,`bevel`,`miter`,`miter-clip`,`round`].includes(n)?n:null:e===`stroke-dasharray`?n===`none`||pf.test(n)?n:null:ff.test(n)?n.replace(/px$/i,``):null}function yf(e){let t={};for(let n of e.attributes){let e=n.name.toLowerCase();if(e.startsWith(`on`)||e===`href`||e===`xlink:href`)continue;if(e===`style`){for(let e of n.value.split(`;`)){let n=e.indexOf(`:`);if(n===-1)continue;let r=e.slice(0,n).trim().toLowerCase(),i=uf[r];if(!i)continue;let a=vf(r,e.slice(n+1));a!==null&&(t[i]=a)}continue}let r=uf[e];if(!r)continue;let i=vf(e,n.value);i!==null&&(t[r]=i)}return t}function bf(e){let t=e.getAttribute(`viewBox`);if(t){let e=t.trim().split(/[\s,]+/).map(Number);if(e.length===4&&e.every(Number.isFinite)&&e[2]>0&&e[3]>0)return e.join(` `)}let n=Number.parseFloat(e.getAttribute(`width`)??``),r=Number.parseFloat(e.getAttribute(`height`)??``);return Number.isFinite(n)&&Number.isFinite(r)&&n>0&&r>0?`0 0 ${n} ${r}`:`0 0 24 24`}function xf(e){let t=gf.get(e);if(t)return t;let n;if(!e.trim())n={value:null,error:`Paste a complete <svg> element.`};else if(e.length>2e4)n={value:null,error:`SVG must be smaller than ${sf.toLocaleString()} characters.`};else if(typeof DOMParser>`u`)n={value:null,error:`SVG parsing is unavailable in this environment.`};else try{let t=new DOMParser().parseFromString(e,`image/svg+xml`),r=t.querySelector(`parsererror`),i=t.documentElement;if(r||i.localName.toLowerCase()!==`svg`)n={value:null,error:`Paste one valid <svg> element.`};else{let e=0,t=null,r=n=>{let i=[];for(let a of n.children){let n=a.localName.toLowerCase();if(lf.has(n))continue;if(!cf.has(n))return t=`Unsupported SVG element: <${n}>.`,[];if(e+=1,e>250)return t=`SVG contains too many elements (maximum 250).`,[];let o=r(a);if(t)return[];i.push({tag:n,props:yf(a),children:o})}return i},a=r(i);n=t?{value:null,error:t}:a.length===0?{value:null,error:`SVG does not contain a supported shape.`}:{value:{viewBox:bf(i),rootProps:yf(i),children:a},error:null}}}catch{n={value:null,error:`Could not parse this SVG.`}}return gf.size>=100&&gf.clear(),gf.set(e,n),n}function Sf(e){return xf(e).error}function Cf(e,t){return(0,b.createElement)(e.tag,{...e.props,key:t},e.children.map((e,n)=>Cf(e,`${t}-${n}`)))}function wf({source:e,color:t,size:n=13}){let r=xf(e);return r.value?(0,y.jsx)(`svg`,{fill:`currentColor`,stroke:`none`,...r.value.rootProps,"aria-hidden":`true`,focusable:`false`,x:-n/2,y:-n/2,width:n,height:n,viewBox:r.value.viewBox,style:{color:t,overflow:`visible`},children:r.value.children.map((e,t)=>Cf(e,`custom-svg-${t}`))}):null}var Tf=[`accessibility`,`api`,`build`,`chore`,`ci`,`config`,`database`,`dependencies`,`docs`,`feature`,`fix`,`i18n`,`infra`,`merge`,`move`,`performance`,`refactor`,`release`,`rename`,`revert`,`security`,`style`,`test`,`ui`];function Ef(e,t,n,...r){return{id:e,icon:e,label:t,enabled:!0,types:n,patterns:r}}var Df=[Ef(`revert`,`Revert`,[`revert`],String.raw`\b(?:revert(?:ed|ing)?|rollbacks?)\b`),Ef(`merge`,`Merge`,[`merge`],String.raw`\bmerg(?:e|ed|ing)\b`),Ef(`security`,`Security`,[`security`,`sec`],String.raw`\b(?:security|vulnerabilit(?:y|ies)|cve|xss|csrf)\b`),Ef(`fix`,`Fix`,[`fix`,`bugfix`,`hotfix`],String.raw`\b(?:fix(?:es|ed|ing)?|bugs?|bugfix(?:es)?|hotfix(?:es)?)\b`),Ef(`feature`,`Feature`,[`feat`,`feature`],String.raw`\b(?:feat|feature)s?\b`),Ef(`performance`,`Performance`,[`perf`,`performance`],String.raw`\b(?:perf|performance|optimi[sz](?:e[ds]?|ing|ation)|speedups?)\b`),Ef(`refactor`,`Refactor`,[`refactor`],String.raw`\b(?:refactor(?:s|ed|ing)?|restructur(?:e[ds]?|ing))\b`),Ef(`move`,`Move`,[`move`],String.raw`\b(?:move[ds]?|moving|relocat(?:e[ds]?|ing))\b`),Ef(`rename`,`Rename`,[`rename`],String.raw`\b(?:rename[ds]?|renaming)\b`),Ef(`test`,`Tests`,[`test`,`tests`],String.raw`\b(?:tests?|specs?|coverage|e2e)\b`),Ef(`docs`,`Documentation`,[`docs`,`doc`],String.raw`\b(?:docs?|documentation|readme|changelog)\b`),Ef(`accessibility`,`Accessibility`,[`a11y`,`accessibility`],String.raw`\b(?:a11y|accessibility|aria|screen[\s-]?reader)\b`),Ef(`i18n`,`Localization`,[`i18n`,`l10n`],String.raw`\b(?:i18n|l10n|internationali[sz]ation|locali[sz]ation|translations?)\b`),Ef(`database`,`Database`,[`db`,`database`,`migration`],String.raw`\b(?:database|db|sql|schemas?|migrations?)\b`),Ef(`api`,`API`,[`api`],String.raw`\b(?:apis?|graphql|grpc|rpc|endpoints?|webhooks?)\b`),Ef(`ui`,`UI`,[`ui`,`ux`],String.raw`\b(?:ui|ux|frontend|layouts?|responsive)\b`),Ef(`infra`,`Infrastructure`,[`infra`,`infrastructure`,`deploy`],String.raw`\b(?:infra|infrastructure|terraform|kubernetes|k8s|docker|deploy(?:ment|s|ed|ing)?)\b`),Ef(`ci`,`CI`,[`ci`],String.raw`\b(?:ci|continuous[\s-]integration|github[\s-]actions?|workflows?|pipelines?)\b`),Ef(`build`,`Build`,[`build`],String.raw`\b(?:builds?|built|bundl(?:e[ds]?|er|ing)|compil(?:e[ds]?|er|ing)|webpack|vite)\b`),Ef(`dependencies`,`Dependencies`,[`deps`,`dependencies`,`dependency`],String.raw`\b(?:deps?|dependencies|dependency|packages?|lockfiles?|bump(?:s|ed|ing)?)\b`),Ef(`release`,`Release`,[`release`],String.raw`\b(?:releases?|version(?:ing)?|publish(?:es|ed|ing)?)\b`),Ef(`config`,`Configuration`,[`config`],String.raw`\b(?:config|configuration|settings?|environment)\b`,String.raw`(?:^|\s)\.env(?:\s|$)`),Ef(`style`,`Style`,[`style`,`format`,`lint`],String.raw`\b(?:styles?|styling|css|themes?|format(?:ted|ting)?|lint(?:ed|ing)?)\b`),Ef(`chore`,`Chore`,[`chore`],String.raw`\b(?:chores?|cleanup|housekeeping|maintenance)\b`)],Of=/^([a-z][a-z0-9-]*)(?:\([^)]*\))?!?:/i,kf=new Map;function Af(e){if(kf.has(e))return kf.get(e)??null;try{let t=new RegExp(e,`i`);return kf.set(e,t),t}catch{return kf.set(e,null),null}}function jf(e){if(!e.trim())return`Pattern cannot be empty.`;try{return new RegExp(e,`i`),null}catch(e){return e instanceof Error?e.message:`Invalid regular expression.`}}function Mf(e,t=Df){let n=Of.exec(e.trim())?.[1]?.toLowerCase();if(n){let e=t.find(e=>e.enabled&&e.types.some(e=>e.toLowerCase()===n));if(e)return e}return t.find(t=>t.enabled&&t.patterns.some(t=>Af(t)?.test(e)===!0))??null}var Nf=`ingit.commitIconRules`,Pf=1,Ff=200,If=50,Lf=500;function Rf(e){return e.map(e=>({...e,types:[...e.types],patterns:[...e.patterns]}))}function zf(e){return JSON.stringify({version:Pf,rules:e})}function Bf(e){return typeof e==`string`&&Tf.includes(e)}function Vf(e,t){if(!Array.isArray(e)||e.length>If)return null;let n=[];for(let r of e){if(typeof r!=`string`)return null;let e=r.trim();if(!e||e.length>t)return null;n.push(e)}return n}function Hf(e){if(e===null)return null;try{let t=JSON.parse(e);if(!t||typeof t!=`object`)return null;let{version:n,rules:r}=t;if(n!==Pf||!Array.isArray(r)||r.length>Ff)return null;let i=new Set,a=[];for(let e of r){if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.id==`string`?t.id.trim():``,r=typeof t.label==`string`?t.label.trim():``,o=Vf(t.types,80),s=Vf(t.patterns,Lf),c=t.customSvg===void 0?void 0:typeof t.customSvg==`string`?t.customSvg.trim():null;if(!n||n.length>100||i.has(n)||!r||r.length>100||!Bf(t.icon)||typeof t.enabled!=`boolean`||o===null||s===null||c===null||c!==void 0&&(!c||c.length>2e4)||c!==void 0&&typeof DOMParser<`u`&&Sf(c)!==null||s.some(e=>jf(e)!==null))return null;i.add(n),a.push({id:n,label:r,icon:t.icon,enabled:t.enabled,types:o,patterns:s,...c===void 0?{}:{customSvg:c}})}return a}catch{return null}}function Uf(){try{return typeof window>`u`?null:window.localStorage}catch{return null}}function Wf(){let e=Uf();if(!e)return Rf(Df);try{return Hf(e.getItem(Nf))??Rf(Df)}catch{return Rf(Df)}}var Gf=Wf(),Kf=new Set;function qf(e){Gf=e;for(let e of Kf)e()}function Jf(e){e.key!==null&&e.key!==Nf||qf(Hf(e.newValue)??Rf(Df))}function Yf(e){let t=Kf.size===0;return Kf.add(e),t&&typeof window<`u`&&window.addEventListener(`storage`,Jf),()=>{Kf.delete(e),Kf.size===0&&typeof window<`u`&&window.removeEventListener(`storage`,Jf)}}function Xf(){return(0,b.useSyncExternalStore)(Yf,()=>Gf,()=>Df)}function Zf(e){let t=Hf(zf(e));if(!t)return!1;let n=Uf();if(!n)return!1;try{n.setItem(Nf,zf(t))}catch{return!1}return qf(t),!0}function Qf(){let e=Uf();if(!e)return!1;try{e.removeItem(Nf)}catch{return!1}return qf(Rf(Df)),!0}var W={fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`};function $f({icon:e,color:t,size:n=13,customSvg:r}){return r?(0,y.jsx)(wf,{source:r,color:t,size:n}):(0,y.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,x:-n/2,y:-n/2,width:n,height:n,viewBox:`0 0 24 24`,style:{color:t,overflow:`visible`},children:[e===`accessibility`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`circle`,{...W,cx:`12`,cy:`4`,r:`2`}),(0,y.jsx)(`path`,{...W,d:`M5 8h14M12 6v7M8 21l4-8 4 8M7 13l5-2 5 2`})]}),e===`api`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`M9 3v5M15 3v5M7 8h10v3a5 5 0 0 1-5 5v5`}),(0,y.jsx)(`path`,{...W,d:`M8 12h8`})]}),e===`build`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`m14 5 5 5M16 3l5 5-3 3-5-5 3-3Z`}),(0,y.jsx)(`path`,{...W,d:`M14.5 8.5 4 19l1 1L15.5 9.5`})]}),e===`chore`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`m20 3-9 9M11 10l3 3`}),(0,y.jsx)(`path`,{...W,d:`m11 10-7 7 3 3 7-7-3-3ZM3 21h9`})]}),e===`ci`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`circle`,{...W,cx:`6`,cy:`6`,r:`2.5`}),(0,y.jsx)(`circle`,{...W,cx:`18`,cy:`6`,r:`2.5`}),(0,y.jsx)(`circle`,{...W,cx:`12`,cy:`18`,r:`2.5`}),(0,y.jsx)(`path`,{...W,d:`M8.5 6h7M7.4 8.2l3.2 7.6M16.6 8.2l-3.2 7.6`})]}),e===`config`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`M4 6h10M18 6h2M4 12h2M10 12h10M4 18h8M16 18h4`}),(0,y.jsx)(`circle`,{...W,cx:`16`,cy:`6`,r:`2`}),(0,y.jsx)(`circle`,{...W,cx:`8`,cy:`12`,r:`2`}),(0,y.jsx)(`circle`,{...W,cx:`14`,cy:`18`,r:`2`})]}),e===`database`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`ellipse`,{...W,cx:`12`,cy:`5`,rx:`7`,ry:`3`}),(0,y.jsx)(`path`,{...W,d:`M5 5v6c0 1.7 3.1 3 7 3s7-1.3 7-3V5M5 11v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6`})]}),e===`dependencies`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`m12 3 9 5-9 5-9-5 9-5Z`}),(0,y.jsx)(`path`,{...W,d:`M3 8v8l9 5 9-5V8M12 13v8`})]}),e===`docs`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`M12 6a6 6 0 0 0-8-2v15a6 6 0 0 1 8 2V6Z`}),(0,y.jsx)(`path`,{...W,d:`M12 6a6 6 0 0 1 8-2v15a6 6 0 0 0-8 2V6Z`})]}),e===`feature`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`M12 3c.6 3.2 1.8 4.4 5 5-3.2.6-4.4 1.8-5 5-.6-3.2-1.8-4.4-5-5 3.2-.6 4.4-1.8 5-5Z`}),(0,y.jsx)(`path`,{...W,d:`M19 15c.3 1.7 1 2.4 2.7 2.7-1.7.3-2.4 1-2.7 2.7-.3-1.7-1-2.4-2.7-2.7 1.7-.3 2.4-1 2.7-2.7Z`})]}),e===`fix`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`rect`,{...W,x:`7`,y:`6`,width:`10`,height:`14`,rx:`5`}),(0,y.jsx)(`path`,{...W,d:`M9 6 7 3M15 6l2-3M3 10h4M17 10h4M3 15h4M17 15h4M9 11h.01M15 11h.01M12 14v6`})]}),e===`i18n`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`circle`,{...W,cx:`12`,cy:`12`,r:`9`}),(0,y.jsx)(`path`,{...W,d:`M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18`})]}),e===`infra`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`rect`,{...W,x:`3`,y:`4`,width:`18`,height:`6`,rx:`2`}),(0,y.jsx)(`rect`,{...W,x:`3`,y:`14`,width:`18`,height:`6`,rx:`2`}),(0,y.jsx)(`path`,{...W,d:`M7 7h.01M7 17h.01M11 7h7M11 17h7`})]}),e===`merge`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`circle`,{...W,cx:`6`,cy:`5`,r:`2`}),(0,y.jsx)(`circle`,{...W,cx:`18`,cy:`19`,r:`2`}),(0,y.jsx)(`circle`,{...W,cx:`6`,cy:`19`,r:`2`}),(0,y.jsx)(`path`,{...W,d:`M6 7v10M8 5h2a8 8 0 0 1 8 8v4`})]}),e===`move`&&(0,y.jsx)(`path`,{...W,d:`M12 3v18M3 12h18M8 7l4-4 4 4M8 17l4 4 4-4M7 8l-4 4 4 4M17 8l4 4-4 4`}),e===`performance`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`M4 18a8 8 0 1 1 16 0M12 18l4-5M6.5 10l1 1M12 7v2M17.5 10l-1 1`}),(0,y.jsx)(`circle`,{...W,cx:`12`,cy:`18`,r:`1`})]}),e===`refactor`&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(`path`,{...W,d:`m8 7 4-4 4 4M12 3v7M18 10l3 4-3 4M21 14h-7M8 21l-4-4 4-4M4 17h7`})}),e===`release`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`M14 4c3-2 5-1 6 0s2 3 0 6l-6 6-6-6 6-6Z`}),(0,y.jsx)(`circle`,{...W,cx:`16`,cy:`8`,r:`1.5`}),(0,y.jsx)(`path`,{...W,d:`M8 10H5l-2 4 5 1M14 16v3l-4 2-1-5M7 17l-2 2`})]}),e===`rename`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`m14 5 5 5M4 20l3.5-.8L20 6.7 17.3 4 4.8 16.5 4 20Z`}),(0,y.jsx)(`path`,{...W,d:`M3 22h9`})]}),e===`revert`&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(`path`,{...W,d:`m9 7-5 5 5 5M4 12h10a6 6 0 0 1 6 6v2`})}),e===`security`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`M12 3 20 6v6c0 5-3.4 8-8 10-4.6-2-8-5-8-10V6l8-3Z`}),(0,y.jsx)(`path`,{...W,d:`m8.5 12 2.2 2.2 4.8-5`})]}),e===`style`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`M12 3a9 9 0 0 0 0 18h1.5a2 2 0 0 0 0-4H12a2 2 0 0 1 0-4h3a6 6 0 0 0 0-12h-3Z`}),(0,y.jsx)(`path`,{...W,d:`M7.5 10h.01M9 6.5h.01M14 6.5h.01M17 9h.01`})]}),e===`test`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{...W,d:`M9 3h6M10 3v6l-5 9a2 2 0 0 0 2 3h10a2 2 0 0 0 2-3l-5-9V3`}),(0,y.jsx)(`path`,{...W,d:`M7.5 15h9`})]}),e===`ui`&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`rect`,{...W,x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,y.jsx)(`path`,{...W,d:`M9 4v16M9 10h12`})]})]})}function ep(e,t,n,r,i){if(e.length===0)return null;let a=Math.min(t,n),o=Math.max(t,n),s=[...new Set(e.map(e=>e.x))].sort((e,t)=>e-t),c=new Set(e.filter(e=>e.idx>a&&e.idx<o).map(e=>e.x)),l=e.find(e=>e.idx===n)?.x,u=l===void 0?[]:s.filter(e=>i===`left`?e<=l:e>=l).sort((e,t)=>i===`left`?t-e:e-t);for(let e of u)if(!c.has(e))return e;return i===`left`?s[0]-r:s[s.length-1]+r}function tp(e,t,n){return e.map((r,i)=>{let a=e.length-i;return{...r,y:t.y-a*n,idx:t.idx-a}})}function np(e,t,n,r){if(r<1)return null;let i=new Map(e.map(e=>[e.sha,e])),a=i.get(n);if(!a)return null;let o=[],s=new Set,c=t;for(;c&&c!==n&&!s.has(c);){s.add(c);let e=i.get(c);if(!e)return null;o.push(e),c=e.parentShas[0]}if(c!==n||o.length===0)return null;let l=e.indexOf(a),u=Math.min(e.indexOf(o[0]),l),d=Math.max(e.indexOf(o[o.length-1]),l),f=t=>{for(let n=u;n<=d;n++)if(e[n].lane===t)return!1;return!0},p=0;for(let e=1;e<=r&&p===0;e++)f(e)?p=e:f(-e)&&(p=-e);if(p===0)return null;let m=new Set(o.map(e=>e.sha));return e.map(e=>m.has(e.sha)?{...e,lane:p}:e)}function rp(e,t,n){let r=t??e;return{anchor:r,y:r.y-n,idx:r.idx-1}}function ip(e,t){return{y:e.y-t,idx:e.idx-1}}function ap(e,t){return[{x1:e.x-t,y1:e.y-t,x2:e.x+t,y2:e.y+t},{x1:e.x+t,y1:e.y-t,x2:e.x-t,y2:e.y+t}]}function op({baseZoom:e,bounds:t,viewport:n,scroll:r,margin:i}){let a=t.minX*e-r.x,o=t.maxX*e-r.x,s=t.minY*e-r.y,c=t.maxY*e-r.y;if(a>=i&&o<=n.width-i&&s>=i&&c<=n.height-i)return{zoom:e,translateX:0,translateY:0};let l=Math.max(1,t.maxX-t.minX),u=Math.max(1,t.maxY-t.minY),d=Math.max(1,n.width-i*2),f=Math.max(1,n.height-i*2),p=Math.max(.05,Math.min(e,d/l,f/u)),m=t.minX*p-r.x,h=t.maxX*p-r.x,g=t.minY*p-r.y,_=t.maxY*p-r.y,v=(e,t,n)=>{let r=i-e,a=n-i-t;return Math.min(a,Math.max(r,0))};return{zoom:p,translateX:v(m,h,n.width),translateY:v(g,_,n.height)}}function sp(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1;return{x:e.x+r/a*n,y:e.y+i/a*n}}function cp(e,t,n,r,i){let a=1-i,o=a**3,s=3*a**2*i,c=3*a*i**2,l=i**3;return{x:e.x*o+t.x*s+n.x*c+r.x*l,y:e.y*o+t.y*s+n.y*c+r.y*l}}function lp(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r*r+i*i;if(a===0)return(e.x-t.x)**2+(e.y-t.y)**2;let o=Math.max(0,Math.min(1,((e.x-t.x)*r+(e.y-t.y)*i)/a)),s=t.x+o*r,c=t.y+o*i;return(e.x-s)**2+(e.y-c)**2}function up(e,t,n){let r=Math.min(n.startY,n.endY),i=Math.max(n.startY,n.endY),a=t.x-e.x;if(Math.abs(a)>=.001){let o=(n.x-e.x)/a;if(o>=0&&o<=1){let n=e.y+o*(t.y-e.y);if(n>=r&&n<=i)return 0}}else if(Math.abs(e.x-n.x)<.001&&Math.max(Math.min(e.y,t.y),r)<=Math.min(Math.max(e.y,t.y),i))return 0;let o=e=>{let t=Math.max(r,Math.min(i,e.y));return(e.x-n.x)**2+(e.y-t)**2};return Math.min(o(e),o(t),lp({x:n.x,y:r},e,t),lp({x:n.x,y:i},e,t))}function dp(e,t,n){return t.every(t=>{for(let r=1;r<e.length;r++)if(up(e[r-1],e[r],t)<n)return!1;return!0})}function fp(e,t,n,r){if(e.length<4)return;let i=r**2;if(dp(e,n,i))return;let a=e[e.length-1],o=e[e.length-2],s=e[1],c=t===`left`?-1:1,l=c*(o.x-a.x),u=c*(s.x-a.x)-r;if(u<=l)return;let d=n.filter(e=>c*(e.x-a.x)>l&&c*(e.x-a.x)<u).map(e=>e.x+c*r).filter(e=>c*(e-a.x)<=u).sort((e,t)=>c*(e-t));for(let t of d){let r=[...e];if(r[r.length-2]={...o,x:t},dp(r,n,i))return t}}function pp(e,t,n,r,i){let a=r.nodeRadius-1,o=sp(e,t,a),s=sp(t,e,a),c=s.y-o.y,l={x:o.x,y:o.y+c*r.curveControlRatio},u={x:s.x,y:s.y-c*r.curveControlRatio},d=(r.nodeRadius+r.clearance)**2,f=Math.max(32,Math.ceil(Math.hypot(s.x-o.x,s.y-o.y)/4)),p=Math.min(e.idx,t.idx)+1,m=Math.max(e.idx,t.idx)-1,h=[];for(let t=p;t<=m;t++){let a=n[t],o=[...a===void 0?[]:[a],...i?.get(t)??[]];for(let n of o)h.push({x:e.x+(n-e.lane)*r.laneWidth,y:e.y+(t-e.idx)*r.rowHeight})}let g=o;for(let e=1;e<=f;e++){let t=cp(o,l,u,s,e/f);if(h.some(e=>lp(e,g,t)<=d))return!0;g=t}return!1}function mp(e,t,n,r,i){let a=r===`from`?e.lane:t.lane,o=Math.min(e.idx,t.idx)+1,s=Math.max(e.idx,t.idx)-1;for(let e=o;e<=s;e++)if(n[e]===a||i?.get(e)?.includes(a))return!1;return!0}function hp(e,t,n,r,i){if(!mp(e,t,n,r,i))return null;let a=r===`from`?e:t,o=r===`from`?t:e;return{side:a.x<=o.x?`left`:`right`,anchorLane:a.lane,innerLane:o.lane,outerRailX:a.x}}function gp(e,t,n,r,i,a){if(Math.abs(t.idx-e.idx)<2||!pp(e,t,n,r,a))return null;if(mp(e,t,n,i,a))return i;let o=i===`from`?`to`:`from`;return mp(e,t,n,o,a)?o:null}var _p={position:`fixed`,inset:0,margin:`auto`,width:`min(420px, calc(100vw - 32px))`,padding:0,border:`1px solid #45475a`,borderRadius:8,background:`#1e1e2e`,color:`#cdd6f4`,boxShadow:`0 22px 64px rgba(0,0,0,0.58)`},vp={display:`flex`,flexDirection:`column`,gap:14,padding:18,fontFamily:`system-ui, -apple-system, sans-serif`},yp={margin:0,color:`#f5e0dc`,fontSize:16,fontWeight:700,lineHeight:1.25},bp={height:30,padding:`0 12px`,borderRadius:6,border:`1px solid #45475a`,background:`#181825`,color:`#bac2de`,fontSize:12,fontWeight:700,fontFamily:`inherit`,cursor:`pointer`},xp={height:30,padding:`0 12px`,borderRadius:6,border:`1px solid #6d9658`,background:`#8dcf78`,color:`#0b1020`,fontSize:12,fontWeight:800,fontFamily:`inherit`,cursor:`pointer`};function Sp({open:e,title:t,label:n,description:r,initialValue:i=``,confirmLabel:a,allowEmpty:o=!1,placeholder:s,onSubmit:c,onClose:l}){let u=(0,b.useRef)(null),d=(0,b.useRef)(null),f=(0,b.useId)(),[p,m]=(0,b.useState)(i);return(0,b.useEffect)(()=>{e&&m(i)},[i,e]),(0,b.useEffect)(()=>{let t=u.current;if(t){if(e){t.open||t.showModal(),requestAnimationFrame(()=>d.current?.focus());return}t.open&&t.close()}},[e]),(0,y.jsx)(`dialog`,{ref:u,"aria-labelledby":f,onCancel:l,onClose:l,onClick:e=>{e.target===e.currentTarget&&l()},style:_p,children:(0,y.jsxs)(`form`,{method:`dialog`,onSubmit:e=>{e.preventDefault();let t=p.trim();if(!o&&!t){d.current?.focus();return}c(t)},onClick:e=>e.stopPropagation(),style:vp,children:[(0,y.jsx)(`h2`,{id:f,style:yp,children:t}),r&&(0,y.jsx)(`p`,{style:{margin:0,color:`#a6adc8`,fontSize:12,lineHeight:1.45},children:r}),(0,y.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:7,color:`#bac2de`,fontSize:12,fontWeight:700},children:[n,(0,y.jsx)(`input`,{ref:d,value:p,onChange:e=>m(e.target.value),required:!o,placeholder:s,autoComplete:`off`,spellCheck:!1,style:{height:34,padding:`0 10px`,borderRadius:6,border:`1px solid #45475a`,background:`#11111b`,color:`#cdd6f4`,fontSize:13,fontFamily:`inherit`,outline:`none`}})]}),(0,y.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,paddingTop:2},children:[(0,y.jsx)(`button`,{type:`button`,onClick:l,style:bp,children:`Cancel`}),(0,y.jsx)(`button`,{type:`submit`,value:`confirm`,style:xp,children:a})]})]})})}function Cp({open:e,title:t,message:n,confirmLabel:r,onConfirm:i,onClose:a}){let o=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let t=o.current;if(t){if(e){t.open||t.showModal();return}t.open&&t.close()}},[e]),(0,y.jsx)(`dialog`,{ref:o,"aria-labelledby":`confirm-dialog-title`,onCancel:a,onClose:a,onClick:e=>{e.target===e.currentTarget&&a()},style:_p,children:(0,y.jsxs)(`form`,{method:`dialog`,onSubmit:e=>{e.preventDefault(),i()},onClick:e=>e.stopPropagation(),style:vp,children:[(0,y.jsx)(`h2`,{id:`confirm-dialog-title`,style:yp,children:t}),(0,y.jsx)(`p`,{style:{margin:0,color:`#bac2de`,fontSize:13,lineHeight:1.45},children:n}),(0,y.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,paddingTop:2},children:[(0,y.jsx)(`button`,{type:`button`,onClick:a,style:bp,children:`Cancel`}),(0,y.jsx)(`button`,{type:`submit`,value:`confirm`,style:xp,children:r})]})]})})}var wp=20,G=16,Tp=`#11111b`,Ep=20,Dp=30,Op=28,kp=Dp,Ap=400,jp=112,Mp=1e3,Np=G-5,Pp=`#1e1e2e`,Fp=`#45475a`,Ip=`#cdd6f455`,Lp=`#cdd6f422`,Rp=`#a6e3a1`,zp=`#f38ba8`,Bp=`#a6e3a1`,Vp=`#f38ba8`,Hp=`#cba6f7`,Up=`#f9e2af`,Wp=2,Gp=.85,Kp=12,qp=6,Jp=30,Yp=6,Xp=6,Zp=3,Qp=24,$p={mass:2.1,tension:180,friction:28},em=220,tm=900,nm=`cubic-bezier(0.22, 1, 0.36, 1)`,rm=6,im=14,am=`600 11px system-ui, -apple-system, sans-serif`,om=6,sm=13,cm=150,lm=56*.55,um=56*.3,dm=54,fm={laneWidth:80,rowHeight:56,nodeRadius:G,clearance:2,curveControlRatio:.3},pm=new Map;function mm(e){return Math.round((Ep-e)/2)}function hm(e,t){return!!e&&e.action===t.action&&e.refName===t.refName&&e.sha===t.sha&&e.force===t.force}function gm(e){return!!e&&typeof e==`object`&&e.code===`CONFLICT`}function _m(e){if(!e||typeof e!=`object`)return null;let t=e.data;if(!t||typeof t!=`object`)return null;let n=t;return n.reason===`branch-in-use`&&typeof n.worktreePath==`string`?n.worktreePath:null}function vm(e){return e.replace(/[\\/]+$/,``).split(/[\\/]+/).at(-1)||e}function ym({color:e,size:t=sm}){return(0,y.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,style:{display:`block`,flexShrink:0},children:[(0,y.jsx)(`path`,{d:`M8 13V9M8 9H4V5M8 9h4V5`,stroke:e,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,y.jsx)(`circle`,{cx:`4`,cy:`3.5`,r:`1.5`,fill:Tp,stroke:e,strokeWidth:`1.4`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`3.5`,r:`1.5`,fill:Tp,stroke:e,strokeWidth:`1.4`}),(0,y.jsx)(`circle`,{cx:`8`,cy:`13`,r:`1.5`,fill:Tp,stroke:e,strokeWidth:`1.4`})]})}function bm(e){let t=/^(v?)(\d+)\.(\d+)\.(\d+)$/.exec(e);return t?{hasVPrefix:t[1]===`v`,major:Number(t[2]),minor:Number(t[3]),patch:Number(t[4])}:null}function xm(e,t){return e.major-t.major||e.minor-t.minor||e.patch-t.patch||Number(e.hasVPrefix)-Number(t.hasVPrefix)}function Sm(e){let t=null;for(let n of e){if(n.kind!==`tag`)continue;let e=bm(n.shortName);e&&(!t||xm(e,t)>0)&&(t=e)}return t?`${t.hasVPrefix?`v`:``}${t.major}.${t.minor}.${t.patch+1}`:``}function Cm(e){return e?e.startsWith(`refs/remotes/`)?e.slice(13):e:null}function wm(e,t){let n=Cm(e.upstream);if(n)return t.find(e=>e.kind===`remote`&&e.shortName===n)??null;let r=t.find(t=>t.kind===`remote`&&t.shortName===`origin/${e.shortName}`);if(r)return r;let i=t.filter(t=>t.kind===`remote`&&t.shortName.endsWith(`/${e.shortName}`));return i.length===1?i[0]:null}function Tm(e,t){return e.parentShas.length===t.parentShas.length&&e.parentShas.every((e,n)=>e===t.parentShas[n])}function Em(e,t,n,r){if(r.kind===`uncommit`)return null;let i=zr(t.rows,n.maxLaneRadius),a=e.nodes.find(e=>e.row.lane===0)?.x??n.laneCenterX,o=Hr(i,n.extraLeftGutter,n.rightGutter,{laneCenterX:a,laneRadius:n.maxLaneRadius,totalWidth:n.layoutWidth});if(r.kind===`squash`){let n=t.headSha?o.shaToNode.get(t.headSha):null,i=e.shaToNode.get(r.headSha),a=e.shaToNode.get(r.oldestSha);if(!n||!i||!a)return null;let s={...n,x:i.x,y:i.y,idx:i.idx,row:{...n.row,lane:i.row.lane}},c=a.row.parentShas[0];if(!c)return{nodes:[{node:s,color:Hp}],edges:[]};let l=e.shaToNode.get(c);if(!l)return null;let u=`action-preview:squash:${s.row.sha}-${l.row.sha}`,d=zm(s,l,u,e.nodes.map(e=>e.row.lane));return{nodes:[{node:s,color:Hp}],edges:[{key:u,path:Vm(s,l,d,0),color:Hp,dashed:!0}]}}if(r.kind===`commit`){let t=o.nodes.find(t=>!e.shaToNode.has(t.row.sha));if(!t)return null;let n=e.shaToNode.get(t.row.parentShas[0]);if(!n)return null;let r=e.nodes[0]??n,i={...t,x:n.x,y:r.y-56,idx:r.idx-1},a=`${i.row.sha}-${n.row.sha}`,s=zm(i,n,a,e.nodes.map(e=>e.row.lane));return{nodes:[{node:i,color:Bp}],edges:[{key:a,path:Vm(i,n,s,0),color:Bp,dashed:!0}]}}let s=new Set;for(let t of o.nodes){let n=e.shaToNode.get(t.row.sha);(!n||!Tm(n.row,t.row))&&s.add(t.row.sha)}let c=t.refs.find(e=>e.kind===`head`&&e.isCurrent),l=[],u=new Set,d=c?.targetSha;for(;d&&!u.has(d);){u.add(d);let e=o.shaToNode.get(d);if(!e)break;l.push(e),d=e.row.parentShas[0]}let f=l.findIndex(e=>s.has(e.row.sha)),p=f>=0?l.slice(0,f+1):t.headSha?[o.shaToNode.get(t.headSha)].filter(e=>!!e):[];if(p.length===0)return null;let m=t.refs.find(e=>e.shortName===r.targetRefName),h=m?.peeledSha??m?.targetSha,g=h?e.shaToNode.get(h)??o.shaToNode.get(h):null,_=g?p.map(e=>({...e,x:g.x,row:{...e.row,lane:g.row.lane}})):p,v=g??e.nodes[0];if(!v)return null;let y=tp(_,v,56),b=new Set(y.map(e=>e.row.sha)),x=new Map(y.map(e=>[e.row.sha,e])),S=o.nodes.map(e=>e.row.lane),C=[];for(let t of y)for(let n=0;n<t.row.parentShas.length;n++){let r=t.row.parentShas[n],i=b.has(r)?x.get(r):e.shaToNode.get(r)??o.shaToNode.get(r);if(!i)continue;let a=`action-preview:${t.row.sha}-${i.row.sha}`,s=zm(t,i,a,S,{adjacentTrack:n>0?`to`:`from`});C.push({key:a,path:Vm(t,i,s,0),color:Bp,dashed:!0})}return{nodes:[...y.map(e=>({node:e,color:Bp}))],edges:C,gutterX:g?g.x-dm/2:void 0}}function Dm(e,t,n,r){if(e===n)return`M${e},${t}L${n},${r}`;let i=r-t;return`M${e},${t}C${e},${t+i*.3} ${n},${r-i*.3} ${n},${r}`}function Om(e,t,n,r,i){let a=n-e,o=r-t,s=Math.hypot(a,o)||1;return{x:e+a/s*i,y:t+o/s*i}}function km(e,t){if(e.length===0)return``;if(e.length===1)return`M${e[0].x},${e[0].y}`;let n=`M${e[0].x},${e[0].y}`;for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1],s=a.x-i.x,c=a.y-i.y,l=o.x-a.x,u=o.y-a.y,d=Math.hypot(s,c),f=Math.hypot(l,u);if(d<.001||f<.001){n+=`L${a.x},${a.y}`;continue}let p=Math.min(t,d/2,f/2),m=a.x-s/d*p,h=a.y-c/d*p,g=a.x+l/f*p,_=a.y+u/f*p;n+=`L${m},${h}Q${a.x},${a.y} ${g},${_}`}let r=e[e.length-1];return n+=`L${r.x},${r.y}`,n}function Am(e,t,n){let r=Math.abs(t.idx-e.idx),i=Math.min(e.y,t.y),a=Ar(n),o=r>12?[.28,.42,.56,.7]:[.35,.5,.65],s=o[a%o.length]??.5,c=Math.max(0,Math.min(r-1,Math.round((r-1)*s))),l=((a>>3)%3-1)*4;return i+56*(c+.5)+l}function jm(e,t,n,r){let i=Math.max(0,Math.min(t,n)+1),a=Math.min(e.length-1,Math.max(t,n)-1),o=0;for(let t=i;t<=a;t++){let n=e[t];r(n,t)&&o++}return o}function Mm(e,t,n,r,i){let a=Math.max(0,Math.min(t,n)),o=Math.min(r.length-1,Math.max(t,n));for(let t=a;t<=o;t++)if(r[t]===e||i?.get(t)?.includes(e))return!1;return!0}function Nm(e,t,n,r=!1,i=0,a=G,o=!1){let s=t.y>e.y?1:-1,c=e.y+s*24,l=Math.max(1,a-1);if(!r&&Math.abs(n-t.x)<.001&&Math.abs(e.x-t.x)>.001){let n=e.x<t.x?-1:1,r=-s,i=l*Math.SQRT1_2,a={x:t.x+n*i,y:t.y+r*i},o={x:a.x+n*18*Math.SQRT1_2,y:a.y+r*18*Math.SQRT1_2},u=o.x;return km([Om(e.x,e.y,u,c,G-1),{x:u,y:c},o,a],5)}let u=!o&&Math.abs(n-e.x)<.001&&Math.abs(e.x-t.x)>.001,d=n,f;if(u){let n=t.x<e.x?-1:1,r=(G-1)*Math.SQRT1_2,i={x:e.x+n*r,y:e.y+s*r},a={x:i.x+n*18*Math.SQRT1_2,y:i.y+s*18*Math.SQRT1_2};d=a.x,f=[i,a]}else f=[Om(e.x,e.y,n,c,G-1),{x:n,y:c}];let p=r?Math.max(-l,Math.min(l,i)):i,m=r?t.y+p:t.y-s*24,h=r?{x:t.x+Math.sign(d-t.x||1)*Math.sqrt(Math.max(0,l**2-p**2)),y:m}:Om(t.x,t.y,d,m,l);return km([...f,{x:d,y:m},h],Kp)}function Pm(e,t,n,r=0,i=G,a=!1){let o=t.y>e.y?1:-1,s=e.y+o*24,c=Math.abs(n-t.x)>.001,l=Math.max(1,i-1);if(!c&&Math.abs(e.x-t.x)>.001){let n=e.x<t.x?-1:1,r=-o,i=l*Math.SQRT1_2,a={x:t.x+n*i,y:t.y+r*i},c={x:a.x+n*18*Math.SQRT1_2,y:a.y+r*18*Math.SQRT1_2},u=c.x;return km([Om(e.x,e.y,u,s,G-1),{x:u,y:s},c,a],5)}let u=!a&&Math.abs(n-e.x)<.001&&Math.abs(e.x-t.x)>.001,d=n,f;if(u){let n=t.x<e.x?-1:1,r=(G-1)*Math.SQRT1_2,i={x:e.x+n*r,y:e.y+o*r},a={x:i.x+n*18*Math.SQRT1_2,y:i.y+o*18*Math.SQRT1_2};d=a.x,f=[i,a]}else f=[Om(e.x,e.y,n,t.y,G-1),{x:n,y:s}];let p=c?Math.max(-l,Math.min(l,r)):0,m=t.y+p,h=c?{x:t.x+Math.sign(d-t.x)*Math.sqrt(Math.max(0,l**2-p**2)),y:m}:Om(t.x,t.y,d,m,l);return km([...f,{x:d,y:m},h],Kp)}function Fm(e,t,n,r,i){let a=Om(e.x,e.y,t.x,t.y,G-1),o=Om(t.x,t.y,e.x,e.y,G-1),s=t.y>e.y?1:-1,c=e.y+s*24,l=t.y-s*24;return km([a,{x:n,y:c},{x:n,y:i},{x:r,y:i},{x:r,y:l},o],Kp)}function Im(e,t,n=0,r=G,i){if(Math.abs(e.x-t.x)<.001&&Math.abs(n)>.001){let a=t.y>e.y?1:-1,o=G-1,s=Math.max(1,r-1),c=Math.max(-Math.min(o,s),Math.min(Math.min(o,s),n)),l=Math.sqrt(Math.max(0,s**2-c**2)),u=Math.abs(t.y-e.y),d=i===void 0?34:Math.abs(i-e.y),f=Math.min(u/2,34),p=Math.max(f,u-l-8),m=Math.max(f,Math.min(p,d)),h=e.y+a*m,g=h-a*10,_={x:t.x+c,y:t.y-a*l};return km([{x:e.x,y:e.y+a*o},{x:e.x,y:g},{x:e.x+c,y:h},_],Math.min(Kp,6))}let a=Om(e.x,e.y,t.x,t.y,G-1),o=Om(t.x,t.y,e.x,e.y,Math.max(1,r-1));return`M${a.x},${a.y}L${o.x},${o.y}`}function Lm(e,t,n,r=G,i,a){let o=Math.max(1,r-1),s=t.y>=e.y?1:-1,c=G-1,l=c*Math.SQRT1_2,u=i?{x:e.x+(i===`left`?-l:l),y:e.y+s*l}:{x:e.x,y:e.y+s*c},d={x:t.x+(n===`left`?-o:o),y:t.y},f=Math.min(18,Math.hypot(d.x-u.x,d.y-u.y)*.2);return{points:[u,{x:u.x+(i===`left`?-f*Math.SQRT1_2:i===`right`?f*Math.SQRT1_2:0),y:u.y+s*(i?f*Math.SQRT1_2:f)},{x:a??d.x+(n===`left`?-f:f),y:d.y},d],cornerRadius:Math.min(5,f/2)}}function Rm(e,t,n,r=G,i,a){if(n){let o=Lm(e,t,n,r,i,a);return km(o.points,o.cornerRadius)}let o=Om(e.x,e.y,t.x,t.y,G-1),s=Om(t.x,t.y,e.x,e.y,G-1);return Dm(o.x,o.y,s.x,s.y)}function zm(e,t,n,r,i={}){let a=Math.abs(e.row.lane-t.row.lane),o=Math.abs(t.idx-e.idx);if(a===0)return{mode:`straight`};if(a===1&&o>=qp)return{mode:`adjacent-hook`,laneA:Math.min(e.row.lane,t.row.lane),laneB:Math.max(e.row.lane,t.row.lane),track:i.adjacentTrack??`from`};if(o<qp){let n=i.adjacentTrack??`from`,a=gp({x:e.x,y:e.y,idx:e.idx,lane:e.row.lane},{x:t.x,y:t.y,idx:t.idx,lane:t.row.lane},r,fm,n,i.additionalOccupiedLanes);return a?{mode:`occlusion-hook`,laneA:Math.min(e.row.lane,t.row.lane),laneB:Math.max(e.row.lane,t.row.lane),track:a}:{mode:`curve`}}let s=i.adjacentTrack??`from`,c={x:e.x,y:e.y,idx:e.idx,lane:e.row.lane},l={x:t.x,y:t.y,idx:t.idx,lane:t.row.lane};if(s===`to`&&e.row.lane*t.row.lane<0){let n=e.row.lane<0?-1:1,a=e.row.lane+n;if(Mm(a,e.idx,t.idx,r,i.additionalOccupiedLanes))return{mode:`outer-rail`,side:n<0?`left`:`right`,anchorLane:a,innerLane:t.row.lane,outerRailX:e.x+n*80,horizontalTargetJoin:!0}}let u=hp(c,l,r,s,i.additionalOccupiedLanes);if(u)return{mode:`outer-rail`,...u,horizontalTargetJoin:!0};let d=Math.min(e.row.lane,t.row.lane),f=Math.max(e.row.lane,t.row.lane),p=Ar(n)%3*Yp,m=t.x>e.x?1:-1,h=Jp+p,g=e.x+m*h,_=t.x-m*h,v=Am(e,t,n),y=Math.max(e.x,t.x),b=Math.min(e.x,t.x),x=jm(r,e.idx,t.idx,e=>e>d&&e<f),S=jm(r,e.idx,t.idx,e=>e<d),C=jm(r,e.idx,t.idx,e=>e>f),w=e.x<t.x?`left`:(e.x,t.x,`right`),T=x*5+a,ee=S*2+(w===`left`?0:.5),E=C*2+(w===`right`?0:.5);return E<=ee&&E<T?{mode:`outer-rail`,side:`right`,anchorLane:f,innerLane:d,outerRailX:y}:ee<T?{mode:`outer-rail`,side:`left`,anchorLane:d,innerLane:f,outerRailX:b}:{mode:`inside-rail`,minLane:d,maxLane:f,sourceRailX:g,targetRailX:_,crossoverY:v}}function Bm(e,t){let n=e=>`vertical:${Math.round(e*1e3)/1e3}`;switch(t.mode){case`straight`:return n(e.from.x);case`outer-rail`:return n(t.outerRailX);case`inside-rail`:return`${t.mode}:${t.minLane}:${t.maxLane}`;case`adjacent-hook`:case`occlusion-hook`:case`target-hook`:return n(t.track===`to`?e.to.x:e.from.x);default:return null}}function Vm(e,t,n,r,i=0,a=G){switch(n.mode){case`straight`:return Im(e,t,r,a,n.bundleJoinY);case`curve`:return Rm(e,t,n.targetSide,a,n.sourceSide,n.targetLeadOffset===void 0?void 0:t.x+n.targetLeadOffset);case`adjacent-hook`:case`occlusion-hook`:case`target-hook`:return Pm(e,t,(n.track===`to`?t.x:e.x)+r,i,a,n.centeredSource);case`inside-rail`:return Fm(e,t,n.sourceRailX+r,n.targetRailX+r,n.crossoverY);case`outer-rail`:return Nm(e,t,n.outerRailX+r,n.horizontalTargetJoin,i,a,n.centeredSource)}}function Hm(e,t,n){if(e.mode!==t.mode)return n<.5?e:t;switch(t.mode){case`straight`:{let r=e;return{mode:`straight`,bundleJoinY:r.bundleJoinY===void 0?t.bundleJoinY:t.bundleJoinY===void 0?r.bundleJoinY:K(r.bundleJoinY,t.bundleJoinY,n)}}case`curve`:return t;case`adjacent-hook`:case`occlusion-hook`:case`target-hook`:return t;case`inside-rail`:{let r=e;return{...t,sourceRailX:K(r.sourceRailX,t.sourceRailX,n),targetRailX:K(r.targetRailX,t.targetRailX,n),crossoverY:K(r.crossoverY,t.crossoverY,n)}}case`outer-rail`:{let r=e;return{...t,outerRailX:K(r.outerRailX,t.outerRailX,n)}}}}function Um(e,t){return Vm({x:K(e.fromX1,e.toX1,t),y:K(e.fromY1,e.toY1,t)},{x:K(e.fromX2,e.toX2,t),y:K(e.fromY2,e.toY2,t)},Hm(e.fromPlan,e.toPlan,t),K(e.fromBundleOffset,e.toBundleOffset,t),K(e.fromTargetJoinOffset,e.toTargetJoinOffset,t),K(e.fromTargetNodeRadius,e.toTargetNodeRadius,t))}function Wm(e){if(e.length===0)return 0;let t=e.map(e=>e.locChanged).sort((e,t)=>e-t);return t[Math.max(0,Math.ceil(t.length*Gp)-1)]??t[t.length-1]??0}function Gm(e,t,n,r){let i=+(r===`right`);return`M ${e} ${t-n} A ${n} ${n} 0 0 ${i} ${e} ${t+n} L ${e} ${t-n} Z`}function Km(e,t,n,r){let i=+(r===`right`);return`M ${e} ${t-n} A ${n} ${n} 0 0 ${i} ${e} ${t+n}`}function qm(e,t,n){if(e<=0||t<=0)return 0;let r=n*Math.min(e/t,1);return Math.max(Wp,r)}var Jm=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function Ym(e){return e>=1.4}function Xm(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Zm(e,t){return Xm(e,t)&&e.getHours()===t.getHours()}function Qm(e){return`${Jm[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`}function $m(e){return`${`${e.getHours()}`.padStart(2,`0`)}:${`${e.getMinutes()}`.padStart(2,`0`)}`}function eh(e,t){return Ym(t)?`${Qm(e)} ${$m(e)}`:Qm(e)}function th(e,t){if(e.length===0)return[];let n=Ym(t),r=[],i=null,a=-1/0;for(let o of e){let e=new Date(o.row.committerUnix*1e3),s=o.y*t,c=!i||!Xm(e,i),l=!i||e.getMonth()!==i.getMonth()||e.getFullYear()!==i.getFullYear(),u=!i||!Zm(e,i);i=e;let d=null;if(n?c?d={key:`${o.row.sha}:day`,text:Qm(e),y:s,kind:`month`}:u&&(d={key:`${o.row.sha}:hour`,text:$m(e),y:s,kind:`hour`}):c&&(d={key:`${o.row.sha}:day`,text:l?Qm(e):`${e.getDate()}`,y:s,kind:l?`month`:`day`}),!d)continue;let f=d.kind===`hour`?34:22;s-a<f||(r.push(d),a=s)}return r}function nh(e,t,n){if(e.length===0)return null;let r=t/n,i=Math.max(0,Math.min(e.length-1,Math.floor((r-40-112)/56)));for(;i+1<e.length&&e[i+1].y*n<=t;)i++;return e[i]??e[0]??null}function rh(e){return e.includes(`/`)}function ih(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ah(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.sha!==i.sha||r.row!==i.row||r.lane!==i.lane||r.parentShas.length!==i.parentShas.length||!ih(r.refNames,i.refNames))return!1;for(let e=0;e<r.parentShas.length;e++)if(r.parentShas[e]!==i.parentShas[e])return!1}return!0}function oh(e,t){if(t.length<=e.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.sha!==i.sha||r.row!==i.row||r.lane!==i.lane||!ih(r.refNames,i.refNames))return!1}return!0}function sh(e,t){return!(!e||!t||e.length===0||t.length===0||ah(e,t)||oh(e,t))}function ch(e,t){return e?`☁ `:t?`● `:`⎇ `}var lh=new Map;function uh(e){let t=lh.get(e);if(t!==void 0)return t;let n=ef(Qd(e,am));return lh.set(e,n),n}function dh(e,t,n){let r=ch(t,n)+e;return im+Math.ceil(uh(r))}function fh(e,t,n,r){let i=[],a=new Map;for(let o of e){let e=o.x+(r?.get(o.row.sha)??G)+8,s=o.y-10,c=e;for(let e of o.row.refNames){let r=t!==null&&e===t,a=rh(e);i.push({refName:e,nodeSha:o.row.sha,x:c,y:s,color:Fr(e),isCurrent:r,isSelected:e===n,isRemote:a}),c+=dh(e,a,r)+rm}a.set(o.row.sha,o.row.refNames.length>0?c-e-rm:0)}return{placements:i,rowWidths:a}}function ph(e){return Math.min(cm,30+Math.ceil(uh(vm(e.path))))}function mh(e,t,n){let r=new Map;for(let e of t){if(!e.headSha||e.bare||e.prunable||e.isCurrent&&!e.detached)continue;let t=r.get(e.headSha)??[];t.push(e),r.set(e.headSha,t)}let i=[];for(let t of e){let e=r.get(t.row.sha);if(!e)continue;e.sort((e,t)=>Number(t.isCurrent)-Number(e.isCurrent)||e.path.localeCompare(t.path));let a=t.x-(n?.get(t.row.sha)??G)-8;for(let n of e){let e=ph(n);i.push({worktree:n,nodeSha:t.row.sha,x:a-e,y:t.y-Ep/2,width:e}),a-=e+om}}return i}function K(e,t,n){return e+(t-e)*n}function hh(e,t,n,r){let i=t*3,a=e-i,o=e+t+i,s=56*r,c=152*r;return{firstIdx:Math.max(0,Math.floor((a-c)/s)),lastIdx:Math.min(n-1,Math.ceil((o-c)/s))}}function gh(e,t,n,r){return Math.max(e,t)>=n&&Math.min(e,t)<=r}function _h(e,t,n){let r=e.nodes.slice(t,n+1),i=[];for(let r of e.nodes)for(let a=0;a<r.row.parentShas.length;a++){let o=r.row.parentShas[a],s=e.shaToNode.get(o)??{row:{...r.row,sha:o,parentShas:[],refNames:[]},x:r.x,y:e.totalHeight,idx:e.nodes.length};gh(r.idx,s.idx,t,n)&&i.push({from:r,to:s,isMerge:a>0,key:`${r.row.sha}-${s.row.sha}`})}return{visibleNodes:r,visibleEdges:i}}function vh(e,t){let n=new Set;if(!e||!t)return n;let r=e.nodes.find(e=>e.row.refNames.includes(t));if(!r)return n;let i=r.row.sha,a=new Set;for(;i&&!a.has(i);){a.add(i);let t=e.shaToNode.get(i),r=t?.row.parentShas[0];if(!t||!r)break;n.add(`${t.row.sha}-${r}`);let o=e.shaToNode.get(r);if(!o)break;i=o.row.sha}return n}function yh(e,t){let n=new Set;if(!e||!t)return n;let r=e.nodes.find(e=>e.row.refNames.includes(t));if(!r)return n;let i=r.row.sha;for(;i&&!n.has(i);){n.add(i);let t=e.shaToNode.get(i),r=t?.row.parentShas[0];if(!t||!r||!e.shaToNode.get(r))break;i=r}return n}function bh(e,t){if(!e||!t)return null;let n=e.nodes.find(e=>e.row.refNames.includes(t));return n?{key:t,x:n.x-dm/2,color:Fr(t)}:null}function xh(e){return new Set(e.unstaged.filter(e=>e.status===`U`).map(e=>e.path)).size}function Sh(e,t){return Math.max(e.topIdx,t.topIdx)<Math.min(e.bottomIdx,t.bottomIdx)}function Ch(e,t=Zp){let n=new Map;for(let t of e){let e=n.get(t.railKey);e?e.push(t):n.set(t.railKey,[t])}let r=new Map;for(let e of n.values()){e.sort((e,t)=>e.topIdx-t.topIdx||e.bottomIdx-t.bottomIdx||e.key.localeCompare(t.key));let n=e.map((e,t)=>t),i=e=>n[e]===e?e:(n[e]=i(n[e]),n[e]),a=(e,t)=>{let r=i(e),a=i(t);r!==a&&(n[a]=r)};for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length&&!(e[n].topIdx>e[t].bottomIdx);n++)Sh(e[t],e[n])&&a(t,n);let o=new Map;for(let t=0;t<e.length;t++){let n=i(t),r=o.get(n);r?r.push(e[t]):o.set(n,[e[t]])}for(let e of o.values()){let n=[...e].sort((e,t)=>(e.bundleOrder??0)-(t.bundleOrder??0)||e.topIdx-t.topIdx||e.bottomIdx-t.bottomIdx||e.key.localeCompare(t.key)),i=[],a=[],o=[];for(let e of n){let t=i.findIndex(t=>t.every(t=>!Sh(t,e)));t<0&&(t=i.length,i.push([])),i[t].push(e),a[t]=Math.max(a[t]??0,e.strokeWidth??3),o.push({key:e.key,slot:t})}let s=[0];for(let e=1;e<a.length;e++)s[e]=s[e-1]+a[e-1]/2+t+a[e]/2;let c=Math.floor(s.length/2),l=s.length%2==1?s[c]:(s[c-1]+s[c])/2;for(let e of o)r.set(e.key,s[e.slot]-l)}}return r}function wh(e,t=Xp){let n=new Map;for(let t of e){let e=`${t.targetKey}:${t.side}`,r=n.get(e);r?r.push(t):n.set(e,[t])}let r=new Map;for(let e of n.values()){e.sort((e,t)=>(e.side===`right`?e.railX-t.railX:t.railX-e.railX)||e.key.localeCompare(t.key));let n=(e.length-1)/2;for(let i=0;i<e.length;i++)r.set(e[i].key,(i-n)*t)}return r}function Th(e,t=Xp){let n=new Map;for(let t of e){let e=`${t.targetKey}:${t.side}`,r=n.get(e);r?r.count++:n.set(e,{targetKey:t.targetKey,count:1})}let r=new Map;for(let{targetKey:e,count:i}of n.values()){if(i<5)continue;let n=G+Math.ceil((i-4)*t/2);r.set(e,Math.max(r.get(e)??G,n))}return r}function Eh(e,t,n=0){return t?.mode===`outer-rail`&&t.horizontalTargetJoin?t.outerRailX+n:t?.mode===`adjacent-hook`||t?.mode===`occlusion-hook`||t?.mode===`target-hook`?(t.track===`to`?e.to.x:e.from.x)+n:null}function Dh(e,t,n,r){return Math.abs(n-r)<.001?[]:[{key:e.key,fromSha:e.from.row.sha,toSha:e.to.row.sha,x:t,startY:n,endY:r}]}function Oh(e,t,n){let r=Math.min(e.from.y,e.to.y),i=Math.max(e.from.y,e.to.y),a=t=>Dh(e,t,r,i);switch(t.mode){case`straight`:return a(e.from.x+n);case`adjacent-hook`:case`occlusion-hook`:case`target-hook`:return a((t.track===`to`?e.to.x:e.from.x)+n);case`outer-rail`:return a(t.outerRailX+n);case`inside-rail`:return[...a(t.sourceRailX+n),...a(t.targetRailX+n)];case`curve`:return[]}}function kh(e,t){return t.key===e.key||t.fromSha===e.from.row.sha||t.fromSha===e.to.row.sha||t.toSha===e.from.row.sha||t.toSha===e.to.row.sha}function Ah(e,t,n){if(t.targetSide)return fp(Lm(e.from,e.to,t.targetSide,G,t.sourceSide).points,t.targetSide,n.filter(t=>!kh(e,t)),Qp)}function jh(e,t,n){let r=new Map;for(let i of e){let e=zm(i.from,i.to,i.key,t,{adjacentTrack:i.isMerge?`to`:`from`,additionalOccupiedLanes:n});r.set(i.key,e)}let i=new Set,a=new Map;for(let t of e){let e=Eh(t,r.get(t.key));if(e===null||Math.abs(e-t.to.x)<.001)continue;let n=e<t.to.x?`left`:`right`;i.add(`${t.to.row.sha}:${n}`)}for(let t of e){if(r.get(t.key)?.mode!==`curve`)continue;let e=t.from.x<t.to.x?`left`:t.from.x>t.to.x?`right`:null;if(!e)continue;let n=`${t.to.row.sha}:${e}`;a.set(n,(a.get(n)??0)+1)}for(let[e,t]of a)t>1&&i.add(e);for(let a of e){if(r.get(a.key)?.mode!==`curve`)continue;let e=a.from.x<a.to.x?`left`:a.from.x>a.to.x?`right`:null;if(!e||!i.has(`${a.to.row.sha}:${e}`))continue;let o=hp({x:a.from.x,y:a.from.y,idx:a.from.idx,lane:a.from.row.lane},{x:a.to.x,y:a.to.y,idx:a.to.idx,lane:a.to.row.lane},t,`from`,n);!o||o.side!==e||r.set(a.key,{mode:`target-hook`,laneA:Math.min(a.from.row.lane,a.to.row.lane),laneB:Math.max(a.from.row.lane,a.to.row.lane),track:`from`})}let o=new Set(e.filter(e=>e.isMerge&&e.from.idx<e.to.idx).map(e=>e.from.row.sha));for(let t of e){if(t.isMerge||t.from.idx>=t.to.idx||!o.has(t.from.row.sha))continue;let e=r.get(t.key);((e?.mode===`adjacent-hook`||e?.mode===`occlusion-hook`||e?.mode===`target-hook`)&&e.track===`from`||e?.mode===`outer-rail`&&Math.abs(e.outerRailX-t.from.x)<.001)&&r.set(t.key,{...e,centeredSource:!0})}let s=e.flatMap(e=>{let t=r.get(e.key);if(!t)return[];let n=Bm(e,t);return n?[{key:e.key,railKey:n,topIdx:Math.min(e.from.idx,e.to.idx),bottomIdx:Math.max(e.from.idx,e.to.idx),bundleOrder:+!!e.isMerge,railStartY:Math.min(e.from.y,e.to.y)+G+8,strokeWidth:e.isMerge?2:4.5}]:[]}),c=Ch(s);for(let e of s){if(r.get(e.key)?.mode!==`straight`||Math.abs(c.get(e.key)??0)<.001)continue;let t=s.filter(t=>t.key!==e.key&&t.railKey===e.railKey&&t.topIdx>e.topIdx&&t.topIdx<e.bottomIdx&&Sh(e,t)).sort((e,t)=>e.topIdx-t.topIdx||e.key.localeCompare(t.key))[0];t?.railStartY!==void 0&&r.set(e.key,{mode:`straight`,bundleJoinY:t.railStartY-8})}let l=new Map,u=new Set;for(let t of e){let e=r.get(t.key);if((e?.mode===`straight`||(e?.mode===`adjacent-hook`||e?.mode===`occlusion-hook`||e?.mode===`target-hook`||e?.mode===`outer-rail`)&&e.centeredSource===!0)&&t.from.idx<t.to.idx&&u.add(t.from.row.sha),t.from.idx>=t.to.idx||!Bm(t,e??{mode:`curve`}))continue;let n=l.get(t.to.row.sha);n?n.push(t.key):l.set(t.to.row.sha,[t.key])}for(let t of e){if(r.get(t.key)?.mode!==`curve`||Math.abs(t.from.x-t.to.x)<.001)continue;let e=l.get(t.to.row.sha)??[];!(!(e.length<2)&&e.some(e=>Math.abs(c.get(e)??0)>.001))&&!u.has(t.to.row.sha)||r.set(t.key,{mode:`curve`,targetSide:t.from.x<t.to.x?`left`:`right`,...u.has(t.from.row.sha)?{sourceSide:t.to.x<t.from.x?`left`:`right`}:{}})}let d=e.flatMap(e=>{let t=r.get(e.key);return t?Oh(e,t,c.get(e.key)??0):[]});for(let t of e){let e=r.get(t.key);if(e?.mode!==`curve`||!e.targetSide)continue;let n=Ah(t,e,d);n!==void 0&&r.set(t.key,{...e,targetLeadOffset:n-t.to.x})}let f=e.flatMap(e=>{let t=Eh(e,r.get(e.key),c.get(e.key)??0);return t===null||Math.abs(t-e.to.x)<.001?[]:[{key:e.key,targetKey:e.to.row.sha,side:t<e.to.x?`left`:`right`,railX:t}]});return{plans:r,bundleOffsets:c,targetJoinOffsets:wh(f),targetNodeRadii:Th(f)}}function Mh(e,t,n,r,i){return e.map(e=>{let a=r.has(e.key),o=t.plans.get(e.key)??zm(e.from,e.to,e.key,n,{adjacentTrack:e.isMerge?`to`:`from`}),s=t.bundleOffsets.get(e.key)??0,c=t.targetJoinOffsets.get(e.key)??0,l=t.targetNodeRadii.get(e.to.row.sha)??G,u=e.isMerge?e.to:e.from;return{key:e.key,fromSha:e.from.row.sha,toSha:e.to.row.sha,path:Vm(e.from,e.to,o,s,c,l),plan:o,bundleOffset:s,targetJoinOffset:c,targetNodeRadius:l,x1:e.from.x,y1:e.from.y,x2:e.to.x,y2:e.to.y,isMerge:e.isMerge,stroke:i.get(u.row.sha)??jr(u.row.lane),strokeWidth:a?4.5:e.isMerge?2:3,opacity:a?.95:.8}})}function Nh(e,t,n,r,i,a){return sh(e,t)?!0:!i||!a?!1:n!==r}function Ph(){let e=Xf(),t=I(e=>e.historyWindow),n=I(e=>e.graphModel),r=I(e=>e.refs),i=I(e=>e.selectedSha),a=I(e=>e.selectedRefName),o=I(e=>e.mergePreview),s=I(e=>e.scrollToSha),c=I(e=>e.scrollToKey),l=I(e=>e.selectCommit),u=I(e=>e.selectGraphRef),d=I(e=>e.clearGraphRefSelection),f=I(e=>e.ensureMergePreview),p=I(e=>e.requestMore),m=I(e=>e.performRefAction),h=I(e=>e.performCommitAction),g=I(e=>e.performMergeRef),_=I(e=>e.performRebaseRef),v=I(e=>e.pendingMutation),x=I(e=>e.pendingCheckout),S=I(e=>e.graphAnimationSuppressToken),C=I(e=>e.showCommitMessages),w=I(e=>e.showGutterColors),T=I(e=>e.graphZoom),ee=I(e=>e.setGraphZoom),E=I(e=>e.showError),te=I(e=>e.commitCIStatus),ne=I(e=>e.fetchCommitCIStatusesIfNeeded),re=I(e=>e.worktreeChanges),ie=I(e=>e.worktrees),ae=I(e=>e.worktreeSelected),oe=I(e=>e.selectWorktree),se=I(e=>e.openRepoByPath),ce=I(e=>e.repoId),[D,O]=(0,b.useState)(null),le=(0,b.useRef)(null),ue=(0,b.useRef)(null),de=(0,b.useRef)(null),fe=(0,b.useRef)({scrollTop:0,clientHeight:0}),pe=(0,b.useRef)(0),k=(0,b.useRef)(null),me=(0,b.useRef)(null),he=(0,b.useRef)(null),ge=(0,b.useRef)(!1),_e=(0,b.useRef)(null),ve=(0,b.useRef)(0),[ye,be]=(0,b.useState)(!1),[xe,Se]=(0,b.useState)(0),[Ce,we]=(0,b.useState)(()=>typeof window>`u`?0:window.innerWidth),[Te,Ee]=(0,b.useState)(0),[De,Oe]=(0,b.useState)(0),[ke,Ae]=(0,b.useState)(null),je=(0,b.useRef)(null),[Me,Ne]=(0,b.useState)(!1),[A,Pe]=(0,b.useState)(null),[Fe,Ie]=(0,b.useState)(null),[Le,Re]=(0,b.useState)(!1),[ze,Be]=(0,b.useState)(null),[Ve,He]=(0,b.useState)(null),[Ue,We]=(0,b.useState)(null),[Ge,Ke]=(0,b.useState)(null),[qe,Je]=(0,b.useState)(null),[{graphProgress:Ye},Xe]=cl(()=>({graphProgress:1,config:$p})),Ze=(0,b.useRef)(T),Qe=(0,b.useRef)(null),$e=(0,b.useRef)(0),et=(0,b.useRef)(null),tt=(0,b.useRef)(0),nt=(0,b.useRef)(null),rt=(0,b.useRef)(null),it=(0,b.useRef)(null),at=(0,b.useRef)(S),[,ot]=(0,b.useReducer)(e=>e+1,0),st=(0,b.useRef)({firstIdx:0,lastIdx:100});(0,b.useEffect)(()=>{let e=()=>we(window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,b.useEffect)(()=>{let e=e=>{e.code!==`KeyC`||!e.ctrlKey||!e.shiftKey||e.altKey||(e.preventDefault(),e.stopImmediatePropagation(),!(e.repeat||!ce)&&Ut(ce).catch(e=>{E(`Open terminal failed`,e)}))};return document.addEventListener(`keydown`,e,{capture:!0}),()=>document.removeEventListener(`keydown`,e,{capture:!0})},[ce,E]);let ct=(0,b.useCallback)(()=>{Qe.current!==null&&clearTimeout(Qe.current),be(!0),Qe.current=setTimeout(()=>{Qe.current=null,be(!1)},Mp)},[]);(0,b.useEffect)(()=>()=>{Qe.current!==null&&clearTimeout(Qe.current)},[]);let lt=n?.currentBranch??r.find(e=>e.isCurrent)?.shortName??null,ut=Ce>0?Ce:(n?.layout.totalWidth??0)*Math.max(T,.1),dt=(0,b.useMemo)(()=>Lr(ut,Te,T,C?260:0),[ut,Te,C,T]),ft=(0,b.useMemo)(()=>n?zr(n.renderedRows,dt.maxLaneRadius):null,[n,dt.maxLaneRadius]),pt=(0,b.useMemo)(()=>{if(!ft||A?.kind!==`rebase`)return ft;let e=r.find(e=>e.kind===`head`&&e.isCurrent),t=r.find(e=>e.shortName===A.targetRefName),n=t?t.peeledSha??t.targetSha:void 0;return!e||!n?ft:np(ft,e.targetSha,n,dt.maxLaneRadius)??ft},[ft,A,r,dt.maxLaneRadius]),mt=(0,b.useMemo)(()=>pt?Rr(pt,dt):null,[pt,dt]),j=(0,b.useMemo)(()=>!pt||!mt?null:Hr(pt,dt.extraLeftGutter,dt.rightGutter,mt),[pt,mt,dt.extraLeftGutter,dt.rightGutter]),ht=(0,b.useMemo)(()=>new Map(r.map(e=>[e.shortName,e])),[r]),gt=(0,b.useMemo)(()=>{let e=new Map;for(let t of ie){if(!t.branchShortName||t.bare||t.prunable)continue;let n=e.get(t.branchShortName)??[];n.push(t),e.set(t.branchShortName,n)}return e},[ie]),M=(0,b.useMemo)(()=>a?ht.get(a)??null:null,[ht,a]),_t=(0,b.useMemo)(()=>{if(!M)return null;if(M.kind===`head`)return gt.get(M.shortName)?.find(e=>!e.isCurrent)??null;if(M.kind===`remote`){let e=r.find(e=>e.kind===`head`&&e.upstream===M.name);return e?gt.get(e.shortName)?.find(e=>!e.isCurrent)??null:null}return null},[M,r,gt]),vt=(0,b.useMemo)(()=>Sm(r),[r]),yt=(0,b.useMemo)(()=>{if(!A||!t||A.kind===`uncommit`)return null;if(A.kind===`rebase`)return xr(t.rows,r,A.targetRefName);if(A.kind===`squash`){let e=t.rows.find(e=>e.sha===A.oldestSha);return e?_r(t.rows,r,A.oldestSha,e.subject):null}let e=t.rows.find(e=>e.sha===A.sha);if(!e)return null;let n=A.action===`revert`?`Revert "${e.subject}"`:e.subject;return vr(t.rows,r,n,A.action)},[A,t,r]),bt=(0,b.useMemo)(()=>A?.kind===`squash`&&t?gr(t.rows,r,A.oldestSha):null,[A,t,r]),xt=(0,b.useMemo)(()=>new Set(bt?.map(e=>e.sha)??[]),[bt]),St=(0,b.useMemo)(()=>{if(A?.kind!==`rebase`||yt||!t)return null;let e=Sr(t.rows,r,A.targetRefName);return e===`merge-commits`?{title:`Preview unavailable`,detail:`This rebase crosses merge commits. It can still run, but the result is too ambiguous to predict.`}:e===`history-not-loaded`?{title:`Preview unavailable`,detail:`The commits needed for this preview are outside the loaded history.`}:{title:`Preview unavailable`,detail:`This rebase can still be run, but its result cannot be predicted reliably.`}},[A,yt,t,r]),Ct=(0,b.useMemo)(()=>!j||!A||!yt?null:Em(j,yt,dt,A),[j,A,yt,dt]),wt=(0,b.useMemo)(()=>{if(!j||A?.kind!==`uncommit`)return null;let e=j.shaToNode.get(A.sha);return e?ap(e,G*1.45):null},[j,A]),Tt=(0,b.useMemo)(()=>{if(A?.kind!==`rebase`||!Fe||Fe.targetRefName!==A.targetRefName||!Ct||Ct.nodes.length===0)return null;let e=G*2,t=[...Ct.nodes.map(({node:e})=>e),Fe.targetNode];return op({baseZoom:Fe.baseZoom,bounds:{minX:Math.min(...t.map(e=>e.x))-e,minY:Math.min(...t.map(e=>e.y))-e,maxX:Math.max(...t.map(e=>e.x))+e,maxY:Math.max(...t.map(e=>e.y))+e},viewport:Fe.viewport,scroll:Fe.scroll,margin:12})},[A,Ct,Fe]),Et=Tt?.zoom??T,Dt=Tt?.translateX??0,Ot=Tt?.translateY??0,kt=`${Le?tm:em}ms ${nm}`,At=(0,b.useMemo)(()=>{if(!j||!re)return null;let e=re.staged.length+re.unstaged.length;if(e===0)return null;let t=(lt?j.nodes.find(e=>e.row.refNames.includes(lt)):void 0)??j.shaToNode.get(re.headSha);if(!t)return null;let n=re.mergeHeadShas?.length?`merge`:re.rebaseHeadSha?`rebase`:`worktree`,r=xh(re),i=n===`worktree`?j.shaToColor.get(t.row.sha)??jr(t.row.lane):`#fab387`,a=rp(t,n===`worktree`&&A?.kind===`commit`?Ct?.nodes[0]?.node??null:null,56),o=n===`merge`?ip(j.nodes[0]??t,56):a,s=n===`worktree`?a.anchor:t,c={row:{row:s.row.row-1,sha:`${n}:${re.headSha}:${re.mergeHeadShas?.[0]??re.rebaseHeadSha??`dirty`}`,parentShas:[s.row.sha,...re.mergeHeadShas?.slice(0,1)??[]],authorName:``,authorEmail:``,authorUnix:0,committerUnix:0,subject:n===`merge`?`Merge in progress`:n===`rebase`?`Rebase in progress`:`Uncommitted changes`,additions:0,deletions:0,locChanged:0,refNames:[],lane:s.row.lane},x:s.x,y:o.y,idx:o.idx},l=j.nodes.map(e=>e.row.lane),u=zm(c,s,`${c.row.sha}-${s.row.sha}`,l),d=re.mergeHeadShas?.[0],f=d?j.shaToNode.get(d)??null:null,p=f?Vm(c,f,zm(c,f,`${c.row.sha}-${f.row.sha}`,l,{adjacentTrack:`to`}),0):null;return{kind:n,x:c.x,y:c.y,idx:c.idx,lane:c.row.lane,headX:s.x,headY:s.y,color:i,count:e,conflictedCount:r,targetPlan:u,sourcePath:p}},[j,re,lt,A,Ct]),N=At??(x?he.current:null),jt=!!N&&!ge.current,{worktreeX:Mt,worktreeY:Nt,worktreeHeadX:Pt,worktreeHeadY:Ft,worktreeOpacity:It}=cl({worktreeX:N?.x??0,worktreeY:N?.y??0,worktreeHeadX:N?.headX??0,worktreeHeadY:N?.headY??0,worktreeOpacity:N?x?.5:1:0,immediate:e=>e!==`worktreeOpacity`&&jt,config:e=>e===`worktreeOpacity`?{mass:1,tension:210,friction:26,clamp:!0}:$p});(0,b.useEffect)(()=>{At?he.current=At:x||(he.current=null),N?ge.current=!0:x||(ge.current=!1)},[At,N,x]);let Lt=(0,b.useCallback)(e=>{ve.current=e,me.current===null&&(me.current=requestAnimationFrame(()=>{me.current=null,Se(ve.current)}))},[]),Rt=(0,b.useCallback)(()=>{k.current!==null&&(cancelAnimationFrame(k.current),k.current=null),je.current&&(Xe.stop(),Xe.set({graphProgress:1}),je.current=null,Ae(null))},[Xe]),zt=(0,b.useCallback)(e=>{k.current!==null&&(cancelAnimationFrame(k.current),k.current=null),Xe.stop(),Xe.set({graphProgress:0}),je.current=e,Ae(e),k.current=requestAnimationFrame(()=>{k.current=requestAnimationFrame(()=>{k.current=null,je.current===e&&Xe.start({graphProgress:1,immediate:!1,config:$p,onRest:t=>{t.finished&&Ae(t=>t===e?(je.current=null,null):t)}})})})},[Xe]),Bt=(0,b.useCallback)(()=>{_e.current!==null&&(clearTimeout(_e.current),_e.current=null)},[]),P=(0,b.useCallback)(e=>{Bt(),Be(e)},[Bt]),Vt=(0,b.useCallback)(e=>{Bt(),_e.current=setTimeout(()=>{Be(t=>t===e?null:t),_e.current=null},Ap)},[Bt]);(0,b.useEffect)(()=>{Ne(!1),Pe(null),Ie(null),He(null)},[a,i]),(0,b.useEffect)(()=>{if(Fe||!Le)return;let e=window.setTimeout(()=>Re(!1),tm);return()=>window.clearTimeout(e)},[Fe,Le]),(0,b.useEffect)(()=>()=>{Bt()},[Bt]),(0,b.useEffect)(()=>{if(!j||!t){nt.current=t?.rows??null,rt.current=j,it.current=lt,Rt();return}let e=S!==at.current;if(at.current=S,e){nt.current=t.rows,rt.current=j,it.current=lt;return}Nh(nt.current,t.rows,it.current,lt,rt.current,j)&&rt.current?zt({fromLayout:rt.current,toLayout:j,fromCurrentBranch:it.current,toCurrentBranch:lt}):Rt(),nt.current=t.rows,rt.current=j,it.current=lt},[lt,t,j,S,zt,Rt]),(0,b.useEffect)(()=>()=>{Xe.stop(),k.current!==null&&cancelAnimationFrame(k.current),me.current!==null&&cancelAnimationFrame(me.current)},[Xe]);let Ht=(0,b.useMemo)(()=>t?Wm(t.rows):0,[t]),Wt=(0,b.useMemo)(()=>j?j.nodes.map(e=>e.row.lane):[],[j]),Gt=(0,b.useMemo)(()=>N?new Map([[N.idx,[N.lane]]]):void 0,[N]),Kt=(0,b.useMemo)(()=>{if(!w)return[];let e=mt?.laneCenterX??dt.laneCenterX,t=j?Math.min(0,...j.nodes.map(e=>e.row.lane)):-dt.maxLaneRadius,n=j?Math.max(0,...j.nodes.map(e=>e.row.lane)):dt.maxLaneRadius;return Array.from({length:n-t+1},(n,r)=>{let i=r+t;return{lane:i,x:e+i*80,color:jr(i)}})},[mt?.laneCenterX,j,w,dt.laneCenterX,dt.maxLaneRadius]),qt=(0,b.useMemo)(()=>vh(j,lt),[j,lt]),Jt=(0,b.useCallback)((e,t)=>{if(!j)return;fe.current={scrollTop:e.scrollTop,clientHeight:e.clientHeight},pe.current=e.scrollTop,Lt(e.scrollTop),ue.current&&(ue.current.style.transform=`translateY(${-e.scrollTop}px)`);let{firstIdx:n,lastIdx:r}=hh(e.scrollTop,e.clientHeight,j.nodes.length,t);st.current={firstIdx:n,lastIdx:r},ot()},[j,Lt]);(0,b.useEffect)(()=>{if(!s||!j||!le.current||Date.now()<$e.current)return;let e=j.shaToNode.get(s);if(!wr(et.current,c,!!e)||!e)return;et.current=c;let t=le.current,n=e.y*T-t.clientHeight/2;tt.current=Date.now()+700,t.scrollTo({top:Math.max(0,n),behavior:`smooth`})},[s,c,j,T]),(0,b.useEffect)(()=>{let e=le.current;if(!e)return;let n=()=>{if(!j)return;let n=e.scrollTop,r=Math.abs(n-pe.current)>.5;e.scrollLeft!==0&&(e.scrollLeft=0),fe.current={scrollTop:e.scrollTop,clientHeight:e.clientHeight},we(window.innerWidth),Ee(e.getBoundingClientRect().left),Oe(e.clientHeight),pe.current=n,r&&Date.now()>=tt.current&&Rt(),Lt(e.scrollTop),ue.current&&(ue.current.style.transform=`translateY(${-e.scrollTop}px)`),de.current&&(de.current.style.transform=`translateY(${-e.scrollTop}px)`);let{firstIdx:i,lastIdx:a}=hh(e.scrollTop,e.clientHeight,j.nodes.length,Ze.current),o=st.current,s=Math.floor((o.lastIdx-o.firstIdx)*.25);if((i<o.firstIdx+s||a>o.lastIdx-s)&&(st.current={firstIdx:i,lastIdx:a},ot()),t&&t.hasMoreAfter&&j){let t=j.totalHeight*Ze.current;Cr(e.scrollTop,e.clientHeight,t)&&p(`down`)}};e.addEventListener(`scroll`,n,{passive:!0});let r=new ResizeObserver(()=>n());return r.observe(e),n(),()=>{e.removeEventListener(`scroll`,n),r.disconnect()}},[j,t,p,Rt,Lt]),(0,b.useEffect)(()=>{let e=le.current;!e||!ue.current||Jt(e,T)},[j,T,Jt]);let Yt=(0,b.useCallback)((e,t)=>{let n=le.current;if(!n)return;let r=Ze.current;if(ct(),e===r)return;let i=(n.scrollTop+t)/r;Ze.current=e,ee(e),n.scrollTop=Math.max(0,i*e-t)},[ee,ct]),Xt=(0,b.useCallback)(()=>{let e=le.current;e&&Yt(1,e.clientHeight/2)},[Yt]);(0,b.useEffect)(()=>{let e=e=>{if(!e.ctrlKey&&!e.metaKey)return;let t=le.current;if(!t||!t.contains(e.target))return;e.preventDefault(),e.stopPropagation();let n=t.getBoundingClientRect(),r=Ze.current,i=e.deltaY>0?-.1:.1,a=Math.max(ci,Math.min(3,Math.round((r+i)*10)/10));Yt(a,e.clientY-n.top)};return document.addEventListener(`wheel`,e,{passive:!1,capture:!0}),()=>document.removeEventListener(`wheel`,e,{capture:!0})},[Yt]),(0,b.useEffect)(()=>{!j||!le.current||!t?.hasMoreAfter||le.current.clientHeight/T>j.nodes.length*56*.8&&p(`down`)},[T,j,t,p]);let{visibleNodes:Zt,visibleEdges:Qt}=(0,b.useMemo)(()=>{if(!j)return{visibleNodes:[],visibleEdges:[]};let{firstIdx:e,lastIdx:t}=st.current;return _h(j,e,t)},[j,st.current.firstIdx,st.current.lastIdx]),$t=(0,b.useMemo)(()=>jh(Qt,Wt,Gt),[Qt,Wt,Gt]),{placements:en,rowWidths:tn}=(0,b.useMemo)(()=>fh(Zt,lt,a,$t.targetNodeRadii),[Zt,lt,a,j,$t]),nn=(0,b.useMemo)(()=>mh(Zt,ie,$t.targetNodeRadii),[Zt,ie,$t]),rn=(0,b.useMemo)(()=>{let e=new Map;for(let t of nn)e.set(t.nodeSha,Math.min(e.get(t.nodeSha)??1/0,t.x));return e},[nn]),an=tn,on=(0,b.useMemo)(()=>Mh(Qt,$t,Wt,qt,j?.shaToColor??pm),[Qt,$t,Wt,qt,j]),sn=(0,b.useMemo)(()=>bh(j,lt),[j,lt]),cn=(0,b.useMemo)(()=>{if(!ke)return null;let e=fe.current.scrollTop,t=fe.current.clientHeight||le.current?.clientHeight||0,n=ke.fromLayout.nodes.map(e=>e.row.lane),r=ke.toLayout.nodes.map(e=>e.row.lane),i=hh(e,t,ke.fromLayout.nodes.length,T),o=hh(e,t,ke.toLayout.nodes.length,T),s=_h(ke.fromLayout,i.firstIdx,i.lastIdx),c=_h(ke.toLayout,o.firstIdx,o.lastIdx),l=jh(s.visibleEdges,n),u=jh(c.visibleEdges,r),d=Mh(s.visibleEdges,l,n,vh(ke.fromLayout,ke.fromCurrentBranch),ke.fromLayout.shaToColor),f=Mh(c.visibleEdges,u,r,vh(ke.toLayout,ke.toCurrentBranch),ke.toLayout.shaToColor),p=fh(s.visibleNodes,ke.fromCurrentBranch,a,l.targetNodeRadii).placements,m=fh(c.visibleNodes,ke.toCurrentBranch,a,u.targetNodeRadii).placements,h=bh(ke.fromLayout,ke.fromCurrentBranch),g=bh(ke.toLayout,ke.toCurrentBranch),_=new Map(s.visibleNodes.map(e=>[e.row.sha,e])),v=new Map(c.visibleNodes.map(e=>[e.row.sha,e])),y=new Map(d.map(e=>[e.key,e])),b=new Map(f.map(e=>[e.key,e])),x=new Map(p.map(e=>[e.refName,e])),S=new Map(m.map(e=>[e.refName,e]));return{nodes:[...new Set([..._.keys(),...v.keys()])].map(e=>{let t=_.get(e),n=v.get(e),r=n??t;if(!r)return null;let i=n?ke.toLayout:ke.fromLayout;return{sortIdx:n?.idx??t?.idx??0,item:{key:e,row:r.row,interactive:!!n,color:i.shaToColor.get(e)??jr(r.row.lane),fromX:t?.x??r.x,fromY:t?t.y:r.y+lm,toX:n?.x??r.x,toY:n?n.y:r.y-um,fromOpacity:+!!t,toOpacity:+!!n,fromRadius:t?l.targetNodeRadii.get(e)??G:u.targetNodeRadii.get(e)??G,toRadius:n?u.targetNodeRadii.get(e)??G:l.targetNodeRadii.get(e)??G}}}).filter(e=>e!==null).sort((e,t)=>e.sortIdx-t.sortIdx).map(e=>e.item),edges:[...new Set([...y.keys(),...b.keys()])].map(e=>{let t=y.get(e),n=b.get(e),r=n??t;if(!r)return null;let i=n?ke.fromLayout.shaToNode.get(n.fromSha):void 0,a=n?ke.fromLayout.shaToNode.get(n.toSha):void 0,o=t?ke.toLayout.shaToNode.get(t.fromSha):void 0,s=t?ke.toLayout.shaToNode.get(t.toSha):void 0;return{sortY:Math.min(n?.y1??t?.y1??0,n?.y2??t?.y2??0),item:{key:e,fromSha:r.fromSha,toSha:r.toSha,path:n?.path??t?.path??``,fromPlan:t?.plan??n?.plan??{mode:`curve`},toPlan:n?.plan??t?.plan??{mode:`curve`},fromBundleOffset:t?.bundleOffset??n?.bundleOffset??0,toBundleOffset:n?.bundleOffset??t?.bundleOffset??0,fromTargetJoinOffset:t?.targetJoinOffset??n?.targetJoinOffset??0,toTargetJoinOffset:n?.targetJoinOffset??t?.targetJoinOffset??0,fromTargetNodeRadius:t?.targetNodeRadius??n?.targetNodeRadius??G,toTargetNodeRadius:n?.targetNodeRadius??t?.targetNodeRadius??G,stroke:n?.stroke??t?.stroke??`#cdd6f4`,fromStrokeWidth:t?.strokeWidth??r.strokeWidth,toStrokeWidth:n?.strokeWidth??r.strokeWidth,fromOpacity:t?.opacity??0,toOpacity:n?.opacity??0,fromX1:t?.x1??i?.x??r.x1,fromY1:t?.y1??i?.y??r.y1+lm,fromX2:t?.x2??a?.x??r.x2,fromY2:t?.y2??a?.y??r.y2+lm,toX1:n?.x1??o?.x??r.x1,toY1:n?.y1??o?.y??r.y1-um,toX2:n?.x2??s?.x??r.x2,toY2:n?.y2??s?.y??r.y2-um}}}).filter(e=>e!==null).sort((e,t)=>e.sortY-t.sortY).map(e=>e.item),refs:[...new Set([...x.keys(),...S.keys()])].map(e=>{let t=x.get(e),n=S.get(e),r=n??t;return r?{sortY:n?.y??t?.y??0,item:{key:e,placement:r,fromX:t?.x??r.x,fromY:t?t.y:r.y+lm,toX:n?.x??r.x,toY:n?n.y:r.y-um,fromOpacity:+!!t,toOpacity:+!!n,fromScale:t?1:.9,toScale:n?1:.92}}:null}).filter(e=>e!==null).sort((e,t)=>e.sortY-t.sortY).map(e=>e.item),lane:h||g?{key:g?.key??h?.key??`current-lane`,color:g?.color??h?.color??`#89b4fa`,fromX:h?.x??g?.x??0,toX:g?.x??h?.x??0,fromOpacity:+!!h,toOpacity:+!!g}:null}},[ke,a,T]),ln=(0,b.useMemo)(()=>cn?.nodes??Zt.map(e=>({key:e.row.sha,row:e.row,interactive:!0,color:j?.shaToColor.get(e.row.sha)??jr(e.row.lane),fromX:e.x,fromY:e.y,toX:e.x,toY:e.y,fromOpacity:1,toOpacity:1,fromRadius:$t.targetNodeRadii.get(e.row.sha)??G,toRadius:$t.targetNodeRadii.get(e.row.sha)??G})),[cn,Zt,j]),un=(0,b.useMemo)(()=>cn?.edges??on.map(e=>({key:e.key,fromSha:e.fromSha,toSha:e.toSha,path:e.path,fromPlan:e.plan,toPlan:e.plan,fromBundleOffset:e.bundleOffset,toBundleOffset:e.bundleOffset,fromTargetJoinOffset:e.targetJoinOffset,toTargetJoinOffset:e.targetJoinOffset,fromTargetNodeRadius:e.targetNodeRadius,toTargetNodeRadius:e.targetNodeRadius,stroke:e.stroke,fromStrokeWidth:e.strokeWidth,toStrokeWidth:e.strokeWidth,fromOpacity:e.opacity,toOpacity:e.opacity,fromX1:e.x1,fromY1:e.y1,fromX2:e.x2,fromY2:e.y2,toX1:e.x1,toY1:e.y1,toX2:e.x2,toY2:e.y2})),[cn,on]),dn=(0,b.useMemo)(()=>cn?.refs??en.map(e=>({key:e.refName,placement:e,fromX:e.x,fromY:e.y,toX:e.x,toY:e.y,fromOpacity:1,toOpacity:1,fromScale:1,toScale:1})),[cn,en]),fn=(0,b.useMemo)(()=>Ct?.gutterX===void 0?cn?cn.lane:sn?{key:sn.key,color:sn.color,fromX:sn.x,toX:sn.x,fromOpacity:1,toOpacity:1}:null:{key:`action-preview-gutter`,color:Bp,fromX:Ct.gutterX,toX:Ct.gutterX,fromOpacity:1,toOpacity:1},[Ct,cn,sn]),pn=(0,b.useMemo)(()=>j&<?j.nodes.find(e=>e.row.refNames.includes(lt))??null:null,[j,lt]),mn=(0,b.useMemo)(()=>!M||M.kind!==`head`?null:wm(M,r),[M,r]),hn=(0,b.useMemo)(()=>!M||M.kind!==`head`?!1:!mn||mn.targetSha!==M.targetSha,[M,mn]),gn=(0,b.useMemo)(()=>!M||M.kind!==`head`||!mn||mn.targetSha===M.targetSha?!1:(M.ahead??0)>0,[M,mn]),_n=(0,b.useMemo)(()=>{if(!M)return[];if(M.kind===`head`){let e=(M.behind??0)>0?{action:`push`,label:`Force push`,tone:`warning`,force:!0}:{action:`push`,label:`Push`,tone:`neutral`};return M.isCurrent?[...hn?[e]:[],...gn?[{action:`reset`,label:`Reset`,tone:`warning`}]:[]]:_t?[{action:`open-worktree`,label:`Open worktree`,tone:`neutral`,worktreePath:_t.path},...hn?[e]:[]]:[{action:`checkout`,label:`Checkout`,tone:`neutral`},...hn?[e]:[],...gn?[{action:`reset`,label:`Reset`,tone:`warning`}]:[],{action:`delete`,label:`Delete`,tone:`danger`}]}return M.kind===`remote`?[..._t?[{action:`open-worktree`,label:`Open worktree`,tone:`neutral`,worktreePath:_t.path}]:[{action:`checkout`,label:`Checkout`,tone:`neutral`}],{action:`delete`,label:`Delete`,tone:`danger`}]:[{action:`push`,label:`Push`,tone:`neutral`}]},[M,_t,hn,gn]),vn=(0,b.useMemo)(()=>!M||M.kind!==`head`||_t?null:M.shortName,[M,_t]),yn=(0,b.useMemo)(()=>!!pn&&!!lt&&!!a&&a!==lt&&o?.sourceRefName===a&&o.mergeable,[pn,lt,a,o]),bn=(0,b.useMemo)(()=>M&&M.kind===`head`&&M.isCurrent?M:null,[M]),xn=(0,b.useMemo)(()=>{if(!j||!a||!o?.mergeable||o.sourceRefName!==a||!o.sourceSha||!o.targetSha)return null;let e=j.shaToNode.get(o.sourceSha),t=j.shaToNode.get(o.targetSha);if(!e||!t)return null;let n=j.nodes[0]??t,r={row:{row:n.row.row-1,sha:`preview:${o.sourceSha}:${o.targetSha}`,parentShas:[t.row.sha,e.row.sha],authorName:``,authorEmail:``,authorUnix:0,committerUnix:0,subject:`Merge preview`,additions:0,deletions:0,locChanged:0,refNames:[],lane:t.row.lane},x:t.x,y:n.y-56,idx:n.idx-1},i=`${r.row.sha}-${t.row.sha}`,s=`${r.row.sha}-${e.row.sha}`,c=zm(r,t,i,Wt),l=e.x<r.x?`left`:`right`,u=ep(j.nodes,r.idx,e.idx,80,l),d=j.nodes.find(e=>e.x===u),f=u!==null&&u<Math.min(r.x,e.x)?`left`:`right`;return{previewNode:r,sourceNode:e,targetNode:t,sourcePath:Vm(r,e,u===null?zm(r,e,s,Wt,{adjacentTrack:`to`}):{mode:`outer-rail`,side:f,anchorLane:d?.row.lane??(f===`left`?Math.min(...Wt)-1:Math.max(...Wt)+1),innerLane:f===`left`?Math.max(r.row.lane,e.row.lane):Math.min(r.row.lane,e.row.lane),outerRailX:u},$t.bundleOffsets.get(s)??0),targetPath:Vm(r,t,c,$t.bundleOffsets.get(i)??0),color:j.shaToColor.get(t.row.sha)??jr(t.row.lane)}},[j,a,o,Wt,$t.bundleOffsets]),Sn=(0,b.useMemo)(()=>Me?xn:null,[Me,xn]),Cn=(0,b.useCallback)((e,t)=>{e.stopPropagation(),Ne(!1),Pe(null),Ie(null),u(t)},[u]),wn=(0,b.useCallback)(e=>(O(e),m(e.action,e.refName,e.sha,e.force).finally(()=>{O(t=>hm(t,e)?null:t)})),[m]),Tn=(0,b.useCallback)(e=>{if(!a||!M||v)return;if(Ne(!1),e.action===`open-worktree`){e.worktreePath&&se(e.worktreePath);return}let t=e.action,n=M.targetSha,r=a,i={action:t,label:e.label,tone:e.tone,refName:r,sha:n,force:!!e.force};wn(i).catch(t=>{if(e.action===`push`&&!e.force&&gm(t))E(`Push rejected`,t,{label:`Force push`,run:()=>{wn({action:`push`,label:`Force push`,tone:`warning`,force:!0,refName:r,sha:n}).catch(e=>E(`Force push failed`,e))}});else{let n=e.action===`checkout`?_m(t):null;if(n){E(`Branch is already checked out`,t,{label:`Open worktree`,run:()=>{se(n)}});return}E(`${e.action} failed`,t)}})},[a,M,wn,E,v,se]),En=(0,b.useCallback)(e=>{if(!vn||v)return;let t=M?.kind===`head`&&M.isCurrent;Je({title:`Move branch`,message:t?`Move checked-out branch ${vn} to commit ${e.slice(0,8)}? This resets the working tree and discards tracked changes.`:`Move branch ${vn} to commit ${e.slice(0,8)}?`,confirmLabel:`Move`,onConfirm:()=>{Ne(!1),m(`move`,vn,e).catch(e=>{E(`Move failed`,e)})}})},[vn,M,m,E,v]),Dn=(0,b.useCallback)((e,t)=>{v||(Ne(!1),He(null),Be(null),We({kind:e,targetSha:t}))},[v]),On=(0,b.useCallback)(e=>{if(!Ue)return;let{kind:t,targetSha:n}=Ue;We(null),m(t===`branch`?`create`:`create-tag`,e,n).catch(e=>{E(`Create ${t} failed`,e)})},[Ue,m,E]),kn=(0,b.useCallback)(()=>We(null),[]),An=Ue?.kind===`branch`?`Branch name`:`Tag name`,jn=Ue?`Create ${Ue.kind} at ${Ue.targetSha.slice(0,8)}`:`Create ref`,Mn=Ue?.kind===`tag`?vt:``,Nn=(0,b.useCallback)(()=>{a&&(Pe(null),Ie(null),Ne(!0),(!o||o.sourceRefName!==a)&&f(a))},[a,o,f]),Pn=(0,b.useCallback)(()=>{Ne(!1)},[]),Fn=(0,b.useCallback)((e,t)=>{if(Ne(!1),Ie(null),e===`uncommit`){Pe({kind:`uncommit`,sha:t});return}if(e===`squash`){let e=r.find(e=>e.kind===`head`&&e.isCurrent)?.targetSha;Pe(e?{kind:`squash`,oldestSha:t,headSha:e}:null);return}Pe({kind:`commit`,action:e,sha:t})},[r]),In=(0,b.useCallback)((e,t,n)=>{let r=le.current;if(!r)return;let i=n.currentTarget.getBoundingClientRect(),a=Ze.current;Ne(!1),Re(!0),Ie({targetRefName:e,buttonRect:{left:i.left,top:i.top,width:i.width,height:i.height},buttonScale:i.height/Dp,baseZoom:a,viewport:{width:r.clientWidth,height:r.clientHeight},scroll:{x:r.scrollLeft,y:r.scrollTop},targetNode:{x:t.x,y:t.y}}),Pe({kind:`rebase`,targetRefName:e})},[]),Ln=(0,b.useCallback)(()=>{Pe(null),Ie(null)},[]),Rn=(0,b.useCallback)(()=>{Pe(e=>e?.kind===`rebase`?null:e),Ie(null)},[]),zn=(0,b.useCallback)(()=>{let e=le.current;if(!e||!xn)return;let t=Math.max(xn.previewNode.y+G,xn.sourceNode.y+G,xn.targetNode.y+G),n=Math.max(t+40,224),r=Math.min(Ze.current,Math.max(.18,Math.min(1,e.clientHeight/n)));$e.current=Date.now()+500,Ze.current=r,ee(r),e.scrollTo({top:0,behavior:`smooth`}),requestAnimationFrame(()=>Jt(e,r))},[xn,Jt,ee]),Bn=(0,b.useCallback)(()=>{a&&(v||(Ne(!0),zn(),g(a).catch(e=>{E(`Merge failed`,e)})))},[a,g,zn,E,v]),Vn=(0,b.useCallback)(e=>{Ne(!1),Pe(null),Ie(null),_(e).catch(e=>{E(`Rebase failed`,e)})},[_,E]),Hn=(0,b.useCallback)(e=>{bn&&(v||Vn(e))},[bn,Vn,v]),Un=(0,b.useMemo)(()=>{if(!j||!le.current)return[];let e=le.current.scrollTop,t=new Map;for(let e of Zt){let n=t.get(e.row.lane);(!n||e.y<n.y)&&t.set(e.row.lane,e)}let n=new Map;for(let r of j.nodes){if(r.row.refNames.length===0||r.y*Et+Ot>=e)continue;let i=r.row.lane;if(n.has(i))continue;let a=t.get(i);if(!a)continue;let o=Vr(r.row.refNames);o&&j.shaToBranch.get(a.row.sha)===o&&n.set(i,{name:o,x:r.x,color:Fr(o)})}let r=[...n.values()].sort((e,t)=>e.x-t.x),i=[],a=[];for(let e of r){let t=e.x*Et+Dt-4,n=e.name.length*7+20,r=0;for(let e=0;e<a.length;e++){if(t>=a[e]){r=e;break}r=e+1}r>=a.length&&a.push(0),a[r]=t+n+4,i.push({...e,row:r})}return i},[j,Zt,Et,Dt,Ot]),Wn=(0,b.useMemo)(()=>j?th(j.nodes,Et).map(e=>({...e,y:e.y+Ot})):[],[j,Et,Ot]),Gn=(0,b.useMemo)(()=>{if(!j)return null;let e=nh(j.nodes,Math.max(0,xe-Ot),Et);return e?eh(new Date(e.row.committerUnix*1e3),Et):null},[j,xe,Et,Ot]),Kn=(0,b.useMemo)(()=>Wn.filter(e=>e.y-xe>28),[Wn,xe]),qn=(0,b.useMemo)(()=>yh(j,lt),[j,lt]),Jn=(0,b.useMemo)(()=>!j||qn.size===0||!C?[]:j.nodes.filter(e=>qn.has(e.row.sha)).map(e=>({key:e.row.sha,sha:e.row.sha,y:e.y*Et+Ot,text:e.row.subject})),[j,qn,Et,Ot,C]),Yn=(0,b.useMemo)(()=>Jn.filter(e=>e.y-xe>28),[Jn,xe]),Xn=(0,b.useMemo)(()=>De===0?[]:Jn.filter(e=>{let t=e.y-xe;return t>0&&t<De}),[Jn,xe,De]);(0,b.useEffect)(()=>{if(Xn.length===0)return;let e=window.setTimeout(()=>{let e=Xn.slice(0,wp).map(e=>e.sha);ne(e)},200);return()=>window.clearTimeout(e)},[Xn,ne]);let Zn=(0,b.useMemo)(()=>j&&i?j.shaToNode.get(i)??null:null,[j,i]),Qn=(0,b.useMemo)(()=>{if(!j||!Zn||!lt)return!1;let e=j.nodes.find(e=>e.row.refNames.includes(lt));if(!e)return!1;let t=e.row.sha,n=new Set;for(;t&&!n.has(t);){if(t===Zn.row.sha)return!0;n.add(t);let e=j.shaToNode.get(t);if(!e||e.row.parentShas.length===0)break;t=e.row.parentShas[0]}return!1},[j,Zn,lt]),$n=(0,b.useMemo)(()=>!Zn||!lt?!1:Zn.row.refNames.includes(lt),[Zn,lt]),er=(0,b.useMemo)(()=>{if(!Zn)return[];let e=[],n=Zn.row.parentShas.length===1;return $n?(e.push({action:`uncommit`,label:`Uncommit`,tone:`uncommit`}),n&&e.push({action:`revert`,label:`Revert`,tone:`warning`}),e):Qn?(t&&gr(t.rows,r,Zn.row.sha)&&e.push({action:`squash`,label:`Squash to here`,tone:`squash`}),n&&e.push({action:`revert`,label:`Revert`,tone:`warning`}),e):(n&&(e.push({action:`cherry-pick`,label:`Cherry pick`,tone:`success`}),e.push({action:`revert`,label:`Revert`,tone:`warning`})),e)},[Zn,$n,Qn,t,r]),tr=(0,b.useCallback)(e=>{if(!Zn||v)return;if(Pe(null),Ie(null),e===`cherry-pick`){h(e,Zn.row.sha).catch(t=>{E(`${e} failed`,t)});return}if(e===`squash`){let e=t?gr(t.rows,r,Zn.row.sha):null;if(!e)return;Ke({oldestSha:Zn.row.sha,count:e.length,initialMessage:Zn.row.subject});return}let n=Zn.row.sha.slice(0,8),i=e===`uncommit`?`Uncommit`:`Revert commit`,a=e===`uncommit`?`Uncommit ${n}? This will move HEAD to its parent and keep the changes in your working tree.`:`Revert commit ${n} on the current branch?`;Je({title:i,message:a,confirmLabel:e===`uncommit`?`Uncommit`:`Revert`,onConfirm:()=>{h(e,Zn.row.sha).catch(t=>{E(`${e} failed`,t)})}})},[Zn,h,E,v,t,r]),nr=(0,b.useCallback)(e=>{if(!Ge)return;let{oldestSha:t}=Ge;Ke(null),h(`squash`,t,e).catch(e=>{E(`Squash failed`,e)})},[Ge,h,E]),rr=ke!==null;if(!j)return(0,y.jsx)(`div`,{style:{flex:1,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#45475a`,fontSize:13},children:`No commits to display`});let ir=j.totalWidth,ar=j.totalHeight,or=ir*T,sr=ar*T,cr=N?Math.max(22,String(N.conflictedCount).length*7+14):0,lr=N?.kind===`merge`?N.conflictedCount>0?`Merge conflicts`:`Merge in progress`:N?.kind===`rebase`?N.conflictedCount>0?`Rebase conflicts`:`Rebase in progress`:`Uncommitted changes`,ur=N?.kind===`worktree`?`Uncommitted changes — ${N.count} file${N.count===1?``:`s`}\nClick to stage / unstage`:`${lr} — ${N?.conflictedCount??0} conflict${N?.conflictedCount===1?``:`s`}\nClick to review files`;return(0,y.jsxs)(`div`,{ref:le,style:{flex:1,height:`100%`,overflowY:`auto`,overflowX:`hidden`,position:`relative`,background:`#1e1e2e`,touchAction:`pan-y`},onClick:()=>{Ne(!1),Pe(null),Ie(null),He(null),Be(null),Bt(),d()},children:[(0,y.jsx)(Sp,{open:!!Ue,title:jn,label:An,initialValue:Mn,confirmLabel:`Create`,onSubmit:On,onClose:kn}),(0,y.jsx)(Sp,{open:!!Ge,title:`Squash ${Ge?.count??0} commits`,description:`This replaces the selected commit and every newer commit through HEAD. Pushed history will need a force push.`,label:`New commit message`,initialValue:Ge?.initialMessage??``,confirmLabel:`Squash`,onSubmit:nr,onClose:()=>Ke(null)}),(0,y.jsx)(Cp,{open:!!qe,title:qe?.title??``,message:qe?.message??``,confirmLabel:qe?.confirmLabel??`Confirm`,onConfirm:()=>{let e=qe?.onConfirm;Je(null),e?.()},onClose:()=>Je(null)}),ye&&(0,y.jsx)(`div`,{style:{position:`sticky`,top:`calc(100% - 54px)`,left:0,zIndex:30,width:`100%`,height:0,display:`flex`,justifyContent:`center`,overflow:`visible`,pointerEvents:`none`},children:(0,y.jsxs)(`div`,{"aria-live":`polite`,onClick:e=>e.stopPropagation(),style:{display:`flex`,alignItems:`center`,gap:8,minHeight:34,padding:Math.abs(T-1)>.001?`4px 5px 4px 12px`:`4px 12px`,border:`1px solid #45475a`,borderRadius:8,background:`#181825ee`,color:`#cdd6f4`,fontSize:11,fontWeight:700,fontVariantNumeric:`tabular-nums`,boxShadow:`0 8px 24px rgba(0,0,0,0.35)`,backdropFilter:`blur(8px)`,pointerEvents:`auto`,userSelect:`none`},children:[(0,y.jsxs)(`span`,{"aria-label":`Zoom ${Math.round(T*100)} percent`,children:[Math.round(T*100),`%`]}),Math.abs(T-1)>.001&&(0,y.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Xt()},style:{height:26,padding:`0 8px`,border:`1px solid #45475a`,borderRadius:5,background:`#313244`,color:`#bac2de`,fontFamily:`inherit`,fontSize:10,fontWeight:700,cursor:`pointer`},children:`Reset zoom`})]})}),Fe&&(0,wa.createPortal)((0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{style:{position:`fixed`,left:Fe.buttonRect.left,top:Fe.buttonRect.top,width:Fe.buttonRect.width,height:Fe.buttonRect.height,zIndex:1e4,pointerEvents:`auto`},children:(0,y.jsx)(`div`,{style:{width:Fe.buttonRect.width/Fe.buttonScale,height:Fe.buttonRect.height/Fe.buttonScale,transform:`scale(${Fe.buttonScale})`,transformOrigin:`top left`},children:(0,y.jsx)(af,{label:`Rebase`,tone:`success`,onClick:()=>Hn(Fe.targetRefName),onMouseLeave:Rn})})}),St&&(0,y.jsxs)(`div`,{role:`status`,"data-rebase-preview-notice":!0,style:{position:`fixed`,left:Math.max(8,Math.min(Fe.buttonRect.left+Fe.buttonRect.width/2-122,Ce-252)),top:Fe.buttonRect.top+Fe.buttonRect.height+78<=Fe.viewport.height?Fe.buttonRect.top+Fe.buttonRect.height+9:Math.max(8,Fe.buttonRect.top-69),zIndex:10001,width:244,boxSizing:`border-box`,padding:`9px 11px`,borderRadius:7,border:`1px solid #f9e2af99`,background:`rgba(17, 17, 27, 0.96)`,color:`#cdd6f4`,boxShadow:`0 10px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(249, 226, 175, 0.08)`,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,pointerEvents:`none`},children:[(0,y.jsxs)(`div`,{style:{color:`#f9e2af`,fontSize:11,fontWeight:800,marginBottom:3},children:[`ⓘ `,St.title]}),(0,y.jsx)(`div`,{style:{color:`#bac2de`,fontSize:10,lineHeight:1.4},children:St.detail})]})]}),document.body),(0,y.jsx)(`div`,{style:{position:`sticky`,top:0,left:0,zIndex:20,height:0,overflow:`visible`,pointerEvents:`none`},children:Un.map(e=>(0,y.jsx)(`div`,{"data-sticky-ref-name":e.name,"data-selected":a===e.name||void 0,onClick:t=>Cn(t,e.name),style:{position:`absolute`,left:e.x*Et+Dt-4,top:4+e.row*22,padding:`2px 8px`,borderRadius:4,zIndex:+(a===e.name),background:a===e.name?e.color+`55`:e.color+`20`,border:`1px solid ${a===e.name?e.color:e.color+`50`}`,color:e.color,fontSize:10,fontWeight:a===e.name?800:600,whiteSpace:`nowrap`,pointerEvents:`auto`,transform:`scale(${Math.min(Et,1)})`,transformOrigin:`top left`,transition:`left ${kt}, transform ${kt}`,cursor:`pointer`,boxShadow:a===e.name?`0 7px 16px rgba(0, 0, 0, 0.58), 0 0 0 1px #11111b, 0 0 0 3px ${Up}, 0 0 14px ${e.color}99`:`none`},children:e.name},e.name))}),(0,y.jsxs)(`div`,{style:{position:`sticky`,top:0,left:0,width:`100%`,height:0,overflow:`visible`,zIndex:5,pointerEvents:`none`},children:[Gn&&(0,y.jsx)(`div`,{style:{position:`absolute`,right:20,top:6,padding:`3px 8px`,borderRadius:6,background:`#181825`,border:`1px solid #313244`,color:`#9399b2`,fontSize:11,fontWeight:600,whiteSpace:`nowrap`,boxShadow:`0 4px 12px rgba(0,0,0,0.2)`},children:Gn}),(0,y.jsxs)(`div`,{ref:de,style:{position:`relative`},children:[N&&N.y*Et+Ot-xe>28&&(0,y.jsxs)(Ol.div,{style:{position:`absolute`,left:20,top:B(Nt,e=>e*Et+Ot-7),opacity:It,maxWidth:(160+dt.extraLeftGutter-40)*Et,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:ae?N.color:`#a6adc8`,fontSize:12,fontWeight:600,pointerEvents:`none`,userSelect:`none`,display:`flex`,alignItems:`center`,gap:6,transition:`max-width ${kt}`},children:[(0,y.jsx)(`span`,{style:{display:`inline-block`,width:8,height:8,borderRadius:`50%`,background:N.color,flexShrink:0}}),(0,y.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`},children:lr})]}),Yn.map(e=>{let t=te[e.sha],n=t?{success:`#a6e3a1`,pending:`#f9e2af`,failure:`#f38ba8`,error:`#f38ba8`,neutral:`#6c7086`,loading:`#585b70`,none:`#45475a`}[t.state]:void 0;return(0,y.jsxs)(`div`,{style:{position:`absolute`,left:20,top:e.y-7,maxWidth:(160+dt.extraLeftGutter-40)*Et,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:`#a6adc8`,fontSize:12,opacity:xt.has(e.sha)?.5:1,pointerEvents:`none`,userSelect:`none`,display:`flex`,alignItems:`center`,gap:6,transition:`top ${kt}, max-width ${kt}`},children:[n&&(0,y.jsx)(`span`,{style:{display:`inline-block`,width:8,height:8,borderRadius:`50%`,background:n,flexShrink:0}}),(0,y.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`},children:e.text})]},e.key)})]}),(0,y.jsx)(`div`,{ref:ue,style:{position:`relative`},children:Kn.map(e=>(0,y.jsxs)(`div`,{style:{position:`absolute`,right:20,top:e.y-7,padding:`2px 6px`,borderRadius:6,background:`#1e1e2e`,color:e.kind===`month`?`#6c7086`:e.kind===`hour`?`#585b70`:`#45475a`,fontSize:e.kind===`month`?11:10,fontWeight:e.kind===`month`?600:e.kind===`hour`?500:400,whiteSpace:`nowrap`,pointerEvents:`none`,userSelect:`none`,transition:`top ${kt}`},children:[(0,y.jsx)(`span`,{style:{display:`inline-block`,width:e.kind===`month`?16:e.kind===`hour`?6:8,height:1,background:e.kind===`month`?`#585b70`:e.kind===`hour`?`#45475a`:`#313244`,verticalAlign:`middle`,marginRight:4}}),e.text]},e.key))})]}),(0,y.jsx)(`div`,{style:{width:or,height:sr,position:`relative`,zIndex:10},children:(0,y.jsxs)(`div`,{style:{position:`absolute`,top:0,left:0,width:ir,height:ar,transform:`translate(${Dt}px, ${Ot}px) scale(${Et})`,transformOrigin:`top left`,transition:`transform ${kt}`,willChange:Fe?`transform`:void 0},children:[(0,y.jsxs)(`svg`,{width:ir,height:ar,style:{position:`absolute`,top:0,left:0,zIndex:10,pointerEvents:`none`,overflow:`visible`},children:[Kt.map(e=>(0,y.jsx)(`rect`,{x:e.x-80/2+2,y:0,width:76,height:ar,rx:16,fill:`${e.color}16`,stroke:`${e.color}24`,strokeWidth:1},`gutter-${e.lane}`)),fn&&(0,y.jsxs)(Ol.g,{opacity:rr?B(Ye,e=>K(fn.fromOpacity,fn.toOpacity,e)*.95):fn.toOpacity*.95,children:[(0,y.jsx)(Ol.rect,{x:rr?B(Ye,e=>K(fn.fromX,fn.toX,e)):fn.toX,y:0,width:dm,height:ar,rx:18,fill:`${fn.color}10`}),(0,y.jsx)(Ol.rect,{x:rr?B(Ye,e=>K(fn.fromX,fn.toX,e)+2):fn.toX+2,y:0,width:dm-4,height:ar,rx:16,fill:`${fn.color}06`})]},fn.key),Sn&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`path`,{d:Sn.targetPath,stroke:Sn.color,strokeWidth:3,fill:`none`,strokeLinecap:`round`,strokeDasharray:`8 6`,opacity:.7}),(0,y.jsx)(`path`,{d:Sn.sourcePath,stroke:Sn.color,strokeWidth:2.5,fill:`none`,strokeLinecap:`round`,strokeDasharray:`8 6`,opacity:.55})]}),un.map(e=>(0,y.jsx)(Ol.path,{d:rr?B(Ye,t=>t>=.999?e.path:Um(e,t)):e.path,stroke:e.stroke,strokeWidth:rr?B(Ye,t=>K(e.fromStrokeWidth,e.toStrokeWidth,t)):e.toStrokeWidth,fill:`none`,strokeLinecap:`round`,opacity:rr?B(Ye,t=>K(e.fromOpacity,e.toOpacity,t)*(xt.has(e.fromSha)&&xt.has(e.toSha)?.5:1)):e.toOpacity*(xt.has(e.fromSha)&&xt.has(e.toSha)?.5:1)},e.key)),Ct?.edges.map(e=>(0,y.jsx)(`path`,{d:e.path,stroke:e.color,strokeWidth:3,fill:`none`,strokeLinecap:`round`,strokeDasharray:e.dashed?`7 6`:void 0,opacity:.9},e.key))]}),(0,y.jsxs)(`svg`,{width:ir,height:ar,style:{position:`absolute`,top:0,left:0,zIndex:30,pointerEvents:`none`,overflow:`visible`},children:[ln.map(t=>{let{row:n}=t,r=n.sha===i,a=t.color,o=Np*2,s=qm(n.additions,Ht,o),c=qm(n.deletions,Ht,o),u=`gauge-${n.sha}`,d=`${u}-left`,f=`${u}-right`,p=r?Ip:Fp,m=r?Lp:Pp,h=Mf(n.subject,e),g=rr?B(Ye,e=>K(t.fromX,t.toX,e)):t.toX,_=rr?B(Ye,e=>K(t.fromY,t.toY,e)):t.toY,v=rr?B(Ye,e=>K(t.fromOpacity,t.toOpacity,e)*(xt.has(n.sha)?.5:1)):t.toOpacity*(xt.has(n.sha)?.5:1),b=rr?B(Ye,e=>K(t.fromRadius,t.toRadius,e)):t.toRadius,x=rr?B(Ye,e=>K(t.fromRadius,t.toRadius,e)*2.5):t.toRadius*2.5,S=rr?B(Ye,e=>`translate(${K(t.fromX,t.toX,e)} ${K(t.fromY,t.toY,e)})`):`translate(${t.toX} ${t.toY})`,C=rr?B(Ye,e=>Gm(K(t.fromX,t.toX,e),K(t.fromY,t.toY,e),Np,`left`)):Gm(t.toX,t.toY,Np,`left`),w=rr?B(Ye,e=>Gm(K(t.fromX,t.toX,e),K(t.fromY,t.toY,e),Np,`right`)):Gm(t.toX,t.toY,Np,`right`),T=rr?B(Ye,e=>Km(K(t.fromX,t.toX,e),K(t.fromY,t.toY,e),Np,`left`)):Km(t.toX,t.toY,Np,`left`),ee=rr?B(Ye,e=>Km(K(t.fromX,t.toX,e),K(t.fromY,t.toY,e),Np,`right`)):Km(t.toX,t.toY,Np,`right`);return(0,y.jsxs)(Ol.g,{"data-commit-sha":n.sha,"data-squash-preview":xt.has(n.sha)||void 0,onClick:t.interactive?e=>{e.stopPropagation(),l(n.sha)}:void 0,onPointerEnter:t.interactive?()=>P(n.sha):void 0,onPointerLeave:t.interactive?()=>Vt(n.sha):void 0,opacity:v,style:{cursor:t.interactive?`pointer`:`default`,pointerEvents:t.interactive?`auto`:`none`},children:[(0,y.jsx)(`title`,{children:`${n.subject}${h?`\n${h.label} commit`:``}\n+${n.additions} / -${n.deletions} (${n.locChanged} LOC changed)`}),r&&(0,y.jsx)(Ol.circle,{cx:g,cy:_,r:x,fill:a,opacity:.15}),(0,y.jsx)(Ol.circle,{cx:g,cy:_,r:b,fill:Tp,stroke:a,strokeWidth:r?3.5:2.75}),(0,y.jsxs)(`defs`,{children:[(0,y.jsx)(`clipPath`,{id:d,clipPathUnits:`userSpaceOnUse`,children:(0,y.jsx)(Ol.path,{d:C})}),(0,y.jsx)(`clipPath`,{id:f,clipPathUnits:`userSpaceOnUse`,children:(0,y.jsx)(Ol.path,{d:w})})]}),(0,y.jsx)(Ol.path,{d:C,fill:m}),(0,y.jsx)(Ol.path,{d:w,fill:m}),s>0&&(0,y.jsx)(Ol.rect,{x:rr?B(Ye,e=>K(t.fromX,t.toX,e)-Np):t.toX-Np,y:rr?B(Ye,e=>K(t.fromY,t.toY,e)+Np-s):t.toY+Np-s,width:Np,height:s,fill:Rp,clipPath:`url(#${d})`}),c>0&&(0,y.jsx)(Ol.rect,{x:g,y:rr?B(Ye,e=>K(t.fromY,t.toY,e)+Np-c):t.toY+Np-c,width:Np,height:c,fill:zp,clipPath:`url(#${f})`}),(0,y.jsx)(Ol.path,{d:T,stroke:p,strokeWidth:1.6,fill:`none`}),(0,y.jsx)(Ol.path,{d:ee,stroke:p,strokeWidth:1.6,fill:`none`}),(0,y.jsx)(Ol.line,{x1:g,y1:rr?B(Ye,e=>K(t.fromY,t.toY,e)-Np):t.toY-Np,x2:g,y2:rr?B(Ye,e=>K(t.fromY,t.toY,e)+Np):t.toY+Np,stroke:p,strokeWidth:1.6}),!h&&n.parentShas.length>1&&(0,y.jsx)(Ol.circle,{cx:g,cy:_,r:2,fill:a}),h&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Ol.circle,{cx:g,cy:_,r:7.4,fill:Tp,opacity:.9}),(0,y.jsx)(Ol.g,{transform:S,children:(0,y.jsx)($f,{icon:h.icon,color:a,customSvg:h.customSvg})})]})]},t.key)}),N&&(0,y.jsxs)(Ol.g,{opacity:It,style:{pointerEvents:`none`},children:[N.sourcePath&&(0,y.jsx)(`path`,{d:N.sourcePath,stroke:N.color,strokeWidth:2.25,strokeLinecap:`round`,strokeDasharray:`3 5`,fill:`none`,opacity:.55}),(0,y.jsx)(Ol.path,{d:B([Mt,Nt,Pt,Ft],(e,t,n,r)=>Vm({x:e,y:t},{x:n,y:r},N.targetPlan,0)),stroke:N.color,strokeWidth:2.5,strokeLinecap:`round`,strokeDasharray:`3 5`,fill:`none`,opacity:.7})]})]}),(0,y.jsxs)(`svg`,{"data-testid":`preview-node-layer`,width:ir,height:ar,style:{position:`absolute`,top:0,left:0,zIndex:50,pointerEvents:`none`,overflow:`visible`},children:[Sn&&(0,y.jsxs)(`g`,{children:[(0,y.jsx)(`circle`,{cx:Sn.previewNode.x,cy:Sn.previewNode.y,r:G*1.9,fill:Sn.color,opacity:.12}),(0,y.jsx)(`circle`,{cx:Sn.previewNode.x,cy:Sn.previewNode.y,r:G,fill:Tp,stroke:Sn.color,strokeWidth:3,strokeDasharray:`6 4`}),(0,y.jsx)(`circle`,{cx:Sn.previewNode.x,cy:Sn.previewNode.y,r:2.5,fill:Sn.color})]}),Ct?.nodes.map(({node:e,color:t})=>(0,y.jsxs)(`g`,{children:[(0,y.jsx)(`circle`,{cx:e.x,cy:e.y,r:G*1.9,fill:t,opacity:.12}),(0,y.jsx)(`circle`,{cx:e.x,cy:e.y,r:G,fill:Tp,stroke:t,strokeWidth:3,strokeDasharray:`6 4`}),(0,y.jsx)(`circle`,{cx:e.x,cy:e.y,r:2.5,fill:t}),A?.kind===`squash`&&(0,y.jsxs)(`g`,{"data-testid":`squash-preview-commit`,pointerEvents:`none`,children:[(0,y.jsx)(`rect`,{x:e.x-G-157,y:e.y-13,width:148,height:26,rx:7,fill:`#181825`,stroke:Hp,strokeWidth:1.5}),(0,y.jsx)(`text`,{x:e.x-G-146,y:e.y+4,fill:Hp,fontSize:11,fontWeight:700,fontFamily:`system-ui, -apple-system, sans-serif`,children:`New squashed commit`})]})]},`action-preview:${e.row.sha}`)),wt&&(0,y.jsx)(`g`,{"data-testid":`uncommit-preview-cross`,pointerEvents:`none`,children:wt.map((e,t)=>(0,y.jsx)(`line`,{...e,stroke:Vp,strokeWidth:3.25,strokeLinecap:`round`,strokeDasharray:`6 4`},`uncommit-cross-${t}`))}),N&&(0,y.jsxs)(Ol.g,{"data-testid":`pending-operation-node`,onClick:e=>{e.stopPropagation(),oe()},opacity:It,style:{cursor:`pointer`,pointerEvents:`auto`},children:[(0,y.jsx)(`title`,{children:ur}),ae&&(0,y.jsx)(Ol.circle,{cx:Mt,cy:Nt,r:G*2.5,fill:N.color,opacity:.15}),(0,y.jsx)(Ol.circle,{cx:Mt,cy:Nt,r:G,fill:Tp,stroke:N.color,strokeWidth:ae?3.5:2.75,strokeDasharray:`4 3`}),N.kind===`worktree`?(0,y.jsx)(Ol.text,{x:Mt,y:Nt,textAnchor:`middle`,dominantBaseline:`central`,fontSize:12,fontWeight:700,fill:N.color,style:{pointerEvents:`none`,userSelect:`none`},children:N.count}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Ol.circle,{cx:Mt,cy:Nt,r:2.5,fill:N.color}),N.conflictedCount>0&&(0,y.jsxs)(`g`,{style:{pointerEvents:`none`,userSelect:`none`},children:[(0,y.jsx)(Ol.rect,{x:B(Mt,e=>e+G+6),y:B(Nt,e=>e-10),width:cr,height:20,rx:10,fill:`#fab38722`,stroke:`#fab387`,strokeWidth:1.4}),(0,y.jsx)(Ol.text,{x:B(Mt,e=>e+G+6+cr/2),y:Nt,textAnchor:`middle`,dominantBaseline:`central`,fontSize:11,fontWeight:800,fill:`#fab387`,children:N.conflictedCount})]})]})]})]}),dn.map(e=>{let{placement:t}=e,n=t.isSelected||t.isCurrent,r=t.isSelected?t.color+`35`:t.isCurrent?t.color+`2a`:t.color+`18`,i=[`inset 0 1px 0 rgba(255, 255, 255, 0.14)`,`inset 0 -1px 0 ${t.color}18`,t.isSelected?`0 9px 20px rgba(0, 0, 0, 0.62), 0 0 0 1px #11111b, 0 0 0 3px ${Up}, 0 0 16px ${t.color}aa`:n?`0 0 8px ${t.color}38`:`0 2px 5px rgba(0, 0, 0, 0.18)`].join(`, `);return(0,y.jsxs)(Ol.div,{"data-ref-name":t.refName,"data-selected":t.isSelected||void 0,onClick:e=>Cn(e,t.refName),onPointerEnter:()=>P(t.nodeSha),onPointerLeave:()=>Vt(t.nodeSha),style:{position:`absolute`,left:0,top:0,zIndex:40,height:20,padding:`0 7px`,borderRadius:4,background:`linear-gradient(135deg, rgba(255, 255, 255, ${t.isSelected?`0.16`:`0.09`}) 0%, rgba(255, 255, 255, 0.015) 38%, ${t.color}18 100%), linear-gradient(${r}, ${r}), rgba(24, 24, 37, ${t.isSelected?`0.9`:`0.5`})`,backdropFilter:`blur(3px) saturate(145%) contrast(103%)`,WebkitBackdropFilter:`blur(3px) saturate(145%) contrast(103%)`,border:`1px solid ${n?t.color:t.color+`66`}`,color:t.color,fontSize:11,fontWeight:t.isSelected?800:600,lineHeight:`20px`,whiteSpace:`nowrap`,cursor:`pointer`,userSelect:`none`,boxShadow:i,transformOrigin:`top left`,opacity:rr?B(Ye,t=>K(e.fromOpacity,e.toOpacity,t)):e.toOpacity,transform:rr?B(Ye,t=>`translate(${K(e.fromX,e.toX,t)}px, ${K(e.fromY,e.toY,t)}px) scale(${K(e.fromScale,e.toScale,t)})`):`translate(${e.toX}px, ${e.toY}px) scale(${e.toScale})`},children:[ch(t.isRemote,t.isCurrent),t.refName]},e.key)}),!rr&&nn.map(e=>{let{worktree:t}=e,n=vm(t.path),r=t.isCurrent?`#f9e2af`:`#94e2d5`;return(0,y.jsxs)(`div`,{"data-testid":`worktree-marker`,title:n,"aria-label":`${t.isCurrent?`Current detached worktree`:`Open linked worktree`} ${t.path}`,onClick:e=>{e.stopPropagation(),t.isCurrent||se(t.path)},onPointerEnter:()=>P(e.nodeSha),onPointerLeave:()=>Vt(e.nodeSha),style:{position:`absolute`,left:e.x,top:e.y,zIndex:40,boxSizing:`border-box`,width:e.width,height:Ep,display:`flex`,alignItems:`center`,padding:`0 5px 0 7px`,borderRadius:`4px 1px 1px 4px`,borderRight:`2px solid ${r}aa`,background:`linear-gradient(90deg, rgba(17,17,27,0.82), ${r}14)`,color:`#cdd6f4`,fontSize:11,fontWeight:600,whiteSpace:`nowrap`,cursor:t.isCurrent?`default`:`pointer`,userSelect:`none`,boxShadow:`0 2px 5px rgba(0,0,0,0.2)`},children:[(0,y.jsx)(ym,{color:r}),(0,y.jsx)(`span`,{style:{marginLeft:5,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`},children:n})]},`worktree:${t.path}`)}),Zt.map(e=>{let t=an.get(e.row.sha)??0,n=$t.targetNodeRadii.get(e.row.sha)??G,r=e.x+n+8+t+(t>0?8:0),o=e.y-10,s=D!==null,c=!s&&e.row.sha===i?er:[],l=!!a&&e.row.refNames.includes(a),u=l?_n:[],d=s&&l&&D?u.find(e=>e.action===D.action)??D:null,f=s?d?[d]:[]:u,p=!s&&!!lt&&e.row.refNames.includes(lt)&&yn,m=!v&&!s&&!rr&&(ze===e.row.sha||Ve===e.row.sha),h=m&&!!vn&&e.row.sha!==M?.targetSha,g=!s&&bn&&e.row.sha!==bn.targetSha?Vr(e.row.refNames.filter(e=>e!==bn.shortName)):null,_=g&&(A?.kind!==`rebase`||A.targetRefName===g)?g:null,x=f.length>0||p||h||m||!!_;return c.length===0&&!x?null:(0,y.jsxs)(b.Fragment,{children:[c.length>0&&(0,y.jsx)(`div`,{style:{position:`absolute`,left:(rn.get(e.row.sha)??e.x-G)-12,top:e.y,transform:`translate(-100%, -50%)`,display:`flex`,alignItems:`center`,gap:10,flexWrap:`nowrap`,zIndex:40},children:c.map(t=>(0,y.jsx)(af,{label:t.label,tone:t.tone,onClick:()=>tr(t.action),onMouseEnter:()=>Fn(t.action,e.row.sha),onMouseLeave:Ln},t.action))}),x&&(0,y.jsxs)(`div`,{onPointerEnter:()=>P(e.row.sha),onPointerLeave:()=>Vt(e.row.sha),style:{position:`absolute`,left:r,top:o,display:`flex`,alignItems:`flex-start`,gap:10,flexWrap:`nowrap`,zIndex:m||Ve===e.row.sha?40:20},children:[f.length>0&&(0,y.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,position:`relative`,top:mm(Op),zIndex:7},children:f.map(e=>(0,y.jsx)(of,{label:e.label,tone:e.tone,loading:!!d&&e.action===d.action,onClick:()=>Tn(e)},e.action))}),_&&(0,y.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,top:mm(Dp),zIndex:7},children:(0,y.jsx)(af,{label:`Rebase`,tone:`success`,onClick:()=>Hn(_),onMouseEnter:t=>In(_,e,t),onMouseLeave:Fe?.targetRefName===_?void 0:Rn})}),p&&(0,y.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,top:mm(Dp),zIndex:7},children:(0,y.jsx)(af,{label:`Merge`,tone:`merge`,onClick:Bn,onMouseEnter:Nn,onMouseLeave:Pn})}),h&&(0,y.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,zIndex:7},children:(0,y.jsx)(of,{label:`Move ${vn} here`,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:()=>En(e.row.sha)})}),m&&(0,y.jsxs)(`div`,{style:{position:`relative`,top:mm(kp),zIndex:8},children:[(0,y.jsx)(`button`,{type:`button`,title:`Create branch or tag`,"aria-label":`Create branch or tag`,onClick:t=>{t.stopPropagation(),Ne(!1),He(t=>t===e.row.sha?null:e.row.sha),Be(e.row.sha)},style:{width:kp,height:kp,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,padding:0,borderRadius:6,border:`1px solid #4a4f68`,background:`#2f3348`,color:`#cdd6f4`,fontSize:21,fontWeight:600,lineHeight:1,cursor:`pointer`,fontFamily:`inherit`,boxShadow:`0 8px 20px rgba(0,0,0,0.28)`},onMouseEnter:e=>{e.currentTarget.style.background=`#3a4058`},onMouseLeave:e=>{e.currentTarget.style.background=`#2f3348`},children:`+`}),Ve===e.row.sha&&(0,y.jsx)(`div`,{onClick:e=>e.stopPropagation(),style:{position:`absolute`,right:0,top:36,width:jp,padding:5,borderRadius:7,border:`1px solid #4a4f68`,background:`#181825`,boxShadow:`0 14px 30px rgba(0,0,0,0.42)`,display:`flex`,flexDirection:`column`,gap:4},children:[`branch`,`tag`].map(t=>(0,y.jsx)(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),Dn(t,e.row.sha)},style:{height:28,padding:`0 9px`,borderRadius:5,border:`1px solid transparent`,background:`transparent`,color:`#cdd6f4`,fontSize:12,fontWeight:600,fontFamily:`inherit`,textAlign:`left`,cursor:`pointer`},onMouseEnter:e=>{e.currentTarget.style.background=`#313244`,e.currentTarget.style.borderColor=`#45475a`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.borderColor=`transparent`},children:t===`branch`?`Branch`:`Tag`},t))})]})]})]},`${e.row.sha}-actions`)})]})})]})}var Fh=56,Ih=56,Lh=12,Rh=`#11111b`,zh=56,Bh=80,Vh=110,Hh=150,Uh=28,Wh=640,Gh=[`#89b4fa`,`#a6e3a1`,`#f9e2af`,`#f38ba8`,`#cba6f7`,`#94e2d5`,`#fab387`,`#74c7ec`,`#f5c2e7`,`#b4befe`];function Kh(e){return Gh[(e%Gh.length+Gh.length)%Gh.length]}var qh=`#f9e2af`,Jh={commit:`#a6e3a1`,amend:`#f9e2af`,checkout:`#89b4fa`,reset:`#f38ba8`,rebase:`#fab387`,squash:`#cba6f7`,merge:`#cba6f7`,"cherry-pick":`#94e2d5`,revert:`#f5c2e7`,pull:`#74c7ec`,branch:`#b4befe`,clone:`#9399b2`,other:`#9399b2`},Yh=new Set([`reset`,`rebase`,`squash`,`amend`]),Xh={reset:`reset moved HEAD away — commits only on the old position may be unreachable`,rebase:`rebase rewrote history — the original commits live on only in the reflog`,squash:`squash replaced several commits with one — the originals live on only in the reflog`,amend:`amend replaced the previous commit — the original version is only in the reflog`};function Zh(e,t,n,r){if(e===n)return`M${e},${t}L${n},${r}`;let i=r-t;return`M${e},${t}C${e},${t+i*.3} ${n},${r-i*.3} ${n},${r}`}function Qh(e){let t=new Map;e.forEach((e,n)=>t.set(e.sha,n));let n=new Map,r=[],i=[],a=0;for(let o=0;o<e.length;o++){let s=e[o],c=n.get(s.sha);c===void 0&&(c=r.indexOf(null),c===-1?(c=r.length,r.push(s.sha)):r[c]=s.sha,n.set(s.sha,c)),i.push(c),c>a&&(a=c),t.get(s.sha)===o&&(r[c]=null)}return{lanes:i,maxLane:a}}function $h(e){if(!e)return``;let t=Math.floor(Date.now()/1e3-e);if(t<60)return`just now`;if(t<3600)return`${Math.floor(t/60)}m ago`;if(t<86400)return`${Math.floor(t/3600)}h ago`;if(t<172800)return`yesterday`;if(t<14*86400)return`${Math.floor(t/86400)}d ago`;let n=new Date(e*1e3),r=n.toLocaleDateString(void 0,{month:`short`,day:`numeric`});return n.getFullYear()===new Date().getFullYear()?r:`${r} ${n.getFullYear()}`}function eg(){let e=I(e=>e.reflog),t=I(e=>e.reflogLoading),n=I(e=>e.reflogMaxCount),r=I(e=>e.selectedSha),i=I(e=>e.selectCommit),a=I(e=>e.recoverBranch),o=I(e=>e.checkoutSha),s=I(e=>e.performCommitAction),c=I(e=>e.loadMoreReflog),l=I(e=>e.showError),[u,d]=(0,b.useState)(null),[f,p]=(0,b.useState)(null),[m,h]=(0,b.useState)(null);(0,b.useEffect)(()=>{d(null)},[e]);let g=e?.entries??[],{lanes:_,maxLane:v}=(0,b.useMemo)(()=>Qh(g),[g]),x=(0,b.useMemo)(()=>{let e=new Set;for(let t of g)t.isReachable||e.add(t.sha);return e},[g]),S=e=>Hh+e*Ih,C=e=>zh+e*Fh,w=Hh+(v+1)*Ih+Uh,T=w+Wh,ee=zh+g.length*Fh+Bh,E=(0,b.useMemo)(()=>{let e=``;return g.map(t=>{let n=$h(t.entryUnix);return n===e?``:(e=n,n)})},[g]),te=e=>{p({entry:e,defaultName:`recovered-${e.sha.slice(0,7)}`})},ne=e=>{h({title:`Checkout commit`,message:`Checkout ${e.sha.slice(0,8)}? This detaches HEAD at that state.`,confirmLabel:`Checkout`,onConfirm:()=>{o(e.sha).catch(e=>l(`Checkout failed`,e))}})},re=e=>{h({title:`Cherry pick commit`,message:`Cherry-pick ${e.sha.slice(0,8)} onto the current branch?`,confirmLabel:`Cherry pick`,onConfirm:()=>{s(`cherry-pick`,e.sha).catch(e=>l(`Cherry-pick failed`,e))}})},ie=e=>{if(!f)return;let{entry:t}=f;p(null),a(e,t.sha).catch(e=>l(`Recover failed`,e))},ae=e=>{navigator.clipboard?.writeText(e.sha)};return!e&&t?(0,y.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6c7086`,fontSize:13},children:`Reading reflog…`}):g.length===0?(0,y.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#45475a`,fontSize:13},children:`No reflog entries — this repository has no recorded HEAD movements yet`}):(0,y.jsxs)(`div`,{style:{flex:1,height:`100%`,overflow:`auto`,position:`relative`,background:`#1e1e2e`},onClick:()=>d(null),children:[(0,y.jsx)(Sp,{open:!!f,title:f?`Create branch at ${f.entry.sha.slice(0,8)}`:`Create branch`,label:`Branch name`,initialValue:f?.defaultName??``,confirmLabel:`Create`,onSubmit:ie,onClose:()=>p(null)}),(0,y.jsx)(Cp,{open:!!m,title:m?.title??``,message:m?.message??``,confirmLabel:m?.confirmLabel??`Confirm`,onConfirm:()=>{let e=m?.onConfirm;h(null),e?.()},onClose:()=>h(null)}),x.size>0&&(0,y.jsxs)(`div`,{style:{position:`sticky`,top:0,zIndex:30,margin:`10px 14px 0`,padding:`8px 14px`,borderRadius:6,background:`#f9e2af18`,border:`1px solid ${qh}55`,color:qh,fontSize:12,display:`flex`,alignItems:`center`,gap:8},children:[(0,y.jsx)(`span`,{style:{fontSize:14},children:`⚠`}),(0,y.jsxs)(`span`,{children:[x.size===1?`1 commit in your reflog is no longer reachable from any branch.`:`${x.size} commits in your reflog are no longer reachable from any branch.`,` `,`Select a dashed entry below to recover it.`]})]}),(0,y.jsxs)(`div`,{style:{width:T,height:ee,position:`relative`},children:[(0,y.jsxs)(`div`,{style:{position:`absolute`,left:150-Lh,top:16,color:`#585b70`,fontSize:11,whiteSpace:`nowrap`,userSelect:`none`},children:[e?.refName??`HEAD`,` time machine — every state HEAD has pointed to, newest first`]}),(0,y.jsxs)(`svg`,{width:T,height:ee,style:{position:`absolute`,top:0,left:0,pointerEvents:`none`,overflow:`visible`},children:[g.slice(0,-1).map((e,t)=>{let n=S(_[t]),r=C(t);return(0,y.jsx)(`path`,{d:Zh(S(_[t+1]),C(t+1),n,r),stroke:Kh(_[t]),strokeWidth:2.25,fill:`none`,strokeLinecap:`round`,opacity:.85},`edge-${t}`)}),g.map((e,t)=>{let n=S(_[t]),a=C(t),o=Kh(_[t]),s=u===t||u===null&&e.sha===r,c=!e.isReachable;return(0,y.jsxs)(`g`,{onClick:n=>{n.stopPropagation(),d(t),i(e.sha)},style:{cursor:`pointer`,pointerEvents:`auto`},children:[(0,y.jsx)(`title`,{children:`${e.selector} — ${e.message}`}),s&&(0,y.jsx)(`circle`,{cx:n,cy:a,r:Lh*2.3,fill:o,opacity:.15}),c&&(0,y.jsx)(`circle`,{cx:n,cy:a,r:17,fill:`none`,stroke:qh,strokeWidth:1.5,strokeDasharray:`4 3`,opacity:.9}),(0,y.jsx)(`circle`,{cx:n,cy:a,r:Lh,fill:Rh,stroke:o,strokeWidth:s?3:2.25}),t===0&&(0,y.jsx)(`circle`,{cx:n,cy:a,r:3,fill:o})]},`node-${t}`)})]}),g.map((e,t)=>{let n=C(t);return E[t]?(0,y.jsx)(`div`,{style:{position:`absolute`,left:0,top:n-7,width:Vh,textAlign:`right`,color:`#585b70`,fontSize:11,whiteSpace:`nowrap`,pointerEvents:`none`,userSelect:`none`},children:E[t]},`time-${t}`):null}),g.map((e,t)=>{let n=C(t),r=u===t,a=!e.isReachable,o=Jh[e.kind],s=Yh.has(e.kind),c=Xh[e.kind];return(0,y.jsxs)(`div`,{onClick:n=>{n.stopPropagation(),d(t),i(e.sha)},style:{position:`absolute`,left:w,top:n-10,cursor:`pointer`},children:[(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,height:20,whiteSpace:`nowrap`},children:[(0,y.jsxs)(`span`,{title:c??e.message,style:{height:18,padding:`0 8px`,borderRadius:4,background:o+`20`,border:`1px solid ${o}55`,color:o,fontSize:10,fontWeight:700,lineHeight:`18px`,textTransform:`uppercase`,letterSpacing:.4},children:[s?`⚠ `:``,e.kind]}),a&&(0,y.jsx)(`span`,{title:`Not reachable from any branch — only the reflog still knows this commit`,style:{height:18,padding:`0 8px`,borderRadius:4,background:`#f9e2af20`,border:`1px solid ${qh}`,color:qh,fontSize:10,fontWeight:700,lineHeight:`18px`},children:`LOST`}),e.refNames.slice(0,3).map(e=>(0,y.jsx)(`span`,{style:{height:18,padding:`0 7px`,borderRadius:4,background:`#89b4fa18`,border:`1px solid #89b4fa55`,color:`#89b4fa`,fontSize:10,fontWeight:600,lineHeight:`18px`},children:e},e)),(0,y.jsx)(`span`,{style:{color:`#6c7086`,fontSize:11,fontFamily:`monospace`},children:e.sha.slice(0,7)}),(0,y.jsx)(`span`,{style:{color:`#a6adc8`,fontSize:12,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:360},children:e.subject})]}),r?(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:4},children:[a?(0,y.jsx)(af,{label:`Recover branch`,tone:`success`,onClick:()=>te(e)}):(0,y.jsx)(of,{label:`Branch here`,tone:`neutral`,size:`compact`,onClick:()=>te(e)}),(0,y.jsx)(of,{label:`Checkout`,tone:`warning`,size:`compact`,onClick:()=>ne(e)}),(0,y.jsx)(of,{label:`Cherry-pick`,tone:`neutral`,size:`compact`,onClick:()=>re(e)}),(0,y.jsx)(of,{label:`Copy sha`,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:()=>ae(e)})]}):(0,y.jsx)(`div`,{style:{marginTop:4,color:`#6c7086`,fontSize:10,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:Wh-40},children:e.message})]},`row-${t}`)}),g.length>=n&&(0,y.jsx)(`div`,{style:{position:`absolute`,left:w,top:C(g.length)+4},children:(0,y.jsx)(of,{label:t?`Loading…`:`Load older entries`,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:()=>{c()}})})]})]})}var tg=Object.defineProperty,ng=e=>t=>{var n=e[t];if(n)return n();throw Error(`Module not found in bundle: `+t)},rg=(e,t)=>()=>(e&&(t=e(e=0)),t),ig=(e,t)=>{for(var n in t)tg(e,n,{get:t[n],enumerable:!0})},ag={};ig(ag,{default:()=>og});var og,sg=rg(()=>{og=[{type:`cmnt`,match:/(;|#).*/gm},{expand:`str`},{expand:`num`},{type:`num`,match:/\$[\da-fA-F]*\b/g},{type:`kwd`,match:/^[a-z]+\s+[a-z.]+\b/gm,sub:[{type:`func`,match:/^[a-z]+/g}]},{type:`kwd`,match:/^\t*[a-z][a-z\d]*\b/gm},{match:/%|\$/g,type:`oper`}]}),cg={};ig(cg,{default:()=>ug});var lg,ug,dg=rg(()=>{lg={type:`var`,match:/\$\w+|\${[^}]*}|\$\([^)]*\)/g},ug=[{sub:`todo`,match:/#.*/g},{type:`str`,match:/(["'])((?!\1)[^\r\n\\]|\\[^])*\1?/g,sub:[lg]},{type:`oper`,match:/(?<=\s|^)\.*\/[a-z/_.-]+/gi},{type:`kwd`,match:/\s-[a-zA-Z]+|$<|[&|;]+|\b(unset|readonly|shift|export|if|fi|else|elif|while|do|done|for|until|case|esac|break|continue|exit|return|trap|wait|eval|exec|then|declare|enable|local|select|typeset|time|add|remove|install|update|delete)(?=\s|$)/g},{expand:`num`},{type:`func`,match:/(?<=(^|\||\&\&|\;)\s*)[a-z_.-]+(?=\s|$)/gim},{type:`bool`,match:/(?<=\s|^)(true|false)(?=\s|$)/g},{type:`oper`,match:/[=(){}<>!]+/g},{type:`var`,match:/(?<=\s|^)[\w_]+(?=\s*=)/g},lg]}),fg={};ig(fg,{default:()=>pg});var pg,mg=rg(()=>{pg=[{match:/[^\[\->+.<\]\s].*/g,sub:`todo`},{type:`func`,match:/\.+/g},{type:`kwd`,match:/[<>]+/g},{type:`oper`,match:/[+-]+/g}]}),hg={};ig(hg,{default:()=>gg});var gg,_g=rg(()=>{gg=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/#\s*include (<.*>|".*")/g,sub:[{type:`str`,match:/(<|").*/g}]},{match:/asm\s*{[^}]*}/g,sub:[{type:`kwd`,match:/^asm/g},{match:/[^{}]*(?=}$)/g,sub:`asm`}]},{type:`kwd`,match:/\*|&|#[a-z]+\b|\b(asm|auto|double|int|struct|break|else|long|switch|case|enum|register|typedef|char|extern|return|union|const|float|short|unsigned|continue|for|signed|void|default|goto|sizeof|volatile|do|if|static|while)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g}]}),vg={};ig(vg,{default:()=>yg});var yg,bg=rg(()=>{yg=[{match:/\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{type:`kwd`,match:/@\w+\b|\b(and|not|only|or)\b|\b[a-z-]+(?=[^{}]*{)/g},{type:`var`,match:/\b[\w-]+(?=\s*:)|(::?|\.)[\w-]+(?=[^{}]*{)/g},{type:`func`,match:/#[\w-]+(?=[^{}]*{)/g},{type:`num`,match:/#[\da-f]{3,8}/g},{type:`num`,match:/\d+(\.\d+)?(cm|mm|in|px|pt|pc|em|ex|ch|rem|vm|vh|vmin|vmax|%)?/g,sub:[{type:`var`,match:/[a-z]+|%/g}]},{match:/url\([^)]*\)/g,sub:[{type:`func`,match:/url(?=\()/g},{type:`str`,match:/[^()]+/g}]},{type:`func`,match:/\b[a-zA-Z]\w*(?=\s*\()/g},{type:`num`,match:/\b[a-z-]+\b/g}]}),xg={};ig(xg,{default:()=>Sg});var Sg,Cg=rg(()=>{Sg=[{expand:`strDouble`},{type:`oper`,match:/,/g}]}),wg={};ig(wg,{default:()=>Tg});var Tg,Eg=rg(()=>{Tg=[{type:`deleted`,match:/^[-<].*/gm},{type:`insert`,match:/^[+>].*/gm},{type:`kwd`,match:/!.*/gm},{type:`section`,match:/^@@.*@@$|^\d.*|^([*-+])\1\1.*/gm}]}),Dg={};ig(Dg,{default:()=>Og});var Og,kg=rg(()=>{dg(),Og=[{type:`kwd`,match:/^(FROM|RUN|CMD|LABEL|MAINTAINER|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)\b/gim},...ug]}),Ag={};ig(Ag,{default:()=>jg});var jg,Mg=rg(()=>{Eg(),jg=[{match:/^#.*/gm,sub:`todo`},{expand:`str`},...Tg,{type:`func`,match:/^(\$ )?git(\s.*)?$/gm},{type:`kwd`,match:/^commit \w+$/gm}]}),Ng={};ig(Ng,{default:()=>Pg});var Pg,Fg=rg(()=>{Pg=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/\*|&|\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g},{type:`oper`,match:/[+\-*\/%&|^~=!<>.^-]+/g}]}),Ig={};ig(Ig,{default:()=>Hg,name:()=>zg,properties:()=>Bg,xmlElement:()=>Vg});var Lg,Rg,zg,Bg,Vg,Hg,Ug=rg(()=>{Lg=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�`,Rg=Lg+`\\-\\.0-9·̀-ͯ‿-⁀`,zg=`[${Lg}][${Rg}]*`,Bg=`\\s*(\\s+${zg}\\s*(=\\s*([^"']\\S*|("|')(\\\\[^]|(?!\\4)[^])*\\4?)?)?\\s*)*`,Vg={match:RegExp(`<[/!?]?${zg}${Bg}[/!?]?>`,`g`),sub:[{type:`var`,match:RegExp(`^<[/!?]?${zg}`,`g`),sub:[{type:`oper`,match:/^<[\/!?]?/g}]},{type:`str`,match:/=\s*([^"']\S*|("|')(\\[^]|(?!\2)[^])*\2?)/g,sub:[{type:`oper`,match:/^=/g}]},{type:`oper`,match:/[\/!?]?>/g},{type:`class`,match:RegExp(zg,`g`)}]},Hg=[{match:/<!--[^]*?-->/g,sub:`todo`},{type:`class`,match:/<!\[CDATA\[[\s\S]*?\]\]>/gi},Vg,{type:`str`,match:RegExp(`<\\?${zg}([^?]|\\?[^?>])*\\?+>`,`g`),sub:[{type:`var`,match:RegExp(`^<\\?${zg}`,`g`),sub:[{type:`oper`,match:/^<\?/g}]},{type:`oper`,match:/\?+>$/g}]},{type:`var`,match:/&(#x?)?[\da-z]{1,8};/gi}]}),Wg={};ig(Wg,{default:()=>Gg});var Gg,Kg=rg(()=>{Ug(),Gg=[{type:`class`,match:/<!DOCTYPE("[^"]*"|'[^']*'|[^"'>])*>/gi,sub:[{type:`str`,match:/"[^"]*"|'[^']*'/g},{type:`oper`,match:/^<!|>$/g},{type:`var`,match:/DOCTYPE/gi}]},{match:RegExp(`<style${Bg}>[^]*?</style\\s*>`,`g`),sub:[{match:RegExp(`^<style${Bg}>`,`g`),sub:Vg.sub},{match:RegExp(`${Vg.match}|[^]*(?=</style\\s*>$)`,`g`),sub:`css`},Vg]},{match:RegExp(`<script${Bg}>[^]*?<\/script\\s*>`,`g`),sub:[{match:RegExp(`^<script${Bg}>`,`g`),sub:Vg.sub},{match:RegExp(`${Vg.match}|[^]*(?=<\/script\\s*>$)`,`g`),sub:`js`},Vg]},...Hg]}),qg,Jg,Yg=rg(()=>{qg=[[`bash`,[/#!(\/usr)?\/bin\/bash/g,500],[/\b(if|elif|then|fi|echo)\b|\$/g,10]],[`html`,[/<\/?[a-z-]+[^\n>]*>/g,10],[/^\s+<!DOCTYPE\s+html/g,500]],[`http`,[/^(GET|HEAD|POST|PUT|DELETE|PATCH|HTTP)\b/g,500]],[`js`,[/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require|document|window)\b/g,10]],[`ts`,[/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require|document|window|implements|interface|namespace)\b/g,10]],[`py`,[/\b(def|print|await|async|class|and|or|lambda|import|from|self|asyncio|pass|True|False|None|__init__)\b/g,10]],[`sql`,[/\b(SELECT|INSERT|FROM)\b/g,50]],[`pl`,[/#!(\/usr)?\/bin\/perl/g,500],[/\b(use|print)\b|\$/g,10]],[`lua`,[/#!(\/usr)?\/bin\/lua/g,500]],[`make`,[/\b(ifneq|endif|if|elif|then|fi|echo|.PHONY|^[a-z]+ ?:$)\b|\$/gm,10]],[`uri`,[/https?:|mailto:|tel:|ftp:/g,30]],[`css`,[/^(@import|@page|@media|(\.|#)[a-z]+)/gm,20]],[`diff`,[/^[+><-]/gm,10],[/^@@ ?[-+,0-9 ]+ ?@@/gm,25]],[`md`,[/^(>|\t\*|\t\d+.)/gm,10],[/\[.*\](.*)/g,10]],[`docker`,[/^(FROM|ENTRYPOINT|RUN)/gm,500]],[`xml`,[/<\/?[a-z-]+[^\n>]*>/g,10],[/^<\?xml/g,500]],[`c`,[/#include\b|\bprintf\s+\(/g,100]],[`rs`,[/^\s+(use|fn|mut|match)\b/gm,100]],[`go`,[/\b(func|fmt|package)\b/g,100]],[`java`,[/^import\s+java/gm,500]],[`asm`,[/^(section|global main|extern|\t(call|mov|ret))/gm,100]],[`css`,[/^(@import|@page|@media|(\.|#)[a-z]+)/gm,20]],[`json`,[/\b(true|false|null|\{})\b|\"[^"]+\":/g,10]],[`yaml`,[/^(\s+)?[a-z][a-z0-9]*:/gim,10]]],Jg=e=>qg.map(([t,...n])=>[t,n.reduce((t,[n,r])=>t+[...e.matchAll(n)].length*r,0)]).filter(([e,t])=>t>20).sort((e,t)=>t[1]-e[1])[0]?.[0]||`plain`}),Xg={};ig(Xg,{default:()=>Zg});var Zg,Qg=rg(()=>{Yg(),Zg=[{type:`kwd`,match:/^(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\b/gm},{expand:`str`},{type:`section`,match:/\bHTTP\/[\d.]+\b/g},{expand:`num`},{type:`oper`,match:/[,;:=]/g},{type:`var`,match:/[a-zA-Z][\w-]*(?=:)/g},{match:/\n\n[^]*/g,sub:Jg}]}),$g={};ig($g,{default:()=>e_});var e_,t_=rg(()=>{e_=[{match:/(^[ \f\t\v]*)[#;].*/gm,sub:`todo`},{type:`var`,match:/.*(?==)/g},{type:`section`,match:/^\s*\[.+\]\s*$/gm},{type:`oper`,match:/=/g},{type:`str`,match:/.*/g}]}),n_={};ig(n_,{default:()=>r_});var r_,i_=rg(()=>{r_=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/\b(abstract|assert|boolean|break|byte|case|catch|char|class|continue|const|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|package|private|protected|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|void|volatile|while)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g}]}),a_={};ig(a_,{default:()=>o_});var o_,s_=rg(()=>{o_=[{match:/(("|')([^\r\n\\]|\\[^])*?\2|[a-zA-Z]\w*)(?=\s*:)/g},{match:/\/\*\*((?!\*\/)[^])*(\*\/)?/g,sub:`jsdoc`},{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{match:/`((?!`)[^]|\\[^])*`?/g,sub:`js_template_literals`},{type:`kwd`,match:/=>|\b(this|set|get|as|async|await|break|case|catch|class|const|constructor|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|if|implements|import|in|instanceof|interface|let|var|of|new|package|private|protected|public|return|static|super|switch|throw|throws|try|typeof|void|while|with|yield)\b/g},{match:/\/((?!\/)[^\r\n\\]|\\.)+\/[dgimsuy]*/g,sub:`regex`},{expand:`num`},{type:`num`,match:/\b(NaN|null|undefined|[A-Z][A-Z_]*)\b/g},{type:`bool`,match:/\b(true|false)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g},{type:`func`,match:/[a-zA-Z$_][\w$_]*(?=\s*((\?\.)?\s*\(|=\s*(\(?[\w,{}\[\])]+\)? =>|function\b)))/g}]}),c_={};ig(c_,{default:()=>l_,type:()=>u_});var l_,u_,d_=rg(()=>{l_=[{match:new class{exec(e){let t=this.lastIndex,n,r=n=>{for(;++t<e.length-2;)if(e[t]==`{`)r();else if(e[t]==`}`)return};for(;t<e.length;++t)if(e[t-1]!=`\\`&&e[t]==`$`&&e[t+1]==`{`)return n=t++,r(t),this.lastIndex=t+1,{index:n,0:e.slice(n,t+1)};return null}},sub:[{type:`kwd`,match:/^\${|}$/g},{match:/(?!^\$|{)[^]+(?=}$)/g,sub:`js`}]}],u_=`str`}),f_={};ig(f_,{default:()=>p_,type:()=>m_});var p_,m_,h_=rg(()=>{p_=[{type:`err`,match:/\b(TODO|FIXME|DEBUG|OPTIMIZE|WARNING|XXX|BUG)\b/g},{type:`class`,match:/\bIDEA\b/g},{type:`insert`,match:/\b(CHANGED|FIX|CHANGE)\b/g},{type:`oper`,match:/\bQUESTION\b/g}],m_=`cmnt`}),g_={};ig(g_,{default:()=>__,type:()=>v_});var __,v_,y_=rg(()=>{h_(),__=[{type:`kwd`,match:/@\w+/g},{type:`class`,match:/{[\w\s|<>,.@\[\]]+}/g},{type:`var`,match:/\[[\w\s="']+\]/g},...p_],v_=`cmnt`}),b_={};ig(b_,{default:()=>x_});var x_,S_=rg(()=>{x_=[{type:`var`,match:/(("|')([^\r\n\\]|\\[^])*?\2|[a-zA-Z]\w*)(?=\s*:)/g},{expand:`str`},{expand:`num`},{type:`num`,match:/\bnull\b/g},{type:`bool`,match:/\b(true|false)\b/g}]}),C_={};ig(C_,{default:()=>w_});var w_,T_=rg(()=>{Yg(),w_=[{type:`cmnt`,match:/^>.*|(=|-)\1+/gm},{type:`class`,match:/\*\*.*?\*\*/g},{match:/^(`{3,})(.*)\n[^]*?^\1[ \t]*$/gm,sub:e=>({type:`kwd`,sub:[{match:/\n[^]*(?=```)/g,sub:e.split(`
|
|
598
|
-
`)[0].slice(3)||Jg(e)}]})},{type:`str`,match:/`[^`]*`/g},{type:`var`,match:/~~.*?~~/g},{type:`kwd`,match:/\b_\S([^\n]*?\S)?_\b|\*\S([^\n]*?\S)?\*/g},{type:`kwd`,match:/^\s*(\*|\d+\.)\s/gm},{type:`func`,match:/\[[^\]]*]\([^)]*\)|<[^>]*>/g,sub:[{type:`oper`,match:/^\[[^\]]*]/g}]}]}),E_={};ig(E_,{default:()=>D_});var D_,O_=rg(()=>{T_(),Yg(),D_=[{type:`insert`,match:/(leanpub-start-insert)((?!leanpub-end-insert)[^])*(leanpub-end-insert)?/g,sub:[{type:`insert`,match:/leanpub-(start|end)-insert/g},{match:/(?!leanpub-start-insert)((?!leanpub-end-insert)[^])*/g,sub:Jg}]},{type:`deleted`,match:/(leanpub-start-delete)((?!leanpub-end-delete)[^])*(leanpub-end-delete)?/g,sub:[{type:`deleted`,match:/leanpub-(start|end)-delete/g},{match:/(?!leanpub-start-delete)((?!leanpub-end-delete)[^])*/g,sub:Jg}]},...w_]}),k_={};ig(k_,{default:()=>A_});var A_,j_=rg(()=>{A_=[{type:`cmnt`,match:/^#.*/gm},{expand:`strDouble`},{expand:`num`},{type:`err`,match:/\b(err(or)?|[a-z_-]*exception|warn|warning|failed|ko|invalid|not ?found|alert|fatal)\b/gi},{type:`num`,match:/\b(null|undefined)\b/gi},{type:`bool`,match:/\b(false|true|yes|no)\b/gi},{type:`oper`,match:/\.|,/g}]}),M_={};ig(M_,{default:()=>N_});var N_,P_=rg(()=>{N_=[{match:/^#!.*|--(\[(=*)\[[^]*?--\]\2\]|.*)/g,sub:`todo`},{expand:`str`},{type:`kwd`,match:/\b(and|break|do|else|elseif|end|for|function|if|in|local|not|or|repeat|return|then|until|while)\b/g},{type:`bool`,match:/\b(true|false|nil)\b/g},{type:`oper`,match:/[+*/%^#=~<>:,.-]+/g},{expand:`num`},{type:`func`,match:/[a-z_]+(?=\s*[({])/g}]}),F_={};ig(F_,{default:()=>I_});var I_,L_=rg(()=>{I_=[{match:/^\s*#.*/gm,sub:`todo`},{expand:`str`},{type:`oper`,match:/[${}()]+/g},{type:`class`,match:/.PHONY:/gm},{type:`section`,match:/^[\w.]+:/gm},{type:`kwd`,match:/\b(ifneq|endif)\b/g},{expand:`num`},{type:`var`,match:/[A-Z_]+(?=\s*=)/g},{match:/^.*$/gm,sub:`bash`}]}),R_={};ig(R_,{default:()=>z_});var z_,B_=rg(()=>{z_=[{match:/#.*/g,sub:`todo`},{type:`str`,match:/(["'])(\\[^]|(?!\1)[^])*\1?/g},{expand:`num`},{type:`kwd`,match:/\b(any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while|not|and|or|xor)\b/g},{type:`oper`,match:/[-+*/%~!&<>|=?,]+/g},{type:`func`,match:/[a-z_]+(?=\s*\()/g}]}),V_={};ig(V_,{default:()=>H_});var H_,U_=rg(()=>{H_=[{expand:`strDouble`}]}),W_={};ig(W_,{default:()=>G_});var G_,K_=rg(()=>{G_=[{match:/#.*/g,sub:`todo`},{type:`str`,match:/f("""|''')(\\[^]|(?!\1)[^])*\1?|f("|')(\\[^]|(?!\3).)*\3?/gi,sub:[{type:`var`,match:/{[^{}]*}/g,sub:[{match:/(?!^{)[^]*(?=}$)/g,sub:`py`}]}]},{match:/("""|''')(\\[^]|(?!\1)[^])*\1?/g,sub:`todo`},{expand:`str`},{type:`kwd`,match:/\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\b/g},{type:`bool`,match:/\b(False|True|None)\b/g},{expand:`num`},{type:`func`,match:/[a-z_]\w*(?=\s*\()/gi},{type:`oper`,match:/[-/*+<>,=!&|^%]+/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g}]}),q_={};ig(q_,{default:()=>J_,type:()=>Y_});var J_,Y_,X_=rg(()=>{J_=[{match:/^(?!\/).*/gm,sub:`todo`},{type:`num`,match:/\[((?!\])[^\\]|\\.)*\]/g},{type:`kwd`,match:/\||\^|\$|\\.|\w+($|\r|\n)/g},{type:`var`,match:/\*|\+|\{\d+,\d+\}/g}],Y_=`oper`}),Z_={};ig(Z_,{default:()=>Q_});var Q_,$_=rg(()=>{Q_=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/\b(as|break|const|continue|crate|else|enum|extern|false|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|true|type|unsafe|use|where|while|async|await|dyn|abstract|become|box|do|final|macro|override|priv|typeof|unsized|virtual|yield|try)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*!?\s*\()/g}]}),ev={};ig(ev,{default:()=>tv});var tv,nv=rg(()=>{tv=[{match:/--.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{type:`func`,match:/\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/g},{type:`kwd`,match:/\b(ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|kwdS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/g},{type:`num`,match:/\.?\d[\d.oxa-fA-F-]*|\bNULL\b/g},{type:`bool`,match:/\b(TRUE|FALSE)\b/g},{type:`oper`,match:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/g},{type:`var`,match:/@\S+/g}]}),rv={};ig(rv,{default:()=>iv});var iv,av=rg(()=>{iv=[{match:/#.*/g,sub:`todo`},{type:`str`,match:/("""|''')((?!\1)[^]|\\[^])*\1?/g},{expand:`str`},{type:`section`,match:/^\[.+\]\s*$/gm},{type:`num`,match:/\b(inf|nan)\b|\d[\d:ZT.-]*/g},{expand:`num`},{type:`bool`,match:/\b(true|false)\b/g},{type:`oper`,match:/[+,.=-]/g},{type:`var`,match:/\w+(?= \=)/g}]}),ov={};ig(ov,{default:()=>sv});var sv,cv=rg(()=>{s_(),sv=[{type:`type`,match:/:\s*(any|void|number|boolean|string|object|never|enum)\b/g},{type:`kwd`,match:/\b(type|namespace|typedef|interface|public|private|protected|implements|declare|abstract|readonly)\b/g},...o_]}),lv={};ig(lv,{default:()=>uv});var uv,dv=rg(()=>{uv=[{match:/^#.*/gm,sub:`todo`},{type:`class`,match:/^\w+(?=:?)/gm},{type:`num`,match:/:\d+/g},{type:`oper`,match:/[:/&?]|\w+=/g},{type:`func`,match:/[.\w]+@|#[\w]+$/gm},{type:`var`,match:/\w+\.\w+(\.\w+)*/g}]}),fv={};ig(fv,{default:()=>pv});var pv,mv=rg(()=>{pv=[{match:/#.*/g,sub:`todo`},{expand:`str`},{type:`str`,match:/(>|\|)\r?\n((\s[^\n]*)?(\r?\n|$))*/g},{type:`type`,match:/!![a-z]+/g},{type:`bool`,match:/\b(Yes|No)\b/g},{type:`oper`,match:/[+:-]/g},{expand:`num`},{type:`var`,match:/[a-zA-Z]\w*(?=:)/g}]}),hv={num:{type:`num`,match:/(\.e?|\b)\d(e-|[\d.oxa-fA-F_])*(\.|\b)/g},str:{type:`str`,match:/(["'])(\\[^]|(?!\1)[^\r\n\\])*\1?/g},strDouble:{type:`str`,match:/"((?!")[^\r\n\\]|\\[^])*"?/g}},gv=ng({"./languages/asm.js":()=>Promise.resolve().then(()=>(sg(),ag)),"./languages/bash.js":()=>Promise.resolve().then(()=>(dg(),cg)),"./languages/bf.js":()=>Promise.resolve().then(()=>(mg(),fg)),"./languages/c.js":()=>Promise.resolve().then(()=>(_g(),hg)),"./languages/css.js":()=>Promise.resolve().then(()=>(bg(),vg)),"./languages/csv.js":()=>Promise.resolve().then(()=>(Cg(),xg)),"./languages/diff.js":()=>Promise.resolve().then(()=>(Eg(),wg)),"./languages/docker.js":()=>Promise.resolve().then(()=>(kg(),Dg)),"./languages/git.js":()=>Promise.resolve().then(()=>(Mg(),Ag)),"./languages/go.js":()=>Promise.resolve().then(()=>(Fg(),Ng)),"./languages/html.js":()=>Promise.resolve().then(()=>(Kg(),Wg)),"./languages/http.js":()=>Promise.resolve().then(()=>(Qg(),Xg)),"./languages/ini.js":()=>Promise.resolve().then(()=>(t_(),$g)),"./languages/java.js":()=>Promise.resolve().then(()=>(i_(),n_)),"./languages/js.js":()=>Promise.resolve().then(()=>(s_(),a_)),"./languages/js_template_literals.js":()=>Promise.resolve().then(()=>(d_(),c_)),"./languages/jsdoc.js":()=>Promise.resolve().then(()=>(y_(),g_)),"./languages/json.js":()=>Promise.resolve().then(()=>(S_(),b_)),"./languages/leanpub-md.js":()=>Promise.resolve().then(()=>(O_(),E_)),"./languages/log.js":()=>Promise.resolve().then(()=>(j_(),k_)),"./languages/lua.js":()=>Promise.resolve().then(()=>(P_(),M_)),"./languages/make.js":()=>Promise.resolve().then(()=>(L_(),F_)),"./languages/md.js":()=>Promise.resolve().then(()=>(T_(),C_)),"./languages/pl.js":()=>Promise.resolve().then(()=>(B_(),R_)),"./languages/plain.js":()=>Promise.resolve().then(()=>(U_(),V_)),"./languages/py.js":()=>Promise.resolve().then(()=>(K_(),W_)),"./languages/regex.js":()=>Promise.resolve().then(()=>(X_(),q_)),"./languages/rs.js":()=>Promise.resolve().then(()=>($_(),Z_)),"./languages/sql.js":()=>Promise.resolve().then(()=>(nv(),ev)),"./languages/todo.js":()=>Promise.resolve().then(()=>(h_(),f_)),"./languages/toml.js":()=>Promise.resolve().then(()=>(av(),rv)),"./languages/ts.js":()=>Promise.resolve().then(()=>(cv(),ov)),"./languages/uri.js":()=>Promise.resolve().then(()=>(dv(),lv)),"./languages/xml.js":()=>Promise.resolve().then(()=>(Ug(),Ig)),"./languages/yaml.js":()=>Promise.resolve().then(()=>(mv(),fv))}),_v={},vv=(e=``)=>e.replaceAll(`&`,`&`).replaceAll?.(`<`,`<`).replaceAll?.(`>`,`>`),yv=(e,t)=>t?`<span class="shj-syn-${t}">${e}</span>`:e;async function bv(e,t,n){try{let r,i,a={},o,s=[],c=0,l=typeof t==`string`?await(_v[t]??(_v[t]=gv(`./languages/${t}.js`))):t,u=[...typeof t==`string`?l.default:t.sub];for(;c<e.length;){for(a.index=null,r=u.length;r-->0;){if(i=u[r].expand?hv[u[r].expand]:u[r],s[r]===void 0||s[r].match.index<c){if(i.match.lastIndex=c,o=i.match.exec(e),o===null){u.splice(r,1),s.splice(r,1);continue}s[r]={match:o,lastIndex:i.match.lastIndex}}s[r].match[0]&&(s[r].match.index<=a.index||a.index===null)&&(a={part:i,index:s[r].match.index,match:s[r].match[0],end:s[r].lastIndex})}if(a.index===null)break;n(e.slice(c,a.index),l.type),c=a.end,a.part.sub?await bv(a.match,typeof a.part.sub==`string`?a.part.sub:typeof a.part.sub==`function`?a.part.sub(a.match):a.part,n):n(a.match,a.part.type)}n(e.slice(c,e.length),l.type)}catch{n(e)}}async function xv(e,t,n=!0,r={}){let i=``;return await bv(e,t,(e,t)=>i+=yv(vv(e),t)),n?`<div><div class="shj-numbers">${`<div></div>`.repeat(!r.hideLineNumbers&&e.split(`
|
|
599
|
-
`).length)}</div><div>${i}</div></div>`:i}var Sv=5e4,Cv={ts:`ts`,tsx:`ts`,mts:`ts`,cts:`ts`,js:`js`,jsx:`js`,mjs:`js`,cjs:`js`,py:`py`,rs:`rs`,go:`go`,java:`java`,lua:`lua`,pl:`pl`,c:`c`,h:`c`,cpp:`c`,cc:`c`,hpp:`c`,css:`css`,scss:`css`,html:`html`,htm:`html`,xml:`xml`,svg:`xml`,json:`json`,md:`md`,markdown:`md`,yml:`yaml`,yaml:`yaml`,toml:`toml`,ini:`ini`,sh:`bash`,bash:`bash`,zsh:`bash`,sql:`sql`,dockerfile:`docker`,makefile:`make`};function wv(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase();return t===`dockerfile`?`docker`:t===`makefile`?`make`:Cv[t.slice(t.lastIndexOf(`.`)+1)]??`plain`}var Tv=`
|
|
600
|
-
.file-diff .shj-syn-cmnt { color: #6c7086; font-style: italic; }
|
|
601
|
-
.file-diff .shj-syn-kwd { color: #cba6f7; }
|
|
602
|
-
.file-diff .shj-syn-num { color: #fab387; }
|
|
603
|
-
.file-diff .shj-syn-bool { color: #fab387; }
|
|
604
|
-
.file-diff .shj-syn-str { color: #a6e3a1; }
|
|
605
|
-
.file-diff .shj-syn-func { color: #89b4fa; }
|
|
606
|
-
.file-diff .shj-syn-class { color: #f9e2af; }
|
|
607
|
-
.file-diff .shj-syn-section { color: #94e2d5; }
|
|
608
|
-
.file-diff .shj-syn-oper { color: #94e2d5; }
|
|
609
|
-
.file-diff .shj-syn-var { color: #cdd6f4; }
|
|
610
|
-
.file-diff .shj-syn-esc { color: #f5c2e7; }
|
|
611
|
-
.file-diff .shj-syn-err { color: #f38ba8; }
|
|
612
|
-
`;function Ev(e){let t=[],n=!1;for(let r of e.split(`
|
|
613
|
-
`)){if(r.startsWith(`@@`)){n=!0,t.push({kind:`hunk`,content:r,marker:``});continue}n&&(r.startsWith(`+`)?t.push({kind:`add`,content:r.slice(1),marker:`+`}):r.startsWith(`-`)?t.push({kind:`del`,content:r.slice(1),marker:`-`}):r.startsWith(` `)||r===``?t.push({kind:`ctx`,content:r.slice(1),marker:` `}):r.startsWith(`\\`)&&t.push({kind:`ctx`,content:r,marker:``}))}return t}var Dv={add:`#a6e3a114`,del:`#f38ba814`,hunk:`transparent`,ctx:`transparent`},Ov={add:`#a6e3a1`,del:`#f38ba8`,hunk:`#89b4fa`,ctx:`#45475a`};function kv({entry:e,path:t}){let n=(0,b.useMemo)(()=>e.patchText?Ev(e.patchText):[],[e.patchText]),r=(0,b.useMemo)(()=>wv(t),[t]),i=r!==`plain`&&n.length<=Sv,[a,o]=(0,b.useState)(null);return(0,b.useEffect)(()=>{if(o(null),!i||n.length===0)return;let e=!1;return Promise.all(n.map(e=>e.kind===`hunk`||e.content.length===0?Promise.resolve(null):xv(e.content,r,!1).catch(()=>null))).then(t=>{e||o(t)}),()=>{e=!0}},[n,r,i]),e.loading?(0,y.jsx)(jv,{text:`Loading diff...`}):e.error?(0,y.jsx)(jv,{text:e.error,color:`#f38ba8`}):e.imageDiff?(0,y.jsx)(Av,{imageDiff:e.imageDiff,path:t}):e.isBinary?(0,y.jsx)(jv,{text:`Binary file`}):n.length===0?(0,y.jsx)(jv,{text:`No textual changes`}):(0,y.jsxs)(`div`,{className:`file-diff`,style:{margin:`2px 0 6px 24px`,border:`1px solid #313244`,borderRadius:6,background:`#11111b`,overflow:`auto`,maxHeight:420,fontSize:11,fontFamily:`monospace`,lineHeight:1.5},children:[(0,y.jsx)(`style`,{children:Tv}),(0,y.jsx)(`div`,{style:{minWidth:`fit-content`},children:n.map((e,t)=>{let n=a?.[t]??null;return(0,y.jsxs)(`div`,{style:{display:`flex`,background:Dv[e.kind],color:e.kind===`hunk`?`#89b4fa`:`#cdd6f4`,whiteSpace:`pre`},children:[(0,y.jsx)(`span`,{style:{flexShrink:0,width:16,textAlign:`center`,color:Ov[e.kind],userSelect:`none`},children:e.marker}),n===null?(0,y.jsx)(`span`,{children:e.content}):(0,y.jsx)(`span`,{dangerouslySetInnerHTML:{__html:n}})]},t)})})]})}function Av({imageDiff:e,path:t}){let n=[];return e.before&&n.push({label:e.after?`Before`:`Deleted image`,preview:e.before}),e.after&&n.push({label:e.before?`After`:`Added image`,preview:e.after}),(0,y.jsx)(`div`,{style:{margin:`2px 0 6px 24px`,padding:10,display:`flex`,flexWrap:`wrap`,gap:10,border:`1px solid #313244`,borderRadius:6,background:`#11111b`,overflow:`auto`,maxHeight:520},children:n.map(({label:e,preview:n})=>(0,y.jsxs)(`figure`,{style:{flex:`1 1 220px`,minWidth:0,margin:0,display:`flex`,flexDirection:`column`,gap:6},children:[(0,y.jsx)(`figcaption`,{style:{color:`#a6adc8`,fontSize:10,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},children:e}),(0,y.jsx)(`div`,{style:{minHeight:80,padding:8,display:`flex`,alignItems:`center`,justifyContent:`center`,borderRadius:4,backgroundColor:`#181825`,backgroundImage:[`linear-gradient(45deg, #242435 25%, transparent 25%)`,`linear-gradient(-45deg, #242435 25%, transparent 25%)`,`linear-gradient(45deg, transparent 75%, #242435 75%)`,`linear-gradient(-45deg, transparent 75%, #242435 75%)`].join(`,`),backgroundPosition:`0 0, 0 8px, 8px -8px, -8px 0`,backgroundSize:`16px 16px`},children:(0,y.jsx)(`img`,{src:n.dataUrl,alt:`${t} ${e.toLowerCase()}`,draggable:!1,style:{display:`block`,maxWidth:`100%`,maxHeight:410,objectFit:`contain`}})})]},e))})}function jv({text:e,color:t}){return(0,y.jsx)(`div`,{style:{margin:`2px 0 6px 24px`,padding:`6px 10px`,fontSize:11,color:t??`#6c7086`,border:`1px solid #313244`,borderRadius:6,background:`#11111b`},children:e})}function Mv(e,t,n){let r={top:t.bottom-n.height,right:t.right,bottom:t.bottom,left:t.right-n.width};return e.left<r.right&&e.right>r.left&&e.top<r.bottom&&e.bottom>r.top}var Nv={success:`#a6e3a1`,failure:`#f38ba8`,error:`#f38ba8`,pending:`#f9e2af`,neutral:`#6c7086`},Pv={success:`✓`,failure:`✗`,error:`✗`,pending:`◔`,neutral:`–`},Fv={A:`#a6e3a1`,M:`#f9e2af`,D:`#f38ba8`,R:`#cba6f7`,C:`#94e2d5`,T:`#89b4fa`,U:`#fab387`},Iv={A:`A`,M:`M`,D:`D`,R:`R`,C:`C`,T:`T`,U:`U`};function Lv(e){return new Date(e*1e3).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function Rv({commit:e,diff:t,branchName:n,prs:r,authorAvatarUrl:i,ciState:a,ciRuns:o,githubUrl:s,onCheckout:c,onNavigate:l}){let u=(0,b.useRef)(null),[d,f]=(0,b.useState)(`bottom`),p=(0,b.useCallback)(()=>{let t=u.current;if(!e||!t)return;let n=document.querySelector(`[data-commit-sha="${e.sha}"]`),r=t.parentElement;if(!n||!r){f(`bottom`);return}let i=n.getBoundingClientRect(),a=r.getBoundingClientRect(),o=t.getBoundingClientRect();f(Mv(i,a,o)?`top`:`bottom`)},[e]);if((0,b.useLayoutEffect)(()=>{if(!e||!u.current)return;p();let t=new ResizeObserver(p);return t.observe(u.current),window.addEventListener(`resize`,p),document.addEventListener(`scroll`,p,!0),()=>{t.disconnect(),window.removeEventListener(`resize`,p),document.removeEventListener(`scroll`,p,!0)}},[e,p]),!e)return null;let m=e.sha.slice(0,12);return(0,y.jsxs)(`div`,{ref:u,"data-testid":`commit-detail`,style:{position:`absolute`,right:0,[d]:0,zIndex:40,width:400,height:`fit-content`,maxHeight:`100%`,background:`#181825`,borderLeft:`1px solid #313244`,borderTop:`1px solid #313244`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,y.jsxs)(`div`,{style:{padding:`14px 16px 12px`,borderBottom:`1px solid #313244`,flexShrink:0},children:[(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:8},children:[(0,y.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:11,color:`#89b4fa`,letterSpacing:`0.04em`},children:m}),l&&(0,y.jsx)(Wv,{label:`Navigate to`,onClick:()=>l(e.sha)}),c&&(0,y.jsx)(Wv,{label:`Checkout`,onClick:()=>c(e.sha)})]}),(0,y.jsx)(`p`,{style:{fontSize:14,fontWeight:600,color:`#cdd6f4`,lineHeight:1.4,margin:0,marginBottom:10},children:e.subject}),(0,y.jsx)(zv,{label:`Author`,value:`${e.authorName} <${e.authorEmail}>`,leading:(0,y.jsx)(Bv,{name:e.authorName,url:i})}),(0,y.jsx)(zv,{label:`Date`,value:Lv(e.authorUnix)}),n&&(0,y.jsx)(zv,{label:`Branch`,value:n}),(e.committerName!==e.authorName||e.committerUnix!==e.authorUnix)&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(zv,{label:`Committer`,value:`${e.committerName} <${e.committerEmail}>`}),(0,y.jsx)(zv,{label:`Commit date`,value:Lv(e.committerUnix)})]}),e.parents.length>0&&(0,y.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:3,fontSize:12},children:[(0,y.jsx)(`span`,{style:{color:`#6c7086`,minWidth:76,flexShrink:0},children:`Parents`}),(0,y.jsx)(`span`,{style:{display:`flex`,gap:4,flexWrap:`wrap`},children:e.parents.map(e=>(0,y.jsx)(`span`,{onClick:()=>l?.(e),style:{fontFamily:`monospace`,color:`#89b4fa`,cursor:l?`pointer`:`default`,textDecoration:l?`underline`:`none`},children:e.slice(0,8)},e))})]}),e.parents.length>1&&(0,y.jsxs)(`div`,{style:{fontSize:12,color:`#a6adc8`,marginBottom:3},children:[(0,y.jsx)(`span`,{style:{color:`#6c7086`},children:`Merge: `}),`merged into`,` `,(0,y.jsx)(`span`,{onClick:()=>l?.(e.parents[0]),style:{color:`#89b4fa`,cursor:`pointer`,textDecoration:`underline`,fontFamily:`monospace`},children:e.parents[0].slice(0,8)}),` `,`from`,` `,(0,y.jsx)(`span`,{onClick:()=>l?.(e.parents[1]),style:{color:`#a6e3a1`,cursor:`pointer`,textDecoration:`underline`,fontFamily:`monospace`},children:e.parents[1].slice(0,8)})]}),r&&r.length>0&&(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:4,marginTop:6,marginBottom:4},children:[(0,y.jsx)(`span`,{style:{color:`#6c7086`,fontSize:12,marginRight:4},children:r.length===1?`Pull request`:`Pull requests`}),r.map(e=>(0,y.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open pull request #${e.number}: ${e.title}`,title:`Open pull request #${e.number}: ${e.title}`,style:{color:e.mergedAt?`#a6e3a1`:`#89b4fa`,fontSize:12,textDecoration:`underline`},children:[`PR #`,e.number,` ↗`,e.title?`: ${e.title.length>40?`${e.title.slice(0,40)}…`:e.title}`:``]},e.number))]}),s&&e.isPushed&&(0,y.jsxs)(`div`,{style:{marginTop:4,marginBottom:4,display:`flex`,gap:12},children:[(0,y.jsx)(`a`,{href:`${s}/commit/${e.sha}`,target:`_blank`,rel:`noopener noreferrer`,style:{fontSize:11,color:`#6c7086`,textDecoration:`underline`},children:`View on GitHub`}),(0,y.jsx)(`a`,{href:`${s}/commit/${e.sha}/checks`,target:`_blank`,rel:`noopener noreferrer`,style:{fontSize:11,color:`#6c7086`,textDecoration:`underline`},children:`CI runs`})]}),a===`loading`&&(0,y.jsx)(`div`,{style:{marginTop:8},children:(0,y.jsx)(Uv,{})}),o&&o.length>0&&(0,y.jsx)(`div`,{style:{marginTop:8,display:`flex`,flexDirection:`column`,gap:3},children:o.map((e,t)=>(0,y.jsx)(Hv,{run:e},`${e.name}-${t}`))}),e.refs.length>0&&(0,y.jsx)(`div`,{style:{marginTop:8,display:`flex`,flexWrap:`wrap`,gap:4},children:e.refs.map(e=>(0,y.jsx)(`span`,{style:{background:`#313244`,color:`#89b4fa`,fontSize:11,borderRadius:4,padding:`2px 6px`,fontWeight:500},children:e},e))})]}),e.body&&(0,y.jsx)(`div`,{style:{padding:`10px 16px`,borderBottom:`1px solid #313244`,flexShrink:0,maxHeight:200,overflowY:`auto`},children:(0,y.jsx)(`pre`,{style:{fontSize:12,color:`#a6adc8`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,fontFamily:`inherit`,margin:0,lineHeight:1.5},children:e.body})}),(0,y.jsx)(`div`,{style:{flex:`1 1 auto`,minHeight:0,overflowY:`auto`},children:t&&t.changedPaths.length>0?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,padding:`8px 16px 4px`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,color:`#6c7086`,textTransform:`uppercase`,position:`sticky`,top:0,background:`#181825`},children:[(0,y.jsxs)(`span`,{children:[`Changed files (`,t.changedPaths.length,`)`]}),(0,y.jsxs)(`span`,{style:{display:`flex`,gap:10,fontSize:10,letterSpacing:`0.04em`},children:[(0,y.jsxs)(`span`,{style:{color:`#a6e3a1`},children:[`+`,t.additions]}),(0,y.jsxs)(`span`,{style:{color:`#f38ba8`},children:[`-`,t.deletions]})]})]}),t.changedPaths.map((t,n)=>(0,y.jsx)(Vv,{sha:e.sha,cp:t},`${t.status}:${t.oldPath??``}:${t.path}:${n}`))]}):t?(0,y.jsx)(`div`,{style:{padding:`16px`,fontSize:13,color:`#45475a`},children:`No changed files`}):null})]})}function zv({label:e,value:t,mono:n,leading:r}){return(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:r?`center`:void 0,gap:8,marginBottom:3,fontSize:12},children:[(0,y.jsx)(`span`,{style:{color:`#6c7086`,minWidth:76,flexShrink:0},children:e}),(0,y.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:7,minWidth:0,color:`#a6adc8`,fontFamily:n?`monospace`:`inherit`},children:[r,(0,y.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t})]})]})}function Bv({name:e,url:t}){let[n,r]=(0,b.useState)(!1);(0,b.useEffect)(()=>r(!1),[t]);let i={width:24,height:24,borderRadius:`50%`,flexShrink:0};return t&&!n?(0,y.jsx)(`img`,{src:t,alt:`${e} avatar`,width:24,height:24,onError:()=>r(!0),style:{...i,display:`block`,objectFit:`cover`,background:`#313244`}}):(0,y.jsx)(`span`,{"aria-hidden":`true`,style:{...i,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,background:`#313244`,color:`#cdd6f4`,fontSize:11,fontWeight:700},children:e.trim().charAt(0).toUpperCase()||`?`})}function Vv({sha:e,cp:t}){let[n,r]=(0,b.useState)(!1),i=I(e=>e.loadCommitFileDiff),a=I(n=>n.commitFileDiffs[ai(e,t.path)]),o=Fv[t.status]??`#cdd6f4`,s=Iv[t.status]??t.status,c=t.oldPath?`${t.oldPath} → ${t.path}`:t.path;return(0,b.useEffect)(()=>{n&&!a&&i(e,t)},[n,a,e,t,i]),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`5px 16px`,fontSize:12,color:`#cdd6f4`,borderBottom:`1px solid #1e1e2e`,cursor:`pointer`},onClick:()=>{let a=!n;r(a),a&&i(e,t)},onMouseEnter:e=>{e.currentTarget.style.background=`#1e1e2e`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,y.jsx)(`span`,{style:{flexShrink:0,width:10,fontSize:9,color:`#6c7086`,userSelect:`none`},children:n?`▼`:`▶`}),(0,y.jsx)(`span`,{style:{flexShrink:0,width:18,height:18,borderRadius:3,background:o+`33`,color:o,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:10,fontWeight:700},children:s}),(0,y.jsx)(`span`,{style:{flex:1,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontFamily:`monospace`,fontSize:12,color:`#a6adc8`},title:c,children:c})]}),n&&a&&(0,y.jsx)(kv,{entry:a,path:t.path})]})}function Hv({run:e}){let t=Nv[e.state],n=Pv[e.state],r=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`span`,{style:{color:t,fontSize:12,fontWeight:700,width:12,textAlign:`center`,flexShrink:0},children:n}),(0,y.jsx)(`span`,{style:{color:`#cdd6f4`,fontWeight:500,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,flexShrink:0,maxWidth:`55%`},children:e.name}),e.description&&(0,y.jsx)(`span`,{style:{color:`#6c7086`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,flex:1},children:e.description})]}),i={display:`flex`,alignItems:`center`,gap:8,fontSize:12,padding:`2px 0`,textDecoration:`none`};return e.url?(0,y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,style:i,title:e.description??e.name,children:r}):(0,y.jsx)(`div`,{style:i,title:e.description??e.name,children:r})}function Uv(){return(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:12,padding:`2px 0`,color:`#6c7086`},title:`Loading CI status`,children:[(0,y.jsx)(`span`,{style:{width:10,height:10,borderRadius:`50%`,border:`2px solid #45475a`,borderTopColor:`#89b4fa`,flexShrink:0,animation:`ci-spin 0.8s linear infinite`}}),(0,y.jsx)(`span`,{style:{color:`#cdd6f4`,fontWeight:500},children:`CI status`}),(0,y.jsx)(`span`,{children:`Loading...`}),(0,y.jsx)(`style`,{children:`@keyframes ci-spin { to { transform: rotate(360deg); } }`})]})}function Wv({label:e,onClick:t}){return(0,y.jsx)(`button`,{onClick:t,title:e,style:{background:`#313244`,border:`1px solid #45475a`,borderRadius:4,color:`#cdd6f4`,fontSize:11,padding:`2px 8px`,cursor:`pointer`,fontFamily:`inherit`},onMouseEnter:e=>{e.currentTarget.style.background=`#45475a`},onMouseLeave:e=>{e.currentTarget.style.background=`#313244`},children:e})}function Gv({state:e,onClose:t}){let n=(0,b.useRef)(null),r=(0,b.useRef)(null);(0,b.useEffect)(()=>{let t=n.current;t&&(e?t.open||t.showModal():t.open&&t.close())},[e]),(0,b.useEffect)(()=>{let e=r.current;e&&(e.scrollTop=e.scrollHeight)},[e?.output]);let i=!!e&&!e.running;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`style`,{children:`.ingit-install-output-dialog::backdrop { background: rgba(10, 10, 18, 0.76); backdrop-filter: blur(2px); }`}),(0,y.jsx)(`dialog`,{ref:n,className:`ingit-install-output-dialog`,"aria-labelledby":`install-output-dialog-title`,onCancel:e=>{i?t():e.preventDefault()},onClose:()=>{i&&t()},style:{position:`fixed`,inset:0,margin:`auto`,width:`min(680px, calc(100vw - 32px))`,padding:0,border:`1px solid ${e?.error?`#8b3a4a`:`#45475a`}`,borderRadius:9,background:`#1e1e2e`,color:`#cdd6f4`,boxShadow:`0 22px 64px rgba(0,0,0,0.62)`},children:e&&(0,y.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,fontFamily:`system-ui, -apple-system, sans-serif`},children:[(0,y.jsxs)(`div`,{style:{padding:`16px 18px 12px`,borderBottom:`1px solid #313244`},children:[(0,y.jsxs)(`h2`,{id:`install-output-dialog-title`,style:{margin:0,color:`#f5e0dc`,fontSize:16},children:[`Resolving `,e.path.split(`/`).at(-1)]}),(0,y.jsx)(`div`,{style:{marginTop:5,color:`#a6adc8`,fontSize:12},children:e.command?`$ ${e.command}`:`Starting package manager…`})]}),(0,y.jsx)(`pre`,{ref:r,"aria-live":`polite`,"aria-label":`Package manager output`,style:{boxSizing:`border-box`,width:`100%`,minHeight:240,maxHeight:`min(420px, calc(100vh - 220px))`,margin:0,padding:16,overflow:`auto`,background:`#11111b`,color:`#cdd6f4`,fontSize:12,lineHeight:1.5,whiteSpace:`pre-wrap`,overflowWrap:`anywhere`},children:e.output||`Waiting for output…`}),(0,y.jsxs)(`div`,{style:{minHeight:54,padding:`11px 16px`,borderTop:`1px solid #313244`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12},children:[(0,y.jsx)(`span`,{style:{color:e.error?`#f5a6b8`:`#a6e3a1`,fontSize:12,fontWeight:700},children:e.running?`● Install running…`:e.error??``}),!e.running&&(0,y.jsx)(`button`,{type:`button`,onClick:t,style:{height:30,padding:`0 12px`,borderRadius:6,border:`1px solid #45475a`,background:`#181825`,color:`#bac2de`,fontSize:12,fontWeight:700,fontFamily:`inherit`,cursor:`pointer`},children:`Close`})]})]})})]})}function Kv(e){let t=[],n=``,r=!1,i=null,a=()=>{r&&=(t.push(n),n=``,!1)};for(let t=0;t<e.length;t+=1){let o=e[t];if(i===`'`){o===`'`?i=null:n+=o,r=!0;continue}if(i===`"`){if(o===`"`)i=null;else if(o===`\\`){let r=e[t+1];r===`"`||r===`\\`?(n+=r,t+=1):n+=o}else n+=o;r=!0;continue}if(/\s/.test(o)){a();continue}if(o===`'`||o===`"`){i=o,r=!0;continue}if(o===`\\`){let i=e[t+1];if(i!==void 0&&(/\s/.test(i)||i===`'`||i===`"`||i===`\\`)){n+=i,r=!0,t+=1;continue}}n+=o,r=!0}return i===null?(a(),t.length>0?t:null):null}var qv=class extends Error{issues;data;constructor(e){super(e.message,e),this.issues=e.issues,this.data=e.data}};function Jv(e,t){return{...e,...t}}var Yv=class{"~orpc";constructor(e){if(e.route?.successStatus&&We(e.route.successStatus))throw Error(`[ContractProcedure] Invalid successStatus.`);if(Object.values(e.errorMap).some(e=>e&&e.status&&!We(e.status)))throw Error(`[ContractProcedure] Invalid error status code.`);this[`~orpc`]=e}};function Xv(e){return e instanceof Yv||(typeof e==`object`||typeof e==`function`)&&e!==null&&`~orpc`in e&&typeof e[`~orpc`]==`object`&&e[`~orpc`]!==null&&`errorMap`in e[`~orpc`]&&`route`in e[`~orpc`]&&`meta`in e[`~orpc`]}function Zv(e,t){return{...e,...t}}function Qv(e,t){return{...e,...t}}function $v(e,t){return e.path?{...e,path:`${t}${e.path}`}:e}function ey(e,t){return{...e,tags:[...t,...e.tags??[]]}}function ty(e,t){return e?`${e}${t}`:t}function ny(e,t){return e?[...e,...t]:t}function ry(e,t){let n=e;return t.prefix&&(n=$v(n,t.prefix)),t.tags?.length&&(n=ey(n,t.tags)),n}function iy(e,t){if(Xv(e))return new Yv({...e[`~orpc`],errorMap:Jv(t.errorMap,e[`~orpc`].errorMap),route:ry(e[`~orpc`].route,t)});if(typeof e!=`object`||!e)return e;let n={};for(let r in e)n[r]=iy(e[r],t);return n}var q=new class e extends Yv{constructor(e){super(e),this[`~orpc`].prefix=e.prefix,this[`~orpc`].tags=e.tags}$meta(t){return new e({...this[`~orpc`],meta:t})}$route(t){return new e({...this[`~orpc`],route:t})}$input(t){return new e({...this[`~orpc`],inputSchema:t})}errors(t){return new e({...this[`~orpc`],errorMap:Jv(this[`~orpc`].errorMap,t)})}meta(t){return new e({...this[`~orpc`],meta:Zv(this[`~orpc`].meta,t)})}route(t){return new e({...this[`~orpc`],route:Qv(this[`~orpc`].route,t)})}input(t){return new e({...this[`~orpc`],inputSchema:t})}output(t){return new e({...this[`~orpc`],outputSchema:t})}prefix(t){return new e({...this[`~orpc`],prefix:ty(this[`~orpc`].prefix,t)})}tag(...t){return new e({...this[`~orpc`],tags:ny(this[`~orpc`].tags,t)})}router(e){return iy(e,this[`~orpc`])}}({errorMap:{},route:{},meta:{}}),ay=Symbol(`ORPC_EVENT_ITERATOR_DETAILS`);function oy(e,t){return{"~standard":{[ay]:{yields:e,returns:t},vendor:`orpc`,version:1,validate(n){return xe(n)?{value:ct(n,{async value(n,r){let i=r?t:e;if(!i)return n;let a=await i[`~standard`].validate(n);if(a.issues)throw new He(`EVENT_ITERATOR_VALIDATION_FAILED`,{message:`Event iterator validation failed`,cause:new qv({issues:a.issues,message:`Event iterator validation failed`,data:n})});return a.value},error:async e=>e})}:{issues:[{message:`Expect event iterator`,path:[]}]}}}}}var sy;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 cy=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ly=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(sy=globalThis).__zod_globalConfig??(sy.__zod_globalConfig={});var uy=globalThis.__zod_globalConfig;function dy(e){return e&&Object.assign(uy,e),uy}function fy(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 py(e,t){return typeof t==`bigint`?t.toString():t}function my(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function hy(e){return e==null}function gy(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function _y(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 vy=Symbol(`evaluating`);function yy(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==vy)return r===void 0&&(r=vy,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function by(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function xy(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Sy(e){return JSON.stringify(e)}function Cy(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var wy=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ty(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ey=my(()=>{if(uy.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Dy(e){if(Ty(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Ty(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Oy(e){return Dy(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ky=new Set([`string`,`number`,`symbol`]);function Ay(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function jy(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Y(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 My(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Ny={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Py(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 jy(e,xy(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 by(this,`shape`,e),e},checks:[]}))}function Fy(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 jy(e,xy(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 by(this,`shape`,r),r},checks:[]}))}function Iy(e,t){if(!Dy(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 jy(e,xy(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return by(this,`shape`,n),n}}))}function Ly(e,t){if(!Dy(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return jy(e,xy(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return by(this,`shape`,n),n}}))}function Ry(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return jy(e,xy(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return by(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function zy(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 jy(t,xy(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 by(this,`shape`,i),i},checks:[]}))}function By(e,t,n){return jy(t,xy(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 by(this,`shape`,i),i}}))}function Vy(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 Hy(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 Uy(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Wy(e){return typeof e==`string`?e:e?.message}function Gy(e,t,n){let r=e.message?e.message:Wy(e.inst?._zod.def?.error?.(e))??Wy(t?.error?.(e))??Wy(n.customError?.(e))??Wy(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 Ky(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function qy(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Jy=(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,py,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Yy=J(`$ZodError`,Jy),Xy=J(`$ZodError`,Jy,{Parent:Error});function Zy(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 Qy(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 $y=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 cy;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Gy(e,a,dy())));throw wy(t,i?.callee),t}return o.value},eb=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=>Gy(e,a,dy())));throw wy(t,i?.callee),t}return o.value},tb=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 cy;return a.issues.length?{success:!1,error:new(e??Yy)(a.issues.map(e=>Gy(e,i,dy())))}:{success:!0,data:a.value}},nb=tb(Xy),rb=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=>Gy(e,i,dy())))}:{success:!0,data:a.value}},ib=rb(Xy),ab=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return $y(e)(t,n,i)},ob=e=>(t,n,r)=>$y(e)(t,n,r),sb=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return eb(e)(t,n,i)},cb=e=>async(t,n,r)=>eb(e)(t,n,r),lb=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return tb(e)(t,n,i)},ub=e=>(t,n,r)=>tb(e)(t,n,r),db=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return rb(e)(t,n,i)},fb=e=>async(t,n,r)=>rb(e)(t,n,r),pb=/^[cC][0-9a-z]{6,}$/,mb=/^[0-9a-z]+$/,hb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,gb=/^[0-9a-vA-V]{20}$/,_b=/^[A-Za-z0-9]{27}$/,vb=/^[a-zA-Z0-9_-]{21}$/,yb=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,bb=/^([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})$/,xb=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)$/,Sb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Cb=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function wb(){return new RegExp(Cb,`u`)}var Tb=/^(?:(?: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])$/,Eb=/^(([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}|:))$/,Db=/^((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])$/,Ob=/^(([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])$/,kb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ab=/^[A-Za-z0-9_-]*$/,jb=/^https?$/,Mb=/^\+[1-9]\d{6,14}$/,Nb=`(?:(?:\\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])))`,Pb=RegExp(`^${Nb}$`);function Fb(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 Ib(e){return RegExp(`^${Fb(e)}$`)}function Lb(e){let t=Fb({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(`^${Nb}T(?:${r})$`)}var Rb=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},zb=/^-?\d+$/,Bb=/^-?\d+(?:\.\d+)?$/,Vb=/^(?:true|false)$/i,Hb=/^[^A-Z]*$/,Ub=/^[^a-z]*$/,Wb=J(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Gb={number:`number`,bigint:`bigint`,object:`date`},Kb=J(`$ZodCheckLessThan`,(e,t)=>{Wb.init(e,t);let n=Gb[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})}}),qb=J(`$ZodCheckGreaterThan`,(e,t)=>{Wb.init(e,t);let n=Gb[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})}}),Jb=J(`$ZodCheckMultipleOf`,(e,t)=>{Wb.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):_y(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})}}),Yb=J(`$ZodCheckNumberFormat`,(e,t)=>{Wb.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ny[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=zb)}),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})}}),Xb=J(`$ZodCheckMaxLength`,(e,t)=>{var n;Wb.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!hy(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=Ky(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zb=J(`$ZodCheckMinLength`,(e,t)=>{var n;Wb.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!hy(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=Ky(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Qb=J(`$ZodCheckLengthEquals`,(e,t)=>{var n;Wb.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!hy(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=Ky(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})}}),$b=J(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Wb.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=()=>{})}),ex=J(`$ZodCheckRegex`,(e,t)=>{$b.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})}}),tx=J(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Hb,$b.init(e,t)}),nx=J(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Ub,$b.init(e,t)}),rx=J(`$ZodCheckIncludes`,(e,t)=>{Wb.init(e,t);let n=Ay(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})}}),ix=J(`$ZodCheckStartsWith`,(e,t)=>{Wb.init(e,t);let n=RegExp(`^${Ay(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})}}),ax=J(`$ZodCheckEndsWith`,(e,t)=>{Wb.init(e,t);let n=RegExp(`.*${Ay(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})}}),ox=J(`$ZodCheckOverwrite`,(e,t)=>{Wb.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),sx=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(`
|
|
614
|
-
`).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(`
|
|
615
|
-
`))}},cx={major:4,minor:4,patch:3},lx=J(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=cx;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=Vy(e),i;for(let a of t){if(a._zod.def.when){if(Hy(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 cy;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Vy(e,t))});else{if(e.issues.length===t)continue;r||=Vy(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Vy(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new cy;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 cy;return o.then(e=>t(e,r,a))}return t(o,r,a)}}yy(e,`~standard`,()=>({validate:t=>{try{let n=nb(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return ib(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),ux=J(`$ZodString`,(e,t)=>{lx.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Rb(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}}),dx=J(`$ZodStringFormat`,(e,t)=>{$b.init(e,t),ux.init(e,t)}),fx=J(`$ZodGUID`,(e,t)=>{t.pattern??=bb,dx.init(e,t)}),px=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??=xb(e)}else t.pattern??=xb();dx.init(e,t)}),mx=J(`$ZodEmail`,(e,t)=>{t.pattern??=Sb,dx.init(e,t)}),hx=J(`$ZodURL`,(e,t)=>{dx.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===jb.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})}}}),gx=J(`$ZodEmoji`,(e,t)=>{t.pattern??=wb(),dx.init(e,t)}),_x=J(`$ZodNanoID`,(e,t)=>{t.pattern??=vb,dx.init(e,t)}),vx=J(`$ZodCUID`,(e,t)=>{t.pattern??=pb,dx.init(e,t)}),yx=J(`$ZodCUID2`,(e,t)=>{t.pattern??=mb,dx.init(e,t)}),bx=J(`$ZodULID`,(e,t)=>{t.pattern??=hb,dx.init(e,t)}),xx=J(`$ZodXID`,(e,t)=>{t.pattern??=gb,dx.init(e,t)}),Sx=J(`$ZodKSUID`,(e,t)=>{t.pattern??=_b,dx.init(e,t)}),Cx=J(`$ZodISODateTime`,(e,t)=>{t.pattern??=Lb(t),dx.init(e,t)}),wx=J(`$ZodISODate`,(e,t)=>{t.pattern??=Pb,dx.init(e,t)}),Tx=J(`$ZodISOTime`,(e,t)=>{t.pattern??=Ib(t),dx.init(e,t)}),Ex=J(`$ZodISODuration`,(e,t)=>{t.pattern??=yb,dx.init(e,t)}),Dx=J(`$ZodIPv4`,(e,t)=>{t.pattern??=Tb,dx.init(e,t),e._zod.bag.format=`ipv4`}),Ox=J(`$ZodIPv6`,(e,t)=>{t.pattern??=Eb,dx.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})}}}),kx=J(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Db,dx.init(e,t)}),Ax=J(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ob,dx.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 jx(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Mx=J(`$ZodBase64`,(e,t)=>{t.pattern??=kb,dx.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{jx(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Nx(e){if(!Ab.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return jx(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Px=J(`$ZodBase64URL`,(e,t)=>{t.pattern??=Ab,dx.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Nx(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Fx=J(`$ZodE164`,(e,t)=>{t.pattern??=Mb,dx.init(e,t)});function Ix(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 Lx=J(`$ZodJWT`,(e,t)=>{dx.init(e,t),e._zod.check=n=>{Ix(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Rx=J(`$ZodNumber`,(e,t)=>{lx.init(e,t),e._zod.pattern=e._zod.bag.pattern??Bb,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}}),zx=J(`$ZodNumberFormat`,(e,t)=>{Yb.init(e,t),Rx.init(e,t)}),Bx=J(`$ZodBoolean`,(e,t)=>{lx.init(e,t),e._zod.pattern=Vb,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}}),Vx=J(`$ZodUnknown`,(e,t)=>{lx.init(e,t),e._zod.parse=e=>e}),Hx=J(`$ZodNever`,(e,t)=>{lx.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Ux(e,t,n){e.issues.length&&t.issues.push(...Uy(n,e.issues)),t.value[n]=e.value}var Wx=J(`$ZodArray`,(e,t)=>{lx.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=>Ux(t,n,e))):Ux(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Gx(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Uy(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 Kx(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=My(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function qx(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=>Gx(e,n,i,t,u,d))):Gx(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 Jx=J(`$ZodObject`,(e,t)=>{if(lx.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=my(()=>Kx(t));yy(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=Ty,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=>Gx(n,t,e,s,r,i))):Gx(a,t,e,s,r,i)}return i?qx(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Yx=J(`$ZodObjectJIT`,(e,t)=>{Jx.init(e,t);let n=e._zod.parse,r=my(()=>Kx(t)),i=e=>{let t=new sx([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Sy(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=Sy(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
616
|
-
if (${n}.issues.length) {
|
|
617
|
-
if (${o} in input) {
|
|
618
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
619
|
-
...iss,
|
|
620
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
621
|
-
})));
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
if (${n}.value === undefined) {
|
|
626
|
-
if (${o} in input) {
|
|
627
|
-
newResult[${o}] = undefined;
|
|
628
|
-
}
|
|
629
|
-
} else {
|
|
630
|
-
newResult[${o}] = ${n}.value;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
`):c?t.write(`
|
|
634
|
-
if (${n}.issues.length) {
|
|
635
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
636
|
-
...iss,
|
|
637
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
638
|
-
})));
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
if (${n}.value === undefined) {
|
|
642
|
-
if (${o} in input) {
|
|
643
|
-
newResult[${o}] = undefined;
|
|
644
|
-
}
|
|
645
|
-
} else {
|
|
646
|
-
newResult[${o}] = ${n}.value;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
`):t.write(`
|
|
650
|
-
const ${n}_present = ${o} in input;
|
|
651
|
-
if (${n}.issues.length) {
|
|
652
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
653
|
-
...iss,
|
|
654
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
655
|
-
})));
|
|
656
|
-
}
|
|
657
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
658
|
-
payload.issues.push({
|
|
659
|
-
code: "invalid_type",
|
|
660
|
-
expected: "nonoptional",
|
|
661
|
-
input: undefined,
|
|
662
|
-
path: [${o}]
|
|
663
|
-
});
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
if (${n}_present) {
|
|
667
|
-
if (${n}.value === undefined) {
|
|
668
|
-
newResult[${o}] = undefined;
|
|
669
|
-
} else {
|
|
670
|
-
newResult[${o}] = ${n}.value;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Ty,s=!uy.jitless,c=s&&Ey.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?qx([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Xx(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=>!Vy(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=>Gy(e,r,dy())))}),t)}var Zx=J(`$ZodUnion`,(e,t)=>{lx.init(e,t),yy(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),yy(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),yy(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),yy(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=>gy(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=>Xx(t,r,e,i)):Xx(o,r,e,i)}}),Qx=J(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Zx.init(e,t);let n=e._zod.parse;yy(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=my(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Ty(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),$x=J(`$ZodIntersection`,(e,t)=>{lx.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])=>tS(e,t,n)):tS(e,i,a)}});function eS(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Dy(e)&&Dy(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=eS(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=eS(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 tS(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}),Vy(e))return e;let o=eS(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var nS=J(`$ZodRecord`,(e,t)=>{lx.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Dy(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=>Gy(e,r,dy())),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(...Uy(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Uy(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`&&Bb.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=>Gy(e,r,dy())),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(...Uy(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Uy(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),rS=J(`$ZodEnum`,(e,t)=>{lx.init(e,t);let n=fy(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ky.has(typeof e)).map(e=>typeof e==`string`?Ay(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}}),iS=J(`$ZodLiteral`,(e,t)=>{if(lx.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?Ay(e):e?Ay(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),aS=J(`$ZodTransform`,(e,t)=>{lx.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ly(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 cy;return n.value=i,n.fallback=!0,n}});function oS(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var sS=J(`$ZodOptional`,(e,t)=>{lx.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,yy(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),yy(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${gy(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=>oS(e,r)):oS(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),cS=J(`$ZodExactOptional`,(e,t)=>{sS.init(e,t),yy(e._zod,`values`,()=>t.innerType._zod.values),yy(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),lS=J(`$ZodNullable`,(e,t)=>{lx.init(e,t),yy(e._zod,`optin`,()=>t.innerType._zod.optin),yy(e._zod,`optout`,()=>t.innerType._zod.optout),yy(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${gy(e.source)}|null)$`):void 0}),yy(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)}),uS=J(`$ZodDefault`,(e,t)=>{lx.init(e,t),e._zod.optin=`optional`,yy(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=>dS(e,t)):dS(r,t)}});function dS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var fS=J(`$ZodPrefault`,(e,t)=>{lx.init(e,t),e._zod.optin=`optional`,yy(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))}),pS=J(`$ZodNonOptional`,(e,t)=>{lx.init(e,t),yy(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=>mS(t,e)):mS(i,e)}});function mS(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 hS=J(`$ZodCatch`,(e,t)=>{lx.init(e,t),e._zod.optin=`optional`,yy(e._zod,`optout`,()=>t.innerType._zod.optout),yy(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=>Gy(e,n,dy()))},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=>Gy(e,n,dy()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),gS=J(`$ZodPipe`,(e,t)=>{lx.init(e,t),yy(e._zod,`values`,()=>t.in._zod.values),yy(e._zod,`optin`,()=>t.in._zod.optin),yy(e._zod,`optout`,()=>t.out._zod.optout),yy(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=>_S(e,t.in,n)):_S(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>_S(e,t.out,n)):_S(r,t.out,n)}});function _S(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 vS=J(`$ZodReadonly`,(e,t)=>{lx.init(e,t),yy(e._zod,`propValues`,()=>t.innerType._zod.propValues),yy(e._zod,`values`,()=>t.innerType._zod.values),yy(e._zod,`optin`,()=>t.innerType?._zod?.optin),yy(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(yS):yS(r)}});function yS(e){return e.value=Object.freeze(e.value),e}var bS=J(`$ZodCustom`,(e,t)=>{Wb.init(e,t),lx.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=>xS(t,n,r,e));xS(i,n,r,e)}});function xS(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(qy(e))}}var SS,CS=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 wS(){return new CS}(SS=globalThis).__zod_globalRegistry??(SS.__zod_globalRegistry=wS());var TS=globalThis.__zod_globalRegistry;function ES(e,t){return new e({type:`string`,...Y(t)})}function DS(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Y(t)})}function OS(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Y(t)})}function kS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Y(t)})}function AS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Y(t)})}function jS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Y(t)})}function MS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Y(t)})}function NS(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Y(t)})}function PS(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Y(t)})}function FS(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Y(t)})}function IS(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Y(t)})}function LS(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Y(t)})}function RS(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Y(t)})}function zS(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Y(t)})}function BS(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Y(t)})}function VS(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Y(t)})}function HS(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Y(t)})}function US(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Y(t)})}function WS(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Y(t)})}function GS(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Y(t)})}function KS(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Y(t)})}function qS(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Y(t)})}function JS(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Y(t)})}function YS(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Y(t)})}function XS(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Y(t)})}function ZS(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Y(t)})}function QS(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Y(t)})}function $S(e,t){return new e({type:`number`,checks:[],...Y(t)})}function eC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Y(t)})}function tC(e,t){return new e({type:`boolean`,...Y(t)})}function nC(e){return new e({type:`unknown`})}function rC(e,t){return new e({type:`never`,...Y(t)})}function iC(e,t){return new Kb({check:`less_than`,...Y(t),value:e,inclusive:!1})}function aC(e,t){return new Kb({check:`less_than`,...Y(t),value:e,inclusive:!0})}function oC(e,t){return new qb({check:`greater_than`,...Y(t),value:e,inclusive:!1})}function sC(e,t){return new qb({check:`greater_than`,...Y(t),value:e,inclusive:!0})}function cC(e,t){return new Jb({check:`multiple_of`,...Y(t),value:e})}function lC(e,t){return new Xb({check:`max_length`,...Y(t),maximum:e})}function uC(e,t){return new Zb({check:`min_length`,...Y(t),minimum:e})}function dC(e,t){return new Qb({check:`length_equals`,...Y(t),length:e})}function fC(e,t){return new ex({check:`string_format`,format:`regex`,...Y(t),pattern:e})}function pC(e){return new tx({check:`string_format`,format:`lowercase`,...Y(e)})}function mC(e){return new nx({check:`string_format`,format:`uppercase`,...Y(e)})}function hC(e,t){return new rx({check:`string_format`,format:`includes`,...Y(t),includes:e})}function gC(e,t){return new ix({check:`string_format`,format:`starts_with`,...Y(t),prefix:e})}function _C(e,t){return new ax({check:`string_format`,format:`ends_with`,...Y(t),suffix:e})}function vC(e){return new ox({check:`overwrite`,tx:e})}function yC(e){return vC(t=>t.normalize(e))}function bC(){return vC(e=>e.trim())}function xC(){return vC(e=>e.toLowerCase())}function SC(){return vC(e=>e.toUpperCase())}function CC(){return vC(e=>Cy(e))}function wC(e,t,n){return new e({type:`array`,element:t,...Y(n)})}function TC(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Y(n)})}function EC(e,t){let n=DC(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(qy(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(qy(r))}},e(t.value,t)),t);return n}function DC(e,t){let n=new Wb({check:`custom`,...Y(t)});return n._zod.check=e,n}function OC(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??TS,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 kC(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,kC(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`&&MC(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 AC(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>
|
|
675
|
-
|
|
676
|
-
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 jC(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:PC(t,`input`,e.processors),output:PC(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function MC(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 MC(r.element,n);if(r.type===`set`)return MC(r.valueType,n);if(r.type===`lazy`)return MC(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 MC(r.innerType,n);if(r.type===`intersection`)return MC(r.left,n)||MC(r.right,n);if(r.type===`record`||r.type===`map`)return MC(r.keyType,n)||MC(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:MC(r.in,n)||MC(r.out,n);if(r.type===`object`){for(let e in r.shape)if(MC(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(MC(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(MC(e,n))return!0;return!!(r.rest&&MC(r.rest,n))}return!1}var NC=(e,t={})=>n=>{let r=OC({...n,processors:t});return kC(e,r),AC(r,e),jC(r,e)},PC=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=OC({...i??{},target:a,io:t,processors:n});return kC(e,o),AC(o,e),jC(o,e)},FC={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},IC=(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=FC[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}))])}},LC=(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)},RC=(e,t,n,r)=>{n.type=`boolean`},zC=(e,t,n,r)=>{n.not={}},BC=(e,t,n,r)=>{let i=e._zod.def,a=fy(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},VC=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},HC=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},UC=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},WC=(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=kC(a.element,t,{...r,path:[...r.path,`items`]})},GC=(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]=kC(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=kC(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},KC=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>kC(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},qC=(e,t,n,r)=>{let i=e._zod.def,a=kC(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=kC(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]]},JC=(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=kC(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=kC(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=kC(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)}},YC=(e,t,n,r)=>{let i=e._zod.def,a=kC(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`}]},XC=(e,t,n,r)=>{let i=e._zod.def;kC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ZC=(e,t,n,r)=>{let i=e._zod.def;kC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},QC=(e,t,n,r)=>{let i=e._zod.def;kC(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)))},$C=(e,t,n,r)=>{let i=e._zod.def;kC(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},ew=(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;kC(o,t,r);let s=t.seen.get(e);s.ref=o},tw=(e,t,n,r)=>{let i=e._zod.def;kC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},nw=(e,t,n,r)=>{let i=e._zod.def;kC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},rw=J(`ZodISODateTime`,(e,t)=>{Cx.init(e,t),kw.init(e,t)});function iw(e){return YS(rw,e)}var aw=J(`ZodISODate`,(e,t)=>{wx.init(e,t),kw.init(e,t)});function ow(e){return XS(aw,e)}var sw=J(`ZodISOTime`,(e,t)=>{Tx.init(e,t),kw.init(e,t)});function cw(e){return ZS(sw,e)}var lw=J(`ZodISODuration`,(e,t)=>{Ex.init(e,t),kw.init(e,t)});function uw(e){return QS(lw,e)}var dw=J(`ZodError`,(e,t)=>{Yy.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Qy(e,t)},flatten:{value:t=>Zy(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,py,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,py,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),fw=$y(dw),pw=eb(dw),mw=tb(dw),hw=rb(dw),gw=ab(dw),_w=ob(dw),vw=sb(dw),yw=cb(dw),bw=lb(dw),xw=ub(dw),Sw=db(dw),Cw=fb(dw),ww=new WeakMap;function Tw(e,t,n){let r=Object.getPrototypeOf(e),i=ww.get(r);if(i||(i=new Set,ww.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 Ew=J(`ZodType`,(e,t)=>(lx.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:PC(e,`input`),output:PC(e,`output`)}}),e.toJSONSchema=NC(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>fw(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>mw(e,t,n),e.parseAsync=async(t,n)=>pw(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>hw(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>gw(e,t,n),e.decode=(t,n)=>_w(e,t,n),e.encodeAsync=async(t,n)=>vw(e,t,n),e.decodeAsync=async(t,n)=>yw(e,t,n),e.safeEncode=(t,n)=>bw(e,t,n),e.safeDecode=(t,n)=>xw(e,t,n),e.safeEncodeAsync=async(t,n)=>Sw(e,t,n),e.safeDecodeAsync=async(t,n)=>Cw(e,t,n),Tw(e,`ZodType`,{check(...e){let t=this.def;return this.clone(xy(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 jy(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(BT(e,t))},superRefine(e,t){return this.check(VT(e,t))},overwrite(e){return this.check(vC(e))},optional(){return ST(this)},exactOptional(){return wT(this)},nullable(){return ET(this)},nullish(){return ST(ET(this))},nonoptional(e){return MT(this,e)},array(){return aT(this)},or(e){return cT([this,e])},and(e){return fT(this,e)},transform(e){return IT(this,bT(e))},default(e){return OT(this,e)},prefault(e){return AT(this,e)},catch(e){return PT(this,e)},pipe(e){return IT(this,e)},readonly(){return RT(this)},describe(e){let t=this.clone();return TS.add(t,{description:e}),t},meta(...e){if(e.length===0)return TS.get(this);let t=this.clone();return TS.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 TS.get(e)?.description},configurable:!0}),e)),Dw=J(`_ZodString`,(e,t)=>{ux.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IC(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Tw(e,`_ZodString`,{regex(...e){return this.check(fC(...e))},includes(...e){return this.check(hC(...e))},startsWith(...e){return this.check(gC(...e))},endsWith(...e){return this.check(_C(...e))},min(...e){return this.check(uC(...e))},max(...e){return this.check(lC(...e))},length(...e){return this.check(dC(...e))},nonempty(...e){return this.check(uC(1,...e))},lowercase(e){return this.check(pC(e))},uppercase(e){return this.check(mC(e))},trim(){return this.check(bC())},normalize(...e){return this.check(yC(...e))},toLowerCase(){return this.check(xC())},toUpperCase(){return this.check(SC())},slugify(){return this.check(CC())}})}),Ow=J(`ZodString`,(e,t)=>{ux.init(e,t),Dw.init(e,t),e.email=t=>e.check(DS(Aw,t)),e.url=t=>e.check(NS(Nw,t)),e.jwt=t=>e.check(JS(Jw,t)),e.emoji=t=>e.check(PS(Pw,t)),e.guid=t=>e.check(OS(jw,t)),e.uuid=t=>e.check(kS(Mw,t)),e.uuidv4=t=>e.check(AS(Mw,t)),e.uuidv6=t=>e.check(jS(Mw,t)),e.uuidv7=t=>e.check(MS(Mw,t)),e.nanoid=t=>e.check(FS(Fw,t)),e.guid=t=>e.check(OS(jw,t)),e.cuid=t=>e.check(IS(Iw,t)),e.cuid2=t=>e.check(LS(Lw,t)),e.ulid=t=>e.check(RS(Rw,t)),e.base64=t=>e.check(GS(Gw,t)),e.base64url=t=>e.check(KS(Kw,t)),e.xid=t=>e.check(zS(zw,t)),e.ksuid=t=>e.check(BS(Bw,t)),e.ipv4=t=>e.check(VS(Vw,t)),e.ipv6=t=>e.check(HS(Hw,t)),e.cidrv4=t=>e.check(US(Uw,t)),e.cidrv6=t=>e.check(WS(Ww,t)),e.e164=t=>e.check(qS(qw,t)),e.datetime=t=>e.check(iw(t)),e.date=t=>e.check(ow(t)),e.time=t=>e.check(cw(t)),e.duration=t=>e.check(uw(t))});function X(e){return ES(Ow,e)}var kw=J(`ZodStringFormat`,(e,t)=>{dx.init(e,t),Dw.init(e,t)}),Aw=J(`ZodEmail`,(e,t)=>{mx.init(e,t),kw.init(e,t)}),jw=J(`ZodGUID`,(e,t)=>{fx.init(e,t),kw.init(e,t)}),Mw=J(`ZodUUID`,(e,t)=>{px.init(e,t),kw.init(e,t)}),Nw=J(`ZodURL`,(e,t)=>{hx.init(e,t),kw.init(e,t)}),Pw=J(`ZodEmoji`,(e,t)=>{gx.init(e,t),kw.init(e,t)}),Fw=J(`ZodNanoID`,(e,t)=>{_x.init(e,t),kw.init(e,t)}),Iw=J(`ZodCUID`,(e,t)=>{vx.init(e,t),kw.init(e,t)}),Lw=J(`ZodCUID2`,(e,t)=>{yx.init(e,t),kw.init(e,t)}),Rw=J(`ZodULID`,(e,t)=>{bx.init(e,t),kw.init(e,t)}),zw=J(`ZodXID`,(e,t)=>{xx.init(e,t),kw.init(e,t)}),Bw=J(`ZodKSUID`,(e,t)=>{Sx.init(e,t),kw.init(e,t)}),Vw=J(`ZodIPv4`,(e,t)=>{Dx.init(e,t),kw.init(e,t)}),Hw=J(`ZodIPv6`,(e,t)=>{Ox.init(e,t),kw.init(e,t)}),Uw=J(`ZodCIDRv4`,(e,t)=>{kx.init(e,t),kw.init(e,t)}),Ww=J(`ZodCIDRv6`,(e,t)=>{Ax.init(e,t),kw.init(e,t)}),Gw=J(`ZodBase64`,(e,t)=>{Mx.init(e,t),kw.init(e,t)}),Kw=J(`ZodBase64URL`,(e,t)=>{Px.init(e,t),kw.init(e,t)}),qw=J(`ZodE164`,(e,t)=>{Fx.init(e,t),kw.init(e,t)}),Jw=J(`ZodJWT`,(e,t)=>{Lx.init(e,t),kw.init(e,t)}),Yw=J(`ZodNumber`,(e,t)=>{Rx.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LC(e,t,n,r),Tw(e,`ZodNumber`,{gt(e,t){return this.check(oC(e,t))},gte(e,t){return this.check(sC(e,t))},min(e,t){return this.check(sC(e,t))},lt(e,t){return this.check(iC(e,t))},lte(e,t){return this.check(aC(e,t))},max(e,t){return this.check(aC(e,t))},int(e){return this.check(Qw(e))},safe(e){return this.check(Qw(e))},positive(e){return this.check(oC(0,e))},nonnegative(e){return this.check(sC(0,e))},negative(e){return this.check(iC(0,e))},nonpositive(e){return this.check(aC(0,e))},multipleOf(e,t){return this.check(cC(e,t))},step(e,t){return this.check(cC(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 Xw(e){return $S(Yw,e)}var Zw=J(`ZodNumberFormat`,(e,t)=>{zx.init(e,t),Yw.init(e,t)});function Qw(e){return eC(Zw,e)}var $w=J(`ZodBoolean`,(e,t)=>{Bx.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RC(e,t,n,r)});function Z(e){return tC($w,e)}var eT=J(`ZodUnknown`,(e,t)=>{Vx.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function tT(){return nC(eT)}var nT=J(`ZodNever`,(e,t)=>{Hx.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zC(e,t,n,r)});function rT(e){return rC(nT,e)}var iT=J(`ZodArray`,(e,t)=>{Wx.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WC(e,t,n,r),e.element=t.element,Tw(e,`ZodArray`,{min(e,t){return this.check(uC(e,t))},nonempty(e){return this.check(uC(1,e))},max(e,t){return this.check(lC(e,t))},length(e,t){return this.check(dC(e,t))},unwrap(){return this.element}})});function aT(e,t){return wC(iT,e,t)}var oT=J(`ZodObject`,(e,t)=>{Yx.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GC(e,t,n,r),yy(e,`shape`,()=>t.shape),Tw(e,`ZodObject`,{keyof(){return gT(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:tT()})},loose(){return this.clone({...this._zod.def,catchall:tT()})},strict(){return this.clone({...this._zod.def,catchall:rT()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Iy(this,e)},safeExtend(e){return Ly(this,e)},merge(e){return Ry(this,e)},pick(e){return Py(this,e)},omit(e){return Fy(this,e)},partial(...e){return zy(xT,this,e[0])},required(...e){return By(jT,this,e[0])}})});function Q(e,t){return new oT({type:`object`,shape:e??{},...Y(t)})}var sT=J(`ZodUnion`,(e,t)=>{Zx.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KC(e,t,n,r),e.options=t.options});function cT(e,t){return new sT({type:`union`,options:e,...Y(t)})}var lT=J(`ZodDiscriminatedUnion`,(e,t)=>{sT.init(e,t),Qx.init(e,t)});function uT(e,t,n){return new lT({type:`union`,options:t,discriminator:e,...Y(n)})}var dT=J(`ZodIntersection`,(e,t)=>{$x.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qC(e,t,n,r)});function fT(e,t){return new dT({type:`intersection`,left:e,right:t})}var pT=J(`ZodRecord`,(e,t)=>{nS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JC(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function mT(e,t,n){return!t||!t._zod?new pT({type:`record`,keyType:X(),valueType:e,...Y(t)}):new pT({type:`record`,keyType:e,valueType:t,...Y(n)})}var hT=J(`ZodEnum`,(e,t)=>{rS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BC(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 hT({...t,checks:[],...Y(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 hT({...t,checks:[],...Y(r),entries:i})}});function gT(e,t){return new hT({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Y(t)})}var _T=J(`ZodLiteral`,(e,t)=>{iS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VC(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function vT(e,t){return new _T({type:`literal`,values:Array.isArray(e)?e:[e],...Y(t)})}var yT=J(`ZodTransform`,(e,t)=>{aS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UC(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ly(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(qy(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(qy(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 bT(e){return new yT({type:`transform`,transform:e})}var xT=J(`ZodOptional`,(e,t)=>{sS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ST(e){return new xT({type:`optional`,innerType:e})}var CT=J(`ZodExactOptional`,(e,t)=>{cS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wT(e){return new CT({type:`optional`,innerType:e})}var TT=J(`ZodNullable`,(e,t)=>{lS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ET(e){return new TT({type:`nullable`,innerType:e})}var DT=J(`ZodDefault`,(e,t)=>{uS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function OT(e,t){return new DT({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Oy(t)}})}var kT=J(`ZodPrefault`,(e,t)=>{fS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function AT(e,t){return new kT({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Oy(t)}})}var jT=J(`ZodNonOptional`,(e,t)=>{pS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function MT(e,t){return new jT({type:`nonoptional`,innerType:e,...Y(t)})}var NT=J(`ZodCatch`,(e,t)=>{hS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$C(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function PT(e,t){return new NT({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var FT=J(`ZodPipe`,(e,t)=>{gS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ew(e,t,n,r),e.in=t.in,e.out=t.out});function IT(e,t){return new FT({type:`pipe`,in:e,out:t})}var LT=J(`ZodReadonly`,(e,t)=>{vS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function RT(e){return new LT({type:`readonly`,innerType:e})}var zT=J(`ZodCustom`,(e,t)=>{bS.init(e,t),Ew.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HC(e,t,n,r)});function BT(e,t={}){return TC(zT,e,t)}function VT(e,t){return EC(e,t)}var $=X(),HT=X(),UT=Q({kind:gT([`symbolic`,`detached`]),refName:X().optional(),sha:$}),WT=Q({name:X(),shortName:X(),kind:gT([`head`,`remote`,`tag`]),targetSha:$,peeledSha:$.optional(),upstream:X().optional(),ahead:Xw().optional(),behind:Xw().optional(),isCurrent:Z().optional()}),GT=Q({name:X(),url:X()}),KT=Q({remoteName:X(),fullName:X(),url:X()}),qT=Q({selector:X(),sha:$,parentSha:$,message:X(),createdAt:Xw()}),JT=Q({path:X(),headSha:$.nullable(),branchRef:X().optional(),branchShortName:X().optional(),isCurrent:Z(),detached:Z(),bare:Z(),locked:Z(),lockedReason:X().optional(),prunable:Z(),prunableReason:X().optional()}),YT=Q({row:Xw(),sha:$,parentShas:aT($),authorName:X(),authorEmail:X(),authorUnix:Xw(),committerUnix:Xw(),subject:X(),additions:Xw(),deletions:Xw(),locChanged:Xw(),bodyPreview:X().optional(),refNames:aT(X()),lane:Xw()}),XT=Q({fromRow:Xw(),toRow:Xw(),fromLane:Xw(),toLane:Xw(),kind:gT([`linear`,`merge`,`fork`])}),ZT=Q({path:X(),oldPath:X().optional(),status:gT([`A`,`M`,`D`,`R`,`C`,`T`,`U`])}),QT=gT([`A`,`M`,`D`,`R`,`C`,`T`,`U`,`?`]),$T=Q({path:X(),oldPath:X().optional(),status:QT}),eE=Q({branch:X().optional(),headSha:$,mergeHeadShas:aT($).optional(),rebaseHeadSha:$.optional(),staged:aT($T),unstaged:aT($T)}),tE=uT(`type`,[Q({type:vT(`start`),command:X()}),Q({type:vT(`output`),stream:gT([`stdout`,`stderr`,`status`]),text:X()}),Q({type:vT(`complete`),ok:Z(),exitCode:Xw().optional(),error:X().optional(),changes:eE.optional()})]),nE=gT([`stage`,`unstage`,`stage-all`,`unstage-all`,`discard`,`discard-all`]),rE=gT([`staged`,`unstaged`]),iE=Q({dataUrl:X(),byteSize:Xw()}),aE=Q({before:iE.nullable(),after:iE.nullable()}),oE=gT([`cherry-pick`,`revert`,`uncommit`,`squash`]),sE=gT([`current-branch`,`detached-head`,`up-to-date`,`missing-ref`]),cE=gT([`merge`,`rebase`]),lE=gT([`checkout`,`push`,`fetch`,`delete`,`move`,`reset`,`create`,`create-tag`]),uE=gT([`commit`,`amend`,`checkout`,`reset`,`rebase`,`squash`,`merge`,`cherry-pick`,`revert`,`pull`,`branch`,`clone`,`other`]),dE=Q({index:Xw(),selector:X(),sha:$,oldSha:$.nullable(),kind:uE,message:X(),subject:X(),authorName:X(),authorEmail:X(),committerUnix:Xw(),entryUnix:Xw(),isReachable:Z(),refNames:aT(X())}),fE=Q({name:X(),path:X(),isGitRepo:Z()}),pE=gT([`terminal`,`ide`,`background`]),mE=gT([`claude`,`codex`]),hE=Q({pid:Xw(),agent:mE,kind:pE,cwd:X(),gitRoot:X().nullable(),tty:X().nullable(),ide:X().nullable(),focusable:Z(),busy:Z().nullable(),title:X().nullable()}),gE=Q({displayServer:X(),canFocusTerminals:Z(),canInstallWindowCalls:Z()});q.input(Q({path:X()})).output(Q({repoId:HT,rootPath:X(),currentWorktreePath:X(),totalCommitCount:Xw(),githubUrl:X().nullable(),head:UT})),q.input(Q({repoId:HT})).output(Q({ok:Z(),error:X().optional()})),q.input(Q({})).output(aT(X())),q.input(Q({folder:X().optional()})).output(Q({folder:X(),repos:aT(X())})),q.input(Q({folder:X().optional()})).output(Q({path:X(),parentPath:X().nullable(),isGitRepo:Z(),entries:aT(fE),error:X().optional()})),q.input(Q({repoId:HT})).output(aT(WT)),q.input(Q({repoId:HT})).output(aT(GT)),q.input(Q({repoId:HT})).output(X().nullable()),q.input(Q({repoId:HT,name:X().trim().min(1).max(255)})).output(Q({ok:Z(),name:X()})),q.input(Q({repoId:HT})).output(KT.nullable()),q.input(Q({repoId:HT,name:X().trim().min(1).max(255),url:X().trim().min(1).max(4096)})).output(Q({ok:Z(),remotes:aT(GT)})),q.input(Q({repoId:HT,name:X().min(1).max(255)})).output(Q({ok:Z(),remotes:aT(GT)})),q.input(Q({repoId:HT})).output(aT(JT)),q.input(Q({repoId:HT,path:X()})).output(Q({ok:Z(),worktrees:aT(JT)})),q.input(Q({repoId:HT})).output(Q({branch:X().optional(),headSha:$,stagedCount:Xw(),unstagedCount:Xw(),untrackedCount:Xw(),conflictedCount:Xw()})),q.input(Q({repoId:HT})).output(eE),q.input(Q({repoId:HT})).output(aT(qT)),q.input(Q({repoId:HT,stashSha:$})).output(Q({sha:$,changedPaths:aT(ZT),additions:Xw(),deletions:Xw()})),q.input(Q({repoId:HT,stashSha:$,path:X(),oldPath:X().optional()})).output(Q({sha:$,path:X(),patchText:X(),isBinary:Z(),imageDiff:aE.optional()})),q.input(uT(`action`,[Q({repoId:HT,action:vT(`create`),message:X().optional()}),Q({repoId:HT,action:vT(`apply`),stashSha:$}),Q({repoId:HT,action:vT(`drop`),stashSha:$})])).output(Q({ok:Z(),message:X(),stashes:aT(qT),changes:eE})),q.input(Q({repoId:HT,action:nE,paths:aT(X())})).output(eE),q.input(Q({repoId:HT,path:X(),fileName:X().min(1).max(255),command:X().min(1).max(1e3)})).output(oy(tE)),q.input(Q({repoId:HT,path:X(),area:rE,oldPath:X().optional()})).output(Q({path:X(),area:rE,patchText:X(),isBinary:Z(),imageDiff:aE.optional()})),q.input(Q({repoId:HT,message:X().min(1),noVerify:Z().optional(),amend:Z().optional()})).output(Q({ok:Z(),headSha:$,changes:eE})),q.input(Q({repoId:HT,scope:Q({kind:gT([`all`,`ref`,`range`,`path`]),value:X().optional(),secondaryValue:X().optional()}),anchor:Q({kind:gT([`head`,`ref`,`sha`,`row`,`mergeBase`]),value:X().optional(),secondaryValue:X().optional()}),beforeRows:Xw(),afterRows:Xw(),firstParent:Z(),topoOrder:Z()})).output(Q({projectionId:X(),rows:aT(YT),edges:aT(XT),checkpointsKnownUntilRow:Xw(),totalRowsKnown:Xw().optional(),hasMoreBefore:Z(),hasMoreAfter:Z(),indexingState:gT([`cold`,`warming`,`warm`])})),q.input(Q({repoId:HT,sha:$})).output(Q({sha:$,parents:aT($),authorName:X(),authorEmail:X(),authorUnix:Xw(),committerName:X(),committerEmail:X(),committerUnix:Xw(),subject:X(),body:X(),treeSha:X(),refs:aT(X()),isPushed:Z()})),q.input(Q({repoId:HT,sha:$})).output(Q({avatarUrl:X().nullable()})),q.input(Q({repoId:HT,sha:$})).output(Q({sha:$,changedPaths:aT(ZT),additions:Xw(),deletions:Xw(),patchText:X().optional()})),q.input(Q({repoId:HT,sha:$,path:X(),oldPath:X().optional()})).output(Q({sha:$,path:X(),patchText:X(),isBinary:Z(),imageDiff:aE.optional()})),q.input(Q({repoId:HT,sha:$})).output(aT(Q({number:Xw(),title:X(),url:X(),state:X(),mergedAt:X().nullable()}))),q.input(Q({repoId:HT,sha:$})).output(Q({state:gT([`success`,`pending`,`failure`,`error`,`neutral`,`none`]),runs:aT(Q({name:X(),description:X().optional(),state:gT([`success`,`pending`,`failure`,`error`,`neutral`]),url:X().optional()}))})),q.input(Q({repoId:HT,shas:aT($)})).output(mT(X(),Q({state:gT([`success`,`pending`,`failure`,`error`,`neutral`,`none`]),runs:aT(Q({name:X(),description:X().optional(),state:gT([`success`,`pending`,`failure`,`error`,`neutral`]),url:X().optional()}))}))),q.input(Q({repoId:HT,sha:$,action:oE,message:X().optional()})).output(Q({ok:Z(),message:X(),headSha:$})),q.input(Q({repoId:HT,refName:X()})).output(Q({mergeable:Z(),reason:sE.optional(),sourceRefName:X(),sourceSha:$.optional(),targetRefName:X().optional(),targetSha:$.optional(),requiresFetch:Z()})),q.input(Q({repoId:HT,refName:X()})).output(Q({ok:Z(),message:X(),headSha:$})),q.input(Q({repoId:HT,refName:X()})).output(Q({ok:Z(),message:X(),headSha:$})),q.input(Q({repoId:HT,operation:cE})).output(Q({ok:Z(),message:X(),headSha:$,changes:eE})),q.input(Q({repoId:HT,operation:cE})).output(Q({ok:Z(),message:X(),headSha:$,changes:eE})),q.input(Q({repoId:HT,action:lE,refName:X(),sha:$,force:Z().optional(),remote:X().optional()})).output(Q({ok:Z(),message:X()})),q.input(Q({repoId:HT,ref:X().optional(),maxCount:Xw().optional()})).output(Q({refName:X(),entries:aT(dE)})),q.input(Q({})).output(Q({sessions:aT(hE),capabilities:gE})),q.input(Q({pid:Xw(),cwd:X().optional()})).output(Q({ok:Z(),method:X().optional(),error:X().optional()})),q.input(Q({})).output(Q({ok:Z(),error:X().optional()}));function _E(e,t,n){return{id:e,fileName:t,command:n}}var vE=[_E(`npm`,`package-lock.json`,`npm install`),_E(`npm-shrinkwrap`,`npm-shrinkwrap.json`,`npm install`),_E(`pnpm`,`pnpm-lock.yaml`,`pnpm install`),_E(`yarn`,`yarn.lock`,`yarn install`),_E(`bun-text`,`bun.lock`,`bun install`),_E(`bun-binary`,`bun.lockb`,`bun install`),_E(`python-poetry`,`poetry.lock`,`poetry lock --regenerate`),_E(`python-uv`,`uv.lock`,`uv sync`),_E(`python-pipenv`,`Pipfile.lock`,`pipenv lock`),_E(`ruby-bundler`,`Gemfile.lock`,`bundle install`),_E(`go-modules`,`go.sum`,`go mod tidy`),_E(`go-workspace`,`go.work.sum`,`go work sync`),_E(`rust-cargo`,`Cargo.lock`,`cargo generate-lockfile`),_E(`php-composer`,`composer.lock`,`composer update --lock`),_E(`swift-package-manager`,`Package.resolved`,`swift package resolve`),_E(`cocoapods`,`Podfile.lock`,`pod install`),_E(`dart-pub`,`pubspec.lock`,`dart pub get`),_E(`elixir-mix`,`mix.lock`,`mix deps.get`),_E(`dotnet-nuget`,`packages.lock.json`,`dotnet restore --force-evaluate`),_E(`gradle`,`gradle.lockfile`,`gradle dependencies --write-locks`)],yE=`ingit.conflictResolvers`,bE=1,xE=100,SE=100,CE=255,wE=1e3;function TE(e){return e.length>0&&e.length<=CE&&e!==`.`&&e!==`..`&&!e.includes(`/`)&&!e.includes(`\\`)}function EE(e){return e.map(e=>({...e}))}function DE(e){return JSON.stringify({version:bE,resolvers:e})}function OE(e){if(e===null)return null;try{let t=JSON.parse(e);if(!t||typeof t!=`object`)return null;let{version:n,resolvers:r}=t;if(n!==bE||!Array.isArray(r)||r.length>xE)return null;let i=new Set,a=new Set,o=[];for(let e of r){if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.id==`string`?t.id.trim():``,r=typeof t.fileName==`string`?t.fileName.trim():``,s=typeof t.command==`string`?t.command.trim():``;if(!n||n.length>SE||i.has(n)||!TE(r)||a.has(r)||!s||s.length>wE||!Kv(s))return null;i.add(n),a.add(r),o.push({id:n,fileName:r,command:s})}return o}catch{return null}}function kE(e,t){let n=e.replaceAll(`\\`,`/`).split(`/`).at(-1);return n?t.find(e=>e.fileName===n)??null:null}function AE(){try{return typeof window>`u`?null:window.localStorage}catch{return null}}function jE(){let e=AE();if(!e)return EE(vE);try{return OE(e.getItem(yE))??EE(vE)}catch{return EE(vE)}}var ME=jE(),NE=new Set;function PE(e){ME=e;for(let e of NE)e()}function FE(e){e.key!==null&&e.key!==yE||PE(OE(e.newValue)??EE(vE))}function IE(e){let t=NE.size===0;return NE.add(e),t&&typeof window<`u`&&window.addEventListener(`storage`,FE),()=>{NE.delete(e),NE.size===0&&typeof window<`u`&&window.removeEventListener(`storage`,FE)}}function LE(){return(0,b.useSyncExternalStore)(IE,()=>ME,()=>vE)}function RE(e){let t=OE(DE(e));if(!t)return!1;let n=AE();if(!n)return!1;try{n.setItem(yE,DE(t))}catch{return!1}return PE(t),!0}function zE(){let e=AE();if(!e)return!1;try{e.removeItem(yE)}catch{return!1}return PE(EE(vE)),!0}var BE={A:`#a6e3a1`,M:`#f9e2af`,D:`#f38ba8`,R:`#cba6f7`,C:`#94e2d5`,T:`#89b4fa`,U:`#fab387`,"?":`#94e2d5`},VE={A:`Added`,M:`Modified`,D:`Deleted`,R:`Renamed`,C:`Copied`,T:`Type changed`,U:`Conflicted`,"?":`Untracked`};function HE({file:e,area:t,actionLabel:n,onAction:r,onDiscard:i,resolvingLockfile:a,onInstallAndResolve:o}){let[s,c]=(0,b.useState)(!1),l=I(e=>e.loadWorktreeFileDiff),u=I(n=>n.worktreeFileDiffs[ii(t,e.path)]),d=e.path.lastIndexOf(`/`),f=d>=0?e.path.slice(0,d+1):``,p=d>=0?e.path.slice(d+1):e.path,m=BE[e.status]??`#cdd6f4`;return(0,b.useEffect)(()=>{s&&!u&&l(e,t)},[s,u,e,t,l]),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`4px 6px`,borderRadius:6,cursor:`pointer`},onClick:()=>{let n=!s;c(n),n&&l(e,t)},onMouseEnter:e=>{e.currentTarget.style.background=`#1e1e2e`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,y.jsx)(`span`,{style:{flexShrink:0,width:10,fontSize:9,color:`#6c7086`,userSelect:`none`},children:s?`▼`:`▶`}),(0,y.jsx)(`span`,{title:VE[e.status]??e.status,style:{flexShrink:0,width:16,height:16,borderRadius:3,background:m+`22`,color:m,fontSize:10,fontWeight:700,fontFamily:`monospace`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:e.status}),(0,y.jsx)(`span`,{title:e.path,style:{flex:1,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontSize:12,fontFamily:`monospace`,direction:`rtl`,textAlign:`left`},children:(0,y.jsxs)(`bdi`,{dir:`ltr`,children:[(0,y.jsx)(`span`,{style:{color:`#6c7086`},children:f}),(0,y.jsx)(`span`,{style:{color:`#cdd6f4`},children:p})]})}),(0,y.jsxs)(`span`,{onClick:e=>e.stopPropagation(),style:{display:`flex`,gap:4},children:[o&&(0,y.jsx)(of,{label:`run install & resolve`,tone:`success`,size:`compact`,loading:a,onClick:o}),(0,y.jsx)(of,{label:n,tone:`neutral`,size:`compact`,variant:`ghost`,iconOnly:!0,onClick:r}),(0,y.jsx)(of,{label:`Discard`,tone:`danger`,size:`compact`,variant:`ghost`,iconOnly:!0,onClick:i})]})]}),s&&u&&(0,y.jsx)(kv,{entry:u,path:e.path})]})}function UE({title:e,files:t,area:n,bulkLabel:r,bulkTone:i=`neutral`,bulkDisabled:a=!1,onBulk:o,rowActionLabel:s,onRowAction:c,onDiscard:l,resolvingLockfilePath:u,conflictResolvers:d=[],onInstallAndResolve:f}){return t.length===0?null:(0,y.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 6px 4px`},children:[(0,y.jsxs)(`span`,{style:{fontSize:11,fontWeight:700,letterSpacing:.4,textTransform:`uppercase`,color:`#a6adc8`},children:[e,` `,(0,y.jsxs)(`span`,{style:{color:`#6c7086`},children:[`(`,t.length,`)`]})]}),r&&o&&(0,y.jsx)(of,{label:r,tone:i,size:`compact`,disabled:a,onClick:o})]}),t.map(e=>{let t=e.status===`U`?kE(e.path,d):null;return(0,y.jsx)(HE,{file:e,area:n,actionLabel:typeof s==`function`?s(e):s,onAction:()=>c(e),onDiscard:()=>l(e),resolvingLockfile:u===e.path,onInstallAndResolve:f&&t?()=>f(e,t):void 0},`${e.status}:${e.path}`)})]})}function WE({stagedCount:e,headSha:t,branch:n,amendable:r}){let i=I(e=>e.performCommit),a=I(e=>e.performRefAction),o=I(e=>e.runStageAction),s=I(e=>e.showError),c=I(e=>e.pendingMutation),l=I(e=>e.repoId),u=I(e=>e.worktreeCommitMessage),d=I(e=>e.setWorktreeCommitMessage),[f,p]=(0,b.useState)(()=>{try{return localStorage.getItem(`commitNoVerify`)===`true`}catch{return!1}}),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(!1),[v,x]=(0,b.useState)(()=>{try{return localStorage.getItem(`commitSubmitAction`)===`commit-and-push`?`commit-and-push`:`commit`}catch{return`commit`}}),[S,C]=(0,b.useState)(!1),[w,T]=(0,b.useState)(!1),ee=(0,b.useRef)(null),[E,te]=(0,b.useState)(``),ne=m&&r;(0,b.useEffect)(()=>{if(!S)return;let e=e=>{ee.current?.contains(e.target)||C(!1)},t=e=>{e.key===`Escape`&&C(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[S]);let re=e=>{try{localStorage.setItem(`commitNoVerify`,String(e))}catch{}p(e)},ie=async e=>{if(h(e),e){_(!0);let e=await o(`stage-all`,[]);if(_(!1),!e){h(!1);return}if(u.trim().length===0&&l&&t)try{let e=await hn(l,t),n=e.body?`${e.subject}\n\n${e.body}`:e.subject;I.getState().worktreeCommitMessage.trim().length===0&&(d(n),te(n))}catch{}}else u===E&&(d(``),te(``))},ae=e>0&&u.trim().length>0&&!g&&!c,oe=ae&&(v===`commit`||!!n),se=e=>{try{localStorage.setItem(`commitSubmitAction`,e)}catch{}x(e),C(!1)},ce=async()=>{if(!oe||!await i(u.trim(),f,ne)||(d(``),te(``),h(!1),v!==`commit-and-push`||!n))return;let e=I.getState(),r=e.refs.find(e=>e.kind===`head`&&e.isCurrent),o=r?.shortName??n,c=r?.targetSha??e.worktreeChanges?.headSha??t;if(!c){s(`Push failed`,`Could not determine the committed revision to push`);return}T(!0);try{await a(`push`,o,c)}catch(e){e&&typeof e==`object`&&e.code===`CONFLICT`?s(`Push rejected`,e,{label:`Force push`,run:()=>{a(`push`,o,c,!0).catch(e=>s(`Force push failed`,e))}}):s(`Push failed`,e)}finally{T(!1)}},D=g?`Staging…`:w?`Pushing…`:c?ne?`Amending…`:`Committing…`:`${ne?`Amend`:`Commit`}${v===`commit-and-push`?` & push`:``}${e>0?` (${e})`:``}`;return(0,y.jsxs)(`div`,{style:{borderBottom:`1px solid #313244`,padding:`10px 12px`,display:`flex`,flexDirection:`column`,gap:8,flexShrink:0},children:[(0,y.jsx)(`textarea`,{value:u,onChange:e=>d(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),ce())},placeholder:ne?`Amend commit message`:e>0?`Commit message`:`Stage files to commit`,rows:3,style:{resize:`vertical`,minHeight:54,background:`#11111b`,border:`1px solid #313244`,borderRadius:6,color:`#cdd6f4`,fontSize:12,fontFamily:`inherit`,padding:`8px 10px`,outline:`none`},onFocus:e=>{e.currentTarget.style.borderColor=`#89b4fa`},onBlur:e=>{e.currentTarget.style.borderColor=`#313244`}}),(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:8},children:[(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,minWidth:0},children:[r&&(0,y.jsxs)(`label`,{title:`Replace the previous commit (git commit --amend) instead of creating a new one`,style:{display:`flex`,alignItems:`center`,gap:6,fontSize:11,color:`#a6adc8`,cursor:`pointer`,userSelect:`none`},children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:m,disabled:g,onChange:e=>void ie(e.target.checked),style:{accentColor:`#cba6f7`,cursor:g?`default`:`pointer`}}),`Amend`]}),(0,y.jsxs)(`label`,{title:`Commit with --no-verify (skips pre-commit and commit-msg hooks)`,style:{display:`flex`,alignItems:`center`,gap:6,fontSize:11,color:`#a6adc8`,cursor:`pointer`,userSelect:`none`},children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:f,onChange:e=>re(e.target.checked),style:{accentColor:`#fab387`,cursor:`pointer`}}),`Skip git hooks`]})]}),(0,y.jsxs)(`div`,{ref:ee,style:{display:`flex`,position:`relative`,flexShrink:0},children:[(0,y.jsx)(`button`,{onClick:()=>void ce(),disabled:!oe,title:v===`commit-and-push`&&!n?`Check out a branch before committing and pushing`:void 0,style:{background:oe?`#a6e3a1`:`#313244`,color:oe?`#11111b`:`#6c7086`,border:`none`,borderRadius:`6px 0 0 6px`,fontSize:12,fontWeight:700,padding:`6px 12px 6px 14px`,cursor:oe?`pointer`:`default`,fontFamily:`inherit`,whiteSpace:`nowrap`},children:D}),(0,y.jsx)(`button`,{type:`button`,"aria-label":`Choose commit action`,"aria-haspopup":`menu`,"aria-expanded":S,disabled:g||c||w,onClick:()=>C(e=>!e),style:{width:28,background:ae?`#a6e3a1`:`#313244`,color:ae?`#11111b`:`#6c7086`,border:`none`,borderLeft:`1px solid ${ae?`#11111b33`:`#45475a`}`,borderRadius:`0 6px 6px 0`,cursor:g||c||w?`default`:`pointer`,fontFamily:`inherit`,fontSize:10,fontWeight:700},children:`▼`}),S&&(0,y.jsx)(`div`,{role:`menu`,"aria-label":`Commit action`,style:{position:`absolute`,right:0,bottom:`calc(100% + 6px)`,zIndex:50,minWidth:154,padding:4,border:`1px solid #45475a`,borderRadius:7,background:`#1e1e2e`,boxShadow:`0 8px 24px #00000066`},children:[[`commit`,`Commit`],[`commit-and-push`,`Commit & push`]].map(([e,t])=>(0,y.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":v===e,onClick:()=>se(e),style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,padding:`7px 9px`,border:`none`,borderRadius:5,background:v===e?`#313244`:`transparent`,color:`#cdd6f4`,cursor:`pointer`,fontFamily:`inherit`,fontSize:12,textAlign:`left`,whiteSpace:`nowrap`},children:[(0,y.jsx)(`span`,{style:{width:12,color:`#a6e3a1`},children:v===e?`✓`:``}),t]},e))})]})]})]})}function GE({operation:e,conflictedCount:t}){let n=I(e=>e.abortInProgressOperation),r=I(e=>e.continueInProgressOperation),i=I(e=>e.pendingMutation),a=e===`rebase`?`Rebase`:`Merge`,o=t>0?`${a} conflict`:`${a} in progress`,s=t>0?`${t} conflicted file${t===1?``:`s`} — resolve and stage them, then continue`:`All conflicts resolved — continue the ${e} to finish.`,c=!i&&t===0;return(0,y.jsxs)(`div`,{style:{border:`1px solid #8b3a4a`,background:`#5c243033`,borderRadius:7,padding:`10px 10px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12},children:[(0,y.jsxs)(`div`,{style:{minWidth:0,display:`flex`,flexDirection:`column`,gap:2},children:[(0,y.jsx)(`span`,{style:{color:`#f5a6b8`,fontSize:13,fontWeight:700},children:o}),(0,y.jsx)(`span`,{style:{color:`#a6adc8`,fontSize:11},children:s})]}),(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0},children:[(0,y.jsx)(`span`,{title:c?void 0:t>0?`Stage all conflicted files first`:void 0,children:(0,y.jsx)(of,{label:i?`Working…`:`Continue ${a}`,tone:`success`,onClick:()=>void r(e),disabled:!c})}),(0,y.jsx)(of,{label:i?`Aborting…`:`Abort ${a}`,tone:`danger`,onClick:()=>void n(e),disabled:i})]})]})}function KE(){let e=I(e=>e.worktreeChanges),t=I(e=>e.runStageAction),n=I(e=>e.createStash),r=I(e=>e.pendingMutation),i=I(e=>e.repoId),a=LE(),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(null),[u,d]=(0,b.useState)(null),f=e?.staged??[],p=e?.unstaged??[],m=(0,b.useMemo)(()=>new Set([...f,...p].map(e=>e.path)).size,[f,p]),h=e?.mergeHeadShas?.length?`merge`:e?.rebaseHeadSha?`rebase`:null,g=(0,b.useMemo)(()=>new Set(p.filter(e=>e.status===`U`).map(e=>e.path)).size,[p]),_=e=>{l({title:`Discard file changes?`,message:`Discard all staged and unstaged changes to “${e.path}”? This cannot be undone.`,paths:e.oldPath?[e.path,e.oldPath]:[e.path],all:!1})},v=()=>{l({title:`Discard all changes?`,message:`Permanently discard changes in ${m} file${m===1?``:`s`}, including untracked files? This cannot be undone.`,paths:[],all:!0})},x=()=>{let e=c;l(null),e&&t(e.all?`discard-all`:`discard`,e.paths)},S=async(e,t)=>{if(!i||u?.running)return;d({path:e.path,command:``,output:``,running:!0});let n=e=>{if(e.type===`start`){d(t=>t&&{...t,command:e.command});return}if(e.type===`output`){d(t=>t&&{...t,output:t.output+e.text});return}if(e.ok&&e.changes){I.setState({worktreeChanges:e.changes,worktreeFileDiffs:{}}),d(null);return}let t=e.error??`Package manager install failed`;d(e=>e&&{...e,running:!1,error:t,output:e.output.endsWith(`
|
|
677
|
-
`)?`${e.output}\n${t}\n`:`${e.output}\n\n${t}\n`})};try{let r=await dn(i,e.path,t.fileName,t.command);for(;;){let e=await r.next();if(e.done)break;n(e.value)}}catch(e){let t=e instanceof Error?e.message:String(e);d(e=>e&&{...e,running:!1,error:t,output:`${e.output}\n\n${t}\n`})}};return(0,y.jsxs)(`div`,{"data-testid":`working-tree-detail`,style:{position:`absolute`,right:0,bottom:0,zIndex:40,width:480,height:`fit-content`,maxHeight:`100%`,borderLeft:`1px solid #313244`,borderTop:`1px solid #313244`,background:`#181825`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,y.jsx)(Sp,{open:o,title:`Stash changes`,label:`Message (optional)`,placeholder:`Describe these changes`,confirmLabel:`Stash`,allowEmpty:!0,onSubmit:e=>{s(!1),n(e||void 0)},onClose:()=>s(!1)}),(0,y.jsx)(Gv,{state:u,onClose:()=>d(null)}),(0,y.jsx)(Cp,{open:!!c,title:c?.title??``,message:c?.message??``,confirmLabel:`Discard`,onConfirm:x,onClose:()=>l(null)}),(0,y.jsxs)(`div`,{style:{padding:`14px 16px 10px`,borderBottom:`1px solid #313244`},children:[(0,y.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8,minWidth:0},children:[(0,y.jsx)(`span`,{style:{fontSize:14,fontWeight:700,color:`#cdd6f4`,flexShrink:0},children:`Working tree`}),e?.branch&&(0,y.jsxs)(`span`,{style:{fontSize:12,color:`#89b4fa`,fontFamily:`monospace`,overflow:`hidden`,textOverflow:`ellipsis`},children:[`⎇ `,e.branch]})]})}),(0,y.jsx)(`div`,{style:{fontSize:11,color:`#6c7086`,marginTop:2},children:m===0?`No changes`:`${m} changed file${m===1?``:`s`}`})]}),(0,y.jsx)(WE,{stagedCount:f.length,headSha:e?.headSha,branch:e?.branch,amendable:!h&&!!e?.headSha}),(0,y.jsxs)(`div`,{style:{flex:`1 1 auto`,minHeight:0,overflow:`auto`,padding:`12px 10px`,display:`flex`,flexDirection:`column`,gap:16},children:[h&&(0,y.jsx)(GE,{operation:h,conflictedCount:g}),m===0?(0,y.jsx)(`div`,{style:{color:`#45475a`,fontSize:13,textAlign:`center`,marginTop:28},children:`Working tree clean`}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(UE,{title:`Staged`,files:f,area:`staged`,bulkLabel:`Unstage all`,bulkDisabled:r,onBulk:()=>t(`unstage-all`,[]),rowActionLabel:`Unstage`,onRowAction:e=>t(`unstage`,[e.path]),onDiscard:_}),(0,y.jsx)(UE,{title:`Changes`,files:p,area:`unstaged`,bulkLabel:`Stage all`,bulkTone:`success`,bulkDisabled:r,onBulk:()=>t(`stage-all`,[]),rowActionLabel:e=>e.status===`U`?`Mark resolved`:`Stage`,onRowAction:e=>t(`stage`,[e.path]),onDiscard:_,resolvingLockfilePath:u?.running?u.path:void 0,conflictResolvers:a,onInstallAndResolve:(e,t)=>void S(e,t)})]})]}),m>0&&(0,y.jsxs)(`div`,{style:{flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:8,padding:`10px 12px`,borderTop:`1px solid #313244`},children:[(0,y.jsx)(of,{label:`Stash all`,tone:`neutral`,disabled:r,onClick:()=>s(!0)}),(0,y.jsx)(of,{label:`Discard all`,tone:`danger`,variant:`ghost`,disabled:r,onClick:v})]})]})}var qE={A:`#a6e3a1`,M:`#f9e2af`,D:`#f38ba8`,R:`#cba6f7`,C:`#94e2d5`,T:`#89b4fa`,U:`#fab387`};function JE(e){return new Date(e*1e3).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function YE({stash:e,diff:t,busy:n,onApply:r,onDrop:i,onNavigate:a}){let[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(!1),u=async()=>{if(!n){s(!0);try{await r(e.sha)}finally{s(!1)}}},d=async()=>{if(!n&&window.confirm(`Drop ${e.selector}? This permanently deletes the stashed changes.`)){l(!0);try{await i(e.sha)}finally{l(!1)}}};return(0,y.jsxs)(`div`,{style:{width:400,flexShrink:0,height:`100%`,background:`#181825`,borderLeft:`1px solid #313244`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,y.jsxs)(`div`,{style:{padding:`14px 16px 12px`,borderBottom:`1px solid #313244`,flexShrink:0},children:[(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,y.jsx)(`span`,{style:{padding:`2px 6px`,borderRadius:4,background:`#55323c`,color:`#f5c2e7`,fontFamily:`monospace`,fontSize:11,fontWeight:700},children:e.selector}),(0,y.jsx)(`span`,{style:{color:`#6c7086`,fontFamily:`monospace`,fontSize:10},children:e.sha.slice(0,10)})]}),(0,y.jsx)(`p`,{style:{margin:`0 0 11px`,color:`#cdd6f4`,fontSize:14,fontWeight:600,lineHeight:1.4},children:e.message||`Stashed changes`}),(0,y.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:3,fontSize:12},children:[(0,y.jsx)(`span`,{style:{minWidth:58,color:`#6c7086`},children:`Created`}),(0,y.jsx)(`span`,{style:{color:`#a6adc8`},children:JE(e.createdAt)})]}),(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12,fontSize:12},children:[(0,y.jsx)(`span`,{style:{minWidth:58,color:`#6c7086`},children:`Parent`}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>a(e.parentSha),title:`Navigate to ${e.parentSha}`,style:{padding:0,border:`none`,background:`none`,color:`#89b4fa`,fontFamily:`monospace`,fontSize:11,textDecoration:`underline`,textUnderlineOffset:2,cursor:`pointer`},children:e.parentSha.slice(0,12)})]}),(0,y.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,y.jsx)(`button`,{type:`button`,onClick:()=>void u(),disabled:n,style:{padding:`5px 11px`,border:`1px solid #b87b89`,borderRadius:4,background:n?`#55323c`:`#f5c2e7`,color:n?`#a77b86`:`#311f25`,fontSize:11,fontWeight:750,cursor:n?`default`:`pointer`},children:o?`Applying…`:`Apply stash`}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>void d(),disabled:n,style:{padding:`5px 11px`,border:`1px solid #f38ba866`,borderRadius:4,background:`#311f25`,color:n?`#8b626c`:`#f38ba8`,fontSize:11,fontWeight:700,cursor:n?`default`:`pointer`},children:c?`Dropping…`:`Drop stash`})]})]}),(0,y.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:t?t.changedPaths.length>0?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{style:{position:`sticky`,top:0,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,padding:`8px 16px 4px`,background:`#181825`,color:`#6c7086`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`,zIndex:1},children:[(0,y.jsxs)(`span`,{children:[`Stashed files (`,t.changedPaths.length,`)`]}),(0,y.jsxs)(`span`,{style:{display:`flex`,gap:10,fontSize:10,letterSpacing:`0.04em`},children:[(0,y.jsxs)(`span`,{style:{color:`#a6e3a1`},children:[`+`,t.additions]}),(0,y.jsxs)(`span`,{style:{color:`#f38ba8`},children:[`-`,t.deletions]})]})]}),t.changedPaths.map((t,n)=>(0,y.jsx)(XE,{stashSha:e.sha,file:t},`${t.status}:${t.oldPath??``}:${t.path}:${n}`))]}):(0,y.jsx)(`div`,{style:{padding:16,color:`#6c7086`,fontSize:13},children:`No changed files`}):(0,y.jsx)(`div`,{style:{padding:16,color:`#6c7086`,fontSize:12},children:`Loading stashed files…`})})]})}function XE({stashSha:e,file:t}){let[n,r]=(0,b.useState)(!1),i=I(e=>e.loadStashFileDiff),a=I(n=>n.stashFileDiffs[oi(e,t.path)]),o=t.oldPath?`${t.oldPath} → ${t.path}`:t.path,s=qE[t.status]??`#cdd6f4`;return(0,b.useEffect)(()=>{n&&!a&&i(e,t)},[n,a,e,t,i]),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`button`,{type:`button`,onClick:()=>{let a=!n;r(a),a&&i(e,t)},style:{width:`100%`,display:`flex`,alignItems:`center`,gap:8,padding:`5px 16px`,border:`none`,borderBottom:`1px solid #1e1e2e`,background:`transparent`,color:`#cdd6f4`,fontFamily:`inherit`,fontSize:12,textAlign:`left`,cursor:`pointer`},children:[(0,y.jsx)(`span`,{style:{width:10,flexShrink:0,color:`#6c7086`,fontSize:9},children:n?`▼`:`▶`}),(0,y.jsx)(`span`,{style:{width:18,height:18,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,borderRadius:3,background:`${s}33`,color:s,fontSize:10,fontWeight:700},children:t.status}),(0,y.jsx)(`span`,{title:o,style:{flex:1,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:`#a6adc8`,fontFamily:`monospace`,fontSize:12},children:o})]}),n&&a&&(0,y.jsx)(kv,{entry:a,path:t.path})]})}function ZE({error:e,onDismiss:t}){let[n,r]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(!e)return;r(!1);let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),e?(0,y.jsx)(`div`,{onClick:t,style:{position:`fixed`,inset:0,background:`rgba(17, 17, 27, 0.75)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,padding:24},children:(0,y.jsxs)(`div`,{onClick:e=>e.stopPropagation(),role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`error-dialog-title`,style:{background:`#1e1e2e`,border:`1px solid #45475a`,borderRadius:8,boxShadow:`0 12px 40px rgba(0, 0, 0, 0.5)`,maxWidth:760,width:`100%`,maxHeight:`80vh`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`14px 18px`,borderBottom:`1px solid #313244`,background:`#181825`},children:[(0,y.jsx)(`span`,{id:`error-dialog-title`,style:{fontSize:14,fontWeight:600,color:`#f38ba8`},children:e.title}),(0,y.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Close`,style:{background:`transparent`,border:`none`,color:`#6c7086`,fontSize:20,lineHeight:1,cursor:`pointer`,padding:4},children:`×`})]}),(0,y.jsx)(`pre`,{style:{margin:0,padding:`16px 18px`,overflow:`auto`,flex:1,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`,fontSize:12.5,lineHeight:1.5,color:`#cdd6f4`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,userSelect:`text`},children:e.message}),(0,y.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,padding:`12px 18px`,borderTop:`1px solid #313244`,background:`#181825`},children:[(0,y.jsx)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(e.message),r(!0),setTimeout(()=>r(!1),1500)}catch{}},style:{background:`#313244`,color:`#cdd6f4`,border:`1px solid #45475a`,borderRadius:6,padding:`6px 14px`,fontSize:13,cursor:`pointer`},children:n?`Copied`:`Copy`}),e.action&&(0,y.jsx)(`button`,{type:`button`,onClick:()=>{e.action?.run(),t()},style:{background:`#f9e2af`,color:`#1e1e2e`,border:`none`,borderRadius:6,padding:`6px 14px`,fontSize:13,fontWeight:600,cursor:`pointer`},children:e.action.label}),(0,y.jsx)(`button`,{type:`button`,onClick:t,style:{background:`#89b4fa`,color:`#1e1e2e`,border:`none`,borderRadius:6,padding:`6px 14px`,fontSize:13,fontWeight:600,cursor:`pointer`},children:`Close`})]})]})}):null}function QE(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function $E(e){let t=new Set(e.map(e=>e.agent)).size>1?`Agents ×${e.length}`:`${e[0].agent[0].toUpperCase()}${e[0].agent.slice(1)} ×${e.length}`,n=e.filter(e=>e.busy).length;return n>0?`${t} · ${n} working`:t}function eD(){let{sessions:e,capabilities:t,focusingPid:n,installing:r,focus:i,install:a,canInstallWindowCalls:o}=ra(),[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(()=>{try{return localStorage.getItem(`agentSessionsShowAll`)===`true`}catch{return!1}}),d=e=>{try{localStorage.setItem(`agentSessionsShowAll`,String(e))}catch{}u(e)},[f,p]=(0,b.useState)(null),m=I(e=>e.repoPath),h=I(e=>e.openRepoByPath),g=(0,b.useRef)(null);(0,b.useEffect)(()=>{if(!s)return;let e=e=>{g.current&&!g.current.contains(e.target)&&c(!1)};return window.addEventListener(`pointerdown`,e),()=>window.removeEventListener(`pointerdown`,e)},[s]);let _=async e=>{await i(e)&&c(!1)},v=e=>{!e.gitRoot||e.gitRoot===m||(c(!1),h(e.gitRoot))};if(e.length===0)return null;let x=ea(e),S=m?x.filter(e=>e.gitRoot===m||e.cwd===m):[],C=x.filter(e=>!S.includes(e)),w=m===null||l?[...S,...C]:S,T=m!==null&&!l?C.length:0;return(0,y.jsxs)(`div`,{ref:g,style:{position:`relative`,flexShrink:0},children:[(0,y.jsxs)(`button`,{onClick:e=>{let t=e.currentTarget.getBoundingClientRect();p({top:t.bottom+4,right:window.innerWidth-t.right}),c(e=>!e)},title:`${e.length} agent session${e.length===1?``:`s`} running`,"aria-label":`Agent sessions`,style:{display:`flex`,alignItems:`center`,gap:5,padding:`4px 10px`,borderRadius:4,border:`1px solid ${S.length>0?`#a6e3a155`:`#313244`}`,background:S.length>0?`#a6e3a115`:`transparent`,color:S.length>0?`#a6e3a1`:`#6c7086`,fontSize:11,cursor:`pointer`},children:[[...new Set(e.map(e=>e.agent))].map(t=>(0,y.jsx)(oa,{agent:t,size:12,busy:e.some(e=>e.agent===t&&e.busy)},t)),$E(e)]}),s&&f&&(0,y.jsxs)(`div`,{style:{position:`fixed`,top:f.top,right:f.right,width:480,maxWidth:`calc(100vw - 16px)`,maxHeight:320,overflowY:`auto`,background:`#181825`,border:`1px solid #313244`,borderRadius:6,boxShadow:`0 8px 24px #00000088`,zIndex:100,padding:4},children:[o&&(0,y.jsxs)(`div`,{style:{padding:`8px 8px 10px`,borderBottom:`1px solid #313244`,marginBottom:4},children:[(0,y.jsx)(`div`,{style:{color:`#a6adc8`,fontSize:11,marginBottom:6,lineHeight:1.4},children:`Focusing terminal windows needs the “Activate Window By Title” GNOME\xA0Shell extension.`}),(0,y.jsx)(`button`,{onClick:()=>void a(),disabled:r,style:{padding:`4px 10px`,borderRadius:4,border:`1px solid #89b4fa55`,background:`#89b4fa20`,color:r?`#45475a`:`#89b4fa`,fontSize:11,cursor:r?`default`:`pointer`},children:r?`Waiting for GNOME confirmation…`:`Install extension`})]}),w.length===0&&(0,y.jsx)(`div`,{style:{padding:`8px`,color:`#585b70`,fontSize:11},children:`No agents running in this repository`}),w.map(e=>{let r=m!==null&&(e.gitRoot===m||e.cwd===m),i=e.gitRoot!==null&&!r,a=!e.focusable,o=a?e.kind===`terminal`?t?.displayServer===`wayland`?`Can't focus terminal windows on Wayland — install the 'Activate Window By Title' GNOME Shell extension`:`Can't focus terminal windows — install wmctrl`:`This session has no window to focus`:`Focus ${e.agent} window · ${na(e)} (pid ${e.pid})`;return(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,width:`100%`,borderRadius:4,background:`transparent`,opacity:n!==null&&n!==e.pid?.5:1},onMouseEnter:e=>{e.currentTarget.style.background=`#31324466`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,y.jsxs)(`button`,{onClick:()=>v(e),disabled:!i,title:r?`${e.cwd} · currently open repository`:e.gitRoot?`Switch to ${e.gitRoot}`:`${e.cwd} · not inside a Git repository`,style:{display:`flex`,alignItems:`center`,gap:8,flex:1,minWidth:0,padding:`6px 8px`,border:`none`,background:`transparent`,color:`#a6adc8`,fontSize:11,textAlign:`left`,cursor:i?`pointer`:`default`},children:[(0,y.jsx)(`span`,{style:{flexShrink:0,display:`inline-flex`},children:(0,y.jsx)(oa,{agent:e.agent,size:13,busy:e.busy??!1})}),(0,y.jsxs)(`span`,{style:{flexShrink:0,fontFamily:`monospace`},children:[QE(e.cwd),e.count>1?` ×${e.count}`:``]}),(0,y.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,flex:1,color:`#7f849c`,textAlign:`right`},children:e.title??na(e)}),e.busy&&(0,y.jsx)(`span`,{style:{flexShrink:0,color:`#f9e2af`,fontSize:10},children:`working`}),r&&(0,y.jsx)(`span`,{style:{flexShrink:0,color:`#a6e3a1`,fontSize:10},children:`this repo`})]}),(0,y.jsx)(`button`,{onClick:()=>!a&&void _(e),disabled:a||n!==null,title:o,style:{flexShrink:0,marginRight:6,padding:`3px 7px`,border:`1px solid #89b4fa55`,borderRadius:4,background:`#89b4fa18`,color:a?`#45475a`:`#89b4fa`,fontSize:10,cursor:a||n!==null?`default`:`pointer`},children:n===e.pid?`Focusing…`:`Focus on window`})]},`${e.pid}:${e.cwd}`)}),T>0&&(0,y.jsxs)(`button`,{onClick:()=>d(!0),style:{display:`block`,width:`100%`,padding:`6px 8px`,marginTop:w.length>0?2:0,border:`none`,borderTop:w.length>0?`1px solid #313244`:`none`,background:`transparent`,color:`#6c7086`,fontSize:11,textAlign:`left`,cursor:`pointer`},children:[`▸ Show `,T,` agent`,T===1?``:`s`,` in other repositories`]}),m!==null&&l&&C.length>0&&(0,y.jsx)(`button`,{onClick:()=>d(!1),style:{display:`block`,width:`100%`,padding:`6px 8px`,border:`none`,borderTop:`1px solid #313244`,background:`transparent`,color:`#6c7086`,fontSize:11,textAlign:`left`,cursor:`pointer`},children:`▾ Hide agents in other repositories`})]})]})}var tD=`modulepreload`,nD=function(e){return`/`+e},rD={},iD=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=nD(t,n),t=s(t),t in rD)return;rD[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:tD,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},aD=(0,b.lazy)(async()=>({default:(await iD(()=>import(`./SettingsDialog-DFNU7q7m.js`),[])).SettingsDialog})),oD=`ingit`,sD=8;function cD(e){if(e.trim().length===0)return null;let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));if(t===-1)return{folder:`.`,prefix:e};let n=e.slice(t+1),r=e[t],i=e.slice(0,t);return/^[A-Za-z]:$/.test(i)&&(i+=r),i||=e.startsWith(`/`)||e.startsWith(`\\`)?r:`.`,{folder:i,prefix:n}}function lD(e){return e.replace(/[\\/]+$/,``).split(/[\\/]+/).at(-1)||e}function uD(e){if(!e)return 0;let t=new Set;for(let n of e.staged)t.add(n.path);for(let n of e.unstaged)t.add(n.path);return t.size}function dD(){let[e,t]=(0,b.useState)(!1),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)(!1),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)([]),[v,x]=(0,b.useState)(0),[S,C]=(0,b.useState)(null),w=(0,b.useRef)(null),{status:T,repoId:ee,repoPath:te,currentWorktreePath:ne,worktrees:re,recentRepos:ie,discoveredFolder:ae,discoveredRepos:oe,openError:se,selectedRemoteName:ce,errorDialog:D,dismissError:O,showError:le,openRepoByPath:ue,closeRepo:de,openFromUrl:fe,performRefAction:pe,showCommitMessages:k,setShowCommitMessages:me,viewMode:he,setViewMode:ge,worktreeChanges:_e,reloadFromServer:ve}=I(E(e=>({status:e.status,repoId:e.repoId,repoPath:e.repoPath,currentWorktreePath:e.currentWorktreePath,worktrees:e.worktrees,recentRepos:e.recentRepos,discoveredFolder:e.discoveredFolder,discoveredRepos:e.discoveredRepos,openError:e.openError,selectedRemoteName:e.selectedRemoteName,errorDialog:e.errorDialog,dismissError:e.dismissError,showError:e.showError,openRepoByPath:e.openRepoByPath,closeRepo:e.closeRepo,openFromUrl:e.openFromUrl,performRefAction:e.performRefAction,showCommitMessages:e.showCommitMessages,setShowCommitMessages:e.setShowCommitMessages,viewMode:e.viewMode,setViewMode:e.setViewMode,worktreeChanges:e.worktreeChanges,reloadFromServer:e.reloadFromServer}))),ye=async()=>{if(!(i||!ce)){a(!0);try{await pe(`fetch`,``,``)}catch(e){le(`Fetch failed`,e)}finally{a(!1)}}};(0,b.useEffect)(()=>{let e=()=>fe();return window.addEventListener(`hashchange`,e),fe(),()=>window.removeEventListener(`hashchange`,e)},[fe]),(0,b.useEffect)(()=>{T!==`ready`||!ee||ye()},[ee,T]),(0,b.useEffect)(()=>{s(te??``),d(!1),p(!1)},[te]),(0,b.useEffect)(()=>{if(!c||!u){p(!1),h(!1);return}let e=cD(o);if(!e){_([]),p(!1),h(!1);return}let t=!1,n=window.setTimeout(()=>{h(!0),Kt(e.folder).then(n=>{if(t)return;let r=e.prefix.toLowerCase(),i=n.entries.filter(e=>r.length===0||e.name.toLowerCase().startsWith(r)).slice(0,sD);_(i),x(0),p(i.length>0)}).catch(()=>{t||(_([]),p(!1))}).finally(()=>{t||h(!1)})},120);return()=>{t=!0,window.clearTimeout(n)}},[u,c,o]),(0,b.useEffect)(()=>{if(T!==`ready`||!te){document.title=oD;return}document.title=`${lD(te)} (${uD(_e)})`},[T,te,_e]),(0,b.useEffect)(()=>{let e=document.visibilityState===`hidden`?Date.now():null,t=()=>{e=Date.now()},n=()=>{document.visibilityState!==`hidden`&&(e!==null&&Date.now()-e>3e4&&ve(),e=null)},r=()=>{document.visibilityState===`hidden`?t():n()};return window.addEventListener(`blur`,t),window.addEventListener(`focus`,n),document.addEventListener(`visibilitychange`,r),()=>{window.removeEventListener(`blur`,t),window.removeEventListener(`focus`,n),document.removeEventListener(`visibilitychange`,r)}},[ve]);let be=e=>{e.preventDefault();let t=o.trim();if(!t||t===te){s(te??``),l(!1),e.currentTarget.querySelector(`input`)?.blur();return}ue(t)},xe=()=>{let e=w.current?.getBoundingClientRect();e&&C({top:e.bottom+4,left:e.left,width:e.width})},Se=e=>{s(e.path),d(!1),p(!1),x(0)},Ce=c&&S!==null&&(m||f&&g.length>0);return T===`no-repo`?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(fa,{onOpen:ue,error:se,recentRepos:ie,discoveredFolder:ae,discoveredRepos:oe}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>r(!0),title:`Open settings`,"aria-label":`Open settings`,style:{position:`fixed`,top:14,right:14,zIndex:20,padding:`6px 11px`,border:`1px solid #45475a`,borderRadius:6,background:`#181825`,color:`#a6adc8`,fontSize:11,fontWeight:700,cursor:`pointer`},children:`Settings`}),n&&(0,y.jsx)(b.Suspense,{fallback:null,children:(0,y.jsx)(aD,{open:!0,onClose:()=>r(!1)})}),(0,y.jsx)(ZE,{error:D,onDismiss:O})]}):T===`loading`?(0,y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,width:`100%`,background:`#1e1e2e`,flexDirection:`column`,gap:16},children:[(0,y.jsx)(mD,{}),(0,y.jsx)(`span`,{style:{color:`#6c7086`,fontSize:13},children:`Opening repository…`})]}):(0,y.jsxs)(`div`,{style:{position:`relative`,display:`flex`,height:`100%`,width:`100%`,overflow:`hidden`,background:`#1e1e2e`},children:[e&&(0,y.jsx)(fD,{onClose:()=>t(!1),onOpenSettings:()=>r(!0),settingsOpen:n}),(0,y.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,y.jsxs)(`div`,{style:{height:36,flexShrink:0,display:`flex`,alignItems:`center`,padding:`0 14px`,borderBottom:`1px solid #313244`,background:`#181825`,fontSize:12,color:`#6c7086`,gap:8,overflow:`hidden`},children:[!e&&(0,y.jsx)(`button`,{onClick:()=>t(!0),title:`Show refs`,"aria-label":`Show refs`,style:{width:24,height:20,flexShrink:0,padding:0,borderRadius:3,border:`1px solid #313244`,background:`#1e1e2e`,color:`#6c7086`,fontSize:13,lineHeight:`18px`,cursor:`pointer`},children:`☰`}),he===`history`&&(0,y.jsx)(`button`,{onClick:()=>me(!k),style:{flexShrink:0,padding:`4px 10px`,borderRadius:4,border:`1px solid ${k?`#89b4fa55`:`#313244`}`,background:k?`#89b4fa20`:`transparent`,color:k?`#89b4fa`:`#6c7086`,fontSize:11,cursor:`pointer`},title:k?`Hide commit messages`:`Show commit messages`,children:k?`Hide messages`:`Show messages`}),(0,y.jsxs)(`div`,{style:{flexShrink:0,display:`flex`,borderRadius:4,border:`1px solid #313244`,overflow:`hidden`},children:[(0,y.jsx)(`button`,{onClick:()=>ge(`history`),style:{padding:`4px 10px`,border:`none`,background:he===`history`?`#89b4fa20`:`transparent`,color:he===`history`?`#89b4fa`:`#6c7086`,fontSize:11,cursor:`pointer`},title:`Branch history graph`,children:`History`}),(0,y.jsx)(`button`,{onClick:()=>ge(`reflog`),style:{padding:`4px 10px`,border:`none`,borderLeft:`1px solid #313244`,background:he===`reflog`?`#f9e2af20`:`transparent`,color:he===`reflog`?`#f9e2af`:`#6c7086`,fontSize:11,cursor:`pointer`},title:`Reflog time machine — recover lost commits and see where HEAD has been`,children:`Time Machine`})]}),re.filter(e=>!e.bare).length>1&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`span`,{style:{color:`#45475a`,marginLeft:8},children:`worktree`}),(0,y.jsx)(`select`,{value:ne??``,onChange:e=>{e.target.value&&e.target.value!==ne&&ue(e.target.value)},title:`Switch linked worktree`,"aria-label":`Current linked worktree`,style:{maxWidth:220,flexShrink:1,minWidth:90,padding:`3px 5px`,border:`1px solid #313244`,borderRadius:4,outline:`none`,background:`#1e1e2e`,color:`#a6adc8`,fontFamily:`monospace`,fontSize:11},children:re.filter(e=>!e.bare).map(e=>(0,y.jsxs)(`option`,{value:e.path,disabled:e.prunable,children:[lD(e.path),` — `,e.branchShortName??(e.detached?`detached ${e.headSha?.slice(0,8)??``}`:`no branch`)]},e.path))})]}),(0,y.jsx)(`span`,{style:{color:`#45475a`,marginLeft:8},children:`repo`}),(0,y.jsx)(`form`,{onSubmit:be,style:{display:`flex`,flex:1,minWidth:0},children:(0,y.jsx)(`input`,{ref:w,value:o,onChange:e=>{s(e.target.value),d(!0),xe()},onFocus:e=>{l(!0),d(!1),xe(),e.currentTarget.select()},onBlur:()=>{l(!1),d(!1),p(!1)},onKeyDown:e=>{if(f&&g.length>0){if(e.key===`ArrowDown`){e.preventDefault(),x(e=>(e+1)%g.length);return}if(e.key===`ArrowUp`){e.preventDefault(),x(e=>(e-1+g.length)%g.length);return}if(e.key===`Tab`||e.key===`Enter`){e.preventDefault(),Se(g[v]);return}if(e.key===`Escape`){e.preventDefault(),d(!1),p(!1);return}}e.key===`Escape`&&(s(te??``),e.currentTarget.blur())},"aria-label":`Repository path`,title:`Type a repository path and press Enter to open it`,spellCheck:!1,autoComplete:`off`,role:`combobox`,"aria-expanded":Ce,"aria-controls":`header-repo-path-suggestions`,"aria-autocomplete":`list`,style:{width:`100%`,minWidth:0,padding:`3px 5px`,border:`1px solid ${c?`#89b4fa88`:`transparent`}`,borderRadius:3,outline:`none`,background:c?`#1e1e2e`:`transparent`,color:`#a6adc8`,fontFamily:`monospace`,fontSize:12}})}),Ce&&(0,y.jsx)(`div`,{id:`header-repo-path-suggestions`,role:`listbox`,style:{position:`fixed`,zIndex:100,top:S.top,left:S.left,width:S.width,maxHeight:238,overflowY:`auto`,padding:4,border:`1px solid #3d4253`,borderRadius:5,background:`#181825`,boxShadow:`0 8px 24px #00000088`},children:m&&g.length===0?(0,y.jsx)(`div`,{style:{padding:`7px 8px`,color:`#7f849c`,fontSize:11},children:`Loading…`}):g.map((e,t)=>(0,y.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===v,onMouseEnter:()=>x(t),onMouseDown:t=>{t.preventDefault(),Se(e)},style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,minWidth:0,padding:`6px 8px`,border:`none`,borderRadius:4,background:t===v?`#313244`:`transparent`,color:`#cdd6f4`,fontSize:11,textAlign:`left`,cursor:`pointer`},children:[(0,y.jsx)(`span`,{style:{flex:1,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontFamily:`monospace`},children:e.path}),e.isGitRepo&&(0,y.jsx)(`span`,{style:{flexShrink:0,color:`#a6e3a1`,fontSize:10},children:`repo`})]},e.path))}),(0,y.jsx)(eD,{}),(0,y.jsxs)(`button`,{onClick:ye,disabled:i||!ce,title:ce?`Fetch from ${ce}`:`No remote selected`,"aria-label":ce?`Fetch from ${ce}`:`No remote selected`,style:{flexShrink:0,display:`flex`,alignItems:`center`,gap:5,padding:`4px 10px`,borderRadius:4,border:`1px solid #313244`,background:`transparent`,color:i||!ce?`#45475a`:`#6c7086`,fontSize:11,cursor:i||!ce?`default`:`pointer`},children:[(0,y.jsx)(`span`,{style:{display:`inline-block`,animation:i?`spin 0.7s linear infinite`:`none`},children:`⟳`}),i?`Fetching…`:`Fetch`,(0,y.jsx)(`style`,{children:`@keyframes spin { to { transform: rotate(360deg); } }`})]}),(0,y.jsx)(`button`,{onClick:de,title:`Close repository`,"aria-label":`Close repository`,style:{flexShrink:0,padding:`4px 10px`,borderRadius:4,border:`1px solid #313244`,background:`transparent`,color:`#6c7086`,fontSize:11,cursor:`pointer`},children:`Close`})]}),he===`reflog`?(0,y.jsx)(eg,{}):(0,y.jsx)(Ph,{})]}),(0,y.jsx)(pD,{}),(0,y.jsx)(ZE,{error:D,onDismiss:O}),n&&(0,y.jsx)(b.Suspense,{fallback:null,children:(0,y.jsx)(aD,{open:!0,onClose:()=>r(!1)})})]})}function fD({onClose:e,onOpenSettings:t,settingsOpen:n}){let{refs:r,remotes:i,selectedRemoteName:a,githubForkSuggestion:o,stashes:s,worktrees:c,selectRef:l,selectStash:u,navigateTo:d,openRepoByPath:f,removeWorktree:p,selectRemote:m,addRemote:h,removeRemote:g,selectedStashSha:_,selectedSha:v}=I(E(e=>({refs:e.refs,remotes:e.remotes,selectedRemoteName:e.selectedRemoteName,githubForkSuggestion:e.githubForkSuggestion,stashes:e.stashes,worktrees:e.worktrees,selectRef:e.selectRef,selectStash:e.selectStash,navigateTo:e.navigateTo,openRepoByPath:e.openRepoByPath,removeWorktree:e.removeWorktree,selectRemote:e.selectRemote,addRemote:e.addRemote,removeRemote:e.removeRemote,selectedStashSha:e.selectedStashSha,selectedSha:e.selectedSha})));return(0,y.jsx)(ha,{refs:r,remotes:i,selectedRemoteName:a,githubForkSuggestion:o,stashes:s,worktrees:c,onSelectRef:l,onSelectStash:u,onSelectStashParent:e=>{d(e)},onOpenWorktree:e=>{f(e)},onRemoveWorktree:p,onSelectRemote:m,onAddRemote:h,onRemoveRemote:g,selectedStashSha:_,selectedSha:v,onClose:e,onOpenSettings:t,settingsOpen:n})}function pD(){let{selectedStashSha:e,stashes:t,stashDiff:n,pendingMutation:r,applyStash:i,dropStash:a,navigateTo:o,worktreeSelected:s,selectedSha:c,historyWindow:l,commitDetail:u,commitDiff:d,commitPRs:f,commitAuthorAvatars:p,commitCIStatus:m,githubUrl:h,checkoutSha:g,showError:_}=I(E(e=>({selectedStashSha:e.selectedStashSha,stashes:e.stashes,stashDiff:e.stashDiff,pendingMutation:e.pendingMutation,applyStash:e.applyStash,dropStash:e.dropStash,navigateTo:e.navigateTo,worktreeSelected:e.worktreeSelected,selectedSha:e.selectedSha,historyWindow:e.historyWindow,commitDetail:e.commitDetail,commitDiff:e.commitDiff,commitPRs:e.commitPRs,commitAuthorAvatars:e.commitAuthorAvatars,commitCIStatus:e.commitCIStatus,githubUrl:e.githubUrl,checkoutSha:e.checkoutSha,showError:e.showError}))),v=e?t.find(t=>t.sha===e)??null:null,x=c?m[c]:void 0,S=x?.runs??[],C=(0,b.useMemo)(()=>{if(!c||!l)return null;let e=l.rows,t=new Map(e.map(e=>[e.sha,e]));for(let n of e){if(n.refNames.length===0)continue;let e=n.refNames.find(e=>!e.includes(`/`)),r=n.refNames.find(e=>e.includes(`/`)&&e!==`origin`&&e!==`HEAD`),i=e??r;if(!i)continue;let a=n.sha,o=new Set;for(;a&&!o.has(a);){if(a===c)return i;o.add(a);let e=t.get(a);if(!e||e.parentShas.length===0)break;a=e.parentShas[0]}}return null},[c,l]);return v?(0,y.jsx)(YE,{stash:v,diff:n,busy:r,onApply:i,onDrop:a,onNavigate:e=>{o(e)}}):s?(0,y.jsx)(KE,{}):(0,y.jsx)(Rv,{commit:u,diff:d,branchName:C,prs:f,authorAvatarUrl:u?p[u.sha]:void 0,ciState:x?.state,ciRuns:S,githubUrl:h,onNavigate:o,onCheckout:async e=>{try{await g(e)}catch(e){_(`Checkout failed`,e)}}})}function mD(){return(0,y.jsx)(`div`,{style:{width:32,height:32,border:`3px solid #313244`,borderTopColor:`#89b4fa`,borderRadius:`50%`,animation:`spin 0.7s linear infinite`},children:(0,y.jsx)(`style`,{children:`@keyframes spin { to { transform: rotate(360deg); } }`})})}(0,x.createRoot)(document.getElementById(`root`)).render((0,y.jsx)(b.StrictMode,{children:(0,y.jsx)(dD,{})}));export{c as S,Xf as _,DE as a,f as b,Tf as c,Rf as d,jf as f,zf as g,Zf as h,RE as i,$f as l,Qf as m,EE as n,LE as o,Mf as p,zE as r,Kv as s,vE as t,Df as u,Sf as v,u as x,I as y};
|