gitwarren 0.1.12 → 0.1.13
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/README.md +8 -1
- package/lib/gitwarren.cjs +51 -8
- package/package.json +2 -2
- package/web/assets/{index-DshVhmgX.js → index-D4qKqNi1.js} +2 -2
- package/web/assets/main-1gX2-1gC.js +115 -0
- package/web/index.html +1 -1
- package/web/assets/main-BlPq7_RT.js +0 -114
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import{c as Ch,r as VM,p as UM,h as NC,g as ZM,j as OC,k as AC,R as qM,m as Vx}from"./routes-DFoqib84.js";function GM(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Zy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zg={exports:{}},Yc={};var oS;function YM(){if(oS)return Yc;oS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var u in s)u!=="key"&&(l[u]=s[u])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:l}}return Yc.Fragment=t,Yc.jsx=n,Yc.jsxs=n,Yc}var sS;function KM(){return sS||(sS=1,zg.exports=YM()),zg.exports}var d=KM(),Ig={exports:{}},xt={};var lS;function XM(){if(lS)return xt;lS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function b(_){return _===null||typeof _!="object"?null:(_=y&&_[y]||_["@@iterator"],typeof _=="function"?_:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,E={};function C(_,Z,z){this.props=_,this.context=Z,this.refs=E,this.updater=z||S}C.prototype.isReactComponent={},C.prototype.setState=function(_,Z){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,Z,"setState")},C.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function T(){}T.prototype=C.prototype;function R(_,Z,z){this.props=_,this.context=Z,this.refs=E,this.updater=z||S}var N=R.prototype=new T;N.constructor=R,k(N,C.prototype),N.isPureReactComponent=!0;var I=Array.isArray;function M(){}var P={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function L(_,Z,z){var J=z.ref;return{$$typeof:e,type:_,key:Z,ref:J!==void 0?J:null,props:z}}function D(_,Z){return L(_.type,Z,_.props)}function U(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function q(_){var Z={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(z){return Z[z]})}var K=/\/+/g;function G(_,Z){return typeof _=="object"&&_!==null&&_.key!=null?q(""+_.key):Z.toString(36)}function B(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(M,M):(_.status="pending",_.then(function(Z){_.status==="pending"&&(_.status="fulfilled",_.value=Z)},function(Z){_.status==="pending"&&(_.status="rejected",_.reason=Z)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function F(_,Z,z,J,ne){var W=typeof _;(W==="undefined"||W==="boolean")&&(_=null);var fe=!1;if(_===null)fe=!0;else switch(W){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(_.$$typeof){case e:case t:fe=!0;break;case p:return fe=_._init,F(fe(_._payload),Z,z,J,ne)}}if(fe)return ne=ne(_),fe=J===""?"."+G(_,0):J,I(ne)?(z="",fe!=null&&(z=fe.replace(K,"$&/")+"/"),F(ne,Z,z,"",function(Se){return Se})):ne!=null&&(U(ne)&&(ne=D(ne,z+(ne.key==null||_&&_.key===ne.key?"":(""+ne.key).replace(K,"$&/")+"/")+fe)),Z.push(ne)),1;fe=0;var ie=J===""?".":J+":";if(I(_))for(var se=0;se<_.length;se++)J=_[se],W=ie+G(J,se),fe+=F(J,Z,z,W,ne);else if(se=b(_),typeof se=="function")for(_=se.call(_),se=0;!(J=_.next()).done;)J=J.value,W=ie+G(J,se++),fe+=F(J,Z,z,W,ne);else if(W==="object"){if(typeof _.then=="function")return F(B(_),Z,z,J,ne);throw Z=String(_),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return fe}function V(_,Z,z){if(_==null)return _;var J=[],ne=0;return F(_,J,"","",function(W){return Z.call(z,W,ne++)}),J}function Y(_){if(_._status===-1){var Z=_._result;Z=Z(),Z.then(function(z){(_._status===0||_._status===-1)&&(_._status=1,_._result=z)},function(z){(_._status===0||_._status===-1)&&(_._status=2,_._result=z)}),_._status===-1&&(_._status=0,_._result=Z)}if(_._status===1)return _._result.default;throw _._result}var te=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},O={map:V,forEach:function(_,Z,z){V(_,function(){Z.apply(this,arguments)},z)},count:function(_){var Z=0;return V(_,function(){Z++}),Z},toArray:function(_){return V(_,function(Z){return Z})||[]},only:function(_){if(!U(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return xt.Activity=g,xt.Children=O,xt.Component=C,xt.Fragment=n,xt.Profiler=s,xt.PureComponent=R,xt.StrictMode=i,xt.Suspense=m,xt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,xt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return P.H.useMemoCache(_)}},xt.cache=function(_){return function(){return _.apply(null,arguments)}},xt.cacheSignal=function(){return null},xt.cloneElement=function(_,Z,z){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var J=k({},_.props),ne=_.key;if(Z!=null)for(W in Z.key!==void 0&&(ne=""+Z.key),Z)!A.call(Z,W)||W==="key"||W==="__self"||W==="__source"||W==="ref"&&Z.ref===void 0||(J[W]=Z[W]);var W=arguments.length-2;if(W===1)J.children=z;else if(1<W){for(var fe=Array(W),ie=0;ie<W;ie++)fe[ie]=arguments[ie+2];J.children=fe}return L(_.type,ne,J)},xt.createContext=function(_){return _={$$typeof:c,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:l,_context:_},_},xt.createElement=function(_,Z,z){var J,ne={},W=null;if(Z!=null)for(J in Z.key!==void 0&&(W=""+Z.key),Z)A.call(Z,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ne[J]=Z[J]);var fe=arguments.length-2;if(fe===1)ne.children=z;else if(1<fe){for(var ie=Array(fe),se=0;se<fe;se++)ie[se]=arguments[se+2];ne.children=ie}if(_&&_.defaultProps)for(J in fe=_.defaultProps,fe)ne[J]===void 0&&(ne[J]=fe[J]);return L(_,W,ne)},xt.createRef=function(){return{current:null}},xt.forwardRef=function(_){return{$$typeof:u,render:_}},xt.isValidElement=U,xt.lazy=function(_){return{$$typeof:p,_payload:{_status:-1,_result:_},_init:Y}},xt.memo=function(_,Z){return{$$typeof:h,type:_,compare:Z===void 0?null:Z}},xt.startTransition=function(_){var Z=P.T,z={};P.T=z;try{var J=_(),ne=P.S;ne!==null&&ne(z,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(M,te)}catch(W){te(W)}finally{Z!==null&&z.types!==null&&(Z.types=z.types),P.T=Z}},xt.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},xt.use=function(_){return P.H.use(_)},xt.useActionState=function(_,Z,z){return P.H.useActionState(_,Z,z)},xt.useCallback=function(_,Z){return P.H.useCallback(_,Z)},xt.useContext=function(_){return P.H.useContext(_)},xt.useDebugValue=function(){},xt.useDeferredValue=function(_,Z){return P.H.useDeferredValue(_,Z)},xt.useEffect=function(_,Z){return P.H.useEffect(_,Z)},xt.useEffectEvent=function(_){return P.H.useEffectEvent(_)},xt.useId=function(){return P.H.useId()},xt.useImperativeHandle=function(_,Z,z){return P.H.useImperativeHandle(_,Z,z)},xt.useInsertionEffect=function(_,Z){return P.H.useInsertionEffect(_,Z)},xt.useLayoutEffect=function(_,Z){return P.H.useLayoutEffect(_,Z)},xt.useMemo=function(_,Z){return P.H.useMemo(_,Z)},xt.useOptimistic=function(_,Z){return P.H.useOptimistic(_,Z)},xt.useReducer=function(_,Z,z){return P.H.useReducer(_,Z,z)},xt.useRef=function(_){return P.H.useRef(_)},xt.useState=function(_){return P.H.useState(_)},xt.useSyncExternalStore=function(_,Z,z){return P.H.useSyncExternalStore(_,Z,z)},xt.useTransition=function(){return P.H.useTransition()},xt.version="19.2.8",xt}var aS;function Au(){return aS||(aS=1,Ig.exports=XM()),Ig.exports}var w=Au();const Th=Zy(w),JM=GM({__proto__:null,default:Th},[w]);var Dg={exports:{}},Kc={},_g={exports:{}},Pg={};var cS;function WM(){return cS||(cS=1,(function(e){function t(F,V){var Y=F.length;F.push(V);e:for(;0<Y;){var te=Y-1>>>1,O=F[te];if(0<s(O,V))F[te]=V,F[Y]=O,Y=te;else break e}}function n(F){return F.length===0?null:F[0]}function i(F){if(F.length===0)return null;var V=F[0],Y=F.pop();if(Y!==V){F[0]=Y;e:for(var te=0,O=F.length,_=O>>>1;te<_;){var Z=2*(te+1)-1,z=F[Z],J=Z+1,ne=F[J];if(0>s(z,Y))J<O&&0>s(ne,z)?(F[te]=ne,F[J]=Y,te=J):(F[te]=z,F[Z]=Y,te=Z);else if(J<O&&0>s(ne,Y))F[te]=ne,F[J]=Y,te=J;else break e}}return V}function s(F,V){var Y=F.sortIndex-V.sortIndex;return Y!==0?Y:F.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var m=[],h=[],p=1,g=null,y=3,b=!1,S=!1,k=!1,E=!1,C=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function N(F){for(var V=n(h);V!==null;){if(V.callback===null)i(h);else if(V.startTime<=F)i(h),V.sortIndex=V.expirationTime,t(m,V);else break;V=n(h)}}function I(F){if(k=!1,N(F),!S)if(n(m)!==null)S=!0,M||(M=!0,q());else{var V=n(h);V!==null&&B(I,V.startTime-F)}}var M=!1,P=-1,A=5,L=-1;function D(){return E?!0:!(e.unstable_now()-L<A)}function U(){if(E=!1,M){var F=e.unstable_now();L=F;var V=!0;try{e:{S=!1,k&&(k=!1,T(P),P=-1),b=!0;var Y=y;try{t:{for(N(F),g=n(m);g!==null&&!(g.expirationTime>F&&D());){var te=g.callback;if(typeof te=="function"){g.callback=null,y=g.priorityLevel;var O=te(g.expirationTime<=F);if(F=e.unstable_now(),typeof O=="function"){g.callback=O,N(F),V=!0;break t}g===n(m)&&i(m),N(F)}else i(m);g=n(m)}if(g!==null)V=!0;else{var _=n(h);_!==null&&B(I,_.startTime-F),V=!1}}break e}finally{g=null,y=Y,b=!1}V=void 0}}finally{V?q():M=!1}}}var q;if(typeof R=="function")q=function(){R(U)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,G=K.port2;K.port1.onmessage=U,q=function(){G.postMessage(null)}}else q=function(){C(U,0)};function B(F,V){P=C(function(){F(e.unstable_now())},V)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(F){switch(y){case 1:case 2:case 3:var V=3;break;default:V=y}var Y=y;y=V;try{return F()}finally{y=Y}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(F,V){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var Y=y;y=F;try{return V()}finally{y=Y}},e.unstable_scheduleCallback=function(F,V,Y){var te=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?te+Y:te):Y=te,F){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=Y+O,F={id:p++,callback:V,priorityLevel:F,startTime:Y,expirationTime:O,sortIndex:-1},Y>te?(F.sortIndex=Y,t(h,F),n(m)===null&&F===n(h)&&(k?(T(P),P=-1):k=!0,B(I,Y-te))):(F.sortIndex=O,t(m,F),S||b||(S=!0,M||(M=!0,q()))),F},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(F){var V=y;return function(){var Y=y;y=V;try{return F.apply(this,arguments)}finally{y=Y}}}})(Pg)),Pg}var uS;function $M(){return uS||(uS=1,_g.exports=WM()),_g.exports}var Lg={exports:{}},vr={};var fS;function QM(){if(fS)return vr;fS=1;var e=Au();function t(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(m,h,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:m,containerInfo:h,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return vr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,vr.createPortal=function(m,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(m,h,null,p)},vr.flushSync=function(m){var h=c.T,p=i.p;try{if(c.T=null,i.p=2,m)return m()}finally{c.T=h,i.p=p,i.d.f()}},vr.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(m,h))},vr.prefetchDNS=function(m){typeof m=="string"&&i.d.D(m)},vr.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var p=h.as,g=u(p,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?i.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:b}):p==="script"&&i.d.X(m,{crossOrigin:g,integrity:y,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},vr.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=u(h.as,h.crossOrigin);i.d.M(m,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(m)},vr.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,g=u(p,h.crossOrigin);i.d.L(m,p,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},vr.preloadModule=function(m,h){if(typeof m=="string")if(h){var p=u(h.as,h.crossOrigin);i.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(m)},vr.requestFormReset=function(m){i.d.r(m)},vr.unstable_batchedUpdates=function(m,h){return m(h)},vr.useFormState=function(m,h,p){return c.H.useFormState(m,h,p)},vr.useFormStatus=function(){return c.H.useHostTransitionStatus()},vr.version="19.2.8",vr}var dS;function MC(){if(dS)return Lg.exports;dS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Lg.exports=QM(),Lg.exports}var hS;function ez(){if(hS)return Kc;hS=1;var e=$M(),t=Au(),n=MC();function i(r){var o="https://react.dev/errors/"+r;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)o+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var o=r,a=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(a=o.return),r=o.return;while(r)}return o.tag===3?a:null}function c(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function u(r){if(r.tag===31){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function m(r){if(l(r)!==r)throw Error(i(188))}function h(r){var o=r.alternate;if(!o){if(o=l(r),o===null)throw Error(i(188));return o!==r?null:r}for(var a=r,f=o;;){var x=a.return;if(x===null)break;var v=x.alternate;if(v===null){if(f=x.return,f!==null){a=f;continue}break}if(x.child===v.child){for(v=x.child;v;){if(v===a)return m(x),r;if(v===f)return m(x),o;v=v.sibling}throw Error(i(188))}if(a.return!==f.return)a=x,f=v;else{for(var j=!1,H=x.child;H;){if(H===a){j=!0,a=x,f=v;break}if(H===f){j=!0,f=x,a=v;break}H=H.sibling}if(!j){for(H=v.child;H;){if(H===a){j=!0,a=v,f=x;break}if(H===f){j=!0,f=v,a=x;break}H=H.sibling}if(!j)throw Error(i(189))}}if(a.alternate!==f)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?r:o}function p(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r;for(r=r.child;r!==null;){if(o=p(r),o!==null)return o;r=r.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),R=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function q(r){return r===null||typeof r!="object"?null:(r=U&&r[U]||r["@@iterator"],typeof r=="function"?r:null)}var K=Symbol.for("react.client.reference");function G(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===K?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case k:return"Fragment";case C:return"Profiler";case E:return"StrictMode";case I:return"Suspense";case M:return"SuspenseList";case L:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case R:return r.displayName||"Context";case T:return(r._context.displayName||"Context")+".Consumer";case N:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case P:return o=r.displayName||null,o!==null?o:G(r.type)||"Memo";case A:o=r._payload,r=r._init;try{return G(r(o))}catch{}}return null}var B=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},te=[],O=-1;function _(r){return{current:r}}function Z(r){0>O||(r.current=te[O],te[O]=null,O--)}function z(r,o){O++,te[O]=r.current,r.current=o}var J=_(null),ne=_(null),W=_(null),fe=_(null);function ie(r,o){switch(z(W,o),z(ne,r),z(J,null),o.nodeType){case 9:case 11:r=(r=o.documentElement)&&(r=r.namespaceURI)?jw(r):0;break;default:if(r=o.tagName,o=o.namespaceURI)o=jw(o),r=Nw(o,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Z(J),z(J,r)}function se(){Z(J),Z(ne),Z(W)}function Se(r){r.memoizedState!==null&&z(fe,r);var o=J.current,a=Nw(o,r.type);o!==a&&(z(ne,r),z(J,a))}function ye(r){ne.current===r&&(Z(J),Z(ne)),fe.current===r&&(Z(fe),Uc._currentValue=Y)}var xe,ve;function Re(r){if(xe===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);xe=o&&o[1]||"",ve=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+xe+r+ve}var De=!1;function Me(r,o){if(!r||De)return"";De=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(o){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(he){var ue=he}Reflect.construct(r,[],Ee)}else{try{Ee.call()}catch(he){ue=he}r.call(Ee.prototype)}}else{try{throw Error()}catch(he){ue=he}(Ee=r())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(he){if(he&&ue&&typeof he.stack=="string")return[he.stack,ue.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=f.DetermineComponentFrameRoot(),j=v[0],H=v[1];if(j&&H){var X=j.split(`
|
|
4
|
+
`),ce=H.split(`
|
|
5
|
+
`);for(x=f=0;f<X.length&&!X[f].includes("DetermineComponentFrameRoot");)f++;for(;x<ce.length&&!ce[x].includes("DetermineComponentFrameRoot");)x++;if(f===X.length||x===ce.length)for(f=X.length-1,x=ce.length-1;1<=f&&0<=x&&X[f]!==ce[x];)x--;for(;1<=f&&0<=x;f--,x--)if(X[f]!==ce[x]){if(f!==1||x!==1)do if(f--,x--,0>x||X[f]!==ce[x]){var be=`
|
|
6
|
+
`+X[f].replace(" at new "," at ");return r.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",r.displayName)),be}while(1<=f&&0<=x);break}}}finally{De=!1,Error.prepareStackTrace=a}return(a=r?r.displayName||r.name:"")?Re(a):""}function Ne(r,o){switch(r.tag){case 26:case 27:case 5:return Re(r.type);case 16:return Re("Lazy");case 13:return r.child!==o&&o!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return Me(r.type,!1);case 11:return Me(r.type.render,!1);case 1:return Me(r.type,!0);case 31:return Re("Activity");default:return""}}function ge(r){try{var o="",a=null;do o+=Ne(r,a),a=r,r=r.return;while(r);return o}catch(f){return`
|
|
7
|
+
Error generating stack: `+f.message+`
|
|
8
|
+
`+f.stack}}var we=Object.prototype.hasOwnProperty,je=e.unstable_scheduleCallback,Ve=e.unstable_cancelCallback,Ue=e.unstable_shouldYield,me=e.unstable_requestPaint,re=e.unstable_now,le=e.unstable_getCurrentPriorityLevel,$=e.unstable_ImmediatePriority,Q=e.unstable_UserBlockingPriority,de=e.unstable_NormalPriority,Oe=e.unstable_LowPriority,_e=e.unstable_IdlePriority,Ge=e.log,dt=e.unstable_setDisableYieldValue,rt=null,at=null;function Nt(r){if(typeof Ge=="function"&&dt(r),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(rt,r)}catch{}}var Je=Math.clz32?Math.clz32:pt,Pt=Math.log,Fe=Math.LN2;function pt(r){return r>>>=0,r===0?32:31-(Pt(r)/Fe|0)|0}var Et=256,St=262144,tt=4194304;function ht(r){var o=r&42;if(o!==0)return o;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function et(r,o,a){var f=r.pendingLanes;if(f===0)return 0;var x=0,v=r.suspendedLanes,j=r.pingedLanes;r=r.warmLanes;var H=f&134217727;return H!==0?(f=H&~v,f!==0?x=ht(f):(j&=H,j!==0?x=ht(j):a||(a=H&~r,a!==0&&(x=ht(a))))):(H=f&~v,H!==0?x=ht(H):j!==0?x=ht(j):a||(a=f&~r,a!==0&&(x=ht(a)))),x===0?0:o!==0&&o!==x&&(o&v)===0&&(v=x&-x,a=o&-o,v>=a||v===32&&(a&4194048)!==0)?o:x}function Wt(r,o){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&o)===0}function Bn(r,o){switch(r){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 In(){var r=tt;return tt<<=1,(tt&62914560)===0&&(tt=4194304),r}function rn(r){for(var o=[],a=0;31>a;a++)o.push(r);return o}function Sn(r,o){r.pendingLanes|=o,o!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ft(r,o,a,f,x,v){var j=r.pendingLanes;r.pendingLanes=a,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=a,r.entangledLanes&=a,r.errorRecoveryDisabledLanes&=a,r.shellSuspendCounter=0;var H=r.entanglements,X=r.expirationTimes,ce=r.hiddenUpdates;for(a=j&~a;0<a;){var be=31-Je(a),Ee=1<<be;H[be]=0,X[be]=-1;var ue=ce[be];if(ue!==null)for(ce[be]=null,be=0;be<ue.length;be++){var he=ue[be];he!==null&&(he.lane&=-536870913)}a&=~Ee}f!==0&&Ar(r,f,0),v!==0&&x===0&&r.tag!==0&&(r.suspendedLanes|=v&~(j&~o))}function Ar(r,o,a){r.pendingLanes|=o,r.suspendedLanes&=~o;var f=31-Je(o);r.entangledLanes|=o,r.entanglements[f]=r.entanglements[f]|1073741824|a&261930}function lr(r,o){var a=r.entangledLanes|=o;for(r=r.entanglements;a;){var f=31-Je(a),x=1<<f;x&o|r[f]&o&&(r[f]|=o),a&=~x}}function st(r,o){var a=o&-o;return a=(a&42)!==0?1:Yt(a),(a&(r.suspendedLanes|o))!==0?0:a}function Yt(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Vn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Dn(){var r=V.p;return r!==0?r:(r=window.event,r===void 0?32:$w(r.type))}function gr(r,o){var a=V.p;try{return V.p=r,o()}finally{V.p=a}}var yn=Math.random().toString(36).slice(2),Zt="__reactFiber$"+yn,Ht="__reactProps$"+yn,nt="__reactContainer$"+yn,Tr="__reactEvents$"+yn,Mm="__reactListeners$"+yn,zm="__reactHandles$"+yn,$a="__reactResources$"+yn,Zo="__reactMarker$"+yn;function Qa(r){delete r[Zt],delete r[Ht],delete r[Tr],delete r[Mm],delete r[zm]}function Ti(r){var o=r[Zt];if(o)return o;for(var a=r.parentNode;a;){if(o=a[nt]||a[Zt]){if(a=o.alternate,o.child!==null||a!==null&&a.child!==null)for(r=_w(r);r!==null;){if(a=r[Zt])return a;r=_w(r)}return o}r=a,a=r.parentNode}return null}function ao(r){if(r=r[Zt]||r[nt]){var o=r.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return r}return null}function Ri(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r.stateNode;throw Error(i(33))}function ji(r){var o=r[$a];return o||(o=r[$a]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Un(r){r[Zo]=!0}var ar=new Set,Ur={};function co(r,o){qo(r,o),qo(r+"Capture",o)}function qo(r,o){for(Ur[r]=o,r=0;r<o.length;r++)ar.add(o[r])}var tf=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]*$"),nf={},Ll={};function rf(r){return we.call(Ll,r)?!0:we.call(nf,r)?!1:tf.test(r)?Ll[r]=!0:(nf[r]=!0,!1)}function Go(r,o,a){if(rf(o))if(a===null)r.removeAttribute(o);else{switch(typeof a){case"undefined":case"function":case"symbol":r.removeAttribute(o);return;case"boolean":var f=o.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){r.removeAttribute(o);return}}r.setAttribute(o,""+a)}}function Fl(r,o,a){if(a===null)r.removeAttribute(o);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttribute(o,""+a)}}function ii(r,o,a,f){if(f===null)r.removeAttribute(a);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttributeNS(o,a,""+f)}}function Qn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Zr(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function oi(r,o,a){var f=Object.getOwnPropertyDescriptor(r.constructor.prototype,o);if(!r.hasOwnProperty(o)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var x=f.get,v=f.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return x.call(this)},set:function(j){a=""+j,v.call(this,j)}}),Object.defineProperty(r,o,{enumerable:f.enumerable}),{getValue:function(){return a},setValue:function(j){a=""+j},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function uo(r){if(!r._valueTracker){var o=Zr(r)?"checked":"value";r._valueTracker=oi(r,o,""+r[o])}}function Ks(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var a=o.getValue(),f="";return r&&(f=Zr(r)?r.checked?"true":"false":r.value),r=f,r!==a?(o.setValue(r),!0):!1}function Hl(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var Im=/[\n"\\]/g;function xr(r){return r.replace(Im,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function ec(r,o,a,f,x,v,j,H){r.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?r.type=j:r.removeAttribute("type"),o!=null?j==="number"?(o===0&&r.value===""||r.value!=o)&&(r.value=""+Qn(o)):r.value!==""+Qn(o)&&(r.value=""+Qn(o)):j!=="submit"&&j!=="reset"||r.removeAttribute("value"),o!=null?Bl(r,j,Qn(o)):a!=null?Bl(r,j,Qn(a)):f!=null&&r.removeAttribute("value"),x==null&&v!=null&&(r.defaultChecked=!!v),x!=null&&(r.checked=x&&typeof x!="function"&&typeof x!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?r.name=""+Qn(H):r.removeAttribute("name")}function of(r,o,a,f,x,v,j,H){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),o!=null||a!=null){if(!(v!=="submit"&&v!=="reset"||o!=null)){uo(r);return}a=a!=null?""+Qn(a):"",o=o!=null?""+Qn(o):a,H||o===r.value||(r.value=o),r.defaultValue=o}f=f??x,f=typeof f!="function"&&typeof f!="symbol"&&!!f,r.checked=H?r.checked:!!f,r.defaultChecked=!!f,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(r.name=j),uo(r)}function Bl(r,o,a){o==="number"&&Hl(r.ownerDocument)===r||r.defaultValue===""+a||(r.defaultValue=""+a)}function Ni(r,o,a,f){if(r=r.options,o){o={};for(var x=0;x<a.length;x++)o["$"+a[x]]=!0;for(a=0;a<r.length;a++)x=o.hasOwnProperty("$"+r[a].value),r[a].selected!==x&&(r[a].selected=x),x&&f&&(r[a].defaultSelected=!0)}else{for(a=""+Qn(a),o=null,x=0;x<r.length;x++){if(r[x].value===a){r[x].selected=!0,f&&(r[x].defaultSelected=!0);return}o!==null||r[x].disabled||(o=r[x])}o!==null&&(o.selected=!0)}}function tc(r,o,a){if(o!=null&&(o=""+Qn(o),o!==r.value&&(r.value=o),a==null)){r.defaultValue!==o&&(r.defaultValue=o);return}r.defaultValue=a!=null?""+Qn(a):""}function Xs(r,o,a,f){if(o==null){if(f!=null){if(a!=null)throw Error(i(92));if(B(f)){if(1<f.length)throw Error(i(93));f=f[0]}a=f}a==null&&(a=""),o=a}a=Qn(o),r.defaultValue=a,f=r.textContent,f===a&&f!==""&&f!==null&&(r.value=f),uo(r)}function fo(r,o){if(o){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=o;return}}r.textContent=o}var Vl=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 nc(r,o,a){var f=o.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?f?r.setProperty(o,""):o==="float"?r.cssFloat="":r[o]="":f?r.setProperty(o,a):typeof a!="number"||a===0||Vl.has(o)?o==="float"?r.cssFloat=a:r[o]=(""+a).trim():r[o]=a+"px"}function Js(r,o,a){if(o!=null&&typeof o!="object")throw Error(i(62));if(r=r.style,a!=null){for(var f in a)!a.hasOwnProperty(f)||o!=null&&o.hasOwnProperty(f)||(f.indexOf("--")===0?r.setProperty(f,""):f==="float"?r.cssFloat="":r[f]="");for(var x in o)f=o[x],o.hasOwnProperty(x)&&a[x]!==f&&nc(r,x,f)}else for(var v in o)o.hasOwnProperty(v)&&nc(r,v,o[v])}function Gi(r){if(r.indexOf("-")===-1)return!1;switch(r){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 rc=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"]]),ic=/^[\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 Yo(r){return ic.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function qr(){}var oc=null;function sc(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ko=null,Xo=null;function Ul(r){var o=ao(r);if(o&&(r=o.stateNode)){var a=r[Ht]||null;e:switch(r=o.stateNode,o.type){case"input":if(ec(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),o=a.name,a.type==="radio"&&o!=null){for(a=r;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+xr(""+o)+'"][type="radio"]'),o=0;o<a.length;o++){var f=a[o];if(f!==r&&f.form===r.form){var x=f[Ht]||null;if(!x)throw Error(i(90));ec(f,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(o=0;o<a.length;o++)f=a[o],f.form===r.form&&Ks(f)}break e;case"textarea":tc(r,a.value,a.defaultValue);break e;case"select":o=a.value,o!=null&&Ni(r,!!a.multiple,o,!1)}}}var lc=!1;function sf(r,o,a){if(lc)return r(o,a);lc=!0;try{var f=r(o);return f}finally{if(lc=!1,(Ko!==null||Xo!==null)&&(Uf(),Ko&&(o=Ko,r=Xo,Xo=Ko=null,Ul(o),r)))for(o=0;o<r.length;o++)Ul(r[o])}}function He(r,o){var a=r.stateNode;if(a===null)return null;var f=a[Ht]||null;if(f===null)return null;a=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(r=r.type,f=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!f;break e;default:r=!1}if(r)return null;if(a&&typeof a!="function")throw Error(i(231,o,typeof a));return a}var qe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kt=!1;if(qe)try{var Ut={};Object.defineProperty(Ut,"passive",{get:function(){Kt=!0}}),window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch{Kt=!1}var on=null,nr=null,sn=null;function cr(){if(sn)return sn;var r,o=nr,a=o.length,f,x="value"in on?on.value:on.textContent,v=x.length;for(r=0;r<a&&o[r]===x[r];r++);var j=a-r;for(f=1;f<=j&&o[a-f]===x[v-f];f++);return sn=x.slice(r,1<f?1-f:void 0)}function yr(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Gr(){return!0}function Jo(){return!1}function br(r){function o(a,f,x,v,j){this._reactName=a,this._targetInst=x,this.type=f,this.nativeEvent=v,this.target=j,this.currentTarget=null;for(var H in r)r.hasOwnProperty(H)&&(a=r[H],this[H]=a?a(v):v[H]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Gr:Jo,this.isPropagationStopped=Jo,this}return g(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Gr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Gr)},persist:function(){},isPersistent:Gr}),o}var Yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zl=br(Yi),ac=g({},Yi,{view:0,detail:0}),HO=br(ac),Dm,_m,cc,lf=g({},ac,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lm,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==cc&&(cc&&r.type==="mousemove"?(Dm=r.screenX-cc.screenX,_m=r.screenY-cc.screenY):_m=Dm=0,cc=r),Dm)},movementY:function(r){return"movementY"in r?r.movementY:_m}}),Av=br(lf),BO=g({},lf,{dataTransfer:0}),VO=br(BO),UO=g({},ac,{relatedTarget:0}),Pm=br(UO),ZO=g({},Yi,{animationName:0,elapsedTime:0,pseudoElement:0}),qO=br(ZO),GO=g({},Yi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),YO=br(GO),KO=g({},Yi,{data:0}),Mv=br(KO),XO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},JO={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"},WO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $O(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=WO[r])?!!o[r]:!1}function Lm(){return $O}var QO=g({},ac,{key:function(r){if(r.key){var o=XO[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=yr(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?JO[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lm,charCode:function(r){return r.type==="keypress"?yr(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?yr(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),eA=br(QO),tA=g({},lf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zv=br(tA),nA=g({},ac,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lm}),rA=br(nA),iA=g({},Yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),oA=br(iA),sA=g({},lf,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),lA=br(sA),aA=g({},Yi,{newState:0,oldState:0}),cA=br(aA),uA=[9,13,27,32],Fm=qe&&"CompositionEvent"in window,uc=null;qe&&"documentMode"in document&&(uc=document.documentMode);var fA=qe&&"TextEvent"in window&&!uc,Iv=qe&&(!Fm||uc&&8<uc&&11>=uc),Dv=" ",_v=!1;function Pv(r,o){switch(r){case"keyup":return uA.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lv(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ql=!1;function dA(r,o){switch(r){case"compositionend":return Lv(o);case"keypress":return o.which!==32?null:(_v=!0,Dv);case"textInput":return r=o.data,r===Dv&&_v?null:r;default:return null}}function hA(r,o){if(ql)return r==="compositionend"||!Fm&&Pv(r,o)?(r=cr(),sn=nr=on=null,ql=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Iv&&o.locale!=="ko"?null:o.data;default:return null}}var mA={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 Fv(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!mA[r.type]:o==="textarea"}function Hv(r,o,a,f){Ko?Xo?Xo.push(f):Xo=[f]:Ko=f,o=Jf(o,"onChange"),0<o.length&&(a=new Zl("onChange","change",null,a,f),r.push({event:a,listeners:o}))}var fc=null,dc=null;function pA(r){Sw(r,0)}function af(r){var o=Ri(r);if(Ks(o))return r}function Bv(r,o){if(r==="change")return o}var Vv=!1;if(qe){var Hm;if(qe){var Bm="oninput"in document;if(!Bm){var Uv=document.createElement("div");Uv.setAttribute("oninput","return;"),Bm=typeof Uv.oninput=="function"}Hm=Bm}else Hm=!1;Vv=Hm&&(!document.documentMode||9<document.documentMode)}function Zv(){fc&&(fc.detachEvent("onpropertychange",qv),dc=fc=null)}function qv(r){if(r.propertyName==="value"&&af(dc)){var o=[];Hv(o,dc,r,sc(r)),sf(pA,o)}}function gA(r,o,a){r==="focusin"?(Zv(),fc=o,dc=a,fc.attachEvent("onpropertychange",qv)):r==="focusout"&&Zv()}function xA(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return af(dc)}function yA(r,o){if(r==="click")return af(o)}function bA(r,o){if(r==="input"||r==="change")return af(o)}function vA(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var Yr=typeof Object.is=="function"?Object.is:vA;function hc(r,o){if(Yr(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var a=Object.keys(r),f=Object.keys(o);if(a.length!==f.length)return!1;for(f=0;f<a.length;f++){var x=a[f];if(!we.call(o,x)||!Yr(r[x],o[x]))return!1}return!0}function Gv(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Yv(r,o){var a=Gv(r);r=0;for(var f;a;){if(a.nodeType===3){if(f=r+a.textContent.length,r<=o&&f>=o)return{node:a,offset:o-r};r=f}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Gv(a)}}function Kv(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Kv(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Xv(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var o=Hl(r.document);o instanceof r.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)r=o.contentWindow;else break;o=Hl(r.document)}return o}function Vm(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}var wA=qe&&"documentMode"in document&&11>=document.documentMode,Gl=null,Um=null,mc=null,Zm=!1;function Jv(r,o,a){var f=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Zm||Gl==null||Gl!==Hl(f)||(f=Gl,"selectionStart"in f&&Vm(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),mc&&hc(mc,f)||(mc=f,f=Jf(Um,"onSelect"),0<f.length&&(o=new Zl("onSelect","select",null,o,a),r.push({event:o,listeners:f}),o.target=Gl)))}function Ws(r,o){var a={};return a[r.toLowerCase()]=o.toLowerCase(),a["Webkit"+r]="webkit"+o,a["Moz"+r]="moz"+o,a}var Yl={animationend:Ws("Animation","AnimationEnd"),animationiteration:Ws("Animation","AnimationIteration"),animationstart:Ws("Animation","AnimationStart"),transitionrun:Ws("Transition","TransitionRun"),transitionstart:Ws("Transition","TransitionStart"),transitioncancel:Ws("Transition","TransitionCancel"),transitionend:Ws("Transition","TransitionEnd")},qm={},Wv={};qe&&(Wv=document.createElement("div").style,"AnimationEvent"in window||(delete Yl.animationend.animation,delete Yl.animationiteration.animation,delete Yl.animationstart.animation),"TransitionEvent"in window||delete Yl.transitionend.transition);function $s(r){if(qm[r])return qm[r];if(!Yl[r])return r;var o=Yl[r],a;for(a in o)if(o.hasOwnProperty(a)&&a in Wv)return qm[r]=o[a];return r}var $v=$s("animationend"),Qv=$s("animationiteration"),e0=$s("animationstart"),SA=$s("transitionrun"),kA=$s("transitionstart"),EA=$s("transitioncancel"),t0=$s("transitionend"),n0=new Map,Gm="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(" ");Gm.push("scrollEnd");function Oi(r,o){n0.set(r,o),co(o,[r])}var cf=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},si=[],Kl=0,Ym=0;function uf(){for(var r=Kl,o=Ym=Kl=0;o<r;){var a=si[o];si[o++]=null;var f=si[o];si[o++]=null;var x=si[o];si[o++]=null;var v=si[o];if(si[o++]=null,f!==null&&x!==null){var j=f.pending;j===null?x.next=x:(x.next=j.next,j.next=x),f.pending=x}v!==0&&r0(a,x,v)}}function ff(r,o,a,f){si[Kl++]=r,si[Kl++]=o,si[Kl++]=a,si[Kl++]=f,Ym|=f,r.lanes|=f,r=r.alternate,r!==null&&(r.lanes|=f)}function Km(r,o,a,f){return ff(r,o,a,f),df(r)}function Qs(r,o){return ff(r,null,null,o),df(r)}function r0(r,o,a){r.lanes|=a;var f=r.alternate;f!==null&&(f.lanes|=a);for(var x=!1,v=r.return;v!==null;)v.childLanes|=a,f=v.alternate,f!==null&&(f.childLanes|=a),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(x=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,x&&o!==null&&(x=31-Je(a),r=v.hiddenUpdates,f=r[x],f===null?r[x]=[o]:f.push(o),o.lane=a|536870912),v):null}function df(r){if(50<_c)throw _c=0,rg=null,Error(i(185));for(var o=r.return;o!==null;)r=o,o=r.return;return r.tag===3?r.stateNode:null}var Xl={};function CA(r,o,a,f){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(r,o,a,f){return new CA(r,o,a,f)}function Xm(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ho(r,o){var a=r.alternate;return a===null?(a=Kr(r.tag,o,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=o,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&65011712,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,o=r.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a.refCleanup=r.refCleanup,a}function i0(r,o){r.flags&=65011714;var a=r.alternate;return a===null?(r.childLanes=0,r.lanes=o,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=a.childLanes,r.lanes=a.lanes,r.child=a.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=a.memoizedProps,r.memoizedState=a.memoizedState,r.updateQueue=a.updateQueue,r.type=a.type,o=a.dependencies,r.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),r}function hf(r,o,a,f,x,v){var j=0;if(f=r,typeof r=="function")Xm(r)&&(j=1);else if(typeof r=="string")j=OM(r,a,J.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case L:return r=Kr(31,a,o,x),r.elementType=L,r.lanes=v,r;case k:return el(a.children,x,v,o);case E:j=8,x|=24;break;case C:return r=Kr(12,a,o,x|2),r.elementType=C,r.lanes=v,r;case I:return r=Kr(13,a,o,x),r.elementType=I,r.lanes=v,r;case M:return r=Kr(19,a,o,x),r.elementType=M,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case R:j=10;break e;case T:j=9;break e;case N:j=11;break e;case P:j=14;break e;case A:j=16,f=null;break e}j=29,a=Error(i(130,r===null?"null":typeof r,"")),f=null}return o=Kr(j,a,o,x),o.elementType=r,o.type=f,o.lanes=v,o}function el(r,o,a,f){return r=Kr(7,r,f,o),r.lanes=a,r}function Jm(r,o,a){return r=Kr(6,r,null,o),r.lanes=a,r}function o0(r){var o=Kr(18,null,null,0);return o.stateNode=r,o}function Wm(r,o,a){return o=Kr(4,r.children!==null?r.children:[],r.key,o),o.lanes=a,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}var s0=new WeakMap;function li(r,o){if(typeof r=="object"&&r!==null){var a=s0.get(r);return a!==void 0?a:(o={value:r,source:o,stack:ge(o)},s0.set(r,o),o)}return{value:r,source:o,stack:ge(o)}}var Jl=[],Wl=0,mf=null,pc=0,ai=[],ci=0,Wo=null,Ki=1,Xi="";function mo(r,o){Jl[Wl++]=pc,Jl[Wl++]=mf,mf=r,pc=o}function l0(r,o,a){ai[ci++]=Ki,ai[ci++]=Xi,ai[ci++]=Wo,Wo=r;var f=Ki;r=Xi;var x=32-Je(f)-1;f&=~(1<<x),a+=1;var v=32-Je(o)+x;if(30<v){var j=x-x%5;v=(f&(1<<j)-1).toString(32),f>>=j,x-=j,Ki=1<<32-Je(o)+x|a<<x|f,Xi=v+r}else Ki=1<<v|a<<x|f,Xi=r}function $m(r){r.return!==null&&(mo(r,1),l0(r,1,0))}function Qm(r){for(;r===mf;)mf=Jl[--Wl],Jl[Wl]=null,pc=Jl[--Wl],Jl[Wl]=null;for(;r===Wo;)Wo=ai[--ci],ai[ci]=null,Xi=ai[--ci],ai[ci]=null,Ki=ai[--ci],ai[ci]=null}function a0(r,o){ai[ci++]=Ki,ai[ci++]=Xi,ai[ci++]=Wo,Ki=o.id,Xi=o.overflow,Wo=r}var ur=null,bn=null,Lt=!1,$o=null,ui=!1,ep=Error(i(519));function Qo(r){var o=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gc(li(o,r)),ep}function c0(r){var o=r.stateNode,a=r.type,f=r.memoizedProps;switch(o[Zt]=r,o[Ht]=f,a){case"dialog":At("cancel",o),At("close",o);break;case"iframe":case"object":case"embed":At("load",o);break;case"video":case"audio":for(a=0;a<Lc.length;a++)At(Lc[a],o);break;case"source":At("error",o);break;case"img":case"image":case"link":At("error",o),At("load",o);break;case"details":At("toggle",o);break;case"input":At("invalid",o),of(o,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":At("invalid",o);break;case"textarea":At("invalid",o),Xs(o,f.value,f.defaultValue,f.children)}a=f.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||o.textContent===""+a||f.suppressHydrationWarning===!0||Tw(o.textContent,a)?(f.popover!=null&&(At("beforetoggle",o),At("toggle",o)),f.onScroll!=null&&At("scroll",o),f.onScrollEnd!=null&&At("scrollend",o),f.onClick!=null&&(o.onclick=qr),o=!0):o=!1,o||Qo(r,!0)}function u0(r){for(ur=r.return;ur;)switch(ur.tag){case 5:case 31:case 13:ui=!1;return;case 27:case 3:ui=!0;return;default:ur=ur.return}}function $l(r){if(r!==ur)return!1;if(!Lt)return u0(r),Lt=!0,!1;var o=r.tag,a;if((a=o!==3&&o!==27)&&((a=o===5)&&(a=r.type,a=!(a!=="form"&&a!=="button")||yg(r.type,r.memoizedProps)),a=!a),a&&bn&&Qo(r),u0(r),o===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));bn=Dw(r)}else if(o===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));bn=Dw(r)}else o===27?(o=bn,hs(r.type)?(r=kg,kg=null,bn=r):bn=o):bn=ur?di(r.stateNode.nextSibling):null;return!0}function tl(){bn=ur=null,Lt=!1}function tp(){var r=$o;return r!==null&&(Dr===null?Dr=r:Dr.push.apply(Dr,r),$o=null),r}function gc(r){$o===null?$o=[r]:$o.push(r)}var np=_(null),nl=null,po=null;function es(r,o,a){z(np,o._currentValue),o._currentValue=a}function go(r){r._currentValue=np.current,Z(np)}function rp(r,o,a){for(;r!==null;){var f=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),r===a)break;r=r.return}}function ip(r,o,a,f){var x=r.child;for(x!==null&&(x.return=r);x!==null;){var v=x.dependencies;if(v!==null){var j=x.child;v=v.firstContext;e:for(;v!==null;){var H=v;v=x;for(var X=0;X<o.length;X++)if(H.context===o[X]){v.lanes|=a,H=v.alternate,H!==null&&(H.lanes|=a),rp(v.return,a,r),f||(j=null);break e}v=H.next}}else if(x.tag===18){if(j=x.return,j===null)throw Error(i(341));j.lanes|=a,v=j.alternate,v!==null&&(v.lanes|=a),rp(j,a,r),j=null}else j=x.child;if(j!==null)j.return=x;else for(j=x;j!==null;){if(j===r){j=null;break}if(x=j.sibling,x!==null){x.return=j.return,j=x;break}j=j.return}x=j}}function Ql(r,o,a,f){r=null;for(var x=o,v=!1;x!==null;){if(!v){if((x.flags&524288)!==0)v=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var j=x.alternate;if(j===null)throw Error(i(387));if(j=j.memoizedProps,j!==null){var H=x.type;Yr(x.pendingProps.value,j.value)||(r!==null?r.push(H):r=[H])}}else if(x===fe.current){if(j=x.alternate,j===null)throw Error(i(387));j.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(r!==null?r.push(Uc):r=[Uc])}x=x.return}r!==null&&ip(o,r,a,f),o.flags|=262144}function pf(r){for(r=r.firstContext;r!==null;){if(!Yr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function rl(r){nl=r,po=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function fr(r){return f0(nl,r)}function gf(r,o){return nl===null&&rl(r),f0(r,o)}function f0(r,o){var a=o._currentValue;if(o={context:o,memoizedValue:a,next:null},po===null){if(r===null)throw Error(i(308));po=o,r.dependencies={lanes:0,firstContext:o},r.flags|=524288}else po=po.next=o;return a}var TA=typeof AbortController<"u"?AbortController:function(){var r=[],o=this.signal={aborted:!1,addEventListener:function(a,f){r.push(f)}};this.abort=function(){o.aborted=!0,r.forEach(function(a){return a()})}},RA=e.unstable_scheduleCallback,jA=e.unstable_NormalPriority,Zn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function op(){return{controller:new TA,data:new Map,refCount:0}}function xc(r){r.refCount--,r.refCount===0&&RA(jA,function(){r.controller.abort()})}var yc=null,sp=0,ea=0,ta=null;function NA(r,o){if(yc===null){var a=yc=[];sp=0,ea=cg(),ta={status:"pending",value:void 0,then:function(f){a.push(f)}}}return sp++,o.then(d0,d0),o}function d0(){if(--sp===0&&yc!==null){ta!==null&&(ta.status="fulfilled");var r=yc;yc=null,ea=0,ta=null;for(var o=0;o<r.length;o++)(0,r[o])()}}function OA(r,o){var a=[],f={status:"pending",value:null,reason:null,then:function(x){a.push(x)}};return r.then(function(){f.status="fulfilled",f.value=o;for(var x=0;x<a.length;x++)(0,a[x])(o)},function(x){for(f.status="rejected",f.reason=x,x=0;x<a.length;x++)(0,a[x])(void 0)}),f}var h0=F.S;F.S=function(r,o){J1=re(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&NA(r,o),h0!==null&&h0(r,o)};var il=_(null);function lp(){var r=il.current;return r!==null?r:hn.pooledCache}function xf(r,o){o===null?z(il,il.current):z(il,o.pool)}function m0(){var r=lp();return r===null?null:{parent:Zn._currentValue,pool:r}}var na=Error(i(460)),ap=Error(i(474)),yf=Error(i(542)),bf={then:function(){}};function p0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function g0(r,o,a){switch(a=r[a],a===void 0?r.push(o):a!==o&&(o.then(qr,qr),o=a),o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,y0(r),r;default:if(typeof o.status=="string")o.then(qr,qr);else{if(r=hn,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=o,r.status="pending",r.then(function(f){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=f}},function(f){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=f}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,y0(r),r}throw sl=o,na}}function ol(r){try{var o=r._init;return o(r._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(sl=a,na):a}}var sl=null;function x0(){if(sl===null)throw Error(i(459));var r=sl;return sl=null,r}function y0(r){if(r===na||r===yf)throw Error(i(483))}var ra=null,bc=0;function vf(r){var o=bc;return bc+=1,ra===null&&(ra=[]),g0(ra,r,o)}function vc(r,o){o=o.props.ref,r.ref=o!==void 0?o:null}function wf(r,o){throw o.$$typeof===y?Error(i(525)):(r=Object.prototype.toString.call(o),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r)))}function b0(r){function o(oe,ee){if(r){var ae=oe.deletions;ae===null?(oe.deletions=[ee],oe.flags|=16):ae.push(ee)}}function a(oe,ee){if(!r)return null;for(;ee!==null;)o(oe,ee),ee=ee.sibling;return null}function f(oe){for(var ee=new Map;oe!==null;)oe.key!==null?ee.set(oe.key,oe):ee.set(oe.index,oe),oe=oe.sibling;return ee}function x(oe,ee){return oe=ho(oe,ee),oe.index=0,oe.sibling=null,oe}function v(oe,ee,ae){return oe.index=ae,r?(ae=oe.alternate,ae!==null?(ae=ae.index,ae<ee?(oe.flags|=67108866,ee):ae):(oe.flags|=67108866,ee)):(oe.flags|=1048576,ee)}function j(oe){return r&&oe.alternate===null&&(oe.flags|=67108866),oe}function H(oe,ee,ae,ke){return ee===null||ee.tag!==6?(ee=Jm(ae,oe.mode,ke),ee.return=oe,ee):(ee=x(ee,ae),ee.return=oe,ee)}function X(oe,ee,ae,ke){var it=ae.type;return it===k?be(oe,ee,ae.props.children,ke,ae.key):ee!==null&&(ee.elementType===it||typeof it=="object"&&it!==null&&it.$$typeof===A&&ol(it)===ee.type)?(ee=x(ee,ae.props),vc(ee,ae),ee.return=oe,ee):(ee=hf(ae.type,ae.key,ae.props,null,oe.mode,ke),vc(ee,ae),ee.return=oe,ee)}function ce(oe,ee,ae,ke){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==ae.containerInfo||ee.stateNode.implementation!==ae.implementation?(ee=Wm(ae,oe.mode,ke),ee.return=oe,ee):(ee=x(ee,ae.children||[]),ee.return=oe,ee)}function be(oe,ee,ae,ke,it){return ee===null||ee.tag!==7?(ee=el(ae,oe.mode,ke,it),ee.return=oe,ee):(ee=x(ee,ae),ee.return=oe,ee)}function Ee(oe,ee,ae){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Jm(""+ee,oe.mode,ae),ee.return=oe,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return ae=hf(ee.type,ee.key,ee.props,null,oe.mode,ae),vc(ae,ee),ae.return=oe,ae;case S:return ee=Wm(ee,oe.mode,ae),ee.return=oe,ee;case A:return ee=ol(ee),Ee(oe,ee,ae)}if(B(ee)||q(ee))return ee=el(ee,oe.mode,ae,null),ee.return=oe,ee;if(typeof ee.then=="function")return Ee(oe,vf(ee),ae);if(ee.$$typeof===R)return Ee(oe,gf(oe,ee),ae);wf(oe,ee)}return null}function ue(oe,ee,ae,ke){var it=ee!==null?ee.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return it!==null?null:H(oe,ee,""+ae,ke);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return ae.key===it?X(oe,ee,ae,ke):null;case S:return ae.key===it?ce(oe,ee,ae,ke):null;case A:return ae=ol(ae),ue(oe,ee,ae,ke)}if(B(ae)||q(ae))return it!==null?null:be(oe,ee,ae,ke,null);if(typeof ae.then=="function")return ue(oe,ee,vf(ae),ke);if(ae.$$typeof===R)return ue(oe,ee,gf(oe,ae),ke);wf(oe,ae)}return null}function he(oe,ee,ae,ke,it){if(typeof ke=="string"&&ke!==""||typeof ke=="number"||typeof ke=="bigint")return oe=oe.get(ae)||null,H(ee,oe,""+ke,it);if(typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case b:return oe=oe.get(ke.key===null?ae:ke.key)||null,X(ee,oe,ke,it);case S:return oe=oe.get(ke.key===null?ae:ke.key)||null,ce(ee,oe,ke,it);case A:return ke=ol(ke),he(oe,ee,ae,ke,it)}if(B(ke)||q(ke))return oe=oe.get(ae)||null,be(ee,oe,ke,it,null);if(typeof ke.then=="function")return he(oe,ee,ae,vf(ke),it);if(ke.$$typeof===R)return he(oe,ee,ae,gf(ee,ke),it);wf(ee,ke)}return null}function We(oe,ee,ae,ke){for(var it=null,qt=null,Qe=ee,vt=ee=0,It=null;Qe!==null&&vt<ae.length;vt++){Qe.index>vt?(It=Qe,Qe=null):It=Qe.sibling;var Gt=ue(oe,Qe,ae[vt],ke);if(Gt===null){Qe===null&&(Qe=It);break}r&&Qe&&Gt.alternate===null&&o(oe,Qe),ee=v(Gt,ee,vt),qt===null?it=Gt:qt.sibling=Gt,qt=Gt,Qe=It}if(vt===ae.length)return a(oe,Qe),Lt&&mo(oe,vt),it;if(Qe===null){for(;vt<ae.length;vt++)Qe=Ee(oe,ae[vt],ke),Qe!==null&&(ee=v(Qe,ee,vt),qt===null?it=Qe:qt.sibling=Qe,qt=Qe);return Lt&&mo(oe,vt),it}for(Qe=f(Qe);vt<ae.length;vt++)It=he(Qe,oe,vt,ae[vt],ke),It!==null&&(r&&It.alternate!==null&&Qe.delete(It.key===null?vt:It.key),ee=v(It,ee,vt),qt===null?it=It:qt.sibling=It,qt=It);return r&&Qe.forEach(function(ys){return o(oe,ys)}),Lt&&mo(oe,vt),it}function ct(oe,ee,ae,ke){if(ae==null)throw Error(i(151));for(var it=null,qt=null,Qe=ee,vt=ee=0,It=null,Gt=ae.next();Qe!==null&&!Gt.done;vt++,Gt=ae.next()){Qe.index>vt?(It=Qe,Qe=null):It=Qe.sibling;var ys=ue(oe,Qe,Gt.value,ke);if(ys===null){Qe===null&&(Qe=It);break}r&&Qe&&ys.alternate===null&&o(oe,Qe),ee=v(ys,ee,vt),qt===null?it=ys:qt.sibling=ys,qt=ys,Qe=It}if(Gt.done)return a(oe,Qe),Lt&&mo(oe,vt),it;if(Qe===null){for(;!Gt.done;vt++,Gt=ae.next())Gt=Ee(oe,Gt.value,ke),Gt!==null&&(ee=v(Gt,ee,vt),qt===null?it=Gt:qt.sibling=Gt,qt=Gt);return Lt&&mo(oe,vt),it}for(Qe=f(Qe);!Gt.done;vt++,Gt=ae.next())Gt=he(Qe,oe,vt,Gt.value,ke),Gt!==null&&(r&&Gt.alternate!==null&&Qe.delete(Gt.key===null?vt:Gt.key),ee=v(Gt,ee,vt),qt===null?it=Gt:qt.sibling=Gt,qt=Gt);return r&&Qe.forEach(function(BM){return o(oe,BM)}),Lt&&mo(oe,vt),it}function cn(oe,ee,ae,ke){if(typeof ae=="object"&&ae!==null&&ae.type===k&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:e:{for(var it=ae.key;ee!==null;){if(ee.key===it){if(it=ae.type,it===k){if(ee.tag===7){a(oe,ee.sibling),ke=x(ee,ae.props.children),ke.return=oe,oe=ke;break e}}else if(ee.elementType===it||typeof it=="object"&&it!==null&&it.$$typeof===A&&ol(it)===ee.type){a(oe,ee.sibling),ke=x(ee,ae.props),vc(ke,ae),ke.return=oe,oe=ke;break e}a(oe,ee);break}else o(oe,ee);ee=ee.sibling}ae.type===k?(ke=el(ae.props.children,oe.mode,ke,ae.key),ke.return=oe,oe=ke):(ke=hf(ae.type,ae.key,ae.props,null,oe.mode,ke),vc(ke,ae),ke.return=oe,oe=ke)}return j(oe);case S:e:{for(it=ae.key;ee!==null;){if(ee.key===it)if(ee.tag===4&&ee.stateNode.containerInfo===ae.containerInfo&&ee.stateNode.implementation===ae.implementation){a(oe,ee.sibling),ke=x(ee,ae.children||[]),ke.return=oe,oe=ke;break e}else{a(oe,ee);break}else o(oe,ee);ee=ee.sibling}ke=Wm(ae,oe.mode,ke),ke.return=oe,oe=ke}return j(oe);case A:return ae=ol(ae),cn(oe,ee,ae,ke)}if(B(ae))return We(oe,ee,ae,ke);if(q(ae)){if(it=q(ae),typeof it!="function")throw Error(i(150));return ae=it.call(ae),ct(oe,ee,ae,ke)}if(typeof ae.then=="function")return cn(oe,ee,vf(ae),ke);if(ae.$$typeof===R)return cn(oe,ee,gf(oe,ae),ke);wf(oe,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,ee!==null&&ee.tag===6?(a(oe,ee.sibling),ke=x(ee,ae),ke.return=oe,oe=ke):(a(oe,ee),ke=Jm(ae,oe.mode,ke),ke.return=oe,oe=ke),j(oe)):a(oe,ee)}return function(oe,ee,ae,ke){try{bc=0;var it=cn(oe,ee,ae,ke);return ra=null,it}catch(Qe){if(Qe===na||Qe===yf)throw Qe;var qt=Kr(29,Qe,null,oe.mode);return qt.lanes=ke,qt.return=oe,qt}}}var ll=b0(!0),v0=b0(!1),ts=!1;function cp(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function up(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ns(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function rs(r,o,a){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(Xt&2)!==0){var x=f.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),f.pending=o,o=df(r),r0(r,null,a),o}return ff(r,f,o,a),df(r)}function wc(r,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194048)!==0)){var f=o.lanes;f&=r.pendingLanes,a|=f,o.lanes=a,lr(r,a)}}function fp(r,o){var a=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,a===f)){var x=null,v=null;if(a=a.firstBaseUpdate,a!==null){do{var j={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};v===null?x=v=j:v=v.next=j,a=a.next}while(a!==null);v===null?x=v=o:v=v.next=o}else x=v=o;a={baseState:f.baseState,firstBaseUpdate:x,lastBaseUpdate:v,shared:f.shared,callbacks:f.callbacks},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=o:r.next=o,a.lastBaseUpdate=o}var dp=!1;function Sc(){if(dp){var r=ta;if(r!==null)throw r}}function kc(r,o,a,f){dp=!1;var x=r.updateQueue;ts=!1;var v=x.firstBaseUpdate,j=x.lastBaseUpdate,H=x.shared.pending;if(H!==null){x.shared.pending=null;var X=H,ce=X.next;X.next=null,j===null?v=ce:j.next=ce,j=X;var be=r.alternate;be!==null&&(be=be.updateQueue,H=be.lastBaseUpdate,H!==j&&(H===null?be.firstBaseUpdate=ce:H.next=ce,be.lastBaseUpdate=X))}if(v!==null){var Ee=x.baseState;j=0,be=ce=X=null,H=v;do{var ue=H.lane&-536870913,he=ue!==H.lane;if(he?(zt&ue)===ue:(f&ue)===ue){ue!==0&&ue===ea&&(dp=!0),be!==null&&(be=be.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var We=r,ct=H;ue=o;var cn=a;switch(ct.tag){case 1:if(We=ct.payload,typeof We=="function"){Ee=We.call(cn,Ee,ue);break e}Ee=We;break e;case 3:We.flags=We.flags&-65537|128;case 0:if(We=ct.payload,ue=typeof We=="function"?We.call(cn,Ee,ue):We,ue==null)break e;Ee=g({},Ee,ue);break e;case 2:ts=!0}}ue=H.callback,ue!==null&&(r.flags|=64,he&&(r.flags|=8192),he=x.callbacks,he===null?x.callbacks=[ue]:he.push(ue))}else he={lane:ue,tag:H.tag,payload:H.payload,callback:H.callback,next:null},be===null?(ce=be=he,X=Ee):be=be.next=he,j|=ue;if(H=H.next,H===null){if(H=x.shared.pending,H===null)break;he=H,H=he.next,he.next=null,x.lastBaseUpdate=he,x.shared.pending=null}}while(!0);be===null&&(X=Ee),x.baseState=X,x.firstBaseUpdate=ce,x.lastBaseUpdate=be,v===null&&(x.shared.lanes=0),as|=j,r.lanes=j,r.memoizedState=Ee}}function w0(r,o){if(typeof r!="function")throw Error(i(191,r));r.call(o)}function S0(r,o){var a=r.callbacks;if(a!==null)for(r.callbacks=null,r=0;r<a.length;r++)w0(a[r],o)}var ia=_(null),Sf=_(0);function k0(r,o){r=Co,z(Sf,r),z(ia,o),Co=r|o.baseLanes}function hp(){z(Sf,Co),z(ia,ia.current)}function mp(){Co=Sf.current,Z(ia),Z(Sf)}var Xr=_(null),fi=null;function is(r){var o=r.alternate;z(_n,_n.current&1),z(Xr,r),fi===null&&(o===null||ia.current!==null||o.memoizedState!==null)&&(fi=r)}function pp(r){z(_n,_n.current),z(Xr,r),fi===null&&(fi=r)}function E0(r){r.tag===22?(z(_n,_n.current),z(Xr,r),fi===null&&(fi=r)):os()}function os(){z(_n,_n.current),z(Xr,Xr.current)}function Jr(r){Z(Xr),fi===r&&(fi=null),Z(_n)}var _n=_(0);function kf(r){for(var o=r;o!==null;){if(o.tag===13){var a=o.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||wg(a)||Sg(a)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var xo=0,bt=null,ln=null,qn=null,Ef=!1,oa=!1,al=!1,Cf=0,Ec=0,sa=null,AA=0;function jn(){throw Error(i(321))}function gp(r,o){if(o===null)return!1;for(var a=0;a<o.length&&a<r.length;a++)if(!Yr(r[a],o[a]))return!1;return!0}function xp(r,o,a,f,x,v){return xo=v,bt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,F.H=r===null||r.memoizedState===null?l1:Mp,al=!1,v=a(f,x),al=!1,oa&&(v=T0(o,a,f,x)),C0(r),v}function C0(r){F.H=Rc;var o=ln!==null&&ln.next!==null;if(xo=0,qn=ln=bt=null,Ef=!1,Ec=0,sa=null,o)throw Error(i(300));r===null||Gn||(r=r.dependencies,r!==null&&pf(r)&&(Gn=!0))}function T0(r,o,a,f){bt=r;var x=0;do{if(oa&&(sa=null),Ec=0,oa=!1,25<=x)throw Error(i(301));if(x+=1,qn=ln=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}F.H=a1,v=o(a,f)}while(oa);return v}function MA(){var r=F.H,o=r.useState()[0];return o=typeof o.then=="function"?Cc(o):o,r=r.useState()[0],(ln!==null?ln.memoizedState:null)!==r&&(bt.flags|=1024),o}function yp(){var r=Cf!==0;return Cf=0,r}function bp(r,o,a){o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~a}function vp(r){if(Ef){for(r=r.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ef=!1}xo=0,qn=ln=bt=null,oa=!1,Ec=Cf=0,sa=null}function Rr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qn===null?bt.memoizedState=qn=r:qn=qn.next=r,qn}function Pn(){if(ln===null){var r=bt.alternate;r=r!==null?r.memoizedState:null}else r=ln.next;var o=qn===null?bt.memoizedState:qn.next;if(o!==null)qn=o,ln=r;else{if(r===null)throw bt.alternate===null?Error(i(467)):Error(i(310));ln=r,r={memoizedState:ln.memoizedState,baseState:ln.baseState,baseQueue:ln.baseQueue,queue:ln.queue,next:null},qn===null?bt.memoizedState=qn=r:qn=qn.next=r}return qn}function Tf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cc(r){var o=Ec;return Ec+=1,sa===null&&(sa=[]),r=g0(sa,r,o),o=bt,(qn===null?o.memoizedState:qn.next)===null&&(o=o.alternate,F.H=o===null||o.memoizedState===null?l1:Mp),r}function Rf(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Cc(r);if(r.$$typeof===R)return fr(r)}throw Error(i(438,String(r)))}function wp(r){var o=null,a=bt.updateQueue;if(a!==null&&(o=a.memoCache),o==null){var f=bt.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(o={data:f.data.map(function(x){return x.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),a===null&&(a=Tf(),bt.updateQueue=a),a.memoCache=o,a=o.data[o.index],a===void 0)for(a=o.data[o.index]=Array(r),f=0;f<r;f++)a[f]=D;return o.index++,a}function yo(r,o){return typeof o=="function"?o(r):o}function jf(r){var o=Pn();return Sp(o,ln,r)}function Sp(r,o,a){var f=r.queue;if(f===null)throw Error(i(311));f.lastRenderedReducer=a;var x=r.baseQueue,v=f.pending;if(v!==null){if(x!==null){var j=x.next;x.next=v.next,v.next=j}o.baseQueue=x=v,f.pending=null}if(v=r.baseState,x===null)r.memoizedState=v;else{o=x.next;var H=j=null,X=null,ce=o,be=!1;do{var Ee=ce.lane&-536870913;if(Ee!==ce.lane?(zt&Ee)===Ee:(xo&Ee)===Ee){var ue=ce.revertLane;if(ue===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),Ee===ea&&(be=!0);else if((xo&ue)===ue){ce=ce.next,ue===ea&&(be=!0);continue}else Ee={lane:0,revertLane:ce.revertLane,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},X===null?(H=X=Ee,j=v):X=X.next=Ee,bt.lanes|=ue,as|=ue;Ee=ce.action,al&&a(v,Ee),v=ce.hasEagerState?ce.eagerState:a(v,Ee)}else ue={lane:Ee,revertLane:ce.revertLane,gesture:ce.gesture,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},X===null?(H=X=ue,j=v):X=X.next=ue,bt.lanes|=Ee,as|=Ee;ce=ce.next}while(ce!==null&&ce!==o);if(X===null?j=v:X.next=H,!Yr(v,r.memoizedState)&&(Gn=!0,be&&(a=ta,a!==null)))throw a;r.memoizedState=v,r.baseState=j,r.baseQueue=X,f.lastRenderedState=v}return x===null&&(f.lanes=0),[r.memoizedState,f.dispatch]}function kp(r){var o=Pn(),a=o.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=r;var f=a.dispatch,x=a.pending,v=o.memoizedState;if(x!==null){a.pending=null;var j=x=x.next;do v=r(v,j.action),j=j.next;while(j!==x);Yr(v,o.memoizedState)||(Gn=!0),o.memoizedState=v,o.baseQueue===null&&(o.baseState=v),a.lastRenderedState=v}return[v,f]}function R0(r,o,a){var f=bt,x=Pn(),v=Lt;if(v){if(a===void 0)throw Error(i(407));a=a()}else a=o();var j=!Yr((ln||x).memoizedState,a);if(j&&(x.memoizedState=a,Gn=!0),x=x.queue,Tp(O0.bind(null,f,x,r),[r]),x.getSnapshot!==o||j||qn!==null&&qn.memoizedState.tag&1){if(f.flags|=2048,la(9,{destroy:void 0},N0.bind(null,f,x,a,o),null),hn===null)throw Error(i(349));v||(xo&127)!==0||j0(f,o,a)}return a}function j0(r,o,a){r.flags|=16384,r={getSnapshot:o,value:a},o=bt.updateQueue,o===null?(o=Tf(),bt.updateQueue=o,o.stores=[r]):(a=o.stores,a===null?o.stores=[r]:a.push(r))}function N0(r,o,a,f){o.value=a,o.getSnapshot=f,A0(o)&&M0(r)}function O0(r,o,a){return a(function(){A0(o)&&M0(r)})}function A0(r){var o=r.getSnapshot;r=r.value;try{var a=o();return!Yr(r,a)}catch{return!0}}function M0(r){var o=Qs(r,2);o!==null&&_r(o,r,2)}function Ep(r){var o=Rr();if(typeof r=="function"){var a=r;if(r=a(),al){Nt(!0);try{a()}finally{Nt(!1)}}}return o.memoizedState=o.baseState=r,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:r},o}function z0(r,o,a,f){return r.baseState=a,Sp(r,ln,typeof f=="function"?f:yo)}function zA(r,o,a,f,x){if(Af(r))throw Error(i(485));if(r=o.action,r!==null){var v={payload:x,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){v.listeners.push(j)}};F.T!==null?a(!0):v.isTransition=!1,f(v),a=o.pending,a===null?(v.next=o.pending=v,I0(o,v)):(v.next=a.next,o.pending=a.next=v)}}function I0(r,o){var a=o.action,f=o.payload,x=r.state;if(o.isTransition){var v=F.T,j={};F.T=j;try{var H=a(x,f),X=F.S;X!==null&&X(j,H),D0(r,o,H)}catch(ce){Cp(r,o,ce)}finally{v!==null&&j.types!==null&&(v.types=j.types),F.T=v}}else try{v=a(x,f),D0(r,o,v)}catch(ce){Cp(r,o,ce)}}function D0(r,o,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(f){_0(r,o,f)},function(f){return Cp(r,o,f)}):_0(r,o,a)}function _0(r,o,a){o.status="fulfilled",o.value=a,P0(o),r.state=a,o=r.pending,o!==null&&(a=o.next,a===o?r.pending=null:(a=a.next,o.next=a,I0(r,a)))}function Cp(r,o,a){var f=r.pending;if(r.pending=null,f!==null){f=f.next;do o.status="rejected",o.reason=a,P0(o),o=o.next;while(o!==f)}r.action=null}function P0(r){r=r.listeners;for(var o=0;o<r.length;o++)(0,r[o])()}function L0(r,o){return o}function F0(r,o){if(Lt){var a=hn.formState;if(a!==null){e:{var f=bt;if(Lt){if(bn){t:{for(var x=bn,v=ui;x.nodeType!==8;){if(!v){x=null;break t}if(x=di(x.nextSibling),x===null){x=null;break t}}v=x.data,x=v==="F!"||v==="F"?x:null}if(x){bn=di(x.nextSibling),f=x.data==="F!";break e}}Qo(f)}f=!1}f&&(o=a[0])}}return a=Rr(),a.memoizedState=a.baseState=o,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:L0,lastRenderedState:o},a.queue=f,a=i1.bind(null,bt,f),f.dispatch=a,f=Ep(!1),v=Ap.bind(null,bt,!1,f.queue),f=Rr(),x={state:o,dispatch:null,action:r,pending:null},f.queue=x,a=zA.bind(null,bt,x,v,a),x.dispatch=a,f.memoizedState=r,[o,a,!1]}function H0(r){var o=Pn();return B0(o,ln,r)}function B0(r,o,a){if(o=Sp(r,o,L0)[0],r=jf(yo)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var f=Cc(o)}catch(j){throw j===na?yf:j}else f=o;o=Pn();var x=o.queue,v=x.dispatch;return a!==o.memoizedState&&(bt.flags|=2048,la(9,{destroy:void 0},IA.bind(null,x,a),null)),[f,v,r]}function IA(r,o){r.action=o}function V0(r){var o=Pn(),a=ln;if(a!==null)return B0(o,a,r);Pn(),o=o.memoizedState,a=Pn();var f=a.queue.dispatch;return a.memoizedState=r,[o,f,!1]}function la(r,o,a,f){return r={tag:r,create:a,deps:f,inst:o,next:null},o=bt.updateQueue,o===null&&(o=Tf(),bt.updateQueue=o),a=o.lastEffect,a===null?o.lastEffect=r.next=r:(f=a.next,a.next=r,r.next=f,o.lastEffect=r),r}function U0(){return Pn().memoizedState}function Nf(r,o,a,f){var x=Rr();bt.flags|=r,x.memoizedState=la(1|o,{destroy:void 0},a,f===void 0?null:f)}function Of(r,o,a,f){var x=Pn();f=f===void 0?null:f;var v=x.memoizedState.inst;ln!==null&&f!==null&&gp(f,ln.memoizedState.deps)?x.memoizedState=la(o,v,a,f):(bt.flags|=r,x.memoizedState=la(1|o,v,a,f))}function Z0(r,o){Nf(8390656,8,r,o)}function Tp(r,o){Of(2048,8,r,o)}function DA(r){bt.flags|=4;var o=bt.updateQueue;if(o===null)o=Tf(),bt.updateQueue=o,o.events=[r];else{var a=o.events;a===null?o.events=[r]:a.push(r)}}function q0(r){var o=Pn().memoizedState;return DA({ref:o,nextImpl:r}),function(){if((Xt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}function G0(r,o){return Of(4,2,r,o)}function Y0(r,o){return Of(4,4,r,o)}function K0(r,o){if(typeof o=="function"){r=r();var a=o(r);return function(){typeof a=="function"?a():o(null)}}if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function X0(r,o,a){a=a!=null?a.concat([r]):null,Of(4,4,K0.bind(null,o,r),a)}function Rp(){}function J0(r,o){var a=Pn();o=o===void 0?null:o;var f=a.memoizedState;return o!==null&&gp(o,f[1])?f[0]:(a.memoizedState=[r,o],r)}function W0(r,o){var a=Pn();o=o===void 0?null:o;var f=a.memoizedState;if(o!==null&&gp(o,f[1]))return f[0];if(f=r(),al){Nt(!0);try{r()}finally{Nt(!1)}}return a.memoizedState=[f,o],f}function jp(r,o,a){return a===void 0||(xo&1073741824)!==0&&(zt&261930)===0?r.memoizedState=o:(r.memoizedState=a,r=$1(),bt.lanes|=r,as|=r,a)}function $0(r,o,a,f){return Yr(a,o)?a:ia.current!==null?(r=jp(r,a,f),Yr(r,o)||(Gn=!0),r):(xo&42)===0||(xo&1073741824)!==0&&(zt&261930)===0?(Gn=!0,r.memoizedState=a):(r=$1(),bt.lanes|=r,as|=r,o)}function Q0(r,o,a,f,x){var v=V.p;V.p=v!==0&&8>v?v:8;var j=F.T,H={};F.T=H,Ap(r,!1,o,a);try{var X=x(),ce=F.S;if(ce!==null&&ce(H,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var be=OA(X,f);Tc(r,o,be,Qr(r))}else Tc(r,o,f,Qr(r))}catch(Ee){Tc(r,o,{then:function(){},status:"rejected",reason:Ee},Qr())}finally{V.p=v,j!==null&&H.types!==null&&(j.types=H.types),F.T=j}}function _A(){}function Np(r,o,a,f){if(r.tag!==5)throw Error(i(476));var x=e1(r).queue;Q0(r,x,o,Y,a===null?_A:function(){return t1(r),a(f)})}function e1(r){var o=r.memoizedState;if(o!==null)return o;o={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:Y},next:null};var a={};return o.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:a},next:null},r.memoizedState=o,r=r.alternate,r!==null&&(r.memoizedState=o),o}function t1(r){var o=e1(r);o.next===null&&(o=r.alternate.memoizedState),Tc(r,o.next.queue,{},Qr())}function Op(){return fr(Uc)}function n1(){return Pn().memoizedState}function r1(){return Pn().memoizedState}function PA(r){for(var o=r.return;o!==null;){switch(o.tag){case 24:case 3:var a=Qr();r=ns(a);var f=rs(o,r,a);f!==null&&(_r(f,o,a),wc(f,o,a)),o={cache:op()},r.payload=o;return}o=o.return}}function LA(r,o,a){var f=Qr();a={lane:f,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Af(r)?o1(o,a):(a=Km(r,o,a,f),a!==null&&(_r(a,r,f),s1(a,o,f)))}function i1(r,o,a){var f=Qr();Tc(r,o,a,f)}function Tc(r,o,a,f){var x={lane:f,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Af(r))o1(o,x);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=o.lastRenderedReducer,v!==null))try{var j=o.lastRenderedState,H=v(j,a);if(x.hasEagerState=!0,x.eagerState=H,Yr(H,j))return ff(r,o,x,0),hn===null&&uf(),!1}catch{}if(a=Km(r,o,x,f),a!==null)return _r(a,r,f),s1(a,o,f),!0}return!1}function Ap(r,o,a,f){if(f={lane:2,revertLane:cg(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Af(r)){if(o)throw Error(i(479))}else o=Km(r,a,f,2),o!==null&&_r(o,r,2)}function Af(r){var o=r.alternate;return r===bt||o!==null&&o===bt}function o1(r,o){oa=Ef=!0;var a=r.pending;a===null?o.next=o:(o.next=a.next,a.next=o),r.pending=o}function s1(r,o,a){if((a&4194048)!==0){var f=o.lanes;f&=r.pendingLanes,a|=f,o.lanes=a,lr(r,a)}}var Rc={readContext:fr,use:Rf,useCallback:jn,useContext:jn,useEffect:jn,useImperativeHandle:jn,useLayoutEffect:jn,useInsertionEffect:jn,useMemo:jn,useReducer:jn,useRef:jn,useState:jn,useDebugValue:jn,useDeferredValue:jn,useTransition:jn,useSyncExternalStore:jn,useId:jn,useHostTransitionStatus:jn,useFormState:jn,useActionState:jn,useOptimistic:jn,useMemoCache:jn,useCacheRefresh:jn};Rc.useEffectEvent=jn;var l1={readContext:fr,use:Rf,useCallback:function(r,o){return Rr().memoizedState=[r,o===void 0?null:o],r},useContext:fr,useEffect:Z0,useImperativeHandle:function(r,o,a){a=a!=null?a.concat([r]):null,Nf(4194308,4,K0.bind(null,o,r),a)},useLayoutEffect:function(r,o){return Nf(4194308,4,r,o)},useInsertionEffect:function(r,o){Nf(4,2,r,o)},useMemo:function(r,o){var a=Rr();o=o===void 0?null:o;var f=r();if(al){Nt(!0);try{r()}finally{Nt(!1)}}return a.memoizedState=[f,o],f},useReducer:function(r,o,a){var f=Rr();if(a!==void 0){var x=a(o);if(al){Nt(!0);try{a(o)}finally{Nt(!1)}}}else x=o;return f.memoizedState=f.baseState=x,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:x},f.queue=r,r=r.dispatch=LA.bind(null,bt,r),[f.memoizedState,r]},useRef:function(r){var o=Rr();return r={current:r},o.memoizedState=r},useState:function(r){r=Ep(r);var o=r.queue,a=i1.bind(null,bt,o);return o.dispatch=a,[r.memoizedState,a]},useDebugValue:Rp,useDeferredValue:function(r,o){var a=Rr();return jp(a,r,o)},useTransition:function(){var r=Ep(!1);return r=Q0.bind(null,bt,r.queue,!0,!1),Rr().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,o,a){var f=bt,x=Rr();if(Lt){if(a===void 0)throw Error(i(407));a=a()}else{if(a=o(),hn===null)throw Error(i(349));(zt&127)!==0||j0(f,o,a)}x.memoizedState=a;var v={value:a,getSnapshot:o};return x.queue=v,Z0(O0.bind(null,f,v,r),[r]),f.flags|=2048,la(9,{destroy:void 0},N0.bind(null,f,v,a,o),null),a},useId:function(){var r=Rr(),o=hn.identifierPrefix;if(Lt){var a=Xi,f=Ki;a=(f&~(1<<32-Je(f)-1)).toString(32)+a,o="_"+o+"R_"+a,a=Cf++,0<a&&(o+="H"+a.toString(32)),o+="_"}else a=AA++,o="_"+o+"r_"+a.toString(32)+"_";return r.memoizedState=o},useHostTransitionStatus:Op,useFormState:F0,useActionState:F0,useOptimistic:function(r){var o=Rr();o.memoizedState=o.baseState=r;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=a,o=Ap.bind(null,bt,!0,a),a.dispatch=o,[r,o]},useMemoCache:wp,useCacheRefresh:function(){return Rr().memoizedState=PA.bind(null,bt)},useEffectEvent:function(r){var o=Rr(),a={impl:r};return o.memoizedState=a,function(){if((Xt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Mp={readContext:fr,use:Rf,useCallback:J0,useContext:fr,useEffect:Tp,useImperativeHandle:X0,useInsertionEffect:G0,useLayoutEffect:Y0,useMemo:W0,useReducer:jf,useRef:U0,useState:function(){return jf(yo)},useDebugValue:Rp,useDeferredValue:function(r,o){var a=Pn();return $0(a,ln.memoizedState,r,o)},useTransition:function(){var r=jf(yo)[0],o=Pn().memoizedState;return[typeof r=="boolean"?r:Cc(r),o]},useSyncExternalStore:R0,useId:n1,useHostTransitionStatus:Op,useFormState:H0,useActionState:H0,useOptimistic:function(r,o){var a=Pn();return z0(a,ln,r,o)},useMemoCache:wp,useCacheRefresh:r1};Mp.useEffectEvent=q0;var a1={readContext:fr,use:Rf,useCallback:J0,useContext:fr,useEffect:Tp,useImperativeHandle:X0,useInsertionEffect:G0,useLayoutEffect:Y0,useMemo:W0,useReducer:kp,useRef:U0,useState:function(){return kp(yo)},useDebugValue:Rp,useDeferredValue:function(r,o){var a=Pn();return ln===null?jp(a,r,o):$0(a,ln.memoizedState,r,o)},useTransition:function(){var r=kp(yo)[0],o=Pn().memoizedState;return[typeof r=="boolean"?r:Cc(r),o]},useSyncExternalStore:R0,useId:n1,useHostTransitionStatus:Op,useFormState:V0,useActionState:V0,useOptimistic:function(r,o){var a=Pn();return ln!==null?z0(a,ln,r,o):(a.baseState=r,[r,a.queue.dispatch])},useMemoCache:wp,useCacheRefresh:r1};a1.useEffectEvent=q0;function zp(r,o,a,f){o=r.memoizedState,a=a(f,o),a=a==null?o:g({},o,a),r.memoizedState=a,r.lanes===0&&(r.updateQueue.baseState=a)}var Ip={enqueueSetState:function(r,o,a){r=r._reactInternals;var f=Qr(),x=ns(f);x.payload=o,a!=null&&(x.callback=a),o=rs(r,x,f),o!==null&&(_r(o,r,f),wc(o,r,f))},enqueueReplaceState:function(r,o,a){r=r._reactInternals;var f=Qr(),x=ns(f);x.tag=1,x.payload=o,a!=null&&(x.callback=a),o=rs(r,x,f),o!==null&&(_r(o,r,f),wc(o,r,f))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var a=Qr(),f=ns(a);f.tag=2,o!=null&&(f.callback=o),o=rs(r,f,a),o!==null&&(_r(o,r,a),wc(o,r,a))}};function c1(r,o,a,f,x,v,j){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,v,j):o.prototype&&o.prototype.isPureReactComponent?!hc(a,f)||!hc(x,v):!0}function u1(r,o,a,f){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(a,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(a,f),o.state!==r&&Ip.enqueueReplaceState(o,o.state,null)}function cl(r,o){var a=o;if("ref"in o){a={};for(var f in o)f!=="ref"&&(a[f]=o[f])}if(r=r.defaultProps){a===o&&(a=g({},a));for(var x in r)a[x]===void 0&&(a[x]=r[x])}return a}function f1(r){cf(r)}function d1(r){console.error(r)}function h1(r){cf(r)}function Mf(r,o){try{var a=r.onUncaughtError;a(o.value,{componentStack:o.stack})}catch(f){setTimeout(function(){throw f})}}function m1(r,o,a){try{var f=r.onCaughtError;f(a.value,{componentStack:a.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function Dp(r,o,a){return a=ns(a),a.tag=3,a.payload={element:null},a.callback=function(){Mf(r,o)},a}function p1(r){return r=ns(r),r.tag=3,r}function g1(r,o,a,f){var x=a.type.getDerivedStateFromError;if(typeof x=="function"){var v=f.value;r.payload=function(){return x(v)},r.callback=function(){m1(o,a,f)}}var j=a.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(r.callback=function(){m1(o,a,f),typeof x!="function"&&(cs===null?cs=new Set([this]):cs.add(this));var H=f.stack;this.componentDidCatch(f.value,{componentStack:H!==null?H:""})})}function FA(r,o,a,f,x){if(a.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(o=a.alternate,o!==null&&Ql(o,a,x,!0),a=Xr.current,a!==null){switch(a.tag){case 31:case 13:return fi===null?Zf():a.alternate===null&&Nn===0&&(Nn=3),a.flags&=-257,a.flags|=65536,a.lanes=x,f===bf?a.flags|=16384:(o=a.updateQueue,o===null?a.updateQueue=new Set([f]):o.add(f),sg(r,f,x)),!1;case 22:return a.flags|=65536,f===bf?a.flags|=16384:(o=a.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([f])},a.updateQueue=o):(a=o.retryQueue,a===null?o.retryQueue=new Set([f]):a.add(f)),sg(r,f,x)),!1}throw Error(i(435,a.tag))}return sg(r,f,x),Zf(),!1}if(Lt)return o=Xr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=x,f!==ep&&(r=Error(i(422),{cause:f}),gc(li(r,a)))):(f!==ep&&(o=Error(i(423),{cause:f}),gc(li(o,a))),r=r.current.alternate,r.flags|=65536,x&=-x,r.lanes|=x,f=li(f,a),x=Dp(r.stateNode,f,x),fp(r,x),Nn!==4&&(Nn=2)),!1;var v=Error(i(520),{cause:f});if(v=li(v,a),Dc===null?Dc=[v]:Dc.push(v),Nn!==4&&(Nn=2),o===null)return!0;f=li(f,a),a=o;do{switch(a.tag){case 3:return a.flags|=65536,r=x&-x,a.lanes|=r,r=Dp(a.stateNode,f,r),fp(a,r),!1;case 1:if(o=a.type,v=a.stateNode,(a.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(cs===null||!cs.has(v))))return a.flags|=65536,x&=-x,a.lanes|=x,x=p1(x),g1(x,r,a,f),fp(a,x),!1}a=a.return}while(a!==null);return!1}var _p=Error(i(461)),Gn=!1;function dr(r,o,a,f){o.child=r===null?v0(o,null,a,f):ll(o,r.child,a,f)}function x1(r,o,a,f,x){a=a.render;var v=o.ref;if("ref"in f){var j={};for(var H in f)H!=="ref"&&(j[H]=f[H])}else j=f;return rl(o),f=xp(r,o,a,j,v,x),H=yp(),r!==null&&!Gn?(bp(r,o,x),bo(r,o,x)):(Lt&&H&&$m(o),o.flags|=1,dr(r,o,f,x),o.child)}function y1(r,o,a,f,x){if(r===null){var v=a.type;return typeof v=="function"&&!Xm(v)&&v.defaultProps===void 0&&a.compare===null?(o.tag=15,o.type=v,b1(r,o,v,f,x)):(r=hf(a.type,null,f,o,o.mode,x),r.ref=o.ref,r.return=o,o.child=r)}if(v=r.child,!Zp(r,x)){var j=v.memoizedProps;if(a=a.compare,a=a!==null?a:hc,a(j,f)&&r.ref===o.ref)return bo(r,o,x)}return o.flags|=1,r=ho(v,f),r.ref=o.ref,r.return=o,o.child=r}function b1(r,o,a,f,x){if(r!==null){var v=r.memoizedProps;if(hc(v,f)&&r.ref===o.ref)if(Gn=!1,o.pendingProps=f=v,Zp(r,x))(r.flags&131072)!==0&&(Gn=!0);else return o.lanes=r.lanes,bo(r,o,x)}return Pp(r,o,a,f,x)}function v1(r,o,a,f){var x=f.children,v=r!==null?r.memoizedState:null;if(r===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((o.flags&128)!==0){if(v=v!==null?v.baseLanes|a:a,r!==null){for(f=o.child=r.child,x=0;f!==null;)x=x|f.lanes|f.childLanes,f=f.sibling;f=x&~v}else f=0,o.child=null;return w1(r,o,v,a,f)}if((a&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},r!==null&&xf(o,v!==null?v.cachePool:null),v!==null?k0(o,v):hp(),E0(o);else return f=o.lanes=536870912,w1(r,o,v!==null?v.baseLanes|a:a,a,f)}else v!==null?(xf(o,v.cachePool),k0(o,v),os(),o.memoizedState=null):(r!==null&&xf(o,null),hp(),os());return dr(r,o,x,a),o.child}function jc(r,o){return r!==null&&r.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function w1(r,o,a,f,x){var v=lp();return v=v===null?null:{parent:Zn._currentValue,pool:v},o.memoizedState={baseLanes:a,cachePool:v},r!==null&&xf(o,null),hp(),E0(o),r!==null&&Ql(r,o,f,!0),o.childLanes=x,null}function zf(r,o){return o=Df({mode:o.mode,children:o.children},r.mode),o.ref=r.ref,r.child=o,o.return=r,o}function S1(r,o,a){return ll(o,r.child,null,a),r=zf(o,o.pendingProps),r.flags|=2,Jr(o),o.memoizedState=null,r}function HA(r,o,a){var f=o.pendingProps,x=(o.flags&128)!==0;if(o.flags&=-129,r===null){if(Lt){if(f.mode==="hidden")return r=zf(o,f),o.lanes=536870912,jc(null,r);if(pp(o),(r=bn)?(r=Iw(r,ui),r=r!==null&&r.data==="&"?r:null,r!==null&&(o.memoizedState={dehydrated:r,treeContext:Wo!==null?{id:Ki,overflow:Xi}:null,retryLane:536870912,hydrationErrors:null},a=o0(r),a.return=o,o.child=a,ur=o,bn=null)):r=null,r===null)throw Qo(o);return o.lanes=536870912,null}return zf(o,f)}var v=r.memoizedState;if(v!==null){var j=v.dehydrated;if(pp(o),x)if(o.flags&256)o.flags&=-257,o=S1(r,o,a);else if(o.memoizedState!==null)o.child=r.child,o.flags|=128,o=null;else throw Error(i(558));else if(Gn||Ql(r,o,a,!1),x=(a&r.childLanes)!==0,Gn||x){if(f=hn,f!==null&&(j=st(f,a),j!==0&&j!==v.retryLane))throw v.retryLane=j,Qs(r,j),_r(f,r,j),_p;Zf(),o=S1(r,o,a)}else r=v.treeContext,bn=di(j.nextSibling),ur=o,Lt=!0,$o=null,ui=!1,r!==null&&a0(o,r),o=zf(o,f),o.flags|=4096;return o}return r=ho(r.child,{mode:f.mode,children:f.children}),r.ref=o.ref,o.child=r,r.return=o,r}function If(r,o){var a=o.ref;if(a===null)r!==null&&r.ref!==null&&(o.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(r===null||r.ref!==a)&&(o.flags|=4194816)}}function Pp(r,o,a,f,x){return rl(o),a=xp(r,o,a,f,void 0,x),f=yp(),r!==null&&!Gn?(bp(r,o,x),bo(r,o,x)):(Lt&&f&&$m(o),o.flags|=1,dr(r,o,a,x),o.child)}function k1(r,o,a,f,x,v){return rl(o),o.updateQueue=null,a=T0(o,f,a,x),C0(r),f=yp(),r!==null&&!Gn?(bp(r,o,v),bo(r,o,v)):(Lt&&f&&$m(o),o.flags|=1,dr(r,o,a,v),o.child)}function E1(r,o,a,f,x){if(rl(o),o.stateNode===null){var v=Xl,j=a.contextType;typeof j=="object"&&j!==null&&(v=fr(j)),v=new a(f,v),o.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Ip,o.stateNode=v,v._reactInternals=o,v=o.stateNode,v.props=f,v.state=o.memoizedState,v.refs={},cp(o),j=a.contextType,v.context=typeof j=="object"&&j!==null?fr(j):Xl,v.state=o.memoizedState,j=a.getDerivedStateFromProps,typeof j=="function"&&(zp(o,a,j,f),v.state=o.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(j=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),j!==v.state&&Ip.enqueueReplaceState(v,v.state,null),kc(o,f,v,x),Sc(),v.state=o.memoizedState),typeof v.componentDidMount=="function"&&(o.flags|=4194308),f=!0}else if(r===null){v=o.stateNode;var H=o.memoizedProps,X=cl(a,H);v.props=X;var ce=v.context,be=a.contextType;j=Xl,typeof be=="object"&&be!==null&&(j=fr(be));var Ee=a.getDerivedStateFromProps;be=typeof Ee=="function"||typeof v.getSnapshotBeforeUpdate=="function",H=o.pendingProps!==H,be||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(H||ce!==j)&&u1(o,v,f,j),ts=!1;var ue=o.memoizedState;v.state=ue,kc(o,f,v,x),Sc(),ce=o.memoizedState,H||ue!==ce||ts?(typeof Ee=="function"&&(zp(o,a,Ee,f),ce=o.memoizedState),(X=ts||c1(o,a,X,f,ue,ce,j))?(be||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=ce),v.props=f,v.state=ce,v.context=j,f=X):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{v=o.stateNode,up(r,o),j=o.memoizedProps,be=cl(a,j),v.props=be,Ee=o.pendingProps,ue=v.context,ce=a.contextType,X=Xl,typeof ce=="object"&&ce!==null&&(X=fr(ce)),H=a.getDerivedStateFromProps,(ce=typeof H=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(j!==Ee||ue!==X)&&u1(o,v,f,X),ts=!1,ue=o.memoizedState,v.state=ue,kc(o,f,v,x),Sc();var he=o.memoizedState;j!==Ee||ue!==he||ts||r!==null&&r.dependencies!==null&&pf(r.dependencies)?(typeof H=="function"&&(zp(o,a,H,f),he=o.memoizedState),(be=ts||c1(o,a,be,f,ue,he,X)||r!==null&&r.dependencies!==null&&pf(r.dependencies))?(ce||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(f,he,X),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(f,he,X)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||j===r.memoizedProps&&ue===r.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===r.memoizedProps&&ue===r.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=he),v.props=f,v.state=he,v.context=X,f=be):(typeof v.componentDidUpdate!="function"||j===r.memoizedProps&&ue===r.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===r.memoizedProps&&ue===r.memoizedState||(o.flags|=1024),f=!1)}return v=f,If(r,o),f=(o.flags&128)!==0,v||f?(v=o.stateNode,a=f&&typeof a.getDerivedStateFromError!="function"?null:v.render(),o.flags|=1,r!==null&&f?(o.child=ll(o,r.child,null,x),o.child=ll(o,null,a,x)):dr(r,o,a,x),o.memoizedState=v.state,r=o.child):r=bo(r,o,x),r}function C1(r,o,a,f){return tl(),o.flags|=256,dr(r,o,a,f),o.child}var Lp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fp(r){return{baseLanes:r,cachePool:m0()}}function Hp(r,o,a){return r=r!==null?r.childLanes&~a:0,o&&(r|=$r),r}function T1(r,o,a){var f=o.pendingProps,x=!1,v=(o.flags&128)!==0,j;if((j=v)||(j=r!==null&&r.memoizedState===null?!1:(_n.current&2)!==0),j&&(x=!0,o.flags&=-129),j=(o.flags&32)!==0,o.flags&=-33,r===null){if(Lt){if(x?is(o):os(),(r=bn)?(r=Iw(r,ui),r=r!==null&&r.data!=="&"?r:null,r!==null&&(o.memoizedState={dehydrated:r,treeContext:Wo!==null?{id:Ki,overflow:Xi}:null,retryLane:536870912,hydrationErrors:null},a=o0(r),a.return=o,o.child=a,ur=o,bn=null)):r=null,r===null)throw Qo(o);return Sg(r)?o.lanes=32:o.lanes=536870912,null}var H=f.children;return f=f.fallback,x?(os(),x=o.mode,H=Df({mode:"hidden",children:H},x),f=el(f,x,a,null),H.return=o,f.return=o,H.sibling=f,o.child=H,f=o.child,f.memoizedState=Fp(a),f.childLanes=Hp(r,j,a),o.memoizedState=Lp,jc(null,f)):(is(o),Bp(o,H))}var X=r.memoizedState;if(X!==null&&(H=X.dehydrated,H!==null)){if(v)o.flags&256?(is(o),o.flags&=-257,o=Vp(r,o,a)):o.memoizedState!==null?(os(),o.child=r.child,o.flags|=128,o=null):(os(),H=f.fallback,x=o.mode,f=Df({mode:"visible",children:f.children},x),H=el(H,x,a,null),H.flags|=2,f.return=o,H.return=o,f.sibling=H,o.child=f,ll(o,r.child,null,a),f=o.child,f.memoizedState=Fp(a),f.childLanes=Hp(r,j,a),o.memoizedState=Lp,o=jc(null,f));else if(is(o),Sg(H)){if(j=H.nextSibling&&H.nextSibling.dataset,j)var ce=j.dgst;j=ce,f=Error(i(419)),f.stack="",f.digest=j,gc({value:f,source:null,stack:null}),o=Vp(r,o,a)}else if(Gn||Ql(r,o,a,!1),j=(a&r.childLanes)!==0,Gn||j){if(j=hn,j!==null&&(f=st(j,a),f!==0&&f!==X.retryLane))throw X.retryLane=f,Qs(r,f),_r(j,r,f),_p;wg(H)||Zf(),o=Vp(r,o,a)}else wg(H)?(o.flags|=192,o.child=r.child,o=null):(r=X.treeContext,bn=di(H.nextSibling),ur=o,Lt=!0,$o=null,ui=!1,r!==null&&a0(o,r),o=Bp(o,f.children),o.flags|=4096);return o}return x?(os(),H=f.fallback,x=o.mode,X=r.child,ce=X.sibling,f=ho(X,{mode:"hidden",children:f.children}),f.subtreeFlags=X.subtreeFlags&65011712,ce!==null?H=ho(ce,H):(H=el(H,x,a,null),H.flags|=2),H.return=o,f.return=o,f.sibling=H,o.child=f,jc(null,f),f=o.child,H=r.child.memoizedState,H===null?H=Fp(a):(x=H.cachePool,x!==null?(X=Zn._currentValue,x=x.parent!==X?{parent:X,pool:X}:x):x=m0(),H={baseLanes:H.baseLanes|a,cachePool:x}),f.memoizedState=H,f.childLanes=Hp(r,j,a),o.memoizedState=Lp,jc(r.child,f)):(is(o),a=r.child,r=a.sibling,a=ho(a,{mode:"visible",children:f.children}),a.return=o,a.sibling=null,r!==null&&(j=o.deletions,j===null?(o.deletions=[r],o.flags|=16):j.push(r)),o.child=a,o.memoizedState=null,a)}function Bp(r,o){return o=Df({mode:"visible",children:o},r.mode),o.return=r,r.child=o}function Df(r,o){return r=Kr(22,r,null,o),r.lanes=0,r}function Vp(r,o,a){return ll(o,r.child,null,a),r=Bp(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function R1(r,o,a){r.lanes|=o;var f=r.alternate;f!==null&&(f.lanes|=o),rp(r.return,o,a)}function Up(r,o,a,f,x,v){var j=r.memoizedState;j===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:a,tailMode:x,treeForkCount:v}:(j.isBackwards=o,j.rendering=null,j.renderingStartTime=0,j.last=f,j.tail=a,j.tailMode=x,j.treeForkCount=v)}function j1(r,o,a){var f=o.pendingProps,x=f.revealOrder,v=f.tail;f=f.children;var j=_n.current,H=(j&2)!==0;if(H?(j=j&1|2,o.flags|=128):j&=1,z(_n,j),dr(r,o,f,a),f=Lt?pc:0,!H&&r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&R1(r,a,o);else if(r.tag===19)R1(r,a,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(x){case"forwards":for(a=o.child,x=null;a!==null;)r=a.alternate,r!==null&&kf(r)===null&&(x=a),a=a.sibling;a=x,a===null?(x=o.child,o.child=null):(x=a.sibling,a.sibling=null),Up(o,!1,x,a,v,f);break;case"backwards":case"unstable_legacy-backwards":for(a=null,x=o.child,o.child=null;x!==null;){if(r=x.alternate,r!==null&&kf(r)===null){o.child=x;break}r=x.sibling,x.sibling=a,a=x,x=r}Up(o,!0,a,null,v,f);break;case"together":Up(o,!1,null,null,void 0,f);break;default:o.memoizedState=null}return o.child}function bo(r,o,a){if(r!==null&&(o.dependencies=r.dependencies),as|=o.lanes,(a&o.childLanes)===0)if(r!==null){if(Ql(r,o,a,!1),(a&o.childLanes)===0)return null}else return null;if(r!==null&&o.child!==r.child)throw Error(i(153));if(o.child!==null){for(r=o.child,a=ho(r,r.pendingProps),o.child=a,a.return=o;r.sibling!==null;)r=r.sibling,a=a.sibling=ho(r,r.pendingProps),a.return=o;a.sibling=null}return o.child}function Zp(r,o){return(r.lanes&o)!==0?!0:(r=r.dependencies,!!(r!==null&&pf(r)))}function BA(r,o,a){switch(o.tag){case 3:ie(o,o.stateNode.containerInfo),es(o,Zn,r.memoizedState.cache),tl();break;case 27:case 5:Se(o);break;case 4:ie(o,o.stateNode.containerInfo);break;case 10:es(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,pp(o),null;break;case 13:var f=o.memoizedState;if(f!==null)return f.dehydrated!==null?(is(o),o.flags|=128,null):(a&o.child.childLanes)!==0?T1(r,o,a):(is(o),r=bo(r,o,a),r!==null?r.sibling:null);is(o);break;case 19:var x=(r.flags&128)!==0;if(f=(a&o.childLanes)!==0,f||(Ql(r,o,a,!1),f=(a&o.childLanes)!==0),x){if(f)return j1(r,o,a);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),z(_n,_n.current),f)break;return null;case 22:return o.lanes=0,v1(r,o,a,o.pendingProps);case 24:es(o,Zn,r.memoizedState.cache)}return bo(r,o,a)}function N1(r,o,a){if(r!==null)if(r.memoizedProps!==o.pendingProps)Gn=!0;else{if(!Zp(r,a)&&(o.flags&128)===0)return Gn=!1,BA(r,o,a);Gn=(r.flags&131072)!==0}else Gn=!1,Lt&&(o.flags&1048576)!==0&&l0(o,pc,o.index);switch(o.lanes=0,o.tag){case 16:e:{var f=o.pendingProps;if(r=ol(o.elementType),o.type=r,typeof r=="function")Xm(r)?(f=cl(r,f),o.tag=1,o=E1(null,o,r,f,a)):(o.tag=0,o=Pp(null,o,r,f,a));else{if(r!=null){var x=r.$$typeof;if(x===N){o.tag=11,o=x1(null,o,r,f,a);break e}else if(x===P){o.tag=14,o=y1(null,o,r,f,a);break e}}throw o=G(r)||r,Error(i(306,o,""))}}return o;case 0:return Pp(r,o,o.type,o.pendingProps,a);case 1:return f=o.type,x=cl(f,o.pendingProps),E1(r,o,f,x,a);case 3:e:{if(ie(o,o.stateNode.containerInfo),r===null)throw Error(i(387));f=o.pendingProps;var v=o.memoizedState;x=v.element,up(r,o),kc(o,f,null,a);var j=o.memoizedState;if(f=j.cache,es(o,Zn,f),f!==v.cache&&ip(o,[Zn],a,!0),Sc(),f=j.element,v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:j.cache},o.updateQueue.baseState=v,o.memoizedState=v,o.flags&256){o=C1(r,o,f,a);break e}else if(f!==x){x=li(Error(i(424)),o),gc(x),o=C1(r,o,f,a);break e}else for(r=o.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,bn=di(r.firstChild),ur=o,Lt=!0,$o=null,ui=!0,a=v0(o,null,f,a),o.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(tl(),f===x){o=bo(r,o,a);break e}dr(r,o,f,a)}o=o.child}return o;case 26:return If(r,o),r===null?(a=Hw(o.type,null,o.pendingProps,null))?o.memoizedState=a:Lt||(a=o.type,r=o.pendingProps,f=Wf(W.current).createElement(a),f[Zt]=o,f[Ht]=r,hr(f,a,r),Un(f),o.stateNode=f):o.memoizedState=Hw(o.type,r.memoizedProps,o.pendingProps,r.memoizedState),null;case 27:return Se(o),r===null&&Lt&&(f=o.stateNode=Pw(o.type,o.pendingProps,W.current),ur=o,ui=!0,x=bn,hs(o.type)?(kg=x,bn=di(f.firstChild)):bn=x),dr(r,o,o.pendingProps.children,a),If(r,o),r===null&&(o.flags|=4194304),o.child;case 5:return r===null&&Lt&&((x=f=bn)&&(f=xM(f,o.type,o.pendingProps,ui),f!==null?(o.stateNode=f,ur=o,bn=di(f.firstChild),ui=!1,x=!0):x=!1),x||Qo(o)),Se(o),x=o.type,v=o.pendingProps,j=r!==null?r.memoizedProps:null,f=v.children,yg(x,v)?f=null:j!==null&&yg(x,j)&&(o.flags|=32),o.memoizedState!==null&&(x=xp(r,o,MA,null,null,a),Uc._currentValue=x),If(r,o),dr(r,o,f,a),o.child;case 6:return r===null&&Lt&&((r=a=bn)&&(a=yM(a,o.pendingProps,ui),a!==null?(o.stateNode=a,ur=o,bn=null,r=!0):r=!1),r||Qo(o)),null;case 13:return T1(r,o,a);case 4:return ie(o,o.stateNode.containerInfo),f=o.pendingProps,r===null?o.child=ll(o,null,f,a):dr(r,o,f,a),o.child;case 11:return x1(r,o,o.type,o.pendingProps,a);case 7:return dr(r,o,o.pendingProps,a),o.child;case 8:return dr(r,o,o.pendingProps.children,a),o.child;case 12:return dr(r,o,o.pendingProps.children,a),o.child;case 10:return f=o.pendingProps,es(o,o.type,f.value),dr(r,o,f.children,a),o.child;case 9:return x=o.type._context,f=o.pendingProps.children,rl(o),x=fr(x),f=f(x),o.flags|=1,dr(r,o,f,a),o.child;case 14:return y1(r,o,o.type,o.pendingProps,a);case 15:return b1(r,o,o.type,o.pendingProps,a);case 19:return j1(r,o,a);case 31:return HA(r,o,a);case 22:return v1(r,o,a,o.pendingProps);case 24:return rl(o),f=fr(Zn),r===null?(x=lp(),x===null&&(x=hn,v=op(),x.pooledCache=v,v.refCount++,v!==null&&(x.pooledCacheLanes|=a),x=v),o.memoizedState={parent:f,cache:x},cp(o),es(o,Zn,x)):((r.lanes&a)!==0&&(up(r,o),kc(o,null,null,a),Sc()),x=r.memoizedState,v=o.memoizedState,x.parent!==f?(x={parent:f,cache:f},o.memoizedState=x,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=x),es(o,Zn,f)):(f=v.cache,es(o,Zn,f),f!==x.cache&&ip(o,[Zn],a,!0))),dr(r,o,o.pendingProps.children,a),o.child;case 29:throw o.pendingProps}throw Error(i(156,o.tag))}function vo(r){r.flags|=4}function qp(r,o,a,f,x){if((o=(r.mode&32)!==0)&&(o=!1),o){if(r.flags|=16777216,(x&335544128)===x)if(r.stateNode.complete)r.flags|=8192;else if(nw())r.flags|=8192;else throw sl=bf,ap}else r.flags&=-16777217}function O1(r,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!qw(o))if(nw())r.flags|=8192;else throw sl=bf,ap}function _f(r,o){o!==null&&(r.flags|=4),r.flags&16384&&(o=r.tag!==22?In():536870912,r.lanes|=o,fa|=o)}function Nc(r,o){if(!Lt)switch(r.tailMode){case"hidden":o=r.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?r.tail=null:a.sibling=null;break;case"collapsed":a=r.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function vn(r){var o=r.alternate!==null&&r.alternate.child===r.child,a=0,f=0;if(o)for(var x=r.child;x!==null;)a|=x.lanes|x.childLanes,f|=x.subtreeFlags&65011712,f|=x.flags&65011712,x.return=r,x=x.sibling;else for(x=r.child;x!==null;)a|=x.lanes|x.childLanes,f|=x.subtreeFlags,f|=x.flags,x.return=r,x=x.sibling;return r.subtreeFlags|=f,r.childLanes=a,o}function VA(r,o,a){var f=o.pendingProps;switch(Qm(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vn(o),null;case 1:return vn(o),null;case 3:return a=o.stateNode,f=null,r!==null&&(f=r.memoizedState.cache),o.memoizedState.cache!==f&&(o.flags|=2048),go(Zn),se(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(r===null||r.child===null)&&($l(o)?vo(o):r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,tp())),vn(o),null;case 26:var x=o.type,v=o.memoizedState;return r===null?(vo(o),v!==null?(vn(o),O1(o,v)):(vn(o),qp(o,x,null,f,a))):v?v!==r.memoizedState?(vo(o),vn(o),O1(o,v)):(vn(o),o.flags&=-16777217):(r=r.memoizedProps,r!==f&&vo(o),vn(o),qp(o,x,r,f,a)),null;case 27:if(ye(o),a=W.current,x=o.type,r!==null&&o.stateNode!=null)r.memoizedProps!==f&&vo(o);else{if(!f){if(o.stateNode===null)throw Error(i(166));return vn(o),null}r=J.current,$l(o)?c0(o):(r=Pw(x,f,a),o.stateNode=r,vo(o))}return vn(o),null;case 5:if(ye(o),x=o.type,r!==null&&o.stateNode!=null)r.memoizedProps!==f&&vo(o);else{if(!f){if(o.stateNode===null)throw Error(i(166));return vn(o),null}if(v=J.current,$l(o))c0(o);else{var j=Wf(W.current);switch(v){case 1:v=j.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:v=j.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":v=j.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":v=j.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":v=j.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof f.is=="string"?j.createElement("select",{is:f.is}):j.createElement("select"),f.multiple?v.multiple=!0:f.size&&(v.size=f.size);break;default:v=typeof f.is=="string"?j.createElement(x,{is:f.is}):j.createElement(x)}}v[Zt]=o,v[Ht]=f;e:for(j=o.child;j!==null;){if(j.tag===5||j.tag===6)v.appendChild(j.stateNode);else if(j.tag!==4&&j.tag!==27&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===o)break e;for(;j.sibling===null;){if(j.return===null||j.return===o)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}o.stateNode=v;e:switch(hr(v,x,f),x){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&vo(o)}}return vn(o),qp(o,o.type,r===null?null:r.memoizedProps,o.pendingProps,a),null;case 6:if(r&&o.stateNode!=null)r.memoizedProps!==f&&vo(o);else{if(typeof f!="string"&&o.stateNode===null)throw Error(i(166));if(r=W.current,$l(o)){if(r=o.stateNode,a=o.memoizedProps,f=null,x=ur,x!==null)switch(x.tag){case 27:case 5:f=x.memoizedProps}r[Zt]=o,r=!!(r.nodeValue===a||f!==null&&f.suppressHydrationWarning===!0||Tw(r.nodeValue,a)),r||Qo(o,!0)}else r=Wf(r).createTextNode(f),r[Zt]=o,o.stateNode=r}return vn(o),null;case 31:if(a=o.memoizedState,r===null||r.memoizedState!==null){if(f=$l(o),a!==null){if(r===null){if(!f)throw Error(i(318));if(r=o.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Zt]=o}else tl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;vn(o),r=!1}else a=tp(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=a),r=!0;if(!r)return o.flags&256?(Jr(o),o):(Jr(o),null);if((o.flags&128)!==0)throw Error(i(558))}return vn(o),null;case 13:if(f=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(x=$l(o),f!==null&&f.dehydrated!==null){if(r===null){if(!x)throw Error(i(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[Zt]=o}else tl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;vn(o),x=!1}else x=tp(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=x),x=!0;if(!x)return o.flags&256?(Jr(o),o):(Jr(o),null)}return Jr(o),(o.flags&128)!==0?(o.lanes=a,o):(a=f!==null,r=r!==null&&r.memoizedState!==null,a&&(f=o.child,x=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(x=f.alternate.memoizedState.cachePool.pool),v=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(v=f.memoizedState.cachePool.pool),v!==x&&(f.flags|=2048)),a!==r&&a&&(o.child.flags|=8192),_f(o,o.updateQueue),vn(o),null);case 4:return se(),r===null&&hg(o.stateNode.containerInfo),vn(o),null;case 10:return go(o.type),vn(o),null;case 19:if(Z(_n),f=o.memoizedState,f===null)return vn(o),null;if(x=(o.flags&128)!==0,v=f.rendering,v===null)if(x)Nc(f,!1);else{if(Nn!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(v=kf(r),v!==null){for(o.flags|=128,Nc(f,!1),r=v.updateQueue,o.updateQueue=r,_f(o,r),o.subtreeFlags=0,r=a,a=o.child;a!==null;)i0(a,r),a=a.sibling;return z(_n,_n.current&1|2),Lt&&mo(o,f.treeForkCount),o.child}r=r.sibling}f.tail!==null&&re()>Bf&&(o.flags|=128,x=!0,Nc(f,!1),o.lanes=4194304)}else{if(!x)if(r=kf(v),r!==null){if(o.flags|=128,x=!0,r=r.updateQueue,o.updateQueue=r,_f(o,r),Nc(f,!0),f.tail===null&&f.tailMode==="hidden"&&!v.alternate&&!Lt)return vn(o),null}else 2*re()-f.renderingStartTime>Bf&&a!==536870912&&(o.flags|=128,x=!0,Nc(f,!1),o.lanes=4194304);f.isBackwards?(v.sibling=o.child,o.child=v):(r=f.last,r!==null?r.sibling=v:o.child=v,f.last=v)}return f.tail!==null?(r=f.tail,f.rendering=r,f.tail=r.sibling,f.renderingStartTime=re(),r.sibling=null,a=_n.current,z(_n,x?a&1|2:a&1),Lt&&mo(o,f.treeForkCount),r):(vn(o),null);case 22:case 23:return Jr(o),mp(),f=o.memoizedState!==null,r!==null?r.memoizedState!==null!==f&&(o.flags|=8192):f&&(o.flags|=8192),f?(a&536870912)!==0&&(o.flags&128)===0&&(vn(o),o.subtreeFlags&6&&(o.flags|=8192)):vn(o),a=o.updateQueue,a!==null&&_f(o,a.retryQueue),a=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==a&&(o.flags|=2048),r!==null&&Z(il),null;case 24:return a=null,r!==null&&(a=r.memoizedState.cache),o.memoizedState.cache!==a&&(o.flags|=2048),go(Zn),vn(o),null;case 25:return null;case 30:return null}throw Error(i(156,o.tag))}function UA(r,o){switch(Qm(o),o.tag){case 1:return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return go(Zn),se(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 26:case 27:case 5:return ye(o),null;case 31:if(o.memoizedState!==null){if(Jr(o),o.alternate===null)throw Error(i(340));tl()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 13:if(Jr(o),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(i(340));tl()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return Z(_n),null;case 4:return se(),null;case 10:return go(o.type),null;case 22:case 23:return Jr(o),mp(),r!==null&&Z(il),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 24:return go(Zn),null;case 25:return null;default:return null}}function A1(r,o){switch(Qm(o),o.tag){case 3:go(Zn),se();break;case 26:case 27:case 5:ye(o);break;case 4:se();break;case 31:o.memoizedState!==null&&Jr(o);break;case 13:Jr(o);break;case 19:Z(_n);break;case 10:go(o.type);break;case 22:case 23:Jr(o),mp(),r!==null&&Z(il);break;case 24:go(Zn)}}function Oc(r,o){try{var a=o.updateQueue,f=a!==null?a.lastEffect:null;if(f!==null){var x=f.next;a=x;do{if((a.tag&r)===r){f=void 0;var v=a.create,j=a.inst;f=v(),j.destroy=f}a=a.next}while(a!==x)}}catch(H){Qt(o,o.return,H)}}function ss(r,o,a){try{var f=o.updateQueue,x=f!==null?f.lastEffect:null;if(x!==null){var v=x.next;f=v;do{if((f.tag&r)===r){var j=f.inst,H=j.destroy;if(H!==void 0){j.destroy=void 0,x=o;var X=a,ce=H;try{ce()}catch(be){Qt(x,X,be)}}}f=f.next}while(f!==v)}}catch(be){Qt(o,o.return,be)}}function M1(r){var o=r.updateQueue;if(o!==null){var a=r.stateNode;try{S0(o,a)}catch(f){Qt(r,r.return,f)}}}function z1(r,o,a){a.props=cl(r.type,r.memoizedProps),a.state=r.memoizedState;try{a.componentWillUnmount()}catch(f){Qt(r,o,f)}}function Ac(r,o){try{var a=r.ref;if(a!==null){switch(r.tag){case 26:case 27:case 5:var f=r.stateNode;break;case 30:f=r.stateNode;break;default:f=r.stateNode}typeof a=="function"?r.refCleanup=a(f):a.current=f}}catch(x){Qt(r,o,x)}}function Ji(r,o){var a=r.ref,f=r.refCleanup;if(a!==null)if(typeof f=="function")try{f()}catch(x){Qt(r,o,x)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(x){Qt(r,o,x)}else a.current=null}function I1(r){var o=r.type,a=r.memoizedProps,f=r.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":a.autoFocus&&f.focus();break e;case"img":a.src?f.src=a.src:a.srcSet&&(f.srcset=a.srcSet)}}catch(x){Qt(r,r.return,x)}}function Gp(r,o,a){try{var f=r.stateNode;fM(f,r.type,a,o),f[Ht]=o}catch(x){Qt(r,r.return,x)}}function D1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&hs(r.type)||r.tag===4}function Yp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||D1(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&hs(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Kp(r,o,a){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(r,o):(o=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.appendChild(r),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=qr));else if(f!==4&&(f===27&&hs(r.type)&&(a=r.stateNode,o=null),r=r.child,r!==null))for(Kp(r,o,a),r=r.sibling;r!==null;)Kp(r,o,a),r=r.sibling}function Pf(r,o,a){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?a.insertBefore(r,o):a.appendChild(r);else if(f!==4&&(f===27&&hs(r.type)&&(a=r.stateNode),r=r.child,r!==null))for(Pf(r,o,a),r=r.sibling;r!==null;)Pf(r,o,a),r=r.sibling}function _1(r){var o=r.stateNode,a=r.memoizedProps;try{for(var f=r.type,x=o.attributes;x.length;)o.removeAttributeNode(x[0]);hr(o,f,a),o[Zt]=r,o[Ht]=a}catch(v){Qt(r,r.return,v)}}var wo=!1,Yn=!1,Xp=!1,P1=typeof WeakSet=="function"?WeakSet:Set,rr=null;function ZA(r,o){if(r=r.containerInfo,gg=id,r=Xv(r),Vm(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var f=a.getSelection&&a.getSelection();if(f&&f.rangeCount!==0){a=f.anchorNode;var x=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{a.nodeType,v.nodeType}catch{a=null;break e}var j=0,H=-1,X=-1,ce=0,be=0,Ee=r,ue=null;t:for(;;){for(var he;Ee!==a||x!==0&&Ee.nodeType!==3||(H=j+x),Ee!==v||f!==0&&Ee.nodeType!==3||(X=j+f),Ee.nodeType===3&&(j+=Ee.nodeValue.length),(he=Ee.firstChild)!==null;)ue=Ee,Ee=he;for(;;){if(Ee===r)break t;if(ue===a&&++ce===x&&(H=j),ue===v&&++be===f&&(X=j),(he=Ee.nextSibling)!==null)break;Ee=ue,ue=Ee.parentNode}Ee=he}a=H===-1||X===-1?null:{start:H,end:X}}else a=null}a=a||{start:0,end:0}}else a=null;for(xg={focusedElem:r,selectionRange:a},id=!1,rr=o;rr!==null;)if(o=rr,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,rr=r;else for(;rr!==null;){switch(o=rr,v=o.alternate,r=o.flags,o.tag){case 0:if((r&4)!==0&&(r=o.updateQueue,r=r!==null?r.events:null,r!==null))for(a=0;a<r.length;a++)x=r[a],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,a=o,x=v.memoizedProps,v=v.memoizedState,f=a.stateNode;try{var We=cl(a.type,x);r=f.getSnapshotBeforeUpdate(We,v),f.__reactInternalSnapshotBeforeUpdate=r}catch(ct){Qt(a,a.return,ct)}}break;case 3:if((r&1024)!==0){if(r=o.stateNode.containerInfo,a=r.nodeType,a===9)vg(r);else if(a===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":vg(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=o.sibling,r!==null){r.return=o.return,rr=r;break}rr=o.return}}function L1(r,o,a){var f=a.flags;switch(a.tag){case 0:case 11:case 15:ko(r,a),f&4&&Oc(5,a);break;case 1:if(ko(r,a),f&4)if(r=a.stateNode,o===null)try{r.componentDidMount()}catch(j){Qt(a,a.return,j)}else{var x=cl(a.type,o.memoizedProps);o=o.memoizedState;try{r.componentDidUpdate(x,o,r.__reactInternalSnapshotBeforeUpdate)}catch(j){Qt(a,a.return,j)}}f&64&&M1(a),f&512&&Ac(a,a.return);break;case 3:if(ko(r,a),f&64&&(r=a.updateQueue,r!==null)){if(o=null,a.child!==null)switch(a.child.tag){case 27:case 5:o=a.child.stateNode;break;case 1:o=a.child.stateNode}try{S0(r,o)}catch(j){Qt(a,a.return,j)}}break;case 27:o===null&&f&4&&_1(a);case 26:case 5:ko(r,a),o===null&&f&4&&I1(a),f&512&&Ac(a,a.return);break;case 12:ko(r,a);break;case 31:ko(r,a),f&4&&B1(r,a);break;case 13:ko(r,a),f&4&&V1(r,a),f&64&&(r=a.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(a=QA.bind(null,a),bM(r,a))));break;case 22:if(f=a.memoizedState!==null||wo,!f){o=o!==null&&o.memoizedState!==null||Yn,x=wo;var v=Yn;wo=f,(Yn=o)&&!v?Eo(r,a,(a.subtreeFlags&8772)!==0):ko(r,a),wo=x,Yn=v}break;case 30:break;default:ko(r,a)}}function F1(r){var o=r.alternate;o!==null&&(r.alternate=null,F1(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&Qa(o)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var kn=null,Mr=!1;function So(r,o,a){for(a=a.child;a!==null;)H1(r,o,a),a=a.sibling}function H1(r,o,a){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(rt,a)}catch{}switch(a.tag){case 26:Yn||Ji(a,o),So(r,o,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Yn||Ji(a,o);var f=kn,x=Mr;hs(a.type)&&(kn=a.stateNode,Mr=!1),So(r,o,a),Hc(a.stateNode),kn=f,Mr=x;break;case 5:Yn||Ji(a,o);case 6:if(f=kn,x=Mr,kn=null,So(r,o,a),kn=f,Mr=x,kn!==null)if(Mr)try{(kn.nodeType===9?kn.body:kn.nodeName==="HTML"?kn.ownerDocument.body:kn).removeChild(a.stateNode)}catch(v){Qt(a,o,v)}else try{kn.removeChild(a.stateNode)}catch(v){Qt(a,o,v)}break;case 18:kn!==null&&(Mr?(r=kn,Mw(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.stateNode),ba(r)):Mw(kn,a.stateNode));break;case 4:f=kn,x=Mr,kn=a.stateNode.containerInfo,Mr=!0,So(r,o,a),kn=f,Mr=x;break;case 0:case 11:case 14:case 15:ss(2,a,o),Yn||ss(4,a,o),So(r,o,a);break;case 1:Yn||(Ji(a,o),f=a.stateNode,typeof f.componentWillUnmount=="function"&&z1(a,o,f)),So(r,o,a);break;case 21:So(r,o,a);break;case 22:Yn=(f=Yn)||a.memoizedState!==null,So(r,o,a),Yn=f;break;default:So(r,o,a)}}function B1(r,o){if(o.memoizedState===null&&(r=o.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ba(r)}catch(a){Qt(o,o.return,a)}}}function V1(r,o){if(o.memoizedState===null&&(r=o.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ba(r)}catch(a){Qt(o,o.return,a)}}function qA(r){switch(r.tag){case 31:case 13:case 19:var o=r.stateNode;return o===null&&(o=r.stateNode=new P1),o;case 22:return r=r.stateNode,o=r._retryCache,o===null&&(o=r._retryCache=new P1),o;default:throw Error(i(435,r.tag))}}function Lf(r,o){var a=qA(r);o.forEach(function(f){if(!a.has(f)){a.add(f);var x=eM.bind(null,r,f);f.then(x,x)}})}function zr(r,o){var a=o.deletions;if(a!==null)for(var f=0;f<a.length;f++){var x=a[f],v=r,j=o,H=j;e:for(;H!==null;){switch(H.tag){case 27:if(hs(H.type)){kn=H.stateNode,Mr=!1;break e}break;case 5:kn=H.stateNode,Mr=!1;break e;case 3:case 4:kn=H.stateNode.containerInfo,Mr=!0;break e}H=H.return}if(kn===null)throw Error(i(160));H1(v,j,x),kn=null,Mr=!1,v=x.alternate,v!==null&&(v.return=null),x.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)U1(o,r),o=o.sibling}var Ai=null;function U1(r,o){var a=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:zr(o,r),Ir(r),f&4&&(ss(3,r,r.return),Oc(3,r),ss(5,r,r.return));break;case 1:zr(o,r),Ir(r),f&512&&(Yn||a===null||Ji(a,a.return)),f&64&&wo&&(r=r.updateQueue,r!==null&&(f=r.callbacks,f!==null&&(a=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=a===null?f:a.concat(f))));break;case 26:var x=Ai;if(zr(o,r),Ir(r),f&512&&(Yn||a===null||Ji(a,a.return)),f&4){var v=a!==null?a.memoizedState:null;if(f=r.memoizedState,a===null)if(f===null)if(r.stateNode===null){e:{f=r.type,a=r.memoizedProps,x=x.ownerDocument||x;t:switch(f){case"title":v=x.getElementsByTagName("title")[0],(!v||v[Zo]||v[Zt]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=x.createElement(f),x.head.insertBefore(v,x.querySelector("head > title"))),hr(v,f,a),v[Zt]=r,Un(v),f=v;break e;case"link":var j=Uw("link","href",x).get(f+(a.href||""));if(j){for(var H=0;H<j.length;H++)if(v=j[H],v.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&v.getAttribute("rel")===(a.rel==null?null:a.rel)&&v.getAttribute("title")===(a.title==null?null:a.title)&&v.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){j.splice(H,1);break t}}v=x.createElement(f),hr(v,f,a),x.head.appendChild(v);break;case"meta":if(j=Uw("meta","content",x).get(f+(a.content||""))){for(H=0;H<j.length;H++)if(v=j[H],v.getAttribute("content")===(a.content==null?null:""+a.content)&&v.getAttribute("name")===(a.name==null?null:a.name)&&v.getAttribute("property")===(a.property==null?null:a.property)&&v.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&v.getAttribute("charset")===(a.charSet==null?null:a.charSet)){j.splice(H,1);break t}}v=x.createElement(f),hr(v,f,a),x.head.appendChild(v);break;default:throw Error(i(468,f))}v[Zt]=r,Un(v),f=v}r.stateNode=f}else Zw(x,r.type,r.stateNode);else r.stateNode=Vw(x,f,r.memoizedProps);else v!==f?(v===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):v.count--,f===null?Zw(x,r.type,r.stateNode):Vw(x,f,r.memoizedProps)):f===null&&r.stateNode!==null&&Gp(r,r.memoizedProps,a.memoizedProps)}break;case 27:zr(o,r),Ir(r),f&512&&(Yn||a===null||Ji(a,a.return)),a!==null&&f&4&&Gp(r,r.memoizedProps,a.memoizedProps);break;case 5:if(zr(o,r),Ir(r),f&512&&(Yn||a===null||Ji(a,a.return)),r.flags&32){x=r.stateNode;try{fo(x,"")}catch(We){Qt(r,r.return,We)}}f&4&&r.stateNode!=null&&(x=r.memoizedProps,Gp(r,x,a!==null?a.memoizedProps:x)),f&1024&&(Xp=!0);break;case 6:if(zr(o,r),Ir(r),f&4){if(r.stateNode===null)throw Error(i(162));f=r.memoizedProps,a=r.stateNode;try{a.nodeValue=f}catch(We){Qt(r,r.return,We)}}break;case 3:if(ed=null,x=Ai,Ai=$f(o.containerInfo),zr(o,r),Ai=x,Ir(r),f&4&&a!==null&&a.memoizedState.isDehydrated)try{ba(o.containerInfo)}catch(We){Qt(r,r.return,We)}Xp&&(Xp=!1,Z1(r));break;case 4:f=Ai,Ai=$f(r.stateNode.containerInfo),zr(o,r),Ir(r),Ai=f;break;case 12:zr(o,r),Ir(r);break;case 31:zr(o,r),Ir(r),f&4&&(f=r.updateQueue,f!==null&&(r.updateQueue=null,Lf(r,f)));break;case 13:zr(o,r),Ir(r),r.child.flags&8192&&r.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Hf=re()),f&4&&(f=r.updateQueue,f!==null&&(r.updateQueue=null,Lf(r,f)));break;case 22:x=r.memoizedState!==null;var X=a!==null&&a.memoizedState!==null,ce=wo,be=Yn;if(wo=ce||x,Yn=be||X,zr(o,r),Yn=be,wo=ce,Ir(r),f&8192)e:for(o=r.stateNode,o._visibility=x?o._visibility&-2:o._visibility|1,x&&(a===null||X||wo||Yn||ul(r)),a=null,o=r;;){if(o.tag===5||o.tag===26){if(a===null){X=a=o;try{if(v=X.stateNode,x)j=v.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{H=X.stateNode;var Ee=X.memoizedProps.style,ue=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;H.style.display=ue==null||typeof ue=="boolean"?"":(""+ue).trim()}}catch(We){Qt(X,X.return,We)}}}else if(o.tag===6){if(a===null){X=o;try{X.stateNode.nodeValue=x?"":X.memoizedProps}catch(We){Qt(X,X.return,We)}}}else if(o.tag===18){if(a===null){X=o;try{var he=X.stateNode;x?zw(he,!0):zw(X.stateNode,!1)}catch(We){Qt(X,X.return,We)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===r)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break e;for(;o.sibling===null;){if(o.return===null||o.return===r)break e;a===o&&(a=null),o=o.return}a===o&&(a=null),o.sibling.return=o.return,o=o.sibling}f&4&&(f=r.updateQueue,f!==null&&(a=f.retryQueue,a!==null&&(f.retryQueue=null,Lf(r,a))));break;case 19:zr(o,r),Ir(r),f&4&&(f=r.updateQueue,f!==null&&(r.updateQueue=null,Lf(r,f)));break;case 30:break;case 21:break;default:zr(o,r),Ir(r)}}function Ir(r){var o=r.flags;if(o&2){try{for(var a,f=r.return;f!==null;){if(D1(f)){a=f;break}f=f.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var x=a.stateNode,v=Yp(r);Pf(r,v,x);break;case 5:var j=a.stateNode;a.flags&32&&(fo(j,""),a.flags&=-33);var H=Yp(r);Pf(r,H,j);break;case 3:case 4:var X=a.stateNode.containerInfo,ce=Yp(r);Kp(r,ce,X);break;default:throw Error(i(161))}}catch(be){Qt(r,r.return,be)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function Z1(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var o=r;Z1(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),r=r.sibling}}function ko(r,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)L1(r,o.alternate,o),o=o.sibling}function ul(r){for(r=r.child;r!==null;){var o=r;switch(o.tag){case 0:case 11:case 14:case 15:ss(4,o,o.return),ul(o);break;case 1:Ji(o,o.return);var a=o.stateNode;typeof a.componentWillUnmount=="function"&&z1(o,o.return,a),ul(o);break;case 27:Hc(o.stateNode);case 26:case 5:Ji(o,o.return),ul(o);break;case 22:o.memoizedState===null&&ul(o);break;case 30:ul(o);break;default:ul(o)}r=r.sibling}}function Eo(r,o,a){for(a=a&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var f=o.alternate,x=r,v=o,j=v.flags;switch(v.tag){case 0:case 11:case 15:Eo(x,v,a),Oc(4,v);break;case 1:if(Eo(x,v,a),f=v,x=f.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(ce){Qt(f,f.return,ce)}if(f=v,x=f.updateQueue,x!==null){var H=f.stateNode;try{var X=x.shared.hiddenCallbacks;if(X!==null)for(x.shared.hiddenCallbacks=null,x=0;x<X.length;x++)w0(X[x],H)}catch(ce){Qt(f,f.return,ce)}}a&&j&64&&M1(v),Ac(v,v.return);break;case 27:_1(v);case 26:case 5:Eo(x,v,a),a&&f===null&&j&4&&I1(v),Ac(v,v.return);break;case 12:Eo(x,v,a);break;case 31:Eo(x,v,a),a&&j&4&&B1(x,v);break;case 13:Eo(x,v,a),a&&j&4&&V1(x,v);break;case 22:v.memoizedState===null&&Eo(x,v,a),Ac(v,v.return);break;case 30:break;default:Eo(x,v,a)}o=o.sibling}}function Jp(r,o){var a=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),r=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(r=o.memoizedState.cachePool.pool),r!==a&&(r!=null&&r.refCount++,a!=null&&xc(a))}function Wp(r,o){r=null,o.alternate!==null&&(r=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==r&&(o.refCount++,r!=null&&xc(r))}function Mi(r,o,a,f){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)q1(r,o,a,f),o=o.sibling}function q1(r,o,a,f){var x=o.flags;switch(o.tag){case 0:case 11:case 15:Mi(r,o,a,f),x&2048&&Oc(9,o);break;case 1:Mi(r,o,a,f);break;case 3:Mi(r,o,a,f),x&2048&&(r=null,o.alternate!==null&&(r=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==r&&(o.refCount++,r!=null&&xc(r)));break;case 12:if(x&2048){Mi(r,o,a,f),r=o.stateNode;try{var v=o.memoizedProps,j=v.id,H=v.onPostCommit;typeof H=="function"&&H(j,o.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(X){Qt(o,o.return,X)}}else Mi(r,o,a,f);break;case 31:Mi(r,o,a,f);break;case 13:Mi(r,o,a,f);break;case 23:break;case 22:v=o.stateNode,j=o.alternate,o.memoizedState!==null?v._visibility&2?Mi(r,o,a,f):Mc(r,o):v._visibility&2?Mi(r,o,a,f):(v._visibility|=2,aa(r,o,a,f,(o.subtreeFlags&10256)!==0||!1)),x&2048&&Jp(j,o);break;case 24:Mi(r,o,a,f),x&2048&&Wp(o.alternate,o);break;default:Mi(r,o,a,f)}}function aa(r,o,a,f,x){for(x=x&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var v=r,j=o,H=a,X=f,ce=j.flags;switch(j.tag){case 0:case 11:case 15:aa(v,j,H,X,x),Oc(8,j);break;case 23:break;case 22:var be=j.stateNode;j.memoizedState!==null?be._visibility&2?aa(v,j,H,X,x):Mc(v,j):(be._visibility|=2,aa(v,j,H,X,x)),x&&ce&2048&&Jp(j.alternate,j);break;case 24:aa(v,j,H,X,x),x&&ce&2048&&Wp(j.alternate,j);break;default:aa(v,j,H,X,x)}o=o.sibling}}function Mc(r,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var a=r,f=o,x=f.flags;switch(f.tag){case 22:Mc(a,f),x&2048&&Jp(f.alternate,f);break;case 24:Mc(a,f),x&2048&&Wp(f.alternate,f);break;default:Mc(a,f)}o=o.sibling}}var zc=8192;function ca(r,o,a){if(r.subtreeFlags&zc)for(r=r.child;r!==null;)G1(r,o,a),r=r.sibling}function G1(r,o,a){switch(r.tag){case 26:ca(r,o,a),r.flags&zc&&r.memoizedState!==null&&AM(a,Ai,r.memoizedState,r.memoizedProps);break;case 5:ca(r,o,a);break;case 3:case 4:var f=Ai;Ai=$f(r.stateNode.containerInfo),ca(r,o,a),Ai=f;break;case 22:r.memoizedState===null&&(f=r.alternate,f!==null&&f.memoizedState!==null?(f=zc,zc=16777216,ca(r,o,a),zc=f):ca(r,o,a));break;default:ca(r,o,a)}}function Y1(r){var o=r.alternate;if(o!==null&&(r=o.child,r!==null)){o.child=null;do o=r.sibling,r.sibling=null,r=o;while(r!==null)}}function Ic(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var a=0;a<o.length;a++){var f=o[a];rr=f,X1(f,r)}Y1(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)K1(r),r=r.sibling}function K1(r){switch(r.tag){case 0:case 11:case 15:Ic(r),r.flags&2048&&ss(9,r,r.return);break;case 3:Ic(r);break;case 12:Ic(r);break;case 22:var o=r.stateNode;r.memoizedState!==null&&o._visibility&2&&(r.return===null||r.return.tag!==13)?(o._visibility&=-3,Ff(r)):Ic(r);break;default:Ic(r)}}function Ff(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var a=0;a<o.length;a++){var f=o[a];rr=f,X1(f,r)}Y1(r)}for(r=r.child;r!==null;){switch(o=r,o.tag){case 0:case 11:case 15:ss(8,o,o.return),Ff(o);break;case 22:a=o.stateNode,a._visibility&2&&(a._visibility&=-3,Ff(o));break;default:Ff(o)}r=r.sibling}}function X1(r,o){for(;rr!==null;){var a=rr;switch(a.tag){case 0:case 11:case 15:ss(8,a,o);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var f=a.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:xc(a.memoizedState.cache)}if(f=a.child,f!==null)f.return=a,rr=f;else e:for(a=r;rr!==null;){f=rr;var x=f.sibling,v=f.return;if(F1(f),f===a){rr=null;break e}if(x!==null){x.return=v,rr=x;break e}rr=v}}}var GA={getCacheForType:function(r){var o=fr(Zn),a=o.data.get(r);return a===void 0&&(a=r(),o.data.set(r,a)),a},cacheSignal:function(){return fr(Zn).controller.signal}},YA=typeof WeakMap=="function"?WeakMap:Map,Xt=0,hn=null,Ot=null,zt=0,$t=0,Wr=null,ls=!1,ua=!1,$p=!1,Co=0,Nn=0,as=0,fl=0,Qp=0,$r=0,fa=0,Dc=null,Dr=null,eg=!1,Hf=0,J1=0,Bf=1/0,Vf=null,cs=null,er=0,us=null,da=null,To=0,tg=0,ng=null,W1=null,_c=0,rg=null;function Qr(){return(Xt&2)!==0&&zt!==0?zt&-zt:F.T!==null?cg():Dn()}function $1(){if($r===0)if((zt&536870912)===0||Lt){var r=St;St<<=1,(St&3932160)===0&&(St=262144),$r=r}else $r=536870912;return r=Xr.current,r!==null&&(r.flags|=32),$r}function _r(r,o,a){(r===hn&&($t===2||$t===9)||r.cancelPendingCommit!==null)&&(ha(r,0),fs(r,zt,$r,!1)),Sn(r,a),((Xt&2)===0||r!==hn)&&(r===hn&&((Xt&2)===0&&(fl|=a),Nn===4&&fs(r,zt,$r,!1)),Wi(r))}function Q1(r,o,a){if((Xt&6)!==0)throw Error(i(327));var f=!a&&(o&127)===0&&(o&r.expiredLanes)===0||Wt(r,o),x=f?JA(r,o):og(r,o,!0),v=f;do{if(x===0){ua&&!f&&fs(r,o,0,!1);break}else{if(a=r.current.alternate,v&&!KA(a)){x=og(r,o,!1),v=!1;continue}if(x===2){if(v=o,r.errorRecoveryDisabledLanes&v)var j=0;else j=r.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){o=j;e:{var H=r;x=Dc;var X=H.current.memoizedState.isDehydrated;if(X&&(ha(H,j).flags|=256),j=og(H,j,!1),j!==2){if($p&&!X){H.errorRecoveryDisabledLanes|=v,fl|=v,x=4;break e}v=Dr,Dr=x,v!==null&&(Dr===null?Dr=v:Dr.push.apply(Dr,v))}x=j}if(v=!1,x!==2)continue}}if(x===1){ha(r,0),fs(r,o,0,!0);break}e:{switch(f=r,v=x,v){case 0:case 1:throw Error(i(345));case 4:if((o&4194048)!==o)break;case 6:fs(f,o,$r,!ls);break e;case 2:Dr=null;break;case 3:case 5:break;default:throw Error(i(329))}if((o&62914560)===o&&(x=Hf+300-re(),10<x)){if(fs(f,o,$r,!ls),et(f,0,!0)!==0)break e;To=o,f.timeoutHandle=Ow(ew.bind(null,f,a,Dr,Vf,eg,o,$r,fl,fa,ls,v,"Throttled",-0,0),x);break e}ew(f,a,Dr,Vf,eg,o,$r,fl,fa,ls,v,null,-0,0)}}break}while(!0);Wi(r)}function ew(r,o,a,f,x,v,j,H,X,ce,be,Ee,ue,he){if(r.timeoutHandle=-1,Ee=o.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qr},G1(o,v,Ee);var We=(v&62914560)===v?Hf-re():(v&4194048)===v?J1-re():0;if(We=MM(Ee,We),We!==null){To=v,r.cancelPendingCommit=We(aw.bind(null,r,o,v,a,f,x,j,H,X,be,Ee,null,ue,he)),fs(r,v,j,!ce);return}}aw(r,o,v,a,f,x,j,H,X)}function KA(r){for(var o=r;;){var a=o.tag;if((a===0||a===11||a===15)&&o.flags&16384&&(a=o.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var f=0;f<a.length;f++){var x=a[f],v=x.getSnapshot;x=x.value;try{if(!Yr(v(),x))return!1}catch{return!1}}if(a=o.child,o.subtreeFlags&16384&&a!==null)a.return=o,o=a;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function fs(r,o,a,f){o&=~Qp,o&=~fl,r.suspendedLanes|=o,r.pingedLanes&=~o,f&&(r.warmLanes|=o),f=r.expirationTimes;for(var x=o;0<x;){var v=31-Je(x),j=1<<v;f[v]=-1,x&=~j}a!==0&&Ar(r,a,o)}function Uf(){return(Xt&6)===0?(Pc(0),!1):!0}function ig(){if(Ot!==null){if($t===0)var r=Ot.return;else r=Ot,po=nl=null,vp(r),ra=null,bc=0,r=Ot;for(;r!==null;)A1(r.alternate,r),r=r.return;Ot=null}}function ha(r,o){var a=r.timeoutHandle;a!==-1&&(r.timeoutHandle=-1,mM(a)),a=r.cancelPendingCommit,a!==null&&(r.cancelPendingCommit=null,a()),To=0,ig(),hn=r,Ot=a=ho(r.current,null),zt=o,$t=0,Wr=null,ls=!1,ua=Wt(r,o),$p=!1,fa=$r=Qp=fl=as=Nn=0,Dr=Dc=null,eg=!1,(o&8)!==0&&(o|=o&32);var f=r.entangledLanes;if(f!==0)for(r=r.entanglements,f&=o;0<f;){var x=31-Je(f),v=1<<x;o|=r[x],f&=~v}return Co=o,uf(),a}function tw(r,o){bt=null,F.H=Rc,o===na||o===yf?(o=x0(),$t=3):o===ap?(o=x0(),$t=4):$t=o===_p?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Wr=o,Ot===null&&(Nn=1,Mf(r,li(o,r.current)))}function nw(){var r=Xr.current;return r===null?!0:(zt&4194048)===zt?fi===null:(zt&62914560)===zt||(zt&536870912)!==0?r===fi:!1}function rw(){var r=F.H;return F.H=Rc,r===null?Rc:r}function iw(){var r=F.A;return F.A=GA,r}function Zf(){Nn=4,ls||(zt&4194048)!==zt&&Xr.current!==null||(ua=!0),(as&134217727)===0&&(fl&134217727)===0||hn===null||fs(hn,zt,$r,!1)}function og(r,o,a){var f=Xt;Xt|=2;var x=rw(),v=iw();(hn!==r||zt!==o)&&(Vf=null,ha(r,o)),o=!1;var j=Nn;e:do try{if($t!==0&&Ot!==null){var H=Ot,X=Wr;switch($t){case 8:ig(),j=6;break e;case 3:case 2:case 9:case 6:Xr.current===null&&(o=!0);var ce=$t;if($t=0,Wr=null,ma(r,H,X,ce),a&&ua){j=0;break e}break;default:ce=$t,$t=0,Wr=null,ma(r,H,X,ce)}}XA(),j=Nn;break}catch(be){tw(r,be)}while(!0);return o&&r.shellSuspendCounter++,po=nl=null,Xt=f,F.H=x,F.A=v,Ot===null&&(hn=null,zt=0,uf()),j}function XA(){for(;Ot!==null;)ow(Ot)}function JA(r,o){var a=Xt;Xt|=2;var f=rw(),x=iw();hn!==r||zt!==o?(Vf=null,Bf=re()+500,ha(r,o)):ua=Wt(r,o);e:do try{if($t!==0&&Ot!==null){o=Ot;var v=Wr;t:switch($t){case 1:$t=0,Wr=null,ma(r,o,v,1);break;case 2:case 9:if(p0(v)){$t=0,Wr=null,sw(o);break}o=function(){$t!==2&&$t!==9||hn!==r||($t=7),Wi(r)},v.then(o,o);break e;case 3:$t=7;break e;case 4:$t=5;break e;case 7:p0(v)?($t=0,Wr=null,sw(o)):($t=0,Wr=null,ma(r,o,v,7));break;case 5:var j=null;switch(Ot.tag){case 26:j=Ot.memoizedState;case 5:case 27:var H=Ot;if(j?qw(j):H.stateNode.complete){$t=0,Wr=null;var X=H.sibling;if(X!==null)Ot=X;else{var ce=H.return;ce!==null?(Ot=ce,qf(ce)):Ot=null}break t}}$t=0,Wr=null,ma(r,o,v,5);break;case 6:$t=0,Wr=null,ma(r,o,v,6);break;case 8:ig(),Nn=6;break e;default:throw Error(i(462))}}WA();break}catch(be){tw(r,be)}while(!0);return po=nl=null,F.H=f,F.A=x,Xt=a,Ot!==null?0:(hn=null,zt=0,uf(),Nn)}function WA(){for(;Ot!==null&&!Ue();)ow(Ot)}function ow(r){var o=N1(r.alternate,r,Co);r.memoizedProps=r.pendingProps,o===null?qf(r):Ot=o}function sw(r){var o=r,a=o.alternate;switch(o.tag){case 15:case 0:o=k1(a,o,o.pendingProps,o.type,void 0,zt);break;case 11:o=k1(a,o,o.pendingProps,o.type.render,o.ref,zt);break;case 5:vp(o);default:A1(a,o),o=Ot=i0(o,Co),o=N1(a,o,Co)}r.memoizedProps=r.pendingProps,o===null?qf(r):Ot=o}function ma(r,o,a,f){po=nl=null,vp(o),ra=null,bc=0;var x=o.return;try{if(FA(r,x,o,a,zt)){Nn=1,Mf(r,li(a,r.current)),Ot=null;return}}catch(v){if(x!==null)throw Ot=x,v;Nn=1,Mf(r,li(a,r.current)),Ot=null;return}o.flags&32768?(Lt||f===1?r=!0:ua||(zt&536870912)!==0?r=!1:(ls=r=!0,(f===2||f===9||f===3||f===6)&&(f=Xr.current,f!==null&&f.tag===13&&(f.flags|=16384))),lw(o,r)):qf(o)}function qf(r){var o=r;do{if((o.flags&32768)!==0){lw(o,ls);return}r=o.return;var a=VA(o.alternate,o,Co);if(a!==null){Ot=a;return}if(o=o.sibling,o!==null){Ot=o;return}Ot=o=r}while(o!==null);Nn===0&&(Nn=5)}function lw(r,o){do{var a=UA(r.alternate,r);if(a!==null){a.flags&=32767,Ot=a;return}if(a=r.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!o&&(r=r.sibling,r!==null)){Ot=r;return}Ot=r=a}while(r!==null);Nn=6,Ot=null}function aw(r,o,a,f,x,v,j,H,X){r.cancelPendingCommit=null;do Gf();while(er!==0);if((Xt&6)!==0)throw Error(i(327));if(o!==null){if(o===r.current)throw Error(i(177));if(v=o.lanes|o.childLanes,v|=Ym,Ft(r,a,v,j,H,X),r===hn&&(Ot=hn=null,zt=0),da=o,us=r,To=a,tg=v,ng=x,W1=f,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,tM(de,function(){return hw(),null})):(r.callbackNode=null,r.callbackPriority=0),f=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||f){f=F.T,F.T=null,x=V.p,V.p=2,j=Xt,Xt|=4;try{ZA(r,o,a)}finally{Xt=j,V.p=x,F.T=f}}er=1,cw(),uw(),fw()}}function cw(){if(er===1){er=0;var r=us,o=da,a=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||a){a=F.T,F.T=null;var f=V.p;V.p=2;var x=Xt;Xt|=4;try{U1(o,r);var v=xg,j=Xv(r.containerInfo),H=v.focusedElem,X=v.selectionRange;if(j!==H&&H&&H.ownerDocument&&Kv(H.ownerDocument.documentElement,H)){if(X!==null&&Vm(H)){var ce=X.start,be=X.end;if(be===void 0&&(be=ce),"selectionStart"in H)H.selectionStart=ce,H.selectionEnd=Math.min(be,H.value.length);else{var Ee=H.ownerDocument||document,ue=Ee&&Ee.defaultView||window;if(ue.getSelection){var he=ue.getSelection(),We=H.textContent.length,ct=Math.min(X.start,We),cn=X.end===void 0?ct:Math.min(X.end,We);!he.extend&&ct>cn&&(j=cn,cn=ct,ct=j);var oe=Yv(H,ct),ee=Yv(H,cn);if(oe&&ee&&(he.rangeCount!==1||he.anchorNode!==oe.node||he.anchorOffset!==oe.offset||he.focusNode!==ee.node||he.focusOffset!==ee.offset)){var ae=Ee.createRange();ae.setStart(oe.node,oe.offset),he.removeAllRanges(),ct>cn?(he.addRange(ae),he.extend(ee.node,ee.offset)):(ae.setEnd(ee.node,ee.offset),he.addRange(ae))}}}}for(Ee=[],he=H;he=he.parentNode;)he.nodeType===1&&Ee.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<Ee.length;H++){var ke=Ee[H];ke.element.scrollLeft=ke.left,ke.element.scrollTop=ke.top}}id=!!gg,xg=gg=null}finally{Xt=x,V.p=f,F.T=a}}r.current=o,er=2}}function uw(){if(er===2){er=0;var r=us,o=da,a=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||a){a=F.T,F.T=null;var f=V.p;V.p=2;var x=Xt;Xt|=4;try{L1(r,o.alternate,o)}finally{Xt=x,V.p=f,F.T=a}}er=3}}function fw(){if(er===4||er===3){er=0,me();var r=us,o=da,a=To,f=W1;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?er=5:(er=0,da=us=null,dw(r,r.pendingLanes));var x=r.pendingLanes;if(x===0&&(cs=null),Vn(a),o=o.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(rt,o,void 0,(o.current.flags&128)===128)}catch{}if(f!==null){o=F.T,x=V.p,V.p=2,F.T=null;try{for(var v=r.onRecoverableError,j=0;j<f.length;j++){var H=f[j];v(H.value,{componentStack:H.stack})}}finally{F.T=o,V.p=x}}(To&3)!==0&&Gf(),Wi(r),x=r.pendingLanes,(a&261930)!==0&&(x&42)!==0?r===rg?_c++:(_c=0,rg=r):_c=0,Pc(0)}}function dw(r,o){(r.pooledCacheLanes&=o)===0&&(o=r.pooledCache,o!=null&&(r.pooledCache=null,xc(o)))}function Gf(){return cw(),uw(),fw(),hw()}function hw(){if(er!==5)return!1;var r=us,o=tg;tg=0;var a=Vn(To),f=F.T,x=V.p;try{V.p=32>a?32:a,F.T=null,a=ng,ng=null;var v=us,j=To;if(er=0,da=us=null,To=0,(Xt&6)!==0)throw Error(i(331));var H=Xt;if(Xt|=4,K1(v.current),q1(v,v.current,j,a),Xt=H,Pc(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(rt,v)}catch{}return!0}finally{V.p=x,F.T=f,dw(r,o)}}function mw(r,o,a){o=li(a,o),o=Dp(r.stateNode,o,2),r=rs(r,o,2),r!==null&&(Sn(r,2),Wi(r))}function Qt(r,o,a){if(r.tag===3)mw(r,r,a);else for(;o!==null;){if(o.tag===3){mw(o,r,a);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(cs===null||!cs.has(f))){r=li(a,r),a=p1(2),f=rs(o,a,2),f!==null&&(g1(a,f,o,r),Sn(f,2),Wi(f));break}}o=o.return}}function sg(r,o,a){var f=r.pingCache;if(f===null){f=r.pingCache=new YA;var x=new Set;f.set(o,x)}else x=f.get(o),x===void 0&&(x=new Set,f.set(o,x));x.has(a)||($p=!0,x.add(a),r=$A.bind(null,r,o,a),o.then(r,r))}function $A(r,o,a){var f=r.pingCache;f!==null&&f.delete(o),r.pingedLanes|=r.suspendedLanes&a,r.warmLanes&=~a,hn===r&&(zt&a)===a&&(Nn===4||Nn===3&&(zt&62914560)===zt&&300>re()-Hf?(Xt&2)===0&&ha(r,0):Qp|=a,fa===zt&&(fa=0)),Wi(r)}function pw(r,o){o===0&&(o=In()),r=Qs(r,o),r!==null&&(Sn(r,o),Wi(r))}function QA(r){var o=r.memoizedState,a=0;o!==null&&(a=o.retryLane),pw(r,a)}function eM(r,o){var a=0;switch(r.tag){case 31:case 13:var f=r.stateNode,x=r.memoizedState;x!==null&&(a=x.retryLane);break;case 19:f=r.stateNode;break;case 22:f=r.stateNode._retryCache;break;default:throw Error(i(314))}f!==null&&f.delete(o),pw(r,a)}function tM(r,o){return je(r,o)}var Yf=null,pa=null,lg=!1,Kf=!1,ag=!1,ds=0;function Wi(r){r!==pa&&r.next===null&&(pa===null?Yf=pa=r:pa=pa.next=r),Kf=!0,lg||(lg=!0,rM())}function Pc(r,o){if(!ag&&Kf){ag=!0;do for(var a=!1,f=Yf;f!==null;){if(r!==0){var x=f.pendingLanes;if(x===0)var v=0;else{var j=f.suspendedLanes,H=f.pingedLanes;v=(1<<31-Je(42|r)+1)-1,v&=x&~(j&~H),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(a=!0,bw(f,v))}else v=zt,v=et(f,f===hn?v:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(v&3)===0||Wt(f,v)||(a=!0,bw(f,v));f=f.next}while(a);ag=!1}}function nM(){gw()}function gw(){Kf=lg=!1;var r=0;ds!==0&&hM()&&(r=ds);for(var o=re(),a=null,f=Yf;f!==null;){var x=f.next,v=xw(f,o);v===0?(f.next=null,a===null?Yf=x:a.next=x,x===null&&(pa=a)):(a=f,(r!==0||(v&3)!==0)&&(Kf=!0)),f=x}er!==0&&er!==5||Pc(r),ds!==0&&(ds=0)}function xw(r,o){for(var a=r.suspendedLanes,f=r.pingedLanes,x=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var j=31-Je(v),H=1<<j,X=x[j];X===-1?((H&a)===0||(H&f)!==0)&&(x[j]=Bn(H,o)):X<=o&&(r.expiredLanes|=H),v&=~H}if(o=hn,a=zt,a=et(r,r===o?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),f=r.callbackNode,a===0||r===o&&($t===2||$t===9)||r.cancelPendingCommit!==null)return f!==null&&f!==null&&Ve(f),r.callbackNode=null,r.callbackPriority=0;if((a&3)===0||Wt(r,a)){if(o=a&-a,o===r.callbackPriority)return o;switch(f!==null&&Ve(f),Vn(a)){case 2:case 8:a=Q;break;case 32:a=de;break;case 268435456:a=_e;break;default:a=de}return f=yw.bind(null,r),a=je(a,f),r.callbackPriority=o,r.callbackNode=a,o}return f!==null&&f!==null&&Ve(f),r.callbackPriority=2,r.callbackNode=null,2}function yw(r,o){if(er!==0&&er!==5)return r.callbackNode=null,r.callbackPriority=0,null;var a=r.callbackNode;if(Gf()&&r.callbackNode!==a)return null;var f=zt;return f=et(r,r===hn?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),f===0?null:(Q1(r,f,o),xw(r,re()),r.callbackNode!=null&&r.callbackNode===a?yw.bind(null,r):null)}function bw(r,o){if(Gf())return null;Q1(r,o,!0)}function rM(){pM(function(){(Xt&6)!==0?je($,nM):gw()})}function cg(){if(ds===0){var r=ea;r===0&&(r=Et,Et<<=1,(Et&261888)===0&&(Et=256)),ds=r}return ds}function vw(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Yo(""+r)}function ww(r,o){var a=o.ownerDocument.createElement("input");return a.name=o.name,a.value=o.value,r.id&&a.setAttribute("form",r.id),o.parentNode.insertBefore(a,o),r=new FormData(r),a.parentNode.removeChild(a),r}function iM(r,o,a,f,x){if(o==="submit"&&a&&a.stateNode===x){var v=vw((x[Ht]||null).action),j=f.submitter;j&&(o=(o=j[Ht]||null)?vw(o.formAction):j.getAttribute("formAction"),o!==null&&(v=o,j=null));var H=new Zl("action","action",null,f,x);r.push({event:H,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(ds!==0){var X=j?ww(x,j):new FormData(x);Np(a,{pending:!0,data:X,method:x.method,action:v},null,X)}}else typeof v=="function"&&(H.preventDefault(),X=j?ww(x,j):new FormData(x),Np(a,{pending:!0,data:X,method:x.method,action:v},v,X))},currentTarget:x}]})}}for(var ug=0;ug<Gm.length;ug++){var fg=Gm[ug],oM=fg.toLowerCase(),sM=fg[0].toUpperCase()+fg.slice(1);Oi(oM,"on"+sM)}Oi($v,"onAnimationEnd"),Oi(Qv,"onAnimationIteration"),Oi(e0,"onAnimationStart"),Oi("dblclick","onDoubleClick"),Oi("focusin","onFocus"),Oi("focusout","onBlur"),Oi(SA,"onTransitionRun"),Oi(kA,"onTransitionStart"),Oi(EA,"onTransitionCancel"),Oi(t0,"onTransitionEnd"),qo("onMouseEnter",["mouseout","mouseover"]),qo("onMouseLeave",["mouseout","mouseover"]),qo("onPointerEnter",["pointerout","pointerover"]),qo("onPointerLeave",["pointerout","pointerover"]),co("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),co("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),co("onBeforeInput",["compositionend","keypress","textInput","paste"]),co("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),co("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),co("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lc="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(" "),lM=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Lc));function Sw(r,o){o=(o&4)!==0;for(var a=0;a<r.length;a++){var f=r[a],x=f.event;f=f.listeners;e:{var v=void 0;if(o)for(var j=f.length-1;0<=j;j--){var H=f[j],X=H.instance,ce=H.currentTarget;if(H=H.listener,X!==v&&x.isPropagationStopped())break e;v=H,x.currentTarget=ce;try{v(x)}catch(be){cf(be)}x.currentTarget=null,v=X}else for(j=0;j<f.length;j++){if(H=f[j],X=H.instance,ce=H.currentTarget,H=H.listener,X!==v&&x.isPropagationStopped())break e;v=H,x.currentTarget=ce;try{v(x)}catch(be){cf(be)}x.currentTarget=null,v=X}}}}function At(r,o){var a=o[Tr];a===void 0&&(a=o[Tr]=new Set);var f=r+"__bubble";a.has(f)||(kw(o,r,2,!1),a.add(f))}function dg(r,o,a){var f=0;o&&(f|=4),kw(a,r,f,o)}var Xf="_reactListening"+Math.random().toString(36).slice(2);function hg(r){if(!r[Xf]){r[Xf]=!0,ar.forEach(function(a){a!=="selectionchange"&&(lM.has(a)||dg(a,!1,r),dg(a,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Xf]||(o[Xf]=!0,dg("selectionchange",!1,o))}}function kw(r,o,a,f){switch($w(o)){case 2:var x=DM;break;case 8:x=_M;break;default:x=jg}a=x.bind(null,o,a,r),x=void 0,!Kt||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(x=!0),f?x!==void 0?r.addEventListener(o,a,{capture:!0,passive:x}):r.addEventListener(o,a,!0):x!==void 0?r.addEventListener(o,a,{passive:x}):r.addEventListener(o,a,!1)}function mg(r,o,a,f,x){var v=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var j=f.tag;if(j===3||j===4){var H=f.stateNode.containerInfo;if(H===x)break;if(j===4)for(j=f.return;j!==null;){var X=j.tag;if((X===3||X===4)&&j.stateNode.containerInfo===x)return;j=j.return}for(;H!==null;){if(j=Ti(H),j===null)return;if(X=j.tag,X===5||X===6||X===26||X===27){f=v=j;continue e}H=H.parentNode}}f=f.return}sf(function(){var ce=v,be=sc(a),Ee=[];e:{var ue=n0.get(r);if(ue!==void 0){var he=Zl,We=r;switch(r){case"keypress":if(yr(a)===0)break e;case"keydown":case"keyup":he=eA;break;case"focusin":We="focus",he=Pm;break;case"focusout":We="blur",he=Pm;break;case"beforeblur":case"afterblur":he=Pm;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=Av;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=VO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=rA;break;case $v:case Qv:case e0:he=qO;break;case t0:he=oA;break;case"scroll":case"scrollend":he=HO;break;case"wheel":he=lA;break;case"copy":case"cut":case"paste":he=YO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=zv;break;case"toggle":case"beforetoggle":he=cA}var ct=(o&4)!==0,cn=!ct&&(r==="scroll"||r==="scrollend"),oe=ct?ue!==null?ue+"Capture":null:ue;ct=[];for(var ee=ce,ae;ee!==null;){var ke=ee;if(ae=ke.stateNode,ke=ke.tag,ke!==5&&ke!==26&&ke!==27||ae===null||oe===null||(ke=He(ee,oe),ke!=null&&ct.push(Fc(ee,ke,ae))),cn)break;ee=ee.return}0<ct.length&&(ue=new he(ue,We,null,a,be),Ee.push({event:ue,listeners:ct}))}}if((o&7)===0){e:{if(ue=r==="mouseover"||r==="pointerover",he=r==="mouseout"||r==="pointerout",ue&&a!==oc&&(We=a.relatedTarget||a.fromElement)&&(Ti(We)||We[nt]))break e;if((he||ue)&&(ue=be.window===be?be:(ue=be.ownerDocument)?ue.defaultView||ue.parentWindow:window,he?(We=a.relatedTarget||a.toElement,he=ce,We=We?Ti(We):null,We!==null&&(cn=l(We),ct=We.tag,We!==cn||ct!==5&&ct!==27&&ct!==6)&&(We=null)):(he=null,We=ce),he!==We)){if(ct=Av,ke="onMouseLeave",oe="onMouseEnter",ee="mouse",(r==="pointerout"||r==="pointerover")&&(ct=zv,ke="onPointerLeave",oe="onPointerEnter",ee="pointer"),cn=he==null?ue:Ri(he),ae=We==null?ue:Ri(We),ue=new ct(ke,ee+"leave",he,a,be),ue.target=cn,ue.relatedTarget=ae,ke=null,Ti(be)===ce&&(ct=new ct(oe,ee+"enter",We,a,be),ct.target=ae,ct.relatedTarget=cn,ke=ct),cn=ke,he&&We)t:{for(ct=aM,oe=he,ee=We,ae=0,ke=oe;ke;ke=ct(ke))ae++;ke=0;for(var it=ee;it;it=ct(it))ke++;for(;0<ae-ke;)oe=ct(oe),ae--;for(;0<ke-ae;)ee=ct(ee),ke--;for(;ae--;){if(oe===ee||ee!==null&&oe===ee.alternate){ct=oe;break t}oe=ct(oe),ee=ct(ee)}ct=null}else ct=null;he!==null&&Ew(Ee,ue,he,ct,!1),We!==null&&cn!==null&&Ew(Ee,cn,We,ct,!0)}}e:{if(ue=ce?Ri(ce):window,he=ue.nodeName&&ue.nodeName.toLowerCase(),he==="select"||he==="input"&&ue.type==="file")var qt=Bv;else if(Fv(ue))if(Vv)qt=bA;else{qt=xA;var Qe=gA}else he=ue.nodeName,!he||he.toLowerCase()!=="input"||ue.type!=="checkbox"&&ue.type!=="radio"?ce&&Gi(ce.elementType)&&(qt=Bv):qt=yA;if(qt&&(qt=qt(r,ce))){Hv(Ee,qt,a,be);break e}Qe&&Qe(r,ue,ce),r==="focusout"&&ce&&ue.type==="number"&&ce.memoizedProps.value!=null&&Bl(ue,"number",ue.value)}switch(Qe=ce?Ri(ce):window,r){case"focusin":(Fv(Qe)||Qe.contentEditable==="true")&&(Gl=Qe,Um=ce,mc=null);break;case"focusout":mc=Um=Gl=null;break;case"mousedown":Zm=!0;break;case"contextmenu":case"mouseup":case"dragend":Zm=!1,Jv(Ee,a,be);break;case"selectionchange":if(wA)break;case"keydown":case"keyup":Jv(Ee,a,be)}var vt;if(Fm)e:{switch(r){case"compositionstart":var It="onCompositionStart";break e;case"compositionend":It="onCompositionEnd";break e;case"compositionupdate":It="onCompositionUpdate";break e}It=void 0}else ql?Pv(r,a)&&(It="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(It="onCompositionStart");It&&(Iv&&a.locale!=="ko"&&(ql||It!=="onCompositionStart"?It==="onCompositionEnd"&&ql&&(vt=cr()):(on=be,nr="value"in on?on.value:on.textContent,ql=!0)),Qe=Jf(ce,It),0<Qe.length&&(It=new Mv(It,r,null,a,be),Ee.push({event:It,listeners:Qe}),vt?It.data=vt:(vt=Lv(a),vt!==null&&(It.data=vt)))),(vt=fA?dA(r,a):hA(r,a))&&(It=Jf(ce,"onBeforeInput"),0<It.length&&(Qe=new Mv("onBeforeInput","beforeinput",null,a,be),Ee.push({event:Qe,listeners:It}),Qe.data=vt)),iM(Ee,r,ce,a,be)}Sw(Ee,o)})}function Fc(r,o,a){return{instance:r,listener:o,currentTarget:a}}function Jf(r,o){for(var a=o+"Capture",f=[];r!==null;){var x=r,v=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||v===null||(x=He(r,a),x!=null&&f.unshift(Fc(r,x,v)),x=He(r,o),x!=null&&f.push(Fc(r,x,v))),r.tag===3)return f;r=r.return}return[]}function aM(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Ew(r,o,a,f,x){for(var v=o._reactName,j=[];a!==null&&a!==f;){var H=a,X=H.alternate,ce=H.stateNode;if(H=H.tag,X!==null&&X===f)break;H!==5&&H!==26&&H!==27||ce===null||(X=ce,x?(ce=He(a,v),ce!=null&&j.unshift(Fc(a,ce,X))):x||(ce=He(a,v),ce!=null&&j.push(Fc(a,ce,X)))),a=a.return}j.length!==0&&r.push({event:o,listeners:j})}var cM=/\r\n?/g,uM=/\u0000|\uFFFD/g;function Cw(r){return(typeof r=="string"?r:""+r).replace(cM,`
|
|
9
|
+
`).replace(uM,"")}function Tw(r,o){return o=Cw(o),Cw(r)===o}function an(r,o,a,f,x,v){switch(a){case"children":typeof f=="string"?o==="body"||o==="textarea"&&f===""||fo(r,f):(typeof f=="number"||typeof f=="bigint")&&o!=="body"&&fo(r,""+f);break;case"className":Fl(r,"class",f);break;case"tabIndex":Fl(r,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":Fl(r,a,f);break;case"style":Js(r,f,v);break;case"data":if(o!=="object"){Fl(r,"data",f);break}case"src":case"href":if(f===""&&(o!=="a"||a!=="href")){r.removeAttribute(a);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){r.removeAttribute(a);break}f=Yo(""+f),r.setAttribute(a,f);break;case"action":case"formAction":if(typeof f=="function"){r.setAttribute(a,"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 v=="function"&&(a==="formAction"?(o!=="input"&&an(r,o,"name",x.name,x,null),an(r,o,"formEncType",x.formEncType,x,null),an(r,o,"formMethod",x.formMethod,x,null),an(r,o,"formTarget",x.formTarget,x,null)):(an(r,o,"encType",x.encType,x,null),an(r,o,"method",x.method,x,null),an(r,o,"target",x.target,x,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){r.removeAttribute(a);break}f=Yo(""+f),r.setAttribute(a,f);break;case"onClick":f!=null&&(r.onclick=qr);break;case"onScroll":f!=null&&At("scroll",r);break;case"onScrollEnd":f!=null&&At("scrollend",r);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(i(61));if(a=f.__html,a!=null){if(x.children!=null)throw Error(i(60));r.innerHTML=a}}break;case"multiple":r.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":r.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){r.removeAttribute("xlink:href");break}a=Yo(""+f),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?r.setAttribute(a,""+f):r.removeAttribute(a);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":f&&typeof f!="function"&&typeof f!="symbol"?r.setAttribute(a,""):r.removeAttribute(a);break;case"capture":case"download":f===!0?r.setAttribute(a,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?r.setAttribute(a,f):r.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?r.setAttribute(a,f):r.removeAttribute(a);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?r.removeAttribute(a):r.setAttribute(a,f);break;case"popover":At("beforetoggle",r),At("toggle",r),Go(r,"popover",f);break;case"xlinkActuate":ii(r,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":ii(r,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":ii(r,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":ii(r,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":ii(r,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":ii(r,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":ii(r,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":ii(r,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":ii(r,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":Go(r,"is",f);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=rc.get(a)||a,Go(r,a,f))}}function pg(r,o,a,f,x,v){switch(a){case"style":Js(r,f,v);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(i(61));if(a=f.__html,a!=null){if(x.children!=null)throw Error(i(60));r.innerHTML=a}}break;case"children":typeof f=="string"?fo(r,f):(typeof f=="number"||typeof f=="bigint")&&fo(r,""+f);break;case"onScroll":f!=null&&At("scroll",r);break;case"onScrollEnd":f!=null&&At("scrollend",r);break;case"onClick":f!=null&&(r.onclick=qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ur.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(x=a.endsWith("Capture"),o=a.slice(2,x?a.length-7:void 0),v=r[Ht]||null,v=v!=null?v[a]:null,typeof v=="function"&&r.removeEventListener(o,v,x),typeof f=="function")){typeof v!="function"&&v!==null&&(a in r?r[a]=null:r.hasAttribute(a)&&r.removeAttribute(a)),r.addEventListener(o,f,x);break e}a in r?r[a]=f:f===!0?r.setAttribute(a,""):Go(r,a,f)}}}function hr(r,o,a){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":At("error",r),At("load",r);var f=!1,x=!1,v;for(v in a)if(a.hasOwnProperty(v)){var j=a[v];if(j!=null)switch(v){case"src":f=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,o));default:an(r,o,v,j,a,null)}}x&&an(r,o,"srcSet",a.srcSet,a,null),f&&an(r,o,"src",a.src,a,null);return;case"input":At("invalid",r);var H=v=j=x=null,X=null,ce=null;for(f in a)if(a.hasOwnProperty(f)){var be=a[f];if(be!=null)switch(f){case"name":x=be;break;case"type":j=be;break;case"checked":X=be;break;case"defaultChecked":ce=be;break;case"value":v=be;break;case"defaultValue":H=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(i(137,o));break;default:an(r,o,f,be,a,null)}}of(r,v,H,X,ce,j,x,!1);return;case"select":At("invalid",r),f=j=v=null;for(x in a)if(a.hasOwnProperty(x)&&(H=a[x],H!=null))switch(x){case"value":v=H;break;case"defaultValue":j=H;break;case"multiple":f=H;default:an(r,o,x,H,a,null)}o=v,a=j,r.multiple=!!f,o!=null?Ni(r,!!f,o,!1):a!=null&&Ni(r,!!f,a,!0);return;case"textarea":At("invalid",r),v=x=f=null;for(j in a)if(a.hasOwnProperty(j)&&(H=a[j],H!=null))switch(j){case"value":f=H;break;case"defaultValue":x=H;break;case"children":v=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(91));break;default:an(r,o,j,H,a,null)}Xs(r,f,x,v);return;case"option":for(X in a)a.hasOwnProperty(X)&&(f=a[X],f!=null)&&(X==="selected"?r.selected=f&&typeof f!="function"&&typeof f!="symbol":an(r,o,X,f,a,null));return;case"dialog":At("beforetoggle",r),At("toggle",r),At("cancel",r),At("close",r);break;case"iframe":case"object":At("load",r);break;case"video":case"audio":for(f=0;f<Lc.length;f++)At(Lc[f],r);break;case"image":At("error",r),At("load",r);break;case"details":At("toggle",r);break;case"embed":case"source":case"link":At("error",r),At("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ce in a)if(a.hasOwnProperty(ce)&&(f=a[ce],f!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,o));default:an(r,o,ce,f,a,null)}return;default:if(Gi(o)){for(be in a)a.hasOwnProperty(be)&&(f=a[be],f!==void 0&&pg(r,o,be,f,a,void 0));return}}for(H in a)a.hasOwnProperty(H)&&(f=a[H],f!=null&&an(r,o,H,f,a,null))}function fM(r,o,a,f){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,v=null,j=null,H=null,X=null,ce=null,be=null;for(he in a){var Ee=a[he];if(a.hasOwnProperty(he)&&Ee!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":X=Ee;default:f.hasOwnProperty(he)||an(r,o,he,null,f,Ee)}}for(var ue in f){var he=f[ue];if(Ee=a[ue],f.hasOwnProperty(ue)&&(he!=null||Ee!=null))switch(ue){case"type":v=he;break;case"name":x=he;break;case"checked":ce=he;break;case"defaultChecked":be=he;break;case"value":j=he;break;case"defaultValue":H=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,o));break;default:he!==Ee&&an(r,o,ue,he,f,Ee)}}ec(r,j,H,X,ce,be,v,x);return;case"select":he=j=H=ue=null;for(v in a)if(X=a[v],a.hasOwnProperty(v)&&X!=null)switch(v){case"value":break;case"multiple":he=X;default:f.hasOwnProperty(v)||an(r,o,v,null,f,X)}for(x in f)if(v=f[x],X=a[x],f.hasOwnProperty(x)&&(v!=null||X!=null))switch(x){case"value":ue=v;break;case"defaultValue":H=v;break;case"multiple":j=v;default:v!==X&&an(r,o,x,v,f,X)}o=H,a=j,f=he,ue!=null?Ni(r,!!a,ue,!1):!!f!=!!a&&(o!=null?Ni(r,!!a,o,!0):Ni(r,!!a,a?[]:"",!1));return;case"textarea":he=ue=null;for(H in a)if(x=a[H],a.hasOwnProperty(H)&&x!=null&&!f.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:an(r,o,H,null,f,x)}for(j in f)if(x=f[j],v=a[j],f.hasOwnProperty(j)&&(x!=null||v!=null))switch(j){case"value":ue=x;break;case"defaultValue":he=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(i(91));break;default:x!==v&&an(r,o,j,x,f,v)}tc(r,ue,he);return;case"option":for(var We in a)ue=a[We],a.hasOwnProperty(We)&&ue!=null&&!f.hasOwnProperty(We)&&(We==="selected"?r.selected=!1:an(r,o,We,null,f,ue));for(X in f)ue=f[X],he=a[X],f.hasOwnProperty(X)&&ue!==he&&(ue!=null||he!=null)&&(X==="selected"?r.selected=ue&&typeof ue!="function"&&typeof ue!="symbol":an(r,o,X,ue,f,he));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 ct in a)ue=a[ct],a.hasOwnProperty(ct)&&ue!=null&&!f.hasOwnProperty(ct)&&an(r,o,ct,null,f,ue);for(ce in f)if(ue=f[ce],he=a[ce],f.hasOwnProperty(ce)&&ue!==he&&(ue!=null||he!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(i(137,o));break;default:an(r,o,ce,ue,f,he)}return;default:if(Gi(o)){for(var cn in a)ue=a[cn],a.hasOwnProperty(cn)&&ue!==void 0&&!f.hasOwnProperty(cn)&&pg(r,o,cn,void 0,f,ue);for(be in f)ue=f[be],he=a[be],!f.hasOwnProperty(be)||ue===he||ue===void 0&&he===void 0||pg(r,o,be,ue,f,he);return}}for(var oe in a)ue=a[oe],a.hasOwnProperty(oe)&&ue!=null&&!f.hasOwnProperty(oe)&&an(r,o,oe,null,f,ue);for(Ee in f)ue=f[Ee],he=a[Ee],!f.hasOwnProperty(Ee)||ue===he||ue==null&&he==null||an(r,o,Ee,ue,f,he)}function Rw(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dM(){if(typeof performance.getEntriesByType=="function"){for(var r=0,o=0,a=performance.getEntriesByType("resource"),f=0;f<a.length;f++){var x=a[f],v=x.transferSize,j=x.initiatorType,H=x.duration;if(v&&H&&Rw(j)){for(j=0,H=x.responseEnd,f+=1;f<a.length;f++){var X=a[f],ce=X.startTime;if(ce>H)break;var be=X.transferSize,Ee=X.initiatorType;be&&Rw(Ee)&&(X=X.responseEnd,j+=be*(X<H?1:(H-ce)/(X-ce)))}if(--f,o+=8*(v+j)/(x.duration/1e3),r++,10<r)break}}if(0<r)return o/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var gg=null,xg=null;function Wf(r){return r.nodeType===9?r:r.ownerDocument}function jw(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Nw(r,o){if(r===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&o==="foreignObject"?0:r}function yg(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var bg=null;function hM(){var r=window.event;return r&&r.type==="popstate"?r===bg?!1:(bg=r,!0):(bg=null,!1)}var Ow=typeof setTimeout=="function"?setTimeout:void 0,mM=typeof clearTimeout=="function"?clearTimeout:void 0,Aw=typeof Promise=="function"?Promise:void 0,pM=typeof queueMicrotask=="function"?queueMicrotask:typeof Aw<"u"?function(r){return Aw.resolve(null).then(r).catch(gM)}:Ow;function gM(r){setTimeout(function(){throw r})}function hs(r){return r==="head"}function Mw(r,o){var a=o,f=0;do{var x=a.nextSibling;if(r.removeChild(a),x&&x.nodeType===8)if(a=x.data,a==="/$"||a==="/&"){if(f===0){r.removeChild(x),ba(o);return}f--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")f++;else if(a==="html")Hc(r.ownerDocument.documentElement);else if(a==="head"){a=r.ownerDocument.head,Hc(a);for(var v=a.firstChild;v;){var j=v.nextSibling,H=v.nodeName;v[Zo]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&v.rel.toLowerCase()==="stylesheet"||a.removeChild(v),v=j}}else a==="body"&&Hc(r.ownerDocument.body);a=x}while(a);ba(o)}function zw(r,o){var a=r;r=0;do{var f=a.nextSibling;if(a.nodeType===1?o?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(o?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),f&&f.nodeType===8)if(a=f.data,a==="/$"){if(r===0)break;r--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||r++;a=f}while(a)}function vg(r){var o=r.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var a=o;switch(o=o.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":vg(a),Qa(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}r.removeChild(a)}}function xM(r,o,a,f){for(;r.nodeType===1;){var x=a;if(r.nodeName.toLowerCase()!==o.toLowerCase()){if(!f&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(f){if(!r[Zo])switch(o){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==x.rel||r.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||r.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||r.getAttribute("title")!==(x.title==null?null:x.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(x.src==null?null:x.src)||r.getAttribute("type")!==(x.type==null?null:x.type)||r.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(o==="input"&&r.type==="hidden"){var v=x.name==null?null:""+x.name;if(x.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=di(r.nextSibling),r===null)break}return null}function yM(r,o,a){if(o==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=di(r.nextSibling),r===null))return null;return r}function Iw(r,o){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=di(r.nextSibling),r===null))return null;return r}function wg(r){return r.data==="$?"||r.data==="$~"}function Sg(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function bM(r,o){var a=r.ownerDocument;if(r.data==="$~")r._reactRetry=o;else if(r.data!=="$?"||a.readyState!=="loading")o();else{var f=function(){o(),a.removeEventListener("DOMContentLoaded",f)};a.addEventListener("DOMContentLoaded",f),r._reactRetry=f}}function di(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return r}var kg=null;function Dw(r){r=r.nextSibling;for(var o=0;r;){if(r.nodeType===8){var a=r.data;if(a==="/$"||a==="/&"){if(o===0)return di(r.nextSibling);o--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||o++}r=r.nextSibling}return null}function _w(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var a=r.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(o===0)return r;o--}else a!=="/$"&&a!=="/&"||o++}r=r.previousSibling}return null}function Pw(r,o,a){switch(o=Wf(a),r){case"html":if(r=o.documentElement,!r)throw Error(i(452));return r;case"head":if(r=o.head,!r)throw Error(i(453));return r;case"body":if(r=o.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Hc(r){for(var o=r.attributes;o.length;)r.removeAttributeNode(o[0]);Qa(r)}var hi=new Map,Lw=new Set;function $f(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ro=V.d;V.d={f:vM,r:wM,D:SM,C:kM,L:EM,m:CM,X:RM,S:TM,M:jM};function vM(){var r=Ro.f(),o=Uf();return r||o}function wM(r){var o=ao(r);o!==null&&o.tag===5&&o.type==="form"?t1(o):Ro.r(r)}var ga=typeof document>"u"?null:document;function Fw(r,o,a){var f=ga;if(f&&typeof o=="string"&&o){var x=xr(o);x='link[rel="'+r+'"][href="'+x+'"]',typeof a=="string"&&(x+='[crossorigin="'+a+'"]'),Lw.has(x)||(Lw.add(x),r={rel:r,crossOrigin:a,href:o},f.querySelector(x)===null&&(o=f.createElement("link"),hr(o,"link",r),Un(o),f.head.appendChild(o)))}}function SM(r){Ro.D(r),Fw("dns-prefetch",r,null)}function kM(r,o){Ro.C(r,o),Fw("preconnect",r,o)}function EM(r,o,a){Ro.L(r,o,a);var f=ga;if(f&&r&&o){var x='link[rel="preload"][as="'+xr(o)+'"]';o==="image"&&a&&a.imageSrcSet?(x+='[imagesrcset="'+xr(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(x+='[imagesizes="'+xr(a.imageSizes)+'"]')):x+='[href="'+xr(r)+'"]';var v=x;switch(o){case"style":v=xa(r);break;case"script":v=ya(r)}hi.has(v)||(r=g({rel:"preload",href:o==="image"&&a&&a.imageSrcSet?void 0:r,as:o},a),hi.set(v,r),f.querySelector(x)!==null||o==="style"&&f.querySelector(Bc(v))||o==="script"&&f.querySelector(Vc(v))||(o=f.createElement("link"),hr(o,"link",r),Un(o),f.head.appendChild(o)))}}function CM(r,o){Ro.m(r,o);var a=ga;if(a&&r){var f=o&&typeof o.as=="string"?o.as:"script",x='link[rel="modulepreload"][as="'+xr(f)+'"][href="'+xr(r)+'"]',v=x;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=ya(r)}if(!hi.has(v)&&(r=g({rel:"modulepreload",href:r},o),hi.set(v,r),a.querySelector(x)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Vc(v)))return}f=a.createElement("link"),hr(f,"link",r),Un(f),a.head.appendChild(f)}}}function TM(r,o,a){Ro.S(r,o,a);var f=ga;if(f&&r){var x=ji(f).hoistableStyles,v=xa(r);o=o||"default";var j=x.get(v);if(!j){var H={loading:0,preload:null};if(j=f.querySelector(Bc(v)))H.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":o},a),(a=hi.get(v))&&Eg(r,a);var X=j=f.createElement("link");Un(X),hr(X,"link",r),X._p=new Promise(function(ce,be){X.onload=ce,X.onerror=be}),X.addEventListener("load",function(){H.loading|=1}),X.addEventListener("error",function(){H.loading|=2}),H.loading|=4,Qf(j,o,f)}j={type:"stylesheet",instance:j,count:1,state:H},x.set(v,j)}}}function RM(r,o){Ro.X(r,o);var a=ga;if(a&&r){var f=ji(a).hoistableScripts,x=ya(r),v=f.get(x);v||(v=a.querySelector(Vc(x)),v||(r=g({src:r,async:!0},o),(o=hi.get(x))&&Cg(r,o),v=a.createElement("script"),Un(v),hr(v,"link",r),a.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},f.set(x,v))}}function jM(r,o){Ro.M(r,o);var a=ga;if(a&&r){var f=ji(a).hoistableScripts,x=ya(r),v=f.get(x);v||(v=a.querySelector(Vc(x)),v||(r=g({src:r,async:!0,type:"module"},o),(o=hi.get(x))&&Cg(r,o),v=a.createElement("script"),Un(v),hr(v,"link",r),a.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},f.set(x,v))}}function Hw(r,o,a,f){var x=(x=W.current)?$f(x):null;if(!x)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(o=xa(a.href),a=ji(x).hoistableStyles,f=a.get(o),f||(f={type:"style",instance:null,count:0,state:null},a.set(o,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){r=xa(a.href);var v=ji(x).hoistableStyles,j=v.get(r);if(j||(x=x.ownerDocument||x,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,j),(v=x.querySelector(Bc(r)))&&!v._p&&(j.instance=v,j.state.loading=5),hi.has(r)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},hi.set(r,a),v||NM(x,r,a,j.state))),o&&f===null)throw Error(i(528,""));return j}if(o&&f!==null)throw Error(i(529,""));return null;case"script":return o=a.async,a=a.src,typeof a=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=ya(a),a=ji(x).hoistableScripts,f=a.get(o),f||(f={type:"script",instance:null,count:0,state:null},a.set(o,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function xa(r){return'href="'+xr(r)+'"'}function Bc(r){return'link[rel="stylesheet"]['+r+"]"}function Bw(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function NM(r,o,a,f){r.querySelector('link[rel="preload"][as="style"]['+o+"]")?f.loading=1:(o=r.createElement("link"),f.preload=o,o.addEventListener("load",function(){return f.loading|=1}),o.addEventListener("error",function(){return f.loading|=2}),hr(o,"link",a),Un(o),r.head.appendChild(o))}function ya(r){return'[src="'+xr(r)+'"]'}function Vc(r){return"script[async]"+r}function Vw(r,o,a){if(o.count++,o.instance===null)switch(o.type){case"style":var f=r.querySelector('style[data-href~="'+xr(a.href)+'"]');if(f)return o.instance=f,Un(f),f;var x=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return f=(r.ownerDocument||r).createElement("style"),Un(f),hr(f,"style",x),Qf(f,a.precedence,r),o.instance=f;case"stylesheet":x=xa(a.href);var v=r.querySelector(Bc(x));if(v)return o.state.loading|=4,o.instance=v,Un(v),v;f=Bw(a),(x=hi.get(x))&&Eg(f,x),v=(r.ownerDocument||r).createElement("link"),Un(v);var j=v;return j._p=new Promise(function(H,X){j.onload=H,j.onerror=X}),hr(v,"link",f),o.state.loading|=4,Qf(v,a.precedence,r),o.instance=v;case"script":return v=ya(a.src),(x=r.querySelector(Vc(v)))?(o.instance=x,Un(x),x):(f=a,(x=hi.get(v))&&(f=g({},a),Cg(f,x)),r=r.ownerDocument||r,x=r.createElement("script"),Un(x),hr(x,"link",f),r.head.appendChild(x),o.instance=x);case"void":return null;default:throw Error(i(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(f=o.instance,o.state.loading|=4,Qf(f,a.precedence,r));return o.instance}function Qf(r,o,a){for(var f=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=f.length?f[f.length-1]:null,v=x,j=0;j<f.length;j++){var H=f[j];if(H.dataset.precedence===o)v=H;else if(v!==x)break}v?v.parentNode.insertBefore(r,v.nextSibling):(o=a.nodeType===9?a.head:a,o.insertBefore(r,o.firstChild))}function Eg(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.title==null&&(r.title=o.title)}function Cg(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.integrity==null&&(r.integrity=o.integrity)}var ed=null;function Uw(r,o,a){if(ed===null){var f=new Map,x=ed=new Map;x.set(a,f)}else x=ed,f=x.get(a),f||(f=new Map,x.set(a,f));if(f.has(r))return f;for(f.set(r,null),a=a.getElementsByTagName(r),x=0;x<a.length;x++){var v=a[x];if(!(v[Zo]||v[Zt]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var j=v.getAttribute(o)||"";j=r+j;var H=f.get(j);H?H.push(v):f.set(j,[v])}}return f}function Zw(r,o,a){r=r.ownerDocument||r,r.head.insertBefore(a,o==="title"?r.querySelector("head > title"):null)}function OM(r,o,a){if(a===1||o.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(r=o.disabled,typeof o.precedence=="string"&&r==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function qw(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function AM(r,o,a,f){if(a.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var x=xa(f.href),v=o.querySelector(Bc(x));if(v){o=v._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(r.count++,r=td.bind(r),o.then(r,r)),a.state.loading|=4,a.instance=v,Un(v);return}v=o.ownerDocument||o,f=Bw(f),(x=hi.get(x))&&Eg(f,x),v=v.createElement("link"),Un(v);var j=v;j._p=new Promise(function(H,X){j.onload=H,j.onerror=X}),hr(v,"link",f),a.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(a,o),(o=a.state.preload)&&(a.state.loading&3)===0&&(r.count++,a=td.bind(r),o.addEventListener("load",a),o.addEventListener("error",a))}}var Tg=0;function MM(r,o){return r.stylesheets&&r.count===0&&rd(r,r.stylesheets),0<r.count||0<r.imgCount?function(a){var f=setTimeout(function(){if(r.stylesheets&&rd(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+o);0<r.imgBytes&&Tg===0&&(Tg=62500*dM());var x=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&rd(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Tg?50:800)+o);return r.unsuspend=a,function(){r.unsuspend=null,clearTimeout(f),clearTimeout(x)}}:null}function td(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rd(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var nd=null;function rd(r,o){r.stylesheets=null,r.unsuspend!==null&&(r.count++,nd=new Map,o.forEach(zM,r),nd=null,td.call(r))}function zM(r,o){if(!(o.state.loading&4)){var a=nd.get(r);if(a)var f=a.get(null);else{a=new Map,nd.set(r,a);for(var x=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<x.length;v++){var j=x[v];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(a.set(j.dataset.precedence,j),f=j)}f&&a.set(null,f)}x=o.instance,j=x.getAttribute("data-precedence"),v=a.get(j)||f,v===f&&a.set(null,x),a.set(j,x),this.count++,f=td.bind(this),x.addEventListener("load",f),x.addEventListener("error",f),v?v.parentNode.insertBefore(x,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(x,r.firstChild)),o.state.loading|=4}}var Uc={$$typeof:R,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function IM(r,o,a,f,x,v,j,H,X){this.tag=1,this.containerInfo=r,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=rn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rn(0),this.hiddenUpdates=rn(null),this.identifierPrefix=f,this.onUncaughtError=x,this.onCaughtError=v,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function Gw(r,o,a,f,x,v,j,H,X,ce,be,Ee){return r=new IM(r,o,a,j,X,ce,be,Ee,H),o=1,v===!0&&(o|=24),v=Kr(3,null,null,o),r.current=v,v.stateNode=r,o=op(),o.refCount++,r.pooledCache=o,o.refCount++,v.memoizedState={element:f,isDehydrated:a,cache:o},cp(v),r}function Yw(r){return r?(r=Xl,r):Xl}function Kw(r,o,a,f,x,v){x=Yw(x),f.context===null?f.context=x:f.pendingContext=x,f=ns(o),f.payload={element:a},v=v===void 0?null:v,v!==null&&(f.callback=v),a=rs(r,f,o),a!==null&&(_r(a,r,o),wc(a,r,o))}function Xw(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<o?a:o}}function Rg(r,o){Xw(r,o),(r=r.alternate)&&Xw(r,o)}function Jw(r){if(r.tag===13||r.tag===31){var o=Qs(r,67108864);o!==null&&_r(o,r,67108864),Rg(r,67108864)}}function Ww(r){if(r.tag===13||r.tag===31){var o=Qr();o=Yt(o);var a=Qs(r,o);a!==null&&_r(a,r,o),Rg(r,o)}}var id=!0;function DM(r,o,a,f){var x=F.T;F.T=null;var v=V.p;try{V.p=2,jg(r,o,a,f)}finally{V.p=v,F.T=x}}function _M(r,o,a,f){var x=F.T;F.T=null;var v=V.p;try{V.p=8,jg(r,o,a,f)}finally{V.p=v,F.T=x}}function jg(r,o,a,f){if(id){var x=Ng(f);if(x===null)mg(r,o,f,od,a),Qw(r,f);else if(LM(x,r,o,a,f))f.stopPropagation();else if(Qw(r,f),o&4&&-1<PM.indexOf(r)){for(;x!==null;){var v=ao(x);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var j=ht(v.pendingLanes);if(j!==0){var H=v;for(H.pendingLanes|=2,H.entangledLanes|=2;j;){var X=1<<31-Je(j);H.entanglements[1]|=X,j&=~X}Wi(v),(Xt&6)===0&&(Bf=re()+500,Pc(0))}}break;case 31:case 13:H=Qs(v,2),H!==null&&_r(H,v,2),Uf(),Rg(v,2)}if(v=Ng(f),v===null&&mg(r,o,f,od,a),v===x)break;x=v}x!==null&&f.stopPropagation()}else mg(r,o,f,null,a)}}function Ng(r){return r=sc(r),Og(r)}var od=null;function Og(r){if(od=null,r=Ti(r),r!==null){var o=l(r);if(o===null)r=null;else{var a=o.tag;if(a===13){if(r=c(o),r!==null)return r;r=null}else if(a===31){if(r=u(o),r!==null)return r;r=null}else if(a===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null)}}return od=r,null}function $w(r){switch(r){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(le()){case $:return 2;case Q:return 8;case de:case Oe:return 32;case _e:return 268435456;default:return 32}default:return 32}}var Ag=!1,ms=null,ps=null,gs=null,Zc=new Map,qc=new Map,xs=[],PM="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 Qw(r,o){switch(r){case"focusin":case"focusout":ms=null;break;case"dragenter":case"dragleave":ps=null;break;case"mouseover":case"mouseout":gs=null;break;case"pointerover":case"pointerout":Zc.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":qc.delete(o.pointerId)}}function Gc(r,o,a,f,x,v){return r===null||r.nativeEvent!==v?(r={blockedOn:o,domEventName:a,eventSystemFlags:f,nativeEvent:v,targetContainers:[x]},o!==null&&(o=ao(o),o!==null&&Jw(o)),r):(r.eventSystemFlags|=f,o=r.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),r)}function LM(r,o,a,f,x){switch(o){case"focusin":return ms=Gc(ms,r,o,a,f,x),!0;case"dragenter":return ps=Gc(ps,r,o,a,f,x),!0;case"mouseover":return gs=Gc(gs,r,o,a,f,x),!0;case"pointerover":var v=x.pointerId;return Zc.set(v,Gc(Zc.get(v)||null,r,o,a,f,x)),!0;case"gotpointercapture":return v=x.pointerId,qc.set(v,Gc(qc.get(v)||null,r,o,a,f,x)),!0}return!1}function eS(r){var o=Ti(r.target);if(o!==null){var a=l(o);if(a!==null){if(o=a.tag,o===13){if(o=c(a),o!==null){r.blockedOn=o,gr(r.priority,function(){Ww(a)});return}}else if(o===31){if(o=u(a),o!==null){r.blockedOn=o,gr(r.priority,function(){Ww(a)});return}}else if(o===3&&a.stateNode.current.memoizedState.isDehydrated){r.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}r.blockedOn=null}function sd(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var a=Ng(r.nativeEvent);if(a===null){a=r.nativeEvent;var f=new a.constructor(a.type,a);oc=f,a.target.dispatchEvent(f),oc=null}else return o=ao(a),o!==null&&Jw(o),r.blockedOn=a,!1;o.shift()}return!0}function tS(r,o,a){sd(r)&&a.delete(o)}function FM(){Ag=!1,ms!==null&&sd(ms)&&(ms=null),ps!==null&&sd(ps)&&(ps=null),gs!==null&&sd(gs)&&(gs=null),Zc.forEach(tS),qc.forEach(tS)}function ld(r,o){r.blockedOn===o&&(r.blockedOn=null,Ag||(Ag=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,FM)))}var ad=null;function nS(r){ad!==r&&(ad=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ad===r&&(ad=null);for(var o=0;o<r.length;o+=3){var a=r[o],f=r[o+1],x=r[o+2];if(typeof f!="function"){if(Og(f||a)===null)continue;break}var v=ao(a);v!==null&&(r.splice(o,3),o-=3,Np(v,{pending:!0,data:x,method:a.method,action:f},f,x))}}))}function ba(r){function o(X){return ld(X,r)}ms!==null&&ld(ms,r),ps!==null&&ld(ps,r),gs!==null&&ld(gs,r),Zc.forEach(o),qc.forEach(o);for(var a=0;a<xs.length;a++){var f=xs[a];f.blockedOn===r&&(f.blockedOn=null)}for(;0<xs.length&&(a=xs[0],a.blockedOn===null);)eS(a),a.blockedOn===null&&xs.shift();if(a=(r.ownerDocument||r).$$reactFormReplay,a!=null)for(f=0;f<a.length;f+=3){var x=a[f],v=a[f+1],j=x[Ht]||null;if(typeof v=="function")j||nS(a);else if(j){var H=null;if(v&&v.hasAttribute("formAction")){if(x=v,j=v[Ht]||null)H=j.formAction;else if(Og(x)!==null)continue}else H=j.action;typeof H=="function"?a[f+1]=H:(a.splice(f,3),f-=3),nS(a)}}}function rS(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(j){return x=j})},focusReset:"manual",scroll:"manual"})}function o(){x!==null&&(x(),x=null),f||setTimeout(a,20)}function a(){if(!f&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,x=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(a,100),function(){f=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),x!==null&&(x(),x=null)}}}function Mg(r){this._internalRoot=r}cd.prototype.render=Mg.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(i(409));var a=o.current,f=Qr();Kw(a,f,r,o,null,null)},cd.prototype.unmount=Mg.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Kw(r.current,2,null,r,null,null),Uf(),o[nt]=null}};function cd(r){this._internalRoot=r}cd.prototype.unstable_scheduleHydration=function(r){if(r){var o=Dn();r={blockedOn:null,target:r,priority:o};for(var a=0;a<xs.length&&o!==0&&o<xs[a].priority;a++);xs.splice(a,0,r),a===0&&eS(r)}};var iS=t.version;if(iS!=="19.2.8")throw Error(i(527,iS,"19.2.8"));V.findDOMNode=function(r){var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=h(o),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var HM={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ud=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ud.isDisabled&&ud.supportsFiber)try{rt=ud.inject(HM),at=ud}catch{}}return Kc.createRoot=function(r,o){if(!s(r))throw Error(i(299));var a=!1,f="",x=f1,v=d1,j=h1;return o!=null&&(o.unstable_strictMode===!0&&(a=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(x=o.onUncaughtError),o.onCaughtError!==void 0&&(v=o.onCaughtError),o.onRecoverableError!==void 0&&(j=o.onRecoverableError)),o=Gw(r,1,!1,null,null,a,f,null,x,v,j,rS),r[nt]=o.current,hg(r),new Mg(o)},Kc.hydrateRoot=function(r,o,a){if(!s(r))throw Error(i(299));var f=!1,x="",v=f1,j=d1,H=h1,X=null;return a!=null&&(a.unstable_strictMode===!0&&(f=!0),a.identifierPrefix!==void 0&&(x=a.identifierPrefix),a.onUncaughtError!==void 0&&(v=a.onUncaughtError),a.onCaughtError!==void 0&&(j=a.onCaughtError),a.onRecoverableError!==void 0&&(H=a.onRecoverableError),a.formState!==void 0&&(X=a.formState)),o=Gw(r,1,!0,o,a??null,f,x,X,v,j,H,rS),o.context=Yw(null),a=o.current,f=Qr(),f=Yt(f),x=ns(f),x.callback=null,rs(a,x,f),a=f,o.current.lanes=a,Sn(o,a),Wi(o),r[nt]=o.current,hg(r),new cd(o)},Kc.version="19.2.8",Kc}var mS;function tz(){if(mS)return Dg.exports;mS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Dg.exports=ez(),Dg.exports}var nz=tz(),Fg={exports:{}},Hg={};var pS;function rz(){if(pS)return Hg;pS=1;var e=Au();function t(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function u(g,y){var b=y(),S=i({inst:{value:b,getSnapshot:y}}),k=S[0].inst,E=S[1];return l(function(){k.value=b,k.getSnapshot=y,m(k)&&E({inst:k})},[g,b,y]),s(function(){return m(k)&&E({inst:k}),g(function(){m(k)&&E({inst:k})})},[g]),c(b),b}function m(g){var y=g.getSnapshot;g=g.value;try{var b=y();return!n(g,b)}catch{return!0}}function h(g,y){return y()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return Hg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Hg}var gS;function zC(){return gS||(gS=1,Fg.exports=rz()),Fg.exports}var gu=zC(),xS=Object.prototype.hasOwnProperty;function Ux(e,t){var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&Ux(e[i],t[i]););return i===-1}if(!n||typeof e=="object"){i=0;for(n in e)if(xS.call(e,n)&&++i&&!xS.call(t,n)||!(n in t)||!Ux(e[n],t[n]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}const IC=0,DC=1,_C=2,yS=3,PC=4,to=new WeakMap,Ao=()=>{},pn=Ao(),Gd=Object,mt=e=>e===pn,zi=e=>typeof e=="function",ro=(e,t)=>({...e,...t}),Zx=e=>zi(e.then),Bg={},fd={},qy="undefined",Mu=typeof window!=qy,qx=typeof document!=qy,iz=Mu&&"Deno"in window,oz=()=>Mu&&typeof window.requestAnimationFrame!=qy,LC=(e,t)=>{const n=to.get(e);return[()=>!mt(t)&&e.get(t)||Bg,i=>{if(!mt(t)){const s=e.get(t);t in fd||(fd[t]=s),n[5](t,ro(s,i),s||Bg)}},n[6],()=>!mt(t)&&t in fd?fd[t]:!mt(t)&&e.get(t)||Bg]};let Gx=!0;const sz=()=>Gx,[Yx,Kx]=Mu&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ao,Ao],lz=()=>{const e=qx&&document.visibilityState;return mt(e)||e!=="hidden"},az=e=>(qx&&document.addEventListener("visibilitychange",e),Yx("focus",e),()=>{qx&&document.removeEventListener("visibilitychange",e),Kx("focus",e)}),cz=e=>{const t=()=>{Gx=!0,e()},n=()=>{Gx=!1};return Yx("online",t),Yx("offline",n),()=>{Kx("online",t),Kx("offline",n)}},uz={isOnline:sz,isVisible:lz},fz={initFocus:az,initReconnect:cz},bS=!Th.useId,gl=!Mu||iz,dz=e=>oz()?window.requestAnimationFrame(e):setTimeout(e,1),wa=gl?w.useEffect:w.useLayoutEffect,Vg=typeof navigator<"u"&&navigator.connection,vS=!gl&&Vg&&(["slow-2g","2g"].includes(Vg.effectiveType)||Vg.saveData),dd=new WeakMap,hz=e=>Gd.prototype.toString.call(e),Ug=(e,t)=>e===`[object ${t}]`;let mz=0;const Xx=e=>{const t=typeof e,n=hz(e),i=Ug(n,"Date"),s=Ug(n,"RegExp"),l=Ug(n,"Object");let c,u;if(Gd(e)===e&&!i&&!s){if(c=dd.get(e),c)return c;if(c=++mz+"~",dd.set(e,c),Array.isArray(e)){for(c="@",u=0;u<e.length;u++)c+=Xx(e[u])+",";dd.set(e,c)}if(l){c="#";const m=Gd.keys(e).sort();for(;!mt(u=m.pop());)mt(e[u])||(c+=u+":"+Xx(e[u])+",");dd.set(e,c)}}else c=i?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return c},Gy=e=>{if(zi(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Xx(e):"",[e,t]};let pz=0;const Yd=()=>++pz;async function FC(...e){const[t,n,i,s]=e,l=ro({populateCache:!0,throwOnError:!0},typeof s=="boolean"?{revalidate:s}:s||{});let c=l.populateCache;const u=l.rollbackOnError;let m=l.optimisticData;const h=y=>typeof u=="function"?u(y):u!==!1,p=l.throwOnError;if(zi(n)){const y=n,b=[],S=t.keys();for(const k of S)!/^\$(inf|sub)\$/.test(k)&&y(t.get(k)._k)&&b.push(k);return Promise.all(b.map(g))}return g(n);async function g(y){const[b]=Gy(y);if(!b)return;const[S,k]=LC(t,b),[E,C,T,R]=to.get(t),N=()=>{const G=E[b];return(zi(l.revalidate)?l.revalidate(S().data,y):l.revalidate!==!1)&&(delete T[b],delete R[b],G&&G[0])?G[0](_C).then(()=>S().data):S().data};if(e.length<3)return N();let I=i,M,P=!1;const A=Yd();C[b]=[A,0];const L=!mt(m),D=S(),U=D.data,q=D._c,K=mt(q)?U:q;if(L&&(m=zi(m)?m(K,U):m,k({data:m,_c:K})),zi(I))try{I=I(K)}catch(G){M=G,P=!0}if(I&&Zx(I))if(I=await I.catch(G=>{M=G,P=!0}),A!==C[b][0]){if(P)throw M;return I}else P&&L&&h(M)&&(c=!0,k({data:K,_c:pn}));if(c&&!P)if(zi(c)){const G=c(I,K);k({data:G,error:pn,_c:pn})}else k({data:I,error:pn,_c:pn});if(C[b][1]=Yd(),Promise.resolve(N()).then(()=>{k({_c:pn})}),P){if(p)throw M;return}return I}}const wS=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},HC=(e,t)=>{if(!to.has(e)){const i=ro(fz,t),s=Object.create(null),l=FC.bind(pn,e);let c=Ao;const u=Object.create(null),m=(y,b)=>{const S=u[y]||[];return u[y]=S,S.push(b),()=>{const k=S.indexOf(b);k>=0&&(S[k]=S[S.length-1],S.pop())}},h=(y,b,S)=>{e.set(y,b);const k=u[y];if(k)for(const E of k)E(b,S)},p=y=>{const b=to.get(e),[,S,k,E]=b,C=Yd();b[8]++;for(const N in k)delete k[N];for(const N in E)delete E[N];for(const N in S)S[N]=[C,C];const T={};for(const N of[...e.keys()]){const I=e.get(N);e.delete(N);const M=u[N];if(M)for(const P of M)P(T,I)}const R=!y||y.revalidate!==!1;for(const N in s){const I=s[N];for(let M=0;M<I.length;M++)I[M](PC,{revalidate:R&&!M})}},g=()=>{if(!to.has(e)&&(to.set(e,[s,Object.create(null),Object.create(null),Object.create(null),l,h,m,p,0]),!gl)){const y=i.initFocus(setTimeout.bind(pn,wS.bind(pn,s,IC))),b=i.initReconnect(setTimeout.bind(pn,wS.bind(pn,s,DC)));c=()=>{y&&y(),b&&b(),to.delete(e)}}};return g(),[e,l,g,c,p]}const n=to.get(e);return[e,n[4],pn,pn,n[7]]},gz=(e,t,n,i,s)=>{const l=n.errorRetryCount,c=s.retryCount,u=~~((Math.random()+.5)*(1<<(c<8?c:8)))*n.errorRetryInterval;!mt(l)&&c>l||setTimeout(i,u,s)},xz=Ux,[Yy,BC,,,yz]=HC(new Map),VC=ro({onLoadingSlow:Ao,onSuccess:Ao,onError:Ao,onErrorRetry:gz,onDiscarded:Ao,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:vS?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:vS?5e3:3e3,compare:xz,isPaused:()=>!1,cache:Yy,mutate:BC,unload:yz,fallback:{}},uz),UC=(e,t)=>{const n=ro(e,t);if(t){const{use:i,fallback:s,cacheData:l}=e,{use:c,fallback:u,cacheData:m}=t;i&&c&&(n.use=i.concat(c)),s&&u&&(n.fallback=ro(s,u)),l&&m&&(n.cacheData=ro(l,m))}return n},Jx=w.createContext({}),bz=e=>{const{value:t}=e,n=w.useContext(Jx),i=zi(t),s=w.useMemo(()=>i?t(n):t,[i,n,t]),l=w.useMemo(()=>i?s:UC(n,s),[i,n,s]),c=s&&s.provider,u=w.useRef(pn);c&&!u.current&&(u.current=HC(c(l.cache||Yy),s));const m=u.current;return m&&(l.cache=m[0],l.mutate=m[1],l.unload=m[4]),wa(()=>{if(m)return m[2]&&m[2](),m[3]},[]),w.createElement(Jx.Provider,ro(e,{value:l}))},vz="$inf$",ZC=Mu&&window.__SWR_DEVTOOLS_USE__,wz=ZC?window.__SWR_DEVTOOLS_USE__:[],Sz=()=>{ZC&&(window.__SWR_DEVTOOLS_REACT__=Th)},kz=e=>zi(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],_s=()=>{const e=w.useContext(Jx);return w.useMemo(()=>ro(VC,e),[e])},Ez=e=>(t,n,i)=>e(t,n&&((...l)=>{const[c]=Gy(t),[,,,u]=to.get(Yy);if(c.startsWith(vz))return n(...l);const m=u[c];return mt(m)?n(...l):(delete u[c],m)}),i),Cz=wz.concat(Ez),Tz=e=>function(...n){const i=_s(),[s,l,c]=kz(n),u=UC(i,c);let m=e;const{use:h}=u,p=(h||[]).concat(Cz);for(let g=p.length;g--;)m=p[g](m);return m(s,l||u.fetcher||null,u)},Rz=(e,t,n)=>{const i=t[e]||(t[e]=[]);return i.push(n),()=>{const s=i.indexOf(n);s>=0&&(i[s]=i[i.length-1],i.pop())}};Sz();const hd=Th.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),Zg={dedupe:!0},SS=(e,t,n)=>{var i;return t?((i=e.get(t))==null?void 0:i.has(n))===!0:!1},qg=(e,t,n)=>{if(!t)return;let i=e.get(t);i||(i=new Set,e.set(t,i)),i.add(n)},jz=({value:e,getCacheData:t,canCommit:n,setCache:i})=>{const s=l=>{n()&&mt(t())&&i(l)};Promise.resolve(e).then(l=>{s({data:l,error:pn})},l=>{s({error:l})})},Kd=Promise.resolve(pn);Kd.status="fulfilled";Kd.value=pn;const Nz=()=>Ao,Oz=(e,t,n)=>{const{cache:i,compare:s,suspense:l,fallbackData:c,revalidateOnMount:u,revalidateIfStale:m,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:g,keepPreviousData:y,strictServerPrefetchWarning:b}=n,[S,k,E,C]=to.get(i),[T,R]=Gy(e),N=w.useRef(!1),I=w.useRef(!1),M=w.useRef(T),P=w.useRef(t),A=w.useRef(n),L=()=>A.current,D=()=>L().isVisible()&&L().isOnline(),[U,q,K,G]=LC(i,T),B=w.useRef({}).current,F=mt(c)?mt(n.fallback)?pn:n.fallback[T]:c,V=n.cacheData,Y=T?V?.[T]:pn,te=T?C[T]:pn,O=mt(te)&&!mt(Y),_=O?Y:te,Z=(le,$)=>{for(const Q in B){const de=Q;if(de==="data"){if(!s(le[de],$[de])&&(!mt(le[de])||!s(Re,$[de])))return!1}else if($[de]!==le[de])return!1}return!0},z=!N.current,J=w.useMemo(()=>{const le=U(),$=G(),Q=Ge=>{const dt=ro(Ge);return delete dt._k,(()=>{if(!T||!t||L().isPaused())return!1;if(z&&!mt(u))return u;const at=mt(F)?dt.data:F;return l&&O&&mt(at)?!1:mt(at)||m})()?{isValidating:!0,isLoading:!0,...dt}:dt},de=Q(le),Oe=le===$?de:Q($);let _e=de;return[()=>{const Ge=Q(U());return Z(Ge,_e)?(_e.data=Ge.data,_e.isLoading=Ge.isLoading,_e.isValidating=Ge.isValidating,_e.error=Ge.error,_e):(_e=Ge,Ge)},()=>Oe]},[i,T]),ne=gu.useSyncExternalStore(w.useCallback(le=>K(T,($,Q)=>{Z(Q,$)||le()}),[i,T]),J[0],J[1]),W=S[T]&&S[T].length>0,fe=ne.data;let ie=mt(fe)?F&&Zx(F)?hd(F):F:fe;const se=ne.error,Se=w.useRef(ie),ye=w.useRef(pn);let xe=ye.current;xe||(xe=new WeakMap,ye.current=xe);const ve=w.useRef(null);let Re=y?mt(fe)?mt(Se.current)?ie:Se.current:fe:ie;const De=T&&mt(ie),Me=w.useRef(null);!gl&&gu.useSyncExternalStore(Nz,()=>(Me.current=!1,Me),()=>(Me.current=!0,Me));const Ne=Me.current;b&&Ne&&!l&&De&&console.warn(`Missing pre-initiated data for serialized key "${T}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const ge=!T||!t||L().isPaused()||W&&!mt(se)?!1:z&&!mt(u)?u:l&&O&&De?!1:l?mt(ie)?!1:m:mt(ie)||m,we=z&&ge,je=mt(ne.isValidating)?we:ne.isValidating,Ve=mt(ne.isLoading)?we:ne.isLoading,Ue=w.useCallback(async le=>{const $=P.current;if(!T||!$||I.current||L().isPaused())return!1;let Q,de,Oe=!0;const _e=le||{},Ge=!E[T]||!_e.dedupe,dt=O&&!SS(xe,V,T)&&!mt(_)&&mt(U().data),rt=()=>bS?!I.current&&T===M.current&&N.current:T===M.current,at={isValidating:!1,isLoading:!1},Nt=()=>{q(at)},Je=()=>{const Fe=E[T];Fe&&Fe[1]===de&&delete E[T]},Pt={isValidating:!0};mt(U().data)&&(Pt.isLoading=!0);try{if(Ge&&(q(Pt),n.loadingTimeout&&mt(U().data)&&setTimeout(()=>{Oe&&rt()&&L().onLoadingSlow(T,n)},n.loadingTimeout),dt&&qg(xe,V,T),E[T]=[dt?_:$(R),Yd()],dt&&C[T]&&delete C[T]),[Q,de]=E[T],Q=await Q,Ge&&setTimeout(Je,n.dedupingInterval),!E[T]||E[T][1]!==de)return Ge&&rt()&&L().onDiscarded(T),!1;at.error=pn;const Fe=k[T];if(!mt(Fe)&&(de<=Fe[0]||de<=Fe[1]||Fe[1]===0))return Nt(),Ge&&rt()&&L().onDiscarded(T),!1;const pt=U().data;at.data=s(pt,Q)?pt:Q,Ge&&rt()&&L().onSuccess(Q,T,n)}catch(Fe){Je();const pt=L(),{shouldRetryOnError:Et}=pt;pt.isPaused()||(at.error=Fe,Ge&&rt()&&(pt.onError(Fe,T,pt),(Et===!0||zi(Et)&&Et(Fe))&&(!L().revalidateOnFocus||!L().revalidateOnReconnect||D())&&pt.onErrorRetry(Fe,T,pt,St=>{const tt=S[T];tt&&tt[0]&&tt[0](yS,St)},{retryCount:(_e.retryCount||0)+1,dedupe:!0})))}return Oe=!1,Nt(),!0},[T,i]),me=w.useCallback((...le)=>FC(i,M.current,...le),[]);if(wa(()=>{const le=ve.current;le&&(ve.current=null,qg(xe,le.cacheData,le.key),mt(U().data)&&q({data:le.data,error:pn,_k:le._k}),C[le.key]&&delete C[le.key])}),wa(()=>{P.current=t,A.current=n,mt(fe)||(Se.current=fe)}),wa(()=>{if(t||!O||mt(_)||SS(xe,V,T)||!mt(U().data))return;qg(xe,V,T);const le=k[T];jz({value:_,getCacheData:()=>U().data,canCommit:()=>!I.current&&T===M.current&&k[T]===le,setCache:$=>q({...$,_k:R})})}),wa(()=>{if(!T)return;const le=Ue.bind(pn,Zg);let $=0;L().revalidateOnFocus&&($=Date.now()+L().focusThrottleInterval);const de=Rz(T,S,(Oe,_e={})=>{if(Oe==IC){const Ge=Date.now();L().revalidateOnFocus&&Ge>$&&D()&&($=Ge+L().focusThrottleInterval,le())}else if(Oe==DC)L().revalidateOnReconnect&&D()&&le();else{if(Oe==_C)return Ue();if(Oe==yS)return Ue(_e);if(Oe==PC&&(Se.current=pn,_e.revalidate))return Ue()}});return I.current=!1,M.current=T,N.current=!0,q({_k:R}),ge&&(E[T]||(mt(ie)||gl?le():dz(le))),()=>{I.current=!0,de()}},[T]),wa(()=>{let le;function $(){const de=zi(h)?h(U().data):h;de&&le!==-1&&(le=setTimeout(Q,de))}function Q(){!U().error&&(p||L().isVisible())&&(g||L().isOnline())?Ue(Zg).then($):$()}return $(),()=>{le&&(clearTimeout(le),le=-1)}},[h,p,g,T]),w.useDebugValue(Re),l){if(!bS&&gl&&De&&mt(_))throw new Error("Fallback data is required when using Suspense in SSR.");De&&(P.current=t,A.current=n,I.current=!1);const le=!mt(_)&&De;let $=pn;if(le&&O)$=_&&Zx(_)?hd(_):_,ie=$,Re=$,gl||(ve.current={data:$,_k:R,key:T,cacheData:V});else{const de=le?me(_):Kd;hd(de)}if(!mt(se)&&De)throw se;const Q=De&&mt($)?Ue(Zg):Kd;!mt(Re)&&De&&(Q.status="fulfilled",Q.value=!0),hd(Q)}return{mutate:me,get data(){return B.data=!0,Re},get error(){return B.error=!0,se},get isValidating(){return B.isValidating=!0,je},get isLoading(){return B.isLoading=!0,Ve}}},Az=Gd.defineProperty(bz,"defaultValue",{value:VC}),nn=Tz(Oz),Mz="data:image/png;base64,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";const qC=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();const zz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Iz=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());const kS=e=>{const t=Iz(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Gg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Dz=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},_z=w.createContext({}),Pz=()=>w.useContext(_z),Lz=w.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...u},m)=>{const{size:h=24,strokeWidth:p=2,absoluteStrokeWidth:g=!1,color:y="currentColor",className:b=""}=Pz()??{},S=i??g?Number(n??p)*24/Number(t??h):n??p;return w.createElement("svg",{ref:m,...Gg,width:t??h??Gg.width,height:t??h??Gg.height,stroke:e??y,strokeWidth:S,className:qC("lucide",b,s),...!l&&!Dz(u)&&{"aria-hidden":"true"},...u},[...c.map(([k,E])=>w.createElement(k,E)),...Array.isArray(l)?l:[l]])});const Be=(e,t)=>{const n=w.forwardRef(({className:i,...s},l)=>w.createElement(Lz,{ref:l,iconNode:t,className:qC(`lucide-${zz(kS(e))}`,`lucide-${e}`,i),...s}));return n.displayName=kS(e),n};const Fz=[["path",{d:"M19 3H5",key:"1236rx"}],["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m6 15 6 6 6-6",key:"h15q88"}]],Hz=Be("arrow-down-from-line",Fz);const Bz=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Vz=Be("arrow-down",Bz);const Uz=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ts=Be("arrow-left",Uz);const Zz=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Rh=Be("arrow-right",Zz);const qz=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],Gz=Be("arrow-up-to-line",qz);const Yz=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],GC=Be("arrow-up",Yz);const Kz=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],Xz=Be("bold",Kz);const Jz=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Wz=Be("bot",Jz);const $z=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],ES=Be("check-check",$z);const Qz=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Li=Be("check",Qz);const eI=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fa=Be("chevron-down",eI);const tI=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_o=Be("chevron-right",tI);const nI=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],YC=Be("chevron-up",nI);const rI=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],iI=Be("chevrons-down",rI);const oI=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],KC=Be("chevrons-up-down",oI);const sI=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],lI=Be("chevrons-up",sI);const aI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Hi=Be("circle-alert",aI);const cI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],XC=Be("circle-check",cI);const uI=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],fI=Be("circle-dashed",uI);const dI=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],As=Be("circle-dot",dI);const hI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],JC=Be("circle-x",hI);const mI=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],pI=Be("code",mI);const gI=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Xd=Be("copy",gI);const xI=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],yI=Be("corner-down-left",xI);const bI=[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]],vI=Be("corner-left-up",bI);const wI=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],xu=Be("download",wI);const SI=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],kI=Be("ellipsis",SI);const EI=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],WC=Be("file-code",EI);const CI=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],yu=Be("file-diff",CI);const TI=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],RI=Be("file-exclamation-point",TI);const jI=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]],NI=Be("file-minus",jI);const OI=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],AI=Be("file-plus",OI);const MI=[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",key:"huwfnr"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 18 3-3-3-3",key:"18f6ys"}]],CS=Be("file-symlink",MI);const zI=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],Ky=Be("folder-git-2",zI);const II=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Jd=Be("folder-open",II);const DI=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],_I=Be("folder-search",DI);const PI=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],Xy=Be("folder-tree",PI);const LI=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]],FI=Be("folder-x",LI);const HI=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],BI=Be("folder",HI);const VI=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],UI=Be("funnel",VI);const ZI=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],Wx=Be("git-branch",ZI);const qI=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Jy=Be("git-commit-horizontal",qI);const GI=[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]],YI=Be("git-compare-arrows",GI);const KI=[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v12",key:"ih889a"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}]],bu=Be("git-pull-request-arrow",KI);const XI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],JI=Be("globe",XI);const WI=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],$C=Be("house",WI);const $I=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],QI=Be("image",$I);const eD=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],tD=Be("italic",eD);const nD=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],rD=Be("keyboard",nD);const iD=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],oD=Be("laptop",iD);const sD=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],lD=Be("link",sD);const aD=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],cD=Be("list-ordered",aD);const uD=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],fD=Be("list-todo",uD);const dD=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],hD=Be("list-tree",dD);const mD=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],pD=Be("list",mD);const gD=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],wi=Be("loader-circle",gD);const xD=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],zu=Be("message-square",xD);const yD=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],bD=Be("monitor",yD);const vD=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],wD=Be("panel-left-open",vD);const SD=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],$x=Be("panel-left-close",SD);const kD=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],TS=Be("panel-left",kD);const ED=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Tl=Be("pencil",ED);const CD=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],QC=Be("plug-zap",CD);const TD=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],jh=Be("plug",TD);const RD=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bi=Be("plus",RD);const jD=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],ND=Be("power",jD);const OD=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],AD=Be("radar",OD);const MD=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],sr=Be("refresh-cw",MD);const zD=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ID=Be("rotate-ccw-clock",zD);const DD=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],_D=Be("rotate-cw",DD);const PD=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Rl=Be("search",PD);const LD=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Iu=Be("server",LD);const FD=[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],eT=Be("square-arrow-out-up-right",FD);const HD=[["path",{d:"m10 9-3 3 3 3",key:"1oro0q"}],["path",{d:"m14 15 3-3-3-3",key:"bz13h7"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]],BD=Be("square-code",HD);const VD=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],UD=Be("strikethrough",VD);const ZD=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],tT=Be("tag",ZD);const qD=[["path",{d:"M17 5H3",key:"1cn7zz"}],["path",{d:"M21 12H8",key:"scolzb"}],["path",{d:"M21 19H8",key:"13qgcb"}],["path",{d:"M3 12v7",key:"1ri8j3"}]],GD=Be("text-quote",qD);const YD=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],vu=Be("trash-2",YD);const KD=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],nT=Be("triangle-alert",KD);const XD=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],rT=Be("unfold-vertical",XD);const JD=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],WD=Be("unplug",JD);const $D=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],QD=Be("user",$D);const e4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Du=Be("x",e4);function Jt(e){return e instanceof Ch||e instanceof Error?e.message:"Something went wrong."}function Wy(e){return e instanceof Ch?e.code:null}function so(e){return Wy(e)==="HOST_OFFLINE"}function t4(e){return e instanceof Ch&&e.fieldErrors?e.fieldErrors:{}}function wl(e,t){return t4(e)[t]?.[0]}const Wd={offlineSince:null,message:null,lastSeenAt:null},wu=new Map,Qx=new Set;function iT(e,t){for(const n of Qx)n(e,t)}function oT(e){return Qx.add(e),()=>{Qx.delete(e)}}function RS(e){const t=wu.get(e)??Wd,n={offlineSince:null,message:null,lastSeenAt:Date.now()};wu.set(e,n),(t.offlineSince!==null||t.lastSeenAt===null)&&iT(e,n)}function n4(e,t){const n=wu.get(e)??Wd,i={offlineSince:n.offlineSince??Date.now(),message:t,lastSeenAt:n.lastSeenAt};wu.set(e,i),(n.offlineSince===null||n.message!==t)&&iT(e,i)}function r4(e){return e===void 0?Wd:wu.get(e)??Wd}const i4=e=>oT(()=>e());if(typeof window.gitwarren>"u")throw new Error("The GitWarren bridge is missing. This usually means the preload script failed to load.");const o4=window.gitwarren,{carrier:s4,shell:ei}=o4;function Ct(e,t,n){const i=s4.request(e,t,n).then(VM);return n===void 0?i:i.then(s=>(RS(n),s),s=>{throw so(s)?n4(n,Jt(s)):RS(n),s})}function jS(e){let t;return()=>t??=e()}const NS=new Map;function $y(e){const t=NS.get(e??"");if(t)return t;const n=l4(e);return NS.set(e??"",n),n}function l4(e){return{capabilities:ei.capabilities,hosts:{list:()=>Ct("hosts.list",void 0),get:t=>Ct("hosts.get",t),add:t=>Ct("hosts.add",t),update:t=>Ct("hosts.update",t),remove:t=>Ct("hosts.remove",t),probe:t=>Ct("hosts.probe",t),install:t=>Ct("hosts.install",t),distros:()=>Ct("hosts.distros",void 0),discover:()=>Ct("hosts.discover",void 0),tailnet:()=>Ct("hosts.tailnet",void 0),setTailnetExposure:t=>Ct("hosts.setTailnetExposure",t)},fs:{list:t=>Ct("fs.list",t,e)},app:{mcp:()=>Ct("app.mcp",void 0,e)},repositories:{list:()=>Ct("repositories.list",void 0,e),get:t=>Ct("repositories.get",t,e),add:t=>Ct("repositories.add",t,e),update:t=>Ct("repositories.update",t,e),remove:t=>Ct("repositories.remove",t,e),refs:t=>Ct("repositories.refs",t,e)},reviews:{list:t=>Ct("reviews.list",t,e),open:t=>Ct("reviews.open",t,e),get:t=>Ct("reviews.get",t,e),create:t=>Ct("reviews.create",t,e),update:t=>Ct("reviews.update",t,e),remove:t=>Ct("reviews.remove",t,e),commits:t=>Ct("reviews.commits",t,e),diff:t=>Ct("reviews.diff",t,e),tree:t=>Ct("reviews.tree",t,e),file:t=>Ct("reviews.file",t,e),image:t=>Ct("reviews.image",t,e),reviewedFiles:t=>Ct("reviews.reviewedFiles",t,e),setFileReviewed:t=>Ct("reviews.setFileReviewed",t,e),openInEditor:t=>ei.openInEditor({...t,...e===void 0?{}:{host:e}})},comments:{list:t=>Ct("comments.list",t,e),createThread:t=>Ct("comments.createThread",t,e),reply:t=>Ct("comments.reply",t,e),update:t=>Ct("comments.update",t,e),remove:t=>Ct("comments.remove",t,e),setResolved:t=>Ct("comments.setResolved",t,e)},attachments:{ingest:t=>Ct("attachments.ingest",t,e),pick:()=>ei.pickAttachment(e),src:t=>ei.attachmentSrc(t,e)},system:{pickDirectory:()=>ei.system.pickDirectory(),revealPath:t=>ei.system.revealPath(t),appInfo:jS(()=>ei.system.appInfo()),editors:jS(()=>ei.system.editors()),getOpenAtLogin:()=>ei.system.getOpenAtLogin(),setOpenAtLogin:t=>ei.system.setOpenAtLogin(t)},navigation:ei.navigation,updates:ei.updates,connection:ei.connection}}const _t=$y();function mi(e,t){return t===void 0?e:`${e}@${t}`}const Vt={hosts:"hosts",distros:"wsl-distros",tailnet:"tailnet",discovered:"discovered-peers",repositories:e=>mi("repositories",e),repository:(e,t)=>mi(`repository:${e}`,t),repositoryRefs:(e,t)=>mi(`repository-refs:${e}`,t),directory:(e,t)=>mi(`directory:${e??""}`,t),reviews:(e,t,n)=>mi(`reviews:${e??"all"}:${t??"any"}`,n),review:(e,t)=>mi(`review:${e}`,t),reviewCommits:(e,t)=>mi(`review-commits:${e}`,t),reviewDiff:(e,t,n)=>mi(`review-diff:${e}:${t}`,n),reviewTree:(e,t,n)=>mi(`review-tree:${e}:${t}`,n),reviewFile:(e,t,n,i)=>mi(`review-file:${e}:${n}:${t}`,i),reviewImage:(e,t,n,i,s)=>mi(`review-image:${e}:${i}:${n}:${t}`,s),appInfo:"app-info",agentMcp:e=>mi("agent-mcp",e),editors:"editors",openAtLogin:"open-at-login"},Ss={reviews:"reviews:",review:"review:",reviewCommits:"review-commits:",reviewDiff:"review-diff:",reviewTree:"review-tree:",reviewFile:"review-file:",reviewImage:"review-image:"},a4=15e3,c4=e=>_t.connection.subscribe(()=>e());function u4(){return w.useSyncExternalStore(c4,()=>_t.connection.connected(),()=>!0)?null:d.jsx(f4,{})}function f4(){const[e,t]=w.useState(!1);return w.useEffect(()=>{const n=window.setTimeout(()=>t(!0),a4);return()=>window.clearTimeout(n)},[]),d.jsxs("div",{role:"status",className:"flex items-start gap-3 rounded-lg border border-warning/40 bg-warning/10 px-4 py-2.5 text-sm",children:[d.jsx(WD,{className:"mt-0.5 size-4 shrink-0 text-warning"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("p",{className:"font-medium",children:"GitWarren is not answering"}),d.jsx("p",{className:"text-muted-foreground",children:"This page lost its connection and is trying to reconnect. What is on screen is what was loaded before, and nothing has been sent."}),e&&d.jsx("p",{className:"mt-1 text-muted-foreground",children:"If GitWarren has been restarted since this page was opened, its link has expired and this page cannot get itself back. Open GitWarren again for a new one."})]})]})}const ey="gitwarren:";function d4(e){try{return window.localStorage.getItem(ey+e)}catch{return null}}function h4(e,t){try{t===null?window.localStorage.removeItem(ey+e):window.localStorage.setItem(ey+e,t)}catch{}}function Qy(e,t){const[n,i]=w.useState(()=>d4(e)??t),s=w.useCallback(l=>{i(l),h4(e,l)},[e]);return[n,s]}function eb(e,t){const[n,i]=Qy(e,t?"on":"off");return[n==="on",w.useCallback(s=>i(s?"on":"off"),[i])]}const m4="https://gitwarren.com";function p4(){const{data:e}=nn(Vt.appInfo,()=>_t.system.appInfo()),[t,n]=eb("desktop-app-hint-dismissed",!1);return t||e?.servedFor!=="agent"?null:d.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-muted/50 px-4 py-2.5 text-sm",children:[d.jsx(bD,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsxs("p",{className:"flex-1 text-muted-foreground",children:["This is GitWarren in a browser tab, started by your agent's plugin. There is also a desktop app, which keeps running between sessions:"," ",d.jsx("a",{href:m4,target:"_blank",rel:"noreferrer",className:"font-medium text-foreground underline underline-offset-2",children:"gitwarren.com"})]}),d.jsx("button",{type:"button",onClick:()=>n(!0),"aria-label":"Dismiss",className:"rounded p-1 text-muted-foreground hover:text-foreground",children:d.jsx(Du,{className:"size-4"})})]})}const OS={};function Jn(e,t){const n=w.useRef(OS);return n.current===OS&&(n.current=e(t)),n}const ty=[];let ny;function g4(){return ny}function x4(e){ty.push(e)}function sT(e){const t=(n,i)=>{const s=Jn(b4).current;let l;try{ny=s;for(const c of ty)c.before(s);l=e(n,i);for(const c of ty)c.after(s);s.didInitialize=!0}finally{ny=void 0}return l};return t.displayName=e.displayName||e.name,t}function y4(e){return w.forwardRef(sT(e))}function b4(){return{didInitialize:!1}}function fn(){}const Pi=Object.freeze([]),wn=Object.freeze({}),v4=()=>{},ze=typeof document<"u"?w.useLayoutEffect:v4;function w4(e,t){return function(i,...s){const l=new URL(e);return l.searchParams.set("code",i.toString()),s.forEach(c=>l.searchParams.append("args[]",c)),`${t} error #${i}; visit ${l} for the full message.`}}const En=w4("https://base-ui.com/production-error","Base UI"),lT=w.createContext(void 0);function Nh(e){const t=w.useContext(lT);if(t===void 0&&!e)throw new Error(En(72));return t}function tb(e){w.useEffect(e,Pi)}const Xc=0;class Vi{static create(){return new Vi}currentId=Xc;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Xc,n()},t)}isStarted(){return this.currentId!==Xc}clear=()=>{this.currentId!==Xc&&(clearTimeout(this.currentId),this.currentId=Xc)};disposeEffect=()=>this.clear}function kr(){const e=Jn(Vi.create).current;return tb(e.disposeEffect),e}function S4(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:k4,platform:E4,maxTouchPoints:C4}=S4(),Oh=k4.toLowerCase(),Su=E4.toLowerCase(),_u=/^i(os$|p)/.test(Su)||Su==="macintel"&&C4>1,AS="android",$d=Su===AS||Oh.includes(AS),aT=!_u&&Su.startsWith("mac");Su.startsWith("win");const T4=aT||_u,Po=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),MS=!Po&&Oh.includes("firefox");!Po&&Oh.includes("chrom");const R4=T4,nb=/jsdom|happydom/.test(Oh);function or(e){e.preventDefault(),e.stopPropagation()}function j4(e){return"nativeEvent"in e}function rb(e){return e.pointerType===""&&e.isTrusted?!0:$d&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ib(e){return nb?!1:!$d&&e.width===0&&e.height===0||$d&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Rs(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function N4(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Ah(){return typeof window<"u"}function mr(e){return ob(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lo(e){var t;return(t=(ob(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ob(e){return Ah()?e instanceof Node||e instanceof gn(e).Node:!1}function Rt(e){return Ah()?e instanceof Element||e instanceof gn(e).Element:!1}function en(e){return Ah()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function Na(e){return!Ah()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}function Pu(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=Fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&s!=="inline"&&s!=="contents"}function O4(e){return/^(table|td|th)$/.test(mr(e))}function Mh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const A4=/transform|translate|scale|rotate|perspective|filter/,M4=/paint|layout|strict|content/,dl=e=>!!e&&e!=="none";let Yg;function sb(e){const t=Rt(e)?Fr(e):e;return dl(t.transform)||dl(t.translate)||dl(t.scale)||dl(t.rotate)||dl(t.perspective)||!lb()&&(dl(t.backdropFilter)||dl(t.filter))||A4.test(t.willChange||"")||M4.test(t.contain||"")}function z4(e){let t=Ms(e);for(;en(t)&&!js(t);){if(sb(t))return t;if(Mh(t))return null;t=Ms(t)}return null}function lb(){return Yg==null&&(Yg=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Yg}function js(e){return/^(html|body|#document)$/.test(mr(e))}function Fr(e){return gn(e).getComputedStyle(e)}function zh(e){return Rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ms(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Na(e)&&e.host||Lo(e);return Na(t)?t.host:t}function cT(e){const t=Ms(e);return js(t)?(e.ownerDocument||e).body:en(t)&&Pu(t)?t:cT(t)}function Oa(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=cT(e),l=s===((i=e.ownerDocument)==null?void 0:i.body),c=gn(s);if(l){const u=ry(c);return t.concat(c,c.visualViewport||[],Pu(s)?s:[],u&&n?Oa(u):[])}else return t.concat(s,Oa(s,[],n))}function ry(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const iy="data-base-ui-focusable",uT="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Sl="ArrowLeft",kl="ArrowRight",ab="ArrowUp",Ih="ArrowDown";function wr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function $e(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Na(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Mn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Qd(e,t){if(!Rt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,i]of t.entries())if($e(i,n))return!i.hasAttribute("data-trigger-disabled");return!1}function Kg(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function I4(e){return e.matches("html,body")}function Dh(e){return en(e)&&e.matches(uT)}function D4(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${uT}`)!=null}function oy(e){return e?e.getAttribute("role")==="combobox"&&Dh(e):!1}function _4(e){if(!e||nb)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function eh(e){return e?e.hasAttribute(iy)?e:e.querySelector(`[${iy}]`)||e:null}function P4(e,t){return t!=null&&!Rs(t)?0:typeof e=="function"?e():e}function zs(e,t,n){const i=P4(e,n);return typeof i=="number"?i:i?.[t]}function zS(e){return typeof e=="function"?e():e}function fT(e,t){return t||e==="click"||e==="mousedown"}function L4(e){return e?.includes("mouse")&&e!=="mousedown"}const On="none",Lu="trigger-press",Lr="trigger-hover",Fd="trigger-focus",_h="outside-press",Hd="item-press",dT="close-press",au="input-change",Qi="input-clear",F4="input-press",Fu="focus-out",Hu="escape-key",sy="list-navigation",hT="keyboard",mT="pointer",pT="cancel-open",gT="disabled",IS="missing",DS="initial",xT="imperative-action",H4="window-resize";function Xe(e,t,n,i){let s=!1,l=!1;const c=i??wn;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){l=!0},get isCanceled(){return s},get isPropagationAllowed(){return l},trigger:n,...c}}function B4(e,t,n){const i=n??wn;return{reason:e,event:t??new Event("base-ui"),...i}}const yT=w.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Vi,currentIdRef:{current:null},currentContextRef:{current:null}});function V4(e,t){e.current=t.current}function U4(e){const{children:t,delay:n,timeoutMs:i=0}=e,s=w.useRef(n),l=w.useRef(n),c=w.useRef(null),u=w.useRef(null),m=kr();return ze(()=>{if(l.current=n,!c.current){s.current=n;return}s.current={open:zs(s.current,"open"),close:zs(n,"close")}},[n,c,s,l]),d.jsx(yT.Provider,{value:w.useMemo(()=>({hasProvider:!0,delayRef:s,initialDelayRef:l,currentIdRef:c,timeoutMs:i,currentContextRef:u,timeout:m}),[i,m]),children:t})}function Z4(e,t={open:!1}){const{open:n}=t,i="rootStore"in e?e.rootStore:e,s=i.useState("floatingId"),l=w.useContext(yT),{currentIdRef:c,delayRef:u,timeoutMs:m,initialDelayRef:h,currentContextRef:p,hasProvider:g,timeout:y}=l,[b,S]=w.useState(!1),k=w.useRef(n);return ze(()=>{k.current=n},[n]),ze(()=>{function E(){p.current?.setIsInstantPhase(!1),c.current=null,p.current=null,u.current=h.current,y.clear()}if(c.current&&!n&&c.current===s){if(S(!1),m){const C=s;return y.start(m,()=>{i.select("open")||c.current&&c.current!==C||E()}),()=>{(k.current||c.current!==C)&&y.clear()}}E()}},[n,s,c,u,m,h,p,y,i]),ze(()=>{if(!n)return;const E=p.current,C=c.current;y.clear(),p.current={onOpenChange:i.setOpen,setIsInstantPhase:S},c.current=s,u.current={open:0,close:zs(h.current,"close")},C!==null&&C!==s?(S(!0),E?.setIsInstantPhase(!0),E?.onOpenChange(!1,Xe(On))):(S(!1),E?.setIsInstantPhase(!1))},[n,s,i,c,u,h,p,y]),ze(()=>()=>{if(c.current===s){if(p.current=null,!k.current)return;c.current=null,V4(u,h),y.clear()}},[p,c,u,s,h,y]),w.useMemo(()=>({hasProvider:g,delayRef:u,isInstantPhase:b}),[g,u,b])}function kt(e,t,n,i){return e.addEventListener(t,n,i),()=>{e.removeEventListener(t,n,i)}}function io(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function Ui(e,t,n,i){const s=Jn(bT).current;return G4(s,e,t,n,i)&&vT(s,[e,t,n,i]),s.callback}function q4(e){const t=Jn(bT).current;return Y4(t,e)&&vT(t,e),t.callback}function bT(){return{callback:null,cleanup:null,refs:[]}}function G4(e,t,n,i,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==i||e.refs[3]!==s}function Y4(e,t){return e.refs.length!==t.length||e.refs.some((n,i)=>n!==t[i])}function vT(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const i=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const c=l(n);typeof c=="function"&&(i[s]=c);break}case"object":{l.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const c=i[s];typeof c=="function"?c():l(null);break}case"object":{l.current=null;break}}}}}}}function Tn(e){const t=Jn(K4,e).current;return t.next=e,ze(t.effect),t}function K4(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const cb={...JM},Xg=cb.useInsertionEffect,X4=Xg&&Xg!==cb.useLayoutEffect?Xg:e=>e();function Ae(e){const t=Jn(J4).current;return t.next=e,X4(t.effect),t.trampoline}function J4(){const e={next:void 0,callback:W4,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function W4(){}const md=null;class $4{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let s=0;s<n.length;s+=1)n[s]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}let pd=new $4;class no{static create(){return new no}static request(t){return pd.request(t)}static cancel(t){return pd.cancel(t)}currentId=md;request(t){this.cancel(),this.currentId=pd.request(()=>{this.currentId=md,t()})}cancel=()=>{this.currentId!==md&&(pd.cancel(this.currentId),this.currentId=md)};disposeEffect=()=>this.cancel}function Aa(){const e=Jn(no.create).current;return tb(e.disposeEffect),e}function Dt(e){return e?.ownerDocument||document}const wT={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Bu={...wT,position:"fixed",top:0,left:0},Vu={...wT,position:"absolute"},th=w.forwardRef(function(t,n){const[i,s]=w.useState();ze(()=>{R4&&Po&&s("button")},[]);const l={tabIndex:0,role:i};return d.jsx("span",{...t,ref:n,style:Bu,"aria-hidden":i?void 0:!0,...l,"data-base-ui-focus-guard":""})}),Ma=Math.min,zo=Math.max,nh=Math.round,xl=Math.floor,Io=e=>({x:e,y:e}),Q4={left:"right",right:"left",bottom:"top",top:"bottom"};function ST(e,t,n){return zo(e,Ma(t,n))}function Is(e,t){return typeof e=="function"?e(t):e}function yi(e){return e.split("-")[0]}function Ps(e){return e.split("-")[1]}function ub(e){return e==="x"?"y":"x"}function fb(e){return e==="y"?"height":"width"}function xi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function db(e){return ub(xi(e))}function e3(e,t,n){n===void 0&&(n=!1);const i=Ps(e),s=db(e),l=fb(s);let c=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=rh(c)),[c,rh(c)]}function t3(e){const t=rh(e);return[ly(e),t,ly(t)]}function ly(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const _S=["left","right"],PS=["right","left"],n3=["top","bottom"],r3=["bottom","top"];function i3(e,t,n){switch(e){case"top":case"bottom":return n?t?PS:_S:t?_S:PS;case"left":case"right":return t?n3:r3;default:return[]}}function o3(e,t,n,i){const s=Ps(e);let l=i3(yi(e),n==="start",i);return s&&(l=l.map(c=>c+"-"+s),t&&(l=l.concat(l.map(ly)))),l}function rh(e){const t=yi(e);return Q4[t]+e.slice(t.length)}function s3(e){var t,n,i,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(i=e.bottom)!=null?i:0,left:(s=e.left)!=null?s:0}}function kT(e){return typeof e!="number"?s3(e):{top:e,right:e,bottom:e,left:e}}function ku(e){const{x:t,y:n,width:i,height:s}=e;return{width:i,height:s,top:n,left:t,right:t+i,bottom:n+s,x:t,y:n}}function gd(e,t,n){return Math.floor(e/t)!==n}function Ns(e,t){return t<0||t>=e.length}function Bd(e,t){return ir(e.current,{disabledIndices:t})}function ay(e,t){return ir(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ir(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:i,amount:s=1}={}){let l=t;do l+=n?-s:s;while(l>=0&&l<=e.length-1&&za(e,l,i));return l}function l3(e,{event:t,orientation:n,loopFocus:i,onLoop:s,rtl:l,cols:c,disabledIndices:u,minIndex:m,maxIndex:h,prevIndex:p,stopEvent:g=!1}){let y=p,b;if(t.key===ab?b="up":t.key===Ih&&(b="down"),b){const S=[],k=[];let E=!1,C=0;{let L=null,D=-1;e.forEach((U,q)=>{if(U==null)return;C+=1;const K=U.closest('[role="row"]');K&&(E=!0),(K!==L||D===-1)&&(L=K,D+=1,S[D]=[]),S[D].push(q),k[q]=D})}let T=!1,R=0;if(E)for(const L of S){const D=L.length;D>R&&(R=D),D!==c&&(T=!0)}const N=T&&C<e.length,I=R||c,M=L=>{if(!T||p===-1)return;const D=k[p];if(D==null)return;const U=S[D].indexOf(p),q=L==="up"?-1:1;for(let K=D+q,G=0;G<S.length;G+=1,K+=q){if(K<0||K>=S.length){if(!i||N)return;if(K=K<0?S.length-1:0,s){const F=Math.min(U,S[K].length-1),V=S[K][F]??S[K][0],Y=s(t,p,V);K=k[Y]??K}}const B=S[K];for(let F=Math.min(U,B.length-1);F>=0;F-=1){const V=B[F];if(!za(e,V,u))return V}}},P=L=>{if(!N||p===-1)return;const D=p%I,U=L==="up"?-I:I,q=h-h%I,K=xl(h/I)+1;for(let G=p-D+U,B=0;B<K;B+=1,G+=U){if(G<0||G>h){if(!i)return;G=G<0?q:0}const F=Math.min(G+I-1,h);for(let V=Math.min(G+D,F);V>=G;V-=1)if(!za(e,V,u))return V}};g&&or(t);const A=M(b)??P(b);if(A!==void 0)y=A;else if(p===-1)y=b==="up"?h:m;else if(y=ir(e,{startingIndex:p,amount:I,decrement:b==="up",disabledIndices:u}),i){if(b==="up"&&(p-I<m||y<0)){const L=p%I,D=h%I,U=h-(D-L);D===L?y=h:y=D>L?U:U-I,s&&(y=s(t,p,y))}b==="down"&&p+I>h&&(y=ir(e,{startingIndex:p%I-I,amount:I,disabledIndices:u}),s&&(y=s(t,p,y)))}Ns(e,y)&&(y=p)}if(n==="both"){const S=xl(p/c);t.key===(l?Sl:kl)&&(g&&or(t),p%c!==c-1?(y=ir(e,{startingIndex:p,disabledIndices:u}),i&&gd(y,c,S)&&(y=ir(e,{startingIndex:p-p%c-1,disabledIndices:u}),s&&(y=s(t,p,y)))):i&&(y=ir(e,{startingIndex:p-p%c-1,disabledIndices:u}),s&&(y=s(t,p,y))),gd(y,c,S)&&(y=p)),t.key===(l?kl:Sl)&&(g&&or(t),p%c!==0?(y=ir(e,{startingIndex:p,decrement:!0,disabledIndices:u}),i&&gd(y,c,S)&&(y=ir(e,{startingIndex:p+(c-p%c),decrement:!0,disabledIndices:u}),s&&(y=s(t,p,y)))):i&&(y=ir(e,{startingIndex:p+(c-p%c),decrement:!0,disabledIndices:u}),s&&(y=s(t,p,y))),gd(y,c,S)&&(y=p));const k=xl(h/c)===S;Ns(e,y)&&(i&&k?(y=t.key===(l?kl:Sl)?h:ir(e,{startingIndex:p-p%c-1,disabledIndices:u}),s&&(y=s(t,p,y))):y=p)}return y}function za(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?!Ph(s)||s.matches(":disabled")?!0:!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!1}function a3(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Ph(e,t=e?Fr(e):null){return!e||!e.isConnected||!t||a3(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const c3='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function u3(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return Na(n)?n.host:null}function cy(e){for(const t of Array.from(e.children))if(mr(t)==="summary")return t;return null}function f3(e,t){const n=cy(t);return!!n&&(e===n||$e(n,e))}function ET(e){const t=e?mr(e):"";return e!=null&&e.matches(c3)&&(t!=="summary"||e.parentElement!=null&&mr(e.parentElement)==="details"&&cy(e.parentElement)===e)&&(t!=="details"||cy(e)==null)&&(t!=="input"||e.type!=="hidden")}function CT(e){if(!ET(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=u3(t)){const n=t!==e,i=mr(t)==="slot";if(t.hasAttribute("inert")||n&&mr(t)==="details"&&!t.open&&!f3(e,t)||t.hasAttribute("hidden")||!i&&!d3(t,n))return!1}return!0}function d3(e,t){const n=Fr(e);return t?n.display!=="none":Ph(e,n)}function TT(e){const t=e.tabIndex;if(t<0){const n=mr(e);if(n==="details"||n==="audio"||n==="video"||en(e)&&e.isContentEditable)return 0}return t}function Jg(e){if(mr(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function h3(e,t){const n=Jg(e);if(!n)return!0;const i=t.find(s=>{const l=Jg(s);return l?.name===n.name&&l.form===n.form&&l.checked});return i?i===n:t.find(s=>{const l=Jg(s);return l?.name===n.name&&l.form===n.form})===n}function RT(e){if(en(e)&&mr(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return en(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function jT(e,t){RT(e).forEach(n=>{ET(n)&&t.push(n),jT(n,t)})}function NT(e,t,n){RT(e).forEach(i=>{en(i)&&i.matches(t)&&n.push(i),NT(i,t,n)})}function hb(e){return CT(e)&&TT(e)>=0}function OT(e){const t=[];return jT(e,t),t.filter(CT)}function Lh(e){const t=OT(e);return t.filter(n=>TT(n)>=0&&h3(n,t))}function AT(e,t){const n=Lh(e),i=n.length;if(i===0)return;const s=wr(Dt(e)),l=n.indexOf(s),c=l===-1?t===1?0:i-1:l+t;return n[c]}function MT(e){return AT(Dt(e).body,1)||e}function zT(e){return AT(Dt(e).body,-1)||e}function cu(e,t){const n=t||e.currentTarget,i=e.relatedTarget;return!i||!$e(n,i)}function m3(e){Lh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function LS(e){const t=[];NT(e,"[data-tabindex]",t),t.forEach(n=>{const i=n.dataset.tabindex;delete n.dataset.tabindex,i?n.setAttribute("tabindex",i):n.removeAttribute("tabindex")})}function Ds(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...Ds(e,s.id,n)])}function FS(e,t){let n=[],i=e.find(s=>s.id===t)?.parentId;for(;i;){const s=e.find(l=>l.id===i);i=s?.parentId,s&&(n=n.concat(s))}return n}function Eu(e){return`data-base-ui-${e}`}let xd=0;function Vd(e,t={}){const{preventScroll:n=!1,sync:i=!1,shouldFocus:s}=t;cancelAnimationFrame(xd);function l(){s&&!s()||e?.focus({preventScroll:n})}if(i)return l(),fn;const c=requestAnimationFrame(l);return xd=c,()=>{xd===c&&(cancelAnimationFrame(c),xd=0)}}const Wg={inert:new WeakMap,"aria-hidden":new WeakMap},HS="data-base-ui-inert",uy={inert:new WeakSet,"aria-hidden":new WeakSet};let Jc=new WeakMap,$g=0;function p3(e){return uy[e]}function IT(e){return e?Na(e)?e.host:IT(e.parentNode):null}const BS=(e,t)=>t.map(n=>{if(e.contains(n))return n;const i=IT(n);return e.contains(i)?i:null}).filter(n=>n!=null),VS=e=>{const t=new Set;return e.forEach(n=>{let i=n;for(;i&&!t.has(i);)t.add(i),i=i.parentNode}),t},US=(e,t,n)=>{const i=[],s=l=>{!l||n.has(l)||Array.from(l.children).forEach(c=>{mr(c)!=="script"&&(t.has(c)?s(c):i.push(c))})};return s(e),i};function g3(e,t,n,i,{mark:s=!0}){let l=null;i?l="inert":n&&(l="aria-hidden");let c=null,u=null;const m=BS(t,e),h=s?US(t,VS(m),new Set(m)):[],p=[],g=[];if(l){const y=Wg[l],b=p3(l);u=b,c=y;const S=BS(t,Array.from(t.querySelectorAll("[aria-live]"))),k=m.concat(S);US(t,VS(k),new Set(k)).forEach(C=>{const T=C.getAttribute(l),R=T!==null&&T!=="false",N=(y.get(C)||0)+1;y.set(C,N),p.push(C),N===1&&R&&b.add(C),R||C.setAttribute(l,l==="inert"?"":"true")})}return s&&h.forEach(y=>{const b=(Jc.get(y)||0)+1;Jc.set(y,b),g.push(y),b===1&&y.setAttribute(HS,"")}),$g+=1,()=>{c&&p.forEach(y=>{const S=(c.get(y)||0)-1;c.set(y,S),S||(!u?.has(y)&&l&&y.removeAttribute(l),u?.delete(y))}),s&&g.forEach(y=>{const b=(Jc.get(y)||0)-1;Jc.set(y,b),b||y.removeAttribute(HS)}),$g-=1,$g||(Wg.inert=new WeakMap,Wg["aria-hidden"]=new WeakMap,uy.inert=new WeakSet,uy["aria-hidden"]=new WeakSet,Jc=new WeakMap)}}function ZS(e,t={}){const{ariaHidden:n=!1,inert:i=!1,mark:s=!0}=t,l=Dt(e[0]).body;return g3(e,l,n,i,{mark:s})}var Ls=MC();let qS=0;function x3(e,t="mui"){const[n,i]=w.useState(e),s=e||n;return w.useEffect(()=>{n==null&&(qS+=1,i(`${t}-${qS}`))},[n,t]),s}const GS=cb.useId;function Fh(e,t){if(GS!==void 0){const n=GS();return e??(t?`${t}-${n}`:n)}return x3(e,t)}const y3=parseInt(w.version,10);function mb(e){return y3>=e}function YS(e){if(!w.isValidElement(e))return null;const t=e,n=t.props;return(mb(19)?n?.ref:t.ref)??null}function fy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function b3(e,t){const n={};for(const i in e){const s=e[i];if(t?.hasOwnProperty(i)){const l=t[i](s);l!=null&&Object.assign(n,l);continue}s===!0?n[`data-${i.toLowerCase()}`]="":s&&(n[`data-${i.toLowerCase()}`]=s.toString())}return n}function v3(e,t){return typeof e=="function"?e(t):e}function w3(e,t){return typeof e=="function"?e(t):e}const pb={};function bi(e,t,n,i,s){if(!n&&!i&&!s&&!e)return ih(t);let l=ih(e);return t&&(l=iu(l,t)),n&&(l=iu(l,n)),i&&(l=iu(l,i)),s&&(l=iu(l,s)),l}function S3(e){if(e.length===0)return pb;if(e.length===1)return ih(e[0]);let t=ih(e[0]);for(let n=1;n<e.length;n+=1)t=iu(t,e[n]);return t}function ih(e){return gb(e)?{..._T(e,pb)}:k3(e)}function iu(e,t){return gb(t)?_T(t,e):E3(e,t)}function k3(e){const t={...e};for(const n in t){const i=t[n];DT(n,i)&&(t[n]=PT(i))}return t}function E3(e,t){if(!t)return e;for(const n in t){const i=t[n];switch(n){case"style":{e[n]=fy(e.style,i);break}case"className":{e[n]=LT(e.className,i);break}default:DT(n,i)?e[n]=C3(e[n],i):e[n]=i}}return e}function DT(e,t){const n=e.charCodeAt(0),i=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&i===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function gb(e){return typeof e=="function"}function _T(e,t){return gb(e)?e(t):e??pb}function C3(e,t){return t?e?(...n)=>{const i=n[0];if(FT(i)){const l=i;oh(l);const c=t(...n);return l.baseUIHandlerPrevented||e?.(...n),c}const s=t(...n);return e?.(...n),s}:PT(t):e}function PT(e){return e&&((...t)=>{const n=t[0];return FT(n)&&oh(n),e(...t)})}function oh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function LT(e,t){return t?e?t+" "+e:t:e}function FT(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function jt(e,t,n={}){const i=t.render,s=T3(t,n);if(n.enabled===!1)return null;const l=n.state??wn;return N3(e,i,s,l)}function T3(e,t={}){const{className:n,style:i,render:s}=e,{state:l=wn,ref:c,props:u,stateAttributesMapping:m,enabled:h=!0}=t,p=h?v3(n,l):void 0,g=h?w3(i,l):void 0,y=h?b3(l,m):wn,b=h&&u?R3(u):void 0,S=h?fy(y,b)??{}:wn;return typeof document<"u"&&(h?Array.isArray(c)?S.ref=q4([S.ref,YS(s),...c]):S.ref=Ui(S.ref,YS(s),c):Ui(null,null)),h?(p!==void 0&&(S.className=LT(S.className,p)),g!==void 0&&(S.style=fy(S.style,g)),S):wn}function R3(e){return Array.isArray(e)?S3(e):bi(void 0,e)}const j3=Symbol.for("react.lazy");function N3(e,t,n,i){if(t){if(typeof t=="function")return t(n,i);const s=bi(n,t.props);s.ref=n.ref;let l=t;return l?.$$typeof===j3&&(l=w.Children.toArray(t)[0]),w.cloneElement(l,s)}if(e&&typeof e=="string")return O3(e,n);throw new Error(En(8))}function O3(e,t){return e==="button"?w.createElement("button",{type:"button",...t,key:t.key}):e==="img"?w.createElement("img",{alt:"",...t,key:t.key}):w.createElement(e,t)}const A3={style:{transition:"none"}},M3="data-base-ui-click-trigger",HT={fallbackAxisSide:"none"},z3={fallbackAxisSide:"end"},I3={clipPath:"inset(50%)",position:"fixed",top:0,left:0},BT=w.createContext(null),VT=()=>w.useContext(BT),D3=Eu("portal");function UT(e={}){const{ref:t,container:n,componentProps:i=wn,elementProps:s}=e,l=Fh(),u=VT()?.portalNode,[m,h]=w.useState(null),[p,g]=w.useState(null),y=Ae(E=>{E!==null&&g(E)}),b=w.useRef(null);ze(()=>{if(n===null){b.current&&(b.current=null,g(null),h(null));return}const E=(n&&(ob(n)?n:n.current))??u??document.body;if(E==null){b.current&&(b.current=null,g(null),h(null));return}b.current!==E&&(b.current=E,g(null),h(E))},[n,u]);const S=jt("div",i,{ref:[t,y],props:[{id:l,[D3]:""},s]}),k=m&&S?Ls.createPortal(S,m):null;return{node:p,nodeId:w.isValidElement(S)?S.props.id:void 0,subtree:k}}const xb=w.forwardRef(function(t,n){const{render:i,className:s,style:l,children:c,container:u,...m}=t,{node:h,nodeId:p,subtree:g}=UT({container:u,ref:n,componentProps:t,elementProps:m}),y=w.useRef(null),b=w.useRef(null),S=w.useRef(null),k=w.useRef(null),[E,C]=w.useState(null),T=w.useRef(!1),R=E?.modal,N=E?.open,I=!!E&&!E.modal&&E.open&&!!h;w.useEffect(()=>{if(!h||R)return;function P(A){h&&A.relatedTarget&&cu(A)&&(A.type==="focusin"?T.current&&(LS(h),T.current=!1):(m3(h),T.current=!0))}return io(kt(h,"focusin",P,!0),kt(h,"focusout",P,!0))},[h,R]),ze(()=>{!h||N!==!0||!T.current||(LS(h),T.current=!1)},[N,h]);const M=w.useMemo(()=>({beforeOutsideRef:y,afterOutsideRef:b,beforeInsideRef:S,afterInsideRef:k,portalNode:h,setFocusManagerState:C}),[h]);return d.jsxs(w.Fragment,{children:[g,d.jsxs(BT.Provider,{value:M,children:[I&&h&&d.jsx(th,{"data-type":"outside",ref:y,onFocus:P=>{if(cu(P,h))S.current?.focus();else{const A=E?E.domReference:null;zT(A)?.focus()}}}),I&&h&&d.jsx("span",{"aria-owns":p,style:I3}),h&&Ls.createPortal(c,h),I&&h&&d.jsx(th,{"data-type":"outside",ref:b,onFocus:P=>{if(cu(P,h))k.current?.focus();else{const A=E?E.domReference:null;MT(A)?.focus(),E?.closeOnFocusOut&&E?.onOpenChange(!1,Xe(Fu,P.nativeEvent))}}})]})]})});function _3(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const P3=w.createContext(null),L3=w.createContext(null),Hh=()=>w.useContext(P3)?.id||null,Ha=e=>{const t=w.useContext(L3);return e??t};function No(e){return e==null?e:"current"in e?e.current:e}function F3(e,t){const n=gn(Mn(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const KS=20;let ks=[];function yb(){ks=ks.filter(e=>e.deref()?.isConnected)}function XS(e){yb(),e&&mr(e)!=="body"&&(ks.push(new WeakRef(e)),ks.length>KS&&(ks=ks.slice(-KS)))}function JS(){return yb(),ks[ks.length-1]?.deref()}function H3(e){return e?hb(e)?e:Lh(e)[0]||e:null}function WS(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=OT(e).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return hb(s)||s.hasAttribute("data-tabindex")&&!l.startsWith("-")}),i=e.getAttribute("tabindex");n.length===0?i!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function bb(e){const{context:t,children:n,disabled:i=!1,initialFocus:s=!0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,closeOnFocusOut:m=!0,openInteractionType:h="",nextFocusableElement:p,previousFocusableElement:g,beforeContentFocusGuardRef:y,externalTree:b,getInsideElements:S}=e,k="rootStore"in t?t.rootStore:t,E=k.useState("open"),C=k.useState("domReferenceElement"),T=k.useState("floatingElement"),{events:R,dataRef:N}=k.context,I=Ae(()=>N.current.floatingContext?.nodeId),M=s===!1,P=oy(C)&&M,A=Tn(s),L=Tn(l),D=Tn(h),U=Tn(E),q=Ha(b),K=VT(),G=w.useRef(!1),B=w.useRef(!1),F=w.useRef(!1),V=w.useRef(null),Y=w.useRef(""),te=w.useRef(""),O=w.useRef(null),_=w.useRef(null),Z=Ui(O,y,K?.beforeInsideRef),z=Ui(_,K?.afterInsideRef),J=kr(),ne=kr(),W=Aa(),fe=K!=null,ie=eh(T),se=Ae((xe=ie)=>xe?Lh(xe):[]),Se=Ae(()=>S?.().filter(xe=>xe!=null)??[]);w.useEffect(()=>{if(i||!u)return;function xe(Re){Re.key==="Tab"&&$e(ie,wr(Dt(ie)))&&se().length===0&&!P&&or(Re)}const ve=Dt(ie);return kt(ve,"keydown",xe)},[i,ie,u,P,se]),w.useEffect(()=>{if(i||!E)return;const xe=Dt(ie);function ve(){F.current=!1}function Re(Me){const Ne=Mn(Me),ge=Se(),we=$e(T,Ne)||$e(C,Ne)||$e(K?.portalNode,Ne)||ge.some(je=>je===Ne||$e(je,Ne));F.current=!we,te.current=Me.pointerType||"keyboard",Ne?.closest(`[${M3}]`)&&(B.current=!0,ne.start(0,()=>{B.current=!1}))}function De(){te.current="keyboard"}return io(kt(xe,"pointerdown",Re,!0),kt(xe,"pointerup",ve,!0),kt(xe,"pointercancel",ve,!0),kt(xe,"keydown",De,!0),ve)},[i,T,C,ie,E,K,ne,Se]),w.useEffect(()=>{if(i||!m)return;const xe=Dt(ie);function ve(){B.current=!0,ne.start(0,()=>{B.current=!1})}function Re(ge){const we=Mn(ge);hb(we)&&(V.current=we)}function De(ge){const we=ge.relatedTarget,je=ge.currentTarget,Ve=Mn(ge);u&&we==null&&Ve!=null&&$e(T,Ve)&&XS(Ve),queueMicrotask(()=>{const Ue=I(),me=k.context.triggerElements,re=Se(),le=we?.hasAttribute(Eu("focus-guard"))&&[O.current,_.current,K?.beforeInsideRef.current,K?.afterInsideRef.current,K?.beforeOutsideRef.current,K?.afterOutsideRef.current,No(g),No(p)].includes(we),$=!($e(C,we)||$e(T,we)||$e(we,T)||$e(K?.portalNode,we)||re.some(Q=>Q===we||$e(Q,we))||me.hasMatchingElement(Q=>$e(Q,we))||le||q&&(Ds(q.nodesRef.current,Ue).find(Q=>$e(Q.context?.elements.floating,we)||$e(Q.context?.elements.domReference,we))||FS(q.nodesRef.current,Ue).find(Q=>[Q.context?.elements.floating,eh(Q.context?.elements.floating)].includes(we)||Q.context?.elements.domReference===we)));if(je===C&&ie&&WS(ie),c&&je!==C&&!Ph(Ve)&&wr(xe)===xe.body){if(en(ie)&&(ie.focus(),c==="popup")){W.request(()=>{ie.focus()});return}const Q=se(),de=V.current,Oe=(de&&Q.includes(de)?de:null)||Q[Q.length-1]||ie;en(Oe)&&Oe.focus()}if(N.current.insideReactTree){N.current.insideReactTree=!1;return}(P||!u)&&we&&$&&!B.current&&(P||we!==JS())&&(G.current=!0,k.setOpen(!1,Xe(Fu,ge)))})}function Me(){F.current||(N.current.insideReactTree=!0,J.start(0,()=>{N.current.insideReactTree=!1}))}const Ne=en(C)?C:null;if(!(!T&&!Ne))return io(Ne&&kt(Ne,"focusout",De),Ne&&kt(Ne,"pointerdown",ve),T&&kt(T,"focusin",Re),T&&kt(T,"focusout",De),T&&K&&kt(T,"focusout",Me,!0))},[i,C,T,ie,u,q,K,k,m,c,se,P,I,N,J,ne,W,p,g,Se]),w.useEffect(()=>{if(i||!T||!E)return;const xe=Array.from(K?.portalNode?.querySelectorAll(`[${Eu("portal")}]`)||[]),Re=(q?FS(q.nodesRef.current,I()):[]).find(je=>oy(je.context?.elements.domReference||null))?.context?.elements.domReference,Me=[...[T,...xe,O.current,_.current,K?.beforeOutsideRef.current,K?.afterOutsideRef.current,...Se()],Re,No(g),No(p),P?C:null].filter(je=>je!=null),Ne=ZS(Me,{ariaHidden:u||P,mark:!1}),ge=[T,...xe].filter(je=>je!=null),we=ZS(ge);return()=>{we(),Ne()}},[E,i,C,T,u,K,P,q,I,p,g,Se]),ze(()=>{if(!E||i||!en(ie))return;Y.current="",te.current="";const xe=Dt(ie),ve=wr(xe);queueMicrotask(()=>{const Re=A.current,De=typeof Re=="function"?Re(D.current||""):Re;if(De===void 0||De===!1||$e(ie,ve))return;let Ne=null;const ge=()=>(Ne==null&&(Ne=se(ie)),Ne[0]||ie);let we;De===!0||De===null?we=ge():we=No(De),we=we||ge();const je=$e(ie,wr(xe));Vd(we,{preventScroll:we===ie,shouldFocus(){if(!U.current)return!1;if(je)return!0;const Ve=wr(xe);return!(Ve!==we&&$e(ie,Ve))}})})},[i,E,ie,se,A,D,U]),ze(()=>{if(i||!ie)return;const xe=Dt(ie),ve=wr(xe),Re=D.current==null;XS(ve);function De(Ne){if(Ne.open||(Y.current=F3(Ne.nativeEvent,te.current)),Ne.reason===Lr&&Ne.nativeEvent.type==="mouseleave"&&(G.current=!0),Ne.reason===_h)if(Ne.nested)G.current=!1;else if(rb(Ne.nativeEvent)||ib(Ne.nativeEvent))G.current=!1;else{let ge=!1;Dt(ie).createElement("div").focus({get preventScroll(){return ge=!0,!1}}),ge?G.current=!1:G.current=!0}}R.on("openchange",De);function Me(Ne){const ge=L.current;let we=typeof ge=="function"?ge(Ne):ge;if(we===void 0||we===!1)return null;we===null&&(we=!0);const je=C?.isConnected?C:null,Ve=ve?.isConnected&&mr(ve)!=="body"?ve:null;let Ue=Re?Ve||je:je||Ve;return Ue||(Ue=JS()||null),typeof we=="boolean"?Ue:No(we)||Ue||null}return()=>{R.off("openchange",De);const Ne=wr(xe),ge=Se(),we=$e(T,Ne)||ge.some(me=>me===Ne||$e(me,Ne))||q&&Ds(q.nodesRef.current,I(),!1).some(me=>$e(me.context?.elements.floating,Ne)),je=L.current,Ve=Y.current,Ue=Me(Ve);queueMicrotask(()=>{const me=H3(Ue),re=typeof je!="boolean";if(je&&!G.current&&en(me)&&(!(!re&&me!==Ne&&Ne!==xe.body)||we)){const le={preventScroll:!0};Ve==="keyboard"&&(le.focusVisible=!0),me.focus(le)}G.current=!1})}},[i,T,ie,L,D,R,q,C,I,Se]),ze(()=>{if(!Po||E||!T)return;const xe=wr(Dt(T));!en(xe)||!Dh(xe)||$e(T,xe)&&xe.blur()},[E,T]),ze(()=>{if(!(i||!K))return K.setFocusManagerState({modal:u,closeOnFocusOut:m,open:E,onOpenChange:k.setOpen,domReference:C}),()=>{K.setFocusManagerState(null)}},[i,K,u,E,k,m,C]),ze(()=>{if(!(i||!ie))return WS(ie),()=>{queueMicrotask(yb)}},[i,ie]);const ye=!i&&(u?!P:!0)&&(fe||u);return d.jsxs(w.Fragment,{children:[ye&&d.jsx(th,{"data-type":"inside",ref:Z,onFocus:xe=>{if(u){const ve=se();Vd(ve[ve.length-1])}else K?.portalNode&&(G.current=!1,cu(xe,K.portalNode)?MT(C)?.focus():No(g??K.beforeOutsideRef)?.focus())}}),n,ye&&d.jsx(th,{"data-type":"inside",ref:z,onFocus:xe=>{u?Vd(se()[0]):K?.portalNode&&(m&&(G.current=!0),cu(xe,K.portalNode)?zT(C)?.focus():No(p??K.afterOutsideRef)?.focus())}})]})}function vb(e,t={}){const{enabled:n=!0,event:i="click",toggle:s=!0,ignoreMouse:l=!1,stickIfOpen:c=!0,touchOpenDelay:u=0,reason:m=Lu}=t,h="rootStore"in e?e.rootStore:e,p=h.context.dataRef,g=w.useRef(void 0),y=Aa(),b=kr(),S=w.useMemo(()=>{function k(C,T,R,N){const I=Xe(m,T,R);C&&N==="touch"&&u>0?b.start(u,()=>{h.setOpen(!0,I)}):h.setOpen(C,I)}function E(C,T,R){const N=p.current.openEvent,I=h.select("domReferenceElement")!==T;return C&&I||!C||!s?!0:N&&c?!R(N.type):!1}return{onPointerDown(C){g.current=Rs(C.pointerType,!0)&&ib(C.nativeEvent)?"virtual":C.pointerType},onMouseDown(C){const T=g.current,R=C.nativeEvent,N=h.select("open");if(C.button!==0||i==="click"||Rs(T,!0)&&l)return;const I=E(N,C.currentTarget,A=>A==="click"||A==="mousedown"),M=Mn(R);if(Dh(M)){k(I,R,M,T);return}const P=C.currentTarget;y.request(()=>{k(I,R,P,T)})},onClick(C){if(i==="mousedown-only")return;const T=g.current;if(i==="mousedown"&&T){g.current=void 0;return}if(Rs(T,!0)&&l)return;const R=h.select("open"),N=E(R,C.currentTarget,I=>I==="click"||I==="mousedown"||I==="keydown"||I==="keyup");k(N,C.nativeEvent,C.currentTarget,T)},onKeyDown(){g.current=void 0}}},[p,i,l,m,h,c,s,y,b,u]);return w.useMemo(()=>n?{reference:S}:wn,[n,S])}function B3(e,t){let n=null,i=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const l=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},c=t.axis==="x"||t.axis==="both",u=t.axis==="y"||t.axis==="both",m=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let h=l.width,p=l.height,g=l.x,y=l.y;return n==null&&t.x&&c&&(n=l.x-t.x),i==null&&t.y&&u&&(i=l.y-t.y),g-=n||0,y-=i||0,h=0,p=0,!s||m?(h=t.axis==="y"?l.width:0,p=t.axis==="x"?l.height:0,g=c&&t.x!=null?t.x:g,y=u&&t.y!=null?t.y:y):s&&!m&&(p=t.axis==="x"?l.height:p,h=t.axis==="y"?l.width:h),s=!0,{width:h,height:p,x:g,y,top:y,right:g+h,bottom:y+p,left:g}}}}function $S(e){return e!=null&&e.clientX!=null}function V3(e,t={}){const{enabled:n=!0,axis:i="both"}=t,s="rootStore"in e?e.rootStore:e,l=s.useState("open"),c=s.useState("floatingElement"),u=s.useState("domReferenceElement"),m=s.context.dataRef,h=w.useRef(!1),p=w.useRef(null),[g,y]=w.useState(),[b,S]=w.useState([]),k=Ae(N=>{s.set("positionReference",N)}),E=Ae((N,I,M)=>{h.current||m.current.openEvent&&!$S(m.current.openEvent)||s.set("positionReference",B3(M??u,{x:N,y:I,axis:i,dataRef:m,pointerType:g}))}),C=Ae(N=>{l?p.current||(E(N.clientX,N.clientY,N.currentTarget),S([])):E(N.clientX,N.clientY,N.currentTarget)}),T=Rs(g)?c:l;w.useEffect(()=>{if(!n){k(u);return}if(!T)return;function N(){p.current?.(),p.current=null}const I=gn(c);function M(P){const A=Mn(P);$e(c,A)?N():E(P.clientX,P.clientY)}return!m.current.openEvent||$S(m.current.openEvent)?p.current=kt(I,"mousemove",M):k(u),N},[T,n,c,m,u,s,E,k,b]),w.useEffect(()=>()=>{s.set("positionReference",null)},[s]),w.useEffect(()=>{n&&!c&&(h.current=!1)},[n,c]),w.useEffect(()=>{!n&&l&&(h.current=!0)},[n,l]);const R=w.useMemo(()=>{function N(I){y(I.pointerType)}return{onPointerDown:N,onPointerEnter:N,onMouseMove:C,onMouseEnter:C}},[C]);return w.useMemo(()=>n?{reference:R,trigger:R}:{},[n,R])}function U3(){return!1}function Z3(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Bh(e,t={}){const{enabled:n=!0,escapeKey:i=!0,outsidePress:s=!0,outsidePressEvent:l="sloppy",referencePress:c=U3,bubbles:u,externalTree:m}=t,h="rootStore"in e?e.rootStore:e,p=h.useState("open"),g=h.useState("floatingElement"),{dataRef:y}=h.context,b=Ha(m),S=Ae(typeof s=="function"?s:()=>!1),k=typeof s=="function"?S:s,E=k!==!1,C=Ae(()=>l),{escapeKey:T,outsidePress:R}=Z3(u),N=w.useRef(!1),I=w.useRef(!1),M=w.useRef(!1),P=w.useRef(!1),A=w.useRef(""),L=w.useRef(null),D=kr(),U=kr(),q=Ae(()=>{U.clear(),y.current.insideReactTree=!1}),K=Ae(Z=>{const z=y.current.floatingContext?.nodeId;return(b?Ds(b.nodesRef.current,z):[]).some(ne=>ne.context?.open&&!ne.context.dataRef.current[Z])}),G=Ae(Z=>Kg(Z,h.select("floatingElement"))||Kg(Z,h.select("domReferenceElement"))),B=Ae(Z=>{c()&&h.setOpen(!1,Xe(Lu,Z.nativeEvent))}),F=Ae(Z=>{if(!p||!n||!i||Z.key!=="Escape"||P.current||!T&&K("__escapeKeyBubbles"))return;const z=j4(Z)?Z.nativeEvent:Z,J=Xe(Hu,z);h.setOpen(!1,J),J.isCanceled||Z.preventDefault(),!T&&!J.isPropagationAllowed&&Z.stopPropagation()}),V=Ae(()=>{y.current.insideReactTree=!0,U.start(0,q)}),Y=Ae(Z=>{if(!p||!n||Z.button!==0)return;const z=Mn(Z.nativeEvent);$e(h.select("floatingElement"),z)&&(N.current||(N.current=!0,I.current=!1))}),te=Ae(Z=>{!p||!n||(Z.defaultPrevented||Z.nativeEvent.defaultPrevented)&&N.current&&(I.current=!0)});w.useEffect(()=>{if(!p||!n)return q;y.current.__escapeKeyBubbles=T,y.current.__outsidePressBubbles=R;const Z=new Vi,z=new Vi;function J(){Z.clear(),P.current=!0}function ne(){Z.start(Po?5:0,()=>{P.current=!1})}function W(){M.current=!0,z.start(0,()=>{M.current=!1})}function fe(){N.current=!1,I.current=!1}function ie(){const re=A.current,le=re==="pen"||!re?"mouse":re,$=C(),Q=typeof $=="function"?$():$;return typeof Q=="string"?Q:Q[le]}function se(re){const le=ie();return le==="intentional"&&re.type!=="click"||le==="sloppy"&&re.type==="click"}function Se(re){const le=y.current.floatingContext?.nodeId,$=b&&Ds(b.nodesRef.current,le).some(Q=>Kg(re,Q.context?.elements.floating));return G(re)||$}function ye(re){if(se(re)){re.type!=="click"&&!G(re)&&(z.clear(),M.current=!1),q();return}if(y.current.insideReactTree){q();return}const le=Mn(re),$=`[${Eu("inert")}]`,Q=Rt(le)?le.getRootNode():null,de=Array.from((Na(Q)?Q:Dt(h.select("floatingElement"))).querySelectorAll($)),Oe=h.context.triggerElements;if(le&&(Oe.hasElement(le)||Oe.hasMatchingElement(Ge=>$e(Ge,le))))return;let _e=Rt(le)?le:null;for(;_e&&!js(_e);){const Ge=Ms(_e);if(js(Ge)||!Rt(Ge))break;_e=Ge}if(!(de.length&&Rt(le)&&!I4(le)&&!$e(le,h.select("floatingElement"))&&de.every(Ge=>!$e(_e,Ge)))){if(en(le)&&!("touches"in re)){const Ge=js(le),dt=Fr(le),rt=/auto|scroll/,at=Ge||rt.test(dt.overflowX),Nt=Ge||rt.test(dt.overflowY),Je=at&&le.clientWidth>0&&le.scrollWidth>le.clientWidth,Pt=Nt&&le.clientHeight>0&&le.scrollHeight>le.clientHeight,Fe=dt.direction==="rtl",pt=Pt&&(Fe?re.offsetX<=le.offsetWidth-le.clientWidth:re.offsetX>le.clientWidth),Et=Je&&re.offsetY>le.clientHeight;if(pt||Et)return}if(!Se(re)){if(ie()==="intentional"&&M.current){z.clear(),M.current=!1;return}typeof k=="function"&&!k(re)||K("__outsidePressBubbles")||(h.setOpen(!1,Xe(_h,re)),q())}}}function xe(re){ie()!=="sloppy"||re.pointerType==="touch"||!h.select("open")||!n||G(re)||ye(re)}function ve(re){if(ie()!=="sloppy"||!h.select("open")||!n||G(re))return;const le=re.touches[0];le&&(L.current={startTime:Date.now(),startX:le.clientX,startY:le.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{L.current&&(L.current.dismissOnTouchEnd=!1,L.current.dismissOnMouseDown=!1)}))}function Re(re,le){const $=Mn(re);if(!$)return;const Q=kt($,re.type,()=>{le(re),Q()})}function De(re){A.current="touch",Re(re,ve)}function Me(re){D.clear(),re.type==="pointerdown"&&(A.current=re.pointerType),!(re.type==="mousedown"&&L.current&&!L.current.dismissOnMouseDown)&&Re(re,le=>{le.type==="pointerdown"?xe(le):ye(le)})}function Ne(re){if(!N.current)return;const le=I.current;if(fe(),ie()==="intentional"){if(re.type==="pointercancel"){le&&W();return}if(!Se(re)){if(le){W();return}typeof k=="function"&&!k(re)||(z.clear(),M.current=!0,q())}}}function ge(re){if(ie()!=="sloppy"||!L.current||G(re))return;const le=re.touches[0];if(!le)return;const $=Math.abs(le.clientX-L.current.startX),Q=Math.abs(le.clientY-L.current.startY),de=Math.sqrt($*$+Q*Q);de>5&&(L.current.dismissOnTouchEnd=!0),de>10&&(ye(re),D.clear(),L.current=null)}function we(re){Re(re,ge)}function je(re){ie()!=="sloppy"||!L.current||G(re)||(L.current.dismissOnTouchEnd&&ye(re),D.clear(),L.current=null)}function Ve(re){Re(re,je)}const Ue=Dt(g),me=io(i&&io(kt(Ue,"keydown",F),kt(Ue,"compositionstart",J),kt(Ue,"compositionend",ne)),E&&io(kt(Ue,"click",Me,!0),kt(Ue,"pointerdown",Me,!0),kt(Ue,"pointerup",Ne,!0),kt(Ue,"pointercancel",Ne,!0),kt(Ue,"mousedown",Me,!0),kt(Ue,"mouseup",Ne,!0),kt(Ue,"touchstart",De,!0),kt(Ue,"touchmove",we,!0),kt(Ue,"touchend",Ve,!0)));return()=>{me(),Z.clear(),z.clear(),fe(),M.current=!1,q()}},[y,g,i,E,k,p,n,T,R,F,q,C,K,G,b,h,D]);const O=w.useMemo(()=>({onKeyDown:F,onPointerDown:B,onClick:B}),[F,B]),_=w.useMemo(()=>({onKeyDown:F,onPointerDown:te,onMouseDown:te,onClickCapture:V,onMouseDownCapture(Z){V(),Y(Z)},onPointerDownCapture(Z){V(),Y(Z)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[F,V,Y,te]);return w.useMemo(()=>n?{reference:O,floating:_,trigger:O}:{},[n,O,_])}function QS(e,t,n){let{reference:i,floating:s}=e;const l=xi(t),c=db(t),u=fb(c),m=yi(t),h=l==="y",p=i.x+i.width/2-s.width/2,g=i.y+i.height/2-s.height/2,y=i[u]/2-s[u]/2;let b;switch(m){case"top":b={x:p,y:i.y-s.height};break;case"bottom":b={x:p,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:g};break;case"left":b={x:i.x-s.width,y:g};break;default:b={x:i.x,y:i.y}}const S=Ps(t);return S&&(b[c]+=y*(S==="end"?1:-1)*(n&&h?-1:1)),b}async function q3(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:l,rects:c,elements:u,strategy:m}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:y=!1,padding:b=0}=Is(t,e),S=kT(b),E=u[y?g==="floating"?"reference":"floating":g],C=ku(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(E)))==null||n?E:E.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(u.floating)),boundary:h,rootBoundary:p,strategy:m})),T=g==="floating"?{x:i,y:s,width:c.floating.width,height:c.floating.height}:c.reference,R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u.floating)),N=await(l.isElement==null?void 0:l.isElement(R))&&await(l.getScale==null?void 0:l.getScale(R))||{x:1,y:1},I=ku(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:T,offsetParent:R,strategy:m}):T);return{top:(C.top-I.top+S.top)/N.y,bottom:(I.bottom-C.bottom+S.bottom)/N.y,left:(C.left-I.left+S.left)/N.x,right:(I.right-C.right+S.right)/N.x}}const G3=50,Y3=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:l=[],platform:c}=n,u=c.detectOverflow?c:{...c,detectOverflow:q3},m=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:g}=QS(h,i,m),y=i,b=0;const S={};for(let k=0;k<l.length;k++){const E=l[k];if(!E)continue;const{name:C,fn:T}=E,{x:R,y:N,data:I,reset:M}=await T({x:p,y:g,initialPlacement:i,placement:y,strategy:s,middlewareData:S,rects:h,platform:u,elements:{reference:e,floating:t}});p=R??p,g=N??g,S[C]={...S[C],...I},M&&b<G3&&(b++,typeof M=="object"&&(M.placement&&(y=M.placement),M.rects&&(h=M.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):M.rects),{x:p,y:g}=QS(h,y,m)),k=-1)}return{x:p,y:g,placement:y,strategy:s,middlewareData:S}},K3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:s,middlewareData:l,rects:c,initialPlacement:u,platform:m,elements:h}=t,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...E}=Is(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const C=yi(s),T=xi(u),R=yi(u)===u,N=await(m.isRTL==null?void 0:m.isRTL(h.floating)),I=y||(R||!k?[rh(u)]:t3(u)),M=S!=="none";!y&&M&&I.push(...o3(u,k,S,N));const P=[u,...I],A=await m.detectOverflow(t,E),L=[];let D=((i=l.flip)==null?void 0:i.overflows)||[];if(p&&L.push(A[C]),g){const G=e3(s,c,N);L.push(A[G[0]],A[G[1]])}if(D=[...D,{placement:s,overflows:L}],!L.every(G=>G<=0)){var U,q;const G=(((U=l.flip)==null?void 0:U.index)||0)+1,B=P[G];if(B&&(!(g==="alignment"?T!==xi(B):!1)||D.every(Y=>xi(Y.placement)===T?Y.overflows[0]>0:!0)))return{data:{index:G,overflows:D},reset:{placement:B}};let F=(q=D.filter(V=>V.overflows[0]<=0).sort((V,Y)=>V.overflows[1]-Y.overflows[1])[0])==null?void 0:q.placement;if(!F)switch(b){case"bestFit":{var K;const V=(K=D.filter(Y=>{if(M){const te=xi(Y.placement);return te===T||te==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(te=>te>0).reduce((te,O)=>te+O,0)]).sort((Y,te)=>Y[1]-te[1])[0])==null?void 0:K[0];V&&(F=V);break}case"initialPlacement":F=u;break}if(s!==F)return{reset:{placement:F}}}return{}}}},ZT=new Set(["left","top"]);async function X3(e,t){const{placement:n,platform:i,elements:s}=e,l=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=yi(n),u=Ps(n),m=xi(n)==="y",h=ZT.has(c)?-1:1,p=l&&m?-1:1,g=Is(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof S=="number"&&(b=u==="end"?S*-1:S),m?{x:b*p,y:y*h}:{x:y*h,y:b*p}}const J3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:s,y:l,placement:c,middlewareData:u}=t,m=await X3(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:s+m.x,y:l+m.y,data:{...m,placement:c}}}}},W3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s,platform:l}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:m={fn:T=>{let{x:R,y:N}=T;return{x:R,y:N}}},...h}=Is(e,t),p={x:n,y:i},g=await l.detectOverflow(t,h),y=xi(s),b=ub(y);let S=p[b],k=p[y];const E=(T,R)=>ST(R+g[T==="y"?"top":"left"],R,R-g[T==="y"?"bottom":"right"]);c&&(S=E(b,S)),u&&(k=E(y,k));const C=m.fn({...t,[b]:S,[y]:k});return{...C,data:{x:C.x-n,y:C.y-i,enabled:{[b]:c,[y]:u}}}}}},$3=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,i;const{x:s,y:l,placement:c,rects:u,middlewareData:m}=t,{offset:h=0,mainAxis:p=!0,crossAxis:g=!0}=Is(e,t),y={x:s,y:l},b=xi(c),S=ub(b);let k=y[S],E=y[b];const C=Is(h,t),T=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:(n=C.mainAxis)!=null?n:0,crossAxis:(i=C.crossAxis)!=null?i:0};if(p){const I=S==="y"?"height":"width",M=u.reference[S]-u.floating[I]+T.mainAxis,P=u.reference[S]+u.reference[I]-T.mainAxis;k<M?k=M:k>P&&(k=P)}if(g){var R,N;const I=S==="y"?"width":"height",M=ZT.has(yi(c)),P=u.reference[b]-u.floating[I]+(M&&((R=m.offset)==null?void 0:R[b])||0)+(M?0:T.crossAxis),A=u.reference[b]+u.reference[I]+(M?0:((N=m.offset)==null?void 0:N[b])||0)-(M?T.crossAxis:0);E<P?E=P:E>A&&(E=A)}return{[S]:k,[b]:E}}}},Q3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:s,elements:l}=t,{apply:c=()=>{},...u}=Is(e,t),m=await s.detectOverflow(t,u),h=yi(n),p=Ps(n),g=xi(n)==="y",{width:y,height:b}=i.floating;let S,k;h==="top"||h==="bottom"?(S=h,k=p===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(k=h,S=p==="end"?"top":"bottom");const E=b-m.top-m.bottom,C=y-m.left-m.right,T=Ma(b-m[S],E),R=Ma(y-m[k],C),N=t.middlewareData.shift,I=!N;let M=T,P=R;N!=null&&N.enabled.x&&(P=C),N!=null&&N.enabled.y&&(M=E),I&&!p&&(g?P=y-2*zo(m.left,m.right):M=b-2*zo(m.top,m.bottom)),await c({...t,availableWidth:P,availableHeight:M});const A=await s.getDimensions(l.floating);return y!==A.width||b!==A.height?{reset:{rects:!0}}:{}}}};function qT(e){const t=Fr(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=en(e),l=s?e.offsetWidth:n,c=s?e.offsetHeight:i,u=nh(n)!==l||nh(i)!==c;return u&&(n=l,i=c),{width:n,height:i,$:u}}function wb(e){return Rt(e)?e:e.contextElement}function Ca(e){const t=wb(e);if(!en(t))return Io(1);const n=t.getBoundingClientRect(),{width:i,height:s,$:l}=qT(t);let c=(l?nh(n.width):n.width)/i,u=(l?nh(n.height):n.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const e_=Io(0);function GT(e){const t=gn(e);return!lb()||!t.visualViewport?e_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t_(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===gn(e)}function jl(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),l=wb(e);let c=Io(1);t&&(i?Rt(i)&&(c=Ca(i)):c=Ca(e));const u=t_(l,n,i)?GT(l):Io(0);let m=(s.left+u.x)/c.x,h=(s.top+u.y)/c.y,p=s.width/c.x,g=s.height/c.y;if(l&&i){const y=gn(l),b=Rt(i)?gn(i):i;let S=y,k=ry(S);for(;k&&b!==S;){const E=Ca(k),C=k.getBoundingClientRect(),T=Fr(k),R=C.left+(k.clientLeft+parseFloat(T.paddingLeft))*E.x,N=C.top+(k.clientTop+parseFloat(T.paddingTop))*E.y;m*=E.x,h*=E.y,p*=E.x,g*=E.y,m+=R,h+=N,S=gn(k),k=ry(S)}}return ku({width:p,height:g,x:m,y:h})}function Vh(e,t){const n=zh(e).scrollLeft;return t?t.left+n:jl(Lo(e)).left+n}function YT(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Vh(e,n),s=n.top+t.scrollTop;return{x:i,y:s}}function n_(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e;const l=s==="fixed",c=Lo(i),u=t?Mh(t.floating):!1;if(i===c||u&&l)return n;let m={scrollLeft:0,scrollTop:0},h=Io(1);const p=Io(0),g=en(i);if((g||!l)&&((mr(i)!=="body"||Pu(c))&&(m=zh(i)),g)){const b=jl(i);h=Ca(i),p.x=b.x+i.clientLeft,p.y=b.y+i.clientTop}const y=c&&!g&&!l?YT(c,m):Io(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-m.scrollLeft*h.x+p.x+y.x,y:n.y*h.y-m.scrollTop*h.y+p.y+y.y}}function r_(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function i_(e){const t=zh(e),n=e.ownerDocument.body,i=zo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=zo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let l=-t.scrollLeft+Vh(e);const c=-t.scrollTop;return Fr(n).direction==="rtl"&&(l+=zo(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:l,y:c}}const o_=25;function s_(e,t,n){n===void 0&&(n="viewport");const i=n==="layoutViewport",s=gn(e),l=Lo(e),c=s.visualViewport;let u=l.clientWidth,m=l.clientHeight,h=0,p=0;if(c){const y=!lb()||t==="fixed";i?y||(h=-c.offsetLeft,p=-c.offsetTop):(u=c.width,m=c.height,y&&(h=c.offsetLeft,p=c.offsetTop))}if(Vh(l)<=0){const y=l.ownerDocument,b=y.body,S=getComputedStyle(b),k=y.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,E=Math.abs(l.clientWidth-b.clientWidth-k),C=getComputedStyle(l).scrollbarGutter==="stable both-edges"?E/2:E;C<=o_&&(u-=C)}return{width:u,height:m,x:h,y:p}}function l_(e,t){const n=jl(e,!0,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft,l=Ca(e),c=e.clientWidth*l.x,u=e.clientHeight*l.y,m=s*l.x,h=i*l.y;return{width:c,height:u,x:m,y:h}}function ek(e,t,n){let i;if(t==="viewport"||t==="layoutViewport")i=s_(e,n,t);else if(t==="document")i=i_(Lo(e));else if(Rt(t))i=l_(t,n);else{const s=GT(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ku(i)}function a_(e,t){const n=t.get(e);if(n)return n;let i=Oa(e,[],!1).filter(u=>Rt(u)&&mr(u)!=="body"),s=null;const l=Fr(e).position==="fixed";let c=l?Ms(e):e;for(;Rt(c)&&!js(c);){const u=Fr(c),m=sb(c),h=s?s.position:l?"fixed":"";!m&&(h==="fixed"||h==="absolute"&&u.position==="static")?i=i.filter(g=>g!==c):s=u,c=Ms(c)}return t.set(e,i),i}function c_(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const c=[...n==="clippingAncestors"?Mh(t)?[]:a_(t,this._c):[].concat(n),i],u=ek(t,c[0],s);let m=u.top,h=u.right,p=u.bottom,g=u.left;for(let y=1;y<c.length;y++){const b=ek(t,c[y],s);m=zo(b.top,m),h=Ma(b.right,h),p=Ma(b.bottom,p),g=zo(b.left,g)}return{width:h-g,height:p-m,x:g,y:m}}function u_(e){const{width:t,height:n}=qT(e);return{width:t,height:n}}function f_(e,t,n){const i=en(t),s=Lo(t),l=n==="fixed",c=jl(e,!0,l,t);let u={scrollLeft:0,scrollTop:0};const m=Io(0);if((i||!l)&&((mr(t)!=="body"||Pu(s))&&(u=zh(t)),i)){const y=jl(t,!0,l,t);m.x=y.x+t.clientLeft,m.y=y.y+t.clientTop}!i&&s&&(m.x=Vh(s));const h=s&&!i&&!l?YT(s,u):Io(0),p=c.left+u.scrollLeft-m.x-h.x,g=c.top+u.scrollTop-m.y-h.y;return{x:p,y:g,width:c.width,height:c.height}}function Qg(e){return Fr(e).position==="static"}function tk(e,t){if(!en(e)||Fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Lo(e)===n&&(n=n.ownerDocument.body),n}function KT(e,t){const n=gn(e);if(Mh(e))return n;if(!en(e)){let s=Ms(e);for(;s&&!js(s);){if(Rt(s)&&!Qg(s))return s;s=Ms(s)}return n}let i=tk(e,t);for(;i&&O4(i)&&Qg(i);)i=tk(i,t);return i&&js(i)&&Qg(i)&&!sb(i)?n:i||z4(e)||n}const d_=async function(e){const t=this.getOffsetParent||KT,n=this.getDimensions,i=await n(e.floating);return{reference:f_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function h_(e){return Fr(e).direction==="rtl"}const XT={convertOffsetParentRelativeRectToViewportRelativeRect:n_,getDocumentElement:Lo,getClippingRect:c_,getOffsetParent:KT,getElementRects:d_,getClientRects:r_,getDimensions:u_,getScale:Ca,isElement:Rt,isRTL:h_};function JT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m_(e,t,n){let i=null,s;const l=Lo(e);function c(){var p;clearTimeout(s),(p=i)==null||p.disconnect(),i=null}function u(p,g){p===void 0&&(p=!1),g===void 0&&(g=1),c();const y=e.getBoundingClientRect(),{left:b,top:S,width:k,height:E}=y;if(p||t(),!k||!E)return;const C=xl(S),T=xl(l.clientWidth-(b+k)),R=xl(l.clientHeight-(S+E)),N=xl(b),M={rootMargin:-C+"px "+-T+"px "+-R+"px "+-N+"px",threshold:zo(0,Ma(1,g))||1};let P=!0;function A(L){const D=L[0].intersectionRatio;if(!JT(y,e.getBoundingClientRect()))return u();if(D!==g){if(!P)return u();D?u(!1,D):s=setTimeout(()=>{u(!1,1e-7)},1e3)}P=!1}try{i=new IntersectionObserver(A,{...M,root:l.ownerDocument})}catch{i=new IntersectionObserver(A,M)}i.observe(e)}const m=gn(e),h=()=>u(n);return m.addEventListener("resize",h),u(!0),()=>{m.removeEventListener("resize",h),c()}}function nk(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:m=!1}=i,h=wb(e),p=s||l?[...h?Oa(h):[],...t?Oa(t):[]]:[];p.forEach(C=>{s&&C.addEventListener("scroll",n),l&&C.addEventListener("resize",n)});const g=h&&u?m_(h,n,l):null;let y=-1,b=null;c&&(b=new ResizeObserver(C=>{let[T]=C;T&&T.target===h&&b&&t&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),h&&!m&&b.observe(h),t&&b.observe(t));let S,k=m?jl(e):null;m&&E();function E(){const C=jl(e);k&&!JT(k,C)&&n(),k=C,S=requestAnimationFrame(E)}return n(),()=>{var C;p.forEach(T=>{s&&T.removeEventListener("scroll",n),l&&T.removeEventListener("resize",n)}),g?.(),(C=b)==null||C.disconnect(),b=null,m&&cancelAnimationFrame(S)}}const p_=J3,g_=W3,x_=K3,y_=Q3,b_=$3,v_=(e,t,n)=>{const i=new Map,s=n??{},l={...XT,...s.platform,_c:i};return Y3(e,t,{...s,platform:l})};var w_=typeof document<"u",S_=function(){},Ud=w_?w.useLayoutEffect:S_;function sh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!sh(e[i],t[i]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,s[i]))return!1;for(i=n;i--!==0;){const l=s[i];if(!(l==="_owner"&&e.$$typeof)&&!sh(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function WT(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rk(e,t){const n=WT(e);return Math.round(t*n)/n}function ex(e){const t=w.useRef(e);return Ud(()=>{t.current=e}),t}function k_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:s,elements:{reference:l,floating:c}={},transform:u=!0,whileElementsMounted:m,open:h}=e,[p,g]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=w.useState(i);sh(y,i)||b(i);const[S,k]=w.useState(null),[E,C]=w.useState(null),T=w.useCallback(Y=>{Y!==M.current&&(M.current=Y,k(Y))},[]),R=w.useCallback(Y=>{Y!==P.current&&(P.current=Y,C(Y))},[]),N=l||S,I=c||E,M=w.useRef(null),P=w.useRef(null),A=w.useRef(p),L=m!=null,D=ex(m),U=ex(s),q=ex(h),K=w.useCallback(()=>{if(!M.current||!P.current)return;const Y={placement:t,strategy:n,middleware:y};U.current&&(Y.platform=U.current),v_(M.current,P.current,Y).then(te=>{const O={...te,isPositioned:q.current!==!1};G.current&&!sh(A.current,O)&&(A.current=O,Ls.flushSync(()=>{g(O)}))})},[y,t,n,U,q]);Ud(()=>{h===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,g(Y=>({...Y,isPositioned:!1})))},[h]);const G=w.useRef(!1);Ud(()=>(G.current=!0,()=>{G.current=!1}),[]),Ud(()=>{if(N&&(M.current=N),I&&(P.current=I),N&&I){if(D.current)return D.current(N,I,K);K()}},[N,I,K,D,L]);const B=w.useMemo(()=>({reference:M,floating:P,setReference:T,setFloating:R}),[T,R]),F=w.useMemo(()=>({reference:N,floating:I}),[N,I]),V=w.useMemo(()=>{const Y={position:n,left:0,top:0};if(!F.floating)return Y;const te=rk(F.floating,p.x),O=rk(F.floating,p.y);return u?{...Y,transform:"translate("+te+"px, "+O+"px)",...WT(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:O}},[n,u,F.floating,p.x,p.y]);return w.useMemo(()=>({...p,update:K,refs:B,elements:F,floatingStyles:V}),[p,K,B,F,V])}const E_=(e,t)=>{const n=p_(e);return{name:n.name,fn:n.fn,options:[e,t]}},C_=(e,t)=>{const n=g_(e);return{name:n.name,fn:n.fn,options:[e,t]}},T_=(e,t)=>({fn:b_(e).fn,options:[e,t]}),R_=(e,t)=>{const n=x_(e);return{name:n.name,fn:n.fn,options:[e,t]}},j_=(e,t)=>{const n=y_(e);return{name:n.name,fn:n.fn,options:[e,t]}};var tx={exports:{}},nx={};var ik;function N_(){if(ik)return nx;ik=1;var e=Au(),t=zC();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var i=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,l=e.useRef,c=e.useEffect,u=e.useMemo,m=e.useDebugValue;return nx.useSyncExternalStoreWithSelector=function(h,p,g,y,b){var S=l(null);if(S.current===null){var k={hasValue:!1,value:null};S.current=k}else k=S.current;S=u(function(){function C(M){if(!T){if(T=!0,R=M,M=y(M),b!==void 0&&k.hasValue){var P=k.value;if(b(P,M))return N=P}return N=M}if(P=N,i(R,M))return P;var A=y(M);return b!==void 0&&b(P,A)?(R=M,P):(R=M,N=A)}var T=!1,R,N,I=g===void 0?null:g;return[function(){return C(p())},I===null?void 0:function(){return C(I())}]},[p,g,y,b]);var E=s(h,S[0],S[1]);return c(function(){k.hasValue=!0,k.value=E},[E]),m(E),E},nx}var ok;function O_(){return ok||(ok=1,tx.exports=N_()),tx.exports}var A_=O_();const M_=mb(19),z_=M_?D_:__;function pe(e,t,n,i,s){return z_(e,t,n,i,s)}function I_(e,t,n,i,s){const l=w.useCallback(()=>t(e.getSnapshot(),n,i,s),[e,t,n,i,s]);return gu.useSyncExternalStore(e.subscribe,l,l)}x4({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const i=e.syncHooks[n],s=i.selector(i.store.state,i.a1,i.a2,i.a3);Object.is(i.value,s)||(t=!0,i.value=s)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const s of e.syncHooks)n.add(s.store);const i=[];for(const s of n)i.push(s.subscribe(t));return()=>{for(const s of i)s()}}),gu.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function D_(e,t,n,i,s){const l=g4();if(!l)return I_(e,t,n,i,s);const c=l.syncIndex;l.syncIndex+=1;let u;return l.didInitialize?(u=l.syncHooks[c],(u.store!==e||u.selector!==t||!Object.is(u.a1,n)||!Object.is(u.a2,i)||!Object.is(u.a3,s))&&(u.store!==e&&(l.didChangeStore=!0),u.store=e,u.selector=t,u.a1=n,u.a2=i,u.a3=s,u.value=t(e.getSnapshot(),n,i,s))):(u={store:e,selector:t,a1:n,a2:i,a3:s,value:t(e.getSnapshot(),n,i,s)},l.syncHooks.push(u)),u.value}function __(e,t,n,i,s){return A_.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,l=>t(l,n,i,s))}class $T{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const i of this.listeners){if(n!==this.updateTick)return;i(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,i,s){return pe(this,t,n,i,s)}}class Uh extends $T{constructor(t,n={},i){super(t),this.context=n,this.selectors=i}useSyncedValue(t,n){w.useDebugValue(t);const i=this;ze(()=>{i.state[t]!==n&&i.set(t,n)},[i,t,n])}useSyncedValueWithCleanup(t,n){const i=this;ze(()=>(i.state[t]!==n&&i.set(t,n),()=>{i.set(t,void 0)}),[i,t,n])}useSyncedValues(t){const n=this,i=Object.values(t);ze(()=>{n.update(t)},[n,...i])}useControlledProp(t,n){w.useDebugValue(t);const i=this,s=n!==void 0;ze(()=>{s&&!Object.is(i.state[t],n)&&i.setState({...i.state,[t]:n})},[i,t,n,s])}select(t,n,i,s){const l=this.selectors[t];return l(this.state,n,i,s)}useState(t,n,i,s){return w.useDebugValue(t),pe(this,this.selectors[t],n,i,s)}useContextCallback(t,n){w.useDebugValue(t);const i=Ae(n??fn);this.context[t]=i}useStateSetter(t){const n=w.useRef(void 0);return n.current===void 0&&(n.current=i=>{this.set(t,i)}),n.current}observe(t,n){let i;typeof t=="function"?i=t:i=this.selectors[t];let s=i(this.state);return n(s,s,this),this.subscribe(l=>{const c=i(l);if(!Object.is(s,c)){const u=s;s=c,n(c,u,this)}})}}const P_={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class Zh extends Uh{constructor(t){const{syncOnly:n,nested:i,onOpenChange:s,triggerElements:l,...c}=t;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:_3(),nested:i,triggerElements:l},P_),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&N4(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const i={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",i)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function L_(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:i,floatingId:s,nested:l,onOpenChange:c}=e,u=t.useState("open"),m=t.useState("activeTriggerElement"),h=t.useState(n?"popupElement":"positionerElement"),p=t.context.triggerElements,g=c,y=w.useRef(null);i===void 0&&y.current===null&&(y.current=new Zh({open:u,transitionStatus:void 0,referenceElement:m,floatingElement:h,triggerElements:p,onOpenChange:g,floatingId:s,syncOnly:!0,nested:l}));const b=i??y.current;return t.useSyncedValue("floatingId",s),ze(()=>{const S={open:u,floatingId:s,referenceElement:m,floatingElement:h};Rt(m)&&(S.domReferenceElement=m),b.state.positionReference===b.state.referenceElement&&(S.positionReference=m),b.update(S)},[u,s,m,h,b]),b.context.onOpenChange=g,b.context.nested=l,b}function Al(e,t=!1,n=!1){const[i,s]=w.useState(e&&t?"idle":void 0),[l,c]=w.useState(e);return e&&!l&&(c(!0),s("starting")),!e&&l&&i!=="ending"&&!n&&s("ending"),!e&&!l&&i==="ending"&&s(void 0),ze(()=>{if(!e&&l&&i!=="ending"&&n){const u=no.request(()=>{s("ending")});return()=>{no.cancel(u)}}},[e,l,i,n]),ze(()=>{if(!e||t)return;const u=no.request(()=>{s(void 0)});return()=>{no.cancel(u)}},[t,e]),ze(()=>{if(!e||!t)return;e&&l&&i!=="idle"&&s("starting");const u=no.request(()=>{s("idle")});return()=>{no.cancel(u)}},[t,e,l,i]),{mounted:l,setMounted:c,transitionStatus:i}}function F_(e,t=!1){const n=Aa();return Ae((i,s=null)=>{n.cancel();const l=No(e);if(l==null)return;const c=l,u=()=>{Ls.flushSync(i)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function m(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{s?.aborted||u()},()=>{if(s?.aborted)return;if(c.getAnimations().some(p=>p.pending||p.playState!=="finished")){m();return}u()})}if(t){const h="data-starting-style";if(!c.hasAttribute(h)){n.request(m);return}const p=new MutationObserver(()=>{c.hasAttribute(h)||(p.disconnect(),m())});p.observe(c,{attributes:!0,attributeFilter:[h]}),s?.addEventListener("abort",()=>p.disconnect(),{once:!0});return}n.request(m)})}function Zi(e){const{enabled:t=!0,open:n,ref:i,onComplete:s}=e,l=Ae(s),c=F_(i,n);w.useEffect(()=>{if(!t)return;const u=new AbortController;return c(l,u.signal),()=>{u.abort()}},[t,n,l,c])}const qh={tabIndex:-1,[iy]:""};function H_(e){return t=>t==="touch"?e.current:!0}function QT(e,t=!1){const n=Fh(),i=Hh()!=null,s=Jn(()=>e(n,i)).current;return L_({popupStore:s,treatPopupAsFloatingElement:t,floatingRootContext:s.state.floatingRootContext,floatingId:n,nested:i,onOpenChange:s.setOpen}),s}function eR({handle:e,store:t}){return ze(()=>e.attachStore(t),[e,t]),null}function B_(e,t){const n=w.useRef(null),i=w.useRef(null);return w.useCallback(s=>{if(e===void 0)return;let l=!1;if(n.current!==null){const c=n.current,u=i.current,m=t.context.triggerElements.getById(c);u&&m===u&&(t.context.triggerElements.delete(c),l=!0),n.current=null,i.current=null}if(s!==null&&(n.current=e,i.current=s,t.context.triggerElements.add(e,s),l=!0),l){const c=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==c&&t.set("triggerCount",c)}},[t,e])}function tR(e,t,n,i=!1){t?e.preventUnmountingOnClose=!1:i&&(e.preventUnmountingOnClose=!0);const s=n?.id??null;(s||t)&&(e.activeTriggerId=s,e.activeTriggerElement=n??null)}function V_(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function U_(e,t,n,i={}){const s=n.reason,l=s===Lr,c=t&&s===Fd,u=!t&&(s===Lu||s===Hu),m=V_(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;i.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);const h=()=>{const p={...i.extraState,open:t};c?p.instantType="focus":u?p.instantType="dismiss":l&&(p.instantType=void 0),tR(p,t,n.trigger,m()),e.update(p)};l?Ls.flushSync(h):h()}function Z_(e,t,n,i){const s=n.useState("isMountedByTrigger",e),l=B_(e,n),c=Ae(m=>{const h=n.select("open"),p=n.select("activeTriggerId");if(p===e){n.update({activeTriggerElement:m,...h?i:null});return}p==null&&h&&n.update({activeTriggerId:e,activeTriggerElement:m,...i})}),u=w.useCallback(m=>{l(m),m&&c(m)},[l,c]);return ze(()=>{s&&n.update({activeTriggerElement:t.current,...i})},[s,n,t,...Object.values(i)]),{registerTrigger:u,isMountedByThisTrigger:s}}function nR(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,i=w.useRef(null),s=e.useState("open"),l=e.useState("triggerCount"),c=e.useState("activeTriggerId"),u=e.useState("activeTriggerElement");ze(()=>{if(!s){i.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const m=e.context.triggerElements.size,h={};e.state.triggerCount!==m&&(h.triggerCount=m);const p=e.select("activeTriggerId");let g=null;if(p){const y=e.context.triggerElements.getById(p);if(y)i.current=p,y!==e.state.activeTriggerElement&&(h.activeTriggerElement=y);else{for(const[b,S]of e.context.triggerElements.entries())if(S===e.state.activeTriggerElement){h.activeTriggerId=b,h.activeTriggerElement=S,i.current=b;break}h.activeTriggerId===void 0&&(i.current===p?g=p:i.current=null)}}else i.current=null;if(!g&&!p&&m===1){const y=e.context.triggerElements.entries().next();if(!y.done){const[b,S]=y.value;h.activeTriggerId=b,h.activeTriggerElement=S,i.current=b}}(h.triggerCount!==void 0||h.activeTriggerId!==void 0||h.activeTriggerElement!==void 0)&&e.update(h),g&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===g&&!e.context.triggerElements.getById(g)){const y=Xe(On);e.setOpen(!1,y),y.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[s,e,l,c,u,n])}function rR(e,t,n){const{mounted:i,setMounted:s,transitionStatus:l}=Al(e),c=t.useState("preventUnmountingOnClose"),u=e?!1:c;t.useSyncedValues({mounted:i,transitionStatus:l,preventUnmountingOnClose:u});const m=Ae(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),t.context.onOpenChangeComplete?.(!1)});return Zi({enabled:i&&!e&&!u,open:e,ref:t.context.popupRef,onComplete(){e||m()}}),{forceUnmount:m,transitionStatus:l}}function iR(e,t){e.useSyncedValues(t),ze(()=>()=>{e.update({activeTriggerProps:wn,inactiveTriggerProps:wn,popupProps:wn})},[e])}function q_(e,t){ze(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),ze(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class Gh{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function G_(){return new Zh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Gh,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function oR(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:G_(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:wn,inactiveTriggerProps:wn,popupProps:wn}}function sR(e,t,n=!1){return new Zh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const uu=e=>e.triggerIdProp??e.activeTriggerId,Sb=e=>e.openProp??e.open,sk=e=>(e.popupElement?.id??e.floatingId)||void 0;function lR(e,t){return t!==void 0&&Sb(e)&&uu(e)===t}function Y_(e,t){return lR(e,t)?!0:t!==void 0&&Sb(e)&&uu(e)==null&&e.triggerCount===1}const aR={open:Sb,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:uu,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:sk,isTriggerActive:(e,t)=>t!==void 0&&uu(e)===t,isOpenedByTrigger:(e,t)=>lR(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&uu(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Y_(e,t)?sk(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function K_(e){const t=w.useCallback(i=>e===void 0?fn:e.subscribeStore(i),[e]),n=w.useCallback(()=>e===void 0?void 0:e.store,[e]);return gu.useSyncExternalStore(t,n,()=>e?.serverStore)}function cR(e){const{open:t=!1,onOpenChange:n,elements:i={}}=e,s=Fh(),l=Hh()!=null,c=Jn(()=>new Zh({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:new Gh,floatingId:s,syncOnly:!1,nested:l})).current;return ze(()=>{const u={open:t,floatingId:s};i.reference!==void 0&&(u.referenceElement=i.reference,u.domReferenceElement=Rt(i.reference)?i.reference:null),i.floating!==void 0&&(u.floatingElement=i.floating),c.update(u)},[t,s,i.reference,i.floating,c]),c.context.onOpenChange=n,c.context.nested=l,c}function X_(e){return J_(e,e.rootContext)}function J_(e,t){const{nodeId:n,externalTree:i}=e,s=t.useState("referenceElement"),l=t.useState("floatingElement"),c=t.useState("domReferenceElement"),u=t.useState("open"),m=t.useState("floatingId"),[h,p]=w.useState(null),[g,y]=w.useState(void 0),[b,S]=w.useState(void 0),k=w.useRef(null),E=Ha(i),C=w.useMemo(()=>({reference:s,floating:l,domReference:c}),[s,l,c]),T=k_({...e,elements:{...C,...h&&{reference:h}}}),R=Rt(g)?g:null,N=b===void 0?t.state.floatingElement:b;t.useSyncedValue("referenceElement",g??null),t.useSyncedValue("domReferenceElement",g===void 0?c:R),t.useSyncedValue("floatingElement",N);const I=w.useCallback(U=>{const q=Rt(U)?{getBoundingClientRect:()=>U.getBoundingClientRect(),getClientRects:()=>U.getClientRects(),contextElement:U}:U;p(q),T.refs.setReference(q)},[T.refs]),M=w.useCallback(U=>{(Rt(U)||U===null)&&(k.current=U,y(U)),(Rt(T.refs.reference.current)||T.refs.reference.current===null||U!==null&&!Rt(U))&&T.refs.setReference(U)},[T.refs,y]),P=w.useCallback(U=>{S(U),T.refs.setFloating(U)},[T.refs]),A=w.useMemo(()=>({...T.refs,setReference:M,setFloating:P,setPositionReference:I,domReference:k}),[T.refs,M,P,I]),L=w.useMemo(()=>({...T.elements,domReference:c}),[T.elements,c]),D=w.useMemo(()=>({...T,dataRef:t.context.dataRef,open:u,onOpenChange:t.setOpen,events:t.context.events,floatingId:m,refs:A,elements:L,nodeId:n,rootStore:t}),[T,A,L,n,t,u,m]);return ze(()=>{c&&(k.current=c)},[c]),ze(()=>{t.context.dataRef.current.floatingContext=D;const U=E?.nodesRef.current.find(q=>q.id===n);U&&(U.context=D)}),w.useMemo(()=>({...T,context:D,refs:A,elements:L,rootStore:t}),[T,A,L,D,t])}const rx=aT&&Po;function W_(e,t={}){const{enabled:n=!0,delay:i}=t,s="rootStore"in e?e.rootStore:e,{events:l,dataRef:c}=s.context,u=w.useRef(!1),m=w.useRef(null),h=w.useRef(!0),p=kr();w.useEffect(()=>{const y=s.select("domReferenceElement");if(!n)return;const b=gn(y);function S(){const C=s.select("domReferenceElement");!s.select("open")&&en(C)&&C===wr(Dt(C))&&(u.current=!0)}function k(){h.current=!0}function E(){h.current=!1}return io(kt(b,"blur",S),rx&&kt(b,"keydown",k,!0),rx&&kt(b,"pointerdown",E,!0))},[s,n]),w.useEffect(()=>{if(!n)return;function y(b){if(b.reason===Lu||b.reason===Hu){const S=s.select("domReferenceElement");Rt(S)&&(m.current=S,u.current=!0)}}return l.on("openchange",y),()=>{l.off("openchange",y)}},[l,n,s]);const g=w.useMemo(()=>{function y(){u.current=!1,m.current=null}return{onMouseLeave(){y()},onFocus(b){const S=b.currentTarget;if(u.current){if(m.current===S)return;y()}const k=Mn(b.nativeEvent);if(Rt(k)){if(rx&&!b.relatedTarget){if(!h.current&&!Dh(k))return}else if(!_4(k))return}const E=Qd(b.relatedTarget,s.context.triggerElements),{nativeEvent:C,currentTarget:T}=b,R=typeof i=="function"?i():i;if(s.select("open")&&E||R===0||R===void 0){s.setOpen(!0,Xe(Fd,C,T));return}p.start(R,()=>{u.current||s.setOpen(!0,Xe(Fd,C,T))})},onBlur(b){y();const S=b.relatedTarget,k=b.nativeEvent,E=Rt(S)&&S.hasAttribute(Eu("focus-guard"))&&S.getAttribute("data-type")==="outside";p.start(0,()=>{const C=s.select("domReferenceElement"),T=wr(Dt(C));!S&&T===C||$e(c.current.floatingContext?.refs.floating.current,T)||$e(C,T)||E||Qd(S??T,s.context.triggerElements)||s.setOpen(!1,Xe(Fd,k))})}}},[c,i,s,p]);return w.useMemo(()=>n?{reference:g,trigger:g}:{},[n,g])}class kb{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Vi,this.restTimeout=new Vi,this.handleCloseOptions=void 0}static create(){return new kb}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const lh=new WeakMap;function ah(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&lh.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),lh.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function uR(e,t){const{scopeElement:n,referenceElement:i,floatingElement:s}=t,l=lh.get(n);l&&l!==e&&ah(l),ah(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=i,e.pointerEventsFloatingElement=s,lh.set(n,e),n.style.pointerEvents="none",i.style.pointerEvents="auto",s.style.pointerEvents="auto"}function Eb(e){const t=e.context.dataRef.current,n=Jn(()=>t.hoverInteractionState??kb.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),tb(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function $_(e,t={}){const{enabled:n=!0,closeDelay:i=0,nodeId:s}=t,l="rootStore"in e?e.rootStore:e,c=l.useState("open"),u=l.useState("floatingElement"),m=l.useState("domReferenceElement"),{dataRef:h}=l.context,p=Ha(),g=Hh(),y=Eb(l),b=kr(),S=Ae(()=>fT(h.current.openEvent?.type,y.interactedInside)),k=Ae(()=>L4(h.current.openEvent?.type)),E=Ae(()=>{ah(y)});ze(()=>{c||(y.pointerType=void 0,y.restTimeoutPending=!1,y.interactedInside=!1,E())},[c,y,E]),w.useEffect(()=>E,[E]),ze(()=>{if(n&&c&&y.handleCloseOptions?.blockPointerEvents&&k()&&Rt(m)&&u){const C=m,T=u,R=Dt(u),N=p?.nodesRef.current.find(A=>A.id===g)?.context?.elements.floating;N&&(N.style.pointerEvents="");const I=y.pointerEventsScopeElement!==T?y.pointerEventsScopeElement:null,M=N!==T?N:null,P=y.handleCloseOptions?.getScope?.()??I??M??C.closest("[data-rootownerid]")??R.body;return uR(y,{scopeElement:P,referenceElement:C,floatingElement:T}),()=>{E()}}},[n,c,m,u,y,k,p,g,E]),w.useEffect(()=>{if(!n)return;function C(){return!!(p&&g&&Ds(p.nodesRef.current,g).length>0)}function T(A){const L=zs(i,"close",y.pointerType),D=()=>{l.setOpen(!1,Xe(Lr,A)),p?.events.emit("floating.closed",A)};L?y.openChangeTimeout.start(L,D):(y.openChangeTimeout.clear(),D())}function R(A){const L=Mn(A);if(!D4(L)){y.interactedInside=!1;return}y.interactedInside=L?.closest("[aria-haspopup]")!=null}function N(){y.openChangeTimeout.clear(),b.clear(),p?.events.off("floating.closed",M),E()}function I(A){if(C()&&p){p.events.on("floating.closed",M);return}if(Qd(A.relatedTarget,l.context.triggerElements))return;const L=h.current.floatingContext?.nodeId??s,D=A.relatedTarget;if(!(p&&L&&Rt(D)&&Ds(p.nodesRef.current,L,!1).some(q=>$e(q.context?.elements.floating,D)))){if(y.handler){y.handler(A);return}E(),k()&&!S()&&T(A)}}function M(A){!p||!g||C()||b.start(0,()=>{p.events.off("floating.closed",M),l.setOpen(!1,Xe(Lr,A)),p.events.emit("floating.closed",A)})}const P=u;return io(P&&kt(P,"mouseenter",N),P&&kt(P,"mouseleave",I),P&&kt(P,"pointerdown",R,!0),()=>{p?.events.off("floating.closed",M)})},[n,u,l,h,i,s,k,S,E,y,p,g,b])}const Q_={current:null};function e5(e,t={}){const{enabled:n=!0,delay:i=0,handleClose:s=null,mouseOnly:l=!1,restMs:c=0,move:u=!0,triggerElementRef:m=Q_,externalTree:h,isActiveTrigger:p=!0,getHandleCloseContext:g,isClosing:y,shouldOpen:b,guardStaleOpen:S=!1}=t,k="rootStore"in e?e.rootStore:e,{dataRef:E,events:C}=k.context,T=Ha(h),R=Eb(k),N=w.useRef(!1),I=Tn(s),M=Tn(i),P=Tn(c),A=Tn(n),L=Tn(b),D=Tn(y),U=Ae(()=>fT(E.current.openEvent?.type,R.interactedInside)),q=Ae(()=>L.current?.()!==!1),K=Ae((F,V,Y)=>{const te=k.context.triggerElements;if(te.hasElement(V))return!F||!$e(F,V);if(!Rt(Y))return!1;const O=Y;return te.hasMatchingElement(_=>$e(_,O))&&(!F||!$e(F,O))}),G=Ae(()=>{if(!R.handler)return;Dt(k.select("domReferenceElement")).removeEventListener("mousemove",R.handler),R.handler=void 0}),B=Ae(()=>{ah(R)});return p&&(R.handleCloseOptions=I.current?.__options),w.useEffect(()=>G,[G]),w.useEffect(()=>{if(!n)return;function F(V){V.open?N.current=!1:(N.current=V.reason===Lr,G(),R.openChangeTimeout.clear(),R.restTimeout.clear(),R.blockMouseMove=!0,R.restTimeoutPending=!1)}return C.on("openchange",F),()=>{C.off("openchange",F)}},[n,C,R,G]),w.useEffect(()=>{if(!n)return;function F(Z,z=!0){const J=zs(M.current,"close",R.pointerType);J?R.openChangeTimeout.start(J,()=>{k.setOpen(!1,Xe(Lr,Z)),T?.events.emit("floating.closed",Z)}):z&&(R.openChangeTimeout.clear(),k.setOpen(!1,Xe(Lr,Z)),T?.events.emit("floating.closed",Z))}const V=m.current??(p?k.select("domReferenceElement"):null);if(!Rt(V))return;function Y(Z){if(R.openChangeTimeout.clear(),R.blockMouseMove=!1,l&&!Rs(R.pointerType))return;const z=zS(P.current),J=zs(M.current,"open",R.pointerType),ne=Mn(Z),W=Z.currentTarget??null,fe=k.select("domReferenceElement");let ie=W;if(Rt(ne)&&!k.context.triggerElements.hasElement(ne)){for(const Ne of k.context.triggerElements.elements())if($e(Ne,ne)){ie=Ne;break}}Rt(W)&&Rt(fe)&&!k.context.triggerElements.hasElement(W)&&$e(W,fe)&&(ie=fe);const se=ie==null?!1:K(fe,ie,ne),Se=k.select("open"),ye=D.current?.()??k.select("transitionStatus")==="ending",xe=!Se&&ye&&N.current,ve=!se&&Rt(ie)&&Rt(fe)&&$e(fe,ie)&&xe,Re=z>0&&!J,De=se&&(Se||xe)||ve,Me=!Se||se;if(De){q()&&k.setOpen(!0,Xe(Lr,Z,ie));return}Re||(J?R.openChangeTimeout.start(J,()=>{Me&&q()&&k.setOpen(!0,Xe(Lr,Z,ie))}):Me&&q()&&k.setOpen(!0,Xe(Lr,Z,ie)))}function te(Z){if(U()){B();return}G();const z=k.select("domReferenceElement"),J=Dt(z);R.restTimeout.clear(),R.restTimeoutPending=!1;const ne=E.current.floatingContext??g?.();if(Qd(Z.relatedTarget,k.context.triggerElements))return;if(I.current&&ne){k.select("open")||R.openChangeTimeout.clear();const fe=m.current;R.handler=I.current({...ne,tree:T,x:Z.clientX,y:Z.clientY,onClose(){B(),G(),A.current&&!U()&&fe===k.select("domReferenceElement")&&F(Z,!0)}}),J.addEventListener("mousemove",R.handler),R.handler(Z);return}(R.pointerType!=="touch"||!$e(k.select("floatingElement"),Z.relatedTarget))&&F(Z)}function O(Z){$e(V,Z.relatedTarget)||(R.openChangeTimeout.clear(),R.restTimeout.clear(),R.restTimeoutPending=!1)}const _=S?kt(V,"mouseout",O):void 0;return u?io(kt(V,"mousemove",Y,{once:!0}),kt(V,"mouseenter",Y),kt(V,"mouseleave",te),_):io(kt(V,"mouseenter",Y),kt(V,"mouseleave",te),_)},[G,B,E,M,k,n,I,R,p,K,U,l,u,P,m,T,A,g,D,q,S]),w.useMemo(()=>{if(!n)return;function F(V){R.pointerType=V.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(V){const{nativeEvent:Y}=V,te=V.currentTarget,O=k.select("domReferenceElement"),_=k.select("open"),Z=K(O,te,V.target);if(l&&!Rs(R.pointerType))return;if(_&&Z&&R.handleCloseOptions?.blockPointerEvents){const ne=k.select("floatingElement");if(ne){const W=R.handleCloseOptions?.getScope?.()??te.ownerDocument.body;uR(R,{scopeElement:W,referenceElement:te,floatingElement:ne})}}const z=zS(P.current);if(_&&!Z||z===0||!Z&&R.restTimeoutPending&&V.movementX**2+V.movementY**2<2)return;R.restTimeout.clear();function J(){if(R.restTimeoutPending=!1,U())return;const ne=k.select("open");!R.blockMouseMove&&(!ne||Z)&&q()&&k.setOpen(!0,Xe(Lr,Y,te))}R.pointerType==="touch"?Ls.flushSync(()=>{J()}):Z&&_?J():(R.restTimeoutPending=!0,R.restTimeout.start(z,J))}}},[n,R,U,K,l,k,P,q])}const t5="Escape";function lk(e){return Po&&e.movementX===0&&e.movementY===0}function Yh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function yd(e,t){return Yh(t,e===ab||e===Ih,e===Sl||e===kl)}function ix(e,t,n){return Yh(t,e===Ih,n?e===Sl:e===kl)||e==="Enter"||e===" "||e===""}function n5(e,t,n){return Yh(t,n?e===Sl:e===kl,e===Ih)}function r5(e,t,n,i){const s=n?e===kl:e===Sl,l=e===ab;return t==="both"||t==="horizontal"&&i?e===t5:Yh(t,s,l)}function fR(e,t){const{listRef:n,activeIndex:i,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loopFocus:m=!1,nested:h=!1,rtl:p=!1,virtual:g=!1,focusItemOnOpen:y="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:S=!0,disabledIndices:k=void 0,orientation:E="vertical",parentOrientation:C,id:T,resetOnPointerLeave:R=!0,externalTree:N,grid:I}=t,M=I!=null,P="rootStore"in e?e.rootStore:e,A=P.useState("open"),L=P.useState("floatingElement"),D=P.useState("domReferenceElement"),U=P.context.dataRef,q=eh(L),K=oy(D),G=Tn(q),B=Hh(),F=Ha(N),V=w.useRef(y),Y=w.useRef(c??-1),te=w.useRef(null),O=w.useRef(!0),_=Ae(re=>{s(Y.current===-1?null:Y.current,re)}),Z=w.useRef(!!L),z=w.useRef(A),J=w.useRef(!1),ne=w.useRef(!1),W=w.useRef(null),fe=Tn(k),ie=Tn(A),se=Tn(c),Se=Tn(R),ye=Aa(),xe=Aa(),ve=Ae(()=>{function re(de){g?F?.events.emit("virtualfocus",de):W.current=Vd(de,{sync:J.current,preventScroll:!0})}const le=n.current[Y.current],$=ne.current;le&&re(le),(J.current?de=>de():de=>ye.request(de))(()=>{const de=n.current[Y.current]||le;if(!de)return;le||re(de),we&&($||!O.current)&&de.scrollIntoView?.({block:"nearest",inline:"nearest"})})});ze(()=>{U.current.orientation=E},[U,E]),ze(()=>{l&&(A&&L?(Y.current=c??-1,V.current&&c!=null&&(ne.current=!0,_())):Z.current&&(Y.current=-1,_()))},[l,A,L,c,_]),ze(()=>{if(l){if(!A){J.current=!1;return}if(L)if(i==null){if(J.current=!1,se.current!=null)return;if(Z.current&&(Y.current=-1,ve()),(!z.current||!Z.current)&&V.current&&(te.current!=null||V.current===!0&&te.current==null)){let re=0;const le=()=>{n.current[0]==null?(re<2&&(re?Q=>xe.request(Q):queueMicrotask)(le),re+=1):(Y.current=te.current==null||ix(te.current,E,p)||h?Bd(n):ay(n),te.current=null,_())};le()}}else Ns(n.current,i)||(Y.current=i,ve(),ne.current=!1)}},[l,A,L,i,se,h,n,E,p,_,ve,xe]),ze(()=>{if(!l||L||!F||g||!Z.current)return;const re=F.nodesRef.current,le=re.find(de=>de.id===B)?.context?.elements.floating,$=wr(Dt(D??le??null)),Q=re.some(de=>de.context&&$e(de.context.elements.floating,$));le&&!Q&&O.current&&le.focus({preventScroll:!0})},[l,L,D,F,B,g]),ze(()=>{z.current=A,Z.current=!!L}),ze(()=>{A||(te.current=null,V.current=y)},[A,y]);const Re=i!=null,De=Ae(re=>{if(!ie.current)return;const le=n.current.indexOf(re.currentTarget);le!==-1&&(Y.current!==le||i!==le)&&(Y.current=le,_(re))}),Me=Ae(()=>C??F?.nodesRef.current.find(re=>re.id===B)?.context?.dataRef?.current.orientation),Ne=Ae(()=>Bd(n,fe.current)),ge=Ae(re=>{if(O.current=!1,J.current=!0,re.which===229||!ie.current&&re.currentTarget===G.current)return;if(h&&r5(re.key,E,p,M)){yd(re.key,Me())||or(re),P.setOpen(!1,Xe(sy,re.nativeEvent)),en(D)&&(g?F?.events.emit("virtualfocus",D):D.focus());return}const le=Y.current,$=Bd(n,k),Q=ay(n,k);if(K||(re.key==="Home"&&(or(re),Y.current=$,_(re)),re.key==="End"&&(or(re),Y.current=Q,_(re))),I!=null){const de=I(re,Y.current,n,E,m,p,k,$,Q);if(de!=null&&(Y.current=de,_(re)),E==="both")return}if(yd(re.key,E)){if(or(re),A&&!g&&wr(re.currentTarget.ownerDocument)===re.currentTarget){Y.current=ix(re.key,E,p)?$:Q,_(re);return}ix(re.key,E,p)?m?le>=Q?u&&le!==n.current.length?Y.current=-1:(J.current=!1,Y.current=$):Y.current=ir(n.current,{startingIndex:le,disabledIndices:k}):Y.current=Math.min(Q,ir(n.current,{startingIndex:le,disabledIndices:k})):m?le<=$?u&&le!==-1?Y.current=n.current.length:(J.current=!1,Y.current=Q):Y.current=ir(n.current,{startingIndex:le,decrement:!0,disabledIndices:k}):Y.current=Math.max($,ir(n.current,{startingIndex:le,decrement:!0,disabledIndices:k})),Ns(n.current,Y.current)&&(Y.current=-1),_(re)}}),we=w.useMemo(()=>({onFocus(le){J.current=!0,De(le)},onClick:({currentTarget:le})=>le.focus({preventScroll:!0}),onMouseMove(le){lk(le)||(J.current=!0,ne.current=!1,b&&De(le))},onPointerLeave(le){if(!ie.current||!O.current||le.pointerType==="touch")return;J.current=!0;const $=le.relatedTarget;if(!(!b||n.current.includes($))&&Se.current&&(W.current?.(),W.current=null,Y.current=-1,_(le),!g)){const Q=G.current,de=wr(Dt(Q));Q&&$e(Q,de)&&Q.focus({preventScroll:!0})}}}),[De,ie,G,b,n,_,Se,g]),je=w.useMemo(()=>g&&A&&Re&&{"aria-activedescendant":`${T}-${i}`},[g,A,Re,T,i]),Ve=w.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...K?{}:je,onKeyDown(re){if(re.key==="Tab"&&re.shiftKey&&A&&!g){const le=Mn(re.nativeEvent);if(le&&!$e(G.current,le))return;or(re),P.setOpen(!1,Xe(Fu,re.nativeEvent)),en(D)&&D.focus();return}ge(re)},onPointerMove(re){lk(re)||(O.current=!0)}}),[je,ge,G,E,K,P,A,g,D]),Ue=w.useMemo(()=>{function re(Q){P.setOpen(!0,Xe(sy,Q.nativeEvent,Q.currentTarget))}function le(Q){y==="auto"&&rb(Q.nativeEvent)&&(V.current=!g)}function $(Q){V.current=y,y==="auto"&&ib(Q.nativeEvent)&&(V.current=!0)}return{onKeyDown(Q){const de=P.select("open");O.current=!1;const Oe=Q.key.startsWith("Arrow"),_e=n5(Q.key,Me(),p),Ge=yd(Q.key,E),dt=(h?_e:Ge)||Q.key==="Enter"||Q.key.trim()==="";if(g&&de)return ge(Q);if(!(!de&&!S&&Oe)){if(dt){const rt=yd(Q.key,Me());te.current=h&&rt?null:Q.key}if(h){_e&&(or(Q),de?(Y.current=Ne(),_(Q)):re(Q));return}Ge&&(se.current!=null&&(Y.current=se.current),or(Q),!de&&S?re(Q):ge(Q),de&&_(Q))}},onFocus(Q){P.select("open")&&!g&&(Y.current=-1,_(Q))},onPointerDown:$,onPointerEnter:$,onMouseDown:le,onClick:le}},[ge,y,Ne,h,_,P,S,E,Me,p,se,g]),me=w.useMemo(()=>({...je,...Ue}),[je,Ue]);return w.useMemo(()=>l?{reference:me,floating:Ve,item:we,trigger:Ue}:{},[l,me,Ve,Ue,we])}function dR(e,t){const{listRef:n,elementsRef:i,activeIndex:s,onMatch:l,disabledIndices:c,onTyping:u,enabled:m=!0,resetMs:h=750,selectedIndex:p=null}=t,g="rootStore"in e?e.rootStore:e,y=g.useState("open"),b=kr(),S=w.useRef(""),k=w.useRef(p??s??-1),E=w.useRef(null),C=Ae(N=>{function I(G){return i?.current[G]}function M(G){const B=I(G);return B&&!Ph(B)||B?.matches(":disabled")?!1:c==null||!za(Pi,G,c)}function P(G,B,F=0){if(G.length===0)return-1;const V=(F%G.length+G.length)%G.length,Y=B.toLowerCase();for(let te=0;te<G.length;te+=1){const O=(V+te)%G.length;if(!(!G[O]?.toLowerCase().startsWith(Y)||!M(O)))return O}return-1}const A=n.current;if(S.current.length>0&&N.key===" "&&(or(N),u?.(!0)),S.current.length>0&&S.current[0]!==" "&&P(A,S.current)===-1&&N.key!==" "&&u?.(!1),A==null||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;y&&N.key!==" "&&(or(N),u?.(!0));const L=S.current==="";L&&(k.current=p??s??-1),A.every((G,B)=>G&&M(B)?G[0]?.toLowerCase()!==G[1]?.toLowerCase():!0)&&S.current===N.key&&(S.current="",k.current=E.current),S.current+=N.key,b.start(h,()=>{S.current="",k.current=E.current,u?.(!1)});const q=((L?p??s??-1:k.current)??0)+1,K=P(A,S.current,q);K!==-1?(l?.(K),E.current=K):N.key!==" "&&(S.current="",u?.(!1))}),T=Ae(N=>{const I=N.relatedTarget,M=g.select("domReferenceElement"),P=g.select("floatingElement");$e(M,I)||$e(P,I)||(b.clear(),S.current="",k.current=E.current,u?.(!1))});ze(()=>{!y&&p!==null||(b.clear(),E.current=null,S.current!==""&&(S.current=""))},[y,p,b]);const R=w.useMemo(()=>({onKeyDown:C,onBlur:T}),[C,T]);return w.useMemo(()=>m?{reference:R,floating:R}:{},[m,R])}const ak=.1,i5=ak*ak,un=.5;function bd(e,t,n,i,s,l){return i>=t!=l>=t&&e<=(s-n)*(t-i)/(l-i)+n}function vd(e,t,n,i,s,l,c,u,m,h){let p=!1;return bd(e,t,n,i,s,l)&&(p=!p),bd(e,t,s,l,c,u)&&(p=!p),bd(e,t,c,u,m,h)&&(p=!p),bd(e,t,m,h,n,i)&&(p=!p),p}function o5(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function wd(e,t,n,i,s,l){const c=Math.min(n,s),u=Math.max(n,s),m=Math.min(i,l),h=Math.max(i,l);return e>=c&&e<=u&&t>=m&&t<=h}function s5(e={}){const{blockPointerEvents:t=!1}=e,n=new Vi,i=({x:s,y:l,placement:c,elements:u,onClose:m,nodeId:h,tree:p})=>{const g=c?.split("-")[0];let y=!1,b=null,S=null,k=typeof performance<"u"?performance.now():0;function E(T,R){const N=performance.now(),I=N-k;if(b===null||S===null||I===0)return b=T,S=R,k=N,!1;const M=T-b,P=R-S,A=M*M+P*P,L=I*I*i5;return b=T,S=R,k=N,A<L}function C(){n.clear(),m()}return function(R){n.clear();const N=u.domReference,I=u.floating;if(!N||!I||g==null||s==null||l==null)return;const{clientX:M,clientY:P}=R,A=Mn(R),L=R.type==="mouseleave",D=$e(I,A),U=$e(N,A);if(D&&(y=!0,!L))return;if(U&&(y=!1,!L)){y=!0;return}if(L&&Rt(R.relatedTarget)&&$e(I,R.relatedTarget))return;function q(){return!!(p&&Ds(p.nodesRef.current,h).length>0)}function K(){q()||C()}if(q())return;const G=N.getBoundingClientRect(),B=I.getBoundingClientRect(),F=s>B.right-B.width/2,V=l>B.bottom-B.height/2,Y=B.width>G.width,te=B.height>G.height,O=(Y?G:B).left,_=(Y?G:B).right,Z=(te?G:B).top,z=(te?G:B).bottom;if(g==="top"&&l>=G.bottom-1||g==="bottom"&&l<=G.top+1||g==="left"&&s>=G.right-1||g==="right"&&s<=G.left+1){K();return}let J=!1;switch(g){case"top":J=wd(M,P,O,G.top+1,_,B.bottom-1);break;case"bottom":J=wd(M,P,O,B.top+1,_,G.bottom-1);break;case"left":J=wd(M,P,B.right-1,z,G.left+1,Z);break;case"right":J=wd(M,P,G.right-1,z,B.left+1,Z);break}if(J)return;if(y&&!o5(M,P,G)){K();return}if(!L&&E(M,P)){K();return}let ne=!1;switch(g){case"top":{const W=Y?un/2:un*4,fe=Y||F?s+W:s-W,ie=Y?s-W:F?s+W:s-W,se=l+un+1,Se=F||Y?B.bottom-un:B.top,ye=F?Y?B.bottom-un:B.top:B.bottom-un;ne=vd(M,P,fe,se,ie,se,B.left,Se,B.right,ye);break}case"bottom":{const W=Y?un/2:un*4,fe=Y||F?s+W:s-W,ie=Y?s-W:F?s+W:s-W,se=l-un,Se=F||Y?B.top+un:B.bottom,ye=F?Y?B.top+un:B.bottom:B.top+un;ne=vd(M,P,fe,se,ie,se,B.left,Se,B.right,ye);break}case"left":{const W=te?un/2:un*4,fe=te||V?l+W:l-W,ie=te?l-W:V?l+W:l-W,se=s+un+1,Se=V||te?B.right-un:B.left,ye=V?te?B.right-un:B.left:B.right-un;ne=vd(M,P,Se,B.top,ye,B.bottom,se,fe,se,ie);break}case"right":{const W=te?un/2:un*4,fe=te||V?l+W:l-W,ie=te?l-W:V?l+W:l-W,se=s-un,Se=V||te?B.left+un:B.right,ye=V?te?B.left+un:B.right:B.left+un;ne=vd(M,P,se,fe,se,ie,Se,B.top,ye,B.bottom);break}}ne?y||n.start(40,K):K()}};return i.__options={...e,blockPointerEvents:t},i}const l5={...aR,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class a5 extends Uh{constructor(t,n,i){const s=new Gh;super(c5(t,s,n,i),u5(s),l5)}setOpen=(t,n)=>{U_(this,t,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Xe(Lu,t))}}function c5(e,t,n,i=!1){const s={...oR(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e};return s.floatingRootContext=sR(t,n,i),s}function u5(e){return{popupRef:w.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const f5=sT(function(t){const{disabled:n=!1,defaultOpen:i=!1,open:s,disableHoverablePopup:l=!1,trackCursorAxis:c="none",actionsRef:u,onOpenChange:m,onOpenChangeComplete:h,handle:p,triggerId:g,defaultTriggerId:y=null,children:b}=t,S=QT((U,q)=>new a5({open:i,openProp:s,activeTriggerId:y,triggerIdProp:g},U,q));S.useControlledProp("openProp",s),S.useControlledProp("triggerIdProp",g),S.useContextCallback("onOpenChange",m),S.useContextCallback("onOpenChangeComplete",h);const k=S.useState("open"),E=!n&&k,C=S.useState("activeTriggerId"),T=S.useState("mounted"),R=S.useState("payload");S.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:l,disabled:n}),nR(S,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:N,transitionStatus:I}=rR(E,S),M=S.useState("isInstantPhase"),P=S.useState("instantType"),A=S.useState("lastOpenChangeReason"),L=w.useRef(null);ze(()=>{k&&n&&S.setOpen(!1,Xe(gT))},[k,n,S]),ze(()=>{I==="ending"&&A===On||I!=="ending"&&M?(P!=="delay"&&(L.current=P),S.set("instantType","delay")):L.current!==null&&(S.set("instantType",L.current),L.current=null)},[I,M,A,P,S]),ze(()=>{E&&C==null&&S.set("payload",void 0)},[S,C,E]),w.useImperativeHandle(u,()=>({unmount:N,close:()=>S.setOpen(!1,Xe(xT))}),[N,S]);const D=E||T||!n&&c!=="none";return d.jsxs(lT.Provider,{value:S,children:[p&&d.jsx(eR,{handle:p,store:S}),D&&d.jsx(d5,{store:S,disabled:n,trackCursorAxis:c}),typeof b=="function"?b({payload:R}):b]})});function d5({store:e,disabled:t,trackCursorAxis:n}){const i=e.useState("floatingRootContext"),s=Bh(i,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),l=V3(i,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),c=w.useMemo(()=>bi(l.reference,s.reference),[l.reference,s.reference]);return iR(e,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:s.floating??wn}),null}let ck=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const h5={"data-starting-style":""},m5={"data-ending-style":""},Fs={transitionStatus(e){return e==="starting"?h5:e==="ending"?m5:null}};(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ck.startingStyle]="startingStyle",e[e.endingStyle=ck.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({});const p5={"data-popup-open":""},g5={"data-popup-open":"","data-pressed":""},x5={"data-open":""},y5={"data-closed":""},b5={"data-anchor-hidden":""},hR={open(e){return e?p5:null}},mR={open(e){return e?g5:null}},Uu={open(e){return e?x5:y5},anchorHidden(e){return e?b5:null}},pR={...Uu,...Fs};function Or(e){return Fh(e,"base-ui")}const gR=w.createContext(void 0);function v5(){return w.useContext(gR)}const uk=600,xR="data-base-ui-tooltip-trigger";function fk(e){if("composedPath"in e){const n=e.composedPath();for(let i=0;i<n.length;i+=1){const s=n[i];if(Rt(s))return s}}const t=e.target;return Rt(t)?t:null}function w5(e){let t=e;for(;t;){const n=t.closest(`[${xR}]`);if(n)return n;const i=t.getRootNode();t="host"in i&&Rt(i.host)?i.host:null}return null}const S5=y4(function(t,n){const{render:i,className:s,style:l,handle:c,payload:u,disabled:m,delay:h,closeOnClick:p=!0,closeDelay:g,id:y,...b}=t,S=Nh(!0),E=K_(c)??S;if(!E)throw new Error(En(82));const C=Or(y),T=E.useState("isTriggerActive",C),R=E.useState("isOpenedByTrigger",C),N=E.useState("floatingRootContext"),I=w.useRef(null),M=h??uk,P=g??0,{registerTrigger:A,isMountedByThisTrigger:L}=Z_(C,I,E,{payload:u,closeOnClick:p,closeDelay:P}),D=v5(),{delayRef:U,isInstantPhase:q,hasProvider:K}=Z4(N,{open:R}),G=Eb(N);E.useSyncedValue("isInstantPhase",q);const B=E.useState("disabled"),F=m??B,V=Tn(F),Y=E.useState("trackCursorAxis"),te=E.useState("disableHoverablePopup"),O=w.useRef(!1),_=kr(),Z=w.useRef(void 0);function z(){return K?zs(U.current,"open")===0?0:h??D??uk:M}function J(ve){const Re=I.current;if(!Re||!ve)return!1;const De=w5(ve);return De!==null&&De!==Re&&$e(Re,De)}function ne(ve){const Re=J(ve);return O.current=Re,Re&&(G.openChangeTimeout.clear(),G.restTimeout.clear(),G.restTimeoutPending=!1,_.clear()),Re}const W=e5(N,{enabled:!F,mouseOnly:!0,move:!1,handleClose:!te&&Y!=="both"?s5():null,restMs:z,delay(){return g==null&&K?{close:zs(U.current,"close")}:{close:P}},triggerElementRef:I,isActiveTrigger:T,isClosing:()=>E.select("transitionStatus")==="ending",shouldOpen(){return!O.current}}),fe=W_(N,{enabled:!F}).reference,ie=ve=>{const Re=O.current,De=fk(ve),Me=ne(De),Ne=I.current,ge=Ne&&De&&$e(Ne,De);if(Me&&E.select("open")&&E.select("lastOpenChangeReason")===Lr){E.setOpen(!1,Xe(Lr,ve));return}if(Re&&!Me&&ge&&!V.current&&!E.select("open")&&Ne&&Rs(Z.current)){const we=()=>{!O.current&&!V.current&&!E.select("open")&&E.setOpen(!0,Xe(Lr,ve,Ne))},je=z();je===0?(_.clear(),we()):_.start(je,we)}},se=E.useState("triggerProps",L);return jt("button",t,{state:{open:R},ref:[n,A,I],props:[W,fe,L||Y!=="none"?se:void 0,{onMouseOver(ve){ie(ve.nativeEvent)},onFocus(ve){J(fk(ve.nativeEvent))&&ve.preventBaseUIHandler()},onMouseLeave(){O.current=!1,_.clear(),Z.current=void 0},onPointerEnter(ve){Z.current=ve.pointerType},onPointerDown(ve){Z.current=ve.pointerType,E.set("closeOnClick",p),p&&!E.select("open")&&E.cancelPendingOpen(ve.nativeEvent)},onClick(ve){p&&!E.select("open")&&E.cancelPendingOpen(ve.nativeEvent)},id:C,"data-trigger-disabled":F?"":void 0,[xR]:F?void 0:""},b],stateAttributesMapping:hR})}),yR=w.createContext(void 0);function k5(){const e=w.useContext(yR);if(e===void 0)throw new Error(En(70));return e}const E5=w.forwardRef(function(t,n){const{children:i,container:s,className:l,render:c,style:u,...m}=t,{node:h,subtree:p}=UT({container:s,ref:n,componentProps:t,elementProps:m});return!p&&!h?null:d.jsxs(w.Fragment,{children:[p,h&&Ls.createPortal(i,h)]})}),C5=w.forwardRef(function(t,n){const{keepMounted:i=!1,...s}=t;return Nh().useState("mounted")||i?d.jsx(yR.Provider,{value:i,children:d.jsx(E5,{ref:n,...s})}):null}),bR=w.createContext(void 0);function T5(){const e=w.useContext(bR);if(e===void 0)throw new Error(En(71));return e}const R5=w.createContext(void 0);function Zu(){return w.useContext(R5)?.direction??"ltr"}const j5=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:s,rects:l,platform:c,elements:u,middlewareData:m}=t,{element:h,padding:p=0,offsetParent:g="real"}=Is(e,t)||{};if(h==null)return{};const y=kT(p),b={x:n,y:i},S=db(s),k=fb(S),E=await c.getDimensions(h),C=S==="y",T=C?"top":"left",R=C?"bottom":"right",N=C?"clientHeight":"clientWidth",I=l.reference[k]+l.reference[S]-b[S]-l.floating[k],M=b[S]-l.reference[S],P=g==="real"?await c.getOffsetParent?.(h):u.floating;let A=u.floating[N]||l.floating[k];(!A||!await c.isElement?.(P))&&(A=u.floating[N]||l.floating[k]);const L=I/2-M/2,D=A/2-E[k]/2-1,U=Math.min(y[T],D),q=Math.min(y[R],D),K=U,G=A-E[k]-q,B=A/2-E[k]/2+L,F=ST(K,B,G),V=!m.arrow&&Ps(s)!=null&&B!==F&&l.reference[k]/2-(B<K?U:q)-E[k]/2<0,Y=V?B<K?B-K:B-G:0;return{[S]:b[S]+Y,data:{[S]:F,centerOffset:B-F-Y,...V&&{alignmentOffset:Y}},reset:V}}}),N5=(e,t)=>({...j5(e),options:[e,t]}),O5={name:"hide",async fn(e){const{width:t,height:n,x:i,y:s}=e.rects.reference,l=t===0&&n===0&&i===0&&s===0,c=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:c.top-n>=0||c.right-t>=0||c.bottom-n>=0||c.left-t>=0||l}}}},A5={sideX:"left",sideY:"top"},dk="--available-width",hk="--available-height";function vR(e,t,n){const i=e==="inline-start"||e==="inline-end";return{top:"top",right:i?n?"inline-start":"inline-end":"right",bottom:"bottom",left:i?n?"inline-end":"inline-start":"left"}[t]}function mk(e,t,n){const{rects:i,placement:s}=e;return{side:vR(t,yi(s),n),align:Ps(s)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function Cb(e){return M5(e,X_)}function M5(e,t){const{anchor:n,positionMethod:i="absolute",side:s="bottom",sideOffset:l=0,align:c="center",alignOffset:u=0,collisionBoundary:m,collisionPadding:h=5,sticky:p=!1,arrowPadding:g=5,disableAnchorTracking:y=!1,inline:b,keepMounted:S=!1,floatingRootContext:k,mounted:E,collisionAvoidance:C,shift:T,nodeId:R,adaptiveOrigin:N,lazyFlip:I=!1,externalTree:M}=e,[P,A]=w.useState(null);!E&&P!==null&&A(null);const L=C.side||"flip",D=C.align||"flip",U=C.fallbackAxisSide||"end",q=T?.crossAxis??!1,K=T?.rootBoundary,G=typeof n=="function"?n:void 0,B=Ae(G),F=G?B:n,V=Tn(n),Y=Tn(E),O=Zu()==="rtl",_=P||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":O?"left":"right","inline-start":O?"right":"left"}[s],Z=c==="center"?_:`${_}-${c}`;let z=h;typeof z=="number"?z={top:z,right:z,bottom:z,left:z}:z&&(z={top:z.top||0,right:z.right||0,bottom:z.bottom||0,left:z.left||0});const J=1,ne=s==="bottom"?J:0,W=s==="top"?J:0,fe=s==="right"?J:0,ie=s==="left"?J:0,se={boundary:m==="clipping-ancestors"?"clippingAncestors":m,padding:z},Se=w.useRef(null),ye=Tn(l),xe=Tn(u),ve=typeof l!="function"?l:0,Re=typeof u!="function"?u:0,De=[];b&&De.push(b),De.push(E_(tt=>{const ht=mk(tt,s,O),et=typeof ye.current=="function"?ye.current(ht):ye.current,Wt=typeof xe.current=="function"?xe.current(ht):xe.current;return{mainAxis:et,crossAxis:Wt,alignmentAxis:Wt}},[ve,Re,O,s]));const Me=D==="none"&&L!=="shift",Ne=!Me&&(p||q||L==="shift"),ge=L==="none"?null:R_({...se,padding:{top:z.top+J+ne,right:z.right+J+ie,bottom:z.bottom+J+W,left:z.left+J+fe},mainAxis:!q&&L==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:U}),we=Me?null:C_({...se,rootBoundary:K,mainAxis:D!=="none",crossAxis:Ne,limiter:p||q?void 0:T_(tt=>{if(!Se.current)return{};const{width:ht,height:et}=Se.current.getBoundingClientRect(),Wt=xi(yi(tt.placement)),Bn=Wt==="y"?ht:et,In=Wt==="y"?z.left+z.right:z.top+z.bottom;return{offset:Bn/2+In/2}})},[se,p,q,K,z,D]);L==="shift"||D==="shift"||c==="center"?De.push(we,ge):De.push(ge,we),De.push(j_({...se,apply({elements:{floating:tt},availableWidth:ht,availableHeight:et,rects:Wt}){if(!Y.current)return;const Bn=tt.style;Bn.setProperty(dk,`${ht}px`),Bn.setProperty(hk,`${et}px`);const In=gn(tt).devicePixelRatio||1,{x:rn,y:Sn,width:Ft,height:Ar}=Wt.reference,lr=(Math.round((rn+Ft)*In)-Math.round(rn*In))/In,st=(Math.round((Sn+Ar)*In)-Math.round(Sn*In))/In;Bn.setProperty("--anchor-width",`${lr}px`),Bn.setProperty("--anchor-height",`${st}px`)}}),N5(tt=>({element:Se.current||Dt(tt.elements.floating).createElement("div"),padding:g,offsetParent:"floating"}),[g]),{name:"transformOrigin",fn(tt){const{elements:ht,middlewareData:et,placement:Wt,rects:Bn,y:In}=tt,rn=yi(Wt),Sn=xi(rn),Ft=Se.current,Ar=et.arrow?.x||0,lr=et.arrow?.y||0,st=Ft?.clientWidth||0,Yt=Ft?.clientHeight||0,Vn=Ar+st/2,Dn=lr+Yt/2,gr=Math.abs(et.shift?.y||0),yn=Bn.reference.height/2,Zt=typeof l=="function"?l(mk(tt,s,O)):l,Ht=gr>Zt,nt={top:`${Vn}px calc(100% + ${Zt}px)`,bottom:`${Vn}px ${-Zt}px`,left:`calc(100% + ${Zt}px) ${Dn}px`,right:`${-Zt}px ${Dn}px`}[rn],Tr=`${Vn}px ${Bn.reference.y+yn-In}px`;return ht.floating.style.setProperty("--transform-origin",Ne&&Sn==="y"&&Ht?Tr:nt),{}}},O5,N),ze(()=>{!E&&k&&k.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[E,k]);const je=w.useMemo(()=>({elementResize:!y&&typeof ResizeObserver<"u",layoutShift:!y&&typeof IntersectionObserver<"u"}),[y]),{refs:Ve,elements:Ue,x:me,y:re,middlewareData:le,update:$,placement:Q,context:de,isPositioned:Oe,floatingStyles:_e}=t({rootContext:k,open:S?E:void 0,placement:Z,middleware:De,strategy:i,whileElementsMounted:S?void 0:(...tt)=>nk(...tt,je),nodeId:R,externalTree:M}),{sideX:Ge,sideY:dt}=le.adaptiveOrigin||A5,rt=Oe?i:"fixed",at=w.useMemo(()=>{let tt;return Oe?N?tt={position:rt,[Ge]:me,[dt]:re}:tt={..._e,position:rt}:tt={position:rt,top:0,left:0},tt[dk]="100vw",tt[hk]="100vh",Oe||(tt.opacity=0),tt},[N,rt,Ge,me,dt,re,_e,Oe]),Nt=w.useRef(null);ze(()=>{if(!E)return;const tt=V.current,ht=typeof tt=="function"?tt():tt,Wt=(pk(ht)?ht.current:ht)||null||null;Wt!==Nt.current&&(Ve.setPositionReference(Wt),Nt.current=Wt)},[E,Ve,F,V]),w.useEffect(()=>{if(!E)return;const tt=V.current;typeof tt!="function"&&pk(tt)&&tt.current!==Nt.current&&(Ve.setPositionReference(tt.current),Nt.current=tt.current)},[E,Ve,F,V]),w.useEffect(()=>{if(S&&E&&Ue.reference&&Ue.floating)return nk(Ue.reference,Ue.floating,$,je)},[S,E,Ue,$,je]);const Je=yi(Q),Pt=vR(s,Je,O),Fe=Ps(Q)||"center",pt=!!le.hide?.referenceHidden;ze(()=>{I&&E&&Oe&&Je!==_&&A(Je)},[I,E,Oe,Je,_]);const Et=w.useMemo(()=>({position:"absolute",top:le.arrow?.y,left:le.arrow?.x}),[le.arrow]),St=le.arrow?.centerOffset!==0;return w.useMemo(()=>({positionerStyles:at,arrowStyles:Et,arrowRef:Se,arrowUncentered:St,side:Pt,align:Fe,physicalSide:Je,anchorHidden:pt,refs:Ve,context:de,isPositioned:Oe,update:$}),[at,Et,Se,St,Pt,Fe,Je,pt,Ve,de,Oe,$])}function pk(e){return e!=null&&"current"in e}function Kh(e){return e==="starting"?A3:wn}function Tb(e,t,{styles:n,transitionStatus:i,props:s,refs:l,hidden:c,inert:u=!1}){const m={...n};return u&&(m.pointerEvents="none"),jt("div",e,{state:t,ref:l,props:[{role:"presentation",hidden:c,style:m},Kh(i),s],stateAttributesMapping:Uu})}const z5=w.forwardRef(function(t,n){const{render:i,className:s,anchor:l,positionMethod:c="absolute",side:u="top",align:m="center",sideOffset:h=0,alignOffset:p=0,collisionBoundary:g="clipping-ancestors",collisionPadding:y=5,arrowPadding:b=5,sticky:S=!1,disableAnchorTracking:k=!1,collisionAvoidance:E=z3,style:C,...T}=t,R=Nh(),N=k5(),I=R.useState("open"),M=R.useState("mounted"),P=R.useState("trackCursorAxis"),A=R.useState("disableHoverablePopup"),L=R.useState("floatingRootContext"),D=R.useState("instantType"),U=R.useState("transitionStatus"),q=R.useState("adaptiveOrigin"),K=Cb({anchor:l,positionMethod:c,floatingRootContext:L,mounted:M,side:u,sideOffset:h,align:m,alignOffset:p,collisionBoundary:g,collisionPadding:y,sticky:S,arrowPadding:b,disableAnchorTracking:k,keepMounted:N,collisionAvoidance:E,adaptiveOrigin:q}),G=w.useMemo(()=>({open:I,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:P!=="none"?"tracking-cursor":D}),[I,K.side,K.align,K.anchorHidden,P,D]),B=Tb(t,G,{styles:K.positionerStyles,transitionStatus:U,props:T,refs:[n,R.useStateSetter("positionerElement")],hidden:!M,inert:!I||P==="both"||A});return d.jsx(bR.Provider,{value:K,children:B})}),I5=w.forwardRef(function(t,n){const{render:i,className:s,style:l,...c}=t,u=Nh(),{side:m,align:h}=T5(),p=u.useState("open"),g=u.useState("instantType"),y=u.useState("transitionStatus"),b=u.useState("popupProps"),S=u.useState("floatingRootContext"),k=u.useState("disabled"),E=u.useState("closeDelay");Zi({open:p,ref:u.context.popupRef,onComplete(){p&&u.context.onOpenChangeComplete?.(!0)}}),$_(S,{enabled:!k,closeDelay:E});const C=u.useStateSetter("popupElement");return jt("div",t,{state:{open:p,side:m,align:h,instant:g,transitionStatus:y},ref:[n,u.context.popupRef,C],props:[qh,b,Kh(y),c],stateAttributesMapping:pR})}),D5=function(t){const{delay:n,closeDelay:i,timeout:s=400}=t,l=w.useMemo(()=>({open:n,close:i}),[n,i]);return d.jsx(gR.Provider,{value:n,children:d.jsx(U4,{delay:l,timeoutMs:s,children:t.children})})};function Xh(e){return mb(19)?e:e?"true":void 0}function _5(e){const[t,n]=w.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function wR(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=wR(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function SR(){for(var e,t,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=wR(e))&&(i&&(i+=" "),i+=t);return i}const P5=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},L5=(e,t)=>({classGroupId:e,validator:t}),kR=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ch="-",gk=[],F5="arbitrary..",H5=e=>{const t=V5(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return B5(c);const u=c.split(ch),m=u[0]===""&&u.length>1?1:0;return ER(u,m,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const m=i[c],h=n[c];return m?h?P5(h,m):m:h||gk}return n[c]||gk}}},ER=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],l=n.nextPart.get(s);if(l){const h=ER(e,t+1,l);if(h)return h}const c=n.validators;if(c===null)return;const u=t===0?e.join(ch):e.slice(t).join(ch),m=c.length;for(let h=0;h<m;h++){const p=c[h];if(p.validator(u))return p.classGroupId}},B5=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?F5+i:void 0})(),V5=e=>{const{theme:t,classGroups:n}=e;return U5(n,t)},U5=(e,t)=>{const n=kR();for(const i in e){const s=e[i];Rb(s,n,i,t)}return n},Rb=(e,t,n,i)=>{const s=e.length;for(let l=0;l<s;l++){const c=e[l];Z5(c,t,n,i)}},Z5=(e,t,n,i)=>{if(typeof e=="string"){q5(e,t,n);return}if(typeof e=="function"){G5(e,t,n,i);return}Y5(e,t,n,i)},q5=(e,t,n)=>{const i=e===""?t:CR(t,e);i.classGroupId=n},G5=(e,t,n,i)=>{if(K5(e)){Rb(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(L5(n,e))},Y5=(e,t,n,i)=>{const s=Object.entries(e),l=s.length;for(let c=0;c<l;c++){const[u,m]=s[c];Rb(m,CR(t,u),n,i)}},CR=(e,t)=>{let n=e;const i=t.split(ch),s=i.length;for(let l=0;l<s;l++){const c=i[l];let u=n.nextPart.get(c);u||(u=kR(),n.nextPart.set(c,u)),n=u}return n},K5=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,X5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const s=(l,c)=>{n[l]=c,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=i[l])!==void 0)return s(l,c),c},set(l,c){l in n?n[l]=c:s(l,c)}}},dy="!",xk=":",J5=[],yk=(e,t,n,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:s}),W5=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=s=>{const l=[];let c=0,u=0,m=0,h;const p=s.length;for(let k=0;k<p;k++){const E=s[k];if(c===0&&u===0){if(E===xk){l.push(s.slice(m,k)),m=k+1;continue}if(E==="/"){h=k;continue}}E==="["?c++:E==="]"?c--:E==="("?u++:E===")"&&u--}const g=l.length===0?s:s.slice(m);let y=g,b=!1;g.endsWith(dy)?(y=g.slice(0,-1),b=!0):g.startsWith(dy)&&(y=g.slice(1),b=!0);const S=h&&h>m?h-m:void 0;return yk(l,b,y,S)};if(t){const s=t+xk,l=i;i=c=>c.startsWith(s)?l(c.slice(s.length)):yk(J5,!1,c,void 0,!0)}if(n){const s=i;i=l=>n({className:l,parseClassName:s})}return i},$5=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let s=[];for(let l=0;l<n.length;l++){const c=n[l],u=c[0]==="[",m=t.has(c);u||m?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(c)):s.push(c)}return s.length>0&&(s.sort(),i.push(...s)),i}},Q5=e=>({cache:X5(e.cacheSize),parseClassName:W5(e),sortModifiers:$5(e),postfixLookupClassGroupIds:eP(e),...H5(e)}),eP=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let i=0;i<n.length;i++)t[n[i]]=!0;return t},tP=/\s+/,nP=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l,postfixLookupClassGroupIds:c}=t,u=[],m=e.trim().split(tP);let h="";for(let p=m.length-1;p>=0;p-=1){const g=m[p],{isExternal:y,modifiers:b,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:E}=n(g);if(y){h=g+(h.length>0?" "+h:h);continue}let C=!!E,T;if(C){const P=k.substring(0,E);T=i(P);const A=T&&c[T]?i(k):void 0;A&&A!==T&&(T=A,C=!1)}else T=i(k);if(!T){if(!C){h=g+(h.length>0?" "+h:h);continue}if(T=i(k),!T){h=g+(h.length>0?" "+h:h);continue}C=!1}const R=b.length===0?"":b.length===1?b[0]:l(b).join(":"),N=S?R+dy:R,I=N+T;if(u.indexOf(I)>-1)continue;u.push(I);const M=s(T,C);for(let P=0;P<M.length;++P){const A=M[P];u.push(N+A)}h=g+(h.length>0?" "+h:h)}return h},rP=(...e)=>{let t=0,n,i,s="";for(;t<e.length;)(n=e[t++])&&(i=TR(n))&&(s&&(s+=" "),s+=i);return s},TR=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=TR(e[i]))&&(n&&(n+=" "),n+=t);return n},iP=(e,...t)=>{let n,i,s,l;const c=m=>{const h=t.reduce((p,g)=>g(p),e());return n=Q5(h),i=n.cache.get,s=n.cache.set,l=u,u(m)},u=m=>{const h=i(m);if(h)return h;const p=nP(m,n);return s(m,p),p};return l=c,(...m)=>l(rP(...m))},oP=[],tr=e=>{const t=n=>n[e]||oP;return t.isThemeGetter=!0,t},RR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sP=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aP=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bs=e=>sP.test(e),Tt=e=>!!e&&!Number.isNaN(Number(e)),$i=e=>!!e&&Number.isInteger(Number(e)),ox=e=>e.endsWith("%")&&Tt(e.slice(0,-1)),jo=e=>lP.test(e),NR=()=>!0,dP=e=>aP.test(e)&&!cP.test(e),jb=()=>!1,hP=e=>uP.test(e),mP=e=>fP.test(e),pP=e=>!Ye(e)&&!Ke(e),gP=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),xP=e=>Hs(e,MR,jb),Ye=e=>RR.test(e),hl=e=>Hs(e,zR,dP),bk=e=>Hs(e,CP,Tt),yP=e=>Hs(e,DR,NR),bP=e=>Hs(e,IR,jb),vk=e=>Hs(e,OR,jb),vP=e=>Hs(e,AR,mP),Sd=e=>Hs(e,_R,hP),Ke=e=>jR.test(e),Wc=e=>Ml(e,zR),wP=e=>Ml(e,IR),wk=e=>Ml(e,OR),SP=e=>Ml(e,MR),kP=e=>Ml(e,AR),kd=e=>Ml(e,_R,!0),EP=e=>Ml(e,DR,!0),Hs=(e,t,n)=>{const i=RR.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Ml=(e,t,n=!1)=>{const i=jR.exec(e);return i?i[1]?t(i[1]):n:!1},OR=e=>e==="position"||e==="percentage",AR=e=>e==="image"||e==="url",MR=e=>e==="length"||e==="size"||e==="bg-size",zR=e=>e==="length",CP=e=>e==="number",IR=e=>e==="family-name",DR=e=>e==="number"||e==="weight",_R=e=>e==="shadow",TP=()=>{const e=tr("color"),t=tr("font"),n=tr("text"),i=tr("font-weight"),s=tr("tracking"),l=tr("leading"),c=tr("breakpoint"),u=tr("container"),m=tr("spacing"),h=tr("radius"),p=tr("shadow"),g=tr("inset-shadow"),y=tr("text-shadow"),b=tr("drop-shadow"),S=tr("blur"),k=tr("perspective"),E=tr("aspect"),C=tr("ease"),T=tr("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...N(),Ke,Ye],M=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],A=()=>[Ke,Ye,m],L=()=>[bs,"full","auto",...A()],D=()=>[$i,"none","subgrid",Ke,Ye],U=()=>["auto",{span:["full",$i,Ke,Ye]},$i,Ke,Ye],q=()=>[$i,"auto",Ke,Ye],K=()=>["auto","min","max","fr",Ke,Ye],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...A()],V=()=>[bs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],Y=()=>[bs,"screen","full","dvw","lvw","svw","min","max","fit",...A()],te=()=>[bs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...A()],O=()=>[e,Ke,Ye],_=()=>[...N(),wk,vk,{position:[Ke,Ye]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",SP,xP,{size:[Ke,Ye]}],J=()=>[ox,Wc,hl],ne=()=>["","none","full",h,Ke,Ye],W=()=>["",Tt,Wc,hl],fe=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Tt,ox,wk,vk],Se=()=>["","none",S,Ke,Ye],ye=()=>["none",Tt,Ke,Ye],xe=()=>["none",Tt,Ke,Ye],ve=()=>[Tt,Ke,Ye],Re=()=>[bs,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[jo],breakpoint:[jo],color:[NR],container:[jo],"drop-shadow":[jo],ease:["in","out","in-out"],font:[pP],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[jo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[jo],shadow:[jo],spacing:["px",Tt],text:[jo],"text-shadow":[jo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bs,Ye,Ke,E]}],container:["container"],"container-type":[{"@container":["","normal","size",Ke,Ye]}],"container-named":[gP],columns:[{columns:[Tt,Ye,Ke,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{"inset-s":L(),start:L()}],end:[{"inset-e":L(),end:L()}],"inset-bs":[{"inset-bs":L()}],"inset-be":[{"inset-be":L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[$i,"auto",Ke,Ye]}],basis:[{basis:[bs,"full","auto",u,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Tt,bs,"auto","initial","none",Ye]}],grow:[{grow:["",Tt,Ke,Ye]}],shrink:[{shrink:["",Tt,Ke,Ye]}],order:[{order:[$i,"first","last","none",Ke,Ye]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pbs:[{pbs:A()}],pbe:[{pbe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[u,"screen",...V()]}],"min-w":[{"min-w":[u,"screen","none",...V()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",n,Wc,hl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,EP,yP]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ox,Ye]}],"font-family":[{font:[wP,bP,t]}],"font-features":[{"font-features":[Ye]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Ke,Ye]}],"line-clamp":[{"line-clamp":[Tt,"none",Ke,bk]}],leading:[{leading:[l,...A()]}],"list-image":[{"list-image":["none",Ke,Ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ke,Ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Tt,"from-font","auto",Ke,hl]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Tt,"auto",Ke,Ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"tab-size":[{tab:[$i,Ke,Ye]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ke,Ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ke,Ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$i,Ke,Ye],radial:["",Ke,Ye],conic:[$i,Ke,Ye]},kP,vP]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Tt,Ke,Ye]}],"outline-w":[{outline:["",Tt,Wc,hl]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",p,kd,Sd]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",g,kd,Sd]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Tt,hl]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",y,kd,Sd]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Tt,Ke,Ye]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Ke,Ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[Tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ke,Ye]}],filter:[{filter:["","none",Ke,Ye]}],blur:[{blur:Se()}],brightness:[{brightness:[Tt,Ke,Ye]}],contrast:[{contrast:[Tt,Ke,Ye]}],"drop-shadow":[{"drop-shadow":["","none",b,kd,Sd]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Tt,Ke,Ye]}],"hue-rotate":[{"hue-rotate":[Tt,Ke,Ye]}],invert:[{invert:["",Tt,Ke,Ye]}],saturate:[{saturate:[Tt,Ke,Ye]}],sepia:[{sepia:["",Tt,Ke,Ye]}],"backdrop-filter":[{"backdrop-filter":["","none",Ke,Ye]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Tt,Ke,Ye]}],"backdrop-contrast":[{"backdrop-contrast":[Tt,Ke,Ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Tt,Ke,Ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Tt,Ke,Ye]}],"backdrop-invert":[{"backdrop-invert":["",Tt,Ke,Ye]}],"backdrop-opacity":[{"backdrop-opacity":[Tt,Ke,Ye]}],"backdrop-saturate":[{"backdrop-saturate":[Tt,Ke,Ye]}],"backdrop-sepia":[{"backdrop-sepia":["",Tt,Ke,Ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ke,Ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Tt,"initial",Ke,Ye]}],ease:[{ease:["linear","initial",C,Ke,Ye]}],delay:[{delay:[Tt,Ke,Ye]}],animate:[{animate:["none",T,Ke,Ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Ke,Ye]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Ke,Ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Re()}],"translate-x":[{"translate-x":Re()}],"translate-y":[{"translate-y":Re()}],"translate-z":[{"translate-z":Re()}],"translate-none":["translate-none"],zoom:[{zoom:[$i,Ke,Ye]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ke,Ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mbs":[{"scroll-mbs":A()}],"scroll-mbe":[{"scroll-mbe":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pbs":[{"scroll-pbs":A()}],"scroll-pbe":[{"scroll-pbe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ke,Ye]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Tt,Wc,hl,bk]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},RP=iP(TP);function Te(...e){return RP(SR(e))}function jP({delay:e=350,closeDelay:t=0,...n}){return d.jsx(D5,{delay:e,closeDelay:t,...n})}function Ln({label:e,children:t,side:n="top",className:i}){return d.jsxs(f5,{children:[d.jsx(S5,{render:t}),d.jsx(C5,{children:d.jsx(z5,{side:n,sideOffset:6,className:"z-50",children:d.jsx(I5,{className:Te("max-w-64 rounded-md bg-foreground px-2 py-1 text-xs font-medium text-background shadow-md","transition-[opacity,transform] duration-100","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0",i),children:e})})})]})}const NP=600,OP=5e3;function AP(e){return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}function MP(e,t){return w.useSyncExternalStore(AP,()=>(e.current?.scrollTop??0)>t,()=>!1)}function zP({target:e}){if(!MP(e,NP))return null;function n(){const i=e.current;if(!i)return;const s=window.matchMedia("(prefers-reduced-motion: reduce)").matches;i.scrollTo({top:0,behavior:s||i.scrollTop>OP?"auto":"smooth"}),i.focus({preventScroll:!0})}return d.jsx(Ln,{label:"Back to top",side:"left",children:d.jsx("button",{type:"button",onClick:n,"aria-label":"Back to top",className:Te("fixed bottom-6 right-6 z-30 flex size-10 items-center justify-center rounded-full","border border-border bg-card text-muted-foreground shadow-lg","transition-colors hover:bg-muted hover:text-foreground","motion-safe:animate-[rise-in_120ms_ease-out]"),children:d.jsx(GC,{className:"size-5"})})})}function Jh(){return typeof navigator>"u"?"other":/mac/i.test(navigator.userAgent)?"mac":"other"}const PR=["mod","meta","ctrl","alt","shift"];function IP(e){return PR.includes(e)}function Wh(e){const t=e.trim().toLowerCase().split("+").filter(s=>s.length>0),n=t.filter(s=>!IP(s)).at(-1)??"";return[...PR.filter(s=>t.includes(s)),n].join("+")}function LR(e){return e.trim().split(/\s+/).filter(t=>t.length>0).map(Wh)}function DP(e){return e.length>1||/^[a-z0-9]$/.test(e)}function _P(e,t=Jh()){const n=e.key.toLowerCase();if(n==="meta"||n==="control"||n==="alt"||n==="shift")return null;const i=[];return e.metaKey&&i.push(t==="mac"?"mod":"meta"),e.ctrlKey&&i.push(t==="mac"?"ctrl":"mod"),e.altKey&&i.push("alt"),e.shiftKey&&DP(n)&&i.push("shift"),i.push(n),Wh(i.join("+"))}const PP={mod:"⌘",meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧"},LP={mod:"Ctrl",ctrl:"Ctrl",alt:"Alt",shift:"Shift",meta:"Win"},FP={arrowleft:"←",arrowright:"→",arrowup:"↑",arrowdown:"↓",enter:"↵",escape:"Esc",backspace:"⌫"," ":"Space","":""};function Sk(e){return FP[e]??(e.length===1?e.toUpperCase():e.replace(/^./,t=>t.toUpperCase()))}function Ta(e,t=Jh()){const n=Wh(e).split("+"),i=n.at(-1)??"",s=n.slice(0,-1);return t==="mac"?s.map(l=>PP[l]??"").join("")+Sk(i):[...s.map(l=>LP[l]??l),Sk(i)].join("+")}function HP(e,t=Jh()){return LR(e).map(n=>Ta(n,t))}const BP=new Set(["arrowleft","arrowright","arrowup","arrowdown","home","end","pageup","pagedown","backspace","delete"]),VP=new Set(["a","c","v","x","z","y"]),UP=new Set(["a","b","d","e","f","h","k","n","o","p","t","v","w","y"]);function ZP(e,t=Jh()){const n=Wh(e).split("+"),i=n.at(-1)??"",s=new Set(n.slice(0,-1));return!!(BP.has(i)||s.has("mod")&&VP.has(i)||t==="mac"&&s.has("ctrl")&&UP.has(i))}function yl({binding:e,className:t}){return d.jsx("span",{className:"inline-flex items-center gap-1","aria-hidden":!0,children:HP(e).map((n,i)=>d.jsx("kbd",{className:Te("inline-flex h-5 min-w-5 items-center justify-center rounded border border-border","bg-muted px-1.5 font-sans text-[0.6875rem] font-medium leading-none text-muted-foreground",t),children:n},i))})}const kk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ek=SR,FR=(e,t)=>n=>{var i;if(t?.variants==null)return Ek(e,n?.class,n?.className);const{variants:s,defaultVariants:l}=t,c=Object.keys(s).map(h=>{const p=n?.[h],g=l?.[h];if(p===null)return null;const y=kk(p)||kk(g);return s[h][y]}),u=n&&Object.entries(n).reduce((h,p)=>{let[g,y]=p;return y===void 0||(h[g]=y),h},{}),m=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((h,p)=>{let{class:g,className:y,...b}=p;return Object.entries(b).every(S=>{let[k,E]=S;return Array.isArray(E)?E.includes({...l,...u}[k]):{...l,...u}[k]===E})?[...h,g,y]:h},[]);return Ek(e,c,m,n?.class,n?.className)},qP=FR("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-border bg-transparent hover:bg-muted",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-muted hover:text-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-6",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ze({className:e,variant:t,size:n,type:i="button",...s}){return d.jsx("button",{type:i,className:Te(qP({variant:t,size:n}),e),...s})}function GP(){const[e,t]=w.useState({state:"idle"});return w.useEffect(()=>(_t.updates.getStatus().then(t),_t.updates.subscribe(t)),[]),e.state==="ready"?d.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2.5 text-sm",children:[d.jsx(xu,{className:"size-4 shrink-0 text-primary"}),d.jsxs("p",{className:"flex-1",children:["Version ",d.jsx("span",{className:"font-medium",children:e.version})," is ready to install."]}),d.jsxs(Ze,{size:"sm",onClick:()=>{_t.updates.installNow()},children:[d.jsx(_D,{}),"Restart now"]})]}):e.state==="downloading"?d.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-muted/50 px-4 py-2.5 text-sm text-muted-foreground",children:[d.jsx(xu,{className:"size-4 shrink-0 animate-pulse"}),d.jsxs("p",{className:"flex-1",children:["Downloading update… ",e.percent,"%"]})]}):null}function wt({className:e,...t}){return d.jsx("div",{className:Te("rounded-lg border border-border bg-card text-card-foreground",e),...t})}function An(e){window.location.hash=NC(e)}function Cu(e){window.history.replaceState(null,"",NC(e)),window.dispatchEvent(new HashChangeEvent("hashchange"))}function YP(){window.history.back()}function KP(e){return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)}function HR(){const e=w.useSyncExternalStore(KP,()=>window.location.hash,()=>"");return UM(e)}function XP(){function e(){An({name:"agent"})}return d.jsxs(wt,{role:"button",tabIndex:0,"data-nav-item":!0,onClick:e,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),e())},className:"flex cursor-pointer items-center gap-3 p-4 transition-colors hover:border-foreground/20",children:[d.jsx(jh,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("p",{className:"text-sm font-medium",children:"Agent access"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"One sentence to paste into an agent, so it can manage these repositories over MCP"})]}),d.jsx(_o,{className:"size-4 shrink-0 text-muted-foreground"})]})}function Xn({text:e}){if(!e.includes("/"))return d.jsx(d.Fragment,{children:e});const t=e.split("/");return d.jsx(d.Fragment,{children:t.map((n,i)=>d.jsxs(w.Fragment,{children:[n,i<t.length-1&&d.jsxs(d.Fragment,{children:["/",d.jsx("wbr",{})]})]},i))})}function $h({label:e,text:t,source:n,className:i,children:s}){const[l,c]=w.useState("idle");async function u(){try{await navigator.clipboard.writeText(t),c("copied"),setTimeout(()=>c("idle"),1800)}catch{const p=n.current;if(p){const g=document.createRange();g.selectNodeContents(p),window.getSelection()?.removeAllRanges(),window.getSelection()?.addRange(g)}c("select")}}const m=l==="copied"?"Copied":l==="select"?"Selected — press copy":null;if(s!==void 0)return d.jsxs(Ze,{onClick:()=>{u()},className:i,children:[l==="copied"?d.jsx(Li,{}):d.jsx(Xd,{}),m??s]});const h=l==="copied"?d.jsx(Li,{className:"text-success"}):d.jsx(Xd,{});return d.jsx(Ln,{label:m??e,children:d.jsx(Ze,{variant:"ghost",size:"icon",onClick:()=>{u()},"aria-label":e,className:i,children:h})})}function yt({className:e,...t}){return d.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}function Do({controlled:e,default:t,name:n,state:i="value"}){const{current:s}=w.useRef(e!==void 0),[l,c]=w.useState(t),u=s?e:l,m=w.useCallback(h=>{s||c(h)},[]);return[u,m]}const BR=w.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function JP(){return w.useContext(BR)}function Qh(e){const{children:t,elementsRef:n,labelsRef:i,onMapChange:s}=e,l=Ae(s),[,c]=w.useState(!1),u=Jn($P).current,m=Jn(WP).current,h=w.useRef(0),p=w.useRef(!0),g=w.useRef([]),y=w.useRef(null),b=Ae(()=>{p.current||(p.current=!0,c(I=>!I))}),S=Ae((I,M)=>{m.set(I,M),b()}),k=Ae(I=>{m.delete(I),b()}),E=Ae(I=>{const M=new Map;return n.current.length=0,i&&(i.current.length=0),I.forEach(P=>{M.set(P.element,{...P.registration.metadata??{},index:P.index}),n.current[P.index]=P.element,i&&(i.current[P.index]=P.registration.label!==void 0?P.registration.label:P.registration.textRef?.current?.textContent??P.element.textContent)}),h.current=n.current.length,M});function C(I){if(y.current?.disconnect(),y.current=null,typeof MutationObserver!="function"||I.length<2)return;const M=new MutationObserver(A=>{if(!tL(A))return;let L=null;for(const D of I)if(D.isConnected){if(L&&VR(L,D)>0){M.disconnect(),b();return}L=D}});y.current=M;const P=new Set;for(let A=1;A<I.length;A+=1){const L=eL(I[A-1],I[A]);L&&P.add(L)}P.forEach(A=>M.observe(A,{childList:!0}))}const T=Ae(()=>{const[I,M]=QP(m),P=E(I);C(M),g.current=I,p.current=!1,u.forEach(A=>A(P)),l(P)});ze(()=>(p.current||E(g.current),()=>{n.current=[],i&&(i.current=[])}),[n,i,E]),ze(()=>{p.current&&T()}),ze(()=>()=>{y.current?.disconnect(),p.current=!0},[]);const R=Ae(I=>(u.add(I),()=>{u.delete(I)})),N=w.useMemo(()=>({register:S,unregister:k,subscribeMapChange:R,nextIndexRef:h}),[S,k,R,h]);return d.jsx(BR.Provider,{value:N,children:t})}function WP(){return new Map}function $P(){return new Set}function QP(e){const t=new Set,n=[],i=[];e.forEach((l,c)=>{if(!c.isConnected)return;const u=l.index,m={index:u??-1,element:c,registration:l};u===null?i.push(m):u>=0&&(t.add(u),n.push(m))});let s=0;return i.sort((l,c)=>VR(l.element,c.element)),i.forEach(l=>{for(;t.has(s);)s+=1;l.index=s,n.push(l),s+=1}),t.size>0&&n.sort((l,c)=>l.index-c.index),[n,i.map(l=>l.element)]}function eL(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function tL(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function VR(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const UR=w.createContext(void 0);function Nb(){const e=w.useContext(UR);if(e===void 0)throw new Error(En(64));return e}const em={tabActivationDirection:e=>({"data-activation-direction":e})},nL=w.forwardRef(function(t,n){const{className:i,defaultValue:s=0,onValueChange:l,orientation:c="horizontal",render:u,value:m,style:h,...p}=t,g=t.defaultValue!==void 0,y=w.useRef([]),[b,S]=w.useState(()=>new Map),[k,E]=Do({controlled:m,default:s,name:"Tabs",state:"value"}),C=m!==void 0,[T,R]=w.useState(()=>new Map),N=w.useRef(void 0),I=w.useCallback(ie=>hy(T,ie),[T]),[M,P]=w.useState(()=>({previousValue:k,tabActivationDirection:"none"})),{previousValue:A,tabActivationDirection:L}=M;let D=L,U=!1;A!==k&&(D=Ck(A,k,c,T),U=A!=null&&k!=null&&I(k)==null);const q=U?A:k,K=A!==q||L!==D;ze(()=>{K&&P({previousValue:q,tabActivationDirection:D})},[q,K,D]);const G=Ae((ie,se)=>{const Se=Ck(k,ie,c,T);se.activationDirection=Se,l?.(ie,se),!se.isCanceled&&E(ie)}),B=Ae((ie,se)=>{l?.(ie,Xe(se,void 0,void 0,{activationDirection:"none"}))}),F=Ae((ie,se)=>(S(Se=>{const ye=new Map(Se);return ye.set(ie,se),ye}),()=>{S(Se=>{if(Se.get(ie)!==se)return Se;const ye=new Map(Se);return ye.delete(ie),ye})})),V=w.useCallback(ie=>b.get(ie),[b]),Y=w.useCallback(ie=>{for(const se of T.values())if(ie===se.value)return se.id},[T]),te=w.useMemo(()=>({getTabElementBySelectedValue:I,getTabIdByPanelValue:Y,getTabPanelIdByValue:V,onValueChange:G,orientation:c,registerMountedTabPanel:F,setTabMap:R,tabActivationDirection:D,value:k}),[I,Y,V,G,c,F,R,D,k]),O=w.useMemo(()=>{for(const ie of T.values())if(ie.value===k)return ie},[T,k]),_=w.useMemo(()=>{for(const ie of T.values())if(!ie.disabled)return ie.value},[T]),Z=w.useRef(!g),z=w.useRef(s),J=w.useRef(g),ne=w.useRef(!1);ze(()=>{if(C)return;function ie(xe,ve){E(xe),P({previousValue:xe,tabActivationDirection:"none"}),B(xe,ve),Z.current=!1}if(T.size===0){ne.current&&k!==null&&!N.current?.isConnected&&ie(null,IS);return}ne.current=!0,N.current=T.keys().next().value;const se=O?.disabled,Se=O==null&&k!==null;if(!se&&k===z.current&&(J.current=!1),J.current&&se&&k===z.current)return;const ye=Z.current;if(se||Se){const xe=_??null;if(k===xe){Z.current=!1;return}let ve=IS;ye?ve=DS:se&&(ve=gT),ie(xe,ve);return}ye&&O!=null&&(B(k,DS),Z.current=!1)},[_,C,B,O,E,T,k]);const fe=jt("div",t,{state:{orientation:c,tabActivationDirection:D},ref:n,props:p,stateAttributesMapping:em});return d.jsx(UR.Provider,{value:te,children:d.jsx(Qh,{elementsRef:y,children:fe})})});function hy(e,t){for(const[n,i]of e.entries())if(t===i.value)return n;return null}function Ck(e,t,n,i){if(e==null||t==null)return"none";const[s,l,c]=n==="horizontal"?["left","left","right"]:["top","up","down"],u=hy(i,e),m=hy(i,t);if(u==null||m==null)return u!==m&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?c:l:"none";const h=u.getBoundingClientRect()[s],p=m.getBoundingClientRect()[s];return p<h?l:p>h?c:"none"}const ZR=w.createContext(void 0);function Ob(e=!1){const t=w.useContext(ZR);if(t===void 0&&!e)throw new Error(En(16));return t}function rL(e){const{focusableWhenDisabled:t,disabled:n,composite:i=!1,tabIndex:s=0,isNativeButton:l}=e,c=i&&t!==!1,u=i&&t===!1;return{props:w.useMemo(()=>{const h={onKeyDown(p){n&&t&&p.key!=="Tab"&&p.preventDefault()}};return i||(h.tabIndex=s,!l&&n&&(h.tabIndex=t?s:-1)),(l&&(t||c)||!l&&n)&&(h["aria-disabled"]=n),l&&(!t||u)&&(h.disabled=n),h},[i,n,t,c,u,l,s])}}function fu(e,t,{detail:n=0}={}){e.dispatchEvent(new(gn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Fo(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:i=0,native:s=!0,composite:l}=e,c=w.useRef(null),u=Ob(!0),m=l??u!==void 0,{props:h}=rL({focusableWhenDisabled:n,disabled:t,composite:m,tabIndex:i,isNativeButton:s}),p=w.useCallback(()=>{const b=c.current;sx(b)&&m&&t&&h.disabled===void 0&&b.disabled&&(b.disabled=!1)},[t,h.disabled,m]);ze(p,[p]);const g=w.useCallback((b={})=>{const{onClick:S,onMouseDown:k,onKeyUp:E,onKeyDown:C,onPointerDown:T,...R}=b;return bi({onClick(N){if(t){N.preventDefault();return}S?.(N)},onMouseDown(N){t||k?.(N)},onKeyDown(N){if(t||(oh(N),C?.(N),N.baseUIHandlerPrevented))return;const I=N.target===N.currentTarget,M=N.currentTarget,P=sx(M),A=!s&&iL(M),L=I&&(s?P:!A),D=N.key==="Enter",U=N.key===" ",q=M.getAttribute("role"),K=q?.startsWith("menuitem")||q==="option"||q==="gridcell";if(I&&m&&U){if(N.defaultPrevented&&K)return;N.preventDefault(),(!s||P)&&(N.preventBaseUIHandler(),fu(M,N));return}if(!L||s||!U&&!D){I&&A&&U&&N.preventDefault();return}N.defaultPrevented||(N.preventDefault(),D&&(N.preventBaseUIHandler(),fu(M,N)))},onKeyUp(N){if(!t){if(oh(N),E?.(N),N.target===N.currentTarget&&s&&m&&sx(N.currentTarget)&&N.key===" "){N.preventDefault();return}N.baseUIHandlerPrevented||N.target===N.currentTarget&&!s&&!m&&!N.defaultPrevented&&N.key===" "&&(N.preventBaseUIHandler(),fu(N.currentTarget,N))}},onPointerDown(N){if(t){N.preventDefault();return}T?.(N)}},s?{type:"button"}:{role:"button"},h,R)},[t,h,m,s]),y=Ae(b=>{c.current=b,p()});return{getButtonProps:g,buttonRef:y}}function sx(e){return en(e)&&e.tagName==="BUTTON"}function iL(e){return en(e)&&e.tagName==="A"&&!!e.href}const qR="data-composite-item-active";function tm(e={}){const{guess:t,label:n,metadata:i,textRef:s,index:l}=e,{register:c,unregister:u,subscribeMapChange:m,nextIndexRef:h}=JP(),p=w.useRef(-1),[g,y]=w.useState(l==null&&t?()=>{if(p.current===-1){const E=h.current;h.current+=1,p.current=E}return p.current}:-1),b=l??g,S=w.useRef(null),k=w.useCallback(E=>{const C=S.current;C&&u(C),S.current=E,E&&c(E,{metadata:i??null,index:l??null,label:n,textRef:s})},[l,c,u,i,n,s]);return ze(()=>{if(l==null)return m(E=>{const C=S.current?E.get(S.current)?.index:null;C!=null&&y(C)})},[l,m]),{ref:k,index:b}}function oL(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:i}=Ob(),{ref:s,index:l}=tm(e),c=n===l,u=w.useRef(null),m=Ui(s,u);return{compositeProps:{tabIndex:c?0:-1,onFocus(){i(l)},onMouseMove(){const p=u.current;if(!t||!p)return;const g=p.hasAttribute("disabled")||p.ariaDisabled==="true";!c&&!g&&p.focus()}},compositeRef:m,index:l}}const GR=w.createContext(void 0);function sL(){const e=w.useContext(GR);if(e===void 0)throw new Error(En(65));return e}const lL=w.forwardRef(function(t,n){const{className:i,disabled:s=!1,render:l,value:c,id:u,nativeButton:m=!0,style:h,...p}=t,{value:g,getTabPanelIdByValue:y,onValueChange:b,orientation:S,tabActivationDirection:k}=Nb(),{activateOnFocus:E,registerTabResizeObserverElement:C,tabsListElement:T}=sL(),{highlightedIndex:R,onHighlightedIndexChange:N}=Ob(),I=Or(u),M=w.useMemo(()=>({disabled:s,id:I,value:c}),[s,I,c]),{compositeProps:P,compositeRef:A,index:L}=oL({metadata:M}),D=c===g,U=w.useRef(!1),q=w.useRef(null),K=Ae(ne=>{q.current?.(),q.current=ne?C(ne):null});ze(()=>{if(U.current){U.current=!1;return}if(!(D&&L>-1&&R!==L))return;const ne=T;if(ne!=null){const W=wr(Dt(ne));if(W&&$e(ne,W))return}s||N(L)},[D,L,R,N,s,T]);const{getButtonProps:G,buttonRef:B}=Fo({disabled:s,native:m,focusableWhenDisabled:!0}),F=y(c),V=w.useRef(!1),Y=w.useRef(!1);function te(ne){b(c,Xe(On,ne.nativeEvent,void 0,{activationDirection:"none"}))}function O(ne){D||s||te(ne)}function _(ne){D||s||E&&(!V.current||Y.current)&&te(ne)}function Z(ne){if(D||s)return;V.current=!0,Y.current=ne.button===0;const W=Dt(ne.currentTarget);function fe(){V.current=!1,Y.current=!1,W.removeEventListener("pointerup",fe),W.removeEventListener("pointercancel",fe)}W.addEventListener("pointerup",fe),W.addEventListener("pointercancel",fe)}return jt("button",t,{state:{disabled:s,active:D,orientation:S,tabActivationDirection:k},ref:[n,B,A,K],props:[P,{role:"tab","aria-controls":F,"aria-selected":D,id:I,onClick:O,onFocus:_,onPointerDown:Z,[qR]:D?"":void 0,onKeyDownCapture(){U.current=!0}},p,G],stateAttributesMapping:em})}),aL=w.createContext(void 0),cL={disableStyleElements:!1};function uL(){return w.useContext(aL)??cL}const fL={...em,...Fs},dL=w.forwardRef(function(t,n){const{className:i,value:s,render:l,keepMounted:c=!1,style:u,...m}=t,{value:h,getTabIdByPanelValue:p,orientation:g,tabActivationDirection:y,registerMountedTabPanel:b}=Nb(),S=Or(),{ref:k,index:E}=tm(),C=s===h,{mounted:T,transitionStatus:R,setMounted:N}=Al(C),I=!T,M=p(s),P={hidden:I,orientation:g,tabActivationDirection:y,transitionStatus:R},A=w.useRef(null),L=jt("div",t,{state:P,ref:[n,k,A],props:[{"aria-labelledby":M,hidden:I,id:S,role:"tabpanel",tabIndex:C?0:-1,inert:Xh(!C),"data-index":E},m],stateAttributesMapping:fL});return Zi({open:C,ref:A,onComplete(){C||N(!1)}}),ze(()=>{if(!(S==null||I&&!c))return b(s,S)},[I,c,s,S,b]),c||T?L:null});function YR(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const my="ArrowUp",py="ArrowDown",gy="ArrowLeft",xy="ArrowRight",yy="Home",by="End",Ab=new Set([my,py,gy,xy,yy,by]),hL="Shift",mL=[hL,"Control","Alt","Meta"];function pL(e){return en(e)&&e.tagName==="INPUT"}function Tk(e){return!!(pL(e)&&e.selectionStart!=null||en(e)&&e.tagName==="TEXTAREA")}function Rk(e,t,n,i){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,l=e.scrollTop;const c=e.clientWidth<e.scrollWidth,u=e.clientHeight<e.scrollHeight;if(c&&i!=="vertical"){const m=jk(e,t,"left"),h=Ed(e),p=Ed(t);n==="ltr"&&(m+t.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight?s=m+t.offsetWidth+p.scrollMarginRight-e.clientWidth+h.scrollPaddingRight:m-p.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft&&(s=m-p.scrollMarginLeft-h.scrollPaddingLeft)),n==="rtl"&&(m-p.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft?s=m-p.scrollMarginLeft-h.scrollPaddingLeft:m+t.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight&&(s=m+t.offsetWidth+p.scrollMarginRight-e.clientWidth+h.scrollPaddingRight))}if(u&&i!=="horizontal"){const m=jk(e,t,"top"),h=Ed(e),p=Ed(t);m-p.scrollMarginTop<e.scrollTop+h.scrollPaddingTop?l=m-p.scrollMarginTop-h.scrollPaddingTop:m+t.offsetHeight+p.scrollMarginBottom>e.scrollTop+e.clientHeight-h.scrollPaddingBottom&&(l=m+t.offsetHeight+p.scrollMarginBottom-e.clientHeight+h.scrollPaddingBottom)}e.scrollTo({left:s,top:l,behavior:"auto"})}function jk(e,t,n){const i=n==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[i],t.offsetParent!==e);)t=t.offsetParent;return s}function Ed(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const gL=[];function xL(e){const{loopFocus:t=!0,orientation:n="both",grid:i,onLoop:s,direction:l,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:m,enableHomeAndEndKeys:h=!1,stopEventPropagation:p,disabledIndices:g,modifierKeys:y=gL}=e,[b,S]=w.useState(0),k=i!=null,E=w.useRef(null),C=Ui(E,m),T=w.useRef([]),R=w.useRef(!1),N=c??b,I=Ae((D,U=!1)=>{if((u??S)(D),U){const q=T.current[D];Rk(E.current,q,l,n)}}),M=Ae(D=>{if(D.size===0||R.current)return;R.current=!0;const U=Array.from(D.keys()),q=U.find(G=>G?.hasAttribute(qR))??null,K=q?D.get(q)?.index??-1:-1;if(K!==-1)I(K);else if(za(U,N,g)){const G=ir(U,{disabledIndices:g});Ns(U,G)||I(G)}Rk(E.current,q,l,n)});ze(()=>{if(g==null||c!=null||!R.current)return;const D=T.current;if(za(D,N,g)){const U=ir(D,{disabledIndices:g});Ns(D,U)||I(U)}},[g,c,N,T,I]);const P=Ae((D,U,q)=>s?s(D,U,q,T):q),A=Ae(D=>{const U=D.key===yy||D.key===by;if(!Ab.has(D.key)||!h&&U||yL(D,y)||!E.current)return;const K=l==="rtl",G=K?gy:xy,B=K?xy:gy,F=n==="vertical"?py:G,V=n==="vertical"?my:B,Y=Mn(D.nativeEvent);if(Y!=null&&Tk(Y)&&!YR(Y)){const J=Y.selectionStart,ne=Y.selectionEnd,W=Y.value;if(J==null||D.shiftKey||J!==ne||D.key!==V&&J<W.length||D.key!==F&&J>0)return}let te=N;const O=Bd(T,g),_=ay(T,g);i!=null&&(te=i({disabledIndices:g,elementsRef:T,event:D,highlightedIndex:N,loopFocus:t,maxIndex:_,minIndex:O,onLoop:P,orientation:n,rtl:K}));const Z=n!=="vertical"&&D.key===G||n!=="horizontal"&&D.key===py,z=n!=="vertical"&&D.key===B||n!=="horizontal"&&D.key===my;h&&(D.key===yy?te=O:D.key===by&&(te=_)),te===N&&(Z||z)&&(t&&te===_&&Z?(te=O,s&&(te=s(D,N,te,T))):t&&te===O&&z?(te=_,s&&(te=s(D,N,te,T))):te=ir(T.current,{startingIndex:te,decrement:z,disabledIndices:g})),te!==N&&!Ns(T.current,te)&&(p&&D.stopPropagation(),(k||U||Z||z)&&D.preventDefault(),I(te,!0),queueMicrotask(()=>{T.current[te]?.focus()}))});return{props:{ref:C,onFocus(D){const U=E.current,q=Mn(D.nativeEvent);!U||q==null||!Tk(q)||q.setSelectionRange(0,q.value.length)},onKeyDown:A},highlightedIndex:N,onHighlightedIndexChange:I,elementsRef:T,onMapChange:M,relayKeyboardEvent:A}}function yL(e,t){for(const n of mL)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function bL(e){const{render:t,className:n,style:i,refs:s=Pi,props:l=Pi,state:c=wn,stateAttributesMapping:u,highlightedIndex:m,onHighlightedIndexChange:h,orientation:p,grid:g,loopFocus:y,onLoop:b,enableHomeAndEndKeys:S,onMapChange:k,stopEventPropagation:E=!0,rootRef:C,disabledIndices:T,modifierKeys:R,highlightItemOnHover:N=!1,tag:I="div",...M}=e,P=Zu(),{props:A,highlightedIndex:L,onHighlightedIndexChange:D,elementsRef:U,onMapChange:q,relayKeyboardEvent:K}=xL({grid:g,loopFocus:y,onLoop:b,orientation:p,highlightedIndex:m,onHighlightedIndexChange:h,rootRef:C,stopEventPropagation:E,enableHomeAndEndKeys:S,direction:P,disabledIndices:T,modifierKeys:R}),G=jt(I,e,{state:c,ref:s,props:[A,...l,M],stateAttributesMapping:u}),B=w.useMemo(()=>({highlightedIndex:L,onHighlightedIndexChange:D,highlightItemOnHover:N,relayKeyboardEvent:K}),[L,D,N,K]);return d.jsx(ZR.Provider,{value:B,children:d.jsx(Qh,{elementsRef:U,onMapChange:F=>{k?.(F),q(F)},children:G})})}const vL=w.forwardRef(function(t,n){const{activateOnFocus:i=!1,className:s,loopFocus:l=!0,render:c,style:u,...m}=t,{orientation:h,setTabMap:p,tabActivationDirection:g}=Nb(),[y,b]=w.useState(0),[S,k]=w.useState(null),E=w.useRef(new Set),C=w.useRef(new Set),T=w.useRef(null);ze(()=>{if(typeof ResizeObserver>"u")return;const A=new ResizeObserver(()=>{E.current.forEach(L=>{L()})});return T.current=A,S&&A.observe(S),C.current.forEach(L=>{A.observe(L)}),()=>{A.disconnect(),T.current=null}},[S]);const R=Ae(A=>(E.current.add(A),()=>{E.current.delete(A)})),N=Ae(A=>(C.current.add(A),T.current?.observe(A),()=>{C.current.delete(A),T.current?.unobserve(A)})),I={orientation:h,tabActivationDirection:g},M={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},P=w.useMemo(()=>({activateOnFocus:i,registerIndicatorUpdateListener:R,registerTabResizeObserverElement:N,tabsListElement:S}),[i,R,N,S]);return d.jsx(GR.Provider,{value:P,children:d.jsx(bL,{render:c,className:s,style:u,state:I,refs:[n,k],props:[M,m],stateAttributesMapping:em,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:l,orientation:h,onHighlightedIndexChange:b,onMapChange:p,disabledIndices:Pi})})}),Mb=nL;function zb({className:e,...t}){return d.jsx(vL,{className:Te("relative flex items-center gap-1 overflow-x-auto border-b border-border","[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",e),...t})}function bl({className:e,...t}){return d.jsx(lL,{className:Te("group/tab relative -mb-px flex shrink-0 items-center gap-2 whitespace-nowrap rounded-t-md border-b-2 border-transparent px-3 py-2","text-sm font-medium text-muted-foreground transition-colors","hover:text-foreground","data-[active]:border-primary data-[active]:font-semibold data-[active]:text-foreground","[&_svg]:size-4 [&_svg]:shrink-0",e),...t})}function vl({className:e,...t}){return d.jsx(dL,{className:Te("pt-4",e),...t})}function Nk({className:e,...t}){return d.jsx("span",{className:Te("rounded-full bg-muted px-1.5 py-0.5 text-[0.6875rem] font-semibold leading-none text-muted-foreground","group-data-[active]/tab:bg-primary/10 group-data-[active]/tab:text-foreground",e),...t})}const wL={host:void 0,api:$y()},Ib=w.createContext(wL);function SL({host:e,children:t}){const n=w.useMemo(()=>({host:e,api:$y(e)}),[e]);return d.jsx(Ib.Provider,{value:n,children:t})}function Wn(){return w.useContext(Ib).api}function $n(){return w.useContext(Ib).host}function Ho(){const e=$n();return w.useMemo(()=>e===void 0?{}:{host:e},[e])}const kL=41427,Zd="gitwarren",lx="klarluft/gitwarren-app",ax={claudeCode:[`/plugin marketplace add ${lx}`,"/plugin install gitwarren@gitwarren"],geminiCli:`gemini extensions install https://github.com/${lx}`,skills:`npx skills add ${lx}`};function EL(e){return`Set up the GitWarren MCP server for yourself. It speaks MCP over stdio and is started with the command ${e.command} (no arguments, no environment). Register it under the name "${Zd}" in your own MCP configuration, then call its agent_identity tool to confirm it works.`}function CL(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function TL(e){const t={command:e.command};return[{id:"mcp-servers",label:"Claude Code, Cursor, Windsurf, Gemini CLI",hint:"the `mcpServers` object in that harness’ MCP config",language:"json",text:JSON.stringify({mcpServers:{[Zd]:t}},null,2)},{id:"vscode",label:"VS Code",hint:"`.vscode/mcp.json`, or the user `mcp.json`",language:"json",text:JSON.stringify({servers:{[Zd]:t}},null,2)},{id:"codex",label:"Codex",hint:"`~/.codex/config.toml`",language:"toml",text:`[mcp_servers.${Zd}]
|
|
10
|
+
command = ${CL(e.command)}
|
|
11
|
+
`}]}function RL({snippet:e}){const t=w.useRef(null);return d.jsxs(vl,{value:e.id,children:[d.jsxs("p",{className:"mb-2 text-xs text-muted-foreground",children:[e.label," — goes in ",e.hint.replaceAll("`",""),"."]}),d.jsxs("div",{className:"relative",children:[d.jsx("pre",{ref:t,"data-selectable":!0,className:"max-h-64 overflow-auto rounded-md bg-muted p-3 pr-12 font-mono text-[11px] leading-relaxed",children:e.text}),d.jsx($h,{label:`Copy the ${e.label} configuration`,text:e.text,source:t,className:"absolute right-1.5 top-1.5"})]})]})}function jL(e){return e.split("`").map((t,n)=>n%2===1?d.jsx("code",{"data-selectable":!0,className:"font-mono",children:t},n):d.jsx("span",{children:t},n))}function NL({host:e}){const t=w.useRef(null),n=ax.claudeCode.join(`
|
|
12
|
+
`);return d.jsxs(wt,{className:"p-4",children:[d.jsx("p",{className:"text-sm font-medium",children:e===void 0?"Install the plugin":"Install the plugin in an agent on that machine"}),d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"The same server, plus a note that teaches the agent when to open a review and how to answer your comments. In Claude Code, two lines:"}),d.jsxs("div",{className:"relative mt-3",children:[d.jsx("pre",{ref:t,"data-selectable":!0,className:"overflow-auto rounded-md bg-muted p-3 pr-12 font-mono text-[11px] leading-relaxed",children:n}),d.jsx($h,{label:"Copy the Claude Code plugin install",text:n,source:t,className:"absolute right-1.5 top-1.5"})]}),d.jsxs("p",{className:"mt-3 text-xs text-muted-foreground [overflow-wrap:anywhere]",children:["Gemini CLI:"," ",d.jsx("code",{"data-selectable":!0,className:"font-mono",children:ax.geminiCli}),". Cursor, Codex, VS Code and Kiro read the same repository from their plugin screens. For any agent, the note alone:"," ",d.jsx("code",{"data-selectable":!0,className:"font-mono",children:ax.skills}),"."]})]})}function cx({children:e}){return d.jsxs("p",{className:"flex items-start gap-2 rounded-md bg-warning/10 px-3 py-2 text-xs text-warning",children:[d.jsx(nT,{className:"mt-px size-3.5 shrink-0"}),d.jsx("span",{className:"[overflow-wrap:anywhere]",children:typeof e=="string"?jL(e):e})]})}function OL(e){const t=Wn(),n=nn(e===void 0?Vt.appInfo:null,()=>t.system.appInfo()),i=nn(e===void 0?null:Vt.agentMcp(e),()=>t.app.mcp());return e===void 0?{mcp:n.data?.mcp,linkPort:n.data?.linkPort,local:n.data,isLoading:n.isLoading}:{mcp:i.data,linkPort:void 0,local:void 0,isLoading:i.isLoading}}function AL(){const e=$n(),t=Ho(),{mcp:n,linkPort:i,local:s,isLoading:l}=OL(e),[c,u]=w.useState(!1),m=w.useRef(null);if(l||!n)return d.jsxs("div",{className:"flex flex-col gap-5","aria-busy":"true","aria-label":"Loading agent access",children:[d.jsx(yt,{className:"h-6 w-48"}),d.jsx(yt,{className:"h-32 w-full"})]});const h=EL(n),p=TL(n),g=n.direct.command===n.command?null:n.direct;return d.jsxs("div",{className:"flex flex-col gap-5",children:[d.jsxs("div",{children:[d.jsxs(Ze,{variant:"ghost",size:"sm",className:"-ml-2 mb-2 text-muted-foreground",onClick:()=>An({name:"repositories",...t}),children:[d.jsx(Ts,{}),"Repositories"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(jh,{className:"size-5 shrink-0 text-muted-foreground"}),d.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Agent access"})]}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e===void 0?"Install the plugin in your agent, or give it one sentence and it will configure itself to read and write these reviews over MCP.":"Paste this into an agent running on that machine, and it will configure itself to read and write its reviews over MCP."})]}),d.jsx(NL,{host:e}),d.jsxs(wt,{className:"p-4",children:[d.jsx("p",{className:"text-sm font-medium",children:e===void 0?"Or paste this into whichever agent you use":"Or paste this into an agent on that machine"}),d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Anything that speaks MCP. It will work out where its own configuration goes."}),d.jsx("p",{ref:m,"data-selectable":!0,className:"mt-3 rounded-md bg-muted p-3 text-sm leading-relaxed [overflow-wrap:anywhere]",children:h}),d.jsx($h,{label:"Copy this prompt",text:h,source:m,className:"mt-3",children:"Copy prompt"})]}),(n.note||!n.available||i===null)&&d.jsxs("div",{className:"flex flex-col gap-2",children:[n.note?d.jsx(cx,{children:n.note}):!n.available&&d.jsx(cx,{children:e===void 0?"The MCP server is not on this machine yet, so the command above does not exist until it is. The prompt itself will not change.":"The MCP server is not on that machine yet, so the command above does not exist until it is. Installing the daemon from the Hosts screen writes it."}),i===null&&d.jsxs(cx,{children:["Another program is using port ",kL,", so links an agent hands you will not open GitWarren until it lets go. Everything else works, and the links themselves are still correct — they name the same port on every machine."]})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>u(y=>!y),"aria-expanded":c,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[d.jsx(Fa,{className:Te("size-3 transition-transform",c&&"rotate-180")}),"Configure by hand"]}),c&&d.jsxs(wt,{className:"mt-2 p-4",children:[d.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"The same command, in the syntax each harness reads it in. Merge it into whatever is already there rather than replacing the file."}),d.jsxs(Mb,{defaultValue:p[0]?.id,children:[d.jsx(zb,{children:p.map(y=>d.jsx(bl,{value:y.id,children:y.id==="mcp-servers"?"mcpServers":y.label},y.id))}),p.map(y=>d.jsx(RL,{snippet:y},y.id))]}),g&&d.jsxs("p",{className:"mt-3 text-xs text-muted-foreground [overflow-wrap:anywhere]",children:["If the launcher above cannot be used, the server is also reachable directly at"," ",d.jsx("code",{"data-selectable":!0,className:"font-mono",children:[g.command,...g.args].join(" ")}),Object.keys(g.env).length>0&&d.jsxs(d.Fragment,{children:[" ","with"," ",d.jsx("code",{"data-selectable":!0,className:"font-mono",children:Object.entries(g.env).map(([y,b])=>`${y}=${b}`).join(" ")})]}),". That one points inside this install and needs updating if GitWarren moves, which is the whole reason the launcher exists."]})]})]}),d.jsxs(wt,{className:"p-4",children:[d.jsxs("dl",{className:"space-y-1.5 text-xs",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("dt",{className:"w-24 shrink-0 text-muted-foreground",children:"Command"}),d.jsx("dd",{"data-selectable":!0,className:"break-words font-mono",children:d.jsx(Xn,{text:n.command})})]}),s!==void 0&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("dt",{className:"w-24 shrink-0 text-muted-foreground",children:"Database"}),d.jsx("dd",{"data-selectable":!0,className:"break-words font-mono",children:d.jsx(Xn,{text:s.databasePath})})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("dt",{className:"w-24 shrink-0 text-muted-foreground",children:"Version"}),d.jsxs("dd",{className:"font-mono",children:[s.version,!s.packaged&&" (dev)"]})]})]})]}),d.jsx("p",{className:"mt-4 text-xs text-muted-foreground",children:"The agent runs the server as a child process over stdio — there is no port and no login. It shares this database, so changes show up here immediately, and it keeps working when GitWarren is closed."})]})]})}const ML=1400,zL='[role="dialog"],[role="alertdialog"],[role="menu"],[role="listbox"]';function IL(e){return e instanceof HTMLElement?e.isContentEditable?!0:e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT":!1}function DL(e){const[t,n]=w.useState(null),i=w.useRef(e);return w.useEffect(()=>{i.current=e}),w.useEffect(()=>{let s=null,l=0;function c(){s=null,window.clearTimeout(l),n(null)}function u(m){if(m.defaultPrevented||m.isComposing)return;const h=_P(m);if(h===null)return;const g=(h.includes("mod+")||h.includes("meta+"))&&!ZP(h);if(IL(m.target)&&!g||document.querySelector(zL)!==null)return;const y=i.current.map(k=>({hotkey:k,steps:LR(k.binding)}));if(s!==null){const k=`${s} ${h}`,E=y.find(C=>C.steps.length===2&&C.steps.join(" ")===k);c(),E&&(m.preventDefault(),E.hotkey.run(m));return}const b=y.find(k=>k.steps.length===1&&k.steps[0]===h);if(b){m.preventDefault(),b.hotkey.run(m);return}y.some(k=>k.steps.length>1&&k.steps[0]===h)&&(m.preventDefault(),s=h,n(h),l=window.setTimeout(c,ML))}return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u),window.clearTimeout(l)}},[]),t}function KR({text:e,indices:t,markClassName:n}){if(t.length===0)return d.jsx(Xn,{text:e});const i=new Set(t),s=[];for(let l=0;l<e.length;l+=1){const c=i.has(l),u=s.at(-1);u&&u.match===c?u.text+=e[l]:s.push({text:e[l],match:c})}return d.jsx(d.Fragment,{children:s.map((l,c)=>l.match?d.jsx("mark",{className:Te("bg-transparent font-semibold text-foreground",n),children:d.jsx(Xn,{text:l.text})},c):d.jsx("span",{children:d.jsx(Xn,{text:l.text})},c))})}const XR=w.createContext(void 0);function zl(e){const t=w.useContext(XR);if(!e&&t===void 0)throw new Error(En(27));return t}const JR=w.forwardRef(function(t,n){const{render:i,className:s,style:l,forceRender:c=!1,...u}=t,m=zl(),h=m.useState("open"),p=m.useState("nested"),g=m.useState("mounted"),y=m.useState("transitionStatus");return jt("div",t,{state:{open:h,transitionStatus:y},ref:[m.context.backdropRef,n],stateAttributesMapping:pR,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},u],enabled:c||!p})}),_L=w.forwardRef(function(t,n){const{render:i,className:s,style:l,disabled:c=!1,nativeButton:u=!0,...m}=t,h=zl(),p=h.useState("open"),{getButtonProps:g,buttonRef:y}=Fo({disabled:c,native:u}),b={disabled:c};function S(k){p&&h.setOpen(!1,Xe(dT,k.nativeEvent))}return jt("button",t,{state:b,ref:[n,y],props:[{onClick:S},m,g]})}),WR=w.forwardRef(function(t,n){const{render:i,className:s,style:l,id:c,...u}=t,m=zl(),h=Or(c);return m.useSyncedValueWithCleanup("descriptionElementId",h),jt("p",t,{ref:n,props:[{id:h},u]})}),$R=w.createContext(void 0);function PL(){const e=w.useContext($R);if(e===void 0)throw new Error(En(26));return e}const LL={...Uu,...Fs,nestedDialogOpen(e){return e?{"data-nested-dialog-open":""}:null}},QR=w.forwardRef(function(t,n){const{render:i,className:s,style:l,finalFocus:c,initialFocus:u,...m}=t,h=zl(),p=h.useState("descriptionElementId"),g=h.useState("disablePointerDismissal"),y=h.useState("floatingRootContext"),b=h.useState("popupProps"),S=h.useState("modal"),k=h.useState("mounted"),E=h.useState("nested"),C=h.useState("nestedOpenDialogCount"),T=h.useState("open"),R=h.useState("openMethod"),N=h.useState("titleElementId"),I=h.useState("transitionStatus"),M=h.useState("role"),P=y.useState("floatingId");PL(),Zi({open:T,ref:h.context.popupRef,onComplete(){T&&h.context.onOpenChangeComplete?.(!0)}});const A=u===void 0?H_(h.context.popupRef):u,L=C>0,D=h.useStateSetter("popupElement"),q=jt("div",t,{state:{open:T,nested:E,transitionStatus:I,nestedDialogOpen:L},props:[b,{id:P,"aria-labelledby":N,"aria-describedby":p,role:M,...qh,hidden:!k,onKeyDown(K){Ab.has(K.key)&&K.stopPropagation()},style:{"--nested-dialogs":C}},m],ref:[n,h.context.popupRef,D],stateAttributesMapping:LL});return d.jsx(bb,{context:y,openInteractionType:R,disabled:!k,closeOnFocusOut:!g,initialFocus:A,returnFocus:c,modal:S!==!1,restoreFocus:"popup",children:q})}),Db=w.forwardRef(function(t,n){const{cutout:i,...s}=t;let l;if(i){const c=i.getBoundingClientRect();l=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${c.left}px ${c.top}px,${c.left}px ${c.bottom}px,${c.right}px ${c.bottom}px,${c.right}px ${c.top}px,${c.left}px ${c.top}px)`}return d.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:l}})}),e2=w.forwardRef(function(t,n){const{keepMounted:i=!1,...s}=t,l=zl(),c=l.useState("mounted"),u=l.useState("modal"),m=l.useState("open");return c||i?d.jsx($R.Provider,{value:i,children:d.jsxs(xb,{ref:n,...s,children:[c&&u===!0&&d.jsx(Db,{ref:l.context.internalBackdropRef,inert:Xh(!m)}),t.children]})}):null});let Ok={},Ak={},Mk="";function nm(e,t){return Pu(e)?e:t}function zk(e,t,n){return/hidden|clip/.test(e.getComputedStyle(nm(t,n)).overflowY)}function FL(e){if(typeof document>"u")return!1;const t=Dt(e);return gn(t).innerWidth-t.documentElement.clientWidth>0}function HL(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Dt(e),i=n.documentElement,s=n.body,l=nm(i,s),c=l.style.overflowY,u=i.style.scrollbarGutter;i.style.scrollbarGutter="stable",l.style.overflowY="scroll";const m=l.offsetWidth;l.style.overflowY="hidden";const h=l.offsetWidth;return l.style.overflowY=c,i.style.scrollbarGutter=u,m===h}function BL(e){const t=Dt(e),n=t.documentElement,i=t.body,s=nm(n,i),l={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,l)}}function VL(e){const t=Dt(e),n=t.documentElement,i=t.body,s=gn(n);let l=0,c=0,u=!1;const m=no.create();if(Po&&(s.visualViewport?.scale??1)!==1)return()=>{};function h(){const b=s.getComputedStyle(n),S=s.getComputedStyle(i),C=(b.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=n.scrollTop,c=n.scrollLeft,Ok={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Mk=n.style.scrollBehavior,Ak={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const T=n.scrollHeight>n.clientHeight,R=n.scrollWidth>n.clientWidth,N=b.overflowY==="scroll"||S.overflowY==="scroll",I=b.overflowX==="scroll"||S.overflowX==="scroll",M=Math.max(0,s.innerWidth-i.clientWidth),P=Math.max(0,s.innerHeight-i.clientHeight),A=parseFloat(S.marginTop)+parseFloat(S.marginBottom),L=parseFloat(S.marginLeft)+parseFloat(S.marginRight),D=nm(n,i);if(u=HL(e),u){n.style.scrollbarGutter=C,D.style.overflowY="hidden",D.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:C,overflowY:"hidden",overflowX:"hidden"}),(T||N)&&(n.style.overflowY="scroll"),(R||I)&&(n.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:A||P?`calc(100dvh - ${A+P}px)`:"100dvh",width:L||M?`calc(100vw - ${L+M}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),i.scrollTop=l,i.scrollLeft=c,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function p(){Object.assign(n.style,Ok),Object.assign(i.style,Ak),u||(n.scrollTop=l,n.scrollLeft=c,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Mk)}function g(){p(),m.request(h)}h();const y=kt(s,"resize",g);return()=>{m.cancel(),p(),typeof s.removeEventListener=="function"&&y()}}class UL{lockCount=0;restore=null;timeoutLock=Vi.create();timeoutUnlock=Vi.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const n=Dt(t),i=n.documentElement,s=n.body,l=gn(i);if(zk(l,i,s)){const u=new l.MutationObserver(()=>{zk(l,i,s)||(u.disconnect(),this.restore=null,this.lock(t))}),m={attributes:!0};u.observe(i,m),u.observe(s,m),this.restore=()=>u.disconnect();return}const c=_u||!FL(t);this.restore=c?BL(t):VL(t)}}const ZL=new UL;function t2(e=!0,t=null){ze(()=>{if(e)return ZL.acquire(t)},[e,t])}function qL({store:e,parentContext:t,isDrawer:n}){const i=e.useState("open"),s=e.useState("disablePointerDismissal"),l=e.useState("modal"),c=e.useState("popupElement"),u=e.useState("floatingRootContext"),[m,h]=w.useState(0),[p,g]=w.useState(0),y=m===0,b=Bh(u,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(S){if(!e.context.outsidePressEnabledRef.current||"button"in S&&S.button!==0)return!1;if("touches"in S){if(S.type==="touchend"){if(S.changedTouches.length!==1||S.touches.length!==0)return!1}else if(S.touches.length!==1)return!1}const k=Mn(S);if(y&&!s){if(l){const E=e.context.internalBackdropRef.current,C=e.context.backdropRef.current;return E||C?E===k||C===k||$e(k,c)&&!k?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:y});return t2(i&&l===!0,c),e.useContextCallback("onNestedDialogOpen",(S,k)=>{h(S),g(k)}),ze(()=>(t?.onNestedDialogOpen&&(i?t.onNestedDialogOpen(m+1,p+(n?1:0)):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&i&&t.onNestedDialogOpen(0,0)}),[n,i,m,p,t]),iR(e,{activeTriggerProps:b.reference,inactiveTriggerProps:b.trigger,popupProps:b.floating,nestedOpenDialogCount:m,nestedOpenDrawerCount:p}),null}const GL={...aR,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class YL extends Uh{constructor(t,n,i){const s=new Gh,l=KL(t,s,n,i);super(l,XL(s),GL)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);const i={open:t};tR(i,t,n.trigger),this.update(i)}}function KL(e,t,n,i=!1){const s={...oR(),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e};return s.floatingRootContext=sR(t,n,i),s}function XL(e){return{popupRef:w.createRef(),backdropRef:w.createRef(),internalBackdropRef:w.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function n2(e,t){const{children:n,open:i,defaultOpen:s=!1,onOpenChange:l,onOpenChangeComplete:c,disablePointerDismissal:u=!1,modal:m=!0,actionsRef:h,handle:p,triggerId:g,defaultTriggerId:y=null}=t,b=e==="drawer",S=e==="alert-dialog",k=S?!0:m,E=S||u,C=S?"alertdialog":"dialog",T=zl(!0),R=T!=null,N={modal:k,disablePointerDismissal:E,nested:R,role:C},I=QT((U,q)=>new YL({open:s,openProp:i,activeTriggerId:y,triggerIdProp:g,...N},U,q),!0);I.useControlledProp("openProp",i),I.useControlledProp("triggerIdProp",g),I.useSyncedValues(N),I.useContextCallback("onOpenChange",l),I.useContextCallback("onOpenChangeComplete",c);const M=I.useState("open"),P=I.useState("mounted"),A=I.useState("payload");q_(I,M),nR(I);const{forceUnmount:L}=rR(M,I);w.useImperativeHandle(h,()=>({unmount:L,close:()=>I.setOpen(!1,Xe(xT))}),[L,I]);const D=M||P;return d.jsxs(XR.Provider,{value:I,children:[p&&d.jsx(eR,{handle:p,store:I}),D&&d.jsx(qL,{store:I,parentContext:T?.context,isDrawer:b}),typeof n=="function"?n({payload:A}):n]})}function JL(e){return n2("dialog",e)}const r2=w.forwardRef(function(t,n){const{render:i,className:s,style:l,id:c,...u}=t,m=zl(),h=Or(c);return m.useSyncedValueWithCleanup("titleElementId",h),jt("h2",t,{ref:n,props:[{id:h},u]})});function WL(e){const t=w.useRef(""),n=w.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:w.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,t.current),t.current=""},[e]),onPointerDown:n}}function Es(e,t){const n=w.useRef(e),i=Ae(t);ze(()=>{n.current!==e&&i(n.current),n.current=e},[e,i])}function $L(e,t){const n=Ae((l,c)=>{(typeof e=="function"?e():e)||t(c||(_u?"touch":""))}),{onClick:i,onPointerDown:s}=WL(n);return w.useMemo(()=>({onClick:i,onPointerDown:s}),[i,s])}function i2(e){const[t,n]=w.useState(null),i=$L(e,n);return Es(e,s=>{s&&!e&&n(null)}),w.useMemo(()=>({openMethod:t,triggerProps:i}),[t,i])}const Ba=JL;function Va({className:e,children:t,showCloseButton:n=!0,...i}){return d.jsxs(e2,{children:[d.jsx(JR,{className:Te("fixed inset-0 z-50 bg-black/40 backdrop-blur-[2px] transition-opacity duration-150","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0")}),d.jsxs(QR,{className:Te("fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2","rounded-lg border border-border bg-card p-5 text-card-foreground shadow-xl","transition-all duration-150","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0",e),...i,children:[t,n&&d.jsx(_L,{"aria-label":"Close",className:"absolute right-3 top-3 rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:d.jsx(Du,{className:"size-4"})})]})]})}function qu({className:e,...t}){return d.jsx("div",{className:Te("mb-4 flex flex-col gap-1.5 pr-6",e),...t})}function Ua({className:e,...t}){return d.jsx(r2,{className:Te("text-base font-semibold leading-none tracking-tight",e),...t})}function Za({className:e,...t}){return d.jsx(WR,{className:Te("text-sm text-muted-foreground",e),...t})}function rm({className:e,...t}){return d.jsx("div",{className:Te("mt-5 flex justify-end gap-2",e),...t})}const QL=new Set(["/","\\","-","_"," ",".",":","@","#"]),e6=14,t6=10,n6=8,r6=12,Ik=1,i6=12,o6=1;function vy(e){return e!==e.toLowerCase()&&e===e.toUpperCase()}function s6(e,t){if(t===0)return e6;const n=e[t-1];return QL.has(n)?t6:!vy(n)&&vy(e[t])?n6:0}function uh(e,t){const n=e.trim();if(n.length===0)return{score:0,indices:[]};if(n.length>t.length)return null;const i=n.toLowerCase(),s=t.toLowerCase(),l=t.length;let c=new Float64Array(l).fill(-1/0);const u=[];for(let g=0;g<i.length;g+=1){const y=new Float64Array(l).fill(-1/0),b=new Int32Array(l).fill(-1);let S=-1/0,k=-1;for(let E=0;E<l;E+=1){if(E>0){S>-1/0&&(S-=Ik);const N=c[E-1];N>S&&(S=N,k=E-1)}if(s[E]!==i[g])continue;const C=s6(t,E)+(t[E]===n[g]&&vy(t[E])?o6:0);if(g===0){y[E]=C-Math.min(E*Ik,i6),b[E]=-1;continue}const T=E>0?c[E-1]:-1/0,R=T>-1/0?T+r6:-1/0;R>=S&&R>-1/0?(y[E]=R+C,b[E]=E-1):S>-1/0&&(y[E]=S+C,b[E]=k)}u.push(b),c=y}let m=-1,h=-1/0;for(let g=0;g<l;g+=1)c[g]>h&&(h=c[g],m=g);if(m===-1||h===-1/0)return null;const p=[];for(let g=u.length-1;g>=0&&m!==-1;g-=1)p.push(m),m=u[g][m];return p.reverse(),{score:h,indices:p}}const l6=30;function a6(e,t,n){const i=uh(e,t);if(i)return i;if(n===void 0)return null;const s=uh(e,n);return s?{score:s.score-l6,indices:[]}:null}function o2(e){const t=e.replace(/[\\/]+$/,""),n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return n===-1?t:t.slice(n+1)}const c6=30;function _b(e,t={block:"start",behavior:"smooth"}){let n=0,i=0;const s=()=>{const l=document.getElementById(e);if(l){l.scrollIntoView(t);return}n+=1,n<c6&&(i=requestAnimationFrame(s))};return i=requestAnimationFrame(s),()=>cancelAnimationFrame(i)}function Mo(e){return`file-${encodeURIComponent(e)}`}function s2(e,t,n){return`line-${encodeURIComponent(e)}-${t}-${n}`}const l2="diff-find-active-match",a2=["Review","Files changed","Jump to file","Repository","Navigate","Reviews","Repositories","Hosts","Application"],c2=w.createContext(null),u2=w.createContext([]);function u6({children:e}){const[t,n]=w.useState(()=>new Map),i=w.useMemo(()=>({register(l,c){n(u=>new Map(u).set(l,c))},unregister(l){n(c=>{if(!c.has(l))return c;const u=new Map(c);return u.delete(l),u})}}),[]),s=w.useMemo(()=>[...t.values()].flat(),[t]);return d.jsx(c2.Provider,{value:i,children:d.jsx(u2.Provider,{value:s,children:e})})}function Il(e){const t=w.useContext(c2),n=w.useMemo(()=>Symbol("commands"),[]);w.useEffect(()=>{if(t)return t.register(n,e),()=>t.unregister(n)},[t,n,e])}function Pb(){return w.useContext(u2)}function f6(e){const t=new Map;for(const n of e)if(!n.disabled)for(const i of[n.keys,...n.aliases??[]])i!==void 0&&t.set(i,n);return t}function d6(e){return a2.map(t=>[t,e.filter(n=>n.group===t)]).filter(([,t])=>t.length>0)}const Dk=60,h6=5;function m6(e){return{id:e.id,label:e.label,group:e.group,run:e.run,...e.keywords===void 0?{}:{keywords:e.keywords},...e.hint===void 0?{}:{hint:e.hint},...e.keys===void 0?{}:{keys:e.keys},...e.icon===void 0?{}:{icon:e.icon},...e.disabled===void 0?{}:{disabled:e.disabled}}}function p6(e){const{cache:t}=_s();return w.useMemo(()=>{if(e===null)return[];for(const n of["all","uncommitted","committed"]){const s=t.get(Vt.reviewDiff(e,n))?.data?.files;if(s&&s.length>0)return s.map(l=>l.path)}return[]},[t,e])}function g6(){const e=HR(),t=e.name==="review"?e.reviewId:null,{data:n}=nn(Vt.repositories,()=>_t.repositories.list()),{data:i}=nn(Vt.reviews(),()=>_t.reviews.list({})),s=p6(t);return w.useMemo(()=>{const l=new Map((n??[]).map(h=>[h.id,h.name])),c=(n??[]).map(h=>({id:`repository:${h.id}`,label:h.name,group:"Repositories",hint:h.path,keywords:h.path,icon:Ky,run:()=>An({name:"repository",repositoryId:h.id})})),u=(i??[]).map(h=>({id:`review:${h.id}`,label:h.title,group:"Reviews",hint:l.get(h.repositoryId)??`${h.headRef} → ${h.baseRef}`,keywords:`${h.headRef} ${h.baseRef} ${h.status} ${l.get(h.repositoryId)??""}`,icon:bu,run:()=>An({name:"review",reviewId:h.id,tab:"conversation"})}));return[...s.map(h=>({id:`file:${h}`,label:o2(h),group:"Jump to file",hint:h,keywords:h,icon:yu,run:()=>{t!==null&&(An({name:"review",reviewId:t,tab:"files"}),_b(Mo(h)))}})),...u,...c]},[n,i,s,t])}function x6(e,t){return w.useMemo(()=>{const n=e.trim(),i=[];for(const u of t){const m=a6(n,u.label,u.keywords);m&&i.push({item:u,match:m})}const s=[];for(const u of a2){const m=i.filter(h=>h.item.group===u);if(m.length!==0){if(n===""){const h=u==="Repositories"||u==="Reviews"||u==="Jump to file";s.push([u,h?m.slice(0,h6):m]);continue}m.sort((h,p)=>p.match.score-h.match.score),s.push([u,m])}}n!==""&&s.sort((u,m)=>(m[1][0]?.match.score??-1/0)-(u[1][0]?.match.score??-1/0));const l=[];let c=0;for(const[u,m]of s){if(c>=Dk)break;const h=m.slice(0,Dk-c);l.push({group:u,members:h,start:c}),c+=h.length}return l},[e,t])}function y6({open:e,onOpenChange:t}){return d.jsx(Ba,{open:e,onOpenChange:t,children:d.jsx(Va,{showCloseButton:!1,className:"top-[12vh] max-w-xl translate-y-0 overflow-hidden p-0",children:d.jsx(b6,{onClose:()=>t(!1)})})})}function b6({onClose:e}){const[t,n]=w.useState(""),[i,s]=w.useState(0),l=w.useRef(null),c=Pb(),u=g6(),m=w.useMemo(()=>[...c.filter(k=>!k.hidden).map(m6),...u],[c,u]),h=x6(t,m),p=w.useMemo(()=>h.flatMap(k=>k.members),[h]),[g,y]=w.useState(t);g!==t&&(y(t),s(0)),w.useEffect(()=>{l.current?.querySelector(`[data-index="${i}"]`)?.scrollIntoView({block:"nearest"})},[i]);const b=w.useCallback(k=>{!k||k.item.disabled||(e(),k.item.run())},[e]);function S(k){const E=p.length;switch(k.key){case"ArrowDown":k.preventDefault(),s(C=>E===0?0:(C+1)%E);break;case"ArrowUp":k.preventDefault(),s(C=>E===0?0:(C-1+E)%E);break;case"Home":k.preventDefault(),s(0);break;case"End":k.preventDefault(),s(Math.max(0,E-1));break;case"Enter":k.preventDefault(),b(p[i]);break;case"k":(k.metaKey||k.ctrlKey)&&(k.preventDefault(),e());break}}return d.jsxs(d.Fragment,{children:[d.jsx(Ua,{className:"sr-only",children:"Command palette"}),d.jsx(Za,{className:"sr-only",children:"Search for a command, a repository, a review, or a file in the open review."}),d.jsxs("div",{className:"flex items-center gap-3 border-b border-border px-4",children:[d.jsx(Rl,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0}),d.jsx("input",{autoFocus:!0,value:t,onChange:k=>n(k.target.value),onKeyDown:S,placeholder:"Search commands, repositories, reviews and files…",className:"h-12 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","aria-label":"Search commands","aria-controls":"command-palette-results","aria-activedescendant":p[i]?`command-row-${p[i].item.id}`:void 0,role:"combobox","aria-expanded":!0,autoComplete:"off",spellCheck:!1})]}),d.jsxs("div",{ref:l,id:"command-palette-results",role:"listbox","aria-label":"Results",className:"max-h-[min(24rem,60vh)] overflow-y-auto overscroll-contain p-2",children:[p.length===0&&d.jsxs("p",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:["Nothing matches “",t.trim(),"”."]}),h.map(k=>d.jsxs("div",{className:"mb-1 last:mb-0",children:[d.jsx("p",{className:"px-3 pb-1 pt-2 text-[0.6875rem] font-semibold uppercase tracking-wide text-muted-foreground",children:k.group}),k.members.map((E,C)=>{const T=k.start+C;return d.jsx(v6,{entry:E,index:T,active:T===i,onHover:s,onChoose:b},E.item.id)})]},k.group))]}),d.jsxs("div",{className:"flex items-center gap-4 border-t border-border px-4 py-2 text-[0.6875rem] text-muted-foreground",children:[d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx(yl,{binding:"arrowup"}),d.jsx(yl,{binding:"arrowdown"}),"to navigate"]}),d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx(yl,{binding:"enter"}),"to run"]}),d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx(yl,{binding:"escape"}),"to close"]})]})]})}function v6({entry:e,index:t,active:n,onHover:i,onChoose:s}){const{item:l}=e,c=l.icon;return d.jsxs("div",{id:`command-row-${l.id}`,"data-index":t,role:"option","aria-selected":n,"aria-disabled":l.disabled,onPointerMove:()=>i(t),onClick:()=>s(e),className:Te("flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm",n&&"bg-accent text-accent-foreground",l.disabled&&"cursor-default opacity-50"),children:[c&&d.jsx(c,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsx("span",{className:"min-w-0 flex-1 truncate",children:d.jsx(KR,{text:l.label,indices:e.match.indices})}),l.hint!==void 0&&d.jsx("span",{className:"max-w-[45%] shrink-0 truncate font-mono text-xs text-muted-foreground",children:l.hint}),l.keys!==void 0&&d.jsx(yl,{binding:l.keys}),n&&l.keys===void 0&&d.jsx(yI,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":!0})]})}function w6({open:e,onOpenChange:t}){const n=Pb(),i=d6(n.filter(s=>s.keys!==void 0));return d.jsx(Ba,{open:e,onOpenChange:t,children:d.jsxs(Va,{className:"max-w-lg",children:[d.jsxs(qu,{children:[d.jsx(Ua,{children:"Keyboard shortcuts"}),d.jsx(Za,{children:"These are the keys that work on this screen. Move to a repository or a review and the list grows."})]}),d.jsx("div",{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:i.map(([s,l])=>d.jsxs("section",{className:"mb-4 last:mb-0",children:[d.jsx("h3",{className:"mb-1.5 text-[0.6875rem] font-semibold uppercase tracking-wide text-muted-foreground",children:s}),d.jsx("ul",{className:"flex flex-col",children:l.map(c=>d.jsxs("li",{className:"flex items-center justify-between gap-4 rounded-md px-2 py-1.5 text-sm odd:bg-muted/40",children:[d.jsx("span",{className:"min-w-0 truncate",children:c.label}),d.jsx(yl,{binding:c.keys})]},c.id))})]},s))}),d.jsx("p",{className:"mt-4 border-t border-border pt-3 text-xs text-muted-foreground",children:"Shortcuts stay out of the way while you are typing: none of them fire inside a text field or while a dialog is open."})]})})}function _k(e){const t=[...document.querySelectorAll("[data-nav-item]")];if(t.length===0)return;const n=t.findIndex(s=>s===document.activeElement||s.contains(document.activeElement)),i=n===-1?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,n+e));t[i]?.focus(),t[i]?.scrollIntoView({block:"nearest"})}function S6({scroller:e}){const[t,n]=w.useState(!1),[i,s]=w.useState(!1),l=w.useCallback(()=>{e.current?.scrollTo({top:0,behavior:"smooth"}),e.current?.focus()},[e]),c=w.useMemo(()=>[{id:"app:palette",label:"Command palette",group:"Application",keys:"mod+k",aliases:["/"],icon:Rl,hidden:!0,run:()=>n(!0)},{id:"app:shortcuts",label:"Keyboard shortcuts",group:"Application",keys:"?",keywords:"help keys bindings hotkeys",icon:rD,run:()=>s(!0)},{id:"nav:home",label:"Go to repositories",group:"Navigate",keys:"g h",keywords:"home start",icon:$C,run:()=>An({name:"repositories"})},{id:"nav:agent",label:"Go to agent access",group:"Navigate",keys:"g a",keywords:"mcp setup prompt claude codex cursor configure",icon:jh,run:()=>An({name:"agent"})},{id:"nav:hosts",label:"Go to hosts",group:"Navigate",keys:"g s",keywords:"ssh machines remote server vps wsl install daemon",icon:Iu,run:()=>An({name:"hosts"})},{id:"nav:back",label:"Back",group:"Navigate",keys:"mod+[",aliases:["mod+arrowleft"],icon:Ts,run:YP},{id:"nav:forward",label:"Forward",group:"Navigate",keys:"mod+]",aliases:["mod+arrowright"],icon:Rh,run:()=>window.history.forward()},{id:"nav:top",label:"Scroll to top",group:"Navigate",keys:"g t",icon:Gz,run:l},{id:"nav:next",label:"Next item",group:"Navigate",keys:"j",hidden:!0,run:()=>_k(1)},{id:"nav:previous",label:"Previous item",group:"Navigate",keys:"k",hidden:!0,run:()=>_k(-1)}],[l]);return Il(c),d.jsxs(d.Fragment,{children:[d.jsx(k6,{}),d.jsx(y6,{open:t,onOpenChange:n}),d.jsx(w6,{open:i,onOpenChange:s})]})}function k6(){const e=Pb(),t=w.useMemo(()=>[...f6(e)].map(([i,s])=>({binding:i,run:s.run})),[e]),n=DL(t);return n===null?null:d.jsxs("div",{role:"status",className:"pointer-events-none fixed bottom-4 left-4 z-50 flex items-center gap-1.5 rounded-md border border-border bg-card px-2.5 py-1.5 text-xs text-muted-foreground shadow-md",children:[d.jsx("span",{className:"font-semibold text-foreground",children:Ta(n)}),d.jsx("span",{children:"waiting for the next key…"})]})}const E6=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),C6=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}),T6=[["year",365*24*60*60*1e3],["month",720*60*60*1e3],["week",10080*60*1e3],["day",1440*60*1e3],["hour",3600*1e3],["minute",60*1e3]];function im(e){if(!e)return"";const t=Date.parse(e);if(Number.isNaN(t))return e;const n=t-Date.now();for(const[i,s]of T6)if(Math.abs(n)>=s)return E6.format(Math.round(n/s),i);return"just now"}function om(e){if(!e)return"";const t=Date.parse(e);return Number.isNaN(t)?e:C6.format(t)}const R6=new Intl.DateTimeFormat(void 0,{timeStyle:"short"});function j6(e){return R6.format(e)}function N6(e){if(!Number.isFinite(e)||e<0)return"—";if(e<1024)return`${e} B`;const t=["KB","MB","GB"];let n=e/1024,i=0;for(;n>=1024&&i<t.length-1;)n/=1024,i+=1;return`${n<10?n.toFixed(1):Math.round(n)} ${t[i]}`}const O6=new Intl.NumberFormat;function Nl(e,t,n=`${t}s`){return`${O6.format(e)} ${e===1?t:n}`}function f2(){const{data:e,error:t,isLoading:n,isValidating:i,mutate:s}=nn(Vt.hosts,()=>_t.hosts.list());return{hosts:e,error:t,isLoading:n,isRefreshing:i&&!n,refresh:s}}function A6(e=!0){const{data:t,isLoading:n}=nn(e?Vt.distros:null,()=>_t.hosts.distros());return{distros:t,isLoading:n}}function Gu(){const{mutate:e}=_s(),t=w.useCallback(()=>e(Vt.hosts),[e]);return{addHost:w.useCallback(async n=>{const i=await _t.hosts.add(n);return await t(),i},[t]),updateHost:w.useCallback(async n=>{const i=await _t.hosts.update(n);return await t(),i},[t]),removeHost:w.useCallback(async n=>{await _t.hosts.remove({id:n}),await t()},[t]),probeHost:w.useCallback(async n=>{const i=await _t.hosts.probe({id:n});return await t(),i},[t]),installOnHost:w.useCallback(async(n,i)=>{const s=await _t.hosts.install(i?{id:n,force:i}:{id:n});return await t(),s},[t])}}const M6=FR("inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-secondary text-secondary-foreground",outline:"border-border text-muted-foreground",success:"border-transparent bg-success/15 text-success",warning:"border-transparent bg-warning/15 text-warning",destructive:"border-transparent bg-destructive/15 text-destructive"}},defaultVariants:{variant:"default"}});function tn({className:e,variant:t,...n}){return d.jsx("span",{className:Te(M6({variant:t}),e),...n})}function Lb(e,t){return t!==void 0?t:e.state.connected?"up":e.state.failures>0||e.state.lastError?"down":"unknown"}function d2({host:e,observed:t}){switch(Lb(e,t)){case"up":return d.jsxs(tn,{variant:"success",children:[d.jsx(XC,{}),"Reachable"]});case"down":return d.jsxs(tn,{variant:"destructive",children:[d.jsx(JC,{}),"Unreachable"]});case"unknown":return d.jsxs(tn,{variant:"outline",children:[d.jsx(fI,{}),"Not tried yet"]})}}function z6({host:e,appVersion:t,checking:n=!1}){return e.daemonVersion===null?Lb(e)==="unknown"?n?d.jsxs(tn,{variant:"outline",children:[d.jsx(wi,{className:"animate-spin"}),"Checking…"]}):d.jsx(tn,{variant:"outline",children:"Not checked yet"}):d.jsxs(tn,{variant:"outline",children:[d.jsx(xu,{}),"GitWarren not installed"]}):t===void 0||e.daemonVersion===t?d.jsxs(tn,{variant:"outline",children:["GitWarren ",e.daemonVersion]}):d.jsxs(tn,{variant:"warning",children:[d.jsx(xu,{}),"GitWarren ",e.daemonVersion," · ",t," available"]})}function I6(e,t){return e.daemonVersion===null?Lb(e)!=="unknown":t!==void 0&&e.daemonVersion!==t}function D6(){const e=$n(),{hosts:t}=f2(),n=w.useSyncExternalStore(i4,()=>r4(e)),{probeHost:i}=Gu(),{mutate:s}=_s(),[l,c]=w.useState(!1),u=e===void 0||t===void 0?void 0:t.find(p=>p.instanceId===e)??null,m=w.useCallback(async()=>{if(u){c(!0);try{await i(u.id),await s(p=>typeof p=="string"&&p.endsWith(`@${e}`))}finally{c(!1)}}},[e,s,i,u]);if(e===void 0)return null;const h=n.offlineSince!==null?"down":n.lastSeenAt!==null?"up":void 0;return n.offlineSince!==null&&n.lastSeenAt!==null?d.jsx(_6,{row:u,host:e,message:n.message,lastSeenAt:n.lastSeenAt,onRetry:u?()=>{m()}:void 0,retrying:l}):d.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-x-3 gap-y-2 rounded-md border border-dashed px-3 py-2",children:[d.jsx(Iu,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:[d.jsx("p",{className:"text-sm font-medium",children:u?u.label:u===null?"A host this GitWarren no longer knows":"Another machine"}),u?d.jsx(d2,{host:u,observed:h}):d.jsx("span",{"data-selectable":!0,className:"font-mono text-xs text-muted-foreground",children:e})]}),d.jsx(h2,{})]})}function _6({row:e,host:t,message:n,lastSeenAt:i,onRetry:s,retrying:l}){return d.jsxs("div",{role:"status",className:"mb-4 flex flex-wrap items-start gap-x-3 gap-y-2 rounded-md border border-warning/40 bg-warning/10 px-3 py-2",children:[d.jsx(QC,{className:"mt-0.5 size-4 shrink-0 text-warning"}),d.jsxs("div",{className:"flex min-w-[14rem] flex-1 flex-col gap-0.5",children:[d.jsx("p",{className:"text-sm font-medium",children:e?`${e.label} stopped answering`:"That machine stopped answering"}),n&&d.jsx("p",{className:"text-sm text-muted-foreground",children:n}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Showing what was loaded at ",j6(i),". GitWarren keeps trying."]}),!e&&d.jsx("span",{"data-selectable":!0,className:"font-mono text-xs text-muted-foreground",children:t})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s&&d.jsxs(Ze,{variant:"outline",size:"sm",onClick:s,disabled:l,children:[d.jsx(sr,{className:l?"animate-spin":void 0}),"Try again"]}),d.jsx(h2,{})]})]})}function h2(){return d.jsx(Ze,{variant:"ghost",size:"sm",className:"shrink-0 text-muted-foreground",onClick:()=>An({name:"repositories"}),children:"Back to this computer"})}function Fb(){return nn(Vt.tailnet,()=>_t.hosts.tailnet())}function P6(){const{data:e}=nn(Vt.hosts,()=>_t.hosts.list()),{data:t}=Fb();function n(){An({name:"hosts"})}const i=e?.length??0,s=t?.exposed===!0?t.dnsName:null,l=i>0?`${i} machine${i===1?"":"s"} over ssh`:s===null?"Review code on another machine over ssh — a PC’s WSL, a VPS, a build box":"No hosts yet";return d.jsxs(wt,{role:"button",tabIndex:0,"data-nav-item":!0,onClick:n,onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),n())},className:"flex cursor-pointer items-center gap-3 p-4 transition-colors hover:border-foreground/20",children:[d.jsx(Iu,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("p",{className:"text-sm font-medium",children:"Hosts"}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:[l,s!==null&&d.jsxs(d.Fragment,{children:[" · reachable at ",d.jsx("span",{className:"whitespace-nowrap font-mono",children:s})]})]})]}),d.jsx(_o,{className:"size-4 shrink-0 text-muted-foreground"})]})}function L6({onAdded:e}){const{data:t,isLoading:n,isValidating:i,mutate:s}=nn(Vt.discovered,()=>_t.hosts.discover(),{revalidateOnFocus:!1,revalidateIfStale:!1,refreshInterval:0}),{addHost:l}=Gu(),[c,u]=w.useState(null),[m,h]=w.useState(null);if(n||!t||t.length===0)return null;async function p(g){u(g.dnsName),h(null);try{const y=await l({target:g.origin,kind:"websocket",label:g.dnsName.split(".")[0]});await s(),e?.(y)}catch(y){h(Jt(y))}finally{u(null)}}return d.jsxs(wt,{className:"flex flex-col gap-3 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx(AD,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsx("h2",{className:"text-sm font-medium",children:"On your tailnet"})]}),d.jsx(Ze,{variant:"outline",size:"icon",onClick:()=>{s()},disabled:i,"aria-label":"Look again",children:d.jsx(sr,{className:i?"animate-spin":void 0})})]}),d.jsx("ul",{className:"flex flex-col gap-2",children:t.map(g=>d.jsxs("li",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsxs("span",{className:"min-w-40 flex-1 text-sm",children:[d.jsx("span",{className:"font-mono text-xs",children:d.jsx(Xn,{text:g.dnsName})}),g.version?d.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:g.version}):null]}),g.alreadyAdded===null?d.jsxs(Ze,{size:"sm",onClick:()=>{p(g)},disabled:c!==null,children:[d.jsx(Bi,{}),"Add"]}):d.jsxs("span",{className:"text-xs text-muted-foreground",children:["Already added as ",g.alreadyAdded]})]},g.instanceId))}),m?d.jsx("p",{className:"text-xs text-destructive",children:m}):null]})}function F6({host:e,appVersion:t,busy:n,onProbe:i,onInstall:s,onEdit:l,onRemove:c}){const u=I6(e,t),m=n!==null;return d.jsxs(wt,{className:"flex flex-col gap-3 p-4",children:[d.jsxs("div",{className:"flex items-start gap-4",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("h3",{className:"truncate font-medium",title:e.label,children:e.label}),d.jsx(d2,{host:e}),d.jsx(z6,{host:e,appVersion:t,checking:n==="probe"})]}),d.jsx("p",{"data-selectable":!0,className:"mt-1 break-words font-mono text-xs text-muted-foreground",children:d.jsx(Xn,{text:e.target})})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[d.jsx(Ln,{label:"Connect to this host now",children:d.jsx(Ze,{variant:"ghost",size:"icon","aria-label":`Try ${e.label} now`,disabled:m,onClick:()=>i(e),children:n==="probe"?d.jsx(wi,{className:"animate-spin"}):d.jsx(sr,{})})}),d.jsx(Ln,{label:"Edit this host",children:d.jsx(Ze,{variant:"ghost",size:"icon","aria-label":`Edit ${e.label}`,disabled:m,onClick:()=>l(e),children:d.jsx(Tl,{})})}),d.jsx(Ln,{label:"Forget this host",children:d.jsx(Ze,{variant:"ghost",size:"icon","aria-label":`Remove ${e.label}`,className:"text-muted-foreground hover:text-destructive",disabled:m,onClick:()=>c(e),children:d.jsx(vu,{})})})]})]}),e.state.lastError&&!e.state.connected&&d.jsx("p",{role:"status",className:"rounded-md bg-destructive/10 px-3 py-2 text-xs text-destructive",children:d.jsx(Xn,{text:e.state.lastError})}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs(Ze,{size:"sm",variant:u?"default":"outline",disabled:m,onClick:()=>s(e),children:[n==="install"?d.jsx(wi,{className:"animate-spin"}):d.jsx(xu,{}),e.daemonVersion===null?"Install GitWarren":u?"Update GitWarren":"Reinstall"]}),e.instanceId!==null&&d.jsxs(Ze,{size:"sm",variant:"outline",disabled:m,onClick:()=>An({name:"repositories",host:e.instanceId}),children:["Repositories",d.jsx(_o,{})]}),e.daemonVersion===null&&d.jsxs("p",{className:"text-xs text-muted-foreground",children:[d.jsx(jh,{className:"mr-1 inline size-3 align-[-2px]"}),"The host needs nothing but git — GitWarren is sent over the same connection."]})]})]})}const Tu={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},m2={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},H6={disabled:!1,...m2},Bs={valid(e){return e===null?null:e?{"data-valid":""}:{"data-invalid":""}}},p2={invalid:void 0,name:void 0,validityData:{state:Tu,errors:[],error:"",value:"",initialValue:null},setValidityData:fn,disabled:void 0,setTouched:fn,setDirty:fn,setFilled:fn,setFocused:fn,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:H6,registerFieldControl:fn,validation:{getValidationProps:(e,t=wn)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:fn,getInputControl:()=>null,commit:async()=>{},change:fn}},Hb=w.createContext(p2);function qi(e=!0){const t=w.useContext(Hb);if(t.setValidityData===fn&&!e)throw new Error(En(28));return t}const B6=w.createContext(void 0);function V6(e=!1){const t=w.useContext(B6);if(!t&&!e)throw new Error(En(86));return t}const U6=w.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:fn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Vs(){return w.useContext(U6)}const g2=w.createContext({controlId:void 0,registerControlId:fn,labelId:void 0,setLabelId:fn,messageIds:[],setMessageIds:fn,getDescriptionProps:e=>e});function ki(){return w.useContext(g2)}const Z6=function(t){const n=Or(),i=t.controlId===void 0?n:t.controlId,[s,l]=w.useState(i),[c,u]=w.useState(t.labelId),[m,h]=w.useState([]),p=Jn(()=>new Map),{messageIds:g}=ki(),y=Ae((k,E)=>{const C=p.current;if(E===void 0){C.delete(k);return}C.set(k,E),l(T=>{if(C.size===0)return;let R;for(const N of C.values()){if(T!==void 0&&N===T)return T;R===void 0&&(R=N)}return R})}),b=w.useCallback(k=>{const E=k["aria-describedby"]?k["aria-describedby"].split(" "):[];return E.push(...g,...m),{...k,"aria-describedby":Array.from(new Set(E)).join(" ")||void 0}},[g,m]),S=w.useMemo(()=>({controlId:s,registerControlId:y,labelId:c,setLabelId:u,messageIds:m,setMessageIds:h,getDescriptionProps:b}),[s,y,c,u,m,h,b]);return d.jsx(g2.Provider,{value:S,children:t.children})};function x2(e,t,n,i=!0,s){const[l,c]=w.useState(),u=Or(s?`${s}-label`:void 0),m=e??t??l;return ze(()=>{const h=e||t||!i?void 0:q6(n.current,u);l!==h&&c(h)}),m}function q6(e,t){const n=G6(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function G6(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const s=e.nextElementSibling;if(s&&s.htmlFor===n)return s}const i=e.labels;return i&&i[0]}function qa(e={}){const{id:t,implicit:n=!1,controlRef:i}=e,{controlId:s,registerControlId:l}=ki(),c=Or(t),u=n?s:void 0,m=Jn(()=>Symbol()),h=w.useRef(!1),p=w.useRef(t!=null),g=Ae(()=>{!h.current||l===fn||(h.current=!1,l(m.current,void 0))});return ze(()=>{if(l===fn)return;let y;if(n){const b=i?.current;Rt(b)&&b.closest("label")!=null?y=t??null:y=u??c}else if(t!=null)p.current=!0,y=t;else if(p.current)y=c;else{g();return}if(y===void 0){g();return}h.current=!0,l(m.current,y)},[t,i,u,l,n,c,m,g]),w.useEffect(()=>g,[g]),s??c}function Y6(e,t){const n=Or(e);return ze(()=>(t(n),()=>{t(i=>i===n?void 0:i)}),[n,t]),n}function K6(e={}){const{id:t,fallbackControlId:n,native:i=!1,setLabelId:s,focusControl:l}=e,{controlId:c,setLabelId:u}=ki(),m=Ae(b=>{u(b),s?.(b)}),h=Y6(t,m),p=c??n;function g(b){if(l){l(b,p);return}if(!p)return;const S=Dt(b.currentTarget).getElementById(p);en(S)&&X6(S)}function y(b){Mn(b.nativeEvent)?.closest("button,input,select,textarea")||(!b.defaultPrevented&&b.detail>1&&b.preventDefault(),!i&&g(b))}return i?{id:h,htmlFor:p??void 0,onMouseDown:y}:{id:h,onClick:y,onPointerDown(b){b.preventDefault()}}}function X6(e){e.focus({focusVisible:!0})}function wy(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const ux=Object.keys(Tu);function J6(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}function Pk(e,t){let n=null;for(const i of e.keys())if(J6(i,t)){if(!i.validity.valid)return i;n??=i}return n}function Lk(e,t){for(const n of t.keys())n.setCustomValidity("");e?.setCustomValidity("")}function W6(e){const{elementRef:t,formRef:n}=Vs(),{setValidityData:i,validate:s,validityData:l,validationDebounceTime:c,invalid:u,markedDirtyRef:m,state:h,shouldValidateOnChange:p,registeredFieldIdRef:g}=e,{controlId:y,getDescriptionProps:b}=ki(),S=kr(),k=w.useRef(null),E=Jn(()=>new Map).current,C=w.useRef(0),T=w.useCallback((P,A)=>(E.set(P,A),()=>{E.delete(P)}),[E]),R=Ae(()=>{const P=Pk(E,t.current);return P&&E.get(P)?.controlRef.current||null}),N=Ae(async(P,A=!1)=>{C.current+=1;const L=C.current;function D(O,_=u){const Z=g.current??y;if(Z==null)return;const z=n.current.fields.get(Z);if(!z)return;const J=wy(O,_);n.current.fields.set(Z,{...z,validityData:J})}function U(O,_){const Z={value:P,state:{...Tu,valid:!0},error:"",errors:[],initialValue:l.initialValue};Lk(O,E),D(Z,_),i(Z)}const q=E.size>0?Pk(E,t.current):k.current;if(A){if(h.valid!==!1||!q)return;const O=q.validity;if(!O.valueMissing){U(q,!1);return}for(const _ of ux)if(_!=="valid"&&_!=="valueMissing"&&_!=="customError"&&O[_])return}function K(O){const _=ux.reduce((z,J)=>(z[J]=O.validity[J],z),{});let Z=!1;for(const z of ux)if(z!=="valid"){if(z==="valueMissing"&&_[z])Z=!0;else if(_[z])return _}return Z&&!m.current&&(_.valid=!0,_.valueMissing=!1),_}S.clear();let G=null,B=[];const F=q?K(q):{...Tu,valid:!0};let V;const Y=p();if(q&&q.validationMessage&&!Y)V=q.validationMessage,B=[q.validationMessage];else{const O=Array.from(n.current.fields.values()).reduce((Z,z)=>(z.name&&(Z[z.name]=z.getValue()),Z),{}),_=s(P,O);if(typeof _=="object"&&_!==null&&"then"in _){if(G=await _,L!==C.current)return}else G=_;G!==null?(F.valid=!1,F.customError=!0,Array.isArray(G)?(B=G,q?.setCustomValidity(G.join(`
|
|
13
|
+
`))):G&&(B=[G],q?.setCustomValidity(G))):Y&&(Lk(q,E),F.customError=!1,q&&q.validationMessage?(V=q.validationMessage,B=[q.validationMessage]):(!q||q.validity.valid)&&!F.valid&&(F.valid=!0))}const te={value:P,state:F,error:V??(Array.isArray(G)?G[0]:G??""),errors:B,initialValue:l.initialValue};D(te),i(te)}),I=Ae(P=>{S.clear();const A=p();A&&P!==""&&c?(C.current+=1,S.start(c,()=>{N(P)})):N(P,!A)}),M=w.useCallback((P,A={})=>bi(b(A),h.valid===!1&&!h.disabled&&!P?{"aria-invalid":!0}:wn),[b,h.disabled,h.valid]);return w.useMemo(()=>({getValidationProps:M,inputRef:k,registeredInputs:E,registerInput:T,getInputControl:R,commit:N,change:I}),[M,E,T,R,N,I])}function $6(e){const{commit:t,invalid:n,markedDirtyRef:i,name:s,setRegisteredFieldName:l,registeredFieldIdRef:c,setValidityData:u,validityData:m}=e,{formRef:h}=Vs(),p=w.useRef(null),g=w.useRef(null),y=w.useRef(!1),b=Ae(()=>{const N=g.current;if(N)return N.getValue?N.getValue():N.value});function S(N){return N.value===void 0?b():N.value}const k=Ae(()=>{const N=g.current;if(i.current=!0,!N){t(m.value);return}t(S(N))});function E(){const N=g.current;!N||!N.id||h.current.fields.set(N.id,{getValue:b,name:s??N.name,controlRef:N.controlRef,validityData:wy(m,n),validate:k})}function C(N=g.current?.id){N&&h.current.fields.delete(N)}function T(N){if(y.current)return;y.current=!0;const I=S(N);u(M=>M.initialValue===I?M:{...M,initialValue:I})}ze(()=>{const N=g.current;!N||!N.id||(l(s?void 0:N.name),h.current.fields.set(N.id,{getValue:b,name:s??N.name,controlRef:N.controlRef,validityData:wy(m,n),validate:k}))},[h,b,n,s,l,k,m]),ze(()=>{const N=h.current.fields;return()=>{const I=g.current?.id;I&&N.delete(I)}},[h]);const R=Ae((N,I)=>{if(!I){p.current===N&&(p.current=null,C(),g.current=null,l(void 0),c.current=void 0);return}const M=g.current?.id;p.current=N,g.current=I,s||l(I.name),c.current=I.id,M&&M!==I.id&&C(M),T(I),E()});return[k,R]}const Q6=w.forwardRef(function(t,n){const{errors:i,validationMode:s,submitAttemptedRef:l}=Vs(),{render:c,className:u,validate:m,validationDebounceTime:h=0,validationMode:p=s,name:g,disabled:y=!1,invalid:b,dirty:S,touched:k,actionsRef:E,style:C,...T}=t,R=V6(!0)?.disabled,N=Ae(m||(()=>null)),I=R||y,[M,P]=w.useState(!1),[A,L]=w.useState(!1),[D,U]=w.useState(!1),[q,K]=w.useState(!1),G=S??A,B=k??M,F=w.useRef(G),V=w.useRef(void 0),[Y,te]=w.useState(),O=g??Y;ze(()=>{S!==void 0&&(F.current=S)},[S]);const _=Ae(Me=>{S===void 0&&(Me&&(F.current=!0),L(Me))}),Z=Ae(Me=>{k===void 0&&P(Me)}),z=Ae(()=>p==="onChange"||p==="onSubmit"&&l.current),J=O&&Object.hasOwn(i,O)?i[O]:null,ne=!!(Array.isArray(J)?J.length:J),W=b===!0||ne,[fe,ie]=w.useState({state:Tu,error:"",errors:[],value:null,initialValue:null}),se=!W&&(I?null:fe.state.valid),Se=w.useMemo(()=>({disabled:I,touched:B,dirty:G,valid:se,filled:D,focused:q}),[I,B,G,se,D,q]),ye=W6({setValidityData:ie,validate:N,validityData:fe,validationDebounceTime:h,invalid:W,markedDirtyRef:F,state:Se,shouldValidateOnChange:z,registeredFieldIdRef:V}),[xe,ve]=$6({commit:ye.commit,invalid:W,markedDirtyRef:F,name:g,setRegisteredFieldName:te,registeredFieldIdRef:V,setValidityData:ie,validityData:fe});w.useImperativeHandle(E,()=>({validate:xe}),[xe]);const Re=w.useMemo(()=>({invalid:W,name:O,validityData:fe,setValidityData:ie,disabled:I,setTouched:Z,setDirty:_,setFilled:U,setFocused:K,validationMode:p,shouldValidateOnChange:z,state:Se,registerFieldControl:ve,validation:ye}),[W,O,fe,I,Z,_,U,K,p,z,Se,ve,ye]),De=jt("div",t,{ref:n,state:Se,props:T,stateAttributesMapping:Bs});return d.jsx(Hb.Provider,{value:Re,children:De})}),eF=w.forwardRef(function(t,n){return d.jsx(Z6,{children:d.jsx(Q6,{...t,ref:n})})}),tF=w.createContext({disabled:!1});function Bb(){return w.useContext(tF)}const nF=w.forwardRef(function(t,n){const{render:i,className:s,style:l,id:c,nativeLabel:u=!0,...m}=t,h=qi(!1),p=Bb(),{labelId:g}=ki(),y={...h.state,disabled:h.disabled||p.disabled},b=w.useRef(null),S=K6({id:g??c,native:u});return jt("label",t,{ref:[n,b],state:y,props:[S,m],stateAttributesMapping:Bs})}),rF=w.forwardRef(function(t,n){const{render:i,id:s,className:l,style:c,...u}=t,m=Or(s),h=qi(!1),p=Bb(),{setMessageIds:g}=ki(),y={...h.state,disabled:h.disabled||p.disabled};return ze(()=>{if(m)return g(S=>S.concat(m)),()=>{g(S=>S.filter(k=>k!==m))}},[m,g]),jt("p",t,{ref:n,state:y,props:[{id:m},u],stateAttributesMapping:Bs})});function Yu(e,t,n,i,s=!0,l){const{registerFieldControl:c}=qi(),u=Jn(()=>Symbol());ze(()=>{const m=u.current;if(!s){c(m,void 0);return}c(m,{controlRef:e,getValue:i,id:t,name:l,value:n})},[e,s,i,t,l,c,u,n]),ze(()=>{const m=u.current;return()=>{c(m,void 0)}},[c,u])}const iF=w.forwardRef(function(t,n){const{render:i,className:s,id:l,name:c,value:u,disabled:m=!1,onValueChange:h,defaultValue:p,autoFocus:g=!1,style:y,...b}=t,{state:S,name:k,disabled:E,setTouched:C,setDirty:T,validityData:R,setFocused:N,setFilled:I,validationMode:M,validation:P}=qi(),{clearErrors:A}=Vs(),L=E||m,D=k??c,U={...S,disabled:L},{labelId:q}=ki(),K=qa({id:l});ze(()=>{const O=u!=null;P.inputRef.current?.value||O&&u!==""?I(!0):O&&u===""&&I(!1)},[P.inputRef,I,u]);const G=w.useRef(null);ze(()=>{g&&G.current===wr(Dt(G.current))&&N(!0)},[g,N]);const[B]=Do({controlled:u,default:p,name:"FieldControl",state:"value"}),F=u!==void 0,V=F?B:void 0,Y=Ae(()=>P.inputRef.current?.value);return Yu(P.inputRef,K,V,Y,!L,c),jt("input",t,{ref:[n,G],state:U,props:[{id:K,disabled:L,name:D,ref:P.inputRef,"aria-labelledby":q,autoFocus:g,...F?{value:V}:{defaultValue:p},onChange(O){const _=O.currentTarget.value;h?.(_,Xe(On,O.nativeEvent)),T(_!==(R.initialValue??"")),I(_!==""),O.nativeEvent.defaultPrevented||(A(D),P.change(_))},onFocus(){N(!0)},onBlur(O){C(!0),N(!1),M==="onBlur"&&P.commit(O.currentTarget.value)},onKeyDown(O){O.currentTarget.tagName==="INPUT"&&O.key==="Enter"&&(C(!0),P.commit(O.currentTarget.value))}},b,O=>P.getValidationProps(L,O)],stateAttributesMapping:Bs})});function Ii({className:e,...t}){return d.jsx(eF,{className:Te("flex flex-col gap-1.5",e),...t})}function Di({className:e,...t}){return d.jsx(nF,{className:Te("text-sm font-medium leading-none text-foreground",e),...t})}function Cs({className:e,...t}){return d.jsx(rF,{className:Te("text-xs text-muted-foreground",e),...t})}function El({children:e}){return e?d.jsx("p",{role:"alert",className:"text-xs font-medium text-destructive",children:e}):null}const oF=w.forwardRef(function(t,n){return d.jsx(iF,{ref:n,...t})});function Os({className:e,...t}){return d.jsx(oF,{className:Te("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors","placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50","data-[invalid]:border-destructive",e),...t})}function y2(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>t.indexOf(+i)===-1).map(([i,s])=>s)}function Fk(e,t="|"){return e.map(n=>w2(n)).join(t)}function Sy(e,t){return typeof t=="bigint"?t.toString():t}function Vb(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function sF(e){return e==null}function Ub(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function lF(e,t){const n=e/t,i=Math.round(n),s=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<s?0:n-i}function ri(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Us(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function aF(e){return JSON.stringify(e)}function cF(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const b2="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function fh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const uF=Vb(()=>{if(oo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ru(e){if(fh(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(fh(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function v2(e){return Ru(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const fF=new Set(["string","number","symbol"]);function sm(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zs(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function ot(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new 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 w2(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function dF(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const hF={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function mF(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=Us(e._zod.def,{get shape(){const c={};for(const u of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,u))throw new Error(`Unrecognized key: "${String(u)}"`);t[u]&&ri(c,u,n.shape[u])}return ri(this,"shape",c),c},checks:[]});return Zs(e,l)}function pF(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=Us(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const u of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,u))throw new Error(`Unrecognized key: "${String(u)}"`);t[u]&&delete c[u]}return ri(this,"shape",c),c},checks:[]});return Zs(e,l)}function gF(e,t){if(!Ru(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const l=e._zod.def.shape;for(const c of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Us(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return ri(this,"shape",l),l}});return Zs(e,s)}function xF(e,t){if(!Ru(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Us(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return ri(this,"shape",i),i}});return Zs(e,n)}function yF(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Us(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return ri(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Zs(e,n)}function Hk(e,t,n,i="partial"){const l=t._zod.def.checks;if(l&&l.length>0)throw new Error(`.${i}() cannot be used on object schemas containing refinements`);const u=Us(t._zod.def,{get shape(){const m=t._zod.def.shape,h={...m};if(n)for(const p of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(m,p))throw new Error(`Unrecognized key: "${String(p)}"`);n[p]&&(h[p]=e?new e({type:"optional",innerType:m[p]}):m[p])}else for(const p of Reflect.ownKeys(m))h[p]=e?new e({type:"optional",innerType:m[p]}):m[p];return ri(this,"shape",h),h},checks:[]});return Zs(t,u)}function bF(e,t,n){const i=Us(t._zod.def,{get shape(){const s=t._zod.def.shape,l={...s};if(n)for(const c of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(l,c))throw new Error(`Unrecognized key: "${String(c)}"`);n[c]&&(l[c]=new e({type:"nonoptional",innerType:s[c]}))}else for(const c of Reflect.ownKeys(s))l[c]=new e({type:"nonoptional",innerType:s[c]});return ri(this,"shape",l),l}});return Zs(t,i)}function ka(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 vF(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 S2(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function $c(e){return typeof e=="string"?e:e?.message}function Bk(e,t,n){var i;for(let s=t;s<e.length;s++)(i=e[s]).schema??(i.schema=n)}function Ga(e,t,n){var i;const s=e.inst?._zod?.traits;s?.has("$ZodType")&&(s.has("$ZodCheck")?(i=e).schema??(i.schema=e.inst):e.schema=e.inst);const l=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,c=e.message?e.message:$c(e.inst?._zod.def?.error?.(e))??$c(l?.(e))??$c(t?.error?.(e))??$c(n.customError?.(e))??$c(n.localeError?.(e))??"Invalid input",{inst:u,schema:m,continue:h,input:p,...g}=e;return g.path??(g.path=[]),g.message=c,t?.reportInput&&(g.input=p),g}const wF=/[\uD800-\uDBFF]/;function Zb(e){const t=e.length;if(!wF.test(e))return t;let n=t;for(let i=0;i<t-1;i++)(e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320&&(n--,i++);return n}function qb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function SF(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function ju(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function kF(e,t){for(const n in t){const i=Object.getOwnPropertyDescriptor(t,n);i.get?Object.defineProperty(e,n,{...i,enumerable:!1}):EF(e,n,i.value)}}function Ia(e,t,n,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:n}),n}function k2(e,t,n){return Ia(e,t,n,!1)}function EF(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ia(this,t,n.bind(this))},set(i){Ia(this,t,i)}})}function CF(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let fx,ws=!1;const TF={configurable:!0,get(){ws=!0}};function dn(e,t,n){const i=Object.getPrototypeOf(e._zod);if(t in i&&fx!==e._zod){fx=void 0;return}fx=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,TF);const s=ws;ws=!1;try{const l=n(this);return ws?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:l}),ws=ws||s,l}catch(l){throw delete this[t],ws=ws||s,l}},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s})}})}function RF(e,t,n,i){const s=CF(e,t);s&&Object.defineProperty(s,t,{configurable:!0,get(){const l={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,l),l.value=n(this),Object.defineProperty(this,t,l),l.value},set(l){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:l})}})}const jF="~constantCatch";function NF(e){const t=()=>e;return t[jF]=!0,t}var Vk;const dx={value:void 0,enumerable:!1};let Uk="captureStackTrace"in Error?Error:null;function OF(e){const t=Uk;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Uk=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Ce(e,t,n,i){const s={};function l(y){this.def=y,this.constr=g,this.traits=new Set}l.prototype=s;const c=n,u=c&&new WeakSet;function m(y,b){if(!y._zod){dx.value=new l(b);try{Object.defineProperty(y,"_zod",dx)}finally{dx.value=void 0}}if(y._zod.traits.has(e))return;if(y._zod.traits.add(e),t(y,b),u){const k=Object.getPrototypeOf(y),E=y._zod.constr.prototype;let C=k;for(;C&&C!==E;)C=Object.getPrototypeOf(C);const T=C??k;u.has(T)||(u.add(T),kF(T,c))}const S=g.prototype;for(const k in S)Object.prototype.hasOwnProperty.call(S,k)&&(k in y||(y[k]=S[k].bind(y)))}const h=i?.Parent??Object;class p extends h{}Object.defineProperty(p,"name",{value:e});function g(y){const b=i?.Parent?OF(p):this;m(b,y);const S=b._zod.deferred;if(S){for(const E of S)E();b._zod.deferred=void 0}const k=globalThis.__zod_globalConfig?.postProcessor;return k&&k(b),b}return Object.defineProperty(g,"init",{value:m}),Object.defineProperty(g,Symbol.hasInstance,{value:y=>i?.Parent&&y instanceof i.Parent?!0:y?._zod?.traits?.has(e)}),Object.defineProperty(g,"name",{value:e}),g}class Ra extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class E2 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Vk=globalThis).__zod_globalConfig??(Vk.__zod_globalConfig={});const oo=globalThis.__zod_globalConfig;function qs(e){return e&&Object.assign(oo,e),oo}function AF(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Sy,2)),e.message}function MF(e){this._zod.message=e}const zF={get:AF,set:MF,enumerable:!0,configurable:!0},hx={value:void 0,enumerable:!1},mx={value:void 0,enumerable:!1},Zk=new WeakSet([Object.prototype,Error.prototype]),C2=(e,t)=>{e.name="$ZodError",hx.value=e._zod,Object.defineProperty(e,"_zod",hx),mx.value=t,Object.defineProperty(e,"issues",mx),hx.value=void 0,mx.value=void 0,Object.defineProperty(e,"message",zF);const n=Object.getPrototypeOf(e);Zk.has(n)||(Zk.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}}))},T2=Ce("$ZodError",C2),R2=Ce("$ZodError",C2,void 0,{Parent:Error});function IF(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function j2(e,t=n=>n.message){const n={},i=[];for(const s of e.issues)s.path.length>0?IF(n,s.path[0],()=>[]).push(t(s)):i.push(t(s));return{formErrors:i,fieldErrors:n}}function DF(e,t=n=>n.message){const n={_errors:[]},i=(s,l=[])=>{for(const c of s.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>i({issues:u},[...l,...c.path]));else if(c.code==="invalid_key")i({issues:c.issues},[...l,...c.path]);else if(c.code==="invalid_element")i({issues:c.issues},[...l,...c.path]);else{const u=[...l,...c.path];if(u.length===0)n._errors.push(t(c));else{let m=n,h=0;for(;h<u.length;){const p=u[h],g=h===u.length-1;if(p==="_errors"){g&&m._errors.push(t(c)),h++;continue}Object.prototype.hasOwnProperty.call(m,p)||Object.defineProperty(m,p,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const y=m[p];g&&y._errors.push(t(c)),m=y,h++}}}};return i(e),n}function lm(e,t){return{callee:t?.callee??e,Err:t?.Err}}const Gb=e=>{const t=(n,i,s,l)=>{const c=s?{...s,async:!1}:{async:!1},u=n._zod.run({value:i,issues:[]},c);if(u instanceof Promise)throw new Ra;if(u.issues.length){const m=new(l?.Err??e)(u.issues.map(h=>Ga(h,c,qs())));throw b2(m,l?.callee??t),m}return u.value};return t},Yb=e=>{const t=async(n,i,s,l)=>{const c=s?{...s,async:!0}:{async:!0};let u=n._zod.run({value:i,issues:[]},c);if(u instanceof Promise&&(u=await u),u.issues.length){const m=new(l?.Err??e)(u.issues.map(h=>Ga(h,c,qs())));throw b2(m,l?.callee??t),m}return u.value};return t},am=e=>(t,n,i)=>{const s=i?{...i,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new Ra;return l.issues.length?{success:!1,error:new(e??T2)(l.issues.map(c=>Ga(c,s,qs())))}:{success:!0,data:l.value}},_F=am(R2),cm=e=>async(t,n,i)=>{const s=i?{...i,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},s);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(c=>Ga(c,s,qs())))}:{success:!0,data:l.value}},PF=cm(R2),LF=e=>{const t=Gb(e),n=(i,s,l,c)=>{const u=l?{...l,direction:"backward"}:{direction:"backward"};return t(i,s,u,lm(n,c))};return n},FF=e=>{const t=Gb(e),n=(i,s,l,c)=>t(i,s,l,lm(n,c));return n},HF=e=>{const t=Yb(e),n=async(i,s,l,c)=>{const u=l?{...l,direction:"backward"}:{direction:"backward"};return await t(i,s,u,lm(n,c))};return n},BF=e=>{const t=Yb(e),n=async(i,s,l,c)=>await t(i,s,l,lm(n,c));return n},VF=e=>(t,n,i)=>{const s=i?{...i,direction:"backward"}:{direction:"backward"};return am(e)(t,n,s)},UF=e=>(t,n,i)=>am(e)(t,n,i),ZF=e=>async(t,n,i)=>{const s=i?{...i,direction:"backward"}:{direction:"backward"};return cm(e)(t,n,s)},qF=e=>async(t,n,i)=>cm(e)(t,n,i),GF=/^[cC][0-9a-z]{6,}$/,YF=/^[0-9a-z]+$/,KF=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,XF=/^[0-9a-vA-V]{20}$/,JF=/^[A-Za-z0-9]{27}$/,WF=/^[a-zA-Z0-9_-]{21}$/;function $F(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const QF=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,e8=/^([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})$/,qk=e=>e?new 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)$/,t8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,n8="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function r8(){return new RegExp(n8,"u")}const i8=/^(?:(?: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])$/,o8=/^(([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}|:))$/,s8=/^((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])$/,l8=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,a8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,N2=/^[A-Za-z0-9_-]*$/,c8=/^https?$/,u8=/^\+[1-9]\d{6,14}$/,O2="(?:(?:\\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])))";function f8(e){return new RegExp(`^${e}$`)}const d8=f8(O2);function ky(e){const 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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function h8(e){return new RegExp(`^${ky(e)}$`)}function m8(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${ky({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,i=e.local?`${n}|${ky({precision:e.precision})}`:n;return new RegExp(`^${O2}T(?:${i})$`)}const p8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},g8=/^-?\d+$/,x8=/^-?\d+(?:\.\d+)?$/,y8=/^(?:true|false)$/i,b8=/^[^A-Z]*$/,v8=/^[^a-z]*$/,Hr=Ce("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Kb=e=>{const t=e.value;return!sF(t)&&t.length!==void 0},dh={number:"number",bigint:"bigint",object:"date"},A2=Ce("$ZodCheckLessThan",(e,t)=>{Hr.init(e,t);const n=dh[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,l=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:dh[typeof i.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),M2=Ce("$ZodCheckGreaterThan",(e,t)=>{Hr.init(e,t);const n=dh[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,l=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:dh[typeof i.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),w8=Ce("$ZodCheckMultipleOf",(e,t)=>{Hr.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):lF(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})}}),S8=Ce("$ZodCheckNumberFormat",(e,t)=>{Hr.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[s,l]=hF[t.format];e._zod.onattach.push(c=>{const u=c._zod.bag;u.format=t.format,u.minimum=s,u.maximum=l,n&&(u.pattern=g8)}),e._zod.check=c=>{const u=c.value;if(n){if(!Number.isInteger(u)){c.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):c.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}u<s&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),u>l&&c.issues.push({origin:"number",input:u,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),k8=Ce("$ZodCheckMaxLength",(e,t)=>{var n;Hr.init(e,t),(n=e._zod.def).when??(n.when=Kb),e._zod.onattach.push(i=>{const s=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const s=i.value,l=s.length;if((typeof s=="string"&&l>t.maximum?Zb(s):l)<=t.maximum)return;const u=qb(s);i.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),E8=Ce("$ZodCheckMinLength",(e,t)=>{var n;Hr.init(e,t),(n=e._zod.def).when??(n.when=Kb),e._zod.onattach.push(i=>{const s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const s=i.value,l=s.length;if((typeof s=="string"&&l>=t.minimum&&l<t.minimum*2?Zb(s):l)>=t.minimum)return;const u=qb(s);i.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),C8=Ce("$ZodCheckLengthEquals",(e,t)=>{var n;Hr.init(e,t),(n=e._zod.def).when??(n.when=Kb),e._zod.onattach.push(i=>{const s=i._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=i=>{const s=i.value,l=s.length,c=typeof s=="string"&&l>=t.length&&l<=t.length*2?Zb(s):l;if(c===t.length)return;const u=qb(s),m=c>t.length;i.issues.push({origin:u,...m?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),um=Ce("$ZodCheckStringFormat",(e,t)=>{var n,i;Hr.init(e,t),e._zod.onattach.push(s=>{const l=s._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),T8=Ce("$ZodCheckRegex",(e,t)=>{um.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})}}),R8=Ce("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=b8),um.init(e,t)}),j8=Ce("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=v8),um.init(e,t)}),N8=Ce("$ZodCheckIncludes",(e,t)=>{Hr.init(e,t);const n=sm(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=i,e._zod.onattach.push(s=>{const l=s._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),O8=Ce("$ZodCheckStartsWith",(e,t)=>{Hr.init(e,t);const n=new RegExp(`^${sm(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),A8=Ce("$ZodCheckEndsWith",(e,t)=>{Hr.init(e,t);const n=new RegExp(`.*${sm(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),M8=Ce("$ZodCheckOverwrite",(e,t)=>{Hr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class z8{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
14
|
+
`).filter(c=>c),s=Math.min(...i.map(c=>c.length-c.trimStart().length)),l=i.map(c=>c.slice(s)).map(c=>" ".repeat(this.indent*2)+c);for(const c of l)this.content.push(c)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
15
|
+
${n.join(`
|
|
16
|
+
`)}
|
|
17
|
+
};`)(...Object.values(this.closed))}}const I8={major:4,minor:5,patch:4},Fn=Ce("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=I8;const i=e._zod.def.checks,s=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(const l of s)for(const c of l._zod.onattach)c(e);if(s.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const l=(u,m,h)=>{if(u.memo)return u;let p=ka(u),g;for(const y of m){if(y._zod.def.when){if(vF(u)||!y._zod.def.when(u))continue}else if(p)continue;const b=u.issues.length,S=y._zod.check(u);if(S instanceof Promise&&h?.async===!1)throw new Ra;if(g||S instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await S,u.issues.length!==b&&(Bk(u.issues,b,e),p||(p=ka(u,b)))});else{if(u.issues.length===b)continue;Bk(u.issues,b,e),p||(p=ka(u,b))}}return g?g.then(()=>u):u},c=(u,m,h)=>{if(ka(u))return u.aborted=!0,u;const p=l(m,s,h);if(p instanceof Promise){if(h.async===!1)throw new Ra;return p.then(g=>e._zod.parse(g,h))}return e._zod.parse(p,h)};e._zod.run=(u,m)=>{if(m.skipChecks)return e._zod.parse(u,m);if(m.direction==="backward"){const p=e._zod.parse({value:u.value,issues:[]},{...m,skipChecks:!0});return p instanceof Promise?p.then(g=>c(g,u,m)):c(p,u,m)}const h=e._zod.parse(u,m);if(h instanceof Promise){if(m.async===!1)throw new Ra;return h.then(p=>l(p,s,m))}return l(h,s,m)}}},{get"~standard"(){return k2(this,"~standard",z2(this))},set"~standard"(e){Ia(this,"~standard",e)}}),Gk=e=>e.success?{value:e.data}:{issues:e.error?.issues};function z2(e){return{validate:t=>{try{return Gk(_F(e,t))}catch{return PF(e,t).then(Gk)}},vendor:"zod",version:1}}const Xb=Ce("$ZodString",(e,t)=>{Fn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??p8(e._zod.bag),e._zod.parse=(n,i)=>{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}}),Cn=Ce("$ZodStringFormat",(e,t)=>{um.init(e,t),Xb.init(e,t)}),D8=Ce("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=e8),Cn.init(e,t)}),_8=Ce("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qk(i))}else t.pattern??(t.pattern=qk());Cn.init(e,t)}),P8=Ce("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=t8),Cn.init(e,t)}),I2=1,D2=2;function L8(e,t){if(!t.normalize&&t.protocol?.source===c8.source&&!/^https?:\/\//i.test(e))return I2;try{return new URL(e)}catch{return D2}}const F8=/[\t\n\r]/g;function H8(e){return e.replace(F8,"")}function B8(e,t){return t.lastIndex=0,t.test(e.hostname)}function V8(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const U8=Ce("$ZodURL",(e,t)=>{Cn.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),s=L8(i,t);if(s===I2){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(s===D2){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!B8(s,t.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&&!V8(s,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?s.href:H8(i);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Z8=Ce("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=r8()),Cn.init(e,t)}),q8=Ce("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?WF:$F(t.length)),Cn.init(e,t)}),G8=Ce("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=GF),Cn.init(e,t)}),Y8=Ce("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=YF),Cn.init(e,t)}),K8=Ce("$ZodULID",(e,t)=>{t.pattern??(t.pattern=KF),Cn.init(e,t)}),X8=Ce("$ZodXID",(e,t)=>{t.pattern??(t.pattern=XF),Cn.init(e,t)}),J8=Ce("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=JF),Cn.init(e,t)}),W8=Ce("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=m8(t)),Cn.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(n=>{n._zod.bag.laxFormat=!0}))}),$8=Ce("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=d8),Cn.init(e,t)}),Q8=Ce("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=h8(t)),Cn.init(e,t)}),e9=Ce("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=QF),Cn.init(e,t)}),t9=Ce("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=i8),Cn.init(e,t),e._zod.bag.format="ipv4"}),n9=/^[0-9a-fA-F:.]+$/;function _2(e){if(!n9.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}const r9=Ce("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=o8),Cn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{_2(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),i9=Ce("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=s8),Cn.init(e,t)});function o9(e){const t=e.split("/");if(t.length!==2)return!1;const[n,i]=t;if(!i)return!1;const s=Number(i);return`${s}`!==i||s<0||s>128?!1:_2(n)}const s9=Ce("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=l8),Cn.init(e,t),e._zod.check=n=>{o9(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function P2(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const l9=Ce("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=a8),Cn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{P2(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function a9(e){if(!N2.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return P2(n)}const c9=Ce("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=N2),Cn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{a9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),u9=Ce("$ZodE164",(e,t)=>{t.pattern??(t.pattern=u8),Cn.init(e,t)});function f9(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const s=JSON.parse(atob(i));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const d9=Ce("$ZodJWT",(e,t)=>{Cn.init(e,t),e._zod.check=n=>{f9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),L2=Ce("$ZodNumber",(e,t)=>{Fn.init(e,t),e._zod.pattern=e._zod.bag.pattern??x8,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const l=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:String(s):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...l?{received:l}:{}}),n}}),h9=Ce("$ZodNumberFormat",(e,t)=>{S8.init(e,t),L2.init(e,t)}),m9=Ce("$ZodBoolean",(e,t)=>{Fn.init(e,t),e._zod.pattern=y8,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),p9=Ce("$ZodUnknown",(e,t)=>{Fn.init(e,t),e._zod.parse=n=>n}),g9=Ce("$ZodNever",(e,t)=>{Fn.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Yk(e,t,n){e.issues.length&&t.issues.push(...S2(n,e.issues)),t.value[n]=e.value}const x9=Ce("$ZodArray",(e,t)=>{Fn.init(e,t);const n=oo.memoizer;n?.attach(e),e._zod.parse=(i,s)=>{const l=i.value;if(!Array.isArray(l))return i.issues.push({expected:"array",code:"invalid_type",input:l,inst:e}),i;i.value=n?n.alloc(e,i,Array(l.length),s):Array(l.length);const c=[];for(let u=0;u<l.length;u++){const m=l[u],h=t.element._zod.run({value:m,issues:[]},s);h instanceof Promise?c.push(h.then(p=>Yk(p,i,u))):Yk(h,i,u)}return c.length?Promise.all(c).then(()=>i):i}});function hh(e,t,n,i,s,l){const c=n in i,u=l==="optional";if(!(!c&&u&&s==="optional")){if(e.issues.length){if(s!==void 0&&u&&!c)return;t.issues.push(...S2(n,e.issues))}if(!c&&s===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?c&&(t.value[n]=void 0):t.value[n]=e.value}}const y9=[];function F2(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),i=n.length?n:y9,s=i.length?[...t,...i]:t;for(const c of s)if(!e.shape?.[c]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(c)}": expected a Zod schema`);const l=dF(e.shape);return{...e,allKeys:s,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(l)}}function H2(e,t,n,i,s,l){const c=[],u=s.keySet,m=s.catchall._zod,h=m.def.type,p=m.optin,g=m.optout;for(const y in t){if(u.has(y))continue;if(y==="__proto__"){h==="never"&&c.push(y);continue}if(h==="never"){c.push(y);continue}const b=m.run({value:t[y],issues:[]},i);b instanceof Promise?e.push(b.then(S=>hh(S,n,y,t,p,g))):hh(b,n,y,t,p,g)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:l,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const Kk=new WeakMap,b9=Ce("$ZodObject",(e,t)=>{if(Fn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const m=t.shape;Kk.set(t,m),Object.defineProperty(t,"shape",{get:()=>{const h={...m};return Object.defineProperty(t,"shape",{value:h}),Kk.set(t,h),h}})}const i=Vb(()=>F2(t));dn(e,"propValues",m=>{const h=m.def.shape,p={};for(const g in h){const y=h[g]._zod;if(y.values){Object.prototype.hasOwnProperty.call(p,g)||ri(p,g,new Set);for(const b of y.values)p[g].add(b);y.optin!==void 0&&p[g].add(void 0)}}return p});const s=fh,l=t.catchall;let c;const u=oo.memoizer;u?.attach(e),e._zod.parse=(m,h)=>{c??(c=i.value);const p=m.value;if(!s(p))return m.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),m;m.value=u?u.alloc(e,m,{},h):{};const g=[],y=c.shape;for(const b of c.allKeys){if(b==="__proto__")continue;const S=y[b],k=S._zod.optin,E=S._zod.optout,C=S._zod.run({value:p[b],issues:[]},h);C instanceof Promise?g.push(C.then(T=>hh(T,m,b,p,k,E))):hh(C,m,b,p,k,E)}return l?H2(g,p,m,h,i.value,e):g.length?Promise.all(g).then(()=>m):m}}),v9=Ce("$ZodObjectJIT",(e,t)=>{b9.init(e,t);const n=e._zod.parse,i=Vb(()=>F2(t)),s=oo.memoizer,l=b=>{const S=i.value,k=S.symbolKeys,E=new z8(["payload","ctx"],{shape:b,inst:e,memo:s,syms:k}),C=I=>`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`,T=(I,M)=>`
|
|
18
|
+
for (let i = 0; i < ${I}.issues.length; i++) {
|
|
19
|
+
const iss = ${I}.issues[i];
|
|
20
|
+
iss.path = iss.path ? [${M}, ...iss.path] : [${M}];
|
|
21
|
+
payload.issues.push(iss);
|
|
22
|
+
}`;E.write("const input = payload.value;");const R=Object.create(null);let N=0;for(const I of S.allKeys)R[I]=`key_${N++}`;E.write(s?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const I of S.allKeys){if(I==="__proto__")continue;const M=R[I],P=typeof I=="symbol"?`syms[${k.indexOf(I)}]`:aF(I),A=`${P} in input`,L=b[I],D=L?._zod?.optin,U=D!==void 0,q=L?._zod?.optout==="optional";if(E.write(`const ${M} = ${C(P)};`),U&&q){const K=D==="optional"?`${M}_present`:`${M}.value !== undefined || ${M}_present`;E.write(`
|
|
23
|
+
const ${M}_present = ${A};
|
|
24
|
+
if (!${M}.issues.length || ${M}_present) {
|
|
25
|
+
if (${M}.issues.length) {${T(M,P)}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (${K}) {
|
|
29
|
+
newResult[${P}] = ${M}.value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
`)}else U?E.write(`
|
|
34
|
+
if (${M}.issues.length) {${T(M,P)}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (${M}.value === undefined) {
|
|
38
|
+
if (${A}) {
|
|
39
|
+
newResult[${P}] = undefined;
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
newResult[${P}] = ${M}.value;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
`):E.write(`
|
|
46
|
+
const ${M}_present = ${A};
|
|
47
|
+
if (${M}.issues.length) {${T(M,P)}
|
|
48
|
+
}
|
|
49
|
+
if (!${M}_present && !${M}.issues.length) {
|
|
50
|
+
payload.issues.push({
|
|
51
|
+
code: "invalid_type",
|
|
52
|
+
expected: "nonoptional",
|
|
53
|
+
input: undefined,
|
|
54
|
+
path: [${P}]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (${M}_present) {
|
|
59
|
+
newResult[${P}] = ${M}.value;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
`)}return E.write("payload.value = newResult;"),E.write("return payload;"),E.compile()};let c;const u=fh,m=!oo.jitless,p=m&&uF.value,g=t.catchall;let y;e._zod.parse=(b,S)=>{y??(y=i.value);const k=b.value;return u(k)?m&&p&&S?.async===!1&&S.jitless!==!0?(c||(c=l(t.shape)),b=c(b,S),g?H2([],k,b,S,y,e):b):n(b,S):(b.issues.push({expected:"object",code:"invalid_type",input:k,inst:e}),b)}});function Xk(e,t,n,i){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const s=e.filter(l=>!ka(l));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(l=>l.issues.map(c=>Ga(c,i,qs())))}),t)}const w9=Ce("$ZodUnion",(e,t)=>{Fn.init(e,t),dn(e,"optin",i=>i.def.options.some(s=>s._zod.optin==="defaulted")?"defaulted":i.def.options.some(s=>s._zod.optin!==void 0)?"optional":void 0),dn(e,"optout",i=>i.def.options.some(s=>s._zod.optout==="optional")?"optional":void 0),dn(e,"values",i=>{if(i.def.options.every(s=>s._zod.values))return new Set(i.def.options.flatMap(s=>Array.from(s._zod.values)))}),dn(e,"pattern",i=>{if(i.def.options.every(s=>s._zod.pattern)){const s=i.def.options.map(l=>l._zod.pattern);return new RegExp(`^(${s.map(l=>Ub(l.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,s)=>{if(n)return n(i,s);let l=!1;const c=[];for(const u of t.options){const m=u._zod.run({value:i.value,issues:[]},s);if(m instanceof Promise)c.push(m),l=!0;else{if(m.issues.length===0)return m;c.push(m)}}return l?Promise.all(c).then(u=>Xk(u,i,e,s)):Xk(c,i,e,s)}}),S9=Ce("$ZodIntersection",(e,t)=>{Fn.init(e,t),e._zod.parse=(n,i)=>{const s=n.value,l=t.left._zod.run({value:s,issues:[]},i),c=t.right._zod.run({value:s,issues:[]},i);return l instanceof Promise||c instanceof Promise?Promise.all([l,c]).then(([m,h])=>Jk(n,m,h)):Jk(n,l,c)}});function Ey(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ru(e)&&Ru(t)){const n=Object.keys(t),i=Object.keys(e).filter(l=>n.indexOf(l)!==-1),s={...e,...t};Object.prototype.hasOwnProperty.call(s,"__proto__")&&delete s.__proto__;for(const l of i){if(l==="__proto__")continue;const c=Ey(e[l],t[l]);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};s[l]=c.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const s=e[i],l=t[i],c=Ey(s,l);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Jk(e,t,n){const i=new Map;let s;const l=new Map,c=(h,p)=>{let g;if(h.code==="unrecognized_keys"&&!h.path?.length)s??(s=h),g=h.keys;else if(h.code==="invalid_key"&&h.origin==="record"&&h.path?.length===1){const y=String(h.path[0]);l.has(y)||l.set(y,h),g=[y]}else return!1;for(const y of g)i.has(y)||i.set(y,{}),i.get(y)[p]=!0;return!0};for(const h of t.issues)c(h,"l")||e.issues.push(h);for(const h of n.issues)c(h,"r")||e.issues.push(h);const u=[...i].filter(([,h])=>h.l&&h.r).map(([h])=>h);if(u.length){const h=s?u.filter(p=>s.keys.includes(p)):[];h.length&&e.issues.push({...s,keys:h});for(const p of u)!h.includes(p)&&l.has(p)&&e.issues.push(l.get(p))}const m=Ey(t.value,n.value);if(!m.valid){if(ka(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`)}return e.value=m.data,e}const k9=Ce("$ZodEnum",(e,t)=>{Fn.init(e,t);const n=y2(t.entries),i=new Set(n);e._zod.values=i;const s=n.filter(l=>fF.has(typeof l));e._zod.pattern=new RegExp(s.length?`^(${s.map(l=>sm(l.toString())).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(l,c)=>{const u=l.value;return i.has(u)||l.issues.push({code:"invalid_value",values:n,input:u,inst:e}),l}}),E9=Ce("$ZodTransform",(e,t)=>{Fn.init(e,t),e._zod.optin="optional",oo.memoizer?.guard(e),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new E2(e.constructor.name);const s=t.transform(n.value,n);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(c=>(n.value=c,n));if(s instanceof Promise)throw new Ra;return n.value=s,n}});function Wk(e,t){return e.value=t.issues.length?void 0:t.value,e}const B2=Ce("$ZodOptional",(e,t)=>{Fn.init(e,t),dn(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",dn(e,"values",n=>{const i=n.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),dn(e,"pattern",n=>{const i=n.def.innerType._zod.pattern;return i?new RegExp(`^(${Ub(i.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;const s=t.innerType._zod.run({value:n.value,issues:[]},i);return s instanceof Promise?s.then(l=>Wk(n,l)):Wk(n,s)}return t.innerType._zod.run(n,i)}}),C9=Ce("$ZodExactOptional",(e,t)=>{B2.init(e,t),dn(e,"values",n=>n.def.innerType._zod.values),dn(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),T9=Ce("$ZodNullable",(e,t)=>{Fn.init(e,t),dn(e,"optin",n=>n.def.innerType._zod.optin),dn(e,"optout",n=>n.def.innerType._zod.optout),dn(e,"pattern",n=>{const i=n.def.innerType._zod.pattern;return i?new RegExp(`^(${Ub(i.source)}|null)$`):void 0}),dn(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),R9=Ce("$ZodDefault",(e,t)=>{Fn.init(e,t),e._zod.optin="defaulted",dn(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(l=>$k(l,t)):$k(s,t)}});function $k(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const j9=Ce("$ZodPrefault",(e,t)=>{Fn.init(e,t),e._zod.optin="defaulted",dn(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),N9=Ce("$ZodNonOptional",(e,t)=>{Fn.init(e,t),dn(e,"values",n=>{const i=n.def.innerType._zod.values;return i?new Set([...i].filter(s=>s!==void 0)):void 0}),e._zod.parse=(n,i)=>{const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(l=>Qk(l,e)):Qk(s,e)}});function Qk(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function eE(e,t,n,i){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(s=>Ga(s,i,qs()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const O9=Ce("$ZodCatch",(e,t)=>{Fn.init(e,t),dn(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),dn(e,"optout",n=>n.def.innerType._zod.optout),dn(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run({value:n.value,issues:[]},i);return s instanceof Promise?s.then(l=>eE(n,l,t,i)):eE(n,s,t,i)}}),A9=Ce("$ZodPipe",(e,t)=>{Fn.init(e,t),dn(e,"values",n=>n.def.in._zod.values),dn(e,"optin",n=>n.def.in._zod.optin),dn(e,"optout",n=>n.def.out._zod.optout),dn(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const l=t.out._zod.run(n,i);return l instanceof Promise?l.then(c=>Cd(c,t.in,i)):Cd(l,t.in,i)}const s=t.in._zod.run(n,i);return s instanceof Promise?s.then(l=>Cd(l,t.out,i)):Cd(s,t.out,i)}});function Cd(e,t,n){return e.issues.some(i=>i.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const M9=Ce("$ZodReadonly",(e,t)=>{Fn.init(e,t),dn(e,"propValues",n=>n.def.innerType._zod.propValues),dn(e,"values",n=>n.def.innerType._zod.values),dn(e,"optin",n=>n.def.innerType?._zod?.optin),dn(e,"optout",n=>n.def.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(tE):tE(s)}});function tE(e){return e.memo||(e.value=Object.freeze(e.value)),e}const z9=Ce("$ZodCustom",(e,t)=>{Hr.init(e,t),Fn.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,s=t.fn(i);if(s instanceof Promise)return s.then(l=>nE(l,n,i,e));nE(s,n,i,e)}});function nE(e,t,n,i){if(!e){const s={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(ju(s))}}class I9 extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Cy="~memo",rE=[];function px(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const iE=new WeakMap;function V2(e,t){const n=iE.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let i=!1;const s=u=>{!i&&u?._zod&&V2(u,t)&&(i=!0)},l=e._zod.def;switch(l.type){case"object":{for(const u of Reflect.ownKeys(l.shape))s(l.shape[u]);s(l.catchall);break}case"array":s(l.element);break;case"tuple":for(const u of l.items)s(u);s(l.rest);break;case"record":case"map":s(l.keyType),s(l.valueType);break;case"set":s(l.valueType);break;case"union":for(const u of l.options)s(u);break;case"intersection":s(l.left),s(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":s(l.innerType);break;case"pipe":s(l.in),s(l.out);break;case"function":s(l.input),s(l.output);break;case"lazy":s(e._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const u in l){const m=Object.getOwnPropertyDescriptor(l,u);if(!m||m.get)continue;const h=m.value;if(!(!h||typeof h!="object")){if(h._zod)s(h);else if(Array.isArray(h))for(const p of h)s(p)}}}return t.delete(e),iE.set(e,i),i}function D9(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}let Td;const Rd=[],_9={alloc(e,t,n){const i=Td;if(!i)return n;Td=void 0;const s={value:n,issues:null};return i.set(t.value,s),Rd.push(s),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,i=(s,l)=>{if(l.direction!=="backward"&&L9(l,s.value))throw new I9;return n(s,l)};e._zod.parse=i,e._zod.run===n&&(e._zod.run=i)})},attach(e){var t;let n,i,s;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const l=e._zod.parse,c=(u,m)=>{if(n===void 0&&(n=V2(e,new Set),!n))return e._zod.parse=l,e._zod.run===c&&(e._zod.run=l),l(u,m);const h=u.value;if(h===null||typeof h!="object")return l(u,m);let p=m[Cy];p||(p={buckets:new Map,backEdges:void 0},m[Cy]=p);let g;i===m?g=s:(g=D9(p,e),i=m,s=g);const y=g.get(h);if(y)return u.value=y.value,y.issues?y.issues.length&&u.issues.push(...px(y.issues)):(u.memo=!0,p.backEdges??(p.backEdges=new Set),p.backEdges.add(y.value)),u;Td=g;const b=Rd.length,S=l(u,m);Td=void 0;const k=Rd.length>b?Rd.pop():void 0;return S instanceof Promise?S.then(E=>(k&&(k.issues=E.issues.length?px(E.issues):rE),E)):(k&&(k.issues=S.issues.length?px(S.issues):rE),S)};e._zod.parse=c,e._zod.run===l&&(e._zod.run=c)})}};function P9(){return _9}function L9(e,t){const n=e[Cy]?.backEdges;return n!==void 0&&t!==null&&typeof t=="object"&&n.has(t)}const F9=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(l){return e[l]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function s(l,c){return l==="number"&&typeof c=="number"&&!Number.isFinite(c)?String(c):i[l]??l}return l=>{switch(l.code){case"invalid_type":{const c=s(l.expected),u=SF(l.input),m=s(u,l.input);return`Invalid input: expected ${c}, received ${m}`}case"invalid_value":return l.values.length===1?`Invalid input: expected ${w2(l.values[0])}`:`Invalid option: expected one of ${Fk(l.values,"|")}`;case"too_big":{const c=l.exact?"exactly ":l.inclusive?"<=":"<",u=t(l.origin);return u?`Too big: expected ${l.origin??"value"} to have ${c}${l.maximum.toString()} ${u.unit??"elements"}`:`Too big: expected ${l.origin??"value"} to be ${c}${l.maximum.toString()}`}case"too_small":{const c=l.exact?"exactly ":l.inclusive?">=":">",u=t(l.origin);return u?`Too small: expected ${l.origin} to have ${c}${l.minimum.toString()} ${u.unit}`:`Too small: expected ${l.origin} to be ${c}${l.minimum.toString()}`}case"invalid_format":{const c=l;return c.format==="starts_with"?`Invalid string: must start with "${c.prefix}"`:c.format==="ends_with"?`Invalid string: must end with "${c.suffix}"`:c.format==="includes"?`Invalid string: must include "${c.includes}"`:c.format==="regex"?`Invalid string: must match pattern ${c.pattern}`:`Invalid ${n[c.format]??l.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${l.divisor}`;case"unrecognized_keys":return`Unrecognized key${l.keys.length>1?"s":""}: ${Fk(l.keys,", ")}`;case"invalid_key":return`Invalid key in ${l.origin}`;case"invalid_union":return l.options&&Array.isArray(l.options)&&l.options.length>0?`Invalid discriminator value. Expected ${l.options.map(u=>`'${u}'`).join(" | ")}`:l.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${l.origin}`;default:return"Invalid input"}}};function H9(){return{localeError:F9()}}var oE;class B9{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const s={...i,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function V9(){return new B9}(oE=globalThis).__zod_globalRegistry??(oE.__zod_globalRegistry=V9());const ou=globalThis.__zod_globalRegistry;function U9(e,t){return new e({type:"string",...ot(t)})}function Z9(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ot(t)})}function q9(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ot(t)})}function G9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ot(t)})}function Y9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ot(t)})}function K9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ot(t)})}function X9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ot(t)})}function J9(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ot(t)})}function W9(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ot(t)})}function $9(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ot(t)})}function Q9(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ot(t)})}function eH(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ot(t)})}function tH(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ot(t)})}function nH(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ot(t)})}function rH(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ot(t)})}function iH(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ot(t)})}function oH(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ot(t)})}function sH(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ot(t)})}function lH(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ot(t)})}function aH(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ot(t)})}function cH(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ot(t)})}function uH(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ot(t)})}function fH(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ot(t)})}function U2(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ot(t)})}function dH(e,t){return new e({type:"string",format:"date",check:"string_format",...ot(t)})}function hH(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ot(t)})}function mH(e,t){return new e({type:"string",format:"duration",check:"string_format",...ot(t)})}function pH(e,t){return new e({type:"number",checks:[],...ot(t)})}function gH(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ot(t)})}function xH(e,t){return new e({type:"boolean",...ot(t)})}function yH(e){return new e({type:"unknown"})}function bH(e,t){return new e({type:"never",...ot(t)})}function sE(e,t){return new A2({check:"less_than",...ot(t),value:e,inclusive:!1})}function gx(e,t){return new A2({check:"less_than",...ot(t),value:e,inclusive:!0})}function lE(e,t){return new M2({check:"greater_than",...ot(t),value:e,inclusive:!1})}function xx(e,t){return new M2({check:"greater_than",...ot(t),value:e,inclusive:!0})}function aE(e,t){return new w8({check:"multiple_of",...ot(t),value:e})}function Z2(e,t){return new k8({check:"max_length",...ot(t),maximum:e})}function mh(e,t){return new E8({check:"min_length",...ot(t),minimum:e})}function q2(e,t){return new C8({check:"length_equals",...ot(t),length:e})}function vH(e,t){return new T8({check:"string_format",format:"regex",...ot(t),pattern:e})}function wH(e){return new R8({check:"string_format",format:"lowercase",...ot(e)})}function SH(e){return new j8({check:"string_format",format:"uppercase",...ot(e)})}function kH(e,t){return new N8({check:"string_format",format:"includes",...ot(t),includes:e})}function EH(e,t){return new O8({check:"string_format",format:"starts_with",...ot(t),prefix:e})}function CH(e,t){return new A8({check:"string_format",format:"ends_with",...ot(t),suffix:e})}function Ya(e){return new M8({check:"overwrite",tx:e})}function TH(e){return Ya(t=>t.normalize(e))}function RH(){return Ya(e=>e.trim())}function jH(){return Ya(e=>e.toLowerCase())}function NH(){return Ya(e=>e.toUpperCase())}function OH(){return Ya(e=>cF(e))}function AH(e,t,n){return new e({type:"array",element:t,...ot(n)})}function MH(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ot(n)})}function zH(e,t){const n=IH(i=>(i.addIssue=s=>{if(typeof s=="string")i.issues.push(ju(s,i.value,n._zod.def));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),"input"in l||(l.input=i.value),l.inst??(l.inst=n),l.continue??(l.continue=!n._zod.def.abort),i.issues.push(ju(l))}},e(i.value,i)),t);return n}function IH(e,t){const n=new Hr({check:"custom",...ot(t)});return n._zod.check=e,n}function du(e,...t){for(const n of t)for(const i of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,i)&&ri(e,i,n[i]);return e}function G2(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??ou,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Ka(e,t,n,i,s){const l=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:i.path,message:s}):t.unrepresentable;if(l==="any")return!1;if(l===void 0||l==="throw")throw new Error(s);return Object.assign(n,l),!0}function pr(e,t,n={path:[],schemaPath:[]}){var i;const s=e._zod.def,l=t.seen.get(e);if(l)return l.count++,n.schemaPath.includes(e)&&(l.cycle=n.path),l.schema;const c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const u=e._zod.toJSONSchema?.();if(u)c.schema=u;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,p);else{const y=c.schema,b=t.processors[s.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);b(e,t,y,p)}const g=e._zod.parent;g&&(c.ref||(c.ref=g),pr(g,t,p),t.seen.get(g).isParent=!0)}const m=t.metadataRegistry.get(e);return m&&du(c.schema,m),t.io==="input"&&jr(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&"_prefault"in c.schema&&((i=c.schema).default??(i.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function cE(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Y2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const i=new Map;for(const c of e.seen.entries()){const u=e.metadataRegistry.get(c[0])?.id;if(u){const m=i.get(u);if(m&&m!==c[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(u,c[0])}}const s=c=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(c[0])?.id,y=e.external.uri??(S=>S);if(g)return{ref:y(g)};const b=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=b,{defId:b,ref:`${y("__shared")}#/${u}/${cE(b)}`}}const m="#",h=`${m}/${u}/`;if(c[1]===n&&!c[1].schema.id)return{ref:m};const p=c[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+cE(p)}},l=c=>{if(c[1].schema.$ref)return;const u=c[1],{ref:m,defId:h}=s(c);u.def={...u.schema},h&&(u.defId=h);const p=u.schema;for(const g in p)delete p[g];p.$ref=m};if(e.cycles==="throw")for(const c of e.seen.entries()){const u=c[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
|
|
63
|
+
|
|
64
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const u=c[1];if(t===c[0]){l(c);continue}if(e.external){const h=e.external.registry.get(c[0])?.id;if(t!==c[0]&&h){l(c);continue}}if(e.metadataRegistry.get(c[0])?.id){l(c);continue}if(u.cycle){l(c);continue}if(u.count>1&&e.reused==="ref"){l(c);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function K2(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const n=[];for(const i of t){if(!i||typeof i!="object")return;K2(i);const s=Object.keys(i);if(s.length!==1||s[0]!=="type")return;const l=i.type;for(const c of Array.isArray(l)?l:[l]){if(typeof c!="string")return;n.includes(c)||n.push(c)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const X2=new Set(["type","properties","required","additionalProperties"]),uE=["oneOf","anyOf"];function fE(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function Ty(e){const t=[];for(const l of e){if(typeof l!="object"||l.type!=="object")return null;for(const c in l)if(!X2.has(c))return null;t.push(l)}const n={},i=new Set;for(const l of t){for(const c in l.properties){if(Object.prototype.hasOwnProperty.call(n,c))continue;const u=[];for(const h of t){const p=h.properties?.[c]??fE(h);p!=null&&(u.some(g=>JSON.stringify(g)===JSON.stringify(p))||u.push(p))}const m=u.length===1?u[0]:Ty(u)??{allOf:u};ri(n,c,m)}for(const c of l.required??[])i.add(c)}const s={type:"object",properties:n};if(i.size&&(s.required=[...i]),t.every(l=>l.additionalProperties===!1))s.additionalProperties=!1;else{const l=[];for(const c of t){const u=fE(c);u&&!l.some(m=>JSON.stringify(m)===JSON.stringify(u))&&l.push(u)}l.length===1?s.additionalProperties=l[0]:l.length>1&&(s.additionalProperties={allOf:l})}return s}function DH(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const s of X2)if(s in e)return;const n=t.filter(s=>uE.some(l=>Array.isArray(s[l])));let i=null;if(!n.length)i=Ty(t);else{const s=n[0],l=uE.find(m=>Array.isArray(s[m]));if(Object.keys(s).length!==1)return;const c=t.filter(m=>m!==s),u=s[l].map(m=>Ty([...c,m]));if(u.some(m=>!m))return;i={[l]:u}}i&&(delete e.allOf,du(e,i))}function J2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=u=>{const m=e.seen.get(u);if(m.ref===null)return;const h=m.def??m.schema,p={...h},g=m.ref;if(m.ref=null,g){i(g);const b=e.seen.get(g),S=b.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(S)):du(h,S),du(h,p),u._zod.parent===g)for(const E in h)E==="$ref"||E==="allOf"||E in p||delete h[E];if(S.$ref&&b.def)for(const E in h)E==="$ref"||E==="allOf"||E in b.def&&JSON.stringify(h[E])===JSON.stringify(b.def[E])&&delete h[E]}const y=u._zod.parent;if(y&&y!==g){i(y);const b=e.seen.get(y);if(b?.schema.$ref&&(h.$ref=b.schema.$ref,b.def))for(const S in h)S==="$ref"||S==="allOf"||S in b.def&&JSON.stringify(h[S])===JSON.stringify(b.def[S])&&delete h[S]}e.override({zodSchema:u,jsonSchema:h,path:m.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const u of[...e.seen.entries()].reverse())i(u[0]);if(e.target!=="openapi-3.0")for(const u of e.seen.entries())K2(u[1].def??u[1].schema);for(const u of e.deferred)u();if(e.intersections.length){const u=new Map;for(const m of e.seen.values())for(const h of[m.schema,m.def]){const p=h?.allOf;if(!Array.isArray(p))continue;const g=u.get(p);g?g.push(h):u.set(p,[h])}for(const m of e.intersections)for(const h of u.get(m)??[])DH(h)}}const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(u)}du(s,n.defId?n.schema:n.def??n.schema);const l=e.metadataRegistry.get(t)?.id;l!==void 0&&s.id===l&&delete s.id;const c=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const u of e.seen.entries()){const m=u[1];m.def&&m.defId&&(m.def.id===m.defId&&delete m.def.id,ri(c,m.defId,m.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?s.$defs=c:s.definitions=c);try{const u=JSON.parse(JSON.stringify(s));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:ph(t,"input",e.processors),output:ph(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function jr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return jr(i.element,n);if(i.type==="set")return jr(i.valueType,n);if(i.type==="lazy")return jr(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault"||i.type==="catch")return jr(i.innerType,n);if(i.type==="intersection")return jr(i.left,n)||jr(i.right,n);if(i.type==="record"||i.type==="map")return jr(i.keyType,n)||jr(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:jr(i.in,n)||jr(i.out,n);if(i.type==="object"){for(const s in i.shape)if(jr(i.shape[s],n))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(jr(s,n))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(jr(s,n))return!0;return!!(i.rest&&jr(i.rest,n))}return!1}const _H=(e,t={})=>n=>{const i=G2({...n,processors:t});return pr(e,i),Y2(i,e),J2(i,e)},ph=(e,t,n={})=>i=>{const{libraryOptions:s,target:l}=i??{},c=G2({...s??{},target:l,io:t,processors:n});return pr(e,c),Y2(c,e),J2(c,e)},PH={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},LH=(e,t,n,i)=>{const s=n;s.type="string";const{minimum:l,maximum:c,format:u,patterns:m,contentEncoding:h,laxFormat:p}=e._zod.bag;if(typeof l=="number"&&(s.minLength=l),typeof c=="number"&&(s.maxLength=c),u&&(s.format=PH[u]??u,s.format===""&&delete s.format,(u==="time"||p)&&delete s.format),h&&(s.contentEncoding=h),m&&m.size>0){const g=[...m];g.length===1?s.pattern=g[0].source:g.length>1&&(s.allOf=[...g.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},FH=(e,t,n,i)=>{const s=n,{minimum:l,maximum:c,format:u,multipleOf:m,exclusiveMaximum:h,exclusiveMinimum:p}=e._zod.bag;typeof u=="string"&&u.includes("int")?s.type="integer":s.type="number";const g=typeof p=="number"&&p>=(l??Number.NEGATIVE_INFINITY),y=typeof h=="number"&&h<=(c??Number.POSITIVE_INFINITY),b=t.target==="draft-04"||t.target==="openapi-3.0";g?b?(s.minimum=p,s.exclusiveMinimum=!0):s.exclusiveMinimum=p:typeof l=="number"&&(s.minimum=l),y?b?(s.maximum=h,s.exclusiveMaximum=!0):s.exclusiveMaximum=h:typeof c=="number"&&(s.maximum=c),typeof m=="number"&&(Number.isFinite(m)&&m!==0?s.multipleOf=Math.abs(m):Ka(e,t,s,i,`A multipleOf divisor of ${m} cannot be represented in JSON Schema`))},HH=(e,t,n,i)=>{n.type="boolean"},BH=(e,t,n,i)=>{n.not={}},VH=(e,t,n,i)=>{},UH=(e,t,n,i)=>{const s=e._zod.def,l=y2(s.entries);if(l.length===0){n.not={};return}l.every(c=>typeof c=="number")&&(n.type="number"),l.every(c=>typeof c=="string")&&(n.type="string"),n.enum=l},ZH=(e,t,n,i)=>{Ka(e,t,n,i,"Custom types cannot be represented in JSON Schema")},qH=(e,t,n,i)=>{Ka(e,t,n,i,"Transforms cannot be represented in JSON Schema")},GH=(e,t,n,i)=>{const s=n,l=e._zod.def,{minimum:c,maximum:u}=e._zod.bag;typeof c=="number"&&(s.minItems=c),typeof u=="number"&&(s.maxItems=u),s.type="array",s.items=pr(l.element,t,{...i,path:[...i.path,"items"]})};function Ry(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Ry(t.out):t.type==="catch"?Ry(t.innerType):e._zod.optin}const YH=(e,t,n,i)=>{const s=n,l=e._zod.def,c=l.shape;if(Object.getOwnPropertySymbols(c).length&&Ka(e,t,s,i,"Symbol keys cannot be represented in JSON Schema"))return;s.type="object",s.properties={};for(const p in c)ri(s.properties,p,pr(c[p],t,{...i,path:[...i.path,"properties",p]}));const m=new Set(Object.keys(c)),h=new Set([...m].filter(p=>{const g=l.shape[p];return t.io==="input"?Ry(g)===void 0:g._zod.optout===void 0}));h.size>0&&(s.required=Array.from(h)),l.catchall?._zod.def.type==="never"?s.additionalProperties=!1:l.catchall?l.catchall&&(s.additionalProperties=pr(l.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},KH=(e,t,n,i)=>{const s=e._zod.def,l=s.inclusive===!1,c=s.options.map((u,m)=>pr(u,t,{...i,path:[...i.path,l?"oneOf":"anyOf",m]}));l?n.oneOf=c:n.anyOf=c},XH=(e,t,n,i)=>{const s=e._zod.def,l=pr(s.left,t,{...i,path:[...i.path,"allOf",0]}),c=pr(s.right,t,{...i,path:[...i.path,"allOf",1]}),u=h=>"allOf"in h&&Object.keys(h).length===1,m=[...u(l)?l.allOf:[l],...u(c)?c.allOf:[c]];n.allOf=m,t.intersections.push(m)},JH=(e,t,n,i)=>{const s=e._zod.def,l=pr(s.innerType,t,i),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=s.innerType,n.nullable=!0):n.anyOf=[l,{type:"null"}]},WH=(e,t,n,i)=>{const s=e._zod.def;pr(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType},Jb=Symbol();function W2(e,t,n,i,s){let l=!1;const c=JSON.stringify(e,(u,m)=>typeof m!="bigint"?m:(l=!0,null));return l?(Ka(t,n,i,s,"BigInt defaults cannot be represented in JSON Schema"),Jb):JSON.parse(c)}const $H=(e,t,n,i)=>{const s=e._zod.def;pr(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType;const c=W2(s.defaultValue,e,t,n,i);c!==Jb&&(n.default=c)},QH=(e,t,n,i)=>{const s=e._zod.def;pr(s.innerType,t,i);const l=t.seen.get(e);if(l.ref=s.innerType,t.io!=="input")return;const c=W2(s.defaultValue,e,t,n,i);c!==Jb&&(n._prefault=c)},eB=(e,t,n,i)=>{const s=e._zod.def;pr(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType;let c;try{c=s.catchValue(void 0)}catch{Ka(e,t,n,i,"Dynamic catch values are not supported in JSON Schema");return}n.default=c},tB=(e,t,n,i)=>{const s=e._zod.def,l=s.in._zod.traits.has("$ZodTransform"),c=t.io==="input"?l?s.out:s.in:s.out;pr(c,t,i);const u=t.seen.get(e);u.ref=c},nB=(e,t,n,i)=>{const s=e._zod.def;pr(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,n.readOnly=!0},$2=(e,t,n,i)=>{const s=e._zod.def;pr(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType},dE=new WeakSet([Object.prototype,Error.prototype]);function jd(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const i=n(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}const rB=(e,t)=>{T2.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);dE.has(n)||(dE.add(n),jd(n,"format",i=>s=>DF(i,s)),jd(n,"flatten",i=>s=>j2(i,s)),jd(n,"addIssue",i=>s=>{i.issues.push(s),i.message=JSON.stringify(i.issues,Sy,2)}),jd(n,"addIssues",i=>s=>{i.issues.push(...s),i.message=JSON.stringify(i.issues,Sy,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Ei=Ce("ZodError",rB,void 0,{Parent:Error}),iB=Gb(Ei),oB=Yb(Ei),sB=am(Ei),lB=cm(Ei),aB=LF(Ei),cB=FF(Ei),uB=HF(Ei),fB=BF(Ei),dB=VF(Ei),hB=UF(Ei),mB=ZF(Ei),pB=qF(Ei);function gB(){oo.localeError||qs(H9())}function Wb(){oo.memoizer||qs({memoizer:P9()})}const Hn=Ce("ZodType",(e,t)=>(gB(),Fn.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Us(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Zs(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(fV(e,t))},superRefine(e,t){return this.check(dV(e,t))},overwrite(e){return this.check(Ya(e))},optional(){return pE(this)},exactOptional(){return $B(this)},nullable(){return gE(this)},nullish(){return pE(gE(this))},nonoptional(e){return iV(this,e)},array(){return Ku(this)},or(e){return YB([this,e])},and(e){return XB(this,e)},transform(e){return xE(this,WB(e))},default(e){return tV(this,e)},prefault(e){return rV(this,e)},catch(e){return sV(this,e)},pipe(e){return xE(this,e)},readonly(){return cV(this)},describe(e){const t=this.clone();return ou.add(t,{description:e}),t},meta(...e){if(e.length===0)return ou.get(this);const t=this.clone();return ou.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return k2(this,"~standard",{...z2(this),jsonSchema:{input:ph(this,"input"),output:ph(this,"output")}})},set"~standard"(e){Ia(this,"~standard",e)},parse:function e(t,n){return iB(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await oB(this,t,n,{callee:e})},safeParse(e,t){return sB(this,e,t)},async safeParseAsync(e,t){return lB(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ia(this,"spa",e)},encode:function e(t,n){return aB(this,t,n,{callee:e})},decode:function e(t,n){return cB(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await uB(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await fB(this,t,n,{callee:e})},safeEncode(e,t){return dB(this,e,t)},safeDecode(e,t){return hB(this,e,t)},async safeEncodeAsync(e,t){return mB(this,e,t)},async safeDecodeAsync(e,t){return pB(this,e,t)},toJSONSchema(e){return _H(this,{})(e)},get description(){return ou.get(this)?.description},get _def(){return this._zod.def}}),Q2=Ce("_ZodString",(e,t)=>{Xb.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(i,s,l)=>LH(e,i,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(vH(...e))},includes(...e){return this.check(kH(...e))},startsWith(...e){return this.check(EH(...e))},endsWith(...e){return this.check(CH(...e))},min(...e){return this.check(mh(...e))},max(...e){return this.check(Z2(...e))},length(...e){return this.check(q2(...e))},nonempty(...e){return this.check(mh(1,...e))},lowercase(e){return this.check(wH(e))},uppercase(e){return this.check(SH(e))},trim(){return this.check(RH())},normalize(...e){return this.check(TH(...e))},toLowerCase(){return this.check(jH())},toUpperCase(){return this.check(NH())},slugify(){return this.check(OH())}}),xB=Ce("ZodString",(e,t)=>{Xb.init(e,t),Q2.init(e,t)},{email(e){return this.check(Z9(wB,e))},url(e){return this.check(J9(kB,e))},jwt(e){return this.check(fH(LB,e))},emoji(e){return this.check(W9(EB,e))},guid(e){return this.check(q9(SB,e))},uuid(e){return this.check(G9(Nd,e))},uuidv4(e){return this.check(Y9(Nd,e))},uuidv6(e){return this.check(K9(Nd,e))},uuidv7(e){return this.check(X9(Nd,e))},nanoid(e){return this.check($9(CB,e))},cuid(e){return this.check(Q9(TB,e))},cuid2(e){return this.check(eH(RB,e))},ulid(e){return this.check(tH(jB,e))},base64(e){return this.check(aH(DB,e))},base64url(e){return this.check(cH(_B,e))},xid(e){return this.check(nH(NB,e))},ksuid(e){return this.check(rH(OB,e))},ipv4(e){return this.check(iH(AB,e))},ipv6(e){return this.check(oH(MB,e))},cidrv4(e){return this.check(sH(zB,e))},cidrv6(e){return this.check(lH(IB,e))},e164(e){return this.check(uH(PB,e))},datetime(e){return this.check(U2(ej,e))},date(e){return this.check(dH(yB,e))},time(e){return this.check(hH(bB,e))},duration(e){return this.check(mH(vB,e))}});function Le(e){return U9(xB,e)}const Rn=Ce("ZodStringFormat",(e,t)=>{Cn.init(e,t),Q2.init(e,t)}),ej=Ce("ZodISODateTime",(e,t)=>{W8.init(e,t),Rn.init(e,t)}),yB=Ce("ZodISODate",(e,t)=>{$8.init(e,t),Rn.init(e,t)}),bB=Ce("ZodISOTime",(e,t)=>{Q8.init(e,t),Rn.init(e,t)}),vB=Ce("ZodISODuration",(e,t)=>{e9.init(e,t),Rn.init(e,t)}),wB=Ce("ZodEmail",(e,t)=>{P8.init(e,t),Rn.init(e,t)}),SB=Ce("ZodGUID",(e,t)=>{D8.init(e,t),Rn.init(e,t)}),Nd=Ce("ZodUUID",(e,t)=>{_8.init(e,t),Rn.init(e,t)}),kB=Ce("ZodURL",(e,t)=>{U8.init(e,t),Rn.init(e,t)}),EB=Ce("ZodEmoji",(e,t)=>{Z8.init(e,t),Rn.init(e,t)}),CB=Ce("ZodNanoID",(e,t)=>{q8.init(e,t),Rn.init(e,t)}),TB=Ce("ZodCUID",(e,t)=>{G8.init(e,t),Rn.init(e,t)}),RB=Ce("ZodCUID2",(e,t)=>{Y8.init(e,t),Rn.init(e,t)}),jB=Ce("ZodULID",(e,t)=>{K8.init(e,t),Rn.init(e,t)}),NB=Ce("ZodXID",(e,t)=>{X8.init(e,t),Rn.init(e,t)}),OB=Ce("ZodKSUID",(e,t)=>{J8.init(e,t),Rn.init(e,t)}),AB=Ce("ZodIPv4",(e,t)=>{t9.init(e,t),Rn.init(e,t)}),MB=Ce("ZodIPv6",(e,t)=>{r9.init(e,t),Rn.init(e,t)}),zB=Ce("ZodCIDRv4",(e,t)=>{i9.init(e,t),Rn.init(e,t)}),IB=Ce("ZodCIDRv6",(e,t)=>{s9.init(e,t),Rn.init(e,t)}),DB=Ce("ZodBase64",(e,t)=>{l9.init(e,t),Rn.init(e,t)}),_B=Ce("ZodBase64URL",(e,t)=>{c9.init(e,t),Rn.init(e,t)}),PB=Ce("ZodE164",(e,t)=>{u9.init(e,t),Rn.init(e,t)}),LB=Ce("ZodJWT",(e,t)=>{d9.init(e,t),Rn.init(e,t)}),tj=Ce("ZodNumber",(e,t)=>{L2.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(i,s,l)=>FH(e,i,s,l);const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(lE(e,t))},gte(e,t){return this.check(xx(e,t))},min(e,t){return this.check(xx(e,t))},lt(e,t){return this.check(sE(e,t))},lte(e,t){return this.check(gx(e,t))},max(e,t){return this.check(gx(e,t))},int(e){return this.check(hE(e))},safe(e){return this.check(hE(e))},positive(e){return this.check(lE(0,e))},nonnegative(e){return this.check(xx(0,e))},negative(e){return this.check(sE(0,e))},nonpositive(e){return this.check(gx(0,e))},multipleOf(e,t){return this.check(aE(e,t))},step(e,t){return this.check(aE(e,t))},finite(){return this}});function zn(e){return pH(tj,e)}const FB=Ce("ZodNumberFormat",(e,t)=>{h9.init(e,t),tj.init(e,t)});function hE(e){return gH(FB,e)}const HB=Ce("ZodBoolean",(e,t)=>{m9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>HH(e,n,i)});function Er(e){return xH(HB,e)}const BB=Ce("ZodUnknown",(e,t)=>{p9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>VH()});function mE(){return yH(BB)}const VB=Ce("ZodNever",(e,t)=>{g9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>BH(e,n,i)});function UB(e){return bH(VB,e)}const ZB=Ce("ZodArray",(e,t)=>{Wb(),x9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>GH(e,n,i,s),e.element=t.element},{min(e,t){return this.check(mh(e,t))},nonempty(e){return this.check(mh(1,e))},max(e,t){return this.check(Z2(e,t))},length(e,t){return this.check(q2(e,t))},unwrap(){return this.element}});function Ku(e,t){return AH(ZB,e,t)}const qB=Ce("ZodObject",(e,t)=>{Wb(),v9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>YH(e,n,i,s),RF(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return Bo(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:mE()})},loose(){return this.clone({...this._zod.def,catchall:mE()})},strict(){return this.clone({...this._zod.def,catchall:UB()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return gF(this,e)},safeExtend(e){return xF(this,e)},merge(e){return yF(this,e)},pick(e){return mF(this,e)},omit(e){return pF(this,e)},partial(...e){return Hk(nj,this,e[0])},exactPartial(...e){return Hk(rj,this,e[0],"exactPartial")},required(...e){return bF(ij,this,e[0])}});function ut(e,t){const n={type:"object",shape:e??{},...ot(t)};return new qB(n)}const GB=Ce("ZodUnion",(e,t)=>{w9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>KH(e,n,i,s),e.options=t.options});function YB(e,t){return new GB({type:"union",options:e,...ot(t)})}const KB=Ce("ZodIntersection",(e,t)=>{S9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>XH(e,n,i,s)});function XB(e,t){return new KB({type:"intersection",left:e,right:t})}const jy=Ce("ZodEnum",(e,t)=>{k9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(i,s,l)=>UH(e,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,s)=>{const l={};for(const c of i)if(n.has(c))l[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new jy({...t,checks:[],...ot(s),entries:l})},e.exclude=(i,s)=>{const l={...t.entries};for(const c of i)if(n.has(c))delete l[c];else throw new Error(`Key ${c} not found in enum`);return new jy({...t,checks:[],...ot(s),entries:l})}});function Bo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new jy({type:"enum",entries:n,...ot(t)})}const JB=Ce("ZodTransform",(e,t)=>{Wb(),E9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>qH(e,n,i,s),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new E2(e.constructor.name);n.addIssue=l=>{if(typeof l=="string")n.issues.push(ju(l,n.value,t));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),"input"in c||(c.input=n.value),c.inst??(c.inst=e),n.issues.push(ju(c))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(l=>(n.value=l,n)):(n.value=s,n)}});function WB(e){return new JB({type:"transform",transform:e})}const nj=Ce("ZodOptional",(e,t)=>{B2.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>$2(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function pE(e){return new nj({type:"optional",innerType:e})}const rj=Ce("ZodExactOptional",(e,t)=>{C9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>$2(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function $B(e){return new rj({type:"optional",innerType:e})}const QB=Ce("ZodNullable",(e,t)=>{T9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>JH(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function gE(e){return new QB({type:"nullable",innerType:e})}const eV=Ce("ZodDefault",(e,t)=>{R9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>$H(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function tV(e,t){return new eV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():v2(t)}})}const nV=Ce("ZodPrefault",(e,t)=>{j9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>QH(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function rV(e,t){return new nV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():v2(t)}})}const ij=Ce("ZodNonOptional",(e,t)=>{N9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>WH(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function iV(e,t){return new ij({type:"nonoptional",innerType:e,...ot(t)})}const oV=Ce("ZodCatch",(e,t)=>{O9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>eB(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function sV(e,t){return new oV({type:"catch",innerType:e,catchValue:typeof t=="function"?t:NF(t)})}const lV=Ce("ZodPipe",(e,t)=>{A9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>tB(e,n,i,s),e.in=t.in,e.out=t.out});function xE(e,t){return new lV({type:"pipe",in:e,out:t})}const aV=Ce("ZodReadonly",(e,t)=>{M9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>nB(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function cV(e){return new aV({type:"readonly",innerType:e})}const uV=Ce("ZodCustom",(e,t)=>{z9.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(n,i,s)=>ZH(e,n,i,s)});function fV(e,t={}){return MH(uV,e,t)}function dV(e,t){return zH(e,t)}function vi(e){return U2(ej,e)}function yE(e,t){let n=3735928559^t,i=1103547991^t;for(let s=0;s<e.length;s+=1){const l=e.charCodeAt(s);n=Math.imul(n^l,2654435761),i=Math.imul(i^l,1597334677)}return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&i)+(n>>>0)}function hV(e){const t=[e.path,e.oldPath??"",e.status,e.isBinary?"binary":"text",e.isUntracked?"untracked":"tracked",e.truncated?"clipped":"whole",`${e.additions},${e.deletions}`];for(const n of e.hunks){t.push(n.header);for(const i of n.lines)t.push(`${i.type[0]}${i.content}`)}return t.join("\0")}const mV=32;function pV(e){const t=hV(e);return`${yE(t,0).toString(16)}-${yE(t,2654435769).toString(16)}`}const fm=120,Gs=zn().int().positive(),oj=ut({id:Gs,path:Le(),name:Le(),createdAt:vi(),updatedAt:vi()}),gV=ut({exists:Er(),isGitRepository:Er(),branch:Le().nullable(),detachedAt:Le().nullable(),isEmpty:Er(),rootCommit:Le().nullable(),error:Le().nullable()});oj.extend({git:gV});const xV=ut({path:Le().trim().min(1,"Choose a folder inside a git repository."),name:Le().trim().min(1,"Name cannot be empty.").max(fm).optional()}),yV=ut({id:Gs,name:Le().trim().min(1,"Name cannot be empty.").max(fm).optional(),path:Le().trim().min(1,"Path cannot be empty.").optional()}).refine(e=>e.name!==void 0||e.path!==void 0,{message:"Provide a new name or a new path.",path:["name"]});ut({id:Gs});ut({id:Gs});const Da=255,Xu=zn().int().positive(),sj=Bo(["ssh","wsl","websocket"]),lj=Le().trim().min(1,"Enter a host to connect to, like user@machine.").max(Da).refine(e=>!e.startsWith("-"),{message:'A host cannot start with "-".'}).refine(e=>!/[\s;&|`$(){}<>'"\\]/.test(e),{message:"A host can only contain a user name, an @ and a machine name."}),bV=Le().trim().min(1,"Choose a WSL distribution.").max(Da).refine(e=>!e.startsWith("-"),{message:'A distribution name cannot start with "-".'}).refine(e=>!/[\s;&|`$(){}<>'"\\/]/.test(e),{message:"That is not a WSL distribution name."}),vV=Le().trim().min(1,"Enter the machine, like pc-wsl or pc-wsl.tail0123.ts.net.").max(Da).refine(e=>!e.startsWith("-"),{message:'A machine name cannot start with "-".'}).refine(e=>{try{return new URL(/^https?:\/\//i.test(e)?e:`http://${e}`).hostname.length>0}catch{return!1}},{message:"That is not a machine name or an address."}).refine(e=>{const t=e.replace(/^https?:\/\//i,"").split(/[:/]/)[0]?.toLowerCase()??"";return t!=="localhost"&&t!=="127.0.0.1"&&t!=="::1"},{message:"That is this computer. A host is another machine."});function wV(e){return e==="wsl"?bV:e==="websocket"?vV:lj}ut({name:Le(),isDefault:Er(),running:Er(),alreadyAdded:Er()});const SV=ut({id:Xu,instanceId:Le().nullable(),label:Le(),kind:sj,target:Le(),editorTarget:Le().nullable(),lastSeenAt:vi().nullable(),daemonVersion:Le().nullable(),createdAt:vi()}),kV=ut({connected:Er(),failures:zn().int().nonnegative(),lastError:Le().optional(),retryAfter:zn().optional()}),EV=SV.extend({state:kV}),CV=ut({target:Le().trim().min(1).max(Da),label:Le().trim().min(1,"Name cannot be empty.").max(fm).optional(),kind:sj.optional(),editorTarget:Le().trim().max(Da).optional()}).superRefine((e,t)=>{const n=wV(e.kind??"ssh").safeParse(e.target);if(!n.success)for(const i of n.error.issues)t.addIssue({code:"custom",message:i.message,path:["target"]})}),TV=ut({id:Xu,label:Le().trim().min(1,"Name cannot be empty.").max(fm).optional(),target:lj.optional(),editorTarget:Le().trim().max(Da).nullable().optional()}).refine(e=>e.label!==void 0||e.target!==void 0||e.editorTarget!==void 0,{message:"Provide something to change.",path:["label"]});ut({id:Xu});ut({id:Xu});ut({id:Xu,force:Er().optional()});const RV=Bo(["installed","upgraded","already-current"]);ut({action:RV,version:Le(),previousVersion:Le().nullable(),target:Le(),bytes:zn().int().nonnegative(),host:EV});const aj=200,cj=2e4,jV=255,Br=zn().int().positive(),$b=Bo(["open","closed"]),gh=Le().trim().min(1,"Choose a branch.").max(jV,"That ref name is too long.").refine(e=>!e.startsWith("-"),{message:'A ref cannot start with "-".'}),NV=ut({id:Br,repositoryId:Gs,title:Le(),description:Le(),baseRef:Le(),headRef:Le(),status:$b,createdAt:vi(),updatedAt:vi(),closedAt:vi().nullable()});NV.extend({repository:oj});ut({repositoryId:Gs.optional(),status:$b.optional()});const OV=ut({repositoryId:Gs,title:Le().trim().min(1,"Title cannot be empty.").max(aj).optional(),description:Le().max(cj).optional(),baseRef:gh,headRef:gh});function Xa(e){return e.baseRef===e.headRef}function AV(e,t){return Xa({baseRef:e,headRef:t})?`Uncommitted work on ${t}`:`${t} into ${e}`}const MV=ut({id:Br,title:Le().trim().min(1,"Title cannot be empty.").max(aj).optional(),description:Le().max(cj).optional(),baseRef:gh.optional(),headRef:gh.optional(),status:$b.optional()}).refine(e=>e.title!==void 0||e.description!==void 0||e.baseRef!==void 0||e.headRef!==void 0||e.status!==void 0,{message:"Provide at least one field to change.",path:["title"]});ut({id:Br});ut({id:Br});ut({id:Br});const zV=["committed","all","uncommitted"],dm=Bo(zV).optional().default("all");ut({id:Br,changes:dm});ut({id:Br,changes:dm});const uj=ut({id:Br,path:Le().min(1).max(4096),changes:dm});uj.extend({side:Bo(["base","head"])});uj.extend({line:zn().int().min(1).optional().default(1),editorId:Le().max(64).optional(),host:Le().max(200).optional()});ut({id:Gs});ut({reviewId:Br,filePath:Le(),contentDigest:Le(),reviewedAt:Le()});ut({reviewId:Br});ut({reviewId:Br,filePath:Le().min(1).max(4096),contentDigest:Le().min(1).max(mV).nullable()});const IV=2e4,DV=60,Qb=zn().int().positive(),hm=zn().int().positive(),fj=Bo(["base","head"]),_V=ut({kind:Bo(["human","agent"]),name:Le(),label:Le().nullable(),session:Le().nullable()}),PV=ut({url:Le(),path:Le(),alt:Le(),mimeType:Le(),byteSize:zn().int(),width:zn().int().nullable(),height:zn().int().nullable()});ut({sha:Le(),url:Le(),path:Le(),mimeType:Le(),byteSize:zn().int(),width:zn().int().nullable(),height:zn().int().nullable(),originalName:Le().nullable()});const LV=ut({id:Qb,threadId:hm,author:_V,body:Le(),attachments:Ku(PV),createdAt:vi(),updatedAt:vi()}),FV=ut({type:Bo(["context","insert","delete"]),content:Le(),oldNumber:zn().int().nullable(),newNumber:zn().int().nullable()}),HV=ut({lines:Ku(FV),clipped:Er()});ut({id:hm,reviewId:Br,filePath:Le().nullable(),side:fj.nullable(),line:zn().int().positive().nullable(),startLine:zn().int().positive().nullable(),anchorText:Le().nullable(),anchorSha:Le().nullable(),anchorSnapshot:HV.nullable(),resolvedAt:vi().nullable(),resolvedBy:Le().nullable(),createdAt:vi(),updatedAt:vi(),comments:Ku(LV)});const ev=Le().trim().min(1,"Write something first.").max(IV,"That comment is too long.");ut({reviewId:Br});ut({reviewId:Br,body:ev,filePath:Le().trim().min(1).optional(),side:fj.optional().default("head"),line:zn().int().positive().optional(),startLine:zn().int().positive().optional(),changes:dm}).refine(e=>e.filePath===void 0==(e.line===void 0),{message:"A line comment needs both a file and a line number.",path:["line"]}).refine(e=>e.startLine===void 0||e.line!==void 0,{message:"A range needs a line to end at.",path:["startLine"]}).refine(e=>e.startLine===void 0||e.startLine<=(e.line??0),{message:"The range has to start at or before the line it ends on.",path:["startLine"]});ut({threadId:hm,body:ev});ut({id:Qb,body:ev});ut({id:Qb});ut({threadId:hm,resolved:Er()});Le().trim().min(1,"A label cannot be empty.").max(DV,"That label is too long.");ut({name:Le().regex(ZM,"That is not an attachment name.")});ut({name:Le(),mimeType:Le(),byteSize:zn().int(),base64:Le()});ut({host:Le().max(200).optional()});ut({path:Le().max(4096).optional()});const BV=ut({name:Le(),path:Le(),isRepository:Er(),isHidden:Er()});ut({path:Le(),parent:Le().nullable(),home:Le(),separator:Le(),entries:Ku(BV),truncated:Er()});ut({available:Er(),dnsName:Le().nullable(),login:Le().nullable(),exposed:Er(),webRoot:Le().nullable()});ut({exposed:Er()});ut({dnsName:Le(),origin:Le(),instanceId:Le(),version:Le().nullable(),alreadyAdded:Le().nullable()});function _a(e,t){const n=e.safeParse(t);if(n.success)return n.data;const i=j2(n.error),s={};for(const[c,u]of Object.entries(i.fieldErrors))u&&u.length>0&&(s[c]=u);const l=i.formErrors[0]??Object.values(s)[0]?.[0]??"The values provided are not valid.";throw new Ch("INVALID_INPUT",l,s)}function VV({open:e,onOpenChange:t,host:n,onAdded:i}){return d.jsx(Ba,{open:e,onOpenChange:t,children:d.jsx(Va,{children:e&&d.jsx(UV,{host:n,onAdded:i,onDone:()=>t(!1)},n?.id??"new")})})}function UV({host:e,onDone:t,onAdded:n}){const i=e!==void 0,{addHost:s,updateHost:l}=Gu(),{distros:c,isLoading:u}=A6(!i),{data:m}=nn(i?null:Vt.tailnet,()=>_t.hosts.tailnet()),[h,p]=w.useState(e?.kind??"ssh"),[g,y]=w.useState(e?.target??""),[b,S]=w.useState(e?.label??""),[k,E]=w.useState(e?.editorTarget??""),[C,T]=w.useState(!1),[R,N]=w.useState(null),I=!i&&c!==void 0&&c.length>0,M=!i&&m?.available===!0,P=I||M;function A(F){F!==h&&(p(F),y(""),N(null))}async function L(F){F.preventDefault(),T(!0),N(null);try{if(e){const V=_a(TV,{id:e.id,label:b.trim(),...g.trim()!==e.target?{target:g.trim()}:{},editorTarget:k.trim()||null});await l(V)}else{const V=b.trim(),Y=k.trim(),te=_a(CV,{target:g.trim(),kind:h,...V?{label:V}:{},...Y?{editorTarget:Y}:{}}),O=await s(te);t(),n?.(O);return}t()}catch(V){N(V)}finally{T(!1)}}const D=wl(R,"target"),U=wl(R,"label"),q=R&&!D&&!U?Jt(R):null,K=h==="wsl",G=h==="websocket",B=!(i&&e.kind==="wsl");return d.jsxs("form",{onSubmit:F=>{L(F)},noValidate:!0,children:[d.jsxs(qu,{children:[d.jsx(Ua,{children:i?"Edit host":"Add host"}),d.jsx(Za,{children:i?"Rename this machine, or point it somewhere else if the address changed.":K?"A Linux distribution running on this PC. GitWarren talks to it through wsl.exe — nothing to configure, and nothing listening on a port.":G?'A machine on your tailnet with "Reachable on your tailnet" turned on in its own GitWarren. Nothing is installed onto it from here — it is already running, and Tailscale is what says you are its owner.':"Anything your own ssh can reach: a config alias, a tailnet name, user@address. GitWarren never asks for a password — your SSH agent and config do the authenticating."})]}),d.jsxs("div",{className:"flex flex-col gap-4",children:[P&&d.jsxs(Ii,{children:[d.jsx(Di,{children:"Connect by"}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx(yx,{selected:h==="ssh",label:"SSH",onSelect:()=>A("ssh")}),M&&d.jsx(yx,{selected:G,label:"Tailnet",onSelect:()=>A("websocket")}),I&&d.jsx(yx,{selected:K,label:"WSL",onSelect:()=>A("wsl")})]})]}),B&&(K?d.jsxs(Ii,{children:[d.jsx(Di,{htmlFor:"host-distro",children:"Distribution"}),d.jsx(ZV,{distros:c??[],loading:u,selected:g,onSelect:y}),d.jsx(El,{children:D}),!D&&d.jsx(Cs,{children:"GitWarren runs as that distribution's own default user."})]}):d.jsxs(Ii,{children:[d.jsx(Di,{htmlFor:"host-target",children:G?"Machine":"SSH host"}),d.jsx(Os,{id:"host-target",value:g,onChange:F=>y(F.target.value),placeholder:G?"pc-wsl":"user@machine",className:"font-mono text-xs","data-invalid":D?"":void 0,autoComplete:"off",spellCheck:!1}),d.jsx(El,{children:D}),!D&&d.jsx(Cs,{children:G?"Its name on your tailnet. No user name — Tailscale already knows who you are.":"Include the user name: a bare tailnet name asks for your local one."})]})),d.jsxs(Ii,{children:[d.jsx(Di,{htmlFor:"host-label",children:"Display name"}),d.jsx(Os,{id:"host-label",value:b,onChange:F=>S(F.target.value),placeholder:g.includes("@")?g.slice(g.indexOf("@")+1):"Defaults to the host","data-invalid":U?"":void 0,autoComplete:"off"}),d.jsx(El,{children:U}),!U&&!i&&d.jsxs(Cs,{children:["Leave blank to use the ",K?"distribution":"machine"," name."]})]}),d.jsxs(Ii,{children:[d.jsx(Di,{htmlFor:"host-editor-target",children:"Editor host"}),d.jsx(Os,{id:"host-editor-target",value:k,onChange:F=>E(F.target.value),placeholder:K?g.trim()?`wsl+${g.trim()}`:"wsl+<distribution>":g.trim()||"Same as the SSH host",className:"font-mono text-xs",autoComplete:"off",spellCheck:!1}),d.jsxs(Cs,{children:["Only if your editor knows this machine by a different name. Blank means the"," ",K?"distribution above":"SSH host above","."]})]}),q&&d.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:q})]}),d.jsxs(rm,{children:[d.jsx(Ze,{type:"button",variant:"ghost",onClick:t,children:"Cancel"}),d.jsxs(Ze,{type:"submit",disabled:C,children:[C&&d.jsx(wi,{className:"animate-spin"}),i?"Save changes":"Add host"]})]})]})}function yx({selected:e,label:t,onSelect:n}){return d.jsx(Ze,{type:"button",variant:e?"secondary":"ghost",size:"sm","aria-pressed":e,onClick:n,children:t})}function ZV({distros:e,loading:t,selected:n,onSelect:i}){return t?d.jsxs("p",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[d.jsx(wi,{className:"size-3 animate-spin"})," Looking for distributions…"]}):e.length===0?d.jsx("p",{className:"text-muted-foreground text-sm",children:"This machine has no WSL distributions."}):d.jsx("div",{id:"host-distro",className:"flex flex-col gap-1",children:e.map(s=>d.jsxs("button",{type:"button",disabled:s.alreadyAdded,"aria-pressed":n===s.name,onClick:()=>i(s.name),className:Te("flex items-center justify-between rounded-md border px-3 py-2 text-left text-sm",n===s.name?"border-primary bg-primary/5":"border-border",s.alreadyAdded&&"cursor-not-allowed opacity-50"),children:[d.jsx("span",{className:"font-mono text-xs",children:s.name}),d.jsx("span",{className:"text-muted-foreground text-xs",children:s.alreadyAdded?"already added":[s.isDefault?"default":null,s.running?"running":"stopped"].filter(Boolean).join(" · ")})]},s.name))})}function qV(e){return n2("alert-dialog",e)}const mm=qV;function pm({className:e,children:t,...n}){return d.jsxs(e2,{children:[d.jsx(JR,{className:Te("fixed inset-0 z-50 bg-black/40 backdrop-blur-[2px] transition-opacity duration-150","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0")}),d.jsx(QR,{className:Te("fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2","rounded-lg border border-border bg-card p-5 text-card-foreground shadow-xl","transition-all duration-150","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0",e),...n,children:t})]})}function gm({className:e,...t}){return d.jsx("div",{className:Te("flex flex-col gap-1.5",e),...t})}function xm({className:e,...t}){return d.jsx(r2,{className:Te("text-base font-semibold leading-none tracking-tight",e),...t})}function ym({className:e,...t}){return d.jsx(WR,{className:Te("text-sm text-muted-foreground",e),...t})}function bm({className:e,...t}){return d.jsx("div",{className:Te("mt-5 flex justify-end gap-2",e),...t})}function bE(e){return`${(e/1e6).toFixed(1)} MB`}function GV(e){if(e.kind==="error")return`Could not install on “${e.label}”`;switch(e.report.action){case"installed":return`GitWarren is on “${e.label}”`;case"upgraded":return`“${e.label}” is up to date`;case"already-current":return`“${e.label}” was already up to date`}}function YV(e){if(e.kind==="error")return e.message;const{action:t,version:n,previousVersion:i,target:s,bytes:l}=e.report;switch(t){case"installed":return`Version ${n} for ${s}, ${bE(l)} sent over the connection. The launcher at ~/.gitwarren/bin/gitwarren is what everything points at from now on, so an agent configured against it will survive every update.`;case"upgraded":return`Upgraded from ${i??"an unknown version"} to ${n} for ${s}, ${bE(l)} sent. The old version is still in ~/.gitwarren/daemon if you need to go back to it.`;case"already-current":return`${n} is already installed for ${s}, so nothing was sent. Use it anyway if you think the install there is damaged — the button reinstalls when the version matches.`}}function KV({outcome:e,onClose:t}){const n=e?.kind==="error";return d.jsx(mm,{open:e!==null,onOpenChange:i=>{i||t()},children:d.jsxs(pm,{children:[d.jsxs(gm,{children:[d.jsxs(xm,{className:"flex items-center gap-2",children:[n?d.jsx(JC,{className:"size-5 shrink-0 text-destructive"}):d.jsx(XC,{className:"size-5 shrink-0 text-success"}),e&&GV(e)]}),d.jsx(ym,{className:"break-words",children:e&&d.jsx(Xn,{text:YV(e)})})]}),d.jsx(bm,{children:d.jsx(Ze,{onClick:t,children:"Close"})})]})})}function XV({host:e,onOpenChange:t}){const{removeHost:n}=Gu(),[i,s]=w.useState(!1),[l,c]=w.useState(null);async function u(){if(e){s(!0),c(null);try{await n(e.id),t(!1)}catch(m){c(m)}finally{s(!1)}}}return d.jsx(mm,{open:e!==null,onOpenChange:m=>{m||c(null),t(m)},children:d.jsxs(pm,{children:[d.jsxs(gm,{children:[d.jsxs(xm,{children:["Forget “",e?.label,"”?"]}),d.jsxs(ym,{children:["This removes the machine from this GitWarren’s list. Nothing is uninstalled: the daemon under ",d.jsx("code",{children:"~/.gitwarren"})," over there stays where it is, and an agent configured against it keeps working."]})]}),e&&d.jsx("p",{"data-selectable":!0,className:"mt-3 break-words rounded-md bg-muted px-3 py-2 font-mono text-xs text-muted-foreground",children:d.jsx(Xn,{text:e.target})}),l!==null&&d.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:Jt(l)}),d.jsxs(bm,{children:[d.jsx(Ze,{variant:"ghost",onClick:()=>t(!1),disabled:i,children:"Cancel"}),d.jsxs(Ze,{variant:"destructive",onClick:()=>{u()},disabled:i,children:[i&&d.jsx(wi,{className:"animate-spin"}),"Forget host"]})]})]})})}const dj=w.createContext(void 0);function JV(){const e=w.useContext(dj);if(e===void 0)throw new Error(En(63));return e}const hj={...Bs,checked(e){return e?{"data-checked":""}:{"data-unchecked":""}}},WV=w.forwardRef(function(t,n){const{checked:i,className:s,defaultChecked:l,"aria-labelledby":c,form:u,id:m,inputRef:h,name:p,nativeButton:g=!1,onCheckedChange:y,readOnly:b=!1,required:S=!1,disabled:k=!1,render:E,uncheckedValue:C,value:T,style:R,...N}=t,{clearErrors:I}=Vs(),{state:M,setTouched:P,setDirty:A,validityData:L,setFilled:D,setFocused:U,validationMode:q,disabled:K,name:G,validation:B}=qi(),{labelId:F}=ki(),V=K||k,Y=G??p,te=w.useRef(null),O=Ui(te,h,B.inputRef),_=w.useRef(null),Z=Or(),z=qa({id:m,implicit:!1,controlRef:_}),J=g?void 0:z,[ne,W]=Do({controlled:i,default:!!l,name:"Switch",state:"checked"});Yu(_,Z,ne,void 0,!V,p),ze(()=>{te.current&&D(te.current.checked)},[D]),Es(ne,()=>{I(Y),A(ne!==L.initialValue),D(ne),B.change(ne)});const{getButtonProps:fe,buttonRef:ie}=Fo({disabled:V,native:g}),se=x2(c,F,te,!g,J),Se={id:g?z:Z,role:"switch","aria-checked":ne,"aria-readonly":b||void 0,"aria-required":S||void 0,"aria-labelledby":se,onFocus(){V||U(!0)},onBlur(){const Re=te.current;!Re||V||(P(!0),U(!1),q==="onBlur"&&B.commit(Re.checked))},onClick(Re){if(b||V)return;Re.preventDefault();const De=te.current;De&&fu(De,Re)}},ye={...B.getValidationProps(V),checked:ne,disabled:V,form:u,id:J,name:Y,required:S,style:Y?Vu:Bu,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:O,onChange(Re){if(Re.nativeEvent.defaultPrevented)return;if(b){Re.preventDefault();return}const De=Re.currentTarget.checked,Me=Xe(On,Re.nativeEvent);y?.(De,Me),!Me.isCanceled&&W(De)},onClick(Re){Re.stopPropagation()},onFocus(){_.current?.focus()},...T!==void 0?{value:T}:wn},xe=w.useMemo(()=>({...M,checked:ne,disabled:V,readOnly:b,required:S}),[M,ne,V,b,S]),ve=jt("span",t,{state:xe,ref:[n,_,ie],props:[Se,N,fe,Re=>B.getValidationProps(V,Re)],stateAttributesMapping:hj});return d.jsxs(dj.Provider,{value:xe,children:[ve,!ne&&Y&&C!==void 0&&d.jsx("input",{type:"hidden",form:u,name:Y,value:C,disabled:V}),d.jsx("input",{...ye,suppressHydrationWarning:!0})]})}),$V=w.forwardRef(function(t,n){const{render:i,className:s,style:l,...c}=t,u=JV();return jt("span",t,{state:u,ref:n,stateAttributesMapping:hj,props:c})});function tv({className:e,...t}){return d.jsx(WV,{className:Te("relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent","bg-muted transition-colors data-[checked]:bg-primary","disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx($V,{className:Te("pointer-events-none block size-4 translate-x-0.5 rounded-full bg-background shadow-sm transition-transform","data-[checked]:translate-x-[1.125rem]")})})}function QV(){const{data:e,mutate:t}=Fb(),[n,i]=w.useState(null),s=n!==null,[l,c]=w.useState(null),u=w.useRef(null);if(!e?.available)return null;async function m(h){i(h),c(null);try{await t(_t.hosts.setTailnetExposure({exposed:h}),{revalidate:!1})}catch(p){c(Jt(p)),t()}finally{i(null)}}return d.jsxs(wt,{className:"flex flex-col gap-3 p-4",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(JI,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsxs("label",{htmlFor:"tailnet-exposed",className:"min-w-40 flex-1 cursor-pointer",children:[d.jsx("span",{className:"block text-sm font-medium",children:"Reachable on your tailnet"}),d.jsxs("span",{className:"block text-xs text-muted-foreground",children:["Your other machines can add this one as a host, and you can open its reviews in a browser on any device signed in as ",e.login,"."]})]}),d.jsx(tv,{id:"tailnet-exposed",checked:e.exposed,disabled:s,onCheckedChange:h=>{m(h)}})]}),s?d.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[d.jsx(wi,{className:"size-3 shrink-0 animate-spin"}),n?"Putting this machine on your tailnet…":"Taking it off your tailnet…"]}):null,!s&&e.exposed&&e.webRoot?d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("a",{ref:u,href:e.webRoot,target:"_blank",rel:"noreferrer noopener","data-selectable":!0,className:"min-w-0 flex-1 font-mono text-xs text-primary underline underline-offset-2 hover:no-underline",children:d.jsx(Xn,{text:e.webRoot})}),d.jsx($h,{label:"Copy this machine's tailnet address",text:e.webRoot,source:u,className:"shrink-0"})]}):null,l?d.jsx("p",{className:"text-xs text-destructive",children:l}):null]})}function eU(){const{hosts:e,error:t,isLoading:n,isRefreshing:i,refresh:s}=f2(),{probeHost:l,installOnHost:c}=Gu(),{data:u}=nn(Vt.appInfo,()=>_t.system.appInfo()),{data:m}=Fb(),h=m?.available===!0,[p,g]=w.useState(!1),[y,b]=w.useState(void 0),[S,k]=w.useState(null),[E,C]=w.useState(null),[T,R]=w.useState(null),N=w.useCallback(()=>{b(void 0),g(!0)},[]);function I(L){b(L),g(!0)}async function M(L){C({id:L.id,what:"probe"});try{await l(L.id)}catch(D){R({kind:"error",label:L.label,message:Jt(D)})}finally{C(null)}}async function P(L){C({id:L.id,what:"probe"});try{await l(L.id)}catch{}finally{C(null)}}async function A(L){C({id:L.id,what:"install"});try{const D=await c(L.id);R({kind:"done",label:L.label,report:D})}catch(D){R({kind:"error",label:L.label,message:Jt(D)})}finally{C(null)}}return Il(w.useMemo(()=>[{id:"hosts:add",label:"Add host",group:"Hosts",keys:"n",keywords:"ssh machine remote server vps wsl",icon:Bi,run:N},{id:"hosts:refresh",label:"Refresh hosts",group:"Hosts",keys:"r",keywords:"reload reachable status",icon:sr,run:()=>{s()}}],[N,s])),d.jsxs("section",{className:"flex flex-col gap-4",children:[d.jsxs("div",{children:[d.jsxs(Ze,{variant:"ghost",size:"sm",className:"-ml-2 mb-2 text-muted-foreground",onClick:()=>An({name:"repositories"}),children:[d.jsx(Ts,{}),"Repositories"]}),d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Iu,{className:"size-5 shrink-0 text-muted-foreground"}),d.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Hosts"})]}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n?"Loading…":`${e?.length??0} machine${e?.length===1?"":"s"}${i?" · refreshing…":""}`})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx(Ln,{label:"Re-read reachability",children:d.jsx(Ze,{variant:"outline",size:"icon",onClick:()=>{s()},disabled:n,"aria-label":"Refresh",children:d.jsx(sr,{className:i?"animate-spin":void 0})})}),d.jsxs(Ze,{onClick:N,children:[d.jsx(Bi,{}),"Add host"]})]})]})]}),h&&d.jsx(vE,{children:"This machine"}),d.jsx(QV,{}),h&&d.jsx(vE,{children:"Other machines"}),d.jsx(L6,{onAdded:L=>{P(L)}}),n&&d.jsx(tU,{}),!n&&t!==void 0&&d.jsx(rU,{error:t,onRetry:()=>{s()}}),!n&&t===void 0&&e?.length===0&&d.jsx(nU,{onAdd:N}),!n&&t===void 0&&e&&e.length>0&&d.jsx("ul",{className:"flex flex-col gap-2",children:e.map(L=>d.jsx("li",{children:d.jsx(F6,{host:L,appVersion:u?.version,busy:E?.id===L.id?E.what:null,onProbe:D=>{M(D)},onInstall:D=>{A(D)},onEdit:I,onRemove:k})},L.id))}),d.jsx(VV,{open:p,onOpenChange:g,host:y,onAdded:L=>{P(L)}}),d.jsx(XV,{host:S,onOpenChange:L=>{L||k(null)}}),d.jsx(KV,{outcome:T,onClose:()=>R(null)})]})}function vE({children:e}){return d.jsx("h2",{className:"-mb-1 mt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e})}function tU(){return d.jsx("ul",{className:"flex flex-col gap-2","aria-busy":"true","aria-label":"Loading hosts",children:[0,1].map(e=>d.jsx("li",{children:d.jsxs(wt,{className:"flex flex-col gap-3 p-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(yt,{className:"h-4 w-32"}),d.jsx(yt,{className:"h-4 w-24"})]}),d.jsx(yt,{className:"h-3 w-56"}),d.jsx(yt,{className:"h-8 w-40 rounded-md"})]})},e))})}function nU({onAdd:e}){return d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-dashed px-6 py-14 text-center",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 text-muted-foreground",children:d.jsx(Iu,{className:"size-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium",children:"No other machines yet"}),d.jsx("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:"Add a machine you can already reach over ssh — a PC’s WSL, a VPS, a build box — and GitWarren will install itself there over the same connection. The host needs nothing but git."})]}),d.jsxs(Ze,{onClick:e,className:"mt-1",children:[d.jsx(Bi,{}),"Add your first host"]})]})}function rU({error:e,onRetry:t}){return d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-destructive/40 px-6 py-12 text-center",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3 text-destructive",children:d.jsx(Hi,{className:"size-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium",children:"Could not load your hosts"}),d.jsx("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:Jt(e)})]}),d.jsxs(Ze,{variant:"outline",onClick:t,className:"mt-1",children:[d.jsx(sr,{}),"Try again"]})]})}function iU(){const{mutate:e}=_s();w.useEffect(()=>oT((t,n)=>{n.offlineSince===null&&e(i=>typeof i=="string"&&(i===Vt.hosts||i.endsWith(`@${t}`)))}),[e]),w.useEffect(()=>_t.connection.subscribe(t=>{t&&e(()=>!0)}),[e])}function oU(e){switch(e){case"darwin":return"GitWarren opens in the menu bar when you log in, with no window.";case"win32":return"GitWarren opens in the notification area when you sign in, with no window.";default:return"GitWarren opens in the system tray when you log in, with no window."}}function sU(){const{data:e}=nn(Vt.appInfo,()=>_t.system.appInfo()),{data:t,mutate:n}=nn(_t.capabilities.openAtLogin?Vt.openAtLogin:null,()=>_t.system.getOpenAtLogin()),[i,s]=w.useState(!1);if(!_t.capabilities.openAtLogin||!e||t===void 0)return null;async function l(c){s(!0);try{await n(_t.system.setOpenAtLogin(c),{optimisticData:c,revalidate:!1})}finally{s(!1)}}return d.jsxs(wt,{className:"flex items-center gap-3 p-4",children:[d.jsx(ND,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsxs("label",{htmlFor:"open-at-login",className:"flex-1 cursor-pointer",children:[d.jsx("span",{className:"block text-sm font-medium",children:"Start GitWarren at login"}),d.jsx("span",{className:"block text-xs text-muted-foreground",children:oU(e.platform)})]}),d.jsx(tv,{id:"open-at-login",checked:t,disabled:i,onCheckedChange:c=>{l(c)}})]})}function lU(e,t){const i=t.replace(/^\/+/,"").split("/").join("\\");return`\\\\wsl.localhost\\${e}${i?`\\${i}`:""}`}function mj(e){const t=$n(),{data:n}=nn(t===void 0?null:Vt.hosts,()=>_t.hosts.list()),{data:i}=nn(t===void 0?null:Vt.appInfo,()=>_t.system.appInfo());if(t===void 0)return e;if(n===void 0||i===void 0)return null;const s=n.find(l=>l.instanceId===t);return s===void 0||s.kind!=="wsl"||i.platform!=="win32"?null:lU(s.target,e)}function pj({className:e,...t}){return d.jsx("textarea",{className:Te("flex min-h-20 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors","placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50","data-[invalid]:border-destructive",e),...t})}function gj(e){const t=w.useRef(!0);t.current&&(t.current=!1,e())}function aU(e,t,n,i,s,l,c,u,m,h=2){const p=l3(n.current,{event:e,orientation:i,loopFocus:s,rtl:l,cols:h,disabledIndices:c,minIndex:u,maxIndex:m,prevIndex:t>m?u:t,stopEvent:!0});return Ns(n.current,p)?void 0:p}const xj=w.createContext(void 0),yj=w.createContext(void 0),bj=w.createContext(void 0),vj=w.createContext(!1),wj=w.createContext("");function Ci(){const e=w.useContext(xj);if(!e)throw new Error(En(22));return e}function vm(){const e=w.useContext(yj);if(!e)throw new Error(En(23));return e}function Ju(){const e=w.useContext(bj);if(!e)throw new Error(En(24));return e}function Sj(){return w.useContext(wj)}function cU(){return w.useContext(vj)}const kj=(e,t)=>Object.is(e,t);function Si(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function uU(e,t,n){return!e||e.length===0?!1:e.some(i=>i===void 0?!1:Si(t,i,n))}function ja(e,t,n){return!e||e.length===0?-1:e.findIndex(i=>i===void 0?!1:Si(i,t,n))}function bx(e,t,n,i){const s=i&&Array.isArray(t)?t[t.length-1]:t,l=ja(e,s,n);return l===-1?null:l}function Ej(e,t,n){return e.filter(i=>!Si(t,i,n))}function Ny(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function nv(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Cj(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(nv(t)){for(const n of t)for(const i of n.items)if(i&&i.value==null&&i.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function pi(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Ny(e)}function _i(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Ny(e.value):Ny(e)}function rv(e,t,n){function i(){return pi(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??i();if(Array.isArray(t)){const s=t,l=nv(s)?s.flatMap(c=>c.items):s;if(e==null||typeof e!="object"){const c=l.find(u=>u.value===e);return c&&c.label!=null?c.label:i()}if("value"in e){const c=l.find(u=>u&&u.value===e.value);if(c&&c.label!=null)return c.label}}return i()}function Tj(e,t,n){return e.reduce((i,s,l)=>(l>0&&i.push(", "),i.push(d.jsx(w.Fragment,{children:rv(s,t,n)},l)),i),[])}const Pe={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectedValue:e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?Cj(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,i=e.selectedValue;return Array.isArray(i)?i.some(s=>Si(t,s,n)):Si(t,i,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};function Rj(e){return e==null?void 0:`${e}-popup`}function fU(e,t){return(n,i)=>n==null?!1:e.contains(n,i,t)}function jj(e){return Array.isArray(e)?e.map(t=>jj(t)).join(","):e==null?"":String(e)}const wE=new Map;function dU(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${jj(e.locale)}|${JSON.stringify(t)}`,i=wE.get(n);if(i)return i;const s=new Intl.Collator(e.locale,t),l={contains(c,u,m){if(!u)return!0;const h=pi(c,m);for(let p=0;p<=h.length-u.length;p+=1)if(s.compare(h.slice(p,p+u.length),u)===0)return!0;return!1},startsWith(c,u,m){if(!u)return!0;const h=pi(c,m);return s.compare(h.slice(0,u.length),u)===0},endsWith(c,u,m){if(!u)return!0;const h=pi(c,m),p=u.length;return h.length>=p&&s.compare(h.slice(h.length-p),u)===0}};return wE.set(n,l),l}const hU=dU;function mU(e,t=!1){const{overflowY:n}=Fr(e);return n!=="auto"&&n!=="scroll"?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}function Nj(e,t,n=(i,s)=>i===s){return e.length===t.length&&e.every((i,s)=>n(i,t[s]))}const Oj=Symbol("none"),vx={value:Oj,index:-1};function pU(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:i=null,selectedValue:s,onSelectedValueChange:l,defaultInputValue:c,inputValue:u,open:m,defaultOpen:h=!1,selectionMode:p,onItemHighlighted:g,name:y,form:b,disabled:S=!1,readOnly:k=!1,required:E=!1,inputRef:C,grid:T=!1,items:R,filteredItems:N,filter:I,openOnInputClick:M=!0,autoHighlight:P=!1,keepHighlight:A=!1,highlightItemOnHover:L=!0,loopFocus:D=!0,itemToStringLabel:U,itemToStringValue:q,isItemEqualToValue:K=kj,virtualized:G=!1,inline:B=!1,fillInputOnItemPress:F=!0,modal:V=!1,limit:Y=-1,autoComplete:te="list",formAutoComplete:O,locale:_,submitOnItemClick:Z=!1}=e,{clearErrors:z}=Vs(),{setDirty:J,validityData:ne,setFilled:W,name:fe,disabled:ie,setTouched:se,setFocused:Se,validationMode:ye,validation:xe}=qi(),ve=Zu(),Re=qa({id:t}),De=hU({locale:_}),[Me,Ne]=w.useState(!1),[ge,we]=w.useState(null),je=w.useRef([]),Ve=w.useRef([]),Ue=w.useRef(null),me=w.useRef(null),re=w.useRef(null),le=w.useRef(null),$=w.useRef(null),Q=w.useRef(!0),de=w.useRef(!1),Oe=w.useRef(null),_e=w.useRef(null),Ge=w.useRef(null),dt=w.useRef(vx),rt=w.useRef(null),at=w.useRef([]),Nt=w.useRef(null),Je=ie||S,Pt=fe??y,Fe=p==="multiple",pt=p==="single",Et=u!==void 0||c!==void 0,St=R!==void 0,tt=N!==void 0;let ht;P==="always"?ht="always":ht=P?"input-change":!1;const[et,Wt]=Do({controlled:s,default:Fe?i??Pi:i,name:"Combobox",state:"selectedValue"}),Bn=w.useMemo(()=>I===null?()=>!0:I!==void 0?I:fU(De,U),[I,De,U]),In=Jn(()=>Et?c??"":pt?pi(et,U):"").current,[rn,Sn]=Do({controlled:u,default:In,name:"Combobox",state:"inputValue"}),[Ft,Ar]=Do({controlled:m,default:h,name:"Combobox",state:"open"}),lr=nv(R),st=ge??String(rn).trim(),Yt=pt?pi(et,U):"",Vn=pt&&!Me&&st!==""&&Yt.length===st.length&&De.contains(Yt,st),Dn=Vn?"":st,gr=St&&tt&&Vn,yn=w.useMemo(()=>R?lr?R.flatMap(He=>He.items):R:Pi,[R,lr]),Zt=w.useMemo(()=>{if(N&&!gr)return N;if(!R)return Pi;if(lr){const qe=R,Kt=[];let Ut=0;for(const on of qe){if(Y>-1&&Ut>=Y)break;const nr=Y>-1?Y-Ut:1/0,sn=Dn===""?on.items.slice(0,nr):[];if(Dn!=="")for(const cr of on.items){if(sn.length>=nr)break;Bn(cr,Dn,U)&&sn.push(cr)}if(sn.length>0){const cr={...on,items:sn};Kt.push(cr),Ut+=sn.length}}return Kt}if(Dn==="")return Y>-1?yn.slice(0,Y):yn;const He=[];for(const qe of yn){if(Y>-1&&He.length>=Y)break;Bn(qe,Dn,U)&&He.push(qe)}return He},[N,gr,R,lr,Dn,Y,Bn,U,yn]),Ht=w.useMemo(()=>lr?Zt.flatMap(qe=>qe.items):Zt,[Zt,lr]),nt=Jn(()=>{let He=null;return B&&Ft&&St&&p!=="none"&&(He=bx(Ht,et,K,Fe)),new $T({id:Re,labelId:void 0,selectedValue:et,open:Ft,items:R,selectionMode:p,listRef:je,labelsRef:Ve,popupRef:Ue,emptyRef:$,inputRef:me,startDismissRef:re,endDismissRef:le,keyboardActiveRef:Q,chipsContainerRef:Oe,clearRef:_e,valuesRef:at,pointerDownItemRef:Nt,selectionEventRef:Ge,name:Pt,form:b,disabled:Je,readOnly:k,required:E,grid:T,virtualized:G,openOnInputClick:M,itemToStringLabel:U,isItemEqualToValue:K,modal:V,autoHighlight:ht,submitOnItemClick:Z,hasInputValue:Et,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:B,activeIndex:null,selectedIndex:He,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:wn,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:p==="none",onOpenChangeComplete:fn,setOpen:fn,setInputValue:fn,setSelectedValue:fn,setIndices:fn,handleSelection:fn,forceMount:fn,requestSubmit:fn})}).current,Tr=p==="none"?rn:et,Mm=w.useMemo(()=>p==="none"?Tr:Array.isArray(et)?et.map(He=>_i(He,q)):_i(et,q),[Tr,q,p,et]),zm=Ae(g),$a=Ae(n),Zo=pe(nt,Pe.activeIndex),Qa=pe(nt,Pe.selectedIndex),Ti=pe(nt,Pe.positionerElement),ao=pe(nt,Pe.listElement),Ri=pe(nt,Pe.triggerElement),ji=pe(nt,Pe.inputElement),Un=pe(nt,Pe.inputGroupElement),ar=pe(nt,Pe.inline),Ur=pe(nt,Pe.inputInsidePopup),co=pe(nt,Pe.inputOwnsFormValue),qo=Tn(Ri),{mounted:tf,setMounted:nf,transitionStatus:Ll}=Al(Ft),{openMethod:rf,triggerProps:Go}=i2(Ft),Fl=Ae(()=>Mm);Yu(Ur?qo:me,Re,Tr,Fl,!Je,y);const ii=Ae(()=>{R?Ve.current=Ht.map(He=>pi(He,U)):nt.set("forceMounted",!0)}),Qn=Ae((He,qe,Kt)=>{if(qe===-1){if(dt.current===vx)return;dt.current=vx}else dt.current={value:He,index:qe};zm(He,B4(Kt,void 0,{index:qe}))}),Zr=Ae(He=>{nt.update(He);const qe=He.activeIndex;if(qe===void 0)return;const Kt=He.type||On;qe===null?Qn(void 0,-1,Kt):Qn(at.current[qe],qe,Kt)}),oi=Ae((He,qe)=>{if(de.current=qe.reason===Qi,e.onInputValueChange?.(He,qe),!qe.isCanceled){if(qe.reason===au){Ft&&ge!==null&&we(null);const Kt=qe.event,Ut=Kt.inputType;if(Kt.type==="compositionend"||Ut!=null&&Ut!==""&&Ut!=="insertReplacementText"){const nr=He.trim()!=="";nr&&Ne(!0),rt.current={hasQuery:nr};const sn=nt.state.listElement;if(!nt.state.virtualized&&sn){const cr=Ue.current;for(const yr of Oa(sn.firstElementChild??sn)){if(!en(yr)||(cr?!$e(cr,yr):yr.getAttribute("role")==="dialog"))break;if(mU(yr)){yr.scrollTop=0;break}}}nr&&ht&&nt.state.activeIndex==null&&(Ft||ar)&&nt.set("activeIndex",0)}}else qe.reason===Qi&&He===""&&nt.state.inputInsidePopup&&(rt.current={hasQuery:!1,selection:!0});Sn(He)}}),uo=Ae((He,qe)=>{if(Ft!==He&&(qe.reason===Hu&&St&&Ht.length===0&&!$.current&&qe.allowPropagation(),e.onOpenChange?.(He,qe),!qe.isCanceled&&(He&&Ur&&!ar&&ge!==null&&(Ne(!1),we(null),rn!==""&&qe.reason!==au&&oi("",Xe(Qi,qe.event))),!He&&Me&&(pt?(ar||we(st),st===""&&Ne(!1)):Fe&&(ar||we(st),Ur&&Zr({activeIndex:null}),(!Ur||ar)&&oi("",Xe(Qi,qe.event)))),Ar(He),!He&&Ur&&(qe.reason===Fu||qe.reason===_h)&&(se(!0),Se(!1),ye==="onBlur")))){const Kt=p==="none"?rn:et;xe.commit(Kt)}}),Ks=Ae((He,qe)=>{if(l?.(He,qe),qe.isCanceled)return;Wt(He),(p==="none"&&Ue.current&&F||pt&&!nt.state.inputInsidePopup)&&oi(pi(He,U),Xe(qe.reason,qe.event))}),Hl=Ae((He,qe)=>{const Kt=Mn(He),Ut=Ge.current??He;Ge.current=null;const on=Xe(Hd,Ut),nr=Kt?.closest("a")?.getAttribute("href");if(nr){nr.startsWith("#")&&uo(!1,on);return}if(Fe){const sn=Array.isArray(et)?et:[],yr=uU(sn,qe,K)?Ej(sn,qe,K):[...sn,qe];if(Ks(yr,on),on.isCanceled||!(me.current?me.current.value.trim()!=="":!1))return;nt.state.inputInsidePopup?oi("",Xe(Qi,on.event)):uo(!1,on)}else{if(Ks(qe,on),on.isCanceled)return;uo(!1,on)}}),Im=Ae(()=>{const He=xe.inputRef.current?.form??nt.state.inputElement?.form;He&&typeof He.requestSubmit=="function"&&He.requestSubmit()}),xr=Ae(()=>{if(nf(!1),$a?.(!1),Ne(!1),we(null),Zr(p==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Fe&&me.current&&me.current.value!==""&&!de.current&&oi("",Xe(Qi)),pt)if(nt.state.inputInsidePopup)me.current&&me.current.value!==""&&oi("",Xe(Qi));else{const He=pi(et,U);me.current&&me.current.value!==He&&oi(He,Xe(He===""?Qi:On))}}),ec=w.useMemo(()=>ar&&Ti?{current:Ti.closest('[role="dialog"]')}:Ue,[ar,Ti]);Zi({enabled:!e.actionsRef,open:Ft,ref:ec,onComplete(){Ft||xr()}}),w.useImperativeHandle(e.actionsRef,()=>({unmount:xr}),[xr]),ze(function(){if(Ft||(Nt.current=null,p==="none"))return;const qe=St?yn:at.current;Zr({selectedIndex:bx(qe,et,K,Fe)})},[Ft,et,p,Fe,St,yn,K,Zr]),ze(()=>{R&&(at.current=Ht,je.current.length=Ht.length)},[R,Ht]),ze(()=>{const He=rt.current;if(He){const cr=Ft||ar||nt.state.positionerElement?.hidden===!1;if(He.hasQuery)ht&&cr&&nt.set("activeIndex",0),rt.current=null;else if(String(rn).trim()===""&&(rt.current=null,cr)){const yr=He.selection;ht==="always"&&!yr&&nt.state.selectionMode==="none"&&nt.set("activeIndex",0),queueMicrotask(()=>{if(!nt.state.open&&!nt.state.inline||me.current&&me.current.value.trim()!=="")return;const Gr=nt.state.selectedValue,Jo=nt.state.selectionMode==="multiple",br=Jo&&Array.isArray(Gr)?Gr[Gr.length-1]:Gr,Yi=nt.state.selectionMode!=="none"&&br!=null;if(Yi||yr){const Zl=St||tt?Ht:at.current;nt.set("activeIndex",Yi?bx(Zl,Gr,nt.state.isItemEqualToValue,Jo):null)}else ht==="always"&&nt.set("activeIndex",0)})}}if(!Ft&&!ar)return;const Kt=St||tt?Ht:at.current,Ut=nt.state.activeIndex;if(Ut==null){if(ht==="always"&&Kt.length>0){nt.set("activeIndex",0);return}Qn(void 0,-1,On);return}if(Ut>=Kt.length){Qn(void 0,-1,On),nt.set("activeIndex",null);return}const on=Kt[Ut],nr=dt.current.value,sn=nr!==Oj&&Si(on,nr,nt.state.isItemEqualToValue);(dt.current.index!==Ut||!sn)&&Qn(on,Ut,On)},[Zo,ht,Qn,tt,St,Ht,ar,Ft,nt,rn]),ze(()=>{if(p==="none"){W(String(rn)!=="");return}W(Fe?Array.isArray(et)&&et.length>0:et!=null)},[W,p,rn,et,Fe]),w.useEffect(()=>{St&&ht&&Ht.length===0&&Zr({activeIndex:null})},[St,ht,Ht.length,Zr]);function of(He){const qe=ne.initialValue;return Array.isArray(He)&&Array.isArray(qe)?!Nj(He,qe,(Kt,Ut)=>Si(Kt,Ut,K)):He!==qe}Es(st,()=>{!Ft||st===""||st===String(In)||Ne(!0)});function Bl(){const He=pi(et,U);rn!==He&&oi(He,Xe(On))}Es(et,()=>{p!=="none"&&(z(Pt),J(of(et)),xe.change(et),pt&&!Et&&!Ur&&Bl())}),Es(rn,()=>{p==="none"&&(z(Pt),J(rn!==ne.initialValue),xe.change(rn))}),Es(R,()=>{!pt||Et||Ur||Me||Bl()});const Ni=cR({open:ar?!0:Ft,onOpenChange:uo,elements:{reference:Ur?Ri:ji,floating:Ti}}),tc=T?"grid":"listbox",Xs=Ft||ar,fo=Xs?"true":"false",Vl=w.useMemo(()=>{const He=ji?.tagName==="INPUT",qe=ji==null||He,Kt=qe||Xs,Ut=qe?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return Kt&&(Ut.role="combobox",Ut["aria-expanded"]=fo,Ut["aria-haspopup"]=tc,Ut["aria-controls"]=Xs?ao?.id:void 0,Ut["aria-autocomplete"]=te),{reference:Ut,floating:{role:"presentation"}}},[ji,Xs,fo,tc,ao?.id,te]),nc=vb(Ni,{enabled:!k&&!Je&&M,event:"mousedown-only",toggle:!1,touchOpenDelay:Ur?0:100,reason:F4}),Js=Bh(Ni,{enabled:!k&&!Je&&!ar,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:ar?!0:void 0,outsidePress(He){const qe=Mn(He);return!$e(Ri,qe)&&!$e(_e.current,qe)&&!$e(Oe.current,qe)&&!$e(Un,qe)}}),Gi=fR(Ni,{enabled:!k&&!Je,id:Re,listRef:je,activeIndex:Zo,selectedIndex:Qa,virtual:!0,loopFocus:D,allowEscape:D&&!ht,focusItemOnOpen:Me||p==="none"&&!ht?!1:"auto",focusItemOnHover:L,resetOnPointerLeave:!A,orientation:T?"horizontal":void 0,rtl:ve==="rtl",disabledIndices:Pi,grid:T?aU:void 0,onNavigate(He,qe){!qe&&!Ft||Ll==="ending"||Zr(qe?{activeIndex:He,type:Q.current?hT:mT}:{activeIndex:He})}}),rc=w.useMemo(()=>bi(Gi.reference,{onKeyDown(He){T&&nt.state.activeIndex==null&&(He.key==="ArrowLeft"||He.key==="ArrowRight")&&He.preventBaseUIHandler()}},Js.reference,nc.reference,Vl.reference),[Gi.reference,Js.reference,nc.reference,Vl.reference,T,nt]),ic=w.useMemo(()=>bi(qh,Js.floating),[Js.floating]),Yo=w.useMemo(()=>bi(Gi.floating,Vl.floating),[Gi.floating,Vl.floating]),qr=w.useMemo(()=>{const He=Gi.item;return He?{...He,onFocus:void 0}:wn},[Gi.item]);gj(()=>{nt.update({inline:B,popupProps:ic,listProps:Yo,inputProps:rc,triggerProps:Go,itemProps:qr,setOpen:uo,setInputValue:oi,setSelectedValue:Ks,setIndices:Zr,handleSelection:Hl,forceMount:ii,requestSubmit:Im,onOpenChangeComplete:$a})}),ze(()=>{nt.update({id:Re,selectedValue:et,open:Ft,mounted:tf,transitionStatus:Ll,items:R,inline:B,popupProps:ic,listProps:Yo,inputProps:rc,triggerProps:Go,openMethod:rf,itemProps:qr,selectionMode:p,name:Pt,form:b,disabled:Je,readOnly:k,required:E,grid:T,virtualized:G,openOnInputClick:M,itemToStringLabel:U,modal:V,autoHighlight:ht,isItemEqualToValue:K,submitOnItemClick:Z,hasInputValue:Et,inputOwnsFormValue:p==="none"&&(B||!nt.state.inputInsidePopup)})},[nt,Re,et,Ft,tf,Ll,R,ic,Yo,rc,qr,rf,Go,p,Pt,Je,k,E,T,G,M,U,V,K,Z,Et,B,ht,b]);const oc=Ui(C,xe.inputRef),sc=w.useMemo(()=>({query:st,hasItems:St,filteredItems:Zt,flatFilteredItems:Ht}),[st,St,Zt,Ht]),Ko=w.useMemo(()=>Array.isArray(Tr)?"":_i(Tr,q),[Tr,q]),Xo=Fe&&Array.isArray(et)&&et.length>0,Ul=Fe||p==="none"&&co?void 0:Pt,lc=w.useMemo(()=>!Fe||!Array.isArray(et)||!Pt?null:et.map(He=>{const qe=_i(He,q);return d.jsx("input",{type:"hidden",form:b,name:Pt,value:qe,disabled:Je},qe)}),[Fe,et,b,Pt,q,Je]),sf=d.jsxs(w.Fragment,{children:[e.children,d.jsx("input",{...xe.getValidationProps(Je,{onFocus(){if(Ur){Ri?.focus();return}(me.current||Ri)?.focus()},onChange(He){if(He.nativeEvent.defaultPrevented||Je||k)return;const qe=He.currentTarget.value,Kt=qe.toLowerCase(),Ut=Xe(On,He.nativeEvent),on=()=>at.current.findIndex(sn=>_i(sn,q).toLowerCase()===Kt||pi(sn,U).toLowerCase()===Kt);function nr(){if(Fe)return;if(p==="none"){oi(qe,Ut);return}let sn=on();sn===-1&&(sn=at.current.findIndex((yr,Gr)=>{const Jo=Ve.current[Gr];return Jo!=null&&Jo.toLowerCase()===Kt}));const cr=sn===-1?void 0:at.current[sn];cr!=null&&Ks?.(cr,Ut)}pt&&(ii(),R&&on()===-1&&nt.set("forceMounted",!0)),queueMicrotask(nr)}}),id:Re&&Ul==null?`${Re}-hidden-input`:void 0,form:b,name:Ul,autoComplete:O,disabled:Je,required:E&&!Xo,readOnly:k,value:Ko,ref:oc,style:Ul?Vu:Bu,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),lc]});return d.jsx(xj.Provider,{value:nt,children:d.jsx(yj.Provider,{value:Ni,children:d.jsx(vj.Provider,{value:St,children:d.jsx(bj.Provider,{value:sc,children:d.jsx(wj.Provider,{value:rn,children:sf})})})})})}function gU(e){const{multiple:t=!1,defaultValue:n,value:i,onValueChange:s,autoComplete:l,...c}=e;return d.jsx(pU,{...c,selectionMode:t?"multiple":"single",selectedValue:i,defaultSelectedValue:n,onSelectedValueChange:s,formAutoComplete:l})}function Aj(e,t){return e??t}function xU(e){const{children:t,placeholder:n}=e,i=Ci(),s=pe(i,Pe.itemToStringLabel),l=pe(i,Pe.selectedValue),c=pe(i,Pe.items),u=pe(i,Pe.selectionMode)==="multiple",m=pe(i,Pe.hasSelectedValue),h=!m&&n!=null&&t==null,p=pe(i,Pe.hasNullItemLabel,h);let g=null;return typeof t=="function"?g=t(l):t!=null?g=t:!m&&n!=null&&!p?g=n:u&&Array.isArray(l)?g=Tj(l,c,s):g=rv(l,c,s),d.jsx(w.Fragment,{children:g})}const Mj={...mR,...Bs,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null},yU=w.createContext(void 0);function bU(){return w.useContext(yU)}const zj=w.createContext(void 0);function iv(e){const t=w.useContext(zj);if(t===void 0&&!e)throw new Error(En(21));return t}const Ij=w.forwardRef(function(t,n){const i=Ci(),{buttonRef:s,getButtonProps:l}=Fo({native:!1}),c=Ui(n,s);function u(h){i.state.setOpen(!1,Xe(dT,h.nativeEvent,h.currentTarget))}const m=l({onClick:u});return d.jsx("span",{ref:c,...m,"aria-label":"Dismiss",tabIndex:void 0,style:Vu})});function Dj(e){const t=pe(e,Pe.mounted),n=pe(e,Pe.popupSide),i=pe(e,Pe.positionerElement);return t&&i?n:null}function wm(){return Ju().filteredItems.length===0}function vU(e){return e==="rtl"?["ArrowRight","ArrowLeft"]:["ArrowLeft","ArrowRight"]}function wU(e,t){const n=e>=t-1?t-2:e;return n>=0?n:void 0}function _j(e,t,n){const i=e.state.listRef.current[t];i&&(e.state.selectionEventRef.current=n,i.click(),e.state.selectionEventRef.current=null)}const SU=w.forwardRef(function(t,n){const{render:i,className:s,disabled:l=!1,id:c,style:u,...m}=t,{state:h,disabled:p,setTouched:g,setFocused:y,validationMode:b,validation:S}=qi(),{labelId:k}=ki(),E=bU(),T=!!iv(!0),R=Ci(),N=Sj(),I=Zu(),M=pe(R,Pe.required),P=pe(R,Pe.disabled),A=pe(R,Pe.readOnly),L=pe(R,Pe.name),D=pe(R,Pe.form),U=pe(R,Pe.selectionMode),q=pe(R,Pe.autoHighlight),K=pe(R,Pe.inputProps),G=pe(R,Pe.triggerProps),B=pe(R,Pe.open),F=pe(R,Pe.mounted),V=pe(R,Pe.selectedValue),Y=pe(R,Pe.id),te=pe(R,Pe.inline),O=pe(R,Pe.modal),_=!!q,Z=Dj(R),z=p||P||l,J=wm(),ne=T||te,W=!ne||O,fe=Or(c??(ne?void 0:Y)),ie=T?m2:h,[se,Se]=w.useState(null),ye=w.useRef(!1),xe=w.useRef(null),ve=w.useRef(!1),Re=U==="none"&&!T,De=Ae(me=>{const re=T||R.state.inline;re&&!R.state.hasInputValue&&R.state.setInputValue("",Xe(On)),R.update({inputElement:me,inputInsidePopup:re,inputOwnsFormValue:Re})}),Me=T?m:S.getValidationProps(z,m);function Ne(){R.state.setIndices({activeIndex:null,selectedIndex:null,type:R.state.keyboardActiveRef.current?hT:mT})}function ge(){R.state.keyboardActiveRef.current=!1}const we={...ie,open:B,disabled:z,readOnly:A,popupSide:Z,listEmpty:J};function je(me){if(!E)return;let re;const{highlightedChipIndex:le}=E,$=E.chipsRef.current.length,[Q,de]=vU(I);return le!==void 0?(me.key===Q?(me.preventDefault(),le>0?re=le-1:re=void 0):me.key===de?(me.preventDefault(),le<$-1?re=le+1:re=void 0):(me.key==="Backspace"||me.key==="Delete")&&(me.preventDefault(),re=wU(le,V.length),Ne()),re):(me.key===Q&&(me.currentTarget.selectionStart??0)===0&&V.length>0&&(me.preventDefault(),re=$>0?$-1:void 0),re)}const Ve=jt("input",t,{state:we,ref:[n,R.state.inputRef,De],props:[K,G,{value:se??N,"aria-readonly":A||void 0,"aria-required":M||void 0,"aria-labelledby":k,disabled:z,readOnly:A,required:U==="none"?M:void 0,form:D,...Re&&L&&{name:L},id:fe,onFocus(){if(y(!0),!te||!ve.current)return;ve.current=!1;const me=xe.current;me==null||!Object.hasOwn(R.state.valuesRef.current,me)||R.state.setIndices({activeIndex:me})},onBlur(){g(!0),y(!1);const me=R.state.activeIndex;if(te&&me!==null&&q!=="always"&&(xe.current=me,ve.current=!0,R.state.setIndices({activeIndex:null})),b==="onBlur"){const re=U==="none"?N:V;S.commit(re)}},onCompositionStart(me){$d||(ye.current=!0,Se(me.currentTarget.value))},onCompositionEnd(me){ye.current=!1;const re=me.currentTarget.value;Se(null),R.state.setInputValue(re,Xe(au,me.nativeEvent))},onChange(me){const re=me.nativeEvent,le=re.inputType,$=!le||le==="insertReplacementText",Q=ye.current||!$;function de(dt){A||z||!dt||!Q||(R.state.setOpen(!0,Xe(au,re)),_||Ne())}if(ye.current){const dt=me.currentTarget.value;Se(dt),dt===""&&!R.state.openOnInputClick&&!R.state.inputInsidePopup&&R.state.setOpen(!1,Xe(Qi,re));const rt=dt.trim(),at=_&&rt!=="";de(rt),B&&R.state.activeIndex!==null&&!at&&Ne();return}const Oe=Xe(au,re);if(R.state.setInputValue(me.currentTarget.value,Oe),Oe.isCanceled)return;const _e=me.currentTarget.value==="",Ge=Xe(Qi,re);_e&&!R.state.inputInsidePopup&&(U==="single"&&R.state.setSelectedValue(null,Ge),R.state.openOnInputClick||R.state.setOpen(!1,Ge)),de(me.currentTarget.value.trim()),B&&R.state.activeIndex!==null&&!_&&Ne()},onKeyDown(me){if(z||A||me.ctrlKey||me.shiftKey||me.altKey||me.metaKey)return;R.state.keyboardActiveRef.current=!0;const re=me.currentTarget,le=re.scrollWidth-re.clientWidth,$=I==="rtl";if(me.key==="Home"){or(me);const Oe=MS&&$?re.value.length:0;re.setSelectionRange(Oe,Oe),re.scrollLeft=0;return}if(me.key==="End"){or(me);const Oe=MS&&$?0:re.value.length;re.setSelectionRange(Oe,Oe),re.scrollLeft=$?-le:le;return}if(!F&&me.key==="Escape"){const Oe=U==="multiple"&&Array.isArray(V)?V.length===0:V===null,_e=Xe(Hu,me.nativeEvent),Ge=U==="multiple"?[]:null;R.state.setInputValue("",_e),R.state.setSelectedValue(Ge,_e),!Oe&&!R.state.inline&&!_e.isPropagationAllowed&&me.stopPropagation();return}if(E&&me.key==="Backspace"&&re.value===""&&E.highlightedChipIndex===void 0&&Array.isArray(V)&&V.length>0){const Oe=E.chipsRef.current.length,_e=Oe>0?Oe-1:V.length-1,Ge=V.filter((dt,rt)=>rt!==_e);Ne(),R.state.setSelectedValue(Ge,Xe(On,me.nativeEvent));return}const Q=E?.highlightedChipIndex!==void 0,de=je(me);if(E?.setHighlightedChipIndex(de),de!==void 0?E?.chipsRef.current[de]?.focus():Q&&R.state.inputRef.current?.focus(),me.which!==229&&me.key==="Enter"&&B){const Oe=R.state.activeIndex,_e=me.nativeEvent;if(Oe===null){if(te)return;R.state.setOpen(!1,Xe(On,_e));return}or(me),_j(R,Oe,_e)}},onPointerMove:ge,onPointerDown:ge},Me],stateAttributesMapping:Mj}),Ue=T?d.jsx(Hb.Provider,{value:p2,children:Ve}):Ve;return d.jsxs(w.Fragment,{children:[B&&W&&d.jsx(Ij,{ref:R.state.startDismissRef}),Ue]})}),Od=5;function Pj(e,t){const n=kU(t);return e.clientX>=n.left-Od&&e.clientX<=n.right+Od&&e.clientY>=n.top-Od&&e.clientY<=n.bottom+Od}function kU(e){const t=e.getBoundingClientRect(),n=gn(e);if(nb)return t;const i=n.getComputedStyle(e,"::before"),s=n.getComputedStyle(e,"::after");if(!(i.content!=="none"||s.content!=="none"))return t;const c=parseFloat(i.width)||0,u=parseFloat(i.height)||0,m=parseFloat(s.width)||0,h=parseFloat(s.height)||0,p=Math.max(t.width,c,m),g=Math.max(t.height,u,h),y=p-t.width,b=g-t.height;return{left:t.left-y/2,right:t.right+y/2,top:t.top-b/2,bottom:t.bottom+b/2}}const EU=w.forwardRef(function(t,n){const{render:i,className:s,nativeButton:l=!0,disabled:c=!1,id:u,style:m,...h}=t,{state:p,disabled:g,setTouched:y,setFocused:b,validationMode:S,validation:k}=qi(),{labelId:E}=ki(),C=Ci(),T=pe(C,Pe.selectionMode),R=pe(C,Pe.disabled),N=pe(C,Pe.readOnly),I=pe(C,Pe.required),M=pe(C,Pe.positionerElement),P=pe(C,Pe.listElement),A=pe(C,Pe.popupId),L=pe(C,Pe.triggerProps),D=pe(C,Pe.inputInsidePopup),U=pe(C,Pe.id),q=pe(C,Pe.labelId),K=pe(C,Pe.open),G=pe(C,Pe.selectedValue),B=pe(C,Pe.activeIndex),F=pe(C,Pe.selectedIndex),V=pe(C,Pe.hasSelectedValue),Y=vm(),te=Sj(),O=kr(),_=g||R||c,Z=wm(),z=Dj(C);qa({id:D?u:void 0});const J=D?u??U:u,ne=Aj(E,q);let W;K&&D?W=A??Rj(U):K&&(W=P?.id);const fe=w.useRef("");function ie(Me){fe.current=Me.pointerType}const{reference:se}=dR(Y,{enabled:!K&&!N&&!R&&T==="single",listRef:C.state.labelsRef,activeIndex:B,selectedIndex:F,onMatch(Me){const Ne=C.state.valuesRef.current[Me];Ne!==void 0&&C.state.setSelectedValue(Ne,Xe(On))}}),{reference:Se}=vb(Y,{enabled:!N&&!R,event:"mousedown"}),{buttonRef:ye,getButtonProps:xe}=Fo({native:l,disabled:_}),ve={...p,open:K,disabled:_,popupSide:z,listEmpty:Z,placeholder:T==="none"?!1:!V},Re=Ae(Me=>{C.set("triggerElement",Me)});return jt("button",t,{ref:[n,ye,Re],state:ve,props:[L,Se,se,{id:J,tabIndex:D?0:-1,role:D?"combobox":void 0,"aria-expanded":K,"aria-haspopup":D?"dialog":"listbox","aria-controls":W,"aria-required":D&&I||void 0,"aria-labelledby":ne,onPointerDown:ie,onPointerEnter:ie,onFocus(){b(!0),!(_||N)&&O.start(0,C.state.forceMount)},onBlur(Me){if(!$e(M,Me.relatedTarget)&&(y(!0),b(!1),S==="onBlur")){const Ne=T==="none"?te:G;k.commit(Ne)}},onMouseDown(Me){if(_||N||(D||Y.set("domReferenceElement",Me.currentTarget),C.state.forceMount(),fe.current!=="touch"&&(C.state.inputRef.current?.focus(),D||Me.preventDefault()),K))return;const Ne=Dt(Me.currentTarget);function ge(we){const je=C.state.triggerElement;if(!je)return;const Ve=Mn(we),Ue=C.state.positionerElement,me=C.state.listElement;$e(je,Ve)||$e(Ue,Ve)||$e(me,Ve)||Pj(we,je)||C.state.setOpen(!1,Xe(pT,we))}D&&Ne.addEventListener("mouseup",ge,{once:!0})},onKeyDown(Me){N||(Me.key==="ArrowDown"||Me.key==="ArrowUp")&&(or(Me),C.state.setOpen(!0,Xe(sy,Me.nativeEvent)),C.state.inputRef.current?.focus())}},k.getValidationProps(_,h),xe],stateAttributesMapping:Mj})}),Lj=w.createContext(null);function CU(){return w.useContext(Lj)}function TU(e){const{children:t,items:n}=e,i=w.useMemo(()=>({items:n}),[n]);return d.jsx(Lj.Provider,{value:i,children:t})}function Fj(e){const{children:t}=e,{filteredItems:n}=Ju(),i=CU(),s=i?i.items:n;return d.jsx(w.Fragment,{children:s.map(t)})}const RU=w.forwardRef(function(t,n){var i;const{render:s,className:l,style:c,children:u,...m}=t,h=Ci(),p=vm(),g=!!iv(!0),{filteredItems:y,hasItems:b}=Ju(),S=pe(h,Pe.selectionMode),k=pe(h,Pe.grid),E=pe(h,Pe.listProps),C=pe(h,Pe.virtualized),T=pe(h,Pe.forceMounted),R=S==="multiple",N=y.length===0,I=Ae(q=>{h.set("positionerElement",q)}),M=Ae(q=>{h.set("listElement",q)}),P=w.useMemo(()=>typeof u=="function"?i||(i=d.jsx(Fj,{children:u})):u,[u]),A={empty:N},L=p.useState("floatingId"),D=jt("div",t,{state:A,ref:[n,M,g?null:I],props:[E,{children:P,tabIndex:-1,id:L,role:k?"grid":"listbox","aria-multiselectable":R?"true":void 0,onKeyDown(q){if(!(h.state.disabled||h.state.readOnly)&&q.key==="Enter"){const K=h.state.activeIndex;if(K==null)return;or(q),_j(h,K,q.nativeEvent)}},onKeyDownCapture(){h.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){h.state.keyboardActiveRef.current=!1}},m]});if(C)return D;const U=b&&!T?void 0:h.state.labelsRef;return d.jsx(Qh,{elementsRef:h.state.listRef,labelsRef:U,children:D})}),jU="",NU=200;function OU(e){const t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT);let n=null;for(;t.nextNode();){const i=t.currentNode;i.nodeValue!==""&&(n=i)}return n}function AU(){const e=kr(),t=w.useRef(null);return w.useEffect(()=>{if(_u)return;const n=t.current;if(n==null)return;const i=OU(n);if(i==null)return;const s=i.data,l=`${s}${jU}`;return i.nodeValue=l,e.start(NU,()=>{i.nodeValue===l&&(i.nodeValue=s)}),()=>{e.clear(),i.nodeValue===l&&(i.nodeValue=s)}},[t,e]),t}const Hj=w.createContext(void 0);function MU(){const e=w.useContext(Hj);if(e===void 0)throw new Error(En(20));return e}const zU=w.forwardRef(function(t,n){const{keepMounted:i=!1,...s}=t,l=Ci(),c=pe(l,Pe.mounted),u=pe(l,Pe.forceMounted);return c||i||u?d.jsx(Hj.Provider,{value:i,children:d.jsx(xb,{ref:n,...s})}):null}),IU=20;function Bj(e,t,n,i){const[s,l]=w.useState(!1);ze(()=>{if(!e||!t||n==null){l(!1);return}const c=Dt(n).documentElement.clientWidth,u=n.offsetWidth;l(c>0&&u>0&&u>=c-IU)},[e,t,n]),t2(e&&(!t||s),i)}const DU=w.forwardRef(function(t,n){const{render:i,className:s,anchor:l,positionMethod:c,side:u,align:m,sideOffset:h,alignOffset:p,collisionBoundary:g="clipping-ancestors",collisionPadding:y,arrowPadding:b,sticky:S,disableAnchorTracking:k=!1,collisionAvoidance:E=HT,style:C,...T}=t,R=Ci(),N=vm(),I=MU(),M=pe(R,Pe.modal),P=pe(R,Pe.open),A=pe(R,Pe.mounted),L=pe(R,Pe.openMethod),D=pe(R,Pe.positionerElement),U=pe(R,Pe.triggerElement),q=pe(R,Pe.inputElement),K=pe(R,Pe.inputGroupElement),G=pe(R,Pe.inputInsidePopup),B=pe(R,Pe.transitionStatus),F=wm(),Y=Cb({anchor:l??(G?U:K??q),floatingRootContext:N,positionMethod:c,mounted:A,side:u,sideOffset:h,align:m,alignOffset:p,arrowPadding:b,collisionBoundary:g,collisionPadding:y,sticky:S,disableAnchorTracking:k,keepMounted:I,collisionAvoidance:E,lazyFlip:!0});Bj(P&&M,L==="touch",D,U);const te={open:P,side:Y.side,align:Y.align,anchorHidden:Y.anchorHidden,empty:F};ze(()=>{R.set("popupSide",Y.side)},[R,Y.side]);const O=Ae(Z=>{R.set("positionerElement",Z)}),_=Tb(t,te,{styles:Y.positionerStyles,transitionStatus:B,props:T,refs:[n,O],hidden:!A,inert:!P});return d.jsxs(zj.Provider,{value:Y,children:[A&&M&&d.jsx(Db,{inert:Xh(!P),cutout:K??q??U}),_]})}),_U={...Uu,...Fs},PU=w.forwardRef(function(t,n){const{render:i,className:s,style:l,initialFocus:c,finalFocus:u,...m}=t,h=Ci(),p=iv(),g=vm(),y=pe(h,Pe.mounted),b=pe(h,Pe.open),S=pe(h,Pe.openMethod),k=pe(h,Pe.popupProps),E=pe(h,Pe.transitionStatus),C=pe(h,Pe.inputInsidePopup),T=pe(h,Pe.inputElement),R=pe(h,Pe.modal),N=pe(h,Pe.id),I=wm(),M=m.id??(C?Rj(N):void 0);ze(()=>(h.set("popupId",h.state.popupRef.current?.id||M),()=>{h.set("popupId",void 0)}),[h,M]),Zi({open:b,ref:h.state.popupRef,onComplete(){b&&h.state.onOpenChangeComplete(!0)}});const P={open:b,side:p.side,align:p.align,anchorHidden:p.anchorHidden,transitionStatus:E,empty:I},A=jt("div",t,{state:P,ref:[n,h.state.popupRef],props:[k,{id:M,role:C?"dialog":"presentation",onFocus(K){const G=Mn(K.nativeEvent);S!=="touch"&&($e(h.state.listElement,G)||G===K.currentTarget)&&h.state.inputRef.current?.focus()}},Kh(E),m],stateAttributesMapping:_U}),D=c===void 0?C?K=>K==="touch"?h.state.popupRef.current:T:!1:c;let U;u!=null?U=u:U=C?void 0:!1;const q=!C||R;return d.jsx(bb,{context:g,disabled:!y,modal:q,openInteractionType:S,initialFocus:D,returnFocus:U,getInsideElements:()=>[h.state.startDismissRef.current,h.state.endDismissRef.current],children:d.jsxs(w.Fragment,{children:[A,q&&d.jsx(Ij,{ref:h.state.endDismissRef})]})})}),LU=w.forwardRef(function(t,n){const{render:i,className:s,style:l,...c}=t;return jt("span",t,{ref:n,props:[{"aria-hidden":!0,children:"▼"},c]})}),Vj=w.createContext(void 0);function FU(){const e=w.useContext(Vj);if(e===void 0)throw new Error(En(18));return e}const HU=w.forwardRef(function(t,n){const{render:i,className:s,style:l,items:c,...u}=t,[m,h]=w.useState(),p=w.useMemo(()=>({labelId:m,setLabelId:h,items:c}),[m,h,c]),g=jt("div",t,{ref:n,props:[{role:"group","aria-labelledby":m},u]}),y=d.jsx(Vj.Provider,{value:p,children:g});return c?d.jsx(TU,{items:c,children:y}):y}),BU=w.forwardRef(function(t,n){const{render:i,className:s,style:l,id:c,...u}=t,{setLabelId:m}=FU(),h=Or(c);return ze(()=>(m(h),()=>{m(g=>g===h?void 0:g)}),[h,m]),jt("div",t,{ref:n,props:[{id:h},u]})}),Uj=w.createContext(void 0);function Zj(){const e=w.useContext(Uj);if(!e)throw new Error(En(19));return e}const VU=w.createContext(!1);function UU(){return w.useContext(VU)}function qj(e){const{componentProps:t,forwardedRef:n,virtualized:i,indexFromFilter:s}=e,{render:l,className:c,style:u,value:m=null,index:h,disabled:p=!1,nativeButton:g=!1,...y}=t,b=w.useRef(null),S=tm({guess:!0,index:h,textRef:b}),k=Ci(),E=UU(),C=cU(),T=pe(k,Pe.selectionMode),R=pe(k,Pe.disabled),N=pe(k,Pe.readOnly),I=pe(k,Pe.isItemEqualToValue),M=R||p,P=T!=="none",A=h??s??S.index,L=A!==-1,D=pe(k,Pe.id),U=pe(k,Pe.isActive,A),q=pe(k,Pe.isSelected,m),K=pe(k,Pe.itemProps),G=w.useRef(null),B=D!=null&&L?`${D}-${A}`:void 0,F=q&&P;ze(()=>{if(!(L&&(i||h!=null)))return;const ne=k.state.listRef.current;return ne[A]=G.current,()=>{delete ne[A]}},[L,i,A,h,k]),ze(()=>{if(!L||C)return;const J=k.state.valuesRef.current;return J[A]=m,()=>{delete J[A]}},[L,C,A,m,k]),ze(()=>{if(!L||C)return;const J=k.state.selectedValue,ne=Array.isArray(J)?J[J.length-1]:J;Si(m,ne,I)&&k.set("selectedIndex",A)},[L,C,k,A,m,I]);const{getButtonProps:V,buttonRef:Y}=Fo({disabled:M,focusableWhenDisabled:!0,native:g,composite:!0}),te={disabled:M,selected:F,highlighted:U};function O(J){function ne(){k.state.handleSelection(J,m)}k.state.submitOnItemClick?(Ls.flushSync(ne),k.state.requestSubmit()):ne()}const _={id:B,role:E?"gridcell":"option","aria-selected":P?F:void 0,tabIndex:void 0,onPointerDownCapture(J){J.isPrimary&&(k.state.pointerDownItemRef.current=J.currentTarget),J.preventDefault()},onMouseDown(J){J.preventDefault()},onClick(J){M||N||O(J.nativeEvent)},onMouseUp(J){const ne=k.state.pointerDownItemRef.current===J.currentTarget;k.state.pointerDownItemRef.current=null,!(M||N||J.button!==0||ne||!U)&&O(J.nativeEvent)}},Z=jt("div",t,{ref:[Y,n,S.ref,G],state:te,props:[K,_,y,V]}),z=w.useMemo(()=>({selected:F,textRef:b}),[F,b]);return d.jsx(Uj.Provider,{value:z,children:Z})}function ZU(e){const{componentProps:t,forwardedRef:n}=e,i=Ci(),s=pe(i,Pe.isItemEqualToValue),{flatFilteredItems:l}=Ju(),c=ja(l,t.value??null,s);return d.jsx(qj,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:c})}const qU=w.memo(w.forwardRef(function(t,n){const i=Ci(),s=pe(i,Pe.virtualized);return s&&t.index==null?d.jsx(ZU,{componentProps:t,forwardedRef:n}):d.jsx(qj,{componentProps:t,forwardedRef:n,virtualized:s,indexFromFilter:void 0})})),GU=w.forwardRef(function(t,n){const{selected:i}=Zj();return t.keepMounted||i?d.jsx(YU,{...t,ref:n}):null}),YU=w.memo(w.forwardRef((e,t)=>{const{render:n,className:i,style:s,keepMounted:l,...c}=e,{selected:u}=Zj(),m=w.useRef(null),{transitionStatus:h,setMounted:p}=Al(u),y=jt("span",e,{ref:[t,m],state:{selected:u,transitionStatus:h},props:[{"aria-hidden":!0,children:"✔️"},c],stateAttributesMapping:Fs});return Zi({open:u,ref:m,onComplete(){u||p(!1)}}),y})),KU=w.forwardRef(function(t,n){const{render:i,className:s,style:l,children:c,...u}=t,{filteredItems:m}=Ju(),h=Ci(),p=AU(),g=m.length===0?c:null;return jt("div",t,{ref:[n,h.state.emptyRef,p],props:[{children:g,role:"status","aria-live":"polite","aria-atomic":!0},u]})}),XU=gU,JU=xU,WU=Fj;function $U({className:e,children:t,...n}){return d.jsxs(EU,{className:Te("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent","px-3 py-1 text-left text-sm shadow-sm transition-colors","hover:bg-muted/50 disabled:cursor-not-allowed disabled:opacity-50","data-[invalid]:border-destructive",e),...n,children:[t,d.jsx(LU,{className:"shrink-0 text-muted-foreground",children:d.jsx(KC,{className:"size-4"})})]})}function QU({className:e,children:t,minWidth:n="24rem",...i}){return d.jsx(zU,{children:d.jsx(DU,{align:"start",sideOffset:4,className:"z-50 outline-none",children:d.jsx(PU,{style:{width:`max(var(--anchor-width), ${n})`},className:Te("flex max-h-[min(28rem,var(--available-height))] max-w-[var(--available-width)] flex-col","overflow-hidden rounded-md border border-border bg-card text-card-foreground shadow-lg","transition-[opacity,transform] duration-100","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0",e),...i,children:t})})})}function e7({className:e,...t}){return d.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3",children:[d.jsx(Rl,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0}),d.jsx(SU,{className:Te("h-9 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",e),...t})]})}function t7({className:e,...t}){return d.jsx(RU,{className:Te("min-h-0 flex-1 overflow-y-auto overscroll-contain p-1 outline-none",e),...t})}function n7({className:e,...t}){return d.jsx(KU,{className:Te("px-3 py-6 text-center text-sm text-muted-foreground empty:p-0",e),...t})}function r7({className:e,...t}){return d.jsx(HU,{className:Te("block pb-1 last:pb-0",e),...t})}function i7({className:e,...t}){return d.jsx(BU,{className:Te("px-2 pb-1 pt-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",e),...t})}function o7({className:e,children:t,...n}){return d.jsxs(qU,{className:Te("relative flex cursor-default select-none items-start gap-2 rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none","data-[highlighted]:bg-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[t,d.jsx(GU,{className:"absolute right-2 top-1.5 flex items-center text-primary",children:d.jsx(Li,{className:"size-4"})})]})}const s7=[{kind:"local-branch",label:"Branches",icon:Wx},{kind:"remote-branch",label:"Remote branches",icon:Wx},{kind:"tag",label:"Tags",icon:tT}];function SE({id:e,refs:t,value:n,onChange:i,disabled:s,invalid:l}){const[c,u]=w.useState(""),m=w.useMemo(()=>{const b=new Map;for(const S of t)b.set(S.name,S);return b},[t]),h=w.useMemo(()=>s7.map(({kind:b,label:S})=>({value:S,items:t.filter(k=>k.kind===b).map(k=>k.name)})).filter(b=>b.items.length>0),[t]),{groups:p,marks:g}=w.useMemo(()=>{const b=c.trim();if(b==="")return{groups:h,marks:new Map};const S=new Map,k=[];for(const E of h){const C=[];for(const T of E.items){const R=uh(b,T);R!==null&&(S.set(T,R.indices),C.push({name:T,score:R.score}))}C.length!==0&&(C.sort((T,R)=>R.score-T.score),k.push({value:E.value,items:C.map(T=>T.name)}))}return{groups:k,marks:S}},[h,c]),y=b=>m.get(b)?.kind==="tag"?tT:Wx;return d.jsxs(XU,{items:h,filteredItems:p,value:n,onValueChange:b=>i(typeof b=="string"?b:""),onInputValueChange:u,disabled:s,children:[d.jsx($U,{id:e,"data-invalid":l?"":void 0,children:d.jsx("span",{className:"min-w-0 truncate font-mono text-xs",title:n||void 0,children:d.jsx(JU,{placeholder:"Pick a ref"})})}),d.jsxs(QU,{minWidth:"26rem","aria-label":"Select a branch or tag",children:[d.jsx(e7,{placeholder:"Search branches and tags"}),d.jsx(n7,{children:"No branch or tag matches that."}),d.jsx(t7,{children:b=>d.jsxs(r7,{items:b.items,children:[d.jsx(i7,{children:b.value}),d.jsx(WU,{children:S=>{const k=m.get(S),E=y(S);return d.jsxs(o7,{value:S,children:[d.jsx(E,{className:"mt-0.5 size-3.5 shrink-0 text-muted-foreground"}),d.jsx("span",{className:"min-w-0 flex-1 break-words font-mono text-xs",children:d.jsx(KR,{text:S,indices:g.get(S)??[]})}),k?.hasUncommittedChanges&&d.jsxs("span",{className:"mt-0.5 flex shrink-0 items-center gap-1 text-[0.6875rem] font-medium text-warning",title:`Uncommitted changes in ${k.checkedOutAt??"its worktree"}`,children:[d.jsx(As,{className:"size-3"}),"uncommitted"]})]},S)}})]},b.value)})]})]})}const Dl={revalidateOnFocus:!1,revalidateIfStale:!1,shouldRetryOnError:!1};function _l(e){return{data:e.data,error:e.error,isLoading:e.isLoading,isRefreshing:e.isValidating&&!e.isLoading,refresh:e.mutate}}function l7(e,t){const n=Wn(),i=$n();return _l(nn(Vt.reviews(e,t,i),()=>n.reviews.list({...e===void 0?{}:{repositoryId:e},...t===void 0?{}:{status:t}})))}function ov(e){const t=Wn(),n=$n();return nn(Vt.review(e,n),()=>t.reviews.open({id:e}),{revalidateOnFocus:!0,refreshInterval:15e3})}function a7(e){const t=ov(e);return _l({...t,data:t.data?.review})}function c7(e){const t=ov(e);return _l({...t,data:t.data?.threads})}function Gj(e){const t=Wn(),n=$n();return _l(nn(Vt.reviewCommits(e,n),()=>t.reviews.commits({id:e}),Dl))}const Sm="all";function km(e,t){const n=Wn(),i=$n();return _l(nn(Vt.reviewDiff(e,t,i),()=>n.reviews.diff({id:e,changes:t}),Dl))}function u7(e,t){const n=Wn(),i=$n();return _l(nn(Vt.reviewTree(e,t,i),()=>n.reviews.tree({id:e,changes:t}),Dl))}function Yj(e,t,n){const i=Wn(),s=$n(),[l,c]=w.useState(!1),u=nn(l&&e!==null?Vt.reviewFile(e,t,n,s):null,()=>i.reviews.file({id:e,path:t,changes:n}),Dl);return{content:u.data,error:u.error,isLoading:u.isLoading,requested:l,load:w.useCallback(()=>c(!0),[])}}function f7(e,t,n,i){const s=Wn(),l=$n(),c=nn(t===null?null:Vt.reviewImage(e,t,n,i,l),()=>s.reviews.image({id:e,path:t,side:n,changes:i}),Dl);return{image:c.data,error:c.error,isLoading:c.isLoading}}function Kj(){return nn(Vt.editors,()=>_t.system.editors(),{...Dl,revalidateOnMount:!0}).data}function d7(e){const t=Wn(),n=$n();return _l(nn(e===null?null:Vt.repositoryRefs(e,n),()=>t.repositories.refs({id:e}),Dl))}const h7=[];function m7(e){const t=Wn(),{data:n,isLoading:i,mutate:s}=ov(e),l=n?.reviewedFiles??h7,c=w.useMemo(()=>new Map(l.map(m=>[m.filePath,m.contentDigest])),[l]),u=w.useCallback(async(m,h)=>{if(!n){await t.reviews.setFileReviewed({reviewId:e,filePath:m,contentDigest:h}),await s();return}const p=n.reviewedFiles.filter(y=>y.filePath!==m),g={...n,reviewedFiles:h===null?p:[...p,{reviewId:e,filePath:m,contentDigest:h,reviewedAt:new Date().toISOString()}]};await s(async()=>(await t.reviews.setFileReviewed({reviewId:e,filePath:m,contentDigest:h}),g),{optimisticData:g,revalidate:!1,rollbackOnError:!0})},[t,n,s,e]);return{digests:c,isLoading:i,setReviewed:u}}function sv(){const e=Wn(),{mutate:t}=_s(),n=w.useCallback(()=>t(i=>typeof i=="string"&&Object.values(Ss).some(s=>i.startsWith(s))),[t]);return{createReview:w.useCallback(async i=>{const s=await e.reviews.create(i);return await n(),s},[e,n]),updateReview:w.useCallback(async i=>{const s=await e.reviews.update(i);return await n(),s},[e,n]),removeReview:w.useCallback(async i=>{await e.reviews.remove({id:i}),await n()},[e,n])}}function Xj({open:e,onOpenChange:t,repositoryId:n,review:i,onCreated:s}){return d.jsx(Ba,{open:e,onOpenChange:t,children:d.jsx(Va,{className:"max-w-2xl",children:e&&d.jsx(p7,{repositoryId:n,review:i,onDone:()=>t(!1),...s?{onCreated:s}:{}},i?.id??"new")})})}function p7({repositoryId:e,review:t,onDone:n,onCreated:i}){const s=t!==void 0,{createReview:l,updateReview:c}=sv(),{data:u,isLoading:m,error:h}=d7(e),[p,g]=w.useState(t?.baseRef),[y,b]=w.useState(t?.headRef),[S,k]=w.useState(t?.title??""),[E,C]=w.useState(t?.description??""),[T,R]=w.useState(!1),[N,I]=w.useState(null),M=p??u?.defaultBranch??"",P=y??u?.currentBranch??"",A=u?.refs??[],L=A.find(V=>V.name===P),D=M!==""&&Xa({baseRef:M,headRef:P});async function U(V){V.preventDefault(),R(!0),I(null);try{const Y=S.trim();if(t){const te=_a(MV,{id:t.id,...Y&&Y!==t.title?{title:Y}:{},...E!==t.description?{description:E}:{},...M!==t.baseRef?{baseRef:M}:{},...P!==t.headRef?{headRef:P}:{}});await c(te)}else{const te=_a(OV,{repositoryId:e,baseRef:M,headRef:P,...Y?{title:Y}:{},...E?{description:E}:{}}),O=await l(te);i?.(O)}n()}catch(Y){I(Y)}finally{R(!1)}}const q=wl(N,"baseRef"),K=wl(N,"headRef"),G=wl(N,"title"),B=N&&!q&&!K&&!G?Jt(N):null,F=s&&S.trim()===t.title&&E===t.description&&M===t.baseRef&&P===t.headRef;return d.jsxs("form",{onSubmit:V=>{U(V)},noValidate:!0,children:[d.jsxs(qu,{children:[d.jsx(Ua,{children:s?"Edit review":"New review"}),d.jsx(Za,{children:"Changes are compared from where the two refs diverged, the way a pull request is. Pick the same ref twice to review only what is uncommitted on it."})]}),d.jsxs("div",{className:"flex flex-col gap-4",children:[m&&d.jsxs("div",{className:"flex items-end gap-2",children:[d.jsx(yt,{className:"h-9 flex-1"}),d.jsx(yt,{className:"mb-2 size-4"}),d.jsx(yt,{className:"h-9 flex-1"})]}),!m&&h!==void 0&&d.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:Jt(h)}),!m&&h===void 0&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-end gap-2",children:[d.jsxs(Ii,{className:"min-w-0 flex-1",children:[d.jsx(Di,{htmlFor:"review-base",children:"Base"}),d.jsx(SE,{id:"review-base",refs:A,value:M,onChange:g,invalid:q!==void 0})]}),d.jsx(Rh,{className:"mb-2.5 size-4 shrink-0 text-muted-foreground"}),d.jsxs(Ii,{className:"min-w-0 flex-1",children:[d.jsx(Di,{htmlFor:"review-head",children:"Compare"}),d.jsx(SE,{id:"review-head",refs:A,value:P,onChange:b,invalid:K!==void 0})]})]}),(q??K)!==void 0&&d.jsx(El,{children:q??K}),D&&d.jsxs("p",{className:`flex items-start gap-2 rounded-md px-3 py-2 text-xs ${L?.hasUncommittedChanges?"bg-warning/10 text-warning":"bg-muted/60 text-muted-foreground"}`,children:[d.jsx(As,{className:"mt-0.5 size-3.5 shrink-0"}),L?.hasUncommittedChanges?d.jsxs("span",{children:["This review is ",d.jsx("span",{className:"font-mono",children:P})," against itself, so it holds only the uncommitted work in"," ",d.jsx("span",{"data-selectable":!0,className:"font-mono",children:L.checkedOutAt}),"."]}):d.jsxs("span",{children:["This review is ",d.jsx("span",{className:"font-mono",children:P})," against itself, so it holds only uncommitted work. There is none right now — it will fill in as you edit."]})]}),!D&&L?.hasUncommittedChanges&&d.jsxs("p",{className:"flex items-start gap-2 rounded-md bg-warning/10 px-3 py-2 text-xs text-warning",children:[d.jsx(As,{className:"mt-0.5 size-3.5 shrink-0"}),d.jsxs("span",{children:[d.jsx("span",{className:"font-mono",children:L.name})," has uncommitted changes in"," ",d.jsx("span",{"data-selectable":!0,className:"font-mono",children:L.checkedOutAt}),". They will be part of this review."]})]}),d.jsxs(Ii,{children:[d.jsx(Di,{htmlFor:"review-title",children:"Title"}),d.jsx(Os,{id:"review-title",value:S,onChange:V=>k(V.target.value),placeholder:M&&P?AV(M,P):"Describe the change","data-invalid":G?"":void 0,autoComplete:"off"}),d.jsx(El,{children:G}),!G&&!s&&d.jsx(Cs,{children:"Leave blank to name it after the two refs."})]}),d.jsxs(Ii,{children:[d.jsx(Di,{htmlFor:"review-description",children:"Description"}),d.jsx(pj,{id:"review-description",value:E,onChange:V=>C(V.target.value),placeholder:"What should a reviewer know before reading the diff?",rows:4}),d.jsx(Cs,{children:"Optional. Shown at the top of the conversation."})]})]}),B&&d.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:B})]}),d.jsxs(rm,{children:[d.jsx(Ze,{type:"button",variant:"ghost",onClick:n,children:"Cancel"}),d.jsxs(Ze,{type:"submit",disabled:T||m||!M||!P||F,children:[T&&d.jsx(wi,{className:"animate-spin"}),s?"Save changes":"Create review"]})]})]})}const kE=[{value:"open",label:"Open"},{value:"closed",label:"Closed"},{value:"all",label:"All"}];function g7({repositoryId:e}){const t=Ho(),[n,i]=w.useState("open"),[s,l]=w.useState(!1),{data:c,error:u,isLoading:m,isRefreshing:h,refresh:p}=l7(e,n==="all"?void 0:n),g=c!==void 0&&so(u);return Il(w.useMemo(()=>[{id:"reviews:create",label:"New review",group:"Repository",keys:"n",keywords:"compare branch create open",icon:Bi,run:()=>l(!0)},{id:"reviews:refresh",label:"Refresh reviews",group:"Repository",keys:"r",keywords:"reload",icon:sr,run:()=>{p()}},...kE.map((y,b)=>({id:`reviews:filter:${y.value}`,label:`Show ${y.label.toLowerCase()} reviews`,group:"Repository",keys:String(b+1),keywords:"filter status",icon:UI,disabled:n===y.value,run:()=>i(y.value)}))],[n,p])),d.jsxs("section",{className:"flex flex-col gap-4",children:[d.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsx("div",{className:"flex items-center gap-1 rounded-md border border-border p-0.5",children:kE.map(({value:y,label:b})=>d.jsx("button",{type:"button",onClick:()=>i(y),className:Te("rounded-sm px-2.5 py-1 text-xs font-medium transition-colors",n===y?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:text-foreground"),children:b},y))}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ln,{label:"Reload reviews",children:d.jsx(Ze,{variant:"outline",size:"icon",onClick:()=>{p()},disabled:m,"aria-label":"Refresh",children:d.jsx(sr,{className:h?"animate-spin":void 0})})}),d.jsxs(Ze,{onClick:()=>l(!0),children:[d.jsx(Bi,{}),"New review"]})]})]}),m&&d.jsx(y7,{}),!m&&u!==void 0&&!g&&d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-destructive/40 px-6 py-10 text-center",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3 text-destructive",children:d.jsx(Hi,{className:"size-6"})}),d.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:Jt(u)}),d.jsxs(Ze,{variant:"outline",onClick:()=>{p()},children:[d.jsx(sr,{}),"Try again"]})]}),!m&&(u===void 0||g)&&c?.length===0&&d.jsx(b7,{filter:n,onCreate:()=>l(!0)}),!m&&(u===void 0||g)&&c&&c.length>0&&d.jsx("ul",{className:"flex flex-col gap-2",children:c.map(y=>d.jsx("li",{children:d.jsx(x7,{review:y})},y.id))}),d.jsx(Xj,{open:s,onOpenChange:l,repositoryId:e,onCreated:y=>An({name:"review",reviewId:y.id,tab:"files",...t})})]})}function x7({review:e}){const t=Ho();function n(){An({name:"review",reviewId:e.id,tab:"conversation",...t})}return d.jsxs(wt,{role:"button",tabIndex:0,"data-nav-item":!0,onClick:n,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n())},className:"flex cursor-pointer items-center gap-4 p-4 transition-colors hover:border-foreground/20",children:[d.jsx(bu,{className:Te("size-4 shrink-0",e.status==="open"?"text-success":"text-muted-foreground")}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"truncate font-medium",title:e.title,children:e.title}),e.status==="closed"&&d.jsx(tn,{variant:"outline",children:"Closed"})]}),d.jsxs("p",{className:"mt-1 flex flex-wrap items-center gap-x-1.5 font-mono text-xs text-muted-foreground",children:[!Xa(e)&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"min-w-0 break-words",children:d.jsx(Xn,{text:e.baseRef})}),d.jsx(Rh,{className:"size-3 shrink-0"})]}),d.jsx("span",{className:"min-w-0 break-words",children:d.jsx(Xn,{text:e.headRef})})]})]}),d.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",title:om(e.updatedAt),children:im(e.updatedAt)})]})}function y7(){return d.jsx("ul",{className:"flex flex-col gap-2","aria-busy":"true","aria-label":"Loading reviews",children:[0,1].map(e=>d.jsx("li",{children:d.jsxs(wt,{className:"flex items-center gap-4 p-4",children:[d.jsx(yt,{className:"size-4 rounded-full"}),d.jsxs("div",{className:"flex-1 space-y-2",children:[d.jsx(yt,{className:"h-4 w-52"}),d.jsx(yt,{className:"h-3 w-40"})]}),d.jsx(yt,{className:"h-3 w-16"})]})},e))})}function b7({filter:e,onCreate:t}){const n=e!=="all";return d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-dashed px-6 py-12 text-center",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 text-muted-foreground",children:d.jsx(bu,{className:"size-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium",children:e==="closed"?"No closed reviews":"No reviews yet"}),d.jsx("p",{className:"mx-auto mt-1 max-w-sm text-sm text-muted-foreground",children:e==="closed"?"Reviews you close are filed here instead of being deleted.":"Compare two branches to start a review. Work that is only sitting in a worktree, uncommitted, can be reviewed too."})]}),e!=="closed"&&d.jsxs(Ze,{onClick:t,className:"mt-1",children:[d.jsx(Bi,{}),n?"New review":"Create your first review"]})]})}function Jj({git:e}){return e.exists?e.isGitRepository?null:d.jsxs(tn,{variant:"destructive",title:e.error??void 0,children:[d.jsx(nT,{}),"Not a git repository"]}):d.jsxs(tn,{variant:"destructive",title:e.error??void 0,children:[d.jsx(FI,{}),"Folder missing"]})}function v7({open:e,onOpenChange:t,initialPath:n,onChoose:i}){return d.jsx(Ba,{open:e,onOpenChange:t,children:d.jsx(Va,{children:e&&d.jsx(w7,{initialPath:n,onChoose:s=>{i(s),t(!1)},onCancel:()=>t(!1)})})})}function w7({initialPath:e,onChoose:t,onCancel:n}){const i=Wn(),s=$n(),[l,c]=w.useState(e),[u,m]=w.useState(e??""),[h,p]=w.useState(!1),{data:g,error:y,isLoading:b}=nn(Vt.directory(l,s),()=>i.fs.list(l===void 0?{}:{path:l}),{revalidateOnFocus:!1,shouldRetryOnError:!1,keepPreviousData:!0});function S(T){c(T),m(T)}function k(T){T.preventDefault();const R=u.trim();c(R===""?void 0:R)}const E=(g?.entries??[]).filter(T=>h||!T.isHidden),C=(g?.entries??[]).length-E.length;return d.jsxs(d.Fragment,{children:[d.jsxs(qu,{children:[d.jsx(Ua,{children:"Choose a folder"}),d.jsx(Za,{children:s===void 0?"Folders on this computer. A repository is marked; a subfolder of one works too.":"Folders on the machine this list belongs to. A repository is marked."})]}),d.jsxs("div",{className:"flex min-h-0 flex-col gap-3",children:[d.jsxs("form",{onSubmit:k,className:"flex gap-2",noValidate:!0,children:[d.jsx(Os,{value:u,onChange:T=>m(T.target.value),placeholder:g?.home??"/path/to/folder",className:"font-mono text-xs","aria-label":"Folder to list",autoComplete:"off",spellCheck:!1}),d.jsx(Ze,{type:"submit",variant:"outline",className:"shrink-0",children:"Go"})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs(Ze,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>{c(void 0),m("")},children:[d.jsx($C,{}),"Home"]}),g?.parent&&d.jsxs(Ze,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>S(g.parent),children:[d.jsx(vI,{}),"Up"]}),d.jsx("span",{className:"flex-1"}),d.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(tv,{checked:h,onCheckedChange:p}),"Hidden",C>0&&!h&&d.jsxs("span",{children:["(",C,")"]})]})]}),y!==void 0&&d.jsxs("p",{role:"alert",className:"flex items-start gap-2 rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[d.jsx(Hi,{className:"mt-0.5 size-4 shrink-0"}),d.jsx(Xn,{text:Jt(y)})]}),d.jsxs("ul",{className:"h-64 overflow-y-auto rounded-md border",children:[b&&d.jsxs("li",{className:"flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground",children:[d.jsx(wi,{className:"size-4 animate-spin"}),"Reading…"]}),!b&&E.length===0&&y===void 0&&d.jsx("li",{className:"px-3 py-2 text-sm text-muted-foreground",children:C>0?"Only hidden folders in here.":"No folders in here."}),E.map(T=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>S(T.path),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm hover:bg-muted",children:[d.jsx(BI,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsx("span",{className:"min-w-0 flex-1 truncate",children:T.name}),T.isRepository&&d.jsx(tn,{variant:"outline",className:"shrink-0",children:"repository"}),d.jsx(_o,{className:"size-4 shrink-0 text-muted-foreground"})]})},T.path))]}),g?.truncated&&d.jsx("p",{className:"text-xs text-muted-foreground",children:"Only the first folders are listed. Type a path above to go straight there."}),g&&d.jsx("p",{"data-selectable":!0,className:"break-words font-mono text-xs text-muted-foreground",children:d.jsx(Xn,{text:g.path})})]}),d.jsxs(rm,{children:[d.jsx(Ze,{type:"button",variant:"ghost",onClick:n,children:"Cancel"}),d.jsx(Ze,{type:"button",disabled:!g,onClick:()=>g&&t(g.path),children:"Use this folder"})]})]})}function S7(){const e=Wn(),t=$n(),{data:n,error:i,isLoading:s,isValidating:l,mutate:c}=nn(Vt.repositories(t),()=>e.repositories.list());return{repositories:n,error:i,isLoading:s,isRefreshing:l&&!s,refresh:c}}function Wj(){const e=Wn(),t=$n(),{mutate:n}=_s(),i=w.useCallback(()=>n(Vt.repositories(t)),[t,n]);return{addRepository:w.useCallback(async s=>{const l=await e.repositories.add(s);return await i(),l},[e,i]),updateRepository:w.useCallback(async s=>{const l=await e.repositories.update(s);return await i(),l},[e,i]),removeRepository:w.useCallback(async s=>{await e.repositories.remove({id:s}),await i()},[e,i])}}function $j({open:e,onOpenChange:t,repository:n}){return d.jsx(Ba,{open:e,onOpenChange:t,children:d.jsx(Va,{children:e&&d.jsx(k7,{repository:n,onDone:()=>t(!1)},n?.id??"new")})})}function k7({repository:e,onDone:t}){const n=e!==void 0,i=$n(),{addRepository:s,updateRepository:l}=Wj(),[c,u]=w.useState(e?.path??""),[m,h]=w.useState(e?.name??""),[p,g]=w.useState(!1),[y,b]=w.useState(!1),[S,k]=w.useState(null),E=_t.capabilities.pickDirectory&&i===void 0;async function C(){const A=await _t.system.pickDirectory();A&&(u(A),k(null))}function T(A){u(A),k(null)}async function R(A){A.preventDefault(),b(!0),k(null);try{if(e){const L=_a(yV,{id:e.id,name:m.trim(),...c.trim()!==e.path?{path:c.trim()}:{}});await l(L)}else{const L=m.trim(),D=_a(xV,{path:c.trim(),...L?{name:L}:{}});await s(D)}t()}catch(L){k(L)}finally{b(!1)}}const N=wl(S,"path"),I=wl(S,"name"),M=S&&!N&&!I?Jt(S):null,P=o2(c.trim());return d.jsxs("form",{onSubmit:A=>{R(A)},noValidate:!0,children:[d.jsxs(qu,{children:[d.jsx(Ua,{children:n?"Edit repository":"Add repository"}),d.jsx(Za,{children:n?"Rename this repository, or point it at a new location if you moved it.":i===void 0?"Choose any folder inside a git repository. GitWarren stores the repository root.":"Choose a folder on that machine. GitWarren stores the repository root."})]}),d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs(Ii,{children:[d.jsx(Di,{htmlFor:"repository-path",children:"Repository folder"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Os,{id:"repository-path",value:c,onChange:A=>u(A.target.value),placeholder:"/path/to/repository",className:"font-mono text-xs","data-invalid":N?"":void 0,autoComplete:"off",spellCheck:!1}),E?d.jsxs(Ze,{type:"button",variant:"outline",onClick:()=>{C()},className:"shrink-0",children:[d.jsx(Jd,{}),"Browse"]}):d.jsxs(Ze,{type:"button",variant:"outline",onClick:()=>g(!0),className:"shrink-0",children:[d.jsx(_I,{}),"Browse"]})]}),d.jsx(El,{children:N}),!N&&d.jsx(Cs,{children:"A subfolder works too - it resolves to the repository root."})]}),d.jsxs(Ii,{children:[d.jsx(Di,{htmlFor:"repository-name",children:"Display name"}),d.jsx(Os,{id:"repository-name",value:m,onChange:A=>h(A.target.value),placeholder:P||"Defaults to the folder name","data-invalid":I?"":void 0,autoComplete:"off"}),d.jsx(El,{children:I}),!I&&!n&&d.jsx(Cs,{children:"Leave blank to use the folder name."})]}),M&&d.jsxs("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[M,Wy(S)==="GIT_UNAVAILABLE"&&d.jsx("span",{className:"mt-1 block text-xs opacity-80",children:"GitWarren shells out to your own git installation."})]})]}),d.jsx(v7,{open:p,onOpenChange:g,initialPath:c.trim()===""?void 0:c.trim(),onChoose:T}),d.jsxs(rm,{children:[d.jsx(Ze,{type:"button",variant:"ghost",onClick:t,children:"Cancel"}),d.jsxs(Ze,{type:"submit",disabled:y,children:[y&&d.jsx(wi,{className:"animate-spin"}),n?"Save changes":"Add repository"]})]})]})}function E7({repositoryId:e}){const t=Wn(),n=$n(),i=Ho(),[s,l]=w.useState(!1),{data:c,error:u,isLoading:m}=nn(Vt.repository(e,n),()=>t.repositories.get({id:e})),h=mj(c?.path??"");if(Il(w.useMemo(()=>c===void 0?[]:[{id:"repository:edit",label:"Edit repository",group:"Repository",hint:c.name,keys:"e",keywords:"rename settings",icon:Tl,run:()=>l(!0)},...t.capabilities.revealPath&&h!==null?[{id:"repository:reveal",label:"Show in file manager",group:"Repository",hint:c.path,keys:"o",keywords:"finder explorer folder open reveal",icon:Jd,disabled:!c.git.exists,run:()=>{t.system.revealPath(h)}}]:[]],[t,c,h])),m)return d.jsxs("div",{className:"flex flex-col gap-5","aria-busy":"true","aria-label":"Loading repository",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(yt,{className:"h-4 w-32"}),d.jsx(yt,{className:"h-6 w-56"}),d.jsx(yt,{className:"h-4 w-80"})]}),d.jsx(yt,{className:"h-32 w-full"})]});const p=c!==void 0&&so(u);if(!c||u!==void 0&&!p)return d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-destructive/40 px-6 py-12 text-center",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3 text-destructive",children:d.jsx(Hi,{className:"size-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium",children:"Repository not found"}),d.jsx("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:u===void 0?"It may have been removed.":Jt(u)})]}),d.jsxs(Ze,{variant:"outline",onClick:()=>An({name:"repositories",...i}),children:[d.jsx(Ts,{}),"Back to repositories"]})]});const g=!c.git.exists;return d.jsxs("div",{className:"flex flex-col gap-5",children:[d.jsxs("div",{children:[d.jsxs(Ze,{variant:"ghost",size:"sm",className:"-ml-2 mb-2 text-muted-foreground",onClick:()=>An({name:"repositories",...i}),children:[d.jsx(Ts,{}),"Repositories"]}),d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h1",{className:"truncate text-xl font-semibold tracking-tight",title:c.name,children:c.name}),d.jsx(Jj,{git:c.git})]}),d.jsx("p",{"data-selectable":!0,className:"mt-1 break-words font-mono text-xs text-muted-foreground",children:d.jsx(Xn,{text:c.path})})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.capabilities.revealPath&&h!==null&&d.jsx(Ln,{label:g?"Folder is missing":"Show in file manager",children:d.jsx(Ze,{variant:"ghost",size:"icon","aria-label":"Show in file manager",disabled:g,onClick:()=>{t.system.revealPath(h)},children:d.jsx(Jd,{})})}),d.jsx(Ln,{label:"Edit repository",children:d.jsx(Ze,{variant:"ghost",size:"icon","aria-label":"Edit repository",onClick:()=>l(!0),children:d.jsx(Tl,{})})})]})]})]}),d.jsx(g7,{repositoryId:c.id}),d.jsx($j,{open:s,onOpenChange:l,repository:c})]})}function C7({repository:e,onEdit:t,onRemove:n,alsoHere:i}){const s=Ho(),l=mj(e.path),c=!e.git.exists;function u(){An({name:"repository",repositoryId:e.id,...s})}return d.jsxs(wt,{role:"button",tabIndex:0,"data-nav-item":!0,onClick:u,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),u())},className:"flex cursor-pointer items-center gap-4 p-4 transition-colors hover:border-foreground/20",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"truncate font-medium",title:e.name,children:e.name}),d.jsx(Jj,{git:e.git})]}),d.jsx("p",{"data-selectable":!0,className:"mt-1 break-words font-mono text-xs text-muted-foreground",children:d.jsx(Xn,{text:e.path})}),i&&d.jsxs("button",{type:"button",onClick:m=>{m.stopPropagation(),An(i.route)},className:"mt-1.5 flex max-w-full items-center gap-1.5 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[d.jsx(oD,{className:"size-3 shrink-0"}),d.jsxs("span",{className:"truncate",children:["Also on this computer: ",i.path]})]})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1",onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),role:"presentation",children:[_t.capabilities.revealPath&&l!==null&&d.jsx(Ln,{label:c?"Folder is missing":"Show in file manager",children:d.jsx(Ze,{variant:"ghost",size:"icon","aria-label":"Show in file manager",disabled:c,onClick:()=>{_t.system.revealPath(l)},children:d.jsx(Jd,{})})}),d.jsx(Ln,{label:"Edit this repository",children:d.jsx(Ze,{variant:"ghost",size:"icon","aria-label":`Edit ${e.name}`,onClick:()=>t(e),children:d.jsx(Tl,{})})}),d.jsx(Ln,{label:"Remove from GitWarren",children:d.jsx(Ze,{variant:"ghost",size:"icon","aria-label":`Remove ${e.name}`,className:"text-muted-foreground hover:text-destructive",onClick:()=>n(e),children:d.jsx(vu,{})})})]}),d.jsx(_o,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0})]})}function T7({repository:e,onOpenChange:t}){const{removeRepository:n}=Wj(),[i,s]=w.useState(!1),[l,c]=w.useState(null);async function u(){if(e){s(!0),c(null);try{await n(e.id),t(!1)}catch(m){c(m)}finally{s(!1)}}}return d.jsx(mm,{open:e!==null,onOpenChange:m=>{m||c(null),t(m)},children:d.jsxs(pm,{children:[d.jsxs(gm,{children:[d.jsxs(xm,{children:["Remove “",e?.name,"”?"]}),d.jsx(ym,{children:"This removes the repository from GitWarren only. Nothing on disk is deleted and the working copy is left exactly as it is."})]}),e&&d.jsx("p",{"data-selectable":!0,className:"mt-3 break-words rounded-md bg-muted px-3 py-2 font-mono text-xs text-muted-foreground",children:d.jsx(Xn,{text:e.path})}),l!==null&&d.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:Jt(l)}),d.jsxs(bm,{children:[d.jsx(Ze,{variant:"ghost",onClick:()=>t(!1),disabled:i,children:"Cancel"}),d.jsxs(Ze,{variant:"destructive",onClick:()=>{u()},disabled:i,children:[i&&d.jsx(wi,{className:"animate-spin"}),"Remove"]})]})]})})}function R7(e,t){const n=new Map;if(e===void 0||!t)return n;for(const i of t){const s=i.git.rootCommit;s===null||n.has(s)||n.set(s,{path:i.path,route:{name:"repository",repositoryId:i.id}})}return n}function Qj(){const e=$n(),{repositories:t,error:n,isLoading:i,isRefreshing:s,refresh:l}=S7(),{data:c}=nn(Vt.repositories(),()=>_t.repositories.list()),u=w.useMemo(()=>R7(e,c),[e,c]),m=t!==void 0&&so(n),[h,p]=w.useState(!1),[g,y]=w.useState(void 0),[b,S]=w.useState(null),k=w.useCallback(()=>{y(void 0),p(!0)},[]);function E(C){y(C),p(!0)}return Il(w.useMemo(()=>[{id:"repositories:add",label:"Add repository",group:"Repositories",keys:"n",keywords:"new track clone folder",icon:Bi,run:k},{id:"repositories:refresh",label:"Refresh repositories",group:"Repositories",keys:"r",keywords:"reload git state",icon:sr,run:()=>{l()}}],[k,l])),d.jsxs("section",{className:"flex flex-col gap-4",children:[d.jsxs("header",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:"Repositories"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:i?"Loading…":`${t?.length??0} tracked${s?" · refreshing…":""}`})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ln,{label:"Re-read git state",children:d.jsx(Ze,{variant:"outline",size:"icon",onClick:()=>{l()},disabled:i,"aria-label":"Refresh",children:d.jsx(sr,{className:s?"animate-spin":void 0})})}),d.jsxs(Ze,{onClick:k,children:[d.jsx(Bi,{}),"Add repository"]})]})]}),i&&d.jsx(j7,{}),!i&&n!==void 0&&!m&&d.jsx(O7,{error:n,onRetry:()=>{l()}}),!i&&(n===void 0||m)&&t?.length===0&&d.jsx(N7,{onAdd:k}),!i&&(n===void 0||m)&&t&&t.length>0&&d.jsx("ul",{className:"flex flex-col gap-2",children:t.map(C=>d.jsx("li",{children:d.jsx(C7,{repository:C,onEdit:E,onRemove:S,alsoHere:C.git.rootCommit===null?void 0:u.get(C.git.rootCommit)})},C.id))}),d.jsx($j,{open:h,onOpenChange:p,repository:g}),d.jsx(T7,{repository:b,onOpenChange:C=>{C||S(null)}})]})}function j7(){return d.jsx("ul",{className:"flex flex-col gap-2","aria-busy":"true","aria-label":"Loading repositories",children:[0,1,2].map(e=>d.jsx("li",{children:d.jsxs(wt,{className:"flex items-center gap-4 p-4",children:[d.jsxs("div",{className:"flex-1 space-y-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(yt,{className:"h-4 w-40"}),d.jsx(yt,{className:"h-4 w-24"})]}),d.jsx(yt,{className:"h-3 w-72"})]}),d.jsx(yt,{className:"size-9 rounded-md"})]})},e))})}function N7({onAdd:e}){return d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-dashed px-6 py-14 text-center",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 text-muted-foreground",children:d.jsx(Ky,{className:"size-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium",children:"No repositories yet"}),d.jsx("p",{className:"mx-auto mt-1 max-w-sm text-sm text-muted-foreground",children:"Add a local git repository to start reviewing it. You can also add one from an AI agent through the MCP server."})]}),d.jsxs(Ze,{onClick:e,className:"mt-1",children:[d.jsx(Bi,{}),"Add your first repository"]})]})}function O7({error:e,onRetry:t}){const n=Wy(e);return n==="HOST_OFFLINE"?d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-dashed px-6 py-12 text-center",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 text-muted-foreground",children:d.jsx(QC,{className:"size-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium",children:"This host is not answering"}),d.jsx("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:Jt(e)})]}),d.jsxs(Ze,{variant:"outline",onClick:t,className:"mt-1",children:[d.jsx(sr,{}),"Try again"]})]}):d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-destructive/40 px-6 py-12 text-center",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3 text-destructive",children:d.jsx(Hi,{className:"size-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium",children:"Could not load your repositories"}),d.jsx("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:Jt(e)}),n==="GIT_UNAVAILABLE"&&d.jsx("p",{className:"mx-auto mt-2 max-w-md text-sm text-muted-foreground",children:"GitWarren uses your own git installation. Install git, or make sure it is on your PATH, then try again."})]}),d.jsxs(Ze,{variant:"outline",onClick:t,className:"mt-1",children:[d.jsx(sr,{}),"Try again"]})]})}const A7=[];function Em(e){const{data:t,error:n,isLoading:i,refresh:s}=c7(e);return{threads:t??A7,error:n,isLoading:i,refresh:s}}function lv(){const e=Wn(),{mutate:t}=_s(),n=w.useCallback(()=>t(i=>typeof i=="string"&&(i.startsWith(Ss.reviews)||i.startsWith(Ss.review))),[t]);return{createThread:w.useCallback(async i=>{const s=await e.comments.createThread(i);return await n(),s},[e,n]),reply:w.useCallback(async i=>{const s=await e.comments.reply(i);return await n(),s},[e,n]),edit:w.useCallback(async(i,s)=>{const l=await e.comments.update({id:i,body:s});return await n(),l},[e,n]),remove:w.useCallback(async i=>{await e.comments.remove({id:i}),await n()},[e,n]),setResolved:w.useCallback(async(i,s)=>{await e.comments.setResolved({threadId:i,resolved:s}),await n()},[e,n])}}function EE({name:e,role:t,className:n}){const[i,s]=w.useState(!1),l=w.useRef(null);w.useEffect(()=>()=>{l.current!==null&&window.clearTimeout(l.current)},[]);async function c(){await navigator.clipboard.writeText(e),s(!0),l.current!==null&&window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!1),1500)}return d.jsxs("span",{className:Te("inline-flex max-w-full items-center gap-1 rounded bg-muted py-0.5 pl-1.5 pr-0.5",n),children:[d.jsx("span",{"data-selectable":!0,className:"min-w-0 break-words",children:d.jsx(Xn,{text:e})}),d.jsx(Ln,{label:i?"Copied":`Copy ${t}`,children:d.jsx("button",{type:"button",onClick:()=>{c()},"aria-label":i?`${t} copied`:`Copy ${t}`,className:Te("flex size-5 shrink-0 items-center justify-center rounded transition-colors","text-muted-foreground hover:bg-foreground/10 hover:text-foreground"),children:i?d.jsx(Li,{className:"size-3 text-success"}):d.jsx(Xd,{className:"size-3"})})})]})}const CE="(min-width: 64rem)";function eN(){const e=w.useCallback(t=>{const n=window.matchMedia(CE);return n.addEventListener("change",t),()=>n.removeEventListener("change",t)},[]);return w.useSyncExternalStore(e,()=>!window.matchMedia(CE).matches,()=>!1)}function M7(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const z7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,I7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,D7={};function TE(e,t){return(D7.jsx?I7:z7).test(e)}const _7=/[ \t\n\f\r]/g;function P7(e){return typeof e=="object"?e.type==="text"?RE(e.value):!1:RE(e)}function RE(e){return e.replace(_7,"")===""}class Wu{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Wu.prototype.normal={};Wu.prototype.property={};Wu.prototype.space=void 0;function tN(e,t){const n={},i={};for(const s of e)Object.assign(n,s.property),Object.assign(i,s.normal);return new Wu(n,i,t)}function Oy(e){return e.toLowerCase()}class Vr{constructor(t,n){this.attribute=n,this.property=t}}Vr.prototype.attribute="";Vr.prototype.booleanish=!1;Vr.prototype.boolean=!1;Vr.prototype.commaOrSpaceSeparated=!1;Vr.prototype.commaSeparated=!1;Vr.prototype.defined=!1;Vr.prototype.mustUseProperty=!1;Vr.prototype.number=!1;Vr.prototype.overloadedBoolean=!1;Vr.prototype.property="";Vr.prototype.spaceSeparated=!1;Vr.prototype.space=void 0;let L7=0;const gt=Pl(),Kn=Pl(),Ay=Pl(),Ie=Pl(),mn=Pl(),Cl=Pl(),ti=Pl();function Pl(){return 2**++L7}const My=Object.freeze(Object.defineProperty({__proto__:null,boolean:gt,booleanish:Kn,commaOrSpaceSeparated:ti,commaSeparated:Cl,number:Ie,overloadedBoolean:Ay,spaceSeparated:mn},Symbol.toStringTag,{value:"Module"})),wx=Object.keys(My);class av extends Vr{constructor(t,n,i,s){let l=-1;if(super(t,n),jE(this,"space",s),typeof i=="number")for(;++l<wx.length;){const c=wx[l];jE(this,wx[l],(i&My[c])===My[c])}}}av.prototype.defined=!0;function jE(e,t,n){n&&(e[t]=n)}function Ja(e){const t={},n={};for(const[i,s]of Object.entries(e.properties)){const l=new av(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[Oy(i)]=i,n[Oy(l.attribute)]=i}return new Wu(t,n,e.space)}const nN=Ja({properties:{ariaActiveDescendant:null,ariaAtomic:Kn,ariaAutoComplete:null,ariaBusy:Kn,ariaChecked:Kn,ariaColCount:Ie,ariaColIndex:Ie,ariaColSpan:Ie,ariaControls:mn,ariaCurrent:null,ariaDescribedBy:mn,ariaDetails:null,ariaDisabled:Kn,ariaDropEffect:mn,ariaErrorMessage:null,ariaExpanded:Kn,ariaFlowTo:mn,ariaGrabbed:Kn,ariaHasPopup:null,ariaHidden:Kn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mn,ariaLevel:Ie,ariaLive:null,ariaModal:Kn,ariaMultiLine:Kn,ariaMultiSelectable:Kn,ariaOrientation:null,ariaOwns:mn,ariaPlaceholder:null,ariaPosInSet:Ie,ariaPressed:Kn,ariaReadOnly:Kn,ariaRelevant:null,ariaRequired:Kn,ariaRoleDescription:mn,ariaRowCount:Ie,ariaRowIndex:Ie,ariaRowSpan:Ie,ariaSelected:Kn,ariaSetSize:Ie,ariaSort:null,ariaValueMax:Ie,ariaValueMin:Ie,ariaValueNow:Ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rN(e,t){return t in e?e[t]:t}function iN(e,t){return rN(e,t.toLowerCase())}const F7=Ja({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Cl,acceptCharset:mn,accessKey:mn,action:null,allow:null,allowFullScreen:gt,allowPaymentRequest:gt,allowUserMedia:gt,alpha:gt,alt:null,as:null,async:gt,autoCapitalize:null,autoComplete:mn,autoFocus:gt,autoPlay:gt,blocking:mn,capture:null,charSet:null,checked:gt,cite:null,className:mn,closedBy:null,colorSpace:null,cols:Ie,colSpan:Ie,command:null,commandFor:null,content:null,contentEditable:Kn,controls:gt,controlsList:mn,coords:Ie|Cl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:gt,defer:gt,dir:null,dirName:null,disabled:gt,download:Ay,draggable:Kn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:gt,formTarget:null,headers:mn,height:Ie,hidden:Ay,high:Ie,href:null,hrefLang:null,htmlFor:mn,httpEquiv:mn,id:null,imageSizes:null,imageSrcSet:null,inert:gt,inputMode:null,integrity:null,is:null,isMap:gt,itemId:null,itemProp:mn,itemRef:mn,itemScope:gt,itemType:mn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:gt,low:Ie,manifest:null,max:null,maxLength:Ie,media:null,method:null,min:null,minLength:Ie,multiple:gt,muted:gt,name:null,nonce:null,noModule:gt,noValidate:gt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:gt,optimum:Ie,pattern:null,ping:mn,placeholder:null,playsInline:gt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:gt,referrerPolicy:null,rel:mn,required:gt,reversed:gt,rows:Ie,rowSpan:Ie,sandbox:mn,scope:null,scoped:gt,seamless:gt,selected:gt,shadowRootClonable:gt,shadowRootCustomElementRegistry:gt,shadowRootDelegatesFocus:gt,shadowRootMode:null,shadowRootSerializable:gt,shape:null,size:Ie,sizes:null,slot:null,span:Ie,spellCheck:Kn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ie,step:null,style:null,tabIndex:Ie,target:null,title:null,translate:null,type:null,typeMustMatch:gt,useMap:null,value:Kn,width:Ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mn,axis:null,background:null,bgColor:null,border:Ie,borderColor:null,bottomMargin:Ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:gt,declare:gt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ie,leftMargin:Ie,link:null,longDesc:null,lowSrc:null,marginHeight:Ie,marginWidth:Ie,noResize:gt,noHref:gt,noShade:gt,noWrap:gt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ie,rules:null,scheme:null,scrolling:Kn,standby:null,summary:null,text:null,topMargin:Ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ie,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:gt,disablePictureInPicture:gt,disableRemotePlayback:gt,exportParts:Cl,part:mn,prefix:null,property:null,results:Ie,security:null,unselectable:null},space:"html",transform:iN}),H7=Ja({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ti,accentHeight:Ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ie,amplitude:Ie,arabicForm:null,ascent:Ie,attributeName:null,attributeType:null,azimuth:Ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ie,by:null,calcMode:null,capHeight:Ie,className:mn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ie,diffuseConstant:Ie,direction:null,display:null,dur:null,divisor:Ie,dominantBaseline:null,download:gt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ie,enableBackground:null,end:null,event:null,exponent:Ie,externalResourcesRequired:null,fill:null,fillOpacity:Ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Cl,g2:Cl,glyphName:Cl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ie,horizOriginX:Ie,horizOriginY:Ie,id:null,ideographic:Ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ie,k:Ie,k1:Ie,k2:Ie,k3:Ie,k4:Ie,kernelMatrix:ti,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ie,overlineThickness:Ie,paintOrder:null,panose1:null,path:null,pathLength:Ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ie,pointsAtY:Ie,pointsAtZ:Ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ti,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ti,rev:ti,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ti,requiredFeatures:ti,requiredFonts:ti,requiredFormats:ti,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ie,specularExponent:Ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ie,strikethroughThickness:Ie,string:null,stroke:null,strokeDashArray:ti,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ie,strokeOpacity:Ie,strokeWidth:null,style:null,surfaceScale:Ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ti,tabIndex:Ie,tableValues:null,target:null,targetX:Ie,targetY:Ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ti,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ie,underlineThickness:Ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ie,values:null,vAlphabetic:Ie,vMathematical:Ie,vectorEffect:null,vHanging:Ie,vIdeographic:Ie,version:null,vertAdvY:Ie,vertOriginX:Ie,vertOriginY:Ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rN}),oN=Ja({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),sN=Ja({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:iN}),lN=Ja({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),B7={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},V7=/[A-Z]/g,NE=/-[a-z]/g,U7=/^data[-\w.:]+$/i;function Z7(e,t){const n=Oy(t);let i=t,s=Vr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&U7.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(NE,G7);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!NE.test(l)){let c=l.replace(V7,q7);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=av}return new s(i,t)}function q7(e){return"-"+e.toLowerCase()}function G7(e){return e.charAt(1).toUpperCase()}const Y7=tN([nN,F7,oN,sN,lN],"html"),cv=tN([nN,H7,oN,sN,lN],"svg");function K7(e){return e.join(" ").trim()}var va={},Sx,OE;function X7(){if(OE)return Sx;OE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g,m=`
|
|
65
|
+
`,h="/",p="*",g="",y="comment",b="declaration";function S(E,C){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];C=C||{};var T=1,R=1;function N(G){var B=G.match(t);B&&(T+=B.length);var F=G.lastIndexOf(m);R=~F?G.length-F:R+G.length}function I(){var G={line:T,column:R};return function(B){return B.position=new M(G),L(),B}}function M(G){this.start=G,this.end={line:T,column:R},this.source=C.source}M.prototype.content=E;function P(G){var B=new Error(C.source+":"+T+":"+R+": "+G);if(B.reason=G,B.filename=C.source,B.line=T,B.column=R,B.source=E,!C.silent)throw B}function A(G){var B=G.exec(E);if(B){var F=B[0];return N(F),E=E.slice(F.length),B}}function L(){A(n)}function D(G){var B;for(G=G||[];B=U();)B!==!1&&G.push(B);return G}function U(){var G=I();if(!(h!=E.charAt(0)||p!=E.charAt(1))){for(var B=2;g!=E.charAt(B)&&(p!=E.charAt(B)||h!=E.charAt(B+1));)++B;if(B+=2,g===E.charAt(B-1))return P("End of comment missing");var F=E.slice(2,B-2);return R+=2,N(F),E=E.slice(B),R+=2,G({type:y,comment:F})}}function q(){var G=I(),B=A(i);if(B){if(U(),!A(s))return P("property missing ':'");var F=A(l),V=G({type:b,property:k(B[0].replace(e,g)),value:F?k(F[0].replace(e,g)):g});return A(c),V}}function K(){var G=[];D(G);for(var B;B=q();)B!==!1&&(G.push(B),D(G));return G}return L(),K()}function k(E){return E?E.replace(u,g):g}return Sx=S,Sx}var AE;function J7(){if(AE)return va;AE=1;var e=va&&va.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(va,"__esModule",{value:!0}),va.default=n;const t=e(X7());function n(i,s){let l=null;if(!i||typeof i!="string")return l;const c=(0,t.default)(i),u=typeof s=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:p}=m;u?s(h,p,m):p&&(l=l||{},l[h]=p)}),l}return va}var Qc={},ME;function W7(){if(ME)return Qc;ME=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},c=function(h,p){return p.toUpperCase()},u=function(h,p){return"".concat(p,"-")},m=function(h,p){return p===void 0&&(p={}),l(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(s,u):h=h.replace(i,u),h.replace(t,c))};return Qc.camelCase=m,Qc}var eu,zE;function $7(){if(zE)return eu;zE=1;var e=eu&&eu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(J7()),n=W7();function i(s,l){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(u,m){u&&m&&(c[(0,n.camelCase)(u,l)]=m)}),c}return i.default=i,eu=i,eu}var Q7=$7();const eZ=Zy(Q7),aN=cN("end"),uv=cN("start");function cN(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function tZ(e){const t=uv(e),n=aN(e);if(t&&n)return{start:t,end:n}}function hu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?IE(e.position):"start"in e||"end"in e?IE(e):"line"in e||"column"in e?zy(e):""}function zy(e){return DE(e&&e.line)+":"+DE(e&&e.column)}function IE(e){return zy(e&&e.start)+"-"+zy(e&&e.end)}function DE(e){return e&&typeof e=="number"?e:1}class Cr extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",l={},c=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(c=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const m=i.indexOf(":");m===-1?l.ruleId=i:(l.source=i.slice(0,m),l.ruleId=i.slice(m+1))}if(!l.place&&l.ancestors&&l.ancestors){const m=l.ancestors[l.ancestors.length-1];m&&(l.place=m.position)}const u=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=u?u.line:void 0,this.name=hu(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=c&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Cr.prototype.file="";Cr.prototype.name="";Cr.prototype.reason="";Cr.prototype.message="";Cr.prototype.stack="";Cr.prototype.column=void 0;Cr.prototype.line=void 0;Cr.prototype.ancestors=void 0;Cr.prototype.cause=void 0;Cr.prototype.fatal=void 0;Cr.prototype.place=void 0;Cr.prototype.ruleId=void 0;Cr.prototype.source=void 0;const fv={}.hasOwnProperty,nZ=new Map,rZ=/[A-Z]/g,iZ=new Set(["table","tbody","thead","tfoot","tr"]),oZ=new Set(["td","th"]),uN="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sZ(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=mZ(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=hZ(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?cv:Y7,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=fN(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function fN(e,t,n){if(t.type==="element")return lZ(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return aZ(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return uZ(e,t,n);if(t.type==="mdxjsEsm")return cZ(e,t);if(t.type==="root")return fZ(e,t,n);if(t.type==="text")return dZ(e,t)}function lZ(e,t,n){const i=e.schema;let s=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=cv,e.schema=s),e.ancestors.push(t);const l=hN(e,t.tagName,!1),c=pZ(e,t);let u=hv(e,t);return iZ.has(t.tagName)&&(u=u.filter(function(m){return typeof m=="string"?!P7(m):!0})),dN(e,c,l,t),dv(c,u),e.ancestors.pop(),e.schema=i,e.create(t,l,c,n)}function aZ(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Nu(e,t.position)}function cZ(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Nu(e,t.position)}function uZ(e,t,n){const i=e.schema;let s=i;t.name==="svg"&&i.space==="html"&&(s=cv,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:hN(e,t.name,!0),c=gZ(e,t),u=hv(e,t);return dN(e,c,l,t),dv(c,u),e.ancestors.pop(),e.schema=i,e.create(t,l,c,n)}function fZ(e,t,n){const i={};return dv(i,hv(e,t)),e.create(t,e.Fragment,i,n)}function dZ(e,t){return t.value}function dN(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function dv(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function hZ(e,t,n){return i;function i(s,l,c,u){const h=Array.isArray(c.children)?n:t;return u?h(l,c,u):h(l,c)}}function mZ(e,t){return n;function n(i,s,l,c){const u=Array.isArray(l.children),m=uv(i);return t(s,l,c,u,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function pZ(e,t){const n={};let i,s;for(s in t.properties)if(s!=="children"&&fv.call(t.properties,s)){const l=xZ(e,s,t.properties[s]);if(l){const[c,u]=l;e.tableCellAlignToStyle&&c==="align"&&typeof u=="string"&&oZ.has(t.tagName)?i=u:n[c]=u}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function gZ(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const c=l.expression;c.type;const u=c.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Nu(e,t.position);else{const s=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const u=i.value.data.estree.body[0];u.type,l=e.evaluater.evaluateExpression(u.expression)}else Nu(e,t.position);else l=i.value===null?!0:i.value;n[s]=l}return n}function hv(e,t){const n=[];let i=-1;const s=e.passKeys?new Map:nZ;for(;++i<t.children.length;){const l=t.children[i];let c;if(e.passKeys){const m=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(m){const h=s.get(m)||0;c=m+"-"+h,s.set(m,h+1)}}const u=fN(e,l,c);u!==void 0&&n.push(u)}return n}function xZ(e,t,n){const i=Z7(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?M7(n):K7(n)),i.property==="style"){let s=typeof n=="object"?n:yZ(e,String(n));return e.stylePropertyNameCase==="css"&&(s=bZ(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?B7[i.property]||i.property:i.attribute,n]}}function yZ(e,t){try{return eZ(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,s=new Cr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=uN+"#cannot-parse-style-attribute",s}}function hN(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,c;for(;++l<s.length;){const u=TE(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};c=c?{type:"MemberExpression",object:c,property:u,computed:!!(l&&u.type==="Literal"),optional:!1}:u}i=c}else i=TE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const s=i.value;return fv.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);Nu(e)}function Nu(e,t){const n=new Cr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=uN+"#cannot-handle-mdx-estrees-without-createevaluater",n}function bZ(e){const t={};let n;for(n in e)fv.call(e,n)&&(t[vZ(n)]=e[n]);return t}function vZ(e){let t=e.replace(rZ,wZ);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function wZ(e){return"-"+e.toLowerCase()}const kx={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},SZ={};function mv(e,t){const n=SZ,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mN(e,i,s)}function mN(e,t,n){if(kZ(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _E(e.children,t,n)}return Array.isArray(e)?_E(e,t,n):""}function _E(e,t,n){const i=[];let s=-1;for(;++s<e.length;)i[s]=mN(e[s],t,n);return i.join("")}function kZ(e){return!!(e&&typeof e=="object")}const PE=document.createElement("i");function pv(e){const t="&"+e+";";PE.innerHTML=t;const n=PE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ni(e,t,n,i){const s=e.length;let l=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)c=Array.from(i),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);l<i.length;)c=i.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function gi(e,t){return e.length>0?(ni(e,e.length,0,t),e):t}const LE={}.hasOwnProperty;function pN(e){const t={};let n=-1;for(;++n<e.length;)EZ(t,e[n]);return t}function EZ(e,t){let n;for(n in t){const s=(LE.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let c;if(l)for(c in l){LE.call(s,c)||(s[c]=[]);const u=l[c];CZ(s[c],Array.isArray(u)?u:u?[u]:[])}}}function CZ(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);ni(e,0,0,i)}function gN(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Fi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nr=Ys(/[A-Za-z]/),Sr=Ys(/[\dA-Za-z]/),TZ=Ys(/[#-'*+\--9=?A-Z^-~]/);function xh(e){return e!==null&&(e<32||e===127)}const Iy=Ys(/\d/),RZ=Ys(/[\dA-Fa-f]/),jZ=Ys(/[!-/:-@[-`{-~]/);function lt(e){return e!==null&&e<-2}function xn(e){return e!==null&&(e<0||e===32)}function Mt(e){return e===-2||e===-1||e===32}const Cm=Ys(new RegExp("\\p{P}|\\p{S}","u")),Ol=Ys(/\s/);function Ys(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Wa(e){const t=[];let n=-1,i=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let c="";if(l===37&&Sr(e.charCodeAt(n+1))&&Sr(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(c=String.fromCharCode(l));else if(l>55295&&l<57344){const u=e.charCodeAt(n+1);l<56320&&u>56319&&u<57344?(c=String.fromCharCode(l,u),s=1):c="�"}else c=String.fromCharCode(l);c&&(t.push(e.slice(i,n),encodeURIComponent(c)),i=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(i)}function Bt(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(m){return Mt(m)?(e.enter(n),u(m)):t(m)}function u(m){return Mt(m)&&l++<s?(e.consume(m),u):(e.exit(n),t(m))}}const NZ={tokenize:OZ};function OZ(e){const t=e.attempt(this.parser.constructs.contentInitial,i,s);let n;return t;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Bt(e,t,"linePrefix")}function s(u){return e.enter("paragraph"),l(u)}function l(u){const m=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=m),n=m,c(u)}function c(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return lt(u)?(e.consume(u),e.exit("chunkText"),l):(e.consume(u),c)}}const AZ={tokenize:MZ},FE={tokenize:zZ};function MZ(e){const t=this,n=[];let i=0,s,l,c;return u;function u(R){if(i<n.length){const N=n[i];return t.containerState=N[1],e.attempt(N[0].continuation,m,h)(R)}return h(R)}function m(R){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&T();const N=t.events.length;let I=N,M;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){M=t.events[I][1].end;break}C(i);let P=N;for(;P<t.events.length;)t.events[P][1].end={...M},P++;return ni(t.events,I+1,0,t.events.slice(N)),t.events.length=P,h(R)}return u(R)}function h(R){if(i===n.length){if(!s)return y(R);if(s.currentConstruct&&s.currentConstruct.concrete)return S(R);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(FE,p,g)(R)}function p(R){return s&&T(),C(i),y(R)}function g(R){return t.parser.lazy[t.now().line]=i!==n.length,c=t.now().offset,S(R)}function y(R){return t.containerState={},e.attempt(FE,b,S)(R)}function b(R){return i++,n.push([t.currentConstruct,t.containerState]),y(R)}function S(R){if(R===null){s&&T(),C(0),e.consume(R);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),k(R)}function k(R){if(R===null){E(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return lt(R)?(e.consume(R),E(e.exit("chunkFlow")),i=0,t.interrupt=void 0,u):(e.consume(R),k)}function E(R,N){const I=t.sliceStream(R);if(N&&I.push(null),R.previous=l,l&&(l.next=R),l=R,s.defineSkip(R.start),s.write(I),t.parser.lazy[R.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const P=t.events.length;let A=P,L,D;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(L){D=t.events[A][1].end;break}L=!0}for(C(i),M=P;M<t.events.length;)t.events[M][1].end={...D},M++;ni(t.events,A+1,0,t.events.slice(P)),t.events.length=M}}function C(R){let N=n.length;for(;N-- >R;){const I=n[N];t.containerState=I[1],I[0].exit.call(t,e)}n.length=R}function T(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function zZ(e,t,n){return Bt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Pa(e){if(e===null||xn(e)||Ol(e))return 1;if(Cm(e))return 2}function Tm(e,t,n){const i=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const Dy={name:"attention",resolveAll:IZ,tokenize:DZ};function IZ(e,t){let n=-1,i,s,l,c,u,m,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;m=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[i][1].end},y={...e[n][1].start};HE(g,-m),HE(y,m),c={type:m>1?"strongSequence":"emphasisSequence",start:g,end:{...e[i][1].end}},u={type:m>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},l={type:m>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:m>1?"strong":"emphasis",start:{...c.start},end:{...u.end}},e[i][1].end={...c.start},e[n][1].start={...u.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=gi(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=gi(h,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",l,t]]),h=gi(h,Tm(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=gi(h,[["exit",l,t],["enter",u,t],["exit",u,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=gi(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,ni(e,i-1,n-i+3,h),n=i+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function DZ(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=Pa(i);let l;return c;function c(m){return l=m,e.enter("attentionSequence"),u(m)}function u(m){if(m===l)return e.consume(m),u;const h=e.exit("attentionSequence"),p=Pa(m),g=!p||p===2&&s||n.includes(m),y=!s||s===2&&p||n.includes(i);return h._open=!!(l===42?g:g&&(s||!y)),h._close=!!(l===42?y:y&&(p||!g)),t(m)}}function HE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _Z={name:"autolink",tokenize:PZ};function PZ(e,t,n){let i=0;return s;function s(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(b){return Nr(b)?(e.consume(b),c):b===64?n(b):h(b)}function c(b){return b===43||b===45||b===46||Sr(b)?(i=1,u(b)):h(b)}function u(b){return b===58?(e.consume(b),i=0,m):(b===43||b===45||b===46||Sr(b))&&i++<32?(e.consume(b),u):(i=0,h(b))}function m(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||xh(b)?n(b):(e.consume(b),m)}function h(b){return b===64?(e.consume(b),p):TZ(b)?(e.consume(b),h):n(b)}function p(b){return Sr(b)?g(b):n(b)}function g(b){return b===46?(e.consume(b),i=0,p):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):y(b)}function y(b){if((b===45||Sr(b))&&i++<63){const S=b===45?y:g;return e.consume(b),S}return n(b)}}const $u={partial:!0,tokenize:LZ};function LZ(e,t,n){return i;function i(l){return Mt(l)?Bt(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||lt(l)?t(l):n(l)}}const xN={continuation:{tokenize:HZ},exit:BZ,name:"blockQuote",tokenize:FZ};function FZ(e,t,n){const i=this;return s;function s(c){if(c===62){const u=i.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),l}return n(c)}function l(c){return Mt(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function HZ(e,t,n){const i=this;return s;function s(c){return Mt(c)?Bt(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(xN,t,n)(c)}}function BZ(e){e.exit("blockQuote")}const yN={name:"characterEscape",tokenize:VZ};function VZ(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return jZ(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const bN={name:"characterReference",tokenize:UZ};function UZ(e,t,n){const i=this;let s=0,l,c;return u;function u(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),m}function m(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,c=Sr,p(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=RZ,p):(e.enter("characterReferenceValue"),l=7,c=Iy,p(g))}function p(g){if(g===59&&s){const y=e.exit("characterReferenceValue");return c===Sr&&!pv(i.sliceSerialize(y))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&s++<l?(e.consume(g),p):n(g)}}const BE={partial:!0,tokenize:qZ},VE={concrete:!0,name:"codeFenced",tokenize:ZZ};function ZZ(e,t,n){const i=this,s={partial:!0,tokenize:I};let l=0,c=0,u;return m;function m(M){return h(M)}function h(M){const P=i.events[i.events.length-1];return l=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,u=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(M)}function p(M){return M===u?(c++,e.consume(M),p):c<3?n(M):(e.exit("codeFencedFenceSequence"),Mt(M)?Bt(e,g,"whitespace")(M):g(M))}function g(M){return M===null||lt(M)?(e.exit("codeFencedFence"),i.interrupt?t(M):e.check(BE,k,N)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(M))}function y(M){return M===null||lt(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Mt(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Bt(e,b,"whitespace")(M)):M===96&&M===u?n(M):(e.consume(M),y)}function b(M){return M===null||lt(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===null||lt(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===u?n(M):(e.consume(M),S)}function k(M){return e.attempt(s,N,E)(M)}function E(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),C}function C(M){return l>0&&Mt(M)?Bt(e,T,"linePrefix",l+1)(M):T(M)}function T(M){return M===null||lt(M)?e.check(BE,k,N)(M):(e.enter("codeFlowValue"),R(M))}function R(M){return M===null||lt(M)?(e.exit("codeFlowValue"),T(M)):(e.consume(M),R)}function N(M){return e.exit("codeFenced"),t(M)}function I(M,P,A){let L=0;return D;function D(B){return M.enter("lineEnding"),M.consume(B),M.exit("lineEnding"),U}function U(B){return M.enter("codeFencedFence"),Mt(B)?Bt(M,q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):q(B)}function q(B){return B===u?(M.enter("codeFencedFenceSequence"),K(B)):A(B)}function K(B){return B===u?(L++,M.consume(B),K):L>=c?(M.exit("codeFencedFenceSequence"),Mt(B)?Bt(M,G,"whitespace")(B):G(B)):A(B)}function G(B){return B===null||lt(B)?(M.exit("codeFencedFence"),P(B)):A(B)}}}function qZ(e,t,n){const i=this;return s;function s(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return i.parser.lazy[i.now().line]?n(c):t(c)}}const Ex={name:"codeIndented",tokenize:YZ},GZ={partial:!0,tokenize:KZ};function YZ(e,t,n){const i=this;return s;function s(h){return e.enter("codeIndented"),Bt(e,l,"linePrefix",5)(h)}function l(h){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?c(h):n(h)}function c(h){return h===null?m(h):lt(h)?e.attempt(GZ,c,m)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||lt(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),u)}function m(h){return e.exit("codeIndented"),t(h)}}function KZ(e,t,n){const i=this;return s;function s(c){return i.parser.lazy[i.now().line]?n(c):lt(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):Bt(e,l,"linePrefix",5)(c)}function l(c){const u=i.events[i.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(c):lt(c)?s(c):n(c)}}const XZ={name:"codeText",previous:WZ,resolve:JZ,tokenize:$Z};function JZ(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)s===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(s=i):(i===t||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),t-=i-s-2,i=s+2),s=void 0);return e}function WZ(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $Z(e,t,n){let i=0,s,l;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),u(g)}function u(g){return g===96?(e.consume(g),i++,u):(e.exit("codeTextSequence"),m(g))}function m(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),m):g===96?(l=e.enter("codeTextSequence"),s=0,p(g)):lt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||lt(g)?(e.exit("codeTextData"),m(g)):(e.consume(g),h)}function p(g){return g===96?(e.consume(g),s++,p):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(l.type="codeTextData",h(g))}}class QZ{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&tu(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),tu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),tu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);tu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);tu(this.left,n.reverse())}}}function tu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function vN(e){const t={};let n=-1,i,s,l,c,u,m,h;const p=new QZ(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(m=i[1]._tokenizer.events,l=0,l<m.length&&m[l][1].type==="lineEndingBlank"&&(l+=2),l<m.length&&m[l][1].type==="content"))for(;++l<m.length&&m[l][1].type!=="content";)m[l][1].type==="chunkText"&&(m[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,eq(p,n)),n=t[n],h=!0);else if(i[1]._container){for(l=n,s=void 0;l--;)if(c=p.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(i[1].end={...p.get(s)[1].start},u=p.slice(s,n),u.unshift(i),p.splice(s,n-s+1,u))}}return ni(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function eq(e,t){const n=e.get(t)[1],i=e.get(t)[2];let s=t-1;const l=[];let c=n._tokenizer;c||(c=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const u=c.events,m=[],h={};let p,g,y=-1,b=n,S=0,k=0;const E=[k];for(;b;){for(;e.get(++s)[1]!==b;);l.push(s),b._tokenizer||(p=i.sliceStream(b),b.next||p.push(null),g&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(p),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=n;++y<u.length;)u[y][0]==="exit"&&u[y-1][0]==="enter"&&u[y][1].type===u[y-1][1].type&&u[y][1].start.line!==u[y][1].end.line&&(k=y+1,E.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):E.pop(),y=E.length;y--;){const C=u.slice(E[y],E[y+1]),T=l.pop();m.push([T,T+C.length-1]),e.splice(T,2,C)}for(m.reverse(),y=-1;++y<m.length;)h[S+m[y][0]]=S+m[y][1],S+=m[y][1]-m[y][0]-1;return h}const tq={resolve:rq,tokenize:iq},nq={partial:!0,tokenize:oq};function rq(e){return vN(e),e}function iq(e,t){let n;return i;function i(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(u)}function s(u){return u===null?l(u):lt(u)?e.check(nq,c,l)(u):(e.consume(u),s)}function l(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function c(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function oq(e,t,n){const i=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Bt(e,l,"linePrefix")}function l(c){if(c===null||lt(c))return n(c);const u=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(c):e.interrupt(i.parser.constructs.flow,n,t)(c)}}function wN(e,t,n,i,s,l,c,u,m){const h=m||Number.POSITIVE_INFINITY;let p=0;return g;function g(C){return C===60?(e.enter(i),e.enter(s),e.enter(l),e.consume(C),e.exit(l),y):C===null||C===32||C===41||xh(C)?n(C):(e.enter(i),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(C))}function y(C){return C===62?(e.enter(l),e.consume(C),e.exit(l),e.exit(s),e.exit(i),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),b(C))}function b(C){return C===62?(e.exit("chunkString"),e.exit(u),y(C)):C===null||C===60||lt(C)?n(C):(e.consume(C),C===92?S:b)}function S(C){return C===60||C===62||C===92?(e.consume(C),b):b(C)}function k(C){return!p&&(C===null||C===41||xn(C))?(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(i),t(C)):p<h&&C===40?(e.consume(C),p++,k):C===41?(e.consume(C),p--,k):C===null||C===32||C===40||xh(C)?n(C):(e.consume(C),C===92?E:k)}function E(C){return C===40||C===41||C===92?(e.consume(C),k):k(C)}}function SN(e,t,n,i,s,l){const c=this;let u=0,m;return h;function h(b){return e.enter(i),e.enter(s),e.consume(b),e.exit(s),e.enter(l),p}function p(b){return u>999||b===null||b===91||b===93&&!m||b===94&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(l),e.enter(s),e.consume(b),e.exit(s),e.exit(i),t):lt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||lt(b)||u++>999?(e.exit("chunkString"),p(b)):(e.consume(b),m||(m=!Mt(b)),b===92?y:g)}function y(b){return b===91||b===92||b===93?(e.consume(b),u++,g):g(b)}}function kN(e,t,n,i,s,l){let c;return u;function u(y){return y===34||y===39||y===40?(e.enter(i),e.enter(s),e.consume(y),e.exit(s),c=y===40?41:y,m):n(y)}function m(y){return y===c?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),t):(e.enter(l),h(y))}function h(y){return y===c?(e.exit(l),m(c)):y===null?n(y):lt(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Bt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===c||y===null||lt(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?g:p)}function g(y){return y===c||y===92?(e.consume(y),p):p(y)}}function mu(e,t){let n;return i;function i(s){return lt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):Mt(s)?Bt(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const sq={name:"definition",tokenize:aq},lq={partial:!0,tokenize:cq};function aq(e,t,n){const i=this;let s;return l;function l(b){return e.enter("definition"),c(b)}function c(b){return SN.call(i,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function u(b){return s=Fi(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),m):n(b)}function m(b){return xn(b)?mu(e,h)(b):h(b)}function h(b){return wN(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt(lq,g,g)(b)}function g(b){return Mt(b)?Bt(e,y,"whitespace")(b):y(b)}function y(b){return b===null||lt(b)?(e.exit("definition"),i.parser.defined.push(s),t(b)):n(b)}}function cq(e,t,n){return i;function i(u){return xn(u)?mu(e,s)(u):n(u)}function s(u){return kN(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return Mt(u)?Bt(e,c,"whitespace")(u):c(u)}function c(u){return u===null||lt(u)?t(u):n(u)}}const uq={name:"hardBreakEscape",tokenize:fq};function fq(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return lt(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const dq={name:"headingAtx",resolve:hq,tokenize:mq};function hq(e,t){let n=e.length-2,i=3,s,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},ni(e,i,n-i+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function mq(e,t,n){let i=0;return s;function s(p){return e.enter("atxHeading"),l(p)}function l(p){return e.enter("atxHeadingSequence"),c(p)}function c(p){return p===35&&i++<6?(e.consume(p),c):p===null||xn(p)?(e.exit("atxHeadingSequence"),u(p)):n(p)}function u(p){return p===35?(e.enter("atxHeadingSequence"),m(p)):p===null||lt(p)?(e.exit("atxHeading"),t(p)):Mt(p)?Bt(e,u,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function m(p){return p===35?(e.consume(p),m):(e.exit("atxHeadingSequence"),u(p))}function h(p){return p===null||p===35||xn(p)?(e.exit("atxHeadingText"),u(p)):(e.consume(p),h)}}const pq=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],UE=["pre","script","style","textarea"],gq={concrete:!0,name:"htmlFlow",resolveTo:bq,tokenize:vq},xq={partial:!0,tokenize:Sq},yq={partial:!0,tokenize:wq};function bq(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function vq(e,t,n){const i=this;let s,l,c,u,m;return h;function h(z){return p(z)}function p(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),g}function g(z){return z===33?(e.consume(z),y):z===47?(e.consume(z),l=!0,k):z===63?(e.consume(z),s=3,i.interrupt?t:O):Nr(z)?(e.consume(z),c=String.fromCharCode(z),E):n(z)}function y(z){return z===45?(e.consume(z),s=2,b):z===91?(e.consume(z),s=5,u=0,S):Nr(z)?(e.consume(z),s=4,i.interrupt?t:O):n(z)}function b(z){return z===45?(e.consume(z),i.interrupt?t:O):n(z)}function S(z){const J="CDATA[";return z===J.charCodeAt(u++)?(e.consume(z),u===J.length?i.interrupt?t:q:S):n(z)}function k(z){return Nr(z)?(e.consume(z),c=String.fromCharCode(z),E):n(z)}function E(z){if(z===null||z===47||z===62||xn(z)){const J=z===47,ne=c.toLowerCase();return!J&&!l&&UE.includes(ne)?(s=1,i.interrupt?t(z):q(z)):pq.includes(c.toLowerCase())?(s=6,J?(e.consume(z),C):i.interrupt?t(z):q(z)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(z):l?T(z):R(z))}return z===45||Sr(z)?(e.consume(z),c+=String.fromCharCode(z),E):n(z)}function C(z){return z===62?(e.consume(z),i.interrupt?t:q):n(z)}function T(z){return Mt(z)?(e.consume(z),T):D(z)}function R(z){return z===47?(e.consume(z),D):z===58||z===95||Nr(z)?(e.consume(z),N):Mt(z)?(e.consume(z),R):D(z)}function N(z){return z===45||z===46||z===58||z===95||Sr(z)?(e.consume(z),N):I(z)}function I(z){return z===61?(e.consume(z),M):Mt(z)?(e.consume(z),I):R(z)}function M(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),m=z,P):Mt(z)?(e.consume(z),M):A(z)}function P(z){return z===m?(e.consume(z),m=null,L):z===null||lt(z)?n(z):(e.consume(z),P)}function A(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||xn(z)?I(z):(e.consume(z),A)}function L(z){return z===47||z===62||Mt(z)?R(z):n(z)}function D(z){return z===62?(e.consume(z),U):n(z)}function U(z){return z===null||lt(z)?q(z):Mt(z)?(e.consume(z),U):n(z)}function q(z){return z===45&&s===2?(e.consume(z),F):z===60&&s===1?(e.consume(z),V):z===62&&s===4?(e.consume(z),_):z===63&&s===3?(e.consume(z),O):z===93&&s===5?(e.consume(z),te):lt(z)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(xq,Z,K)(z)):z===null||lt(z)?(e.exit("htmlFlowData"),K(z)):(e.consume(z),q)}function K(z){return e.check(yq,G,Z)(z)}function G(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),B}function B(z){return z===null||lt(z)?K(z):(e.enter("htmlFlowData"),q(z))}function F(z){return z===45?(e.consume(z),O):q(z)}function V(z){return z===47?(e.consume(z),c="",Y):q(z)}function Y(z){if(z===62){const J=c.toLowerCase();return UE.includes(J)?(e.consume(z),_):q(z)}return Nr(z)&&c.length<8?(e.consume(z),c+=String.fromCharCode(z),Y):q(z)}function te(z){return z===93?(e.consume(z),O):q(z)}function O(z){return z===62?(e.consume(z),_):z===45&&s===2?(e.consume(z),O):q(z)}function _(z){return z===null||lt(z)?(e.exit("htmlFlowData"),Z(z)):(e.consume(z),_)}function Z(z){return e.exit("htmlFlow"),t(z)}}function wq(e,t,n){const i=this;return s;function s(c){return lt(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):n(c)}function l(c){return i.parser.lazy[i.now().line]?n(c):t(c)}}function Sq(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt($u,t,n)}}const kq={name:"htmlText",tokenize:Eq};function Eq(e,t,n){const i=this;let s,l,c;return u;function u(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),I):O===63?(e.consume(O),R):Nr(O)?(e.consume(O),A):n(O)}function h(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),l=0,S):Nr(O)?(e.consume(O),T):n(O)}function p(O){return O===45?(e.consume(O),b):n(O)}function g(O){return O===null?n(O):O===45?(e.consume(O),y):lt(O)?(c=g,V(O)):(e.consume(O),g)}function y(O){return O===45?(e.consume(O),b):g(O)}function b(O){return O===62?F(O):O===45?y(O):g(O)}function S(O){const _="CDATA[";return O===_.charCodeAt(l++)?(e.consume(O),l===_.length?k:S):n(O)}function k(O){return O===null?n(O):O===93?(e.consume(O),E):lt(O)?(c=k,V(O)):(e.consume(O),k)}function E(O){return O===93?(e.consume(O),C):k(O)}function C(O){return O===62?F(O):O===93?(e.consume(O),C):k(O)}function T(O){return O===null||O===62?F(O):lt(O)?(c=T,V(O)):(e.consume(O),T)}function R(O){return O===null?n(O):O===63?(e.consume(O),N):lt(O)?(c=R,V(O)):(e.consume(O),R)}function N(O){return O===62?F(O):R(O)}function I(O){return Nr(O)?(e.consume(O),M):n(O)}function M(O){return O===45||Sr(O)?(e.consume(O),M):P(O)}function P(O){return lt(O)?(c=P,V(O)):Mt(O)?(e.consume(O),P):F(O)}function A(O){return O===45||Sr(O)?(e.consume(O),A):O===47||O===62||xn(O)?L(O):n(O)}function L(O){return O===47?(e.consume(O),F):O===58||O===95||Nr(O)?(e.consume(O),D):lt(O)?(c=L,V(O)):Mt(O)?(e.consume(O),L):F(O)}function D(O){return O===45||O===46||O===58||O===95||Sr(O)?(e.consume(O),D):U(O)}function U(O){return O===61?(e.consume(O),q):lt(O)?(c=U,V(O)):Mt(O)?(e.consume(O),U):L(O)}function q(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,K):lt(O)?(c=q,V(O)):Mt(O)?(e.consume(O),q):(e.consume(O),G)}function K(O){return O===s?(e.consume(O),s=void 0,B):O===null?n(O):lt(O)?(c=K,V(O)):(e.consume(O),K)}function G(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||xn(O)?L(O):(e.consume(O),G)}function B(O){return O===47||O===62||xn(O)?L(O):n(O)}function F(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function V(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Y}function Y(O){return Mt(O)?Bt(e,te,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):te(O)}function te(O){return e.enter("htmlTextData"),c(O)}}const gv={name:"labelEnd",resolveAll:jq,resolveTo:Nq,tokenize:Oq},Cq={tokenize:Aq},Tq={tokenize:Mq},Rq={tokenize:zq};function jq(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",t+=s}}return e.length!==n.length&&ni(e,0,e.length,n),e}function Nq(e,t){let n=e.length,i=0,s,l,c,u;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(c=n);const m={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[c][1].end}},p={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[c-2][1].start}};return u=[["enter",m,t],["enter",h,t]],u=gi(u,e.slice(l+1,l+i+3)),u=gi(u,[["enter",p,t]]),u=gi(u,Tm(t.parser.constructs.insideSpan.null,e.slice(l+i+4,c-3),t)),u=gi(u,[["exit",p,t],e[c-2],e[c-1],["exit",h,t]]),u=gi(u,e.slice(c+1)),u=gi(u,[["exit",m,t]]),ni(e,l,e.length,u),e}function Oq(e,t,n){const i=this;let s=i.events.length,l,c;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){l=i.events[s][1];break}return u;function u(y){return l?l._inactive?g(y):(c=i.parser.defined.includes(Fi(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),m):n(y)}function m(y){return y===40?e.attempt(Cq,p,c?p:g)(y):y===91?e.attempt(Tq,p,c?h:g)(y):c?p(y):g(y)}function h(y){return e.attempt(Rq,p,g)(y)}function p(y){return t(y)}function g(y){return l._balanced=!0,n(y)}}function Aq(e,t,n){return i;function i(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return xn(g)?mu(e,l)(g):l(g)}function l(g){return g===41?p(g):wN(e,c,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return xn(g)?mu(e,m)(g):p(g)}function u(g){return n(g)}function m(g){return g===34||g===39||g===40?kN(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function h(g){return xn(g)?mu(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function Mq(e,t,n){const i=this;return s;function s(u){return SN.call(i,e,l,c,"reference","referenceMarker","referenceString")(u)}function l(u){return i.parser.defined.includes(Fi(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function c(u){return n(u)}}function zq(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Iq={name:"labelStartImage",resolveAll:gv.resolveAll,tokenize:Dq};function Dq(e,t,n){const i=this;return s;function s(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),l}function l(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),c):n(u)}function c(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):t(u)}}const _q={name:"labelStartLink",resolveAll:gv.resolveAll,tokenize:Pq};function Pq(e,t,n){const i=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const Cx={name:"lineEnding",tokenize:Lq};function Lq(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Bt(e,t,"linePrefix")}}const qd={name:"thematicBreak",tokenize:Fq};function Fq(e,t,n){let i=0,s;return l;function l(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,u(h)}function u(h){return h===s?(e.enter("thematicBreakSequence"),m(h)):i>=3&&(h===null||lt(h))?(e.exit("thematicBreak"),t(h)):n(h)}function m(h){return h===s?(e.consume(h),i++,m):(e.exit("thematicBreakSequence"),Mt(h)?Bt(e,u,"whitespace")(h):u(h))}}const Pr={continuation:{tokenize:Uq},exit:qq,name:"list",tokenize:Vq},Hq={partial:!0,tokenize:Gq},Bq={partial:!0,tokenize:Zq};function Vq(e,t,n){const i=this,s=i.events[i.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return u;function u(b){const S=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:Iy(b)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(qd,n,h)(b):h(b);if(!i.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(b)}return n(b)}function m(b){return Iy(b)&&++c<10?(e.consume(b),m):(!i.interrupt||c<2)&&(i.containerState.marker?b===i.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||b,e.check($u,i.interrupt?n:p,e.attempt(Hq,y,g))}function p(b){return i.containerState.initialBlankLine=!0,l++,y(b)}function g(b){return Mt(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),y):n(b)}function y(b){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function Uq(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check($u,s,l);function s(u){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Bt(e,t,"listItemIndent",i.containerState.size+1)(u)}function l(u){return i.containerState.furtherBlankLines||!Mt(u)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(u)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(Bq,t,c)(u))}function c(u){return i.containerState._closeFlow=!0,i.interrupt=void 0,Bt(e,e.attempt(Pr,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Zq(e,t,n){const i=this;return Bt(e,s,"listItemIndent",i.containerState.size+1);function s(l){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?t(l):n(l)}}function qq(e){e.exit(this.containerState.type)}function Gq(e,t,n){const i=this;return Bt(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const c=i.events[i.events.length-1];return!Mt(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const ZE={name:"setextUnderline",resolveTo:Yq,tokenize:Kq};function Yq(e,t){let n=e.length,i,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",c,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=c,e.push(["exit",c,t]),e}function Kq(e,t,n){const i=this;let s;return l;function l(h){let p=i.events.length,g;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){g=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||g)?(e.enter("setextHeadingLine"),s=h,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===s?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),Mt(h)?Bt(e,m,"lineSuffix")(h):m(h))}function m(h){return h===null||lt(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Xq={tokenize:Jq};function Jq(e){const t=this,n=e.attempt($u,i,e.attempt(this.parser.constructs.flowInitial,s,Bt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(tq,s)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Wq={resolveAll:CN()},$q=EN("string"),Qq=EN("text");function EN(e){return{resolveAll:CN(e==="text"?eG:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],l=n.attempt(s,c,u);return c;function c(p){return h(p)?l(p):u(p)}function u(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),m}function m(p){return h(p)?(n.exit("data"),l(p)):(n.consume(p),m)}function h(p){if(p===null)return!0;const g=s[p];let y=-1;if(g)for(;++y<g.length;){const b=g[y];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function CN(e){return t;function t(n,i){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,i):n}}function eG(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],s=t.sliceStream(i);let l=s.length,c=-1,u=0,m;for(;l--;){const h=s[l];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)u++,c--;if(c)break;c=-1}else if(h===-2)m=!0,u++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||m||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:i.start._bufferIndex+c,_index:i.start._index+l,line:i.end.line,column:i.end.column-u,offset:i.end.offset-u},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const tG={42:Pr,43:Pr,45:Pr,48:Pr,49:Pr,50:Pr,51:Pr,52:Pr,53:Pr,54:Pr,55:Pr,56:Pr,57:Pr,62:xN},nG={91:sq},rG={[-2]:Ex,[-1]:Ex,32:Ex},iG={35:dq,42:qd,45:[ZE,qd],60:gq,61:ZE,95:qd,96:VE,126:VE},oG={38:bN,92:yN},sG={[-5]:Cx,[-4]:Cx,[-3]:Cx,33:Iq,38:bN,42:Dy,60:[_Z,kq],91:_q,92:[uq,yN],93:gv,95:Dy,96:XZ},lG={null:[Dy,Wq]},aG={null:[42,95]},cG={null:[]},uG=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:aG,contentInitial:nG,disable:cG,document:tG,flow:iG,flowInitial:rG,insideSpan:lG,string:oG,text:sG},Symbol.toStringTag,{value:"Module"}));function fG(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let c=[],u=[];const m={attempt:P(I),check:P(M),consume:T,enter:R,exit:N,interrupt:P(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:y,sliceStream:b,write:g};let p=t.tokenize.call(h,m);return t.resolveAll&&l.push(t),h;function g(U){return c=gi(c,U),E(),c[c.length-1]!==null?[]:(A(t,0),h.events=Tm(l,h.events,h),h.events)}function y(U,q){return hG(b(U),q)}function b(U){return dG(c,U)}function S(){const{_bufferIndex:U,_index:q,line:K,column:G,offset:B}=i;return{_bufferIndex:U,_index:q,line:K,column:G,offset:B}}function k(U){s[U.line]=U.column,D()}function E(){let U;for(;i._index<c.length;){const q=c[i._index];if(typeof q=="string")for(U=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===U&&i._bufferIndex<q.length;)C(q.charCodeAt(i._bufferIndex));else C(q)}}function C(U){p=p(U)}function T(U){lt(U)?(i.line++,i.column=1,i.offset+=U===-3?2:1,D()):U!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=U}function R(U,q){const K=q||{};return K.type=U,K.start=S(),h.events.push(["enter",K,h]),u.push(K),K}function N(U){const q=u.pop();return q.end=S(),h.events.push(["exit",q,h]),q}function I(U,q){A(U,q.from)}function M(U,q){q.restore()}function P(U,q){return K;function K(G,B,F){let V,Y,te,O;return Array.isArray(G)?Z(G):"tokenize"in G?Z([G]):_(G);function _(W){return fe;function fe(ie){const se=ie!==null&&W[ie],Se=ie!==null&&W.null,ye=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return Z(ye)(ie)}}function Z(W){return V=W,Y=0,W.length===0?F:z(W[Y])}function z(W){return fe;function fe(ie){return O=L(),te=W,W.partial||(h.currentConstruct=W),W.name&&h.parser.constructs.disable.null.includes(W.name)?ne():W.tokenize.call(q?Object.assign(Object.create(h),q):h,m,J,ne)(ie)}}function J(W){return U(te,O),B}function ne(W){return O.restore(),++Y<V.length?z(V[Y]):F}}}function A(U,q){U.resolveAll&&!l.includes(U)&&l.push(U),U.resolve&&ni(h.events,q,h.events.length-q,U.resolve(h.events.slice(q),h)),U.resolveTo&&(h.events=U.resolveTo(h.events,h))}function L(){const U=S(),q=h.previous,K=h.currentConstruct,G=h.events.length,B=Array.from(u);return{from:G,restore:F};function F(){i=U,h.previous=q,h.currentConstruct=K,h.events.length=G,u=B,D()}}function D(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function dG(e,t){const n=t.start._index,i=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(i,l)];else{if(c=e.slice(n,s),i>-1){const u=c[0];typeof u=="string"?c[0]=u.slice(i):c.shift()}l>0&&c.push(e[s].slice(0,l))}return c}function hG(e,t){let n=-1;const i=[];let s;for(;++n<e.length;){const l=e[n];let c;if(typeof l=="string")c=l;else switch(l){case-5:{c="\r";break}case-4:{c=`
|
|
66
|
+
`;break}case-3:{c=`\r
|
|
67
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(l)}s=l===-2,i.push(c)}return i.join("")}function mG(e){const i={constructs:pN([uG,...(e||{}).extensions||[]]),content:s(NZ),defined:[],document:s(AZ),flow:s(Xq),lazy:{},string:s($q),text:s(Qq)};return i;function s(l){return c;function c(u){return fG(i,l,u)}}}function pG(e){for(;!vN(e););return e}const qE=/[\0\t\n\r]/g;function gG(){let e=1,t="",n=!0,i;return s;function s(l,c,u){const m=[];let h,p,g,y,b;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),g=0,t="",n&&(l.charCodeAt(0)===65279&&g++,n=void 0);g<l.length;){if(qE.lastIndex=g,h=qE.exec(l),y=h&&h.index!==void 0?h.index:l.length,b=l.charCodeAt(y),!h){t=l.slice(g);break}if(b===10&&g===y&&i)m.push(-3),i=void 0;else switch(i&&(m.push(-5),i=void 0),g<y&&(m.push(l.slice(g,y)),e+=y-g),b){case 0:{m.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,m.push(-2);e++<p;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:i=!0,e=1}g=y+1}return u&&(i&&m.push(-5),t&&m.push(t),m.push(null)),m}}const xG=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yG(e){return e.replace(xG,bG)}function bG(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return gN(n.slice(l?2:1),l?16:10)}return pv(n)||e}const TN={}.hasOwnProperty;function vG(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),wG(n)(pG(mG(n).document().write(gG()(e,t,!0))))}function wG(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(we),autolinkProtocol:L,autolinkEmail:L,atxHeading:l(De),blockQuote:l(Se),characterEscape:L,characterReference:L,codeFenced:l(ye),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(ye,c),codeText:l(xe,c),codeTextData:L,data:L,codeFlowValue:L,definition:l(ve),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(Re),hardBreakEscape:l(Me),hardBreakTrailing:l(Me),htmlFlow:l(Ne,c),htmlFlowData:L,htmlText:l(Ne,c),htmlTextData:L,image:l(ge),label:c,link:l(we),listItem:l(Ve),listItemValue:y,listOrdered:l(je,g),listUnordered:l(je),paragraph:l(Ue),reference:z,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(De),strong:l(me),thematicBreak:l(le)},exit:{atxHeading:m(),atxHeadingSequence:I,autolink:m(),autolinkEmail:se,autolinkProtocol:ie,blockQuote:m(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:W,characterReference:fe,codeFenced:m(E),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:S,codeFlowValue:D,codeIndented:m(C),codeText:m(B),codeTextData:D,data:D,definition:m(),definitionDestinationString:N,definitionLabelString:T,definitionTitleString:R,emphasis:m(),hardBreakEscape:m(q),hardBreakTrailing:m(q),htmlFlow:m(K),htmlFlowData:D,htmlText:m(G),htmlTextData:D,image:m(V),label:te,labelText:Y,lineEnding:U,link:m(F),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:J,resourceDestinationString:O,resourceTitleString:_,resource:Z,setextHeading:m(A),setextHeadingLineSequence:P,setextHeadingText:M,strong:m(),thematicBreak:m()}};RN(t,(e||{}).mdastExtensions||[]);const n={};return i;function i($){let Q={type:"root",children:[]};const de={stack:[Q],tokenStack:[],config:t,enter:u,exit:h,buffer:c,resume:p,data:n},Oe=[];let _e=-1;for(;++_e<$.length;)if($[_e][1].type==="listOrdered"||$[_e][1].type==="listUnordered")if($[_e][0]==="enter")Oe.push(_e);else{const Ge=Oe.pop();_e=s($,Ge,_e)}for(_e=-1;++_e<$.length;){const Ge=t[$[_e][0]];TN.call(Ge,$[_e][1].type)&&Ge[$[_e][1].type].call(Object.assign({sliceSerialize:$[_e][2].sliceSerialize},de),$[_e][1])}if(de.tokenStack.length>0){const Ge=de.tokenStack[de.tokenStack.length-1];(Ge[1]||GE).call(de,void 0,Ge[0])}for(Q.position={start:vs($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:vs($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)Q=t.transforms[_e](Q)||Q;return Q}function s($,Q,de){let Oe=Q-1,_e=-1,Ge=!1,dt,rt,at,Nt;for(;++Oe<=de;){const Je=$[Oe];switch(Je[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Je[0]==="enter"?_e++:_e--,Nt=void 0;break}case"lineEndingBlank":{Je[0]==="enter"&&(dt&&!Nt&&!_e&&!at&&(at=Oe),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!_e&&Je[0]==="enter"&&Je[1].type==="listItemPrefix"||_e===-1&&Je[0]==="exit"&&(Je[1].type==="listUnordered"||Je[1].type==="listOrdered")){if(dt){let Pt=Oe;for(rt=void 0;Pt--;){const Fe=$[Pt];if(Fe[1].type==="lineEnding"||Fe[1].type==="lineEndingBlank"){if(Fe[0]==="exit")continue;rt&&($[rt][1].type="lineEndingBlank",Ge=!0),Fe[1].type="lineEnding",rt=Pt}else if(!(Fe[1].type==="linePrefix"||Fe[1].type==="blockQuotePrefix"||Fe[1].type==="blockQuotePrefixWhitespace"||Fe[1].type==="blockQuoteMarker"||Fe[1].type==="listItemIndent"))break}at&&(!rt||at<rt)&&(dt._spread=!0),dt.end=Object.assign({},rt?$[rt][1].start:Je[1].end),$.splice(rt||Oe,0,["exit",dt,Je[2]]),Oe++,de++}if(Je[1].type==="listItemPrefix"){const Pt={type:"listItem",_spread:!1,start:Object.assign({},Je[1].start),end:void 0};dt=Pt,$.splice(Oe,0,["enter",Pt,Je[2]]),Oe++,de++,at=void 0,Nt=!0}}}return $[Q][1]._spread=Ge,de}function l($,Q){return de;function de(Oe){u.call(this,$(Oe),Oe),Q&&Q.call(this,Oe)}}function c(){this.stack.push({type:"fragment",children:[]})}function u($,Q,de){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([Q,de||void 0]),$.position={start:vs(Q.start),end:void 0}}function m($){return Q;function Q(de){$&&$.call(this,de),h.call(this,de)}}function h($,Q){const de=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==$.type&&(Q?Q.call(this,$,Oe[0]):(Oe[1]||GE).call(this,$,Oe[0]));else throw new Error("Cannot close `"+$.type+"` ("+hu({start:$.start,end:$.end})+"): it’s not open");de.position.end=vs($.end)}function p(){return mv(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function y($){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function b(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=$}function S(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=$}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$.replace(/(\r?\n|\r)$/g,"")}function T($){const Q=this.resume(),de=this.stack[this.stack.length-1];de.label=Q,de.identifier=Fi(this.sliceSerialize($)).toLowerCase()}function R(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.title=$}function N(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.url=$}function I($){const Q=this.stack[this.stack.length-1];if(!Q.depth){const de=this.sliceSerialize($).length;Q.depth=de}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function P($){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function L($){const de=this.stack[this.stack.length-1].children;let Oe=de[de.length-1];(!Oe||Oe.type!=="text")&&(Oe=re(),Oe.position={start:vs($.start),end:void 0},de.push(Oe)),this.stack.push(Oe)}function D($){const Q=this.stack.pop();Q.value+=this.sliceSerialize($),Q.position.end=vs($.end)}function U($){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=Q.children[Q.children.length-1];de.position.end=vs($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(L.call(this,$),D.call(this,$))}function q(){this.data.atHardBreak=!0}function K(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$}function G(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$}function B(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$}function F(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=Q,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function V(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=Q,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function Y($){const Q=this.sliceSerialize($),de=this.stack[this.stack.length-2];de.label=yG(Q),de.identifier=Fi(Q).toLowerCase()}function te(){const $=this.stack[this.stack.length-1],Q=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const Oe=$.children;de.children=Oe}else de.alt=Q}function O(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.url=$}function _(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.title=$}function Z(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function J($){const Q=this.resume(),de=this.stack[this.stack.length-1];de.label=Q,de.identifier=Fi(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function ne($){this.data.characterReferenceType=$.type}function W($){const Q=this.sliceSerialize($),de=this.data.characterReferenceType;let Oe;de?(Oe=gN(Q,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=pv(Q);const _e=this.stack[this.stack.length-1];_e.value+=Oe}function fe($){const Q=this.stack.pop();Q.position.end=vs($.end)}function ie($){D.call(this,$);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize($)}function se($){D.call(this,$);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize($)}function Se(){return{type:"blockquote",children:[]}}function ye(){return{type:"code",lang:null,meta:null,value:""}}function xe(){return{type:"inlineCode",value:""}}function ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function De(){return{type:"heading",depth:0,children:[]}}function Me(){return{type:"break"}}function Ne(){return{type:"html",value:""}}function ge(){return{type:"image",title:null,url:"",alt:null}}function we(){return{type:"link",title:null,url:"",children:[]}}function je($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function Ve($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function Ue(){return{type:"paragraph",children:[]}}function me(){return{type:"strong",children:[]}}function re(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}function vs(e){return{line:e.line,column:e.column,offset:e.offset}}function RN(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?RN(e,i):SG(e,i)}}function SG(e,t){let n;for(n in t)if(TN.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function GE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+hu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+hu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+hu({start:t.start,end:t.end})+") is still open")}function kG(e){const t=this;t.parser=n;function n(i){return vG(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function EG(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function CG(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
68
|
+
`}]}function TG(e,t){const n=t.value?t.value+`
|
|
69
|
+
`:"",i={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function RG(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jG(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NG(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),s=Wa(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let c,u=e.footnoteCounts.get(i);u===void 0?(u=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=l+1,u+=1,e.footnoteCounts.set(i,u);const m={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(t,h),e.applyData(t,h)}function OG(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AG(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function jN(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=i:s.push({type:"text",value:i}),s}function MG(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return jN(e,t);const s={src:Wa(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function zG(e,t){const n={src:Wa(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function IG(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function DG(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return jN(e,t);const s={href:Wa(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function _G(e,t){const n={href:Wa(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function PG(e,t,n){const i=e.all(t),s=n?LG(n):NN(t),l={},c=[];if(typeof t.checked=="boolean"){const p=i[0];let g;p&&p.type==="element"&&p.tagName==="p"?g=p:(g={type:"element",tagName:"p",properties:{},children:[]},i.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u<i.length;){const p=i[u];(s||u!==0||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
70
|
+
`}),p.type==="element"&&p.tagName==="p"&&!s?c.push(...p.children):c.push(p)}const m=i[i.length-1];m&&(s||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
71
|
+
`});const h={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,h),e.applyData(t,h)}function LG(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=NN(n[i])}return t}function NN(e){const t=e.spread;return t??e.children.length>1}function FG(e,t){const n={},i=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<i.length;){const c=i[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function HG(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BG(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function VG(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UG(e,t){const n=e.all(t),i=n.shift(),s=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=uv(t.children[1]),m=aN(t.children[t.children.length-1]);u&&m&&(c.position={start:u,end:m}),s.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function ZG(e,t,n){const i=n?n.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,u=c?c.length:t.children.length;let m=-1;const h=[];for(;++m<u;){const g=t.children[m],y={},b=c?c[m]:void 0;b&&(y.align=b);let S={type:"element",tagName:l,properties:y,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),h.push(S)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function qG(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const YE=9,KE=32;function GG(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),s=0;const l=[];for(;i;)l.push(XE(t.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=n.exec(t);return l.push(XE(t.slice(s),s>0,!1)),l.join("")}function XE(e,t,n){let i=0,s=e.length;if(t){let l=e.codePointAt(i);for(;l===YE||l===KE;)i++,l=e.codePointAt(i)}if(n){let l=e.codePointAt(s-1);for(;l===YE||l===KE;)s--,l=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function YG(e,t){const n={type:"text",value:GG(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function KG(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const XG={blockquote:EG,break:CG,code:TG,delete:RG,emphasis:jG,footnoteReference:NG,heading:OG,html:AG,imageReference:MG,image:zG,inlineCode:IG,linkReference:DG,link:_G,listItem:PG,list:FG,paragraph:HG,root:BG,strong:VG,table:UG,tableCell:qG,tableRow:ZG,text:YG,thematicBreak:KG,toml:Ad,yaml:Ad,definition:Ad,footnoteDefinition:Ad};function Ad(){}const ON=-1,Rm=0,pu=1,yh=2,xv=3,yv=4,bv=5,vv=6,AN=7,MN=8,{defineProperty:JG}=Object,zN=typeof self=="object"?self:globalThis,JE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new zN[e](t)},WG=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),i=s=>{if(e.has(s))return e.get(s);const[l,c]=t[s];switch(l){case Rm:case ON:return n(c,s);case pu:{const u=n([],s);for(const m of c)u.push(i(m));return u}case yh:{const u=n({},s);for(const[m,h]of c){const p=i(m),g=i(h);p==="__proto__"?JG(u,p,{value:g,configurable:!0,enumerable:!0,writable:!0}):u[p]=g}return u}case xv:return n(new Date(c),s);case yv:{const{source:u,flags:m}=c;return n(new RegExp(u,m),s)}case bv:{const u=n(new Map,s);for(const[m,h]of c)u.set(i(m),i(h));return u}case vv:{const u=n(new Set,s);for(const m of c)u.add(i(m));return u}case AN:{const{name:u,message:m}=c;return n(typeof zN[u]=="function"?JE(u,m):new Error(m),s)}case MN:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:u}=new Uint8Array(c);return n(new DataView(u),c)}case"-0":return-0}return n(JE(l,c),s)};return i},WE=e=>WG(new Map,e)(0),pl="",{toString:$G}={},{keys:QG,is:eY}=Object,nu=e=>{const t=typeof e;if(t!=="object"||!e)return[Rm,t];const n=$G.call(e).slice(8,-1);switch(n){case"Array":return[pu,pl];case"Object":return[yh,pl];case"Date":return[xv,pl];case"RegExp":return[yv,pl];case"Map":return[bv,pl];case"Set":return[vv,pl];case"DataView":return[pu,n]}return n.includes("Array")?[pu,n]:e instanceof Error?[AN,e.name||"Error"]:[yh,n]},Md=([e,t])=>e===Rm&&(t==="function"||t==="symbol"),tY=(e,t,n,i)=>{const s=(c,u)=>{const m=i.push(c)-1;return n.set(u,m),m},l=c=>{if(n.has(c))return n.get(c);let[u,m]=nu(c);switch(u){case Rm:{let p=c;switch(m){case"bigint":u=MN,p=c.toString();break;case"number":if(!c&&eY(c,-0))return i.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);p=null;break;case"undefined":return s([ON],c)}return s([u,p],c)}case pu:{if(m){let y=c;return m==="DataView"?y=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(y=new Uint8Array(c)),s([m,[...y]],c)}const p=[],g=s([u,p],c);for(const y of c)p.push(l(y));return g}case yh:{if(m)switch(m){case"BigInt":return s([m,c.toString()],c);case"Boolean":case"Number":case"String":return s([m,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const p=[],g=s([u,p],c);for(const y of QG(c))(e||!Md(nu(c[y])))&&p.push([l(y),l(c[y])]);return g}case xv:return s([u,isNaN(c.getTime())?pl:c.toISOString()],c);case yv:{const{source:p,flags:g}=c;return s([u,{source:p,flags:g}],c)}case bv:{const p=[],g=s([u,p],c);for(const[y,b]of c)(e||!(Md(nu(y))||Md(nu(b))))&&p.push([l(y),l(b)]);return g}case vv:{const p=[],g=s([u,p],c);for(const y of c)(e||!Md(nu(y)))&&p.push(l(y));return g}}const{message:h}=c;return s([u,{name:m,message:h}],c)};return l},$E=(e,{json:t,lossy:n}={})=>{const i=[];return tY(!(t||n),!!t,new Map,i)(e),i},bh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?WE($E(e,t)):structuredClone(e):(e,t)=>WE($E(e,t));function nY(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function rY(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function iY(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||nY,i=e.options.footnoteBackLabel||rY,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let m=-1;for(;++m<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[m]);if(!h)continue;const p=e.all(h),g=String(h.identifier).toUpperCase(),y=Wa(g.toLowerCase());let b=0;const S=[],k=e.footnoteCounts.get(g);for(;k!==void 0&&++b<=k;){S.length>0&&S.push({type:"text",value:" "});let T=typeof n=="string"?n:n(m,b);typeof T=="string"&&(T={type:"text",value:T}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(m,b),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const E=p[p.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const T=E.children[E.children.length-1];T&&T.type==="text"?T.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...S)}else p.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(p,!0)};e.patch(h,C),u.push(C)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...bh(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
72
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
73
|
+
`}]}}const jm=(function(e){if(e==null)return aY;if(typeof e=="function")return Nm(e);if(typeof e=="object")return Array.isArray(e)?oY(e):sY(e);if(typeof e=="string")return lY(e);throw new Error("Expected function, string, or object as test")});function oY(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=jm(e[n]);return Nm(i);function i(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function sY(e){const t=e;return Nm(n);function n(i){const s=i;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function lY(e){return Nm(t);function t(n){return n&&n.type===e}}function Nm(e){return t;function t(n,i,s){return!!(cY(n)&&e.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function aY(){return!0}function cY(e){return e!==null&&typeof e=="object"&&"type"in e}const IN=[],uY=!0,_y=!1,fY="skip";function DN(e,t,n,i){let s;typeof t=="function"&&typeof n!="function"?(i=n,n=t):s=t;const l=jm(s),c=i?-1:1;u(e,void 0,[])();function u(m,h,p){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return y;function y(){let b=IN,S,k,E;if((!t||l(m,h,p[p.length-1]||void 0))&&(b=dY(n(m,p)),b[0]===_y))return b;if("children"in m&&m.children){const C=m;if(C.children&&b[0]!==fY)for(k=(i?C.children.length:-1)+c,E=p.concat(C);k>-1&&k<C.children.length;){const T=C.children[k];if(S=u(T,k,E)(),S[0]===_y)return S;k=typeof S[1]=="number"?S[1]:k+c}}return b}}}function dY(e){return Array.isArray(e)?e:typeof e=="number"?[uY,e]:e==null?IN:[e]}function wv(e,t,n,i){let s,l,c;typeof t=="function"&&typeof n!="function"?(l=void 0,c=t,s=n):(l=t,c=n,s=i),DN(e,l,u,s);function u(m,h){const p=h[h.length-1],g=p?p.children.indexOf(m):void 0;return c(m,g,p)}}const Py={}.hasOwnProperty,hY={};function mY(e,t){const n=t||hY,i=new Map,s=new Map,l=new Map,c={...XG,...n.handlers},u={all:h,applyData:gY,definitionById:i,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:c,one:m,options:n,patch:pY,wrap:yY};return wv(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const g=p.type==="definition"?i:s,y=String(p.identifier).toUpperCase();g.has(y)||g.set(y,p)}}),u;function m(p,g){const y=p.type,b=u.handlers[y];if(Py.call(u.handlers,y)&&b)return b(u,p,g);if(u.options.passThrough&&u.options.passThrough.includes(y)){if("children"in p){const{children:k,...E}=p,C=bh(E);return C.children=u.all(p),C}return bh(p)}return(u.options.unknownHandler||xY)(u,p,g)}function h(p){const g=[];if("children"in p){const y=p.children;let b=-1;for(;++b<y.length;){const S=u.one(y[b],p);if(S){if(b&&y[b-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=QE(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=QE(k.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function pY(e,t){e.position&&(t.position=tZ(e))}function gY(e,t){let n=t;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const c="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:c}}n.type==="element"&&l&&Object.assign(n.properties,bh(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function xY(e,t){const n=t.data||{},i="value"in t&&!(Py.call(n,"hProperties")||Py.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function yY(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
74
|
+
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
75
|
+
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
76
|
+
`}),n}function QE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function eC(e,t){const n=mY(e,t),i=n.one(e,void 0),s=iY(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
|
|
77
|
+
`},s),l}function bY(e,t){return e&&"run"in e?async function(n,i){const s=eC(n,{file:i,...t});await e.run(s,i)}:function(n,i){return eC(n,{file:i,...e||t})}}function tC(e){if(e)throw e}var Tx,nC;function vY(){if(nC)return Tx;nC=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!g)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},c=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},u=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(i)return i(h,p).value}else return;return h[p]};return Tx=function m(){var h,p,g,y,b,S,k=arguments[0],E=1,C=arguments.length,T=!1;for(typeof k=="boolean"&&(T=k,k=arguments[1]||{},E=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});E<C;++E)if(h=arguments[E],h!=null)for(p in h)g=u(k,p),y=u(h,p),k!==y&&(T&&y&&(l(y)||(b=s(y)))?(b?(b=!1,S=g&&s(g)?g:[]):S=g&&l(g)?g:{},c(k,{name:p,newValue:m(T,S,y)})):typeof y<"u"&&c(k,{name:p,newValue:y}));return k},Tx}var wY=vY();const Rx=Zy(wY);function Ly(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function SY(){const e=[],t={run:n,use:i};return t;function n(...s){let l=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);u(null,...s);function u(m,...h){const p=e[++l];let g=-1;if(m){c(m);return}for(;++g<s.length;)(h[g]===null||h[g]===void 0)&&(h[g]=s[g]);s=h,p?kY(p,u)(...h):c(null,...h)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function kY(e,t){let n;return i;function i(...c){const u=e.length>c.length;let m;u&&c.push(s);try{m=e.apply(this,c)}catch(h){const p=h;if(u&&n)throw p;return s(p)}u||(m&&m.then&&typeof m.then=="function"?m.then(l,s):m instanceof Error?s(m):l(m))}function s(c,...u){n||(n=!0,t(c,...u))}function l(c){s(null,c)}}const eo={basename:EY,dirname:CY,extname:TY,join:RY,sep:"/"};function EY(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Qu(e);let n=0,i=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else i<0&&(l=!0,i=s+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let c=-1,u=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else c<0&&(l=!0,c=s+1),u>-1&&(e.codePointAt(s)===t.codePointAt(u--)?u<0&&(i=s):(u=-1,i=c));return n===i?i=c:i<0&&(i=e.length),e.slice(n,i)}function CY(e){if(Qu(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function TY(e){Qu(e);let t=e.length,n=-1,i=0,s=-1,l=0,c;for(;t--;){const u=e.codePointAt(t);if(u===47){if(c){i=t+1;break}continue}n<0&&(c=!0,n=t+1),u===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===i+1?"":e.slice(s,n)}function RY(...e){let t=-1,n;for(;++t<e.length;)Qu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":jY(n)}function jY(e){Qu(e);const t=e.codePointAt(0)===47;let n=NY(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function NY(e,t){let n="",i=0,s=-1,l=0,c=-1,u,m;for(;++c<=e.length;){if(c<e.length)u=e.codePointAt(c);else{if(u===47)break;u=47}if(u===47){if(!(s===c-1||l===1))if(s!==c-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(m=n.lastIndexOf("/"),m!==n.length-1){m<0?(n="",i=0):(n=n.slice(0,m),i=n.length-1-n.lastIndexOf("/")),s=c,l=0;continue}}else if(n.length>0){n="",i=0,s=c,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),i=c-s-1;s=c,l=0}else u===46&&l>-1?l++:l=-1}return n}function Qu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const OY={cwd:AY};function AY(){return"/"}function Fy(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function MY(e){if(typeof e=="string")e=new URL(e);else if(!Fy(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return zY(e)}function zY(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const jx=["history","path","basename","stem","extname","dirname"];class _N{constructor(t){let n;t?Fy(t)?n={path:t}:typeof t=="string"||IY(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":OY.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<jx.length;){const l=jx[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)jx.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?eo.basename(this.path):void 0}set basename(t){Ox(t,"basename"),Nx(t,"basename"),this.path=eo.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?eo.dirname(this.path):void 0}set dirname(t){rC(this.basename,"dirname"),this.path=eo.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?eo.extname(this.path):void 0}set extname(t){if(Nx(t,"extname"),rC(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=eo.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Fy(t)&&(t=MY(t)),Ox(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?eo.basename(this.path,this.extname):void 0}set stem(t){Ox(t,"stem"),Nx(t,"stem"),this.path=eo.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const s=this.message(t,n,i);throw s.fatal=!0,s}info(t,n,i){const s=this.message(t,n,i);return s.fatal=void 0,s}message(t,n,i){const s=new Cr(t,n,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Nx(e,t){if(e&&e.includes(eo.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+eo.sep+"`")}function Ox(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function IY(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const DY=(function(e){const i=this.constructor.prototype,s=i[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),_Y={}.hasOwnProperty;class Sv extends DY{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=SY()}copy(){const t=new Sv;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Rx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(zx("data",this.frozen),this.namespace[t]=n,this):_Y.call(this.namespace,t)&&this.namespace[t]||void 0:t?(zx("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=n.call(t,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=zd(t),i=this.parser||this.Parser;return Ax("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Ax("process",this.parser||this.Parser),Mx("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,c){const u=zd(t),m=i.parse(u);i.run(m,u,function(p,g,y){if(p||!g||!y)return h(p);const b=g,S=i.stringify(b,y);FY(S)?y.value=S:y.result=S,h(p,y)});function h(p,g){p||!g?c(p):l?l(g):n(void 0,g)}}}processSync(t){let n=!1,i;return this.freeze(),Ax("processSync",this.parser||this.Parser),Mx("processSync",this.compiler||this.Compiler),this.process(t,s),oC("processSync","process",n),i;function s(l,c){n=!0,tC(l),i=c}}run(t,n,i){iC(t),this.freeze();const s=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(c,u){const m=zd(n);s.run(t,m,h);function h(p,g,y){const b=g||t;p?u(p):c?c(b):i(void 0,b,y)}}}runSync(t,n){let i=!1,s;return this.run(t,n,l),oC("runSync","run",i),s;function l(c,u){tC(c),s=u,i=!0}}stringify(t,n){this.freeze();const i=zd(n),s=this.compiler||this.Compiler;return Mx("stringify",s),iC(t),s(t,i)}use(t,...n){const i=this.attachers,s=this.namespace;if(zx("use",this.frozen),t!=null)if(typeof t=="function")m(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...g]=h;m(p,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(h.plugins),h.settings&&(s.settings=Rx(!0,s.settings,h.settings))}function u(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const g=h[p];l(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,p){let g=-1,y=-1;for(;++g<i.length;)if(i[g][0]===h){y=g;break}if(y===-1)i.push([h,...p]);else if(p.length>0){let[b,...S]=p;const k=i[y][1];Ly(k)&&Ly(b)&&(b=Rx(!0,k,b)),i[y]=[h,b,...S]}}}}const PY=new Sv().freeze();function Ax(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Mx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zx(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function iC(e){if(!Ly(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function oC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function zd(e){return LY(e)?e:new _N(e)}function LY(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function FY(e){return typeof e=="string"||HY(e)}function HY(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BY="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sC=[],lC={allowDangerousHtml:!0},VY=/^(https?|ircs?|mailto|xmpp)$/i,UY=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ZY(e){const t=qY(e),n=GY(e);return YY(t.runSync(t.parse(n),n),e)}function qY(e){const t=e.rehypePlugins||sC,n=e.remarkPlugins||sC,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lC}:lC;return PY().use(kG).use(n).use(bY,i).use(t)}function GY(e){const t=e.children||"",n=new _N;return typeof t=="string"&&(n.value=t),n}function YY(e,t){const n=t.allowedElements,i=t.allowElement,s=t.components,l=t.disallowedElements,c=t.skipHtml,u=t.unwrapDisallowed,m=t.urlTransform||PN;for(const p of UY)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+BY+p.id,void 0);return wv(e,h),sZ(e,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function h(p,g,y){if(p.type==="raw"&&y&&typeof g=="number")return c?y.children.splice(g,1):y.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let b;for(b in kx)if(Object.hasOwn(kx,b)&&Object.hasOwn(p.properties,b)){const S=p.properties[b],k=kx[b];(k===null||k.includes(p.tagName))&&(p.properties[b]=m(String(S||""),b,p))}}if(p.type==="element"){let b=n?!n.includes(p.tagName):l?l.includes(p.tagName):!1;if(!b&&i&&typeof g=="number"&&(b=!i(p,g,y)),b&&y&&typeof g=="number")return u&&p.children?y.children.splice(g,1,...p.children):y.children.splice(g,1),g}}}function PN(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||i!==-1&&t>i||VY.test(e.slice(0,t))?e:""}function aC(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,s=n.indexOf(t);for(;s!==-1;)i++,s=n.indexOf(t,s+t.length);return i}function KY(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function XY(e,t,n){const s=jm((n||{}).ignore||[]),l=JY(t);let c=-1;for(;++c<l.length;)DN(e,"text",u);function u(h,p){let g=-1,y;for(;++g<p.length;){const b=p[g],S=y?y.children:void 0;if(s(b,S?S.indexOf(b):void 0,y))return;y=b}if(y)return m(h,p)}function m(h,p){const g=p[p.length-1],y=l[c][0],b=l[c][1];let S=0;const E=g.children.indexOf(h);let C=!1,T=[];y.lastIndex=0;let R=y.exec(h.value);for(;R;){const N=R.index,I={index:R.index,input:R.input,stack:[...p,h]};let M=b(...R,I);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?y.lastIndex=N+1:(S!==N&&T.push({type:"text",value:h.value.slice(S,N)}),Array.isArray(M)?T.push(...M):M&&T.push(M),S=N+R[0].length,C=!0),!y.global)break;R=y.exec(h.value)}return C?(S<h.value.length&&T.push({type:"text",value:h.value.slice(S)}),g.children.splice(E,1,...T)):T=[h],E+T.length}}function JY(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const s=n[i];t.push([WY(s[0]),$Y(s[1])])}return t}function WY(e){return typeof e=="string"?new RegExp(KY(e),"g"):e}function $Y(e){return typeof e=="function"?e:function(){return e}}const Ix="phrasing",Dx=["autolink","link","image","label"];function QY(){return{transforms:[sK],enter:{literalAutolink:tK,literalAutolinkEmail:_x,literalAutolinkHttp:_x,literalAutolinkWww:_x},exit:{literalAutolink:oK,literalAutolinkEmail:iK,literalAutolinkHttp:nK,literalAutolinkWww:rK}}}function eK(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ix,notInConstruct:Dx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ix,notInConstruct:Dx},{character:":",before:"[ps]",after:"\\/",inConstruct:Ix,notInConstruct:Dx}]}}function tK(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function _x(e){this.config.enter.autolinkProtocol.call(this,e)}function nK(e){this.config.exit.autolinkProtocol.call(this,e)}function rK(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function iK(e){this.config.exit.autolinkEmail.call(this,e)}function oK(e){this.exit(e)}function sK(e){XY(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,lK],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),aK]],{ignore:["link","linkReference"]})}function lK(e,t,n,i,s){let l="";if(!LN(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!cK(n)))return!1;const c=uK(n+i);if(!c[0])return!1;const u={type:"link",title:null,url:l+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[u,{type:"text",value:c[1]}]:u}function aK(e,t,n,i){return!LN(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function cK(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function uK(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const s=aC(e,"(");let l=aC(e,")");for(;i!==-1&&s>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function LN(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ol(n)||Cm(n))&&(!t||n!==47)}FN.peek=bK;function fK(){this.buffer()}function dK(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function hK(){this.buffer()}function mK(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function pK(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Fi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gK(e){this.exit(e)}function xK(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Fi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yK(e){this.exit(e)}function bK(){return"["}function FN(e,t,n,i){const s=n.createTracker(i);let l=s.move("[^");const c=n.enter("footnoteReference"),u=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),u(),c(),l+=s.move("]"),l}function vK(){return{enter:{gfmFootnoteCallString:fK,gfmFootnoteCall:dK,gfmFootnoteDefinitionLabelString:hK,gfmFootnoteDefinition:mK},exit:{gfmFootnoteCallString:pK,gfmFootnoteCall:gK,gfmFootnoteDefinitionLabelString:xK,gfmFootnoteDefinition:yK}}}function wK(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:FN},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,s,l,c){const u=l.createTracker(c);let m=u.move("[^");const h=l.enter("footnoteDefinition"),p=l.enter("label");return m+=u.move(l.safe(l.associationId(i),{before:m,after:"]"})),p(),m+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),m+=u.move((t?`
|
|
78
|
+
`:" ")+l.indentLines(l.containerFlow(i,u.current()),t?HN:SK))),h(),m}}function SK(e,t,n){return t===0?e:HN(e,t,n)}function HN(e,t,n){return(n?"":" ")+e}const kK=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];BN.peek=jK;function EK(){return{canContainEols:["delete"],enter:{strikethrough:TK},exit:{strikethrough:RK}}}function CK(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:kK}],handlers:{delete:BN}}}function TK(e){this.enter({type:"delete",children:[]},e)}function RK(e){this.exit(e)}function BN(e,t,n,i){const s=n.createTracker(i),l=n.enter("strikethrough");let c=s.move("~~");return c+=n.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),l(),c}function jK(){return"~"}function NK(e){return e.length}function OK(e,t){const n=t||{},i=(n.align||[]).concat(),s=n.stringLength||NK,l=[],c=[],u=[],m=[];let h=0,p=-1;for(;++p<e.length;){const k=[],E=[];let C=-1;for(e[p].length>h&&(h=e[p].length);++C<e[p].length;){const T=AK(e[p][C]);if(n.alignDelimiters!==!1){const R=s(T);E[C]=R,(m[C]===void 0||R>m[C])&&(m[C]=R)}k.push(T)}c[p]=k,u[p]=E}let g=-1;if(typeof i=="object"&&"length"in i)for(;++g<h;)l[g]=cC(i[g]);else{const k=cC(i);for(;++g<h;)l[g]=k}g=-1;const y=[],b=[];for(;++g<h;){const k=l[g];let E="",C="";k===99?(E=":",C=":"):k===108?E=":":k===114&&(C=":");let T=n.alignDelimiters===!1?1:Math.max(1,m[g]-E.length-C.length);const R=E+"-".repeat(T)+C;n.alignDelimiters!==!1&&(T=E.length+T+C.length,T>m[g]&&(m[g]=T),b[g]=T),y[g]=R}c.splice(1,0,y),u.splice(1,0,b),p=-1;const S=[];for(;++p<c.length;){const k=c[p],E=u[p];g=-1;const C=[];for(;++g<h;){const T=k[g]||"";let R="",N="";if(n.alignDelimiters!==!1){const I=m[g]-(E[g]||0),M=l[g];M===114?R=" ".repeat(I):M===99?I%2?(R=" ".repeat(I/2+.5),N=" ".repeat(I/2-.5)):(R=" ".repeat(I/2),N=R):N=" ".repeat(I)}n.delimiterStart!==!1&&!g&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||g)&&C.push(" "),n.alignDelimiters!==!1&&C.push(R),C.push(T),n.alignDelimiters!==!1&&C.push(N),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&C.push("|")}S.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return S.join(`
|
|
79
|
+
`)}function AK(e){return e==null?"":String(e)}function cC(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function MK(e,t,n,i){const s=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const c=n.indentLines(n.containerFlow(e,l.current()),zK);return s(),c}function zK(e,t,n){return">"+(n?"":" ")+e}function IK(e,t){return uC(e,t.inConstruct,!0)&&!uC(e,t.notInConstruct,!1)}function uC(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function fC(e,t,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
80
|
+
`&&IK(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
81
|
+
`}function DK(e,t){const n=String(e);let i=n.indexOf(t),s=i,l=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++l>c&&(c=l):l=1,s=i+t.length,i=n.indexOf(t,s);return c}function _K(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function PK(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function LK(e,t,n,i){const s=PK(n),l=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(_K(e,n)){const g=n.enter("codeIndented"),y=n.indentLines(l,FK);return g(),y}const u=n.createTracker(i),m=s.repeat(Math.max(DK(l,s)+1,3)),h=n.enter("codeFenced");let p=u.move(m);if(e.lang){const g=n.enter(`codeFencedLang${c}`);p+=u.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...u.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${c}`);p+=u.move(" "),p+=u.move(n.safe(e.meta,{before:p,after:`
|
|
82
|
+
`,encode:["`"],...u.current()})),g()}return p+=u.move(`
|
|
83
|
+
`),l&&(p+=u.move(l+`
|
|
84
|
+
`)),p+=u.move(m),h(),p}function FK(e,t,n){return(n?"":" ")+e}function kv(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function HK(e,t,n,i){const s=kv(n),l=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let u=n.enter("label");const m=n.createTracker(i);let h=m.move("[");return h+=m.move(n.safe(n.associationId(e),{before:h,after:"]",...m.current()})),h+=m.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(n.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(u=n.enter("destinationRaw"),h+=m.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
85
|
+
`,...m.current()}))),u(),e.title&&(u=n.enter(`title${l}`),h+=m.move(" "+s),h+=m.move(n.safe(e.title,{before:h,after:s,...m.current()})),h+=m.move(s),u()),c(),h}function BK(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ou(e){return"&#x"+e.toString(16).toUpperCase()+";"}function vh(e,t,n){const i=Pa(e),s=Pa(t);return i===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}VN.peek=VK;function VN(e,t,n,i){const s=BK(n),l=n.enter("emphasis"),c=n.createTracker(i),u=c.move(s);let m=c.move(n.containerPhrasing(e,{after:s,before:u,...c.current()}));const h=m.charCodeAt(0),p=vh(i.before.charCodeAt(i.before.length-1),h,s);p.inside&&(m=Ou(h)+m.slice(1));const g=m.charCodeAt(m.length-1),y=vh(i.after.charCodeAt(0),g,s);y.inside&&(m=m.slice(0,-1)+Ou(g));const b=c.move(s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},u+m+b}function VK(e,t,n){return n.options.emphasis||"*"}function UK(e,t){let n=!1;return wv(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,_y}),!!((!e.depth||e.depth<3)&&mv(e)&&(t.options.setext||n))}function ZK(e,t,n,i){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(i);if(UK(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),y=n.containerPhrasing(e,{...l.current(),before:`
|
|
86
|
+
`,after:`
|
|
87
|
+
`});return g(),p(),y+`
|
|
88
|
+
`+(s===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
89
|
+
`))+1))}const c="#".repeat(s),u=n.enter("headingAtx"),m=n.enter("phrasing");l.move(c+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
90
|
+
`,...l.current()});return/^[\t ]/.test(h)&&(h=Ou(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),m(),u(),h}UN.peek=qK;function UN(e){return e.value||""}function qK(){return"<"}ZN.peek=GK;function ZN(e,t,n,i){const s=kv(n),l=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let u=n.enter("label");const m=n.createTracker(i);let h=m.move("![");return h+=m.move(n.safe(e.alt,{before:h,after:"]",...m.current()})),h+=m.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(n.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(u=n.enter("destinationRaw"),h+=m.move(n.safe(e.url,{before:h,after:e.title?" ":")",...m.current()}))),u(),e.title&&(u=n.enter(`title${l}`),h+=m.move(" "+s),h+=m.move(n.safe(e.title,{before:h,after:s,...m.current()})),h+=m.move(s),u()),h+=m.move(")"),c(),h}function GK(){return"!"}qN.peek=YK;function qN(e,t,n,i){const s=e.referenceType,l=n.enter("imageReference");let c=n.enter("label");const u=n.createTracker(i);let m=u.move("![");const h=n.safe(e.alt,{before:m,after:"]",...u.current()});m+=u.move(h+"]["),c();const p=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:m,after:"]",...u.current()});return c(),n.stack=p,l(),s==="full"||!h||h!==g?m+=u.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=u.move("]"),m}function YK(){return"!"}GN.peek=KK;function GN(e,t,n){let i=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const c=n.unsafe[l],u=n.compilePattern(c);let m;if(c.atBreak)for(;m=u.exec(i);){let h=m.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(m.index+1)}}return s+i+s}function KK(){return"`"}function YN(e,t){const n=mv(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}KN.peek=XK;function KN(e,t,n,i){const s=kv(n),l=s==='"'?"Quote":"Apostrophe",c=n.createTracker(i);let u,m;if(YN(e,n)){const p=n.stack;n.stack=[],u=n.enter("autolink");let g=c.move("<");return g+=c.move(n.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),u(),n.stack=p,g}u=n.enter("link"),m=n.enter("label");let h=c.move("[");return h+=c.move(n.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=n.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(n.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(m=n.enter("destinationRaw"),h+=c.move(n.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),m(),e.title&&(m=n.enter(`title${l}`),h+=c.move(" "+s),h+=c.move(n.safe(e.title,{before:h,after:s,...c.current()})),h+=c.move(s),m()),h+=c.move(")"),u(),h}function XK(e,t,n){return YN(e,n)?"<":"["}XN.peek=JK;function XN(e,t,n,i){const s=e.referenceType,l=n.enter("linkReference");let c=n.enter("label");const u=n.createTracker(i);let m=u.move("[");const h=n.containerPhrasing(e,{before:m,after:"]",...u.current()});m+=u.move(h+"]["),c();const p=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:m,after:"]",...u.current()});return c(),n.stack=p,l(),s==="full"||!h||h!==g?m+=u.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=u.move("]"),m}function JK(){return"["}function Ev(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function WK(e){const t=Ev(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function $K(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function JN(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function QK(e,t,n,i){const s=n.enter("list"),l=n.bulletCurrent;let c=e.ordered?$K(n):Ev(n);const u=e.ordered?c==="."?")":".":WK(n);let m=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(m=!0),JN(n)===c&&p){let g=-1;for(;++g<e.children.length;){const y=e.children[g];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=u),n.bulletCurrent=c;const h=n.containerFlow(e,i);return n.bulletLastUsed=c,n.bulletCurrent=l,s(),h}function eX(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function tX(e,t,n,i){const s=eX(n);let l=n.bulletCurrent||Ev(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let c=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const u=n.createTracker(i);u.move(l+" ".repeat(c-l.length)),u.shift(c);const m=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,u.current()),p);return m(),h;function p(g,y,b){return y?(b?"":" ".repeat(c))+g:(b?l:l+" ".repeat(c-l.length))+g}}function nX(e,t,n,i){const s=n.enter("paragraph"),l=n.enter("phrasing"),c=n.containerPhrasing(e,i);return l(),s(),c}const rX=jm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function iX(e,t,n,i){return(e.children.some(function(c){return rX(c)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function oX(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}WN.peek=sX;function WN(e,t,n,i){const s=oX(n),l=n.enter("strong"),c=n.createTracker(i),u=c.move(s+s);let m=c.move(n.containerPhrasing(e,{after:s,before:u,...c.current()}));const h=m.charCodeAt(0),p=vh(i.before.charCodeAt(i.before.length-1),h,s);p.inside&&(m=Ou(h)+m.slice(1));const g=m.charCodeAt(m.length-1),y=vh(i.after.charCodeAt(0),g,s);y.inside&&(m=m.slice(0,-1)+Ou(g));const b=c.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},u+m+b}function sX(e,t,n){return n.options.strong||"*"}function lX(e,t,n,i){return n.safe(e.value,i)}function aX(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function cX(e,t,n){const i=(JN(n)+(n.options.ruleSpaces?" ":"")).repeat(aX(n));return n.options.ruleSpaces?i.slice(0,-1):i}const $N={blockquote:MK,break:fC,code:LK,definition:HK,emphasis:VN,hardBreak:fC,heading:ZK,html:UN,image:ZN,imageReference:qN,inlineCode:GN,link:KN,linkReference:XN,list:QK,listItem:tX,paragraph:nX,root:iX,strong:WN,text:lX,thematicBreak:cX};function uX(){return{enter:{table:fX,tableData:dC,tableHeader:dC,tableRow:hX},exit:{codeText:mX,table:dX,tableData:Px,tableHeader:Px,tableRow:Px}}}function fX(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function dX(e){this.exit(e),this.data.inTable=void 0}function hX(e){this.enter({type:"tableRow",children:[]},e)}function Px(e){this.exit(e)}function dC(e){this.enter({type:"tableCell",children:[]},e)}function mX(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pX));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pX(e,t){return t==="|"?t:e}function gX(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
91
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:m,tableRow:u}};function c(b,S,k,E){return h(p(b,k,E),b.align)}function u(b,S,k,E){const C=g(b,k,E),T=h([C]);return T.slice(0,T.indexOf(`
|
|
92
|
+
`))}function m(b,S,k,E){const C=k.enter("tableCell"),T=k.enter("phrasing"),R=k.containerPhrasing(b,{...E,before:l,after:l});return T(),C(),R}function h(b,S){return OK(b,{align:S,alignDelimiters:i,padding:n,stringLength:s})}function p(b,S,k){const E=b.children;let C=-1;const T=[],R=S.enter("table");for(;++C<E.length;)T[C]=g(E[C],S,k);return R(),T}function g(b,S,k){const E=b.children;let C=-1;const T=[],R=S.enter("tableRow");for(;++C<E.length;)T[C]=m(E[C],b,S,k);return R(),T}function y(b,S,k){let E=$N.inlineCode(b,S,k);return k.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function xX(){return{exit:{taskListCheckValueChecked:hC,taskListCheckValueUnchecked:hC,paragraph:bX}}}function yX(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vX}}}function hC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function bX(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const s=t.children;let l=-1,c;for(;++l<s.length;){const u=s[l];if(u.type==="paragraph"){c=u;break}}c===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function vX(e,t,n,i){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",u=n.createTracker(i);l&&u.move(c);let m=$N.listItem(e,t,n,{...i,...u.current()});return l&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),m;function h(p){return p+c}}function wX(){return[QY(),vK(),EK(),uX(),xX()]}function SX(e){return{extensions:[eK(),wK(e),CK(),gX(e),yX()]}}const kX={tokenize:NX,partial:!0},QN={tokenize:OX,partial:!0},eO={tokenize:AX,partial:!0},tO={tokenize:MX,partial:!0},EX={tokenize:zX,partial:!0},nO={name:"wwwAutolink",tokenize:RX,previous:iO},rO={name:"protocolAutolink",tokenize:jX,previous:oO},Vo={name:"emailAutolink",tokenize:TX,previous:sO},lo={};function CX(){return{text:lo}}let ml=48;for(;ml<123;)lo[ml]=Vo,ml++,ml===58?ml=65:ml===91&&(ml=97);lo[43]=Vo;lo[45]=Vo;lo[46]=Vo;lo[95]=Vo;lo[72]=[Vo,rO];lo[104]=[Vo,rO];lo[87]=[Vo,nO];lo[119]=[Vo,nO];function TX(e,t,n){const i=this;let s,l;return c;function c(g){return!Hy(g)||!sO.call(i,i.previous)||Cv(i.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(g))}function u(g){return Hy(g)?(e.consume(g),u):g===64?(e.consume(g),m):n(g)}function m(g){return g===46?e.check(EX,p,h)(g):g===45||g===95||Sr(g)?(l=!0,e.consume(g),m):p(g)}function h(g){return e.consume(g),s=!0,m}function p(g){return l&&s&&Nr(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function RX(e,t,n){const i=this;return s;function s(c){return c!==87&&c!==119||!iO.call(i,i.previous)||Cv(i.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(kX,e.attempt(QN,e.attempt(eO,l),n),n)(c))}function l(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function jX(e,t,n){const i=this;let s="",l=!1;return c;function c(g){return(g===72||g===104)&&oO.call(i,i.previous)&&!Cv(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),u):n(g)}function u(g){if(Nr(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),u;if(g===58){const y=s.toLowerCase();if(y==="http"||y==="https")return e.consume(g),m}return n(g)}function m(g){return g===47?(e.consume(g),l?h:(l=!0,m)):n(g)}function h(g){return g===null||xh(g)||xn(g)||Ol(g)||Cm(g)?n(g):e.attempt(QN,e.attempt(eO,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function NX(e,t,n){let i=0;return s;function s(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),s):c===46&&i===3?(e.consume(c),l):n(c)}function l(c){return c===null?n(c):t(c)}}function OX(e,t,n){let i,s,l;return c;function c(h){return h===46||h===95?e.check(tO,m,u)(h):h===null||xn(h)||Ol(h)||h!==45&&Cm(h)?m(h):(l=!0,e.consume(h),c)}function u(h){return h===95?i=!0:(s=i,i=void 0),e.consume(h),c}function m(h){return s||i||!l?n(h):t(h)}}function AX(e,t){let n=0,i=0;return s;function s(c){return c===40?(n++,e.consume(c),s):c===41&&i<n?l(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(tO,t,l)(c):c===null||xn(c)||Ol(c)?t(c):(e.consume(c),s)}function l(c){return c===41&&i++,e.consume(c),s}}function MX(e,t,n){return i;function i(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),i):u===38?(e.consume(u),l):u===93?(e.consume(u),s):u===60||u===null||xn(u)||Ol(u)?t(u):n(u)}function s(u){return u===null||u===40||u===91||xn(u)||Ol(u)?t(u):i(u)}function l(u){return Nr(u)?c(u):n(u)}function c(u){return u===59?(e.consume(u),i):Nr(u)?(e.consume(u),c):n(u)}}function zX(e,t,n){return i;function i(l){return e.consume(l),s}function s(l){return Sr(l)?n(l):t(l)}}function iO(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xn(e)}function oO(e){return!Nr(e)}function sO(e){return!(e===47||Hy(e))}function Hy(e){return e===43||e===45||e===46||e===95||Sr(e)}function Cv(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const IX={tokenize:VX,partial:!0};function DX(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:FX,continuation:{tokenize:HX},exit:BX}},text:{91:{name:"gfmFootnoteCall",tokenize:LX},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_X,resolveTo:PX}}}}function _X(e,t,n){const i=this;let s=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;s--;){const m=i.events[s][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return u;function u(m){if(!c||!c._balanced)return n(m);const h=Fi(i.sliceSerialize({start:c.end,end:i.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),t(m))}}function PX(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},u=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",c,t],["exit",c,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...u),e}function LX(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,c;return u;function u(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),m}function m(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(l>999||g===93&&!c||g===null||g===91||xn(g))return n(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(Fi(i.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return xn(g)||(c=!0),l++,e.consume(g),g===92?p:h}function p(g){return g===91||g===92||g===93?(e.consume(g),l++,h):h(g)}}function FX(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,c=0,u;return m;function m(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(S)}function p(S){if(c>999||S===93&&!u||S===null||S===91||xn(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=Fi(i.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return xn(S)||(u=!0),c++,e.consume(S),S===92?g:p}function g(S){return S===91||S===92||S===93?(e.consume(S),c++,p):p(S)}function y(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(l)||s.push(l),Bt(e,b,"gfmFootnoteDefinitionWhitespace")):n(S)}function b(S){return t(S)}}function HX(e,t,n){return e.check($u,t,e.attempt(IX,t,n))}function BX(e){e.exit("gfmFootnoteDefinition")}function VX(e,t,n){const i=this;return Bt(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(l):n(l)}}function UX(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(c,u){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let h=m;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[m][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[m][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[m][1].start)},y=[["enter",p,u],["enter",c[h][1],u],["exit",c[h][1],u],["enter",g,u]],b=u.parser.constructs.insideSpan.null;b&&ni(y,y.length,0,Tm(b,c.slice(h+1,m),u)),ni(y,y.length,0,[["exit",g,u],["enter",c[m][1],u],["exit",c[m][1],u],["exit",p,u]]),ni(c,h-1,m-h+3,y),m=h+y.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function l(c,u,m){const h=this.previous,p=this.events;let g=0;return y;function y(S){return h===126&&p[p.length-1][1].type!=="characterEscape"?m(S):(c.enter("strikethroughSequenceTemporary"),b(S))}function b(S){const k=Pa(h);if(S===126)return g>1?m(S):(c.consume(S),g++,b);if(g<2&&!n)return m(S);const E=c.exit("strikethroughSequenceTemporary"),C=Pa(S);return E._open=!C||C===2&&!!k,E._close=!k||k===2&&!!C,u(S)}}}class ZX{constructor(){this.map=[]}add(t,n,i){qX(this,t,n,i)}consume(t){if(this.map.sort(function(l,c){return l[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let s=i.pop();for(;s;){for(const l of s)t.push(l);s=i.pop()}this.map.length=0}}function qX(e,t,n,i){let s=0;if(!(n===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...i);return}s+=1}e.map.push([t,n,i])}}function GX(e,t){let n=!1;const i=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function YX(){return{flow:{null:{name:"table",tokenize:KX,resolveAll:XX}}}}function KX(e,t,n){const i=this;let s=0,l=0,c;return u;function u(D){let U=i.events.length-1;for(;U>-1;){const G=i.events[U][1].type;if(G==="lineEnding"||G==="linePrefix")U--;else break}const q=U>-1?i.events[U][1].type:null,K=q==="tableHead"||q==="tableRow"?M:m;return K===M&&i.parser.lazy[i.now().line]?n(D):K(D)}function m(D){return e.enter("tableHead"),e.enter("tableRow"),h(D)}function h(D){return D===124||(c=!0,l+=1),p(D)}function p(D){return D===null?n(D):lt(D)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),b):n(D):Mt(D)?Bt(e,p,"whitespace")(D):(l+=1,c&&(c=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),c=!0,p):(e.enter("data"),g(D)))}function g(D){return D===null||D===124||xn(D)?(e.exit("data"),p(D)):(e.consume(D),D===92?y:g)}function y(D){return D===92||D===124?(e.consume(D),g):g(D)}function b(D){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(D):(e.enter("tableDelimiterRow"),c=!1,Mt(D)?Bt(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):S(D))}function S(D){return D===45||D===58?E(D):D===124?(c=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),k):I(D)}function k(D){return Mt(D)?Bt(e,E,"whitespace")(D):E(D)}function E(D){return D===58?(l+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),C):D===45?(l+=1,C(D)):D===null||lt(D)?N(D):I(D)}function C(D){return D===45?(e.enter("tableDelimiterFiller"),T(D)):I(D)}function T(D){return D===45?(e.consume(D),T):D===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(D))}function R(D){return Mt(D)?Bt(e,N,"whitespace")(D):N(D)}function N(D){return D===124?S(D):D===null||lt(D)?!c||s!==l?I(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):I(D)}function I(D){return n(D)}function M(D){return e.enter("tableRow"),P(D)}function P(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),P):D===null||lt(D)?(e.exit("tableRow"),t(D)):Mt(D)?Bt(e,P,"whitespace")(D):(e.enter("data"),A(D))}function A(D){return D===null||D===124||xn(D)?(e.exit("data"),P(D)):(e.consume(D),D===92?L:A)}function L(D){return D===92||D===124?(e.consume(D),A):A(D)}}function XX(e,t){let n=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,m=0,h,p,g;const y=new ZX;for(;++n<e.length;){const b=e[n],S=b[1];b[0]==="enter"?S.type==="tableHead"?(u=!1,m!==0&&(mC(y,t,m,h,p),p=void 0,m=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,g=void 0,l=[0,0,0,0],c=[0,n+1,0,0],u&&(u=!1,p={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(n,0,[["enter",p,t]])),s=S.type==="tableDelimiterRow"?2:p?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(l[1]!==0&&(c[0]=c[1],g=Id(y,t,l,s,void 0,g),l=[0,0,0,0]),c[2]=n)):S.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(c[0]=c[1],g=Id(y,t,l,s,void 0,g)),l=c,c=[l[1],n,0,0])):S.type==="tableHead"?(u=!0,m=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(m=n,l[1]!==0?(c[0]=c[1],g=Id(y,t,l,s,n,g)):c[1]!==0&&(g=Id(y,t,c,s,n,g)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=n)}for(m!==0&&mC(y,t,m,h,p),y.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=GX(t.events,n))}return e}function Id(e,t,n,i,s,l){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(l.end=Object.assign({},Sa(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const m=Sa(t.events,n[1]);if(l={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=Sa(t.events,n[2]),p=Sa(t.events,n[3]),g={type:u,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,t]]),i!==2){const y=t.events[n[2]],b=t.events[n[3]];if(y[1].end=Object.assign({},b[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(l.end=Object.assign({},Sa(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function mC(e,t,n,i,s){const l=[],c=Sa(t.events,n);s&&(s.end=Object.assign({},c),l.push(["exit",s,t])),i.end=Object.assign({},c),l.push(["exit",i,t]),e.add(n+1,0,l)}function Sa(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const JX={name:"tasklistCheck",tokenize:$X};function WX(){return{text:{91:JX}}}function $X(e,t,n){const i=this;return s;function s(m){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),l)}function l(m){return xn(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),c):n(m)}function c(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(m)}function u(m){return lt(m)?t(m):Mt(m)?e.check({tokenize:QX},t,n)(m):n(m)}}function QX(e,t,n){return Bt(e,i,"whitespace");function i(s){return s===null?n(s):t(s)}}function eJ(e){return pN([CX(),DX(),UX(e),YX(),WX()])}const tJ={};function nJ(e){const t=this,n=e||tJ,i=t.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(eJ(n)),l.push(wX()),c.push(SX(n))}function rJ(e){return e.startsWith(OC)?e:PN(e)}const iJ={h1:({node:e,className:t,...n})=>d.jsx("h1",{className:Te("mt-4 mb-2 text-base font-semibold first:mt-0",t),...n}),h2:({node:e,className:t,...n})=>d.jsx("h2",{className:Te("mt-4 mb-2 text-base font-semibold first:mt-0",t),...n}),h3:({node:e,className:t,...n})=>d.jsx("h3",{className:Te("mt-3 mb-1.5 text-sm font-semibold first:mt-0",t),...n}),h4:({node:e,className:t,...n})=>d.jsx("h4",{className:Te("mt-3 mb-1.5 text-sm font-semibold first:mt-0",t),...n}),h5:({node:e,className:t,...n})=>d.jsx("h5",{className:Te("mt-3 mb-1.5 text-sm font-semibold first:mt-0",t),...n}),h6:({node:e,className:t,...n})=>d.jsx("h6",{className:Te("mt-3 mb-1.5 text-sm font-semibold text-muted-foreground first:mt-0",t),...n}),p:({node:e,className:t,...n})=>d.jsx("p",{className:Te("my-2 leading-relaxed first:mt-0 last:mb-0",t),...n}),ul:({node:e,className:t,...n})=>d.jsx("ul",{className:Te("my-2 ml-5 list-disc space-y-1 first:mt-0 last:mb-0","[&_li:has(>input)]:ml-[-1.15rem] [&_li:has(>input)]:list-none",t),...n}),ol:({node:e,className:t,...n})=>d.jsx("ol",{className:Te("my-2 ml-5 list-decimal space-y-1 first:mt-0 last:mb-0",t),...n}),li:({node:e,className:t,...n})=>d.jsx("li",{className:Te("leading-relaxed",t),...n}),input:({node:e,className:t,...n})=>n.type==="checkbox"?d.jsx("input",{className:Te("mr-1.5 translate-y-[1px] align-baseline accent-primary",t),...n,disabled:!0}):null,blockquote:({node:e,className:t,...n})=>d.jsx("blockquote",{className:Te("my-2 border-l-2 border-border pl-3 text-muted-foreground first:mt-0 last:mb-0",t),...n}),code:({node:e,className:t,...n})=>d.jsx("code",{className:Te("rounded bg-muted px-1 py-0.5 font-mono text-[0.85em]",t),...n}),pre:({node:e,className:t,...n})=>d.jsx("pre",{className:Te("my-2 overflow-x-auto rounded-md border border-border bg-muted/50 p-3 first:mt-0 last:mb-0","font-mono text-xs leading-relaxed","[&_code]:block [&_code]:bg-transparent [&_code]:p-0 [&_code]:text-xs",t),...n}),a:({node:e,className:t,...n})=>d.jsx("a",{target:"_blank",rel:"noreferrer noopener",className:Te("text-primary underline underline-offset-2 hover:no-underline",t),...n}),img:({node:e,src:t,alt:n,title:i,className:s,...l})=>{const c=typeof t=="string"?t:"";return c.startsWith(OC)?d.jsx(oJ,{url:c,alt:n,title:i,className:s,...l}):d.jsx("a",{href:c,target:"_blank",rel:"noreferrer noopener",title:i??c,className:"text-primary underline underline-offset-2 hover:no-underline",children:n&&n.length>0?n:c})},hr:({node:e,className:t,...n})=>d.jsx("hr",{className:Te("my-3 border-t border-border",t),...n}),table:({node:e,className:t,...n})=>d.jsx("div",{className:"my-2 overflow-x-auto first:mt-0 last:mb-0",children:d.jsx("table",{className:Te("w-full border-collapse text-left",t),...n})}),th:({node:e,className:t,...n})=>d.jsx("th",{className:Te("border border-border bg-muted/50 px-2 py-1 font-semibold",t),...n}),td:({node:e,className:t,...n})=>d.jsx("td",{className:Te("border border-border px-2 py-1 align-top",t),...n})};function oJ({url:e,className:t,...n}){const i=Wn();return d.jsx("img",{src:i.attachments.src(e),className:Te("my-2 max-w-full rounded-md border border-border",t),...n,alt:n.alt??""})}function Tv({body:e,className:t}){return d.jsx("div",{"data-selectable":!0,className:Te("text-sm break-words",t),children:d.jsx(ZY,{remarkPlugins:[nJ],components:iJ,urlTransform:rJ,children:e})})}const sJ="AI";function lJ(e){return e.kind==="human"?"human":`agent:${e.name}:${e.label??e.session??""}`}function aJ(e){const t=e.kind==="human"?e.name:e.label??e.name,[n,i]=t.split(/[\s·_-]+/).filter(Boolean);return n?i?(n.charAt(0)+i.charAt(0)).toUpperCase():n.slice(0,2).toUpperCase():"??"}const pC=["bg-sky-500/15 text-sky-600 dark:text-sky-400","bg-violet-500/15 text-violet-600 dark:text-violet-400","bg-amber-500/15 text-amber-600 dark:text-amber-400","bg-emerald-500/15 text-emerald-600 dark:text-emerald-400","bg-rose-500/15 text-rose-600 dark:text-rose-400","bg-teal-500/15 text-teal-600 dark:text-teal-400"];function cJ(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return pC[Math.abs(t)%pC.length]}function uJ({author:e,className:t}){const n=e.kind==="agent";return d.jsx("span",{"aria-hidden":!0,title:n?`${e.name} (AI)`:e.name,className:Te("flex size-6 shrink-0 items-center justify-center text-[10px] font-semibold",n?Te("rounded-md",cJ(lJ(e))):"rounded-full bg-muted text-muted-foreground",t),children:n?aJ(e):d.jsx(QD,{className:"size-3.5"})})}function fJ({author:e,timestamp:t,edited:n}){const i=e.kind==="agent";return d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[d.jsx("span",{className:"truncate text-sm font-medium",children:e.name}),i&&d.jsxs(tn,{variant:"outline",title:e.session?`Written over MCP by ${e.name} (session ${e.session})`:`Written over MCP by ${e.name}`,children:[d.jsx(Wz,{}),sJ]}),e.label&&d.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:"Agent session",children:e.label}),d.jsx("span",{className:"text-xs text-muted-foreground",title:om(t),children:im(t)}),n&&d.jsx("span",{className:"text-xs text-muted-foreground",title:"This comment was edited",children:"· edited"})]})}function dJ(e){w.useEffect(()=>{const t=window.visualViewport;if(t==null)return;let n=0;const i=()=>{const s=e.current;s!==null&&s.contains(document.activeElement)&&(cancelAnimationFrame(n),n=requestAnimationFrame(()=>{s.scrollIntoView({block:"end",behavior:"smooth"})}))};return t.addEventListener("resize",i),document.addEventListener("focusin",i),()=>{cancelAnimationFrame(n),t.removeEventListener("resize",i),document.removeEventListener("focusin",i)}},[e])}const lO=/^(\s*)([-*+]|\d+[.)])(\s+)(\[[ xX]\]\s+)?(.*)$/;function aO(e,t){return e.lastIndexOf(`
|
|
93
|
+
`,t-1)+1}function hJ(e,t){const n=e.indexOf(`
|
|
94
|
+
`,t);return n===-1?e.length:n}function Ea(e,t,n=t){const{value:i,selectionStart:s,selectionEnd:l}=e,c=i.slice(s,l);if(c.startsWith(t)&&c.endsWith(n)&&c.length>=t.length+n.length){const h=c.slice(t.length,c.length-n.length);return{value:i.slice(0,s)+h+i.slice(l),selectionStart:s,selectionEnd:s+h.length}}const u=i.slice(0,s),m=i.slice(l);if(u.endsWith(t)&&m.startsWith(n)){const h=s-t.length;return{value:u.slice(0,-t.length)+c+m.slice(n.length),selectionStart:h,selectionEnd:h+c.length}}return{value:u+t+c+n+m,selectionStart:s+t.length,selectionEnd:s+t.length+c.length}}function By(e,t){const{value:n,selectionStart:i,selectionEnd:s}=e,l=n.slice(i,s),c=l.length>0?l:"text",u=t??"url",m=`[${c}](${u})`,h=n.slice(0,i)+m+n.slice(s);if(t!==void 0&&l.length>0){const y=i+m.length;return{value:h,selectionStart:y,selectionEnd:y}}const p=l.length>0?i+c.length+3:i+1,g=l.length>0?u.length:c.length;return{value:h,selectionStart:p,selectionEnd:p+g}}function mJ(e){const{value:t,selectionStart:n,selectionEnd:i}=e,s=t.slice(n,i),l=t.slice(0,n),c=t.slice(i),u=l.length===0||l.endsWith(`
|
|
95
|
+
|
|
96
|
+
`)?"":l.endsWith(`
|
|
97
|
+
`)?`
|
|
98
|
+
`:`
|
|
99
|
+
|
|
100
|
+
`,m=c.length===0||c.startsWith(`
|
|
101
|
+
|
|
102
|
+
`)?"":c.startsWith(`
|
|
103
|
+
`)?`
|
|
104
|
+
`:`
|
|
105
|
+
|
|
106
|
+
`,p=`${`${u}\`\`\`
|
|
107
|
+
`}${s}
|
|
108
|
+
\`\`\`${m}`;return{value:l+p+c,selectionStart:n+u.length+3,selectionEnd:n+u.length+3}}function Dd(e,t,n){const{value:i,selectionStart:s,selectionEnd:l}=e,c=aO(i,s),u=hJ(i,l),m=i.slice(c,u).split(`
|
|
109
|
+
`),h=m.every(y=>n.test(y)),g=m.map((y,b)=>h?y.replace(n,""):t(b)+y.replace(lO,"$5").replace(/^>\s?/,"")).join(`
|
|
110
|
+
`);return{value:i.slice(0,c)+g+i.slice(u),selectionStart:c,selectionEnd:c+g.length}}const gC={marker:()=>"- ",pattern:/^\s*[-*+]\s+(?!\[[ xX]\])/},xC={marker:e=>`${e+1}. `,pattern:/^\s*\d+[.)]\s+/},yC={marker:()=>"- [ ] ",pattern:/^\s*[-*+]\s+\[[ xX]\]\s+/},bC={marker:()=>"> ",pattern:/^>\s?/};function pJ(e){const{value:t,selectionStart:n,selectionEnd:i}=e,s=aO(t,n),l=t.slice(s,n),c=lO.exec(l);if(!c)return null;const[,u="",m="",h="",p,g=""]=c;if(g.trim().length===0)return{value:t.slice(0,s)+t.slice(i),selectionStart:s,selectionEnd:s};const b=/^\d+[.)]$/.test(m)?`${Number.parseInt(m,10)+1}${m.slice(-1)}`:m,k=`
|
|
111
|
+
${u}${b}${h}${p===void 0?"":"[ ] "}`,E=n+k.length;return{value:t.slice(0,n)+k+t.slice(i),selectionStart:E,selectionEnd:E}}function gJ(e){const t=e.trim();return t.length===0||/\s/.test(t)?!1:/^(https?|ftp|mailto|file):/i.test(t)}function vC(e,t){const{value:n,selectionStart:i,selectionEnd:s}=e,l=i+t.length;return{value:n.slice(0,i)+t+n.slice(s),selectionStart:l,selectionEnd:l}}function Om({placeholder:e="Leave a comment",submitLabel:t="Comment",initialValue:n="",autoFocus:i=!1,onSubmit:s,onCancel:l,className:c}){const u=Wn(),[m,h]=w.useState(n),[p,g]=w.useState("write"),[y,b]=w.useState(!1),[S,k]=w.useState(!1),[E,C]=w.useState(null),T=w.useRef(null),R=w.useRef(null);dJ(R);const N=w.useRef(null);w.useEffect(()=>{i&&T.current?.focus()},[i]),w.useLayoutEffect(()=>{const B=N.current,F=T.current;!B||!F||(N.current=null,F.focus(),F.setSelectionRange(B[0],B[1]))},[m]);const I=m.trim().length>0&&!S;async function M(){if(I){k(!0),C(null);try{await s(m.trim()),h(""),g("write")}catch(B){C(B)}finally{k(!1)}}}const P=w.useCallback(()=>{const B=T.current;return B?{value:B.value,selectionStart:B.selectionStart,selectionEnd:B.selectionEnd}:null},[]),A=w.useCallback(B=>{N.current=[B.selectionStart,B.selectionEnd],h(B.value)},[]),L=w.useCallback(B=>{const F=P();F&&A(B(F))},[A,P]);function D(B){const F=B.metaKey||B.ctrlKey;if(F&&B.key==="Enter"){B.preventDefault(),M();return}if(B.key==="Escape"&&l){B.preventDefault(),l();return}if(F&&!B.altKey){const V=B.key.toLowerCase();if(V==="b"){B.preventDefault(),L(Y=>Ea(Y,"**"));return}if(V==="i"){B.preventDefault(),L(Y=>Ea(Y,"_"));return}if(V==="k"){B.preventDefault(),L(Y=>By(Y));return}}if(B.key==="Enter"&&!F&&!B.shiftKey){const V=P();if(!V)return;const Y=pJ(V);Y&&(B.preventDefault(),A(Y))}}const U=w.useCallback(async B=>{const F=B.filter(te=>te.type.startsWith("image/"));if(F.length===0)return;const V=P();if(!V)return;const Y=V.value.slice(V.selectionStart,V.selectionEnd).trim();k(!0),C(null);try{const te=[];for(const[O,_]of F.entries()){const Z=await u.attachments.ingest({bytes:await _.arrayBuffer(),originalName:_.name}),z=F.length===1&&Y.length>0?Y:yJ(_,O);te.push(``)}A(vC(V,te.join(`
|
|
112
|
+
|
|
113
|
+
`)))}catch(te){C(te)}finally{k(!1)}},[u,A,P]);function q(B){const F=Array.from(B.clipboardData.files);if(F.some(te=>te.type.startsWith("image/"))){B.preventDefault(),U(F);return}const V=P();if(!V||V.selectionStart===V.selectionEnd)return;const Y=B.clipboardData.getData("text/plain");gJ(Y)&&(B.preventDefault(),A(By(V,Y.trim())))}const K=w.useCallback(async()=>{const B=P();if(B){k(!0),C(null);try{const F=await u.attachments.pick();if(F===null)return;const V=B.value.slice(B.selectionStart,B.selectionEnd).trim(),Y=V.length>0?V:F.originalName??"image";A(vC(B,``))}catch(F){C(F)}finally{k(!1)}}},[u,A,P]),G=S;return d.jsxs("div",{ref:R,className:Te("flex flex-col gap-2",c),onDragOver:B=>{B.dataTransfer.types.includes("Files")&&(B.preventDefault(),b(!0))},onDragLeave:B=>{B.currentTarget.contains(B.relatedTarget)||b(!1)},onDrop:B=>{B.dataTransfer.types.includes("Files")&&(B.preventDefault(),b(!1),U(Array.from(B.dataTransfer.files)))},children:[d.jsxs(Mb,{value:p,onValueChange:B=>g(B),children:[d.jsxs(zb,{children:[d.jsx(bl,{value:"write",children:"Write"}),d.jsx(bl,{value:"preview",children:"Preview"})]}),d.jsx(vl,{value:"write",className:"pt-2",children:d.jsxs("div",{className:Te("rounded-md border border-input transition-colors",y&&"border-primary bg-primary/5"),children:[d.jsx(xJ,{disabled:G,transform:L,onAttach:()=>{K()}}),d.jsx(pj,{ref:T,value:m,placeholder:e,disabled:G,onChange:B=>h(B.target.value),onKeyDown:D,onPaste:q,"aria-label":e,className:"min-h-24 rounded-none rounded-b-md border-0 shadow-none focus-visible:outline-none"})]})}),d.jsx(vl,{value:"preview",className:"pt-2",children:d.jsx("div",{className:"min-h-24 rounded-md border border-input px-3 py-2",children:m.trim().length>0?d.jsx(Tv,{body:m}):d.jsx("p",{className:"text-sm italic text-muted-foreground",children:"Nothing to preview."})})})]}),E!==null&&d.jsx("p",{role:"alert",className:"text-xs text-destructive",children:Jt(E)}),d.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[d.jsx("span",{className:"mr-auto text-xs text-muted-foreground",children:y?"Drop to attach":"Markdown supported · paste or drop an image · ⌘↵ to submit"}),l&&d.jsx(Ze,{variant:"ghost",size:"sm",onClick:l,disabled:S,children:"Cancel"}),d.jsx(Ze,{size:"sm",disabled:!I,onClick:()=>{M()},children:S?"Saving…":t})]})]})}function xJ({disabled:e,transform:t,onAttach:n}){const i=[{icon:Xz,title:"Bold (⌘B)",run:s=>Ea(s,"**")},{icon:tD,title:"Italic (⌘I)",run:s=>Ea(s,"_")},{icon:UD,title:"Strikethrough",run:s=>Ea(s,"~~")},{icon:lD,title:"Link (⌘K)",run:s=>By(s)},{icon:pI,title:"Inline code",run:s=>Ea(s,"`")},{icon:BD,title:"Code block",run:mJ},{icon:pD,title:"Bulleted list",run:s=>Dd(s,gC.marker,gC.pattern)},{icon:cD,title:"Numbered list",run:s=>Dd(s,xC.marker,xC.pattern)},{icon:fD,title:"Task list",run:s=>Dd(s,yC.marker,yC.pattern)},{icon:GD,title:"Quote",run:s=>Dd(s,bC.marker,bC.pattern)}];return d.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 border-b border-border px-1 py-1",children:[i.map(({icon:s,title:l,run:c})=>d.jsx(Ln,{label:l,children:d.jsx("button",{type:"button","aria-label":l,disabled:e,onMouseDown:u=>{u.preventDefault(),t(c)},className:Te("rounded p-1.5 text-muted-foreground transition-colors","hover:bg-muted hover:text-foreground","disabled:pointer-events-none disabled:opacity-50"),children:d.jsx(s,{className:"size-4"})})},l)),n&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mx-1 h-4 w-px bg-border"}),d.jsx(Ln,{label:"Attach an image",children:d.jsx("button",{type:"button","aria-label":"Attach an image",disabled:e,onMouseDown:s=>{s.preventDefault(),n()},className:Te("rounded p-1.5 text-muted-foreground transition-colors","hover:bg-muted hover:text-foreground","disabled:pointer-events-none disabled:opacity-50"),children:d.jsx(QI,{className:"size-4"})})})]})]})}function yJ(e,t){const n=e.name.replace(/\.[a-z0-9]+$/i,"").trim();return n.length>0&&n.toLowerCase()!=="image"?n:t===0?"image":`image ${t+1}`}const bJ={moved:{label:"moved",title:"The code this comment was left on is still here, but it has shifted to a different line since the comment was written."},outdated:{label:"outdated",title:"The line this comment was left on is not in the diff any more - it was changed, or it was never part of the diff."}};function ef({thread:e,mutations:t,anchorState:n=null,location:i,className:s}){const[l,c]=w.useState(!1),[u,m]=w.useState(!1),[h,p]=w.useState(null),g=e.resolvedAt!==null,[y,b]=w.useState(!g),S=n&&n!=="anchored"?bJ[n]:null;async function k(){m(!0),p(null);try{await t.setResolved(e.id,!g),b(g)}catch(E){p(E)}finally{m(!1)}}return g&&!y?d.jsxs("div",{className:Te("flex flex-wrap items-center gap-2 rounded-lg border border-border bg-muted/30 px-3 py-2",s),children:[d.jsx(Li,{className:"size-4 shrink-0 text-success"}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:["Resolved",e.resolvedBy?` by ${e.resolvedBy}`:""," ·"," ",e.comments.length===1?"1 comment":`${e.comments.length} comments`]}),i,d.jsx(Ze,{variant:"ghost",size:"sm",className:"ml-auto",onClick:()=>b(!0),children:"Show"})]}):d.jsxs("div",{className:Te("overflow-hidden rounded-lg border border-border bg-card",s),children:[(i||S||g)&&d.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border bg-muted/30 px-3 py-2",children:[i,S&&d.jsxs(tn,{variant:"warning",title:S.title,children:[d.jsx(As,{}),S.label]}),g&&d.jsxs(tn,{variant:"success",title:`Resolved by ${e.resolvedBy??"someone"}`,children:[d.jsx(Li,{}),"resolved"]})]}),d.jsx("div",{className:"divide-y divide-border",children:e.comments.map(E=>d.jsx(vJ,{comment:E,mutations:t},E.id))}),h!==null&&d.jsx("p",{role:"alert",className:"border-t border-border px-3 py-2 text-xs text-destructive",children:Jt(h)}),d.jsx("div",{className:"flex items-center gap-2 border-t border-border bg-muted/20 px-3 py-2",children:l?d.jsx(Om,{className:"w-full",placeholder:"Reply",submitLabel:"Reply",autoFocus:!0,onCancel:()=>c(!1),onSubmit:async E=>{await t.reply({threadId:e.id,body:E}),c(!1)}}):d.jsxs(d.Fragment,{children:[d.jsxs(Ze,{variant:"outline",size:"sm",onClick:()=>c(!0),children:[d.jsx(zu,{}),"Reply"]}),d.jsxs(Ze,{variant:"ghost",size:"sm",className:"ml-auto",disabled:u,onClick:()=>{k()},children:[d.jsx(Li,{}),g?"Reopen":"Resolve"]})]})})]})}function vJ({comment:e,mutations:t}){const[n,i]=w.useState(!1),[s,l]=w.useState(!1),[c,u]=w.useState(null),m=e.updatedAt!==e.createdAt;async function h(){u(null);try{await t.remove(e.id)}catch(p){u(p),l(!1)}}return d.jsxs("div",{className:"flex gap-3 px-3 py-3",children:[d.jsx(uJ,{author:e.author,className:"mt-0.5"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-start justify-between gap-2",children:[d.jsx(fJ,{author:e.author,timestamp:e.createdAt,edited:m}),!n&&d.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[d.jsx(Ln,{label:"Edit this comment",children:d.jsx(Ze,{variant:"ghost",size:"sm",className:"h-7 px-2 text-muted-foreground","aria-label":"Edit this comment",onClick:()=>i(!0),children:d.jsx(kI,{})})}),d.jsx(Ln,{label:s?"Click again to delete":"Delete this comment",children:d.jsxs(Ze,{variant:"ghost",size:"sm",className:"h-7 px-2 text-muted-foreground hover:text-destructive","aria-label":"Delete this comment",onClick:()=>s?void h():l(!0),onBlur:()=>l(!1),children:[d.jsx(vu,{}),s&&d.jsx("span",{className:"text-xs",children:"Sure?"})]})})]})]}),n?d.jsx(Om,{className:"mt-2",initialValue:e.body,submitLabel:"Save",autoFocus:!0,onCancel:()=>i(!1),onSubmit:async p=>{await t.edit(e.id,p),i(!1)}}):d.jsx(Tv,{body:e.body,className:"mt-1"}),c!==null&&d.jsx("p",{role:"alert",className:"mt-2 text-xs text-destructive",children:Jt(c)})]})]})}function wJ(e){if(!e)return null;for(const t of e.elements){const n=t.tagName;if(n==="BUTTON"||n==="INPUT"){const i=t;if(i.type==="submit")return i}}return null}function cO(e){return{checked(t){return e.indeterminate?{}:t?{"data-checked":""}:{"data-unchecked":""}},...Bs}}const SJ=w.createContext(void 0);function kJ(){return w.useContext(SJ)}const uO=w.createContext(void 0);function EJ(){const e=w.useContext(uO);if(e===void 0)throw new Error(En(14));return e}const CJ="data-parent",TJ=w.forwardRef(function(t,n){const{checked:i,className:s,defaultChecked:l=!1,"aria-labelledby":c,disabled:u=!1,form:m,id:h,indeterminate:p=!1,inputRef:g,name:y,onCheckedChange:b,parent:S=!1,readOnly:k=!1,render:E,required:C=!1,uncheckedValue:T,value:R,nativeButton:N=!1,style:I,...M}=t,{clearErrors:P}=Vs(),{disabled:A,name:L,setDirty:D,setFilled:U,setFocused:q,setTouched:K,state:G,validationMode:B,validityData:F,validation:V}=qi(),Y=Bb(),{labelId:te,controlId:O,registerControlId:_,getDescriptionProps:Z}=ki(),z=kJ(),J=z?.allValues===void 0?void 0:z.parent,ne=J!==void 0,W=A||Y.disabled||z?.disabled||u,fe=L??y,ie=R??fe,se=Or(),Se=Or();let ye=h||O;ne&&(S?ye=Se:ie!==void 0?ye=`${J.id}-${ie}`:ye||=Se);let xe={};ne&&(S?xe=J.getParentProps():ie!==void 0&&(xe=J.getChildProps(ie)));const{checked:ve=i,indeterminate:Re=p,onCheckedChange:De,...Me}=xe,Ne=z?.value,ge=w.useRef(null),we=Jn(()=>Symbol()),je=w.useRef(!1),{getButtonProps:Ve,buttonRef:Ue}=Fo({disabled:W,native:N}),me=z?.validation??V,[re,le]=Do({controlled:ie!==void 0&&Ne!==void 0&&!S?Ne.includes(ie):ve,default:l,name:"Checkbox",state:"checked"}),$=ne?!!ve:re,Q=ne&&Re||p;ze(()=>{_!==fn&&(je.current=!0,_(we.current,ye))},[ye,_,we]),w.useEffect(()=>{const Fe=we.current;return()=>{!je.current||_===fn||(je.current=!1,_(Fe,void 0))}},[_,we]),Yu(ge,se,re,void 0,!z&&!W,y);const de=w.useRef(null),Oe=me.registerInput,_e=z?ie:void 0,Ge=w.useCallback(Fe=>Oe(Fe,{controlRef:ge,value:_e}),[Oe,_e]),dt=Ui(g,de,S?void 0:Ge),rt=x2(c,te,de,!N,ye??void 0);ze(()=>{de.current&&(de.current.indeterminate=Q,re&&U(!0))},[re,Q,U]),Es(re,()=>{z||(P(fe),U(re),D(re!==F.initialValue),me.change(re))});const at=bi({checked:re,disabled:W,form:m,name:S?void 0:fe,id:N?void 0:ye??void 0,required:C,ref:dt,style:fe?Vu:Bu,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Fe){if(Fe.nativeEvent.defaultPrevented)return;if(k){Fe.preventDefault();return}const pt=Fe.currentTarget.checked,Et=Xe(On,Fe.nativeEvent);if(b?.(pt,Et),!Et.isCanceled&&(De?.(pt,Et),!Et.isCanceled&&(le(pt),ie!==void 0&&z!==void 0&&!S&&!ne))){const St=pt?[...z.value,ie]:z.value.filter(tt=>tt!==ie);z.setValue(St,Et)}},onClick(Fe){Fe.stopPropagation()},onFocus(){ge.current?.focus()}},R!==void 0?{value:(z?re&&R:R)||""}:wn,Z,Fe=>me.getValidationProps(W,Fe));w.useEffect(()=>{if(!J||ie===void 0)return;const Fe=J.disabledStatesRef.current;return Fe.set(ie,W),()=>{Fe.delete(ie)}},[J,W,ie]);const Nt=w.useMemo(()=>({...G,checked:$,disabled:W,readOnly:k,required:C,indeterminate:Q}),[G,$,W,k,C,Q]),Je=cO(Nt),Pt=jt("span",t,{state:Nt,ref:[Ue,ge,n],props:[{id:N?ye??void 0:se,role:"checkbox","aria-checked":Q?"mixed":$,"aria-readonly":k||void 0,"aria-required":C||void 0,"aria-labelledby":rt,[CJ]:S?"":void 0,onFocus(){W||q(!0)},onBlur(){const Fe=de.current;Fe&&(K(!0),q(!1),B==="onBlur"&&me.commit(z?Ne:Fe.checked))},onKeyDown(Fe){if(Fe.key!=="Enter"||(Fe.preventBaseUIHandler(),Fe.defaultPrevented))return;const pt=de.current?.form??null,Et=Fe.currentTarget,St=Fe.nativeEvent,tt=Fe.preventDefault,ht=St.preventDefault;let et=!1;Fe.preventDefault=()=>{et=!0,tt.call(Fe)},St.preventDefault=()=>{et=!0,ht.call(St)},ht.call(St),gn(Et).queueMicrotask(()=>{Fe.preventDefault=tt,St.preventDefault=ht,et||wJ(pt)?.click()})},onClick(Fe){if(k||W)return;Fe.preventDefault();const pt=de.current;pt&&fu(pt,Fe)}},M,Me,Ve,Z,Fe=>me.getValidationProps(W,Fe)],stateAttributesMapping:Je});return d.jsxs(uO.Provider,{value:Nt,children:[Pt,!re&&!z&&fe&&!S&&T!==void 0&&d.jsx("input",{type:"hidden",form:m,name:fe,value:T,disabled:W}),d.jsx("input",{...at,suppressHydrationWarning:!0})]})}),RJ=w.forwardRef(function(t,n){const{render:i,className:s,style:l,keepMounted:c=!1,...u}=t,m=EJ(),h=m.checked||m.indeterminate,{mounted:p,transitionStatus:g,setMounted:y}=Al(h),b=w.useRef(null),S={...m,transitionStatus:g};Zi({open:h,ref:b,onComplete(){h||y(!1)}});const E={...cO(m),...Fs},C=c||p,T=jt("span",t,{ref:[n,b],state:S,stateAttributesMapping:E,props:u});return C?T:null});function jJ({className:e,...t}){return d.jsx(TJ,{className:Te("flex size-4 shrink-0 cursor-pointer items-center justify-center rounded border border-border","bg-background transition-colors data-[checked]:border-primary data-[checked]:bg-primary","disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(RJ,{className:"flex text-primary-foreground",children:d.jsx(Li,{className:"size-3",strokeWidth:3})})})}function NJ(e){const t=e.lastIndexOf("/");return t===-1?{directory:"",name:e}:{directory:e.slice(0,t+1),name:e.slice(t+1)}}function OJ({directory:e}){const t=e.split("/").slice(0,-1);return d.jsx(d.Fragment,{children:t.map((n,i)=>d.jsxs(w.Fragment,{children:[n,"/",d.jsx("wbr",{})]},`${i}-${n}`))})}function La({path:e,emphasizeName:t=!0,className:n}){const{directory:i,name:s}=NJ(e);return d.jsxs("span",{"data-selectable":!0,className:Te("break-words",n),children:[i!==""&&d.jsx("span",{className:t?"text-muted-foreground":void 0,children:d.jsx(OJ,{directory:i})}),d.jsx("span",{className:t?"font-medium text-foreground":void 0,children:s})]})}function Rv({filePath:e,side:t,line:n,startLine:i=null,lines:s,clipped:l=!1,state:c="anchored",historical:u=!1,capturedSha:m=null,onOpen:h,openLabel:p="Files changed",className:g}){const y=i!==null&&n!==null&&i<n?`${i}–${n}`:n,b=i!==null&&n!==null&&i<n?"lines":"line",S=n===null?null:c==="outdated"?`was ${b} ${y}`:t==="base"?`removed ${b} ${y}`:`${b} ${y}`;return d.jsxs("div",{className:Te("overflow-hidden rounded-md border border-border bg-muted/20",g),children:[d.jsxs("button",{type:"button",onClick:h,disabled:!h,title:h?`Open ${e} in ${p}`:e,className:Te("flex w-full items-center gap-2 px-3 py-2 text-left",h&&"transition-colors hover:bg-muted/60"),children:[d.jsx(WC,{className:"size-4 shrink-0 text-muted-foreground"}),d.jsx(La,{path:e,className:"min-w-0 flex-1 font-mono text-xs"}),S&&d.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:S}),c==="moved"&&d.jsx(tn,{variant:"warning",title:"The code this comment was left on has shifted to a different line since it was written.",children:"moved"}),c==="outdated"&&d.jsx(tn,{variant:"warning",title:"The line this comment was left on is not in the diff any more - it was changed, or it was never part of the diff.",children:"outdated"}),h&&d.jsx(_o,{className:"size-4 shrink-0 text-muted-foreground"})]}),s.length>0&&d.jsx("div",{className:"overflow-x-auto border-t border-border bg-card",children:d.jsxs("div",{className:"min-w-max font-mono text-xs leading-5",children:[l&&d.jsxs("div",{className:"grid grid-cols-[3rem_1fr] text-muted-foreground",children:[d.jsx("span",{className:"select-none border-r border-border px-2 text-right",children:"…"}),d.jsx("span",{className:"px-3"})]}),s.map((k,E)=>{const C=t==="base"?k.oldNumber:k.newNumber,T=E===s.length-1;return d.jsxs("div",{className:Te("grid grid-cols-[3rem_1fr]",k.type==="insert"&&"bg-success/10",k.type==="delete"&&"bg-destructive/10",T&&"bg-warning/10 font-medium"),children:[d.jsx("span",{className:"select-none border-r border-border px-2 text-right tabular-nums text-muted-foreground/70",children:C??""}),d.jsxs("span",{"data-selectable":!0,className:Te("whitespace-pre px-3",k.type==="insert"&&"text-success",k.type==="delete"&&"text-destructive"),children:[d.jsx("span",{"aria-hidden":!0,className:"select-none opacity-60",children:k.type==="insert"?"+":k.type==="delete"?"-":" "}),k.content]})]},E)})]})}),u&&s.length>0&&d.jsxs("p",{className:"border-t border-border px-3 py-1.5 text-xs text-muted-foreground",children:["The code as it was when this comment was written",m?`, at ${m.slice(0,7)}`:"",". It has changed since."]})]})}function AJ(e){const t=e.status==="deleted";return{base:e.status==="added"||e.isUntracked?null:e.oldPath??e.path,head:t?null:e.path}}const MJ={backgroundImage:"repeating-conic-gradient(var(--muted) 0% 25%, var(--card) 0% 50%)",backgroundSize:"16px 16px"},wC={base:"Before",head:"After"};function zJ({file:e,reviewId:t,changes:n}){const i=AJ(e),s=i.base!==null&&i.head!==null;return d.jsxs("div",{className:Te("grid gap-3 p-3",s&&"md:grid-cols-2"),children:[i.base!==null&&d.jsx(Vy,{reviewId:t,path:i.base,side:"base",changes:n,renamedFrom:s&&i.base!==i.head?i.base:null}),i.head!==null&&d.jsx(Vy,{reviewId:t,path:i.head,side:"head",changes:n,renamedFrom:null})]})}function Vy({reviewId:e,path:t,side:n,changes:i,renamedFrom:s}){const{image:l,error:c,isLoading:u}=f7(e,t,n,i),[m,h]=w.useState(null),[p,g]=w.useState(!1),y=p?"This image could not be displayed.":l?.error??(c===void 0?null:Jt(c));return d.jsxs("figure",{className:"flex min-w-0 flex-col gap-2",children:[d.jsxs("figcaption",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5 text-xs",children:[d.jsx("span",{className:n==="base"?"text-destructive":"text-success",children:wC[n]}),s!==null&&d.jsx("span",{className:"min-w-0 truncate font-mono text-muted-foreground",title:s,children:s}),m!==null&&d.jsxs("span",{className:"font-mono text-muted-foreground tabular-nums",children:[m.width,"×",m.height]}),l?.dataUrl&&d.jsx("span",{className:"font-mono text-muted-foreground tabular-nums",children:N6(l.byteSize)})]}),y!==null?d.jsx("p",{className:"rounded-md border border-border bg-muted/40 px-3 py-6 text-center text-xs text-muted-foreground",children:y}):u||!l?.dataUrl?d.jsx(yt,{className:"h-40 w-full"}):d.jsx("div",{className:"flex items-center justify-center overflow-hidden rounded-md border border-border p-2",style:MJ,children:d.jsx("img",{src:l.dataUrl,alt:`${wC[n]}: ${t}`,className:"max-h-96 max-w-full object-contain",onLoad:b=>h({width:b.currentTarget.naturalWidth,height:b.currentTarget.naturalHeight}),onError:()=>g(!0)})})]})}const wh={state:"outdated",line:null,startLine:null};function IJ(e,t){return t==="base"?e.oldNumber:e.newNumber}function Lx(e){return e.endsWith("\r")?e.slice(0,-1):e}function fO(e,t){return e.find(n=>n.path===t||n.oldPath===t)}function dO(e,t){if(t.anchorText===null)return wh;const n=Math.max(t.line-(t.startLine??t.line),0),i=(m,h)=>({state:m,line:h,startLine:n===0?null:Math.max(h-n,1)}),s=Lx(t.anchorText),l=e.find(m=>m.number===t.line);if(l!==void 0&&Lx(l.content)===s)return i("anchored",t.line);let c=null,u=Number.POSITIVE_INFINITY;for(const m of e){if(Lx(m.content)!==s)continue;const h=Math.abs(m.number-t.line);h<u&&(c=m.number,u=h)}return c===null?wh:i("moved",c)}function hO(e,t){if(!e)return wh;const n=[];for(const i of e.hunks)for(const s of i.lines){const l=IJ(s,t.side);l!==null&&n.push({number:l,content:s.content})}return dO(n,t)}function DJ(e,t){return e===void 0||t.side==="base"?wh:dO(e.map((n,i)=>({number:i+1,content:n})),t)}function Am(e){return e.filePath!==null&&e.side!==null&&e.line!==null}const mO=3,_J=40;function PJ(e,t){return t==="base"?e.oldNumber:e.newNumber}function LJ(e,t,n,i=mO){if(!e)return null;for(const s of e.hunks){const l=s.lines.findIndex(u=>PJ(u,t)===n);if(l===-1)continue;const c=Math.max(0,l-i);return{lines:s.lines.slice(c,l+1),clipped:c>0}}return null}function FJ(e,t){const n=e===null?0:Math.max(t-e,0);return Math.min(n,_J)+mO}function HJ(e,t){return e.anchorText===null?[]:[{type:"context",content:e.anchorText,oldNumber:t==="base"?e.line:null,newNumber:t==="head"?e.line:null}]}function jv(e,t,n){if(!Am(e))return null;const i=t===null||t.line===null?null:LJ(n,e.side,t.line,FJ(t.startLine,t.line));if(i!==null&&t!==null)return{filePath:n?.path??e.filePath,side:e.side,line:t.line,startLine:t.startLine,lines:i.lines,clipped:i.clipped,state:t.state,historical:!1,capturedSha:e.anchorSha};const s=e.anchorSnapshot;return{filePath:n?.path??e.filePath,side:e.side,line:e.line,startLine:e.startLine,lines:s?.lines??HJ(e,e.side),clipped:s?.clipped??!1,state:t===null?"anchored":t.state,historical:t!==null,capturedSha:e.anchorSha}}function Sh(e,t){return t===0?e+1:e}function BJ(e,t){return Sh(e,t)+t-1}function VJ(e,t){const n=e[t];if(n===void 0)return!1;const i=t===0?void 0:e[t-1],s=i===void 0?0:BJ(i.newStart,i.newLines);return Sh(n.newStart,n.newLines)<=s+1}function UJ(e,t){const n=[];let i=1,s=0;for(const[l,c]of e.entries()){const u=Sh(c.oldStart,c.oldLines),m=Sh(c.newStart,c.newLines);m-1>=i&&n.push({start:i,end:m-1,delta:m-u,beforeHunk:l}),i=Math.max(i,m+c.newLines),s=m+c.newLines-(u+c.oldLines)}return n.push({start:i,end:null,delta:s,beforeHunk:e.length}),n}function SC(e,t,n){const i=e.end===null?n:Math.min(e.end,n??e.end);if(i===null||i<e.start)return[];if(t.size===0)return[{kind:"hidden",start:e.start,end:i}];const s=[];for(let l=e.start;l<=i;l+=1){const c=t.has(l)?"revealed":"hidden",u=s[s.length-1];u&&u.kind===c&&u.end===l-1?u.end=l:s.push({kind:c,start:l,end:l})}return s}const ZJ=1e3;function pO(e){return e.newNumber!==null?{side:"head",number:e.newNumber}:{side:"base",number:e.oldNumber}}function gO(e,t){if(t===""||e==="")return[];const n=e.toLowerCase(),i=n.length===e.length,s=i?n:e,l=i?t.toLowerCase():t;if(l==="")return[];const c=[];for(let u=s.indexOf(l);u!==-1;u=s.indexOf(l,u+l.length))c.push(u);return c}function qJ(e,t,n=ZJ){if(t==="")return{matches:[],fileCount:0,truncated:!1};const i=[];let s=0;for(const l of e){let c=!1;for(const u of l.hunks)for(const m of u.lines){const{side:h,number:p}=pO(m);if(p===null)continue;const g=gO(m.content,t);g.length>0&&!c&&(c=!0,s+=1);for(let y=0;y<g.length;y+=1){if(i.length>=n)return{matches:i,fileCount:s,truncated:!0};i.push({filePath:l.path,side:h,line:p,occurrence:y})}}}return{matches:i,fileCount:s,truncated:!1}}function xO(){const[e,t]=w.useState(null),[n,i]=w.useState(null),s=w.useCallback((c,u,m)=>{if(m&&e&&e.side===c){const h=e.startLine;t({side:c,startLine:Math.min(h,u),line:Math.max(h,u)});return}i({side:c,startLine:u,line:u})},[e]),l=w.useCallback((c,u)=>{i(m=>!m||m.side!==c||m.line===u?m:{...m,line:u})},[]);return w.useEffect(()=>{if(!n)return;const c=m=>{const p=document.elementFromPoint(m.clientX,m.clientY)?.closest("[data-diff-line]");if(!p)return;const g=p.getAttribute("data-diff-side"),y=Number(p.getAttribute("data-diff-line"));(g==="base"||g==="head")&&Number.isInteger(y)&&l(g,y)},u=()=>{const m=Math.min(n.startLine,n.line),h=Math.max(n.startLine,n.line);i(null),t(p=>p&&p.side===n.side&&p.startLine===m&&p.line===h?null:{side:n.side,startLine:m,line:h})};return window.addEventListener("pointermove",c),window.addEventListener("pointerup",u),window.addEventListener("pointercancel",u),()=>{window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",u)}},[n,l]),{composingOn:e,setComposingOn:t,startSelection:s,dragOver:l,selection:n?{side:n.side,startLine:Math.min(n.startLine,n.line),line:Math.max(n.startLine,n.line)}:e,isDragging:n!==null}}const GJ={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"};function yO(e){const t=e.slice(e.lastIndexOf("/")+1),n=t.lastIndexOf(".");return n<=0?null:GJ[t.slice(n+1).toLowerCase()]??null}const YJ=600,ru=20,bO=2e4,KJ=[],XJ={added:AI,deleted:NI,renamed:CS,copied:CS,modified:yu,changed:yu},JJ={added:"text-success",deleted:"text-destructive",renamed:"text-muted-foreground",copied:"text-muted-foreground",modified:"text-muted-foreground",changed:"text-muted-foreground"};function vO({status:e,className:t}){const n=XJ[e];return d.jsx(n,{className:Te("size-4 shrink-0",JJ[e],t)})}function wO({additions:e,deletions:t}){return d.jsxs("span",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs tabular-nums",children:[d.jsxs("span",{className:"text-success",children:["+",e]}),d.jsxs("span",{className:"text-destructive",children:["-",t]})]})}function WJ(e){return e.isBinary||e.truncated||e.hunks.length===0||e.status==="deleted"||e.status==="added"?!1:!e.isUntracked}function $J({file:e,comments:t,source:n,focus:i,marked:s,reviewed:l,search:c}){const u=e.hunks.reduce((se,Se)=>se+Se.lines.length,0),[m,h]=w.useState(null),[p,g]=w.useState(()=>new Set),{composingOn:y,setComposingOn:b,startSelection:S,dragOver:k,selection:E,isDragging:C}=xO(),T=l?.isReviewed??!1,R=c?.active!=null||(m??(i!==void 0||!T&&u<=YJ)),N=h,I=w.useRef(T);w.useEffect(()=>{T!==I.current&&(I.current=T,h(T?!1:null))},[T]);const M=n!==void 0&&WJ(e),P=Yj(M?n.reviewId:null,e.path,n?.changes??"all"),A=w.useCallback((se,Se)=>{P.load(),g(ye=>{const xe=new Set(ye);for(let ve=se;ve<=Se;ve+=1)xe.add(ve);return xe})},[P]),L=t?.threads??KJ,D=w.useMemo(()=>{const se=new Map;for(const Se of L){if(Se.anchor.line===null||Se.side===null)continue;const ye=`${Se.side}:${Se.anchor.line}`,xe=se.get(ye);xe?xe.push(Se):se.set(ye,[Se])}return se},[L]),U=w.useMemo(()=>M?UJ(e.hunks):[],[M,e.hunks]),q=w.useMemo(()=>new Map(U.map(se=>[se.beforeHunk,se])),[U]),K=q.get(e.hunks.length),G=w.useMemo(()=>{const se=new Set;for(const Se of L){const{line:ye,startLine:xe}=Se.anchor;if(!(ye===null||xe===null||Se.side===null))for(let ve=xe;ve<=ye;ve+=1)se.add(`${Se.side}:${ve}`)}return se},[L]),B={placed:D,comments:t,composingOn:y,onCompose:b,onSelectStart:S,onSelectOver:k,selection:E,covered:G,marked:s??null,filePath:e.path,search:c??null},F=L.filter(se=>se.anchor.line===null),V=L.filter(se=>se.resolvedAt===null).length,Y=e.hunks.length>0,te=n!==void 0&&e.isBinary&&yO(e.path)!==null,O=Y||te,_=P.content&&!P.content.isBinary?P.content.lines.length:null,Z={reveal:A,loading:P.requested&&P.isLoading,error:P.content?.error??(P.error===void 0?null:Jt(P.error))};function z(){for(const se of U)A(se.start,se.end??se.start+bO);N(!0)}const J=R&&F.length>0&&t!==void 0,ne=R&&Y,W=R&&te&&n!==void 0,fe=R&&!Y&&e.isBinary&&!te,ie=J||ne||W||fe;return d.jsxs(wt,{className:"overflow-clip",children:[d.jsxs("div",{className:Te("sticky top-[var(--diff-sticky-top,0px)] z-10 flex w-full flex-wrap items-center gap-1 bg-card pr-2",ie&&"border-b border-border"),children:[d.jsxs("div",{className:"flex min-w-0 grow basis-64 items-center gap-1",children:[d.jsxs("button",{type:"button",onClick:()=>N(!R),disabled:!O,"aria-expanded":R,className:Te("flex min-w-0 items-center gap-2 px-3 py-2 text-left transition-colors",O?"hover:bg-muted/50":"cursor-default"),children:[O?R?d.jsx(Fa,{className:"size-4 shrink-0 text-muted-foreground"}):d.jsx(_o,{className:"size-4 shrink-0 text-muted-foreground"}):d.jsx("span",{className:"size-4 shrink-0"}),d.jsx(vO,{status:e.status}),d.jsxs("span",{"data-selectable":!0,className:"min-w-0 font-mono text-xs",children:[e.oldPath&&e.oldPath!==e.path&&d.jsxs("span",{className:"text-muted-foreground",children:[d.jsx(La,{path:e.oldPath,emphasizeName:!1})," →"," "]}),d.jsx(La,{path:e.path})]})]}),d.jsx(SO,{path:e.path})]}),d.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2 py-1 pl-2 lg:flex-nowrap lg:shrink-0",children:[L.length>0&&d.jsxs(tn,{variant:V>0?"default":"outline",title:V>0?`${V} unresolved of ${L.length}`:"All comments on this file are resolved",children:[d.jsx(zu,{}),V>0?V:L.length]}),e.isUntracked&&d.jsxs(tn,{variant:"warning",title:"This file is not tracked by git yet",children:[d.jsx(As,{}),"untracked"]}),!e.isUntracked&&e.hasUncommittedChanges&&d.jsxs(tn,{variant:"warning",title:"Part of this change is not committed",children:[d.jsx(As,{}),"uncommitted"]}),e.isBinary&&d.jsx(tn,{variant:"outline",children:"binary"}),e.truncated&&d.jsx(tn,{variant:"outline",children:"clipped"}),!e.isBinary&&d.jsx(wO,{additions:e.additions,deletions:e.deletions}),l&&d.jsxs("label",{className:"flex shrink-0 cursor-pointer select-none items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",title:l.hasChangedSince?"You marked this file reviewed, and it has changed since. Read it again to mark it.":l.isReviewed?"Marked as reviewed. The mark clears itself if the file changes.":"Mark this file as reviewed. The mark clears itself if the file changes.",children:[d.jsx(jJ,{checked:T,onCheckedChange:l.onChange}),l.hasChangedSince?d.jsx("span",{className:"text-warning",children:"Changed since reviewed"}):"Reviewed"]}),d.jsx(QJ,{file:e,source:n,canExpand:U.length>0,onExpandAll:z})]})]}),J&&t&&d.jsxs("div",{className:"flex flex-col gap-3 bg-muted/20 p-3",children:[d.jsxs("p",{className:"text-xs text-muted-foreground",children:[F.length===1?"This comment is":"These comments are"," on code that is not in the diff any more."]}),F.map(se=>{const Se=jv(se,se.anchor,e),ye=Se!==null&&Se.lines.length>0;return d.jsxs("div",{className:"flex flex-col gap-2",children:[ye&&d.jsx(Rv,{...Se}),d.jsx(ef,{thread:se,mutations:t.mutations,anchorState:se.anchor.state,location:!ye&&se.line!==null?d.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:["was line ",se.line]}):null})]},se.id)})]}),ne&&d.jsxs("div",{className:Te(J&&"border-t border-border"),children:[d.jsx("div",{className:Te("@container overflow-x-auto",C&&"select-none"),children:d.jsxs("div",{className:"min-w-max font-mono text-xs leading-5",children:[e.hunks.map((se,Se)=>{const ye=q.get(Se),xe=ye?SC(ye,p,_):[],ve=ye===void 0&&!VJ(e.hunks,Se);return d.jsxs(w.Fragment,{children:[ye&&d.jsx(kC,{gap:ye,segments:xe,lines:P.content?.lines??null,controls:Z,header:se.header,rows:B}),d.jsx(eW,{hunk:se,showHeader:ve,...B})]},`${se.header}-${Se}`)}),K&&d.jsx(kC,{gap:K,segments:SC(K,p,_),lines:P.content?.lines??null,controls:Z,header:null,rows:B})]})}),e.truncated&&d.jsx("p",{className:"border-t border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground",children:"This file is too large to show in full. Open it in your editor to read the rest."})]}),W&&n&&d.jsx("div",{className:Te((J||ne)&&"border-t border-border"),children:d.jsx(zJ,{file:e,reviewId:n.reviewId,changes:n.changes})}),fe&&d.jsx("p",{className:Te("px-3 py-3 text-xs text-muted-foreground",J&&"border-t border-border"),children:"Binary file — no text diff to show."})]})}function SO({path:e}){const[t,n]=w.useState(!1);async function i(){await navigator.clipboard.writeText(e),n(!0),window.setTimeout(()=>n(!1),1500)}return d.jsx(kh,{label:t?"Path copied":"Copy path",onClick:()=>{i()},icon:t?d.jsx(Li,{className:"text-success"}):d.jsx(Xd,{})})}function QJ({file:e,source:t,canExpand:n,onExpandAll:i}){const s=t?.onOpenInEditor!==void 0&&e.status!=="deleted";return d.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[n&&d.jsx(kh,{label:"Expand all lines in this file",onClick:i,icon:d.jsx(rT,{})}),s&&d.jsx(kh,{label:t?.editorLabel?`Open in ${t.editorLabel}`:"Open in your editor",onClick:()=>t?.onOpenInEditor?.(e.path,1),icon:d.jsx(eT,{})})]})}function kh({label:e,onClick:t,icon:n}){return d.jsx(Ln,{label:e,children:d.jsx("button",{type:"button",onClick:t,"aria-label":e,className:Te("flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors","hover:bg-muted hover:text-foreground","[&_svg]:size-3.5 [&_svg]:shrink-0"),children:n})})}function kC({gap:e,segments:t,lines:n,controls:i,header:s,rows:l}){return t.length===0?d.jsx(EC,{start:e.start,end:null,hasAbove:!0,hasBelow:!1,header:s,controls:i}):d.jsx(d.Fragment,{children:t.map((c,u)=>{if(c.kind==="hidden")return d.jsx(EC,{start:c.start,end:c.end,hasAbove:u>0||e.beforeHunk>0,hasBelow:u<t.length-1||e.end!==null,header:u===t.length-1?s:null,controls:i},`hidden-${c.start}`);const m=[];for(let h=c.start;h<=c.end;h+=1){const p=n?.[h-1];p!==void 0&&m.push({type:"context",content:p,oldNumber:h-e.delta,newNumber:h})}return d.jsx(w.Fragment,{children:m.map(h=>d.jsx(Nv,{line:h,...l},`context-${h.newNumber}`))},`context-${c.start}`)})})}function EC({start:e,end:t,hasAbove:n,hasBelow:i,header:s,controls:l}){const c=t===null?null:t-e+1,u=c===null||c>ru;return d.jsxs("div",{className:"grid grid-cols-[3rem_3rem_1fr] bg-muted/60 text-muted-foreground",children:[d.jsxs("div",{className:"col-span-2 flex items-center justify-center gap-0.5 border-r border-border",children:[n&&u&&d.jsx(Fx,{label:`Show ${ru} more lines`,disabled:l.loading,onClick:()=>l.reveal(e,e+ru-1),icon:d.jsx(iI,{})}),i&&u&&t!==null&&d.jsx(Fx,{label:`Show ${ru} more lines`,disabled:l.loading,onClick:()=>l.reveal(t-ru+1,t),icon:d.jsx(lI,{})}),d.jsx(Fx,{label:c===null?"Show the rest of the file":`Show all ${c} hidden lines`,disabled:l.loading,onClick:()=>l.reveal(e,t??e+bO),icon:d.jsx(rT,{})})]}),d.jsxs("span",{className:"flex items-center gap-3 whitespace-pre px-3 py-0.5",children:[s,l.error!==null?d.jsx("span",{className:"font-sans text-[0.6875rem] text-destructive",children:l.error}):d.jsx("span",{className:"font-sans text-[0.6875rem] opacity-70",children:l.loading?"reading the file…":c===null?"more of this file":`${c} hidden ${c===1?"line":"lines"}`})]})]})}function Fx({label:e,onClick:t,icon:n,disabled:i}){return d.jsx(Ln,{label:e,children:d.jsx("button",{type:"button",onClick:t,disabled:i,"aria-label":e,className:Te("flex size-5 items-center justify-center rounded transition-colors","hover:bg-primary hover:text-primary-foreground disabled:opacity-50","[&_svg]:size-3 [&_svg]:shrink-0"),children:n})})}function eW({hunk:e,showHeader:t,...n}){return d.jsxs(d.Fragment,{children:[t&&d.jsxs("div",{className:"grid grid-cols-[3rem_3rem_1fr] bg-muted/60 text-muted-foreground",children:[d.jsx("span",{className:"col-span-2 border-r border-border"}),d.jsx("span",{className:"whitespace-pre px-3 py-0.5",children:e.header})]}),e.lines.map((i,s)=>d.jsx(Nv,{line:i,...n},s))]})}function Nv({line:e,placed:t,comments:n,composingOn:i,onCompose:s,onSelectStart:l,onSelectOver:c,selection:u,covered:m,marked:h,filePath:p,search:g,oneGutter:y=!1}){const{side:b,number:S}=pO(e),k=S===null?[]:t.get(`${b}:${S}`)??[],E=S!==null&&i?.side===b&&i.line===S,C=S!==null&&u?.side===b&&S>=u.startLine&&S<=u.line,T=S!==null&&h?.side===b&&h.line===S,R=S!==null&&m.has(`${b}:${S}`),N=i&&i.startLine<i.line?`lines ${i.startLine}–${i.line}`:`line ${S??""}`;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{id:S===null?void 0:s2(p,b,S),"data-diff-side":S===null?void 0:b,"data-diff-line":S===null?void 0:S,className:Te("group grid",y?"grid-cols-[3rem_1fr]":"grid-cols-[3rem_3rem_1fr]",T?"bg-warning/25":C?"bg-primary/15":e.type==="insert"?"bg-success/10":e.type==="delete"?"bg-destructive/10":void 0,R&&"shadow-[inset_3px_0_0_0_var(--color-primary)]"),children:[!y&&d.jsx(nW,{value:e.oldNumber}),d.jsxs("div",{className:"relative border-r border-border",onPointerEnter:()=>{S!==null&&c(b,S)},children:[d.jsx("span",{className:"block select-none px-2 text-right tabular-nums text-muted-foreground/70",children:e.newNumber??""}),n&&S!==null&&d.jsx("button",{type:"button",onPointerDown:I=>{I.preventDefault(),l(b,S,I.shiftKey)},onClick:I=>{I.detail===0&&l(b,S,I.shiftKey)},title:`Comment on ${b==="head"?"line":"removed line"} ${S} — drag or shift-click for several`,"aria-label":`Comment on line ${S} of ${p}`,className:Te("absolute left-0.5 top-1/2 flex -translate-y-1/2 items-center justify-center rounded bg-primary p-0.5 text-primary-foreground shadow-sm","touch-none","focus-visible:flex",E||C?null:["[@media(hover:hover)]:hidden [@media(hover:hover)]:group-hover:flex","[@media(hover:none)]:opacity-70"]),children:d.jsx(Bi,{className:"size-3"})})]}),d.jsxs("span",{"data-selectable":!0,onPointerEnter:()=>{S!==null&&c(b,S)},className:Te("whitespace-pre px-3",e.type==="insert"&&"text-success",e.type==="delete"&&"text-destructive"),children:[d.jsx("span",{"aria-hidden":!0,className:"select-none opacity-60",children:e.type==="insert"?"+":e.type==="delete"?"-":" "}),d.jsx(tW,{content:e.content,query:g?.query??null,activeOccurrence:S!==null&&g?.active!=null&&g.active.side===b&&g.active.line===S?g.active.occurrence:null})]})]}),(k.length>0||E)&&n&&d.jsxs("div",{className:"sticky left-0 flex w-[min(48rem,100cqi)] flex-col gap-2 border-y border-border bg-muted/20 p-3 font-sans text-sm",children:[k.map(I=>d.jsx(ef,{thread:I,mutations:n.mutations,anchorState:I.anchor.state,location:I.anchor.startLine!==null&&I.anchor.line!==null?d.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:["lines ",I.anchor.startLine,"–",I.anchor.line]}):null},I.id)),E&&S!==null&&i&&d.jsx("div",{className:"rounded-lg border border-border bg-card p-3",children:d.jsx(Om,{autoFocus:!0,placeholder:`Comment on ${N}`,onCancel:()=>s(null),onSubmit:async I=>{await n.mutations.createThread({reviewId:n.reviewId,body:I,filePath:p,side:b,line:S,changes:n.changes,...i.startLine<S?{startLine:i.startLine}:{}}),s(null)}})})]})]})}function tW({content:e,query:t,activeOccurrence:n}){const i=t===null?[]:gO(e,t);if(t===null||i.length===0)return d.jsx(d.Fragment,{children:e});const s=[];let l=0;for(const[c,u]of i.entries()){u>l&&s.push(e.slice(l,u));const m=u+t.length,h=c===n;s.push(d.jsx("mark",{id:h?l2:void 0,className:Te("rounded-[2px] text-inherit",h?"bg-warning/60 shadow-[0_0_0_1px_var(--color-warning)]":"bg-warning/25"),children:e.slice(u,m)},u)),l=m}return l<e.length&&s.push(e.slice(l)),d.jsx(d.Fragment,{children:s})}function nW({value:e}){return d.jsx("span",{className:"select-none border-r border-border px-2 text-right tabular-nums text-muted-foreground/70",children:e??""})}const Hx=5e3;function rW({reviewId:e,path:t,changes:n,threads:i,comments:s,isChanged:l,marked:c,editorLabel:u,onOpenInEditor:m}){const h=Yj(e,t,n),p=xO(),{load:g}=h;w.useEffect(()=>g(),[g]);const y=h.content,b=y?.lines,S=w.useMemo(()=>i.map(A=>({...A,anchor:DJ(b,{side:A.side??"head",line:A.line??0,startLine:A.startLine,anchorText:A.anchorText})})),[i,b,t]),k=w.useMemo(()=>{const A=new Map;for(const L of S){if(L.anchor.line===null||L.side===null)continue;const D=`${L.side}:${L.anchor.line}`,U=A.get(D);U?U.push(L):A.set(D,[L])}return A},[S]),E=w.useMemo(()=>{const A=new Set;for(const L of S){const{line:D,startLine:U}=L.anchor;if(!(D===null||U===null||L.side===null))for(let q=U;q<=D;q+=1)A.add(`${L.side}:${q}`)}return A},[S]),C=w.useMemo(()=>(b??[]).slice(0,Hx).map((A,L)=>({type:"context",content:A,oldNumber:null,newNumber:L+1})),[b]),T={placed:k,comments:{...s,threads:S},composingOn:p.composingOn,onCompose:p.setComposingOn,onSelectStart:p.startSelection,onSelectOver:p.dragOver,selection:p.selection,covered:E,marked:c??null,filePath:t,search:null,oneGutter:!0},R=S.filter(A=>A.anchor.line===null),N=S.filter(A=>A.resolvedAt===null).length,I=y?.error??(h.error===void 0?null:Jt(h.error)),M=(y?.isBinary??!1)&&yO(t)!==null,P=(b?.length??0)>Hx;return d.jsxs(wt,{className:"overflow-clip",children:[d.jsxs("div",{className:Te("sticky top-[var(--diff-sticky-top,0px)] z-10 flex w-full flex-wrap items-center gap-1","border-b border-border bg-card px-3 py-2"),children:[d.jsx("span",{"data-selectable":!0,className:"min-w-0 grow basis-64 font-mono text-xs",children:d.jsx(La,{path:t})}),d.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2 pl-2",children:[l&&d.jsx(tn,{variant:"outline",children:"In this diff"}),y?.source==="commit"&&d.jsx(tn,{variant:"outline",title:"Read from the head commit, not from a working tree.",children:"committed"}),S.length>0&&d.jsx(tn,{variant:N>0?"default":"outline",children:N>0?`${N} unresolved`:`${S.length} resolved`}),d.jsx(SO,{path:t}),m&&d.jsx(kh,{label:u?`Open in ${u}`:"Open in your editor",onClick:()=>m(t,1),icon:d.jsx(eT,{})})]})]}),R.length>0&&d.jsxs("div",{className:"flex flex-col gap-2 border-b border-border bg-muted/20 p-3",children:[d.jsxs("p",{className:"text-xs text-muted-foreground",children:[R.length===1?"A comment":`${R.length} comments`," on code that is no longer in this file."]}),R.map(A=>d.jsx(ef,{thread:A,mutations:s.mutations,anchorState:A.anchor.state,location:A.line===null?null:d.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:["was line ",A.line]})},A.id))]}),I!==null?d.jsxs("p",{className:"flex items-center gap-2 p-3 text-xs text-muted-foreground",children:[d.jsx(RI,{className:"size-4 shrink-0 text-warning"}),I]}):M?d.jsx("div",{className:"p-3",children:d.jsx(Vy,{reviewId:e,path:t,side:"head",changes:n,renamedFrom:null})}):y?.isBinary?d.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"This is a binary file. There is nothing to show and nothing to comment on."}):h.isLoading||y===void 0?d.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[d.jsx(yt,{className:"h-3 w-2/3"}),d.jsx(yt,{className:"h-3 w-1/2"}),d.jsx(yt,{className:"h-3 w-3/4"})]}):C.length===0?d.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"This file is empty."}):d.jsx("div",{className:Te("@container overflow-x-auto",p.isDragging&&"select-none"),children:d.jsx("div",{className:"min-w-max font-mono text-xs leading-5",children:C.map(A=>d.jsx(Nv,{line:A,...T},A.newNumber))})}),(P||y?.truncated===!0)&&d.jsx("p",{className:"border-t border-border px-3 py-2 text-xs text-muted-foreground",children:y?.truncated===!0?"This file is longer than GitWarren will read; the rest is not shown.":`Only the first ${Hx.toLocaleString()} lines are shown.`})]})}function kO(e){const t={kind:"directory",path:"",name:"",children:[]},n=new Map([["",t]]);for(const i of e){const s=i.split("/"),l=s.pop();let c=t;for(const u of s){const m=c.path?`${c.path}/${u}`:u,h=n.get(m);if(h)c=h;else{const p={kind:"directory",path:m,name:u,children:[]};c.children.push(p),n.set(m,p),c=p}}c.children.push({kind:"file",path:i,name:l})}return t.children.map(i=>i.kind==="directory"?EO(i):i)}function EO(e){const t=e.children.map(i=>i.kind==="directory"?EO(i):i),n=t.length===1?t[0]:void 0;return n?.kind==="directory"?{kind:"directory",path:n.path,name:e.name?`${e.name}/${n.name}`:n.name,children:n.children}:{...e,children:t}}const iW=200;function oW({paths:e,selectedPath:t,onSelect:n,changedPaths:i,unresolvedByFile:s}){const[l,c]=w.useState(""),u=w.useMemo(()=>kO(e),[e]),[m,h]=w.useState(()=>new Map),p=w.useMemo(()=>{const k=new Set;if(t===null)return k;const E=t.split("/");E.pop();let C="";for(const T of E)C=C?`${C}/${T}`:T,k.add(C);return k},[t]),g=w.useCallback(k=>m.get(k)??p.has(k),[m,p]),y=w.useCallback((k,E)=>h(C=>new Map(C).set(k,E)),[]),b=w.useMemo(()=>{const k=l.trim();if(k==="")return null;const E=[];for(const C of e){const T=uh(k,C);T!==null&&E.push({path:C,score:T.score})}return E.sort((C,T)=>T.score-C.score||C.path.localeCompare(T.path)),{shown:E.slice(0,iW).map(C=>C.path),total:E.length}},[e,l]),S={selectedPath:t,onSelect:n,changedPaths:i,unresolvedByFile:s};return d.jsxs("div",{className:"flex min-h-0 flex-col",children:[d.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-1.5 border-b border-border bg-card px-2 py-1.5",children:[d.jsx(Rl,{className:"size-3.5 shrink-0 text-muted-foreground"}),d.jsx("input",{type:"search",value:l,onChange:k=>c(k.target.value),placeholder:"Filter files","aria-label":"Filter files in this repository",className:"min-w-0 flex-1 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),l!==""&&d.jsx("button",{type:"button",onClick:()=>c(""),"aria-label":"Clear the filter",className:"shrink-0 rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground",children:d.jsx(Du,{className:"size-3.5"})})]}),b===null?d.jsx("nav",{"aria-label":"Repository files",className:"flex flex-col gap-px py-1 text-xs",children:u.map(k=>d.jsx(CO,{node:k,depth:0,isOpen:g,onToggle:y,...S},k.path))}):b.shown.length===0?d.jsx("p",{className:"px-3 py-4 text-xs text-muted-foreground",children:"No file matches that."}):d.jsxs("nav",{"aria-label":"Matching files",className:"flex flex-col gap-px py-1 text-xs",children:[b.shown.map(k=>d.jsx(TO,{path:k,label:k,...S},k)),b.total>b.shown.length&&d.jsxs("p",{className:"px-3 py-2 text-[0.6875rem] text-muted-foreground",children:[b.total-b.shown.length," more match. Keep typing to narrow it."]})]})]})}function CO({node:e,depth:t,isOpen:n,onToggle:i,...s}){const l={paddingLeft:`${Math.min(t,6)*.75+.25}rem`};if(e.kind==="file")return d.jsx(TO,{path:e.path,label:e.name,indent:l,...s});const c=n(e.path);return d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:()=>i(e.path,!c),"aria-expanded":c,style:l,className:"flex w-full items-start gap-1 rounded py-1 pr-1 text-left text-muted-foreground hover:bg-muted",children:[c?d.jsx(Fa,{className:"mt-0.5 size-3 shrink-0"}):d.jsx(_o,{className:"mt-0.5 size-3 shrink-0"}),d.jsx(La,{path:e.name,emphasizeName:!1,className:"min-w-0"})]}),c&&e.children.map(u=>d.jsx(CO,{node:u,depth:t+1,isOpen:n,onToggle:i,...s},u.path))]})}function TO({path:e,label:t,indent:n,selectedPath:i,onSelect:s,changedPaths:l,unresolvedByFile:c}){const u=c.get(e)??0,m=e===i,h=l.has(e);return d.jsxs("button",{type:"button",onClick:()=>s(e),style:n??{paddingLeft:"0.25rem"},"aria-current":m?"true":void 0,className:Te("flex w-full items-start gap-1.5 rounded py-1 pr-1 text-left transition-colors",m?"bg-accent text-accent-foreground":"hover:bg-muted"),title:h?`${e} - changed in this review`:e,children:[d.jsx(WC,{className:Te("mt-0.5 size-3 shrink-0",h?"text-primary":"text-muted-foreground/60")}),d.jsx("span",{className:Te("min-w-0 flex-1 break-all font-mono text-[0.6875rem]",h&&!m&&"text-foreground"),children:t}),u>0&&d.jsx("span",{className:"shrink-0 rounded-full bg-primary px-1 text-[0.5625rem] font-semibold leading-4 text-primary-foreground",title:`${u} unresolved`,children:u})]})}function sW({review:e,focus:t}){const n=Wn(),i=$n(),s=Ho(),l=eN(),[c,u]=eb("browse-tree",!0),[m]=Qy("editor",null),h=Sm,p=u7(e.id,h),g=km(e.id,h),{threads:y}=Em(e.id),b=lv(),S=Kj(),k=t?.filePath??null,E=w.useCallback(L=>{Cu({name:"review",reviewId:e.id,tab:"browse",focus:{filePath:L},...s})},[e.id,s]),C=w.useMemo(()=>new Set((g.data?.files??[]).map(L=>L.path)),[g.data?.files]),T=w.useMemo(()=>{const L=new Map;for(const D of y){if(!Am(D))continue;const U=L.get(D.filePath);U?U.push(D):L.set(D.filePath,[D])}return L},[y]),R=w.useMemo(()=>{const L=new Map;for(const[D,U]of T){const q=U.filter(K=>K.resolvedAt===null).length;q>0&&L.set(D,q)}return L},[T]),N=w.useMemo(()=>i===void 0||S===void 0?S:AC(S),[i,S]),I=w.useCallback((L,D)=>{n.reviews.openInEditor({id:e.id,path:L,changes:h,line:D,...m===null?{}:{editorId:m}}).catch(()=>{})},[n,e.id,h,m]),M=i!==void 0&&N!==void 0&&N.editors.length===0?void 0:I;if(p.isLoading&&p.data===void 0)return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsx(yt,{className:"h-8 w-48"}),d.jsx(yt,{className:"h-64 w-full"})]});if(p.error!==void 0)return d.jsxs(wt,{className:"flex items-start gap-3 border-destructive/40 p-4",children:[d.jsx(Hi,{className:"mt-0.5 size-5 shrink-0 text-destructive"}),d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("p",{className:"text-sm font-medium",children:so(p.error)?"That machine is not answering.":"The repository could not be listed."}),d.jsx("p",{className:"text-xs text-muted-foreground",children:Jt(p.error)})]})]});const P=p.data?.paths??[],A=l&&k===null||c;return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs(Ze,{variant:"outline",size:"sm",onClick:()=>u(!c),"aria-expanded":A,children:[A?d.jsx($x,{}):d.jsx(wD,{}),A?"Hide files":"Show files"]}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:[Nl(P.length,"file")," at ",d.jsx("span",{className:"font-mono",children:e.headRef}),p.data?.truncated===!0&&" (listing cut short)"]})]}),p.data?.error!==null&&p.data?.error!==void 0&&d.jsxs(wt,{className:"flex items-start gap-3 border-warning/40 p-3 text-xs",children:[d.jsx(Hi,{className:"mt-0.5 size-4 shrink-0 text-warning"}),d.jsx("p",{children:p.data.error})]}),d.jsxs("div",{className:"flex items-start gap-4",children:[A&&d.jsx("aside",{className:Te("rounded-lg border border-border bg-card/50",l?"w-full":"sticky top-2 max-h-[calc(100dvh-6rem)] w-56 shrink-0 overflow-y-auto xl:w-64 2xl:w-72"),children:d.jsx(oW,{paths:P,selectedPath:k,onSelect:E,changedPaths:C,unresolvedByFile:R})}),(!l||!A)&&d.jsx("div",{className:"min-w-0 flex-1",children:k===null?d.jsxs(wt,{className:"flex flex-col items-center gap-2 border-dashed px-6 py-12 text-center",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 text-muted-foreground",children:d.jsx(Xy,{className:"size-6"})}),d.jsx("h3",{className:"font-medium",children:"Pick a file"}),d.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:"Every file in the repository is here, not only the ones this branch changed. Open one to read it — and to comment on any line of it, in this review."})]}):d.jsx(rW,{reviewId:e.id,path:k,changes:h,threads:T.get(k)??[],comments:{reviewId:e.id,mutations:b,changes:h},isChanged:C.has(k),marked:t?.side!==void 0&&t.line!==void 0?{side:t.side,line:t.line}:void 0,editorLabel:N?.editors.find(L=>L.id===m)?.label??null,onOpenInEditor:M},k)})]}),l&&A&&k!==null&&d.jsxs(Ze,{variant:"outline",size:"sm",onClick:()=>u(!1),children:[d.jsx(hD,{}),"Back to ",k.slice(k.lastIndexOf("/")+1)]})]})}function RO({compare:e}){const t=e.base.error??e.head.error??e.error;return d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-destructive/40 px-6 py-10 text-center",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3 text-destructive",children:d.jsx(Hi,{className:"size-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium",children:"This comparison cannot be read right now"}),d.jsx("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:t}),d.jsx("p",{className:"mx-auto mt-2 max-w-md text-xs text-muted-foreground",children:"The review itself is untouched — edit it to point at refs that still exist."})]})]})}function jO({workingTree:e}){const t=[e.staged>0?`${e.staged} staged`:null,e.unstaged>0?`${e.unstaged} unstaged`:null,e.untracked>0?`${e.untracked} untracked`:null,e.conflicted>0?`${e.conflicted} conflicted`:null].filter(n=>n!==null);return d.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-warning/40 bg-warning/10 px-4 py-3",children:[d.jsx(As,{className:"mt-0.5 size-4 shrink-0 text-warning"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("p",{className:"text-sm font-medium text-warning",children:["Uncommitted changes — ",t.join(", ")]}),d.jsxs("p",{className:"mt-0.5 flex items-start gap-1.5 text-xs text-muted-foreground",children:[d.jsx(Ky,{className:"mt-0.5 size-3 shrink-0"}),d.jsx("span",{"data-selectable":!0,className:"min-w-0 break-words font-mono",children:d.jsx(Xn,{text:e.worktreePath})})]})]})]})}function NO({headRef:e}){return d.jsxs("p",{className:"rounded-lg border border-border bg-muted/40 px-4 py-3 text-xs text-muted-foreground",children:["No worktree currently has ",d.jsx("span",{className:"font-mono",children:e})," checked out, so this shows committed work only. Check the branch out — in the main repository or in a linked worktree — and any uncommitted changes will appear here."]})}function lW({review:e}){const{data:t,error:n,isLoading:i,isRefreshing:s,refresh:l}=Gj(e.id);if(i)return d.jsx(cW,{});if(n!==void 0&&!(t!==void 0&&so(n)))return d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-destructive/40 px-6 py-10 text-center",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3 text-destructive",children:d.jsx(Hi,{className:"size-6"})}),d.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:Jt(n)}),d.jsxs(Ze,{variant:"outline",onClick:()=>{l()},children:[d.jsx(sr,{}),"Try again"]})]});if(!t)return null;if(t.error!==null||t.base.error!==null||t.head.error!==null)return d.jsx(RO,{compare:t});const{commits:c,workingTree:u}=t,m=Xa(e);return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("p",{className:"text-sm text-muted-foreground",children:[Nl(c.length,"commit"),t.truncated&&" (showing the most recent)"]}),d.jsxs(Ze,{variant:"ghost",size:"sm",onClick:()=>{l()},title:"Re-read from disk",children:[d.jsx(sr,{className:s?"animate-spin":void 0}),"Refresh"]})]}),u?.isDirty&&d.jsx(jO,{workingTree:u}),t.headWorktree===null&&d.jsx(NO,{headRef:e.headRef}),c.length===0?d.jsxs(wt,{className:"flex flex-col items-center gap-2 border-dashed px-6 py-10 text-center",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 text-muted-foreground",children:d.jsx(Jy,{className:"size-6"})}),d.jsx("h3",{className:"font-medium",children:m?"Nothing committed here":"No commits yet"}),d.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:u?.isDirty?"Everything in this review is still uncommitted. The files changed tab has it.":m?`This review is ${e.headRef} against itself, so it holds only uncommitted work — and there is none right now.`:`${e.headRef} has nothing that ${e.baseRef} does not already have.`})]}):d.jsx("ul",{className:"flex flex-col gap-2",children:c.map(h=>d.jsx("li",{children:d.jsx(aW,{commit:h})},h.sha))})]})}function aW({commit:e}){return d.jsxs(wt,{className:"flex items-start gap-3 p-3",children:[d.jsx(Jy,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("p",{className:"truncate text-sm font-medium",title:e.subject,children:e.subject}),d.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[e.authorName," committed"," ",d.jsx("span",{title:om(e.committedAt),children:im(e.committedAt)})]})]}),d.jsx("code",{"data-selectable":!0,className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-xs",children:e.shortSha})]})}function cW(){return d.jsx("ul",{className:"flex flex-col gap-2","aria-busy":"true","aria-label":"Loading commits",children:[0,1,2].map(e=>d.jsx("li",{children:d.jsxs(wt,{className:"flex items-start gap-3 p-3",children:[d.jsx(yt,{className:"size-4 rounded-full"}),d.jsxs("div",{className:"flex-1 space-y-2",children:[d.jsx(yt,{className:"h-4 w-64"}),d.jsx(yt,{className:"h-3 w-40"})]}),d.jsx(yt,{className:"h-4 w-16"})]})},e))})}function uW(e,t){return e.map(i=>{if(!Am(i))return{thread:i,snippet:null,tab:null};const s=t===void 0?void 0:fO(t,i.filePath),l=t===void 0?null:hO(s,{filePath:i.filePath,side:i.side,line:i.line,startLine:i.startLine,anchorText:i.anchorText});return{thread:i,snippet:jv(i,l,s),tab:t===void 0?null:s===void 0?"browse":"files"}}).sort((i,s)=>i.thread.createdAt.localeCompare(s.thread.createdAt))}function fW({review:e,onEdit:t}){const n=Ho(),{threads:i,error:s,isLoading:l}=Em(e.id),c=lv(),{data:u,isLoading:m}=km(e.id,Sm),h=w.useMemo(()=>uW(i,u?.files),[i,u?.files]);return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsxs(wt,{className:"p-4",children:[d.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Opened"," ",d.jsx("span",{title:om(e.createdAt),children:im(e.createdAt)})]}),d.jsxs(Ze,{variant:"ghost",size:"sm",onClick:t,children:[d.jsx(Tl,{}),"Edit"]})]}),e.description?d.jsx(Tv,{body:e.description}):d.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No description."})]}),l&&d.jsx(yt,{className:"h-24 w-full"}),s!=null&&!so(s)&&d.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:Jt(s)}),h.map(({thread:p,snippet:g,tab:y})=>d.jsxs("div",{className:"flex flex-col gap-2",children:[g!==null&&(g.lines.length===0&&m?d.jsx(yt,{className:"h-20 w-full"}):d.jsx(Rv,{...g,className:p.resolvedAt!==null?"opacity-60":void 0,onOpen:()=>Cu({name:"review",reviewId:e.id,tab:y??"files",focus:g.line===null?{filePath:g.filePath}:{filePath:g.filePath,side:g.side,line:g.line},...n})})),d.jsx(ef,{thread:p,mutations:c})]},p.id)),!l&&h.length===0&&d.jsxs(wt,{className:"flex flex-col items-center gap-2 border-dashed px-6 py-10 text-center",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 text-muted-foreground",children:d.jsx(zu,{className:"size-6"})}),d.jsx("h3",{className:"font-medium",children:"No comments yet"}),d.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:"Start the discussion below, or comment on a line in Files changed. Agents connected over MCP write into the same threads."})]}),d.jsx(wt,{className:"p-3",children:d.jsx(Om,{placeholder:"Leave a comment on this review",onSubmit:p=>c.createThread({reviewId:e.id,body:p})})})]})}const OO=w.createContext(null);function Uo(){const e=w.useContext(OO);if(e===null)throw new Error(En(60));return e}const ft={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:i}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:_i(t,i)!==""},hasNullItemLabel:(e,t)=>t?Cj(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(s=>Si(t,s,n)):Si(t,i,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function su(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Oo=1;function AO(e,t){return Math.max(0,e-t)}function dW(e,t){if(t<=0)return 0;const n=su(e,0,t),i=n,s=t-n,l=i<=Oo,c=s<=Oo;return l&&c?i<=s?0:t:l?0:c?t:n}function hW(e){const{id:t,value:n,defaultValue:i=null,onValueChange:s,open:l,defaultOpen:c=!1,onOpenChange:u,name:m,form:h,autoComplete:p,disabled:g=!1,readOnly:y=!1,required:b=!1,modal:S=!0,actionsRef:k,inputRef:E,onOpenChangeComplete:C,items:T,multiple:R=!1,itemToStringLabel:N,itemToStringValue:I,isItemEqualToValue:M=kj,highlightItemOnHover:P=!0,children:A}=e,{clearErrors:L}=Vs(),{setDirty:D,setTouched:U,setFocused:q,validityData:K,setFilled:G,name:B,disabled:F,validation:V,validationMode:Y}=qi(),te=qa({id:t}),O=F||g,_=B??m,[Z,z]=Do({controlled:n,default:R?i??Pi:i,name:"Select",state:"value"}),[J,ne]=Do({controlled:l,default:c,name:"Select",state:"open"}),W=w.useRef([]),fe=w.useRef([]),ie=w.useRef(null),se=w.useRef(null),Se=w.useRef(0),ye=w.useRef(null),xe=w.useRef([]),ve=w.useRef(!1),Re=w.useRef(null),De=w.useRef(null),Me=w.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Ne=w.useRef(!1),{mounted:ge,setMounted:we,transitionStatus:je}=Al(J),{openMethod:Ve,triggerProps:Ue}=i2(J),me=Jn(()=>new Uh({id:te,labelId:void 0,modal:S,multiple:R,itemToStringLabel:N,itemToStringValue:I,isItemEqualToValue:M,value:Z,open:J,mounted:ge,transitionStatus:je,items:T,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,re=pe(me,ft.activeIndex),le=pe(me,ft.selectedIndex),$=pe(me,ft.triggerElement),Q=pe(me,ft.positionerElement),de=_5(Ve),Oe=Ve??de,_e=w.useMemo(()=>R?"":_i(Z,I),[R,Z,I]),Ge=w.useMemo(()=>R&&Array.isArray(Z)?Z.map(st=>_i(st,I)):_i(Z,I),[R,Z,I]),dt=Tn($),rt=Ae(()=>Ge);Yu(dt,te,Z,rt,!O,m);const at=w.useRef(Z),Nt=R?Array.isArray(Z)&&Z.length>0:Z!=null&&_e!=="";ze(()=>{G(Nt)},[Nt,G]),ze(function(){let Yt=Z,Vn=!1;if(R){const yn=Array.isArray(Z)?Z:[];Vn=yn.length===0,Yt=yn[yn.length-1]}const Dn=Vn?-1:ja(xe.current,Yt,M),gr=Dn===-1?null:Dn;gr===null&&(De.current=null),!J&&me.set("selectedIndex",gr)},[R,J,Z,M,me]);function Je(st){const Yt=K.initialValue;return Array.isArray(st)&&Array.isArray(Yt)?!Nj(st,Yt,(Vn,Dn)=>Si(Vn,Dn,M)):st!==Yt}Es(Z,()=>{L(_),D(Je(Z)),V.change(Z)});const Pt=Ae((st,Yt)=>{u?.(st,Yt),!Yt.isCanceled&&(ne(st),!st&&(Yt.reason===Fu||Yt.reason===_h)&&(U(!0),q(!1),Y==="onBlur"&&V.commit(Z)))}),Fe=Ae(()=>{we(!1),me.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),C?.(!1)});Zi({enabled:!k,open:J,ref:ie,onComplete(){J||Fe()}}),w.useImperativeHandle(k,()=>({unmount:Fe}),[Fe]);const pt=Ae((st,Yt)=>{s?.(st,Yt),!Yt.isCanceled&&z(st)}),Et=Ae(st=>{const Yt=AO(st.scrollHeight,st.clientHeight),Vn=dW(st.scrollTop,Yt),Dn=Vn>0,gr=Vn<Yt;me.set("scrollUpArrowVisible",Dn),me.set("scrollDownArrowVisible",gr)}),St=cR({open:J,onOpenChange:Pt,elements:{reference:$,floating:Q}}),tt=vb(St,{enabled:!y&&!O,event:"mousedown"}),ht=Bh(St),et=fR(St,{enabled:!y&&!O,listRef:W,activeIndex:re,selectedIndex:le,disabledIndices:Pi,onNavigate(st){st===null&&!J||me.set("activeIndex",st)},focusItemOnHover:P}),Wt=dR(St,{enabled:!y&&!O&&(J||!R),listRef:fe,activeIndex:re,selectedIndex:le,disabledIndices:st=>YR(W.current[st]),onMatch(st){J?me.set("activeIndex",st):pt(xe.current[st],Xe(On))},onTyping(st){ve.current=st}}),Bn=w.useMemo(()=>bi(Wt.reference,et.reference,ht.reference,tt.reference,Ue),[tt.reference,Wt.reference,et.reference,ht.reference,Ue]),In=w.useMemo(()=>bi(qh,Wt.floating,et.floating,ht.floating),[Wt.floating,et.floating,ht.floating]),rn=et.item??wn;gj(()=>{me.update({popupProps:In,triggerProps:Bn})}),me.useSyncedValues({id:te,modal:S,multiple:R,value:Z,open:J,mounted:ge,transitionStatus:je,popupProps:In,triggerProps:Bn,items:T,itemToStringLabel:N,itemToStringValue:I,isItemEqualToValue:M,openMethod:Oe});const Sn=w.useMemo(()=>({store:me,floatingContext:St,required:b,disabled:O,readOnly:y,multiple:R,highlightItemOnHover:P,setValue:pt,setOpen:Pt,listRef:W,popupRef:ie,scrollHandlerRef:se,handleScrollArrowVisibility:Et,scrollArrowsMountedCountRef:Se,itemProps:rn,valueRef:ye,valuesRef:xe,labelsRef:fe,typingRef:ve,selectionRef:Me,firstItemTextRef:Re,selectedItemTextRef:De,validation:V,onOpenChangeComplete:C,alignItemWithTriggerActiveRef:Ne,initialValueRef:at}),[me,St,b,O,y,R,P,pt,Pt,rn,V,C,Et]),Ft=Ui(E,V.inputRef),Ar=R?void 0:_,lr=w.useMemo(()=>!R||!Array.isArray(Z)||!_?null:Z.map(st=>{const Yt=_i(st,I);return d.jsx("input",{type:"hidden",form:h,name:_,value:Yt,disabled:O},Yt)}),[R,Z,h,_,I,O]);return d.jsxs(OO.Provider,{value:Sn,children:[A,d.jsx("input",{...V.getValidationProps(O,{onFocus(){me.state.triggerElement?.focus({focusVisible:!0})},onChange(st){if(st.nativeEvent.defaultPrevented||O||y)return;const Yt=st.currentTarget.value,Vn=Xe(On,st.nativeEvent);function Dn(){if(R)return;const gr=Yt.toLowerCase();let yn=xe.current.findIndex(Ht=>_i(Ht,I).toLowerCase()===gr||pi(Ht,N).toLowerCase()===gr);yn===-1&&(yn=xe.current.findIndex((Ht,nt)=>{const Tr=fe.current[nt];return Tr!=null&&Tr.toLowerCase()===gr}));const Zt=xe.current[yn];Zt!=null&&pt(Zt,Vn)}me.set("forceMount",!0),queueMicrotask(Dn)}}),id:te&&Ar==null?`${te}-hidden-input`:void 0,form:h,name:Ar,autoComplete:p,value:_e,disabled:O,required:b&&!(R&&Nt),readOnly:y,ref:Ft,style:_?Vu:Bu,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),lr]})}const mW=400,pW={...mR,...Bs,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},gW=w.forwardRef(function(t,n){const{render:i,className:s,id:l,disabled:c=!1,nativeButton:u=!0,style:m,...h}=t,{setTouched:p,setFocused:g,validationMode:y,state:b,disabled:S}=qi(),{labelId:k}=ki(),{store:E,setOpen:C,selectionRef:T,validation:R,readOnly:N,required:I,alignItemWithTriggerActiveRef:M,disabled:P}=Uo(),A=S||P||c,L=pe(E,ft.open),D=pe(E,ft.mounted),U=pe(E,ft.value),q=pe(E,ft.triggerProps),K=pe(E,ft.positionerElement),G=pe(E,ft.listElement),B=pe(E,ft.popupSide),F=pe(E,ft.id),V=pe(E,ft.labelId),Y=pe(E,ft.hasSelectedValue),te=D&&K?B:null,O=l??F,_=Aj(k,V);qa({id:O});const Z=Tn(K),z=w.useRef(null),{getButtonProps:J,buttonRef:ne}=Fo({disabled:A,native:u}),W=E.useStateSetter("triggerElement"),fe=kr(),ie=kr(),se=kr();w.useEffect(()=>{if(L)return se.start(mW,()=>{T.current.allowUnselectedMouseUp=!0,T.current.allowSelectedMouseUp=!0}),()=>{se.clear()};T.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ie.clear()},[L,T,ie,se]);const Se=bi(q,{id:O,role:"combobox","aria-expanded":L,"aria-haspopup":"listbox","aria-controls":L?G?.id??eh(K)?.id:void 0,"aria-labelledby":_,"aria-readonly":N||void 0,"aria-required":I||void 0,tabIndex:A?-1:0,onFocus(ve){g(!0),L&&M.current&&C(!1,Xe(On,ve.nativeEvent)),fe.start(0,()=>{E.set("forceMount",!0)})},onBlur(ve){$e(K,ve.relatedTarget)||(p(!0),g(!1),y==="onBlur"&&R.commit(U))},onMouseDown(ve){if(L)return;const Re=Dt(ve.currentTarget);function De(Me){if(!z.current)return;const Ne=Me.target;$e(z.current,Ne)||$e(Z.current,Ne)||Pj(Me,z.current)||C(!1,Xe(pT,Me))}ie.start(0,()=>{Re.addEventListener("mouseup",De,{once:!0})})}},h,J),ye=R.getValidationProps(A,Se);ye.role="combobox";const xe={...b,open:L,disabled:A,value:U,readOnly:N,popupSide:te,placeholder:!Y};return jt("button",t,{ref:[n,z,ne,W],state:xe,stateAttributesMapping:pW,props:ye})}),xW={value:()=>null},yW=w.forwardRef(function(t,n){const{className:i,render:s,children:l,placeholder:c,style:u,...m}=t,{store:h,valueRef:p}=Uo(),g=pe(h,ft.value),y=pe(h,ft.items),b=pe(h,ft.itemToStringLabel),S=pe(h,ft.hasSelectedValue),k=!S&&c!=null&&l==null,E=pe(h,ft.hasNullItemLabel,k),C={value:g,placeholder:!S};let T=null;return typeof l=="function"?T=l(g):l!=null?T=l:k&&!E?T=c:Array.isArray(g)?T=Tj(g,y,b):T=rv(g,y,b),jt("span",t,{state:C,ref:[n,p],props:[{children:T},m],stateAttributesMapping:xW})}),bW=w.forwardRef(function(t,n){const{render:i,className:s,style:l,...c}=t,{store:u}=Uo(),h={open:pe(u,ft.open)};return jt("span",t,{state:h,ref:n,props:[{"aria-hidden":!0,children:"▼"},c],stateAttributesMapping:hR})}),vW=w.forwardRef(function(t,n){const{store:i}=Uo(),s=pe(i,ft.mounted),l=pe(i,ft.forceMount);return s||l?d.jsx(xb,{ref:n,...t}):null}),MO=w.createContext(void 0);function zO(){const e=w.useContext(MO);if(!e)throw new Error(En(59));return e}function Eh(e,t){e&&Object.assign(e.style,t)}const IO={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},wW={position:"fixed"},SW=w.forwardRef(function(t,n){const{anchor:i,className:s,render:l,positionMethod:c,side:u,align:m,sideOffset:h,alignOffset:p,collisionBoundary:g="clipping-ancestors",collisionPadding:y,arrowPadding:b,sticky:S,disableAnchorTracking:k,alignItemWithTrigger:E=!0,collisionAvoidance:C=HT,style:T,...R}=t,{store:N,listRef:I,labelsRef:M,alignItemWithTriggerActiveRef:P,selectedItemTextRef:A,valuesRef:L,initialValueRef:D,popupRef:U,setValue:q,floatingContext:K}=Uo(),G=pe(N,ft.open),B=pe(N,ft.mounted),F=pe(N,ft.modal),V=pe(N,ft.value),Y=pe(N,ft.openMethod),te=pe(N,ft.positionerElement),O=pe(N,ft.triggerElement),_=pe(N,ft.isItemEqualToValue),Z=pe(N,ft.transitionStatus),z=w.useRef(null),J=w.useRef(null),[ne,W]=w.useState(E),fe=B&&ne&&Y!=="touch";!B&&ne!==E&&W(E),w.useImperativeHandle(P,()=>fe),Bj((fe||F)&&G,Y==="touch",te,O);const ie=Cb({anchor:i,floatingRootContext:K,positionMethod:c,mounted:B,side:u,sideOffset:h,align:m,alignOffset:p,arrowPadding:b,collisionBoundary:g,collisionPadding:y,sticky:S,disableAnchorTracking:k??fe,collisionAvoidance:C,keepMounted:!0}),se=fe?"none":ie.side,Se=fe?wW:ie.positionerStyles,ye={open:G,side:se,align:ie.align,anchorHidden:ie.anchorHidden};ze(()=>{N.set("popupSide",ie.side)},[N,ie.side]);const xe=N.useStateSetter("positionerElement"),ve=Tb(t,ye,{styles:Se,transitionStatus:Z,props:R,refs:[n,xe],hidden:!B,inert:!G}),Re=w.useRef(0),De=Ae(Ne=>{if(L.current.length===0)return;const ge=Re.current;if(Re.current=Ne.size,Ne.size===ge)return;const we=Xe(On);if(ge!==0&&!N.state.multiple&&V!==null&&ja(L.current,V,_)===-1){const Ve=D.current,me=Ve!=null&&ja(L.current,Ve,_)!==-1?Ve:null;q(me,we),me===null&&(N.set("selectedIndex",null),A.current=null)}if(ge!==0&&N.state.multiple&&Array.isArray(V)){const je=V.filter(Ve=>ja(L.current,Ve,_)!==-1);je.length!==V.length&&(q(je,we),je.length===0&&(N.set("selectedIndex",null),A.current=null))}if(G&&fe){N.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const je={height:""};Eh(te,je),Eh(U.current,je)}}),Me=w.useMemo(()=>({...ie,side:se,alignItemWithTriggerActive:fe,setControlledAlignItemWithTrigger:W,scrollUpArrowRef:z,scrollDownArrowRef:J}),[ie,se,fe,W]);return d.jsx(Qh,{elementsRef:I,labelsRef:M,onMapChange:De,children:d.jsxs(MO.Provider,{value:Me,children:[B&&F&&d.jsx(Db,{inert:Xh(!G),cutout:O}),ve]})})}),_d="base-ui-disable-scrollbar",Uy={className:_d,getElement(e){return d.jsx("style",{nonce:e,href:_d,precedence:"base-ui:low",children:`.${_d}{scrollbar-width:none}.${_d}::-webkit-scrollbar{display:none}`})}},kW=w.createContext(void 0);function EW(e){return w.useContext(kW)}const CW={...Uu,...Fs},TW=w.forwardRef(function(t,n){const{render:i,className:s,style:l,finalFocus:c,...u}=t,{store:m,popupRef:h,onOpenChangeComplete:p,setOpen:g,valueRef:y,firstItemTextRef:b,selectedItemTextRef:S,multiple:k,handleScrollArrowVisibility:E,scrollHandlerRef:C,listRef:T,highlightItemOnHover:R,floatingContext:N}=Uo(),{side:I,align:M,alignItemWithTriggerActive:P,isPositioned:A,setControlledAlignItemWithTrigger:L}=zO(),D=EW()!=null,U=Zu(),{nonce:q,disableStyleElements:K}=uL(),G=pe(m,ft.id),B=pe(m,ft.open),F=pe(m,ft.openMethod),V=pe(m,ft.mounted),Y=pe(m,ft.popupProps),te=pe(m,ft.transitionStatus),O=pe(m,ft.triggerElement),_=pe(m,ft.positionerElement),Z=pe(m,ft.listElement),z=w.useRef(!1),J=w.useRef(!1),ne=w.useRef({}),W=Aa(),fe=Ae(ye=>{if(!_||!h.current||!J.current)return;const xe=_.style.top==="0px",ve=_.style.bottom==="0px";if(z.current||!P||!xe&&!ve){E(ye);return}const Re=TC(_),De=lu(_.getBoundingClientRect().height,"y",Re),Me=Dt(_),Ne=gn(_),ge=Ne.getComputedStyle(_),we=parseFloat(ge.marginTop),je=parseFloat(ge.marginBottom),Ve=CC(Ne.getComputedStyle(h.current)),Ue=Math.min(Me.documentElement.clientHeight-we-je,Ve),me=ye.scrollTop,re=Pd(ye);let le=null;const $=_e=>{_.style.height=`${_e}px`},Q=xe?re-me:me,de=Math.min(De+Q,Ue);if(Q<=Oo){const _e=su(Q,0,Ue-De);_e>0&&$(De+_e),ye.scrollTop=xe?re:0,Ue-(De+_e)<=Oo&&(z.current=!0),E(ye);return}if(Ue-de>Oo)le=xe?1/0:0;else if(ve&&me<re){const _e=De+Q-Ue;le=me-(Q-_e)}const Oe=Math.ceil(de);if(Oe!==0&&$(Oe),le!=null){const _e=su(le,0,Pd(ye));Math.abs(ye.scrollTop-_e)>Oo&&(ye.scrollTop=_e)}Oe>=Ue-Oo&&(z.current=!0),E(ye)});w.useImperativeHandle(C,()=>fe,[fe]),Zi({open:B,ref:h,onComplete(){B&&p?.(!0)}});const ie={open:B,transitionStatus:te,side:I,align:M};ze(()=>{!_||!h.current||Object.keys(ne.current).length||(ne.current={top:_.style.top||"0",left:_.style.left||"0",right:_.style.right,height:_.style.height,bottom:_.style.bottom,minHeight:_.style.minHeight,maxHeight:_.style.maxHeight,marginTop:_.style.marginTop,marginBottom:_.style.marginBottom})},[h,_]),ze(()=>{B||P||(J.current=!1,z.current=!1,Eh(_,ne.current))},[B,P,_,h]),ze(()=>{const ye=h.current;if(!B||!O||!_||!ye||P&&!A||m.state.transitionStatus==="ending")return;if(J.current=!0,ye.style.removeProperty("--transform-origin"),!P){W.request(()=>E(Z||ye));return}const xe=RW(ye);try{let ve=S.current;ve?.isConnected||(ve=!ft.hasSelectedValue(m.state)&&b.current?.isConnected?b.current:null);const Re=y.current,De=gn(_),Me=De.getComputedStyle(_),Ne=De.getComputedStyle(ye),ge=Dt(O),we=TC(O),je=Ld(O.getBoundingClientRect(),we),Ve=Ld(_.getBoundingClientRect(),we),Ue=je.height,me=Z||ye,re=me.scrollHeight,le=parseFloat(Ne.borderBottomWidth),$=parseFloat(Me.marginTop)||10,Q=parseFloat(Me.marginBottom)||10,de=parseFloat(Me.minHeight)||100,Oe=CC(Ne),_e=5,Ge=5,dt=20,rt=ge.documentElement.clientHeight-$-Q,at=ge.documentElement.clientWidth,Nt=rt-je.bottom+Ue;let Je,Pt=U==="rtl"?je.right-Ve.width:je.left,Fe=0;if(ve&&Re){const Sn=Ld(Re.getBoundingClientRect(),we);Je=Ld(ve.getBoundingClientRect(),we),Pt=Ve.left+(U==="rtl"?Sn.right-Je.right:Sn.left-Je.left);const Ft=Sn.top-je.top+Sn.height/2;Fe=Je.top-Ve.top+Je.height/2-Ft}const pt=Nt+Fe+Q+le;let Et=Math.min(rt,pt);const St=rt-$-Q,tt=pt-Et,ht=at-Ge;_.style.left=`${su(Pt,_e,ht-Ve.width)}px`,_.style.height=`${Et}px`,_.style.maxHeight="none",_.style.marginTop=`${$}px`,_.style.marginBottom=`${Q}px`,ye.style.height="100%";const et=Pd(me),Wt=tt>=et-Oo;Wt&&(Et=Math.min(rt,Ve.height)-(tt-et));const Bn=je.top<dt||je.bottom>rt-dt||Math.ceil(Et)+Oo<Math.min(re,de),In=(De.visualViewport?.scale??1)!==1&&Po;if(Bn||In){Eh(_,ne.current),L(!1);return}const rn=Math.max(de,Et);if(Wt){const Sn=Math.max(0,rt-pt);_.style.top=Ve.height>=St?"0":`${Sn}px`,_.style.height=`${Et}px`,me.scrollTop=Pd(me)}else _.style.bottom="0",me.scrollTop=tt;if(Je){const Sn=Ve.top,Ft=Ve.height,Ar=Je.top+Je.height/2,lr=su(Ft>0?(Ar-Sn)/Ft*100:50,0,100);ye.style.setProperty("--transform-origin",`50% ${lr}%`)}(rn===rt||Et>=Oe)&&(z.current=!0),E(me),R&&m.state.selectedIndex===null&&m.state.activeIndex===null&&T.current[0]!=null&&m.set("activeIndex",0)}finally{xe()}},[m,B,_,O,y,b,S,h,E,P,L,W,Z,T,R,U,A]),w.useEffect(()=>{if(!P||!_||!B)return;const ye=gn(_);function xe(ve){g(!1,Xe(H4,ve))}return kt(ye,"resize",xe)},[g,P,_,B]);const se={...Z?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":k||void 0,id:`${G}-list`},onKeyDown(ye){D&&Ab.has(ye.key)&&ye.stopPropagation()},onScroll(ye){Z||fe(ye.currentTarget)},...P&&{style:Z?{height:"100%"}:IO},className:!Z&&P?Uy.className:void 0},Se=jt("div",t,{ref:[n,h],state:ie,stateAttributesMapping:CW,props:[Y,se,Kh(te),u]});return d.jsxs(w.Fragment,{children:[!K&&Uy.getElement(q),d.jsx(bb,{context:N,modal:!1,disabled:!V,openInteractionType:F,returnFocus:c,restoreFocus:!0,children:Se})]})});function CC(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function Pd(e){return AO(e.scrollHeight,e.clientHeight)}function TC(e){return XT.getScale(e)}function lu(e,t,n){return e/n[t]}function Ld(e,t){return ku({x:lu(e.x,"x",t),y:lu(e.y,"y",t),width:lu(e.width,"x",t),height:lu(e.height,"y",t)})}const RC=[["transform","none"],["scale","1"],["translate","0 0"]];function RW(e){const{style:t}=e,n={};for(const[i,s]of RC)n[i]=t.getPropertyValue(i),t.setProperty(i,s,"important");return()=>{for(const[i]of RC){const s=n[i];s?t.setProperty(i,s):t.removeProperty(i)}}}const jW=w.forwardRef(function(t,n){const{render:i,className:s,style:l,...c}=t,{store:u,scrollHandlerRef:m,multiple:h}=Uo(),{alignItemWithTriggerActive:p}=zO(),g=pe(u,ft.hasScrollArrows),y=pe(u,ft.openMethod),S={id:`${pe(u,ft.id)}-list`,role:"listbox","aria-multiselectable":h||void 0,onScroll(E){m.current?.(E.currentTarget)},...p&&{style:IO},className:g&&y!=="touch"?Uy.className:void 0},k=u.useStateSetter("listElement");return jt("div",t,{ref:[n,k],props:[S,c]})}),DO=w.createContext(void 0);function Ov(){const e=w.useContext(DO);if(!e)throw new Error(En(57));return e}const NW=w.memo(w.forwardRef(function(t,n){const{render:i,className:s,style:l,value:c=null,label:u,disabled:m=!1,nativeButton:h=!1,...p}=t,g=w.useRef(null),y=tm({guess:!0,label:u,textRef:g}),{store:b,itemProps:S,setOpen:k,setValue:E,selectionRef:C,typingRef:T,valuesRef:R,multiple:N,selectedItemTextRef:I,disabled:M,readOnly:P}=Uo(),A=M||m,L=pe(b,ft.isActive,y.index),D=pe(b,ft.open),U=pe(b,ft.isSelected,c),q=pe(b,ft.isSelectedByFocus,y.index),K=pe(b,ft.isItemEqualToValue),G=y.index,B=w.useRef(null);ze(()=>{const W=R.current;return W[G]=c,()=>{delete W[G]}},[G,c,R]),ze(()=>{const W=b.state.value;let fe=W;N&&Array.isArray(W)&&(fe=W.length>0?W[W.length-1]:void 0),fe!==void 0&&Si(c,fe,K)&&(b.set("selectedIndex",G),g.current&&(I.current=g.current))},[G,N,K,b,c,I]);const F=w.useRef("mouse"),V=w.useRef(!1),{getButtonProps:Y,buttonRef:te}=Fo({disabled:A,focusableWhenDisabled:!0,native:h,composite:!0}),O={disabled:A,selected:U,highlighted:L};function _(W){if(M||P)return;const fe=b.state.value;if(N){const ie=Array.isArray(fe)?fe:[],se=U?Ej(ie,c,K):[...ie,c];E(se,Xe(Hd,W))}else E(c,Xe(Hd,W)),k(!1,Xe(Hd,W))}function Z(){C.current.dragY=0}const z={role:"option","aria-selected":U,tabIndex:D&&L?0:-1,onKeyDown(W){b.set("activeIndex",G),W.key===" "&&T.current&&W.preventDefault()},onClick(W){const fe=F.current!=="touch",ie=W.nativeEvent.pointerType,se=fe&&rb(W.nativeEvent)&&(ie!==void 0||L),Se=fe&&!se&&!V.current;V.current=!1,!(A||Se)&&_(W.nativeEvent)},onPointerEnter(W){F.current=W.pointerType},onPointerMove(W){if(W.pointerType==="mouse"&&W.buttons===1){const fe=C.current;fe.dragY+=W.movementY,fe.dragY**2>=64&&(fe.allowUnselectedMouseUp=!0)}},onPointerDown(W){F.current=W.pointerType,V.current=!0,Z()},onMouseUp(){if(Z(),A||F.current==="touch"||V.current)return;const W=!C.current.allowSelectedMouseUp&&U,fe=!C.current.allowUnselectedMouseUp&&!U;W||fe||(V.current=!0,B.current?.click(),V.current=!1)}},J=jt("div",t,{ref:[te,n,y.ref,B],state:O,props:[S,z,p,Y]}),ne=w.useMemo(()=>({selected:U,index:G,textRef:g,selectedByFocus:q}),[U,G,g,q]);return d.jsx(DO.Provider,{value:ne,children:J})})),OW=w.forwardRef(function(t,n){const{selected:i}=Ov();return t.keepMounted||i?d.jsx(AW,{...t,ref:n}):null}),AW=w.memo(w.forwardRef((e,t)=>{const{render:n,className:i,style:s,keepMounted:l,...c}=e,{selected:u}=Ov(),m=w.useRef(null),{transitionStatus:h,setMounted:p}=Al(u),y=jt("span",e,{ref:[t,m],state:{selected:u,transitionStatus:h},props:[{"aria-hidden":!0,children:"✔️"},c],stateAttributesMapping:Fs});return Zi({open:u,ref:m,onComplete(){u||p(!1)}}),y})),MW=w.memo(w.forwardRef(function(t,n){const{index:i,textRef:s,selectedByFocus:l}=Ov(),{firstItemTextRef:c,selectedItemTextRef:u}=Uo(),{render:m,className:h,style:p,...g}=t,y=w.useCallback(S=>{S&&(i===0&&(c.current=S),l&&(u.current=S))},[c,u,i,l]);return jt("div",t,{ref:[y,n,s],props:g})})),zW=hW,IW=yW;function DW({className:e,children:t,...n}){return d.jsxs(gW,{className:Te("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent","px-3 py-1 text-sm shadow-sm transition-colors","hover:bg-muted/50 disabled:cursor-not-allowed disabled:opacity-50","data-[invalid]:border-destructive",e),...n,children:[t,d.jsx(bW,{className:"shrink-0 text-muted-foreground",children:d.jsx(KC,{className:"size-4"})})]})}function _W({className:e,children:t,...n}){return d.jsx(vW,{children:d.jsx(SW,{sideOffset:4,alignItemWithTrigger:!1,className:"z-50",children:d.jsx(TW,{className:Te("max-h-[min(24rem,var(--available-height))] w-[var(--anchor-width)] min-w-[12rem] overflow-y-auto","rounded-md border border-border bg-card p-1 text-card-foreground shadow-lg","transition-[opacity,transform] duration-100","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0",e),...n,children:d.jsx(jW,{children:t})})})})}function PW({className:e,children:t,...n}){return d.jsxs(NW,{className:Te("relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none","data-[highlighted]:bg-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx(MW,{className:"min-w-0 flex-1",children:t}),d.jsx(OW,{className:"absolute right-2 flex items-center text-primary",children:d.jsx(Li,{className:"size-4"})})]})}function LW({files:e,activePath:t,onSelect:n,unresolvedByFile:i,reviewedPaths:s,changedSincePaths:l}){const c=w.useMemo(()=>kO(e.map(m=>m.path)),[e]),u=w.useMemo(()=>new Map(e.map(m=>[m.path,m])),[e]);return d.jsx("nav",{"aria-label":"Changed files",className:"flex flex-col gap-px py-1 text-xs",children:c.map(m=>d.jsx(_O,{node:m,depth:0,byPath:u,activePath:t,onSelect:n,unresolvedByFile:i,reviewedPaths:s,changedSincePaths:l},m.path))})}function _O({node:e,depth:t,byPath:n,activePath:i,onSelect:s,unresolvedByFile:l,reviewedPaths:c,changedSincePaths:u}){const[m,h]=w.useState(!0),p={paddingLeft:`${Math.min(t,6)*.75+.25}rem`};if(e.kind==="directory")return d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:()=>h(E=>!E),"aria-expanded":m,style:p,className:"flex w-full items-start gap-1 rounded py-1 pr-1 text-left text-muted-foreground hover:bg-muted",children:[m?d.jsx(Fa,{className:"mt-0.5 size-3 shrink-0"}):d.jsx(_o,{className:"mt-0.5 size-3 shrink-0"}),d.jsx(La,{path:e.name,emphasizeName:!1,className:"min-w-0"})]}),m&&e.children.map(E=>d.jsx(_O,{node:E,depth:t+1,byPath:n,activePath:i,onSelect:s,unresolvedByFile:l,reviewedPaths:c,changedSincePaths:u},E.path))]});const g=n.get(e.path),y=l.get(e.path)??0,b=e.path===i,S=c.has(e.path),k=u.has(e.path);return d.jsxs("button",{type:"button",onClick:()=>s(e.path),style:p,"aria-current":b?"true":void 0,className:Te("flex w-full items-start gap-1.5 rounded py-1 pr-1 text-left transition-colors",b?"bg-accent text-accent-foreground":"hover:bg-muted",S&&!b&&"text-muted-foreground"),title:k?`${e.path} - changed since you reviewed it`:S?`${e.path} - reviewed`:e.path,children:[S?d.jsx(Li,{className:"mt-0.5 size-3 shrink-0 text-success"}):k?d.jsx(ID,{className:"mt-0.5 size-3 shrink-0 text-warning"}):d.jsx(vO,{status:g.status,className:"mt-0.5 size-3 shrink-0"}),d.jsx("span",{className:"min-w-0 flex-1 break-words font-mono text-[0.6875rem]",children:e.name}),y>0&&d.jsx("span",{className:"shrink-0 rounded-full bg-primary px-1 text-[0.5625rem] font-semibold leading-4 text-primary-foreground",title:`${y} unresolved`,children:y}),!g.isBinary&&d.jsxs("span",{className:"mt-px shrink-0 font-mono text-[0.625rem] tabular-nums",children:[d.jsxs("span",{className:"text-success",children:["+",g.additions]})," ",d.jsxs("span",{className:"text-destructive",children:["−",g.deletions]})]})]})}function FW(e){const[t,n]=w.useState(!1),[i,s]=w.useState(""),[l,c]=w.useState(0),u=w.useRef(null),m=w.useCallback(P=>{u.current=P},[]),h=w.useDeferredValue(i),p=t?h:"",{matches:g,fileCount:y,truncated:b}=w.useMemo(()=>qJ(e,p),[e,p]),[S,k]=w.useState(p);S!==p&&(k(p),c(0));const E=g.length===0?-1:Math.min(l,g.length-1),C=E===-1?null:g[E]??null,T=w.useCallback(()=>{n(!0),u.current?.select()},[]);w.useEffect(()=>{t&&u.current?.select()},[t]);const R=w.useCallback(()=>n(!1),[]),N=w.useCallback(P=>{const A=g.length;A!==0&&c(L=>(Math.min(L,A-1)+P+A)%A)},[g.length]),I=C===null?null:`${C.filePath}:${C.side}:${C.line}:${C.occurrence}`;w.useEffect(()=>{if(C!==null)return _b(l2,{block:"center",inline:"nearest",behavior:"smooth"})},[I]);const M=w.useCallback(P=>p===""?void 0:{query:p,active:C!==null&&C.filePath===P?{side:C.side,line:C.line,occurrence:C.occurrence}:null},[p,C]);return{open:t,query:i,setQuery:s,term:p,matches:g,fileCount:y,truncated:b,index:E,show:T,close:R,step:N,bindInput:m,searchFor:M}}function HW({find:e,ref:t}){const{matches:n,index:i,query:s,term:l,truncated:c,fileCount:u,bindInput:m}=e,h=l!=="",p=h&&n.length===0;function g(y){switch(y.key){case"Enter":y.preventDefault(),e.step(y.shiftKey?-1:1);break;case"Escape":y.preventDefault(),y.stopPropagation(),e.close();break}}return d.jsxs("div",{ref:t,className:"sticky top-0 z-20 flex items-center gap-2 rounded-lg border border-border bg-card/95 px-2 py-1.5 shadow-sm backdrop-blur",children:[d.jsx(Rl,{className:"ml-1 size-4 shrink-0 text-muted-foreground"}),d.jsx(Os,{ref:m,value:s,onChange:y=>e.setQuery(y.target.value),onKeyDown:g,placeholder:"Find in the diff","aria-label":"Find in the diff",spellCheck:!1,autoComplete:"off",className:"h-7 border-0 bg-transparent px-0 shadow-none focus-visible:outline-none"}),d.jsx("span",{role:"status","aria-live":"polite",className:Te("shrink-0 whitespace-nowrap text-xs tabular-nums",p?"text-warning":"text-muted-foreground"),children:h?p?"No matches":`${i+1} of ${n.length}${c?"+":""} in ${Nl(u,"file")}`:""}),d.jsxs("div",{className:"flex shrink-0 items-center",children:[d.jsx(Ze,{variant:"ghost",size:"icon",className:"size-7",onClick:()=>e.step(-1),disabled:n.length===0,title:`Previous match (${Ta("shift+enter")})`,"aria-label":"Previous match",children:d.jsx(YC,{})}),d.jsx(Ze,{variant:"ghost",size:"icon",className:"size-7",onClick:()=>e.step(1),disabled:n.length===0,title:`Next match (${Ta("enter")})`,"aria-label":"Next match",children:d.jsx(Fa,{})}),d.jsx(Ze,{variant:"ghost",size:"icon",className:"size-7",onClick:()=>e.close(),title:`Close the find bar (${Ta("escape")})`,"aria-label":"Close the find bar",children:d.jsx(Du,{})})]})]})}const BW=24,Bx=["all","uncommitted","committed"],VW=["committed","all","uncommitted"],PO={committed:"Committed",all:"All",uncommitted:"Uncommitted"},UW={committed:"Only what is committed on the head branch",all:"Committed work with the worktree’s uncommitted changes folded in",uncommitted:"Only the uncommitted changes in the worktree, against the head commit"};function ZW(e){const t=Bx.indexOf(e);return Bx[(t+1)%Bx.length]??"all"}function qW(e){for(let t=e.parentElement;t!==null;t=t.parentElement){const n=getComputedStyle(t).overflowY;if(n==="auto"||n==="scroll")return t}return document.documentElement}const GW="0.75rem";function YW(){const[e,t]=w.useState(null),[n,i]=w.useState(0);return w.useEffect(()=>{if(e===null)return;const s=new ResizeObserver(()=>i(e.offsetHeight));return s.observe(e),()=>s.disconnect()},[e]),[t,e===null?0:n]}const KW=800,XW=12;function JW(){const e=w.useRef(0);return w.useEffect(()=>()=>cancelAnimationFrame(e.current),[]),w.useCallback(t=>{cancelAnimationFrame(e.current);let n=0;const i=()=>{document.getElementById(t)?.scrollIntoView({block:"start"}),n+=1,n<XW&&(e.current=requestAnimationFrame(i))};e.current=requestAnimationFrame(i)},[])}function WW(e,t){const n=new Map;for(const i of t){if(!Am(i))continue;const s=fO(e,i.filePath),l={...i,anchor:hO(s,{filePath:i.filePath,side:i.side,line:i.line,startLine:i.startLine,anchorText:i.anchorText})},c=s?.path??i.filePath,u=n.get(c);u?u.push(l):n.set(c,[l])}return n}function $W(e){const[t,n]=w.useState(null),i=e.join(`
|
|
114
|
+
`);return w.useEffect(()=>{const s=i===""?[]:i.split(`
|
|
115
|
+
`),l=new Set,c=new IntersectionObserver(u=>{for(const m of u){const h=m.target.getAttribute("data-file-path");h!==null&&(m.isIntersecting?l.add(h):l.delete(h))}n(s.find(m=>l.has(m))??null)},{rootMargin:"0px 0px -70% 0px"});for(const u of s){const m=document.getElementById(Mo(u));m&&c.observe(m)}return()=>c.disconnect()},[i]),t}function LO(e){if(!(!e||e.side===void 0||e.line===void 0))return{side:e.side,line:e.line}}function QW(e,t){const[n,i]=w.useState(null),s=e?`${e.filePath}:${e.side}:${e.line}`:null;return w.useEffect(()=>{if(!e||!t)return;let l=0,c=0,u=0;const m=()=>{const h=LO(e),p=h?document.getElementById(s2(e.filePath,h.side,h.line)):null,g=p??document.getElementById(Mo(e.filePath));if(g){g.scrollIntoView({block:p?"center":"start",behavior:"smooth"}),p&&(i(e),u=window.setTimeout(()=>i(null),2500));return}l++<30&&(c=requestAnimationFrame(m))};return c=requestAnimationFrame(m),()=>{cancelAnimationFrame(c),window.clearTimeout(u),i(null)}},[s,t]),n}function e$(){const e=eN(),[t,n]=eb("files-tree",!0),[i,s]=w.useState(!1),l=w.useRef(null);w.useEffect(()=>{const u=l.current;u!==null&&(l.current=null,document.getElementById(Mo(u))?.scrollIntoView({block:"start"}))},[i]);const c=w.useCallback(u=>{if(e){l.current=u,s(!1);return}document.getElementById(Mo(u))?.scrollIntoView({block:"start",behavior:"smooth"})},[e]);return{narrow:e,listOpen:e?i:t,setListOpen:e?s:n,selectFile:c}}function t$({review:e,focus:t}){const n=Wn(),i=$n(),s=Ho(),[l,c]=w.useState(Sm),[u,m]=Qy("editor",null),[h,p]=w.useState(null),{narrow:g,listOpen:y,setListOpen:b,selectFile:S}=e$(),{data:k,error:E,isLoading:C,isRefreshing:T,refresh:R}=km(e.id,l),{threads:N}=Em(e.id),I=lv(),M=Kj(),P=w.useMemo(()=>i===void 0||M===void 0?M:AC(M),[i,M]),A=w.useMemo(()=>WW(k?.files??[],N),[k?.files,N]),L=w.useMemo(()=>{const ge=new Set((k?.files??[]).map(we=>we.path));return[...A].filter(([we])=>!ge.has(we))},[k?.files,A]),D=w.useMemo(()=>k?.files??[],[k?.files]),U=w.useMemo(()=>D.map(ge=>ge.path),[D]),q=$W(U),K=FW(D),[G,B]=YW(),F=K.open?`calc(${B}px + ${GW})`:"0px",V={"--diff-sticky-top":F,"--diff-scroll-top":`calc(${F} + 0.5rem)`},Y=w.useMemo(()=>new Map((k?.files??[]).map(ge=>[ge.path,pV(ge)])),[k?.files]),{digests:te,setReviewed:O}=m7(e.id),_=w.useMemo(()=>{const ge=new Set;for(const[we,je]of Y)te.get(we)===je&&ge.add(we);return ge},[Y,te]),Z=w.useMemo(()=>{const ge=new Set;for(const[we,je]of Y){const Ve=te.get(we);Ve!==void 0&&Ve!==je&&ge.add(we)}return ge},[Y,te]),z=w.useRef(null),J=JW(),ne=w.useCallback((ge,we)=>{const je=Y.get(ge);if(je===void 0||(O(ge,we?je:null),!we))return;const Ve=U.indexOf(ge);if(Ve===-1)return;const Ue=Math.min(U.length-1,Ve+1),me=U[Ue];me!==void 0&&(z.current={index:Ue,at:Date.now()},J(Mo(me)))},[Y,O,U,J]),W=w.useMemo(()=>{const ge=new Map;for(const[we,je]of A){const Ve=je.filter(Ue=>Ue.resolvedAt===null).length;Ve>0&&ge.set(we,Ve)}return ge},[A]),fe=w.useCallback((ge,we)=>{p(null),n.reviews.openInEditor({id:e.id,path:ge,changes:l,line:we,...u===null?{}:{editorId:u}}).catch(p)},[n,e.id,l,u]),ie=i!==void 0&&P!==void 0&&P.editors.length===0?void 0:fe,se=QW(t,!C&&k!==void 0),Se=w.useCallback(()=>{let ge=0,we=null;for(const[je,Ve]of U.entries()){const Ue=document.getElementById(Mo(Ve));if(Ue!==null){if(we??=qW(Ue).getBoundingClientRect().top,Ue.getBoundingClientRect().top-we>BW)break;ge=je}}return ge},[U]),ye=w.useCallback(()=>{const ge=z.current;return ge!==null&&Date.now()-ge.at<KW?ge.index:Se()},[Se]),xe=w.useCallback(ge=>{if(U.length===0)return;const we=Math.min(U.length-1,Math.max(0,ye()+ge));z.current={index:we,at:Date.now()};const je=U[we];je!==void 0&&_b(Mo(je))},[U,ye]),ve=w.useCallback(()=>{const ge=U[ye()];ge!==void 0&&ne(ge,!_.has(ge))},[U,ye,ne,_]),Re=k?.workingTree!=null,De=ZW(l);if(Il(w.useMemo(()=>[{id:"files:next",label:"Next file",group:"Files changed",keys:"]",keywords:"down scroll",icon:Vz,disabled:U.length===0,run:()=>xe(1)},{id:"files:previous",label:"Previous file",group:"Files changed",keys:"[",keywords:"up scroll back",icon:GC,disabled:U.length===0,run:()=>xe(-1)},{id:"files:tree",label:y?"Hide the file list":"Show the file list",group:"Files changed",keys:"t",keywords:"tree sidebar panel toggle",icon:y?$x:TS,disabled:U.length===0,run:()=>b(!y)},{id:"files:uncommitted",label:`Show ${PO[De].toLowerCase()} changes`,group:"Files changed",keys:"u",keywords:"working tree dirty staged unstaged untracked committed only",icon:YI,disabled:!Re,run:()=>c(De)},{id:"files:reviewed",label:q!==null&&_.has(q)?"Clear the reviewed mark on this file":"Mark this file as reviewed",group:"Files changed",keys:"v",keywords:"viewed read seen done tick check off",icon:ES,disabled:U.length===0,run:ve},{id:"files:find",label:"Find in the diff",group:"Files changed",keys:"mod+f",keywords:"search text highlight grep locate",icon:Rl,disabled:U.length===0,run:K.show},...K.open?[{id:"files:find-next",label:"Next match",group:"Files changed",keys:"mod+g",keywords:"search find again forward",icon:Fa,disabled:K.matches.length===0,run:()=>K.step(1)},{id:"files:find-previous",label:"Previous match",group:"Files changed",keys:"mod+shift+g",keywords:"search find again back",icon:YC,disabled:K.matches.length===0,run:()=>K.step(-1)},{id:"files:find-close",label:"Close the find bar",group:"Files changed",keys:"escape",icon:Du,hidden:!0,run:K.close}]:[],{id:"files:refresh",label:"Refresh the diff",group:"Files changed",keys:"r",keywords:"reload re-read disk git",icon:sr,run:()=>{R()}}],[U.length,xe,y,b,De,Re,R,q,_,ve,K])),C)return d.jsx(r$,{});if(E!==void 0&&!(k!==void 0&&so(E)))return d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-destructive/40 px-6 py-10 text-center",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3 text-destructive",children:d.jsx(Hi,{className:"size-6"})}),d.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:Jt(E)}),d.jsxs(Ze,{variant:"outline",onClick:()=>{R()},children:[d.jsx(sr,{}),"Try again"]})]});if(!k)return null;if(k.error!==null||k.base.error!==null||k.head.error!==null)return d.jsx(RO,{compare:k});const Me=k.workingTree!==null,Ne=Xa(e);return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsxs("p",{className:"text-sm text-muted-foreground",children:[Nl(k.files.length,"file")," changed"]}),d.jsx(wO,{additions:k.additions,deletions:k.deletions}),_.size>0&&d.jsxs("p",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",title:"Files you have marked as reviewed. A mark clears itself when its file changes.",children:[d.jsx(ES,{className:"size-4 text-success"}),_.size," of ",k.files.length," reviewed"]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[k.files.length>0&&d.jsxs(Ze,{variant:"ghost",size:"sm",onClick:K.show,title:`Find in the diff (${Ta("mod+f")})`,"aria-expanded":K.open,children:[d.jsx(Rl,{}),"Find"]}),k.files.length>0&&d.jsxs(Ze,{variant:"ghost",size:"sm",onClick:()=>b(!y),title:y?"Hide the file list":"Show the file list","aria-pressed":y,children:[y?d.jsx($x,{}):d.jsx(TS,{}),"Files"]}),P!==void 0&&P.editors.length>1&&d.jsxs(zW,{items:P.editors.map(ge=>({value:ge.id,label:ge.label})),value:u??P.defaultId??"",onValueChange:ge=>m(typeof ge=="string"?ge:null),children:[d.jsx(DW,{className:"h-8 w-auto min-w-32 max-w-48 text-xs",title:"Which editor the open-file buttons use",children:d.jsx(IW,{className:"truncate"})}),d.jsx(_W,{children:P.editors.map(ge=>d.jsx(PW,{value:ge.id,children:ge.label},ge.id))})]}),d.jsx(n$,{changes:l,onChange:c,hasWorktree:Me,headRef:e.headRef,selfReview:Ne}),d.jsxs(Ze,{variant:"ghost",size:"sm",onClick:()=>{R()},title:"Re-read from disk",children:[d.jsx(sr,{className:T?"animate-spin":void 0}),"Refresh"]})]})]}),K.open&&d.jsx(HW,{ref:G,find:K}),l!=="committed"&&k.workingTree?.isDirty&&d.jsx(jO,{workingTree:k.workingTree}),!Me&&d.jsx(NO,{headRef:e.headRef}),l==="uncommitted"&&Me&&d.jsxs("p",{className:"rounded-lg border border-border bg-muted/40 px-4 py-3 text-xs text-muted-foreground",children:["Measured against ",d.jsx("span",{className:"font-mono",children:e.headRef}),", so everything already committed on the branch is hidden."]}),l==="committed"&&Me&&k.workingTree?.isDirty&&d.jsx("p",{className:"rounded-lg border border-border bg-muted/40 px-4 py-3 text-xs text-muted-foreground",children:"Uncommitted changes are being left out of this diff. Switch to All or Uncommitted to see them."}),L.length>0&&d.jsxs(wt,{className:"flex flex-col gap-2 border-warning/40 p-3",children:[d.jsxs("p",{className:"text-xs text-muted-foreground",children:[Nl(L.length,"file")," with comments"," ",L.length===1?"is":"are"," not part of this diff. Open"," ",L.length===1?"it":"them"," in Browse files to read the code."]}),L.map(([ge,we])=>d.jsx("div",{className:"flex flex-col gap-3",children:we.map(je=>{const Ve=jv(je,je.anchor,void 0),Ue=Ve!==null&&Ve.lines.length>0,me=()=>Cu({name:"review",reviewId:e.id,tab:"browse",focus:je.line===null||je.side===null?{filePath:ge}:{filePath:ge,side:je.side,line:je.line},...s});return d.jsxs("div",{className:"flex flex-col gap-2",children:[Ue?d.jsx(Rv,{...Ve,onOpen:me,openLabel:"Browse files"}):d.jsx("button",{type:"button",onClick:me,title:`Open ${ge} in Browse files`,className:"self-start rounded font-mono text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:ge}),d.jsx(ef,{thread:je,mutations:I,anchorState:je.anchor.state,location:!Ue&&je.line!==null?d.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:["was line ",je.line]}):null})]},je.id)})},ge))]}),k.files.length===0?d.jsxs(wt,{className:"flex flex-col items-center gap-2 border-dashed px-6 py-12 text-center",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 text-muted-foreground",children:d.jsx(yu,{className:"size-6"})}),d.jsx("h3",{className:"font-medium",children:"No changes"}),d.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:l==="uncommitted"&&!Me?d.jsxs(d.Fragment,{children:["No worktree has ",d.jsx("span",{className:"font-mono",children:e.headRef})," checked out, so there is no uncommitted work to show."]}):l==="uncommitted"||Ne&&l==="all"?d.jsxs(d.Fragment,{children:["Nothing is uncommitted on ",d.jsx("span",{className:"font-mono",children:e.headRef})," right now. Edit a file and refresh — it will show up here."]}):Ne?d.jsxs(d.Fragment,{children:["This review is ",d.jsx("span",{className:"font-mono",children:e.headRef})," against itself, so it holds only uncommitted work. Switch to All or Uncommitted to see it."]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"font-mono",children:e.headRef})," has nothing that"," ",d.jsx("span",{className:"font-mono",children:e.baseRef})," does not already have."]})})]}):d.jsxs("div",{className:"flex items-start gap-4",style:V,children:[y&&d.jsx("aside",{className:Te("rounded-lg border border-border bg-card/50 px-1",g?"w-full":"sticky top-[var(--diff-scroll-top,0.5rem)] max-h-[calc(100dvh-6rem)] w-56 shrink-0 overflow-y-auto xl:w-64 2xl:w-72"),children:d.jsx(LW,{files:k.files,activePath:q,unresolvedByFile:W,reviewedPaths:_,changedSincePaths:Z,onSelect:S})}),d.jsx("div",{className:Te("min-w-0 flex-1 flex-col gap-2",g&&y?"hidden":"flex"),children:k.files.map(ge=>d.jsx("div",{id:Mo(ge.path),"data-file-path":ge.path,className:"scroll-mt-[var(--diff-scroll-top,0.5rem)]",children:d.jsx($J,{file:ge,focus:t?.filePath===ge.path?t:void 0,search:K.searchFor(ge.path),marked:se?.filePath===ge.path?LO(se):void 0,reviewed:{isReviewed:_.has(ge.path),hasChangedSince:Z.has(ge.path),onChange:we=>ne(ge.path,we)},comments:{reviewId:e.id,threads:A.get(ge.path)??[],mutations:I,changes:l},source:{reviewId:e.id,changes:l,editorId:u,editorLabel:P?.editors.find(we=>we.id===(u??P.defaultId))?.label??null,onOpenInEditor:ie}},l)},`${ge.oldPath??""}:${ge.path}`))})]}),h!==null&&d.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:Jt(h)})]})}function n$({changes:e,onChange:t,hasWorktree:n,headRef:i,selfReview:s}){return d.jsx("div",{role:"group","aria-label":"Which changes to show",className:"flex items-center rounded-md border border-border p-0.5",children:VW.map(l=>{const u=l!=="committed"&&!n,m=u?`No worktree has ${i} checked out, so there is nothing uncommitted to show`:l==="committed"&&s?`This review is ${i} against itself, so it holds no committed changes`:UW[l];return d.jsx("button",{type:"button",onClick:()=>t(l),disabled:u,"aria-pressed":e===l,title:m,className:"rounded px-2 py-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-40 "+(e===l?"bg-accent font-medium text-accent-foreground":"text-muted-foreground hover:text-foreground"),children:PO[l]},l)})})}function r$(){return d.jsx("div",{className:"flex flex-col gap-2","aria-busy":"true","aria-label":"Loading changes",children:[0,1].map(e=>d.jsxs(wt,{className:"overflow-hidden",children:[d.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[d.jsx(yt,{className:"size-4"}),d.jsx(yt,{className:"h-4 w-56"}),d.jsx("div",{className:"flex-1"}),d.jsx(yt,{className:"h-4 w-14"})]}),d.jsxs("div",{className:"space-y-1 border-t border-border p-3",children:[d.jsx(yt,{className:"h-3 w-full"}),d.jsx(yt,{className:"h-3 w-4/5"}),d.jsx(yt,{className:"h-3 w-2/3"})]})]},e))})}function i$({review:e,onOpenChange:t,onRemoved:n}){const{removeReview:i}=sv(),[s,l]=w.useState(!1),[c,u]=w.useState(null);async function m(){if(e){l(!0),u(null);try{await i(e.id),t(!1),n?.()}catch(h){u(h)}finally{l(!1)}}}return d.jsx(mm,{open:e!==null,onOpenChange:h=>{h||u(null),t(h)},children:d.jsxs(pm,{children:[d.jsxs(gm,{children:[d.jsxs(xm,{children:["Delete “",e?.title,"”?"]}),d.jsx(ym,{children:"The review and anything attached to it are removed. No branch, commit or file in the repository is touched. If you are simply finished with it, close it instead — a closed review is kept."})]}),c!==null&&d.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:Jt(c)}),d.jsxs(bm,{children:[d.jsx(Ze,{variant:"ghost",onClick:()=>t(!1),disabled:s,children:"Cancel"}),d.jsxs(Ze,{variant:"destructive",onClick:()=>{m()},disabled:s,children:[s&&d.jsx(wi,{className:"animate-spin"}),"Delete review"]})]})]})})}const o$={conversation:"Conversation",commits:"Commits",files:"Files changed",browse:"Browse files"},s$={conversation:zu,commits:Jy,files:yu,browse:Xy};function l$({reviewId:e,tab:t,focus:n}){const i=Ho(),{data:s,error:l,isLoading:c}=a7(e),{updateReview:u}=sv(),m=Gj(e);km(e,Sm);const{threads:h}=Em(e),[p,g]=w.useState(!1),[y,b]=w.useState(null),[S,k]=w.useState(!1),[E,C]=w.useState(null),T=w.useCallback(async()=>{if(s){k(!0),C(null);try{await u({id:s.id,status:s.status==="open"?"closed":"open"})}catch(A){C(A)}finally{k(!1)}}},[s,u]);if(Il(w.useMemo(()=>s===void 0?[]:[...qM.map((A,L)=>({id:`review:tab:${A}`,label:o$[A],group:"Review",keys:String(L+1),keywords:"tab",icon:s$[A],disabled:t===A,run:()=>Cu({name:"review",reviewId:e,tab:A,...i})})),{id:"review:edit",label:"Edit review",group:"Review",keys:"e",keywords:"title description base head ref rename",icon:Tl,run:()=>g(!0)},{id:"review:status",label:s.status==="open"?"Close review":"Reopen review",group:"Review",keywords:"close reopen resolve finish status",icon:bu,disabled:S,run:()=>{T()}},{id:"review:repository",label:`Go to ${s.repository.name}`,group:"Navigate",keys:"g r",keywords:"repository parent",icon:Ts,run:()=>An({name:"repository",repositoryId:s.repositoryId,...i})},{id:"review:remove",label:"Delete review",group:"Review",keywords:"remove destroy",icon:vu,run:()=>b(s)}],[s,e,i,t,S,T])),c)return d.jsx(a$,{});const R=s!==void 0&&so(l);if(!s||l!==void 0&&!R)return d.jsxs(wt,{className:"flex flex-col items-center gap-3 border-destructive/40 px-6 py-12 text-center",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3 text-destructive",children:d.jsx(Hi,{className:"size-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium",children:"Review not found"}),d.jsx("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:l===void 0?"It may have been deleted.":Jt(l)})]}),d.jsxs(Ze,{variant:"outline",onClick:()=>An({name:"repositories",...i}),children:[d.jsx(Ts,{}),"Back to repositories"]})]});const N=m.data?.workingTree??null,I=s.status==="open",M=Xa(s),P=h.filter(A=>A.resolvedAt===null).length;return d.jsxs("div",{className:"flex flex-col gap-5",children:[d.jsxs("div",{children:[d.jsxs(Ze,{variant:"ghost",size:"sm",className:"-ml-2 mb-2 text-muted-foreground",onClick:()=>An({name:"repository",repositoryId:s.repositoryId,...i}),children:[d.jsx(Ts,{}),s.repository.name]}),d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(bu,{className:`mt-1 size-5 shrink-0 ${I?"text-success":"text-muted-foreground"}`}),d.jsx("h1",{className:"min-w-0 break-words text-xl font-semibold tracking-tight",children:s.title}),d.jsx(tn,{variant:I?"success":"outline",className:"mt-1 shrink-0",children:I?"Open":"Closed"})]}),d.jsxs("p",{className:"mt-1.5 flex flex-wrap items-center gap-1.5 font-mono text-xs text-muted-foreground",children:[!M&&d.jsxs(d.Fragment,{children:[d.jsx(EE,{name:s.baseRef,role:"base ref"}),d.jsx(jC,{endpoint:m.data?.base,role:"base"}),d.jsx(Rh,{className:"size-3"})]}),d.jsx(EE,{name:s.headRef,role:M?"ref":"compare ref"}),d.jsx(jC,{endpoint:m.data?.head,role:"head"}),N?.isDirty&&d.jsxs(tn,{variant:"warning",className:"ml-1",title:`Uncommitted changes in ${N.worktreePath}`,children:[d.jsx(As,{}),"uncommitted work"]})]})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsxs(Ze,{variant:"outline",size:"sm",onClick:()=>g(!0),children:[d.jsx(Tl,{}),"Edit"]}),d.jsx(Ze,{variant:"outline",size:"sm",disabled:S,onClick:()=>{T()},children:I?"Close review":"Reopen"}),d.jsx(Ln,{label:"Delete this review",children:d.jsx(Ze,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive","aria-label":"Delete review",onClick:()=>b(s),children:d.jsx(vu,{})})})]})]})]}),E!==null&&d.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:Jt(E)}),d.jsxs(Mb,{value:t,onValueChange:A=>Cu({name:"review",reviewId:e,tab:A,...i}),children:[d.jsxs(zb,{children:[d.jsxs(bl,{value:"conversation",children:[d.jsx(zu,{}),"Conversation",P>0&&d.jsx(Nk,{children:P})]}),d.jsxs(bl,{value:"commits",children:["Commits",m.data&&d.jsx(Nk,{children:m.data.commits.length})]}),d.jsx(bl,{value:"files",children:"Files changed"}),d.jsxs(bl,{value:"browse",children:[d.jsx(Xy,{}),"Browse files"]})]}),d.jsx(vl,{value:"conversation",children:d.jsx(fW,{review:s,onEdit:()=>g(!0)})}),d.jsx(vl,{value:"commits",children:d.jsx(lW,{review:s})}),d.jsx(vl,{value:"files",children:d.jsx(t$,{review:s,focus:n})}),d.jsx(vl,{value:"browse",children:d.jsx(sW,{review:s,focus:n})})]}),d.jsx(Xj,{open:p,onOpenChange:g,repositoryId:s.repositoryId,review:s}),d.jsx(i$,{review:y,onOpenChange:A=>{A||b(null)},onRemoved:()=>An({name:"repository",repositoryId:s.repositoryId,...i})})]})}function jC({endpoint:e,role:t}){const n=e?.upstream;return n?n.gone?d.jsx(tn,{variant:"outline",title:`${n.ref} no longer exists on the remote.`,children:"upstream gone"}):n.behind===0?null:d.jsxs(tn,{variant:"warning",title:t==="base"?`Local ${e?.ref} is ${Nl(n.behind,"commit")} behind ${n.ref}, and this diff is measured against the local branch - so anything the trunk has gained since is being shown as part of this review. Update the local branch and refresh.`:`Local ${e?.ref} is ${Nl(n.behind,"commit")} behind ${n.ref}, so this review is showing less than what has been pushed.`,children:[d.jsx(Hz,{}),n.behind," behind ",n.ref]}):null}function a$(){return d.jsxs("div",{className:"flex flex-col gap-5","aria-busy":"true","aria-label":"Loading review",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(yt,{className:"h-4 w-28"}),d.jsx(yt,{className:"h-6 w-72"}),d.jsx(yt,{className:"h-4 w-52"})]}),d.jsx(yt,{className:"h-9 w-full"}),d.jsx(yt,{className:"h-40 w-full"})]})}function c$(e){return e==="files"?"max-w-[110rem]":"max-w-5xl"}function u$(){const e=HR(),t=w.useRef(null);return iU(),d.jsx(jP,{children:d.jsx(SL,{host:e.host,children:d.jsx(u6,{children:d.jsxs("div",{className:"flex h-full flex-col",children:[d.jsx("div",{className:"titlebar-drag h-11 shrink-0"}),d.jsxs("main",{ref:t,tabIndex:-1,className:Te("mx-auto w-full flex-1 overflow-y-auto px-6 pb-10 outline-none",e.name==="review"?c$(e.tab):"max-w-3xl"),children:[d.jsxs("div",{className:"mb-6 flex flex-col gap-3",children:[d.jsx(u4,{}),d.jsx(GP,{}),d.jsx(p4,{})]}),d.jsx(D6,{}),e.name==="repositories"&&(e.host===void 0?d.jsx(f$,{}):d.jsx(Qj,{})),e.name==="agent"&&d.jsx(AL,{}),e.name==="hosts"&&d.jsx(eU,{}),e.name==="repository"&&d.jsx(E7,{repositoryId:e.repositoryId}),e.name==="review"&&d.jsx(l$,{reviewId:e.reviewId,tab:e.tab,focus:e.focus})]}),d.jsx(zP,{target:t}),d.jsx(S6,{scroller:t})]})})})})}function f$(){return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[d.jsx("img",{src:Mz,alt:"",className:"size-10 shrink-0"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"GitWarren"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Local code review for your git repositories"})]}),d.jsxs("p",{className:"flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",children:[d.jsx(yl,{binding:"mod+k"}),d.jsx("span",{className:"hidden sm:inline",children:"to search"})]})]}),d.jsxs("div",{className:"flex flex-col gap-6",children:[d.jsx(Qj,{}),d.jsx(P6,{}),d.jsx(XP,{}),d.jsx(sU,{})]})]})}function d$(e,t){return t===void 0?!e.includes("@"):e.endsWith(`@${t}`)}function h$(e,t,n){return typeof e=="string"&&d$(e,t)&&n.some(i=>e.startsWith(i))}const m$={[Vx.reviewsChanged]:[Ss.reviews,Ss.review,Ss.reviewCommits,Ss.reviewDiff],[Vx.commentsChanged]:[Ss.review]};function p$(e,t=BC){if(e.event===Vx.hostState){t(Vt.hosts);return}const n=m$[e.event];n&&t(i=>h$(i,e.host,n))}function g$(e){return e(p$)}const x$=15e3;function y$(){const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{document.documentElement.classList.toggle("dark",e.matches)};t(),e.addEventListener("change",t)}y$();_t.navigation.onDeepLink(e=>{window.location.hash=e});g$(e=>window.gitwarren.carrier.onEvent(e));const FO=document.getElementById("root");if(!FO)throw new Error("Root element is missing from index.html");nz.createRoot(FO).render(d.jsx(w.StrictMode,{children:d.jsx(Az,{value:{revalidateOnFocus:!0,revalidateOnReconnect:!1,shouldRetryOnError:!0,onErrorRetry:(e,t,n,i,{retryCount:s})=>{so(e)&&document.visibilityState==="visible"&&setTimeout(()=>i({retryCount:s}),x$)}},children:d.jsx(u$,{})})}));
|