@akiojin/gwt 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +0 -1
- package/README.md +0 -1
- package/dist/claude.d.ts +21 -0
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +73 -30
- package/dist/claude.js.map +1 -1
- package/dist/cli/ui/components/common/Select.d.ts +6 -0
- package/dist/cli/ui/components/common/Select.d.ts.map +1 -1
- package/dist/cli/ui/components/common/Select.js +3 -2
- package/dist/cli/ui/components/common/Select.js.map +1 -1
- package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts +6 -0
- package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/AIToolSelectorScreen.js +3 -2
- package/dist/cli/ui/components/screens/AIToolSelectorScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts +3 -0
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js +3 -2
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts +3 -0
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.js +3 -2
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts +3 -0
- package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/BranchCreatorScreen.js +3 -2
- package/dist/cli/ui/components/screens/BranchCreatorScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts +3 -0
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/BranchListScreen.js +3 -4
- package/dist/cli/ui/components/screens/BranchListScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.d.ts +10 -1
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.js +7 -22
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.d.ts +3 -0
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.js +3 -2
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts +15 -0
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js +3 -2
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts +6 -0
- package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/ModelSelectorScreen.js +3 -2
- package/dist/cli/ui/components/screens/ModelSelectorScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts +6 -0
- package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/PRCleanupScreen.js +3 -2
- package/dist/cli/ui/components/screens/PRCleanupScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts +6 -0
- package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/SessionSelectorScreen.js +3 -2
- package/dist/cli/ui/components/screens/SessionSelectorScreen.js.map +1 -1
- package/dist/cli/ui/hooks/useAppInput.d.ts +20 -0
- package/dist/cli/ui/hooks/useAppInput.d.ts.map +1 -0
- package/dist/cli/ui/hooks/useAppInput.js +137 -0
- package/dist/cli/ui/hooks/useAppInput.js.map +1 -0
- package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts +3 -0
- package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts.map +1 -1
- package/dist/cli/ui/screens/BranchActionSelectorScreen.js +3 -2
- package/dist/cli/ui/screens/BranchActionSelectorScreen.js.map +1 -1
- package/dist/cli/ui/utils/branchFormatter.d.ts.map +1 -1
- package/dist/cli/ui/utils/branchFormatter.js +0 -2
- package/dist/cli/ui/utils/branchFormatter.js.map +1 -1
- package/dist/client/assets/{index-f5D2XwDh.js → index-v8smkNOL.js} +16 -16
- package/dist/client/index.html +1 -1
- package/dist/codex.d.ts +32 -0
- package/dist/codex.d.ts.map +1 -1
- package/dist/codex.js +32 -1
- package/dist/codex.js.map +1 -1
- package/dist/config/builtin-tools.d.ts +1 -7
- package/dist/config/builtin-tools.d.ts.map +1 -1
- package/dist/config/builtin-tools.js +1 -20
- package/dist/config/builtin-tools.js.map +1 -1
- package/dist/config/tools.d.ts.map +1 -1
- package/dist/config/tools.js +1 -4
- package/dist/config/tools.js.map +1 -1
- package/dist/gemini.d.ts +17 -0
- package/dist/gemini.d.ts.map +1 -1
- package/dist/gemini.js +21 -21
- package/dist/gemini.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/command.d.ts +10 -0
- package/dist/utils/command.d.ts.map +1 -0
- package/dist/utils/command.js +25 -0
- package/dist/utils/command.js.map +1 -0
- package/dist/utils/session/index.d.ts +0 -2
- package/dist/utils/session/index.d.ts.map +1 -1
- package/dist/utils/session/index.js +0 -3
- package/dist/utils/session/index.js.map +1 -1
- package/dist/utils/session/parsers/index.d.ts +0 -1
- package/dist/utils/session/parsers/index.d.ts.map +1 -1
- package/dist/utils/session/parsers/index.js +0 -2
- package/dist/utils/session/parsers/index.js.map +1 -1
- package/dist/utils/session.d.ts +0 -1
- package/dist/utils/session.d.ts.map +1 -1
- package/dist/utils/session.js +0 -1
- package/dist/utils/session.js.map +1 -1
- package/dist/utils/terminal.d.ts +34 -0
- package/dist/utils/terminal.d.ts.map +1 -1
- package/dist/utils/terminal.js +51 -4
- package/dist/utils/terminal.js.map +1 -1
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts.map +1 -1
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js +0 -2
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js.map +1 -1
- package/package.json +1 -1
- package/src/claude.ts +92 -34
- package/src/cli/ui/__tests__/components/App.protected-branch.test.tsx +3 -1
- package/src/cli/ui/__tests__/components/ModelSelectorScreen.initial.test.tsx +8 -5
- package/src/cli/ui/components/common/Select.tsx +9 -2
- package/src/cli/ui/components/screens/AIToolSelectorScreen.tsx +9 -2
- package/src/cli/ui/components/screens/BatchMergeProgressScreen.tsx +6 -2
- package/src/cli/ui/components/screens/BatchMergeResultScreen.tsx +6 -2
- package/src/cli/ui/components/screens/BranchCreatorScreen.tsx +6 -2
- package/src/cli/ui/components/screens/BranchListScreen.tsx +6 -4
- package/src/cli/ui/components/screens/BranchQuickStartScreen.tsx +17 -26
- package/src/cli/ui/components/screens/EnvironmentProfileScreen.tsx +6 -2
- package/src/cli/ui/components/screens/ExecutionModeSelectorScreen.tsx +18 -2
- package/src/cli/ui/components/screens/ModelSelectorScreen.tsx +9 -2
- package/src/cli/ui/components/screens/PRCleanupScreen.tsx +9 -2
- package/src/cli/ui/components/screens/SessionSelectorScreen.tsx +9 -2
- package/src/cli/ui/hooks/useAppInput.ts +171 -0
- package/src/cli/ui/screens/BranchActionSelectorScreen.tsx +6 -2
- package/src/cli/ui/screens/__tests__/BranchActionSelectorScreen.test.tsx +68 -1
- package/src/cli/ui/utils/branchFormatter.ts +0 -1
- package/src/cli/ui/utils/modelOptions.test.ts +1 -1
- package/src/codex.ts +40 -1
- package/src/config/builtin-tools.ts +1 -21
- package/src/config/tools.ts +1 -5
- package/src/gemini.ts +25 -21
- package/src/index.ts +0 -6
- package/src/utils/command.ts +26 -0
- package/src/utils/session/index.ts +0 -4
- package/src/utils/session/parsers/index.ts +0 -3
- package/src/utils/session.ts +0 -1
- package/src/utils/terminal.ts +65 -4
- package/src/web/client/src/components/branch-detail/BranchInfoCards.tsx +0 -1
- package/dist/qwen.d.ts +0 -16
- package/dist/qwen.d.ts.map +0 -1
- package/dist/qwen.js +0 -202
- package/dist/qwen.js.map +0 -1
- package/dist/utils/session/parsers/qwen.d.ts +0 -21
- package/dist/utils/session/parsers/qwen.d.ts.map +0 -1
- package/dist/utils/session/parsers/qwen.js +0 -36
- package/dist/utils/session/parsers/qwen.js.map +0 -1
- package/src/qwen.ts +0 -273
- package/src/utils/session/parsers/qwen.ts +0 -54
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
function mC(r,n){for(var a=0;a<n.length;a++){const l=n[a];if(typeof l!="string"&&!Array.isArray(l)){for(const d in l)if(d!=="default"&&!(d in r)){const y=Object.getOwnPropertyDescriptor(l,d);y&&Object.defineProperty(r,d,y.get?y:{enumerable:!0,get:()=>l[d]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))l(d);new MutationObserver(d=>{for(const y of d)if(y.type==="childList")for(const S of y.addedNodes)S.tagName==="LINK"&&S.rel==="modulepreload"&&l(S)}).observe(document,{childList:!0,subtree:!0});function a(d){const y={};return d.integrity&&(y.integrity=d.integrity),d.referrerPolicy&&(y.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?y.credentials="include":d.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function l(d){if(d.ep)return;d.ep=!0;const y=a(d);fetch(d.href,y)}})();function Lf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var zh={exports:{}},$a={};var Qv;function pC(){if(Qv)return $a;Qv=1;var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,d,y){var S=null;if(y!==void 0&&(S=""+y),d.key!==void 0&&(S=""+d.key),"key"in d){y={};for(var o in d)o!=="key"&&(y[o]=d[o])}else y=d;return d=y.ref,{$$typeof:r,type:l,key:S,ref:d!==void 0?d:null,props:y}}return $a.Fragment=n,$a.jsx=a,$a.jsxs=a,$a}var Xv;function vC(){return Xv||(Xv=1,zh.exports=pC()),zh.exports}var O=vC(),Ph={exports:{}},Ne={};var Zv;function gC(){if(Zv)return Ne;Zv=1;var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),S=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function x(N){return N===null||typeof N!="object"?null:(N=w&&N[w]||N["@@iterator"],typeof N=="function"?N:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,h={};function m(N,z,X){this.props=N,this.context=z,this.refs=h,this.updater=X||R}m.prototype.isReactComponent={},m.prototype.setState=function(N,z){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,z,"setState")},m.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function p(){}p.prototype=m.prototype;function g(N,z,X){this.props=N,this.context=z,this.refs=h,this.updater=X||R}var A=g.prototype=new p;A.constructor=g,b(A,m.prototype),A.isPureReactComponent=!0;var D=Array.isArray;function L(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function B(N,z,X){var ie=X.ref;return{$$typeof:r,type:N,key:z,ref:ie!==void 0?ie:null,props:X}}function W(N,z){return B(N.type,z,N.props)}function F(N){return typeof N=="object"&&N!==null&&N.$$typeof===r}function I(N){var z={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(X){return z[X]})}var V=/\/+/g;function ee(N,z){return typeof N=="object"&&N!==null&&N.key!=null?I(""+N.key):z.toString(36)}function ne(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(L,L):(N.status="pending",N.then(function(z){N.status==="pending"&&(N.status="fulfilled",N.value=z)},function(z){N.status==="pending"&&(N.status="rejected",N.reason=z)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function q(N,z,X,ie,de){var G=typeof N;(G==="undefined"||G==="boolean")&&(N=null);var Q=!1;if(N===null)Q=!0;else switch(G){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(N.$$typeof){case r:case n:Q=!0;break;case C:return Q=N._init,q(Q(N._payload),z,X,ie,de)}}if(Q)return de=de(N),Q=ie===""?"."+ee(N,0):ie,D(de)?(X="",Q!=null&&(X=Q.replace(V,"$&/")+"/"),q(de,z,X,"",function(ge){return ge})):de!=null&&(F(de)&&(de=W(de,X+(de.key==null||N&&N.key===de.key?"":(""+de.key).replace(V,"$&/")+"/")+Q)),z.push(de)),1;Q=0;var P=ie===""?".":ie+":";if(D(N))for(var he=0;he<N.length;he++)ie=N[he],G=P+ee(ie,he),Q+=q(ie,z,X,G,de);else if(he=x(N),typeof he=="function")for(N=he.call(N),he=0;!(ie=N.next()).done;)ie=ie.value,G=P+ee(ie,he++),Q+=q(ie,z,X,G,de);else if(G==="object"){if(typeof N.then=="function")return q(ne(N),z,X,ie,de);throw z=String(N),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return Q}function Z(N,z,X){if(N==null)return N;var ie=[],de=0;return q(N,ie,"","",function(G){return z.call(X,G,de++)}),ie}function K(N){if(N._status===-1){var z=N._result;z=z(),z.then(function(X){(N._status===0||N._status===-1)&&(N._status=1,N._result=X)},function(X){(N._status===0||N._status===-1)&&(N._status=2,N._result=X)}),N._status===-1&&(N._status=0,N._result=z)}if(N._status===1)return N._result.default;throw N._result}var j=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},U={map:Z,forEach:function(N,z,X){Z(N,function(){z.apply(this,arguments)},X)},count:function(N){var z=0;return Z(N,function(){z++}),z},toArray:function(N){return Z(N,function(z){return z})||[]},only:function(N){if(!F(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Ne.Activity=v,Ne.Children=U,Ne.Component=m,Ne.Fragment=a,Ne.Profiler=d,Ne.PureComponent=g,Ne.StrictMode=l,Ne.Suspense=c,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(N){return T.H.useMemoCache(N)}},Ne.cache=function(N){return function(){return N.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(N,z,X){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ie=b({},N.props),de=N.key;if(z!=null)for(G in z.key!==void 0&&(de=""+z.key),z)!E.call(z,G)||G==="key"||G==="__self"||G==="__source"||G==="ref"&&z.ref===void 0||(ie[G]=z[G]);var G=arguments.length-2;if(G===1)ie.children=X;else if(1<G){for(var Q=Array(G),P=0;P<G;P++)Q[P]=arguments[P+2];ie.children=Q}return B(N.type,de,ie)},Ne.createContext=function(N){return N={$$typeof:S,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:y,_context:N},N},Ne.createElement=function(N,z,X){var ie,de={},G=null;if(z!=null)for(ie in z.key!==void 0&&(G=""+z.key),z)E.call(z,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(de[ie]=z[ie]);var Q=arguments.length-2;if(Q===1)de.children=X;else if(1<Q){for(var P=Array(Q),he=0;he<Q;he++)P[he]=arguments[he+2];de.children=P}if(N&&N.defaultProps)for(ie in Q=N.defaultProps,Q)de[ie]===void 0&&(de[ie]=Q[ie]);return B(N,G,de)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(N){return{$$typeof:o,render:N}},Ne.isValidElement=F,Ne.lazy=function(N){return{$$typeof:C,_payload:{_status:-1,_result:N},_init:K}},Ne.memo=function(N,z){return{$$typeof:u,type:N,compare:z===void 0?null:z}},Ne.startTransition=function(N){var z=T.T,X={};T.T=X;try{var ie=N(),de=T.S;de!==null&&de(X,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(L,j)}catch(G){j(G)}finally{z!==null&&X.types!==null&&(z.types=X.types),T.T=z}},Ne.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Ne.use=function(N){return T.H.use(N)},Ne.useActionState=function(N,z,X){return T.H.useActionState(N,z,X)},Ne.useCallback=function(N,z){return T.H.useCallback(N,z)},Ne.useContext=function(N){return T.H.useContext(N)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(N,z){return T.H.useDeferredValue(N,z)},Ne.useEffect=function(N,z){return T.H.useEffect(N,z)},Ne.useEffectEvent=function(N){return T.H.useEffectEvent(N)},Ne.useId=function(){return T.H.useId()},Ne.useImperativeHandle=function(N,z,X){return T.H.useImperativeHandle(N,z,X)},Ne.useInsertionEffect=function(N,z){return T.H.useInsertionEffect(N,z)},Ne.useLayoutEffect=function(N,z){return T.H.useLayoutEffect(N,z)},Ne.useMemo=function(N,z){return T.H.useMemo(N,z)},Ne.useOptimistic=function(N,z){return T.H.useOptimistic(N,z)},Ne.useReducer=function(N,z,X){return T.H.useReducer(N,z,X)},Ne.useRef=function(N){return T.H.useRef(N)},Ne.useState=function(N){return T.H.useState(N)},Ne.useSyncExternalStore=function(N,z,X){return T.H.useSyncExternalStore(N,z,X)},Ne.useTransition=function(){return T.H.useTransition()},Ne.version="19.2.3",Ne}var Jv;function kf(){return Jv||(Jv=1,Ph.exports=gC()),Ph.exports}var k=kf();const Pi=Lf(k),dc=mC({__proto__:null,default:Pi},[k]);var Uh={exports:{}},Ya={},Ih={exports:{}},Fh={};var eg;function _C(){return eg||(eg=1,(function(r){function n(q,Z){var K=q.length;q.push(Z);e:for(;0<K;){var j=K-1>>>1,U=q[j];if(0<d(U,Z))q[j]=Z,q[K]=U,K=j;else break e}}function a(q){return q.length===0?null:q[0]}function l(q){if(q.length===0)return null;var Z=q[0],K=q.pop();if(K!==Z){q[0]=K;e:for(var j=0,U=q.length,N=U>>>1;j<N;){var z=2*(j+1)-1,X=q[z],ie=z+1,de=q[ie];if(0>d(X,K))ie<U&&0>d(de,X)?(q[j]=de,q[ie]=K,j=ie):(q[j]=X,q[z]=K,j=z);else if(ie<U&&0>d(de,K))q[j]=de,q[ie]=K,j=ie;else break e}}return Z}function d(q,Z){var K=q.sortIndex-Z.sortIndex;return K!==0?K:q.id-Z.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;r.unstable_now=function(){return y.now()}}else{var S=Date,o=S.now();r.unstable_now=function(){return S.now()-o}}var c=[],u=[],C=1,v=null,w=3,x=!1,R=!1,b=!1,h=!1,m=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function A(q){for(var Z=a(u);Z!==null;){if(Z.callback===null)l(u);else if(Z.startTime<=q)l(u),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=a(u)}}function D(q){if(b=!1,A(q),!R)if(a(c)!==null)R=!0,L||(L=!0,I());else{var Z=a(u);Z!==null&&ne(D,Z.startTime-q)}}var L=!1,T=-1,E=5,B=-1;function W(){return h?!0:!(r.unstable_now()-B<E)}function F(){if(h=!1,L){var q=r.unstable_now();B=q;var Z=!0;try{e:{R=!1,b&&(b=!1,p(T),T=-1),x=!0;var K=w;try{t:{for(A(q),v=a(c);v!==null&&!(v.expirationTime>q&&W());){var j=v.callback;if(typeof j=="function"){v.callback=null,w=v.priorityLevel;var U=j(v.expirationTime<=q);if(q=r.unstable_now(),typeof U=="function"){v.callback=U,A(q),Z=!0;break t}v===a(c)&&l(c),A(q)}else l(c);v=a(c)}if(v!==null)Z=!0;else{var N=a(u);N!==null&&ne(D,N.startTime-q),Z=!1}}break e}finally{v=null,w=K,x=!1}Z=void 0}}finally{Z?I():L=!1}}}var I;if(typeof g=="function")I=function(){g(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,ee=V.port2;V.port1.onmessage=F,I=function(){ee.postMessage(null)}}else I=function(){m(F,0)};function ne(q,Z){T=m(function(){q(r.unstable_now())},Z)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(q){q.callback=null},r.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<q?Math.floor(1e3/q):5},r.unstable_getCurrentPriorityLevel=function(){return w},r.unstable_next=function(q){switch(w){case 1:case 2:case 3:var Z=3;break;default:Z=w}var K=w;w=Z;try{return q()}finally{w=K}},r.unstable_requestPaint=function(){h=!0},r.unstable_runWithPriority=function(q,Z){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var K=w;w=q;try{return Z()}finally{w=K}},r.unstable_scheduleCallback=function(q,Z,K){var j=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?j+K:j):K=j,q){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=K+U,q={id:C++,callback:Z,priorityLevel:q,startTime:K,expirationTime:U,sortIndex:-1},K>j?(q.sortIndex=K,n(u,q),a(c)===null&&q===a(u)&&(b?(p(T),T=-1):b=!0,ne(D,K-j))):(q.sortIndex=U,n(c,q),R||x||(R=!0,L||(L=!0,I()))),q},r.unstable_shouldYield=W,r.unstable_wrapCallback=function(q){var Z=w;return function(){var K=w;w=Z;try{return q.apply(this,arguments)}finally{w=K}}}})(Fh)),Fh}var tg;function yC(){return tg||(tg=1,Ih.exports=_C()),Ih.exports}var qh={exports:{}},Qt={};var rg;function SC(){if(rg)return Qt;rg=1;var r=kf();function n(c){var u="https://react.dev/errors/"+c;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var C=2;C<arguments.length;C++)u+="&args[]="+encodeURIComponent(arguments[C])}return"Minified React error #"+c+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},d=Symbol.for("react.portal");function y(c,u,C){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:v==null?null:""+v,children:c,containerInfo:u,implementation:C}}var S=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(c,u){if(c==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return Qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Qt.createPortal=function(c,u){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(n(299));return y(c,u,null,C)},Qt.flushSync=function(c){var u=S.T,C=l.p;try{if(S.T=null,l.p=2,c)return c()}finally{S.T=u,l.p=C,l.d.f()}},Qt.preconnect=function(c,u){typeof c=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,l.d.C(c,u))},Qt.prefetchDNS=function(c){typeof c=="string"&&l.d.D(c)},Qt.preinit=function(c,u){if(typeof c=="string"&&u&&typeof u.as=="string"){var C=u.as,v=o(C,u.crossOrigin),w=typeof u.integrity=="string"?u.integrity:void 0,x=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;C==="style"?l.d.S(c,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:x}):C==="script"&&l.d.X(c,{crossOrigin:v,integrity:w,fetchPriority:x,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},Qt.preinitModule=function(c,u){if(typeof c=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var C=o(u.as,u.crossOrigin);l.d.M(c,{crossOrigin:C,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&l.d.M(c)},Qt.preload=function(c,u){if(typeof c=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var C=u.as,v=o(C,u.crossOrigin);l.d.L(c,C,{crossOrigin:v,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},Qt.preloadModule=function(c,u){if(typeof c=="string")if(u){var C=o(u.as,u.crossOrigin);l.d.m(c,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:C,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else l.d.m(c)},Qt.requestFormReset=function(c){l.d.r(c)},Qt.unstable_batchedUpdates=function(c,u){return c(u)},Qt.useFormState=function(c,u,C){return S.H.useFormState(c,u,C)},Qt.useFormStatus=function(){return S.H.useHostTransitionStatus()},Qt.version="19.2.3",Qt}var ig;function B_(){if(ig)return qh.exports;ig=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}return r(),qh.exports=SC(),qh.exports}var ng;function bC(){if(ng)return Ya;ng=1;var r=yC(),n=kf(),a=B_();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function S(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function o(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(y(e)!==e)throw Error(l(188))}function u(e){var t=e.alternate;if(!t){if(t=y(e),t===null)throw Error(l(188));return t!==e?null:e}for(var i=e,s=t;;){var f=i.return;if(f===null)break;var _=f.alternate;if(_===null){if(s=f.return,s!==null){i=s;continue}break}if(f.child===_.child){for(_=f.child;_;){if(_===i)return c(f),e;if(_===s)return c(f),t;_=_.sibling}throw Error(l(188))}if(i.return!==s.return)i=f,s=_;else{for(var M=!1,H=f.child;H;){if(H===i){M=!0,i=f,s=_;break}if(H===s){M=!0,s=f,i=_;break}H=H.sibling}if(!M){for(H=_.child;H;){if(H===i){M=!0,i=_,s=f;break}if(H===s){M=!0,s=_,i=f;break}H=H.sibling}if(!M)throw Error(l(189))}}if(i.alternate!==s)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?e:t}function C(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),g=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function I(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var V=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case b:return"Fragment";case m:return"Profiler";case h:return"StrictMode";case D:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case g:return e.displayName||"Context";case p:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case E:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var ne=Array.isArray,q=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},j=[],U=-1;function N(e){return{current:e}}function z(e){0>U||(e.current=j[U],j[U]=null,U--)}function X(e,t){U++,j[U]=e.current,e.current=t}var ie=N(null),de=N(null),G=N(null),Q=N(null);function P(e,t){switch(X(G,t),X(de,e),X(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yv(t),e=Sv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}z(ie),X(ie,e)}function he(){z(ie),z(de),z(G)}function ge(e){e.memoizedState!==null&&X(Q,e);var t=ie.current,i=Sv(t,e.type);t!==i&&(X(de,e),X(ie,i))}function oe(e){de.current===e&&(z(ie),z(de)),Q.current===e&&(z(Q),Wa._currentValue=K)}var me,Ce;function ze(e){if(me===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||"",Ce=-1<i.stack.indexOf(`
|
|
1
|
+
function mC(r,n){for(var a=0;a<n.length;a++){const l=n[a];if(typeof l!="string"&&!Array.isArray(l)){for(const d in l)if(d!=="default"&&!(d in r)){const y=Object.getOwnPropertyDescriptor(l,d);y&&Object.defineProperty(r,d,y.get?y:{enumerable:!0,get:()=>l[d]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))l(d);new MutationObserver(d=>{for(const y of d)if(y.type==="childList")for(const S of y.addedNodes)S.tagName==="LINK"&&S.rel==="modulepreload"&&l(S)}).observe(document,{childList:!0,subtree:!0});function a(d){const y={};return d.integrity&&(y.integrity=d.integrity),d.referrerPolicy&&(y.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?y.credentials="include":d.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function l(d){if(d.ep)return;d.ep=!0;const y=a(d);fetch(d.href,y)}})();function Lf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var zh={exports:{}},$a={};var Xv;function pC(){if(Xv)return $a;Xv=1;var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,d,y){var S=null;if(y!==void 0&&(S=""+y),d.key!==void 0&&(S=""+d.key),"key"in d){y={};for(var o in d)o!=="key"&&(y[o]=d[o])}else y=d;return d=y.ref,{$$typeof:r,type:l,key:S,ref:d!==void 0?d:null,props:y}}return $a.Fragment=n,$a.jsx=a,$a.jsxs=a,$a}var Qv;function vC(){return Qv||(Qv=1,zh.exports=pC()),zh.exports}var O=vC(),Ph={exports:{}},Ne={};var Zv;function gC(){if(Zv)return Ne;Zv=1;var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),S=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function x(N){return N===null||typeof N!="object"?null:(N=w&&N[w]||N["@@iterator"],typeof N=="function"?N:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,h={};function m(N,z,Q){this.props=N,this.context=z,this.refs=h,this.updater=Q||R}m.prototype.isReactComponent={},m.prototype.setState=function(N,z){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,z,"setState")},m.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function p(){}p.prototype=m.prototype;function g(N,z,Q){this.props=N,this.context=z,this.refs=h,this.updater=Q||R}var A=g.prototype=new p;A.constructor=g,b(A,m.prototype),A.isPureReactComponent=!0;var D=Array.isArray;function L(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function B(N,z,Q){var ie=Q.ref;return{$$typeof:r,type:N,key:z,ref:ie!==void 0?ie:null,props:Q}}function W(N,z){return B(N.type,z,N.props)}function F(N){return typeof N=="object"&&N!==null&&N.$$typeof===r}function I(N){var z={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(Q){return z[Q]})}var V=/\/+/g;function ee(N,z){return typeof N=="object"&&N!==null&&N.key!=null?I(""+N.key):z.toString(36)}function ne(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(L,L):(N.status="pending",N.then(function(z){N.status==="pending"&&(N.status="fulfilled",N.value=z)},function(z){N.status==="pending"&&(N.status="rejected",N.reason=z)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function q(N,z,Q,ie,de){var G=typeof N;(G==="undefined"||G==="boolean")&&(N=null);var X=!1;if(N===null)X=!0;else switch(G){case"bigint":case"string":case"number":X=!0;break;case"object":switch(N.$$typeof){case r:case n:X=!0;break;case C:return X=N._init,q(X(N._payload),z,Q,ie,de)}}if(X)return de=de(N),X=ie===""?"."+ee(N,0):ie,D(de)?(Q="",X!=null&&(Q=X.replace(V,"$&/")+"/"),q(de,z,Q,"",function(ge){return ge})):de!=null&&(F(de)&&(de=W(de,Q+(de.key==null||N&&N.key===de.key?"":(""+de.key).replace(V,"$&/")+"/")+X)),z.push(de)),1;X=0;var P=ie===""?".":ie+":";if(D(N))for(var he=0;he<N.length;he++)ie=N[he],G=P+ee(ie,he),X+=q(ie,z,Q,G,de);else if(he=x(N),typeof he=="function")for(N=he.call(N),he=0;!(ie=N.next()).done;)ie=ie.value,G=P+ee(ie,he++),X+=q(ie,z,Q,G,de);else if(G==="object"){if(typeof N.then=="function")return q(ne(N),z,Q,ie,de);throw z=String(N),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return X}function Z(N,z,Q){if(N==null)return N;var ie=[],de=0;return q(N,ie,"","",function(G){return z.call(Q,G,de++)}),ie}function K(N){if(N._status===-1){var z=N._result;z=z(),z.then(function(Q){(N._status===0||N._status===-1)&&(N._status=1,N._result=Q)},function(Q){(N._status===0||N._status===-1)&&(N._status=2,N._result=Q)}),N._status===-1&&(N._status=0,N._result=z)}if(N._status===1)return N._result.default;throw N._result}var j=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},U={map:Z,forEach:function(N,z,Q){Z(N,function(){z.apply(this,arguments)},Q)},count:function(N){var z=0;return Z(N,function(){z++}),z},toArray:function(N){return Z(N,function(z){return z})||[]},only:function(N){if(!F(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Ne.Activity=v,Ne.Children=U,Ne.Component=m,Ne.Fragment=a,Ne.Profiler=d,Ne.PureComponent=g,Ne.StrictMode=l,Ne.Suspense=c,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(N){return T.H.useMemoCache(N)}},Ne.cache=function(N){return function(){return N.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(N,z,Q){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ie=b({},N.props),de=N.key;if(z!=null)for(G in z.key!==void 0&&(de=""+z.key),z)!E.call(z,G)||G==="key"||G==="__self"||G==="__source"||G==="ref"&&z.ref===void 0||(ie[G]=z[G]);var G=arguments.length-2;if(G===1)ie.children=Q;else if(1<G){for(var X=Array(G),P=0;P<G;P++)X[P]=arguments[P+2];ie.children=X}return B(N.type,de,ie)},Ne.createContext=function(N){return N={$$typeof:S,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:y,_context:N},N},Ne.createElement=function(N,z,Q){var ie,de={},G=null;if(z!=null)for(ie in z.key!==void 0&&(G=""+z.key),z)E.call(z,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(de[ie]=z[ie]);var X=arguments.length-2;if(X===1)de.children=Q;else if(1<X){for(var P=Array(X),he=0;he<X;he++)P[he]=arguments[he+2];de.children=P}if(N&&N.defaultProps)for(ie in X=N.defaultProps,X)de[ie]===void 0&&(de[ie]=X[ie]);return B(N,G,de)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(N){return{$$typeof:o,render:N}},Ne.isValidElement=F,Ne.lazy=function(N){return{$$typeof:C,_payload:{_status:-1,_result:N},_init:K}},Ne.memo=function(N,z){return{$$typeof:u,type:N,compare:z===void 0?null:z}},Ne.startTransition=function(N){var z=T.T,Q={};T.T=Q;try{var ie=N(),de=T.S;de!==null&&de(Q,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(L,j)}catch(G){j(G)}finally{z!==null&&Q.types!==null&&(z.types=Q.types),T.T=z}},Ne.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Ne.use=function(N){return T.H.use(N)},Ne.useActionState=function(N,z,Q){return T.H.useActionState(N,z,Q)},Ne.useCallback=function(N,z){return T.H.useCallback(N,z)},Ne.useContext=function(N){return T.H.useContext(N)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(N,z){return T.H.useDeferredValue(N,z)},Ne.useEffect=function(N,z){return T.H.useEffect(N,z)},Ne.useEffectEvent=function(N){return T.H.useEffectEvent(N)},Ne.useId=function(){return T.H.useId()},Ne.useImperativeHandle=function(N,z,Q){return T.H.useImperativeHandle(N,z,Q)},Ne.useInsertionEffect=function(N,z){return T.H.useInsertionEffect(N,z)},Ne.useLayoutEffect=function(N,z){return T.H.useLayoutEffect(N,z)},Ne.useMemo=function(N,z){return T.H.useMemo(N,z)},Ne.useOptimistic=function(N,z){return T.H.useOptimistic(N,z)},Ne.useReducer=function(N,z,Q){return T.H.useReducer(N,z,Q)},Ne.useRef=function(N){return T.H.useRef(N)},Ne.useState=function(N){return T.H.useState(N)},Ne.useSyncExternalStore=function(N,z,Q){return T.H.useSyncExternalStore(N,z,Q)},Ne.useTransition=function(){return T.H.useTransition()},Ne.version="19.2.3",Ne}var Jv;function kf(){return Jv||(Jv=1,Ph.exports=gC()),Ph.exports}var k=kf();const Pi=Lf(k),dc=mC({__proto__:null,default:Pi},[k]);var Uh={exports:{}},Ya={},Ih={exports:{}},Fh={};var eg;function _C(){return eg||(eg=1,(function(r){function n(q,Z){var K=q.length;q.push(Z);e:for(;0<K;){var j=K-1>>>1,U=q[j];if(0<d(U,Z))q[j]=Z,q[K]=U,K=j;else break e}}function a(q){return q.length===0?null:q[0]}function l(q){if(q.length===0)return null;var Z=q[0],K=q.pop();if(K!==Z){q[0]=K;e:for(var j=0,U=q.length,N=U>>>1;j<N;){var z=2*(j+1)-1,Q=q[z],ie=z+1,de=q[ie];if(0>d(Q,K))ie<U&&0>d(de,Q)?(q[j]=de,q[ie]=K,j=ie):(q[j]=Q,q[z]=K,j=z);else if(ie<U&&0>d(de,K))q[j]=de,q[ie]=K,j=ie;else break e}}return Z}function d(q,Z){var K=q.sortIndex-Z.sortIndex;return K!==0?K:q.id-Z.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;r.unstable_now=function(){return y.now()}}else{var S=Date,o=S.now();r.unstable_now=function(){return S.now()-o}}var c=[],u=[],C=1,v=null,w=3,x=!1,R=!1,b=!1,h=!1,m=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function A(q){for(var Z=a(u);Z!==null;){if(Z.callback===null)l(u);else if(Z.startTime<=q)l(u),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=a(u)}}function D(q){if(b=!1,A(q),!R)if(a(c)!==null)R=!0,L||(L=!0,I());else{var Z=a(u);Z!==null&&ne(D,Z.startTime-q)}}var L=!1,T=-1,E=5,B=-1;function W(){return h?!0:!(r.unstable_now()-B<E)}function F(){if(h=!1,L){var q=r.unstable_now();B=q;var Z=!0;try{e:{R=!1,b&&(b=!1,p(T),T=-1),x=!0;var K=w;try{t:{for(A(q),v=a(c);v!==null&&!(v.expirationTime>q&&W());){var j=v.callback;if(typeof j=="function"){v.callback=null,w=v.priorityLevel;var U=j(v.expirationTime<=q);if(q=r.unstable_now(),typeof U=="function"){v.callback=U,A(q),Z=!0;break t}v===a(c)&&l(c),A(q)}else l(c);v=a(c)}if(v!==null)Z=!0;else{var N=a(u);N!==null&&ne(D,N.startTime-q),Z=!1}}break e}finally{v=null,w=K,x=!1}Z=void 0}}finally{Z?I():L=!1}}}var I;if(typeof g=="function")I=function(){g(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,ee=V.port2;V.port1.onmessage=F,I=function(){ee.postMessage(null)}}else I=function(){m(F,0)};function ne(q,Z){T=m(function(){q(r.unstable_now())},Z)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(q){q.callback=null},r.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<q?Math.floor(1e3/q):5},r.unstable_getCurrentPriorityLevel=function(){return w},r.unstable_next=function(q){switch(w){case 1:case 2:case 3:var Z=3;break;default:Z=w}var K=w;w=Z;try{return q()}finally{w=K}},r.unstable_requestPaint=function(){h=!0},r.unstable_runWithPriority=function(q,Z){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var K=w;w=q;try{return Z()}finally{w=K}},r.unstable_scheduleCallback=function(q,Z,K){var j=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?j+K:j):K=j,q){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=K+U,q={id:C++,callback:Z,priorityLevel:q,startTime:K,expirationTime:U,sortIndex:-1},K>j?(q.sortIndex=K,n(u,q),a(c)===null&&q===a(u)&&(b?(p(T),T=-1):b=!0,ne(D,K-j))):(q.sortIndex=U,n(c,q),R||x||(R=!0,L||(L=!0,I()))),q},r.unstable_shouldYield=W,r.unstable_wrapCallback=function(q){var Z=w;return function(){var K=w;w=Z;try{return q.apply(this,arguments)}finally{w=K}}}})(Fh)),Fh}var tg;function yC(){return tg||(tg=1,Ih.exports=_C()),Ih.exports}var qh={exports:{}},Xt={};var rg;function SC(){if(rg)return Xt;rg=1;var r=kf();function n(c){var u="https://react.dev/errors/"+c;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var C=2;C<arguments.length;C++)u+="&args[]="+encodeURIComponent(arguments[C])}return"Minified React error #"+c+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},d=Symbol.for("react.portal");function y(c,u,C){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:v==null?null:""+v,children:c,containerInfo:u,implementation:C}}var S=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(c,u){if(c==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return Xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Xt.createPortal=function(c,u){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(n(299));return y(c,u,null,C)},Xt.flushSync=function(c){var u=S.T,C=l.p;try{if(S.T=null,l.p=2,c)return c()}finally{S.T=u,l.p=C,l.d.f()}},Xt.preconnect=function(c,u){typeof c=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,l.d.C(c,u))},Xt.prefetchDNS=function(c){typeof c=="string"&&l.d.D(c)},Xt.preinit=function(c,u){if(typeof c=="string"&&u&&typeof u.as=="string"){var C=u.as,v=o(C,u.crossOrigin),w=typeof u.integrity=="string"?u.integrity:void 0,x=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;C==="style"?l.d.S(c,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:x}):C==="script"&&l.d.X(c,{crossOrigin:v,integrity:w,fetchPriority:x,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},Xt.preinitModule=function(c,u){if(typeof c=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var C=o(u.as,u.crossOrigin);l.d.M(c,{crossOrigin:C,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&l.d.M(c)},Xt.preload=function(c,u){if(typeof c=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var C=u.as,v=o(C,u.crossOrigin);l.d.L(c,C,{crossOrigin:v,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},Xt.preloadModule=function(c,u){if(typeof c=="string")if(u){var C=o(u.as,u.crossOrigin);l.d.m(c,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:C,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else l.d.m(c)},Xt.requestFormReset=function(c){l.d.r(c)},Xt.unstable_batchedUpdates=function(c,u){return c(u)},Xt.useFormState=function(c,u,C){return S.H.useFormState(c,u,C)},Xt.useFormStatus=function(){return S.H.useHostTransitionStatus()},Xt.version="19.2.3",Xt}var ig;function B_(){if(ig)return qh.exports;ig=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}return r(),qh.exports=SC(),qh.exports}var ng;function bC(){if(ng)return Ya;ng=1;var r=yC(),n=kf(),a=B_();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function S(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function o(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(y(e)!==e)throw Error(l(188))}function u(e){var t=e.alternate;if(!t){if(t=y(e),t===null)throw Error(l(188));return t!==e?null:e}for(var i=e,s=t;;){var f=i.return;if(f===null)break;var _=f.alternate;if(_===null){if(s=f.return,s!==null){i=s;continue}break}if(f.child===_.child){for(_=f.child;_;){if(_===i)return c(f),e;if(_===s)return c(f),t;_=_.sibling}throw Error(l(188))}if(i.return!==s.return)i=f,s=_;else{for(var M=!1,H=f.child;H;){if(H===i){M=!0,i=f,s=_;break}if(H===s){M=!0,s=f,i=_;break}H=H.sibling}if(!M){for(H=_.child;H;){if(H===i){M=!0,i=_,s=f;break}if(H===s){M=!0,s=_,i=f;break}H=H.sibling}if(!M)throw Error(l(189))}}if(i.alternate!==s)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?e:t}function C(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),g=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function I(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var V=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case b:return"Fragment";case m:return"Profiler";case h:return"StrictMode";case D:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case g:return e.displayName||"Context";case p:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case E:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var ne=Array.isArray,q=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},j=[],U=-1;function N(e){return{current:e}}function z(e){0>U||(e.current=j[U],j[U]=null,U--)}function Q(e,t){U++,j[U]=e.current,e.current=t}var ie=N(null),de=N(null),G=N(null),X=N(null);function P(e,t){switch(Q(G,t),Q(de,e),Q(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yv(t),e=Sv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}z(ie),Q(ie,e)}function he(){z(ie),z(de),z(G)}function ge(e){e.memoizedState!==null&&Q(X,e);var t=ie.current,i=Sv(t,e.type);t!==i&&(Q(de,e),Q(ie,i))}function oe(e){de.current===e&&(z(ie),z(de)),X.current===e&&(z(X),Wa._currentValue=K)}var me,Ce;function ze(e){if(me===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||"",Ce=-1<i.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
3
|
`+me+e+Ce}var ct=!1;function tt(e,t){if(!e||ct)return"";ct=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(ue){var le=ue}Reflect.construct(e,[],ve)}else{try{ve.call()}catch(ue){le=ue}e.call(ve.prototype)}}else{try{throw Error()}catch(ue){le=ue}(ve=e())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(ue){if(ue&&le&&typeof ue.stack=="string")return[ue.stack,le.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=s.DetermineComponentFrameRoot(),M=_[0],H=_[1];if(M&&H){var $=M.split(`
|
|
4
4
|
`),ae=H.split(`
|
|
5
5
|
`);for(f=s=0;s<$.length&&!$[s].includes("DetermineComponentFrameRoot");)s++;for(;f<ae.length&&!ae[f].includes("DetermineComponentFrameRoot");)f++;if(s===$.length||f===ae.length)for(s=$.length-1,f=ae.length-1;1<=s&&0<=f&&$[s]!==ae[f];)f--;for(;1<=s&&0<=f;s--,f--)if($[s]!==ae[f]){if(s!==1||f!==1)do if(s--,f--,0>f||$[s]!==ae[f]){var fe=`
|
|
6
|
-
`+$[s].replace(" at new "," at ");return e.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",e.displayName)),fe}while(1<=s&&0<=f);break}}}finally{ct=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ze(i):""}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return ze(e.type);case 16:return ze("Lazy");case 13:return e.child!==t&&t!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return tt(e.type,!1);case 11:return tt(e.type.render,!1);case 1:return tt(e.type,!0);case 31:return ze("Activity");default:return""}}function
|
|
6
|
+
`+$[s].replace(" at new "," at ");return e.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",e.displayName)),fe}while(1<=s&&0<=f);break}}}finally{ct=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ze(i):""}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return ze(e.type);case 16:return ze("Lazy");case 13:return e.child!==t&&t!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return tt(e.type,!1);case 11:return tt(e.type.render,!1);case 1:return tt(e.type,!0);case 31:return ze("Activity");default:return""}}function Qr(e){try{var t="",i=null;do t+=ke(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
7
|
Error generating stack: `+s.message+`
|
|
8
|
-
`+s.stack}}var Zr=Object.prototype.hasOwnProperty,mi=r.unstable_scheduleCallback,pi=r.unstable_cancelCallback,Wi=r.unstable_shouldYield,Gt=r.unstable_requestPaint,ut=r.unstable_now,Nt=r.unstable_getCurrentPriorityLevel,Ur=r.unstable_ImmediatePriority,Jr=r.unstable_UserBlockingPriority,gt=r.unstable_NormalPriority,$t=r.unstable_LowPriority,er=r.unstable_IdlePriority,vi=r.log,rt=r.unstable_setDisableYieldValue,gi=null,_t=null;function Ir(e){if(typeof vi=="function"&&rt(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(gi,e)}catch{}}var Yt=Math.clz32?Math.clz32:Co,bo=Math.log,Tc=Math.LN2;function Co(e){return e>>>=0,e===0?32:31-(bo(e)/Tc|0)|0}var _i=256,Dn=262144,Vi=4194304;function yi(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function On(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var f=0,_=e.suspendedLanes,M=e.pingedLanes;e=e.warmLanes;var H=s&134217727;return H!==0?(s=H&~_,s!==0?f=yi(s):(M&=H,M!==0?f=yi(M):i||(i=H&~e,i!==0&&(f=yi(i))))):(H=s&~_,H!==0?f=yi(H):M!==0?f=yi(M):i||(i=s&~e,i!==0&&(f=yi(i)))),f===0?0:t!==0&&t!==f&&(t&_)===0&&(_=f&-f,i=t&-t,_>=i||_===32&&(i&4194048)!==0)?t:f}function Mn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wo(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ln(){var e=Vi;return Vi<<=1,(Vi&62914560)===0&&(Vi=4194304),e}function Ki(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Gi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Dc(e,t,i,s,f,_){var M=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var H=e.entanglements,$=e.expirationTimes,ae=e.hiddenUpdates;for(i=M&~i;0<i;){var fe=31-Yt(i),ve=1<<fe;H[fe]=0,$[fe]=-1;var le=ae[fe];if(le!==null)for(ae[fe]=null,fe=0;fe<le.length;fe++){var ue=le[fe];ue!==null&&(ue.lane&=-536870913)}i&=~ve}s!==0&&xo(e,s,0),_!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=_&~(M&~t))}function xo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Yt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Y(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Yt(i),f=1<<s;f&t|e[s]&t&&(e[s]|=t),i&=~f}}function re(e,t){var i=t&-t;return i=(i&42)!==0?1:ce(i),(i&(e.suspendedLanes|t))!==0?0:i}function ce(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function _e(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ye(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:qv(e.type))}function De(e,t){var i=Z.p;try{return Z.p=e,t()}finally{Z.p=i}}var we=Math.random().toString(36).slice(2),Se="__reactFiber$"+we,be="__reactProps$"+we,Te="__reactContainer$"+we,Oe="__reactEvents$"+we,Me="__reactListeners$"+we,Ge="__reactHandles$"+we,it="__reactResources$"+we,dt="__reactMarker$"+we;function yt(e){delete e[Se],delete e[be],delete e[Oe],delete e[Me],delete e[Ge]}function Ye(e){var t=e[Se];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Te]||i[Se]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Av(e);e!==null;){if(i=e[Se])return i;e=Av(e)}return t}e=i,i=e.parentNode}return null}function Qe(e){if(e=e[Se]||e[Te]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function cr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function wr(e){var t=e[it];return t||(t=e[it]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ht(e){e[dt]=!0}var ur=new Set,ls={};function hr(e,t){tr(e,t),tr(e+"Capture",t)}function tr(e,t){for(ls[e]=t,e=0;e<t.length;e++)ur.add(t[e])}var cs=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]*$"),kn={},We={};function jt(e){return Zr.call(We,e)?!0:Zr.call(kn,e)?!1:cs.test(e)?We[e]=!0:(kn[e]=!0,!1)}function Fr(e,t,i){if(jt(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function xr(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Xe(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Ut(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function aa(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Oc(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,_=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(M){i=""+M,_.call(this,M)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(M){i=""+M},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mc(e){if(!e._valueTracker){var t=aa(e)?"checked":"value";e._valueTracker=Oc(e,t,""+e[t])}}function fd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=aa(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Eo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var lS=/[\n"\\]/g;function Er(e){return e.replace(lS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Lc(e,t,i,s,f,_,M,H){e.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.type=M:e.removeAttribute("type"),t!=null?M==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ut(t)):e.value!==""+Ut(t)&&(e.value=""+Ut(t)):M!=="submit"&&M!=="reset"||e.removeAttribute("value"),t!=null?kc(e,M,Ut(t)):i!=null?kc(e,M,Ut(i)):s!=null&&e.removeAttribute("value"),f==null&&_!=null&&(e.defaultChecked=!!_),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?e.name=""+Ut(H):e.removeAttribute("name")}function dd(e,t,i,s,f,_,M,H){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(e.type=_),t!=null||i!=null){if(!(_!=="submit"&&_!=="reset"||t!=null)){Mc(e);return}i=i!=null?""+Ut(i):"",t=t!=null?""+Ut(t):i,H||t===e.value||(e.value=t),e.defaultValue=t}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=H?e.checked:!!s,e.defaultChecked=!!s,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(e.name=M),Mc(e)}function kc(e,t,i){t==="number"&&Eo(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function us(e,t,i,s){if(e=e.options,t){t={};for(var f=0;f<i.length;f++)t["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=t.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Ut(i),t=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,s&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function md(e,t,i){if(t!=null&&(t=""+Ut(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Ut(i):""}function pd(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(l(92));if(ne(s)){if(1<s.length)throw Error(l(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Ut(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Mc(e)}function hs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var cS=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 vd(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||cS.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function gd(e,t,i){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var f in t)s=t[f],t.hasOwnProperty(f)&&i[f]!==s&&vd(e,f,s)}else for(var _ in t)t.hasOwnProperty(_)&&vd(e,_,t[_])}function Bc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var uS=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"]]),hS=/^[\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 Ro(e){return hS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Si(){}var Nc=null;function jc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fs=null,ds=null;function _d(e){var t=Qe(e);if(t&&(e=t.stateNode)){var i=e[be]||null;e:switch(e=t.stateNode,t.type){case"input":if(Lc(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Er(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var f=s[be]||null;if(!f)throw Error(l(90));Lc(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&fd(s)}break e;case"textarea":md(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&us(e,!!i.multiple,t,!1)}}}var Hc=!1;function yd(e,t,i){if(Hc)return e(t,i);Hc=!0;try{var s=e(t);return s}finally{if(Hc=!1,(fs!==null||ds!==null)&&(dl(),fs&&(t=fs,e=ds,ds=fs=null,_d(t),e)))for(t=0;t<e.length;t++)_d(e[t])}}function oa(e,t){var i=e.stateNode;if(i===null)return null;var s=i[be]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(l(231,t,typeof i));return i}var bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zc=!1;if(bi)try{var la={};Object.defineProperty(la,"passive",{get:function(){zc=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{zc=!1}var $i=null,Pc=null,Ao=null;function Sd(){if(Ao)return Ao;var e,t=Pc,i=t.length,s,f="value"in $i?$i.value:$i.textContent,_=f.length;for(e=0;e<i&&t[e]===f[e];e++);var M=i-e;for(s=1;s<=M&&t[i-s]===f[_-s];s++);return Ao=f.slice(e,1<s?1-s:void 0)}function To(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Do(){return!0}function bd(){return!1}function rr(e){function t(i,s,f,_,M){this._reactName=i,this._targetInst=f,this.type=s,this.nativeEvent=_,this.target=M,this.currentTarget=null;for(var H in e)e.hasOwnProperty(H)&&(i=e[H],this[H]=i?i(_):_[H]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Do:bd,this.isPropagationStopped=bd,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Do)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Do)},persist:function(){},isPersistent:Do}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Oo=rr(Bn),ca=v({},Bn,{view:0,detail:0}),fS=rr(ca),Uc,Ic,ua,Mo=v({},ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ua&&(ua&&e.type==="mousemove"?(Uc=e.screenX-ua.screenX,Ic=e.screenY-ua.screenY):Ic=Uc=0,ua=e),Uc)},movementY:function(e){return"movementY"in e?e.movementY:Ic}}),Cd=rr(Mo),dS=v({},Mo,{dataTransfer:0}),mS=rr(dS),pS=v({},ca,{relatedTarget:0}),Fc=rr(pS),vS=v({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0}),gS=rr(vS),_S=v({},Bn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yS=rr(_S),SS=v({},Bn,{data:0}),wd=rr(SS),bS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},CS={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"},wS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wS[e])?!!t[e]:!1}function qc(){return xS}var ES=v({},ca,{key:function(e){if(e.key){var t=bS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=To(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?CS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qc,charCode:function(e){return e.type==="keypress"?To(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?To(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),RS=rr(ES),AS=v({},Mo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xd=rr(AS),TS=v({},ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qc}),DS=rr(TS),OS=v({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),MS=rr(OS),LS=v({},Mo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kS=rr(LS),BS=v({},Bn,{newState:0,oldState:0}),NS=rr(BS),jS=[9,13,27,32],Wc=bi&&"CompositionEvent"in window,ha=null;bi&&"documentMode"in document&&(ha=document.documentMode);var HS=bi&&"TextEvent"in window&&!ha,Ed=bi&&(!Wc||ha&&8<ha&&11>=ha),Rd=" ",Ad=!1;function Td(e,t){switch(e){case"keyup":return jS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ms=!1;function zS(e,t){switch(e){case"compositionend":return Dd(t);case"keypress":return t.which!==32?null:(Ad=!0,Rd);case"textInput":return e=t.data,e===Rd&&Ad?null:e;default:return null}}function PS(e,t){if(ms)return e==="compositionend"||!Wc&&Td(e,t)?(e=Sd(),Ao=Pc=$i=null,ms=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ed&&t.locale!=="ko"?null:t.data;default:return null}}var US={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 Od(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!US[e.type]:t==="textarea"}function Md(e,t,i,s){fs?ds?ds.push(s):ds=[s]:fs=s,t=Sl(t,"onChange"),0<t.length&&(i=new Oo("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var fa=null,da=null;function IS(e){dv(e,0)}function Lo(e){var t=cr(e);if(fd(t))return e}function Ld(e,t){if(e==="change")return t}var kd=!1;if(bi){var Vc;if(bi){var Kc="oninput"in document;if(!Kc){var Bd=document.createElement("div");Bd.setAttribute("oninput","return;"),Kc=typeof Bd.oninput=="function"}Vc=Kc}else Vc=!1;kd=Vc&&(!document.documentMode||9<document.documentMode)}function Nd(){fa&&(fa.detachEvent("onpropertychange",jd),da=fa=null)}function jd(e){if(e.propertyName==="value"&&Lo(da)){var t=[];Md(t,da,e,jc(e)),yd(IS,t)}}function FS(e,t,i){e==="focusin"?(Nd(),fa=t,da=i,fa.attachEvent("onpropertychange",jd)):e==="focusout"&&Nd()}function qS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lo(da)}function WS(e,t){if(e==="click")return Lo(t)}function VS(e,t){if(e==="input"||e==="change")return Lo(t)}function KS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fr=typeof Object.is=="function"?Object.is:KS;function ma(e,t){if(fr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var f=i[s];if(!Zr.call(t,f)||!fr(e[f],t[f]))return!1}return!0}function Hd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zd(e,t){var i=Hd(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Hd(i)}}function Pd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ud(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Eo(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Eo(e.document)}return t}function Gc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var GS=bi&&"documentMode"in document&&11>=document.documentMode,ps=null,$c=null,pa=null,Yc=!1;function Id(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Yc||ps==null||ps!==Eo(s)||(s=ps,"selectionStart"in s&&Gc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),pa&&ma(pa,s)||(pa=s,s=Sl($c,"onSelect"),0<s.length&&(t=new Oo("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=ps)))}function Nn(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var vs={animationend:Nn("Animation","AnimationEnd"),animationiteration:Nn("Animation","AnimationIteration"),animationstart:Nn("Animation","AnimationStart"),transitionrun:Nn("Transition","TransitionRun"),transitionstart:Nn("Transition","TransitionStart"),transitioncancel:Nn("Transition","TransitionCancel"),transitionend:Nn("Transition","TransitionEnd")},Qc={},Fd={};bi&&(Fd=document.createElement("div").style,"AnimationEvent"in window||(delete vs.animationend.animation,delete vs.animationiteration.animation,delete vs.animationstart.animation),"TransitionEvent"in window||delete vs.transitionend.transition);function jn(e){if(Qc[e])return Qc[e];if(!vs[e])return e;var t=vs[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Fd)return Qc[e]=t[i];return e}var qd=jn("animationend"),Wd=jn("animationiteration"),Vd=jn("animationstart"),$S=jn("transitionrun"),YS=jn("transitionstart"),QS=jn("transitioncancel"),Kd=jn("transitionend"),Gd=new Map,Xc="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(" ");Xc.push("scrollEnd");function qr(e,t){Gd.set(e,t),hr(t,[e])}var ko=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Rr=[],gs=0,Zc=0;function Bo(){for(var e=gs,t=Zc=gs=0;t<e;){var i=Rr[t];Rr[t++]=null;var s=Rr[t];Rr[t++]=null;var f=Rr[t];Rr[t++]=null;var _=Rr[t];if(Rr[t++]=null,s!==null&&f!==null){var M=s.pending;M===null?f.next=f:(f.next=M.next,M.next=f),s.pending=f}_!==0&&$d(i,f,_)}}function No(e,t,i,s){Rr[gs++]=e,Rr[gs++]=t,Rr[gs++]=i,Rr[gs++]=s,Zc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Jc(e,t,i,s){return No(e,t,i,s),jo(e)}function Hn(e,t){return No(e,null,null,t),jo(e)}function $d(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var f=!1,_=e.return;_!==null;)_.childLanes|=i,s=_.alternate,s!==null&&(s.childLanes|=i),_.tag===22&&(e=_.stateNode,e===null||e._visibility&1||(f=!0)),e=_,_=_.return;return e.tag===3?(_=e.stateNode,f&&t!==null&&(f=31-Yt(i),e=_.hiddenUpdates,s=e[f],s===null?e[f]=[t]:s.push(t),t.lane=i|536870912),_):null}function jo(e){if(50<Ha)throw Ha=0,lh=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _s={};function XS(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(e,t,i,s){return new XS(e,t,i,s)}function eu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var i=e.alternate;return i===null?(i=dr(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Yd(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ho(e,t,i,s,f,_){var M=0;if(s=e,typeof e=="function")eu(e)&&(M=1);else if(typeof e=="string")M=rC(e,i,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=dr(31,i,t,f),e.elementType=B,e.lanes=_,e;case b:return zn(i.children,f,_,t);case h:M=8,f|=24;break;case m:return e=dr(12,i,t,f|2),e.elementType=m,e.lanes=_,e;case D:return e=dr(13,i,t,f),e.elementType=D,e.lanes=_,e;case L:return e=dr(19,i,t,f),e.elementType=L,e.lanes=_,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case g:M=10;break e;case p:M=9;break e;case A:M=11;break e;case T:M=14;break e;case E:M=16,s=null;break e}M=29,i=Error(l(130,e===null?"null":typeof e,"")),s=null}return t=dr(M,i,t,f),t.elementType=e,t.type=s,t.lanes=_,t}function zn(e,t,i,s){return e=dr(7,e,s,t),e.lanes=i,e}function tu(e,t,i){return e=dr(6,e,null,t),e.lanes=i,e}function Qd(e){var t=dr(18,null,null,0);return t.stateNode=e,t}function ru(e,t,i){return t=dr(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xd=new WeakMap;function Ar(e,t){if(typeof e=="object"&&e!==null){var i=Xd.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Xr(t)},Xd.set(e,t),t)}return{value:e,source:t,stack:Xr(t)}}var ys=[],Ss=0,zo=null,va=0,Tr=[],Dr=0,Yi=null,ei=1,ti="";function wi(e,t){ys[Ss++]=va,ys[Ss++]=zo,zo=e,va=t}function Zd(e,t,i){Tr[Dr++]=ei,Tr[Dr++]=ti,Tr[Dr++]=Yi,Yi=e;var s=ei;e=ti;var f=32-Yt(s)-1;s&=~(1<<f),i+=1;var _=32-Yt(t)+f;if(30<_){var M=f-f%5;_=(s&(1<<M)-1).toString(32),s>>=M,f-=M,ei=1<<32-Yt(t)+f|i<<f|s,ti=_+e}else ei=1<<_|i<<f|s,ti=e}function iu(e){e.return!==null&&(wi(e,1),Zd(e,1,0))}function nu(e){for(;e===zo;)zo=ys[--Ss],ys[Ss]=null,va=ys[--Ss],ys[Ss]=null;for(;e===Yi;)Yi=Tr[--Dr],Tr[Dr]=null,ti=Tr[--Dr],Tr[Dr]=null,ei=Tr[--Dr],Tr[Dr]=null}function Jd(e,t){Tr[Dr++]=ei,Tr[Dr++]=ti,Tr[Dr++]=Yi,ei=t.id,ti=t.overflow,Yi=e}var It=null,mt=null,$e=!1,Qi=null,Or=!1,su=Error(l(519));function Xi(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ga(Ar(t,e)),su}function em(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[Se]=e,t[be]=s,i){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(i=0;i<Pa.length;i++)qe(Pa[i],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),dd(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),pd(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||gv(t.textContent,i)?(s.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),s.onScroll!=null&&qe("scroll",t),s.onScrollEnd!=null&&qe("scrollend",t),s.onClick!=null&&(t.onclick=Si),t=!0):t=!1,t||Xi(e,!0)}function tm(e){for(It=e.return;It;)switch(It.tag){case 5:case 31:case 13:Or=!1;return;case 27:case 3:Or=!0;return;default:It=It.return}}function bs(e){if(e!==It)return!1;if(!$e)return tm(e),$e=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||wh(e.type,e.memoizedProps)),i=!i),i&&mt&&Xi(e),tm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));mt=Rv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));mt=Rv(e)}else t===27?(t=mt,fn(e.type)?(e=Th,Th=null,mt=e):mt=t):mt=It?Lr(e.stateNode.nextSibling):null;return!0}function Pn(){mt=It=null,$e=!1}function au(){var e=Qi;return e!==null&&(ar===null?ar=e:ar.push.apply(ar,e),Qi=null),e}function ga(e){Qi===null?Qi=[e]:Qi.push(e)}var ou=N(null),Un=null,xi=null;function Zi(e,t,i){X(ou,t._currentValue),t._currentValue=i}function Ei(e){e._currentValue=ou.current,z(ou)}function lu(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function cu(e,t,i,s){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var _=f.dependencies;if(_!==null){var M=f.child;_=_.firstContext;e:for(;_!==null;){var H=_;_=f;for(var $=0;$<t.length;$++)if(H.context===t[$]){_.lanes|=i,H=_.alternate,H!==null&&(H.lanes|=i),lu(_.return,i,e),s||(M=null);break e}_=H.next}}else if(f.tag===18){if(M=f.return,M===null)throw Error(l(341));M.lanes|=i,_=M.alternate,_!==null&&(_.lanes|=i),lu(M,i,e),M=null}else M=f.child;if(M!==null)M.return=f;else for(M=f;M!==null;){if(M===e){M=null;break}if(f=M.sibling,f!==null){f.return=M.return,M=f;break}M=M.return}f=M}}function Cs(e,t,i,s){e=null;for(var f=t,_=!1;f!==null;){if(!_){if((f.flags&524288)!==0)_=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var M=f.alternate;if(M===null)throw Error(l(387));if(M=M.memoizedProps,M!==null){var H=f.type;fr(f.pendingProps.value,M.value)||(e!==null?e.push(H):e=[H])}}else if(f===Q.current){if(M=f.alternate,M===null)throw Error(l(387));M.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Wa):e=[Wa])}f=f.return}e!==null&&cu(t,e,i,s),t.flags|=262144}function Po(e){for(e=e.firstContext;e!==null;){if(!fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function In(e){Un=e,xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ft(e){return rm(Un,e)}function Uo(e,t){return Un===null&&In(e),rm(e,t)}function rm(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},xi===null){if(e===null)throw Error(l(308));xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xi=xi.next=t;return i}var ZS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},JS=r.unstable_scheduleCallback,eb=r.unstable_NormalPriority,At={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uu(){return{controller:new ZS,data:new Map,refCount:0}}function _a(e){e.refCount--,e.refCount===0&&JS(eb,function(){e.controller.abort()})}var ya=null,hu=0,ws=0,xs=null;function tb(e,t){if(ya===null){var i=ya=[];hu=0,ws=mh(),xs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return hu++,t.then(im,im),t}function im(){if(--hu===0&&ya!==null){xs!==null&&(xs.status="fulfilled");var e=ya;ya=null,ws=0,xs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function rb(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var f=0;f<i.length;f++)(0,i[f])(t)},function(f){for(s.status="rejected",s.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),s}var nm=q.S;q.S=function(e,t){Ip=ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&tb(e,t),nm!==null&&nm(e,t)};var Fn=N(null);function fu(){var e=Fn.current;return e!==null?e:ft.pooledCache}function Io(e,t){t===null?X(Fn,Fn.current):X(Fn,t.pool)}function sm(){var e=fu();return e===null?null:{parent:At._currentValue,pool:e}}var Es=Error(l(460)),du=Error(l(474)),Fo=Error(l(542)),qo={then:function(){}};function am(e){return e=e.status,e==="fulfilled"||e==="rejected"}function om(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Si,Si),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cm(e),e;default:if(typeof t.status=="string")t.then(Si,Si);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=s}},function(s){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cm(e),e}throw Wn=t,Es}}function qn(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Wn=i,Es):i}}var Wn=null;function lm(){if(Wn===null)throw Error(l(459));var e=Wn;return Wn=null,e}function cm(e){if(e===Es||e===Fo)throw Error(l(483))}var Rs=null,Sa=0;function Wo(e){var t=Sa;return Sa+=1,Rs===null&&(Rs=[]),om(Rs,e,t)}function ba(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Vo(e,t){throw t.$$typeof===w?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function um(e){function t(te,J){if(e){var se=te.deletions;se===null?(te.deletions=[J],te.flags|=16):se.push(J)}}function i(te,J){if(!e)return null;for(;J!==null;)t(te,J),J=J.sibling;return null}function s(te){for(var J=new Map;te!==null;)te.key!==null?J.set(te.key,te):J.set(te.index,te),te=te.sibling;return J}function f(te,J){return te=Ci(te,J),te.index=0,te.sibling=null,te}function _(te,J,se){return te.index=se,e?(se=te.alternate,se!==null?(se=se.index,se<J?(te.flags|=67108866,J):se):(te.flags|=67108866,J)):(te.flags|=1048576,J)}function M(te){return e&&te.alternate===null&&(te.flags|=67108866),te}function H(te,J,se,pe){return J===null||J.tag!==6?(J=tu(se,te.mode,pe),J.return=te,J):(J=f(J,se),J.return=te,J)}function $(te,J,se,pe){var Le=se.type;return Le===b?fe(te,J,se.props.children,pe,se.key):J!==null&&(J.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===E&&qn(Le)===J.type)?(J=f(J,se.props),ba(J,se),J.return=te,J):(J=Ho(se.type,se.key,se.props,null,te.mode,pe),ba(J,se),J.return=te,J)}function ae(te,J,se,pe){return J===null||J.tag!==4||J.stateNode.containerInfo!==se.containerInfo||J.stateNode.implementation!==se.implementation?(J=ru(se,te.mode,pe),J.return=te,J):(J=f(J,se.children||[]),J.return=te,J)}function fe(te,J,se,pe,Le){return J===null||J.tag!==7?(J=zn(se,te.mode,pe,Le),J.return=te,J):(J=f(J,se),J.return=te,J)}function ve(te,J,se){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=tu(""+J,te.mode,se),J.return=te,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case x:return se=Ho(J.type,J.key,J.props,null,te.mode,se),ba(se,J),se.return=te,se;case R:return J=ru(J,te.mode,se),J.return=te,J;case E:return J=qn(J),ve(te,J,se)}if(ne(J)||I(J))return J=zn(J,te.mode,se,null),J.return=te,J;if(typeof J.then=="function")return ve(te,Wo(J),se);if(J.$$typeof===g)return ve(te,Uo(te,J),se);Vo(te,J)}return null}function le(te,J,se,pe){var Le=J!==null?J.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Le!==null?null:H(te,J,""+se,pe);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case x:return se.key===Le?$(te,J,se,pe):null;case R:return se.key===Le?ae(te,J,se,pe):null;case E:return se=qn(se),le(te,J,se,pe)}if(ne(se)||I(se))return Le!==null?null:fe(te,J,se,pe,null);if(typeof se.then=="function")return le(te,J,Wo(se),pe);if(se.$$typeof===g)return le(te,J,Uo(te,se),pe);Vo(te,se)}return null}function ue(te,J,se,pe,Le){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return te=te.get(se)||null,H(J,te,""+pe,Le);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case x:return te=te.get(pe.key===null?se:pe.key)||null,$(J,te,pe,Le);case R:return te=te.get(pe.key===null?se:pe.key)||null,ae(J,te,pe,Le);case E:return pe=qn(pe),ue(te,J,se,pe,Le)}if(ne(pe)||I(pe))return te=te.get(se)||null,fe(J,te,pe,Le,null);if(typeof pe.then=="function")return ue(te,J,se,Wo(pe),Le);if(pe.$$typeof===g)return ue(te,J,se,Uo(J,pe),Le);Vo(J,pe)}return null}function xe(te,J,se,pe){for(var Le=null,Ze=null,Ae=J,He=J=0,Ke=null;Ae!==null&&He<se.length;He++){Ae.index>He?(Ke=Ae,Ae=null):Ke=Ae.sibling;var Je=le(te,Ae,se[He],pe);if(Je===null){Ae===null&&(Ae=Ke);break}e&&Ae&&Je.alternate===null&&t(te,Ae),J=_(Je,J,He),Ze===null?Le=Je:Ze.sibling=Je,Ze=Je,Ae=Ke}if(He===se.length)return i(te,Ae),$e&&wi(te,He),Le;if(Ae===null){for(;He<se.length;He++)Ae=ve(te,se[He],pe),Ae!==null&&(J=_(Ae,J,He),Ze===null?Le=Ae:Ze.sibling=Ae,Ze=Ae);return $e&&wi(te,He),Le}for(Ae=s(Ae);He<se.length;He++)Ke=ue(Ae,te,He,se[He],pe),Ke!==null&&(e&&Ke.alternate!==null&&Ae.delete(Ke.key===null?He:Ke.key),J=_(Ke,J,He),Ze===null?Le=Ke:Ze.sibling=Ke,Ze=Ke);return e&&Ae.forEach(function(gn){return t(te,gn)}),$e&&wi(te,He),Le}function Be(te,J,se,pe){if(se==null)throw Error(l(151));for(var Le=null,Ze=null,Ae=J,He=J=0,Ke=null,Je=se.next();Ae!==null&&!Je.done;He++,Je=se.next()){Ae.index>He?(Ke=Ae,Ae=null):Ke=Ae.sibling;var gn=le(te,Ae,Je.value,pe);if(gn===null){Ae===null&&(Ae=Ke);break}e&&Ae&&gn.alternate===null&&t(te,Ae),J=_(gn,J,He),Ze===null?Le=gn:Ze.sibling=gn,Ze=gn,Ae=Ke}if(Je.done)return i(te,Ae),$e&&wi(te,He),Le;if(Ae===null){for(;!Je.done;He++,Je=se.next())Je=ve(te,Je.value,pe),Je!==null&&(J=_(Je,J,He),Ze===null?Le=Je:Ze.sibling=Je,Ze=Je);return $e&&wi(te,He),Le}for(Ae=s(Ae);!Je.done;He++,Je=se.next())Je=ue(Ae,te,He,Je.value,pe),Je!==null&&(e&&Je.alternate!==null&&Ae.delete(Je.key===null?He:Je.key),J=_(Je,J,He),Ze===null?Le=Je:Ze.sibling=Je,Ze=Je);return e&&Ae.forEach(function(dC){return t(te,dC)}),$e&&wi(te,He),Le}function lt(te,J,se,pe){if(typeof se=="object"&&se!==null&&se.type===b&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case x:e:{for(var Le=se.key;J!==null;){if(J.key===Le){if(Le=se.type,Le===b){if(J.tag===7){i(te,J.sibling),pe=f(J,se.props.children),pe.return=te,te=pe;break e}}else if(J.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===E&&qn(Le)===J.type){i(te,J.sibling),pe=f(J,se.props),ba(pe,se),pe.return=te,te=pe;break e}i(te,J);break}else t(te,J);J=J.sibling}se.type===b?(pe=zn(se.props.children,te.mode,pe,se.key),pe.return=te,te=pe):(pe=Ho(se.type,se.key,se.props,null,te.mode,pe),ba(pe,se),pe.return=te,te=pe)}return M(te);case R:e:{for(Le=se.key;J!==null;){if(J.key===Le)if(J.tag===4&&J.stateNode.containerInfo===se.containerInfo&&J.stateNode.implementation===se.implementation){i(te,J.sibling),pe=f(J,se.children||[]),pe.return=te,te=pe;break e}else{i(te,J);break}else t(te,J);J=J.sibling}pe=ru(se,te.mode,pe),pe.return=te,te=pe}return M(te);case E:return se=qn(se),lt(te,J,se,pe)}if(ne(se))return xe(te,J,se,pe);if(I(se)){if(Le=I(se),typeof Le!="function")throw Error(l(150));return se=Le.call(se),Be(te,J,se,pe)}if(typeof se.then=="function")return lt(te,J,Wo(se),pe);if(se.$$typeof===g)return lt(te,J,Uo(te,se),pe);Vo(te,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,J!==null&&J.tag===6?(i(te,J.sibling),pe=f(J,se),pe.return=te,te=pe):(i(te,J),pe=tu(se,te.mode,pe),pe.return=te,te=pe),M(te)):i(te,J)}return function(te,J,se,pe){try{Sa=0;var Le=lt(te,J,se,pe);return Rs=null,Le}catch(Ae){if(Ae===Es||Ae===Fo)throw Ae;var Ze=dr(29,Ae,null,te.mode);return Ze.lanes=pe,Ze.return=te,Ze}finally{}}}var Vn=um(!0),hm=um(!1),Ji=!1;function mu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function en(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function tn(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(et&2)!==0){var f=s.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),s.pending=t,t=jo(e),$d(e,null,i),t}return No(e,s,t,i),jo(e)}function Ca(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Y(e,i)}}function vu(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var f=null,_=null;if(i=i.firstBaseUpdate,i!==null){do{var M={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};_===null?f=_=M:_=_.next=M,i=i.next}while(i!==null);_===null?f=_=t:_=_.next=t}else f=_=t;i={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:_,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var gu=!1;function wa(){if(gu){var e=xs;if(e!==null)throw e}}function xa(e,t,i,s){gu=!1;var f=e.updateQueue;Ji=!1;var _=f.firstBaseUpdate,M=f.lastBaseUpdate,H=f.shared.pending;if(H!==null){f.shared.pending=null;var $=H,ae=$.next;$.next=null,M===null?_=ae:M.next=ae,M=$;var fe=e.alternate;fe!==null&&(fe=fe.updateQueue,H=fe.lastBaseUpdate,H!==M&&(H===null?fe.firstBaseUpdate=ae:H.next=ae,fe.lastBaseUpdate=$))}if(_!==null){var ve=f.baseState;M=0,fe=ae=$=null,H=_;do{var le=H.lane&-536870913,ue=le!==H.lane;if(ue?(Ve&le)===le:(s&le)===le){le!==0&&le===ws&&(gu=!0),fe!==null&&(fe=fe.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var xe=e,Be=H;le=t;var lt=i;switch(Be.tag){case 1:if(xe=Be.payload,typeof xe=="function"){ve=xe.call(lt,ve,le);break e}ve=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Be.payload,le=typeof xe=="function"?xe.call(lt,ve,le):xe,le==null)break e;ve=v({},ve,le);break e;case 2:Ji=!0}}le=H.callback,le!==null&&(e.flags|=64,ue&&(e.flags|=8192),ue=f.callbacks,ue===null?f.callbacks=[le]:ue.push(le))}else ue={lane:le,tag:H.tag,payload:H.payload,callback:H.callback,next:null},fe===null?(ae=fe=ue,$=ve):fe=fe.next=ue,M|=le;if(H=H.next,H===null){if(H=f.shared.pending,H===null)break;ue=H,H=ue.next,ue.next=null,f.lastBaseUpdate=ue,f.shared.pending=null}}while(!0);fe===null&&($=ve),f.baseState=$,f.firstBaseUpdate=ae,f.lastBaseUpdate=fe,_===null&&(f.shared.lanes=0),on|=M,e.lanes=M,e.memoizedState=ve}}function fm(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function dm(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)fm(i[e],t)}var As=N(null),Ko=N(0);function mm(e,t){e=Bi,X(Ko,e),X(As,t),Bi=e|t.baseLanes}function _u(){X(Ko,Bi),X(As,As.current)}function yu(){Bi=Ko.current,z(As),z(Ko)}var mr=N(null),Mr=null;function rn(e){var t=e.alternate;X(wt,wt.current&1),X(mr,e),Mr===null&&(t===null||As.current!==null||t.memoizedState!==null)&&(Mr=e)}function Su(e){X(wt,wt.current),X(mr,e),Mr===null&&(Mr=e)}function pm(e){e.tag===22?(X(wt,wt.current),X(mr,e),Mr===null&&(Mr=e)):nn()}function nn(){X(wt,wt.current),X(mr,mr.current)}function pr(e){z(mr),Mr===e&&(Mr=null),z(wt)}var wt=N(0);function Go(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Rh(i)||Ah(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ri=0,je=null,at=null,Tt=null,$o=!1,Ts=!1,Kn=!1,Yo=0,Ea=0,Ds=null,ib=0;function St(){throw Error(l(321))}function bu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!fr(e[i],t[i]))return!1;return!0}function Cu(e,t,i,s,f,_){return Ri=_,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Zm:Hu,Kn=!1,_=i(s,f),Kn=!1,Ts&&(_=gm(t,i,s,f)),vm(e),_}function vm(e){q.H=Ta;var t=at!==null&&at.next!==null;if(Ri=0,Tt=at=je=null,$o=!1,Ea=0,Ds=null,t)throw Error(l(300));e===null||Dt||(e=e.dependencies,e!==null&&Po(e)&&(Dt=!0))}function gm(e,t,i,s){je=e;var f=0;do{if(Ts&&(Ds=null),Ea=0,Ts=!1,25<=f)throw Error(l(301));if(f+=1,Tt=at=null,e.updateQueue!=null){var _=e.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}q.H=Jm,_=t(i,s)}while(Ts);return _}function nb(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?Ra(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(je.flags|=1024),t}function wu(){var e=Yo!==0;return Yo=0,e}function xu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Eu(e){if($o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$o=!1}Ri=0,Tt=at=je=null,Ts=!1,Ea=Yo=0,Ds=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?je.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function xt(){if(at===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Tt===null?je.memoizedState:Tt.next;if(t!==null)Tt=t,at=e;else{if(e===null)throw je.alternate===null?Error(l(467)):Error(l(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Tt===null?je.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Qo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ra(e){var t=Ea;return Ea+=1,Ds===null&&(Ds=[]),e=om(Ds,e,t),t=je,(Tt===null?t.memoizedState:Tt.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Zm:Hu),e}function Xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ra(e);if(e.$$typeof===g)return Ft(e)}throw Error(l(438,String(e)))}function Ru(e){var t=null,i=je.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=je.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Qo(),je.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=W;return t.index++,i}function Ai(e,t){return typeof t=="function"?t(e):t}function Zo(e){var t=xt();return Au(t,at,e)}function Au(e,t,i){var s=e.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=i;var f=e.baseQueue,_=s.pending;if(_!==null){if(f!==null){var M=f.next;f.next=_.next,_.next=M}t.baseQueue=f=_,s.pending=null}if(_=e.baseState,f===null)e.memoizedState=_;else{t=f.next;var H=M=null,$=null,ae=t,fe=!1;do{var ve=ae.lane&-536870913;if(ve!==ae.lane?(Ve&ve)===ve:(Ri&ve)===ve){var le=ae.revertLane;if(le===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),ve===ws&&(fe=!0);else if((Ri&le)===le){ae=ae.next,le===ws&&(fe=!0);continue}else ve={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},$===null?(H=$=ve,M=_):$=$.next=ve,je.lanes|=le,on|=le;ve=ae.action,Kn&&i(_,ve),_=ae.hasEagerState?ae.eagerState:i(_,ve)}else le={lane:ve,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},$===null?(H=$=le,M=_):$=$.next=le,je.lanes|=ve,on|=ve;ae=ae.next}while(ae!==null&&ae!==t);if($===null?M=_:$.next=H,!fr(_,e.memoizedState)&&(Dt=!0,fe&&(i=xs,i!==null)))throw i;e.memoizedState=_,e.baseState=M,e.baseQueue=$,s.lastRenderedState=_}return f===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Tu(e){var t=xt(),i=t.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=e;var s=i.dispatch,f=i.pending,_=t.memoizedState;if(f!==null){i.pending=null;var M=f=f.next;do _=e(_,M.action),M=M.next;while(M!==f);fr(_,t.memoizedState)||(Dt=!0),t.memoizedState=_,t.baseQueue===null&&(t.baseState=_),i.lastRenderedState=_}return[_,s]}function _m(e,t,i){var s=je,f=xt(),_=$e;if(_){if(i===void 0)throw Error(l(407));i=i()}else i=t();var M=!fr((at||f).memoizedState,i);if(M&&(f.memoizedState=i,Dt=!0),f=f.queue,Mu(bm.bind(null,s,f,e),[e]),f.getSnapshot!==t||M||Tt!==null&&Tt.memoizedState.tag&1){if(s.flags|=2048,Os(9,{destroy:void 0},Sm.bind(null,s,f,i,t),null),ft===null)throw Error(l(349));_||(Ri&127)!==0||ym(s,t,i)}return i}function ym(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=je.updateQueue,t===null?(t=Qo(),je.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Sm(e,t,i,s){t.value=i,t.getSnapshot=s,Cm(t)&&wm(e)}function bm(e,t,i){return i(function(){Cm(t)&&wm(e)})}function Cm(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!fr(e,i)}catch{return!0}}function wm(e){var t=Hn(e,2);t!==null&&or(t,e,2)}function Du(e){var t=Xt();if(typeof e=="function"){var i=e;if(e=i(),Kn){Ir(!0);try{i()}finally{Ir(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ai,lastRenderedState:e},t}function xm(e,t,i,s){return e.baseState=i,Au(e,at,typeof s=="function"?s:Ai)}function sb(e,t,i,s,f){if(tl(e))throw Error(l(485));if(e=t.action,e!==null){var _={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){_.listeners.push(M)}};q.T!==null?i(!0):_.isTransition=!1,s(_),i=t.pending,i===null?(_.next=t.pending=_,Em(t,_)):(_.next=i.next,t.pending=i.next=_)}}function Em(e,t){var i=t.action,s=t.payload,f=e.state;if(t.isTransition){var _=q.T,M={};q.T=M;try{var H=i(f,s),$=q.S;$!==null&&$(M,H),Rm(e,t,H)}catch(ae){Ou(e,t,ae)}finally{_!==null&&M.types!==null&&(_.types=M.types),q.T=_}}else try{_=i(f,s),Rm(e,t,_)}catch(ae){Ou(e,t,ae)}}function Rm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Am(e,t,s)},function(s){return Ou(e,t,s)}):Am(e,t,i)}function Am(e,t,i){t.status="fulfilled",t.value=i,Tm(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Em(e,i)))}function Ou(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Tm(t),t=t.next;while(t!==s)}e.action=null}function Tm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dm(e,t){return t}function Om(e,t){if($e){var i=ft.formState;if(i!==null){e:{var s=je;if($e){if(mt){t:{for(var f=mt,_=Or;f.nodeType!==8;){if(!_){f=null;break t}if(f=Lr(f.nextSibling),f===null){f=null;break t}}_=f.data,f=_==="F!"||_==="F"?f:null}if(f){mt=Lr(f.nextSibling),s=f.data==="F!";break e}}Xi(s)}s=!1}s&&(t=i[0])}}return i=Xt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dm,lastRenderedState:t},i.queue=s,i=Ym.bind(null,je,s),s.dispatch=i,s=Du(!1),_=ju.bind(null,je,!1,s.queue),s=Xt(),f={state:t,dispatch:null,action:e,pending:null},s.queue=f,i=sb.bind(null,je,f,_,i),f.dispatch=i,s.memoizedState=e,[t,i,!1]}function Mm(e){var t=xt();return Lm(t,at,e)}function Lm(e,t,i){if(t=Au(e,t,Dm)[0],e=Zo(Ai)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ra(t)}catch(M){throw M===Es?Fo:M}else s=t;t=xt();var f=t.queue,_=f.dispatch;return i!==t.memoizedState&&(je.flags|=2048,Os(9,{destroy:void 0},ab.bind(null,f,i),null)),[s,_,e]}function ab(e,t){e.action=t}function km(e){var t=xt(),i=at;if(i!==null)return Lm(t,i,e);xt(),t=t.memoizedState,i=xt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Os(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=je.updateQueue,t===null&&(t=Qo(),je.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Bm(){return xt().memoizedState}function Jo(e,t,i,s){var f=Xt();je.flags|=e,f.memoizedState=Os(1|t,{destroy:void 0},i,s===void 0?null:s)}function el(e,t,i,s){var f=xt();s=s===void 0?null:s;var _=f.memoizedState.inst;at!==null&&s!==null&&bu(s,at.memoizedState.deps)?f.memoizedState=Os(t,_,i,s):(je.flags|=e,f.memoizedState=Os(1|t,_,i,s))}function Nm(e,t){Jo(8390656,8,e,t)}function Mu(e,t){el(2048,8,e,t)}function ob(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Qo(),je.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function jm(e){var t=xt().memoizedState;return ob({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function Hm(e,t){return el(4,2,e,t)}function zm(e,t){return el(4,4,e,t)}function Pm(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Um(e,t,i){i=i!=null?i.concat([e]):null,el(4,4,Pm.bind(null,t,e),i)}function Lu(){}function Im(e,t){var i=xt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&bu(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Fm(e,t){var i=xt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&bu(t,s[1]))return s[0];if(s=e(),Kn){Ir(!0);try{e()}finally{Ir(!1)}}return i.memoizedState=[s,t],s}function ku(e,t,i){return i===void 0||(Ri&1073741824)!==0&&(Ve&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=qp(),je.lanes|=e,on|=e,i)}function qm(e,t,i,s){return fr(i,t)?i:As.current!==null?(e=ku(e,i,s),fr(e,t)||(Dt=!0),e):(Ri&42)===0||(Ri&1073741824)!==0&&(Ve&261930)===0?(Dt=!0,e.memoizedState=i):(e=qp(),je.lanes|=e,on|=e,t)}function Wm(e,t,i,s,f){var _=Z.p;Z.p=_!==0&&8>_?_:8;var M=q.T,H={};q.T=H,ju(e,!1,t,i);try{var $=f(),ae=q.S;if(ae!==null&&ae(H,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var fe=rb($,s);Aa(e,t,fe,_r(e))}else Aa(e,t,s,_r(e))}catch(ve){Aa(e,t,{then:function(){},status:"rejected",reason:ve},_r())}finally{Z.p=_,M!==null&&H.types!==null&&(M.types=H.types),q.T=M}}function lb(){}function Bu(e,t,i,s){if(e.tag!==5)throw Error(l(476));var f=Vm(e).queue;Wm(e,f,t,K,i===null?lb:function(){return Km(e),i(s)})}function Vm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ai,lastRenderedState:K},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ai,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Km(e){var t=Vm(e);t.next===null&&(t=e.alternate.memoizedState),Aa(e,t.next.queue,{},_r())}function Nu(){return Ft(Wa)}function Gm(){return xt().memoizedState}function $m(){return xt().memoizedState}function cb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_r();e=en(i);var s=tn(t,e,i);s!==null&&(or(s,t,i),Ca(s,t,i)),t={cache:uu()},e.payload=t;return}t=t.return}}function ub(e,t,i){var s=_r();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},tl(e)?Qm(t,i):(i=Jc(e,t,i,s),i!==null&&(or(i,e,s),Xm(i,t,s)))}function Ym(e,t,i){var s=_r();Aa(e,t,i,s)}function Aa(e,t,i,s){var f={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(tl(e))Qm(t,f);else{var _=e.alternate;if(e.lanes===0&&(_===null||_.lanes===0)&&(_=t.lastRenderedReducer,_!==null))try{var M=t.lastRenderedState,H=_(M,i);if(f.hasEagerState=!0,f.eagerState=H,fr(H,M))return No(e,t,f,0),ft===null&&Bo(),!1}catch{}finally{}if(i=Jc(e,t,f,s),i!==null)return or(i,e,s),Xm(i,t,s),!0}return!1}function ju(e,t,i,s){if(s={lane:2,revertLane:mh(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tl(e)){if(t)throw Error(l(479))}else t=Jc(e,i,s,2),t!==null&&or(t,e,2)}function tl(e){var t=e.alternate;return e===je||t!==null&&t===je}function Qm(e,t){Ts=$o=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Xm(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Y(e,i)}}var Ta={readContext:Ft,use:Xo,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};Ta.useEffectEvent=St;var Zm={readContext:Ft,use:Xo,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:Nm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Jo(4194308,4,Pm.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Jo(4194308,4,e,t)},useInsertionEffect:function(e,t){Jo(4,2,e,t)},useMemo:function(e,t){var i=Xt();t=t===void 0?null:t;var s=e();if(Kn){Ir(!0);try{e()}finally{Ir(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Xt();if(i!==void 0){var f=i(t);if(Kn){Ir(!0);try{i(t)}finally{Ir(!1)}}}else f=t;return s.memoizedState=s.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},s.queue=e,e=e.dispatch=ub.bind(null,je,e),[s.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Du(e);var t=e.queue,i=Ym.bind(null,je,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Lu,useDeferredValue:function(e,t){var i=Xt();return ku(i,e,t)},useTransition:function(){var e=Du(!1);return e=Wm.bind(null,je,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=je,f=Xt();if($e){if(i===void 0)throw Error(l(407));i=i()}else{if(i=t(),ft===null)throw Error(l(349));(Ve&127)!==0||ym(s,t,i)}f.memoizedState=i;var _={value:i,getSnapshot:t};return f.queue=_,Nm(bm.bind(null,s,_,e),[e]),s.flags|=2048,Os(9,{destroy:void 0},Sm.bind(null,s,_,i,t),null),i},useId:function(){var e=Xt(),t=ft.identifierPrefix;if($e){var i=ti,s=ei;i=(s&~(1<<32-Yt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Yo++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=ib++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Nu,useFormState:Om,useActionState:Om,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=ju.bind(null,je,!0,i),i.dispatch=t,[e,t]},useMemoCache:Ru,useCacheRefresh:function(){return Xt().memoizedState=cb.bind(null,je)},useEffectEvent:function(e){var t=Xt(),i={impl:e};return t.memoizedState=i,function(){if((et&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Hu={readContext:Ft,use:Xo,useCallback:Im,useContext:Ft,useEffect:Mu,useImperativeHandle:Um,useInsertionEffect:Hm,useLayoutEffect:zm,useMemo:Fm,useReducer:Zo,useRef:Bm,useState:function(){return Zo(Ai)},useDebugValue:Lu,useDeferredValue:function(e,t){var i=xt();return qm(i,at.memoizedState,e,t)},useTransition:function(){var e=Zo(Ai)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:Ra(e),t]},useSyncExternalStore:_m,useId:Gm,useHostTransitionStatus:Nu,useFormState:Mm,useActionState:Mm,useOptimistic:function(e,t){var i=xt();return xm(i,at,e,t)},useMemoCache:Ru,useCacheRefresh:$m};Hu.useEffectEvent=jm;var Jm={readContext:Ft,use:Xo,useCallback:Im,useContext:Ft,useEffect:Mu,useImperativeHandle:Um,useInsertionEffect:Hm,useLayoutEffect:zm,useMemo:Fm,useReducer:Tu,useRef:Bm,useState:function(){return Tu(Ai)},useDebugValue:Lu,useDeferredValue:function(e,t){var i=xt();return at===null?ku(i,e,t):qm(i,at.memoizedState,e,t)},useTransition:function(){var e=Tu(Ai)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:Ra(e),t]},useSyncExternalStore:_m,useId:Gm,useHostTransitionStatus:Nu,useFormState:km,useActionState:km,useOptimistic:function(e,t){var i=xt();return at!==null?xm(i,at,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Ru,useCacheRefresh:$m};Jm.useEffectEvent=jm;function zu(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:v({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Pu={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=_r(),f=en(s);f.payload=t,i!=null&&(f.callback=i),t=tn(e,f,s),t!==null&&(or(t,e,s),Ca(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=_r(),f=en(s);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=tn(e,f,s),t!==null&&(or(t,e,s),Ca(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_r(),s=en(i);s.tag=2,t!=null&&(s.callback=t),t=tn(e,s,i),t!==null&&(or(t,e,i),Ca(t,e,i))}};function ep(e,t,i,s,f,_,M){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,_,M):t.prototype&&t.prototype.isPureReactComponent?!ma(i,s)||!ma(f,_):!0}function tp(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&Pu.enqueueReplaceState(t,t.state,null)}function Gn(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=v({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function rp(e){ko(e)}function ip(e){console.error(e)}function np(e){ko(e)}function rl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function sp(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Uu(e,t,i){return i=en(i),i.tag=3,i.payload={element:null},i.callback=function(){rl(e,t)},i}function ap(e){return e=en(e),e.tag=3,e}function op(e,t,i,s){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var _=s.value;e.payload=function(){return f(_)},e.callback=function(){sp(t,i,s)}}var M=i.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(e.callback=function(){sp(t,i,s),typeof f!="function"&&(ln===null?ln=new Set([this]):ln.add(this));var H=s.stack;this.componentDidCatch(s.value,{componentStack:H!==null?H:""})})}function hb(e,t,i,s,f){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Cs(t,i,f,!0),i=mr.current,i!==null){switch(i.tag){case 31:case 13:return Mr===null?ml():i.alternate===null&&bt===0&&(bt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,s===qo?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),hh(e,s,f)),!1;case 22:return i.flags|=65536,s===qo?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),hh(e,s,f)),!1}throw Error(l(435,i.tag))}return hh(e,s,f),ml(),!1}if($e)return t=mr.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,s!==su&&(e=Error(l(422),{cause:s}),ga(Ar(e,i)))):(s!==su&&(t=Error(l(423),{cause:s}),ga(Ar(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,s=Ar(s,i),f=Uu(e.stateNode,s,f),vu(e,f),bt!==4&&(bt=2)),!1;var _=Error(l(520),{cause:s});if(_=Ar(_,i),ja===null?ja=[_]:ja.push(_),bt!==4&&(bt=2),t===null)return!0;s=Ar(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Uu(i.stateNode,s,e),vu(i,e),!1;case 1:if(t=i.type,_=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(ln===null||!ln.has(_))))return i.flags|=65536,f&=-f,i.lanes|=f,f=ap(f),op(f,e,i,s),vu(i,f),!1}i=i.return}while(i!==null);return!1}var Iu=Error(l(461)),Dt=!1;function qt(e,t,i,s){t.child=e===null?hm(t,null,i,s):Vn(t,e.child,i,s)}function lp(e,t,i,s,f){i=i.render;var _=t.ref;if("ref"in s){var M={};for(var H in s)H!=="ref"&&(M[H]=s[H])}else M=s;return In(t),s=Cu(e,t,i,M,_,f),H=wu(),e!==null&&!Dt?(xu(e,t,f),Ti(e,t,f)):($e&&H&&iu(t),t.flags|=1,qt(e,t,s,f),t.child)}function cp(e,t,i,s,f){if(e===null){var _=i.type;return typeof _=="function"&&!eu(_)&&_.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=_,up(e,t,_,s,f)):(e=Ho(i.type,null,s,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(_=e.child,!Yu(e,f)){var M=_.memoizedProps;if(i=i.compare,i=i!==null?i:ma,i(M,s)&&e.ref===t.ref)return Ti(e,t,f)}return t.flags|=1,e=Ci(_,s),e.ref=t.ref,e.return=t,t.child=e}function up(e,t,i,s,f){if(e!==null){var _=e.memoizedProps;if(ma(_,s)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=s=_,Yu(e,f))(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,Ti(e,t,f)}return Fu(e,t,i,s,f)}function hp(e,t,i,s){var f=s.children,_=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(_=_!==null?_.baseLanes|i:i,e!==null){for(s=t.child=e.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~_}else s=0,t.child=null;return fp(e,t,_,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Io(t,_!==null?_.cachePool:null),_!==null?mm(t,_):_u(),pm(t);else return s=t.lanes=536870912,fp(e,t,_!==null?_.baseLanes|i:i,i,s)}else _!==null?(Io(t,_.cachePool),mm(t,_),nn(),t.memoizedState=null):(e!==null&&Io(t,null),_u(),nn());return qt(e,t,f,i),t.child}function Da(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fp(e,t,i,s,f){var _=fu();return _=_===null?null:{parent:At._currentValue,pool:_},t.memoizedState={baseLanes:i,cachePool:_},e!==null&&Io(t,null),_u(),pm(t),e!==null&&Cs(e,t,s,!0),t.childLanes=f,null}function il(e,t){return t=sl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dp(e,t,i){return Vn(t,e.child,null,i),e=il(t,t.pendingProps),e.flags|=2,pr(t),t.memoizedState=null,e}function fb(e,t,i){var s=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($e){if(s.mode==="hidden")return e=il(t,s),t.lanes=536870912,Da(null,e);if(Su(t),(e=mt)?(e=Ev(e,Or),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Qd(e),i.return=t,t.child=i,It=t,mt=null)):e=null,e===null)throw Xi(t);return t.lanes=536870912,null}return il(t,s)}var _=e.memoizedState;if(_!==null){var M=_.dehydrated;if(Su(t),f)if(t.flags&256)t.flags&=-257,t=dp(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(Dt||Cs(e,t,i,!1),f=(i&e.childLanes)!==0,Dt||f){if(s=ft,s!==null&&(M=re(s,i),M!==0&&M!==_.retryLane))throw _.retryLane=M,Hn(e,M),or(s,e,M),Iu;ml(),t=dp(e,t,i)}else e=_.treeContext,mt=Lr(M.nextSibling),It=t,$e=!0,Qi=null,Or=!1,e!==null&&Jd(t,e),t=il(t,s),t.flags|=4096;return t}return e=Ci(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function nl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Fu(e,t,i,s,f){return In(t),i=Cu(e,t,i,s,void 0,f),s=wu(),e!==null&&!Dt?(xu(e,t,f),Ti(e,t,f)):($e&&s&&iu(t),t.flags|=1,qt(e,t,i,f),t.child)}function mp(e,t,i,s,f,_){return In(t),t.updateQueue=null,i=gm(t,s,i,f),vm(e),s=wu(),e!==null&&!Dt?(xu(e,t,_),Ti(e,t,_)):($e&&s&&iu(t),t.flags|=1,qt(e,t,i,_),t.child)}function pp(e,t,i,s,f){if(In(t),t.stateNode===null){var _=_s,M=i.contextType;typeof M=="object"&&M!==null&&(_=Ft(M)),_=new i(s,_),t.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=Pu,t.stateNode=_,_._reactInternals=t,_=t.stateNode,_.props=s,_.state=t.memoizedState,_.refs={},mu(t),M=i.contextType,_.context=typeof M=="object"&&M!==null?Ft(M):_s,_.state=t.memoizedState,M=i.getDerivedStateFromProps,typeof M=="function"&&(zu(t,i,M,s),_.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(M=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),M!==_.state&&Pu.enqueueReplaceState(_,_.state,null),xa(t,s,_,f),wa(),_.state=t.memoizedState),typeof _.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){_=t.stateNode;var H=t.memoizedProps,$=Gn(i,H);_.props=$;var ae=_.context,fe=i.contextType;M=_s,typeof fe=="object"&&fe!==null&&(M=Ft(fe));var ve=i.getDerivedStateFromProps;fe=typeof ve=="function"||typeof _.getSnapshotBeforeUpdate=="function",H=t.pendingProps!==H,fe||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(H||ae!==M)&&tp(t,_,s,M),Ji=!1;var le=t.memoizedState;_.state=le,xa(t,s,_,f),wa(),ae=t.memoizedState,H||le!==ae||Ji?(typeof ve=="function"&&(zu(t,i,ve,s),ae=t.memoizedState),($=Ji||ep(t,i,$,s,le,ae,M))?(fe||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(t.flags|=4194308)):(typeof _.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=ae),_.props=s,_.state=ae,_.context=M,s=$):(typeof _.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{_=t.stateNode,pu(e,t),M=t.memoizedProps,fe=Gn(i,M),_.props=fe,ve=t.pendingProps,le=_.context,ae=i.contextType,$=_s,typeof ae=="object"&&ae!==null&&($=Ft(ae)),H=i.getDerivedStateFromProps,(ae=typeof H=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M!==ve||le!==$)&&tp(t,_,s,$),Ji=!1,le=t.memoizedState,_.state=le,xa(t,s,_,f),wa();var ue=t.memoizedState;M!==ve||le!==ue||Ji||e!==null&&e.dependencies!==null&&Po(e.dependencies)?(typeof H=="function"&&(zu(t,i,H,s),ue=t.memoizedState),(fe=Ji||ep(t,i,fe,s,le,ue,$)||e!==null&&e.dependencies!==null&&Po(e.dependencies))?(ae||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(s,ue,$),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(s,ue,$)),typeof _.componentDidUpdate=="function"&&(t.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof _.componentDidUpdate!="function"||M===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ue),_.props=s,_.state=ue,_.context=$,s=fe):(typeof _.componentDidUpdate!="function"||M===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),s=!1)}return _=s,nl(e,t),s=(t.flags&128)!==0,_||s?(_=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:_.render(),t.flags|=1,e!==null&&s?(t.child=Vn(t,e.child,null,f),t.child=Vn(t,null,i,f)):qt(e,t,i,f),t.memoizedState=_.state,e=t.child):e=Ti(e,t,f),e}function vp(e,t,i,s){return Pn(),t.flags|=256,qt(e,t,i,s),t.child}var qu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wu(e){return{baseLanes:e,cachePool:sm()}}function Vu(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=gr),e}function gp(e,t,i){var s=t.pendingProps,f=!1,_=(t.flags&128)!==0,M;if((M=_)||(M=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),M&&(f=!0,t.flags&=-129),M=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(f?rn(t):nn(),(e=mt)?(e=Ev(e,Or),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Qd(e),i.return=t,t.child=i,It=t,mt=null)):e=null,e===null)throw Xi(t);return Ah(e)?t.lanes=32:t.lanes=536870912,null}var H=s.children;return s=s.fallback,f?(nn(),f=t.mode,H=sl({mode:"hidden",children:H},f),s=zn(s,f,i,null),H.return=t,s.return=t,H.sibling=s,t.child=H,s=t.child,s.memoizedState=Wu(i),s.childLanes=Vu(e,M,i),t.memoizedState=qu,Da(null,s)):(rn(t),Ku(t,H))}var $=e.memoizedState;if($!==null&&(H=$.dehydrated,H!==null)){if(_)t.flags&256?(rn(t),t.flags&=-257,t=Gu(e,t,i)):t.memoizedState!==null?(nn(),t.child=e.child,t.flags|=128,t=null):(nn(),H=s.fallback,f=t.mode,s=sl({mode:"visible",children:s.children},f),H=zn(H,f,i,null),H.flags|=2,s.return=t,H.return=t,s.sibling=H,t.child=s,Vn(t,e.child,null,i),s=t.child,s.memoizedState=Wu(i),s.childLanes=Vu(e,M,i),t.memoizedState=qu,t=Da(null,s));else if(rn(t),Ah(H)){if(M=H.nextSibling&&H.nextSibling.dataset,M)var ae=M.dgst;M=ae,s=Error(l(419)),s.stack="",s.digest=M,ga({value:s,source:null,stack:null}),t=Gu(e,t,i)}else if(Dt||Cs(e,t,i,!1),M=(i&e.childLanes)!==0,Dt||M){if(M=ft,M!==null&&(s=re(M,i),s!==0&&s!==$.retryLane))throw $.retryLane=s,Hn(e,s),or(M,e,s),Iu;Rh(H)||ml(),t=Gu(e,t,i)}else Rh(H)?(t.flags|=192,t.child=e.child,t=null):(e=$.treeContext,mt=Lr(H.nextSibling),It=t,$e=!0,Qi=null,Or=!1,e!==null&&Jd(t,e),t=Ku(t,s.children),t.flags|=4096);return t}return f?(nn(),H=s.fallback,f=t.mode,$=e.child,ae=$.sibling,s=Ci($,{mode:"hidden",children:s.children}),s.subtreeFlags=$.subtreeFlags&65011712,ae!==null?H=Ci(ae,H):(H=zn(H,f,i,null),H.flags|=2),H.return=t,s.return=t,s.sibling=H,t.child=s,Da(null,s),s=t.child,H=e.child.memoizedState,H===null?H=Wu(i):(f=H.cachePool,f!==null?($=At._currentValue,f=f.parent!==$?{parent:$,pool:$}:f):f=sm(),H={baseLanes:H.baseLanes|i,cachePool:f}),s.memoizedState=H,s.childLanes=Vu(e,M,i),t.memoizedState=qu,Da(e.child,s)):(rn(t),i=e.child,e=i.sibling,i=Ci(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(M=t.deletions,M===null?(t.deletions=[e],t.flags|=16):M.push(e)),t.child=i,t.memoizedState=null,i)}function Ku(e,t){return t=sl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function sl(e,t){return e=dr(22,e,null,t),e.lanes=0,e}function Gu(e,t,i){return Vn(t,e.child,null,i),e=Ku(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _p(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),lu(e.return,t,i)}function $u(e,t,i,s,f,_){var M=e.memoizedState;M===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:f,treeForkCount:_}:(M.isBackwards=t,M.rendering=null,M.renderingStartTime=0,M.last=s,M.tail=i,M.tailMode=f,M.treeForkCount=_)}function yp(e,t,i){var s=t.pendingProps,f=s.revealOrder,_=s.tail;s=s.children;var M=wt.current,H=(M&2)!==0;if(H?(M=M&1|2,t.flags|=128):M&=1,X(wt,M),qt(e,t,s,i),s=$e?va:0,!H&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_p(e,i,t);else if(e.tag===19)_p(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(i=t.child,f=null;i!==null;)e=i.alternate,e!==null&&Go(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),$u(t,!1,f,i,_,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&Go(e)===null){t.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}$u(t,!0,i,null,_,s);break;case"together":$u(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ti(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),on|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Cs(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,i=Ci(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Ci(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Yu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Po(e)))}function db(e,t,i){switch(t.tag){case 3:P(t,t.stateNode.containerInfo),Zi(t,At,e.memoizedState.cache),Pn();break;case 27:case 5:ge(t);break;case 4:P(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Su(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(rn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?gp(e,t,i):(rn(t),e=Ti(e,t,i),e!==null?e.sibling:null);rn(t);break;case 19:var f=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Cs(e,t,i,!1),s=(i&t.childLanes)!==0),f){if(s)return yp(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),X(wt,wt.current),s)break;return null;case 22:return t.lanes=0,hp(e,t,i,t.pendingProps);case 24:Zi(t,At,e.memoizedState.cache)}return Ti(e,t,i)}function Sp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Dt=!0;else{if(!Yu(e,i)&&(t.flags&128)===0)return Dt=!1,db(e,t,i);Dt=(e.flags&131072)!==0}else Dt=!1,$e&&(t.flags&1048576)!==0&&Zd(t,va,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=qn(t.elementType),t.type=e,typeof e=="function")eu(e)?(s=Gn(e,s),t.tag=1,t=pp(null,t,e,s,i)):(t.tag=0,t=Fu(null,t,e,s,i));else{if(e!=null){var f=e.$$typeof;if(f===A){t.tag=11,t=lp(null,t,e,s,i);break e}else if(f===T){t.tag=14,t=cp(null,t,e,s,i);break e}}throw t=ee(e)||e,Error(l(306,t,""))}}return t;case 0:return Fu(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,f=Gn(s,t.pendingProps),pp(e,t,s,f,i);case 3:e:{if(P(t,t.stateNode.containerInfo),e===null)throw Error(l(387));s=t.pendingProps;var _=t.memoizedState;f=_.element,pu(e,t),xa(t,s,null,i);var M=t.memoizedState;if(s=M.cache,Zi(t,At,s),s!==_.cache&&cu(t,[At],i,!0),wa(),s=M.element,_.isDehydrated)if(_={element:s,isDehydrated:!1,cache:M.cache},t.updateQueue.baseState=_,t.memoizedState=_,t.flags&256){t=vp(e,t,s,i);break e}else if(s!==f){f=Ar(Error(l(424)),t),ga(f),t=vp(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(mt=Lr(e.firstChild),It=t,$e=!0,Qi=null,Or=!0,i=hm(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Pn(),s===f){t=Ti(e,t,i);break e}qt(e,t,s,i)}t=t.child}return t;case 26:return nl(e,t),e===null?(i=Mv(t.type,null,t.pendingProps,null))?t.memoizedState=i:$e||(i=t.type,e=t.pendingProps,s=bl(G.current).createElement(i),s[Se]=t,s[be]=e,Wt(s,i,e),ht(s),t.stateNode=s):t.memoizedState=Mv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&$e&&(s=t.stateNode=Tv(t.type,t.pendingProps,G.current),It=t,Or=!0,f=mt,fn(t.type)?(Th=f,mt=Lr(s.firstChild)):mt=f),qt(e,t,t.pendingProps.children,i),nl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$e&&((f=s=mt)&&(s=qb(s,t.type,t.pendingProps,Or),s!==null?(t.stateNode=s,It=t,mt=Lr(s.firstChild),Or=!1,f=!0):f=!1),f||Xi(t)),ge(t),f=t.type,_=t.pendingProps,M=e!==null?e.memoizedProps:null,s=_.children,wh(f,_)?s=null:M!==null&&wh(f,M)&&(t.flags|=32),t.memoizedState!==null&&(f=Cu(e,t,nb,null,null,i),Wa._currentValue=f),nl(e,t),qt(e,t,s,i),t.child;case 6:return e===null&&$e&&((e=i=mt)&&(i=Wb(i,t.pendingProps,Or),i!==null?(t.stateNode=i,It=t,mt=null,e=!0):e=!1),e||Xi(t)),null;case 13:return gp(e,t,i);case 4:return P(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Vn(t,null,s,i):qt(e,t,s,i),t.child;case 11:return lp(e,t,t.type,t.pendingProps,i);case 7:return qt(e,t,t.pendingProps,i),t.child;case 8:return qt(e,t,t.pendingProps.children,i),t.child;case 12:return qt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Zi(t,t.type,s.value),qt(e,t,s.children,i),t.child;case 9:return f=t.type._context,s=t.pendingProps.children,In(t),f=Ft(f),s=s(f),t.flags|=1,qt(e,t,s,i),t.child;case 14:return cp(e,t,t.type,t.pendingProps,i);case 15:return up(e,t,t.type,t.pendingProps,i);case 19:return yp(e,t,i);case 31:return fb(e,t,i);case 22:return hp(e,t,i,t.pendingProps);case 24:return In(t),s=Ft(At),e===null?(f=fu(),f===null&&(f=ft,_=uu(),f.pooledCache=_,_.refCount++,_!==null&&(f.pooledCacheLanes|=i),f=_),t.memoizedState={parent:s,cache:f},mu(t),Zi(t,At,f)):((e.lanes&i)!==0&&(pu(e,t),xa(t,null,null,i),wa()),f=e.memoizedState,_=t.memoizedState,f.parent!==s?(f={parent:s,cache:s},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),Zi(t,At,s)):(s=_.cache,Zi(t,At,s),s!==f.cache&&cu(t,[At],i,!0))),qt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function Di(e){e.flags|=4}function Qu(e,t,i,s,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Gp())e.flags|=8192;else throw Wn=qo,du}else e.flags&=-16777217}function bp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!jv(t))if(Gp())e.flags|=8192;else throw Wn=qo,du}function al(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ln():536870912,e.lanes|=t,Bs|=t)}function Oa(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function mb(e,t,i){var s=t.pendingProps;switch(nu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return pt(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ei(At),he(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(bs(t)?Di(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,au())),pt(t),null;case 26:var f=t.type,_=t.memoizedState;return e===null?(Di(t),_!==null?(pt(t),bp(t,_)):(pt(t),Qu(t,f,null,s,i))):_?_!==e.memoizedState?(Di(t),pt(t),bp(t,_)):(pt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Di(t),pt(t),Qu(t,f,e,s,i)),null;case 27:if(oe(t),i=G.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return pt(t),null}e=ie.current,bs(t)?em(t):(e=Tv(f,s,i),t.stateNode=e,Di(t))}return pt(t),null;case 5:if(oe(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return pt(t),null}if(_=ie.current,bs(t))em(t);else{var M=bl(G.current);switch(_){case 1:_=M.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:_=M.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":_=M.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":_=M.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":_=M.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof s.is=="string"?M.createElement("select",{is:s.is}):M.createElement("select"),s.multiple?_.multiple=!0:s.size&&(_.size=s.size);break;default:_=typeof s.is=="string"?M.createElement(f,{is:s.is}):M.createElement(f)}}_[Se]=t,_[be]=s;e:for(M=t.child;M!==null;){if(M.tag===5||M.tag===6)_.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===t)break e;for(;M.sibling===null;){if(M.return===null||M.return===t)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}t.stateNode=_;e:switch(Wt(_,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Di(t)}}return pt(t),Qu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(l(166));if(e=G.current,bs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,f=It,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}e[Se]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||gv(e.nodeValue,i)),e||Xi(t,!0)}else e=bl(e).createTextNode(s),e[Se]=t,t.stateNode=e}return pt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=bs(t),i!==null){if(e===null){if(!s)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Se]=t}else Pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),e=!1}else i=au(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(pr(t),t):(pr(t),null);if((t.flags&128)!==0)throw Error(l(558))}return pt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!f)throw Error(l(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[Se]=t}else Pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),f=!1}else f=au(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(pr(t),t):(pr(t),null)}return pr(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),_=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(_=s.memoizedState.cachePool.pool),_!==f&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),al(t,t.updateQueue),pt(t),null);case 4:return he(),e===null&&_h(t.stateNode.containerInfo),pt(t),null;case 10:return Ei(t.type),pt(t),null;case 19:if(z(wt),s=t.memoizedState,s===null)return pt(t),null;if(f=(t.flags&128)!==0,_=s.rendering,_===null)if(f)Oa(s,!1);else{if(bt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(_=Go(e),_!==null){for(t.flags|=128,Oa(s,!1),e=_.updateQueue,t.updateQueue=e,al(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Yd(i,e),i=i.sibling;return X(wt,wt.current&1|2),$e&&wi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ut()>hl&&(t.flags|=128,f=!0,Oa(s,!1),t.lanes=4194304)}else{if(!f)if(e=Go(_),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,al(t,e),Oa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!_.alternate&&!$e)return pt(t),null}else 2*ut()-s.renderingStartTime>hl&&i!==536870912&&(t.flags|=128,f=!0,Oa(s,!1),t.lanes=4194304);s.isBackwards?(_.sibling=t.child,t.child=_):(e=s.last,e!==null?e.sibling=_:t.child=_,s.last=_)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ut(),e.sibling=null,i=wt.current,X(wt,f?i&1|2:i&1),$e&&wi(t,s.treeForkCount),e):(pt(t),null);case 22:case 23:return pr(t),yu(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),i=t.updateQueue,i!==null&&al(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&z(Fn),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ei(At),pt(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function pb(e,t){switch(nu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ei(At),he(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oe(t),null;case 31:if(t.memoizedState!==null){if(pr(t),t.alternate===null)throw Error(l(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(pr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(wt),null;case 4:return he(),null;case 10:return Ei(t.type),null;case 22:case 23:return pr(t),yu(),e!==null&&z(Fn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ei(At),null;case 25:return null;default:return null}}function Cp(e,t){switch(nu(t),t.tag){case 3:Ei(At),he();break;case 26:case 27:case 5:oe(t);break;case 4:he();break;case 31:t.memoizedState!==null&&pr(t);break;case 13:pr(t);break;case 19:z(wt);break;case 10:Ei(t.type);break;case 22:case 23:pr(t),yu(),e!==null&&z(Fn);break;case 24:Ei(At)}}function Ma(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var f=s.next;i=f;do{if((i.tag&e)===e){s=void 0;var _=i.create,M=i.inst;s=_(),M.destroy=s}i=i.next}while(i!==f)}}catch(H){st(t,t.return,H)}}function sn(e,t,i){try{var s=t.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var _=f.next;s=_;do{if((s.tag&e)===e){var M=s.inst,H=M.destroy;if(H!==void 0){M.destroy=void 0,f=t;var $=i,ae=H;try{ae()}catch(fe){st(f,$,fe)}}}s=s.next}while(s!==_)}}catch(fe){st(t,t.return,fe)}}function wp(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{dm(t,i)}catch(s){st(e,e.return,s)}}}function xp(e,t,i){i.props=Gn(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){st(e,t,s)}}function La(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(f){st(e,t,f)}}function ri(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(f){st(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){st(e,t,f)}else i.current=null}function Ep(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(f){st(e,e.return,f)}}function Xu(e,t,i){try{var s=e.stateNode;Hb(s,e.type,i,t),s[be]=t}catch(f){st(e,e.return,f)}}function Rp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&fn(e.type)||e.tag===4}function Zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&fn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ju(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Si));else if(s!==4&&(s===27&&fn(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Ju(e,t,i),e=e.sibling;e!==null;)Ju(e,t,i),e=e.sibling}function ol(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&fn(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ol(e,t,i),e=e.sibling;e!==null;)ol(e,t,i),e=e.sibling}function Ap(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);Wt(t,s,i),t[Se]=e,t[be]=i}catch(_){st(e,e.return,_)}}var Oi=!1,Ot=!1,eh=!1,Tp=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function vb(e,t){if(e=e.containerInfo,bh=Tl,e=Ud(e),Gc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var f=s.anchorOffset,_=s.focusNode;s=s.focusOffset;try{i.nodeType,_.nodeType}catch{i=null;break e}var M=0,H=-1,$=-1,ae=0,fe=0,ve=e,le=null;t:for(;;){for(var ue;ve!==i||f!==0&&ve.nodeType!==3||(H=M+f),ve!==_||s!==0&&ve.nodeType!==3||($=M+s),ve.nodeType===3&&(M+=ve.nodeValue.length),(ue=ve.firstChild)!==null;)le=ve,ve=ue;for(;;){if(ve===e)break t;if(le===i&&++ae===f&&(H=M),le===_&&++fe===s&&($=M),(ue=ve.nextSibling)!==null)break;ve=le,le=ve.parentNode}ve=ue}i=H===-1||$===-1?null:{start:H,end:$}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ch={focusedElem:e,selectionRange:i},Tl=!1,Ht=t;Ht!==null;)if(t=Ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ht=e;else for(;Ht!==null;){switch(t=Ht,_=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&_!==null){e=void 0,i=t,f=_.memoizedProps,_=_.memoizedState,s=i.stateNode;try{var xe=Gn(i.type,f);e=s.getSnapshotBeforeUpdate(xe,_),s.__reactInternalSnapshotBeforeUpdate=e}catch(Be){st(i,i.return,Be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Eh(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Eh(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,Ht=e;break}Ht=t.return}}function Dp(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Li(e,i),s&4&&Ma(5,i);break;case 1:if(Li(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(M){st(i,i.return,M)}else{var f=Gn(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(M){st(i,i.return,M)}}s&64&&wp(i),s&512&&La(i,i.return);break;case 3:if(Li(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{dm(e,t)}catch(M){st(i,i.return,M)}}break;case 27:t===null&&s&4&&Ap(i);case 26:case 5:Li(e,i),t===null&&s&4&&Ep(i),s&512&&La(i,i.return);break;case 12:Li(e,i);break;case 31:Li(e,i),s&4&&Lp(e,i);break;case 13:Li(e,i),s&4&&kp(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Eb.bind(null,i),Vb(e,i))));break;case 22:if(s=i.memoizedState!==null||Oi,!s){t=t!==null&&t.memoizedState!==null||Ot,f=Oi;var _=Ot;Oi=s,(Ot=t)&&!_?ki(e,i,(i.subtreeFlags&8772)!==0):Li(e,i),Oi=f,Ot=_}break;case 30:break;default:Li(e,i)}}function Op(e){var t=e.alternate;t!==null&&(e.alternate=null,Op(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vt=null,ir=!1;function Mi(e,t,i){for(i=i.child;i!==null;)Mp(e,t,i),i=i.sibling}function Mp(e,t,i){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(gi,i)}catch{}switch(i.tag){case 26:Ot||ri(i,t),Mi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ot||ri(i,t);var s=vt,f=ir;fn(i.type)&&(vt=i.stateNode,ir=!1),Mi(e,t,i),Ia(i.stateNode),vt=s,ir=f;break;case 5:Ot||ri(i,t);case 6:if(s=vt,f=ir,vt=null,Mi(e,t,i),vt=s,ir=f,vt!==null)if(ir)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(i.stateNode)}catch(_){st(i,t,_)}else try{vt.removeChild(i.stateNode)}catch(_){st(i,t,_)}break;case 18:vt!==null&&(ir?(e=vt,wv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Fs(e)):wv(vt,i.stateNode));break;case 4:s=vt,f=ir,vt=i.stateNode.containerInfo,ir=!0,Mi(e,t,i),vt=s,ir=f;break;case 0:case 11:case 14:case 15:sn(2,i,t),Ot||sn(4,i,t),Mi(e,t,i);break;case 1:Ot||(ri(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&xp(i,t,s)),Mi(e,t,i);break;case 21:Mi(e,t,i);break;case 22:Ot=(s=Ot)||i.memoizedState!==null,Mi(e,t,i),Ot=s;break;default:Mi(e,t,i)}}function Lp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fs(e)}catch(i){st(t,t.return,i)}}}function kp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fs(e)}catch(i){st(t,t.return,i)}}function gb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tp),t;default:throw Error(l(435,e.tag))}}function ll(e,t){var i=gb(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var f=Rb.bind(null,e,s);s.then(f,f)}})}function nr(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var f=i[s],_=e,M=t,H=M;e:for(;H!==null;){switch(H.tag){case 27:if(fn(H.type)){vt=H.stateNode,ir=!1;break e}break;case 5:vt=H.stateNode,ir=!1;break e;case 3:case 4:vt=H.stateNode.containerInfo,ir=!0;break e}H=H.return}if(vt===null)throw Error(l(160));Mp(_,M,f),vt=null,ir=!1,_=f.alternate,_!==null&&(_.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bp(t,e),t=t.sibling}var Wr=null;function Bp(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nr(t,e),sr(e),s&4&&(sn(3,e,e.return),Ma(3,e),sn(5,e,e.return));break;case 1:nr(t,e),sr(e),s&512&&(Ot||i===null||ri(i,i.return)),s&64&&Oi&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var f=Wr;if(nr(t,e),sr(e),s&512&&(Ot||i===null||ri(i,i.return)),s&4){var _=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":_=f.getElementsByTagName("title")[0],(!_||_[dt]||_[Se]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=f.createElement(s),f.head.insertBefore(_,f.querySelector("head > title"))),Wt(_,s,i),_[Se]=e,ht(_),s=_;break e;case"link":var M=Bv("link","href",f).get(s+(i.href||""));if(M){for(var H=0;H<M.length;H++)if(_=M[H],_.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&_.getAttribute("rel")===(i.rel==null?null:i.rel)&&_.getAttribute("title")===(i.title==null?null:i.title)&&_.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){M.splice(H,1);break t}}_=f.createElement(s),Wt(_,s,i),f.head.appendChild(_);break;case"meta":if(M=Bv("meta","content",f).get(s+(i.content||""))){for(H=0;H<M.length;H++)if(_=M[H],_.getAttribute("content")===(i.content==null?null:""+i.content)&&_.getAttribute("name")===(i.name==null?null:i.name)&&_.getAttribute("property")===(i.property==null?null:i.property)&&_.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&_.getAttribute("charset")===(i.charSet==null?null:i.charSet)){M.splice(H,1);break t}}_=f.createElement(s),Wt(_,s,i),f.head.appendChild(_);break;default:throw Error(l(468,s))}_[Se]=e,ht(_),s=_}e.stateNode=s}else Nv(f,e.type,e.stateNode);else e.stateNode=kv(f,s,e.memoizedProps);else _!==s?(_===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):_.count--,s===null?Nv(f,e.type,e.stateNode):kv(f,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Xu(e,e.memoizedProps,i.memoizedProps)}break;case 27:nr(t,e),sr(e),s&512&&(Ot||i===null||ri(i,i.return)),i!==null&&s&4&&Xu(e,e.memoizedProps,i.memoizedProps);break;case 5:if(nr(t,e),sr(e),s&512&&(Ot||i===null||ri(i,i.return)),e.flags&32){f=e.stateNode;try{hs(f,"")}catch(xe){st(e,e.return,xe)}}s&4&&e.stateNode!=null&&(f=e.memoizedProps,Xu(e,f,i!==null?i.memoizedProps:f)),s&1024&&(eh=!0);break;case 6:if(nr(t,e),sr(e),s&4){if(e.stateNode===null)throw Error(l(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(xe){st(e,e.return,xe)}}break;case 3:if(xl=null,f=Wr,Wr=Cl(t.containerInfo),nr(t,e),Wr=f,sr(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Fs(t.containerInfo)}catch(xe){st(e,e.return,xe)}eh&&(eh=!1,Np(e));break;case 4:s=Wr,Wr=Cl(e.stateNode.containerInfo),nr(t,e),sr(e),Wr=s;break;case 12:nr(t,e),sr(e);break;case 31:nr(t,e),sr(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ll(e,s)));break;case 13:nr(t,e),sr(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ul=ut()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ll(e,s)));break;case 22:f=e.memoizedState!==null;var $=i!==null&&i.memoizedState!==null,ae=Oi,fe=Ot;if(Oi=ae||f,Ot=fe||$,nr(t,e),Ot=fe,Oi=ae,sr(e),s&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||$||Oi||Ot||$n(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){$=i=t;try{if(_=$.stateNode,f)M=_.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{H=$.stateNode;var ve=$.memoizedProps.style,le=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;H.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(xe){st($,$.return,xe)}}}else if(t.tag===6){if(i===null){$=t;try{$.stateNode.nodeValue=f?"":$.memoizedProps}catch(xe){st($,$.return,xe)}}}else if(t.tag===18){if(i===null){$=t;try{var ue=$.stateNode;f?xv(ue,!0):xv($.stateNode,!1)}catch(xe){st($,$.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,ll(e,i))));break;case 19:nr(t,e),sr(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ll(e,s)));break;case 30:break;case 21:break;default:nr(t,e),sr(e)}}function sr(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Rp(s)){i=s;break}s=s.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var f=i.stateNode,_=Zu(e);ol(e,_,f);break;case 5:var M=i.stateNode;i.flags&32&&(hs(M,""),i.flags&=-33);var H=Zu(e);ol(e,H,M);break;case 3:case 4:var $=i.stateNode.containerInfo,ae=Zu(e);Ju(e,ae,$);break;default:throw Error(l(161))}}catch(fe){st(e,e.return,fe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Np(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Np(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Li(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Dp(e,t.alternate,t),t=t.sibling}function $n(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:sn(4,t,t.return),$n(t);break;case 1:ri(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&xp(t,t.return,i),$n(t);break;case 27:Ia(t.stateNode);case 26:case 5:ri(t,t.return),$n(t);break;case 22:t.memoizedState===null&&$n(t);break;case 30:$n(t);break;default:$n(t)}e=e.sibling}}function ki(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,f=e,_=t,M=_.flags;switch(_.tag){case 0:case 11:case 15:ki(f,_,i),Ma(4,_);break;case 1:if(ki(f,_,i),s=_,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(ae){st(s,s.return,ae)}if(s=_,f=s.updateQueue,f!==null){var H=s.stateNode;try{var $=f.shared.hiddenCallbacks;if($!==null)for(f.shared.hiddenCallbacks=null,f=0;f<$.length;f++)fm($[f],H)}catch(ae){st(s,s.return,ae)}}i&&M&64&&wp(_),La(_,_.return);break;case 27:Ap(_);case 26:case 5:ki(f,_,i),i&&s===null&&M&4&&Ep(_),La(_,_.return);break;case 12:ki(f,_,i);break;case 31:ki(f,_,i),i&&M&4&&Lp(f,_);break;case 13:ki(f,_,i),i&&M&4&&kp(f,_);break;case 22:_.memoizedState===null&&ki(f,_,i),La(_,_.return);break;case 30:break;default:ki(f,_,i)}t=t.sibling}}function th(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&_a(i))}function rh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e))}function Vr(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jp(e,t,i,s),t=t.sibling}function jp(e,t,i,s){var f=t.flags;switch(t.tag){case 0:case 11:case 15:Vr(e,t,i,s),f&2048&&Ma(9,t);break;case 1:Vr(e,t,i,s);break;case 3:Vr(e,t,i,s),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e)));break;case 12:if(f&2048){Vr(e,t,i,s),e=t.stateNode;try{var _=t.memoizedProps,M=_.id,H=_.onPostCommit;typeof H=="function"&&H(M,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch($){st(t,t.return,$)}}else Vr(e,t,i,s);break;case 31:Vr(e,t,i,s);break;case 13:Vr(e,t,i,s);break;case 23:break;case 22:_=t.stateNode,M=t.alternate,t.memoizedState!==null?_._visibility&2?Vr(e,t,i,s):ka(e,t):_._visibility&2?Vr(e,t,i,s):(_._visibility|=2,Ms(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),f&2048&&th(M,t);break;case 24:Vr(e,t,i,s),f&2048&&rh(t.alternate,t);break;default:Vr(e,t,i,s)}}function Ms(e,t,i,s,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var _=e,M=t,H=i,$=s,ae=M.flags;switch(M.tag){case 0:case 11:case 15:Ms(_,M,H,$,f),Ma(8,M);break;case 23:break;case 22:var fe=M.stateNode;M.memoizedState!==null?fe._visibility&2?Ms(_,M,H,$,f):ka(_,M):(fe._visibility|=2,Ms(_,M,H,$,f)),f&&ae&2048&&th(M.alternate,M);break;case 24:Ms(_,M,H,$,f),f&&ae&2048&&rh(M.alternate,M);break;default:Ms(_,M,H,$,f)}t=t.sibling}}function ka(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,f=s.flags;switch(s.tag){case 22:ka(i,s),f&2048&&th(s.alternate,s);break;case 24:ka(i,s),f&2048&&rh(s.alternate,s);break;default:ka(i,s)}t=t.sibling}}var Ba=8192;function Ls(e,t,i){if(e.subtreeFlags&Ba)for(e=e.child;e!==null;)Hp(e,t,i),e=e.sibling}function Hp(e,t,i){switch(e.tag){case 26:Ls(e,t,i),e.flags&Ba&&e.memoizedState!==null&&iC(i,Wr,e.memoizedState,e.memoizedProps);break;case 5:Ls(e,t,i);break;case 3:case 4:var s=Wr;Wr=Cl(e.stateNode.containerInfo),Ls(e,t,i),Wr=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Ba,Ba=16777216,Ls(e,t,i),Ba=s):Ls(e,t,i));break;default:Ls(e,t,i)}}function zp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Na(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Ht=s,Up(s,e)}zp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pp(e),e=e.sibling}function Pp(e){switch(e.tag){case 0:case 11:case 15:Na(e),e.flags&2048&&sn(9,e,e.return);break;case 3:Na(e);break;case 12:Na(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cl(e)):Na(e);break;default:Na(e)}}function cl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Ht=s,Up(s,e)}zp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:sn(8,t,t.return),cl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,cl(t));break;default:cl(t)}e=e.sibling}}function Up(e,t){for(;Ht!==null;){var i=Ht;switch(i.tag){case 0:case 11:case 15:sn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:_a(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Ht=s;else e:for(i=e;Ht!==null;){s=Ht;var f=s.sibling,_=s.return;if(Op(s),s===i){Ht=null;break e}if(f!==null){f.return=_,Ht=f;break e}Ht=_}}}var _b={getCacheForType:function(e){var t=Ft(At),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ft(At).controller.signal}},yb=typeof WeakMap=="function"?WeakMap:Map,et=0,ft=null,Fe=null,Ve=0,nt=0,vr=null,an=!1,ks=!1,ih=!1,Bi=0,bt=0,on=0,Yn=0,nh=0,gr=0,Bs=0,ja=null,ar=null,sh=!1,ul=0,Ip=0,hl=1/0,fl=null,ln=null,Lt=0,cn=null,Ns=null,Ni=0,ah=0,oh=null,Fp=null,Ha=0,lh=null;function _r(){return(et&2)!==0&&Ve!==0?Ve&-Ve:q.T!==null?mh():ye()}function qp(){if(gr===0)if((Ve&536870912)===0||$e){var e=Dn;Dn<<=1,(Dn&3932160)===0&&(Dn=262144),gr=e}else gr=536870912;return e=mr.current,e!==null&&(e.flags|=32),gr}function or(e,t,i){(e===ft&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(js(e,0),un(e,Ve,gr,!1)),Gi(e,i),((et&2)===0||e!==ft)&&(e===ft&&((et&2)===0&&(Yn|=i),bt===4&&un(e,Ve,gr,!1)),ii(e))}function Wp(e,t,i){if((et&6)!==0)throw Error(l(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Mn(e,t),f=s?Cb(e,t):uh(e,t,!0),_=s;do{if(f===0){ks&&!s&&un(e,t,0,!1);break}else{if(i=e.current.alternate,_&&!Sb(i)){f=uh(e,t,!1),_=!1;continue}if(f===2){if(_=t,e.errorRecoveryDisabledLanes&_)var M=0;else M=e.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){t=M;e:{var H=e;f=ja;var $=H.current.memoizedState.isDehydrated;if($&&(js(H,M).flags|=256),M=uh(H,M,!1),M!==2){if(ih&&!$){H.errorRecoveryDisabledLanes|=_,Yn|=_,f=4;break e}_=ar,ar=f,_!==null&&(ar===null?ar=_:ar.push.apply(ar,_))}f=M}if(_=!1,f!==2)continue}}if(f===1){js(e,0),un(e,t,0,!0);break}e:{switch(s=e,_=f,_){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:un(s,t,gr,!an);break e;case 2:ar=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(f=ul+300-ut(),10<f)){if(un(s,t,gr,!an),On(s,0,!0)!==0)break e;Ni=t,s.timeoutHandle=bv(Vp.bind(null,s,i,ar,fl,sh,t,gr,Yn,Bs,an,_,"Throttled",-0,0),f);break e}Vp(s,i,ar,fl,sh,t,gr,Yn,Bs,an,_,null,-0,0)}}break}while(!0);ii(e)}function Vp(e,t,i,s,f,_,M,H,$,ae,fe,ve,le,ue){if(e.timeoutHandle=-1,ve=t.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Si},Hp(t,_,ve);var xe=(_&62914560)===_?ul-ut():(_&4194048)===_?Ip-ut():0;if(xe=nC(ve,xe),xe!==null){Ni=_,e.cancelPendingCommit=xe(Jp.bind(null,e,t,_,i,s,f,M,H,$,fe,ve,null,le,ue)),un(e,_,M,!ae);return}}Jp(e,t,_,i,s,f,M,H,$)}function Sb(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var f=i[s],_=f.getSnapshot;f=f.value;try{if(!fr(_(),f))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function un(e,t,i,s){t&=~nh,t&=~Yn,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var f=t;0<f;){var _=31-Yt(f),M=1<<_;s[_]=-1,f&=~M}i!==0&&xo(e,i,t)}function dl(){return(et&6)===0?(za(0),!1):!0}function ch(){if(Fe!==null){if(nt===0)var e=Fe.return;else e=Fe,xi=Un=null,Eu(e),Rs=null,Sa=0,e=Fe;for(;e!==null;)Cp(e.alternate,e),e=e.return;Fe=null}}function js(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Ub(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ni=0,ch(),ft=e,Fe=i=Ci(e.current,null),Ve=t,nt=0,vr=null,an=!1,ks=Mn(e,t),ih=!1,Bs=gr=nh=Yn=on=bt=0,ar=ja=null,sh=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var f=31-Yt(s),_=1<<f;t|=e[f],s&=~_}return Bi=t,Bo(),i}function Kp(e,t){je=null,q.H=Ta,t===Es||t===Fo?(t=lm(),nt=3):t===du?(t=lm(),nt=4):nt=t===Iu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,vr=t,Fe===null&&(bt=1,rl(e,Ar(t,e.current)))}function Gp(){var e=mr.current;return e===null?!0:(Ve&4194048)===Ve?Mr===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?e===Mr:!1}function $p(){var e=q.H;return q.H=Ta,e===null?Ta:e}function Yp(){var e=q.A;return q.A=_b,e}function ml(){bt=4,an||(Ve&4194048)!==Ve&&mr.current!==null||(ks=!0),(on&134217727)===0&&(Yn&134217727)===0||ft===null||un(ft,Ve,gr,!1)}function uh(e,t,i){var s=et;et|=2;var f=$p(),_=Yp();(ft!==e||Ve!==t)&&(fl=null,js(e,t)),t=!1;var M=bt;e:do try{if(nt!==0&&Fe!==null){var H=Fe,$=vr;switch(nt){case 8:ch(),M=6;break e;case 3:case 2:case 9:case 6:mr.current===null&&(t=!0);var ae=nt;if(nt=0,vr=null,Hs(e,H,$,ae),i&&ks){M=0;break e}break;default:ae=nt,nt=0,vr=null,Hs(e,H,$,ae)}}bb(),M=bt;break}catch(fe){Kp(e,fe)}while(!0);return t&&e.shellSuspendCounter++,xi=Un=null,et=s,q.H=f,q.A=_,Fe===null&&(ft=null,Ve=0,Bo()),M}function bb(){for(;Fe!==null;)Qp(Fe)}function Cb(e,t){var i=et;et|=2;var s=$p(),f=Yp();ft!==e||Ve!==t?(fl=null,hl=ut()+500,js(e,t)):ks=Mn(e,t);e:do try{if(nt!==0&&Fe!==null){t=Fe;var _=vr;t:switch(nt){case 1:nt=0,vr=null,Hs(e,t,_,1);break;case 2:case 9:if(am(_)){nt=0,vr=null,Xp(t);break}t=function(){nt!==2&&nt!==9||ft!==e||(nt=7),ii(e)},_.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:am(_)?(nt=0,vr=null,Xp(t)):(nt=0,vr=null,Hs(e,t,_,7));break;case 5:var M=null;switch(Fe.tag){case 26:M=Fe.memoizedState;case 5:case 27:var H=Fe;if(M?jv(M):H.stateNode.complete){nt=0,vr=null;var $=H.sibling;if($!==null)Fe=$;else{var ae=H.return;ae!==null?(Fe=ae,pl(ae)):Fe=null}break t}}nt=0,vr=null,Hs(e,t,_,5);break;case 6:nt=0,vr=null,Hs(e,t,_,6);break;case 8:ch(),bt=6;break e;default:throw Error(l(462))}}wb();break}catch(fe){Kp(e,fe)}while(!0);return xi=Un=null,q.H=s,q.A=f,et=i,Fe!==null?0:(ft=null,Ve=0,Bo(),bt)}function wb(){for(;Fe!==null&&!Wi();)Qp(Fe)}function Qp(e){var t=Sp(e.alternate,e,Bi);e.memoizedProps=e.pendingProps,t===null?pl(e):Fe=t}function Xp(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=mp(i,t,t.pendingProps,t.type,void 0,Ve);break;case 11:t=mp(i,t,t.pendingProps,t.type.render,t.ref,Ve);break;case 5:Eu(t);default:Cp(i,t),t=Fe=Yd(t,Bi),t=Sp(i,t,Bi)}e.memoizedProps=e.pendingProps,t===null?pl(e):Fe=t}function Hs(e,t,i,s){xi=Un=null,Eu(t),Rs=null,Sa=0;var f=t.return;try{if(hb(e,f,t,i,Ve)){bt=1,rl(e,Ar(i,e.current)),Fe=null;return}}catch(_){if(f!==null)throw Fe=f,_;bt=1,rl(e,Ar(i,e.current)),Fe=null;return}t.flags&32768?($e||s===1?e=!0:ks||(Ve&536870912)!==0?e=!1:(an=e=!0,(s===2||s===9||s===3||s===6)&&(s=mr.current,s!==null&&s.tag===13&&(s.flags|=16384))),Zp(t,e)):pl(t)}function pl(e){var t=e;do{if((t.flags&32768)!==0){Zp(t,an);return}e=t.return;var i=mb(t.alternate,t,Bi);if(i!==null){Fe=i;return}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);bt===0&&(bt=5)}function Zp(e,t){do{var i=pb(e.alternate,e);if(i!==null){i.flags&=32767,Fe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Fe=e;return}Fe=e=i}while(e!==null);bt=6,Fe=null}function Jp(e,t,i,s,f,_,M,H,$){e.cancelPendingCommit=null;do vl();while(Lt!==0);if((et&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(_=t.lanes|t.childLanes,_|=Zc,Dc(e,i,_,M,H,$),e===ft&&(Fe=ft=null,Ve=0),Ns=t,cn=e,Ni=i,ah=_,oh=f,Fp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ab(gt,function(){return nv(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null,f=Z.p,Z.p=2,M=et,et|=4;try{vb(e,t,i)}finally{et=M,Z.p=f,q.T=s}}Lt=1,ev(),tv(),rv()}}function ev(){if(Lt===1){Lt=0;var e=cn,t=Ns,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=q.T,q.T=null;var s=Z.p;Z.p=2;var f=et;et|=4;try{Bp(t,e);var _=Ch,M=Ud(e.containerInfo),H=_.focusedElem,$=_.selectionRange;if(M!==H&&H&&H.ownerDocument&&Pd(H.ownerDocument.documentElement,H)){if($!==null&&Gc(H)){var ae=$.start,fe=$.end;if(fe===void 0&&(fe=ae),"selectionStart"in H)H.selectionStart=ae,H.selectionEnd=Math.min(fe,H.value.length);else{var ve=H.ownerDocument||document,le=ve&&ve.defaultView||window;if(le.getSelection){var ue=le.getSelection(),xe=H.textContent.length,Be=Math.min($.start,xe),lt=$.end===void 0?Be:Math.min($.end,xe);!ue.extend&&Be>lt&&(M=lt,lt=Be,Be=M);var te=zd(H,Be),J=zd(H,lt);if(te&&J&&(ue.rangeCount!==1||ue.anchorNode!==te.node||ue.anchorOffset!==te.offset||ue.focusNode!==J.node||ue.focusOffset!==J.offset)){var se=ve.createRange();se.setStart(te.node,te.offset),ue.removeAllRanges(),Be>lt?(ue.addRange(se),ue.extend(J.node,J.offset)):(se.setEnd(J.node,J.offset),ue.addRange(se))}}}}for(ve=[],ue=H;ue=ue.parentNode;)ue.nodeType===1&&ve.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<ve.length;H++){var pe=ve[H];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Tl=!!bh,Ch=bh=null}finally{et=f,Z.p=s,q.T=i}}e.current=t,Lt=2}}function tv(){if(Lt===2){Lt=0;var e=cn,t=Ns,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=q.T,q.T=null;var s=Z.p;Z.p=2;var f=et;et|=4;try{Dp(e,t.alternate,t)}finally{et=f,Z.p=s,q.T=i}}Lt=3}}function rv(){if(Lt===4||Lt===3){Lt=0,Gt();var e=cn,t=Ns,i=Ni,s=Fp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Lt=5:(Lt=0,Ns=cn=null,iv(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ln=null),_e(i),t=t.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(gi,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=q.T,f=Z.p,Z.p=2,q.T=null;try{for(var _=e.onRecoverableError,M=0;M<s.length;M++){var H=s[M];_(H.value,{componentStack:H.stack})}}finally{q.T=t,Z.p=f}}(Ni&3)!==0&&vl(),ii(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===lh?Ha++:(Ha=0,lh=e):Ha=0,za(0)}}function iv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_a(t)))}function vl(){return ev(),tv(),rv(),nv()}function nv(){if(Lt!==5)return!1;var e=cn,t=ah;ah=0;var i=_e(Ni),s=q.T,f=Z.p;try{Z.p=32>i?32:i,q.T=null,i=oh,oh=null;var _=cn,M=Ni;if(Lt=0,Ns=cn=null,Ni=0,(et&6)!==0)throw Error(l(331));var H=et;if(et|=4,Pp(_.current),jp(_,_.current,M,i),et=H,za(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(gi,_)}catch{}return!0}finally{Z.p=f,q.T=s,iv(e,t)}}function sv(e,t,i){t=Ar(i,t),t=Uu(e.stateNode,t,2),e=tn(e,t,2),e!==null&&(Gi(e,2),ii(e))}function st(e,t,i){if(e.tag===3)sv(e,e,i);else for(;t!==null;){if(t.tag===3){sv(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ln===null||!ln.has(s))){e=Ar(i,e),i=ap(2),s=tn(t,i,2),s!==null&&(op(i,s,t,e),Gi(s,2),ii(s));break}}t=t.return}}function hh(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new yb;var f=new Set;s.set(t,f)}else f=s.get(t),f===void 0&&(f=new Set,s.set(t,f));f.has(i)||(ih=!0,f.add(i),e=xb.bind(null,e,t,i),t.then(e,e))}function xb(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ft===e&&(Ve&i)===i&&(bt===4||bt===3&&(Ve&62914560)===Ve&&300>ut()-ul?(et&2)===0&&js(e,0):nh|=i,Bs===Ve&&(Bs=0)),ii(e)}function av(e,t){t===0&&(t=Ln()),e=Hn(e,t),e!==null&&(Gi(e,t),ii(e))}function Eb(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),av(e,i)}function Rb(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(t),av(e,i)}function Ab(e,t){return mi(e,t)}var gl=null,zs=null,fh=!1,_l=!1,dh=!1,hn=0;function ii(e){e!==zs&&e.next===null&&(zs===null?gl=zs=e:zs=zs.next=e),_l=!0,fh||(fh=!0,Db())}function za(e,t){if(!dh&&_l){dh=!0;do for(var i=!1,s=gl;s!==null;){if(e!==0){var f=s.pendingLanes;if(f===0)var _=0;else{var M=s.suspendedLanes,H=s.pingedLanes;_=(1<<31-Yt(42|e)+1)-1,_&=f&~(M&~H),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(i=!0,uv(s,_))}else _=Ve,_=On(s,s===ft?_:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(_&3)===0||Mn(s,_)||(i=!0,uv(s,_));s=s.next}while(i);dh=!1}}function Tb(){ov()}function ov(){_l=fh=!1;var e=0;hn!==0&&Pb()&&(e=hn);for(var t=ut(),i=null,s=gl;s!==null;){var f=s.next,_=lv(s,t);_===0?(s.next=null,i===null?gl=f:i.next=f,f===null&&(zs=i)):(i=s,(e!==0||(_&3)!==0)&&(_l=!0)),s=f}Lt!==0&&Lt!==5||za(e),hn!==0&&(hn=0)}function lv(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,f=e.expirationTimes,_=e.pendingLanes&-62914561;0<_;){var M=31-Yt(_),H=1<<M,$=f[M];$===-1?((H&i)===0||(H&s)!==0)&&(f[M]=wo(H,t)):$<=t&&(e.expiredLanes|=H),_&=~H}if(t=ft,i=Ve,i=On(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pi(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Mn(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&pi(s),_e(i)){case 2:case 8:i=Jr;break;case 32:i=gt;break;case 268435456:i=er;break;default:i=gt}return s=cv.bind(null,e),i=mi(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&pi(s),e.callbackPriority=2,e.callbackNode=null,2}function cv(e,t){if(Lt!==0&&Lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(vl()&&e.callbackNode!==i)return null;var s=Ve;return s=On(e,e===ft?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Wp(e,s,t),lv(e,ut()),e.callbackNode!=null&&e.callbackNode===i?cv.bind(null,e):null)}function uv(e,t){if(vl())return null;Wp(e,t,!0)}function Db(){Ib(function(){(et&6)!==0?mi(Ur,Tb):ov()})}function mh(){if(hn===0){var e=ws;e===0&&(e=_i,_i<<=1,(_i&261888)===0&&(_i=256)),hn=e}return hn}function hv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ro(""+e)}function fv(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function Ob(e,t,i,s,f){if(t==="submit"&&i&&i.stateNode===f){var _=hv((f[be]||null).action),M=s.submitter;M&&(t=(t=M[be]||null)?hv(t.formAction):M.getAttribute("formAction"),t!==null&&(_=t,M=null));var H=new Oo("action","action",null,s,f);e.push({event:H,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(hn!==0){var $=M?fv(f,M):new FormData(f);Bu(i,{pending:!0,data:$,method:f.method,action:_},null,$)}}else typeof _=="function"&&(H.preventDefault(),$=M?fv(f,M):new FormData(f),Bu(i,{pending:!0,data:$,method:f.method,action:_},_,$))},currentTarget:f}]})}}for(var ph=0;ph<Xc.length;ph++){var vh=Xc[ph],Mb=vh.toLowerCase(),Lb=vh[0].toUpperCase()+vh.slice(1);qr(Mb,"on"+Lb)}qr(qd,"onAnimationEnd"),qr(Wd,"onAnimationIteration"),qr(Vd,"onAnimationStart"),qr("dblclick","onDoubleClick"),qr("focusin","onFocus"),qr("focusout","onBlur"),qr($S,"onTransitionRun"),qr(YS,"onTransitionStart"),qr(QS,"onTransitionCancel"),qr(Kd,"onTransitionEnd"),tr("onMouseEnter",["mouseout","mouseover"]),tr("onMouseLeave",["mouseout","mouseover"]),tr("onPointerEnter",["pointerout","pointerover"]),tr("onPointerLeave",["pointerout","pointerover"]),hr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),hr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),hr("onBeforeInput",["compositionend","keypress","textInput","paste"]),hr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),hr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),hr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pa="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(" "),kb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pa));function dv(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],f=s.event;s=s.listeners;e:{var _=void 0;if(t)for(var M=s.length-1;0<=M;M--){var H=s[M],$=H.instance,ae=H.currentTarget;if(H=H.listener,$!==_&&f.isPropagationStopped())break e;_=H,f.currentTarget=ae;try{_(f)}catch(fe){ko(fe)}f.currentTarget=null,_=$}else for(M=0;M<s.length;M++){if(H=s[M],$=H.instance,ae=H.currentTarget,H=H.listener,$!==_&&f.isPropagationStopped())break e;_=H,f.currentTarget=ae;try{_(f)}catch(fe){ko(fe)}f.currentTarget=null,_=$}}}}function qe(e,t){var i=t[Oe];i===void 0&&(i=t[Oe]=new Set);var s=e+"__bubble";i.has(s)||(mv(t,e,2,!1),i.add(s))}function gh(e,t,i){var s=0;t&&(s|=4),mv(i,e,s,t)}var yl="_reactListening"+Math.random().toString(36).slice(2);function _h(e){if(!e[yl]){e[yl]=!0,ur.forEach(function(i){i!=="selectionchange"&&(kb.has(i)||gh(i,!1,e),gh(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yl]||(t[yl]=!0,gh("selectionchange",!1,t))}}function mv(e,t,i,s){switch(qv(t)){case 2:var f=oC;break;case 8:f=lC;break;default:f=kh}i=f.bind(null,t,i,e),f=void 0,!zc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),s?f!==void 0?e.addEventListener(t,i,{capture:!0,passive:f}):e.addEventListener(t,i,!0):f!==void 0?e.addEventListener(t,i,{passive:f}):e.addEventListener(t,i,!1)}function yh(e,t,i,s,f){var _=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var M=s.tag;if(M===3||M===4){var H=s.stateNode.containerInfo;if(H===f)break;if(M===4)for(M=s.return;M!==null;){var $=M.tag;if(($===3||$===4)&&M.stateNode.containerInfo===f)return;M=M.return}for(;H!==null;){if(M=Ye(H),M===null)return;if($=M.tag,$===5||$===6||$===26||$===27){s=_=M;continue e}H=H.parentNode}}s=s.return}yd(function(){var ae=_,fe=jc(i),ve=[];e:{var le=Gd.get(e);if(le!==void 0){var ue=Oo,xe=e;switch(e){case"keypress":if(To(i)===0)break e;case"keydown":case"keyup":ue=RS;break;case"focusin":xe="focus",ue=Fc;break;case"focusout":xe="blur",ue=Fc;break;case"beforeblur":case"afterblur":ue=Fc;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=Cd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=mS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=DS;break;case qd:case Wd:case Vd:ue=gS;break;case Kd:ue=MS;break;case"scroll":case"scrollend":ue=fS;break;case"wheel":ue=kS;break;case"copy":case"cut":case"paste":ue=yS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=xd;break;case"toggle":case"beforetoggle":ue=NS}var Be=(t&4)!==0,lt=!Be&&(e==="scroll"||e==="scrollend"),te=Be?le!==null?le+"Capture":null:le;Be=[];for(var J=ae,se;J!==null;){var pe=J;if(se=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||se===null||te===null||(pe=oa(J,te),pe!=null&&Be.push(Ua(J,pe,se))),lt)break;J=J.return}0<Be.length&&(le=new ue(le,xe,null,i,fe),ve.push({event:le,listeners:Be}))}}if((t&7)===0){e:{if(le=e==="mouseover"||e==="pointerover",ue=e==="mouseout"||e==="pointerout",le&&i!==Nc&&(xe=i.relatedTarget||i.fromElement)&&(Ye(xe)||xe[Te]))break e;if((ue||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,ue?(xe=i.relatedTarget||i.toElement,ue=ae,xe=xe?Ye(xe):null,xe!==null&&(lt=y(xe),Be=xe.tag,xe!==lt||Be!==5&&Be!==27&&Be!==6)&&(xe=null)):(ue=null,xe=ae),ue!==xe)){if(Be=Cd,pe="onMouseLeave",te="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(Be=xd,pe="onPointerLeave",te="onPointerEnter",J="pointer"),lt=ue==null?le:cr(ue),se=xe==null?le:cr(xe),le=new Be(pe,J+"leave",ue,i,fe),le.target=lt,le.relatedTarget=se,pe=null,Ye(fe)===ae&&(Be=new Be(te,J+"enter",xe,i,fe),Be.target=se,Be.relatedTarget=lt,pe=Be),lt=pe,ue&&xe)t:{for(Be=Bb,te=ue,J=xe,se=0,pe=te;pe;pe=Be(pe))se++;pe=0;for(var Le=J;Le;Le=Be(Le))pe++;for(;0<se-pe;)te=Be(te),se--;for(;0<pe-se;)J=Be(J),pe--;for(;se--;){if(te===J||J!==null&&te===J.alternate){Be=te;break t}te=Be(te),J=Be(J)}Be=null}else Be=null;ue!==null&&pv(ve,le,ue,Be,!1),xe!==null&<!==null&&pv(ve,lt,xe,Be,!0)}}e:{if(le=ae?cr(ae):window,ue=le.nodeName&&le.nodeName.toLowerCase(),ue==="select"||ue==="input"&&le.type==="file")var Ze=Ld;else if(Od(le))if(kd)Ze=VS;else{Ze=qS;var Ae=FS}else ue=le.nodeName,!ue||ue.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ae&&Bc(ae.elementType)&&(Ze=Ld):Ze=WS;if(Ze&&(Ze=Ze(e,ae))){Md(ve,Ze,i,fe);break e}Ae&&Ae(e,le,ae),e==="focusout"&&ae&&le.type==="number"&&ae.memoizedProps.value!=null&&kc(le,"number",le.value)}switch(Ae=ae?cr(ae):window,e){case"focusin":(Od(Ae)||Ae.contentEditable==="true")&&(ps=Ae,$c=ae,pa=null);break;case"focusout":pa=$c=ps=null;break;case"mousedown":Yc=!0;break;case"contextmenu":case"mouseup":case"dragend":Yc=!1,Id(ve,i,fe);break;case"selectionchange":if(GS)break;case"keydown":case"keyup":Id(ve,i,fe)}var He;if(Wc)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else ms?Td(e,i)&&(Ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ke="onCompositionStart");Ke&&(Ed&&i.locale!=="ko"&&(ms||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&ms&&(He=Sd()):($i=fe,Pc="value"in $i?$i.value:$i.textContent,ms=!0)),Ae=Sl(ae,Ke),0<Ae.length&&(Ke=new wd(Ke,e,null,i,fe),ve.push({event:Ke,listeners:Ae}),He?Ke.data=He:(He=Dd(i),He!==null&&(Ke.data=He)))),(He=HS?zS(e,i):PS(e,i))&&(Ke=Sl(ae,"onBeforeInput"),0<Ke.length&&(Ae=new wd("onBeforeInput","beforeinput",null,i,fe),ve.push({event:Ae,listeners:Ke}),Ae.data=He)),Ob(ve,e,ae,i,fe)}dv(ve,t)})}function Ua(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Sl(e,t){for(var i=t+"Capture",s=[];e!==null;){var f=e,_=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||_===null||(f=oa(e,i),f!=null&&s.unshift(Ua(e,f,_)),f=oa(e,t),f!=null&&s.push(Ua(e,f,_))),e.tag===3)return s;e=e.return}return[]}function Bb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function pv(e,t,i,s,f){for(var _=t._reactName,M=[];i!==null&&i!==s;){var H=i,$=H.alternate,ae=H.stateNode;if(H=H.tag,$!==null&&$===s)break;H!==5&&H!==26&&H!==27||ae===null||($=ae,f?(ae=oa(i,_),ae!=null&&M.unshift(Ua(i,ae,$))):f||(ae=oa(i,_),ae!=null&&M.push(Ua(i,ae,$)))),i=i.return}M.length!==0&&e.push({event:t,listeners:M})}var Nb=/\r\n?/g,jb=/\u0000|\uFFFD/g;function vv(e){return(typeof e=="string"?e:""+e).replace(Nb,`
|
|
9
|
-
`).replace(jb,"")}function gv(e,t){return t=vv(t),vv(e)===t}function ot(e,t,i,s,f,_){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||hs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&hs(e,""+s);break;case"className":xr(e,"class",s);break;case"tabIndex":xr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":xr(e,i,s);break;case"style":gd(e,s,_);break;case"data":if(t!=="object"){xr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Ro(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"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 _=="function"&&(i==="formAction"?(t!=="input"&&ot(e,t,"name",f.name,f,null),ot(e,t,"formEncType",f.formEncType,f,null),ot(e,t,"formMethod",f.formMethod,f,null),ot(e,t,"formTarget",f.formTarget,f,null)):(ot(e,t,"encType",f.encType,f,null),ot(e,t,"method",f.method,f,null),ot(e,t,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Ro(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Si);break;case"onScroll":s!=null&&qe("scroll",e);break;case"onScrollEnd":s!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(f.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=Ro(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Fr(e,"popover",s);break;case"xlinkActuate":Xe(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Xe(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Xe(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Xe(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Xe(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Xe(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Xe(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Xe(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Xe(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Fr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=uS.get(i)||i,Fr(e,i,s))}}function Sh(e,t,i,s,f,_){switch(i){case"style":gd(e,s,_);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(f.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"children":typeof s=="string"?hs(e,s):(typeof s=="number"||typeof s=="bigint")&&hs(e,""+s);break;case"onScroll":s!=null&&qe("scroll",e);break;case"onScrollEnd":s!=null&&qe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Si);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ls.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),t=i.slice(2,f?i.length-7:void 0),_=e[be]||null,_=_!=null?_[i]:null,typeof _=="function"&&e.removeEventListener(t,_,f),typeof s=="function")){typeof _!="function"&&_!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,f);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Fr(e,i,s)}}}function Wt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var s=!1,f=!1,_;for(_ in i)if(i.hasOwnProperty(_)){var M=i[_];if(M!=null)switch(_){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:ot(e,t,_,M,i,null)}}f&&ot(e,t,"srcSet",i.srcSet,i,null),s&&ot(e,t,"src",i.src,i,null);return;case"input":qe("invalid",e);var H=_=M=f=null,$=null,ae=null;for(s in i)if(i.hasOwnProperty(s)){var fe=i[s];if(fe!=null)switch(s){case"name":f=fe;break;case"type":M=fe;break;case"checked":$=fe;break;case"defaultChecked":ae=fe;break;case"value":_=fe;break;case"defaultValue":H=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(l(137,t));break;default:ot(e,t,s,fe,i,null)}}dd(e,_,H,$,ae,M,f,!1);return;case"select":qe("invalid",e),s=M=_=null;for(f in i)if(i.hasOwnProperty(f)&&(H=i[f],H!=null))switch(f){case"value":_=H;break;case"defaultValue":M=H;break;case"multiple":s=H;default:ot(e,t,f,H,i,null)}t=_,i=M,e.multiple=!!s,t!=null?us(e,!!s,t,!1):i!=null&&us(e,!!s,i,!0);return;case"textarea":qe("invalid",e),_=f=s=null;for(M in i)if(i.hasOwnProperty(M)&&(H=i[M],H!=null))switch(M){case"value":s=H;break;case"defaultValue":f=H;break;case"children":_=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(l(91));break;default:ot(e,t,M,H,i,null)}pd(e,s,f,_);return;case"option":for($ in i)if(i.hasOwnProperty($)&&(s=i[$],s!=null))switch($){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ot(e,t,$,s,i,null)}return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(s=0;s<Pa.length;s++)qe(Pa[s],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in i)if(i.hasOwnProperty(ae)&&(s=i[ae],s!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:ot(e,t,ae,s,i,null)}return;default:if(Bc(t)){for(fe in i)i.hasOwnProperty(fe)&&(s=i[fe],s!==void 0&&Sh(e,t,fe,s,i,void 0));return}}for(H in i)i.hasOwnProperty(H)&&(s=i[H],s!=null&&ot(e,t,H,s,i,null))}function Hb(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,_=null,M=null,H=null,$=null,ae=null,fe=null;for(ue in i){var ve=i[ue];if(i.hasOwnProperty(ue)&&ve!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":$=ve;default:s.hasOwnProperty(ue)||ot(e,t,ue,null,s,ve)}}for(var le in s){var ue=s[le];if(ve=i[le],s.hasOwnProperty(le)&&(ue!=null||ve!=null))switch(le){case"type":_=ue;break;case"name":f=ue;break;case"checked":ae=ue;break;case"defaultChecked":fe=ue;break;case"value":M=ue;break;case"defaultValue":H=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(l(137,t));break;default:ue!==ve&&ot(e,t,le,ue,s,ve)}}Lc(e,M,H,$,ae,fe,_,f);return;case"select":ue=M=H=le=null;for(_ in i)if($=i[_],i.hasOwnProperty(_)&&$!=null)switch(_){case"value":break;case"multiple":ue=$;default:s.hasOwnProperty(_)||ot(e,t,_,null,s,$)}for(f in s)if(_=s[f],$=i[f],s.hasOwnProperty(f)&&(_!=null||$!=null))switch(f){case"value":le=_;break;case"defaultValue":H=_;break;case"multiple":M=_;default:_!==$&&ot(e,t,f,_,s,$)}t=H,i=M,s=ue,le!=null?us(e,!!i,le,!1):!!s!=!!i&&(t!=null?us(e,!!i,t,!0):us(e,!!i,i?[]:"",!1));return;case"textarea":ue=le=null;for(H in i)if(f=i[H],i.hasOwnProperty(H)&&f!=null&&!s.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:ot(e,t,H,null,s,f)}for(M in s)if(f=s[M],_=i[M],s.hasOwnProperty(M)&&(f!=null||_!=null))switch(M){case"value":le=f;break;case"defaultValue":ue=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==_&&ot(e,t,M,f,s,_)}md(e,le,ue);return;case"option":for(var xe in i)if(le=i[xe],i.hasOwnProperty(xe)&&le!=null&&!s.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:ot(e,t,xe,null,s,le)}for($ in s)if(le=s[$],ue=i[$],s.hasOwnProperty($)&&le!==ue&&(le!=null||ue!=null))switch($){case"selected":e.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:ot(e,t,$,le,s,ue)}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 Be in i)le=i[Be],i.hasOwnProperty(Be)&&le!=null&&!s.hasOwnProperty(Be)&&ot(e,t,Be,null,s,le);for(ae in s)if(le=s[ae],ue=i[ae],s.hasOwnProperty(ae)&&le!==ue&&(le!=null||ue!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(l(137,t));break;default:ot(e,t,ae,le,s,ue)}return;default:if(Bc(t)){for(var lt in i)le=i[lt],i.hasOwnProperty(lt)&&le!==void 0&&!s.hasOwnProperty(lt)&&Sh(e,t,lt,void 0,s,le);for(fe in s)le=s[fe],ue=i[fe],!s.hasOwnProperty(fe)||le===ue||le===void 0&&ue===void 0||Sh(e,t,fe,le,s,ue);return}}for(var te in i)le=i[te],i.hasOwnProperty(te)&&le!=null&&!s.hasOwnProperty(te)&&ot(e,t,te,null,s,le);for(ve in s)le=s[ve],ue=i[ve],!s.hasOwnProperty(ve)||le===ue||le==null&&ue==null||ot(e,t,ve,le,s,ue)}function _v(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var f=i[s],_=f.transferSize,M=f.initiatorType,H=f.duration;if(_&&H&&_v(M)){for(M=0,H=f.responseEnd,s+=1;s<i.length;s++){var $=i[s],ae=$.startTime;if(ae>H)break;var fe=$.transferSize,ve=$.initiatorType;fe&&_v(ve)&&($=$.responseEnd,M+=fe*($<H?1:(H-ae)/($-ae)))}if(--s,t+=8*(_+M)/(f.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var bh=null,Ch=null;function bl(e){return e.nodeType===9?e:e.ownerDocument}function yv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Sv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function wh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xh=null;function Pb(){var e=window.event;return e&&e.type==="popstate"?e===xh?!1:(xh=e,!0):(xh=null,!1)}var bv=typeof setTimeout=="function"?setTimeout:void 0,Ub=typeof clearTimeout=="function"?clearTimeout:void 0,Cv=typeof Promise=="function"?Promise:void 0,Ib=typeof queueMicrotask=="function"?queueMicrotask:typeof Cv<"u"?function(e){return Cv.resolve(null).then(e).catch(Fb)}:bv;function Fb(e){setTimeout(function(){throw e})}function fn(e){return e==="head"}function wv(e,t){var i=t,s=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(f),Fs(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Ia(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ia(i);for(var _=i.firstChild;_;){var M=_.nextSibling,H=_.nodeName;_[dt]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&_.rel.toLowerCase()==="stylesheet"||i.removeChild(_),_=M}}else i==="body"&&Ia(e.ownerDocument.body);i=f}while(i);Fs(t)}function xv(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Eh(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Eh(i),yt(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function qb(e,t,i,s){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[dt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(_=e.getAttribute("rel"),_==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(_!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(_=e.getAttribute("src"),(_!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&_&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var _=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===_)return e}else return e;if(e=Lr(e.nextSibling),e===null)break}return null}function Wb(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Lr(e.nextSibling),e===null))return null;return e}function Ev(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Lr(e.nextSibling),e===null))return null;return e}function Rh(e){return e.data==="$?"||e.data==="$~"}function Ah(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Vb(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Lr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Th=null;function Rv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Lr(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Av(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Tv(e,t,i){switch(t=bl(i),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Ia(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var kr=new Map,Dv=new Set;function Cl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ji=Z.d;Z.d={f:Kb,r:Gb,D:$b,C:Yb,L:Qb,m:Xb,X:Jb,S:Zb,M:eC};function Kb(){var e=ji.f(),t=dl();return e||t}function Gb(e){var t=Qe(e);t!==null&&t.tag===5&&t.type==="form"?Km(t):ji.r(e)}var Ps=typeof document>"u"?null:document;function Ov(e,t,i){var s=Ps;if(s&&typeof t=="string"&&t){var f=Er(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),Dv.has(f)||(Dv.add(f),e={rel:e,crossOrigin:i,href:t},s.querySelector(f)===null&&(t=s.createElement("link"),Wt(t,"link",e),ht(t),s.head.appendChild(t)))}}function $b(e){ji.D(e),Ov("dns-prefetch",e,null)}function Yb(e,t){ji.C(e,t),Ov("preconnect",e,t)}function Qb(e,t,i){ji.L(e,t,i);var s=Ps;if(s&&e&&t){var f='link[rel="preload"][as="'+Er(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Er(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Er(i.imageSizes)+'"]')):f+='[href="'+Er(e)+'"]';var _=f;switch(t){case"style":_=Us(e);break;case"script":_=Is(e)}kr.has(_)||(e=v({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),kr.set(_,e),s.querySelector(f)!==null||t==="style"&&s.querySelector(Fa(_))||t==="script"&&s.querySelector(qa(_))||(t=s.createElement("link"),Wt(t,"link",e),ht(t),s.head.appendChild(t)))}}function Xb(e,t){ji.m(e,t);var i=Ps;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+Er(s)+'"][href="'+Er(e)+'"]',_=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Is(e)}if(!kr.has(_)&&(e=v({rel:"modulepreload",href:e},t),kr.set(_,e),i.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(qa(_)))return}s=i.createElement("link"),Wt(s,"link",e),ht(s),i.head.appendChild(s)}}}function Zb(e,t,i){ji.S(e,t,i);var s=Ps;if(s&&e){var f=wr(s).hoistableStyles,_=Us(e);t=t||"default";var M=f.get(_);if(!M){var H={loading:0,preload:null};if(M=s.querySelector(Fa(_)))H.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},i),(i=kr.get(_))&&Dh(e,i);var $=M=s.createElement("link");ht($),Wt($,"link",e),$._p=new Promise(function(ae,fe){$.onload=ae,$.onerror=fe}),$.addEventListener("load",function(){H.loading|=1}),$.addEventListener("error",function(){H.loading|=2}),H.loading|=4,wl(M,t,s)}M={type:"stylesheet",instance:M,count:1,state:H},f.set(_,M)}}}function Jb(e,t){ji.X(e,t);var i=Ps;if(i&&e){var s=wr(i).hoistableScripts,f=Is(e),_=s.get(f);_||(_=i.querySelector(qa(f)),_||(e=v({src:e,async:!0},t),(t=kr.get(f))&&Oh(e,t),_=i.createElement("script"),ht(_),Wt(_,"link",e),i.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},s.set(f,_))}}function eC(e,t){ji.M(e,t);var i=Ps;if(i&&e){var s=wr(i).hoistableScripts,f=Is(e),_=s.get(f);_||(_=i.querySelector(qa(f)),_||(e=v({src:e,async:!0,type:"module"},t),(t=kr.get(f))&&Oh(e,t),_=i.createElement("script"),ht(_),Wt(_,"link",e),i.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},s.set(f,_))}}function Mv(e,t,i,s){var f=(f=G.current)?Cl(f):null;if(!f)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Us(i.href),i=wr(f).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Us(i.href);var _=wr(f).hoistableStyles,M=_.get(e);if(M||(f=f.ownerDocument||f,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(e,M),(_=f.querySelector(Fa(e)))&&!_._p&&(M.instance=_,M.state.loading=5),kr.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},kr.set(e,i),_||tC(f,e,i,M.state))),t&&s===null)throw Error(l(528,""));return M}if(t&&s!==null)throw Error(l(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Is(i),i=wr(f).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Us(e){return'href="'+Er(e)+'"'}function Fa(e){return'link[rel="stylesheet"]['+e+"]"}function Lv(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function tC(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Wt(t,"link",i),ht(t),e.head.appendChild(t))}function Is(e){return'[src="'+Er(e)+'"]'}function qa(e){return"script[async]"+e}function kv(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Er(i.href)+'"]');if(s)return t.instance=s,ht(s),s;var f=v({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ht(s),Wt(s,"style",f),wl(s,i.precedence,e),t.instance=s;case"stylesheet":f=Us(i.href);var _=e.querySelector(Fa(f));if(_)return t.state.loading|=4,t.instance=_,ht(_),_;s=Lv(i),(f=kr.get(f))&&Dh(s,f),_=(e.ownerDocument||e).createElement("link"),ht(_);var M=_;return M._p=new Promise(function(H,$){M.onload=H,M.onerror=$}),Wt(_,"link",s),t.state.loading|=4,wl(_,i.precedence,e),t.instance=_;case"script":return _=Is(i.src),(f=e.querySelector(qa(_)))?(t.instance=f,ht(f),f):(s=i,(f=kr.get(_))&&(s=v({},i),Oh(s,f)),e=e.ownerDocument||e,f=e.createElement("script"),ht(f),Wt(f,"link",s),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,wl(s,i.precedence,e));return t.instance}function wl(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,_=f,M=0;M<s.length;M++){var H=s[M];if(H.dataset.precedence===t)_=H;else if(_!==f)break}_?_.parentNode.insertBefore(e,_.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Dh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Oh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xl=null;function Bv(e,t,i){if(xl===null){var s=new Map,f=xl=new Map;f.set(i,s)}else f=xl,s=f.get(i),s||(s=new Map,f.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var _=i[f];if(!(_[dt]||_[Se]||e==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var M=_.getAttribute(t)||"";M=e+M;var H=s.get(M);H?H.push(_):s.set(M,[_])}}return s}function Nv(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function rC(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function jv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function iC(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=Us(s.href),_=t.querySelector(Fa(f));if(_){t=_._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=El.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=_,ht(_);return}_=t.ownerDocument||t,s=Lv(s),(f=kr.get(f))&&Dh(s,f),_=_.createElement("link"),ht(_);var M=_;M._p=new Promise(function(H,$){M.onload=H,M.onerror=$}),Wt(_,"link",s),i.instance=_}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=El.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Mh=0;function nC(e,t){return e.stylesheets&&e.count===0&&Al(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Al(e,e.stylesheets),e.unsuspend){var _=e.unsuspend;e.unsuspend=null,_()}},6e4+t);0<e.imgBytes&&Mh===0&&(Mh=62500*zb());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Al(e,e.stylesheets),e.unsuspend)){var _=e.unsuspend;e.unsuspend=null,_()}},(e.imgBytes>Mh?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function El(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Al(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rl=null;function Al(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rl=new Map,t.forEach(sC,e),Rl=null,El.call(e))}function sC(e,t){if(!(t.state.loading&4)){var i=Rl.get(e);if(i)var s=i.get(null);else{i=new Map,Rl.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<f.length;_++){var M=f[_];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(i.set(M.dataset.precedence,M),s=M)}s&&i.set(null,s)}f=t.instance,M=f.getAttribute("data-precedence"),_=i.get(M)||s,_===s&&i.set(null,f),i.set(M,f),this.count++,s=El.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),_?_.parentNode.insertBefore(f,_.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var Wa={$$typeof:g,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function aC(e,t,i,s,f,_,M,H,$){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ki(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ki(0),this.hiddenUpdates=Ki(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=_,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function Hv(e,t,i,s,f,_,M,H,$,ae,fe,ve){return e=new aC(e,t,i,M,$,ae,fe,ve,H),t=1,_===!0&&(t|=24),_=dr(3,null,null,t),e.current=_,_.stateNode=e,t=uu(),t.refCount++,e.pooledCache=t,t.refCount++,_.memoizedState={element:s,isDehydrated:i,cache:t},mu(_),e}function zv(e){return e?(e=_s,e):_s}function Pv(e,t,i,s,f,_){f=zv(f),s.context===null?s.context=f:s.pendingContext=f,s=en(t),s.payload={element:i},_=_===void 0?null:_,_!==null&&(s.callback=_),i=tn(e,s,t),i!==null&&(or(i,e,t),Ca(i,e,t))}function Uv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Lh(e,t){Uv(e,t),(e=e.alternate)&&Uv(e,t)}function Iv(e){if(e.tag===13||e.tag===31){var t=Hn(e,67108864);t!==null&&or(t,e,67108864),Lh(e,67108864)}}function Fv(e){if(e.tag===13||e.tag===31){var t=_r();t=ce(t);var i=Hn(e,t);i!==null&&or(i,e,t),Lh(e,t)}}var Tl=!0;function oC(e,t,i,s){var f=q.T;q.T=null;var _=Z.p;try{Z.p=2,kh(e,t,i,s)}finally{Z.p=_,q.T=f}}function lC(e,t,i,s){var f=q.T;q.T=null;var _=Z.p;try{Z.p=8,kh(e,t,i,s)}finally{Z.p=_,q.T=f}}function kh(e,t,i,s){if(Tl){var f=Bh(s);if(f===null)yh(e,t,s,Dl,i),Wv(e,s);else if(uC(f,e,t,i,s))s.stopPropagation();else if(Wv(e,s),t&4&&-1<cC.indexOf(e)){for(;f!==null;){var _=Qe(f);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var M=yi(_.pendingLanes);if(M!==0){var H=_;for(H.pendingLanes|=2,H.entangledLanes|=2;M;){var $=1<<31-Yt(M);H.entanglements[1]|=$,M&=~$}ii(_),(et&6)===0&&(hl=ut()+500,za(0))}}break;case 31:case 13:H=Hn(_,2),H!==null&&or(H,_,2),dl(),Lh(_,2)}if(_=Bh(s),_===null&&yh(e,t,s,Dl,i),_===f)break;f=_}f!==null&&s.stopPropagation()}else yh(e,t,s,null,i)}}function Bh(e){return e=jc(e),Nh(e)}var Dl=null;function Nh(e){if(Dl=null,e=Ye(e),e!==null){var t=y(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=S(t),e!==null)return e;e=null}else if(i===31){if(e=o(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dl=e,null}function qv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Nt()){case Ur:return 2;case Jr:return 8;case gt:case $t:return 32;case er:return 268435456;default:return 32}default:return 32}}var jh=!1,dn=null,mn=null,pn=null,Va=new Map,Ka=new Map,vn=[],cC="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 Wv(e,t){switch(e){case"focusin":case"focusout":dn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":Va.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ka.delete(t.pointerId)}}function Ga(e,t,i,s,f,_){return e===null||e.nativeEvent!==_?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:_,targetContainers:[f]},t!==null&&(t=Qe(t),t!==null&&Iv(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function uC(e,t,i,s,f){switch(t){case"focusin":return dn=Ga(dn,e,t,i,s,f),!0;case"dragenter":return mn=Ga(mn,e,t,i,s,f),!0;case"mouseover":return pn=Ga(pn,e,t,i,s,f),!0;case"pointerover":var _=f.pointerId;return Va.set(_,Ga(Va.get(_)||null,e,t,i,s,f)),!0;case"gotpointercapture":return _=f.pointerId,Ka.set(_,Ga(Ka.get(_)||null,e,t,i,s,f)),!0}return!1}function Vv(e){var t=Ye(e.target);if(t!==null){var i=y(t);if(i!==null){if(t=i.tag,t===13){if(t=S(i),t!==null){e.blockedOn=t,De(e.priority,function(){Fv(i)});return}}else if(t===31){if(t=o(i),t!==null){e.blockedOn=t,De(e.priority,function(){Fv(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ol(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Bh(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Nc=s,i.target.dispatchEvent(s),Nc=null}else return t=Qe(i),t!==null&&Iv(t),e.blockedOn=i,!1;t.shift()}return!0}function Kv(e,t,i){Ol(e)&&i.delete(t)}function hC(){jh=!1,dn!==null&&Ol(dn)&&(dn=null),mn!==null&&Ol(mn)&&(mn=null),pn!==null&&Ol(pn)&&(pn=null),Va.forEach(Kv),Ka.forEach(Kv)}function Ml(e,t){e.blockedOn===t&&(e.blockedOn=null,jh||(jh=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,hC)))}var Ll=null;function Gv(e){Ll!==e&&(Ll=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Ll===e&&(Ll=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],f=e[t+2];if(typeof s!="function"){if(Nh(s||i)===null)continue;break}var _=Qe(i);_!==null&&(e.splice(t,3),t-=3,Bu(_,{pending:!0,data:f,method:i.method,action:s},s,f))}}))}function Fs(e){function t($){return Ml($,e)}dn!==null&&Ml(dn,e),mn!==null&&Ml(mn,e),pn!==null&&Ml(pn,e),Va.forEach(t),Ka.forEach(t);for(var i=0;i<vn.length;i++){var s=vn[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<vn.length&&(i=vn[0],i.blockedOn===null);)Vv(i),i.blockedOn===null&&vn.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var f=i[s],_=i[s+1],M=f[be]||null;if(typeof _=="function")M||Gv(i);else if(M){var H=null;if(_&&_.hasAttribute("formAction")){if(f=_,M=_[be]||null)H=M.formAction;else if(Nh(f)!==null)continue}else H=M.action;typeof H=="function"?i[s+1]=H:(i.splice(s,3),s-=3),Gv(i)}}}function $v(){function e(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(M){return f=M})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Hh(e){this._internalRoot=e}kl.prototype.render=Hh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var i=t.current,s=_r();Pv(i,s,e,t,null,null)},kl.prototype.unmount=Hh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pv(e.current,2,null,e,null,null),dl(),t[Te]=null}};function kl(e){this._internalRoot=e}kl.prototype.unstable_scheduleHydration=function(e){if(e){var t=ye();e={blockedOn:null,target:e,priority:t};for(var i=0;i<vn.length&&t!==0&&t<vn[i].priority;i++);vn.splice(i,0,e),i===0&&Vv(e)}};var Yv=n.version;if(Yv!=="19.2.3")throw Error(l(527,Yv,"19.2.3"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=u(t),e=e!==null?C(e):null,e=e===null?null:e.stateNode,e};var fC={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bl.isDisabled&&Bl.supportsFiber)try{gi=Bl.inject(fC),_t=Bl}catch{}}return Ya.createRoot=function(e,t){if(!d(e))throw Error(l(299));var i=!1,s="",f=rp,_=ip,M=np;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(_=t.onCaughtError),t.onRecoverableError!==void 0&&(M=t.onRecoverableError)),t=Hv(e,1,!1,null,null,i,s,null,f,_,M,$v),e[Te]=t.current,_h(e),new Hh(t)},Ya.hydrateRoot=function(e,t,i){if(!d(e))throw Error(l(299));var s=!1,f="",_=rp,M=ip,H=np,$=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(_=i.onUncaughtError),i.onCaughtError!==void 0&&(M=i.onCaughtError),i.onRecoverableError!==void 0&&(H=i.onRecoverableError),i.formState!==void 0&&($=i.formState)),t=Hv(e,1,!0,t,i??null,s,f,$,_,M,H,$v),t.context=zv(null),i=t.current,s=_r(),s=ce(s),f=en(s),f.callback=null,tn(i,f,s),i=s,t.current.lanes=i,Gi(t,i),ii(t),e[Te]=t.current,_h(e),new kl(t)},Ya.version="19.2.3",Ya}var sg;function CC(){if(sg)return Uh.exports;sg=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}return r(),Uh.exports=bC(),Uh.exports}var wC=CC();const xC=Lf(wC);var Js=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},EC={setTimeout:(r,n)=>setTimeout(r,n),clearTimeout:r=>clearTimeout(r),setInterval:(r,n)=>setInterval(r,n),clearInterval:r=>clearInterval(r)},RC=class{#e=EC;#t=!1;setTimeoutProvider(r){this.#e=r}setTimeout(r,n){return this.#e.setTimeout(r,n)}clearTimeout(r){this.#e.clearTimeout(r)}setInterval(r,n){return this.#e.setInterval(r,n)}clearInterval(r){this.#e.clearInterval(r)}},Xn=new RC;function AC(r){setTimeout(r,0)}var Jn=typeof window>"u"||"Deno"in globalThis;function Zt(){}function TC(r,n){return typeof r=="function"?r(n):r}function cf(r){return typeof r=="number"&&r>=0&&r!==1/0}function N_(r,n){return Math.max(r+(n||0)-Date.now(),0)}function wn(r,n){return typeof r=="function"?r(n):r}function Nr(r,n){return typeof r=="function"?r(n):r}function ag(r,n){const{type:a="all",exact:l,fetchStatus:d,predicate:y,queryKey:S,stale:o}=r;if(S){if(l){if(n.queryHash!==Bf(S,n.options))return!1}else if(!so(n.queryKey,S))return!1}if(a!=="all"){const c=n.isActive();if(a==="active"&&!c||a==="inactive"&&c)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||d&&d!==n.state.fetchStatus||y&&!y(n))}function og(r,n){const{exact:a,status:l,predicate:d,mutationKey:y}=r;if(y){if(!n.options.mutationKey)return!1;if(a){if(es(n.options.mutationKey)!==es(y))return!1}else if(!so(n.options.mutationKey,y))return!1}return!(l&&n.state.status!==l||d&&!d(n))}function Bf(r,n){return(n?.queryKeyHashFn||es)(r)}function es(r){return JSON.stringify(r,(n,a)=>uf(a)?Object.keys(a).sort().reduce((l,d)=>(l[d]=a[d],l),{}):a)}function so(r,n){return r===n?!0:typeof r!=typeof n?!1:r&&n&&typeof r=="object"&&typeof n=="object"?Object.keys(n).every(a=>so(r[a],n[a])):!1}var DC=Object.prototype.hasOwnProperty;function j_(r,n){if(r===n)return r;const a=lg(r)&&lg(n);if(!a&&!(uf(r)&&uf(n)))return n;const d=(a?r:Object.keys(r)).length,y=a?n:Object.keys(n),S=y.length,o=a?new Array(S):{};let c=0;for(let u=0;u<S;u++){const C=a?u:y[u],v=r[C],w=n[C];if(v===w){o[C]=v,(a?u<d:DC.call(r,C))&&c++;continue}if(v===null||w===null||typeof v!="object"||typeof w!="object"){o[C]=w;continue}const x=j_(v,w);o[C]=x,x===v&&c++}return d===S&&c===d?r:o}function tc(r,n){if(!n||Object.keys(r).length!==Object.keys(n).length)return!1;for(const a in r)if(r[a]!==n[a])return!1;return!0}function lg(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function uf(r){if(!cg(r))return!1;const n=r.constructor;if(n===void 0)return!0;const a=n.prototype;return!(!cg(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function cg(r){return Object.prototype.toString.call(r)==="[object Object]"}function OC(r){return new Promise(n=>{Xn.setTimeout(n,r)})}function hf(r,n,a){return typeof a.structuralSharing=="function"?a.structuralSharing(r,n):a.structuralSharing!==!1?j_(r,n):n}function MC(r,n,a=0){const l=[...r,n];return a&&l.length>a?l.slice(1):l}function LC(r,n,a=0){const l=[n,...r];return a&&l.length>a?l.slice(0,-1):l}var Nf=Symbol();function H_(r,n){return!r.queryFn&&n?.initialPromise?()=>n.initialPromise:!r.queryFn||r.queryFn===Nf?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function z_(r,n){return typeof r=="function"?r(...n):!!r}var kC=class extends Js{#e;#t;#r;constructor(){super(),this.#r=r=>{if(!Jn&&window.addEventListener){const n=()=>r();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(r){this.#r=r,this.#t?.(),this.#t=r(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(r){this.#e!==r&&(this.#e=r,this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(n=>{n(r)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},jf=new kC;function ff(){let r,n;const a=new Promise((d,y)=>{r=d,n=y});a.status="pending",a.catch(()=>{});function l(d){Object.assign(a,d),delete a.resolve,delete a.reject}return a.resolve=d=>{l({status:"fulfilled",value:d}),r(d)},a.reject=d=>{l({status:"rejected",reason:d}),n(d)},a}var BC=AC;function NC(){let r=[],n=0,a=o=>{o()},l=o=>{o()},d=BC;const y=o=>{n?r.push(o):d(()=>{a(o)})},S=()=>{const o=r;r=[],o.length&&d(()=>{l(()=>{o.forEach(c=>{a(c)})})})};return{batch:o=>{let c;n++;try{c=o()}finally{n--,n||S()}return c},batchCalls:o=>(...c)=>{y(()=>{o(...c)})},schedule:y,setNotifyFunction:o=>{a=o},setBatchNotifyFunction:o=>{l=o},setScheduler:o=>{d=o}}}var Bt=NC(),jC=class extends Js{#e=!0;#t;#r;constructor(){super(),this.#r=r=>{if(!Jn&&window.addEventListener){const n=()=>r(!0),a=()=>r(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(r){this.#r=r,this.#t?.(),this.#t=r(this.setOnline.bind(this))}setOnline(r){this.#e!==r&&(this.#e=r,this.listeners.forEach(a=>{a(r)}))}isOnline(){return this.#e}},rc=new jC;function HC(r){return Math.min(1e3*2**r,3e4)}function P_(r){return(r??"online")==="online"?rc.isOnline():!0}var df=class extends Error{constructor(r){super("CancelledError"),this.revert=r?.revert,this.silent=r?.silent}};function U_(r){let n=!1,a=0,l;const d=ff(),y=()=>d.status!=="pending",S=b=>{if(!y()){const h=new df(b);w(h),r.onCancel?.(h)}},o=()=>{n=!0},c=()=>{n=!1},u=()=>jf.isFocused()&&(r.networkMode==="always"||rc.isOnline())&&r.canRun(),C=()=>P_(r.networkMode)&&r.canRun(),v=b=>{y()||(l?.(),d.resolve(b))},w=b=>{y()||(l?.(),d.reject(b))},x=()=>new Promise(b=>{l=h=>{(y()||u())&&b(h)},r.onPause?.()}).then(()=>{l=void 0,y()||r.onContinue?.()}),R=()=>{if(y())return;let b;const h=a===0?r.initialPromise:void 0;try{b=h??r.fn()}catch(m){b=Promise.reject(m)}Promise.resolve(b).then(v).catch(m=>{if(y())return;const p=r.retry??(Jn?0:3),g=r.retryDelay??HC,A=typeof g=="function"?g(a,m):g,D=p===!0||typeof p=="number"&&a<p||typeof p=="function"&&p(a,m);if(n||!D){w(m);return}a++,r.onFail?.(a,m),OC(A).then(()=>u()?void 0:x()).then(()=>{n?w(m):R()})})};return{promise:d,status:()=>d.status,cancel:S,continue:()=>(l?.(),d),cancelRetry:o,continueRetry:c,canStart:C,start:()=>(C()?R():x().then(R),d)}}var I_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cf(this.gcTime)&&(this.#e=Xn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Jn?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Xn.clearTimeout(this.#e),this.#e=void 0)}},zC=class extends I_{#e;#t;#r;#n;#i;#a;#o;constructor(r){super(),this.#o=!1,this.#a=r.defaultOptions,this.setOptions(r.options),this.observers=[],this.#n=r.client,this.#r=this.#n.getQueryCache(),this.queryKey=r.queryKey,this.queryHash=r.queryHash,this.#e=hg(this.options),this.state=r.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(r){if(this.options={...this.#a,...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=hg(this.options);n.data!==void 0&&(this.setState(ug(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(r,n){const a=hf(this.state.data,r,this.options);return this.#s({data:a,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),a}setState(r,n){this.#s({type:"setState",state:r,setStateOptions:n})}cancel(r){const n=this.#i?.promise;return this.#i?.cancel(r),n?n.then(Zt).catch(Zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(r=>Nr(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>wn(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!N_(this.state.dataUpdatedAt,r)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(n=>n!==r),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(r,n){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(r&&this.setOptions(r),!this.options.queryFn){const o=this.observers.find(c=>c.options.queryFn);o&&this.setOptions(o.options)}const a=new AbortController,l=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#o=!0,a.signal)})},d=()=>{const o=H_(this.options,n),u=(()=>{const C={client:this.#n,queryKey:this.queryKey,meta:this.meta};return l(C),C})();return this.#o=!1,this.options.persister?this.options.persister(o,u,this):o(u)},S=(()=>{const o={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:d};return l(o),o})();this.options.behavior?.onFetch(S,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==S.fetchOptions?.meta)&&this.#s({type:"fetch",meta:S.fetchOptions?.meta}),this.#i=U_({initialPromise:n?.initialPromise,fn:S.fetchFn,onCancel:o=>{o instanceof df&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),a.abort()},onFail:(o,c)=>{this.#s({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:S.options.retry,retryDelay:S.options.retryDelay,networkMode:S.options.networkMode,canRun:()=>!0});try{const o=await this.#i.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#r.config.onSuccess?.(o,this),this.#r.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof df){if(o.silent)return this.#i.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#s({type:"error",error:o}),this.#r.config.onError?.(o,this),this.#r.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#s(r){const n=a=>{switch(r.type){case"failed":return{...a,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...F_(a.data,this.options),fetchMeta:r.meta??null};case"success":const l={...a,...ug(r.data,r.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=r.manual?l:void 0,l;case"error":const d=r.error;return{...a,error:d,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...r.state}}};this.state=n(this.state),Bt.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:r})})}};function F_(r,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P_(n.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function ug(r,n){return{data:r,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function hg(r){const n=typeof r.initialData=="function"?r.initialData():r.initialData,a=n!==void 0,l=a?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:a?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var PC=class extends Js{constructor(r,n){super(),this.options=n,this.#e=r,this.#s=null,this.#o=ff(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#r=void 0;#n=void 0;#i;#a;#o;#s;#p;#f;#d;#c;#u;#l;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),fg(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#b(),this.#t.removeObserver(this)}setOptions(r){const n=this.options,a=this.#t;if(this.options=this.#e.defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#t.setOptions(this.options),n._defaulted&&!tc(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&dg(this.#t,a,this.options,n)&&this.#h(),this.updateResult(),l&&(this.#t!==a||Nr(this.options.enabled,this.#t)!==Nr(n.enabled,this.#t)||wn(this.options.staleTime,this.#t)!==wn(n.staleTime,this.#t))&&this.#v();const d=this.#g();l&&(this.#t!==a||Nr(this.options.enabled,this.#t)!==Nr(n.enabled,this.#t)||d!==this.#l)&&this.#_(d)}getOptimisticResult(r){const n=this.#e.getQueryCache().build(this.#e,r),a=this.createResult(n,r);return IC(this,a)&&(this.#n=a,this.#a=this.options,this.#i=this.#t.state),a}getCurrentResult(){return this.#n}trackResult(r,n){return new Proxy(r,{get:(a,l)=>(this.trackProp(l),n?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,l))})}trackProp(r){this.#m.add(r)}getCurrentQuery(){return this.#t}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const n=this.#e.defaultQueryOptions(r),a=this.#e.getQueryCache().build(this.#e,n);return a.fetch().then(()=>this.createResult(a,n))}fetch(r){return this.#h({...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#h(r){this.#C();let n=this.#t.fetch(this.options,r);return r?.throwOnError||(n=n.catch(Zt)),n}#v(){this.#S();const r=wn(this.options.staleTime,this.#t);if(Jn||this.#n.isStale||!cf(r))return;const a=N_(this.#n.dataUpdatedAt,r)+1;this.#c=Xn.setTimeout(()=>{this.#n.isStale||this.updateResult()},a)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#_(r){this.#b(),this.#l=r,!(Jn||Nr(this.options.enabled,this.#t)===!1||!cf(this.#l)||this.#l===0)&&(this.#u=Xn.setInterval(()=>{(this.options.refetchIntervalInBackground||jf.isFocused())&&this.#h()},this.#l))}#y(){this.#v(),this.#_(this.#g())}#S(){this.#c&&(Xn.clearTimeout(this.#c),this.#c=void 0)}#b(){this.#u&&(Xn.clearInterval(this.#u),this.#u=void 0)}createResult(r,n){const a=this.#t,l=this.options,d=this.#n,y=this.#i,S=this.#a,c=r!==a?r.state:this.#r,{state:u}=r;let C={...u},v=!1,w;if(n._optimisticResults){const E=this.hasListeners(),B=!E&&fg(r,n),W=E&&dg(r,a,n,l);(B||W)&&(C={...C,...F_(u.data,r.options)}),n._optimisticResults==="isRestoring"&&(C.fetchStatus="idle")}let{error:x,errorUpdatedAt:R,status:b}=C;w=C.data;let h=!1;if(n.placeholderData!==void 0&&w===void 0&&b==="pending"){let E;d?.isPlaceholderData&&n.placeholderData===S?.placeholderData?(E=d.data,h=!0):E=typeof n.placeholderData=="function"?n.placeholderData(this.#d?.state.data,this.#d):n.placeholderData,E!==void 0&&(b="success",w=hf(d?.data,E,n),v=!0)}if(n.select&&w!==void 0&&!h)if(d&&w===y?.data&&n.select===this.#p)w=this.#f;else try{this.#p=n.select,w=n.select(w),w=hf(d?.data,w,n),this.#f=w,this.#s=null}catch(E){this.#s=E}this.#s&&(x=this.#s,w=this.#f,R=Date.now(),b="error");const m=C.fetchStatus==="fetching",p=b==="pending",g=b==="error",A=p&&m,D=w!==void 0,T={status:b,fetchStatus:C.fetchStatus,isPending:p,isSuccess:b==="success",isError:g,isInitialLoading:A,isLoading:A,data:w,dataUpdatedAt:C.dataUpdatedAt,error:x,errorUpdatedAt:R,failureCount:C.fetchFailureCount,failureReason:C.fetchFailureReason,errorUpdateCount:C.errorUpdateCount,isFetched:C.dataUpdateCount>0||C.errorUpdateCount>0,isFetchedAfterMount:C.dataUpdateCount>c.dataUpdateCount||C.errorUpdateCount>c.errorUpdateCount,isFetching:m,isRefetching:m&&!p,isLoadingError:g&&!D,isPaused:C.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:g&&D,isStale:Hf(r,n),refetch:this.refetch,promise:this.#o,isEnabled:Nr(n.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const E=F=>{T.status==="error"?F.reject(T.error):T.data!==void 0&&F.resolve(T.data)},B=()=>{const F=this.#o=T.promise=ff();E(F)},W=this.#o;switch(W.status){case"pending":r.queryHash===a.queryHash&&E(W);break;case"fulfilled":(T.status==="error"||T.data!==W.value)&&B();break;case"rejected":(T.status!=="error"||T.error!==W.reason)&&B();break}}return T}updateResult(){const r=this.#n,n=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#d=this.#t),tc(n,r))return;this.#n=n;const a=()=>{if(!r)return!0;const{notifyOnChangeProps:l}=this.options,d=typeof l=="function"?l():l;if(d==="all"||!d&&!this.#m.size)return!0;const y=new Set(d??this.#m);return this.options.throwOnError&&y.add("error"),Object.keys(this.#n).some(S=>{const o=S;return this.#n[o]!==r[o]&&y.has(o)})};this.#w({listeners:a()})}#C(){const r=this.#e.getQueryCache().build(this.#e,this.options);if(r===this.#t)return;const n=this.#t;this.#t=r,this.#r=r.state,this.hasListeners()&&(n?.removeObserver(this),r.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#w(r){Bt.batch(()=>{r.listeners&&this.listeners.forEach(n=>{n(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function UC(r,n){return Nr(n.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&n.retryOnMount===!1)}function fg(r,n){return UC(r,n)||r.state.data!==void 0&&mf(r,n,n.refetchOnMount)}function mf(r,n,a){if(Nr(n.enabled,r)!==!1&&wn(n.staleTime,r)!=="static"){const l=typeof a=="function"?a(r):a;return l==="always"||l!==!1&&Hf(r,n)}return!1}function dg(r,n,a,l){return(r!==n||Nr(l.enabled,r)===!1)&&(!a.suspense||r.state.status!=="error")&&Hf(r,a)}function Hf(r,n){return Nr(n.enabled,r)!==!1&&r.isStaleByTime(wn(n.staleTime,r))}function IC(r,n){return!tc(r.getCurrentResult(),n)}function mg(r){return{onFetch:(n,a)=>{const l=n.options,d=n.fetchOptions?.meta?.fetchMore?.direction,y=n.state.data?.pages||[],S=n.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let C=!1;const v=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(n.signal.aborted?C=!0:n.signal.addEventListener("abort",()=>{C=!0}),n.signal)})},w=H_(n.options,n.fetchOptions),x=async(R,b,h)=>{if(C)return Promise.reject();if(b==null&&R.pages.length)return Promise.resolve(R);const p=(()=>{const L={client:n.client,queryKey:n.queryKey,pageParam:b,direction:h?"backward":"forward",meta:n.options.meta};return v(L),L})(),g=await w(p),{maxPages:A}=n.options,D=h?LC:MC;return{pages:D(R.pages,g,A),pageParams:D(R.pageParams,b,A)}};if(d&&y.length){const R=d==="backward",b=R?FC:pg,h={pages:y,pageParams:S},m=b(l,h);o=await x(h,m,R)}else{const R=r??y.length;do{const b=c===0?S[0]??l.initialPageParam:pg(l,o);if(c>0&&b==null)break;o=await x(o,b),c++}while(c<R)}return o};n.options.persister?n.fetchFn=()=>n.options.persister?.(u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},a):n.fetchFn=u}}}function pg(r,{pages:n,pageParams:a}){const l=n.length-1;return n.length>0?r.getNextPageParam(n[l],n,a[l],a):void 0}function FC(r,{pages:n,pageParams:a}){return n.length>0?r.getPreviousPageParam?.(n[0],n,a[0],a):void 0}var qC=class extends I_{#e;#t;#r;#n;constructor(r){super(),this.#e=r.client,this.mutationId=r.mutationId,this.#r=r.mutationCache,this.#t=[],this.state=r.state||q_(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){this.#t.includes(r)||(this.#t.push(r),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){this.#t=this.#t.filter(n=>n!==r),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(r){const n=()=>{this.#i({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=U_({fn:()=>this.options.mutationFn?this.options.mutationFn(r,a):Promise.reject(new Error("No mutationFn found")),onFail:(y,S)=>{this.#i({type:"failed",failureCount:y,error:S})},onPause:()=>{this.#i({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const l=this.state.status==="pending",d=!this.#n.canStart();try{if(l)n();else{this.#i({type:"pending",variables:r,isPaused:d}),await this.#r.config.onMutate?.(r,this,a);const S=await this.options.onMutate?.(r,a);S!==this.state.context&&this.#i({type:"pending",context:S,variables:r,isPaused:d})}const y=await this.#n.start();return await this.#r.config.onSuccess?.(y,r,this.state.context,this,a),await this.options.onSuccess?.(y,r,this.state.context,a),await this.#r.config.onSettled?.(y,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(y,null,r,this.state.context,a),this.#i({type:"success",data:y}),y}catch(y){try{throw await this.#r.config.onError?.(y,r,this.state.context,this,a),await this.options.onError?.(y,r,this.state.context,a),await this.#r.config.onSettled?.(void 0,y,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(void 0,y,r,this.state.context,a),y}finally{this.#i({type:"error",error:y})}}finally{this.#r.runNext(this)}}#i(r){const n=a=>{switch(r.type){case"failed":return{...a,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...a,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:r.error,failureCount:a.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Bt.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(r)}),this.#r.notify({mutation:this,type:"updated",action:r})})}};function q_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var WC=class extends Js{constructor(r={}){super(),this.config=r,this.#e=new Set,this.#t=new Map,this.#r=0}#e;#t;#r;build(r,n,a){const l=new qC({client:r,mutationCache:this,mutationId:++this.#r,options:r.defaultMutationOptions(n),state:a});return this.add(l),l}add(r){this.#e.add(r);const n=Nl(r);if(typeof n=="string"){const a=this.#t.get(n);a?a.push(r):this.#t.set(n,[r])}this.notify({type:"added",mutation:r})}remove(r){if(this.#e.delete(r)){const n=Nl(r);if(typeof n=="string"){const a=this.#t.get(n);if(a)if(a.length>1){const l=a.indexOf(r);l!==-1&&a.splice(l,1)}else a[0]===r&&this.#t.delete(n)}}this.notify({type:"removed",mutation:r})}canRun(r){const n=Nl(r);if(typeof n=="string"){const l=this.#t.get(n)?.find(d=>d.state.status==="pending");return!l||l===r}else return!0}runNext(r){const n=Nl(r);return typeof n=="string"?this.#t.get(n)?.find(l=>l!==r&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Bt.batch(()=>{this.#e.forEach(r=>{this.notify({type:"removed",mutation:r})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(r){const n={exact:!0,...r};return this.getAll().find(a=>og(n,a))}findAll(r={}){return this.getAll().filter(n=>og(r,n))}notify(r){Bt.batch(()=>{this.listeners.forEach(n=>{n(r)})})}resumePausedMutations(){const r=this.getAll().filter(n=>n.state.isPaused);return Bt.batch(()=>Promise.all(r.map(n=>n.continue().catch(Zt))))}};function Nl(r){return r.options.scope?.id}var VC=class extends Js{#e;#t=void 0;#r;#n;constructor(n,a){super(),this.#e=n,this.setOptions(a),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const a=this.options;this.options=this.#e.defaultMutationOptions(n),tc(this.options,a)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),a?.mutationKey&&this.options.mutationKey&&es(a.mutationKey)!==es(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(n){this.#i(),this.#a(n)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#a()}mutate(n,a){return this.#n=a,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(n)}#i(){const n=this.#r?.state??q_();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#a(n){Bt.batch(()=>{if(this.#n&&this.hasListeners()){const a=this.#t.variables,l=this.#t.context,d={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};n?.type==="success"?(this.#n.onSuccess?.(n.data,a,l,d),this.#n.onSettled?.(n.data,null,a,l,d)):n?.type==="error"&&(this.#n.onError?.(n.error,a,l,d),this.#n.onSettled?.(void 0,n.error,a,l,d))}this.listeners.forEach(a=>{a(this.#t)})})}},KC=class extends Js{constructor(r={}){super(),this.config=r,this.#e=new Map}#e;build(r,n,a){const l=n.queryKey,d=n.queryHash??Bf(l,n);let y=this.get(d);return y||(y=new zC({client:r,queryKey:l,queryHash:d,options:r.defaultQueryOptions(n),state:a,defaultOptions:r.getQueryDefaults(l)}),this.add(y)),y}add(r){this.#e.has(r.queryHash)||(this.#e.set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const n=this.#e.get(r.queryHash);n&&(r.destroy(),n===r&&this.#e.delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){Bt.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return this.#e.get(r)}getAll(){return[...this.#e.values()]}find(r){const n={exact:!0,...r};return this.getAll().find(a=>ag(n,a))}findAll(r={}){const n=this.getAll();return Object.keys(r).length>0?n.filter(a=>ag(r,a)):n}notify(r){Bt.batch(()=>{this.listeners.forEach(n=>{n(r)})})}onFocus(){Bt.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){Bt.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},GC=class{#e;#t;#r;#n;#i;#a;#o;#s;constructor(r={}){this.#e=r.queryCache||new KC,this.#t=r.mutationCache||new WC,this.#r=r.defaultOptions||{},this.#n=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=jf.subscribe(async r=>{r&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=rc.subscribe(async r=>{r&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(r){return this.#e.findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return this.#t.findAll({...r,status:"pending"}).length}getQueryData(r){const n=this.defaultQueryOptions({queryKey:r});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(r){const n=this.defaultQueryOptions(r),a=this.#e.build(this,n),l=a.state.data;return l===void 0?this.fetchQuery(r):(r.revalidateIfStale&&a.isStaleByTime(wn(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(l))}getQueriesData(r){return this.#e.findAll(r).map(({queryKey:n,state:a})=>{const l=a.data;return[n,l]})}setQueryData(r,n,a){const l=this.defaultQueryOptions({queryKey:r}),y=this.#e.get(l.queryHash)?.state.data,S=TC(n,y);if(S!==void 0)return this.#e.build(this,l).setData(S,{...a,manual:!0})}setQueriesData(r,n,a){return Bt.batch(()=>this.#e.findAll(r).map(({queryKey:l})=>[l,this.setQueryData(l,n,a)]))}getQueryState(r){const n=this.defaultQueryOptions({queryKey:r});return this.#e.get(n.queryHash)?.state}removeQueries(r){const n=this.#e;Bt.batch(()=>{n.findAll(r).forEach(a=>{n.remove(a)})})}resetQueries(r,n){const a=this.#e;return Bt.batch(()=>(a.findAll(r).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...r},n)))}cancelQueries(r,n={}){const a={revert:!0,...n},l=Bt.batch(()=>this.#e.findAll(r).map(d=>d.cancel(a)));return Promise.all(l).then(Zt).catch(Zt)}invalidateQueries(r,n={}){return Bt.batch(()=>(this.#e.findAll(r).forEach(a=>{a.invalidate()}),r?.refetchType==="none"?Promise.resolve():this.refetchQueries({...r,type:r?.refetchType??r?.type??"active"},n)))}refetchQueries(r,n={}){const a={...n,cancelRefetch:n.cancelRefetch??!0},l=Bt.batch(()=>this.#e.findAll(r).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let y=d.fetch(void 0,a);return a.throwOnError||(y=y.catch(Zt)),d.state.fetchStatus==="paused"?Promise.resolve():y}));return Promise.all(l).then(Zt)}fetchQuery(r){const n=this.defaultQueryOptions(r);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n);return a.isStaleByTime(wn(n.staleTime,a))?a.fetch(n):Promise.resolve(a.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Zt).catch(Zt)}fetchInfiniteQuery(r){return r.behavior=mg(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Zt).catch(Zt)}ensureInfiniteQueryData(r){return r.behavior=mg(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return rc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(r){this.#r=r}setQueryDefaults(r,n){this.#n.set(es(r),{queryKey:r,defaultOptions:n})}getQueryDefaults(r){const n=[...this.#n.values()],a={};return n.forEach(l=>{so(r,l.queryKey)&&Object.assign(a,l.defaultOptions)}),a}setMutationDefaults(r,n){this.#i.set(es(r),{mutationKey:r,defaultOptions:n})}getMutationDefaults(r){const n=[...this.#i.values()],a={};return n.forEach(l=>{so(r,l.mutationKey)&&Object.assign(a,l.defaultOptions)}),a}defaultQueryOptions(r){if(r._defaulted)return r;const n={...this.#r.queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return n.queryHash||(n.queryHash=Bf(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Nf&&(n.enabled=!1),n}defaultMutationOptions(r){return r?._defaulted?r:{...this.#r.mutations,...r?.mutationKey&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},W_=k.createContext(void 0),ss=r=>{const n=k.useContext(W_);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},$C=({client:r,children:n})=>(k.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),O.jsx(W_.Provider,{value:r,children:n})),V_=k.createContext(!1),YC=()=>k.useContext(V_);V_.Provider;function QC(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var XC=k.createContext(QC()),ZC=()=>k.useContext(XC),JC=(r,n)=>{(r.suspense||r.throwOnError||r.experimental_prefetchInRender)&&(n.isReset()||(r.retryOnMount=!1))},e1=r=>{k.useEffect(()=>{r.clearReset()},[r])},t1=({result:r,errorResetBoundary:n,throwOnError:a,query:l,suspense:d})=>r.isError&&!n.isReset()&&!r.isFetching&&l&&(d&&r.data===void 0||z_(a,[r.error,l])),r1=r=>{if(r.suspense){const a=d=>d==="static"?d:Math.max(d??1e3,1e3),l=r.staleTime;r.staleTime=typeof l=="function"?(...d)=>a(l(...d)):a(l),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},i1=(r,n)=>r.isLoading&&r.isFetching&&!n,n1=(r,n)=>r?.suspense&&n.isPending,vg=(r,n,a)=>n.fetchOptimistic(r).catch(()=>{a.clearReset()});function s1(r,n,a){const l=YC(),d=ZC(),y=ss(),S=y.defaultQueryOptions(r);y.getDefaultOptions().queries?._experimental_beforeQuery?.(S),S._optimisticResults=l?"isRestoring":"optimistic",r1(S),JC(S,d),e1(d);const o=!y.getQueryCache().get(S.queryHash),[c]=k.useState(()=>new n(y,S)),u=c.getOptimisticResult(S),C=!l&&r.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(v=>{const w=C?c.subscribe(Bt.batchCalls(v)):Zt;return c.updateResult(),w},[c,C]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),k.useEffect(()=>{c.setOptions(S)},[S,c]),n1(S,u))throw vg(S,c,d);if(t1({result:u,errorResetBoundary:d,throwOnError:S.throwOnError,query:y.getQueryCache().get(S.queryHash),suspense:S.suspense}))throw u.error;return y.getDefaultOptions().queries?._experimental_afterQuery?.(S,u),S.experimental_prefetchInRender&&!Jn&&i1(u,l)&&(o?vg(S,c,d):y.getQueryCache().get(S.queryHash)?.promise)?.catch(Zt).finally(()=>{c.updateResult()}),S.notifyOnChangeProps?u:c.trackResult(u)}function mc(r,n){return s1(r,PC)}function mo(r,n){const a=ss(),[l]=k.useState(()=>new VC(a,r));k.useEffect(()=>{l.setOptions(r)},[l,r]);const d=k.useSyncExternalStore(k.useCallback(S=>l.subscribe(Bt.batchCalls(S)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y=k.useCallback((S,o)=>{l.mutate(S,o).catch(Zt)},[l]);if(d.error&&z_(l.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:y,mutateAsync:d.mutate}}var K_=r=>{throw TypeError(r)},a1=(r,n,a)=>n.has(r)||K_("Cannot "+a),Wh=(r,n,a)=>(a1(r,n,"read from private field"),a?a.call(r):n.get(r)),o1=(r,n,a)=>n.has(r)?K_("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,a),gg="popstate";function l1(r={}){function n(l,d){let{pathname:y,search:S,hash:o}=l.location;return ao("",{pathname:y,search:S,hash:o},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function a(l,d){return typeof d=="string"?d:ui(d)}return u1(n,a,null,r)}function Ie(r,n){if(r===!1||r===null||typeof r>"u")throw new Error(n)}function Et(r,n){if(!r){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function c1(){return Math.random().toString(36).substring(2,10)}function _g(r,n){return{usr:r.state,key:r.key,idx:n}}function ao(r,n,a=null,l){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof n=="string"?Rn(n):n,state:a,key:n&&n.key||l||c1()}}function ui({pathname:r="/",search:n="",hash:a=""}){return n&&n!=="?"&&(r+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(r+=a.charAt(0)==="#"?a:"#"+a),r}function Rn(r){let n={};if(r){let a=r.indexOf("#");a>=0&&(n.hash=r.substring(a),r=r.substring(0,a));let l=r.indexOf("?");l>=0&&(n.search=r.substring(l),r=r.substring(0,l)),r&&(n.pathname=r)}return n}function u1(r,n,a,l={}){let{window:d=document.defaultView,v5Compat:y=!1}=l,S=d.history,o="POP",c=null,u=C();u==null&&(u=0,S.replaceState({...S.state,idx:u},""));function C(){return(S.state||{idx:null}).idx}function v(){o="POP";let h=C(),m=h==null?null:h-u;u=h,c&&c({action:o,location:b.location,delta:m})}function w(h,m){o="PUSH";let p=ao(b.location,h,m);u=C()+1;let g=_g(p,u),A=b.createHref(p);try{S.pushState(g,"",A)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;d.location.assign(A)}y&&c&&c({action:o,location:b.location,delta:1})}function x(h,m){o="REPLACE";let p=ao(b.location,h,m);u=C();let g=_g(p,u),A=b.createHref(p);S.replaceState(g,"",A),y&&c&&c({action:o,location:b.location,delta:0})}function R(h){return G_(h)}let b={get action(){return o},get location(){return r(d,S)},listen(h){if(c)throw new Error("A history only accepts one active listener");return d.addEventListener(gg,v),c=h,()=>{d.removeEventListener(gg,v),c=null}},createHref(h){return n(d,h)},createURL:R,encodeLocation(h){let m=R(h);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:w,replace:x,go(h){return S.go(h)}};return b}function G_(r,n=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Ie(a,"No window.location.(origin|href) available to create URL");let l=typeof r=="string"?r:ui(r);return l=l.replace(/ $/,"%20"),!n&&l.startsWith("//")&&(l=a+l),new URL(l,a)}var to,yg=class{constructor(r){if(o1(this,to,new Map),r)for(let[n,a]of r)this.set(n,a)}get(r){if(Wh(this,to).has(r))return Wh(this,to).get(r);if(r.defaultValue!==void 0)return r.defaultValue;throw new Error("No value found for context")}set(r,n){Wh(this,to).set(r,n)}};to=new WeakMap;var h1=new Set(["lazy","caseSensitive","path","id","index","children"]);function f1(r){return h1.has(r)}var d1=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function m1(r){return d1.has(r)}function p1(r){return r.index===!0}function oo(r,n,a=[],l={},d=!1){return r.map((y,S)=>{let o=[...a,String(S)],c=typeof y.id=="string"?y.id:o.join("-");if(Ie(y.index!==!0||!y.children,"Cannot specify children on an index route"),Ie(d||!l[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),p1(y)){let u={...y,id:c};return l[c]=Sg(u,n(u)),u}else{let u={...y,id:c,children:void 0};return l[c]=Sg(u,n(u)),y.children&&(u.children=oo(y.children,n,o,l,d)),u}})}function Sg(r,n){return Object.assign(r,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...r.lazy,...n.lazy}}:{}})}function Sn(r,n,a="/"){return ro(r,n,a,!1)}function ro(r,n,a,l){let d=typeof n=="string"?Rn(n):n,y=Pr(d.pathname||"/",a);if(y==null)return null;let S=$_(r);g1(S);let o=null;for(let c=0;o==null&&c<S.length;++c){let u=T1(y);o=R1(S[c],u,l)}return o}function v1(r,n){let{route:a,pathname:l,params:d}=r;return{id:a.id,pathname:l,params:d,data:n[a.id],loaderData:n[a.id],handle:a.handle}}function $_(r,n=[],a=[],l="",d=!1){let y=(S,o,c=d,u)=>{let C={relativePath:u===void 0?S.path||"":u,caseSensitive:S.caseSensitive===!0,childrenIndex:o,route:S};if(C.relativePath.startsWith("/")){if(!C.relativePath.startsWith(l)&&c)return;Ie(C.relativePath.startsWith(l),`Absolute route path "${C.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),C.relativePath=C.relativePath.slice(l.length)}let v=li([l,C.relativePath]),w=a.concat(C);S.children&&S.children.length>0&&(Ie(S.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),$_(S.children,n,w,v,c)),!(S.path==null&&!S.index)&&n.push({path:v,score:x1(v,S.index),routesMeta:w})};return r.forEach((S,o)=>{if(S.path===""||!S.path?.includes("?"))y(S,o);else for(let c of Y_(S.path))y(S,o,!0,c)}),n}function Y_(r){let n=r.split("/");if(n.length===0)return[];let[a,...l]=n,d=a.endsWith("?"),y=a.replace(/\?$/,"");if(l.length===0)return d?[y,""]:[y];let S=Y_(l.join("/")),o=[];return o.push(...S.map(c=>c===""?y:[y,c].join("/"))),d&&o.push(...S),o.map(c=>r.startsWith("/")&&c===""?"/":c)}function g1(r){r.sort((n,a)=>n.score!==a.score?a.score-n.score:E1(n.routesMeta.map(l=>l.childrenIndex),a.routesMeta.map(l=>l.childrenIndex)))}var _1=/^:[\w-]+$/,y1=3,S1=2,b1=1,C1=10,w1=-2,bg=r=>r==="*";function x1(r,n){let a=r.split("/"),l=a.length;return a.some(bg)&&(l+=w1),n&&(l+=S1),a.filter(d=>!bg(d)).reduce((d,y)=>d+(_1.test(y)?y1:y===""?b1:C1),l)}function E1(r,n){return r.length===n.length&&r.slice(0,-1).every((l,d)=>l===n[d])?r[r.length-1]-n[n.length-1]:0}function R1(r,n,a=!1){let{routesMeta:l}=r,d={},y="/",S=[];for(let o=0;o<l.length;++o){let c=l[o],u=o===l.length-1,C=y==="/"?n:n.slice(y.length)||"/",v=ic({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},C),w=c.route;if(!v&&u&&a&&!l[l.length-1].route.index&&(v=ic({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},C)),!v)return null;Object.assign(d,v.params),S.push({params:d,pathname:li([y,v.pathname]),pathnameBase:L1(li([y,v.pathnameBase])),route:w}),v.pathnameBase!=="/"&&(y=li([y,v.pathnameBase]))}return S}function ic(r,n){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[a,l]=A1(r.path,r.caseSensitive,r.end),d=n.match(a);if(!d)return null;let y=d[0],S=y.replace(/(.)\/+$/,"$1"),o=d.slice(1);return{params:l.reduce((u,{paramName:C,isOptional:v},w)=>{if(C==="*"){let R=o[w]||"";S=y.slice(0,y.length-R.length).replace(/(.)\/+$/,"$1")}const x=o[w];return v&&!x?u[C]=void 0:u[C]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:y,pathnameBase:S,pattern:r}}function A1(r,n=!1,a=!0){Et(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let l=[],d="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(S,o,c)=>(l.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(l.push({paramName:"*"}),d+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?d+="\\/*$":r!==""&&r!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,n?void 0:"i"),l]}function T1(r){try{return r.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Et(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),r}}function Pr(r,n){if(n==="/")return r;if(!r.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,l=r.charAt(a);return l&&l!=="/"?null:r.slice(a)||"/"}function D1({basename:r,pathname:n}){return n==="/"?r:li([r,n])}var O1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pc=r=>O1.test(r);function M1(r,n="/"){let{pathname:a,search:l="",hash:d=""}=typeof r=="string"?Rn(r):r,y;if(a)if(pc(a))y=a;else{if(a.includes("//")){let S=a;a=a.replace(/\/\/+/g,"/"),Et(!1,`Pathnames cannot have embedded double slashes - normalizing ${S} -> ${a}`)}a.startsWith("/")?y=Cg(a.substring(1),"/"):y=Cg(a,n)}else y=n;return{pathname:y,search:k1(l),hash:B1(d)}}function Cg(r,n){let a=n.replace(/\/+$/,"").split("/");return r.split("/").forEach(d=>{d===".."?a.length>1&&a.pop():d!=="."&&a.push(d)}),a.length>1?a.join("/"):"/"}function Vh(r,n,a,l){return`Cannot include a '${r}' character in a manually specified \`to.${n}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Q_(r){return r.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function zf(r){let n=Q_(r);return n.map((a,l)=>l===n.length-1?a.pathname:a.pathnameBase)}function Pf(r,n,a,l=!1){let d;typeof r=="string"?d=Rn(r):(d={...r},Ie(!d.pathname||!d.pathname.includes("?"),Vh("?","pathname","search",d)),Ie(!d.pathname||!d.pathname.includes("#"),Vh("#","pathname","hash",d)),Ie(!d.search||!d.search.includes("#"),Vh("#","search","hash",d)));let y=r===""||d.pathname==="",S=y?"/":d.pathname,o;if(S==null)o=a;else{let v=n.length-1;if(!l&&S.startsWith("..")){let w=S.split("/");for(;w[0]==="..";)w.shift(),v-=1;d.pathname=w.join("/")}o=v>=0?n[v]:"/"}let c=M1(d,o),u=S&&S!=="/"&&S.endsWith("/"),C=(y||S===".")&&a.endsWith("/");return!c.pathname.endsWith("/")&&(u||C)&&(c.pathname+="/"),c}var li=r=>r.join("/").replace(/\/\/+/g,"/"),L1=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),k1=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,B1=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,vc=class{constructor(r,n,a,l=!1){this.status=r,this.statusText=n||"",this.internal=l,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function lo(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function po(r){return r.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Cn=Symbol("Uninstrumented");function N1(r,n){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};r.forEach(d=>d({id:n.id,index:n.index,path:n.path,instrument(y){let S=Object.keys(a);for(let o of S)y[o]&&a[o].push(y[o])}}));let l={};if(typeof n.lazy=="function"&&a.lazy.length>0){let d=$s(a.lazy,n.lazy,()=>{});d&&(l.lazy=d)}if(typeof n.lazy=="object"){let d=n.lazy;["middleware","loader","action"].forEach(y=>{let S=d[y],o=a[`lazy.${y}`];if(typeof S=="function"&&o.length>0){let c=$s(o,S,()=>{});c&&(l.lazy=Object.assign(l.lazy||{},{[y]:c}))}})}return["loader","action"].forEach(d=>{let y=n[d];if(typeof y=="function"&&a[d].length>0){let S=y[Cn]??y,o=$s(a[d],S,(...c)=>wg(c[0]));o&&(o[Cn]=S,l[d]=o)}}),n.middleware&&n.middleware.length>0&&a.middleware.length>0&&(l.middleware=n.middleware.map(d=>{let y=d[Cn]??d,S=$s(a.middleware,y,(...o)=>wg(o[0]));return S?(S[Cn]=y,S):d})),l}function j1(r,n){let a={navigate:[],fetch:[]};if(n.forEach(l=>l({instrument(d){let y=Object.keys(d);for(let S of y)d[S]&&a[S].push(d[S])}})),a.navigate.length>0){let l=r.navigate[Cn]??r.navigate,d=$s(a.navigate,l,(...y)=>{let[S,o]=y;return{to:typeof S=="number"||typeof S=="string"?S:S?ui(S):".",...xg(r,o??{})}});d&&(d[Cn]=l,r.navigate=d)}if(a.fetch.length>0){let l=r.fetch[Cn]??r.fetch,d=$s(a.fetch,l,(...y)=>{let[S,,o,c]=y;return{href:o??".",fetcherKey:S,...xg(r,c??{})}});d&&(d[Cn]=l,r.fetch=d)}return r}function $s(r,n,a){return r.length===0?null:async(...l)=>{let d=await X_(r,a(...l),()=>n(...l),r.length-1);if(d.type==="error")throw d.value;return d.value}}async function X_(r,n,a,l){let d=r[l],y;if(d){let S,o=async()=>(S?console.error("You cannot call instrumented handlers more than once"):S=X_(r,n,a,l-1),y=await S,Ie(y,"Expected a result"),y.type==="error"&&y.value instanceof Error?{status:"error",error:y.value}:{status:"success",error:void 0});try{await d(o,n)}catch(c){console.error("An instrumentation function threw an error:",c)}S||await o(),await S}else try{y={type:"success",value:await a()}}catch(S){y={type:"error",value:S}}return y||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function wg(r){let{request:n,context:a,params:l,unstable_pattern:d}=r;return{request:H1(n),params:{...l},unstable_pattern:d,context:z1(a)}}function xg(r,n){return{currentUrl:ui(r.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function H1(r){return{method:r.method,url:r.url,headers:{get:(...n)=>r.headers.get(...n)}}}function z1(r){if(U1(r)){let n={...r};return Object.freeze(n),n}else return{get:n=>r.get(n)}}var P1=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function U1(r){if(r===null||typeof r!="object")return!1;const n=Object.getPrototypeOf(r);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===P1}var Z_=["POST","PUT","PATCH","DELETE"],I1=new Set(Z_),F1=["GET",...Z_],q1=new Set(F1),W1=new Set([301,302,303,307,308]),V1=new Set([307,308]),Kh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},K1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Qa={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},G1=r=>({hasErrorBoundary:!!r.hasErrorBoundary}),J_="remix-router-transitions",ey=Symbol("ResetLoaderData");function $1(r){const n=r.window?r.window:typeof window<"u"?window:void 0,a=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";Ie(r.routes.length>0,"You must provide a non-empty routes array to createRouter");let l=r.hydrationRouteProperties||[],d=r.mapRouteProperties||G1,y=d;if(r.unstable_instrumentations){let Y=r.unstable_instrumentations;y=re=>({...d(re),...N1(Y.map(ce=>ce.route).filter(Boolean),re)})}let S={},o=oo(r.routes,y,void 0,S),c,u=r.basename||"/";u.startsWith("/")||(u=`/${u}`);let C=r.dataStrategy||J1,v={...r.future},w=null,x=new Set,R=null,b=null,h=null,m=r.hydrationData!=null,p=Sn(o,r.history.location,u),g=!1,A=null,D;if(p==null&&!r.patchRoutesOnNavigation){let Y=Br(404,{pathname:r.history.location.pathname}),{matches:re,route:ce}=jl(o);D=!0,p=re,A={[ce.id]:Y}}else if(p&&!r.hydrationData&&Ln(p,o,r.history.location.pathname).active&&(p=null),p)if(p.some(Y=>Y.route.lazy))D=!1;else if(!p.some(Y=>Uf(Y.route)))D=!0;else{let Y=r.hydrationData?r.hydrationData.loaderData:null,re=r.hydrationData?r.hydrationData.errors:null;if(re){let ce=p.findIndex(_e=>re[_e.route.id]!==void 0);D=p.slice(0,ce+1).every(_e=>!vf(_e.route,Y,re))}else D=p.every(ce=>!vf(ce.route,Y,re))}else{D=!1,p=[];let Y=Ln(null,o,r.history.location.pathname);Y.active&&Y.matches&&(g=!0,p=Y.matches)}let L,T={historyAction:r.history.action,location:r.history.location,matches:p,initialized:D,navigation:Kh,restoreScrollPosition:r.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:r.hydrationData&&r.hydrationData.loaderData||{},actionData:r.hydrationData&&r.hydrationData.actionData||null,errors:r.hydrationData&&r.hydrationData.errors||A,fetchers:new Map,blockers:new Map},E="POP",B=null,W=!1,F,I=!1,V=new Map,ee=null,ne=!1,q=!1,Z=new Set,K=new Map,j=0,U=-1,N=new Map,z=new Set,X=new Map,ie=new Map,de=new Set,G=new Map,Q,P=null;function he(){if(w=r.history.listen(({action:Y,location:re,delta:ce})=>{if(Q){Q(),Q=void 0;return}Et(G.size===0||ce!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let _e=Dn({currentLocation:T.location,nextLocation:re,historyAction:Y});if(_e&&ce!=null){let ye=new Promise(De=>{Q=De});r.history.go(ce*-1),_i(_e,{state:"blocked",location:re,proceed(){_i(_e,{state:"proceeding",proceed:void 0,reset:void 0,location:re}),ye.then(()=>r.history.go(ce))},reset(){let De=new Map(T.blockers);De.set(_e,Qa),me({blockers:De})}}),B?.resolve(),B=null;return}return tt(Y,re)}),a){pw(n,V);let Y=()=>vw(n,V);n.addEventListener("pagehide",Y),ee=()=>n.removeEventListener("pagehide",Y)}return T.initialized||tt("POP",T.location,{initialHydration:!0}),L}function ge(){w&&w(),ee&&ee(),x.clear(),F&&F.abort(),T.fetchers.forEach((Y,re)=>rt(re)),T.blockers.forEach((Y,re)=>Co(re))}function oe(Y){return x.add(Y),()=>x.delete(Y)}function me(Y,re={}){Y.matches&&(Y.matches=Y.matches.map(ye=>{let De=S[ye.route.id],we=ye.route;return we.element!==De.element||we.errorElement!==De.errorElement||we.hydrateFallbackElement!==De.hydrateFallbackElement?{...ye,route:De}:ye})),T={...T,...Y};let ce=[],_e=[];T.fetchers.forEach((ye,De)=>{ye.state==="idle"&&(de.has(De)?ce.push(De):_e.push(De))}),de.forEach(ye=>{!T.fetchers.has(ye)&&!K.has(ye)&&ce.push(ye)}),[...x].forEach(ye=>ye(T,{deletedFetchers:ce,newErrors:Y.errors??null,viewTransitionOpts:re.viewTransitionOpts,flushSync:re.flushSync===!0})),ce.forEach(ye=>rt(ye)),_e.forEach(ye=>T.fetchers.delete(ye))}function Ce(Y,re,{flushSync:ce}={}){let _e=T.actionData!=null&&T.navigation.formMethod!=null&&Jt(T.navigation.formMethod)&&T.navigation.state==="loading"&&Y.state?._isRedirect!==!0,ye;re.actionData?Object.keys(re.actionData).length>0?ye=re.actionData:ye=null:_e?ye=T.actionData:ye=null;let De=re.loaderData?Bg(T.loaderData,re.loaderData,re.matches||[],re.errors):T.loaderData,we=T.blockers;we.size>0&&(we=new Map(we),we.forEach((Oe,Me)=>we.set(Me,Qa)));let Se=ne?!1:wo(Y,re.matches||T.matches),be=W===!0||T.navigation.formMethod!=null&&Jt(T.navigation.formMethod)&&Y.state?._isRedirect!==!0;c&&(o=c,c=void 0),ne||E==="POP"||(E==="PUSH"?r.history.push(Y,Y.state):E==="REPLACE"&&r.history.replace(Y,Y.state));let Te;if(E==="POP"){let Oe=V.get(T.location.pathname);Oe&&Oe.has(Y.pathname)?Te={currentLocation:T.location,nextLocation:Y}:V.has(Y.pathname)&&(Te={currentLocation:Y,nextLocation:T.location})}else if(I){let Oe=V.get(T.location.pathname);Oe?Oe.add(Y.pathname):(Oe=new Set([Y.pathname]),V.set(T.location.pathname,Oe)),Te={currentLocation:T.location,nextLocation:Y}}me({...re,actionData:ye,loaderData:De,historyAction:E,location:Y,initialized:!0,navigation:Kh,revalidation:"idle",restoreScrollPosition:Se,preventScrollReset:be,blockers:we},{viewTransitionOpts:Te,flushSync:ce===!0}),E="POP",W=!1,I=!1,ne=!1,q=!1,B?.resolve(),B=null,P?.resolve(),P=null}async function ze(Y,re){if(B?.resolve(),B=null,typeof Y=="number"){B||(B=zg());let it=B.promise;return r.history.go(Y),it}let ce=pf(T.location,T.matches,u,Y,re?.fromRouteId,re?.relative),{path:_e,submission:ye,error:De}=Eg(!1,ce,re),we=T.location,Se=ao(T.location,_e,re&&re.state);Se={...Se,...r.history.encodeLocation(Se)};let be=re&&re.replace!=null?re.replace:void 0,Te="PUSH";be===!0?Te="REPLACE":be===!1||ye!=null&&Jt(ye.formMethod)&&ye.formAction===T.location.pathname+T.location.search&&(Te="REPLACE");let Oe=re&&"preventScrollReset"in re?re.preventScrollReset===!0:void 0,Me=(re&&re.flushSync)===!0,Ge=Dn({currentLocation:we,nextLocation:Se,historyAction:Te});if(Ge){_i(Ge,{state:"blocked",location:Se,proceed(){_i(Ge,{state:"proceeding",proceed:void 0,reset:void 0,location:Se}),ze(Y,re)},reset(){let it=new Map(T.blockers);it.set(Ge,Qa),me({blockers:it})}});return}await tt(Te,Se,{submission:ye,pendingError:De,preventScrollReset:Oe,replace:re&&re.replace,enableViewTransition:re&&re.viewTransition,flushSync:Me})}function ct(){P||(P=zg()),Jr(),me({revalidation:"loading"});let Y=P.promise;return T.navigation.state==="submitting"?Y:T.navigation.state==="idle"?(tt(T.historyAction,T.location,{startUninterruptedRevalidation:!0}),Y):(tt(E||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation,enableViewTransition:I===!0}),Y)}async function tt(Y,re,ce){F&&F.abort(),F=null,E=Y,ne=(ce&&ce.startUninterruptedRevalidation)===!0,Mn(T.location,T.matches),W=(ce&&ce.preventScrollReset)===!0,I=(ce&&ce.enableViewTransition)===!0;let _e=c||o,ye=ce&&ce.overrideNavigation,De=ce?.initialHydration&&T.matches&&T.matches.length>0&&!g?T.matches:Sn(_e,re,u),we=(ce&&ce.flushSync)===!0;if(De&&T.initialized&&!q&&ow(T.location,re)&&!(ce&&ce.submission&&Jt(ce.submission.formMethod))){Ce(re,{matches:De},{flushSync:we});return}let Se=Ln(De,_e,re.pathname);if(Se.active&&Se.matches&&(De=Se.matches),!De){let{error:yt,notFoundMatches:Ye,route:Qe}=Vi(re.pathname);Ce(re,{matches:Ye,loaderData:{},errors:{[Qe.id]:yt}},{flushSync:we});return}F=new AbortController;let be=Gs(r.history,re,F.signal,ce&&ce.submission),Te=r.getContext?await r.getContext():new yg,Oe;if(ce&&ce.pendingError)Oe=[bn(De).route.id,{type:"error",error:ce.pendingError}];else if(ce&&ce.submission&&Jt(ce.submission.formMethod)){let yt=await ke(be,re,ce.submission,De,Te,Se.active,ce&&ce.initialHydration===!0,{replace:ce.replace,flushSync:we});if(yt.shortCircuited)return;if(yt.pendingActionResult){let[Ye,Qe]=yt.pendingActionResult;if(yr(Qe)&&lo(Qe.error)&&Qe.error.status===404){F=null,Ce(re,{matches:yt.matches,loaderData:{},errors:{[Ye]:Qe.error}});return}}De=yt.matches||De,Oe=yt.pendingActionResult,ye=Gh(re,ce.submission),we=!1,Se.active=!1,be=Gs(r.history,be.url,be.signal)}let{shortCircuited:Me,matches:Ge,loaderData:it,errors:dt}=await Xr(be,re,De,Te,Se.active,ye,ce&&ce.submission,ce&&ce.fetcherSubmission,ce&&ce.replace,ce&&ce.initialHydration===!0,we,Oe);Me||(F=null,Ce(re,{matches:Ge||De,...Ng(Oe),loaderData:it,errors:dt}))}async function ke(Y,re,ce,_e,ye,De,we,Se={}){Jr();let be=dw(re,ce);if(me({navigation:be},{flushSync:Se.flushSync===!0}),De){let Me=await Ki(_e,re.pathname,Y.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){if(Me.partialMatches.length===0){let{matches:it,route:dt}=jl(o);return{matches:it,pendingActionResult:[dt.id,{type:"error",error:Me.error}]}}let Ge=bn(Me.partialMatches).route.id;return{matches:Me.partialMatches,pendingActionResult:[Ge,{type:"error",error:Me.error}]}}else if(Me.matches)_e=Me.matches;else{let{notFoundMatches:Ge,error:it,route:dt}=Vi(re.pathname);return{matches:Ge,pendingActionResult:[dt.id,{type:"error",error:it}]}}}let Te,Oe=Yl(_e,re);if(!Oe.route.action&&!Oe.route.lazy)Te={type:"error",error:Br(405,{method:Y.method,pathname:re.pathname,routeId:Oe.route.id})};else{let Me=Ys(y,S,Y,_e,Oe,we?[]:l,ye),Ge=await Nt(Y,Me,ye,null);if(Te=Ge[Oe.route.id],!Te){for(let it of _e)if(Ge[it.route.id]){Te=Ge[it.route.id];break}}if(Y.signal.aborted)return{shortCircuited:!0}}if(Zn(Te)){let Me;return Se&&Se.replace!=null?Me=Se.replace:Me=Mg(Te.response.headers.get("Location"),new URL(Y.url),u)===T.location.pathname+T.location.search,await ut(Y,Te,!0,{submission:ce,replace:Me}),{shortCircuited:!0}}if(yr(Te)){let Me=bn(_e,Oe.route.id);return(Se&&Se.replace)!==!0&&(E="PUSH"),{matches:_e,pendingActionResult:[Me.route.id,Te,Oe.route.id]}}return{matches:_e,pendingActionResult:[Oe.route.id,Te]}}async function Xr(Y,re,ce,_e,ye,De,we,Se,be,Te,Oe,Me){let Ge=De||Gh(re,we),it=we||Se||Hg(Ge),dt=!ne&&!Te;if(ye){if(dt){let jt=Zr(Me);me({navigation:Ge,...jt!==void 0?{actionData:jt}:{}},{flushSync:Oe})}let We=await Ki(ce,re.pathname,Y.signal);if(We.type==="aborted")return{shortCircuited:!0};if(We.type==="error"){if(We.partialMatches.length===0){let{matches:Fr,route:xr}=jl(o);return{matches:Fr,loaderData:{},errors:{[xr.id]:We.error}}}let jt=bn(We.partialMatches).route.id;return{matches:We.partialMatches,loaderData:{},errors:{[jt]:We.error}}}else if(We.matches)ce=We.matches;else{let{error:jt,notFoundMatches:Fr,route:xr}=Vi(re.pathname);return{matches:Fr,loaderData:{},errors:{[xr.id]:jt}}}}let yt=c||o,{dsMatches:Ye,revalidatingFetchers:Qe}=Rg(Y,_e,y,S,r.history,T,ce,it,re,Te?[]:l,Te===!0,q,Z,de,X,z,yt,u,r.patchRoutesOnNavigation!=null,Me);if(U=++j,!r.dataStrategy&&!Ye.some(We=>We.shouldLoad)&&!Ye.some(We=>We.route.middleware&&We.route.middleware.length>0)&&Qe.length===0){let We=Yt();return Ce(re,{matches:ce,loaderData:{},errors:Me&&yr(Me[1])?{[Me[0]]:Me[1].error}:null,...Ng(Me),...We?{fetchers:new Map(T.fetchers)}:{}},{flushSync:Oe}),{shortCircuited:!0}}if(dt){let We={};if(!ye){We.navigation=Ge;let jt=Zr(Me);jt!==void 0&&(We.actionData=jt)}Qe.length>0&&(We.fetchers=mi(Qe)),me(We,{flushSync:Oe})}Qe.forEach(We=>{_t(We.key),We.controller&&K.set(We.key,We.controller)});let cr=()=>Qe.forEach(We=>_t(We.key));F&&F.signal.addEventListener("abort",cr);let{loaderResults:wr,fetcherResults:ht}=await Ur(Ye,Qe,Y,_e);if(Y.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",cr),Qe.forEach(We=>K.delete(We.key));let ur=Hl(wr);if(ur)return await ut(Y,ur.result,!0,{replace:be}),{shortCircuited:!0};if(ur=Hl(ht),ur)return z.add(ur.key),await ut(Y,ur.result,!0,{replace:be}),{shortCircuited:!0};let{loaderData:ls,errors:hr}=kg(T,ce,wr,Me,Qe,ht);Te&&T.errors&&(hr={...T.errors,...hr});let tr=Yt(),cs=bo(U),kn=tr||cs||Qe.length>0;return{matches:ce,loaderData:ls,errors:hr,...kn?{fetchers:new Map(T.fetchers)}:{}}}function Zr(Y){if(Y&&!yr(Y[1]))return{[Y[0]]:Y[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function mi(Y){return Y.forEach(re=>{let ce=T.fetchers.get(re.key),_e=Xa(void 0,ce?ce.data:void 0);T.fetchers.set(re.key,_e)}),new Map(T.fetchers)}async function pi(Y,re,ce,_e){_t(Y);let ye=(_e&&_e.flushSync)===!0,De=c||o,we=pf(T.location,T.matches,u,ce,re,_e?.relative),Se=Sn(De,we,u),be=Ln(Se,De,we);if(be.active&&be.matches&&(Se=be.matches),!Se){$t(Y,re,Br(404,{pathname:we}),{flushSync:ye});return}let{path:Te,submission:Oe,error:Me}=Eg(!0,we,_e);if(Me){$t(Y,re,Me,{flushSync:ye});return}let Ge=r.getContext?await r.getContext():new yg,it=(_e&&_e.preventScrollReset)===!0;if(Oe&&Jt(Oe.formMethod)){await Wi(Y,re,Te,Se,Ge,be.active,ye,it,Oe);return}X.set(Y,{routeId:re,path:Te}),await Gt(Y,re,Te,Se,Ge,be.active,ye,it,Oe)}async function Wi(Y,re,ce,_e,ye,De,we,Se,be){Jr(),X.delete(Y);let Te=T.fetchers.get(Y);gt(Y,mw(be,Te),{flushSync:we});let Oe=new AbortController,Me=Gs(r.history,ce,Oe.signal,be);if(De){let Xe=await Ki(_e,new URL(Me.url).pathname,Me.signal,Y);if(Xe.type==="aborted")return;if(Xe.type==="error"){$t(Y,re,Xe.error,{flushSync:we});return}else if(Xe.matches)_e=Xe.matches;else{$t(Y,re,Br(404,{pathname:ce}),{flushSync:we});return}}let Ge=Yl(_e,ce);if(!Ge.route.action&&!Ge.route.lazy){let Xe=Br(405,{method:be.formMethod,pathname:ce,routeId:re});$t(Y,re,Xe,{flushSync:we});return}K.set(Y,Oe);let it=j,dt=Ys(y,S,Me,_e,Ge,l,ye),yt=await Nt(Me,dt,ye,Y),Ye=yt[Ge.route.id];if(!Ye){for(let Xe of dt)if(yt[Xe.route.id]){Ye=yt[Xe.route.id];break}}if(Me.signal.aborted){K.get(Y)===Oe&&K.delete(Y);return}if(de.has(Y)){if(Zn(Ye)||yr(Ye)){gt(Y,zi(void 0));return}}else{if(Zn(Ye))if(K.delete(Y),U>it){gt(Y,zi(void 0));return}else return z.add(Y),gt(Y,Xa(be)),ut(Me,Ye,!1,{fetcherSubmission:be,preventScrollReset:Se});if(yr(Ye)){$t(Y,re,Ye.error);return}}let Qe=T.navigation.location||T.location,cr=Gs(r.history,Qe,Oe.signal),wr=c||o,ht=T.navigation.state!=="idle"?Sn(wr,T.navigation.location,u):T.matches;Ie(ht,"Didn't find any matches after fetcher action");let ur=++j;N.set(Y,ur);let ls=Xa(be,Ye.data);T.fetchers.set(Y,ls);let{dsMatches:hr,revalidatingFetchers:tr}=Rg(cr,ye,y,S,r.history,T,ht,be,Qe,l,!1,q,Z,de,X,z,wr,u,r.patchRoutesOnNavigation!=null,[Ge.route.id,Ye]);tr.filter(Xe=>Xe.key!==Y).forEach(Xe=>{let Ut=Xe.key,aa=T.fetchers.get(Ut),Oc=Xa(void 0,aa?aa.data:void 0);T.fetchers.set(Ut,Oc),_t(Ut),Xe.controller&&K.set(Ut,Xe.controller)}),me({fetchers:new Map(T.fetchers)});let cs=()=>tr.forEach(Xe=>_t(Xe.key));Oe.signal.addEventListener("abort",cs);let{loaderResults:kn,fetcherResults:We}=await Ur(hr,tr,cr,ye);if(Oe.signal.aborted)return;if(Oe.signal.removeEventListener("abort",cs),N.delete(Y),K.delete(Y),tr.forEach(Xe=>K.delete(Xe.key)),T.fetchers.has(Y)){let Xe=zi(Ye.data);T.fetchers.set(Y,Xe)}let jt=Hl(kn);if(jt)return ut(cr,jt.result,!1,{preventScrollReset:Se});if(jt=Hl(We),jt)return z.add(jt.key),ut(cr,jt.result,!1,{preventScrollReset:Se});let{loaderData:Fr,errors:xr}=kg(T,ht,kn,void 0,tr,We);bo(ur),T.navigation.state==="loading"&&ur>U?(Ie(E,"Expected pending action"),F&&F.abort(),Ce(T.navigation.location,{matches:ht,loaderData:Fr,errors:xr,fetchers:new Map(T.fetchers)})):(me({errors:xr,loaderData:Bg(T.loaderData,Fr,ht,xr),fetchers:new Map(T.fetchers)}),q=!1)}async function Gt(Y,re,ce,_e,ye,De,we,Se,be){let Te=T.fetchers.get(Y);gt(Y,Xa(be,Te?Te.data:void 0),{flushSync:we});let Oe=new AbortController,Me=Gs(r.history,ce,Oe.signal);if(De){let Qe=await Ki(_e,new URL(Me.url).pathname,Me.signal,Y);if(Qe.type==="aborted")return;if(Qe.type==="error"){$t(Y,re,Qe.error,{flushSync:we});return}else if(Qe.matches)_e=Qe.matches;else{$t(Y,re,Br(404,{pathname:ce}),{flushSync:we});return}}let Ge=Yl(_e,ce);K.set(Y,Oe);let it=j,dt=Ys(y,S,Me,_e,Ge,l,ye),Ye=(await Nt(Me,dt,ye,Y))[Ge.route.id];if(K.get(Y)===Oe&&K.delete(Y),!Me.signal.aborted){if(de.has(Y)){gt(Y,zi(void 0));return}if(Zn(Ye))if(U>it){gt(Y,zi(void 0));return}else{z.add(Y),await ut(Me,Ye,!1,{preventScrollReset:Se});return}if(yr(Ye)){$t(Y,re,Ye.error);return}gt(Y,zi(Ye.data))}}async function ut(Y,re,ce,{submission:_e,fetcherSubmission:ye,preventScrollReset:De,replace:we}={}){ce||(B?.resolve(),B=null),re.response.headers.has("X-Remix-Revalidate")&&(q=!0);let Se=re.response.headers.get("Location");Ie(Se,"Expected a Location header on the redirect Response"),Se=Mg(Se,new URL(Y.url),u);let be=ao(T.location,Se,{_isRedirect:!0});if(a){let dt=!1;if(re.response.headers.has("X-Remix-Reload-Document"))dt=!0;else if(pc(Se)){const yt=G_(Se,!0);dt=yt.origin!==n.location.origin||Pr(yt.pathname,u)==null}if(dt){we?n.location.replace(Se):n.location.assign(Se);return}}F=null;let Te=we===!0||re.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Oe,formAction:Me,formEncType:Ge}=T.navigation;!_e&&!ye&&Oe&&Me&&Ge&&(_e=Hg(T.navigation));let it=_e||ye;if(V1.has(re.response.status)&&it&&Jt(it.formMethod))await tt(Te,be,{submission:{...it,formAction:Se},preventScrollReset:De||W,enableViewTransition:ce?I:void 0});else{let dt=Gh(be,_e);await tt(Te,be,{overrideNavigation:dt,fetcherSubmission:ye,preventScrollReset:De||W,enableViewTransition:ce?I:void 0})}}async function Nt(Y,re,ce,_e){let ye,De={};try{ye=await tw(C,Y,re,_e,ce,!1)}catch(we){return re.filter(Se=>Se.shouldLoad).forEach(Se=>{De[Se.route.id]={type:"error",error:we}}),De}if(Y.signal.aborted)return De;for(let[we,Se]of Object.entries(ye))if(hw(Se)){let be=Se.result;De[we]={type:"redirect",response:sw(be,Y,we,re,u)}}else De[we]=await nw(Se);return De}async function Ur(Y,re,ce,_e){let ye=Nt(ce,Y,_e,null),De=Promise.all(re.map(async be=>{if(be.matches&&be.match&&be.request&&be.controller){let Oe=(await Nt(be.request,be.matches,_e,be.key))[be.match.route.id];return{[be.key]:Oe}}else return Promise.resolve({[be.key]:{type:"error",error:Br(404,{pathname:be.path})}})})),we=await ye,Se=(await De).reduce((be,Te)=>Object.assign(be,Te),{});return{loaderResults:we,fetcherResults:Se}}function Jr(){q=!0,X.forEach((Y,re)=>{K.has(re)&&Z.add(re),_t(re)})}function gt(Y,re,ce={}){T.fetchers.set(Y,re),me({fetchers:new Map(T.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function $t(Y,re,ce,_e={}){let ye=bn(T.matches,re);rt(Y),me({errors:{[ye.route.id]:ce},fetchers:new Map(T.fetchers)},{flushSync:(_e&&_e.flushSync)===!0})}function er(Y){return ie.set(Y,(ie.get(Y)||0)+1),de.has(Y)&&de.delete(Y),T.fetchers.get(Y)||K1}function vi(Y,re){_t(Y,re?.reason),gt(Y,zi(null))}function rt(Y){let re=T.fetchers.get(Y);K.has(Y)&&!(re&&re.state==="loading"&&N.has(Y))&&_t(Y),X.delete(Y),N.delete(Y),z.delete(Y),de.delete(Y),Z.delete(Y),T.fetchers.delete(Y)}function gi(Y){let re=(ie.get(Y)||0)-1;re<=0?(ie.delete(Y),de.add(Y)):ie.set(Y,re),me({fetchers:new Map(T.fetchers)})}function _t(Y,re){let ce=K.get(Y);ce&&(ce.abort(re),K.delete(Y))}function Ir(Y){for(let re of Y){let ce=er(re),_e=zi(ce.data);T.fetchers.set(re,_e)}}function Yt(){let Y=[],re=!1;for(let ce of z){let _e=T.fetchers.get(ce);Ie(_e,`Expected fetcher: ${ce}`),_e.state==="loading"&&(z.delete(ce),Y.push(ce),re=!0)}return Ir(Y),re}function bo(Y){let re=[];for(let[ce,_e]of N)if(_e<Y){let ye=T.fetchers.get(ce);Ie(ye,`Expected fetcher: ${ce}`),ye.state==="loading"&&(_t(ce),N.delete(ce),re.push(ce))}return Ir(re),re.length>0}function Tc(Y,re){let ce=T.blockers.get(Y)||Qa;return G.get(Y)!==re&&G.set(Y,re),ce}function Co(Y){T.blockers.delete(Y),G.delete(Y)}function _i(Y,re){let ce=T.blockers.get(Y)||Qa;Ie(ce.state==="unblocked"&&re.state==="blocked"||ce.state==="blocked"&&re.state==="blocked"||ce.state==="blocked"&&re.state==="proceeding"||ce.state==="blocked"&&re.state==="unblocked"||ce.state==="proceeding"&&re.state==="unblocked",`Invalid blocker state transition: ${ce.state} -> ${re.state}`);let _e=new Map(T.blockers);_e.set(Y,re),me({blockers:_e})}function Dn({currentLocation:Y,nextLocation:re,historyAction:ce}){if(G.size===0)return;G.size>1&&Et(!1,"A router only supports one blocker at a time");let _e=Array.from(G.entries()),[ye,De]=_e[_e.length-1],we=T.blockers.get(ye);if(!(we&&we.state==="proceeding")&&De({currentLocation:Y,nextLocation:re,historyAction:ce}))return ye}function Vi(Y){let re=Br(404,{pathname:Y}),ce=c||o,{matches:_e,route:ye}=jl(ce);return{notFoundMatches:_e,route:ye,error:re}}function yi(Y,re,ce){if(R=Y,h=re,b=ce||null,!m&&T.navigation===Kh){m=!0;let _e=wo(T.location,T.matches);_e!=null&&me({restoreScrollPosition:_e})}return()=>{R=null,h=null,b=null}}function On(Y,re){return b&&b(Y,re.map(_e=>v1(_e,T.loaderData)))||Y.key}function Mn(Y,re){if(R&&h){let ce=On(Y,re);R[ce]=h()}}function wo(Y,re){if(R){let ce=On(Y,re),_e=R[ce];if(typeof _e=="number")return _e}return null}function Ln(Y,re,ce){if(r.patchRoutesOnNavigation)if(Y){if(Object.keys(Y[0].params).length>0)return{active:!0,matches:ro(re,ce,u,!0)}}else return{active:!0,matches:ro(re,ce,u,!0)||[]};return{active:!1,matches:null}}async function Ki(Y,re,ce,_e){if(!r.patchRoutesOnNavigation)return{type:"success",matches:Y};let ye=Y;for(;;){let De=c==null,we=c||o,Se=S;try{await r.patchRoutesOnNavigation({signal:ce,path:re,matches:ye,fetcherKey:_e,patch:(Oe,Me)=>{ce.aborted||Ag(Oe,Me,we,Se,y,!1)}})}catch(Oe){return{type:"error",error:Oe,partialMatches:ye}}finally{De&&!ce.aborted&&(o=[...o])}if(ce.aborted)return{type:"aborted"};let be=Sn(we,re,u),Te=null;if(be){if(Object.keys(be[0].params).length===0)return{type:"success",matches:be};if(Te=ro(we,re,u,!0),!(Te&&ye.length<Te.length&&Gi(ye,Te.slice(0,ye.length))))return{type:"success",matches:be}}if(Te||(Te=ro(we,re,u,!0)),!Te||Gi(ye,Te))return{type:"success",matches:null};ye=Te}}function Gi(Y,re){return Y.length===re.length&&Y.every((ce,_e)=>ce.route.id===re[_e].route.id)}function Dc(Y){S={},c=oo(Y,y,void 0,S)}function xo(Y,re,ce=!1){let _e=c==null;Ag(Y,re,c||o,S,y,ce),_e&&(o=[...o],me({}))}return L={get basename(){return u},get future(){return v},get state(){return T},get routes(){return o},get window(){return n},initialize:he,subscribe:oe,enableScrollRestoration:yi,navigate:ze,fetch:pi,revalidate:ct,createHref:Y=>r.history.createHref(Y),encodeLocation:Y=>r.history.encodeLocation(Y),getFetcher:er,resetFetcher:vi,deleteFetcher:gi,dispose:ge,getBlocker:Tc,deleteBlocker:Co,patchRoutes:xo,_internalFetchControllers:K,_internalSetRoutes:Dc,_internalSetStateDoNotUseOrYouWillBreakYourApp(Y){me(Y)}},r.unstable_instrumentations&&(L=j1(L,r.unstable_instrumentations.map(Y=>Y.router).filter(Boolean))),L}function Y1(r){return r!=null&&("formData"in r&&r.formData!=null||"body"in r&&r.body!==void 0)}function pf(r,n,a,l,d,y){let S,o;if(d){S=[];for(let u of n)if(S.push(u),u.route.id===d){o=u;break}}else S=n,o=n[n.length-1];let c=Pf(l||".",zf(S),Pr(r.pathname,a)||r.pathname,y==="path");if(l==null&&(c.search=r.search,c.hash=r.hash),(l==null||l===""||l===".")&&o){let u=If(c.search);if(o.route.index&&!u)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!o.route.index&&u){let C=new URLSearchParams(c.search),v=C.getAll("index");C.delete("index"),v.filter(x=>x).forEach(x=>C.append("index",x));let w=C.toString();c.search=w?`?${w}`:""}}return a!=="/"&&(c.pathname=D1({basename:a,pathname:c.pathname})),ui(c)}function Eg(r,n,a){if(!a||!Y1(a))return{path:n};if(a.formMethod&&!fw(a.formMethod))return{path:n,error:Br(405,{method:a.formMethod})};let l=()=>({path:n,error:Br(400,{type:"invalid-body"})}),y=(a.formMethod||"get").toUpperCase(),S=ay(n);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Jt(y))return l();let v=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((w,[x,R])=>`${w}${x}=${R}
|
|
10
|
-
`,""):String(a.body);return{path:n,submission:{formMethod:y,formAction:S,formEncType:a.formEncType,formData:void 0,json:void 0,text:v}}}else if(a.formEncType==="application/json"){if(!Jt(y))return l();try{let v=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:n,submission:{formMethod:y,formAction:S,formEncType:a.formEncType,formData:void 0,json:v,text:void 0}}}catch{return l()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let o,c;if(a.formData)o=_f(a.formData),c=a.formData;else if(a.body instanceof FormData)o=_f(a.body),c=a.body;else if(a.body instanceof URLSearchParams)o=a.body,c=Lg(o);else if(a.body==null)o=new URLSearchParams,c=new FormData;else try{o=new URLSearchParams(a.body),c=Lg(o)}catch{return l()}let u={formMethod:y,formAction:S,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Jt(u.formMethod))return{path:n,submission:u};let C=Rn(n);return r&&C.search&&If(C.search)&&o.append("index",""),C.search=`?${o}`,{path:ui(C),submission:u}}function Rg(r,n,a,l,d,y,S,o,c,u,C,v,w,x,R,b,h,m,p,g){let A=g?yr(g[1])?g[1].error:g[1].data:void 0,D=d.createURL(y.location),L=d.createURL(c),T;if(C&&y.errors){let ee=Object.keys(y.errors)[0];T=S.findIndex(ne=>ne.route.id===ee)}else if(g&&yr(g[1])){let ee=g[0];T=S.findIndex(ne=>ne.route.id===ee)-1}let E=g?g[1].statusCode:void 0,B=E&&E>=400,W={currentUrl:D,currentParams:y.matches[0]?.params||{},nextUrl:L,nextParams:S[0].params,...o,actionResult:A,actionStatus:E},F=po(S),I=S.map((ee,ne)=>{let{route:q}=ee,Z=null;if(T!=null&&ne>T?Z=!1:q.lazy?Z=!0:Uf(q)?C?Z=vf(q,y.loaderData,y.errors):Q1(y.loaderData,y.matches[ne],ee)&&(Z=!0):Z=!1,Z!==null)return gf(a,l,r,F,ee,u,n,Z);let K=B?!1:v||D.pathname+D.search===L.pathname+L.search||D.search!==L.search||X1(y.matches[ne],ee),j={...W,defaultShouldRevalidate:K},U=nc(ee,j);return gf(a,l,r,F,ee,u,n,U,j)}),V=[];return R.forEach((ee,ne)=>{if(C||!S.some(X=>X.route.id===ee.routeId)||x.has(ne))return;let q=y.fetchers.get(ne),Z=q&&q.state!=="idle"&&q.data===void 0,K=Sn(h,ee.path,m);if(!K){if(p&&Z)return;V.push({key:ne,routeId:ee.routeId,path:ee.path,matches:null,match:null,request:null,controller:null});return}if(b.has(ne))return;let j=Yl(K,ee.path),U=new AbortController,N=Gs(d,ee.path,U.signal),z=null;if(w.has(ne))w.delete(ne),z=Ys(a,l,N,K,j,u,n);else if(Z)v&&(z=Ys(a,l,N,K,j,u,n));else{let X={...W,defaultShouldRevalidate:B?!1:v};nc(j,X)&&(z=Ys(a,l,N,K,j,u,n,X))}z&&V.push({key:ne,routeId:ee.routeId,path:ee.path,matches:z,match:j,request:N,controller:U})}),{dsMatches:I,revalidatingFetchers:V}}function Uf(r){return r.loader!=null||r.middleware!=null&&r.middleware.length>0}function vf(r,n,a){if(r.lazy)return!0;if(!Uf(r))return!1;let l=n!=null&&r.id in n,d=a!=null&&a[r.id]!==void 0;return!l&&d?!1:typeof r.loader=="function"&&r.loader.hydrate===!0?!0:!l&&!d}function Q1(r,n,a){let l=!n||a.route.id!==n.route.id,d=!r.hasOwnProperty(a.route.id);return l||d}function X1(r,n){let a=r.route.path;return r.pathname!==n.pathname||a!=null&&a.endsWith("*")&&r.params["*"]!==n.params["*"]}function nc(r,n){if(r.route.shouldRevalidate){let a=r.route.shouldRevalidate(n);if(typeof a=="boolean")return a}return n.defaultShouldRevalidate}function Ag(r,n,a,l,d,y){let S;if(r){let u=l[r];Ie(u,`No route found to patch children into: routeId = ${r}`),u.children||(u.children=[]),S=u.children}else S=a;let o=[],c=[];if(n.forEach(u=>{let C=S.find(v=>ty(u,v));C?c.push({existingRoute:C,newRoute:u}):o.push(u)}),o.length>0){let u=oo(o,d,[r||"_","patch",String(S?.length||"0")],l);S.push(...u)}if(y&&c.length>0)for(let u=0;u<c.length;u++){let{existingRoute:C,newRoute:v}=c[u],w=C,[x]=oo([v],d,[],{},!0);Object.assign(w,{element:x.element?x.element:w.element,errorElement:x.errorElement?x.errorElement:w.errorElement,hydrateFallbackElement:x.hydrateFallbackElement?x.hydrateFallbackElement:w.hydrateFallbackElement})}}function ty(r,n){return"id"in r&&"id"in n&&r.id===n.id?!0:r.index===n.index&&r.path===n.path&&r.caseSensitive===n.caseSensitive?(!r.children||r.children.length===0)&&(!n.children||n.children.length===0)?!0:r.children.every((a,l)=>n.children?.some(d=>ty(a,d))):!1}var Tg=new WeakMap,ry=({key:r,route:n,manifest:a,mapRouteProperties:l})=>{let d=a[n.id];if(Ie(d,"No route found in manifest"),!d.lazy||typeof d.lazy!="object")return;let y=d.lazy[r];if(!y)return;let S=Tg.get(d);S||(S={},Tg.set(d,S));let o=S[r];if(o)return o;let c=(async()=>{let u=f1(r),v=d[r]!==void 0&&r!=="hasErrorBoundary";if(u)Et(!u,"Route property "+r+" is not a supported lazy route property. This property will be ignored."),S[r]=Promise.resolve();else if(v)Et(!1,`Route "${d.id}" has a static property "${r}" defined. The lazy property will be ignored.`);else{let w=await y();w!=null&&(Object.assign(d,{[r]:w}),Object.assign(d,l(d)))}typeof d.lazy=="object"&&(d.lazy[r]=void 0,Object.values(d.lazy).every(w=>w===void 0)&&(d.lazy=void 0))})();return S[r]=c,c},Dg=new WeakMap;function Z1(r,n,a,l,d){let y=a[r.id];if(Ie(y,"No route found in manifest"),!r.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof r.lazy=="function"){let C=Dg.get(y);if(C)return{lazyRoutePromise:C,lazyHandlerPromise:C};let v=(async()=>{Ie(typeof r.lazy=="function","No lazy route function found");let w=await r.lazy(),x={};for(let R in w){let b=w[R];if(b===void 0)continue;let h=m1(R),p=y[R]!==void 0&&R!=="hasErrorBoundary";h?Et(!h,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):p?Et(!p,`Route "${y.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):x[R]=b}Object.assign(y,x),Object.assign(y,{...l(y),lazy:void 0})})();return Dg.set(y,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let S=Object.keys(r.lazy),o=[],c;for(let C of S){if(d&&d.includes(C))continue;let v=ry({key:C,route:r,manifest:a,mapRouteProperties:l});v&&(o.push(v),C===n&&(c=v))}let u=o.length>0?Promise.all(o).then(()=>{}):void 0;return u?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:c}}async function Og(r){let n=r.matches.filter(d=>d.shouldLoad),a={};return(await Promise.all(n.map(d=>d.resolve()))).forEach((d,y)=>{a[n[y].route.id]=d}),a}async function J1(r){return r.matches.some(n=>n.route.middleware)?iy(r,()=>Og(r)):Og(r)}function iy(r,n){return ew(r,n,l=>l,cw,a);function a(l,d,y){if(y)return Promise.resolve(Object.assign(y.value,{[d]:{type:"error",result:l}}));{let{matches:S}=r,o=Math.min(Math.max(S.findIndex(u=>u.route.id===d),0),Math.max(S.findIndex(u=>u.shouldCallHandler()),0)),c=bn(S,S[o].route.id).route.id;return Promise.resolve({[c]:{type:"error",result:l}})}}}async function ew(r,n,a,l,d){let{matches:y,request:S,params:o,context:c,unstable_pattern:u}=r,C=y.flatMap(w=>w.route.middleware?w.route.middleware.map(x=>[w.route.id,x]):[]);return await ny({request:S,params:o,context:c,unstable_pattern:u},C,n,a,l,d)}async function ny(r,n,a,l,d,y,S=0){let{request:o}=r;if(o.signal.aborted)throw o.signal.reason??new Error(`Request aborted: ${o.method} ${o.url}`);let c=n[S];if(!c)return await a();let[u,C]=c,v,w=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await ny(r,n,a,l,d,y,S+1)},v.value}catch(x){return v={value:await y(x,u,v)},v.value}};try{let x=await C(r,w),R=x!=null?l(x):void 0;return d(R)?R:v?R??v.value:(v={value:await w()},v.value)}catch(x){return await y(x,u,v)}}function sy(r,n,a,l,d){let y=ry({key:"middleware",route:l.route,manifest:n,mapRouteProperties:r}),S=Z1(l.route,Jt(a.method)?"action":"loader",n,r,d);return{middleware:y,route:S.lazyRoutePromise,handler:S.lazyHandlerPromise}}function gf(r,n,a,l,d,y,S,o,c=null){let u=!1,C=sy(r,n,a,d,y);return{...d,_lazyPromises:C,shouldLoad:o,shouldRevalidateArgs:c,shouldCallHandler(v){return u=!0,c?typeof v=="boolean"?nc(d,{...c,defaultShouldRevalidate:v}):nc(d,c):o},resolve(v){let{lazy:w,loader:x,middleware:R}=d.route,b=u||o||v&&!Jt(a.method)&&(w||x),h=R&&R.length>0&&!x&&!w;return b&&(Jt(a.method)||!h)?rw({request:a,unstable_pattern:l,match:d,lazyHandlerPromise:C?.handler,lazyRoutePromise:C?.route,handlerOverride:v,scopedContext:S}):Promise.resolve({type:"data",result:void 0})}}}function Ys(r,n,a,l,d,y,S,o=null){return l.map(c=>c.route.id!==d.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:o,shouldCallHandler:()=>!1,_lazyPromises:sy(r,n,a,c,y),resolve:()=>Promise.resolve({type:"data",result:void 0})}:gf(r,n,a,po(l),c,y,S,!0,o))}async function tw(r,n,a,l,d,y){a.some(u=>u._lazyPromises?.middleware)&&await Promise.all(a.map(u=>u._lazyPromises?.middleware));let S={request:n,unstable_pattern:po(a),params:a[0].params,context:d,matches:a},c=await r({...S,fetcherKey:l,runClientMiddleware:u=>{let C=S;return iy(C,()=>u({...C,fetcherKey:l,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return c}async function rw({request:r,unstable_pattern:n,match:a,lazyHandlerPromise:l,lazyRoutePromise:d,handlerOverride:y,scopedContext:S}){let o,c,u=Jt(r.method),C=u?"action":"loader",v=w=>{let x,R=new Promise((m,p)=>x=p);c=()=>x(),r.signal.addEventListener("abort",c);let b=m=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${C}" [routeId: ${a.route.id}]`)):w({request:r,unstable_pattern:n,params:a.params,context:S},...m!==void 0?[m]:[]),h=(async()=>{try{return{type:"data",result:await(y?y(p=>b(p)):b())}}catch(m){return{type:"error",result:m}}})();return Promise.race([h,R])};try{let w=u?a.route.action:a.route.loader;if(l||d)if(w){let x,[R]=await Promise.all([v(w).catch(b=>{x=b}),l,d]);if(x!==void 0)throw x;o=R}else{await l;let x=u?a.route.action:a.route.loader;if(x)[o]=await Promise.all([v(x),d]);else if(C==="action"){let R=new URL(r.url),b=R.pathname+R.search;throw Br(405,{method:r.method,pathname:b,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(w)o=await v(w);else{let x=new URL(r.url),R=x.pathname+x.search;throw Br(404,{pathname:R})}}catch(w){return{type:"error",result:w}}finally{c&&r.signal.removeEventListener("abort",c)}return o}async function iw(r){let n=r.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?r.body==null?null:r.json():r.text()}async function nw(r){let{result:n,type:a}=r;if(oy(n)){let l;try{l=await iw(n)}catch(d){return{type:"error",error:d}}return a==="error"?{type:"error",error:new vc(n.status,n.statusText,l),statusCode:n.status,headers:n.headers}:{type:"data",data:l,statusCode:n.status,headers:n.headers}}return a==="error"?jg(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:lw(n),statusCode:lo(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:lo(n)?n.status:void 0}:jg(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function sw(r,n,a,l,d){let y=r.headers.get("Location");if(Ie(y,"Redirects returned/thrown from loaders/actions must have a Location header"),!pc(y)){let S=l.slice(0,l.findIndex(o=>o.route.id===a)+1);y=pf(new URL(n.url),S,d,y),r.headers.set("Location",y)}return r}function Mg(r,n,a){if(pc(r)){let l=r,d=l.startsWith("//")?new URL(n.protocol+l):new URL(l),y=Pr(d.pathname,a)!=null;if(d.origin===n.origin&&y)return d.pathname+d.search+d.hash}return r}function Gs(r,n,a,l){let d=r.createURL(ay(n)).toString(),y={signal:a};if(l&&Jt(l.formMethod)){let{formMethod:S,formEncType:o}=l;y.method=S.toUpperCase(),o==="application/json"?(y.headers=new Headers({"Content-Type":o}),y.body=JSON.stringify(l.json)):o==="text/plain"?y.body=l.text:o==="application/x-www-form-urlencoded"&&l.formData?y.body=_f(l.formData):y.body=l.formData}return new Request(d,y)}function _f(r){let n=new URLSearchParams;for(let[a,l]of r.entries())n.append(a,typeof l=="string"?l:l.name);return n}function Lg(r){let n=new FormData;for(let[a,l]of r.entries())n.append(a,l);return n}function aw(r,n,a,l=!1,d=!1){let y={},S=null,o,c=!1,u={},C=a&&yr(a[1])?a[1].error:void 0;return r.forEach(v=>{if(!(v.route.id in n))return;let w=v.route.id,x=n[w];if(Ie(!Zn(x),"Cannot handle redirect results in processLoaderData"),yr(x)){let R=x.error;if(C!==void 0&&(R=C,C=void 0),S=S||{},d)S[w]=R;else{let b=bn(r,w);S[b.route.id]==null&&(S[b.route.id]=R)}l||(y[w]=ey),c||(c=!0,o=lo(x.error)?x.error.status:500),x.headers&&(u[w]=x.headers)}else y[w]=x.data,x.statusCode&&x.statusCode!==200&&!c&&(o=x.statusCode),x.headers&&(u[w]=x.headers)}),C!==void 0&&a&&(S={[a[0]]:C},a[2]&&(y[a[2]]=void 0)),{loaderData:y,errors:S,statusCode:o||200,loaderHeaders:u}}function kg(r,n,a,l,d,y){let{loaderData:S,errors:o}=aw(n,a,l);return d.filter(c=>!c.matches||c.matches.some(u=>u.shouldLoad)).forEach(c=>{let{key:u,match:C,controller:v}=c;if(v&&v.signal.aborted)return;let w=y[u];if(Ie(w,"Did not find corresponding fetcher result"),yr(w)){let x=bn(r.matches,C?.route.id);o&&o[x.route.id]||(o={...o,[x.route.id]:w.error}),r.fetchers.delete(u)}else if(Zn(w))Ie(!1,"Unhandled fetcher revalidation redirect");else{let x=zi(w.data);r.fetchers.set(u,x)}}),{loaderData:S,errors:o}}function Bg(r,n,a,l){let d=Object.entries(n).filter(([,y])=>y!==ey).reduce((y,[S,o])=>(y[S]=o,y),{});for(let y of a){let S=y.route.id;if(!n.hasOwnProperty(S)&&r.hasOwnProperty(S)&&y.route.loader&&(d[S]=r[S]),l&&l.hasOwnProperty(S))break}return d}function Ng(r){return r?yr(r[1])?{actionData:{}}:{actionData:{[r[0]]:r[1].data}}:{}}function bn(r,n){return(n?r.slice(0,r.findIndex(l=>l.route.id===n)+1):[...r]).reverse().find(l=>l.route.hasErrorBoundary===!0)||r[0]}function jl(r){let n=r.length===1?r[0]:r.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Br(r,{pathname:n,routeId:a,method:l,type:d,message:y}={}){let S="Unknown Server Error",o="Unknown @remix-run/router error";return r===400?(S="Bad Request",l&&n&&a?o=`You made a ${l} request to "${n}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:d==="invalid-body"&&(o="Unable to encode submission body")):r===403?(S="Forbidden",o=`Route "${a}" does not match URL "${n}"`):r===404?(S="Not Found",o=`No route matches URL "${n}"`):r===405&&(S="Method Not Allowed",l&&n&&a?o=`You made a ${l.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:l&&(o=`Invalid request method "${l.toUpperCase()}"`)),new vc(r||500,S,new Error(o),!0)}function Hl(r){let n=Object.entries(r);for(let a=n.length-1;a>=0;a--){let[l,d]=n[a];if(Zn(d))return{key:l,result:d}}}function ay(r){let n=typeof r=="string"?Rn(r):r;return ui({...n,hash:""})}function ow(r,n){return r.pathname!==n.pathname||r.search!==n.search?!1:r.hash===""?n.hash!=="":r.hash===n.hash?!0:n.hash!==""}function lw(r){return new vc(r.init?.status??500,r.init?.statusText??"Internal Server Error",r.data)}function cw(r){return r!=null&&typeof r=="object"&&Object.entries(r).every(([n,a])=>typeof n=="string"&&uw(a))}function uw(r){return r!=null&&typeof r=="object"&&"type"in r&&"result"in r&&(r.type==="data"||r.type==="error")}function hw(r){return oy(r.result)&&W1.has(r.result.status)}function yr(r){return r.type==="error"}function Zn(r){return(r&&r.type)==="redirect"}function jg(r){return typeof r=="object"&&r!=null&&"type"in r&&"data"in r&&"init"in r&&r.type==="DataWithResponseInit"}function oy(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.headers=="object"&&typeof r.body<"u"}function fw(r){return q1.has(r.toUpperCase())}function Jt(r){return I1.has(r.toUpperCase())}function If(r){return new URLSearchParams(r).getAll("index").some(n=>n==="")}function Yl(r,n){let a=typeof n=="string"?Rn(n).search:n.search;if(r[r.length-1].route.index&&If(a||""))return r[r.length-1];let l=Q_(r);return l[l.length-1]}function Hg(r){let{formMethod:n,formAction:a,formEncType:l,text:d,formData:y,json:S}=r;if(!(!n||!a||!l)){if(d!=null)return{formMethod:n,formAction:a,formEncType:l,formData:void 0,json:void 0,text:d};if(y!=null)return{formMethod:n,formAction:a,formEncType:l,formData:y,json:void 0,text:void 0};if(S!==void 0)return{formMethod:n,formAction:a,formEncType:l,formData:void 0,json:S,text:void 0}}}function Gh(r,n){return n?{state:"loading",location:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function dw(r,n){return{state:"submitting",location:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function Xa(r,n){return r?{state:"loading",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function mw(r,n){return{state:"submitting",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:n?n.data:void 0}}function zi(r){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function pw(r,n){try{let a=r.sessionStorage.getItem(J_);if(a){let l=JSON.parse(a);for(let[d,y]of Object.entries(l||{}))y&&Array.isArray(y)&&n.set(d,new Set(y||[]))}}catch{}}function vw(r,n){if(n.size>0){let a={};for(let[l,d]of n)a[l]=[...d];try{r.sessionStorage.setItem(J_,JSON.stringify(a))}catch(l){Et(!1,`Failed to save applied view transitions in sessionStorage (${l}).`)}}}function zg(){let r,n,a=new Promise((l,d)=>{r=async y=>{l(y);try{await a}catch{}},n=async y=>{d(y);try{await a}catch{}}});return{promise:a,resolve:r,reject:n}}var as=k.createContext(null);as.displayName="DataRouter";var vo=k.createContext(null);vo.displayName="DataRouterState";k.createContext(!1);var Ff=k.createContext({isTransitioning:!1});Ff.displayName="ViewTransition";var ly=k.createContext(new Map);ly.displayName="Fetchers";var gw=k.createContext(null);gw.displayName="Await";var Qr=k.createContext(null);Qr.displayName="Navigation";var gc=k.createContext(null);gc.displayName="Location";var fi=k.createContext({outlet:null,matches:[],isDataRoute:!1});fi.displayName="Route";var qf=k.createContext(null);qf.displayName="RouteError";function _w(r,{relative:n}={}){Ie(go(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:l}=k.useContext(Qr),{hash:d,pathname:y,search:S}=_o(r,{relative:n}),o=y;return a!=="/"&&(o=y==="/"?a:li([a,y])),l.createHref({pathname:o,search:S,hash:d})}function go(){return k.useContext(gc)!=null}function os(){return Ie(go(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(gc).location}var cy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function uy(r){k.useContext(Qr).static||k.useLayoutEffect(r)}function yw(){let{isDataRoute:r}=k.useContext(fi);return r?kw():Sw()}function Sw(){Ie(go(),"useNavigate() may be used only in the context of a <Router> component.");let r=k.useContext(as),{basename:n,navigator:a}=k.useContext(Qr),{matches:l}=k.useContext(fi),{pathname:d}=os(),y=JSON.stringify(zf(l)),S=k.useRef(!1);return uy(()=>{S.current=!0}),k.useCallback((c,u={})=>{if(Et(S.current,cy),!S.current)return;if(typeof c=="number"){a.go(c);return}let C=Pf(c,JSON.parse(y),d,u.relative==="path");r==null&&n!=="/"&&(C.pathname=C.pathname==="/"?n:li([n,C.pathname])),(u.replace?a.replace:a.push)(C,u.state,u)},[n,a,y,d,r])}k.createContext(null);function bw(){let{matches:r}=k.useContext(fi),n=r[r.length-1];return n?n.params:{}}function _o(r,{relative:n}={}){let{matches:a}=k.useContext(fi),{pathname:l}=os(),d=JSON.stringify(zf(a));return k.useMemo(()=>Pf(r,JSON.parse(d),l,n==="path"),[r,d,l,n])}function Cw(r,n,a,l,d){Ie(go(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:y}=k.useContext(Qr),{matches:S}=k.useContext(fi),o=S[S.length-1],c=o?o.params:{},u=o?o.pathname:"/",C=o?o.pathnameBase:"/",v=o&&o.route;{let p=v&&v.path||"";hy(u,!v||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
8
|
+
`+s.stack}}var Zr=Object.prototype.hasOwnProperty,mi=r.unstable_scheduleCallback,pi=r.unstable_cancelCallback,Wi=r.unstable_shouldYield,Gt=r.unstable_requestPaint,ut=r.unstable_now,Nt=r.unstable_getCurrentPriorityLevel,Ur=r.unstable_ImmediatePriority,Jr=r.unstable_UserBlockingPriority,gt=r.unstable_NormalPriority,$t=r.unstable_LowPriority,er=r.unstable_IdlePriority,vi=r.log,rt=r.unstable_setDisableYieldValue,gi=null,_t=null;function Ir(e){if(typeof vi=="function"&&rt(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(gi,e)}catch{}}var Yt=Math.clz32?Math.clz32:Co,bo=Math.log,Tc=Math.LN2;function Co(e){return e>>>=0,e===0?32:31-(bo(e)/Tc|0)|0}var _i=256,Dn=262144,Vi=4194304;function yi(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function On(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var f=0,_=e.suspendedLanes,M=e.pingedLanes;e=e.warmLanes;var H=s&134217727;return H!==0?(s=H&~_,s!==0?f=yi(s):(M&=H,M!==0?f=yi(M):i||(i=H&~e,i!==0&&(f=yi(i))))):(H=s&~_,H!==0?f=yi(H):M!==0?f=yi(M):i||(i=s&~e,i!==0&&(f=yi(i)))),f===0?0:t!==0&&t!==f&&(t&_)===0&&(_=f&-f,i=t&-t,_>=i||_===32&&(i&4194048)!==0)?t:f}function Mn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wo(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ln(){var e=Vi;return Vi<<=1,(Vi&62914560)===0&&(Vi=4194304),e}function Ki(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Gi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Dc(e,t,i,s,f,_){var M=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var H=e.entanglements,$=e.expirationTimes,ae=e.hiddenUpdates;for(i=M&~i;0<i;){var fe=31-Yt(i),ve=1<<fe;H[fe]=0,$[fe]=-1;var le=ae[fe];if(le!==null)for(ae[fe]=null,fe=0;fe<le.length;fe++){var ue=le[fe];ue!==null&&(ue.lane&=-536870913)}i&=~ve}s!==0&&xo(e,s,0),_!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=_&~(M&~t))}function xo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Yt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Y(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Yt(i),f=1<<s;f&t|e[s]&t&&(e[s]|=t),i&=~f}}function re(e,t){var i=t&-t;return i=(i&42)!==0?1:ce(i),(i&(e.suspendedLanes|t))!==0?0:i}function ce(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function _e(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ye(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:qv(e.type))}function De(e,t){var i=Z.p;try{return Z.p=e,t()}finally{Z.p=i}}var we=Math.random().toString(36).slice(2),Se="__reactFiber$"+we,be="__reactProps$"+we,Te="__reactContainer$"+we,Oe="__reactEvents$"+we,Me="__reactListeners$"+we,Ge="__reactHandles$"+we,it="__reactResources$"+we,dt="__reactMarker$"+we;function yt(e){delete e[Se],delete e[be],delete e[Oe],delete e[Me],delete e[Ge]}function Ye(e){var t=e[Se];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Te]||i[Se]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Av(e);e!==null;){if(i=e[Se])return i;e=Av(e)}return t}e=i,i=e.parentNode}return null}function Xe(e){if(e=e[Se]||e[Te]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function cr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function wr(e){var t=e[it];return t||(t=e[it]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ht(e){e[dt]=!0}var ur=new Set,ls={};function hr(e,t){tr(e,t),tr(e+"Capture",t)}function tr(e,t){for(ls[e]=t,e=0;e<t.length;e++)ur.add(t[e])}var cs=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]*$"),kn={},We={};function jt(e){return Zr.call(We,e)?!0:Zr.call(kn,e)?!1:cs.test(e)?We[e]=!0:(kn[e]=!0,!1)}function Fr(e,t,i){if(jt(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function xr(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Qe(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Ut(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function aa(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Oc(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,_=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(M){i=""+M,_.call(this,M)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(M){i=""+M},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mc(e){if(!e._valueTracker){var t=aa(e)?"checked":"value";e._valueTracker=Oc(e,t,""+e[t])}}function fd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=aa(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Eo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var lS=/[\n"\\]/g;function Er(e){return e.replace(lS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Lc(e,t,i,s,f,_,M,H){e.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.type=M:e.removeAttribute("type"),t!=null?M==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ut(t)):e.value!==""+Ut(t)&&(e.value=""+Ut(t)):M!=="submit"&&M!=="reset"||e.removeAttribute("value"),t!=null?kc(e,M,Ut(t)):i!=null?kc(e,M,Ut(i)):s!=null&&e.removeAttribute("value"),f==null&&_!=null&&(e.defaultChecked=!!_),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?e.name=""+Ut(H):e.removeAttribute("name")}function dd(e,t,i,s,f,_,M,H){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(e.type=_),t!=null||i!=null){if(!(_!=="submit"&&_!=="reset"||t!=null)){Mc(e);return}i=i!=null?""+Ut(i):"",t=t!=null?""+Ut(t):i,H||t===e.value||(e.value=t),e.defaultValue=t}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=H?e.checked:!!s,e.defaultChecked=!!s,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(e.name=M),Mc(e)}function kc(e,t,i){t==="number"&&Eo(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function us(e,t,i,s){if(e=e.options,t){t={};for(var f=0;f<i.length;f++)t["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=t.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Ut(i),t=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,s&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function md(e,t,i){if(t!=null&&(t=""+Ut(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Ut(i):""}function pd(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(l(92));if(ne(s)){if(1<s.length)throw Error(l(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Ut(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Mc(e)}function hs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var cS=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 vd(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||cS.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function gd(e,t,i){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var f in t)s=t[f],t.hasOwnProperty(f)&&i[f]!==s&&vd(e,f,s)}else for(var _ in t)t.hasOwnProperty(_)&&vd(e,_,t[_])}function Bc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var uS=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"]]),hS=/^[\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 Ro(e){return hS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Si(){}var Nc=null;function jc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fs=null,ds=null;function _d(e){var t=Xe(e);if(t&&(e=t.stateNode)){var i=e[be]||null;e:switch(e=t.stateNode,t.type){case"input":if(Lc(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Er(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var f=s[be]||null;if(!f)throw Error(l(90));Lc(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&fd(s)}break e;case"textarea":md(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&us(e,!!i.multiple,t,!1)}}}var Hc=!1;function yd(e,t,i){if(Hc)return e(t,i);Hc=!0;try{var s=e(t);return s}finally{if(Hc=!1,(fs!==null||ds!==null)&&(dl(),fs&&(t=fs,e=ds,ds=fs=null,_d(t),e)))for(t=0;t<e.length;t++)_d(e[t])}}function oa(e,t){var i=e.stateNode;if(i===null)return null;var s=i[be]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(l(231,t,typeof i));return i}var bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zc=!1;if(bi)try{var la={};Object.defineProperty(la,"passive",{get:function(){zc=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{zc=!1}var $i=null,Pc=null,Ao=null;function Sd(){if(Ao)return Ao;var e,t=Pc,i=t.length,s,f="value"in $i?$i.value:$i.textContent,_=f.length;for(e=0;e<i&&t[e]===f[e];e++);var M=i-e;for(s=1;s<=M&&t[i-s]===f[_-s];s++);return Ao=f.slice(e,1<s?1-s:void 0)}function To(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Do(){return!0}function bd(){return!1}function rr(e){function t(i,s,f,_,M){this._reactName=i,this._targetInst=f,this.type=s,this.nativeEvent=_,this.target=M,this.currentTarget=null;for(var H in e)e.hasOwnProperty(H)&&(i=e[H],this[H]=i?i(_):_[H]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Do:bd,this.isPropagationStopped=bd,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Do)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Do)},persist:function(){},isPersistent:Do}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Oo=rr(Bn),ca=v({},Bn,{view:0,detail:0}),fS=rr(ca),Uc,Ic,ua,Mo=v({},ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ua&&(ua&&e.type==="mousemove"?(Uc=e.screenX-ua.screenX,Ic=e.screenY-ua.screenY):Ic=Uc=0,ua=e),Uc)},movementY:function(e){return"movementY"in e?e.movementY:Ic}}),Cd=rr(Mo),dS=v({},Mo,{dataTransfer:0}),mS=rr(dS),pS=v({},ca,{relatedTarget:0}),Fc=rr(pS),vS=v({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0}),gS=rr(vS),_S=v({},Bn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yS=rr(_S),SS=v({},Bn,{data:0}),wd=rr(SS),bS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},CS={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"},wS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wS[e])?!!t[e]:!1}function qc(){return xS}var ES=v({},ca,{key:function(e){if(e.key){var t=bS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=To(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?CS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qc,charCode:function(e){return e.type==="keypress"?To(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?To(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),RS=rr(ES),AS=v({},Mo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xd=rr(AS),TS=v({},ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qc}),DS=rr(TS),OS=v({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),MS=rr(OS),LS=v({},Mo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kS=rr(LS),BS=v({},Bn,{newState:0,oldState:0}),NS=rr(BS),jS=[9,13,27,32],Wc=bi&&"CompositionEvent"in window,ha=null;bi&&"documentMode"in document&&(ha=document.documentMode);var HS=bi&&"TextEvent"in window&&!ha,Ed=bi&&(!Wc||ha&&8<ha&&11>=ha),Rd=" ",Ad=!1;function Td(e,t){switch(e){case"keyup":return jS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ms=!1;function zS(e,t){switch(e){case"compositionend":return Dd(t);case"keypress":return t.which!==32?null:(Ad=!0,Rd);case"textInput":return e=t.data,e===Rd&&Ad?null:e;default:return null}}function PS(e,t){if(ms)return e==="compositionend"||!Wc&&Td(e,t)?(e=Sd(),Ao=Pc=$i=null,ms=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ed&&t.locale!=="ko"?null:t.data;default:return null}}var US={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 Od(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!US[e.type]:t==="textarea"}function Md(e,t,i,s){fs?ds?ds.push(s):ds=[s]:fs=s,t=Sl(t,"onChange"),0<t.length&&(i=new Oo("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var fa=null,da=null;function IS(e){dv(e,0)}function Lo(e){var t=cr(e);if(fd(t))return e}function Ld(e,t){if(e==="change")return t}var kd=!1;if(bi){var Vc;if(bi){var Kc="oninput"in document;if(!Kc){var Bd=document.createElement("div");Bd.setAttribute("oninput","return;"),Kc=typeof Bd.oninput=="function"}Vc=Kc}else Vc=!1;kd=Vc&&(!document.documentMode||9<document.documentMode)}function Nd(){fa&&(fa.detachEvent("onpropertychange",jd),da=fa=null)}function jd(e){if(e.propertyName==="value"&&Lo(da)){var t=[];Md(t,da,e,jc(e)),yd(IS,t)}}function FS(e,t,i){e==="focusin"?(Nd(),fa=t,da=i,fa.attachEvent("onpropertychange",jd)):e==="focusout"&&Nd()}function qS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lo(da)}function WS(e,t){if(e==="click")return Lo(t)}function VS(e,t){if(e==="input"||e==="change")return Lo(t)}function KS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fr=typeof Object.is=="function"?Object.is:KS;function ma(e,t){if(fr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var f=i[s];if(!Zr.call(t,f)||!fr(e[f],t[f]))return!1}return!0}function Hd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zd(e,t){var i=Hd(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Hd(i)}}function Pd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ud(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Eo(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Eo(e.document)}return t}function Gc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var GS=bi&&"documentMode"in document&&11>=document.documentMode,ps=null,$c=null,pa=null,Yc=!1;function Id(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Yc||ps==null||ps!==Eo(s)||(s=ps,"selectionStart"in s&&Gc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),pa&&ma(pa,s)||(pa=s,s=Sl($c,"onSelect"),0<s.length&&(t=new Oo("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=ps)))}function Nn(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var vs={animationend:Nn("Animation","AnimationEnd"),animationiteration:Nn("Animation","AnimationIteration"),animationstart:Nn("Animation","AnimationStart"),transitionrun:Nn("Transition","TransitionRun"),transitionstart:Nn("Transition","TransitionStart"),transitioncancel:Nn("Transition","TransitionCancel"),transitionend:Nn("Transition","TransitionEnd")},Xc={},Fd={};bi&&(Fd=document.createElement("div").style,"AnimationEvent"in window||(delete vs.animationend.animation,delete vs.animationiteration.animation,delete vs.animationstart.animation),"TransitionEvent"in window||delete vs.transitionend.transition);function jn(e){if(Xc[e])return Xc[e];if(!vs[e])return e;var t=vs[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Fd)return Xc[e]=t[i];return e}var qd=jn("animationend"),Wd=jn("animationiteration"),Vd=jn("animationstart"),$S=jn("transitionrun"),YS=jn("transitionstart"),XS=jn("transitioncancel"),Kd=jn("transitionend"),Gd=new Map,Qc="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(" ");Qc.push("scrollEnd");function qr(e,t){Gd.set(e,t),hr(t,[e])}var ko=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Rr=[],gs=0,Zc=0;function Bo(){for(var e=gs,t=Zc=gs=0;t<e;){var i=Rr[t];Rr[t++]=null;var s=Rr[t];Rr[t++]=null;var f=Rr[t];Rr[t++]=null;var _=Rr[t];if(Rr[t++]=null,s!==null&&f!==null){var M=s.pending;M===null?f.next=f:(f.next=M.next,M.next=f),s.pending=f}_!==0&&$d(i,f,_)}}function No(e,t,i,s){Rr[gs++]=e,Rr[gs++]=t,Rr[gs++]=i,Rr[gs++]=s,Zc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Jc(e,t,i,s){return No(e,t,i,s),jo(e)}function Hn(e,t){return No(e,null,null,t),jo(e)}function $d(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var f=!1,_=e.return;_!==null;)_.childLanes|=i,s=_.alternate,s!==null&&(s.childLanes|=i),_.tag===22&&(e=_.stateNode,e===null||e._visibility&1||(f=!0)),e=_,_=_.return;return e.tag===3?(_=e.stateNode,f&&t!==null&&(f=31-Yt(i),e=_.hiddenUpdates,s=e[f],s===null?e[f]=[t]:s.push(t),t.lane=i|536870912),_):null}function jo(e){if(50<Ha)throw Ha=0,lh=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _s={};function QS(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(e,t,i,s){return new QS(e,t,i,s)}function eu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var i=e.alternate;return i===null?(i=dr(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Yd(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ho(e,t,i,s,f,_){var M=0;if(s=e,typeof e=="function")eu(e)&&(M=1);else if(typeof e=="string")M=rC(e,i,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=dr(31,i,t,f),e.elementType=B,e.lanes=_,e;case b:return zn(i.children,f,_,t);case h:M=8,f|=24;break;case m:return e=dr(12,i,t,f|2),e.elementType=m,e.lanes=_,e;case D:return e=dr(13,i,t,f),e.elementType=D,e.lanes=_,e;case L:return e=dr(19,i,t,f),e.elementType=L,e.lanes=_,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case g:M=10;break e;case p:M=9;break e;case A:M=11;break e;case T:M=14;break e;case E:M=16,s=null;break e}M=29,i=Error(l(130,e===null?"null":typeof e,"")),s=null}return t=dr(M,i,t,f),t.elementType=e,t.type=s,t.lanes=_,t}function zn(e,t,i,s){return e=dr(7,e,s,t),e.lanes=i,e}function tu(e,t,i){return e=dr(6,e,null,t),e.lanes=i,e}function Xd(e){var t=dr(18,null,null,0);return t.stateNode=e,t}function ru(e,t,i){return t=dr(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qd=new WeakMap;function Ar(e,t){if(typeof e=="object"&&e!==null){var i=Qd.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Qr(t)},Qd.set(e,t),t)}return{value:e,source:t,stack:Qr(t)}}var ys=[],Ss=0,zo=null,va=0,Tr=[],Dr=0,Yi=null,ei=1,ti="";function wi(e,t){ys[Ss++]=va,ys[Ss++]=zo,zo=e,va=t}function Zd(e,t,i){Tr[Dr++]=ei,Tr[Dr++]=ti,Tr[Dr++]=Yi,Yi=e;var s=ei;e=ti;var f=32-Yt(s)-1;s&=~(1<<f),i+=1;var _=32-Yt(t)+f;if(30<_){var M=f-f%5;_=(s&(1<<M)-1).toString(32),s>>=M,f-=M,ei=1<<32-Yt(t)+f|i<<f|s,ti=_+e}else ei=1<<_|i<<f|s,ti=e}function iu(e){e.return!==null&&(wi(e,1),Zd(e,1,0))}function nu(e){for(;e===zo;)zo=ys[--Ss],ys[Ss]=null,va=ys[--Ss],ys[Ss]=null;for(;e===Yi;)Yi=Tr[--Dr],Tr[Dr]=null,ti=Tr[--Dr],Tr[Dr]=null,ei=Tr[--Dr],Tr[Dr]=null}function Jd(e,t){Tr[Dr++]=ei,Tr[Dr++]=ti,Tr[Dr++]=Yi,ei=t.id,ti=t.overflow,Yi=e}var It=null,mt=null,$e=!1,Xi=null,Or=!1,su=Error(l(519));function Qi(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ga(Ar(t,e)),su}function em(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[Se]=e,t[be]=s,i){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(i=0;i<Pa.length;i++)qe(Pa[i],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),dd(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),pd(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||gv(t.textContent,i)?(s.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),s.onScroll!=null&&qe("scroll",t),s.onScrollEnd!=null&&qe("scrollend",t),s.onClick!=null&&(t.onclick=Si),t=!0):t=!1,t||Qi(e,!0)}function tm(e){for(It=e.return;It;)switch(It.tag){case 5:case 31:case 13:Or=!1;return;case 27:case 3:Or=!0;return;default:It=It.return}}function bs(e){if(e!==It)return!1;if(!$e)return tm(e),$e=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||wh(e.type,e.memoizedProps)),i=!i),i&&mt&&Qi(e),tm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));mt=Rv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));mt=Rv(e)}else t===27?(t=mt,fn(e.type)?(e=Th,Th=null,mt=e):mt=t):mt=It?Lr(e.stateNode.nextSibling):null;return!0}function Pn(){mt=It=null,$e=!1}function au(){var e=Xi;return e!==null&&(ar===null?ar=e:ar.push.apply(ar,e),Xi=null),e}function ga(e){Xi===null?Xi=[e]:Xi.push(e)}var ou=N(null),Un=null,xi=null;function Zi(e,t,i){Q(ou,t._currentValue),t._currentValue=i}function Ei(e){e._currentValue=ou.current,z(ou)}function lu(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function cu(e,t,i,s){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var _=f.dependencies;if(_!==null){var M=f.child;_=_.firstContext;e:for(;_!==null;){var H=_;_=f;for(var $=0;$<t.length;$++)if(H.context===t[$]){_.lanes|=i,H=_.alternate,H!==null&&(H.lanes|=i),lu(_.return,i,e),s||(M=null);break e}_=H.next}}else if(f.tag===18){if(M=f.return,M===null)throw Error(l(341));M.lanes|=i,_=M.alternate,_!==null&&(_.lanes|=i),lu(M,i,e),M=null}else M=f.child;if(M!==null)M.return=f;else for(M=f;M!==null;){if(M===e){M=null;break}if(f=M.sibling,f!==null){f.return=M.return,M=f;break}M=M.return}f=M}}function Cs(e,t,i,s){e=null;for(var f=t,_=!1;f!==null;){if(!_){if((f.flags&524288)!==0)_=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var M=f.alternate;if(M===null)throw Error(l(387));if(M=M.memoizedProps,M!==null){var H=f.type;fr(f.pendingProps.value,M.value)||(e!==null?e.push(H):e=[H])}}else if(f===X.current){if(M=f.alternate,M===null)throw Error(l(387));M.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Wa):e=[Wa])}f=f.return}e!==null&&cu(t,e,i,s),t.flags|=262144}function Po(e){for(e=e.firstContext;e!==null;){if(!fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function In(e){Un=e,xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ft(e){return rm(Un,e)}function Uo(e,t){return Un===null&&In(e),rm(e,t)}function rm(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},xi===null){if(e===null)throw Error(l(308));xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xi=xi.next=t;return i}var ZS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},JS=r.unstable_scheduleCallback,eb=r.unstable_NormalPriority,At={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uu(){return{controller:new ZS,data:new Map,refCount:0}}function _a(e){e.refCount--,e.refCount===0&&JS(eb,function(){e.controller.abort()})}var ya=null,hu=0,ws=0,xs=null;function tb(e,t){if(ya===null){var i=ya=[];hu=0,ws=mh(),xs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return hu++,t.then(im,im),t}function im(){if(--hu===0&&ya!==null){xs!==null&&(xs.status="fulfilled");var e=ya;ya=null,ws=0,xs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function rb(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var f=0;f<i.length;f++)(0,i[f])(t)},function(f){for(s.status="rejected",s.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),s}var nm=q.S;q.S=function(e,t){Ip=ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&tb(e,t),nm!==null&&nm(e,t)};var Fn=N(null);function fu(){var e=Fn.current;return e!==null?e:ft.pooledCache}function Io(e,t){t===null?Q(Fn,Fn.current):Q(Fn,t.pool)}function sm(){var e=fu();return e===null?null:{parent:At._currentValue,pool:e}}var Es=Error(l(460)),du=Error(l(474)),Fo=Error(l(542)),qo={then:function(){}};function am(e){return e=e.status,e==="fulfilled"||e==="rejected"}function om(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Si,Si),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cm(e),e;default:if(typeof t.status=="string")t.then(Si,Si);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=s}},function(s){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cm(e),e}throw Wn=t,Es}}function qn(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Wn=i,Es):i}}var Wn=null;function lm(){if(Wn===null)throw Error(l(459));var e=Wn;return Wn=null,e}function cm(e){if(e===Es||e===Fo)throw Error(l(483))}var Rs=null,Sa=0;function Wo(e){var t=Sa;return Sa+=1,Rs===null&&(Rs=[]),om(Rs,e,t)}function ba(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Vo(e,t){throw t.$$typeof===w?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function um(e){function t(te,J){if(e){var se=te.deletions;se===null?(te.deletions=[J],te.flags|=16):se.push(J)}}function i(te,J){if(!e)return null;for(;J!==null;)t(te,J),J=J.sibling;return null}function s(te){for(var J=new Map;te!==null;)te.key!==null?J.set(te.key,te):J.set(te.index,te),te=te.sibling;return J}function f(te,J){return te=Ci(te,J),te.index=0,te.sibling=null,te}function _(te,J,se){return te.index=se,e?(se=te.alternate,se!==null?(se=se.index,se<J?(te.flags|=67108866,J):se):(te.flags|=67108866,J)):(te.flags|=1048576,J)}function M(te){return e&&te.alternate===null&&(te.flags|=67108866),te}function H(te,J,se,pe){return J===null||J.tag!==6?(J=tu(se,te.mode,pe),J.return=te,J):(J=f(J,se),J.return=te,J)}function $(te,J,se,pe){var Le=se.type;return Le===b?fe(te,J,se.props.children,pe,se.key):J!==null&&(J.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===E&&qn(Le)===J.type)?(J=f(J,se.props),ba(J,se),J.return=te,J):(J=Ho(se.type,se.key,se.props,null,te.mode,pe),ba(J,se),J.return=te,J)}function ae(te,J,se,pe){return J===null||J.tag!==4||J.stateNode.containerInfo!==se.containerInfo||J.stateNode.implementation!==se.implementation?(J=ru(se,te.mode,pe),J.return=te,J):(J=f(J,se.children||[]),J.return=te,J)}function fe(te,J,se,pe,Le){return J===null||J.tag!==7?(J=zn(se,te.mode,pe,Le),J.return=te,J):(J=f(J,se),J.return=te,J)}function ve(te,J,se){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=tu(""+J,te.mode,se),J.return=te,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case x:return se=Ho(J.type,J.key,J.props,null,te.mode,se),ba(se,J),se.return=te,se;case R:return J=ru(J,te.mode,se),J.return=te,J;case E:return J=qn(J),ve(te,J,se)}if(ne(J)||I(J))return J=zn(J,te.mode,se,null),J.return=te,J;if(typeof J.then=="function")return ve(te,Wo(J),se);if(J.$$typeof===g)return ve(te,Uo(te,J),se);Vo(te,J)}return null}function le(te,J,se,pe){var Le=J!==null?J.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Le!==null?null:H(te,J,""+se,pe);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case x:return se.key===Le?$(te,J,se,pe):null;case R:return se.key===Le?ae(te,J,se,pe):null;case E:return se=qn(se),le(te,J,se,pe)}if(ne(se)||I(se))return Le!==null?null:fe(te,J,se,pe,null);if(typeof se.then=="function")return le(te,J,Wo(se),pe);if(se.$$typeof===g)return le(te,J,Uo(te,se),pe);Vo(te,se)}return null}function ue(te,J,se,pe,Le){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return te=te.get(se)||null,H(J,te,""+pe,Le);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case x:return te=te.get(pe.key===null?se:pe.key)||null,$(J,te,pe,Le);case R:return te=te.get(pe.key===null?se:pe.key)||null,ae(J,te,pe,Le);case E:return pe=qn(pe),ue(te,J,se,pe,Le)}if(ne(pe)||I(pe))return te=te.get(se)||null,fe(J,te,pe,Le,null);if(typeof pe.then=="function")return ue(te,J,se,Wo(pe),Le);if(pe.$$typeof===g)return ue(te,J,se,Uo(J,pe),Le);Vo(J,pe)}return null}function xe(te,J,se,pe){for(var Le=null,Ze=null,Ae=J,He=J=0,Ke=null;Ae!==null&&He<se.length;He++){Ae.index>He?(Ke=Ae,Ae=null):Ke=Ae.sibling;var Je=le(te,Ae,se[He],pe);if(Je===null){Ae===null&&(Ae=Ke);break}e&&Ae&&Je.alternate===null&&t(te,Ae),J=_(Je,J,He),Ze===null?Le=Je:Ze.sibling=Je,Ze=Je,Ae=Ke}if(He===se.length)return i(te,Ae),$e&&wi(te,He),Le;if(Ae===null){for(;He<se.length;He++)Ae=ve(te,se[He],pe),Ae!==null&&(J=_(Ae,J,He),Ze===null?Le=Ae:Ze.sibling=Ae,Ze=Ae);return $e&&wi(te,He),Le}for(Ae=s(Ae);He<se.length;He++)Ke=ue(Ae,te,He,se[He],pe),Ke!==null&&(e&&Ke.alternate!==null&&Ae.delete(Ke.key===null?He:Ke.key),J=_(Ke,J,He),Ze===null?Le=Ke:Ze.sibling=Ke,Ze=Ke);return e&&Ae.forEach(function(gn){return t(te,gn)}),$e&&wi(te,He),Le}function Be(te,J,se,pe){if(se==null)throw Error(l(151));for(var Le=null,Ze=null,Ae=J,He=J=0,Ke=null,Je=se.next();Ae!==null&&!Je.done;He++,Je=se.next()){Ae.index>He?(Ke=Ae,Ae=null):Ke=Ae.sibling;var gn=le(te,Ae,Je.value,pe);if(gn===null){Ae===null&&(Ae=Ke);break}e&&Ae&&gn.alternate===null&&t(te,Ae),J=_(gn,J,He),Ze===null?Le=gn:Ze.sibling=gn,Ze=gn,Ae=Ke}if(Je.done)return i(te,Ae),$e&&wi(te,He),Le;if(Ae===null){for(;!Je.done;He++,Je=se.next())Je=ve(te,Je.value,pe),Je!==null&&(J=_(Je,J,He),Ze===null?Le=Je:Ze.sibling=Je,Ze=Je);return $e&&wi(te,He),Le}for(Ae=s(Ae);!Je.done;He++,Je=se.next())Je=ue(Ae,te,He,Je.value,pe),Je!==null&&(e&&Je.alternate!==null&&Ae.delete(Je.key===null?He:Je.key),J=_(Je,J,He),Ze===null?Le=Je:Ze.sibling=Je,Ze=Je);return e&&Ae.forEach(function(dC){return t(te,dC)}),$e&&wi(te,He),Le}function lt(te,J,se,pe){if(typeof se=="object"&&se!==null&&se.type===b&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case x:e:{for(var Le=se.key;J!==null;){if(J.key===Le){if(Le=se.type,Le===b){if(J.tag===7){i(te,J.sibling),pe=f(J,se.props.children),pe.return=te,te=pe;break e}}else if(J.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===E&&qn(Le)===J.type){i(te,J.sibling),pe=f(J,se.props),ba(pe,se),pe.return=te,te=pe;break e}i(te,J);break}else t(te,J);J=J.sibling}se.type===b?(pe=zn(se.props.children,te.mode,pe,se.key),pe.return=te,te=pe):(pe=Ho(se.type,se.key,se.props,null,te.mode,pe),ba(pe,se),pe.return=te,te=pe)}return M(te);case R:e:{for(Le=se.key;J!==null;){if(J.key===Le)if(J.tag===4&&J.stateNode.containerInfo===se.containerInfo&&J.stateNode.implementation===se.implementation){i(te,J.sibling),pe=f(J,se.children||[]),pe.return=te,te=pe;break e}else{i(te,J);break}else t(te,J);J=J.sibling}pe=ru(se,te.mode,pe),pe.return=te,te=pe}return M(te);case E:return se=qn(se),lt(te,J,se,pe)}if(ne(se))return xe(te,J,se,pe);if(I(se)){if(Le=I(se),typeof Le!="function")throw Error(l(150));return se=Le.call(se),Be(te,J,se,pe)}if(typeof se.then=="function")return lt(te,J,Wo(se),pe);if(se.$$typeof===g)return lt(te,J,Uo(te,se),pe);Vo(te,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,J!==null&&J.tag===6?(i(te,J.sibling),pe=f(J,se),pe.return=te,te=pe):(i(te,J),pe=tu(se,te.mode,pe),pe.return=te,te=pe),M(te)):i(te,J)}return function(te,J,se,pe){try{Sa=0;var Le=lt(te,J,se,pe);return Rs=null,Le}catch(Ae){if(Ae===Es||Ae===Fo)throw Ae;var Ze=dr(29,Ae,null,te.mode);return Ze.lanes=pe,Ze.return=te,Ze}finally{}}}var Vn=um(!0),hm=um(!1),Ji=!1;function mu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function en(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function tn(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(et&2)!==0){var f=s.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),s.pending=t,t=jo(e),$d(e,null,i),t}return No(e,s,t,i),jo(e)}function Ca(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Y(e,i)}}function vu(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var f=null,_=null;if(i=i.firstBaseUpdate,i!==null){do{var M={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};_===null?f=_=M:_=_.next=M,i=i.next}while(i!==null);_===null?f=_=t:_=_.next=t}else f=_=t;i={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:_,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var gu=!1;function wa(){if(gu){var e=xs;if(e!==null)throw e}}function xa(e,t,i,s){gu=!1;var f=e.updateQueue;Ji=!1;var _=f.firstBaseUpdate,M=f.lastBaseUpdate,H=f.shared.pending;if(H!==null){f.shared.pending=null;var $=H,ae=$.next;$.next=null,M===null?_=ae:M.next=ae,M=$;var fe=e.alternate;fe!==null&&(fe=fe.updateQueue,H=fe.lastBaseUpdate,H!==M&&(H===null?fe.firstBaseUpdate=ae:H.next=ae,fe.lastBaseUpdate=$))}if(_!==null){var ve=f.baseState;M=0,fe=ae=$=null,H=_;do{var le=H.lane&-536870913,ue=le!==H.lane;if(ue?(Ve&le)===le:(s&le)===le){le!==0&&le===ws&&(gu=!0),fe!==null&&(fe=fe.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var xe=e,Be=H;le=t;var lt=i;switch(Be.tag){case 1:if(xe=Be.payload,typeof xe=="function"){ve=xe.call(lt,ve,le);break e}ve=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Be.payload,le=typeof xe=="function"?xe.call(lt,ve,le):xe,le==null)break e;ve=v({},ve,le);break e;case 2:Ji=!0}}le=H.callback,le!==null&&(e.flags|=64,ue&&(e.flags|=8192),ue=f.callbacks,ue===null?f.callbacks=[le]:ue.push(le))}else ue={lane:le,tag:H.tag,payload:H.payload,callback:H.callback,next:null},fe===null?(ae=fe=ue,$=ve):fe=fe.next=ue,M|=le;if(H=H.next,H===null){if(H=f.shared.pending,H===null)break;ue=H,H=ue.next,ue.next=null,f.lastBaseUpdate=ue,f.shared.pending=null}}while(!0);fe===null&&($=ve),f.baseState=$,f.firstBaseUpdate=ae,f.lastBaseUpdate=fe,_===null&&(f.shared.lanes=0),on|=M,e.lanes=M,e.memoizedState=ve}}function fm(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function dm(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)fm(i[e],t)}var As=N(null),Ko=N(0);function mm(e,t){e=Bi,Q(Ko,e),Q(As,t),Bi=e|t.baseLanes}function _u(){Q(Ko,Bi),Q(As,As.current)}function yu(){Bi=Ko.current,z(As),z(Ko)}var mr=N(null),Mr=null;function rn(e){var t=e.alternate;Q(wt,wt.current&1),Q(mr,e),Mr===null&&(t===null||As.current!==null||t.memoizedState!==null)&&(Mr=e)}function Su(e){Q(wt,wt.current),Q(mr,e),Mr===null&&(Mr=e)}function pm(e){e.tag===22?(Q(wt,wt.current),Q(mr,e),Mr===null&&(Mr=e)):nn()}function nn(){Q(wt,wt.current),Q(mr,mr.current)}function pr(e){z(mr),Mr===e&&(Mr=null),z(wt)}var wt=N(0);function Go(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Rh(i)||Ah(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ri=0,je=null,at=null,Tt=null,$o=!1,Ts=!1,Kn=!1,Yo=0,Ea=0,Ds=null,ib=0;function St(){throw Error(l(321))}function bu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!fr(e[i],t[i]))return!1;return!0}function Cu(e,t,i,s,f,_){return Ri=_,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Zm:Hu,Kn=!1,_=i(s,f),Kn=!1,Ts&&(_=gm(t,i,s,f)),vm(e),_}function vm(e){q.H=Ta;var t=at!==null&&at.next!==null;if(Ri=0,Tt=at=je=null,$o=!1,Ea=0,Ds=null,t)throw Error(l(300));e===null||Dt||(e=e.dependencies,e!==null&&Po(e)&&(Dt=!0))}function gm(e,t,i,s){je=e;var f=0;do{if(Ts&&(Ds=null),Ea=0,Ts=!1,25<=f)throw Error(l(301));if(f+=1,Tt=at=null,e.updateQueue!=null){var _=e.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}q.H=Jm,_=t(i,s)}while(Ts);return _}function nb(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?Ra(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(je.flags|=1024),t}function wu(){var e=Yo!==0;return Yo=0,e}function xu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Eu(e){if($o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$o=!1}Ri=0,Tt=at=je=null,Ts=!1,Ea=Yo=0,Ds=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?je.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function xt(){if(at===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Tt===null?je.memoizedState:Tt.next;if(t!==null)Tt=t,at=e;else{if(e===null)throw je.alternate===null?Error(l(467)):Error(l(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Tt===null?je.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ra(e){var t=Ea;return Ea+=1,Ds===null&&(Ds=[]),e=om(Ds,e,t),t=je,(Tt===null?t.memoizedState:Tt.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Zm:Hu),e}function Qo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ra(e);if(e.$$typeof===g)return Ft(e)}throw Error(l(438,String(e)))}function Ru(e){var t=null,i=je.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=je.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Xo(),je.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=W;return t.index++,i}function Ai(e,t){return typeof t=="function"?t(e):t}function Zo(e){var t=xt();return Au(t,at,e)}function Au(e,t,i){var s=e.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=i;var f=e.baseQueue,_=s.pending;if(_!==null){if(f!==null){var M=f.next;f.next=_.next,_.next=M}t.baseQueue=f=_,s.pending=null}if(_=e.baseState,f===null)e.memoizedState=_;else{t=f.next;var H=M=null,$=null,ae=t,fe=!1;do{var ve=ae.lane&-536870913;if(ve!==ae.lane?(Ve&ve)===ve:(Ri&ve)===ve){var le=ae.revertLane;if(le===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),ve===ws&&(fe=!0);else if((Ri&le)===le){ae=ae.next,le===ws&&(fe=!0);continue}else ve={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},$===null?(H=$=ve,M=_):$=$.next=ve,je.lanes|=le,on|=le;ve=ae.action,Kn&&i(_,ve),_=ae.hasEagerState?ae.eagerState:i(_,ve)}else le={lane:ve,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},$===null?(H=$=le,M=_):$=$.next=le,je.lanes|=ve,on|=ve;ae=ae.next}while(ae!==null&&ae!==t);if($===null?M=_:$.next=H,!fr(_,e.memoizedState)&&(Dt=!0,fe&&(i=xs,i!==null)))throw i;e.memoizedState=_,e.baseState=M,e.baseQueue=$,s.lastRenderedState=_}return f===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Tu(e){var t=xt(),i=t.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=e;var s=i.dispatch,f=i.pending,_=t.memoizedState;if(f!==null){i.pending=null;var M=f=f.next;do _=e(_,M.action),M=M.next;while(M!==f);fr(_,t.memoizedState)||(Dt=!0),t.memoizedState=_,t.baseQueue===null&&(t.baseState=_),i.lastRenderedState=_}return[_,s]}function _m(e,t,i){var s=je,f=xt(),_=$e;if(_){if(i===void 0)throw Error(l(407));i=i()}else i=t();var M=!fr((at||f).memoizedState,i);if(M&&(f.memoizedState=i,Dt=!0),f=f.queue,Mu(bm.bind(null,s,f,e),[e]),f.getSnapshot!==t||M||Tt!==null&&Tt.memoizedState.tag&1){if(s.flags|=2048,Os(9,{destroy:void 0},Sm.bind(null,s,f,i,t),null),ft===null)throw Error(l(349));_||(Ri&127)!==0||ym(s,t,i)}return i}function ym(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=je.updateQueue,t===null?(t=Xo(),je.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Sm(e,t,i,s){t.value=i,t.getSnapshot=s,Cm(t)&&wm(e)}function bm(e,t,i){return i(function(){Cm(t)&&wm(e)})}function Cm(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!fr(e,i)}catch{return!0}}function wm(e){var t=Hn(e,2);t!==null&&or(t,e,2)}function Du(e){var t=Qt();if(typeof e=="function"){var i=e;if(e=i(),Kn){Ir(!0);try{i()}finally{Ir(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ai,lastRenderedState:e},t}function xm(e,t,i,s){return e.baseState=i,Au(e,at,typeof s=="function"?s:Ai)}function sb(e,t,i,s,f){if(tl(e))throw Error(l(485));if(e=t.action,e!==null){var _={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){_.listeners.push(M)}};q.T!==null?i(!0):_.isTransition=!1,s(_),i=t.pending,i===null?(_.next=t.pending=_,Em(t,_)):(_.next=i.next,t.pending=i.next=_)}}function Em(e,t){var i=t.action,s=t.payload,f=e.state;if(t.isTransition){var _=q.T,M={};q.T=M;try{var H=i(f,s),$=q.S;$!==null&&$(M,H),Rm(e,t,H)}catch(ae){Ou(e,t,ae)}finally{_!==null&&M.types!==null&&(_.types=M.types),q.T=_}}else try{_=i(f,s),Rm(e,t,_)}catch(ae){Ou(e,t,ae)}}function Rm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Am(e,t,s)},function(s){return Ou(e,t,s)}):Am(e,t,i)}function Am(e,t,i){t.status="fulfilled",t.value=i,Tm(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Em(e,i)))}function Ou(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Tm(t),t=t.next;while(t!==s)}e.action=null}function Tm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dm(e,t){return t}function Om(e,t){if($e){var i=ft.formState;if(i!==null){e:{var s=je;if($e){if(mt){t:{for(var f=mt,_=Or;f.nodeType!==8;){if(!_){f=null;break t}if(f=Lr(f.nextSibling),f===null){f=null;break t}}_=f.data,f=_==="F!"||_==="F"?f:null}if(f){mt=Lr(f.nextSibling),s=f.data==="F!";break e}}Qi(s)}s=!1}s&&(t=i[0])}}return i=Qt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dm,lastRenderedState:t},i.queue=s,i=Ym.bind(null,je,s),s.dispatch=i,s=Du(!1),_=ju.bind(null,je,!1,s.queue),s=Qt(),f={state:t,dispatch:null,action:e,pending:null},s.queue=f,i=sb.bind(null,je,f,_,i),f.dispatch=i,s.memoizedState=e,[t,i,!1]}function Mm(e){var t=xt();return Lm(t,at,e)}function Lm(e,t,i){if(t=Au(e,t,Dm)[0],e=Zo(Ai)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ra(t)}catch(M){throw M===Es?Fo:M}else s=t;t=xt();var f=t.queue,_=f.dispatch;return i!==t.memoizedState&&(je.flags|=2048,Os(9,{destroy:void 0},ab.bind(null,f,i),null)),[s,_,e]}function ab(e,t){e.action=t}function km(e){var t=xt(),i=at;if(i!==null)return Lm(t,i,e);xt(),t=t.memoizedState,i=xt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Os(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=je.updateQueue,t===null&&(t=Xo(),je.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Bm(){return xt().memoizedState}function Jo(e,t,i,s){var f=Qt();je.flags|=e,f.memoizedState=Os(1|t,{destroy:void 0},i,s===void 0?null:s)}function el(e,t,i,s){var f=xt();s=s===void 0?null:s;var _=f.memoizedState.inst;at!==null&&s!==null&&bu(s,at.memoizedState.deps)?f.memoizedState=Os(t,_,i,s):(je.flags|=e,f.memoizedState=Os(1|t,_,i,s))}function Nm(e,t){Jo(8390656,8,e,t)}function Mu(e,t){el(2048,8,e,t)}function ob(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Xo(),je.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function jm(e){var t=xt().memoizedState;return ob({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function Hm(e,t){return el(4,2,e,t)}function zm(e,t){return el(4,4,e,t)}function Pm(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Um(e,t,i){i=i!=null?i.concat([e]):null,el(4,4,Pm.bind(null,t,e),i)}function Lu(){}function Im(e,t){var i=xt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&bu(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Fm(e,t){var i=xt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&bu(t,s[1]))return s[0];if(s=e(),Kn){Ir(!0);try{e()}finally{Ir(!1)}}return i.memoizedState=[s,t],s}function ku(e,t,i){return i===void 0||(Ri&1073741824)!==0&&(Ve&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=qp(),je.lanes|=e,on|=e,i)}function qm(e,t,i,s){return fr(i,t)?i:As.current!==null?(e=ku(e,i,s),fr(e,t)||(Dt=!0),e):(Ri&42)===0||(Ri&1073741824)!==0&&(Ve&261930)===0?(Dt=!0,e.memoizedState=i):(e=qp(),je.lanes|=e,on|=e,t)}function Wm(e,t,i,s,f){var _=Z.p;Z.p=_!==0&&8>_?_:8;var M=q.T,H={};q.T=H,ju(e,!1,t,i);try{var $=f(),ae=q.S;if(ae!==null&&ae(H,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var fe=rb($,s);Aa(e,t,fe,_r(e))}else Aa(e,t,s,_r(e))}catch(ve){Aa(e,t,{then:function(){},status:"rejected",reason:ve},_r())}finally{Z.p=_,M!==null&&H.types!==null&&(M.types=H.types),q.T=M}}function lb(){}function Bu(e,t,i,s){if(e.tag!==5)throw Error(l(476));var f=Vm(e).queue;Wm(e,f,t,K,i===null?lb:function(){return Km(e),i(s)})}function Vm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ai,lastRenderedState:K},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ai,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Km(e){var t=Vm(e);t.next===null&&(t=e.alternate.memoizedState),Aa(e,t.next.queue,{},_r())}function Nu(){return Ft(Wa)}function Gm(){return xt().memoizedState}function $m(){return xt().memoizedState}function cb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_r();e=en(i);var s=tn(t,e,i);s!==null&&(or(s,t,i),Ca(s,t,i)),t={cache:uu()},e.payload=t;return}t=t.return}}function ub(e,t,i){var s=_r();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},tl(e)?Xm(t,i):(i=Jc(e,t,i,s),i!==null&&(or(i,e,s),Qm(i,t,s)))}function Ym(e,t,i){var s=_r();Aa(e,t,i,s)}function Aa(e,t,i,s){var f={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(tl(e))Xm(t,f);else{var _=e.alternate;if(e.lanes===0&&(_===null||_.lanes===0)&&(_=t.lastRenderedReducer,_!==null))try{var M=t.lastRenderedState,H=_(M,i);if(f.hasEagerState=!0,f.eagerState=H,fr(H,M))return No(e,t,f,0),ft===null&&Bo(),!1}catch{}finally{}if(i=Jc(e,t,f,s),i!==null)return or(i,e,s),Qm(i,t,s),!0}return!1}function ju(e,t,i,s){if(s={lane:2,revertLane:mh(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tl(e)){if(t)throw Error(l(479))}else t=Jc(e,i,s,2),t!==null&&or(t,e,2)}function tl(e){var t=e.alternate;return e===je||t!==null&&t===je}function Xm(e,t){Ts=$o=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Qm(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Y(e,i)}}var Ta={readContext:Ft,use:Qo,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};Ta.useEffectEvent=St;var Zm={readContext:Ft,use:Qo,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:Nm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Jo(4194308,4,Pm.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Jo(4194308,4,e,t)},useInsertionEffect:function(e,t){Jo(4,2,e,t)},useMemo:function(e,t){var i=Qt();t=t===void 0?null:t;var s=e();if(Kn){Ir(!0);try{e()}finally{Ir(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Qt();if(i!==void 0){var f=i(t);if(Kn){Ir(!0);try{i(t)}finally{Ir(!1)}}}else f=t;return s.memoizedState=s.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},s.queue=e,e=e.dispatch=ub.bind(null,je,e),[s.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=Du(e);var t=e.queue,i=Ym.bind(null,je,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Lu,useDeferredValue:function(e,t){var i=Qt();return ku(i,e,t)},useTransition:function(){var e=Du(!1);return e=Wm.bind(null,je,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=je,f=Qt();if($e){if(i===void 0)throw Error(l(407));i=i()}else{if(i=t(),ft===null)throw Error(l(349));(Ve&127)!==0||ym(s,t,i)}f.memoizedState=i;var _={value:i,getSnapshot:t};return f.queue=_,Nm(bm.bind(null,s,_,e),[e]),s.flags|=2048,Os(9,{destroy:void 0},Sm.bind(null,s,_,i,t),null),i},useId:function(){var e=Qt(),t=ft.identifierPrefix;if($e){var i=ti,s=ei;i=(s&~(1<<32-Yt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Yo++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=ib++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Nu,useFormState:Om,useActionState:Om,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=ju.bind(null,je,!0,i),i.dispatch=t,[e,t]},useMemoCache:Ru,useCacheRefresh:function(){return Qt().memoizedState=cb.bind(null,je)},useEffectEvent:function(e){var t=Qt(),i={impl:e};return t.memoizedState=i,function(){if((et&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Hu={readContext:Ft,use:Qo,useCallback:Im,useContext:Ft,useEffect:Mu,useImperativeHandle:Um,useInsertionEffect:Hm,useLayoutEffect:zm,useMemo:Fm,useReducer:Zo,useRef:Bm,useState:function(){return Zo(Ai)},useDebugValue:Lu,useDeferredValue:function(e,t){var i=xt();return qm(i,at.memoizedState,e,t)},useTransition:function(){var e=Zo(Ai)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:Ra(e),t]},useSyncExternalStore:_m,useId:Gm,useHostTransitionStatus:Nu,useFormState:Mm,useActionState:Mm,useOptimistic:function(e,t){var i=xt();return xm(i,at,e,t)},useMemoCache:Ru,useCacheRefresh:$m};Hu.useEffectEvent=jm;var Jm={readContext:Ft,use:Qo,useCallback:Im,useContext:Ft,useEffect:Mu,useImperativeHandle:Um,useInsertionEffect:Hm,useLayoutEffect:zm,useMemo:Fm,useReducer:Tu,useRef:Bm,useState:function(){return Tu(Ai)},useDebugValue:Lu,useDeferredValue:function(e,t){var i=xt();return at===null?ku(i,e,t):qm(i,at.memoizedState,e,t)},useTransition:function(){var e=Tu(Ai)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:Ra(e),t]},useSyncExternalStore:_m,useId:Gm,useHostTransitionStatus:Nu,useFormState:km,useActionState:km,useOptimistic:function(e,t){var i=xt();return at!==null?xm(i,at,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Ru,useCacheRefresh:$m};Jm.useEffectEvent=jm;function zu(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:v({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Pu={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=_r(),f=en(s);f.payload=t,i!=null&&(f.callback=i),t=tn(e,f,s),t!==null&&(or(t,e,s),Ca(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=_r(),f=en(s);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=tn(e,f,s),t!==null&&(or(t,e,s),Ca(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_r(),s=en(i);s.tag=2,t!=null&&(s.callback=t),t=tn(e,s,i),t!==null&&(or(t,e,i),Ca(t,e,i))}};function ep(e,t,i,s,f,_,M){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,_,M):t.prototype&&t.prototype.isPureReactComponent?!ma(i,s)||!ma(f,_):!0}function tp(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&Pu.enqueueReplaceState(t,t.state,null)}function Gn(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=v({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function rp(e){ko(e)}function ip(e){console.error(e)}function np(e){ko(e)}function rl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function sp(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Uu(e,t,i){return i=en(i),i.tag=3,i.payload={element:null},i.callback=function(){rl(e,t)},i}function ap(e){return e=en(e),e.tag=3,e}function op(e,t,i,s){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var _=s.value;e.payload=function(){return f(_)},e.callback=function(){sp(t,i,s)}}var M=i.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(e.callback=function(){sp(t,i,s),typeof f!="function"&&(ln===null?ln=new Set([this]):ln.add(this));var H=s.stack;this.componentDidCatch(s.value,{componentStack:H!==null?H:""})})}function hb(e,t,i,s,f){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Cs(t,i,f,!0),i=mr.current,i!==null){switch(i.tag){case 31:case 13:return Mr===null?ml():i.alternate===null&&bt===0&&(bt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,s===qo?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),hh(e,s,f)),!1;case 22:return i.flags|=65536,s===qo?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),hh(e,s,f)),!1}throw Error(l(435,i.tag))}return hh(e,s,f),ml(),!1}if($e)return t=mr.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,s!==su&&(e=Error(l(422),{cause:s}),ga(Ar(e,i)))):(s!==su&&(t=Error(l(423),{cause:s}),ga(Ar(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,s=Ar(s,i),f=Uu(e.stateNode,s,f),vu(e,f),bt!==4&&(bt=2)),!1;var _=Error(l(520),{cause:s});if(_=Ar(_,i),ja===null?ja=[_]:ja.push(_),bt!==4&&(bt=2),t===null)return!0;s=Ar(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Uu(i.stateNode,s,e),vu(i,e),!1;case 1:if(t=i.type,_=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(ln===null||!ln.has(_))))return i.flags|=65536,f&=-f,i.lanes|=f,f=ap(f),op(f,e,i,s),vu(i,f),!1}i=i.return}while(i!==null);return!1}var Iu=Error(l(461)),Dt=!1;function qt(e,t,i,s){t.child=e===null?hm(t,null,i,s):Vn(t,e.child,i,s)}function lp(e,t,i,s,f){i=i.render;var _=t.ref;if("ref"in s){var M={};for(var H in s)H!=="ref"&&(M[H]=s[H])}else M=s;return In(t),s=Cu(e,t,i,M,_,f),H=wu(),e!==null&&!Dt?(xu(e,t,f),Ti(e,t,f)):($e&&H&&iu(t),t.flags|=1,qt(e,t,s,f),t.child)}function cp(e,t,i,s,f){if(e===null){var _=i.type;return typeof _=="function"&&!eu(_)&&_.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=_,up(e,t,_,s,f)):(e=Ho(i.type,null,s,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(_=e.child,!Yu(e,f)){var M=_.memoizedProps;if(i=i.compare,i=i!==null?i:ma,i(M,s)&&e.ref===t.ref)return Ti(e,t,f)}return t.flags|=1,e=Ci(_,s),e.ref=t.ref,e.return=t,t.child=e}function up(e,t,i,s,f){if(e!==null){var _=e.memoizedProps;if(ma(_,s)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=s=_,Yu(e,f))(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,Ti(e,t,f)}return Fu(e,t,i,s,f)}function hp(e,t,i,s){var f=s.children,_=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(_=_!==null?_.baseLanes|i:i,e!==null){for(s=t.child=e.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~_}else s=0,t.child=null;return fp(e,t,_,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Io(t,_!==null?_.cachePool:null),_!==null?mm(t,_):_u(),pm(t);else return s=t.lanes=536870912,fp(e,t,_!==null?_.baseLanes|i:i,i,s)}else _!==null?(Io(t,_.cachePool),mm(t,_),nn(),t.memoizedState=null):(e!==null&&Io(t,null),_u(),nn());return qt(e,t,f,i),t.child}function Da(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fp(e,t,i,s,f){var _=fu();return _=_===null?null:{parent:At._currentValue,pool:_},t.memoizedState={baseLanes:i,cachePool:_},e!==null&&Io(t,null),_u(),pm(t),e!==null&&Cs(e,t,s,!0),t.childLanes=f,null}function il(e,t){return t=sl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dp(e,t,i){return Vn(t,e.child,null,i),e=il(t,t.pendingProps),e.flags|=2,pr(t),t.memoizedState=null,e}function fb(e,t,i){var s=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($e){if(s.mode==="hidden")return e=il(t,s),t.lanes=536870912,Da(null,e);if(Su(t),(e=mt)?(e=Ev(e,Or),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Xd(e),i.return=t,t.child=i,It=t,mt=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return il(t,s)}var _=e.memoizedState;if(_!==null){var M=_.dehydrated;if(Su(t),f)if(t.flags&256)t.flags&=-257,t=dp(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(Dt||Cs(e,t,i,!1),f=(i&e.childLanes)!==0,Dt||f){if(s=ft,s!==null&&(M=re(s,i),M!==0&&M!==_.retryLane))throw _.retryLane=M,Hn(e,M),or(s,e,M),Iu;ml(),t=dp(e,t,i)}else e=_.treeContext,mt=Lr(M.nextSibling),It=t,$e=!0,Xi=null,Or=!1,e!==null&&Jd(t,e),t=il(t,s),t.flags|=4096;return t}return e=Ci(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function nl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Fu(e,t,i,s,f){return In(t),i=Cu(e,t,i,s,void 0,f),s=wu(),e!==null&&!Dt?(xu(e,t,f),Ti(e,t,f)):($e&&s&&iu(t),t.flags|=1,qt(e,t,i,f),t.child)}function mp(e,t,i,s,f,_){return In(t),t.updateQueue=null,i=gm(t,s,i,f),vm(e),s=wu(),e!==null&&!Dt?(xu(e,t,_),Ti(e,t,_)):($e&&s&&iu(t),t.flags|=1,qt(e,t,i,_),t.child)}function pp(e,t,i,s,f){if(In(t),t.stateNode===null){var _=_s,M=i.contextType;typeof M=="object"&&M!==null&&(_=Ft(M)),_=new i(s,_),t.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=Pu,t.stateNode=_,_._reactInternals=t,_=t.stateNode,_.props=s,_.state=t.memoizedState,_.refs={},mu(t),M=i.contextType,_.context=typeof M=="object"&&M!==null?Ft(M):_s,_.state=t.memoizedState,M=i.getDerivedStateFromProps,typeof M=="function"&&(zu(t,i,M,s),_.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(M=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),M!==_.state&&Pu.enqueueReplaceState(_,_.state,null),xa(t,s,_,f),wa(),_.state=t.memoizedState),typeof _.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){_=t.stateNode;var H=t.memoizedProps,$=Gn(i,H);_.props=$;var ae=_.context,fe=i.contextType;M=_s,typeof fe=="object"&&fe!==null&&(M=Ft(fe));var ve=i.getDerivedStateFromProps;fe=typeof ve=="function"||typeof _.getSnapshotBeforeUpdate=="function",H=t.pendingProps!==H,fe||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(H||ae!==M)&&tp(t,_,s,M),Ji=!1;var le=t.memoizedState;_.state=le,xa(t,s,_,f),wa(),ae=t.memoizedState,H||le!==ae||Ji?(typeof ve=="function"&&(zu(t,i,ve,s),ae=t.memoizedState),($=Ji||ep(t,i,$,s,le,ae,M))?(fe||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(t.flags|=4194308)):(typeof _.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=ae),_.props=s,_.state=ae,_.context=M,s=$):(typeof _.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{_=t.stateNode,pu(e,t),M=t.memoizedProps,fe=Gn(i,M),_.props=fe,ve=t.pendingProps,le=_.context,ae=i.contextType,$=_s,typeof ae=="object"&&ae!==null&&($=Ft(ae)),H=i.getDerivedStateFromProps,(ae=typeof H=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M!==ve||le!==$)&&tp(t,_,s,$),Ji=!1,le=t.memoizedState,_.state=le,xa(t,s,_,f),wa();var ue=t.memoizedState;M!==ve||le!==ue||Ji||e!==null&&e.dependencies!==null&&Po(e.dependencies)?(typeof H=="function"&&(zu(t,i,H,s),ue=t.memoizedState),(fe=Ji||ep(t,i,fe,s,le,ue,$)||e!==null&&e.dependencies!==null&&Po(e.dependencies))?(ae||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(s,ue,$),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(s,ue,$)),typeof _.componentDidUpdate=="function"&&(t.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof _.componentDidUpdate!="function"||M===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ue),_.props=s,_.state=ue,_.context=$,s=fe):(typeof _.componentDidUpdate!="function"||M===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),s=!1)}return _=s,nl(e,t),s=(t.flags&128)!==0,_||s?(_=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:_.render(),t.flags|=1,e!==null&&s?(t.child=Vn(t,e.child,null,f),t.child=Vn(t,null,i,f)):qt(e,t,i,f),t.memoizedState=_.state,e=t.child):e=Ti(e,t,f),e}function vp(e,t,i,s){return Pn(),t.flags|=256,qt(e,t,i,s),t.child}var qu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wu(e){return{baseLanes:e,cachePool:sm()}}function Vu(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=gr),e}function gp(e,t,i){var s=t.pendingProps,f=!1,_=(t.flags&128)!==0,M;if((M=_)||(M=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),M&&(f=!0,t.flags&=-129),M=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(f?rn(t):nn(),(e=mt)?(e=Ev(e,Or),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Xd(e),i.return=t,t.child=i,It=t,mt=null)):e=null,e===null)throw Qi(t);return Ah(e)?t.lanes=32:t.lanes=536870912,null}var H=s.children;return s=s.fallback,f?(nn(),f=t.mode,H=sl({mode:"hidden",children:H},f),s=zn(s,f,i,null),H.return=t,s.return=t,H.sibling=s,t.child=H,s=t.child,s.memoizedState=Wu(i),s.childLanes=Vu(e,M,i),t.memoizedState=qu,Da(null,s)):(rn(t),Ku(t,H))}var $=e.memoizedState;if($!==null&&(H=$.dehydrated,H!==null)){if(_)t.flags&256?(rn(t),t.flags&=-257,t=Gu(e,t,i)):t.memoizedState!==null?(nn(),t.child=e.child,t.flags|=128,t=null):(nn(),H=s.fallback,f=t.mode,s=sl({mode:"visible",children:s.children},f),H=zn(H,f,i,null),H.flags|=2,s.return=t,H.return=t,s.sibling=H,t.child=s,Vn(t,e.child,null,i),s=t.child,s.memoizedState=Wu(i),s.childLanes=Vu(e,M,i),t.memoizedState=qu,t=Da(null,s));else if(rn(t),Ah(H)){if(M=H.nextSibling&&H.nextSibling.dataset,M)var ae=M.dgst;M=ae,s=Error(l(419)),s.stack="",s.digest=M,ga({value:s,source:null,stack:null}),t=Gu(e,t,i)}else if(Dt||Cs(e,t,i,!1),M=(i&e.childLanes)!==0,Dt||M){if(M=ft,M!==null&&(s=re(M,i),s!==0&&s!==$.retryLane))throw $.retryLane=s,Hn(e,s),or(M,e,s),Iu;Rh(H)||ml(),t=Gu(e,t,i)}else Rh(H)?(t.flags|=192,t.child=e.child,t=null):(e=$.treeContext,mt=Lr(H.nextSibling),It=t,$e=!0,Xi=null,Or=!1,e!==null&&Jd(t,e),t=Ku(t,s.children),t.flags|=4096);return t}return f?(nn(),H=s.fallback,f=t.mode,$=e.child,ae=$.sibling,s=Ci($,{mode:"hidden",children:s.children}),s.subtreeFlags=$.subtreeFlags&65011712,ae!==null?H=Ci(ae,H):(H=zn(H,f,i,null),H.flags|=2),H.return=t,s.return=t,s.sibling=H,t.child=s,Da(null,s),s=t.child,H=e.child.memoizedState,H===null?H=Wu(i):(f=H.cachePool,f!==null?($=At._currentValue,f=f.parent!==$?{parent:$,pool:$}:f):f=sm(),H={baseLanes:H.baseLanes|i,cachePool:f}),s.memoizedState=H,s.childLanes=Vu(e,M,i),t.memoizedState=qu,Da(e.child,s)):(rn(t),i=e.child,e=i.sibling,i=Ci(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(M=t.deletions,M===null?(t.deletions=[e],t.flags|=16):M.push(e)),t.child=i,t.memoizedState=null,i)}function Ku(e,t){return t=sl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function sl(e,t){return e=dr(22,e,null,t),e.lanes=0,e}function Gu(e,t,i){return Vn(t,e.child,null,i),e=Ku(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _p(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),lu(e.return,t,i)}function $u(e,t,i,s,f,_){var M=e.memoizedState;M===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:f,treeForkCount:_}:(M.isBackwards=t,M.rendering=null,M.renderingStartTime=0,M.last=s,M.tail=i,M.tailMode=f,M.treeForkCount=_)}function yp(e,t,i){var s=t.pendingProps,f=s.revealOrder,_=s.tail;s=s.children;var M=wt.current,H=(M&2)!==0;if(H?(M=M&1|2,t.flags|=128):M&=1,Q(wt,M),qt(e,t,s,i),s=$e?va:0,!H&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_p(e,i,t);else if(e.tag===19)_p(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(i=t.child,f=null;i!==null;)e=i.alternate,e!==null&&Go(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),$u(t,!1,f,i,_,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&Go(e)===null){t.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}$u(t,!0,i,null,_,s);break;case"together":$u(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ti(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),on|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Cs(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,i=Ci(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Ci(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Yu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Po(e)))}function db(e,t,i){switch(t.tag){case 3:P(t,t.stateNode.containerInfo),Zi(t,At,e.memoizedState.cache),Pn();break;case 27:case 5:ge(t);break;case 4:P(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Su(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(rn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?gp(e,t,i):(rn(t),e=Ti(e,t,i),e!==null?e.sibling:null);rn(t);break;case 19:var f=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Cs(e,t,i,!1),s=(i&t.childLanes)!==0),f){if(s)return yp(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Q(wt,wt.current),s)break;return null;case 22:return t.lanes=0,hp(e,t,i,t.pendingProps);case 24:Zi(t,At,e.memoizedState.cache)}return Ti(e,t,i)}function Sp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Dt=!0;else{if(!Yu(e,i)&&(t.flags&128)===0)return Dt=!1,db(e,t,i);Dt=(e.flags&131072)!==0}else Dt=!1,$e&&(t.flags&1048576)!==0&&Zd(t,va,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=qn(t.elementType),t.type=e,typeof e=="function")eu(e)?(s=Gn(e,s),t.tag=1,t=pp(null,t,e,s,i)):(t.tag=0,t=Fu(null,t,e,s,i));else{if(e!=null){var f=e.$$typeof;if(f===A){t.tag=11,t=lp(null,t,e,s,i);break e}else if(f===T){t.tag=14,t=cp(null,t,e,s,i);break e}}throw t=ee(e)||e,Error(l(306,t,""))}}return t;case 0:return Fu(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,f=Gn(s,t.pendingProps),pp(e,t,s,f,i);case 3:e:{if(P(t,t.stateNode.containerInfo),e===null)throw Error(l(387));s=t.pendingProps;var _=t.memoizedState;f=_.element,pu(e,t),xa(t,s,null,i);var M=t.memoizedState;if(s=M.cache,Zi(t,At,s),s!==_.cache&&cu(t,[At],i,!0),wa(),s=M.element,_.isDehydrated)if(_={element:s,isDehydrated:!1,cache:M.cache},t.updateQueue.baseState=_,t.memoizedState=_,t.flags&256){t=vp(e,t,s,i);break e}else if(s!==f){f=Ar(Error(l(424)),t),ga(f),t=vp(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(mt=Lr(e.firstChild),It=t,$e=!0,Xi=null,Or=!0,i=hm(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Pn(),s===f){t=Ti(e,t,i);break e}qt(e,t,s,i)}t=t.child}return t;case 26:return nl(e,t),e===null?(i=Mv(t.type,null,t.pendingProps,null))?t.memoizedState=i:$e||(i=t.type,e=t.pendingProps,s=bl(G.current).createElement(i),s[Se]=t,s[be]=e,Wt(s,i,e),ht(s),t.stateNode=s):t.memoizedState=Mv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&$e&&(s=t.stateNode=Tv(t.type,t.pendingProps,G.current),It=t,Or=!0,f=mt,fn(t.type)?(Th=f,mt=Lr(s.firstChild)):mt=f),qt(e,t,t.pendingProps.children,i),nl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$e&&((f=s=mt)&&(s=qb(s,t.type,t.pendingProps,Or),s!==null?(t.stateNode=s,It=t,mt=Lr(s.firstChild),Or=!1,f=!0):f=!1),f||Qi(t)),ge(t),f=t.type,_=t.pendingProps,M=e!==null?e.memoizedProps:null,s=_.children,wh(f,_)?s=null:M!==null&&wh(f,M)&&(t.flags|=32),t.memoizedState!==null&&(f=Cu(e,t,nb,null,null,i),Wa._currentValue=f),nl(e,t),qt(e,t,s,i),t.child;case 6:return e===null&&$e&&((e=i=mt)&&(i=Wb(i,t.pendingProps,Or),i!==null?(t.stateNode=i,It=t,mt=null,e=!0):e=!1),e||Qi(t)),null;case 13:return gp(e,t,i);case 4:return P(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Vn(t,null,s,i):qt(e,t,s,i),t.child;case 11:return lp(e,t,t.type,t.pendingProps,i);case 7:return qt(e,t,t.pendingProps,i),t.child;case 8:return qt(e,t,t.pendingProps.children,i),t.child;case 12:return qt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Zi(t,t.type,s.value),qt(e,t,s.children,i),t.child;case 9:return f=t.type._context,s=t.pendingProps.children,In(t),f=Ft(f),s=s(f),t.flags|=1,qt(e,t,s,i),t.child;case 14:return cp(e,t,t.type,t.pendingProps,i);case 15:return up(e,t,t.type,t.pendingProps,i);case 19:return yp(e,t,i);case 31:return fb(e,t,i);case 22:return hp(e,t,i,t.pendingProps);case 24:return In(t),s=Ft(At),e===null?(f=fu(),f===null&&(f=ft,_=uu(),f.pooledCache=_,_.refCount++,_!==null&&(f.pooledCacheLanes|=i),f=_),t.memoizedState={parent:s,cache:f},mu(t),Zi(t,At,f)):((e.lanes&i)!==0&&(pu(e,t),xa(t,null,null,i),wa()),f=e.memoizedState,_=t.memoizedState,f.parent!==s?(f={parent:s,cache:s},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),Zi(t,At,s)):(s=_.cache,Zi(t,At,s),s!==f.cache&&cu(t,[At],i,!0))),qt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function Di(e){e.flags|=4}function Xu(e,t,i,s,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Gp())e.flags|=8192;else throw Wn=qo,du}else e.flags&=-16777217}function bp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!jv(t))if(Gp())e.flags|=8192;else throw Wn=qo,du}function al(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ln():536870912,e.lanes|=t,Bs|=t)}function Oa(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function mb(e,t,i){var s=t.pendingProps;switch(nu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return pt(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ei(At),he(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(bs(t)?Di(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,au())),pt(t),null;case 26:var f=t.type,_=t.memoizedState;return e===null?(Di(t),_!==null?(pt(t),bp(t,_)):(pt(t),Xu(t,f,null,s,i))):_?_!==e.memoizedState?(Di(t),pt(t),bp(t,_)):(pt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Di(t),pt(t),Xu(t,f,e,s,i)),null;case 27:if(oe(t),i=G.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return pt(t),null}e=ie.current,bs(t)?em(t):(e=Tv(f,s,i),t.stateNode=e,Di(t))}return pt(t),null;case 5:if(oe(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return pt(t),null}if(_=ie.current,bs(t))em(t);else{var M=bl(G.current);switch(_){case 1:_=M.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:_=M.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":_=M.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":_=M.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":_=M.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof s.is=="string"?M.createElement("select",{is:s.is}):M.createElement("select"),s.multiple?_.multiple=!0:s.size&&(_.size=s.size);break;default:_=typeof s.is=="string"?M.createElement(f,{is:s.is}):M.createElement(f)}}_[Se]=t,_[be]=s;e:for(M=t.child;M!==null;){if(M.tag===5||M.tag===6)_.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===t)break e;for(;M.sibling===null;){if(M.return===null||M.return===t)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}t.stateNode=_;e:switch(Wt(_,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Di(t)}}return pt(t),Xu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(l(166));if(e=G.current,bs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,f=It,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}e[Se]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||gv(e.nodeValue,i)),e||Qi(t,!0)}else e=bl(e).createTextNode(s),e[Se]=t,t.stateNode=e}return pt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=bs(t),i!==null){if(e===null){if(!s)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Se]=t}else Pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),e=!1}else i=au(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(pr(t),t):(pr(t),null);if((t.flags&128)!==0)throw Error(l(558))}return pt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!f)throw Error(l(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[Se]=t}else Pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),f=!1}else f=au(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(pr(t),t):(pr(t),null)}return pr(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),_=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(_=s.memoizedState.cachePool.pool),_!==f&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),al(t,t.updateQueue),pt(t),null);case 4:return he(),e===null&&_h(t.stateNode.containerInfo),pt(t),null;case 10:return Ei(t.type),pt(t),null;case 19:if(z(wt),s=t.memoizedState,s===null)return pt(t),null;if(f=(t.flags&128)!==0,_=s.rendering,_===null)if(f)Oa(s,!1);else{if(bt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(_=Go(e),_!==null){for(t.flags|=128,Oa(s,!1),e=_.updateQueue,t.updateQueue=e,al(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Yd(i,e),i=i.sibling;return Q(wt,wt.current&1|2),$e&&wi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ut()>hl&&(t.flags|=128,f=!0,Oa(s,!1),t.lanes=4194304)}else{if(!f)if(e=Go(_),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,al(t,e),Oa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!_.alternate&&!$e)return pt(t),null}else 2*ut()-s.renderingStartTime>hl&&i!==536870912&&(t.flags|=128,f=!0,Oa(s,!1),t.lanes=4194304);s.isBackwards?(_.sibling=t.child,t.child=_):(e=s.last,e!==null?e.sibling=_:t.child=_,s.last=_)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ut(),e.sibling=null,i=wt.current,Q(wt,f?i&1|2:i&1),$e&&wi(t,s.treeForkCount),e):(pt(t),null);case 22:case 23:return pr(t),yu(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),i=t.updateQueue,i!==null&&al(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&z(Fn),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ei(At),pt(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function pb(e,t){switch(nu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ei(At),he(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oe(t),null;case 31:if(t.memoizedState!==null){if(pr(t),t.alternate===null)throw Error(l(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(pr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(wt),null;case 4:return he(),null;case 10:return Ei(t.type),null;case 22:case 23:return pr(t),yu(),e!==null&&z(Fn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ei(At),null;case 25:return null;default:return null}}function Cp(e,t){switch(nu(t),t.tag){case 3:Ei(At),he();break;case 26:case 27:case 5:oe(t);break;case 4:he();break;case 31:t.memoizedState!==null&&pr(t);break;case 13:pr(t);break;case 19:z(wt);break;case 10:Ei(t.type);break;case 22:case 23:pr(t),yu(),e!==null&&z(Fn);break;case 24:Ei(At)}}function Ma(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var f=s.next;i=f;do{if((i.tag&e)===e){s=void 0;var _=i.create,M=i.inst;s=_(),M.destroy=s}i=i.next}while(i!==f)}}catch(H){st(t,t.return,H)}}function sn(e,t,i){try{var s=t.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var _=f.next;s=_;do{if((s.tag&e)===e){var M=s.inst,H=M.destroy;if(H!==void 0){M.destroy=void 0,f=t;var $=i,ae=H;try{ae()}catch(fe){st(f,$,fe)}}}s=s.next}while(s!==_)}}catch(fe){st(t,t.return,fe)}}function wp(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{dm(t,i)}catch(s){st(e,e.return,s)}}}function xp(e,t,i){i.props=Gn(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){st(e,t,s)}}function La(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(f){st(e,t,f)}}function ri(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(f){st(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){st(e,t,f)}else i.current=null}function Ep(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(f){st(e,e.return,f)}}function Qu(e,t,i){try{var s=e.stateNode;Hb(s,e.type,i,t),s[be]=t}catch(f){st(e,e.return,f)}}function Rp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&fn(e.type)||e.tag===4}function Zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&fn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ju(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Si));else if(s!==4&&(s===27&&fn(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Ju(e,t,i),e=e.sibling;e!==null;)Ju(e,t,i),e=e.sibling}function ol(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&fn(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ol(e,t,i),e=e.sibling;e!==null;)ol(e,t,i),e=e.sibling}function Ap(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);Wt(t,s,i),t[Se]=e,t[be]=i}catch(_){st(e,e.return,_)}}var Oi=!1,Ot=!1,eh=!1,Tp=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function vb(e,t){if(e=e.containerInfo,bh=Tl,e=Ud(e),Gc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var f=s.anchorOffset,_=s.focusNode;s=s.focusOffset;try{i.nodeType,_.nodeType}catch{i=null;break e}var M=0,H=-1,$=-1,ae=0,fe=0,ve=e,le=null;t:for(;;){for(var ue;ve!==i||f!==0&&ve.nodeType!==3||(H=M+f),ve!==_||s!==0&&ve.nodeType!==3||($=M+s),ve.nodeType===3&&(M+=ve.nodeValue.length),(ue=ve.firstChild)!==null;)le=ve,ve=ue;for(;;){if(ve===e)break t;if(le===i&&++ae===f&&(H=M),le===_&&++fe===s&&($=M),(ue=ve.nextSibling)!==null)break;ve=le,le=ve.parentNode}ve=ue}i=H===-1||$===-1?null:{start:H,end:$}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ch={focusedElem:e,selectionRange:i},Tl=!1,Ht=t;Ht!==null;)if(t=Ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ht=e;else for(;Ht!==null;){switch(t=Ht,_=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&_!==null){e=void 0,i=t,f=_.memoizedProps,_=_.memoizedState,s=i.stateNode;try{var xe=Gn(i.type,f);e=s.getSnapshotBeforeUpdate(xe,_),s.__reactInternalSnapshotBeforeUpdate=e}catch(Be){st(i,i.return,Be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Eh(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Eh(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,Ht=e;break}Ht=t.return}}function Dp(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Li(e,i),s&4&&Ma(5,i);break;case 1:if(Li(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(M){st(i,i.return,M)}else{var f=Gn(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(M){st(i,i.return,M)}}s&64&&wp(i),s&512&&La(i,i.return);break;case 3:if(Li(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{dm(e,t)}catch(M){st(i,i.return,M)}}break;case 27:t===null&&s&4&&Ap(i);case 26:case 5:Li(e,i),t===null&&s&4&&Ep(i),s&512&&La(i,i.return);break;case 12:Li(e,i);break;case 31:Li(e,i),s&4&&Lp(e,i);break;case 13:Li(e,i),s&4&&kp(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Eb.bind(null,i),Vb(e,i))));break;case 22:if(s=i.memoizedState!==null||Oi,!s){t=t!==null&&t.memoizedState!==null||Ot,f=Oi;var _=Ot;Oi=s,(Ot=t)&&!_?ki(e,i,(i.subtreeFlags&8772)!==0):Li(e,i),Oi=f,Ot=_}break;case 30:break;default:Li(e,i)}}function Op(e){var t=e.alternate;t!==null&&(e.alternate=null,Op(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vt=null,ir=!1;function Mi(e,t,i){for(i=i.child;i!==null;)Mp(e,t,i),i=i.sibling}function Mp(e,t,i){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(gi,i)}catch{}switch(i.tag){case 26:Ot||ri(i,t),Mi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ot||ri(i,t);var s=vt,f=ir;fn(i.type)&&(vt=i.stateNode,ir=!1),Mi(e,t,i),Ia(i.stateNode),vt=s,ir=f;break;case 5:Ot||ri(i,t);case 6:if(s=vt,f=ir,vt=null,Mi(e,t,i),vt=s,ir=f,vt!==null)if(ir)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(i.stateNode)}catch(_){st(i,t,_)}else try{vt.removeChild(i.stateNode)}catch(_){st(i,t,_)}break;case 18:vt!==null&&(ir?(e=vt,wv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Fs(e)):wv(vt,i.stateNode));break;case 4:s=vt,f=ir,vt=i.stateNode.containerInfo,ir=!0,Mi(e,t,i),vt=s,ir=f;break;case 0:case 11:case 14:case 15:sn(2,i,t),Ot||sn(4,i,t),Mi(e,t,i);break;case 1:Ot||(ri(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&xp(i,t,s)),Mi(e,t,i);break;case 21:Mi(e,t,i);break;case 22:Ot=(s=Ot)||i.memoizedState!==null,Mi(e,t,i),Ot=s;break;default:Mi(e,t,i)}}function Lp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fs(e)}catch(i){st(t,t.return,i)}}}function kp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fs(e)}catch(i){st(t,t.return,i)}}function gb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tp),t;default:throw Error(l(435,e.tag))}}function ll(e,t){var i=gb(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var f=Rb.bind(null,e,s);s.then(f,f)}})}function nr(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var f=i[s],_=e,M=t,H=M;e:for(;H!==null;){switch(H.tag){case 27:if(fn(H.type)){vt=H.stateNode,ir=!1;break e}break;case 5:vt=H.stateNode,ir=!1;break e;case 3:case 4:vt=H.stateNode.containerInfo,ir=!0;break e}H=H.return}if(vt===null)throw Error(l(160));Mp(_,M,f),vt=null,ir=!1,_=f.alternate,_!==null&&(_.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bp(t,e),t=t.sibling}var Wr=null;function Bp(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nr(t,e),sr(e),s&4&&(sn(3,e,e.return),Ma(3,e),sn(5,e,e.return));break;case 1:nr(t,e),sr(e),s&512&&(Ot||i===null||ri(i,i.return)),s&64&&Oi&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var f=Wr;if(nr(t,e),sr(e),s&512&&(Ot||i===null||ri(i,i.return)),s&4){var _=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":_=f.getElementsByTagName("title")[0],(!_||_[dt]||_[Se]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=f.createElement(s),f.head.insertBefore(_,f.querySelector("head > title"))),Wt(_,s,i),_[Se]=e,ht(_),s=_;break e;case"link":var M=Bv("link","href",f).get(s+(i.href||""));if(M){for(var H=0;H<M.length;H++)if(_=M[H],_.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&_.getAttribute("rel")===(i.rel==null?null:i.rel)&&_.getAttribute("title")===(i.title==null?null:i.title)&&_.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){M.splice(H,1);break t}}_=f.createElement(s),Wt(_,s,i),f.head.appendChild(_);break;case"meta":if(M=Bv("meta","content",f).get(s+(i.content||""))){for(H=0;H<M.length;H++)if(_=M[H],_.getAttribute("content")===(i.content==null?null:""+i.content)&&_.getAttribute("name")===(i.name==null?null:i.name)&&_.getAttribute("property")===(i.property==null?null:i.property)&&_.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&_.getAttribute("charset")===(i.charSet==null?null:i.charSet)){M.splice(H,1);break t}}_=f.createElement(s),Wt(_,s,i),f.head.appendChild(_);break;default:throw Error(l(468,s))}_[Se]=e,ht(_),s=_}e.stateNode=s}else Nv(f,e.type,e.stateNode);else e.stateNode=kv(f,s,e.memoizedProps);else _!==s?(_===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):_.count--,s===null?Nv(f,e.type,e.stateNode):kv(f,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Qu(e,e.memoizedProps,i.memoizedProps)}break;case 27:nr(t,e),sr(e),s&512&&(Ot||i===null||ri(i,i.return)),i!==null&&s&4&&Qu(e,e.memoizedProps,i.memoizedProps);break;case 5:if(nr(t,e),sr(e),s&512&&(Ot||i===null||ri(i,i.return)),e.flags&32){f=e.stateNode;try{hs(f,"")}catch(xe){st(e,e.return,xe)}}s&4&&e.stateNode!=null&&(f=e.memoizedProps,Qu(e,f,i!==null?i.memoizedProps:f)),s&1024&&(eh=!0);break;case 6:if(nr(t,e),sr(e),s&4){if(e.stateNode===null)throw Error(l(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(xe){st(e,e.return,xe)}}break;case 3:if(xl=null,f=Wr,Wr=Cl(t.containerInfo),nr(t,e),Wr=f,sr(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Fs(t.containerInfo)}catch(xe){st(e,e.return,xe)}eh&&(eh=!1,Np(e));break;case 4:s=Wr,Wr=Cl(e.stateNode.containerInfo),nr(t,e),sr(e),Wr=s;break;case 12:nr(t,e),sr(e);break;case 31:nr(t,e),sr(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ll(e,s)));break;case 13:nr(t,e),sr(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ul=ut()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ll(e,s)));break;case 22:f=e.memoizedState!==null;var $=i!==null&&i.memoizedState!==null,ae=Oi,fe=Ot;if(Oi=ae||f,Ot=fe||$,nr(t,e),Ot=fe,Oi=ae,sr(e),s&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||$||Oi||Ot||$n(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){$=i=t;try{if(_=$.stateNode,f)M=_.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{H=$.stateNode;var ve=$.memoizedProps.style,le=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;H.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(xe){st($,$.return,xe)}}}else if(t.tag===6){if(i===null){$=t;try{$.stateNode.nodeValue=f?"":$.memoizedProps}catch(xe){st($,$.return,xe)}}}else if(t.tag===18){if(i===null){$=t;try{var ue=$.stateNode;f?xv(ue,!0):xv($.stateNode,!1)}catch(xe){st($,$.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,ll(e,i))));break;case 19:nr(t,e),sr(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ll(e,s)));break;case 30:break;case 21:break;default:nr(t,e),sr(e)}}function sr(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Rp(s)){i=s;break}s=s.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var f=i.stateNode,_=Zu(e);ol(e,_,f);break;case 5:var M=i.stateNode;i.flags&32&&(hs(M,""),i.flags&=-33);var H=Zu(e);ol(e,H,M);break;case 3:case 4:var $=i.stateNode.containerInfo,ae=Zu(e);Ju(e,ae,$);break;default:throw Error(l(161))}}catch(fe){st(e,e.return,fe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Np(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Np(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Li(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Dp(e,t.alternate,t),t=t.sibling}function $n(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:sn(4,t,t.return),$n(t);break;case 1:ri(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&xp(t,t.return,i),$n(t);break;case 27:Ia(t.stateNode);case 26:case 5:ri(t,t.return),$n(t);break;case 22:t.memoizedState===null&&$n(t);break;case 30:$n(t);break;default:$n(t)}e=e.sibling}}function ki(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,f=e,_=t,M=_.flags;switch(_.tag){case 0:case 11:case 15:ki(f,_,i),Ma(4,_);break;case 1:if(ki(f,_,i),s=_,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(ae){st(s,s.return,ae)}if(s=_,f=s.updateQueue,f!==null){var H=s.stateNode;try{var $=f.shared.hiddenCallbacks;if($!==null)for(f.shared.hiddenCallbacks=null,f=0;f<$.length;f++)fm($[f],H)}catch(ae){st(s,s.return,ae)}}i&&M&64&&wp(_),La(_,_.return);break;case 27:Ap(_);case 26:case 5:ki(f,_,i),i&&s===null&&M&4&&Ep(_),La(_,_.return);break;case 12:ki(f,_,i);break;case 31:ki(f,_,i),i&&M&4&&Lp(f,_);break;case 13:ki(f,_,i),i&&M&4&&kp(f,_);break;case 22:_.memoizedState===null&&ki(f,_,i),La(_,_.return);break;case 30:break;default:ki(f,_,i)}t=t.sibling}}function th(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&_a(i))}function rh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e))}function Vr(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jp(e,t,i,s),t=t.sibling}function jp(e,t,i,s){var f=t.flags;switch(t.tag){case 0:case 11:case 15:Vr(e,t,i,s),f&2048&&Ma(9,t);break;case 1:Vr(e,t,i,s);break;case 3:Vr(e,t,i,s),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e)));break;case 12:if(f&2048){Vr(e,t,i,s),e=t.stateNode;try{var _=t.memoizedProps,M=_.id,H=_.onPostCommit;typeof H=="function"&&H(M,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch($){st(t,t.return,$)}}else Vr(e,t,i,s);break;case 31:Vr(e,t,i,s);break;case 13:Vr(e,t,i,s);break;case 23:break;case 22:_=t.stateNode,M=t.alternate,t.memoizedState!==null?_._visibility&2?Vr(e,t,i,s):ka(e,t):_._visibility&2?Vr(e,t,i,s):(_._visibility|=2,Ms(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),f&2048&&th(M,t);break;case 24:Vr(e,t,i,s),f&2048&&rh(t.alternate,t);break;default:Vr(e,t,i,s)}}function Ms(e,t,i,s,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var _=e,M=t,H=i,$=s,ae=M.flags;switch(M.tag){case 0:case 11:case 15:Ms(_,M,H,$,f),Ma(8,M);break;case 23:break;case 22:var fe=M.stateNode;M.memoizedState!==null?fe._visibility&2?Ms(_,M,H,$,f):ka(_,M):(fe._visibility|=2,Ms(_,M,H,$,f)),f&&ae&2048&&th(M.alternate,M);break;case 24:Ms(_,M,H,$,f),f&&ae&2048&&rh(M.alternate,M);break;default:Ms(_,M,H,$,f)}t=t.sibling}}function ka(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,f=s.flags;switch(s.tag){case 22:ka(i,s),f&2048&&th(s.alternate,s);break;case 24:ka(i,s),f&2048&&rh(s.alternate,s);break;default:ka(i,s)}t=t.sibling}}var Ba=8192;function Ls(e,t,i){if(e.subtreeFlags&Ba)for(e=e.child;e!==null;)Hp(e,t,i),e=e.sibling}function Hp(e,t,i){switch(e.tag){case 26:Ls(e,t,i),e.flags&Ba&&e.memoizedState!==null&&iC(i,Wr,e.memoizedState,e.memoizedProps);break;case 5:Ls(e,t,i);break;case 3:case 4:var s=Wr;Wr=Cl(e.stateNode.containerInfo),Ls(e,t,i),Wr=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Ba,Ba=16777216,Ls(e,t,i),Ba=s):Ls(e,t,i));break;default:Ls(e,t,i)}}function zp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Na(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Ht=s,Up(s,e)}zp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pp(e),e=e.sibling}function Pp(e){switch(e.tag){case 0:case 11:case 15:Na(e),e.flags&2048&&sn(9,e,e.return);break;case 3:Na(e);break;case 12:Na(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cl(e)):Na(e);break;default:Na(e)}}function cl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Ht=s,Up(s,e)}zp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:sn(8,t,t.return),cl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,cl(t));break;default:cl(t)}e=e.sibling}}function Up(e,t){for(;Ht!==null;){var i=Ht;switch(i.tag){case 0:case 11:case 15:sn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:_a(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Ht=s;else e:for(i=e;Ht!==null;){s=Ht;var f=s.sibling,_=s.return;if(Op(s),s===i){Ht=null;break e}if(f!==null){f.return=_,Ht=f;break e}Ht=_}}}var _b={getCacheForType:function(e){var t=Ft(At),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ft(At).controller.signal}},yb=typeof WeakMap=="function"?WeakMap:Map,et=0,ft=null,Fe=null,Ve=0,nt=0,vr=null,an=!1,ks=!1,ih=!1,Bi=0,bt=0,on=0,Yn=0,nh=0,gr=0,Bs=0,ja=null,ar=null,sh=!1,ul=0,Ip=0,hl=1/0,fl=null,ln=null,Lt=0,cn=null,Ns=null,Ni=0,ah=0,oh=null,Fp=null,Ha=0,lh=null;function _r(){return(et&2)!==0&&Ve!==0?Ve&-Ve:q.T!==null?mh():ye()}function qp(){if(gr===0)if((Ve&536870912)===0||$e){var e=Dn;Dn<<=1,(Dn&3932160)===0&&(Dn=262144),gr=e}else gr=536870912;return e=mr.current,e!==null&&(e.flags|=32),gr}function or(e,t,i){(e===ft&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(js(e,0),un(e,Ve,gr,!1)),Gi(e,i),((et&2)===0||e!==ft)&&(e===ft&&((et&2)===0&&(Yn|=i),bt===4&&un(e,Ve,gr,!1)),ii(e))}function Wp(e,t,i){if((et&6)!==0)throw Error(l(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Mn(e,t),f=s?Cb(e,t):uh(e,t,!0),_=s;do{if(f===0){ks&&!s&&un(e,t,0,!1);break}else{if(i=e.current.alternate,_&&!Sb(i)){f=uh(e,t,!1),_=!1;continue}if(f===2){if(_=t,e.errorRecoveryDisabledLanes&_)var M=0;else M=e.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){t=M;e:{var H=e;f=ja;var $=H.current.memoizedState.isDehydrated;if($&&(js(H,M).flags|=256),M=uh(H,M,!1),M!==2){if(ih&&!$){H.errorRecoveryDisabledLanes|=_,Yn|=_,f=4;break e}_=ar,ar=f,_!==null&&(ar===null?ar=_:ar.push.apply(ar,_))}f=M}if(_=!1,f!==2)continue}}if(f===1){js(e,0),un(e,t,0,!0);break}e:{switch(s=e,_=f,_){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:un(s,t,gr,!an);break e;case 2:ar=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(f=ul+300-ut(),10<f)){if(un(s,t,gr,!an),On(s,0,!0)!==0)break e;Ni=t,s.timeoutHandle=bv(Vp.bind(null,s,i,ar,fl,sh,t,gr,Yn,Bs,an,_,"Throttled",-0,0),f);break e}Vp(s,i,ar,fl,sh,t,gr,Yn,Bs,an,_,null,-0,0)}}break}while(!0);ii(e)}function Vp(e,t,i,s,f,_,M,H,$,ae,fe,ve,le,ue){if(e.timeoutHandle=-1,ve=t.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Si},Hp(t,_,ve);var xe=(_&62914560)===_?ul-ut():(_&4194048)===_?Ip-ut():0;if(xe=nC(ve,xe),xe!==null){Ni=_,e.cancelPendingCommit=xe(Jp.bind(null,e,t,_,i,s,f,M,H,$,fe,ve,null,le,ue)),un(e,_,M,!ae);return}}Jp(e,t,_,i,s,f,M,H,$)}function Sb(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var f=i[s],_=f.getSnapshot;f=f.value;try{if(!fr(_(),f))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function un(e,t,i,s){t&=~nh,t&=~Yn,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var f=t;0<f;){var _=31-Yt(f),M=1<<_;s[_]=-1,f&=~M}i!==0&&xo(e,i,t)}function dl(){return(et&6)===0?(za(0),!1):!0}function ch(){if(Fe!==null){if(nt===0)var e=Fe.return;else e=Fe,xi=Un=null,Eu(e),Rs=null,Sa=0,e=Fe;for(;e!==null;)Cp(e.alternate,e),e=e.return;Fe=null}}function js(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Ub(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ni=0,ch(),ft=e,Fe=i=Ci(e.current,null),Ve=t,nt=0,vr=null,an=!1,ks=Mn(e,t),ih=!1,Bs=gr=nh=Yn=on=bt=0,ar=ja=null,sh=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var f=31-Yt(s),_=1<<f;t|=e[f],s&=~_}return Bi=t,Bo(),i}function Kp(e,t){je=null,q.H=Ta,t===Es||t===Fo?(t=lm(),nt=3):t===du?(t=lm(),nt=4):nt=t===Iu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,vr=t,Fe===null&&(bt=1,rl(e,Ar(t,e.current)))}function Gp(){var e=mr.current;return e===null?!0:(Ve&4194048)===Ve?Mr===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?e===Mr:!1}function $p(){var e=q.H;return q.H=Ta,e===null?Ta:e}function Yp(){var e=q.A;return q.A=_b,e}function ml(){bt=4,an||(Ve&4194048)!==Ve&&mr.current!==null||(ks=!0),(on&134217727)===0&&(Yn&134217727)===0||ft===null||un(ft,Ve,gr,!1)}function uh(e,t,i){var s=et;et|=2;var f=$p(),_=Yp();(ft!==e||Ve!==t)&&(fl=null,js(e,t)),t=!1;var M=bt;e:do try{if(nt!==0&&Fe!==null){var H=Fe,$=vr;switch(nt){case 8:ch(),M=6;break e;case 3:case 2:case 9:case 6:mr.current===null&&(t=!0);var ae=nt;if(nt=0,vr=null,Hs(e,H,$,ae),i&&ks){M=0;break e}break;default:ae=nt,nt=0,vr=null,Hs(e,H,$,ae)}}bb(),M=bt;break}catch(fe){Kp(e,fe)}while(!0);return t&&e.shellSuspendCounter++,xi=Un=null,et=s,q.H=f,q.A=_,Fe===null&&(ft=null,Ve=0,Bo()),M}function bb(){for(;Fe!==null;)Xp(Fe)}function Cb(e,t){var i=et;et|=2;var s=$p(),f=Yp();ft!==e||Ve!==t?(fl=null,hl=ut()+500,js(e,t)):ks=Mn(e,t);e:do try{if(nt!==0&&Fe!==null){t=Fe;var _=vr;t:switch(nt){case 1:nt=0,vr=null,Hs(e,t,_,1);break;case 2:case 9:if(am(_)){nt=0,vr=null,Qp(t);break}t=function(){nt!==2&&nt!==9||ft!==e||(nt=7),ii(e)},_.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:am(_)?(nt=0,vr=null,Qp(t)):(nt=0,vr=null,Hs(e,t,_,7));break;case 5:var M=null;switch(Fe.tag){case 26:M=Fe.memoizedState;case 5:case 27:var H=Fe;if(M?jv(M):H.stateNode.complete){nt=0,vr=null;var $=H.sibling;if($!==null)Fe=$;else{var ae=H.return;ae!==null?(Fe=ae,pl(ae)):Fe=null}break t}}nt=0,vr=null,Hs(e,t,_,5);break;case 6:nt=0,vr=null,Hs(e,t,_,6);break;case 8:ch(),bt=6;break e;default:throw Error(l(462))}}wb();break}catch(fe){Kp(e,fe)}while(!0);return xi=Un=null,q.H=s,q.A=f,et=i,Fe!==null?0:(ft=null,Ve=0,Bo(),bt)}function wb(){for(;Fe!==null&&!Wi();)Xp(Fe)}function Xp(e){var t=Sp(e.alternate,e,Bi);e.memoizedProps=e.pendingProps,t===null?pl(e):Fe=t}function Qp(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=mp(i,t,t.pendingProps,t.type,void 0,Ve);break;case 11:t=mp(i,t,t.pendingProps,t.type.render,t.ref,Ve);break;case 5:Eu(t);default:Cp(i,t),t=Fe=Yd(t,Bi),t=Sp(i,t,Bi)}e.memoizedProps=e.pendingProps,t===null?pl(e):Fe=t}function Hs(e,t,i,s){xi=Un=null,Eu(t),Rs=null,Sa=0;var f=t.return;try{if(hb(e,f,t,i,Ve)){bt=1,rl(e,Ar(i,e.current)),Fe=null;return}}catch(_){if(f!==null)throw Fe=f,_;bt=1,rl(e,Ar(i,e.current)),Fe=null;return}t.flags&32768?($e||s===1?e=!0:ks||(Ve&536870912)!==0?e=!1:(an=e=!0,(s===2||s===9||s===3||s===6)&&(s=mr.current,s!==null&&s.tag===13&&(s.flags|=16384))),Zp(t,e)):pl(t)}function pl(e){var t=e;do{if((t.flags&32768)!==0){Zp(t,an);return}e=t.return;var i=mb(t.alternate,t,Bi);if(i!==null){Fe=i;return}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);bt===0&&(bt=5)}function Zp(e,t){do{var i=pb(e.alternate,e);if(i!==null){i.flags&=32767,Fe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Fe=e;return}Fe=e=i}while(e!==null);bt=6,Fe=null}function Jp(e,t,i,s,f,_,M,H,$){e.cancelPendingCommit=null;do vl();while(Lt!==0);if((et&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(_=t.lanes|t.childLanes,_|=Zc,Dc(e,i,_,M,H,$),e===ft&&(Fe=ft=null,Ve=0),Ns=t,cn=e,Ni=i,ah=_,oh=f,Fp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ab(gt,function(){return nv(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null,f=Z.p,Z.p=2,M=et,et|=4;try{vb(e,t,i)}finally{et=M,Z.p=f,q.T=s}}Lt=1,ev(),tv(),rv()}}function ev(){if(Lt===1){Lt=0;var e=cn,t=Ns,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=q.T,q.T=null;var s=Z.p;Z.p=2;var f=et;et|=4;try{Bp(t,e);var _=Ch,M=Ud(e.containerInfo),H=_.focusedElem,$=_.selectionRange;if(M!==H&&H&&H.ownerDocument&&Pd(H.ownerDocument.documentElement,H)){if($!==null&&Gc(H)){var ae=$.start,fe=$.end;if(fe===void 0&&(fe=ae),"selectionStart"in H)H.selectionStart=ae,H.selectionEnd=Math.min(fe,H.value.length);else{var ve=H.ownerDocument||document,le=ve&&ve.defaultView||window;if(le.getSelection){var ue=le.getSelection(),xe=H.textContent.length,Be=Math.min($.start,xe),lt=$.end===void 0?Be:Math.min($.end,xe);!ue.extend&&Be>lt&&(M=lt,lt=Be,Be=M);var te=zd(H,Be),J=zd(H,lt);if(te&&J&&(ue.rangeCount!==1||ue.anchorNode!==te.node||ue.anchorOffset!==te.offset||ue.focusNode!==J.node||ue.focusOffset!==J.offset)){var se=ve.createRange();se.setStart(te.node,te.offset),ue.removeAllRanges(),Be>lt?(ue.addRange(se),ue.extend(J.node,J.offset)):(se.setEnd(J.node,J.offset),ue.addRange(se))}}}}for(ve=[],ue=H;ue=ue.parentNode;)ue.nodeType===1&&ve.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<ve.length;H++){var pe=ve[H];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Tl=!!bh,Ch=bh=null}finally{et=f,Z.p=s,q.T=i}}e.current=t,Lt=2}}function tv(){if(Lt===2){Lt=0;var e=cn,t=Ns,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=q.T,q.T=null;var s=Z.p;Z.p=2;var f=et;et|=4;try{Dp(e,t.alternate,t)}finally{et=f,Z.p=s,q.T=i}}Lt=3}}function rv(){if(Lt===4||Lt===3){Lt=0,Gt();var e=cn,t=Ns,i=Ni,s=Fp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Lt=5:(Lt=0,Ns=cn=null,iv(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ln=null),_e(i),t=t.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(gi,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=q.T,f=Z.p,Z.p=2,q.T=null;try{for(var _=e.onRecoverableError,M=0;M<s.length;M++){var H=s[M];_(H.value,{componentStack:H.stack})}}finally{q.T=t,Z.p=f}}(Ni&3)!==0&&vl(),ii(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===lh?Ha++:(Ha=0,lh=e):Ha=0,za(0)}}function iv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_a(t)))}function vl(){return ev(),tv(),rv(),nv()}function nv(){if(Lt!==5)return!1;var e=cn,t=ah;ah=0;var i=_e(Ni),s=q.T,f=Z.p;try{Z.p=32>i?32:i,q.T=null,i=oh,oh=null;var _=cn,M=Ni;if(Lt=0,Ns=cn=null,Ni=0,(et&6)!==0)throw Error(l(331));var H=et;if(et|=4,Pp(_.current),jp(_,_.current,M,i),et=H,za(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(gi,_)}catch{}return!0}finally{Z.p=f,q.T=s,iv(e,t)}}function sv(e,t,i){t=Ar(i,t),t=Uu(e.stateNode,t,2),e=tn(e,t,2),e!==null&&(Gi(e,2),ii(e))}function st(e,t,i){if(e.tag===3)sv(e,e,i);else for(;t!==null;){if(t.tag===3){sv(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ln===null||!ln.has(s))){e=Ar(i,e),i=ap(2),s=tn(t,i,2),s!==null&&(op(i,s,t,e),Gi(s,2),ii(s));break}}t=t.return}}function hh(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new yb;var f=new Set;s.set(t,f)}else f=s.get(t),f===void 0&&(f=new Set,s.set(t,f));f.has(i)||(ih=!0,f.add(i),e=xb.bind(null,e,t,i),t.then(e,e))}function xb(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ft===e&&(Ve&i)===i&&(bt===4||bt===3&&(Ve&62914560)===Ve&&300>ut()-ul?(et&2)===0&&js(e,0):nh|=i,Bs===Ve&&(Bs=0)),ii(e)}function av(e,t){t===0&&(t=Ln()),e=Hn(e,t),e!==null&&(Gi(e,t),ii(e))}function Eb(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),av(e,i)}function Rb(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(t),av(e,i)}function Ab(e,t){return mi(e,t)}var gl=null,zs=null,fh=!1,_l=!1,dh=!1,hn=0;function ii(e){e!==zs&&e.next===null&&(zs===null?gl=zs=e:zs=zs.next=e),_l=!0,fh||(fh=!0,Db())}function za(e,t){if(!dh&&_l){dh=!0;do for(var i=!1,s=gl;s!==null;){if(e!==0){var f=s.pendingLanes;if(f===0)var _=0;else{var M=s.suspendedLanes,H=s.pingedLanes;_=(1<<31-Yt(42|e)+1)-1,_&=f&~(M&~H),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(i=!0,uv(s,_))}else _=Ve,_=On(s,s===ft?_:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(_&3)===0||Mn(s,_)||(i=!0,uv(s,_));s=s.next}while(i);dh=!1}}function Tb(){ov()}function ov(){_l=fh=!1;var e=0;hn!==0&&Pb()&&(e=hn);for(var t=ut(),i=null,s=gl;s!==null;){var f=s.next,_=lv(s,t);_===0?(s.next=null,i===null?gl=f:i.next=f,f===null&&(zs=i)):(i=s,(e!==0||(_&3)!==0)&&(_l=!0)),s=f}Lt!==0&&Lt!==5||za(e),hn!==0&&(hn=0)}function lv(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,f=e.expirationTimes,_=e.pendingLanes&-62914561;0<_;){var M=31-Yt(_),H=1<<M,$=f[M];$===-1?((H&i)===0||(H&s)!==0)&&(f[M]=wo(H,t)):$<=t&&(e.expiredLanes|=H),_&=~H}if(t=ft,i=Ve,i=On(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pi(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Mn(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&pi(s),_e(i)){case 2:case 8:i=Jr;break;case 32:i=gt;break;case 268435456:i=er;break;default:i=gt}return s=cv.bind(null,e),i=mi(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&pi(s),e.callbackPriority=2,e.callbackNode=null,2}function cv(e,t){if(Lt!==0&&Lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(vl()&&e.callbackNode!==i)return null;var s=Ve;return s=On(e,e===ft?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Wp(e,s,t),lv(e,ut()),e.callbackNode!=null&&e.callbackNode===i?cv.bind(null,e):null)}function uv(e,t){if(vl())return null;Wp(e,t,!0)}function Db(){Ib(function(){(et&6)!==0?mi(Ur,Tb):ov()})}function mh(){if(hn===0){var e=ws;e===0&&(e=_i,_i<<=1,(_i&261888)===0&&(_i=256)),hn=e}return hn}function hv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ro(""+e)}function fv(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function Ob(e,t,i,s,f){if(t==="submit"&&i&&i.stateNode===f){var _=hv((f[be]||null).action),M=s.submitter;M&&(t=(t=M[be]||null)?hv(t.formAction):M.getAttribute("formAction"),t!==null&&(_=t,M=null));var H=new Oo("action","action",null,s,f);e.push({event:H,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(hn!==0){var $=M?fv(f,M):new FormData(f);Bu(i,{pending:!0,data:$,method:f.method,action:_},null,$)}}else typeof _=="function"&&(H.preventDefault(),$=M?fv(f,M):new FormData(f),Bu(i,{pending:!0,data:$,method:f.method,action:_},_,$))},currentTarget:f}]})}}for(var ph=0;ph<Qc.length;ph++){var vh=Qc[ph],Mb=vh.toLowerCase(),Lb=vh[0].toUpperCase()+vh.slice(1);qr(Mb,"on"+Lb)}qr(qd,"onAnimationEnd"),qr(Wd,"onAnimationIteration"),qr(Vd,"onAnimationStart"),qr("dblclick","onDoubleClick"),qr("focusin","onFocus"),qr("focusout","onBlur"),qr($S,"onTransitionRun"),qr(YS,"onTransitionStart"),qr(XS,"onTransitionCancel"),qr(Kd,"onTransitionEnd"),tr("onMouseEnter",["mouseout","mouseover"]),tr("onMouseLeave",["mouseout","mouseover"]),tr("onPointerEnter",["pointerout","pointerover"]),tr("onPointerLeave",["pointerout","pointerover"]),hr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),hr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),hr("onBeforeInput",["compositionend","keypress","textInput","paste"]),hr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),hr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),hr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pa="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(" "),kb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pa));function dv(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],f=s.event;s=s.listeners;e:{var _=void 0;if(t)for(var M=s.length-1;0<=M;M--){var H=s[M],$=H.instance,ae=H.currentTarget;if(H=H.listener,$!==_&&f.isPropagationStopped())break e;_=H,f.currentTarget=ae;try{_(f)}catch(fe){ko(fe)}f.currentTarget=null,_=$}else for(M=0;M<s.length;M++){if(H=s[M],$=H.instance,ae=H.currentTarget,H=H.listener,$!==_&&f.isPropagationStopped())break e;_=H,f.currentTarget=ae;try{_(f)}catch(fe){ko(fe)}f.currentTarget=null,_=$}}}}function qe(e,t){var i=t[Oe];i===void 0&&(i=t[Oe]=new Set);var s=e+"__bubble";i.has(s)||(mv(t,e,2,!1),i.add(s))}function gh(e,t,i){var s=0;t&&(s|=4),mv(i,e,s,t)}var yl="_reactListening"+Math.random().toString(36).slice(2);function _h(e){if(!e[yl]){e[yl]=!0,ur.forEach(function(i){i!=="selectionchange"&&(kb.has(i)||gh(i,!1,e),gh(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yl]||(t[yl]=!0,gh("selectionchange",!1,t))}}function mv(e,t,i,s){switch(qv(t)){case 2:var f=oC;break;case 8:f=lC;break;default:f=kh}i=f.bind(null,t,i,e),f=void 0,!zc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),s?f!==void 0?e.addEventListener(t,i,{capture:!0,passive:f}):e.addEventListener(t,i,!0):f!==void 0?e.addEventListener(t,i,{passive:f}):e.addEventListener(t,i,!1)}function yh(e,t,i,s,f){var _=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var M=s.tag;if(M===3||M===4){var H=s.stateNode.containerInfo;if(H===f)break;if(M===4)for(M=s.return;M!==null;){var $=M.tag;if(($===3||$===4)&&M.stateNode.containerInfo===f)return;M=M.return}for(;H!==null;){if(M=Ye(H),M===null)return;if($=M.tag,$===5||$===6||$===26||$===27){s=_=M;continue e}H=H.parentNode}}s=s.return}yd(function(){var ae=_,fe=jc(i),ve=[];e:{var le=Gd.get(e);if(le!==void 0){var ue=Oo,xe=e;switch(e){case"keypress":if(To(i)===0)break e;case"keydown":case"keyup":ue=RS;break;case"focusin":xe="focus",ue=Fc;break;case"focusout":xe="blur",ue=Fc;break;case"beforeblur":case"afterblur":ue=Fc;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=Cd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=mS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=DS;break;case qd:case Wd:case Vd:ue=gS;break;case Kd:ue=MS;break;case"scroll":case"scrollend":ue=fS;break;case"wheel":ue=kS;break;case"copy":case"cut":case"paste":ue=yS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=xd;break;case"toggle":case"beforetoggle":ue=NS}var Be=(t&4)!==0,lt=!Be&&(e==="scroll"||e==="scrollend"),te=Be?le!==null?le+"Capture":null:le;Be=[];for(var J=ae,se;J!==null;){var pe=J;if(se=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||se===null||te===null||(pe=oa(J,te),pe!=null&&Be.push(Ua(J,pe,se))),lt)break;J=J.return}0<Be.length&&(le=new ue(le,xe,null,i,fe),ve.push({event:le,listeners:Be}))}}if((t&7)===0){e:{if(le=e==="mouseover"||e==="pointerover",ue=e==="mouseout"||e==="pointerout",le&&i!==Nc&&(xe=i.relatedTarget||i.fromElement)&&(Ye(xe)||xe[Te]))break e;if((ue||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,ue?(xe=i.relatedTarget||i.toElement,ue=ae,xe=xe?Ye(xe):null,xe!==null&&(lt=y(xe),Be=xe.tag,xe!==lt||Be!==5&&Be!==27&&Be!==6)&&(xe=null)):(ue=null,xe=ae),ue!==xe)){if(Be=Cd,pe="onMouseLeave",te="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(Be=xd,pe="onPointerLeave",te="onPointerEnter",J="pointer"),lt=ue==null?le:cr(ue),se=xe==null?le:cr(xe),le=new Be(pe,J+"leave",ue,i,fe),le.target=lt,le.relatedTarget=se,pe=null,Ye(fe)===ae&&(Be=new Be(te,J+"enter",xe,i,fe),Be.target=se,Be.relatedTarget=lt,pe=Be),lt=pe,ue&&xe)t:{for(Be=Bb,te=ue,J=xe,se=0,pe=te;pe;pe=Be(pe))se++;pe=0;for(var Le=J;Le;Le=Be(Le))pe++;for(;0<se-pe;)te=Be(te),se--;for(;0<pe-se;)J=Be(J),pe--;for(;se--;){if(te===J||J!==null&&te===J.alternate){Be=te;break t}te=Be(te),J=Be(J)}Be=null}else Be=null;ue!==null&&pv(ve,le,ue,Be,!1),xe!==null&<!==null&&pv(ve,lt,xe,Be,!0)}}e:{if(le=ae?cr(ae):window,ue=le.nodeName&&le.nodeName.toLowerCase(),ue==="select"||ue==="input"&&le.type==="file")var Ze=Ld;else if(Od(le))if(kd)Ze=VS;else{Ze=qS;var Ae=FS}else ue=le.nodeName,!ue||ue.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ae&&Bc(ae.elementType)&&(Ze=Ld):Ze=WS;if(Ze&&(Ze=Ze(e,ae))){Md(ve,Ze,i,fe);break e}Ae&&Ae(e,le,ae),e==="focusout"&&ae&&le.type==="number"&&ae.memoizedProps.value!=null&&kc(le,"number",le.value)}switch(Ae=ae?cr(ae):window,e){case"focusin":(Od(Ae)||Ae.contentEditable==="true")&&(ps=Ae,$c=ae,pa=null);break;case"focusout":pa=$c=ps=null;break;case"mousedown":Yc=!0;break;case"contextmenu":case"mouseup":case"dragend":Yc=!1,Id(ve,i,fe);break;case"selectionchange":if(GS)break;case"keydown":case"keyup":Id(ve,i,fe)}var He;if(Wc)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else ms?Td(e,i)&&(Ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ke="onCompositionStart");Ke&&(Ed&&i.locale!=="ko"&&(ms||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&ms&&(He=Sd()):($i=fe,Pc="value"in $i?$i.value:$i.textContent,ms=!0)),Ae=Sl(ae,Ke),0<Ae.length&&(Ke=new wd(Ke,e,null,i,fe),ve.push({event:Ke,listeners:Ae}),He?Ke.data=He:(He=Dd(i),He!==null&&(Ke.data=He)))),(He=HS?zS(e,i):PS(e,i))&&(Ke=Sl(ae,"onBeforeInput"),0<Ke.length&&(Ae=new wd("onBeforeInput","beforeinput",null,i,fe),ve.push({event:Ae,listeners:Ke}),Ae.data=He)),Ob(ve,e,ae,i,fe)}dv(ve,t)})}function Ua(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Sl(e,t){for(var i=t+"Capture",s=[];e!==null;){var f=e,_=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||_===null||(f=oa(e,i),f!=null&&s.unshift(Ua(e,f,_)),f=oa(e,t),f!=null&&s.push(Ua(e,f,_))),e.tag===3)return s;e=e.return}return[]}function Bb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function pv(e,t,i,s,f){for(var _=t._reactName,M=[];i!==null&&i!==s;){var H=i,$=H.alternate,ae=H.stateNode;if(H=H.tag,$!==null&&$===s)break;H!==5&&H!==26&&H!==27||ae===null||($=ae,f?(ae=oa(i,_),ae!=null&&M.unshift(Ua(i,ae,$))):f||(ae=oa(i,_),ae!=null&&M.push(Ua(i,ae,$)))),i=i.return}M.length!==0&&e.push({event:t,listeners:M})}var Nb=/\r\n?/g,jb=/\u0000|\uFFFD/g;function vv(e){return(typeof e=="string"?e:""+e).replace(Nb,`
|
|
9
|
+
`).replace(jb,"")}function gv(e,t){return t=vv(t),vv(e)===t}function ot(e,t,i,s,f,_){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||hs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&hs(e,""+s);break;case"className":xr(e,"class",s);break;case"tabIndex":xr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":xr(e,i,s);break;case"style":gd(e,s,_);break;case"data":if(t!=="object"){xr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Ro(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"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 _=="function"&&(i==="formAction"?(t!=="input"&&ot(e,t,"name",f.name,f,null),ot(e,t,"formEncType",f.formEncType,f,null),ot(e,t,"formMethod",f.formMethod,f,null),ot(e,t,"formTarget",f.formTarget,f,null)):(ot(e,t,"encType",f.encType,f,null),ot(e,t,"method",f.method,f,null),ot(e,t,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Ro(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Si);break;case"onScroll":s!=null&&qe("scroll",e);break;case"onScrollEnd":s!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(f.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=Ro(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Fr(e,"popover",s);break;case"xlinkActuate":Qe(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Qe(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Qe(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Qe(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Qe(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Qe(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Qe(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Qe(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Qe(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Fr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=uS.get(i)||i,Fr(e,i,s))}}function Sh(e,t,i,s,f,_){switch(i){case"style":gd(e,s,_);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(f.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"children":typeof s=="string"?hs(e,s):(typeof s=="number"||typeof s=="bigint")&&hs(e,""+s);break;case"onScroll":s!=null&&qe("scroll",e);break;case"onScrollEnd":s!=null&&qe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Si);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ls.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),t=i.slice(2,f?i.length-7:void 0),_=e[be]||null,_=_!=null?_[i]:null,typeof _=="function"&&e.removeEventListener(t,_,f),typeof s=="function")){typeof _!="function"&&_!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,f);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Fr(e,i,s)}}}function Wt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var s=!1,f=!1,_;for(_ in i)if(i.hasOwnProperty(_)){var M=i[_];if(M!=null)switch(_){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:ot(e,t,_,M,i,null)}}f&&ot(e,t,"srcSet",i.srcSet,i,null),s&&ot(e,t,"src",i.src,i,null);return;case"input":qe("invalid",e);var H=_=M=f=null,$=null,ae=null;for(s in i)if(i.hasOwnProperty(s)){var fe=i[s];if(fe!=null)switch(s){case"name":f=fe;break;case"type":M=fe;break;case"checked":$=fe;break;case"defaultChecked":ae=fe;break;case"value":_=fe;break;case"defaultValue":H=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(l(137,t));break;default:ot(e,t,s,fe,i,null)}}dd(e,_,H,$,ae,M,f,!1);return;case"select":qe("invalid",e),s=M=_=null;for(f in i)if(i.hasOwnProperty(f)&&(H=i[f],H!=null))switch(f){case"value":_=H;break;case"defaultValue":M=H;break;case"multiple":s=H;default:ot(e,t,f,H,i,null)}t=_,i=M,e.multiple=!!s,t!=null?us(e,!!s,t,!1):i!=null&&us(e,!!s,i,!0);return;case"textarea":qe("invalid",e),_=f=s=null;for(M in i)if(i.hasOwnProperty(M)&&(H=i[M],H!=null))switch(M){case"value":s=H;break;case"defaultValue":f=H;break;case"children":_=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(l(91));break;default:ot(e,t,M,H,i,null)}pd(e,s,f,_);return;case"option":for($ in i)if(i.hasOwnProperty($)&&(s=i[$],s!=null))switch($){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ot(e,t,$,s,i,null)}return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(s=0;s<Pa.length;s++)qe(Pa[s],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in i)if(i.hasOwnProperty(ae)&&(s=i[ae],s!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:ot(e,t,ae,s,i,null)}return;default:if(Bc(t)){for(fe in i)i.hasOwnProperty(fe)&&(s=i[fe],s!==void 0&&Sh(e,t,fe,s,i,void 0));return}}for(H in i)i.hasOwnProperty(H)&&(s=i[H],s!=null&&ot(e,t,H,s,i,null))}function Hb(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,_=null,M=null,H=null,$=null,ae=null,fe=null;for(ue in i){var ve=i[ue];if(i.hasOwnProperty(ue)&&ve!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":$=ve;default:s.hasOwnProperty(ue)||ot(e,t,ue,null,s,ve)}}for(var le in s){var ue=s[le];if(ve=i[le],s.hasOwnProperty(le)&&(ue!=null||ve!=null))switch(le){case"type":_=ue;break;case"name":f=ue;break;case"checked":ae=ue;break;case"defaultChecked":fe=ue;break;case"value":M=ue;break;case"defaultValue":H=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(l(137,t));break;default:ue!==ve&&ot(e,t,le,ue,s,ve)}}Lc(e,M,H,$,ae,fe,_,f);return;case"select":ue=M=H=le=null;for(_ in i)if($=i[_],i.hasOwnProperty(_)&&$!=null)switch(_){case"value":break;case"multiple":ue=$;default:s.hasOwnProperty(_)||ot(e,t,_,null,s,$)}for(f in s)if(_=s[f],$=i[f],s.hasOwnProperty(f)&&(_!=null||$!=null))switch(f){case"value":le=_;break;case"defaultValue":H=_;break;case"multiple":M=_;default:_!==$&&ot(e,t,f,_,s,$)}t=H,i=M,s=ue,le!=null?us(e,!!i,le,!1):!!s!=!!i&&(t!=null?us(e,!!i,t,!0):us(e,!!i,i?[]:"",!1));return;case"textarea":ue=le=null;for(H in i)if(f=i[H],i.hasOwnProperty(H)&&f!=null&&!s.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:ot(e,t,H,null,s,f)}for(M in s)if(f=s[M],_=i[M],s.hasOwnProperty(M)&&(f!=null||_!=null))switch(M){case"value":le=f;break;case"defaultValue":ue=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==_&&ot(e,t,M,f,s,_)}md(e,le,ue);return;case"option":for(var xe in i)if(le=i[xe],i.hasOwnProperty(xe)&&le!=null&&!s.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:ot(e,t,xe,null,s,le)}for($ in s)if(le=s[$],ue=i[$],s.hasOwnProperty($)&&le!==ue&&(le!=null||ue!=null))switch($){case"selected":e.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:ot(e,t,$,le,s,ue)}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 Be in i)le=i[Be],i.hasOwnProperty(Be)&&le!=null&&!s.hasOwnProperty(Be)&&ot(e,t,Be,null,s,le);for(ae in s)if(le=s[ae],ue=i[ae],s.hasOwnProperty(ae)&&le!==ue&&(le!=null||ue!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(l(137,t));break;default:ot(e,t,ae,le,s,ue)}return;default:if(Bc(t)){for(var lt in i)le=i[lt],i.hasOwnProperty(lt)&&le!==void 0&&!s.hasOwnProperty(lt)&&Sh(e,t,lt,void 0,s,le);for(fe in s)le=s[fe],ue=i[fe],!s.hasOwnProperty(fe)||le===ue||le===void 0&&ue===void 0||Sh(e,t,fe,le,s,ue);return}}for(var te in i)le=i[te],i.hasOwnProperty(te)&&le!=null&&!s.hasOwnProperty(te)&&ot(e,t,te,null,s,le);for(ve in s)le=s[ve],ue=i[ve],!s.hasOwnProperty(ve)||le===ue||le==null&&ue==null||ot(e,t,ve,le,s,ue)}function _v(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var f=i[s],_=f.transferSize,M=f.initiatorType,H=f.duration;if(_&&H&&_v(M)){for(M=0,H=f.responseEnd,s+=1;s<i.length;s++){var $=i[s],ae=$.startTime;if(ae>H)break;var fe=$.transferSize,ve=$.initiatorType;fe&&_v(ve)&&($=$.responseEnd,M+=fe*($<H?1:(H-ae)/($-ae)))}if(--s,t+=8*(_+M)/(f.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var bh=null,Ch=null;function bl(e){return e.nodeType===9?e:e.ownerDocument}function yv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Sv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function wh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xh=null;function Pb(){var e=window.event;return e&&e.type==="popstate"?e===xh?!1:(xh=e,!0):(xh=null,!1)}var bv=typeof setTimeout=="function"?setTimeout:void 0,Ub=typeof clearTimeout=="function"?clearTimeout:void 0,Cv=typeof Promise=="function"?Promise:void 0,Ib=typeof queueMicrotask=="function"?queueMicrotask:typeof Cv<"u"?function(e){return Cv.resolve(null).then(e).catch(Fb)}:bv;function Fb(e){setTimeout(function(){throw e})}function fn(e){return e==="head"}function wv(e,t){var i=t,s=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(f),Fs(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Ia(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ia(i);for(var _=i.firstChild;_;){var M=_.nextSibling,H=_.nodeName;_[dt]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&_.rel.toLowerCase()==="stylesheet"||i.removeChild(_),_=M}}else i==="body"&&Ia(e.ownerDocument.body);i=f}while(i);Fs(t)}function xv(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Eh(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Eh(i),yt(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function qb(e,t,i,s){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[dt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(_=e.getAttribute("rel"),_==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(_!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(_=e.getAttribute("src"),(_!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&_&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var _=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===_)return e}else return e;if(e=Lr(e.nextSibling),e===null)break}return null}function Wb(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Lr(e.nextSibling),e===null))return null;return e}function Ev(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Lr(e.nextSibling),e===null))return null;return e}function Rh(e){return e.data==="$?"||e.data==="$~"}function Ah(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Vb(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Lr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Th=null;function Rv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Lr(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Av(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Tv(e,t,i){switch(t=bl(i),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Ia(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var kr=new Map,Dv=new Set;function Cl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ji=Z.d;Z.d={f:Kb,r:Gb,D:$b,C:Yb,L:Xb,m:Qb,X:Jb,S:Zb,M:eC};function Kb(){var e=ji.f(),t=dl();return e||t}function Gb(e){var t=Xe(e);t!==null&&t.tag===5&&t.type==="form"?Km(t):ji.r(e)}var Ps=typeof document>"u"?null:document;function Ov(e,t,i){var s=Ps;if(s&&typeof t=="string"&&t){var f=Er(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),Dv.has(f)||(Dv.add(f),e={rel:e,crossOrigin:i,href:t},s.querySelector(f)===null&&(t=s.createElement("link"),Wt(t,"link",e),ht(t),s.head.appendChild(t)))}}function $b(e){ji.D(e),Ov("dns-prefetch",e,null)}function Yb(e,t){ji.C(e,t),Ov("preconnect",e,t)}function Xb(e,t,i){ji.L(e,t,i);var s=Ps;if(s&&e&&t){var f='link[rel="preload"][as="'+Er(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Er(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Er(i.imageSizes)+'"]')):f+='[href="'+Er(e)+'"]';var _=f;switch(t){case"style":_=Us(e);break;case"script":_=Is(e)}kr.has(_)||(e=v({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),kr.set(_,e),s.querySelector(f)!==null||t==="style"&&s.querySelector(Fa(_))||t==="script"&&s.querySelector(qa(_))||(t=s.createElement("link"),Wt(t,"link",e),ht(t),s.head.appendChild(t)))}}function Qb(e,t){ji.m(e,t);var i=Ps;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+Er(s)+'"][href="'+Er(e)+'"]',_=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Is(e)}if(!kr.has(_)&&(e=v({rel:"modulepreload",href:e},t),kr.set(_,e),i.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(qa(_)))return}s=i.createElement("link"),Wt(s,"link",e),ht(s),i.head.appendChild(s)}}}function Zb(e,t,i){ji.S(e,t,i);var s=Ps;if(s&&e){var f=wr(s).hoistableStyles,_=Us(e);t=t||"default";var M=f.get(_);if(!M){var H={loading:0,preload:null};if(M=s.querySelector(Fa(_)))H.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},i),(i=kr.get(_))&&Dh(e,i);var $=M=s.createElement("link");ht($),Wt($,"link",e),$._p=new Promise(function(ae,fe){$.onload=ae,$.onerror=fe}),$.addEventListener("load",function(){H.loading|=1}),$.addEventListener("error",function(){H.loading|=2}),H.loading|=4,wl(M,t,s)}M={type:"stylesheet",instance:M,count:1,state:H},f.set(_,M)}}}function Jb(e,t){ji.X(e,t);var i=Ps;if(i&&e){var s=wr(i).hoistableScripts,f=Is(e),_=s.get(f);_||(_=i.querySelector(qa(f)),_||(e=v({src:e,async:!0},t),(t=kr.get(f))&&Oh(e,t),_=i.createElement("script"),ht(_),Wt(_,"link",e),i.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},s.set(f,_))}}function eC(e,t){ji.M(e,t);var i=Ps;if(i&&e){var s=wr(i).hoistableScripts,f=Is(e),_=s.get(f);_||(_=i.querySelector(qa(f)),_||(e=v({src:e,async:!0,type:"module"},t),(t=kr.get(f))&&Oh(e,t),_=i.createElement("script"),ht(_),Wt(_,"link",e),i.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},s.set(f,_))}}function Mv(e,t,i,s){var f=(f=G.current)?Cl(f):null;if(!f)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Us(i.href),i=wr(f).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Us(i.href);var _=wr(f).hoistableStyles,M=_.get(e);if(M||(f=f.ownerDocument||f,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(e,M),(_=f.querySelector(Fa(e)))&&!_._p&&(M.instance=_,M.state.loading=5),kr.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},kr.set(e,i),_||tC(f,e,i,M.state))),t&&s===null)throw Error(l(528,""));return M}if(t&&s!==null)throw Error(l(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Is(i),i=wr(f).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Us(e){return'href="'+Er(e)+'"'}function Fa(e){return'link[rel="stylesheet"]['+e+"]"}function Lv(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function tC(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Wt(t,"link",i),ht(t),e.head.appendChild(t))}function Is(e){return'[src="'+Er(e)+'"]'}function qa(e){return"script[async]"+e}function kv(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Er(i.href)+'"]');if(s)return t.instance=s,ht(s),s;var f=v({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ht(s),Wt(s,"style",f),wl(s,i.precedence,e),t.instance=s;case"stylesheet":f=Us(i.href);var _=e.querySelector(Fa(f));if(_)return t.state.loading|=4,t.instance=_,ht(_),_;s=Lv(i),(f=kr.get(f))&&Dh(s,f),_=(e.ownerDocument||e).createElement("link"),ht(_);var M=_;return M._p=new Promise(function(H,$){M.onload=H,M.onerror=$}),Wt(_,"link",s),t.state.loading|=4,wl(_,i.precedence,e),t.instance=_;case"script":return _=Is(i.src),(f=e.querySelector(qa(_)))?(t.instance=f,ht(f),f):(s=i,(f=kr.get(_))&&(s=v({},i),Oh(s,f)),e=e.ownerDocument||e,f=e.createElement("script"),ht(f),Wt(f,"link",s),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,wl(s,i.precedence,e));return t.instance}function wl(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,_=f,M=0;M<s.length;M++){var H=s[M];if(H.dataset.precedence===t)_=H;else if(_!==f)break}_?_.parentNode.insertBefore(e,_.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Dh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Oh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xl=null;function Bv(e,t,i){if(xl===null){var s=new Map,f=xl=new Map;f.set(i,s)}else f=xl,s=f.get(i),s||(s=new Map,f.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var _=i[f];if(!(_[dt]||_[Se]||e==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var M=_.getAttribute(t)||"";M=e+M;var H=s.get(M);H?H.push(_):s.set(M,[_])}}return s}function Nv(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function rC(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function jv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function iC(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=Us(s.href),_=t.querySelector(Fa(f));if(_){t=_._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=El.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=_,ht(_);return}_=t.ownerDocument||t,s=Lv(s),(f=kr.get(f))&&Dh(s,f),_=_.createElement("link"),ht(_);var M=_;M._p=new Promise(function(H,$){M.onload=H,M.onerror=$}),Wt(_,"link",s),i.instance=_}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=El.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Mh=0;function nC(e,t){return e.stylesheets&&e.count===0&&Al(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Al(e,e.stylesheets),e.unsuspend){var _=e.unsuspend;e.unsuspend=null,_()}},6e4+t);0<e.imgBytes&&Mh===0&&(Mh=62500*zb());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Al(e,e.stylesheets),e.unsuspend)){var _=e.unsuspend;e.unsuspend=null,_()}},(e.imgBytes>Mh?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function El(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Al(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rl=null;function Al(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rl=new Map,t.forEach(sC,e),Rl=null,El.call(e))}function sC(e,t){if(!(t.state.loading&4)){var i=Rl.get(e);if(i)var s=i.get(null);else{i=new Map,Rl.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<f.length;_++){var M=f[_];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(i.set(M.dataset.precedence,M),s=M)}s&&i.set(null,s)}f=t.instance,M=f.getAttribute("data-precedence"),_=i.get(M)||s,_===s&&i.set(null,f),i.set(M,f),this.count++,s=El.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),_?_.parentNode.insertBefore(f,_.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var Wa={$$typeof:g,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function aC(e,t,i,s,f,_,M,H,$){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ki(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ki(0),this.hiddenUpdates=Ki(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=_,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function Hv(e,t,i,s,f,_,M,H,$,ae,fe,ve){return e=new aC(e,t,i,M,$,ae,fe,ve,H),t=1,_===!0&&(t|=24),_=dr(3,null,null,t),e.current=_,_.stateNode=e,t=uu(),t.refCount++,e.pooledCache=t,t.refCount++,_.memoizedState={element:s,isDehydrated:i,cache:t},mu(_),e}function zv(e){return e?(e=_s,e):_s}function Pv(e,t,i,s,f,_){f=zv(f),s.context===null?s.context=f:s.pendingContext=f,s=en(t),s.payload={element:i},_=_===void 0?null:_,_!==null&&(s.callback=_),i=tn(e,s,t),i!==null&&(or(i,e,t),Ca(i,e,t))}function Uv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Lh(e,t){Uv(e,t),(e=e.alternate)&&Uv(e,t)}function Iv(e){if(e.tag===13||e.tag===31){var t=Hn(e,67108864);t!==null&&or(t,e,67108864),Lh(e,67108864)}}function Fv(e){if(e.tag===13||e.tag===31){var t=_r();t=ce(t);var i=Hn(e,t);i!==null&&or(i,e,t),Lh(e,t)}}var Tl=!0;function oC(e,t,i,s){var f=q.T;q.T=null;var _=Z.p;try{Z.p=2,kh(e,t,i,s)}finally{Z.p=_,q.T=f}}function lC(e,t,i,s){var f=q.T;q.T=null;var _=Z.p;try{Z.p=8,kh(e,t,i,s)}finally{Z.p=_,q.T=f}}function kh(e,t,i,s){if(Tl){var f=Bh(s);if(f===null)yh(e,t,s,Dl,i),Wv(e,s);else if(uC(f,e,t,i,s))s.stopPropagation();else if(Wv(e,s),t&4&&-1<cC.indexOf(e)){for(;f!==null;){var _=Xe(f);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var M=yi(_.pendingLanes);if(M!==0){var H=_;for(H.pendingLanes|=2,H.entangledLanes|=2;M;){var $=1<<31-Yt(M);H.entanglements[1]|=$,M&=~$}ii(_),(et&6)===0&&(hl=ut()+500,za(0))}}break;case 31:case 13:H=Hn(_,2),H!==null&&or(H,_,2),dl(),Lh(_,2)}if(_=Bh(s),_===null&&yh(e,t,s,Dl,i),_===f)break;f=_}f!==null&&s.stopPropagation()}else yh(e,t,s,null,i)}}function Bh(e){return e=jc(e),Nh(e)}var Dl=null;function Nh(e){if(Dl=null,e=Ye(e),e!==null){var t=y(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=S(t),e!==null)return e;e=null}else if(i===31){if(e=o(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dl=e,null}function qv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Nt()){case Ur:return 2;case Jr:return 8;case gt:case $t:return 32;case er:return 268435456;default:return 32}default:return 32}}var jh=!1,dn=null,mn=null,pn=null,Va=new Map,Ka=new Map,vn=[],cC="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 Wv(e,t){switch(e){case"focusin":case"focusout":dn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":Va.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ka.delete(t.pointerId)}}function Ga(e,t,i,s,f,_){return e===null||e.nativeEvent!==_?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:_,targetContainers:[f]},t!==null&&(t=Xe(t),t!==null&&Iv(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function uC(e,t,i,s,f){switch(t){case"focusin":return dn=Ga(dn,e,t,i,s,f),!0;case"dragenter":return mn=Ga(mn,e,t,i,s,f),!0;case"mouseover":return pn=Ga(pn,e,t,i,s,f),!0;case"pointerover":var _=f.pointerId;return Va.set(_,Ga(Va.get(_)||null,e,t,i,s,f)),!0;case"gotpointercapture":return _=f.pointerId,Ka.set(_,Ga(Ka.get(_)||null,e,t,i,s,f)),!0}return!1}function Vv(e){var t=Ye(e.target);if(t!==null){var i=y(t);if(i!==null){if(t=i.tag,t===13){if(t=S(i),t!==null){e.blockedOn=t,De(e.priority,function(){Fv(i)});return}}else if(t===31){if(t=o(i),t!==null){e.blockedOn=t,De(e.priority,function(){Fv(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ol(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Bh(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Nc=s,i.target.dispatchEvent(s),Nc=null}else return t=Xe(i),t!==null&&Iv(t),e.blockedOn=i,!1;t.shift()}return!0}function Kv(e,t,i){Ol(e)&&i.delete(t)}function hC(){jh=!1,dn!==null&&Ol(dn)&&(dn=null),mn!==null&&Ol(mn)&&(mn=null),pn!==null&&Ol(pn)&&(pn=null),Va.forEach(Kv),Ka.forEach(Kv)}function Ml(e,t){e.blockedOn===t&&(e.blockedOn=null,jh||(jh=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,hC)))}var Ll=null;function Gv(e){Ll!==e&&(Ll=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Ll===e&&(Ll=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],f=e[t+2];if(typeof s!="function"){if(Nh(s||i)===null)continue;break}var _=Xe(i);_!==null&&(e.splice(t,3),t-=3,Bu(_,{pending:!0,data:f,method:i.method,action:s},s,f))}}))}function Fs(e){function t($){return Ml($,e)}dn!==null&&Ml(dn,e),mn!==null&&Ml(mn,e),pn!==null&&Ml(pn,e),Va.forEach(t),Ka.forEach(t);for(var i=0;i<vn.length;i++){var s=vn[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<vn.length&&(i=vn[0],i.blockedOn===null);)Vv(i),i.blockedOn===null&&vn.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var f=i[s],_=i[s+1],M=f[be]||null;if(typeof _=="function")M||Gv(i);else if(M){var H=null;if(_&&_.hasAttribute("formAction")){if(f=_,M=_[be]||null)H=M.formAction;else if(Nh(f)!==null)continue}else H=M.action;typeof H=="function"?i[s+1]=H:(i.splice(s,3),s-=3),Gv(i)}}}function $v(){function e(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(M){return f=M})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Hh(e){this._internalRoot=e}kl.prototype.render=Hh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var i=t.current,s=_r();Pv(i,s,e,t,null,null)},kl.prototype.unmount=Hh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pv(e.current,2,null,e,null,null),dl(),t[Te]=null}};function kl(e){this._internalRoot=e}kl.prototype.unstable_scheduleHydration=function(e){if(e){var t=ye();e={blockedOn:null,target:e,priority:t};for(var i=0;i<vn.length&&t!==0&&t<vn[i].priority;i++);vn.splice(i,0,e),i===0&&Vv(e)}};var Yv=n.version;if(Yv!=="19.2.3")throw Error(l(527,Yv,"19.2.3"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=u(t),e=e!==null?C(e):null,e=e===null?null:e.stateNode,e};var fC={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bl.isDisabled&&Bl.supportsFiber)try{gi=Bl.inject(fC),_t=Bl}catch{}}return Ya.createRoot=function(e,t){if(!d(e))throw Error(l(299));var i=!1,s="",f=rp,_=ip,M=np;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(_=t.onCaughtError),t.onRecoverableError!==void 0&&(M=t.onRecoverableError)),t=Hv(e,1,!1,null,null,i,s,null,f,_,M,$v),e[Te]=t.current,_h(e),new Hh(t)},Ya.hydrateRoot=function(e,t,i){if(!d(e))throw Error(l(299));var s=!1,f="",_=rp,M=ip,H=np,$=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(_=i.onUncaughtError),i.onCaughtError!==void 0&&(M=i.onCaughtError),i.onRecoverableError!==void 0&&(H=i.onRecoverableError),i.formState!==void 0&&($=i.formState)),t=Hv(e,1,!0,t,i??null,s,f,$,_,M,H,$v),t.context=zv(null),i=t.current,s=_r(),s=ce(s),f=en(s),f.callback=null,tn(i,f,s),i=s,t.current.lanes=i,Gi(t,i),ii(t),e[Te]=t.current,_h(e),new kl(t)},Ya.version="19.2.3",Ya}var sg;function CC(){if(sg)return Uh.exports;sg=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}return r(),Uh.exports=bC(),Uh.exports}var wC=CC();const xC=Lf(wC);var Js=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},EC={setTimeout:(r,n)=>setTimeout(r,n),clearTimeout:r=>clearTimeout(r),setInterval:(r,n)=>setInterval(r,n),clearInterval:r=>clearInterval(r)},RC=class{#e=EC;#t=!1;setTimeoutProvider(r){this.#e=r}setTimeout(r,n){return this.#e.setTimeout(r,n)}clearTimeout(r){this.#e.clearTimeout(r)}setInterval(r,n){return this.#e.setInterval(r,n)}clearInterval(r){this.#e.clearInterval(r)}},Qn=new RC;function AC(r){setTimeout(r,0)}var Jn=typeof window>"u"||"Deno"in globalThis;function Zt(){}function TC(r,n){return typeof r=="function"?r(n):r}function cf(r){return typeof r=="number"&&r>=0&&r!==1/0}function N_(r,n){return Math.max(r+(n||0)-Date.now(),0)}function wn(r,n){return typeof r=="function"?r(n):r}function Nr(r,n){return typeof r=="function"?r(n):r}function ag(r,n){const{type:a="all",exact:l,fetchStatus:d,predicate:y,queryKey:S,stale:o}=r;if(S){if(l){if(n.queryHash!==Bf(S,n.options))return!1}else if(!so(n.queryKey,S))return!1}if(a!=="all"){const c=n.isActive();if(a==="active"&&!c||a==="inactive"&&c)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||d&&d!==n.state.fetchStatus||y&&!y(n))}function og(r,n){const{exact:a,status:l,predicate:d,mutationKey:y}=r;if(y){if(!n.options.mutationKey)return!1;if(a){if(es(n.options.mutationKey)!==es(y))return!1}else if(!so(n.options.mutationKey,y))return!1}return!(l&&n.state.status!==l||d&&!d(n))}function Bf(r,n){return(n?.queryKeyHashFn||es)(r)}function es(r){return JSON.stringify(r,(n,a)=>uf(a)?Object.keys(a).sort().reduce((l,d)=>(l[d]=a[d],l),{}):a)}function so(r,n){return r===n?!0:typeof r!=typeof n?!1:r&&n&&typeof r=="object"&&typeof n=="object"?Object.keys(n).every(a=>so(r[a],n[a])):!1}var DC=Object.prototype.hasOwnProperty;function j_(r,n){if(r===n)return r;const a=lg(r)&&lg(n);if(!a&&!(uf(r)&&uf(n)))return n;const d=(a?r:Object.keys(r)).length,y=a?n:Object.keys(n),S=y.length,o=a?new Array(S):{};let c=0;for(let u=0;u<S;u++){const C=a?u:y[u],v=r[C],w=n[C];if(v===w){o[C]=v,(a?u<d:DC.call(r,C))&&c++;continue}if(v===null||w===null||typeof v!="object"||typeof w!="object"){o[C]=w;continue}const x=j_(v,w);o[C]=x,x===v&&c++}return d===S&&c===d?r:o}function tc(r,n){if(!n||Object.keys(r).length!==Object.keys(n).length)return!1;for(const a in r)if(r[a]!==n[a])return!1;return!0}function lg(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function uf(r){if(!cg(r))return!1;const n=r.constructor;if(n===void 0)return!0;const a=n.prototype;return!(!cg(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function cg(r){return Object.prototype.toString.call(r)==="[object Object]"}function OC(r){return new Promise(n=>{Qn.setTimeout(n,r)})}function hf(r,n,a){return typeof a.structuralSharing=="function"?a.structuralSharing(r,n):a.structuralSharing!==!1?j_(r,n):n}function MC(r,n,a=0){const l=[...r,n];return a&&l.length>a?l.slice(1):l}function LC(r,n,a=0){const l=[n,...r];return a&&l.length>a?l.slice(0,-1):l}var Nf=Symbol();function H_(r,n){return!r.queryFn&&n?.initialPromise?()=>n.initialPromise:!r.queryFn||r.queryFn===Nf?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function z_(r,n){return typeof r=="function"?r(...n):!!r}var kC=class extends Js{#e;#t;#r;constructor(){super(),this.#r=r=>{if(!Jn&&window.addEventListener){const n=()=>r();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(r){this.#r=r,this.#t?.(),this.#t=r(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(r){this.#e!==r&&(this.#e=r,this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(n=>{n(r)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},jf=new kC;function ff(){let r,n;const a=new Promise((d,y)=>{r=d,n=y});a.status="pending",a.catch(()=>{});function l(d){Object.assign(a,d),delete a.resolve,delete a.reject}return a.resolve=d=>{l({status:"fulfilled",value:d}),r(d)},a.reject=d=>{l({status:"rejected",reason:d}),n(d)},a}var BC=AC;function NC(){let r=[],n=0,a=o=>{o()},l=o=>{o()},d=BC;const y=o=>{n?r.push(o):d(()=>{a(o)})},S=()=>{const o=r;r=[],o.length&&d(()=>{l(()=>{o.forEach(c=>{a(c)})})})};return{batch:o=>{let c;n++;try{c=o()}finally{n--,n||S()}return c},batchCalls:o=>(...c)=>{y(()=>{o(...c)})},schedule:y,setNotifyFunction:o=>{a=o},setBatchNotifyFunction:o=>{l=o},setScheduler:o=>{d=o}}}var Bt=NC(),jC=class extends Js{#e=!0;#t;#r;constructor(){super(),this.#r=r=>{if(!Jn&&window.addEventListener){const n=()=>r(!0),a=()=>r(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(r){this.#r=r,this.#t?.(),this.#t=r(this.setOnline.bind(this))}setOnline(r){this.#e!==r&&(this.#e=r,this.listeners.forEach(a=>{a(r)}))}isOnline(){return this.#e}},rc=new jC;function HC(r){return Math.min(1e3*2**r,3e4)}function P_(r){return(r??"online")==="online"?rc.isOnline():!0}var df=class extends Error{constructor(r){super("CancelledError"),this.revert=r?.revert,this.silent=r?.silent}};function U_(r){let n=!1,a=0,l;const d=ff(),y=()=>d.status!=="pending",S=b=>{if(!y()){const h=new df(b);w(h),r.onCancel?.(h)}},o=()=>{n=!0},c=()=>{n=!1},u=()=>jf.isFocused()&&(r.networkMode==="always"||rc.isOnline())&&r.canRun(),C=()=>P_(r.networkMode)&&r.canRun(),v=b=>{y()||(l?.(),d.resolve(b))},w=b=>{y()||(l?.(),d.reject(b))},x=()=>new Promise(b=>{l=h=>{(y()||u())&&b(h)},r.onPause?.()}).then(()=>{l=void 0,y()||r.onContinue?.()}),R=()=>{if(y())return;let b;const h=a===0?r.initialPromise:void 0;try{b=h??r.fn()}catch(m){b=Promise.reject(m)}Promise.resolve(b).then(v).catch(m=>{if(y())return;const p=r.retry??(Jn?0:3),g=r.retryDelay??HC,A=typeof g=="function"?g(a,m):g,D=p===!0||typeof p=="number"&&a<p||typeof p=="function"&&p(a,m);if(n||!D){w(m);return}a++,r.onFail?.(a,m),OC(A).then(()=>u()?void 0:x()).then(()=>{n?w(m):R()})})};return{promise:d,status:()=>d.status,cancel:S,continue:()=>(l?.(),d),cancelRetry:o,continueRetry:c,canStart:C,start:()=>(C()?R():x().then(R),d)}}var I_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cf(this.gcTime)&&(this.#e=Qn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Jn?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Qn.clearTimeout(this.#e),this.#e=void 0)}},zC=class extends I_{#e;#t;#r;#n;#i;#a;#o;constructor(r){super(),this.#o=!1,this.#a=r.defaultOptions,this.setOptions(r.options),this.observers=[],this.#n=r.client,this.#r=this.#n.getQueryCache(),this.queryKey=r.queryKey,this.queryHash=r.queryHash,this.#e=hg(this.options),this.state=r.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(r){if(this.options={...this.#a,...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=hg(this.options);n.data!==void 0&&(this.setState(ug(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(r,n){const a=hf(this.state.data,r,this.options);return this.#s({data:a,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),a}setState(r,n){this.#s({type:"setState",state:r,setStateOptions:n})}cancel(r){const n=this.#i?.promise;return this.#i?.cancel(r),n?n.then(Zt).catch(Zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(r=>Nr(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>wn(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!N_(this.state.dataUpdatedAt,r)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(n=>n!==r),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(r,n){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(r&&this.setOptions(r),!this.options.queryFn){const o=this.observers.find(c=>c.options.queryFn);o&&this.setOptions(o.options)}const a=new AbortController,l=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#o=!0,a.signal)})},d=()=>{const o=H_(this.options,n),u=(()=>{const C={client:this.#n,queryKey:this.queryKey,meta:this.meta};return l(C),C})();return this.#o=!1,this.options.persister?this.options.persister(o,u,this):o(u)},S=(()=>{const o={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:d};return l(o),o})();this.options.behavior?.onFetch(S,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==S.fetchOptions?.meta)&&this.#s({type:"fetch",meta:S.fetchOptions?.meta}),this.#i=U_({initialPromise:n?.initialPromise,fn:S.fetchFn,onCancel:o=>{o instanceof df&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),a.abort()},onFail:(o,c)=>{this.#s({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:S.options.retry,retryDelay:S.options.retryDelay,networkMode:S.options.networkMode,canRun:()=>!0});try{const o=await this.#i.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#r.config.onSuccess?.(o,this),this.#r.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof df){if(o.silent)return this.#i.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#s({type:"error",error:o}),this.#r.config.onError?.(o,this),this.#r.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#s(r){const n=a=>{switch(r.type){case"failed":return{...a,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...F_(a.data,this.options),fetchMeta:r.meta??null};case"success":const l={...a,...ug(r.data,r.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=r.manual?l:void 0,l;case"error":const d=r.error;return{...a,error:d,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...r.state}}};this.state=n(this.state),Bt.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:r})})}};function F_(r,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P_(n.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function ug(r,n){return{data:r,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function hg(r){const n=typeof r.initialData=="function"?r.initialData():r.initialData,a=n!==void 0,l=a?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:a?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var PC=class extends Js{constructor(r,n){super(),this.options=n,this.#e=r,this.#s=null,this.#o=ff(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#r=void 0;#n=void 0;#i;#a;#o;#s;#p;#f;#d;#c;#u;#l;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),fg(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#b(),this.#t.removeObserver(this)}setOptions(r){const n=this.options,a=this.#t;if(this.options=this.#e.defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#t.setOptions(this.options),n._defaulted&&!tc(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&dg(this.#t,a,this.options,n)&&this.#h(),this.updateResult(),l&&(this.#t!==a||Nr(this.options.enabled,this.#t)!==Nr(n.enabled,this.#t)||wn(this.options.staleTime,this.#t)!==wn(n.staleTime,this.#t))&&this.#v();const d=this.#g();l&&(this.#t!==a||Nr(this.options.enabled,this.#t)!==Nr(n.enabled,this.#t)||d!==this.#l)&&this.#_(d)}getOptimisticResult(r){const n=this.#e.getQueryCache().build(this.#e,r),a=this.createResult(n,r);return IC(this,a)&&(this.#n=a,this.#a=this.options,this.#i=this.#t.state),a}getCurrentResult(){return this.#n}trackResult(r,n){return new Proxy(r,{get:(a,l)=>(this.trackProp(l),n?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,l))})}trackProp(r){this.#m.add(r)}getCurrentQuery(){return this.#t}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const n=this.#e.defaultQueryOptions(r),a=this.#e.getQueryCache().build(this.#e,n);return a.fetch().then(()=>this.createResult(a,n))}fetch(r){return this.#h({...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#h(r){this.#C();let n=this.#t.fetch(this.options,r);return r?.throwOnError||(n=n.catch(Zt)),n}#v(){this.#S();const r=wn(this.options.staleTime,this.#t);if(Jn||this.#n.isStale||!cf(r))return;const a=N_(this.#n.dataUpdatedAt,r)+1;this.#c=Qn.setTimeout(()=>{this.#n.isStale||this.updateResult()},a)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#_(r){this.#b(),this.#l=r,!(Jn||Nr(this.options.enabled,this.#t)===!1||!cf(this.#l)||this.#l===0)&&(this.#u=Qn.setInterval(()=>{(this.options.refetchIntervalInBackground||jf.isFocused())&&this.#h()},this.#l))}#y(){this.#v(),this.#_(this.#g())}#S(){this.#c&&(Qn.clearTimeout(this.#c),this.#c=void 0)}#b(){this.#u&&(Qn.clearInterval(this.#u),this.#u=void 0)}createResult(r,n){const a=this.#t,l=this.options,d=this.#n,y=this.#i,S=this.#a,c=r!==a?r.state:this.#r,{state:u}=r;let C={...u},v=!1,w;if(n._optimisticResults){const E=this.hasListeners(),B=!E&&fg(r,n),W=E&&dg(r,a,n,l);(B||W)&&(C={...C,...F_(u.data,r.options)}),n._optimisticResults==="isRestoring"&&(C.fetchStatus="idle")}let{error:x,errorUpdatedAt:R,status:b}=C;w=C.data;let h=!1;if(n.placeholderData!==void 0&&w===void 0&&b==="pending"){let E;d?.isPlaceholderData&&n.placeholderData===S?.placeholderData?(E=d.data,h=!0):E=typeof n.placeholderData=="function"?n.placeholderData(this.#d?.state.data,this.#d):n.placeholderData,E!==void 0&&(b="success",w=hf(d?.data,E,n),v=!0)}if(n.select&&w!==void 0&&!h)if(d&&w===y?.data&&n.select===this.#p)w=this.#f;else try{this.#p=n.select,w=n.select(w),w=hf(d?.data,w,n),this.#f=w,this.#s=null}catch(E){this.#s=E}this.#s&&(x=this.#s,w=this.#f,R=Date.now(),b="error");const m=C.fetchStatus==="fetching",p=b==="pending",g=b==="error",A=p&&m,D=w!==void 0,T={status:b,fetchStatus:C.fetchStatus,isPending:p,isSuccess:b==="success",isError:g,isInitialLoading:A,isLoading:A,data:w,dataUpdatedAt:C.dataUpdatedAt,error:x,errorUpdatedAt:R,failureCount:C.fetchFailureCount,failureReason:C.fetchFailureReason,errorUpdateCount:C.errorUpdateCount,isFetched:C.dataUpdateCount>0||C.errorUpdateCount>0,isFetchedAfterMount:C.dataUpdateCount>c.dataUpdateCount||C.errorUpdateCount>c.errorUpdateCount,isFetching:m,isRefetching:m&&!p,isLoadingError:g&&!D,isPaused:C.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:g&&D,isStale:Hf(r,n),refetch:this.refetch,promise:this.#o,isEnabled:Nr(n.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const E=F=>{T.status==="error"?F.reject(T.error):T.data!==void 0&&F.resolve(T.data)},B=()=>{const F=this.#o=T.promise=ff();E(F)},W=this.#o;switch(W.status){case"pending":r.queryHash===a.queryHash&&E(W);break;case"fulfilled":(T.status==="error"||T.data!==W.value)&&B();break;case"rejected":(T.status!=="error"||T.error!==W.reason)&&B();break}}return T}updateResult(){const r=this.#n,n=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#d=this.#t),tc(n,r))return;this.#n=n;const a=()=>{if(!r)return!0;const{notifyOnChangeProps:l}=this.options,d=typeof l=="function"?l():l;if(d==="all"||!d&&!this.#m.size)return!0;const y=new Set(d??this.#m);return this.options.throwOnError&&y.add("error"),Object.keys(this.#n).some(S=>{const o=S;return this.#n[o]!==r[o]&&y.has(o)})};this.#w({listeners:a()})}#C(){const r=this.#e.getQueryCache().build(this.#e,this.options);if(r===this.#t)return;const n=this.#t;this.#t=r,this.#r=r.state,this.hasListeners()&&(n?.removeObserver(this),r.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#w(r){Bt.batch(()=>{r.listeners&&this.listeners.forEach(n=>{n(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function UC(r,n){return Nr(n.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&n.retryOnMount===!1)}function fg(r,n){return UC(r,n)||r.state.data!==void 0&&mf(r,n,n.refetchOnMount)}function mf(r,n,a){if(Nr(n.enabled,r)!==!1&&wn(n.staleTime,r)!=="static"){const l=typeof a=="function"?a(r):a;return l==="always"||l!==!1&&Hf(r,n)}return!1}function dg(r,n,a,l){return(r!==n||Nr(l.enabled,r)===!1)&&(!a.suspense||r.state.status!=="error")&&Hf(r,a)}function Hf(r,n){return Nr(n.enabled,r)!==!1&&r.isStaleByTime(wn(n.staleTime,r))}function IC(r,n){return!tc(r.getCurrentResult(),n)}function mg(r){return{onFetch:(n,a)=>{const l=n.options,d=n.fetchOptions?.meta?.fetchMore?.direction,y=n.state.data?.pages||[],S=n.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let C=!1;const v=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(n.signal.aborted?C=!0:n.signal.addEventListener("abort",()=>{C=!0}),n.signal)})},w=H_(n.options,n.fetchOptions),x=async(R,b,h)=>{if(C)return Promise.reject();if(b==null&&R.pages.length)return Promise.resolve(R);const p=(()=>{const L={client:n.client,queryKey:n.queryKey,pageParam:b,direction:h?"backward":"forward",meta:n.options.meta};return v(L),L})(),g=await w(p),{maxPages:A}=n.options,D=h?LC:MC;return{pages:D(R.pages,g,A),pageParams:D(R.pageParams,b,A)}};if(d&&y.length){const R=d==="backward",b=R?FC:pg,h={pages:y,pageParams:S},m=b(l,h);o=await x(h,m,R)}else{const R=r??y.length;do{const b=c===0?S[0]??l.initialPageParam:pg(l,o);if(c>0&&b==null)break;o=await x(o,b),c++}while(c<R)}return o};n.options.persister?n.fetchFn=()=>n.options.persister?.(u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},a):n.fetchFn=u}}}function pg(r,{pages:n,pageParams:a}){const l=n.length-1;return n.length>0?r.getNextPageParam(n[l],n,a[l],a):void 0}function FC(r,{pages:n,pageParams:a}){return n.length>0?r.getPreviousPageParam?.(n[0],n,a[0],a):void 0}var qC=class extends I_{#e;#t;#r;#n;constructor(r){super(),this.#e=r.client,this.mutationId=r.mutationId,this.#r=r.mutationCache,this.#t=[],this.state=r.state||q_(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){this.#t.includes(r)||(this.#t.push(r),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){this.#t=this.#t.filter(n=>n!==r),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(r){const n=()=>{this.#i({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=U_({fn:()=>this.options.mutationFn?this.options.mutationFn(r,a):Promise.reject(new Error("No mutationFn found")),onFail:(y,S)=>{this.#i({type:"failed",failureCount:y,error:S})},onPause:()=>{this.#i({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const l=this.state.status==="pending",d=!this.#n.canStart();try{if(l)n();else{this.#i({type:"pending",variables:r,isPaused:d}),await this.#r.config.onMutate?.(r,this,a);const S=await this.options.onMutate?.(r,a);S!==this.state.context&&this.#i({type:"pending",context:S,variables:r,isPaused:d})}const y=await this.#n.start();return await this.#r.config.onSuccess?.(y,r,this.state.context,this,a),await this.options.onSuccess?.(y,r,this.state.context,a),await this.#r.config.onSettled?.(y,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(y,null,r,this.state.context,a),this.#i({type:"success",data:y}),y}catch(y){try{throw await this.#r.config.onError?.(y,r,this.state.context,this,a),await this.options.onError?.(y,r,this.state.context,a),await this.#r.config.onSettled?.(void 0,y,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(void 0,y,r,this.state.context,a),y}finally{this.#i({type:"error",error:y})}}finally{this.#r.runNext(this)}}#i(r){const n=a=>{switch(r.type){case"failed":return{...a,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...a,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:r.error,failureCount:a.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Bt.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(r)}),this.#r.notify({mutation:this,type:"updated",action:r})})}};function q_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var WC=class extends Js{constructor(r={}){super(),this.config=r,this.#e=new Set,this.#t=new Map,this.#r=0}#e;#t;#r;build(r,n,a){const l=new qC({client:r,mutationCache:this,mutationId:++this.#r,options:r.defaultMutationOptions(n),state:a});return this.add(l),l}add(r){this.#e.add(r);const n=Nl(r);if(typeof n=="string"){const a=this.#t.get(n);a?a.push(r):this.#t.set(n,[r])}this.notify({type:"added",mutation:r})}remove(r){if(this.#e.delete(r)){const n=Nl(r);if(typeof n=="string"){const a=this.#t.get(n);if(a)if(a.length>1){const l=a.indexOf(r);l!==-1&&a.splice(l,1)}else a[0]===r&&this.#t.delete(n)}}this.notify({type:"removed",mutation:r})}canRun(r){const n=Nl(r);if(typeof n=="string"){const l=this.#t.get(n)?.find(d=>d.state.status==="pending");return!l||l===r}else return!0}runNext(r){const n=Nl(r);return typeof n=="string"?this.#t.get(n)?.find(l=>l!==r&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Bt.batch(()=>{this.#e.forEach(r=>{this.notify({type:"removed",mutation:r})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(r){const n={exact:!0,...r};return this.getAll().find(a=>og(n,a))}findAll(r={}){return this.getAll().filter(n=>og(r,n))}notify(r){Bt.batch(()=>{this.listeners.forEach(n=>{n(r)})})}resumePausedMutations(){const r=this.getAll().filter(n=>n.state.isPaused);return Bt.batch(()=>Promise.all(r.map(n=>n.continue().catch(Zt))))}};function Nl(r){return r.options.scope?.id}var VC=class extends Js{#e;#t=void 0;#r;#n;constructor(n,a){super(),this.#e=n,this.setOptions(a),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const a=this.options;this.options=this.#e.defaultMutationOptions(n),tc(this.options,a)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),a?.mutationKey&&this.options.mutationKey&&es(a.mutationKey)!==es(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(n){this.#i(),this.#a(n)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#a()}mutate(n,a){return this.#n=a,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(n)}#i(){const n=this.#r?.state??q_();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#a(n){Bt.batch(()=>{if(this.#n&&this.hasListeners()){const a=this.#t.variables,l=this.#t.context,d={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};n?.type==="success"?(this.#n.onSuccess?.(n.data,a,l,d),this.#n.onSettled?.(n.data,null,a,l,d)):n?.type==="error"&&(this.#n.onError?.(n.error,a,l,d),this.#n.onSettled?.(void 0,n.error,a,l,d))}this.listeners.forEach(a=>{a(this.#t)})})}},KC=class extends Js{constructor(r={}){super(),this.config=r,this.#e=new Map}#e;build(r,n,a){const l=n.queryKey,d=n.queryHash??Bf(l,n);let y=this.get(d);return y||(y=new zC({client:r,queryKey:l,queryHash:d,options:r.defaultQueryOptions(n),state:a,defaultOptions:r.getQueryDefaults(l)}),this.add(y)),y}add(r){this.#e.has(r.queryHash)||(this.#e.set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const n=this.#e.get(r.queryHash);n&&(r.destroy(),n===r&&this.#e.delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){Bt.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return this.#e.get(r)}getAll(){return[...this.#e.values()]}find(r){const n={exact:!0,...r};return this.getAll().find(a=>ag(n,a))}findAll(r={}){const n=this.getAll();return Object.keys(r).length>0?n.filter(a=>ag(r,a)):n}notify(r){Bt.batch(()=>{this.listeners.forEach(n=>{n(r)})})}onFocus(){Bt.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){Bt.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},GC=class{#e;#t;#r;#n;#i;#a;#o;#s;constructor(r={}){this.#e=r.queryCache||new KC,this.#t=r.mutationCache||new WC,this.#r=r.defaultOptions||{},this.#n=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=jf.subscribe(async r=>{r&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=rc.subscribe(async r=>{r&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(r){return this.#e.findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return this.#t.findAll({...r,status:"pending"}).length}getQueryData(r){const n=this.defaultQueryOptions({queryKey:r});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(r){const n=this.defaultQueryOptions(r),a=this.#e.build(this,n),l=a.state.data;return l===void 0?this.fetchQuery(r):(r.revalidateIfStale&&a.isStaleByTime(wn(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(l))}getQueriesData(r){return this.#e.findAll(r).map(({queryKey:n,state:a})=>{const l=a.data;return[n,l]})}setQueryData(r,n,a){const l=this.defaultQueryOptions({queryKey:r}),y=this.#e.get(l.queryHash)?.state.data,S=TC(n,y);if(S!==void 0)return this.#e.build(this,l).setData(S,{...a,manual:!0})}setQueriesData(r,n,a){return Bt.batch(()=>this.#e.findAll(r).map(({queryKey:l})=>[l,this.setQueryData(l,n,a)]))}getQueryState(r){const n=this.defaultQueryOptions({queryKey:r});return this.#e.get(n.queryHash)?.state}removeQueries(r){const n=this.#e;Bt.batch(()=>{n.findAll(r).forEach(a=>{n.remove(a)})})}resetQueries(r,n){const a=this.#e;return Bt.batch(()=>(a.findAll(r).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...r},n)))}cancelQueries(r,n={}){const a={revert:!0,...n},l=Bt.batch(()=>this.#e.findAll(r).map(d=>d.cancel(a)));return Promise.all(l).then(Zt).catch(Zt)}invalidateQueries(r,n={}){return Bt.batch(()=>(this.#e.findAll(r).forEach(a=>{a.invalidate()}),r?.refetchType==="none"?Promise.resolve():this.refetchQueries({...r,type:r?.refetchType??r?.type??"active"},n)))}refetchQueries(r,n={}){const a={...n,cancelRefetch:n.cancelRefetch??!0},l=Bt.batch(()=>this.#e.findAll(r).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let y=d.fetch(void 0,a);return a.throwOnError||(y=y.catch(Zt)),d.state.fetchStatus==="paused"?Promise.resolve():y}));return Promise.all(l).then(Zt)}fetchQuery(r){const n=this.defaultQueryOptions(r);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n);return a.isStaleByTime(wn(n.staleTime,a))?a.fetch(n):Promise.resolve(a.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Zt).catch(Zt)}fetchInfiniteQuery(r){return r.behavior=mg(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Zt).catch(Zt)}ensureInfiniteQueryData(r){return r.behavior=mg(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return rc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(r){this.#r=r}setQueryDefaults(r,n){this.#n.set(es(r),{queryKey:r,defaultOptions:n})}getQueryDefaults(r){const n=[...this.#n.values()],a={};return n.forEach(l=>{so(r,l.queryKey)&&Object.assign(a,l.defaultOptions)}),a}setMutationDefaults(r,n){this.#i.set(es(r),{mutationKey:r,defaultOptions:n})}getMutationDefaults(r){const n=[...this.#i.values()],a={};return n.forEach(l=>{so(r,l.mutationKey)&&Object.assign(a,l.defaultOptions)}),a}defaultQueryOptions(r){if(r._defaulted)return r;const n={...this.#r.queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return n.queryHash||(n.queryHash=Bf(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Nf&&(n.enabled=!1),n}defaultMutationOptions(r){return r?._defaulted?r:{...this.#r.mutations,...r?.mutationKey&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},W_=k.createContext(void 0),ss=r=>{const n=k.useContext(W_);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},$C=({client:r,children:n})=>(k.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),O.jsx(W_.Provider,{value:r,children:n})),V_=k.createContext(!1),YC=()=>k.useContext(V_);V_.Provider;function XC(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var QC=k.createContext(XC()),ZC=()=>k.useContext(QC),JC=(r,n)=>{(r.suspense||r.throwOnError||r.experimental_prefetchInRender)&&(n.isReset()||(r.retryOnMount=!1))},e1=r=>{k.useEffect(()=>{r.clearReset()},[r])},t1=({result:r,errorResetBoundary:n,throwOnError:a,query:l,suspense:d})=>r.isError&&!n.isReset()&&!r.isFetching&&l&&(d&&r.data===void 0||z_(a,[r.error,l])),r1=r=>{if(r.suspense){const a=d=>d==="static"?d:Math.max(d??1e3,1e3),l=r.staleTime;r.staleTime=typeof l=="function"?(...d)=>a(l(...d)):a(l),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},i1=(r,n)=>r.isLoading&&r.isFetching&&!n,n1=(r,n)=>r?.suspense&&n.isPending,vg=(r,n,a)=>n.fetchOptimistic(r).catch(()=>{a.clearReset()});function s1(r,n,a){const l=YC(),d=ZC(),y=ss(),S=y.defaultQueryOptions(r);y.getDefaultOptions().queries?._experimental_beforeQuery?.(S),S._optimisticResults=l?"isRestoring":"optimistic",r1(S),JC(S,d),e1(d);const o=!y.getQueryCache().get(S.queryHash),[c]=k.useState(()=>new n(y,S)),u=c.getOptimisticResult(S),C=!l&&r.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(v=>{const w=C?c.subscribe(Bt.batchCalls(v)):Zt;return c.updateResult(),w},[c,C]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),k.useEffect(()=>{c.setOptions(S)},[S,c]),n1(S,u))throw vg(S,c,d);if(t1({result:u,errorResetBoundary:d,throwOnError:S.throwOnError,query:y.getQueryCache().get(S.queryHash),suspense:S.suspense}))throw u.error;return y.getDefaultOptions().queries?._experimental_afterQuery?.(S,u),S.experimental_prefetchInRender&&!Jn&&i1(u,l)&&(o?vg(S,c,d):y.getQueryCache().get(S.queryHash)?.promise)?.catch(Zt).finally(()=>{c.updateResult()}),S.notifyOnChangeProps?u:c.trackResult(u)}function mc(r,n){return s1(r,PC)}function mo(r,n){const a=ss(),[l]=k.useState(()=>new VC(a,r));k.useEffect(()=>{l.setOptions(r)},[l,r]);const d=k.useSyncExternalStore(k.useCallback(S=>l.subscribe(Bt.batchCalls(S)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y=k.useCallback((S,o)=>{l.mutate(S,o).catch(Zt)},[l]);if(d.error&&z_(l.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:y,mutateAsync:d.mutate}}var K_=r=>{throw TypeError(r)},a1=(r,n,a)=>n.has(r)||K_("Cannot "+a),Wh=(r,n,a)=>(a1(r,n,"read from private field"),a?a.call(r):n.get(r)),o1=(r,n,a)=>n.has(r)?K_("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,a),gg="popstate";function l1(r={}){function n(l,d){let{pathname:y,search:S,hash:o}=l.location;return ao("",{pathname:y,search:S,hash:o},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function a(l,d){return typeof d=="string"?d:ui(d)}return u1(n,a,null,r)}function Ie(r,n){if(r===!1||r===null||typeof r>"u")throw new Error(n)}function Et(r,n){if(!r){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function c1(){return Math.random().toString(36).substring(2,10)}function _g(r,n){return{usr:r.state,key:r.key,idx:n}}function ao(r,n,a=null,l){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof n=="string"?Rn(n):n,state:a,key:n&&n.key||l||c1()}}function ui({pathname:r="/",search:n="",hash:a=""}){return n&&n!=="?"&&(r+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(r+=a.charAt(0)==="#"?a:"#"+a),r}function Rn(r){let n={};if(r){let a=r.indexOf("#");a>=0&&(n.hash=r.substring(a),r=r.substring(0,a));let l=r.indexOf("?");l>=0&&(n.search=r.substring(l),r=r.substring(0,l)),r&&(n.pathname=r)}return n}function u1(r,n,a,l={}){let{window:d=document.defaultView,v5Compat:y=!1}=l,S=d.history,o="POP",c=null,u=C();u==null&&(u=0,S.replaceState({...S.state,idx:u},""));function C(){return(S.state||{idx:null}).idx}function v(){o="POP";let h=C(),m=h==null?null:h-u;u=h,c&&c({action:o,location:b.location,delta:m})}function w(h,m){o="PUSH";let p=ao(b.location,h,m);u=C()+1;let g=_g(p,u),A=b.createHref(p);try{S.pushState(g,"",A)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;d.location.assign(A)}y&&c&&c({action:o,location:b.location,delta:1})}function x(h,m){o="REPLACE";let p=ao(b.location,h,m);u=C();let g=_g(p,u),A=b.createHref(p);S.replaceState(g,"",A),y&&c&&c({action:o,location:b.location,delta:0})}function R(h){return G_(h)}let b={get action(){return o},get location(){return r(d,S)},listen(h){if(c)throw new Error("A history only accepts one active listener");return d.addEventListener(gg,v),c=h,()=>{d.removeEventListener(gg,v),c=null}},createHref(h){return n(d,h)},createURL:R,encodeLocation(h){let m=R(h);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:w,replace:x,go(h){return S.go(h)}};return b}function G_(r,n=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Ie(a,"No window.location.(origin|href) available to create URL");let l=typeof r=="string"?r:ui(r);return l=l.replace(/ $/,"%20"),!n&&l.startsWith("//")&&(l=a+l),new URL(l,a)}var to,yg=class{constructor(r){if(o1(this,to,new Map),r)for(let[n,a]of r)this.set(n,a)}get(r){if(Wh(this,to).has(r))return Wh(this,to).get(r);if(r.defaultValue!==void 0)return r.defaultValue;throw new Error("No value found for context")}set(r,n){Wh(this,to).set(r,n)}};to=new WeakMap;var h1=new Set(["lazy","caseSensitive","path","id","index","children"]);function f1(r){return h1.has(r)}var d1=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function m1(r){return d1.has(r)}function p1(r){return r.index===!0}function oo(r,n,a=[],l={},d=!1){return r.map((y,S)=>{let o=[...a,String(S)],c=typeof y.id=="string"?y.id:o.join("-");if(Ie(y.index!==!0||!y.children,"Cannot specify children on an index route"),Ie(d||!l[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),p1(y)){let u={...y,id:c};return l[c]=Sg(u,n(u)),u}else{let u={...y,id:c,children:void 0};return l[c]=Sg(u,n(u)),y.children&&(u.children=oo(y.children,n,o,l,d)),u}})}function Sg(r,n){return Object.assign(r,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...r.lazy,...n.lazy}}:{}})}function Sn(r,n,a="/"){return ro(r,n,a,!1)}function ro(r,n,a,l){let d=typeof n=="string"?Rn(n):n,y=Pr(d.pathname||"/",a);if(y==null)return null;let S=$_(r);g1(S);let o=null;for(let c=0;o==null&&c<S.length;++c){let u=T1(y);o=R1(S[c],u,l)}return o}function v1(r,n){let{route:a,pathname:l,params:d}=r;return{id:a.id,pathname:l,params:d,data:n[a.id],loaderData:n[a.id],handle:a.handle}}function $_(r,n=[],a=[],l="",d=!1){let y=(S,o,c=d,u)=>{let C={relativePath:u===void 0?S.path||"":u,caseSensitive:S.caseSensitive===!0,childrenIndex:o,route:S};if(C.relativePath.startsWith("/")){if(!C.relativePath.startsWith(l)&&c)return;Ie(C.relativePath.startsWith(l),`Absolute route path "${C.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),C.relativePath=C.relativePath.slice(l.length)}let v=li([l,C.relativePath]),w=a.concat(C);S.children&&S.children.length>0&&(Ie(S.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),$_(S.children,n,w,v,c)),!(S.path==null&&!S.index)&&n.push({path:v,score:x1(v,S.index),routesMeta:w})};return r.forEach((S,o)=>{if(S.path===""||!S.path?.includes("?"))y(S,o);else for(let c of Y_(S.path))y(S,o,!0,c)}),n}function Y_(r){let n=r.split("/");if(n.length===0)return[];let[a,...l]=n,d=a.endsWith("?"),y=a.replace(/\?$/,"");if(l.length===0)return d?[y,""]:[y];let S=Y_(l.join("/")),o=[];return o.push(...S.map(c=>c===""?y:[y,c].join("/"))),d&&o.push(...S),o.map(c=>r.startsWith("/")&&c===""?"/":c)}function g1(r){r.sort((n,a)=>n.score!==a.score?a.score-n.score:E1(n.routesMeta.map(l=>l.childrenIndex),a.routesMeta.map(l=>l.childrenIndex)))}var _1=/^:[\w-]+$/,y1=3,S1=2,b1=1,C1=10,w1=-2,bg=r=>r==="*";function x1(r,n){let a=r.split("/"),l=a.length;return a.some(bg)&&(l+=w1),n&&(l+=S1),a.filter(d=>!bg(d)).reduce((d,y)=>d+(_1.test(y)?y1:y===""?b1:C1),l)}function E1(r,n){return r.length===n.length&&r.slice(0,-1).every((l,d)=>l===n[d])?r[r.length-1]-n[n.length-1]:0}function R1(r,n,a=!1){let{routesMeta:l}=r,d={},y="/",S=[];for(let o=0;o<l.length;++o){let c=l[o],u=o===l.length-1,C=y==="/"?n:n.slice(y.length)||"/",v=ic({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},C),w=c.route;if(!v&&u&&a&&!l[l.length-1].route.index&&(v=ic({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},C)),!v)return null;Object.assign(d,v.params),S.push({params:d,pathname:li([y,v.pathname]),pathnameBase:L1(li([y,v.pathnameBase])),route:w}),v.pathnameBase!=="/"&&(y=li([y,v.pathnameBase]))}return S}function ic(r,n){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[a,l]=A1(r.path,r.caseSensitive,r.end),d=n.match(a);if(!d)return null;let y=d[0],S=y.replace(/(.)\/+$/,"$1"),o=d.slice(1);return{params:l.reduce((u,{paramName:C,isOptional:v},w)=>{if(C==="*"){let R=o[w]||"";S=y.slice(0,y.length-R.length).replace(/(.)\/+$/,"$1")}const x=o[w];return v&&!x?u[C]=void 0:u[C]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:y,pathnameBase:S,pattern:r}}function A1(r,n=!1,a=!0){Et(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let l=[],d="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(S,o,c)=>(l.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(l.push({paramName:"*"}),d+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?d+="\\/*$":r!==""&&r!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,n?void 0:"i"),l]}function T1(r){try{return r.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Et(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),r}}function Pr(r,n){if(n==="/")return r;if(!r.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,l=r.charAt(a);return l&&l!=="/"?null:r.slice(a)||"/"}function D1({basename:r,pathname:n}){return n==="/"?r:li([r,n])}var O1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pc=r=>O1.test(r);function M1(r,n="/"){let{pathname:a,search:l="",hash:d=""}=typeof r=="string"?Rn(r):r,y;if(a)if(pc(a))y=a;else{if(a.includes("//")){let S=a;a=a.replace(/\/\/+/g,"/"),Et(!1,`Pathnames cannot have embedded double slashes - normalizing ${S} -> ${a}`)}a.startsWith("/")?y=Cg(a.substring(1),"/"):y=Cg(a,n)}else y=n;return{pathname:y,search:k1(l),hash:B1(d)}}function Cg(r,n){let a=n.replace(/\/+$/,"").split("/");return r.split("/").forEach(d=>{d===".."?a.length>1&&a.pop():d!=="."&&a.push(d)}),a.length>1?a.join("/"):"/"}function Vh(r,n,a,l){return`Cannot include a '${r}' character in a manually specified \`to.${n}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function X_(r){return r.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function zf(r){let n=X_(r);return n.map((a,l)=>l===n.length-1?a.pathname:a.pathnameBase)}function Pf(r,n,a,l=!1){let d;typeof r=="string"?d=Rn(r):(d={...r},Ie(!d.pathname||!d.pathname.includes("?"),Vh("?","pathname","search",d)),Ie(!d.pathname||!d.pathname.includes("#"),Vh("#","pathname","hash",d)),Ie(!d.search||!d.search.includes("#"),Vh("#","search","hash",d)));let y=r===""||d.pathname==="",S=y?"/":d.pathname,o;if(S==null)o=a;else{let v=n.length-1;if(!l&&S.startsWith("..")){let w=S.split("/");for(;w[0]==="..";)w.shift(),v-=1;d.pathname=w.join("/")}o=v>=0?n[v]:"/"}let c=M1(d,o),u=S&&S!=="/"&&S.endsWith("/"),C=(y||S===".")&&a.endsWith("/");return!c.pathname.endsWith("/")&&(u||C)&&(c.pathname+="/"),c}var li=r=>r.join("/").replace(/\/\/+/g,"/"),L1=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),k1=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,B1=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,vc=class{constructor(r,n,a,l=!1){this.status=r,this.statusText=n||"",this.internal=l,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function lo(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function po(r){return r.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Cn=Symbol("Uninstrumented");function N1(r,n){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};r.forEach(d=>d({id:n.id,index:n.index,path:n.path,instrument(y){let S=Object.keys(a);for(let o of S)y[o]&&a[o].push(y[o])}}));let l={};if(typeof n.lazy=="function"&&a.lazy.length>0){let d=$s(a.lazy,n.lazy,()=>{});d&&(l.lazy=d)}if(typeof n.lazy=="object"){let d=n.lazy;["middleware","loader","action"].forEach(y=>{let S=d[y],o=a[`lazy.${y}`];if(typeof S=="function"&&o.length>0){let c=$s(o,S,()=>{});c&&(l.lazy=Object.assign(l.lazy||{},{[y]:c}))}})}return["loader","action"].forEach(d=>{let y=n[d];if(typeof y=="function"&&a[d].length>0){let S=y[Cn]??y,o=$s(a[d],S,(...c)=>wg(c[0]));o&&(o[Cn]=S,l[d]=o)}}),n.middleware&&n.middleware.length>0&&a.middleware.length>0&&(l.middleware=n.middleware.map(d=>{let y=d[Cn]??d,S=$s(a.middleware,y,(...o)=>wg(o[0]));return S?(S[Cn]=y,S):d})),l}function j1(r,n){let a={navigate:[],fetch:[]};if(n.forEach(l=>l({instrument(d){let y=Object.keys(d);for(let S of y)d[S]&&a[S].push(d[S])}})),a.navigate.length>0){let l=r.navigate[Cn]??r.navigate,d=$s(a.navigate,l,(...y)=>{let[S,o]=y;return{to:typeof S=="number"||typeof S=="string"?S:S?ui(S):".",...xg(r,o??{})}});d&&(d[Cn]=l,r.navigate=d)}if(a.fetch.length>0){let l=r.fetch[Cn]??r.fetch,d=$s(a.fetch,l,(...y)=>{let[S,,o,c]=y;return{href:o??".",fetcherKey:S,...xg(r,c??{})}});d&&(d[Cn]=l,r.fetch=d)}return r}function $s(r,n,a){return r.length===0?null:async(...l)=>{let d=await Q_(r,a(...l),()=>n(...l),r.length-1);if(d.type==="error")throw d.value;return d.value}}async function Q_(r,n,a,l){let d=r[l],y;if(d){let S,o=async()=>(S?console.error("You cannot call instrumented handlers more than once"):S=Q_(r,n,a,l-1),y=await S,Ie(y,"Expected a result"),y.type==="error"&&y.value instanceof Error?{status:"error",error:y.value}:{status:"success",error:void 0});try{await d(o,n)}catch(c){console.error("An instrumentation function threw an error:",c)}S||await o(),await S}else try{y={type:"success",value:await a()}}catch(S){y={type:"error",value:S}}return y||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function wg(r){let{request:n,context:a,params:l,unstable_pattern:d}=r;return{request:H1(n),params:{...l},unstable_pattern:d,context:z1(a)}}function xg(r,n){return{currentUrl:ui(r.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function H1(r){return{method:r.method,url:r.url,headers:{get:(...n)=>r.headers.get(...n)}}}function z1(r){if(U1(r)){let n={...r};return Object.freeze(n),n}else return{get:n=>r.get(n)}}var P1=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function U1(r){if(r===null||typeof r!="object")return!1;const n=Object.getPrototypeOf(r);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===P1}var Z_=["POST","PUT","PATCH","DELETE"],I1=new Set(Z_),F1=["GET",...Z_],q1=new Set(F1),W1=new Set([301,302,303,307,308]),V1=new Set([307,308]),Kh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},K1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Xa={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},G1=r=>({hasErrorBoundary:!!r.hasErrorBoundary}),J_="remix-router-transitions",ey=Symbol("ResetLoaderData");function $1(r){const n=r.window?r.window:typeof window<"u"?window:void 0,a=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";Ie(r.routes.length>0,"You must provide a non-empty routes array to createRouter");let l=r.hydrationRouteProperties||[],d=r.mapRouteProperties||G1,y=d;if(r.unstable_instrumentations){let Y=r.unstable_instrumentations;y=re=>({...d(re),...N1(Y.map(ce=>ce.route).filter(Boolean),re)})}let S={},o=oo(r.routes,y,void 0,S),c,u=r.basename||"/";u.startsWith("/")||(u=`/${u}`);let C=r.dataStrategy||J1,v={...r.future},w=null,x=new Set,R=null,b=null,h=null,m=r.hydrationData!=null,p=Sn(o,r.history.location,u),g=!1,A=null,D;if(p==null&&!r.patchRoutesOnNavigation){let Y=Br(404,{pathname:r.history.location.pathname}),{matches:re,route:ce}=jl(o);D=!0,p=re,A={[ce.id]:Y}}else if(p&&!r.hydrationData&&Ln(p,o,r.history.location.pathname).active&&(p=null),p)if(p.some(Y=>Y.route.lazy))D=!1;else if(!p.some(Y=>Uf(Y.route)))D=!0;else{let Y=r.hydrationData?r.hydrationData.loaderData:null,re=r.hydrationData?r.hydrationData.errors:null;if(re){let ce=p.findIndex(_e=>re[_e.route.id]!==void 0);D=p.slice(0,ce+1).every(_e=>!vf(_e.route,Y,re))}else D=p.every(ce=>!vf(ce.route,Y,re))}else{D=!1,p=[];let Y=Ln(null,o,r.history.location.pathname);Y.active&&Y.matches&&(g=!0,p=Y.matches)}let L,T={historyAction:r.history.action,location:r.history.location,matches:p,initialized:D,navigation:Kh,restoreScrollPosition:r.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:r.hydrationData&&r.hydrationData.loaderData||{},actionData:r.hydrationData&&r.hydrationData.actionData||null,errors:r.hydrationData&&r.hydrationData.errors||A,fetchers:new Map,blockers:new Map},E="POP",B=null,W=!1,F,I=!1,V=new Map,ee=null,ne=!1,q=!1,Z=new Set,K=new Map,j=0,U=-1,N=new Map,z=new Set,Q=new Map,ie=new Map,de=new Set,G=new Map,X,P=null;function he(){if(w=r.history.listen(({action:Y,location:re,delta:ce})=>{if(X){X(),X=void 0;return}Et(G.size===0||ce!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let _e=Dn({currentLocation:T.location,nextLocation:re,historyAction:Y});if(_e&&ce!=null){let ye=new Promise(De=>{X=De});r.history.go(ce*-1),_i(_e,{state:"blocked",location:re,proceed(){_i(_e,{state:"proceeding",proceed:void 0,reset:void 0,location:re}),ye.then(()=>r.history.go(ce))},reset(){let De=new Map(T.blockers);De.set(_e,Xa),me({blockers:De})}}),B?.resolve(),B=null;return}return tt(Y,re)}),a){pw(n,V);let Y=()=>vw(n,V);n.addEventListener("pagehide",Y),ee=()=>n.removeEventListener("pagehide",Y)}return T.initialized||tt("POP",T.location,{initialHydration:!0}),L}function ge(){w&&w(),ee&&ee(),x.clear(),F&&F.abort(),T.fetchers.forEach((Y,re)=>rt(re)),T.blockers.forEach((Y,re)=>Co(re))}function oe(Y){return x.add(Y),()=>x.delete(Y)}function me(Y,re={}){Y.matches&&(Y.matches=Y.matches.map(ye=>{let De=S[ye.route.id],we=ye.route;return we.element!==De.element||we.errorElement!==De.errorElement||we.hydrateFallbackElement!==De.hydrateFallbackElement?{...ye,route:De}:ye})),T={...T,...Y};let ce=[],_e=[];T.fetchers.forEach((ye,De)=>{ye.state==="idle"&&(de.has(De)?ce.push(De):_e.push(De))}),de.forEach(ye=>{!T.fetchers.has(ye)&&!K.has(ye)&&ce.push(ye)}),[...x].forEach(ye=>ye(T,{deletedFetchers:ce,newErrors:Y.errors??null,viewTransitionOpts:re.viewTransitionOpts,flushSync:re.flushSync===!0})),ce.forEach(ye=>rt(ye)),_e.forEach(ye=>T.fetchers.delete(ye))}function Ce(Y,re,{flushSync:ce}={}){let _e=T.actionData!=null&&T.navigation.formMethod!=null&&Jt(T.navigation.formMethod)&&T.navigation.state==="loading"&&Y.state?._isRedirect!==!0,ye;re.actionData?Object.keys(re.actionData).length>0?ye=re.actionData:ye=null:_e?ye=T.actionData:ye=null;let De=re.loaderData?Bg(T.loaderData,re.loaderData,re.matches||[],re.errors):T.loaderData,we=T.blockers;we.size>0&&(we=new Map(we),we.forEach((Oe,Me)=>we.set(Me,Xa)));let Se=ne?!1:wo(Y,re.matches||T.matches),be=W===!0||T.navigation.formMethod!=null&&Jt(T.navigation.formMethod)&&Y.state?._isRedirect!==!0;c&&(o=c,c=void 0),ne||E==="POP"||(E==="PUSH"?r.history.push(Y,Y.state):E==="REPLACE"&&r.history.replace(Y,Y.state));let Te;if(E==="POP"){let Oe=V.get(T.location.pathname);Oe&&Oe.has(Y.pathname)?Te={currentLocation:T.location,nextLocation:Y}:V.has(Y.pathname)&&(Te={currentLocation:Y,nextLocation:T.location})}else if(I){let Oe=V.get(T.location.pathname);Oe?Oe.add(Y.pathname):(Oe=new Set([Y.pathname]),V.set(T.location.pathname,Oe)),Te={currentLocation:T.location,nextLocation:Y}}me({...re,actionData:ye,loaderData:De,historyAction:E,location:Y,initialized:!0,navigation:Kh,revalidation:"idle",restoreScrollPosition:Se,preventScrollReset:be,blockers:we},{viewTransitionOpts:Te,flushSync:ce===!0}),E="POP",W=!1,I=!1,ne=!1,q=!1,B?.resolve(),B=null,P?.resolve(),P=null}async function ze(Y,re){if(B?.resolve(),B=null,typeof Y=="number"){B||(B=zg());let it=B.promise;return r.history.go(Y),it}let ce=pf(T.location,T.matches,u,Y,re?.fromRouteId,re?.relative),{path:_e,submission:ye,error:De}=Eg(!1,ce,re),we=T.location,Se=ao(T.location,_e,re&&re.state);Se={...Se,...r.history.encodeLocation(Se)};let be=re&&re.replace!=null?re.replace:void 0,Te="PUSH";be===!0?Te="REPLACE":be===!1||ye!=null&&Jt(ye.formMethod)&&ye.formAction===T.location.pathname+T.location.search&&(Te="REPLACE");let Oe=re&&"preventScrollReset"in re?re.preventScrollReset===!0:void 0,Me=(re&&re.flushSync)===!0,Ge=Dn({currentLocation:we,nextLocation:Se,historyAction:Te});if(Ge){_i(Ge,{state:"blocked",location:Se,proceed(){_i(Ge,{state:"proceeding",proceed:void 0,reset:void 0,location:Se}),ze(Y,re)},reset(){let it=new Map(T.blockers);it.set(Ge,Xa),me({blockers:it})}});return}await tt(Te,Se,{submission:ye,pendingError:De,preventScrollReset:Oe,replace:re&&re.replace,enableViewTransition:re&&re.viewTransition,flushSync:Me})}function ct(){P||(P=zg()),Jr(),me({revalidation:"loading"});let Y=P.promise;return T.navigation.state==="submitting"?Y:T.navigation.state==="idle"?(tt(T.historyAction,T.location,{startUninterruptedRevalidation:!0}),Y):(tt(E||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation,enableViewTransition:I===!0}),Y)}async function tt(Y,re,ce){F&&F.abort(),F=null,E=Y,ne=(ce&&ce.startUninterruptedRevalidation)===!0,Mn(T.location,T.matches),W=(ce&&ce.preventScrollReset)===!0,I=(ce&&ce.enableViewTransition)===!0;let _e=c||o,ye=ce&&ce.overrideNavigation,De=ce?.initialHydration&&T.matches&&T.matches.length>0&&!g?T.matches:Sn(_e,re,u),we=(ce&&ce.flushSync)===!0;if(De&&T.initialized&&!q&&ow(T.location,re)&&!(ce&&ce.submission&&Jt(ce.submission.formMethod))){Ce(re,{matches:De},{flushSync:we});return}let Se=Ln(De,_e,re.pathname);if(Se.active&&Se.matches&&(De=Se.matches),!De){let{error:yt,notFoundMatches:Ye,route:Xe}=Vi(re.pathname);Ce(re,{matches:Ye,loaderData:{},errors:{[Xe.id]:yt}},{flushSync:we});return}F=new AbortController;let be=Gs(r.history,re,F.signal,ce&&ce.submission),Te=r.getContext?await r.getContext():new yg,Oe;if(ce&&ce.pendingError)Oe=[bn(De).route.id,{type:"error",error:ce.pendingError}];else if(ce&&ce.submission&&Jt(ce.submission.formMethod)){let yt=await ke(be,re,ce.submission,De,Te,Se.active,ce&&ce.initialHydration===!0,{replace:ce.replace,flushSync:we});if(yt.shortCircuited)return;if(yt.pendingActionResult){let[Ye,Xe]=yt.pendingActionResult;if(yr(Xe)&&lo(Xe.error)&&Xe.error.status===404){F=null,Ce(re,{matches:yt.matches,loaderData:{},errors:{[Ye]:Xe.error}});return}}De=yt.matches||De,Oe=yt.pendingActionResult,ye=Gh(re,ce.submission),we=!1,Se.active=!1,be=Gs(r.history,be.url,be.signal)}let{shortCircuited:Me,matches:Ge,loaderData:it,errors:dt}=await Qr(be,re,De,Te,Se.active,ye,ce&&ce.submission,ce&&ce.fetcherSubmission,ce&&ce.replace,ce&&ce.initialHydration===!0,we,Oe);Me||(F=null,Ce(re,{matches:Ge||De,...Ng(Oe),loaderData:it,errors:dt}))}async function ke(Y,re,ce,_e,ye,De,we,Se={}){Jr();let be=dw(re,ce);if(me({navigation:be},{flushSync:Se.flushSync===!0}),De){let Me=await Ki(_e,re.pathname,Y.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){if(Me.partialMatches.length===0){let{matches:it,route:dt}=jl(o);return{matches:it,pendingActionResult:[dt.id,{type:"error",error:Me.error}]}}let Ge=bn(Me.partialMatches).route.id;return{matches:Me.partialMatches,pendingActionResult:[Ge,{type:"error",error:Me.error}]}}else if(Me.matches)_e=Me.matches;else{let{notFoundMatches:Ge,error:it,route:dt}=Vi(re.pathname);return{matches:Ge,pendingActionResult:[dt.id,{type:"error",error:it}]}}}let Te,Oe=Yl(_e,re);if(!Oe.route.action&&!Oe.route.lazy)Te={type:"error",error:Br(405,{method:Y.method,pathname:re.pathname,routeId:Oe.route.id})};else{let Me=Ys(y,S,Y,_e,Oe,we?[]:l,ye),Ge=await Nt(Y,Me,ye,null);if(Te=Ge[Oe.route.id],!Te){for(let it of _e)if(Ge[it.route.id]){Te=Ge[it.route.id];break}}if(Y.signal.aborted)return{shortCircuited:!0}}if(Zn(Te)){let Me;return Se&&Se.replace!=null?Me=Se.replace:Me=Mg(Te.response.headers.get("Location"),new URL(Y.url),u)===T.location.pathname+T.location.search,await ut(Y,Te,!0,{submission:ce,replace:Me}),{shortCircuited:!0}}if(yr(Te)){let Me=bn(_e,Oe.route.id);return(Se&&Se.replace)!==!0&&(E="PUSH"),{matches:_e,pendingActionResult:[Me.route.id,Te,Oe.route.id]}}return{matches:_e,pendingActionResult:[Oe.route.id,Te]}}async function Qr(Y,re,ce,_e,ye,De,we,Se,be,Te,Oe,Me){let Ge=De||Gh(re,we),it=we||Se||Hg(Ge),dt=!ne&&!Te;if(ye){if(dt){let jt=Zr(Me);me({navigation:Ge,...jt!==void 0?{actionData:jt}:{}},{flushSync:Oe})}let We=await Ki(ce,re.pathname,Y.signal);if(We.type==="aborted")return{shortCircuited:!0};if(We.type==="error"){if(We.partialMatches.length===0){let{matches:Fr,route:xr}=jl(o);return{matches:Fr,loaderData:{},errors:{[xr.id]:We.error}}}let jt=bn(We.partialMatches).route.id;return{matches:We.partialMatches,loaderData:{},errors:{[jt]:We.error}}}else if(We.matches)ce=We.matches;else{let{error:jt,notFoundMatches:Fr,route:xr}=Vi(re.pathname);return{matches:Fr,loaderData:{},errors:{[xr.id]:jt}}}}let yt=c||o,{dsMatches:Ye,revalidatingFetchers:Xe}=Rg(Y,_e,y,S,r.history,T,ce,it,re,Te?[]:l,Te===!0,q,Z,de,Q,z,yt,u,r.patchRoutesOnNavigation!=null,Me);if(U=++j,!r.dataStrategy&&!Ye.some(We=>We.shouldLoad)&&!Ye.some(We=>We.route.middleware&&We.route.middleware.length>0)&&Xe.length===0){let We=Yt();return Ce(re,{matches:ce,loaderData:{},errors:Me&&yr(Me[1])?{[Me[0]]:Me[1].error}:null,...Ng(Me),...We?{fetchers:new Map(T.fetchers)}:{}},{flushSync:Oe}),{shortCircuited:!0}}if(dt){let We={};if(!ye){We.navigation=Ge;let jt=Zr(Me);jt!==void 0&&(We.actionData=jt)}Xe.length>0&&(We.fetchers=mi(Xe)),me(We,{flushSync:Oe})}Xe.forEach(We=>{_t(We.key),We.controller&&K.set(We.key,We.controller)});let cr=()=>Xe.forEach(We=>_t(We.key));F&&F.signal.addEventListener("abort",cr);let{loaderResults:wr,fetcherResults:ht}=await Ur(Ye,Xe,Y,_e);if(Y.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",cr),Xe.forEach(We=>K.delete(We.key));let ur=Hl(wr);if(ur)return await ut(Y,ur.result,!0,{replace:be}),{shortCircuited:!0};if(ur=Hl(ht),ur)return z.add(ur.key),await ut(Y,ur.result,!0,{replace:be}),{shortCircuited:!0};let{loaderData:ls,errors:hr}=kg(T,ce,wr,Me,Xe,ht);Te&&T.errors&&(hr={...T.errors,...hr});let tr=Yt(),cs=bo(U),kn=tr||cs||Xe.length>0;return{matches:ce,loaderData:ls,errors:hr,...kn?{fetchers:new Map(T.fetchers)}:{}}}function Zr(Y){if(Y&&!yr(Y[1]))return{[Y[0]]:Y[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function mi(Y){return Y.forEach(re=>{let ce=T.fetchers.get(re.key),_e=Qa(void 0,ce?ce.data:void 0);T.fetchers.set(re.key,_e)}),new Map(T.fetchers)}async function pi(Y,re,ce,_e){_t(Y);let ye=(_e&&_e.flushSync)===!0,De=c||o,we=pf(T.location,T.matches,u,ce,re,_e?.relative),Se=Sn(De,we,u),be=Ln(Se,De,we);if(be.active&&be.matches&&(Se=be.matches),!Se){$t(Y,re,Br(404,{pathname:we}),{flushSync:ye});return}let{path:Te,submission:Oe,error:Me}=Eg(!0,we,_e);if(Me){$t(Y,re,Me,{flushSync:ye});return}let Ge=r.getContext?await r.getContext():new yg,it=(_e&&_e.preventScrollReset)===!0;if(Oe&&Jt(Oe.formMethod)){await Wi(Y,re,Te,Se,Ge,be.active,ye,it,Oe);return}Q.set(Y,{routeId:re,path:Te}),await Gt(Y,re,Te,Se,Ge,be.active,ye,it,Oe)}async function Wi(Y,re,ce,_e,ye,De,we,Se,be){Jr(),Q.delete(Y);let Te=T.fetchers.get(Y);gt(Y,mw(be,Te),{flushSync:we});let Oe=new AbortController,Me=Gs(r.history,ce,Oe.signal,be);if(De){let Qe=await Ki(_e,new URL(Me.url).pathname,Me.signal,Y);if(Qe.type==="aborted")return;if(Qe.type==="error"){$t(Y,re,Qe.error,{flushSync:we});return}else if(Qe.matches)_e=Qe.matches;else{$t(Y,re,Br(404,{pathname:ce}),{flushSync:we});return}}let Ge=Yl(_e,ce);if(!Ge.route.action&&!Ge.route.lazy){let Qe=Br(405,{method:be.formMethod,pathname:ce,routeId:re});$t(Y,re,Qe,{flushSync:we});return}K.set(Y,Oe);let it=j,dt=Ys(y,S,Me,_e,Ge,l,ye),yt=await Nt(Me,dt,ye,Y),Ye=yt[Ge.route.id];if(!Ye){for(let Qe of dt)if(yt[Qe.route.id]){Ye=yt[Qe.route.id];break}}if(Me.signal.aborted){K.get(Y)===Oe&&K.delete(Y);return}if(de.has(Y)){if(Zn(Ye)||yr(Ye)){gt(Y,zi(void 0));return}}else{if(Zn(Ye))if(K.delete(Y),U>it){gt(Y,zi(void 0));return}else return z.add(Y),gt(Y,Qa(be)),ut(Me,Ye,!1,{fetcherSubmission:be,preventScrollReset:Se});if(yr(Ye)){$t(Y,re,Ye.error);return}}let Xe=T.navigation.location||T.location,cr=Gs(r.history,Xe,Oe.signal),wr=c||o,ht=T.navigation.state!=="idle"?Sn(wr,T.navigation.location,u):T.matches;Ie(ht,"Didn't find any matches after fetcher action");let ur=++j;N.set(Y,ur);let ls=Qa(be,Ye.data);T.fetchers.set(Y,ls);let{dsMatches:hr,revalidatingFetchers:tr}=Rg(cr,ye,y,S,r.history,T,ht,be,Xe,l,!1,q,Z,de,Q,z,wr,u,r.patchRoutesOnNavigation!=null,[Ge.route.id,Ye]);tr.filter(Qe=>Qe.key!==Y).forEach(Qe=>{let Ut=Qe.key,aa=T.fetchers.get(Ut),Oc=Qa(void 0,aa?aa.data:void 0);T.fetchers.set(Ut,Oc),_t(Ut),Qe.controller&&K.set(Ut,Qe.controller)}),me({fetchers:new Map(T.fetchers)});let cs=()=>tr.forEach(Qe=>_t(Qe.key));Oe.signal.addEventListener("abort",cs);let{loaderResults:kn,fetcherResults:We}=await Ur(hr,tr,cr,ye);if(Oe.signal.aborted)return;if(Oe.signal.removeEventListener("abort",cs),N.delete(Y),K.delete(Y),tr.forEach(Qe=>K.delete(Qe.key)),T.fetchers.has(Y)){let Qe=zi(Ye.data);T.fetchers.set(Y,Qe)}let jt=Hl(kn);if(jt)return ut(cr,jt.result,!1,{preventScrollReset:Se});if(jt=Hl(We),jt)return z.add(jt.key),ut(cr,jt.result,!1,{preventScrollReset:Se});let{loaderData:Fr,errors:xr}=kg(T,ht,kn,void 0,tr,We);bo(ur),T.navigation.state==="loading"&&ur>U?(Ie(E,"Expected pending action"),F&&F.abort(),Ce(T.navigation.location,{matches:ht,loaderData:Fr,errors:xr,fetchers:new Map(T.fetchers)})):(me({errors:xr,loaderData:Bg(T.loaderData,Fr,ht,xr),fetchers:new Map(T.fetchers)}),q=!1)}async function Gt(Y,re,ce,_e,ye,De,we,Se,be){let Te=T.fetchers.get(Y);gt(Y,Qa(be,Te?Te.data:void 0),{flushSync:we});let Oe=new AbortController,Me=Gs(r.history,ce,Oe.signal);if(De){let Xe=await Ki(_e,new URL(Me.url).pathname,Me.signal,Y);if(Xe.type==="aborted")return;if(Xe.type==="error"){$t(Y,re,Xe.error,{flushSync:we});return}else if(Xe.matches)_e=Xe.matches;else{$t(Y,re,Br(404,{pathname:ce}),{flushSync:we});return}}let Ge=Yl(_e,ce);K.set(Y,Oe);let it=j,dt=Ys(y,S,Me,_e,Ge,l,ye),Ye=(await Nt(Me,dt,ye,Y))[Ge.route.id];if(K.get(Y)===Oe&&K.delete(Y),!Me.signal.aborted){if(de.has(Y)){gt(Y,zi(void 0));return}if(Zn(Ye))if(U>it){gt(Y,zi(void 0));return}else{z.add(Y),await ut(Me,Ye,!1,{preventScrollReset:Se});return}if(yr(Ye)){$t(Y,re,Ye.error);return}gt(Y,zi(Ye.data))}}async function ut(Y,re,ce,{submission:_e,fetcherSubmission:ye,preventScrollReset:De,replace:we}={}){ce||(B?.resolve(),B=null),re.response.headers.has("X-Remix-Revalidate")&&(q=!0);let Se=re.response.headers.get("Location");Ie(Se,"Expected a Location header on the redirect Response"),Se=Mg(Se,new URL(Y.url),u);let be=ao(T.location,Se,{_isRedirect:!0});if(a){let dt=!1;if(re.response.headers.has("X-Remix-Reload-Document"))dt=!0;else if(pc(Se)){const yt=G_(Se,!0);dt=yt.origin!==n.location.origin||Pr(yt.pathname,u)==null}if(dt){we?n.location.replace(Se):n.location.assign(Se);return}}F=null;let Te=we===!0||re.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Oe,formAction:Me,formEncType:Ge}=T.navigation;!_e&&!ye&&Oe&&Me&&Ge&&(_e=Hg(T.navigation));let it=_e||ye;if(V1.has(re.response.status)&&it&&Jt(it.formMethod))await tt(Te,be,{submission:{...it,formAction:Se},preventScrollReset:De||W,enableViewTransition:ce?I:void 0});else{let dt=Gh(be,_e);await tt(Te,be,{overrideNavigation:dt,fetcherSubmission:ye,preventScrollReset:De||W,enableViewTransition:ce?I:void 0})}}async function Nt(Y,re,ce,_e){let ye,De={};try{ye=await tw(C,Y,re,_e,ce,!1)}catch(we){return re.filter(Se=>Se.shouldLoad).forEach(Se=>{De[Se.route.id]={type:"error",error:we}}),De}if(Y.signal.aborted)return De;for(let[we,Se]of Object.entries(ye))if(hw(Se)){let be=Se.result;De[we]={type:"redirect",response:sw(be,Y,we,re,u)}}else De[we]=await nw(Se);return De}async function Ur(Y,re,ce,_e){let ye=Nt(ce,Y,_e,null),De=Promise.all(re.map(async be=>{if(be.matches&&be.match&&be.request&&be.controller){let Oe=(await Nt(be.request,be.matches,_e,be.key))[be.match.route.id];return{[be.key]:Oe}}else return Promise.resolve({[be.key]:{type:"error",error:Br(404,{pathname:be.path})}})})),we=await ye,Se=(await De).reduce((be,Te)=>Object.assign(be,Te),{});return{loaderResults:we,fetcherResults:Se}}function Jr(){q=!0,Q.forEach((Y,re)=>{K.has(re)&&Z.add(re),_t(re)})}function gt(Y,re,ce={}){T.fetchers.set(Y,re),me({fetchers:new Map(T.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function $t(Y,re,ce,_e={}){let ye=bn(T.matches,re);rt(Y),me({errors:{[ye.route.id]:ce},fetchers:new Map(T.fetchers)},{flushSync:(_e&&_e.flushSync)===!0})}function er(Y){return ie.set(Y,(ie.get(Y)||0)+1),de.has(Y)&&de.delete(Y),T.fetchers.get(Y)||K1}function vi(Y,re){_t(Y,re?.reason),gt(Y,zi(null))}function rt(Y){let re=T.fetchers.get(Y);K.has(Y)&&!(re&&re.state==="loading"&&N.has(Y))&&_t(Y),Q.delete(Y),N.delete(Y),z.delete(Y),de.delete(Y),Z.delete(Y),T.fetchers.delete(Y)}function gi(Y){let re=(ie.get(Y)||0)-1;re<=0?(ie.delete(Y),de.add(Y)):ie.set(Y,re),me({fetchers:new Map(T.fetchers)})}function _t(Y,re){let ce=K.get(Y);ce&&(ce.abort(re),K.delete(Y))}function Ir(Y){for(let re of Y){let ce=er(re),_e=zi(ce.data);T.fetchers.set(re,_e)}}function Yt(){let Y=[],re=!1;for(let ce of z){let _e=T.fetchers.get(ce);Ie(_e,`Expected fetcher: ${ce}`),_e.state==="loading"&&(z.delete(ce),Y.push(ce),re=!0)}return Ir(Y),re}function bo(Y){let re=[];for(let[ce,_e]of N)if(_e<Y){let ye=T.fetchers.get(ce);Ie(ye,`Expected fetcher: ${ce}`),ye.state==="loading"&&(_t(ce),N.delete(ce),re.push(ce))}return Ir(re),re.length>0}function Tc(Y,re){let ce=T.blockers.get(Y)||Xa;return G.get(Y)!==re&&G.set(Y,re),ce}function Co(Y){T.blockers.delete(Y),G.delete(Y)}function _i(Y,re){let ce=T.blockers.get(Y)||Xa;Ie(ce.state==="unblocked"&&re.state==="blocked"||ce.state==="blocked"&&re.state==="blocked"||ce.state==="blocked"&&re.state==="proceeding"||ce.state==="blocked"&&re.state==="unblocked"||ce.state==="proceeding"&&re.state==="unblocked",`Invalid blocker state transition: ${ce.state} -> ${re.state}`);let _e=new Map(T.blockers);_e.set(Y,re),me({blockers:_e})}function Dn({currentLocation:Y,nextLocation:re,historyAction:ce}){if(G.size===0)return;G.size>1&&Et(!1,"A router only supports one blocker at a time");let _e=Array.from(G.entries()),[ye,De]=_e[_e.length-1],we=T.blockers.get(ye);if(!(we&&we.state==="proceeding")&&De({currentLocation:Y,nextLocation:re,historyAction:ce}))return ye}function Vi(Y){let re=Br(404,{pathname:Y}),ce=c||o,{matches:_e,route:ye}=jl(ce);return{notFoundMatches:_e,route:ye,error:re}}function yi(Y,re,ce){if(R=Y,h=re,b=ce||null,!m&&T.navigation===Kh){m=!0;let _e=wo(T.location,T.matches);_e!=null&&me({restoreScrollPosition:_e})}return()=>{R=null,h=null,b=null}}function On(Y,re){return b&&b(Y,re.map(_e=>v1(_e,T.loaderData)))||Y.key}function Mn(Y,re){if(R&&h){let ce=On(Y,re);R[ce]=h()}}function wo(Y,re){if(R){let ce=On(Y,re),_e=R[ce];if(typeof _e=="number")return _e}return null}function Ln(Y,re,ce){if(r.patchRoutesOnNavigation)if(Y){if(Object.keys(Y[0].params).length>0)return{active:!0,matches:ro(re,ce,u,!0)}}else return{active:!0,matches:ro(re,ce,u,!0)||[]};return{active:!1,matches:null}}async function Ki(Y,re,ce,_e){if(!r.patchRoutesOnNavigation)return{type:"success",matches:Y};let ye=Y;for(;;){let De=c==null,we=c||o,Se=S;try{await r.patchRoutesOnNavigation({signal:ce,path:re,matches:ye,fetcherKey:_e,patch:(Oe,Me)=>{ce.aborted||Ag(Oe,Me,we,Se,y,!1)}})}catch(Oe){return{type:"error",error:Oe,partialMatches:ye}}finally{De&&!ce.aborted&&(o=[...o])}if(ce.aborted)return{type:"aborted"};let be=Sn(we,re,u),Te=null;if(be){if(Object.keys(be[0].params).length===0)return{type:"success",matches:be};if(Te=ro(we,re,u,!0),!(Te&&ye.length<Te.length&&Gi(ye,Te.slice(0,ye.length))))return{type:"success",matches:be}}if(Te||(Te=ro(we,re,u,!0)),!Te||Gi(ye,Te))return{type:"success",matches:null};ye=Te}}function Gi(Y,re){return Y.length===re.length&&Y.every((ce,_e)=>ce.route.id===re[_e].route.id)}function Dc(Y){S={},c=oo(Y,y,void 0,S)}function xo(Y,re,ce=!1){let _e=c==null;Ag(Y,re,c||o,S,y,ce),_e&&(o=[...o],me({}))}return L={get basename(){return u},get future(){return v},get state(){return T},get routes(){return o},get window(){return n},initialize:he,subscribe:oe,enableScrollRestoration:yi,navigate:ze,fetch:pi,revalidate:ct,createHref:Y=>r.history.createHref(Y),encodeLocation:Y=>r.history.encodeLocation(Y),getFetcher:er,resetFetcher:vi,deleteFetcher:gi,dispose:ge,getBlocker:Tc,deleteBlocker:Co,patchRoutes:xo,_internalFetchControllers:K,_internalSetRoutes:Dc,_internalSetStateDoNotUseOrYouWillBreakYourApp(Y){me(Y)}},r.unstable_instrumentations&&(L=j1(L,r.unstable_instrumentations.map(Y=>Y.router).filter(Boolean))),L}function Y1(r){return r!=null&&("formData"in r&&r.formData!=null||"body"in r&&r.body!==void 0)}function pf(r,n,a,l,d,y){let S,o;if(d){S=[];for(let u of n)if(S.push(u),u.route.id===d){o=u;break}}else S=n,o=n[n.length-1];let c=Pf(l||".",zf(S),Pr(r.pathname,a)||r.pathname,y==="path");if(l==null&&(c.search=r.search,c.hash=r.hash),(l==null||l===""||l===".")&&o){let u=If(c.search);if(o.route.index&&!u)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!o.route.index&&u){let C=new URLSearchParams(c.search),v=C.getAll("index");C.delete("index"),v.filter(x=>x).forEach(x=>C.append("index",x));let w=C.toString();c.search=w?`?${w}`:""}}return a!=="/"&&(c.pathname=D1({basename:a,pathname:c.pathname})),ui(c)}function Eg(r,n,a){if(!a||!Y1(a))return{path:n};if(a.formMethod&&!fw(a.formMethod))return{path:n,error:Br(405,{method:a.formMethod})};let l=()=>({path:n,error:Br(400,{type:"invalid-body"})}),y=(a.formMethod||"get").toUpperCase(),S=ay(n);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Jt(y))return l();let v=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((w,[x,R])=>`${w}${x}=${R}
|
|
10
|
+
`,""):String(a.body);return{path:n,submission:{formMethod:y,formAction:S,formEncType:a.formEncType,formData:void 0,json:void 0,text:v}}}else if(a.formEncType==="application/json"){if(!Jt(y))return l();try{let v=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:n,submission:{formMethod:y,formAction:S,formEncType:a.formEncType,formData:void 0,json:v,text:void 0}}}catch{return l()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let o,c;if(a.formData)o=_f(a.formData),c=a.formData;else if(a.body instanceof FormData)o=_f(a.body),c=a.body;else if(a.body instanceof URLSearchParams)o=a.body,c=Lg(o);else if(a.body==null)o=new URLSearchParams,c=new FormData;else try{o=new URLSearchParams(a.body),c=Lg(o)}catch{return l()}let u={formMethod:y,formAction:S,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Jt(u.formMethod))return{path:n,submission:u};let C=Rn(n);return r&&C.search&&If(C.search)&&o.append("index",""),C.search=`?${o}`,{path:ui(C),submission:u}}function Rg(r,n,a,l,d,y,S,o,c,u,C,v,w,x,R,b,h,m,p,g){let A=g?yr(g[1])?g[1].error:g[1].data:void 0,D=d.createURL(y.location),L=d.createURL(c),T;if(C&&y.errors){let ee=Object.keys(y.errors)[0];T=S.findIndex(ne=>ne.route.id===ee)}else if(g&&yr(g[1])){let ee=g[0];T=S.findIndex(ne=>ne.route.id===ee)-1}let E=g?g[1].statusCode:void 0,B=E&&E>=400,W={currentUrl:D,currentParams:y.matches[0]?.params||{},nextUrl:L,nextParams:S[0].params,...o,actionResult:A,actionStatus:E},F=po(S),I=S.map((ee,ne)=>{let{route:q}=ee,Z=null;if(T!=null&&ne>T?Z=!1:q.lazy?Z=!0:Uf(q)?C?Z=vf(q,y.loaderData,y.errors):X1(y.loaderData,y.matches[ne],ee)&&(Z=!0):Z=!1,Z!==null)return gf(a,l,r,F,ee,u,n,Z);let K=B?!1:v||D.pathname+D.search===L.pathname+L.search||D.search!==L.search||Q1(y.matches[ne],ee),j={...W,defaultShouldRevalidate:K},U=nc(ee,j);return gf(a,l,r,F,ee,u,n,U,j)}),V=[];return R.forEach((ee,ne)=>{if(C||!S.some(Q=>Q.route.id===ee.routeId)||x.has(ne))return;let q=y.fetchers.get(ne),Z=q&&q.state!=="idle"&&q.data===void 0,K=Sn(h,ee.path,m);if(!K){if(p&&Z)return;V.push({key:ne,routeId:ee.routeId,path:ee.path,matches:null,match:null,request:null,controller:null});return}if(b.has(ne))return;let j=Yl(K,ee.path),U=new AbortController,N=Gs(d,ee.path,U.signal),z=null;if(w.has(ne))w.delete(ne),z=Ys(a,l,N,K,j,u,n);else if(Z)v&&(z=Ys(a,l,N,K,j,u,n));else{let Q={...W,defaultShouldRevalidate:B?!1:v};nc(j,Q)&&(z=Ys(a,l,N,K,j,u,n,Q))}z&&V.push({key:ne,routeId:ee.routeId,path:ee.path,matches:z,match:j,request:N,controller:U})}),{dsMatches:I,revalidatingFetchers:V}}function Uf(r){return r.loader!=null||r.middleware!=null&&r.middleware.length>0}function vf(r,n,a){if(r.lazy)return!0;if(!Uf(r))return!1;let l=n!=null&&r.id in n,d=a!=null&&a[r.id]!==void 0;return!l&&d?!1:typeof r.loader=="function"&&r.loader.hydrate===!0?!0:!l&&!d}function X1(r,n,a){let l=!n||a.route.id!==n.route.id,d=!r.hasOwnProperty(a.route.id);return l||d}function Q1(r,n){let a=r.route.path;return r.pathname!==n.pathname||a!=null&&a.endsWith("*")&&r.params["*"]!==n.params["*"]}function nc(r,n){if(r.route.shouldRevalidate){let a=r.route.shouldRevalidate(n);if(typeof a=="boolean")return a}return n.defaultShouldRevalidate}function Ag(r,n,a,l,d,y){let S;if(r){let u=l[r];Ie(u,`No route found to patch children into: routeId = ${r}`),u.children||(u.children=[]),S=u.children}else S=a;let o=[],c=[];if(n.forEach(u=>{let C=S.find(v=>ty(u,v));C?c.push({existingRoute:C,newRoute:u}):o.push(u)}),o.length>0){let u=oo(o,d,[r||"_","patch",String(S?.length||"0")],l);S.push(...u)}if(y&&c.length>0)for(let u=0;u<c.length;u++){let{existingRoute:C,newRoute:v}=c[u],w=C,[x]=oo([v],d,[],{},!0);Object.assign(w,{element:x.element?x.element:w.element,errorElement:x.errorElement?x.errorElement:w.errorElement,hydrateFallbackElement:x.hydrateFallbackElement?x.hydrateFallbackElement:w.hydrateFallbackElement})}}function ty(r,n){return"id"in r&&"id"in n&&r.id===n.id?!0:r.index===n.index&&r.path===n.path&&r.caseSensitive===n.caseSensitive?(!r.children||r.children.length===0)&&(!n.children||n.children.length===0)?!0:r.children.every((a,l)=>n.children?.some(d=>ty(a,d))):!1}var Tg=new WeakMap,ry=({key:r,route:n,manifest:a,mapRouteProperties:l})=>{let d=a[n.id];if(Ie(d,"No route found in manifest"),!d.lazy||typeof d.lazy!="object")return;let y=d.lazy[r];if(!y)return;let S=Tg.get(d);S||(S={},Tg.set(d,S));let o=S[r];if(o)return o;let c=(async()=>{let u=f1(r),v=d[r]!==void 0&&r!=="hasErrorBoundary";if(u)Et(!u,"Route property "+r+" is not a supported lazy route property. This property will be ignored."),S[r]=Promise.resolve();else if(v)Et(!1,`Route "${d.id}" has a static property "${r}" defined. The lazy property will be ignored.`);else{let w=await y();w!=null&&(Object.assign(d,{[r]:w}),Object.assign(d,l(d)))}typeof d.lazy=="object"&&(d.lazy[r]=void 0,Object.values(d.lazy).every(w=>w===void 0)&&(d.lazy=void 0))})();return S[r]=c,c},Dg=new WeakMap;function Z1(r,n,a,l,d){let y=a[r.id];if(Ie(y,"No route found in manifest"),!r.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof r.lazy=="function"){let C=Dg.get(y);if(C)return{lazyRoutePromise:C,lazyHandlerPromise:C};let v=(async()=>{Ie(typeof r.lazy=="function","No lazy route function found");let w=await r.lazy(),x={};for(let R in w){let b=w[R];if(b===void 0)continue;let h=m1(R),p=y[R]!==void 0&&R!=="hasErrorBoundary";h?Et(!h,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):p?Et(!p,`Route "${y.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):x[R]=b}Object.assign(y,x),Object.assign(y,{...l(y),lazy:void 0})})();return Dg.set(y,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let S=Object.keys(r.lazy),o=[],c;for(let C of S){if(d&&d.includes(C))continue;let v=ry({key:C,route:r,manifest:a,mapRouteProperties:l});v&&(o.push(v),C===n&&(c=v))}let u=o.length>0?Promise.all(o).then(()=>{}):void 0;return u?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:c}}async function Og(r){let n=r.matches.filter(d=>d.shouldLoad),a={};return(await Promise.all(n.map(d=>d.resolve()))).forEach((d,y)=>{a[n[y].route.id]=d}),a}async function J1(r){return r.matches.some(n=>n.route.middleware)?iy(r,()=>Og(r)):Og(r)}function iy(r,n){return ew(r,n,l=>l,cw,a);function a(l,d,y){if(y)return Promise.resolve(Object.assign(y.value,{[d]:{type:"error",result:l}}));{let{matches:S}=r,o=Math.min(Math.max(S.findIndex(u=>u.route.id===d),0),Math.max(S.findIndex(u=>u.shouldCallHandler()),0)),c=bn(S,S[o].route.id).route.id;return Promise.resolve({[c]:{type:"error",result:l}})}}}async function ew(r,n,a,l,d){let{matches:y,request:S,params:o,context:c,unstable_pattern:u}=r,C=y.flatMap(w=>w.route.middleware?w.route.middleware.map(x=>[w.route.id,x]):[]);return await ny({request:S,params:o,context:c,unstable_pattern:u},C,n,a,l,d)}async function ny(r,n,a,l,d,y,S=0){let{request:o}=r;if(o.signal.aborted)throw o.signal.reason??new Error(`Request aborted: ${o.method} ${o.url}`);let c=n[S];if(!c)return await a();let[u,C]=c,v,w=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await ny(r,n,a,l,d,y,S+1)},v.value}catch(x){return v={value:await y(x,u,v)},v.value}};try{let x=await C(r,w),R=x!=null?l(x):void 0;return d(R)?R:v?R??v.value:(v={value:await w()},v.value)}catch(x){return await y(x,u,v)}}function sy(r,n,a,l,d){let y=ry({key:"middleware",route:l.route,manifest:n,mapRouteProperties:r}),S=Z1(l.route,Jt(a.method)?"action":"loader",n,r,d);return{middleware:y,route:S.lazyRoutePromise,handler:S.lazyHandlerPromise}}function gf(r,n,a,l,d,y,S,o,c=null){let u=!1,C=sy(r,n,a,d,y);return{...d,_lazyPromises:C,shouldLoad:o,shouldRevalidateArgs:c,shouldCallHandler(v){return u=!0,c?typeof v=="boolean"?nc(d,{...c,defaultShouldRevalidate:v}):nc(d,c):o},resolve(v){let{lazy:w,loader:x,middleware:R}=d.route,b=u||o||v&&!Jt(a.method)&&(w||x),h=R&&R.length>0&&!x&&!w;return b&&(Jt(a.method)||!h)?rw({request:a,unstable_pattern:l,match:d,lazyHandlerPromise:C?.handler,lazyRoutePromise:C?.route,handlerOverride:v,scopedContext:S}):Promise.resolve({type:"data",result:void 0})}}}function Ys(r,n,a,l,d,y,S,o=null){return l.map(c=>c.route.id!==d.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:o,shouldCallHandler:()=>!1,_lazyPromises:sy(r,n,a,c,y),resolve:()=>Promise.resolve({type:"data",result:void 0})}:gf(r,n,a,po(l),c,y,S,!0,o))}async function tw(r,n,a,l,d,y){a.some(u=>u._lazyPromises?.middleware)&&await Promise.all(a.map(u=>u._lazyPromises?.middleware));let S={request:n,unstable_pattern:po(a),params:a[0].params,context:d,matches:a},c=await r({...S,fetcherKey:l,runClientMiddleware:u=>{let C=S;return iy(C,()=>u({...C,fetcherKey:l,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return c}async function rw({request:r,unstable_pattern:n,match:a,lazyHandlerPromise:l,lazyRoutePromise:d,handlerOverride:y,scopedContext:S}){let o,c,u=Jt(r.method),C=u?"action":"loader",v=w=>{let x,R=new Promise((m,p)=>x=p);c=()=>x(),r.signal.addEventListener("abort",c);let b=m=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${C}" [routeId: ${a.route.id}]`)):w({request:r,unstable_pattern:n,params:a.params,context:S},...m!==void 0?[m]:[]),h=(async()=>{try{return{type:"data",result:await(y?y(p=>b(p)):b())}}catch(m){return{type:"error",result:m}}})();return Promise.race([h,R])};try{let w=u?a.route.action:a.route.loader;if(l||d)if(w){let x,[R]=await Promise.all([v(w).catch(b=>{x=b}),l,d]);if(x!==void 0)throw x;o=R}else{await l;let x=u?a.route.action:a.route.loader;if(x)[o]=await Promise.all([v(x),d]);else if(C==="action"){let R=new URL(r.url),b=R.pathname+R.search;throw Br(405,{method:r.method,pathname:b,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(w)o=await v(w);else{let x=new URL(r.url),R=x.pathname+x.search;throw Br(404,{pathname:R})}}catch(w){return{type:"error",result:w}}finally{c&&r.signal.removeEventListener("abort",c)}return o}async function iw(r){let n=r.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?r.body==null?null:r.json():r.text()}async function nw(r){let{result:n,type:a}=r;if(oy(n)){let l;try{l=await iw(n)}catch(d){return{type:"error",error:d}}return a==="error"?{type:"error",error:new vc(n.status,n.statusText,l),statusCode:n.status,headers:n.headers}:{type:"data",data:l,statusCode:n.status,headers:n.headers}}return a==="error"?jg(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:lw(n),statusCode:lo(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:lo(n)?n.status:void 0}:jg(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function sw(r,n,a,l,d){let y=r.headers.get("Location");if(Ie(y,"Redirects returned/thrown from loaders/actions must have a Location header"),!pc(y)){let S=l.slice(0,l.findIndex(o=>o.route.id===a)+1);y=pf(new URL(n.url),S,d,y),r.headers.set("Location",y)}return r}function Mg(r,n,a){if(pc(r)){let l=r,d=l.startsWith("//")?new URL(n.protocol+l):new URL(l),y=Pr(d.pathname,a)!=null;if(d.origin===n.origin&&y)return d.pathname+d.search+d.hash}return r}function Gs(r,n,a,l){let d=r.createURL(ay(n)).toString(),y={signal:a};if(l&&Jt(l.formMethod)){let{formMethod:S,formEncType:o}=l;y.method=S.toUpperCase(),o==="application/json"?(y.headers=new Headers({"Content-Type":o}),y.body=JSON.stringify(l.json)):o==="text/plain"?y.body=l.text:o==="application/x-www-form-urlencoded"&&l.formData?y.body=_f(l.formData):y.body=l.formData}return new Request(d,y)}function _f(r){let n=new URLSearchParams;for(let[a,l]of r.entries())n.append(a,typeof l=="string"?l:l.name);return n}function Lg(r){let n=new FormData;for(let[a,l]of r.entries())n.append(a,l);return n}function aw(r,n,a,l=!1,d=!1){let y={},S=null,o,c=!1,u={},C=a&&yr(a[1])?a[1].error:void 0;return r.forEach(v=>{if(!(v.route.id in n))return;let w=v.route.id,x=n[w];if(Ie(!Zn(x),"Cannot handle redirect results in processLoaderData"),yr(x)){let R=x.error;if(C!==void 0&&(R=C,C=void 0),S=S||{},d)S[w]=R;else{let b=bn(r,w);S[b.route.id]==null&&(S[b.route.id]=R)}l||(y[w]=ey),c||(c=!0,o=lo(x.error)?x.error.status:500),x.headers&&(u[w]=x.headers)}else y[w]=x.data,x.statusCode&&x.statusCode!==200&&!c&&(o=x.statusCode),x.headers&&(u[w]=x.headers)}),C!==void 0&&a&&(S={[a[0]]:C},a[2]&&(y[a[2]]=void 0)),{loaderData:y,errors:S,statusCode:o||200,loaderHeaders:u}}function kg(r,n,a,l,d,y){let{loaderData:S,errors:o}=aw(n,a,l);return d.filter(c=>!c.matches||c.matches.some(u=>u.shouldLoad)).forEach(c=>{let{key:u,match:C,controller:v}=c;if(v&&v.signal.aborted)return;let w=y[u];if(Ie(w,"Did not find corresponding fetcher result"),yr(w)){let x=bn(r.matches,C?.route.id);o&&o[x.route.id]||(o={...o,[x.route.id]:w.error}),r.fetchers.delete(u)}else if(Zn(w))Ie(!1,"Unhandled fetcher revalidation redirect");else{let x=zi(w.data);r.fetchers.set(u,x)}}),{loaderData:S,errors:o}}function Bg(r,n,a,l){let d=Object.entries(n).filter(([,y])=>y!==ey).reduce((y,[S,o])=>(y[S]=o,y),{});for(let y of a){let S=y.route.id;if(!n.hasOwnProperty(S)&&r.hasOwnProperty(S)&&y.route.loader&&(d[S]=r[S]),l&&l.hasOwnProperty(S))break}return d}function Ng(r){return r?yr(r[1])?{actionData:{}}:{actionData:{[r[0]]:r[1].data}}:{}}function bn(r,n){return(n?r.slice(0,r.findIndex(l=>l.route.id===n)+1):[...r]).reverse().find(l=>l.route.hasErrorBoundary===!0)||r[0]}function jl(r){let n=r.length===1?r[0]:r.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Br(r,{pathname:n,routeId:a,method:l,type:d,message:y}={}){let S="Unknown Server Error",o="Unknown @remix-run/router error";return r===400?(S="Bad Request",l&&n&&a?o=`You made a ${l} request to "${n}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:d==="invalid-body"&&(o="Unable to encode submission body")):r===403?(S="Forbidden",o=`Route "${a}" does not match URL "${n}"`):r===404?(S="Not Found",o=`No route matches URL "${n}"`):r===405&&(S="Method Not Allowed",l&&n&&a?o=`You made a ${l.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:l&&(o=`Invalid request method "${l.toUpperCase()}"`)),new vc(r||500,S,new Error(o),!0)}function Hl(r){let n=Object.entries(r);for(let a=n.length-1;a>=0;a--){let[l,d]=n[a];if(Zn(d))return{key:l,result:d}}}function ay(r){let n=typeof r=="string"?Rn(r):r;return ui({...n,hash:""})}function ow(r,n){return r.pathname!==n.pathname||r.search!==n.search?!1:r.hash===""?n.hash!=="":r.hash===n.hash?!0:n.hash!==""}function lw(r){return new vc(r.init?.status??500,r.init?.statusText??"Internal Server Error",r.data)}function cw(r){return r!=null&&typeof r=="object"&&Object.entries(r).every(([n,a])=>typeof n=="string"&&uw(a))}function uw(r){return r!=null&&typeof r=="object"&&"type"in r&&"result"in r&&(r.type==="data"||r.type==="error")}function hw(r){return oy(r.result)&&W1.has(r.result.status)}function yr(r){return r.type==="error"}function Zn(r){return(r&&r.type)==="redirect"}function jg(r){return typeof r=="object"&&r!=null&&"type"in r&&"data"in r&&"init"in r&&r.type==="DataWithResponseInit"}function oy(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.headers=="object"&&typeof r.body<"u"}function fw(r){return q1.has(r.toUpperCase())}function Jt(r){return I1.has(r.toUpperCase())}function If(r){return new URLSearchParams(r).getAll("index").some(n=>n==="")}function Yl(r,n){let a=typeof n=="string"?Rn(n).search:n.search;if(r[r.length-1].route.index&&If(a||""))return r[r.length-1];let l=X_(r);return l[l.length-1]}function Hg(r){let{formMethod:n,formAction:a,formEncType:l,text:d,formData:y,json:S}=r;if(!(!n||!a||!l)){if(d!=null)return{formMethod:n,formAction:a,formEncType:l,formData:void 0,json:void 0,text:d};if(y!=null)return{formMethod:n,formAction:a,formEncType:l,formData:y,json:void 0,text:void 0};if(S!==void 0)return{formMethod:n,formAction:a,formEncType:l,formData:void 0,json:S,text:void 0}}}function Gh(r,n){return n?{state:"loading",location:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function dw(r,n){return{state:"submitting",location:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function Qa(r,n){return r?{state:"loading",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function mw(r,n){return{state:"submitting",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:n?n.data:void 0}}function zi(r){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function pw(r,n){try{let a=r.sessionStorage.getItem(J_);if(a){let l=JSON.parse(a);for(let[d,y]of Object.entries(l||{}))y&&Array.isArray(y)&&n.set(d,new Set(y||[]))}}catch{}}function vw(r,n){if(n.size>0){let a={};for(let[l,d]of n)a[l]=[...d];try{r.sessionStorage.setItem(J_,JSON.stringify(a))}catch(l){Et(!1,`Failed to save applied view transitions in sessionStorage (${l}).`)}}}function zg(){let r,n,a=new Promise((l,d)=>{r=async y=>{l(y);try{await a}catch{}},n=async y=>{d(y);try{await a}catch{}}});return{promise:a,resolve:r,reject:n}}var as=k.createContext(null);as.displayName="DataRouter";var vo=k.createContext(null);vo.displayName="DataRouterState";k.createContext(!1);var Ff=k.createContext({isTransitioning:!1});Ff.displayName="ViewTransition";var ly=k.createContext(new Map);ly.displayName="Fetchers";var gw=k.createContext(null);gw.displayName="Await";var Xr=k.createContext(null);Xr.displayName="Navigation";var gc=k.createContext(null);gc.displayName="Location";var fi=k.createContext({outlet:null,matches:[],isDataRoute:!1});fi.displayName="Route";var qf=k.createContext(null);qf.displayName="RouteError";function _w(r,{relative:n}={}){Ie(go(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:l}=k.useContext(Xr),{hash:d,pathname:y,search:S}=_o(r,{relative:n}),o=y;return a!=="/"&&(o=y==="/"?a:li([a,y])),l.createHref({pathname:o,search:S,hash:d})}function go(){return k.useContext(gc)!=null}function os(){return Ie(go(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(gc).location}var cy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function uy(r){k.useContext(Xr).static||k.useLayoutEffect(r)}function yw(){let{isDataRoute:r}=k.useContext(fi);return r?kw():Sw()}function Sw(){Ie(go(),"useNavigate() may be used only in the context of a <Router> component.");let r=k.useContext(as),{basename:n,navigator:a}=k.useContext(Xr),{matches:l}=k.useContext(fi),{pathname:d}=os(),y=JSON.stringify(zf(l)),S=k.useRef(!1);return uy(()=>{S.current=!0}),k.useCallback((c,u={})=>{if(Et(S.current,cy),!S.current)return;if(typeof c=="number"){a.go(c);return}let C=Pf(c,JSON.parse(y),d,u.relative==="path");r==null&&n!=="/"&&(C.pathname=C.pathname==="/"?n:li([n,C.pathname])),(u.replace?a.replace:a.push)(C,u.state,u)},[n,a,y,d,r])}k.createContext(null);function bw(){let{matches:r}=k.useContext(fi),n=r[r.length-1];return n?n.params:{}}function _o(r,{relative:n}={}){let{matches:a}=k.useContext(fi),{pathname:l}=os(),d=JSON.stringify(zf(a));return k.useMemo(()=>Pf(r,JSON.parse(d),l,n==="path"),[r,d,l,n])}function Cw(r,n,a,l,d){Ie(go(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:y}=k.useContext(Xr),{matches:S}=k.useContext(fi),o=S[S.length-1],c=o?o.params:{},u=o?o.pathname:"/",C=o?o.pathnameBase:"/",v=o&&o.route;{let p=v&&v.path||"";hy(u,!v||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
11
|
|
|
12
|
-
Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let w=os(),x;x=w;let R=x.pathname||"/",b=R;if(C!=="/"){let p=C.replace(/^\//,"").split("/");b="/"+R.replace(/^\//,"").split("/").slice(p.length).join("/")}let h=Sn(r,{pathname:b});return Et(v||h!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Et(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Aw(h&&h.map(p=>Object.assign({},p,{params:Object.assign({},c,p.params),pathname:li([C,y.encodeLocation?y.encodeLocation(p.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?C:li([C,y.encodeLocation?y.encodeLocation(p.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),S,a,l,d)}function ww(){let r=Lw(),n=lo(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),a=r instanceof Error?r.stack:null,l="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:l},y={padding:"2px 4px",backgroundColor:l},S=null;return console.error("Error handled by React Router default ErrorBoundary:",r),S=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:y},"ErrorBoundary")," or"," ",k.createElement("code",{style:y},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},n),a?k.createElement("pre",{style:d},a):null,S)}var xw=k.createElement(ww,null),Ew=class extends k.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,n){return n.location!==r.location||n.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:n.error,location:n.location,revalidation:r.revalidation||n.revalidation}}componentDidCatch(r,n){this.props.onError?this.props.onError(r,n):console.error("React Router caught the following error during render",r)}render(){return this.state.error!==void 0?k.createElement(fi.Provider,{value:this.props.routeContext},k.createElement(qf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Rw({routeContext:r,match:n,children:a}){let l=k.useContext(as);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(fi.Provider,{value:r},a)}function Aw(r,n=[],a=null,l=null,d=null){if(r==null){if(!a)return null;if(a.errors)r=a.matches;else if(n.length===0&&!a.initialized&&a.matches.length>0)r=a.matches;else return null}let y=r,S=a?.errors;if(S!=null){let C=y.findIndex(v=>v.route.id&&S?.[v.route.id]!==void 0);Ie(C>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(S).join(",")}`),y=y.slice(0,Math.min(y.length,C+1))}let o=!1,c=-1;if(a)for(let C=0;C<y.length;C++){let v=y[C];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(c=C),v.route.id){let{loaderData:w,errors:x}=a,R=v.route.loader&&!w.hasOwnProperty(v.route.id)&&(!x||x[v.route.id]===void 0);if(v.route.lazy||R){o=!0,c>=0?y=y.slice(0,c+1):y=[y[0]];break}}}let u=a&&l?(C,v)=>{l(C,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:po(a.matches),errorInfo:v})}:void 0;return y.reduceRight((C,v,w)=>{let x,R=!1,b=null,h=null;a&&(x=S&&v.route.id?S[v.route.id]:void 0,b=v.route.errorElement||xw,o&&(c<0&&w===0?(hy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,h=null):c===w&&(R=!0,h=v.route.hydrateFallbackElement||null)));let m=n.concat(y.slice(0,w+1)),p=()=>{let g;return x?g=b:R?g=h:v.route.Component?g=k.createElement(v.route.Component,null):v.route.element?g=v.route.element:g=C,k.createElement(Rw,{match:v,routeContext:{outlet:C,matches:m,isDataRoute:a!=null},children:g})};return a&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?k.createElement(Ew,{location:a.location,revalidation:a.revalidation,component:b,error:x,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):p()},null)}function Wf(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tw(r){let n=k.useContext(as);return Ie(n,Wf(r)),n}function Dw(r){let n=k.useContext(vo);return Ie(n,Wf(r)),n}function Ow(r){let n=k.useContext(fi);return Ie(n,Wf(r)),n}function Vf(r){let n=Ow(r),a=n.matches[n.matches.length-1];return Ie(a.route.id,`${r} can only be used on routes that contain a unique "id"`),a.route.id}function Mw(){return Vf("useRouteId")}function Lw(){let r=k.useContext(qf),n=Dw("useRouteError"),a=Vf("useRouteError");return r!==void 0?r:n.errors?.[a]}function kw(){let{router:r}=Tw("useNavigate"),n=Vf("useNavigate"),a=k.useRef(!1);return uy(()=>{a.current=!0}),k.useCallback(async(d,y={})=>{Et(a.current,cy),a.current&&(typeof d=="number"?await r.navigate(d):await r.navigate(d,{fromRouteId:n,...y}))},[r,n])}var Pg={};function hy(r,n,a){!n&&!Pg[r]&&(Pg[r]=!0,Et(!1,a))}var Ug={};function Ig(r,n){!r&&!Ug[n]&&(Ug[n]=!0,console.warn(n))}var Bw="useOptimistic",Fg=dc[Bw],Nw=()=>{};function jw(r){return Fg?Fg(r):[r,Nw]}function Hw(r){let n={hasErrorBoundary:r.hasErrorBoundary||r.ErrorBoundary!=null||r.errorElement!=null};return r.Component&&(r.element&&Et(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:k.createElement(r.Component),Component:void 0})),r.HydrateFallback&&(r.hydrateFallbackElement&&Et(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:k.createElement(r.HydrateFallback),HydrateFallback:void 0})),r.ErrorBoundary&&(r.errorElement&&Et(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:k.createElement(r.ErrorBoundary),ErrorBoundary:void 0})),n}var zw=["HydrateFallback","hydrateFallbackElement"],Pw=class{constructor(){this.status="pending",this.promise=new Promise((r,n)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",r(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",n(a))}})}};function Uw({router:r,flushSync:n,unstable_onError:a,unstable_useTransitions:l}){let[d,y]=k.useState(r.state),[S,o]=jw(d),[c,u]=k.useState(),[C,v]=k.useState({isTransitioning:!1}),[w,x]=k.useState(),[R,b]=k.useState(),[h,m]=k.useState(),p=k.useRef(new Map),g=k.useCallback((T,{deletedFetchers:E,newErrors:B,flushSync:W,viewTransitionOpts:F})=>{B&&a&&Object.values(B).forEach(V=>a(V,{location:T.location,params:T.matches[0]?.params??{},unstable_pattern:po(T.matches)})),T.fetchers.forEach((V,ee)=>{V.data!==void 0&&p.current.set(ee,V.data)}),E.forEach(V=>p.current.delete(V)),Ig(W===!1||n!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let I=r.window!=null&&r.window.document!=null&&typeof r.window.document.startViewTransition=="function";if(Ig(F==null||I,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!F||!I){n&&W?n(()=>y(T)):l===!1?y(T):k.startTransition(()=>{l===!0&&o(V=>qg(V,T)),y(T)});return}if(n&&W){n(()=>{R&&(w?.resolve(),R.skipTransition()),v({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let V=r.window.document.startViewTransition(()=>{n(()=>y(T))});V.finished.finally(()=>{n(()=>{x(void 0),b(void 0),u(void 0),v({isTransitioning:!1})})}),n(()=>b(V));return}R?(w?.resolve(),R.skipTransition(),m({state:T,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(u(T),v({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[r.window,n,R,w,l,o,a]);k.useLayoutEffect(()=>r.subscribe(g),[r,g]),k.useEffect(()=>{C.isTransitioning&&!C.flushSync&&x(new Pw)},[C]),k.useEffect(()=>{if(w&&c&&r.window){let T=c,E=w.promise,B=r.window.document.startViewTransition(async()=>{l===!1?y(T):k.startTransition(()=>{l===!0&&o(W=>qg(W,T)),y(T)}),await E});B.finished.finally(()=>{x(void 0),b(void 0),u(void 0),v({isTransitioning:!1})}),b(B)}},[c,w,r.window,l,o]),k.useEffect(()=>{w&&c&&S.location.key===c.location.key&&w.resolve()},[w,R,S.location,c]),k.useEffect(()=>{!C.isTransitioning&&h&&(u(h.state),v({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),m(void 0))},[C.isTransitioning,h]);let A=k.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:T=>r.navigate(T),push:(T,E,B)=>r.navigate(T,{state:E,preventScrollReset:B?.preventScrollReset}),replace:(T,E,B)=>r.navigate(T,{replace:!0,state:E,preventScrollReset:B?.preventScrollReset})}),[r]),D=r.basename||"/",L=k.useMemo(()=>({router:r,navigator:A,static:!1,basename:D,unstable_onError:a}),[r,A,D,a]);return k.createElement(k.Fragment,null,k.createElement(as.Provider,{value:L},k.createElement(vo.Provider,{value:S},k.createElement(ly.Provider,{value:p.current},k.createElement(Ff.Provider,{value:C},k.createElement(qw,{basename:D,location:S.location,navigationType:S.historyAction,navigator:A,unstable_useTransitions:l===!0},k.createElement(Iw,{routes:r.routes,future:r.future,state:S,unstable_onError:a})))))),null)}function qg(r,n){return{...r,navigation:n.navigation.state!=="idle"?n.navigation:r.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:r.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:r.actionData,fetchers:n.fetchers}}var Iw=k.memo(Fw);function Fw({routes:r,future:n,state:a,unstable_onError:l}){return Cw(r,void 0,a,l,n)}function qw({basename:r="/",children:n=null,location:a,navigationType:l="POP",navigator:d,static:y=!1,unstable_useTransitions:S}){Ie(!go(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=r.replace(/^\/*/,"/"),c=k.useMemo(()=>({basename:o,navigator:d,static:y,unstable_useTransitions:S,future:{}}),[o,d,y,S]);typeof a=="string"&&(a=Rn(a));let{pathname:u="/",search:C="",hash:v="",state:w=null,key:x="default"}=a,R=k.useMemo(()=>{let b=Pr(u,o);return b==null?null:{location:{pathname:b,search:C,hash:v,state:w,key:x},navigationType:l}},[o,u,C,v,w,x,l]);return Et(R!=null,`<Router basename="${o}"> is not able to match the URL "${u}${C}${v}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:k.createElement(Qr.Provider,{value:c},k.createElement(gc.Provider,{children:n,value:R}))}var Ql="get",Xl="application/x-www-form-urlencoded";function _c(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Ww(r){return _c(r)&&r.tagName.toLowerCase()==="button"}function Vw(r){return _c(r)&&r.tagName.toLowerCase()==="form"}function Kw(r){return _c(r)&&r.tagName.toLowerCase()==="input"}function Gw(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function $w(r,n){return r.button===0&&(!n||n==="_self")&&!Gw(r)}var zl=null;function Yw(){if(zl===null)try{new FormData(document.createElement("form"),0),zl=!1}catch{zl=!0}return zl}var Qw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $h(r){return r!=null&&!Qw.has(r)?(Et(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Xl}"`),null):r}function Xw(r,n){let a,l,d,y,S;if(Vw(r)){let o=r.getAttribute("action");l=o?Pr(o,n):null,a=r.getAttribute("method")||Ql,d=$h(r.getAttribute("enctype"))||Xl,y=new FormData(r)}else if(Ww(r)||Kw(r)&&(r.type==="submit"||r.type==="image")){let o=r.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=r.getAttribute("formaction")||o.getAttribute("action");if(l=c?Pr(c,n):null,a=r.getAttribute("formmethod")||o.getAttribute("method")||Ql,d=$h(r.getAttribute("formenctype"))||$h(o.getAttribute("enctype"))||Xl,y=new FormData(o,r),!Yw()){let{name:u,type:C,value:v}=r;if(C==="image"){let w=u?`${u}.`:"";y.append(`${w}x`,"0"),y.append(`${w}y`,"0")}else u&&y.append(u,v)}}else{if(_c(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Ql,l=null,d=Xl,S=r}return y&&d==="text/plain"&&(S=y,y=void 0),{action:l,method:a.toLowerCase(),encType:d,formData:y,body:S}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Kf(r,n){if(r===!1||r===null||typeof r>"u")throw new Error(n)}function Zw(r,n,a){let l=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return l.pathname==="/"?l.pathname=`_root.${a}`:n&&Pr(l.pathname,n)==="/"?l.pathname=`${n.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function Jw(r,n){if(r.id in n)return n[r.id];try{let a=await import(r.module);return n[r.id]=a,a}catch(a){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ex(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function tx(r,n,a){let l=await Promise.all(r.map(async d=>{let y=n.routes[d.route.id];if(y){let S=await Jw(y,a);return S.links?S.links():[]}return[]}));return sx(l.flat(1).filter(ex).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Wg(r,n,a,l,d,y){let S=(c,u)=>a[u]?c.route.id!==a[u].route.id:!0,o=(c,u)=>a[u].pathname!==c.pathname||a[u].route.path?.endsWith("*")&&a[u].params["*"]!==c.params["*"];return y==="assets"?n.filter((c,u)=>S(c,u)||o(c,u)):y==="data"?n.filter((c,u)=>{let C=l.routes[c.route.id];if(!C||!C.hasLoader)return!1;if(S(c,u)||o(c,u))return!0;if(c.route.shouldRevalidate){let v=c.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function rx(r,n,{includeHydrateFallback:a}={}){return ix(r.map(l=>{let d=n.routes[l.route.id];if(!d)return[];let y=[d.module];return d.clientActionModule&&(y=y.concat(d.clientActionModule)),d.clientLoaderModule&&(y=y.concat(d.clientLoaderModule)),a&&d.hydrateFallbackModule&&(y=y.concat(d.hydrateFallbackModule)),d.imports&&(y=y.concat(d.imports)),y}).flat(1))}function ix(r){return[...new Set(r)]}function nx(r){let n={},a=Object.keys(r).sort();for(let l of a)n[l]=r[l];return n}function sx(r,n){let a=new Set;return new Set(n),r.reduce((l,d)=>{let y=JSON.stringify(nx(d));return a.has(y)||(a.add(y),l.push({key:y,link:d})),l},[])}function fy(){let r=k.useContext(as);return Kf(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function ax(){let r=k.useContext(vo);return Kf(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var Gf=k.createContext(void 0);Gf.displayName="FrameworkContext";function dy(){let r=k.useContext(Gf);return Kf(r,"You must render this element inside a <HydratedRouter> element"),r}function ox(r,n){let a=k.useContext(Gf),[l,d]=k.useState(!1),[y,S]=k.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:u,onMouseLeave:C,onTouchStart:v}=n,w=k.useRef(null);k.useEffect(()=>{if(r==="render"&&S(!0),r==="viewport"){let b=m=>{m.forEach(p=>{S(p.isIntersecting)})},h=new IntersectionObserver(b,{threshold:.5});return w.current&&h.observe(w.current),()=>{h.disconnect()}}},[r]),k.useEffect(()=>{if(l){let b=setTimeout(()=>{S(!0)},100);return()=>{clearTimeout(b)}}},[l]);let x=()=>{d(!0)},R=()=>{d(!1),S(!1)};return a?r!=="intent"?[y,w,{}]:[y,w,{onFocus:Za(o,x),onBlur:Za(c,R),onMouseEnter:Za(u,x),onMouseLeave:Za(C,R),onTouchStart:Za(v,x)}]:[!1,w,{}]}function Za(r,n){return a=>{r&&r(a),a.defaultPrevented||n(a)}}function lx({page:r,...n}){let{router:a}=fy(),l=k.useMemo(()=>Sn(a.routes,r,a.basename),[a.routes,r,a.basename]);return l?k.createElement(ux,{page:r,matches:l,...n}):null}function cx(r){let{manifest:n,routeModules:a}=dy(),[l,d]=k.useState([]);return k.useEffect(()=>{let y=!1;return tx(r,n,a).then(S=>{y||d(S)}),()=>{y=!0}},[r,n,a]),l}function ux({page:r,matches:n,...a}){let l=os(),{manifest:d,routeModules:y}=dy(),{basename:S}=fy(),{loaderData:o,matches:c}=ax(),u=k.useMemo(()=>Wg(r,n,c,d,l,"data"),[r,n,c,d,l]),C=k.useMemo(()=>Wg(r,n,c,d,l,"assets"),[r,n,c,d,l]),v=k.useMemo(()=>{if(r===l.pathname+l.search+l.hash)return[];let R=new Set,b=!1;if(n.forEach(m=>{let p=d.routes[m.route.id];!p||!p.hasLoader||(!u.some(g=>g.route.id===m.route.id)&&m.route.id in o&&y[m.route.id]?.shouldRevalidate||p.hasClientLoader?b=!0:R.add(m.route.id))}),R.size===0)return[];let h=Zw(r,S,"data");return b&&R.size>0&&h.searchParams.set("_routes",n.filter(m=>R.has(m.route.id)).map(m=>m.route.id).join(",")),[h.pathname+h.search]},[S,o,l,d,u,n,r,y]),w=k.useMemo(()=>rx(C,d),[C,d]),x=cx(C);return k.createElement(k.Fragment,null,v.map(R=>k.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...a})),w.map(R=>k.createElement("link",{key:R,rel:"modulepreload",href:R,...a})),x.map(({key:R,link:b})=>k.createElement("link",{key:R,nonce:a.nonce,...b})))}function hx(...r){return n=>{r.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var my=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{my&&(window.__reactRouterVersion="7.10.1")}catch{}function fx(r,n){return $1({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:l1({window:n?.window}),hydrationData:dx(),routes:r,mapRouteProperties:Hw,hydrationRouteProperties:zw,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,unstable_instrumentations:n?.unstable_instrumentations}).initialize()}function dx(){let r=window?.__staticRouterHydrationData;return r&&r.errors&&(r={...r,errors:mx(r.errors)}),r}function mx(r){if(!r)return null;let n=Object.entries(r),a={};for(let[l,d]of n)if(d&&d.__type==="RouteErrorResponse")a[l]=new vc(d.status,d.statusText,d.data,d.internal===!0);else if(d&&d.__type==="Error"){if(d.__subType){let y=window[d.__subType];if(typeof y=="function")try{let S=new y(d.message);S.stack="",a[l]=S}catch{}}if(a[l]==null){let y=new Error(d.message);y.stack="",a[l]=y}}else a[l]=d;return a}var py=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jr=k.forwardRef(function({onClick:n,discover:a="render",prefetch:l="none",relative:d,reloadDocument:y,replace:S,state:o,target:c,to:u,preventScrollReset:C,viewTransition:v,...w},x){let{basename:R,unstable_useTransitions:b}=k.useContext(Qr),h=typeof u=="string"&&py.test(u),m,p=!1;if(typeof u=="string"&&h&&(m=u,my))try{let W=new URL(window.location.href),F=u.startsWith("//")?new URL(W.protocol+u):new URL(u),I=Pr(F.pathname,R);F.origin===W.origin&&I!=null?u=I+F.search+F.hash:p=!0}catch{Et(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=_w(u,{relative:d}),[A,D,L]=ox(l,w),T=_x(u,{replace:S,state:o,target:c,preventScrollReset:C,relative:d,viewTransition:v,unstable_useTransitions:b});function E(W){n&&n(W),W.defaultPrevented||T(W)}let B=k.createElement("a",{...w,...L,href:m||g,onClick:p||y?n:E,ref:hx(x,D),target:c,"data-discover":!h&&a==="render"?"true":void 0});return A&&!h?k.createElement(k.Fragment,null,B,k.createElement(lx,{page:g})):B});jr.displayName="Link";var px=k.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:l="",end:d=!1,style:y,to:S,viewTransition:o,children:c,...u},C){let v=_o(S,{relative:u.relative}),w=os(),x=k.useContext(vo),{navigator:R,basename:b}=k.useContext(Qr),h=x!=null&&wx(v)&&o===!0,m=R.encodeLocation?R.encodeLocation(v).pathname:v.pathname,p=w.pathname,g=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;a||(p=p.toLowerCase(),g=g?g.toLowerCase():null,m=m.toLowerCase()),g&&b&&(g=Pr(g,b)||g);const A=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let D=p===m||!d&&p.startsWith(m)&&p.charAt(A)==="/",L=g!=null&&(g===m||!d&&g.startsWith(m)&&g.charAt(m.length)==="/"),T={isActive:D,isPending:L,isTransitioning:h},E=D?n:void 0,B;typeof l=="function"?B=l(T):B=[l,D?"active":null,L?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let W=typeof y=="function"?y(T):y;return k.createElement(jr,{...u,"aria-current":E,className:B,ref:C,style:W,to:S,viewTransition:o},typeof c=="function"?c(T):c)});px.displayName="NavLink";var vx=k.forwardRef(({discover:r="render",fetcherKey:n,navigate:a,reloadDocument:l,replace:d,state:y,method:S=Ql,action:o,onSubmit:c,relative:u,preventScrollReset:C,viewTransition:v,...w},x)=>{let{unstable_useTransitions:R}=k.useContext(Qr),b=bx(),h=Cx(o,{relative:u}),m=S.toLowerCase()==="get"?"get":"post",p=typeof o=="string"&&py.test(o),g=A=>{if(c&&c(A),A.defaultPrevented)return;A.preventDefault();let D=A.nativeEvent.submitter,L=D?.getAttribute("formmethod")||S,T=()=>b(D||A.currentTarget,{fetcherKey:n,method:L,navigate:a,replace:d,state:y,relative:u,preventScrollReset:C,viewTransition:v});R&&a!==!1?k.startTransition(()=>T()):T()};return k.createElement("form",{ref:x,method:m,action:h,onSubmit:l?c:g,...w,"data-discover":!p&&r==="render"?"true":void 0})});vx.displayName="Form";function gx(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vy(r){let n=k.useContext(as);return Ie(n,gx(r)),n}function _x(r,{target:n,replace:a,state:l,preventScrollReset:d,relative:y,viewTransition:S,unstable_useTransitions:o}={}){let c=yw(),u=os(),C=_o(r,{relative:y});return k.useCallback(v=>{if($w(v,n)){v.preventDefault();let w=a!==void 0?a:ui(u)===ui(C),x=()=>c(r,{replace:w,state:l,preventScrollReset:d,relative:y,viewTransition:S});o?k.startTransition(()=>x()):x()}},[u,c,C,a,l,n,r,d,y,S,o])}var yx=0,Sx=()=>`__${String(++yx)}__`;function bx(){let{router:r}=vy("useSubmit"),{basename:n}=k.useContext(Qr),a=Mw(),l=r.fetch,d=r.navigate;return k.useCallback(async(y,S={})=>{let{action:o,method:c,encType:u,formData:C,body:v}=Xw(y,n);if(S.navigate===!1){let w=S.fetcherKey||Sx();await l(w,a,S.action||o,{preventScrollReset:S.preventScrollReset,formData:C,body:v,formMethod:S.method||c,formEncType:S.encType||u,flushSync:S.flushSync})}else await d(S.action||o,{preventScrollReset:S.preventScrollReset,formData:C,body:v,formMethod:S.method||c,formEncType:S.encType||u,replace:S.replace,state:S.state,fromRouteId:a,flushSync:S.flushSync,viewTransition:S.viewTransition})},[l,d,n,a])}function Cx(r,{relative:n}={}){let{basename:a}=k.useContext(Qr),l=k.useContext(fi);Ie(l,"useFormAction must be used inside a RouteContext");let[d]=l.matches.slice(-1),y={..._o(r||".",{relative:n})},S=os();if(r==null){y.search=S.search;let o=new URLSearchParams(y.search),c=o.getAll("index");if(c.some(C=>C==="")){o.delete("index"),c.filter(v=>v).forEach(v=>o.append("index",v));let C=o.toString();y.search=C?`?${C}`:""}}return(!r||r===".")&&d.route.index&&(y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(y.pathname=y.pathname==="/"?a:li([a,y.pathname])),ui(y)}function wx(r,{relative:n}={}){let a=k.useContext(Ff);Ie(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=vy("useViewTransitionState"),d=_o(r,{relative:n});if(!a.isTransitioning)return!1;let y=Pr(a.currentLocation.pathname,l)||a.currentLocation.pathname,S=Pr(a.nextLocation.pathname,l)||a.nextLocation.pathname;return ic(d.pathname,S)!=null||ic(d.pathname,y)!=null}var ea=B_();const xx=Lf(ea);function Ex(r){return k.createElement(Uw,{flushSync:ea.flushSync,...r})}const Hr="/api";class gy extends Error{constructor(n,a,l){super(n),this.statusCode=a,this.details=l,this.name="ApiError"}}async function zr(r,n){const a=await fetch(r,{...n,headers:{"Content-Type":"application/json",...n?.headers}}),l=await a.json();if(!a.ok||!l.success)throw new gy(l.error||"API request failed",a.status,l.details);return l.data}const $f={list:async()=>zr(`${Hr}/branches`),get:async r=>{const n=encodeURIComponent(r);return zr(`${Hr}/branches/${n}`)},sync:async(r,n)=>{const a=encodeURIComponent(r);return zr(`${Hr}/branches/${a}/sync`,{method:"POST",body:JSON.stringify(n)})}},Rx={list:async()=>zr(`${Hr}/worktrees`),create:async r=>zr(`${Hr}/worktrees`,{method:"POST",body:JSON.stringify(r)}),delete:async r=>{const n=new URL(`${Hr}/worktrees/delete`,window.location.origin);n.searchParams.set("path",r),await zr(n.toString(),{method:"DELETE"})}},Yf={list:async()=>zr(`${Hr}/sessions`),start:async r=>zr(`${Hr}/sessions`,{method:"POST",body:JSON.stringify(r)}),get:async r=>zr(`${Hr}/sessions/${r}`),delete:async r=>{await zr(`${Hr}/sessions/${r}`,{method:"DELETE"})}},_y={get:async()=>zr(`${Hr}/config`),update:async r=>zr(`${Hr}/config`,{method:"PUT",body:JSON.stringify(r)})};function Ax(){return mc({queryKey:["branches"],queryFn:$f.list})}function Tx(r){return mc({queryKey:["branches",r],queryFn:()=>$f.get(r),enabled:!!r})}function Dx(r){const n=ss();return mo({mutationFn:a=>$f.sync(r,a),onSuccess:a=>{n.setQueryData(["branches",r],a.branch),n.invalidateQueries({queryKey:["branches"]})}})}function yy(r){var n,a,l="";if(typeof r=="string"||typeof r=="number")l+=r;else if(typeof r=="object")if(Array.isArray(r)){var d=r.length;for(n=0;n<d;n++)r[n]&&(a=yy(r[n]))&&(l&&(l+=" "),l+=a)}else for(a in r)r[a]&&(l&&(l+=" "),l+=a);return l}function Sy(){for(var r,n,a=0,l="",d=arguments.length;a<d;a++)(r=arguments[a])&&(n=yy(r))&&(l&&(l+=" "),l+=n);return l}const Ox=(r,n)=>{const a=new Array(r.length+n.length);for(let l=0;l<r.length;l++)a[l]=r[l];for(let l=0;l<n.length;l++)a[r.length+l]=n[l];return a},Mx=(r,n)=>({classGroupId:r,validator:n}),by=(r=new Map,n=null,a)=>({nextPart:r,validators:n,classGroupId:a}),sc="-",Vg=[],Lx="arbitrary..",kx=r=>{const n=Nx(r),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=r;return{getClassGroupId:S=>{if(S.startsWith("[")&&S.endsWith("]"))return Bx(S);const o=S.split(sc),c=o[0]===""&&o.length>1?1:0;return Cy(o,c,n)},getConflictingClassGroupIds:(S,o)=>{if(o){const c=l[S],u=a[S];return c?u?Ox(u,c):c:u||Vg}return a[S]||Vg}}},Cy=(r,n,a)=>{if(r.length-n===0)return a.classGroupId;const d=r[n],y=a.nextPart.get(d);if(y){const u=Cy(r,n+1,y);if(u)return u}const S=a.validators;if(S===null)return;const o=n===0?r.join(sc):r.slice(n).join(sc),c=S.length;for(let u=0;u<c;u++){const C=S[u];if(C.validator(o))return C.classGroupId}},Bx=r=>r.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=r.slice(1,-1),a=n.indexOf(":"),l=n.slice(0,a);return l?Lx+l:void 0})(),Nx=r=>{const{theme:n,classGroups:a}=r;return jx(a,n)},jx=(r,n)=>{const a=by();for(const l in r){const d=r[l];Qf(d,a,l,n)}return a},Qf=(r,n,a,l)=>{const d=r.length;for(let y=0;y<d;y++){const S=r[y];Hx(S,n,a,l)}},Hx=(r,n,a,l)=>{if(typeof r=="string"){zx(r,n,a);return}if(typeof r=="function"){Px(r,n,a,l);return}Ux(r,n,a,l)},zx=(r,n,a)=>{const l=r===""?n:wy(n,r);l.classGroupId=a},Px=(r,n,a,l)=>{if(Ix(r)){Qf(r(l),n,a,l);return}n.validators===null&&(n.validators=[]),n.validators.push(Mx(a,r))},Ux=(r,n,a,l)=>{const d=Object.entries(r),y=d.length;for(let S=0;S<y;S++){const[o,c]=d[S];Qf(c,wy(n,o),a,l)}},wy=(r,n)=>{let a=r;const l=n.split(sc),d=l.length;for(let y=0;y<d;y++){const S=l[y];let o=a.nextPart.get(S);o||(o=by(),a.nextPart.set(S,o)),a=o}return a},Ix=r=>"isThemeGetter"in r&&r.isThemeGetter===!0,Fx=r=>{if(r<1)return{get:()=>{},set:()=>{}};let n=0,a=Object.create(null),l=Object.create(null);const d=(y,S)=>{a[y]=S,n++,n>r&&(n=0,l=a,a=Object.create(null))};return{get(y){let S=a[y];if(S!==void 0)return S;if((S=l[y])!==void 0)return d(y,S),S},set(y,S){y in a?a[y]=S:d(y,S)}}},yf="!",Kg=":",qx=[],Gg=(r,n,a,l,d)=>({modifiers:r,hasImportantModifier:n,baseClassName:a,maybePostfixModifierPosition:l,isExternal:d}),Wx=r=>{const{prefix:n,experimentalParseClassName:a}=r;let l=d=>{const y=[];let S=0,o=0,c=0,u;const C=d.length;for(let b=0;b<C;b++){const h=d[b];if(S===0&&o===0){if(h===Kg){y.push(d.slice(c,b)),c=b+1;continue}if(h==="/"){u=b;continue}}h==="["?S++:h==="]"?S--:h==="("?o++:h===")"&&o--}const v=y.length===0?d:d.slice(c);let w=v,x=!1;v.endsWith(yf)?(w=v.slice(0,-1),x=!0):v.startsWith(yf)&&(w=v.slice(1),x=!0);const R=u&&u>c?u-c:void 0;return Gg(y,x,w,R)};if(n){const d=n+Kg,y=l;l=S=>S.startsWith(d)?y(S.slice(d.length)):Gg(qx,!1,S,void 0,!0)}if(a){const d=l;l=y=>a({className:y,parseClassName:d})}return l},Vx=r=>{const n=new Map;return r.orderSensitiveModifiers.forEach((a,l)=>{n.set(a,1e6+l)}),a=>{const l=[];let d=[];for(let y=0;y<a.length;y++){const S=a[y],o=S[0]==="[",c=n.has(S);o||c?(d.length>0&&(d.sort(),l.push(...d),d=[]),l.push(S)):d.push(S)}return d.length>0&&(d.sort(),l.push(...d)),l}},Kx=r=>({cache:Fx(r.cacheSize),parseClassName:Wx(r),sortModifiers:Vx(r),...kx(r)}),Gx=/\s+/,$x=(r,n)=>{const{parseClassName:a,getClassGroupId:l,getConflictingClassGroupIds:d,sortModifiers:y}=n,S=[],o=r.trim().split(Gx);let c="";for(let u=o.length-1;u>=0;u-=1){const C=o[u],{isExternal:v,modifiers:w,hasImportantModifier:x,baseClassName:R,maybePostfixModifierPosition:b}=a(C);if(v){c=C+(c.length>0?" "+c:c);continue}let h=!!b,m=l(h?R.substring(0,b):R);if(!m){if(!h){c=C+(c.length>0?" "+c:c);continue}if(m=l(R),!m){c=C+(c.length>0?" "+c:c);continue}h=!1}const p=w.length===0?"":w.length===1?w[0]:y(w).join(":"),g=x?p+yf:p,A=g+m;if(S.indexOf(A)>-1)continue;S.push(A);const D=d(m,h);for(let L=0;L<D.length;++L){const T=D[L];S.push(g+T)}c=C+(c.length>0?" "+c:c)}return c},Yx=(...r)=>{let n=0,a,l,d="";for(;n<r.length;)(a=r[n++])&&(l=xy(a))&&(d&&(d+=" "),d+=l);return d},xy=r=>{if(typeof r=="string")return r;let n,a="";for(let l=0;l<r.length;l++)r[l]&&(n=xy(r[l]))&&(a&&(a+=" "),a+=n);return a},Qx=(r,...n)=>{let a,l,d,y;const S=c=>{const u=n.reduce((C,v)=>v(C),r());return a=Kx(u),l=a.cache.get,d=a.cache.set,y=o,o(c)},o=c=>{const u=l(c);if(u)return u;const C=$x(c,a);return d(c,C),C};return y=S,(...c)=>y(Yx(...c))},Xx=[],kt=r=>{const n=a=>a[r]||Xx;return n.isThemeGetter=!0,n},Ey=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ry=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Zx=/^\d+\/\d+$/,Jx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eE=/\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$/,tE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qs=r=>Zx.test(r),Pe=r=>!!r&&!Number.isNaN(Number(r)),_n=r=>!!r&&Number.isInteger(Number(r)),Yh=r=>r.endsWith("%")&&Pe(r.slice(0,-1)),Hi=r=>Jx.test(r),nE=()=>!0,sE=r=>eE.test(r)&&!tE.test(r),Ay=()=>!1,aE=r=>rE.test(r),oE=r=>iE.test(r),lE=r=>!Ee(r)&&!Re(r),cE=r=>ta(r,Oy,Ay),Ee=r=>Ey.test(r),Qn=r=>ta(r,My,sE),Qh=r=>ta(r,mE,Pe),$g=r=>ta(r,Ty,Ay),uE=r=>ta(r,Dy,oE),Pl=r=>ta(r,Ly,aE),Re=r=>Ry.test(r),Ja=r=>ra(r,My),hE=r=>ra(r,pE),Yg=r=>ra(r,Ty),fE=r=>ra(r,Oy),dE=r=>ra(r,Dy),Ul=r=>ra(r,Ly,!0),ta=(r,n,a)=>{const l=Ey.exec(r);return l?l[1]?n(l[1]):a(l[2]):!1},ra=(r,n,a=!1)=>{const l=Ry.exec(r);return l?l[1]?n(l[1]):a:!1},Ty=r=>r==="position"||r==="percentage",Dy=r=>r==="image"||r==="url",Oy=r=>r==="length"||r==="size"||r==="bg-size",My=r=>r==="length",mE=r=>r==="number",pE=r=>r==="family-name",Ly=r=>r==="shadow",vE=()=>{const r=kt("color"),n=kt("font"),a=kt("text"),l=kt("font-weight"),d=kt("tracking"),y=kt("leading"),S=kt("breakpoint"),o=kt("container"),c=kt("spacing"),u=kt("radius"),C=kt("shadow"),v=kt("inset-shadow"),w=kt("text-shadow"),x=kt("drop-shadow"),R=kt("blur"),b=kt("perspective"),h=kt("aspect"),m=kt("ease"),p=kt("animate"),g=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...A(),Re,Ee],L=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],E=()=>[Re,Ee,c],B=()=>[qs,"full","auto",...E()],W=()=>[_n,"none","subgrid",Re,Ee],F=()=>["auto",{span:["full",_n,Re,Ee]},_n,Re,Ee],I=()=>[_n,"auto",Re,Ee],V=()=>["auto","min","max","fr",Re,Ee],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...E()],Z=()=>[qs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],K=()=>[r,Re,Ee],j=()=>[...A(),Yg,$g,{position:[Re,Ee]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",fE,cE,{size:[Re,Ee]}],z=()=>[Yh,Ja,Qn],X=()=>["","none","full",u,Re,Ee],ie=()=>["",Pe,Ja,Qn],de=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[Pe,Yh,Yg,$g],P=()=>["","none",R,Re,Ee],he=()=>["none",Pe,Re,Ee],ge=()=>["none",Pe,Re,Ee],oe=()=>[Pe,Re,Ee],me=()=>[qs,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Hi],breakpoint:[Hi],color:[nE],container:[Hi],"drop-shadow":[Hi],ease:["in","out","in-out"],font:[lE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Hi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Hi],shadow:[Hi],spacing:["px",Pe],text:[Hi],"text-shadow":[Hi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qs,Ee,Re,h]}],container:["container"],columns:[{columns:[Pe,Ee,Re,o]}],"break-after":[{"break-after":g()}],"break-before":[{"break-before":g()}],"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:D()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[_n,"auto",Re,Ee]}],basis:[{basis:[qs,"full","auto",o,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,qs,"auto","initial","none",Ee]}],grow:[{grow:["",Pe,Re,Ee]}],shrink:[{shrink:["",Pe,Re,Ee]}],order:[{order:[_n,"first","last","none",Re,Ee]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[o,"screen",...Z()]}],"min-w":[{"min-w":[o,"screen","none",...Z()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[S]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",a,Ja,Qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,Re,Qh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yh,Ee]}],"font-family":[{font:[hE,Ee,n]}],"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:[d,Re,Ee]}],"line-clamp":[{"line-clamp":[Pe,"none",Re,Qh]}],leading:[{leading:[y,...E()]}],"list-image":[{"list-image":["none",Re,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",Re,Qn]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Pe,"auto",Re,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,Ee]}],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",Re,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_n,Re,Ee],radial:["",Re,Ee],conic:[_n,Re,Ee]},dE,uE]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,Re,Ee]}],"outline-w":[{outline:["",Pe,Ja,Qn]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",C,Ul,Pl]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",v,Ul,Pl]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Pe,Qn]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",w,Ul,Pl]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Pe,Re,Ee]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Re,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Ee]}],filter:[{filter:["","none",Re,Ee]}],blur:[{blur:P()}],brightness:[{brightness:[Pe,Re,Ee]}],contrast:[{contrast:[Pe,Re,Ee]}],"drop-shadow":[{"drop-shadow":["","none",x,Ul,Pl]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Pe,Re,Ee]}],"hue-rotate":[{"hue-rotate":[Pe,Re,Ee]}],invert:[{invert:["",Pe,Re,Ee]}],saturate:[{saturate:[Pe,Re,Ee]}],sepia:[{sepia:["",Pe,Re,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Ee]}],"backdrop-blur":[{"backdrop-blur":P()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,Re,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,Re,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,Re,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,Re,Ee]}],"backdrop-invert":[{"backdrop-invert":["",Pe,Re,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,Re,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,Re,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,Re,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Re,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",Re,Ee]}],ease:[{ease:["linear","initial",m,Re,Ee]}],delay:[{delay:[Pe,Re,Ee]}],animate:[{animate:["none",p,Re,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,Re,Ee]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[Re,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",Re,Ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",Re,Ee]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Pe,Ja,Qn,Qh]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},gE=Qx(vE);function Ue(...r){return gE(Sy(r))}const zt=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("rounded-lg border border-border bg-card text-card-foreground shadow",r),...n}));zt.displayName="Card";const br=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("flex flex-col space-y-1.5 p-6",r),...n}));br.displayName="CardHeader";const _E=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("font-semibold leading-none tracking-tight",r),...n}));_E.displayName="CardTitle";const yE=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("text-sm text-muted-foreground",r),...n}));yE.displayName="CardDescription";const Vt=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("p-6 pt-0",r),...n}));Vt.displayName="CardContent";const ky=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("flex items-center p-6 pt-0",r),...n}));ky.displayName="CardFooter";const Qg=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Xg=Sy,Xf=(r,n)=>a=>{var l;if(n?.variants==null)return Xg(r,a?.class,a?.className);const{variants:d,defaultVariants:y}=n,S=Object.keys(d).map(u=>{const C=a?.[u],v=y?.[u];if(C===null)return null;const w=Qg(C)||Qg(v);return d[u][w]}),o=a&&Object.entries(a).reduce((u,C)=>{let[v,w]=C;return w===void 0||(u[v]=w),u},{}),c=n==null||(l=n.compoundVariants)===null||l===void 0?void 0:l.reduce((u,C)=>{let{class:v,className:w,...x}=C;return Object.entries(x).every(R=>{let[b,h]=R;return Array.isArray(h)?h.includes({...y,...o}[b]):{...y,...o}[b]===h})?[...u,v,w]:u},[]);return Xg(r,S,c,a?.class,a?.className)},SE=Xf("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-500/15 text-green-400 border-green-500/30",warning:"border-transparent bg-yellow-500/15 text-yellow-400 border-yellow-500/30",local:"border-transparent bg-purple-500/15 text-purple-400 border-purple-500/30",remote:"border-transparent bg-blue-500/15 text-blue-400 border-blue-500/30"}},defaultVariants:{variant:"default"}});function Ct({className:r,variant:n,...a}){return O.jsx("div",{className:Ue(SE({variant:n}),r),...a})}const eo="__unknown__";function bE(r){return r.name.length>32?`${r.name.slice(0,29)}...`:r.name}function CE(r){if(!r.divergence)return"divergence: n/a";const{ahead:n,behind:a,upToDate:l}=r.divergence;return l?"divergence: up-to-date":`divergence: +${n} / -${a}`}function wE({branches:r}){const n=k.useMemo(()=>new Map(r.map(d=>[d.name,d])),[r]),a=k.useMemo(()=>{const d=new Set;return r.forEach(y=>{y.baseBranch&&d.add(y.baseBranch)}),d},[r]),l=k.useMemo(()=>{const d=new Map;return r.forEach(y=>{const S=y.baseBranch??eo;if(!(!y.baseBranch&&a.has(y.name))){if(!d.has(S)){const o=S!==eo?n.get(S)??null:null;d.set(S,{id:S,baseLabel:S===eo?"ベース不明":S,baseNode:o,nodes:[],isSyntheticBase:o===null})}d.get(S)?.nodes.push(y)}}),Array.from(d.values()).sort((y,S)=>y.id===eo?1:S.id===eo?-1:y.baseLabel.localeCompare(S.baseLabel,"ja"))},[r,n,a]);return l.length?O.jsxs(zt,{children:[O.jsx(br,{className:"pb-4",children:O.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[O.jsxs("div",{children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"BRANCH GRAPH"}),O.jsx("h2",{className:"mt-1 text-lg font-semibold",children:"ベースブランチの関係をグラフィカルに把握"}),O.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"baseRef、Git upstream、merge-baseヒューリスティクスを用いて推定したベースブランチ単位で派生ノードをレーン表示します。"})]}),O.jsxs("div",{className:"flex flex-wrap gap-2",children:[O.jsx(Ct,{variant:"outline",children:"Base"}),O.jsx(Ct,{variant:"local",children:"Local"}),O.jsx(Ct,{variant:"remote",children:"Remote"}),O.jsx(Ct,{variant:"success",children:"Worktree"})]})]})}),O.jsx(Vt,{className:"space-y-4",children:l.map(d=>O.jsxs("article",{className:"rounded-lg border bg-muted/30 p-4",children:[O.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("span",{className:"font-semibold",children:d.baseLabel}),d.baseNode&&O.jsx(Ct,{variant:d.baseNode.type==="local"?"local":"remote",className:"text-xs",children:d.baseNode.type==="local"?"LOCAL":"REMOTE"}),d.isSyntheticBase&&O.jsx(Ct,{variant:"outline",className:"text-xs text-muted-foreground",children:"推定のみ"})]}),O.jsxs("span",{className:"text-sm text-muted-foreground",children:[d.nodes.length," branch",d.nodes.length>1?"es":""]})]}),O.jsxs("div",{className:"flex flex-wrap gap-2",children:[xE(d),d.nodes.map(y=>O.jsx(EE,{branch:y},y.name))]})]},d.id))})]}):O.jsx(zt,{className:"border-dashed",children:O.jsxs(Vt,{className:"flex flex-col items-center justify-center py-12 text-center",children:[O.jsx("p",{className:"text-muted-foreground",children:"グラフ表示できるブランチがありません。"}),O.jsx("p",{className:"text-sm text-muted-foreground",children:"fetch済みのブランチやWorktreeを追加すると関係図が表示されます。"})]})})}function xE(r){const n=r.baseLabel==="ベース不明"?"Unknown base":r.baseLabel,a=O.jsxs("div",{className:Ue("group relative rounded-md border bg-card px-3 py-2 transition-colors hover:border-muted-foreground/50",r.baseNode?.type==="local"&&"border-l-2 border-l-local",r.baseNode?.type==="remote"&&"border-l-2 border-l-remote"),children:[O.jsx("span",{className:"block truncate text-sm font-medium",children:n}),O.jsx("span",{className:"text-xs text-muted-foreground",children:"BASE"}),O.jsxs("div",{className:"invisible absolute bottom-full left-0 z-10 mb-2 w-48 rounded-md border bg-popover p-2 text-xs shadow-md group-hover:visible",children:[O.jsx("p",{className:"font-medium",children:n}),O.jsx("p",{className:"text-muted-foreground",children:r.baseNode?`type: ${r.baseNode.type}`:"推定されたベースブランチ"})]})]});return r.baseNode?O.jsx(jr,{to:`/${encodeURIComponent(r.baseNode.name)}`,className:"block","aria-label":`ベースブランチ ${r.baseNode.name} を開く`,children:a},`base-${r.id}`):O.jsx("div",{children:a},`base-${r.id}`)}function EE({branch:r}){const n=O.jsxs("div",{className:Ue("group relative rounded-md border bg-card px-3 py-2 transition-colors hover:border-muted-foreground/50",r.type==="local"&&"border-l-2 border-l-local",r.type==="remote"&&"border-l-2 border-l-remote",r.mergeStatus==="merged"&&"opacity-60"),children:[O.jsx("span",{className:"block truncate text-sm font-medium",children:bE(r)}),O.jsx("span",{className:"text-xs text-muted-foreground",children:r.worktreePath?"Worktree":"No Worktree"}),O.jsxs("div",{className:"invisible absolute bottom-full left-0 z-10 mb-2 w-56 rounded-md border bg-popover p-2 text-xs shadow-md group-hover:visible",children:[O.jsx("p",{className:"font-medium",children:r.name}),O.jsxs("p",{className:"text-muted-foreground",children:["base: ",r.baseBranch??"unknown"]}),O.jsx("p",{className:"text-muted-foreground",children:CE(r)}),O.jsx("p",{className:"text-muted-foreground",children:r.worktreePath??"Worktree未作成"})]})]});return O.jsx(jr,{to:`/${encodeURIComponent(r.name)}`,className:"block","aria-label":`${r.name} の詳細を開く`,children:n})}function Gr({eyebrow:r,title:n,subtitle:a,actions:l,children:d,className:y}){return O.jsx("header",{className:Ue("border-b border-border bg-card/50 px-6 py-8",y),children:O.jsxs("div",{className:"mx-auto max-w-7xl",children:[r&&O.jsx("p",{className:"mb-2 text-xs font-medium uppercase tracking-widest text-muted-foreground",children:r}),O.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[O.jsxs("div",{children:[O.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:n}),a&&O.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:a}),d]}),l&&O.jsx("div",{className:"flex gap-2",children:l})]})]})})}function Il({label:r,value:n,hint:a,className:l}){return O.jsxs(zt,{className:Ue("p-5",l),children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:r}),O.jsx("p",{className:"mt-1 text-3xl font-semibold tabular-nums",children:n}),a&&O.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:a})]})}const RE=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),AE=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,l)=>l?l.toUpperCase():a.toLowerCase()),Zg=r=>{const n=AE(r);return n.charAt(0).toUpperCase()+n.slice(1)},By=(...r)=>r.filter((n,a,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===a).join(" ").trim(),TE=r=>{for(const n in r)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var DE={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 OE=k.forwardRef(({color:r="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:d="",children:y,iconNode:S,...o},c)=>k.createElement("svg",{ref:c,...DE,width:n,height:n,stroke:r,strokeWidth:l?Number(a)*24/Number(n):a,className:By("lucide",d),...!y&&!TE(o)&&{"aria-hidden":"true"},...o},[...S.map(([u,C])=>k.createElement(u,C)),...Array.isArray(y)?y:[y]]));const yc=(r,n)=>{const a=k.forwardRef(({className:l,...d},y)=>k.createElement(OE,{ref:y,iconNode:n,className:By(`lucide-${RE(Zg(r))}`,`lucide-${r}`,l),...d}));return a.displayName=Zg(r),a};const ME=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],LE=yc("check",ME);const kE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ny=yc("chevron-down",kE);const BE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],NE=yc("chevron-up",BE);const jE=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],HE=yc("search",jE),co=k.forwardRef(({className:r,type:n,...a},l)=>O.jsx("input",{type:n,className:Ue("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:l,...a}));co.displayName="Input";function zE({value:r,onChange:n,placeholder:a="Search...",className:l,count:d}){return O.jsxs("div",{className:Ue("flex items-center gap-3",l),children:[O.jsxs("div",{className:"relative flex-1",children:[O.jsx(HE,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),O.jsx(co,{type:"text",value:r,onChange:y=>n(y.target.value),placeholder:a,className:"pl-9"})]}),d&&O.jsxs("span",{className:"text-sm text-muted-foreground",children:[d.filtered," / ",d.total]})]})}function Jg(r,n){if(typeof r=="function")return r(n);r!=null&&(r.current=n)}function yo(...r){return n=>{let a=!1;const l=r.map(d=>{const y=Jg(d,n);return!a&&typeof y=="function"&&(a=!0),y});if(a)return()=>{for(let d=0;d<l.length;d++){const y=l[d];typeof y=="function"?y():Jg(r[d],null)}}}}function Kt(...r){return k.useCallback(yo(...r),r)}var PE=Symbol.for("react.lazy"),ac=dc[" use ".trim().toString()];function UE(r){return typeof r=="object"&&r!==null&&"then"in r}function jy(r){return r!=null&&typeof r=="object"&&"$$typeof"in r&&r.$$typeof===PE&&"_payload"in r&&UE(r._payload)}function IE(r){const n=qE(r),a=k.forwardRef((l,d)=>{let{children:y,...S}=l;jy(y)&&typeof ac=="function"&&(y=ac(y._payload));const o=k.Children.toArray(y),c=o.find(VE);if(c){const u=c.props.children,C=o.map(v=>v===c?k.Children.count(u)>1?k.Children.only(null):k.isValidElement(u)?u.props.children:null:v);return O.jsx(n,{...S,ref:d,children:k.isValidElement(u)?k.cloneElement(u,void 0,C):null})}return O.jsx(n,{...S,ref:d,children:y})});return a.displayName=`${r}.Slot`,a}var FE=IE("Slot");function qE(r){const n=k.forwardRef((a,l)=>{let{children:d,...y}=a;if(jy(d)&&typeof ac=="function"&&(d=ac(d._payload)),k.isValidElement(d)){const S=GE(d),o=KE(y,d.props);return d.type!==k.Fragment&&(o.ref=l?yo(l,S):S),k.cloneElement(d,o)}return k.Children.count(d)>1?k.Children.only(null):null});return n.displayName=`${r}.SlotClone`,n}var WE=Symbol("radix.slottable");function VE(r){return k.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===WE}function KE(r,n){const a={...n};for(const l in n){const d=r[l],y=n[l];/^on[A-Z]/.test(l)?d&&y?a[l]=(...o)=>{const c=y(...o);return d(...o),c}:d&&(a[l]=d):l==="style"?a[l]={...d,...y}:l==="className"&&(a[l]=[d,y].filter(Boolean).join(" "))}return{...r,...a}}function GE(r){let n=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?r.ref:(n=Object.getOwnPropertyDescriptor(r,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?r.props.ref:r.props.ref||r.ref)}const $E=Xf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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 shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-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-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Pt=k.forwardRef(({className:r,variant:n,size:a,asChild:l=!1,...d},y)=>{const S=l?FE:"button";return O.jsx(S,{className:Ue($E({variant:n,size:a,className:r})),ref:y,...d})});Pt.displayName="Button";const YE=Xf("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",success:"border-green-500/50 bg-green-500/10 text-green-400 [&>svg]:text-green-400",warning:"border-yellow-500/50 bg-yellow-500/10 text-yellow-400 [&>svg]:text-yellow-400",info:"border-blue-500/50 bg-blue-500/10 text-blue-400 [&>svg]:text-blue-400"}},defaultVariants:{variant:"default"}}),Ui=k.forwardRef(({className:r,variant:n,...a},l)=>O.jsx("div",{ref:l,role:"alert",className:Ue(YE({variant:n}),r),...a}));Ui.displayName="Alert";const QE=k.forwardRef(({className:r,...n},a)=>O.jsx("h5",{ref:a,className:Ue("mb-1 font-medium leading-none tracking-tight",r),...n}));QE.displayName="AlertTitle";const Ii=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("text-sm [&_p]:leading-relaxed",r),...n}));Ii.displayName="AlertDescription";const Fl=new Intl.NumberFormat("ja-JP");function XE(){const{data:r,isLoading:n,error:a}=Ax(),[l,d]=k.useState(""),y=r??[],S=k.useMemo(()=>{const u=y.filter(w=>!!w.worktreePath).length,C=y.filter(w=>w.type==="remote").length,v=y.filter(w=>w.divergence?.upToDate).length;return{total:y.length,worktrees:u,remote:C,healthy:v}},[y]),o=l.trim().toLowerCase(),c=k.useMemo(()=>o?y.filter(u=>[u.name,u.type,u.mergeStatus,u.commitMessage??"",u.worktreePath??""].join(" ").toLowerCase().includes(o)):y,[y,o]);return n?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"WORKTREE DASHBOARD",title:"gwt Control Center",subtitle:"Loading branch data..."}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx("div",{className:"flex items-center justify-center py-20",children:O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"mb-4 text-4xl",children:"⏳"}),O.jsx("p",{className:"text-muted-foreground",children:"Loading branches..."})]})})})]}):a?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"WORKTREE DASHBOARD",title:"gwt Control Center"}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx(Ui,{variant:"destructive",children:O.jsx(Ii,{children:a instanceof Error?a.message:"Failed to load branches"})})})]}):y.length?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"WORKTREE DASHBOARD",title:"gwt Control Center",subtitle:"Manage Git branches and AI tools from your browser"}),O.jsxs("main",{className:"mx-auto max-w-7xl space-y-6 px-6 py-8",children:[c.length>0&&O.jsx(wE,{branches:c}),O.jsxs("section",{className:"grid grid-cols-2 gap-4 md:grid-cols-4",children:[O.jsx(Il,{label:"Total Branches",value:Fl.format(S.total),hint:"Local + Remote"}),O.jsx(Il,{label:"Active Worktrees",value:Fl.format(S.worktrees),hint:"Ready for AI tools"}),O.jsx(Il,{label:"Remote Tracking",value:Fl.format(S.remote),hint:"Synced with origin"}),O.jsx(Il,{label:"Up to Date",value:Fl.format(S.healthy),hint:"No divergence"})]}),O.jsx(zE,{value:l,onChange:d,placeholder:"Search branches by name, type, or commit...",count:{filtered:c.length,total:S.total}}),c.length===0?O.jsx(zt,{className:"border-dashed",children:O.jsxs(Vt,{className:"flex flex-col items-center justify-center py-12",children:[O.jsx("h3",{className:"mb-2 text-lg font-semibold",children:"No matching branches"}),O.jsx("p",{className:"text-sm text-muted-foreground",children:"Try a different search term or clear the filter."})]})}):O.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:c.map(u=>O.jsx(ZE,{branch:u},u.name))})]})]}):O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"WORKTREE DASHBOARD",title:"gwt Control Center"}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx(zt,{className:"border-dashed",children:O.jsxs(Vt,{className:"flex flex-col items-center justify-center py-12",children:[O.jsx("div",{className:"mb-4 text-4xl",children:"📭"}),O.jsx("h3",{className:"mb-2 text-lg font-semibold",children:"No branches found"}),O.jsxs("p",{className:"text-sm text-muted-foreground",children:["Try running"," ",O.jsx("code",{className:"rounded bg-muted px-1",children:"git fetch origin"})," ","to sync branches."]})]})})})]})}function ZE({branch:r}){return O.jsxs(zt,{className:"flex flex-col transition-colors hover:border-muted-foreground/50",children:[O.jsx(br,{className:"pb-3",children:O.jsxs("div",{className:"flex items-start justify-between gap-2",children:[O.jsxs("div",{className:"min-w-0 flex-1",children:[O.jsxs("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[r.type==="local"?"Local":"Remote"," Branch"]}),O.jsx("h3",{className:"mt-1 truncate font-semibold",title:r.name,children:r.name})]}),O.jsxs("div",{className:"flex flex-wrap justify-end gap-1",children:[O.jsx(Ct,{variant:r.type==="local"?"local":"remote",children:r.type==="local"?"L":"R"}),r.worktreePath&&O.jsx(Ct,{variant:"success",children:"WT"})]})]})}),O.jsxs(Vt,{className:"flex-1 pb-3",children:[O.jsx("p",{className:"line-clamp-2 text-sm text-muted-foreground",children:r.commitMessage??"No commit message"}),r.divergence&&O.jsxs("div",{className:"mt-3 flex flex-wrap gap-1.5",children:[r.divergence.ahead>0&&O.jsxs(Ct,{variant:"outline",className:"text-xs",children:["↑ ",r.divergence.ahead]}),r.divergence.behind>0&&O.jsxs(Ct,{variant:"outline",className:"text-xs",children:["↓ ",r.divergence.behind]}),O.jsx(Ct,{variant:r.divergence.upToDate?"success":"warning",className:"text-xs",children:r.divergence.upToDate?"Up to date":"Needs sync"})]})]}),O.jsx(ky,{className:"pt-0",children:O.jsx(Pt,{variant:"ghost",size:"sm",asChild:!0,className:"w-full",children:O.jsx(jr,{to:`/${encodeURIComponent(r.name)}`,children:"View Details →"})})})]})}function JE(){const r=ss();return mo({mutationFn:n=>Rx.create(n),onSuccess:()=>{r.invalidateQueries({queryKey:["worktrees"]}),r.invalidateQueries({queryKey:["branches"]})}})}function eR(){return mc({queryKey:["sessions"],queryFn:Yf.list})}function tR(){const r=ss();return mo({mutationFn:n=>Yf.start(n),onSuccess:n=>{r.setQueryData(["sessions"],a=>{const l=a?.filter(d=>d.sessionId!==n.sessionId)??[];return[n,...l]}),r.invalidateQueries({queryKey:["sessions"]})}})}function rR(){const r=ss();return mo({mutationFn:n=>Yf.delete(n),onSuccess:()=>{r.invalidateQueries({queryKey:["sessions"]})}})}function Hy(){return mc({queryKey:["config"],queryFn:_y.get})}function iR(){const r=ss();return mo({mutationFn:_y.update,onSuccess:n=>{r.setQueryData(["config"],n)}})}const Zf=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{className:"relative w-full overflow-auto",children:O.jsx("table",{ref:a,className:Ue("w-full caption-bottom text-sm",r),...n})}));Zf.displayName="Table";const Jf=k.forwardRef(({className:r,...n},a)=>O.jsx("thead",{ref:a,className:Ue("[&_tr]:border-b",r),...n}));Jf.displayName="TableHeader";const ed=k.forwardRef(({className:r,...n},a)=>O.jsx("tbody",{ref:a,className:Ue("[&_tr:last-child]:border-0",r),...n}));ed.displayName="TableBody";const nR=k.forwardRef(({className:r,...n},a)=>O.jsx("tfoot",{ref:a,className:Ue("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",r),...n}));nR.displayName="TableFooter";const uo=k.forwardRef(({className:r,...n},a)=>O.jsx("tr",{ref:a,className:Ue("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...n}));uo.displayName="TableRow";const ni=k.forwardRef(({className:r,...n},a)=>O.jsx("th",{ref:a,className:Ue("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",r),...n}));ni.displayName="TableHead";const si=k.forwardRef(({className:r,...n},a)=>O.jsx("td",{ref:a,className:Ue("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",r),...n}));si.displayName="TableCell";const sR=k.forwardRef(({className:r,...n},a)=>O.jsx("caption",{ref:a,className:Ue("mt-4 text-sm text-muted-foreground",r),...n}));sR.displayName="TableCaption";const aR={pending:"outline",running:"success",completed:"default",failed:"destructive"},oR={pending:"Pending",running:"Running",completed:"Completed",failed:"Failed"};function e_(r){if(!r)return"--";try{return new Intl.DateTimeFormat("ja-JP",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(r))}catch{return r}}function lR(r,n){return r==="custom"?n??"Custom":r==="codex-cli"?"Codex CLI":"Claude Code"}function cR({sessions:r,isLoading:n,terminatingSessionId:a,isDeleting:l,onTerminate:d,onSelectSession:y}){return O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-3",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Session History"}),O.jsx("h3",{className:"mt-1 text-lg font-semibold",children:"セッション履歴"})]}),n&&O.jsx(Ct,{variant:"outline",className:"animate-pulse",children:"読み込み中..."})]}),O.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"この Worktree に紐づいた AI セッション履歴です。CLI からの起動分も共有されます。"})]}),O.jsx(Vt,{children:r.length===0?O.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"セッション履歴はまだありません。"}):O.jsx("div",{className:"overflow-x-auto rounded-md border",children:O.jsxs(Zf,{children:[O.jsx(Jf,{children:O.jsxs(uo,{children:[O.jsx(ni,{className:"w-24",children:"状態"}),O.jsx(ni,{children:"ツール"}),O.jsx(ni,{className:"w-20",children:"モード"}),O.jsx(ni,{children:"開始"}),O.jsx(ni,{children:"終了"}),O.jsx(ni,{className:"w-24 text-right",children:"操作"})]})}),O.jsx(ed,{children:r.slice(0,5).map(S=>O.jsxs(uo,{className:"cursor-pointer hover:bg-muted/50",onClick:()=>{S.status==="running"&&y(S.sessionId)},children:[O.jsx(si,{children:O.jsx(Ct,{variant:aR[S.status],children:oR[S.status]})}),O.jsx(si,{className:"font-medium",children:lR(S.toolType,S.toolName)}),O.jsx(si,{children:O.jsx("span",{className:"text-muted-foreground",children:S.mode})}),O.jsx(si,{className:"text-muted-foreground",children:e_(S.startedAt)}),O.jsx(si,{className:"text-muted-foreground",children:e_(S.endedAt)}),O.jsx(si,{className:"text-right",children:S.status==="running"?O.jsx(Pt,{variant:"ghost",size:"sm",onClick:o=>{o.stopPropagation(),d(S.sessionId)},disabled:a===S.sessionId||l,children:a===S.sessionId?"終了中...":"終了"}):O.jsx("span",{className:"text-sm text-muted-foreground",children:"--"})})]},S.sessionId))})]})})})]})}function t_(r,[n,a]){return Math.min(a,Math.max(n,r))}function Mt(r,n,{checkForDefaultPrevented:a=!0}={}){return function(d){if(r?.(d),a===!1||!d.defaultPrevented)return n?.(d)}}function td(r,n=[]){let a=[];function l(y,S){const o=k.createContext(S),c=a.length;a=[...a,S];const u=v=>{const{scope:w,children:x,...R}=v,b=w?.[r]?.[c]||o,h=k.useMemo(()=>R,Object.values(R));return O.jsx(b.Provider,{value:h,children:x})};u.displayName=y+"Provider";function C(v,w){const x=w?.[r]?.[c]||o,R=k.useContext(x);if(R)return R;if(S!==void 0)return S;throw new Error(`\`${v}\` must be used within \`${y}\``)}return[u,C]}const d=()=>{const y=a.map(S=>k.createContext(S));return function(o){const c=o?.[r]||y;return k.useMemo(()=>({[`__scope${r}`]:{...o,[r]:c}}),[o,c])}};return d.scopeName=r,[l,uR(d,...n)]}function uR(...r){const n=r[0];if(r.length===1)return n;const a=()=>{const l=r.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(y){const S=l.reduce((o,{useScope:c,scopeName:u})=>{const v=c(y)[`__scope${u}`];return{...o,...v}},{});return k.useMemo(()=>({[`__scope${n.scopeName}`]:S}),[S])}};return a.scopeName=n.scopeName,a}function r_(r){const n=hR(r),a=k.forwardRef((l,d)=>{const{children:y,...S}=l,o=k.Children.toArray(y),c=o.find(dR);if(c){const u=c.props.children,C=o.map(v=>v===c?k.Children.count(u)>1?k.Children.only(null):k.isValidElement(u)?u.props.children:null:v);return O.jsx(n,{...S,ref:d,children:k.isValidElement(u)?k.cloneElement(u,void 0,C):null})}return O.jsx(n,{...S,ref:d,children:y})});return a.displayName=`${r}.Slot`,a}function hR(r){const n=k.forwardRef((a,l)=>{const{children:d,...y}=a;if(k.isValidElement(d)){const S=pR(d),o=mR(y,d.props);return d.type!==k.Fragment&&(o.ref=l?yo(l,S):S),k.cloneElement(d,o)}return k.Children.count(d)>1?k.Children.only(null):null});return n.displayName=`${r}.SlotClone`,n}var fR=Symbol("radix.slottable");function dR(r){return k.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===fR}function mR(r,n){const a={...n};for(const l in n){const d=r[l],y=n[l];/^on[A-Z]/.test(l)?d&&y?a[l]=(...o)=>{const c=y(...o);return d(...o),c}:d&&(a[l]=d):l==="style"?a[l]={...d,...y}:l==="className"&&(a[l]=[d,y].filter(Boolean).join(" "))}return{...r,...a}}function pR(r){let n=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?r.ref:(n=Object.getOwnPropertyDescriptor(r,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?r.props.ref:r.props.ref||r.ref)}function vR(r){const n=r+"CollectionProvider",[a,l]=td(n),[d,y]=a(n,{collectionRef:{current:null},itemMap:new Map}),S=b=>{const{scope:h,children:m}=b,p=Pi.useRef(null),g=Pi.useRef(new Map).current;return O.jsx(d,{scope:h,itemMap:g,collectionRef:p,children:m})};S.displayName=n;const o=r+"CollectionSlot",c=r_(o),u=Pi.forwardRef((b,h)=>{const{scope:m,children:p}=b,g=y(o,m),A=Kt(h,g.collectionRef);return O.jsx(c,{ref:A,children:p})});u.displayName=o;const C=r+"CollectionItemSlot",v="data-radix-collection-item",w=r_(C),x=Pi.forwardRef((b,h)=>{const{scope:m,children:p,...g}=b,A=Pi.useRef(null),D=Kt(h,A),L=y(C,m);return Pi.useEffect(()=>(L.itemMap.set(A,{ref:A,...g}),()=>void L.itemMap.delete(A))),O.jsx(w,{[v]:"",ref:D,children:p})});x.displayName=C;function R(b){const h=y(r+"CollectionConsumer",b);return Pi.useCallback(()=>{const p=h.collectionRef.current;if(!p)return[];const g=Array.from(p.querySelectorAll(`[${v}]`));return Array.from(h.itemMap.values()).sort((L,T)=>g.indexOf(L.ref.current)-g.indexOf(T.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:S,Slot:u,ItemSlot:x},R,l]}var gR=k.createContext(void 0);function _R(r){const n=k.useContext(gR);return r||n||"ltr"}function yR(r){const n=SR(r),a=k.forwardRef((l,d)=>{const{children:y,...S}=l,o=k.Children.toArray(y),c=o.find(CR);if(c){const u=c.props.children,C=o.map(v=>v===c?k.Children.count(u)>1?k.Children.only(null):k.isValidElement(u)?u.props.children:null:v);return O.jsx(n,{...S,ref:d,children:k.isValidElement(u)?k.cloneElement(u,void 0,C):null})}return O.jsx(n,{...S,ref:d,children:y})});return a.displayName=`${r}.Slot`,a}function SR(r){const n=k.forwardRef((a,l)=>{const{children:d,...y}=a;if(k.isValidElement(d)){const S=xR(d),o=wR(y,d.props);return d.type!==k.Fragment&&(o.ref=l?yo(l,S):S),k.cloneElement(d,o)}return k.Children.count(d)>1?k.Children.only(null):null});return n.displayName=`${r}.SlotClone`,n}var bR=Symbol("radix.slottable");function CR(r){return k.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===bR}function wR(r,n){const a={...n};for(const l in n){const d=r[l],y=n[l];/^on[A-Z]/.test(l)?d&&y?a[l]=(...o)=>{const c=y(...o);return d(...o),c}:d&&(a[l]=d):l==="style"?a[l]={...d,...y}:l==="className"&&(a[l]=[d,y].filter(Boolean).join(" "))}return{...r,...a}}function xR(r){let n=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?r.ref:(n=Object.getOwnPropertyDescriptor(r,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?r.props.ref:r.props.ref||r.ref)}var ER=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rt=ER.reduce((r,n)=>{const a=yR(`Primitive.${n}`),l=k.forwardRef((d,y)=>{const{asChild:S,...o}=d,c=S?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(c,{...o,ref:y})});return l.displayName=`Primitive.${n}`,{...r,[n]:l}},{});function RR(r,n){r&&ea.flushSync(()=>r.dispatchEvent(n))}function ts(r){const n=k.useRef(r);return k.useEffect(()=>{n.current=r}),k.useMemo(()=>(...a)=>n.current?.(...a),[])}function AR(r,n=globalThis?.document){const a=ts(r);k.useEffect(()=>{const l=d=>{d.key==="Escape"&&a(d)};return n.addEventListener("keydown",l,{capture:!0}),()=>n.removeEventListener("keydown",l,{capture:!0})},[a,n])}var TR="DismissableLayer",Sf="dismissableLayer.update",DR="dismissableLayer.pointerDownOutside",OR="dismissableLayer.focusOutside",i_,zy=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Py=k.forwardRef((r,n)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:y,onInteractOutside:S,onDismiss:o,...c}=r,u=k.useContext(zy),[C,v]=k.useState(null),w=C?.ownerDocument??globalThis?.document,[,x]=k.useState({}),R=Kt(n,T=>v(T)),b=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(h),p=C?b.indexOf(C):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,A=p>=m,D=kR(T=>{const E=T.target,B=[...u.branches].some(W=>W.contains(E));!A||B||(d?.(T),S?.(T),T.defaultPrevented||o?.())},w),L=BR(T=>{const E=T.target;[...u.branches].some(W=>W.contains(E))||(y?.(T),S?.(T),T.defaultPrevented||o?.())},w);return AR(T=>{p===u.layers.size-1&&(l?.(T),!T.defaultPrevented&&o&&(T.preventDefault(),o()))},w),k.useEffect(()=>{if(C)return a&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(i_=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(C)),u.layers.add(C),n_(),()=>{a&&u.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=i_)}},[C,w,a,u]),k.useEffect(()=>()=>{C&&(u.layers.delete(C),u.layersWithOutsidePointerEventsDisabled.delete(C),n_())},[C,u]),k.useEffect(()=>{const T=()=>x({});return document.addEventListener(Sf,T),()=>document.removeEventListener(Sf,T)},[]),O.jsx(Rt.div,{...c,ref:R,style:{pointerEvents:g?A?"auto":"none":void 0,...r.style},onFocusCapture:Mt(r.onFocusCapture,L.onFocusCapture),onBlurCapture:Mt(r.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Mt(r.onPointerDownCapture,D.onPointerDownCapture)})});Py.displayName=TR;var MR="DismissableLayerBranch",LR=k.forwardRef((r,n)=>{const a=k.useContext(zy),l=k.useRef(null),d=Kt(n,l);return k.useEffect(()=>{const y=l.current;if(y)return a.branches.add(y),()=>{a.branches.delete(y)}},[a.branches]),O.jsx(Rt.div,{...r,ref:d})});LR.displayName=MR;function kR(r,n=globalThis?.document){const a=ts(r),l=k.useRef(!1),d=k.useRef(()=>{});return k.useEffect(()=>{const y=o=>{if(o.target&&!l.current){let c=function(){Uy(DR,a,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(n.removeEventListener("click",d.current),d.current=c,n.addEventListener("click",d.current,{once:!0})):c()}else n.removeEventListener("click",d.current);l.current=!1},S=window.setTimeout(()=>{n.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(S),n.removeEventListener("pointerdown",y),n.removeEventListener("click",d.current)}},[n,a]),{onPointerDownCapture:()=>l.current=!0}}function BR(r,n=globalThis?.document){const a=ts(r),l=k.useRef(!1);return k.useEffect(()=>{const d=y=>{y.target&&!l.current&&Uy(OR,a,{originalEvent:y},{discrete:!1})};return n.addEventListener("focusin",d),()=>n.removeEventListener("focusin",d)},[n,a]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function n_(){const r=new CustomEvent(Sf);document.dispatchEvent(r)}function Uy(r,n,a,{discrete:l}){const d=a.originalEvent.target,y=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:a});n&&d.addEventListener(r,n,{once:!0}),l?RR(d,y):d.dispatchEvent(y)}var Xh=0;function NR(){k.useEffect(()=>{const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",r[0]??s_()),document.body.insertAdjacentElement("beforeend",r[1]??s_()),Xh++,()=>{Xh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Xh--}},[])}function s_(){const r=document.createElement("span");return r.setAttribute("data-radix-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}var Zh="focusScope.autoFocusOnMount",Jh="focusScope.autoFocusOnUnmount",a_={bubbles:!1,cancelable:!0},jR="FocusScope",Iy=k.forwardRef((r,n)=>{const{loop:a=!1,trapped:l=!1,onMountAutoFocus:d,onUnmountAutoFocus:y,...S}=r,[o,c]=k.useState(null),u=ts(d),C=ts(y),v=k.useRef(null),w=Kt(n,b=>c(b)),x=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(l){let b=function(g){if(x.paused||!o)return;const A=g.target;o.contains(A)?v.current=A:yn(v.current,{select:!0})},h=function(g){if(x.paused||!o)return;const A=g.relatedTarget;A!==null&&(o.contains(A)||yn(v.current,{select:!0}))},m=function(g){if(document.activeElement===document.body)for(const D of g)D.removedNodes.length>0&&yn(o)};document.addEventListener("focusin",b),document.addEventListener("focusout",h);const p=new MutationObserver(m);return o&&p.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",h),p.disconnect()}}},[l,o,x.paused]),k.useEffect(()=>{if(o){l_.add(x);const b=document.activeElement;if(!o.contains(b)){const m=new CustomEvent(Zh,a_);o.addEventListener(Zh,u),o.dispatchEvent(m),m.defaultPrevented||(HR(FR(Fy(o)),{select:!0}),document.activeElement===b&&yn(o))}return()=>{o.removeEventListener(Zh,u),setTimeout(()=>{const m=new CustomEvent(Jh,a_);o.addEventListener(Jh,C),o.dispatchEvent(m),m.defaultPrevented||yn(b??document.body,{select:!0}),o.removeEventListener(Jh,C),l_.remove(x)},0)}}},[o,u,C,x]);const R=k.useCallback(b=>{if(!a&&!l||x.paused)return;const h=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,m=document.activeElement;if(h&&m){const p=b.currentTarget,[g,A]=zR(p);g&&A?!b.shiftKey&&m===A?(b.preventDefault(),a&&yn(g,{select:!0})):b.shiftKey&&m===g&&(b.preventDefault(),a&&yn(A,{select:!0})):m===p&&b.preventDefault()}},[a,l,x.paused]);return O.jsx(Rt.div,{tabIndex:-1,...S,ref:w,onKeyDown:R})});Iy.displayName=jR;function HR(r,{select:n=!1}={}){const a=document.activeElement;for(const l of r)if(yn(l,{select:n}),document.activeElement!==a)return}function zR(r){const n=Fy(r),a=o_(n,r),l=o_(n.reverse(),r);return[a,l]}function Fy(r){const n=[],a=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const d=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||d?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)n.push(a.currentNode);return n}function o_(r,n){for(const a of r)if(!PR(a,{upTo:n}))return a}function PR(r,{upTo:n}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(n!==void 0&&r===n)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}function UR(r){return r instanceof HTMLInputElement&&"select"in r}function yn(r,{select:n=!1}={}){if(r&&r.focus){const a=document.activeElement;r.focus({preventScroll:!0}),r!==a&&UR(r)&&n&&r.select()}}var l_=IR();function IR(){let r=[];return{add(n){const a=r[0];n!==a&&a?.pause(),r=c_(r,n),r.unshift(n)},remove(n){r=c_(r,n),r[0]?.resume()}}}function c_(r,n){const a=[...r],l=a.indexOf(n);return l!==-1&&a.splice(l,1),a}function FR(r){return r.filter(n=>n.tagName!=="A")}var lr=globalThis?.document?k.useLayoutEffect:()=>{},qR=dc[" useId ".trim().toString()]||(()=>{}),WR=0;function rd(r){const[n,a]=k.useState(qR());return lr(()=>{a(l=>l??String(WR++))},[r]),n?`radix-${n}`:""}const VR=["top","right","bottom","left"],xn=Math.min,Sr=Math.max,oc=Math.round,ql=Math.floor,ci=r=>({x:r,y:r}),KR={left:"right",right:"left",bottom:"top",top:"bottom"},GR={start:"end",end:"start"};function bf(r,n,a){return Sr(r,xn(n,a))}function Fi(r,n){return typeof r=="function"?r(n):r}function qi(r){return r.split("-")[0]}function ia(r){return r.split("-")[1]}function id(r){return r==="x"?"y":"x"}function nd(r){return r==="y"?"height":"width"}const $R=new Set(["top","bottom"]);function oi(r){return $R.has(qi(r))?"y":"x"}function sd(r){return id(oi(r))}function YR(r,n,a){a===void 0&&(a=!1);const l=ia(r),d=sd(r),y=nd(d);let S=d==="x"?l===(a?"end":"start")?"right":"left":l==="start"?"bottom":"top";return n.reference[y]>n.floating[y]&&(S=lc(S)),[S,lc(S)]}function QR(r){const n=lc(r);return[Cf(r),n,Cf(n)]}function Cf(r){return r.replace(/start|end/g,n=>GR[n])}const u_=["left","right"],h_=["right","left"],XR=["top","bottom"],ZR=["bottom","top"];function JR(r,n,a){switch(r){case"top":case"bottom":return a?n?h_:u_:n?u_:h_;case"left":case"right":return n?XR:ZR;default:return[]}}function e2(r,n,a,l){const d=ia(r);let y=JR(qi(r),a==="start",l);return d&&(y=y.map(S=>S+"-"+d),n&&(y=y.concat(y.map(Cf)))),y}function lc(r){return r.replace(/left|right|bottom|top/g,n=>KR[n])}function t2(r){return{top:0,right:0,bottom:0,left:0,...r}}function qy(r){return typeof r!="number"?t2(r):{top:r,right:r,bottom:r,left:r}}function cc(r){const{x:n,y:a,width:l,height:d}=r;return{width:l,height:d,top:a,left:n,right:n+l,bottom:a+d,x:n,y:a}}function f_(r,n,a){let{reference:l,floating:d}=r;const y=oi(n),S=sd(n),o=nd(S),c=qi(n),u=y==="y",C=l.x+l.width/2-d.width/2,v=l.y+l.height/2-d.height/2,w=l[o]/2-d[o]/2;let x;switch(c){case"top":x={x:C,y:l.y-d.height};break;case"bottom":x={x:C,y:l.y+l.height};break;case"right":x={x:l.x+l.width,y:v};break;case"left":x={x:l.x-d.width,y:v};break;default:x={x:l.x,y:l.y}}switch(ia(n)){case"start":x[S]-=w*(a&&u?-1:1);break;case"end":x[S]+=w*(a&&u?-1:1);break}return x}const r2=async(r,n,a)=>{const{placement:l="bottom",strategy:d="absolute",middleware:y=[],platform:S}=a,o=y.filter(Boolean),c=await(S.isRTL==null?void 0:S.isRTL(n));let u=await S.getElementRects({reference:r,floating:n,strategy:d}),{x:C,y:v}=f_(u,l,c),w=l,x={},R=0;for(let b=0;b<o.length;b++){const{name:h,fn:m}=o[b],{x:p,y:g,data:A,reset:D}=await m({x:C,y:v,initialPlacement:l,placement:w,strategy:d,middlewareData:x,rects:u,platform:S,elements:{reference:r,floating:n}});C=p??C,v=g??v,x={...x,[h]:{...x[h],...A}},D&&R<=50&&(R++,typeof D=="object"&&(D.placement&&(w=D.placement),D.rects&&(u=D.rects===!0?await S.getElementRects({reference:r,floating:n,strategy:d}):D.rects),{x:C,y:v}=f_(u,w,c)),b=-1)}return{x:C,y:v,placement:w,strategy:d,middlewareData:x}};async function ho(r,n){var a;n===void 0&&(n={});const{x:l,y:d,platform:y,rects:S,elements:o,strategy:c}=r,{boundary:u="clippingAncestors",rootBoundary:C="viewport",elementContext:v="floating",altBoundary:w=!1,padding:x=0}=Fi(n,r),R=qy(x),h=o[w?v==="floating"?"reference":"floating":v],m=cc(await y.getClippingRect({element:(a=await(y.isElement==null?void 0:y.isElement(h)))==null||a?h:h.contextElement||await(y.getDocumentElement==null?void 0:y.getDocumentElement(o.floating)),boundary:u,rootBoundary:C,strategy:c})),p=v==="floating"?{x:l,y:d,width:S.floating.width,height:S.floating.height}:S.reference,g=await(y.getOffsetParent==null?void 0:y.getOffsetParent(o.floating)),A=await(y.isElement==null?void 0:y.isElement(g))?await(y.getScale==null?void 0:y.getScale(g))||{x:1,y:1}:{x:1,y:1},D=cc(y.convertOffsetParentRelativeRectToViewportRelativeRect?await y.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:p,offsetParent:g,strategy:c}):p);return{top:(m.top-D.top+R.top)/A.y,bottom:(D.bottom-m.bottom+R.bottom)/A.y,left:(m.left-D.left+R.left)/A.x,right:(D.right-m.right+R.right)/A.x}}const i2=r=>({name:"arrow",options:r,async fn(n){const{x:a,y:l,placement:d,rects:y,platform:S,elements:o,middlewareData:c}=n,{element:u,padding:C=0}=Fi(r,n)||{};if(u==null)return{};const v=qy(C),w={x:a,y:l},x=sd(d),R=nd(x),b=await S.getDimensions(u),h=x==="y",m=h?"top":"left",p=h?"bottom":"right",g=h?"clientHeight":"clientWidth",A=y.reference[R]+y.reference[x]-w[x]-y.floating[R],D=w[x]-y.reference[x],L=await(S.getOffsetParent==null?void 0:S.getOffsetParent(u));let T=L?L[g]:0;(!T||!await(S.isElement==null?void 0:S.isElement(L)))&&(T=o.floating[g]||y.floating[R]);const E=A/2-D/2,B=T/2-b[R]/2-1,W=xn(v[m],B),F=xn(v[p],B),I=W,V=T-b[R]-F,ee=T/2-b[R]/2+E,ne=bf(I,ee,V),q=!c.arrow&&ia(d)!=null&&ee!==ne&&y.reference[R]/2-(ee<I?W:F)-b[R]/2<0,Z=q?ee<I?ee-I:ee-V:0;return{[x]:w[x]+Z,data:{[x]:ne,centerOffset:ee-ne-Z,...q&&{alignmentOffset:Z}},reset:q}}}),n2=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(n){var a,l;const{placement:d,middlewareData:y,rects:S,initialPlacement:o,platform:c,elements:u}=n,{mainAxis:C=!0,crossAxis:v=!0,fallbackPlacements:w,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:b=!0,...h}=Fi(r,n);if((a=y.arrow)!=null&&a.alignmentOffset)return{};const m=qi(d),p=oi(o),g=qi(o)===o,A=await(c.isRTL==null?void 0:c.isRTL(u.floating)),D=w||(g||!b?[lc(o)]:QR(o)),L=R!=="none";!w&&L&&D.push(...e2(o,b,R,A));const T=[o,...D],E=await ho(n,h),B=[];let W=((l=y.flip)==null?void 0:l.overflows)||[];if(C&&B.push(E[m]),v){const ee=YR(d,S,A);B.push(E[ee[0]],E[ee[1]])}if(W=[...W,{placement:d,overflows:B}],!B.every(ee=>ee<=0)){var F,I;const ee=(((F=y.flip)==null?void 0:F.index)||0)+1,ne=T[ee];if(ne&&(!(v==="alignment"?p!==oi(ne):!1)||W.every(K=>oi(K.placement)===p?K.overflows[0]>0:!0)))return{data:{index:ee,overflows:W},reset:{placement:ne}};let q=(I=W.filter(Z=>Z.overflows[0]<=0).sort((Z,K)=>Z.overflows[1]-K.overflows[1])[0])==null?void 0:I.placement;if(!q)switch(x){case"bestFit":{var V;const Z=(V=W.filter(K=>{if(L){const j=oi(K.placement);return j===p||j==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(j=>j>0).reduce((j,U)=>j+U,0)]).sort((K,j)=>K[1]-j[1])[0])==null?void 0:V[0];Z&&(q=Z);break}case"initialPlacement":q=o;break}if(d!==q)return{reset:{placement:q}}}return{}}}};function d_(r,n){return{top:r.top-n.height,right:r.right-n.width,bottom:r.bottom-n.height,left:r.left-n.width}}function m_(r){return VR.some(n=>r[n]>=0)}const s2=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(n){const{rects:a}=n,{strategy:l="referenceHidden",...d}=Fi(r,n);switch(l){case"referenceHidden":{const y=await ho(n,{...d,elementContext:"reference"}),S=d_(y,a.reference);return{data:{referenceHiddenOffsets:S,referenceHidden:m_(S)}}}case"escaped":{const y=await ho(n,{...d,altBoundary:!0}),S=d_(y,a.floating);return{data:{escapedOffsets:S,escaped:m_(S)}}}default:return{}}}}},Wy=new Set(["left","top"]);async function a2(r,n){const{placement:a,platform:l,elements:d}=r,y=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=qi(a),o=ia(a),c=oi(a)==="y",u=Wy.has(S)?-1:1,C=y&&c?-1:1,v=Fi(n,r);let{mainAxis:w,crossAxis:x,alignmentAxis:R}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return o&&typeof R=="number"&&(x=o==="end"?R*-1:R),c?{x:x*C,y:w*u}:{x:w*u,y:x*C}}const o2=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(n){var a,l;const{x:d,y,placement:S,middlewareData:o}=n,c=await a2(n,r);return S===((a=o.offset)==null?void 0:a.placement)&&(l=o.arrow)!=null&&l.alignmentOffset?{}:{x:d+c.x,y:y+c.y,data:{...c,placement:S}}}}},l2=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(n){const{x:a,y:l,placement:d}=n,{mainAxis:y=!0,crossAxis:S=!1,limiter:o={fn:h=>{let{x:m,y:p}=h;return{x:m,y:p}}},...c}=Fi(r,n),u={x:a,y:l},C=await ho(n,c),v=oi(qi(d)),w=id(v);let x=u[w],R=u[v];if(y){const h=w==="y"?"top":"left",m=w==="y"?"bottom":"right",p=x+C[h],g=x-C[m];x=bf(p,x,g)}if(S){const h=v==="y"?"top":"left",m=v==="y"?"bottom":"right",p=R+C[h],g=R-C[m];R=bf(p,R,g)}const b=o.fn({...n,[w]:x,[v]:R});return{...b,data:{x:b.x-a,y:b.y-l,enabled:{[w]:y,[v]:S}}}}}},c2=function(r){return r===void 0&&(r={}),{options:r,fn(n){const{x:a,y:l,placement:d,rects:y,middlewareData:S}=n,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=Fi(r,n),C={x:a,y:l},v=oi(d),w=id(v);let x=C[w],R=C[v];const b=Fi(o,n),h=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const g=w==="y"?"height":"width",A=y.reference[w]-y.floating[g]+h.mainAxis,D=y.reference[w]+y.reference[g]-h.mainAxis;x<A?x=A:x>D&&(x=D)}if(u){var m,p;const g=w==="y"?"width":"height",A=Wy.has(qi(d)),D=y.reference[v]-y.floating[g]+(A&&((m=S.offset)==null?void 0:m[v])||0)+(A?0:h.crossAxis),L=y.reference[v]+y.reference[g]+(A?0:((p=S.offset)==null?void 0:p[v])||0)-(A?h.crossAxis:0);R<D?R=D:R>L&&(R=L)}return{[w]:x,[v]:R}}}},u2=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(n){var a,l;const{placement:d,rects:y,platform:S,elements:o}=n,{apply:c=()=>{},...u}=Fi(r,n),C=await ho(n,u),v=qi(d),w=ia(d),x=oi(d)==="y",{width:R,height:b}=y.floating;let h,m;v==="top"||v==="bottom"?(h=v,m=w===(await(S.isRTL==null?void 0:S.isRTL(o.floating))?"start":"end")?"left":"right"):(m=v,h=w==="end"?"top":"bottom");const p=b-C.top-C.bottom,g=R-C.left-C.right,A=xn(b-C[h],p),D=xn(R-C[m],g),L=!n.middlewareData.shift;let T=A,E=D;if((a=n.middlewareData.shift)!=null&&a.enabled.x&&(E=g),(l=n.middlewareData.shift)!=null&&l.enabled.y&&(T=p),L&&!w){const W=Sr(C.left,0),F=Sr(C.right,0),I=Sr(C.top,0),V=Sr(C.bottom,0);x?E=R-2*(W!==0||F!==0?W+F:Sr(C.left,C.right)):T=b-2*(I!==0||V!==0?I+V:Sr(C.top,C.bottom))}await c({...n,availableWidth:E,availableHeight:T});const B=await S.getDimensions(o.floating);return R!==B.width||b!==B.height?{reset:{rects:!0}}:{}}}};function Sc(){return typeof window<"u"}function na(r){return Vy(r)?(r.nodeName||"").toLowerCase():"#document"}function Cr(r){var n;return(r==null||(n=r.ownerDocument)==null?void 0:n.defaultView)||window}function di(r){var n;return(n=(Vy(r)?r.ownerDocument:r.document)||window.document)==null?void 0:n.documentElement}function Vy(r){return Sc()?r instanceof Node||r instanceof Cr(r).Node:!1}function $r(r){return Sc()?r instanceof Element||r instanceof Cr(r).Element:!1}function hi(r){return Sc()?r instanceof HTMLElement||r instanceof Cr(r).HTMLElement:!1}function p_(r){return!Sc()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Cr(r).ShadowRoot}const h2=new Set(["inline","contents"]);function So(r){const{overflow:n,overflowX:a,overflowY:l,display:d}=Yr(r);return/auto|scroll|overlay|hidden|clip/.test(n+l+a)&&!h2.has(d)}const f2=new Set(["table","td","th"]);function d2(r){return f2.has(na(r))}const m2=[":popover-open",":modal"];function bc(r){return m2.some(n=>{try{return r.matches(n)}catch{return!1}})}const p2=["transform","translate","scale","rotate","perspective"],v2=["transform","translate","scale","rotate","perspective","filter"],g2=["paint","layout","strict","content"];function ad(r){const n=od(),a=$r(r)?Yr(r):r;return p2.some(l=>a[l]?a[l]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!n&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!n&&(a.filter?a.filter!=="none":!1)||v2.some(l=>(a.willChange||"").includes(l))||g2.some(l=>(a.contain||"").includes(l))}function _2(r){let n=En(r);for(;hi(n)&&!Zs(n);){if(ad(n))return n;if(bc(n))return null;n=En(n)}return null}function od(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const y2=new Set(["html","body","#document"]);function Zs(r){return y2.has(na(r))}function Yr(r){return Cr(r).getComputedStyle(r)}function Cc(r){return $r(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function En(r){if(na(r)==="html")return r;const n=r.assignedSlot||r.parentNode||p_(r)&&r.host||di(r);return p_(n)?n.host:n}function Ky(r){const n=En(r);return Zs(n)?r.ownerDocument?r.ownerDocument.body:r.body:hi(n)&&So(n)?n:Ky(n)}function fo(r,n,a){var l;n===void 0&&(n=[]),a===void 0&&(a=!0);const d=Ky(r),y=d===((l=r.ownerDocument)==null?void 0:l.body),S=Cr(d);if(y){const o=wf(S);return n.concat(S,S.visualViewport||[],So(d)?d:[],o&&a?fo(o):[])}return n.concat(d,fo(d,[],a))}function wf(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function Gy(r){const n=Yr(r);let a=parseFloat(n.width)||0,l=parseFloat(n.height)||0;const d=hi(r),y=d?r.offsetWidth:a,S=d?r.offsetHeight:l,o=oc(a)!==y||oc(l)!==S;return o&&(a=y,l=S),{width:a,height:l,$:o}}function ld(r){return $r(r)?r:r.contextElement}function Qs(r){const n=ld(r);if(!hi(n))return ci(1);const a=n.getBoundingClientRect(),{width:l,height:d,$:y}=Gy(n);let S=(y?oc(a.width):a.width)/l,o=(y?oc(a.height):a.height)/d;return(!S||!Number.isFinite(S))&&(S=1),(!o||!Number.isFinite(o))&&(o=1),{x:S,y:o}}const S2=ci(0);function $y(r){const n=Cr(r);return!od()||!n.visualViewport?S2:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function b2(r,n,a){return n===void 0&&(n=!1),!a||n&&a!==Cr(r)?!1:n}function rs(r,n,a,l){n===void 0&&(n=!1),a===void 0&&(a=!1);const d=r.getBoundingClientRect(),y=ld(r);let S=ci(1);n&&(l?$r(l)&&(S=Qs(l)):S=Qs(r));const o=b2(y,a,l)?$y(y):ci(0);let c=(d.left+o.x)/S.x,u=(d.top+o.y)/S.y,C=d.width/S.x,v=d.height/S.y;if(y){const w=Cr(y),x=l&&$r(l)?Cr(l):l;let R=w,b=wf(R);for(;b&&l&&x!==R;){const h=Qs(b),m=b.getBoundingClientRect(),p=Yr(b),g=m.left+(b.clientLeft+parseFloat(p.paddingLeft))*h.x,A=m.top+(b.clientTop+parseFloat(p.paddingTop))*h.y;c*=h.x,u*=h.y,C*=h.x,v*=h.y,c+=g,u+=A,R=Cr(b),b=wf(R)}}return cc({width:C,height:v,x:c,y:u})}function wc(r,n){const a=Cc(r).scrollLeft;return n?n.left+a:rs(di(r)).left+a}function Yy(r,n){const a=r.getBoundingClientRect(),l=a.left+n.scrollLeft-wc(r,a),d=a.top+n.scrollTop;return{x:l,y:d}}function C2(r){let{elements:n,rect:a,offsetParent:l,strategy:d}=r;const y=d==="fixed",S=di(l),o=n?bc(n.floating):!1;if(l===S||o&&y)return a;let c={scrollLeft:0,scrollTop:0},u=ci(1);const C=ci(0),v=hi(l);if((v||!v&&!y)&&((na(l)!=="body"||So(S))&&(c=Cc(l)),hi(l))){const x=rs(l);u=Qs(l),C.x=x.x+l.clientLeft,C.y=x.y+l.clientTop}const w=S&&!v&&!y?Yy(S,c):ci(0);return{width:a.width*u.x,height:a.height*u.y,x:a.x*u.x-c.scrollLeft*u.x+C.x+w.x,y:a.y*u.y-c.scrollTop*u.y+C.y+w.y}}function w2(r){return Array.from(r.getClientRects())}function x2(r){const n=di(r),a=Cc(r),l=r.ownerDocument.body,d=Sr(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),y=Sr(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let S=-a.scrollLeft+wc(r);const o=-a.scrollTop;return Yr(l).direction==="rtl"&&(S+=Sr(n.clientWidth,l.clientWidth)-d),{width:d,height:y,x:S,y:o}}const v_=25;function E2(r,n){const a=Cr(r),l=di(r),d=a.visualViewport;let y=l.clientWidth,S=l.clientHeight,o=0,c=0;if(d){y=d.width,S=d.height;const C=od();(!C||C&&n==="fixed")&&(o=d.offsetLeft,c=d.offsetTop)}const u=wc(l);if(u<=0){const C=l.ownerDocument,v=C.body,w=getComputedStyle(v),x=C.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,R=Math.abs(l.clientWidth-v.clientWidth-x);R<=v_&&(y-=R)}else u<=v_&&(y+=u);return{width:y,height:S,x:o,y:c}}const R2=new Set(["absolute","fixed"]);function A2(r,n){const a=rs(r,!0,n==="fixed"),l=a.top+r.clientTop,d=a.left+r.clientLeft,y=hi(r)?Qs(r):ci(1),S=r.clientWidth*y.x,o=r.clientHeight*y.y,c=d*y.x,u=l*y.y;return{width:S,height:o,x:c,y:u}}function g_(r,n,a){let l;if(n==="viewport")l=E2(r,a);else if(n==="document")l=x2(di(r));else if($r(n))l=A2(n,a);else{const d=$y(r);l={x:n.x-d.x,y:n.y-d.y,width:n.width,height:n.height}}return cc(l)}function Qy(r,n){const a=En(r);return a===n||!$r(a)||Zs(a)?!1:Yr(a).position==="fixed"||Qy(a,n)}function T2(r,n){const a=n.get(r);if(a)return a;let l=fo(r,[],!1).filter(o=>$r(o)&&na(o)!=="body"),d=null;const y=Yr(r).position==="fixed";let S=y?En(r):r;for(;$r(S)&&!Zs(S);){const o=Yr(S),c=ad(S);!c&&o.position==="fixed"&&(d=null),(y?!c&&!d:!c&&o.position==="static"&&!!d&&R2.has(d.position)||So(S)&&!c&&Qy(r,S))?l=l.filter(C=>C!==S):d=o,S=En(S)}return n.set(r,l),l}function D2(r){let{element:n,boundary:a,rootBoundary:l,strategy:d}=r;const S=[...a==="clippingAncestors"?bc(n)?[]:T2(n,this._c):[].concat(a),l],o=S[0],c=S.reduce((u,C)=>{const v=g_(n,C,d);return u.top=Sr(v.top,u.top),u.right=xn(v.right,u.right),u.bottom=xn(v.bottom,u.bottom),u.left=Sr(v.left,u.left),u},g_(n,o,d));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function O2(r){const{width:n,height:a}=Gy(r);return{width:n,height:a}}function M2(r,n,a){const l=hi(n),d=di(n),y=a==="fixed",S=rs(r,!0,y,n);let o={scrollLeft:0,scrollTop:0};const c=ci(0);function u(){c.x=wc(d)}if(l||!l&&!y)if((na(n)!=="body"||So(d))&&(o=Cc(n)),l){const x=rs(n,!0,y,n);c.x=x.x+n.clientLeft,c.y=x.y+n.clientTop}else d&&u();y&&!l&&d&&u();const C=d&&!l&&!y?Yy(d,o):ci(0),v=S.left+o.scrollLeft-c.x-C.x,w=S.top+o.scrollTop-c.y-C.y;return{x:v,y:w,width:S.width,height:S.height}}function ef(r){return Yr(r).position==="static"}function __(r,n){if(!hi(r)||Yr(r).position==="fixed")return null;if(n)return n(r);let a=r.offsetParent;return di(r)===a&&(a=a.ownerDocument.body),a}function Xy(r,n){const a=Cr(r);if(bc(r))return a;if(!hi(r)){let d=En(r);for(;d&&!Zs(d);){if($r(d)&&!ef(d))return d;d=En(d)}return a}let l=__(r,n);for(;l&&d2(l)&&ef(l);)l=__(l,n);return l&&Zs(l)&&ef(l)&&!ad(l)?a:l||_2(r)||a}const L2=async function(r){const n=this.getOffsetParent||Xy,a=this.getDimensions,l=await a(r.floating);return{reference:M2(r.reference,await n(r.floating),r.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function k2(r){return Yr(r).direction==="rtl"}const B2={convertOffsetParentRelativeRectToViewportRelativeRect:C2,getDocumentElement:di,getClippingRect:D2,getOffsetParent:Xy,getElementRects:L2,getClientRects:w2,getDimensions:O2,getScale:Qs,isElement:$r,isRTL:k2};function Zy(r,n){return r.x===n.x&&r.y===n.y&&r.width===n.width&&r.height===n.height}function N2(r,n){let a=null,l;const d=di(r);function y(){var o;clearTimeout(l),(o=a)==null||o.disconnect(),a=null}function S(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),y();const u=r.getBoundingClientRect(),{left:C,top:v,width:w,height:x}=u;if(o||n(),!w||!x)return;const R=ql(v),b=ql(d.clientWidth-(C+w)),h=ql(d.clientHeight-(v+x)),m=ql(C),g={rootMargin:-R+"px "+-b+"px "+-h+"px "+-m+"px",threshold:Sr(0,xn(1,c))||1};let A=!0;function D(L){const T=L[0].intersectionRatio;if(T!==c){if(!A)return S();T?S(!1,T):l=setTimeout(()=>{S(!1,1e-7)},1e3)}T===1&&!Zy(u,r.getBoundingClientRect())&&S(),A=!1}try{a=new IntersectionObserver(D,{...g,root:d.ownerDocument})}catch{a=new IntersectionObserver(D,g)}a.observe(r)}return S(!0),y}function j2(r,n,a,l){l===void 0&&(l={});const{ancestorScroll:d=!0,ancestorResize:y=!0,elementResize:S=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=l,u=ld(r),C=d||y?[...u?fo(u):[],...fo(n)]:[];C.forEach(m=>{d&&m.addEventListener("scroll",a,{passive:!0}),y&&m.addEventListener("resize",a)});const v=u&&o?N2(u,a):null;let w=-1,x=null;S&&(x=new ResizeObserver(m=>{let[p]=m;p&&p.target===u&&x&&(x.unobserve(n),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var g;(g=x)==null||g.observe(n)})),a()}),u&&!c&&x.observe(u),x.observe(n));let R,b=c?rs(r):null;c&&h();function h(){const m=rs(r);b&&!Zy(b,m)&&a(),b=m,R=requestAnimationFrame(h)}return a(),()=>{var m;C.forEach(p=>{d&&p.removeEventListener("scroll",a),y&&p.removeEventListener("resize",a)}),v?.(),(m=x)==null||m.disconnect(),x=null,c&&cancelAnimationFrame(R)}}const H2=o2,z2=l2,P2=n2,U2=u2,I2=s2,y_=i2,F2=c2,q2=(r,n,a)=>{const l=new Map,d={platform:B2,...a},y={...d.platform,_c:l};return r2(r,n,{...d,platform:y})};var W2=typeof document<"u",V2=function(){},Zl=W2?k.useLayoutEffect:V2;function uc(r,n){if(r===n)return!0;if(typeof r!=typeof n)return!1;if(typeof r=="function"&&r.toString()===n.toString())return!0;let a,l,d;if(r&&n&&typeof r=="object"){if(Array.isArray(r)){if(a=r.length,a!==n.length)return!1;for(l=a;l--!==0;)if(!uc(r[l],n[l]))return!1;return!0}if(d=Object.keys(r),a=d.length,a!==Object.keys(n).length)return!1;for(l=a;l--!==0;)if(!{}.hasOwnProperty.call(n,d[l]))return!1;for(l=a;l--!==0;){const y=d[l];if(!(y==="_owner"&&r.$$typeof)&&!uc(r[y],n[y]))return!1}return!0}return r!==r&&n!==n}function Jy(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function S_(r,n){const a=Jy(r);return Math.round(n*a)/a}function tf(r){const n=k.useRef(r);return Zl(()=>{n.current=r}),n}function K2(r){r===void 0&&(r={});const{placement:n="bottom",strategy:a="absolute",middleware:l=[],platform:d,elements:{reference:y,floating:S}={},transform:o=!0,whileElementsMounted:c,open:u}=r,[C,v]=k.useState({x:0,y:0,strategy:a,placement:n,middlewareData:{},isPositioned:!1}),[w,x]=k.useState(l);uc(w,l)||x(l);const[R,b]=k.useState(null),[h,m]=k.useState(null),p=k.useCallback(K=>{K!==L.current&&(L.current=K,b(K))},[]),g=k.useCallback(K=>{K!==T.current&&(T.current=K,m(K))},[]),A=y||R,D=S||h,L=k.useRef(null),T=k.useRef(null),E=k.useRef(C),B=c!=null,W=tf(c),F=tf(d),I=tf(u),V=k.useCallback(()=>{if(!L.current||!T.current)return;const K={placement:n,strategy:a,middleware:w};F.current&&(K.platform=F.current),q2(L.current,T.current,K).then(j=>{const U={...j,isPositioned:I.current!==!1};ee.current&&!uc(E.current,U)&&(E.current=U,ea.flushSync(()=>{v(U)}))})},[w,n,a,F,I]);Zl(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[u]);const ee=k.useRef(!1);Zl(()=>(ee.current=!0,()=>{ee.current=!1}),[]),Zl(()=>{if(A&&(L.current=A),D&&(T.current=D),A&&D){if(W.current)return W.current(A,D,V);V()}},[A,D,V,W,B]);const ne=k.useMemo(()=>({reference:L,floating:T,setReference:p,setFloating:g}),[p,g]),q=k.useMemo(()=>({reference:A,floating:D}),[A,D]),Z=k.useMemo(()=>{const K={position:a,left:0,top:0};if(!q.floating)return K;const j=S_(q.floating,C.x),U=S_(q.floating,C.y);return o?{...K,transform:"translate("+j+"px, "+U+"px)",...Jy(q.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:j,top:U}},[a,o,q.floating,C.x,C.y]);return k.useMemo(()=>({...C,update:V,refs:ne,elements:q,floatingStyles:Z}),[C,V,ne,q,Z])}const G2=r=>{function n(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:r,fn(a){const{element:l,padding:d}=typeof r=="function"?r(a):r;return l&&n(l)?l.current!=null?y_({element:l.current,padding:d}).fn(a):{}:l?y_({element:l,padding:d}).fn(a):{}}}},$2=(r,n)=>({...H2(r),options:[r,n]}),Y2=(r,n)=>({...z2(r),options:[r,n]}),Q2=(r,n)=>({...F2(r),options:[r,n]}),X2=(r,n)=>({...P2(r),options:[r,n]}),Z2=(r,n)=>({...U2(r),options:[r,n]}),J2=(r,n)=>({...I2(r),options:[r,n]}),eA=(r,n)=>({...G2(r),options:[r,n]});var tA="Arrow",e0=k.forwardRef((r,n)=>{const{children:a,width:l=10,height:d=5,...y}=r;return O.jsx(Rt.svg,{...y,ref:n,width:l,height:d,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?a:O.jsx("polygon",{points:"0,0 30,0 15,10"})})});e0.displayName=tA;var rA=e0;function iA(r){const[n,a]=k.useState(void 0);return lr(()=>{if(r){a({width:r.offsetWidth,height:r.offsetHeight});const l=new ResizeObserver(d=>{if(!Array.isArray(d)||!d.length)return;const y=d[0];let S,o;if("borderBoxSize"in y){const c=y.borderBoxSize,u=Array.isArray(c)?c[0]:c;S=u.inlineSize,o=u.blockSize}else S=r.offsetWidth,o=r.offsetHeight;a({width:S,height:o})});return l.observe(r,{box:"border-box"}),()=>l.unobserve(r)}else a(void 0)},[r]),n}var cd="Popper",[t0,r0]=td(cd),[nA,i0]=t0(cd),n0=r=>{const{__scopePopper:n,children:a}=r,[l,d]=k.useState(null);return O.jsx(nA,{scope:n,anchor:l,onAnchorChange:d,children:a})};n0.displayName=cd;var s0="PopperAnchor",a0=k.forwardRef((r,n)=>{const{__scopePopper:a,virtualRef:l,...d}=r,y=i0(s0,a),S=k.useRef(null),o=Kt(n,S),c=k.useRef(null);return k.useEffect(()=>{const u=c.current;c.current=l?.current||S.current,u!==c.current&&y.onAnchorChange(c.current)}),l?null:O.jsx(Rt.div,{...d,ref:o})});a0.displayName=s0;var ud="PopperContent",[sA,aA]=t0(ud),o0=k.forwardRef((r,n)=>{const{__scopePopper:a,side:l="bottom",sideOffset:d=0,align:y="center",alignOffset:S=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:C=0,sticky:v="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:R,...b}=r,h=i0(ud,a),[m,p]=k.useState(null),g=Kt(n,Q=>p(Q)),[A,D]=k.useState(null),L=iA(A),T=L?.width??0,E=L?.height??0,B=l+(y!=="center"?"-"+y:""),W=typeof C=="number"?C:{top:0,right:0,bottom:0,left:0,...C},F=Array.isArray(u)?u:[u],I=F.length>0,V={padding:W,boundary:F.filter(lA),altBoundary:I},{refs:ee,floatingStyles:ne,placement:q,isPositioned:Z,middlewareData:K}=K2({strategy:"fixed",placement:B,whileElementsMounted:(...Q)=>j2(...Q,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[$2({mainAxis:d+E,alignmentAxis:S}),c&&Y2({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?Q2():void 0,...V}),c&&X2({...V}),Z2({...V,apply:({elements:Q,rects:P,availableWidth:he,availableHeight:ge})=>{const{width:oe,height:me}=P.reference,Ce=Q.floating.style;Ce.setProperty("--radix-popper-available-width",`${he}px`),Ce.setProperty("--radix-popper-available-height",`${ge}px`),Ce.setProperty("--radix-popper-anchor-width",`${oe}px`),Ce.setProperty("--radix-popper-anchor-height",`${me}px`)}}),A&&eA({element:A,padding:o}),cA({arrowWidth:T,arrowHeight:E}),w&&J2({strategy:"referenceHidden",...V})]}),[j,U]=u0(q),N=ts(R);lr(()=>{Z&&N?.()},[Z,N]);const z=K.arrow?.x,X=K.arrow?.y,ie=K.arrow?.centerOffset!==0,[de,G]=k.useState();return lr(()=>{m&&G(window.getComputedStyle(m).zIndex)},[m]),O.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Z?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[K.transformOrigin?.x,K.transformOrigin?.y].join(" "),...K.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:r.dir,children:O.jsx(sA,{scope:a,placedSide:j,onArrowChange:D,arrowX:z,arrowY:X,shouldHideArrow:ie,children:O.jsx(Rt.div,{"data-side":j,"data-align":U,...b,ref:g,style:{...b.style,animation:Z?void 0:"none"}})})})});o0.displayName=ud;var l0="PopperArrow",oA={top:"bottom",right:"left",bottom:"top",left:"right"},c0=k.forwardRef(function(n,a){const{__scopePopper:l,...d}=n,y=aA(l0,l),S=oA[y.placedSide];return O.jsx("span",{ref:y.onArrowChange,style:{position:"absolute",left:y.arrowX,top:y.arrowY,[S]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[y.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[y.placedSide],visibility:y.shouldHideArrow?"hidden":void 0},children:O.jsx(rA,{...d,ref:a,style:{...d.style,display:"block"}})})});c0.displayName=l0;function lA(r){return r!==null}var cA=r=>({name:"transformOrigin",options:r,fn(n){const{placement:a,rects:l,middlewareData:d}=n,S=d.arrow?.centerOffset!==0,o=S?0:r.arrowWidth,c=S?0:r.arrowHeight,[u,C]=u0(a),v={start:"0%",center:"50%",end:"100%"}[C],w=(d.arrow?.x??0)+o/2,x=(d.arrow?.y??0)+c/2;let R="",b="";return u==="bottom"?(R=S?v:`${w}px`,b=`${-c}px`):u==="top"?(R=S?v:`${w}px`,b=`${l.floating.height+c}px`):u==="right"?(R=`${-c}px`,b=S?v:`${x}px`):u==="left"&&(R=`${l.floating.width+c}px`,b=S?v:`${x}px`),{data:{x:R,y:b}}}});function u0(r){const[n,a="center"]=r.split("-");return[n,a]}var uA=n0,hA=a0,fA=o0,dA=c0,mA="Portal",h0=k.forwardRef((r,n)=>{const{container:a,...l}=r,[d,y]=k.useState(!1);lr(()=>y(!0),[]);const S=a||d&&globalThis?.document?.body;return S?xx.createPortal(O.jsx(Rt.div,{...l,ref:n}),S):null});h0.displayName=mA;function pA(r){const n=vA(r),a=k.forwardRef((l,d)=>{const{children:y,...S}=l,o=k.Children.toArray(y),c=o.find(_A);if(c){const u=c.props.children,C=o.map(v=>v===c?k.Children.count(u)>1?k.Children.only(null):k.isValidElement(u)?u.props.children:null:v);return O.jsx(n,{...S,ref:d,children:k.isValidElement(u)?k.cloneElement(u,void 0,C):null})}return O.jsx(n,{...S,ref:d,children:y})});return a.displayName=`${r}.Slot`,a}function vA(r){const n=k.forwardRef((a,l)=>{const{children:d,...y}=a;if(k.isValidElement(d)){const S=SA(d),o=yA(y,d.props);return d.type!==k.Fragment&&(o.ref=l?yo(l,S):S),k.cloneElement(d,o)}return k.Children.count(d)>1?k.Children.only(null):null});return n.displayName=`${r}.SlotClone`,n}var gA=Symbol("radix.slottable");function _A(r){return k.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===gA}function yA(r,n){const a={...n};for(const l in n){const d=r[l],y=n[l];/^on[A-Z]/.test(l)?d&&y?a[l]=(...o)=>{const c=y(...o);return d(...o),c}:d&&(a[l]=d):l==="style"?a[l]={...d,...y}:l==="className"&&(a[l]=[d,y].filter(Boolean).join(" "))}return{...r,...a}}function SA(r){let n=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?r.ref:(n=Object.getOwnPropertyDescriptor(r,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?r.props.ref:r.props.ref||r.ref)}var bA=dc[" useInsertionEffect ".trim().toString()]||lr;function b_({prop:r,defaultProp:n,onChange:a=()=>{},caller:l}){const[d,y,S]=CA({defaultProp:n,onChange:a}),o=r!==void 0,c=o?r:d;{const C=k.useRef(r!==void 0);k.useEffect(()=>{const v=C.current;v!==o&&console.warn(`${l} is changing from ${v?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),C.current=o},[o,l])}const u=k.useCallback(C=>{if(o){const v=wA(C)?C(r):C;v!==r&&S.current?.(v)}else y(C)},[o,r,y,S]);return[c,u]}function CA({defaultProp:r,onChange:n}){const[a,l]=k.useState(r),d=k.useRef(a),y=k.useRef(n);return bA(()=>{y.current=n},[n]),k.useEffect(()=>{d.current!==a&&(y.current?.(a),d.current=a)},[a,d]),[a,l,y]}function wA(r){return typeof r=="function"}function xA(r){const n=k.useRef({value:r,previous:r});return k.useMemo(()=>(n.current.value!==r&&(n.current.previous=n.current.value,n.current.value=r),n.current.previous),[r])}var f0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),EA="VisuallyHidden",RA=k.forwardRef((r,n)=>O.jsx(Rt.span,{...r,ref:n,style:{...f0,...r.style}}));RA.displayName=EA;var AA=function(r){if(typeof document>"u")return null;var n=Array.isArray(r)?r[0]:r;return n.ownerDocument.body},Ws=new WeakMap,Wl=new WeakMap,Vl={},rf=0,d0=function(r){return r&&(r.host||d0(r.parentNode))},TA=function(r,n){return n.map(function(a){if(r.contains(a))return a;var l=d0(a);return l&&r.contains(l)?l:(console.error("aria-hidden",a,"in not contained inside",r,". Doing nothing"),null)}).filter(function(a){return!!a})},DA=function(r,n,a,l){var d=TA(n,Array.isArray(r)?r:[r]);Vl[a]||(Vl[a]=new WeakMap);var y=Vl[a],S=[],o=new Set,c=new Set(d),u=function(v){!v||o.has(v)||(o.add(v),u(v.parentNode))};d.forEach(u);var C=function(v){!v||c.has(v)||Array.prototype.forEach.call(v.children,function(w){if(o.has(w))C(w);else try{var x=w.getAttribute(l),R=x!==null&&x!=="false",b=(Ws.get(w)||0)+1,h=(y.get(w)||0)+1;Ws.set(w,b),y.set(w,h),S.push(w),b===1&&R&&Wl.set(w,!0),h===1&&w.setAttribute(a,"true"),R||w.setAttribute(l,"true")}catch(m){console.error("aria-hidden: cannot operate on ",w,m)}})};return C(n),o.clear(),rf++,function(){S.forEach(function(v){var w=Ws.get(v)-1,x=y.get(v)-1;Ws.set(v,w),y.set(v,x),w||(Wl.has(v)||v.removeAttribute(l),Wl.delete(v)),x||v.removeAttribute(a)}),rf--,rf||(Ws=new WeakMap,Ws=new WeakMap,Wl=new WeakMap,Vl={})}},OA=function(r,n,a){a===void 0&&(a="data-aria-hidden");var l=Array.from(Array.isArray(r)?r:[r]),d=AA(r);return d?(l.push.apply(l,Array.from(d.querySelectorAll("[aria-live], script"))),DA(l,d,a,"aria-hidden")):function(){return null}},ai=function(){return ai=Object.assign||function(n){for(var a,l=1,d=arguments.length;l<d;l++){a=arguments[l];for(var y in a)Object.prototype.hasOwnProperty.call(a,y)&&(n[y]=a[y])}return n},ai.apply(this,arguments)};function m0(r,n){var a={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&n.indexOf(l)<0&&(a[l]=r[l]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,l=Object.getOwnPropertySymbols(r);d<l.length;d++)n.indexOf(l[d])<0&&Object.prototype.propertyIsEnumerable.call(r,l[d])&&(a[l[d]]=r[l[d]]);return a}function MA(r,n,a){if(a||arguments.length===2)for(var l=0,d=n.length,y;l<d;l++)(y||!(l in n))&&(y||(y=Array.prototype.slice.call(n,0,l)),y[l]=n[l]);return r.concat(y||Array.prototype.slice.call(n))}var Jl="right-scroll-bar-position",ec="width-before-scroll-bar",LA="with-scroll-bars-hidden",kA="--removed-body-scroll-bar-size";function nf(r,n){return typeof r=="function"?r(n):r&&(r.current=n),r}function BA(r,n){var a=k.useState(function(){return{value:r,callback:n,facade:{get current(){return a.value},set current(l){var d=a.value;d!==l&&(a.value=l,a.callback(l,d))}}}})[0];return a.callback=n,a.facade}var NA=typeof window<"u"?k.useLayoutEffect:k.useEffect,C_=new WeakMap;function jA(r,n){var a=BA(null,function(l){return r.forEach(function(d){return nf(d,l)})});return NA(function(){var l=C_.get(a);if(l){var d=new Set(l),y=new Set(r),S=a.current;d.forEach(function(o){y.has(o)||nf(o,null)}),y.forEach(function(o){d.has(o)||nf(o,S)})}C_.set(a,r)},[r]),a}function HA(r){return r}function zA(r,n){n===void 0&&(n=HA);var a=[],l=!1,d={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:r},useMedium:function(y){var S=n(y,l);return a.push(S),function(){a=a.filter(function(o){return o!==S})}},assignSyncMedium:function(y){for(l=!0;a.length;){var S=a;a=[],S.forEach(y)}a={push:function(o){return y(o)},filter:function(){return a}}},assignMedium:function(y){l=!0;var S=[];if(a.length){var o=a;a=[],o.forEach(y),S=a}var c=function(){var C=S;S=[],C.forEach(y)},u=function(){return Promise.resolve().then(c)};u(),a={push:function(C){S.push(C),u()},filter:function(C){return S=S.filter(C),a}}}};return d}function PA(r){r===void 0&&(r={});var n=zA(null);return n.options=ai({async:!0,ssr:!1},r),n}var p0=function(r){var n=r.sideCar,a=m0(r,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=n.read();if(!l)throw new Error("Sidecar medium not found");return k.createElement(l,ai({},a))};p0.isSideCarExport=!0;function UA(r,n){return r.useMedium(n),p0}var v0=PA(),sf=function(){},xc=k.forwardRef(function(r,n){var a=k.useRef(null),l=k.useState({onScrollCapture:sf,onWheelCapture:sf,onTouchMoveCapture:sf}),d=l[0],y=l[1],S=r.forwardProps,o=r.children,c=r.className,u=r.removeScrollBar,C=r.enabled,v=r.shards,w=r.sideCar,x=r.noRelative,R=r.noIsolation,b=r.inert,h=r.allowPinchZoom,m=r.as,p=m===void 0?"div":m,g=r.gapMode,A=m0(r,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=w,L=jA([a,n]),T=ai(ai({},A),d);return k.createElement(k.Fragment,null,C&&k.createElement(D,{sideCar:v0,removeScrollBar:u,shards:v,noRelative:x,noIsolation:R,inert:b,setCallbacks:y,allowPinchZoom:!!h,lockRef:a,gapMode:g}),S?k.cloneElement(k.Children.only(o),ai(ai({},T),{ref:L})):k.createElement(p,ai({},T,{className:c,ref:L}),o))});xc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xc.classNames={fullWidth:ec,zeroRight:Jl};var IA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function FA(){if(!document)return null;var r=document.createElement("style");r.type="text/css";var n=IA();return n&&r.setAttribute("nonce",n),r}function qA(r,n){r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}function WA(r){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(r)}var VA=function(){var r=0,n=null;return{add:function(a){r==0&&(n=FA())&&(qA(n,a),WA(n)),r++},remove:function(){r--,!r&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},KA=function(){var r=VA();return function(n,a){k.useEffect(function(){return r.add(n),function(){r.remove()}},[n&&a])}},g0=function(){var r=KA(),n=function(a){var l=a.styles,d=a.dynamic;return r(l,d),null};return n},GA={left:0,top:0,right:0,gap:0},af=function(r){return parseInt(r||"",10)||0},$A=function(r){var n=window.getComputedStyle(document.body),a=n[r==="padding"?"paddingLeft":"marginLeft"],l=n[r==="padding"?"paddingTop":"marginTop"],d=n[r==="padding"?"paddingRight":"marginRight"];return[af(a),af(l),af(d)]},YA=function(r){if(r===void 0&&(r="margin"),typeof window>"u")return GA;var n=$A(r),a=document.documentElement.clientWidth,l=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,l-a+n[2]-n[0])}},QA=g0(),Xs="data-scroll-locked",XA=function(r,n,a,l){var d=r.left,y=r.top,S=r.right,o=r.gap;return a===void 0&&(a="margin"),`
|
|
12
|
+
Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let w=os(),x;x=w;let R=x.pathname||"/",b=R;if(C!=="/"){let p=C.replace(/^\//,"").split("/");b="/"+R.replace(/^\//,"").split("/").slice(p.length).join("/")}let h=Sn(r,{pathname:b});return Et(v||h!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Et(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Aw(h&&h.map(p=>Object.assign({},p,{params:Object.assign({},c,p.params),pathname:li([C,y.encodeLocation?y.encodeLocation(p.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?C:li([C,y.encodeLocation?y.encodeLocation(p.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),S,a,l,d)}function ww(){let r=Lw(),n=lo(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),a=r instanceof Error?r.stack:null,l="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:l},y={padding:"2px 4px",backgroundColor:l},S=null;return console.error("Error handled by React Router default ErrorBoundary:",r),S=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:y},"ErrorBoundary")," or"," ",k.createElement("code",{style:y},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},n),a?k.createElement("pre",{style:d},a):null,S)}var xw=k.createElement(ww,null),Ew=class extends k.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,n){return n.location!==r.location||n.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:n.error,location:n.location,revalidation:r.revalidation||n.revalidation}}componentDidCatch(r,n){this.props.onError?this.props.onError(r,n):console.error("React Router caught the following error during render",r)}render(){return this.state.error!==void 0?k.createElement(fi.Provider,{value:this.props.routeContext},k.createElement(qf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Rw({routeContext:r,match:n,children:a}){let l=k.useContext(as);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(fi.Provider,{value:r},a)}function Aw(r,n=[],a=null,l=null,d=null){if(r==null){if(!a)return null;if(a.errors)r=a.matches;else if(n.length===0&&!a.initialized&&a.matches.length>0)r=a.matches;else return null}let y=r,S=a?.errors;if(S!=null){let C=y.findIndex(v=>v.route.id&&S?.[v.route.id]!==void 0);Ie(C>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(S).join(",")}`),y=y.slice(0,Math.min(y.length,C+1))}let o=!1,c=-1;if(a)for(let C=0;C<y.length;C++){let v=y[C];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(c=C),v.route.id){let{loaderData:w,errors:x}=a,R=v.route.loader&&!w.hasOwnProperty(v.route.id)&&(!x||x[v.route.id]===void 0);if(v.route.lazy||R){o=!0,c>=0?y=y.slice(0,c+1):y=[y[0]];break}}}let u=a&&l?(C,v)=>{l(C,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:po(a.matches),errorInfo:v})}:void 0;return y.reduceRight((C,v,w)=>{let x,R=!1,b=null,h=null;a&&(x=S&&v.route.id?S[v.route.id]:void 0,b=v.route.errorElement||xw,o&&(c<0&&w===0?(hy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,h=null):c===w&&(R=!0,h=v.route.hydrateFallbackElement||null)));let m=n.concat(y.slice(0,w+1)),p=()=>{let g;return x?g=b:R?g=h:v.route.Component?g=k.createElement(v.route.Component,null):v.route.element?g=v.route.element:g=C,k.createElement(Rw,{match:v,routeContext:{outlet:C,matches:m,isDataRoute:a!=null},children:g})};return a&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?k.createElement(Ew,{location:a.location,revalidation:a.revalidation,component:b,error:x,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):p()},null)}function Wf(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tw(r){let n=k.useContext(as);return Ie(n,Wf(r)),n}function Dw(r){let n=k.useContext(vo);return Ie(n,Wf(r)),n}function Ow(r){let n=k.useContext(fi);return Ie(n,Wf(r)),n}function Vf(r){let n=Ow(r),a=n.matches[n.matches.length-1];return Ie(a.route.id,`${r} can only be used on routes that contain a unique "id"`),a.route.id}function Mw(){return Vf("useRouteId")}function Lw(){let r=k.useContext(qf),n=Dw("useRouteError"),a=Vf("useRouteError");return r!==void 0?r:n.errors?.[a]}function kw(){let{router:r}=Tw("useNavigate"),n=Vf("useNavigate"),a=k.useRef(!1);return uy(()=>{a.current=!0}),k.useCallback(async(d,y={})=>{Et(a.current,cy),a.current&&(typeof d=="number"?await r.navigate(d):await r.navigate(d,{fromRouteId:n,...y}))},[r,n])}var Pg={};function hy(r,n,a){!n&&!Pg[r]&&(Pg[r]=!0,Et(!1,a))}var Ug={};function Ig(r,n){!r&&!Ug[n]&&(Ug[n]=!0,console.warn(n))}var Bw="useOptimistic",Fg=dc[Bw],Nw=()=>{};function jw(r){return Fg?Fg(r):[r,Nw]}function Hw(r){let n={hasErrorBoundary:r.hasErrorBoundary||r.ErrorBoundary!=null||r.errorElement!=null};return r.Component&&(r.element&&Et(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:k.createElement(r.Component),Component:void 0})),r.HydrateFallback&&(r.hydrateFallbackElement&&Et(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:k.createElement(r.HydrateFallback),HydrateFallback:void 0})),r.ErrorBoundary&&(r.errorElement&&Et(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:k.createElement(r.ErrorBoundary),ErrorBoundary:void 0})),n}var zw=["HydrateFallback","hydrateFallbackElement"],Pw=class{constructor(){this.status="pending",this.promise=new Promise((r,n)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",r(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",n(a))}})}};function Uw({router:r,flushSync:n,unstable_onError:a,unstable_useTransitions:l}){let[d,y]=k.useState(r.state),[S,o]=jw(d),[c,u]=k.useState(),[C,v]=k.useState({isTransitioning:!1}),[w,x]=k.useState(),[R,b]=k.useState(),[h,m]=k.useState(),p=k.useRef(new Map),g=k.useCallback((T,{deletedFetchers:E,newErrors:B,flushSync:W,viewTransitionOpts:F})=>{B&&a&&Object.values(B).forEach(V=>a(V,{location:T.location,params:T.matches[0]?.params??{},unstable_pattern:po(T.matches)})),T.fetchers.forEach((V,ee)=>{V.data!==void 0&&p.current.set(ee,V.data)}),E.forEach(V=>p.current.delete(V)),Ig(W===!1||n!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let I=r.window!=null&&r.window.document!=null&&typeof r.window.document.startViewTransition=="function";if(Ig(F==null||I,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!F||!I){n&&W?n(()=>y(T)):l===!1?y(T):k.startTransition(()=>{l===!0&&o(V=>qg(V,T)),y(T)});return}if(n&&W){n(()=>{R&&(w?.resolve(),R.skipTransition()),v({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let V=r.window.document.startViewTransition(()=>{n(()=>y(T))});V.finished.finally(()=>{n(()=>{x(void 0),b(void 0),u(void 0),v({isTransitioning:!1})})}),n(()=>b(V));return}R?(w?.resolve(),R.skipTransition(),m({state:T,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(u(T),v({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[r.window,n,R,w,l,o,a]);k.useLayoutEffect(()=>r.subscribe(g),[r,g]),k.useEffect(()=>{C.isTransitioning&&!C.flushSync&&x(new Pw)},[C]),k.useEffect(()=>{if(w&&c&&r.window){let T=c,E=w.promise,B=r.window.document.startViewTransition(async()=>{l===!1?y(T):k.startTransition(()=>{l===!0&&o(W=>qg(W,T)),y(T)}),await E});B.finished.finally(()=>{x(void 0),b(void 0),u(void 0),v({isTransitioning:!1})}),b(B)}},[c,w,r.window,l,o]),k.useEffect(()=>{w&&c&&S.location.key===c.location.key&&w.resolve()},[w,R,S.location,c]),k.useEffect(()=>{!C.isTransitioning&&h&&(u(h.state),v({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),m(void 0))},[C.isTransitioning,h]);let A=k.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:T=>r.navigate(T),push:(T,E,B)=>r.navigate(T,{state:E,preventScrollReset:B?.preventScrollReset}),replace:(T,E,B)=>r.navigate(T,{replace:!0,state:E,preventScrollReset:B?.preventScrollReset})}),[r]),D=r.basename||"/",L=k.useMemo(()=>({router:r,navigator:A,static:!1,basename:D,unstable_onError:a}),[r,A,D,a]);return k.createElement(k.Fragment,null,k.createElement(as.Provider,{value:L},k.createElement(vo.Provider,{value:S},k.createElement(ly.Provider,{value:p.current},k.createElement(Ff.Provider,{value:C},k.createElement(qw,{basename:D,location:S.location,navigationType:S.historyAction,navigator:A,unstable_useTransitions:l===!0},k.createElement(Iw,{routes:r.routes,future:r.future,state:S,unstable_onError:a})))))),null)}function qg(r,n){return{...r,navigation:n.navigation.state!=="idle"?n.navigation:r.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:r.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:r.actionData,fetchers:n.fetchers}}var Iw=k.memo(Fw);function Fw({routes:r,future:n,state:a,unstable_onError:l}){return Cw(r,void 0,a,l,n)}function qw({basename:r="/",children:n=null,location:a,navigationType:l="POP",navigator:d,static:y=!1,unstable_useTransitions:S}){Ie(!go(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=r.replace(/^\/*/,"/"),c=k.useMemo(()=>({basename:o,navigator:d,static:y,unstable_useTransitions:S,future:{}}),[o,d,y,S]);typeof a=="string"&&(a=Rn(a));let{pathname:u="/",search:C="",hash:v="",state:w=null,key:x="default"}=a,R=k.useMemo(()=>{let b=Pr(u,o);return b==null?null:{location:{pathname:b,search:C,hash:v,state:w,key:x},navigationType:l}},[o,u,C,v,w,x,l]);return Et(R!=null,`<Router basename="${o}"> is not able to match the URL "${u}${C}${v}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:k.createElement(Xr.Provider,{value:c},k.createElement(gc.Provider,{children:n,value:R}))}var Xl="get",Ql="application/x-www-form-urlencoded";function _c(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Ww(r){return _c(r)&&r.tagName.toLowerCase()==="button"}function Vw(r){return _c(r)&&r.tagName.toLowerCase()==="form"}function Kw(r){return _c(r)&&r.tagName.toLowerCase()==="input"}function Gw(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function $w(r,n){return r.button===0&&(!n||n==="_self")&&!Gw(r)}var zl=null;function Yw(){if(zl===null)try{new FormData(document.createElement("form"),0),zl=!1}catch{zl=!0}return zl}var Xw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $h(r){return r!=null&&!Xw.has(r)?(Et(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ql}"`),null):r}function Qw(r,n){let a,l,d,y,S;if(Vw(r)){let o=r.getAttribute("action");l=o?Pr(o,n):null,a=r.getAttribute("method")||Xl,d=$h(r.getAttribute("enctype"))||Ql,y=new FormData(r)}else if(Ww(r)||Kw(r)&&(r.type==="submit"||r.type==="image")){let o=r.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=r.getAttribute("formaction")||o.getAttribute("action");if(l=c?Pr(c,n):null,a=r.getAttribute("formmethod")||o.getAttribute("method")||Xl,d=$h(r.getAttribute("formenctype"))||$h(o.getAttribute("enctype"))||Ql,y=new FormData(o,r),!Yw()){let{name:u,type:C,value:v}=r;if(C==="image"){let w=u?`${u}.`:"";y.append(`${w}x`,"0"),y.append(`${w}y`,"0")}else u&&y.append(u,v)}}else{if(_c(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Xl,l=null,d=Ql,S=r}return y&&d==="text/plain"&&(S=y,y=void 0),{action:l,method:a.toLowerCase(),encType:d,formData:y,body:S}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Kf(r,n){if(r===!1||r===null||typeof r>"u")throw new Error(n)}function Zw(r,n,a){let l=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return l.pathname==="/"?l.pathname=`_root.${a}`:n&&Pr(l.pathname,n)==="/"?l.pathname=`${n.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function Jw(r,n){if(r.id in n)return n[r.id];try{let a=await import(r.module);return n[r.id]=a,a}catch(a){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ex(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function tx(r,n,a){let l=await Promise.all(r.map(async d=>{let y=n.routes[d.route.id];if(y){let S=await Jw(y,a);return S.links?S.links():[]}return[]}));return sx(l.flat(1).filter(ex).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Wg(r,n,a,l,d,y){let S=(c,u)=>a[u]?c.route.id!==a[u].route.id:!0,o=(c,u)=>a[u].pathname!==c.pathname||a[u].route.path?.endsWith("*")&&a[u].params["*"]!==c.params["*"];return y==="assets"?n.filter((c,u)=>S(c,u)||o(c,u)):y==="data"?n.filter((c,u)=>{let C=l.routes[c.route.id];if(!C||!C.hasLoader)return!1;if(S(c,u)||o(c,u))return!0;if(c.route.shouldRevalidate){let v=c.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function rx(r,n,{includeHydrateFallback:a}={}){return ix(r.map(l=>{let d=n.routes[l.route.id];if(!d)return[];let y=[d.module];return d.clientActionModule&&(y=y.concat(d.clientActionModule)),d.clientLoaderModule&&(y=y.concat(d.clientLoaderModule)),a&&d.hydrateFallbackModule&&(y=y.concat(d.hydrateFallbackModule)),d.imports&&(y=y.concat(d.imports)),y}).flat(1))}function ix(r){return[...new Set(r)]}function nx(r){let n={},a=Object.keys(r).sort();for(let l of a)n[l]=r[l];return n}function sx(r,n){let a=new Set;return new Set(n),r.reduce((l,d)=>{let y=JSON.stringify(nx(d));return a.has(y)||(a.add(y),l.push({key:y,link:d})),l},[])}function fy(){let r=k.useContext(as);return Kf(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function ax(){let r=k.useContext(vo);return Kf(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var Gf=k.createContext(void 0);Gf.displayName="FrameworkContext";function dy(){let r=k.useContext(Gf);return Kf(r,"You must render this element inside a <HydratedRouter> element"),r}function ox(r,n){let a=k.useContext(Gf),[l,d]=k.useState(!1),[y,S]=k.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:u,onMouseLeave:C,onTouchStart:v}=n,w=k.useRef(null);k.useEffect(()=>{if(r==="render"&&S(!0),r==="viewport"){let b=m=>{m.forEach(p=>{S(p.isIntersecting)})},h=new IntersectionObserver(b,{threshold:.5});return w.current&&h.observe(w.current),()=>{h.disconnect()}}},[r]),k.useEffect(()=>{if(l){let b=setTimeout(()=>{S(!0)},100);return()=>{clearTimeout(b)}}},[l]);let x=()=>{d(!0)},R=()=>{d(!1),S(!1)};return a?r!=="intent"?[y,w,{}]:[y,w,{onFocus:Za(o,x),onBlur:Za(c,R),onMouseEnter:Za(u,x),onMouseLeave:Za(C,R),onTouchStart:Za(v,x)}]:[!1,w,{}]}function Za(r,n){return a=>{r&&r(a),a.defaultPrevented||n(a)}}function lx({page:r,...n}){let{router:a}=fy(),l=k.useMemo(()=>Sn(a.routes,r,a.basename),[a.routes,r,a.basename]);return l?k.createElement(ux,{page:r,matches:l,...n}):null}function cx(r){let{manifest:n,routeModules:a}=dy(),[l,d]=k.useState([]);return k.useEffect(()=>{let y=!1;return tx(r,n,a).then(S=>{y||d(S)}),()=>{y=!0}},[r,n,a]),l}function ux({page:r,matches:n,...a}){let l=os(),{manifest:d,routeModules:y}=dy(),{basename:S}=fy(),{loaderData:o,matches:c}=ax(),u=k.useMemo(()=>Wg(r,n,c,d,l,"data"),[r,n,c,d,l]),C=k.useMemo(()=>Wg(r,n,c,d,l,"assets"),[r,n,c,d,l]),v=k.useMemo(()=>{if(r===l.pathname+l.search+l.hash)return[];let R=new Set,b=!1;if(n.forEach(m=>{let p=d.routes[m.route.id];!p||!p.hasLoader||(!u.some(g=>g.route.id===m.route.id)&&m.route.id in o&&y[m.route.id]?.shouldRevalidate||p.hasClientLoader?b=!0:R.add(m.route.id))}),R.size===0)return[];let h=Zw(r,S,"data");return b&&R.size>0&&h.searchParams.set("_routes",n.filter(m=>R.has(m.route.id)).map(m=>m.route.id).join(",")),[h.pathname+h.search]},[S,o,l,d,u,n,r,y]),w=k.useMemo(()=>rx(C,d),[C,d]),x=cx(C);return k.createElement(k.Fragment,null,v.map(R=>k.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...a})),w.map(R=>k.createElement("link",{key:R,rel:"modulepreload",href:R,...a})),x.map(({key:R,link:b})=>k.createElement("link",{key:R,nonce:a.nonce,...b})))}function hx(...r){return n=>{r.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var my=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{my&&(window.__reactRouterVersion="7.10.1")}catch{}function fx(r,n){return $1({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:l1({window:n?.window}),hydrationData:dx(),routes:r,mapRouteProperties:Hw,hydrationRouteProperties:zw,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,unstable_instrumentations:n?.unstable_instrumentations}).initialize()}function dx(){let r=window?.__staticRouterHydrationData;return r&&r.errors&&(r={...r,errors:mx(r.errors)}),r}function mx(r){if(!r)return null;let n=Object.entries(r),a={};for(let[l,d]of n)if(d&&d.__type==="RouteErrorResponse")a[l]=new vc(d.status,d.statusText,d.data,d.internal===!0);else if(d&&d.__type==="Error"){if(d.__subType){let y=window[d.__subType];if(typeof y=="function")try{let S=new y(d.message);S.stack="",a[l]=S}catch{}}if(a[l]==null){let y=new Error(d.message);y.stack="",a[l]=y}}else a[l]=d;return a}var py=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jr=k.forwardRef(function({onClick:n,discover:a="render",prefetch:l="none",relative:d,reloadDocument:y,replace:S,state:o,target:c,to:u,preventScrollReset:C,viewTransition:v,...w},x){let{basename:R,unstable_useTransitions:b}=k.useContext(Xr),h=typeof u=="string"&&py.test(u),m,p=!1;if(typeof u=="string"&&h&&(m=u,my))try{let W=new URL(window.location.href),F=u.startsWith("//")?new URL(W.protocol+u):new URL(u),I=Pr(F.pathname,R);F.origin===W.origin&&I!=null?u=I+F.search+F.hash:p=!0}catch{Et(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=_w(u,{relative:d}),[A,D,L]=ox(l,w),T=_x(u,{replace:S,state:o,target:c,preventScrollReset:C,relative:d,viewTransition:v,unstable_useTransitions:b});function E(W){n&&n(W),W.defaultPrevented||T(W)}let B=k.createElement("a",{...w,...L,href:m||g,onClick:p||y?n:E,ref:hx(x,D),target:c,"data-discover":!h&&a==="render"?"true":void 0});return A&&!h?k.createElement(k.Fragment,null,B,k.createElement(lx,{page:g})):B});jr.displayName="Link";var px=k.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:l="",end:d=!1,style:y,to:S,viewTransition:o,children:c,...u},C){let v=_o(S,{relative:u.relative}),w=os(),x=k.useContext(vo),{navigator:R,basename:b}=k.useContext(Xr),h=x!=null&&wx(v)&&o===!0,m=R.encodeLocation?R.encodeLocation(v).pathname:v.pathname,p=w.pathname,g=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;a||(p=p.toLowerCase(),g=g?g.toLowerCase():null,m=m.toLowerCase()),g&&b&&(g=Pr(g,b)||g);const A=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let D=p===m||!d&&p.startsWith(m)&&p.charAt(A)==="/",L=g!=null&&(g===m||!d&&g.startsWith(m)&&g.charAt(m.length)==="/"),T={isActive:D,isPending:L,isTransitioning:h},E=D?n:void 0,B;typeof l=="function"?B=l(T):B=[l,D?"active":null,L?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let W=typeof y=="function"?y(T):y;return k.createElement(jr,{...u,"aria-current":E,className:B,ref:C,style:W,to:S,viewTransition:o},typeof c=="function"?c(T):c)});px.displayName="NavLink";var vx=k.forwardRef(({discover:r="render",fetcherKey:n,navigate:a,reloadDocument:l,replace:d,state:y,method:S=Xl,action:o,onSubmit:c,relative:u,preventScrollReset:C,viewTransition:v,...w},x)=>{let{unstable_useTransitions:R}=k.useContext(Xr),b=bx(),h=Cx(o,{relative:u}),m=S.toLowerCase()==="get"?"get":"post",p=typeof o=="string"&&py.test(o),g=A=>{if(c&&c(A),A.defaultPrevented)return;A.preventDefault();let D=A.nativeEvent.submitter,L=D?.getAttribute("formmethod")||S,T=()=>b(D||A.currentTarget,{fetcherKey:n,method:L,navigate:a,replace:d,state:y,relative:u,preventScrollReset:C,viewTransition:v});R&&a!==!1?k.startTransition(()=>T()):T()};return k.createElement("form",{ref:x,method:m,action:h,onSubmit:l?c:g,...w,"data-discover":!p&&r==="render"?"true":void 0})});vx.displayName="Form";function gx(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vy(r){let n=k.useContext(as);return Ie(n,gx(r)),n}function _x(r,{target:n,replace:a,state:l,preventScrollReset:d,relative:y,viewTransition:S,unstable_useTransitions:o}={}){let c=yw(),u=os(),C=_o(r,{relative:y});return k.useCallback(v=>{if($w(v,n)){v.preventDefault();let w=a!==void 0?a:ui(u)===ui(C),x=()=>c(r,{replace:w,state:l,preventScrollReset:d,relative:y,viewTransition:S});o?k.startTransition(()=>x()):x()}},[u,c,C,a,l,n,r,d,y,S,o])}var yx=0,Sx=()=>`__${String(++yx)}__`;function bx(){let{router:r}=vy("useSubmit"),{basename:n}=k.useContext(Xr),a=Mw(),l=r.fetch,d=r.navigate;return k.useCallback(async(y,S={})=>{let{action:o,method:c,encType:u,formData:C,body:v}=Qw(y,n);if(S.navigate===!1){let w=S.fetcherKey||Sx();await l(w,a,S.action||o,{preventScrollReset:S.preventScrollReset,formData:C,body:v,formMethod:S.method||c,formEncType:S.encType||u,flushSync:S.flushSync})}else await d(S.action||o,{preventScrollReset:S.preventScrollReset,formData:C,body:v,formMethod:S.method||c,formEncType:S.encType||u,replace:S.replace,state:S.state,fromRouteId:a,flushSync:S.flushSync,viewTransition:S.viewTransition})},[l,d,n,a])}function Cx(r,{relative:n}={}){let{basename:a}=k.useContext(Xr),l=k.useContext(fi);Ie(l,"useFormAction must be used inside a RouteContext");let[d]=l.matches.slice(-1),y={..._o(r||".",{relative:n})},S=os();if(r==null){y.search=S.search;let o=new URLSearchParams(y.search),c=o.getAll("index");if(c.some(C=>C==="")){o.delete("index"),c.filter(v=>v).forEach(v=>o.append("index",v));let C=o.toString();y.search=C?`?${C}`:""}}return(!r||r===".")&&d.route.index&&(y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(y.pathname=y.pathname==="/"?a:li([a,y.pathname])),ui(y)}function wx(r,{relative:n}={}){let a=k.useContext(Ff);Ie(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=vy("useViewTransitionState"),d=_o(r,{relative:n});if(!a.isTransitioning)return!1;let y=Pr(a.currentLocation.pathname,l)||a.currentLocation.pathname,S=Pr(a.nextLocation.pathname,l)||a.nextLocation.pathname;return ic(d.pathname,S)!=null||ic(d.pathname,y)!=null}var ea=B_();const xx=Lf(ea);function Ex(r){return k.createElement(Uw,{flushSync:ea.flushSync,...r})}const Hr="/api";class gy extends Error{constructor(n,a,l){super(n),this.statusCode=a,this.details=l,this.name="ApiError"}}async function zr(r,n){const a=await fetch(r,{...n,headers:{"Content-Type":"application/json",...n?.headers}}),l=await a.json();if(!a.ok||!l.success)throw new gy(l.error||"API request failed",a.status,l.details);return l.data}const $f={list:async()=>zr(`${Hr}/branches`),get:async r=>{const n=encodeURIComponent(r);return zr(`${Hr}/branches/${n}`)},sync:async(r,n)=>{const a=encodeURIComponent(r);return zr(`${Hr}/branches/${a}/sync`,{method:"POST",body:JSON.stringify(n)})}},Rx={list:async()=>zr(`${Hr}/worktrees`),create:async r=>zr(`${Hr}/worktrees`,{method:"POST",body:JSON.stringify(r)}),delete:async r=>{const n=new URL(`${Hr}/worktrees/delete`,window.location.origin);n.searchParams.set("path",r),await zr(n.toString(),{method:"DELETE"})}},Yf={list:async()=>zr(`${Hr}/sessions`),start:async r=>zr(`${Hr}/sessions`,{method:"POST",body:JSON.stringify(r)}),get:async r=>zr(`${Hr}/sessions/${r}`),delete:async r=>{await zr(`${Hr}/sessions/${r}`,{method:"DELETE"})}},_y={get:async()=>zr(`${Hr}/config`),update:async r=>zr(`${Hr}/config`,{method:"PUT",body:JSON.stringify(r)})};function Ax(){return mc({queryKey:["branches"],queryFn:$f.list})}function Tx(r){return mc({queryKey:["branches",r],queryFn:()=>$f.get(r),enabled:!!r})}function Dx(r){const n=ss();return mo({mutationFn:a=>$f.sync(r,a),onSuccess:a=>{n.setQueryData(["branches",r],a.branch),n.invalidateQueries({queryKey:["branches"]})}})}function yy(r){var n,a,l="";if(typeof r=="string"||typeof r=="number")l+=r;else if(typeof r=="object")if(Array.isArray(r)){var d=r.length;for(n=0;n<d;n++)r[n]&&(a=yy(r[n]))&&(l&&(l+=" "),l+=a)}else for(a in r)r[a]&&(l&&(l+=" "),l+=a);return l}function Sy(){for(var r,n,a=0,l="",d=arguments.length;a<d;a++)(r=arguments[a])&&(n=yy(r))&&(l&&(l+=" "),l+=n);return l}const Ox=(r,n)=>{const a=new Array(r.length+n.length);for(let l=0;l<r.length;l++)a[l]=r[l];for(let l=0;l<n.length;l++)a[r.length+l]=n[l];return a},Mx=(r,n)=>({classGroupId:r,validator:n}),by=(r=new Map,n=null,a)=>({nextPart:r,validators:n,classGroupId:a}),sc="-",Vg=[],Lx="arbitrary..",kx=r=>{const n=Nx(r),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=r;return{getClassGroupId:S=>{if(S.startsWith("[")&&S.endsWith("]"))return Bx(S);const o=S.split(sc),c=o[0]===""&&o.length>1?1:0;return Cy(o,c,n)},getConflictingClassGroupIds:(S,o)=>{if(o){const c=l[S],u=a[S];return c?u?Ox(u,c):c:u||Vg}return a[S]||Vg}}},Cy=(r,n,a)=>{if(r.length-n===0)return a.classGroupId;const d=r[n],y=a.nextPart.get(d);if(y){const u=Cy(r,n+1,y);if(u)return u}const S=a.validators;if(S===null)return;const o=n===0?r.join(sc):r.slice(n).join(sc),c=S.length;for(let u=0;u<c;u++){const C=S[u];if(C.validator(o))return C.classGroupId}},Bx=r=>r.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=r.slice(1,-1),a=n.indexOf(":"),l=n.slice(0,a);return l?Lx+l:void 0})(),Nx=r=>{const{theme:n,classGroups:a}=r;return jx(a,n)},jx=(r,n)=>{const a=by();for(const l in r){const d=r[l];Xf(d,a,l,n)}return a},Xf=(r,n,a,l)=>{const d=r.length;for(let y=0;y<d;y++){const S=r[y];Hx(S,n,a,l)}},Hx=(r,n,a,l)=>{if(typeof r=="string"){zx(r,n,a);return}if(typeof r=="function"){Px(r,n,a,l);return}Ux(r,n,a,l)},zx=(r,n,a)=>{const l=r===""?n:wy(n,r);l.classGroupId=a},Px=(r,n,a,l)=>{if(Ix(r)){Xf(r(l),n,a,l);return}n.validators===null&&(n.validators=[]),n.validators.push(Mx(a,r))},Ux=(r,n,a,l)=>{const d=Object.entries(r),y=d.length;for(let S=0;S<y;S++){const[o,c]=d[S];Xf(c,wy(n,o),a,l)}},wy=(r,n)=>{let a=r;const l=n.split(sc),d=l.length;for(let y=0;y<d;y++){const S=l[y];let o=a.nextPart.get(S);o||(o=by(),a.nextPart.set(S,o)),a=o}return a},Ix=r=>"isThemeGetter"in r&&r.isThemeGetter===!0,Fx=r=>{if(r<1)return{get:()=>{},set:()=>{}};let n=0,a=Object.create(null),l=Object.create(null);const d=(y,S)=>{a[y]=S,n++,n>r&&(n=0,l=a,a=Object.create(null))};return{get(y){let S=a[y];if(S!==void 0)return S;if((S=l[y])!==void 0)return d(y,S),S},set(y,S){y in a?a[y]=S:d(y,S)}}},yf="!",Kg=":",qx=[],Gg=(r,n,a,l,d)=>({modifiers:r,hasImportantModifier:n,baseClassName:a,maybePostfixModifierPosition:l,isExternal:d}),Wx=r=>{const{prefix:n,experimentalParseClassName:a}=r;let l=d=>{const y=[];let S=0,o=0,c=0,u;const C=d.length;for(let b=0;b<C;b++){const h=d[b];if(S===0&&o===0){if(h===Kg){y.push(d.slice(c,b)),c=b+1;continue}if(h==="/"){u=b;continue}}h==="["?S++:h==="]"?S--:h==="("?o++:h===")"&&o--}const v=y.length===0?d:d.slice(c);let w=v,x=!1;v.endsWith(yf)?(w=v.slice(0,-1),x=!0):v.startsWith(yf)&&(w=v.slice(1),x=!0);const R=u&&u>c?u-c:void 0;return Gg(y,x,w,R)};if(n){const d=n+Kg,y=l;l=S=>S.startsWith(d)?y(S.slice(d.length)):Gg(qx,!1,S,void 0,!0)}if(a){const d=l;l=y=>a({className:y,parseClassName:d})}return l},Vx=r=>{const n=new Map;return r.orderSensitiveModifiers.forEach((a,l)=>{n.set(a,1e6+l)}),a=>{const l=[];let d=[];for(let y=0;y<a.length;y++){const S=a[y],o=S[0]==="[",c=n.has(S);o||c?(d.length>0&&(d.sort(),l.push(...d),d=[]),l.push(S)):d.push(S)}return d.length>0&&(d.sort(),l.push(...d)),l}},Kx=r=>({cache:Fx(r.cacheSize),parseClassName:Wx(r),sortModifiers:Vx(r),...kx(r)}),Gx=/\s+/,$x=(r,n)=>{const{parseClassName:a,getClassGroupId:l,getConflictingClassGroupIds:d,sortModifiers:y}=n,S=[],o=r.trim().split(Gx);let c="";for(let u=o.length-1;u>=0;u-=1){const C=o[u],{isExternal:v,modifiers:w,hasImportantModifier:x,baseClassName:R,maybePostfixModifierPosition:b}=a(C);if(v){c=C+(c.length>0?" "+c:c);continue}let h=!!b,m=l(h?R.substring(0,b):R);if(!m){if(!h){c=C+(c.length>0?" "+c:c);continue}if(m=l(R),!m){c=C+(c.length>0?" "+c:c);continue}h=!1}const p=w.length===0?"":w.length===1?w[0]:y(w).join(":"),g=x?p+yf:p,A=g+m;if(S.indexOf(A)>-1)continue;S.push(A);const D=d(m,h);for(let L=0;L<D.length;++L){const T=D[L];S.push(g+T)}c=C+(c.length>0?" "+c:c)}return c},Yx=(...r)=>{let n=0,a,l,d="";for(;n<r.length;)(a=r[n++])&&(l=xy(a))&&(d&&(d+=" "),d+=l);return d},xy=r=>{if(typeof r=="string")return r;let n,a="";for(let l=0;l<r.length;l++)r[l]&&(n=xy(r[l]))&&(a&&(a+=" "),a+=n);return a},Xx=(r,...n)=>{let a,l,d,y;const S=c=>{const u=n.reduce((C,v)=>v(C),r());return a=Kx(u),l=a.cache.get,d=a.cache.set,y=o,o(c)},o=c=>{const u=l(c);if(u)return u;const C=$x(c,a);return d(c,C),C};return y=S,(...c)=>y(Yx(...c))},Qx=[],kt=r=>{const n=a=>a[r]||Qx;return n.isThemeGetter=!0,n},Ey=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ry=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Zx=/^\d+\/\d+$/,Jx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eE=/\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$/,tE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qs=r=>Zx.test(r),Pe=r=>!!r&&!Number.isNaN(Number(r)),_n=r=>!!r&&Number.isInteger(Number(r)),Yh=r=>r.endsWith("%")&&Pe(r.slice(0,-1)),Hi=r=>Jx.test(r),nE=()=>!0,sE=r=>eE.test(r)&&!tE.test(r),Ay=()=>!1,aE=r=>rE.test(r),oE=r=>iE.test(r),lE=r=>!Ee(r)&&!Re(r),cE=r=>ta(r,Oy,Ay),Ee=r=>Ey.test(r),Xn=r=>ta(r,My,sE),Xh=r=>ta(r,mE,Pe),$g=r=>ta(r,Ty,Ay),uE=r=>ta(r,Dy,oE),Pl=r=>ta(r,Ly,aE),Re=r=>Ry.test(r),Ja=r=>ra(r,My),hE=r=>ra(r,pE),Yg=r=>ra(r,Ty),fE=r=>ra(r,Oy),dE=r=>ra(r,Dy),Ul=r=>ra(r,Ly,!0),ta=(r,n,a)=>{const l=Ey.exec(r);return l?l[1]?n(l[1]):a(l[2]):!1},ra=(r,n,a=!1)=>{const l=Ry.exec(r);return l?l[1]?n(l[1]):a:!1},Ty=r=>r==="position"||r==="percentage",Dy=r=>r==="image"||r==="url",Oy=r=>r==="length"||r==="size"||r==="bg-size",My=r=>r==="length",mE=r=>r==="number",pE=r=>r==="family-name",Ly=r=>r==="shadow",vE=()=>{const r=kt("color"),n=kt("font"),a=kt("text"),l=kt("font-weight"),d=kt("tracking"),y=kt("leading"),S=kt("breakpoint"),o=kt("container"),c=kt("spacing"),u=kt("radius"),C=kt("shadow"),v=kt("inset-shadow"),w=kt("text-shadow"),x=kt("drop-shadow"),R=kt("blur"),b=kt("perspective"),h=kt("aspect"),m=kt("ease"),p=kt("animate"),g=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...A(),Re,Ee],L=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],E=()=>[Re,Ee,c],B=()=>[qs,"full","auto",...E()],W=()=>[_n,"none","subgrid",Re,Ee],F=()=>["auto",{span:["full",_n,Re,Ee]},_n,Re,Ee],I=()=>[_n,"auto",Re,Ee],V=()=>["auto","min","max","fr",Re,Ee],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...E()],Z=()=>[qs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],K=()=>[r,Re,Ee],j=()=>[...A(),Yg,$g,{position:[Re,Ee]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",fE,cE,{size:[Re,Ee]}],z=()=>[Yh,Ja,Xn],Q=()=>["","none","full",u,Re,Ee],ie=()=>["",Pe,Ja,Xn],de=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[Pe,Yh,Yg,$g],P=()=>["","none",R,Re,Ee],he=()=>["none",Pe,Re,Ee],ge=()=>["none",Pe,Re,Ee],oe=()=>[Pe,Re,Ee],me=()=>[qs,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Hi],breakpoint:[Hi],color:[nE],container:[Hi],"drop-shadow":[Hi],ease:["in","out","in-out"],font:[lE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Hi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Hi],shadow:[Hi],spacing:["px",Pe],text:[Hi],"text-shadow":[Hi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qs,Ee,Re,h]}],container:["container"],columns:[{columns:[Pe,Ee,Re,o]}],"break-after":[{"break-after":g()}],"break-before":[{"break-before":g()}],"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:D()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[_n,"auto",Re,Ee]}],basis:[{basis:[qs,"full","auto",o,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,qs,"auto","initial","none",Ee]}],grow:[{grow:["",Pe,Re,Ee]}],shrink:[{shrink:["",Pe,Re,Ee]}],order:[{order:[_n,"first","last","none",Re,Ee]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[o,"screen",...Z()]}],"min-w":[{"min-w":[o,"screen","none",...Z()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[S]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",a,Ja,Xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,Re,Xh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yh,Ee]}],"font-family":[{font:[hE,Ee,n]}],"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:[d,Re,Ee]}],"line-clamp":[{"line-clamp":[Pe,"none",Re,Xh]}],leading:[{leading:[y,...E()]}],"list-image":[{"list-image":["none",Re,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",Re,Xn]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Pe,"auto",Re,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,Ee]}],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",Re,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_n,Re,Ee],radial:["",Re,Ee],conic:[_n,Re,Ee]},dE,uE]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,Re,Ee]}],"outline-w":[{outline:["",Pe,Ja,Xn]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",C,Ul,Pl]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",v,Ul,Pl]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Pe,Xn]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",w,Ul,Pl]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Pe,Re,Ee]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Re,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Ee]}],filter:[{filter:["","none",Re,Ee]}],blur:[{blur:P()}],brightness:[{brightness:[Pe,Re,Ee]}],contrast:[{contrast:[Pe,Re,Ee]}],"drop-shadow":[{"drop-shadow":["","none",x,Ul,Pl]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Pe,Re,Ee]}],"hue-rotate":[{"hue-rotate":[Pe,Re,Ee]}],invert:[{invert:["",Pe,Re,Ee]}],saturate:[{saturate:[Pe,Re,Ee]}],sepia:[{sepia:["",Pe,Re,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Ee]}],"backdrop-blur":[{"backdrop-blur":P()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,Re,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,Re,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,Re,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,Re,Ee]}],"backdrop-invert":[{"backdrop-invert":["",Pe,Re,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,Re,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,Re,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,Re,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Re,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",Re,Ee]}],ease:[{ease:["linear","initial",m,Re,Ee]}],delay:[{delay:[Pe,Re,Ee]}],animate:[{animate:["none",p,Re,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,Re,Ee]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[Re,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",Re,Ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",Re,Ee]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Pe,Ja,Xn,Xh]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},gE=Xx(vE);function Ue(...r){return gE(Sy(r))}const zt=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("rounded-lg border border-border bg-card text-card-foreground shadow",r),...n}));zt.displayName="Card";const br=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("flex flex-col space-y-1.5 p-6",r),...n}));br.displayName="CardHeader";const _E=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("font-semibold leading-none tracking-tight",r),...n}));_E.displayName="CardTitle";const yE=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("text-sm text-muted-foreground",r),...n}));yE.displayName="CardDescription";const Vt=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("p-6 pt-0",r),...n}));Vt.displayName="CardContent";const ky=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("flex items-center p-6 pt-0",r),...n}));ky.displayName="CardFooter";const Xg=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Qg=Sy,Qf=(r,n)=>a=>{var l;if(n?.variants==null)return Qg(r,a?.class,a?.className);const{variants:d,defaultVariants:y}=n,S=Object.keys(d).map(u=>{const C=a?.[u],v=y?.[u];if(C===null)return null;const w=Xg(C)||Xg(v);return d[u][w]}),o=a&&Object.entries(a).reduce((u,C)=>{let[v,w]=C;return w===void 0||(u[v]=w),u},{}),c=n==null||(l=n.compoundVariants)===null||l===void 0?void 0:l.reduce((u,C)=>{let{class:v,className:w,...x}=C;return Object.entries(x).every(R=>{let[b,h]=R;return Array.isArray(h)?h.includes({...y,...o}[b]):{...y,...o}[b]===h})?[...u,v,w]:u},[]);return Qg(r,S,c,a?.class,a?.className)},SE=Qf("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-500/15 text-green-400 border-green-500/30",warning:"border-transparent bg-yellow-500/15 text-yellow-400 border-yellow-500/30",local:"border-transparent bg-purple-500/15 text-purple-400 border-purple-500/30",remote:"border-transparent bg-blue-500/15 text-blue-400 border-blue-500/30"}},defaultVariants:{variant:"default"}});function Ct({className:r,variant:n,...a}){return O.jsx("div",{className:Ue(SE({variant:n}),r),...a})}const eo="__unknown__";function bE(r){return r.name.length>32?`${r.name.slice(0,29)}...`:r.name}function CE(r){if(!r.divergence)return"divergence: n/a";const{ahead:n,behind:a,upToDate:l}=r.divergence;return l?"divergence: up-to-date":`divergence: +${n} / -${a}`}function wE({branches:r}){const n=k.useMemo(()=>new Map(r.map(d=>[d.name,d])),[r]),a=k.useMemo(()=>{const d=new Set;return r.forEach(y=>{y.baseBranch&&d.add(y.baseBranch)}),d},[r]),l=k.useMemo(()=>{const d=new Map;return r.forEach(y=>{const S=y.baseBranch??eo;if(!(!y.baseBranch&&a.has(y.name))){if(!d.has(S)){const o=S!==eo?n.get(S)??null:null;d.set(S,{id:S,baseLabel:S===eo?"ベース不明":S,baseNode:o,nodes:[],isSyntheticBase:o===null})}d.get(S)?.nodes.push(y)}}),Array.from(d.values()).sort((y,S)=>y.id===eo?1:S.id===eo?-1:y.baseLabel.localeCompare(S.baseLabel,"ja"))},[r,n,a]);return l.length?O.jsxs(zt,{children:[O.jsx(br,{className:"pb-4",children:O.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[O.jsxs("div",{children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"BRANCH GRAPH"}),O.jsx("h2",{className:"mt-1 text-lg font-semibold",children:"ベースブランチの関係をグラフィカルに把握"}),O.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"baseRef、Git upstream、merge-baseヒューリスティクスを用いて推定したベースブランチ単位で派生ノードをレーン表示します。"})]}),O.jsxs("div",{className:"flex flex-wrap gap-2",children:[O.jsx(Ct,{variant:"outline",children:"Base"}),O.jsx(Ct,{variant:"local",children:"Local"}),O.jsx(Ct,{variant:"remote",children:"Remote"}),O.jsx(Ct,{variant:"success",children:"Worktree"})]})]})}),O.jsx(Vt,{className:"space-y-4",children:l.map(d=>O.jsxs("article",{className:"rounded-lg border bg-muted/30 p-4",children:[O.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("span",{className:"font-semibold",children:d.baseLabel}),d.baseNode&&O.jsx(Ct,{variant:d.baseNode.type==="local"?"local":"remote",className:"text-xs",children:d.baseNode.type==="local"?"LOCAL":"REMOTE"}),d.isSyntheticBase&&O.jsx(Ct,{variant:"outline",className:"text-xs text-muted-foreground",children:"推定のみ"})]}),O.jsxs("span",{className:"text-sm text-muted-foreground",children:[d.nodes.length," branch",d.nodes.length>1?"es":""]})]}),O.jsxs("div",{className:"flex flex-wrap gap-2",children:[xE(d),d.nodes.map(y=>O.jsx(EE,{branch:y},y.name))]})]},d.id))})]}):O.jsx(zt,{className:"border-dashed",children:O.jsxs(Vt,{className:"flex flex-col items-center justify-center py-12 text-center",children:[O.jsx("p",{className:"text-muted-foreground",children:"グラフ表示できるブランチがありません。"}),O.jsx("p",{className:"text-sm text-muted-foreground",children:"fetch済みのブランチやWorktreeを追加すると関係図が表示されます。"})]})})}function xE(r){const n=r.baseLabel==="ベース不明"?"Unknown base":r.baseLabel,a=O.jsxs("div",{className:Ue("group relative rounded-md border bg-card px-3 py-2 transition-colors hover:border-muted-foreground/50",r.baseNode?.type==="local"&&"border-l-2 border-l-local",r.baseNode?.type==="remote"&&"border-l-2 border-l-remote"),children:[O.jsx("span",{className:"block truncate text-sm font-medium",children:n}),O.jsx("span",{className:"text-xs text-muted-foreground",children:"BASE"}),O.jsxs("div",{className:"invisible absolute bottom-full left-0 z-10 mb-2 w-48 rounded-md border bg-popover p-2 text-xs shadow-md group-hover:visible",children:[O.jsx("p",{className:"font-medium",children:n}),O.jsx("p",{className:"text-muted-foreground",children:r.baseNode?`type: ${r.baseNode.type}`:"推定されたベースブランチ"})]})]});return r.baseNode?O.jsx(jr,{to:`/${encodeURIComponent(r.baseNode.name)}`,className:"block","aria-label":`ベースブランチ ${r.baseNode.name} を開く`,children:a},`base-${r.id}`):O.jsx("div",{children:a},`base-${r.id}`)}function EE({branch:r}){const n=O.jsxs("div",{className:Ue("group relative rounded-md border bg-card px-3 py-2 transition-colors hover:border-muted-foreground/50",r.type==="local"&&"border-l-2 border-l-local",r.type==="remote"&&"border-l-2 border-l-remote",r.mergeStatus==="merged"&&"opacity-60"),children:[O.jsx("span",{className:"block truncate text-sm font-medium",children:bE(r)}),O.jsx("span",{className:"text-xs text-muted-foreground",children:r.worktreePath?"Worktree":"No Worktree"}),O.jsxs("div",{className:"invisible absolute bottom-full left-0 z-10 mb-2 w-56 rounded-md border bg-popover p-2 text-xs shadow-md group-hover:visible",children:[O.jsx("p",{className:"font-medium",children:r.name}),O.jsxs("p",{className:"text-muted-foreground",children:["base: ",r.baseBranch??"unknown"]}),O.jsx("p",{className:"text-muted-foreground",children:CE(r)}),O.jsx("p",{className:"text-muted-foreground",children:r.worktreePath??"Worktree未作成"})]})]});return O.jsx(jr,{to:`/${encodeURIComponent(r.name)}`,className:"block","aria-label":`${r.name} の詳細を開く`,children:n})}function Gr({eyebrow:r,title:n,subtitle:a,actions:l,children:d,className:y}){return O.jsx("header",{className:Ue("border-b border-border bg-card/50 px-6 py-8",y),children:O.jsxs("div",{className:"mx-auto max-w-7xl",children:[r&&O.jsx("p",{className:"mb-2 text-xs font-medium uppercase tracking-widest text-muted-foreground",children:r}),O.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[O.jsxs("div",{children:[O.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:n}),a&&O.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:a}),d]}),l&&O.jsx("div",{className:"flex gap-2",children:l})]})]})})}function Il({label:r,value:n,hint:a,className:l}){return O.jsxs(zt,{className:Ue("p-5",l),children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:r}),O.jsx("p",{className:"mt-1 text-3xl font-semibold tabular-nums",children:n}),a&&O.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:a})]})}const RE=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),AE=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,l)=>l?l.toUpperCase():a.toLowerCase()),Zg=r=>{const n=AE(r);return n.charAt(0).toUpperCase()+n.slice(1)},By=(...r)=>r.filter((n,a,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===a).join(" ").trim(),TE=r=>{for(const n in r)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var DE={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 OE=k.forwardRef(({color:r="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:d="",children:y,iconNode:S,...o},c)=>k.createElement("svg",{ref:c,...DE,width:n,height:n,stroke:r,strokeWidth:l?Number(a)*24/Number(n):a,className:By("lucide",d),...!y&&!TE(o)&&{"aria-hidden":"true"},...o},[...S.map(([u,C])=>k.createElement(u,C)),...Array.isArray(y)?y:[y]]));const yc=(r,n)=>{const a=k.forwardRef(({className:l,...d},y)=>k.createElement(OE,{ref:y,iconNode:n,className:By(`lucide-${RE(Zg(r))}`,`lucide-${r}`,l),...d}));return a.displayName=Zg(r),a};const ME=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],LE=yc("check",ME);const kE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ny=yc("chevron-down",kE);const BE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],NE=yc("chevron-up",BE);const jE=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],HE=yc("search",jE),co=k.forwardRef(({className:r,type:n,...a},l)=>O.jsx("input",{type:n,className:Ue("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:l,...a}));co.displayName="Input";function zE({value:r,onChange:n,placeholder:a="Search...",className:l,count:d}){return O.jsxs("div",{className:Ue("flex items-center gap-3",l),children:[O.jsxs("div",{className:"relative flex-1",children:[O.jsx(HE,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),O.jsx(co,{type:"text",value:r,onChange:y=>n(y.target.value),placeholder:a,className:"pl-9"})]}),d&&O.jsxs("span",{className:"text-sm text-muted-foreground",children:[d.filtered," / ",d.total]})]})}function Jg(r,n){if(typeof r=="function")return r(n);r!=null&&(r.current=n)}function yo(...r){return n=>{let a=!1;const l=r.map(d=>{const y=Jg(d,n);return!a&&typeof y=="function"&&(a=!0),y});if(a)return()=>{for(let d=0;d<l.length;d++){const y=l[d];typeof y=="function"?y():Jg(r[d],null)}}}}function Kt(...r){return k.useCallback(yo(...r),r)}var PE=Symbol.for("react.lazy"),ac=dc[" use ".trim().toString()];function UE(r){return typeof r=="object"&&r!==null&&"then"in r}function jy(r){return r!=null&&typeof r=="object"&&"$$typeof"in r&&r.$$typeof===PE&&"_payload"in r&&UE(r._payload)}function IE(r){const n=qE(r),a=k.forwardRef((l,d)=>{let{children:y,...S}=l;jy(y)&&typeof ac=="function"&&(y=ac(y._payload));const o=k.Children.toArray(y),c=o.find(VE);if(c){const u=c.props.children,C=o.map(v=>v===c?k.Children.count(u)>1?k.Children.only(null):k.isValidElement(u)?u.props.children:null:v);return O.jsx(n,{...S,ref:d,children:k.isValidElement(u)?k.cloneElement(u,void 0,C):null})}return O.jsx(n,{...S,ref:d,children:y})});return a.displayName=`${r}.Slot`,a}var FE=IE("Slot");function qE(r){const n=k.forwardRef((a,l)=>{let{children:d,...y}=a;if(jy(d)&&typeof ac=="function"&&(d=ac(d._payload)),k.isValidElement(d)){const S=GE(d),o=KE(y,d.props);return d.type!==k.Fragment&&(o.ref=l?yo(l,S):S),k.cloneElement(d,o)}return k.Children.count(d)>1?k.Children.only(null):null});return n.displayName=`${r}.SlotClone`,n}var WE=Symbol("radix.slottable");function VE(r){return k.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===WE}function KE(r,n){const a={...n};for(const l in n){const d=r[l],y=n[l];/^on[A-Z]/.test(l)?d&&y?a[l]=(...o)=>{const c=y(...o);return d(...o),c}:d&&(a[l]=d):l==="style"?a[l]={...d,...y}:l==="className"&&(a[l]=[d,y].filter(Boolean).join(" "))}return{...r,...a}}function GE(r){let n=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?r.ref:(n=Object.getOwnPropertyDescriptor(r,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?r.props.ref:r.props.ref||r.ref)}const $E=Qf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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 shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-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-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Pt=k.forwardRef(({className:r,variant:n,size:a,asChild:l=!1,...d},y)=>{const S=l?FE:"button";return O.jsx(S,{className:Ue($E({variant:n,size:a,className:r})),ref:y,...d})});Pt.displayName="Button";const YE=Qf("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",success:"border-green-500/50 bg-green-500/10 text-green-400 [&>svg]:text-green-400",warning:"border-yellow-500/50 bg-yellow-500/10 text-yellow-400 [&>svg]:text-yellow-400",info:"border-blue-500/50 bg-blue-500/10 text-blue-400 [&>svg]:text-blue-400"}},defaultVariants:{variant:"default"}}),Ui=k.forwardRef(({className:r,variant:n,...a},l)=>O.jsx("div",{ref:l,role:"alert",className:Ue(YE({variant:n}),r),...a}));Ui.displayName="Alert";const XE=k.forwardRef(({className:r,...n},a)=>O.jsx("h5",{ref:a,className:Ue("mb-1 font-medium leading-none tracking-tight",r),...n}));XE.displayName="AlertTitle";const Ii=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{ref:a,className:Ue("text-sm [&_p]:leading-relaxed",r),...n}));Ii.displayName="AlertDescription";const Fl=new Intl.NumberFormat("ja-JP");function QE(){const{data:r,isLoading:n,error:a}=Ax(),[l,d]=k.useState(""),y=r??[],S=k.useMemo(()=>{const u=y.filter(w=>!!w.worktreePath).length,C=y.filter(w=>w.type==="remote").length,v=y.filter(w=>w.divergence?.upToDate).length;return{total:y.length,worktrees:u,remote:C,healthy:v}},[y]),o=l.trim().toLowerCase(),c=k.useMemo(()=>o?y.filter(u=>[u.name,u.type,u.mergeStatus,u.commitMessage??"",u.worktreePath??""].join(" ").toLowerCase().includes(o)):y,[y,o]);return n?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"WORKTREE DASHBOARD",title:"gwt Control Center",subtitle:"Loading branch data..."}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx("div",{className:"flex items-center justify-center py-20",children:O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"mb-4 text-4xl",children:"⏳"}),O.jsx("p",{className:"text-muted-foreground",children:"Loading branches..."})]})})})]}):a?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"WORKTREE DASHBOARD",title:"gwt Control Center"}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx(Ui,{variant:"destructive",children:O.jsx(Ii,{children:a instanceof Error?a.message:"Failed to load branches"})})})]}):y.length?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"WORKTREE DASHBOARD",title:"gwt Control Center",subtitle:"Manage Git branches and AI tools from your browser"}),O.jsxs("main",{className:"mx-auto max-w-7xl space-y-6 px-6 py-8",children:[c.length>0&&O.jsx(wE,{branches:c}),O.jsxs("section",{className:"grid grid-cols-2 gap-4 md:grid-cols-4",children:[O.jsx(Il,{label:"Total Branches",value:Fl.format(S.total),hint:"Local + Remote"}),O.jsx(Il,{label:"Active Worktrees",value:Fl.format(S.worktrees),hint:"Ready for AI tools"}),O.jsx(Il,{label:"Remote Tracking",value:Fl.format(S.remote),hint:"Synced with origin"}),O.jsx(Il,{label:"Up to Date",value:Fl.format(S.healthy),hint:"No divergence"})]}),O.jsx(zE,{value:l,onChange:d,placeholder:"Search branches by name, type, or commit...",count:{filtered:c.length,total:S.total}}),c.length===0?O.jsx(zt,{className:"border-dashed",children:O.jsxs(Vt,{className:"flex flex-col items-center justify-center py-12",children:[O.jsx("h3",{className:"mb-2 text-lg font-semibold",children:"No matching branches"}),O.jsx("p",{className:"text-sm text-muted-foreground",children:"Try a different search term or clear the filter."})]})}):O.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:c.map(u=>O.jsx(ZE,{branch:u},u.name))})]})]}):O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"WORKTREE DASHBOARD",title:"gwt Control Center"}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx(zt,{className:"border-dashed",children:O.jsxs(Vt,{className:"flex flex-col items-center justify-center py-12",children:[O.jsx("div",{className:"mb-4 text-4xl",children:"📭"}),O.jsx("h3",{className:"mb-2 text-lg font-semibold",children:"No branches found"}),O.jsxs("p",{className:"text-sm text-muted-foreground",children:["Try running"," ",O.jsx("code",{className:"rounded bg-muted px-1",children:"git fetch origin"})," ","to sync branches."]})]})})})]})}function ZE({branch:r}){return O.jsxs(zt,{className:"flex flex-col transition-colors hover:border-muted-foreground/50",children:[O.jsx(br,{className:"pb-3",children:O.jsxs("div",{className:"flex items-start justify-between gap-2",children:[O.jsxs("div",{className:"min-w-0 flex-1",children:[O.jsxs("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[r.type==="local"?"Local":"Remote"," Branch"]}),O.jsx("h3",{className:"mt-1 truncate font-semibold",title:r.name,children:r.name})]}),O.jsxs("div",{className:"flex flex-wrap justify-end gap-1",children:[O.jsx(Ct,{variant:r.type==="local"?"local":"remote",children:r.type==="local"?"L":"R"}),r.worktreePath&&O.jsx(Ct,{variant:"success",children:"WT"})]})]})}),O.jsxs(Vt,{className:"flex-1 pb-3",children:[O.jsx("p",{className:"line-clamp-2 text-sm text-muted-foreground",children:r.commitMessage??"No commit message"}),r.divergence&&O.jsxs("div",{className:"mt-3 flex flex-wrap gap-1.5",children:[r.divergence.ahead>0&&O.jsxs(Ct,{variant:"outline",className:"text-xs",children:["↑ ",r.divergence.ahead]}),r.divergence.behind>0&&O.jsxs(Ct,{variant:"outline",className:"text-xs",children:["↓ ",r.divergence.behind]}),O.jsx(Ct,{variant:r.divergence.upToDate?"success":"warning",className:"text-xs",children:r.divergence.upToDate?"Up to date":"Needs sync"})]})]}),O.jsx(ky,{className:"pt-0",children:O.jsx(Pt,{variant:"ghost",size:"sm",asChild:!0,className:"w-full",children:O.jsx(jr,{to:`/${encodeURIComponent(r.name)}`,children:"View Details →"})})})]})}function JE(){const r=ss();return mo({mutationFn:n=>Rx.create(n),onSuccess:()=>{r.invalidateQueries({queryKey:["worktrees"]}),r.invalidateQueries({queryKey:["branches"]})}})}function eR(){return mc({queryKey:["sessions"],queryFn:Yf.list})}function tR(){const r=ss();return mo({mutationFn:n=>Yf.start(n),onSuccess:n=>{r.setQueryData(["sessions"],a=>{const l=a?.filter(d=>d.sessionId!==n.sessionId)??[];return[n,...l]}),r.invalidateQueries({queryKey:["sessions"]})}})}function rR(){const r=ss();return mo({mutationFn:n=>Yf.delete(n),onSuccess:()=>{r.invalidateQueries({queryKey:["sessions"]})}})}function Hy(){return mc({queryKey:["config"],queryFn:_y.get})}function iR(){const r=ss();return mo({mutationFn:_y.update,onSuccess:n=>{r.setQueryData(["config"],n)}})}const Zf=k.forwardRef(({className:r,...n},a)=>O.jsx("div",{className:"relative w-full overflow-auto",children:O.jsx("table",{ref:a,className:Ue("w-full caption-bottom text-sm",r),...n})}));Zf.displayName="Table";const Jf=k.forwardRef(({className:r,...n},a)=>O.jsx("thead",{ref:a,className:Ue("[&_tr]:border-b",r),...n}));Jf.displayName="TableHeader";const ed=k.forwardRef(({className:r,...n},a)=>O.jsx("tbody",{ref:a,className:Ue("[&_tr:last-child]:border-0",r),...n}));ed.displayName="TableBody";const nR=k.forwardRef(({className:r,...n},a)=>O.jsx("tfoot",{ref:a,className:Ue("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",r),...n}));nR.displayName="TableFooter";const uo=k.forwardRef(({className:r,...n},a)=>O.jsx("tr",{ref:a,className:Ue("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...n}));uo.displayName="TableRow";const ni=k.forwardRef(({className:r,...n},a)=>O.jsx("th",{ref:a,className:Ue("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",r),...n}));ni.displayName="TableHead";const si=k.forwardRef(({className:r,...n},a)=>O.jsx("td",{ref:a,className:Ue("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",r),...n}));si.displayName="TableCell";const sR=k.forwardRef(({className:r,...n},a)=>O.jsx("caption",{ref:a,className:Ue("mt-4 text-sm text-muted-foreground",r),...n}));sR.displayName="TableCaption";const aR={pending:"outline",running:"success",completed:"default",failed:"destructive"},oR={pending:"Pending",running:"Running",completed:"Completed",failed:"Failed"};function e_(r){if(!r)return"--";try{return new Intl.DateTimeFormat("ja-JP",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(r))}catch{return r}}function lR(r,n){return r==="custom"?n??"Custom":r==="codex-cli"?"Codex CLI":"Claude Code"}function cR({sessions:r,isLoading:n,terminatingSessionId:a,isDeleting:l,onTerminate:d,onSelectSession:y}){return O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-3",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Session History"}),O.jsx("h3",{className:"mt-1 text-lg font-semibold",children:"セッション履歴"})]}),n&&O.jsx(Ct,{variant:"outline",className:"animate-pulse",children:"読み込み中..."})]}),O.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"この Worktree に紐づいた AI セッション履歴です。CLI からの起動分も共有されます。"})]}),O.jsx(Vt,{children:r.length===0?O.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"セッション履歴はまだありません。"}):O.jsx("div",{className:"overflow-x-auto rounded-md border",children:O.jsxs(Zf,{children:[O.jsx(Jf,{children:O.jsxs(uo,{children:[O.jsx(ni,{className:"w-24",children:"状態"}),O.jsx(ni,{children:"ツール"}),O.jsx(ni,{className:"w-20",children:"モード"}),O.jsx(ni,{children:"開始"}),O.jsx(ni,{children:"終了"}),O.jsx(ni,{className:"w-24 text-right",children:"操作"})]})}),O.jsx(ed,{children:r.slice(0,5).map(S=>O.jsxs(uo,{className:"cursor-pointer hover:bg-muted/50",onClick:()=>{S.status==="running"&&y(S.sessionId)},children:[O.jsx(si,{children:O.jsx(Ct,{variant:aR[S.status],children:oR[S.status]})}),O.jsx(si,{className:"font-medium",children:lR(S.toolType,S.toolName)}),O.jsx(si,{children:O.jsx("span",{className:"text-muted-foreground",children:S.mode})}),O.jsx(si,{className:"text-muted-foreground",children:e_(S.startedAt)}),O.jsx(si,{className:"text-muted-foreground",children:e_(S.endedAt)}),O.jsx(si,{className:"text-right",children:S.status==="running"?O.jsx(Pt,{variant:"ghost",size:"sm",onClick:o=>{o.stopPropagation(),d(S.sessionId)},disabled:a===S.sessionId||l,children:a===S.sessionId?"終了中...":"終了"}):O.jsx("span",{className:"text-sm text-muted-foreground",children:"--"})})]},S.sessionId))})]})})})]})}function t_(r,[n,a]){return Math.min(a,Math.max(n,r))}function Mt(r,n,{checkForDefaultPrevented:a=!0}={}){return function(d){if(r?.(d),a===!1||!d.defaultPrevented)return n?.(d)}}function td(r,n=[]){let a=[];function l(y,S){const o=k.createContext(S),c=a.length;a=[...a,S];const u=v=>{const{scope:w,children:x,...R}=v,b=w?.[r]?.[c]||o,h=k.useMemo(()=>R,Object.values(R));return O.jsx(b.Provider,{value:h,children:x})};u.displayName=y+"Provider";function C(v,w){const x=w?.[r]?.[c]||o,R=k.useContext(x);if(R)return R;if(S!==void 0)return S;throw new Error(`\`${v}\` must be used within \`${y}\``)}return[u,C]}const d=()=>{const y=a.map(S=>k.createContext(S));return function(o){const c=o?.[r]||y;return k.useMemo(()=>({[`__scope${r}`]:{...o,[r]:c}}),[o,c])}};return d.scopeName=r,[l,uR(d,...n)]}function uR(...r){const n=r[0];if(r.length===1)return n;const a=()=>{const l=r.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(y){const S=l.reduce((o,{useScope:c,scopeName:u})=>{const v=c(y)[`__scope${u}`];return{...o,...v}},{});return k.useMemo(()=>({[`__scope${n.scopeName}`]:S}),[S])}};return a.scopeName=n.scopeName,a}function r_(r){const n=hR(r),a=k.forwardRef((l,d)=>{const{children:y,...S}=l,o=k.Children.toArray(y),c=o.find(dR);if(c){const u=c.props.children,C=o.map(v=>v===c?k.Children.count(u)>1?k.Children.only(null):k.isValidElement(u)?u.props.children:null:v);return O.jsx(n,{...S,ref:d,children:k.isValidElement(u)?k.cloneElement(u,void 0,C):null})}return O.jsx(n,{...S,ref:d,children:y})});return a.displayName=`${r}.Slot`,a}function hR(r){const n=k.forwardRef((a,l)=>{const{children:d,...y}=a;if(k.isValidElement(d)){const S=pR(d),o=mR(y,d.props);return d.type!==k.Fragment&&(o.ref=l?yo(l,S):S),k.cloneElement(d,o)}return k.Children.count(d)>1?k.Children.only(null):null});return n.displayName=`${r}.SlotClone`,n}var fR=Symbol("radix.slottable");function dR(r){return k.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===fR}function mR(r,n){const a={...n};for(const l in n){const d=r[l],y=n[l];/^on[A-Z]/.test(l)?d&&y?a[l]=(...o)=>{const c=y(...o);return d(...o),c}:d&&(a[l]=d):l==="style"?a[l]={...d,...y}:l==="className"&&(a[l]=[d,y].filter(Boolean).join(" "))}return{...r,...a}}function pR(r){let n=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?r.ref:(n=Object.getOwnPropertyDescriptor(r,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?r.props.ref:r.props.ref||r.ref)}function vR(r){const n=r+"CollectionProvider",[a,l]=td(n),[d,y]=a(n,{collectionRef:{current:null},itemMap:new Map}),S=b=>{const{scope:h,children:m}=b,p=Pi.useRef(null),g=Pi.useRef(new Map).current;return O.jsx(d,{scope:h,itemMap:g,collectionRef:p,children:m})};S.displayName=n;const o=r+"CollectionSlot",c=r_(o),u=Pi.forwardRef((b,h)=>{const{scope:m,children:p}=b,g=y(o,m),A=Kt(h,g.collectionRef);return O.jsx(c,{ref:A,children:p})});u.displayName=o;const C=r+"CollectionItemSlot",v="data-radix-collection-item",w=r_(C),x=Pi.forwardRef((b,h)=>{const{scope:m,children:p,...g}=b,A=Pi.useRef(null),D=Kt(h,A),L=y(C,m);return Pi.useEffect(()=>(L.itemMap.set(A,{ref:A,...g}),()=>void L.itemMap.delete(A))),O.jsx(w,{[v]:"",ref:D,children:p})});x.displayName=C;function R(b){const h=y(r+"CollectionConsumer",b);return Pi.useCallback(()=>{const p=h.collectionRef.current;if(!p)return[];const g=Array.from(p.querySelectorAll(`[${v}]`));return Array.from(h.itemMap.values()).sort((L,T)=>g.indexOf(L.ref.current)-g.indexOf(T.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:S,Slot:u,ItemSlot:x},R,l]}var gR=k.createContext(void 0);function _R(r){const n=k.useContext(gR);return r||n||"ltr"}function yR(r){const n=SR(r),a=k.forwardRef((l,d)=>{const{children:y,...S}=l,o=k.Children.toArray(y),c=o.find(CR);if(c){const u=c.props.children,C=o.map(v=>v===c?k.Children.count(u)>1?k.Children.only(null):k.isValidElement(u)?u.props.children:null:v);return O.jsx(n,{...S,ref:d,children:k.isValidElement(u)?k.cloneElement(u,void 0,C):null})}return O.jsx(n,{...S,ref:d,children:y})});return a.displayName=`${r}.Slot`,a}function SR(r){const n=k.forwardRef((a,l)=>{const{children:d,...y}=a;if(k.isValidElement(d)){const S=xR(d),o=wR(y,d.props);return d.type!==k.Fragment&&(o.ref=l?yo(l,S):S),k.cloneElement(d,o)}return k.Children.count(d)>1?k.Children.only(null):null});return n.displayName=`${r}.SlotClone`,n}var bR=Symbol("radix.slottable");function CR(r){return k.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===bR}function wR(r,n){const a={...n};for(const l in n){const d=r[l],y=n[l];/^on[A-Z]/.test(l)?d&&y?a[l]=(...o)=>{const c=y(...o);return d(...o),c}:d&&(a[l]=d):l==="style"?a[l]={...d,...y}:l==="className"&&(a[l]=[d,y].filter(Boolean).join(" "))}return{...r,...a}}function xR(r){let n=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?r.ref:(n=Object.getOwnPropertyDescriptor(r,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?r.props.ref:r.props.ref||r.ref)}var ER=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rt=ER.reduce((r,n)=>{const a=yR(`Primitive.${n}`),l=k.forwardRef((d,y)=>{const{asChild:S,...o}=d,c=S?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(c,{...o,ref:y})});return l.displayName=`Primitive.${n}`,{...r,[n]:l}},{});function RR(r,n){r&&ea.flushSync(()=>r.dispatchEvent(n))}function ts(r){const n=k.useRef(r);return k.useEffect(()=>{n.current=r}),k.useMemo(()=>(...a)=>n.current?.(...a),[])}function AR(r,n=globalThis?.document){const a=ts(r);k.useEffect(()=>{const l=d=>{d.key==="Escape"&&a(d)};return n.addEventListener("keydown",l,{capture:!0}),()=>n.removeEventListener("keydown",l,{capture:!0})},[a,n])}var TR="DismissableLayer",Sf="dismissableLayer.update",DR="dismissableLayer.pointerDownOutside",OR="dismissableLayer.focusOutside",i_,zy=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Py=k.forwardRef((r,n)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:y,onInteractOutside:S,onDismiss:o,...c}=r,u=k.useContext(zy),[C,v]=k.useState(null),w=C?.ownerDocument??globalThis?.document,[,x]=k.useState({}),R=Kt(n,T=>v(T)),b=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(h),p=C?b.indexOf(C):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,A=p>=m,D=kR(T=>{const E=T.target,B=[...u.branches].some(W=>W.contains(E));!A||B||(d?.(T),S?.(T),T.defaultPrevented||o?.())},w),L=BR(T=>{const E=T.target;[...u.branches].some(W=>W.contains(E))||(y?.(T),S?.(T),T.defaultPrevented||o?.())},w);return AR(T=>{p===u.layers.size-1&&(l?.(T),!T.defaultPrevented&&o&&(T.preventDefault(),o()))},w),k.useEffect(()=>{if(C)return a&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(i_=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(C)),u.layers.add(C),n_(),()=>{a&&u.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=i_)}},[C,w,a,u]),k.useEffect(()=>()=>{C&&(u.layers.delete(C),u.layersWithOutsidePointerEventsDisabled.delete(C),n_())},[C,u]),k.useEffect(()=>{const T=()=>x({});return document.addEventListener(Sf,T),()=>document.removeEventListener(Sf,T)},[]),O.jsx(Rt.div,{...c,ref:R,style:{pointerEvents:g?A?"auto":"none":void 0,...r.style},onFocusCapture:Mt(r.onFocusCapture,L.onFocusCapture),onBlurCapture:Mt(r.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Mt(r.onPointerDownCapture,D.onPointerDownCapture)})});Py.displayName=TR;var MR="DismissableLayerBranch",LR=k.forwardRef((r,n)=>{const a=k.useContext(zy),l=k.useRef(null),d=Kt(n,l);return k.useEffect(()=>{const y=l.current;if(y)return a.branches.add(y),()=>{a.branches.delete(y)}},[a.branches]),O.jsx(Rt.div,{...r,ref:d})});LR.displayName=MR;function kR(r,n=globalThis?.document){const a=ts(r),l=k.useRef(!1),d=k.useRef(()=>{});return k.useEffect(()=>{const y=o=>{if(o.target&&!l.current){let c=function(){Uy(DR,a,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(n.removeEventListener("click",d.current),d.current=c,n.addEventListener("click",d.current,{once:!0})):c()}else n.removeEventListener("click",d.current);l.current=!1},S=window.setTimeout(()=>{n.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(S),n.removeEventListener("pointerdown",y),n.removeEventListener("click",d.current)}},[n,a]),{onPointerDownCapture:()=>l.current=!0}}function BR(r,n=globalThis?.document){const a=ts(r),l=k.useRef(!1);return k.useEffect(()=>{const d=y=>{y.target&&!l.current&&Uy(OR,a,{originalEvent:y},{discrete:!1})};return n.addEventListener("focusin",d),()=>n.removeEventListener("focusin",d)},[n,a]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function n_(){const r=new CustomEvent(Sf);document.dispatchEvent(r)}function Uy(r,n,a,{discrete:l}){const d=a.originalEvent.target,y=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:a});n&&d.addEventListener(r,n,{once:!0}),l?RR(d,y):d.dispatchEvent(y)}var Qh=0;function NR(){k.useEffect(()=>{const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",r[0]??s_()),document.body.insertAdjacentElement("beforeend",r[1]??s_()),Qh++,()=>{Qh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Qh--}},[])}function s_(){const r=document.createElement("span");return r.setAttribute("data-radix-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}var Zh="focusScope.autoFocusOnMount",Jh="focusScope.autoFocusOnUnmount",a_={bubbles:!1,cancelable:!0},jR="FocusScope",Iy=k.forwardRef((r,n)=>{const{loop:a=!1,trapped:l=!1,onMountAutoFocus:d,onUnmountAutoFocus:y,...S}=r,[o,c]=k.useState(null),u=ts(d),C=ts(y),v=k.useRef(null),w=Kt(n,b=>c(b)),x=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(l){let b=function(g){if(x.paused||!o)return;const A=g.target;o.contains(A)?v.current=A:yn(v.current,{select:!0})},h=function(g){if(x.paused||!o)return;const A=g.relatedTarget;A!==null&&(o.contains(A)||yn(v.current,{select:!0}))},m=function(g){if(document.activeElement===document.body)for(const D of g)D.removedNodes.length>0&&yn(o)};document.addEventListener("focusin",b),document.addEventListener("focusout",h);const p=new MutationObserver(m);return o&&p.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",h),p.disconnect()}}},[l,o,x.paused]),k.useEffect(()=>{if(o){l_.add(x);const b=document.activeElement;if(!o.contains(b)){const m=new CustomEvent(Zh,a_);o.addEventListener(Zh,u),o.dispatchEvent(m),m.defaultPrevented||(HR(FR(Fy(o)),{select:!0}),document.activeElement===b&&yn(o))}return()=>{o.removeEventListener(Zh,u),setTimeout(()=>{const m=new CustomEvent(Jh,a_);o.addEventListener(Jh,C),o.dispatchEvent(m),m.defaultPrevented||yn(b??document.body,{select:!0}),o.removeEventListener(Jh,C),l_.remove(x)},0)}}},[o,u,C,x]);const R=k.useCallback(b=>{if(!a&&!l||x.paused)return;const h=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,m=document.activeElement;if(h&&m){const p=b.currentTarget,[g,A]=zR(p);g&&A?!b.shiftKey&&m===A?(b.preventDefault(),a&&yn(g,{select:!0})):b.shiftKey&&m===g&&(b.preventDefault(),a&&yn(A,{select:!0})):m===p&&b.preventDefault()}},[a,l,x.paused]);return O.jsx(Rt.div,{tabIndex:-1,...S,ref:w,onKeyDown:R})});Iy.displayName=jR;function HR(r,{select:n=!1}={}){const a=document.activeElement;for(const l of r)if(yn(l,{select:n}),document.activeElement!==a)return}function zR(r){const n=Fy(r),a=o_(n,r),l=o_(n.reverse(),r);return[a,l]}function Fy(r){const n=[],a=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const d=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||d?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)n.push(a.currentNode);return n}function o_(r,n){for(const a of r)if(!PR(a,{upTo:n}))return a}function PR(r,{upTo:n}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(n!==void 0&&r===n)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}function UR(r){return r instanceof HTMLInputElement&&"select"in r}function yn(r,{select:n=!1}={}){if(r&&r.focus){const a=document.activeElement;r.focus({preventScroll:!0}),r!==a&&UR(r)&&n&&r.select()}}var l_=IR();function IR(){let r=[];return{add(n){const a=r[0];n!==a&&a?.pause(),r=c_(r,n),r.unshift(n)},remove(n){r=c_(r,n),r[0]?.resume()}}}function c_(r,n){const a=[...r],l=a.indexOf(n);return l!==-1&&a.splice(l,1),a}function FR(r){return r.filter(n=>n.tagName!=="A")}var lr=globalThis?.document?k.useLayoutEffect:()=>{},qR=dc[" useId ".trim().toString()]||(()=>{}),WR=0;function rd(r){const[n,a]=k.useState(qR());return lr(()=>{a(l=>l??String(WR++))},[r]),n?`radix-${n}`:""}const VR=["top","right","bottom","left"],xn=Math.min,Sr=Math.max,oc=Math.round,ql=Math.floor,ci=r=>({x:r,y:r}),KR={left:"right",right:"left",bottom:"top",top:"bottom"},GR={start:"end",end:"start"};function bf(r,n,a){return Sr(r,xn(n,a))}function Fi(r,n){return typeof r=="function"?r(n):r}function qi(r){return r.split("-")[0]}function ia(r){return r.split("-")[1]}function id(r){return r==="x"?"y":"x"}function nd(r){return r==="y"?"height":"width"}const $R=new Set(["top","bottom"]);function oi(r){return $R.has(qi(r))?"y":"x"}function sd(r){return id(oi(r))}function YR(r,n,a){a===void 0&&(a=!1);const l=ia(r),d=sd(r),y=nd(d);let S=d==="x"?l===(a?"end":"start")?"right":"left":l==="start"?"bottom":"top";return n.reference[y]>n.floating[y]&&(S=lc(S)),[S,lc(S)]}function XR(r){const n=lc(r);return[Cf(r),n,Cf(n)]}function Cf(r){return r.replace(/start|end/g,n=>GR[n])}const u_=["left","right"],h_=["right","left"],QR=["top","bottom"],ZR=["bottom","top"];function JR(r,n,a){switch(r){case"top":case"bottom":return a?n?h_:u_:n?u_:h_;case"left":case"right":return n?QR:ZR;default:return[]}}function e2(r,n,a,l){const d=ia(r);let y=JR(qi(r),a==="start",l);return d&&(y=y.map(S=>S+"-"+d),n&&(y=y.concat(y.map(Cf)))),y}function lc(r){return r.replace(/left|right|bottom|top/g,n=>KR[n])}function t2(r){return{top:0,right:0,bottom:0,left:0,...r}}function qy(r){return typeof r!="number"?t2(r):{top:r,right:r,bottom:r,left:r}}function cc(r){const{x:n,y:a,width:l,height:d}=r;return{width:l,height:d,top:a,left:n,right:n+l,bottom:a+d,x:n,y:a}}function f_(r,n,a){let{reference:l,floating:d}=r;const y=oi(n),S=sd(n),o=nd(S),c=qi(n),u=y==="y",C=l.x+l.width/2-d.width/2,v=l.y+l.height/2-d.height/2,w=l[o]/2-d[o]/2;let x;switch(c){case"top":x={x:C,y:l.y-d.height};break;case"bottom":x={x:C,y:l.y+l.height};break;case"right":x={x:l.x+l.width,y:v};break;case"left":x={x:l.x-d.width,y:v};break;default:x={x:l.x,y:l.y}}switch(ia(n)){case"start":x[S]-=w*(a&&u?-1:1);break;case"end":x[S]+=w*(a&&u?-1:1);break}return x}const r2=async(r,n,a)=>{const{placement:l="bottom",strategy:d="absolute",middleware:y=[],platform:S}=a,o=y.filter(Boolean),c=await(S.isRTL==null?void 0:S.isRTL(n));let u=await S.getElementRects({reference:r,floating:n,strategy:d}),{x:C,y:v}=f_(u,l,c),w=l,x={},R=0;for(let b=0;b<o.length;b++){const{name:h,fn:m}=o[b],{x:p,y:g,data:A,reset:D}=await m({x:C,y:v,initialPlacement:l,placement:w,strategy:d,middlewareData:x,rects:u,platform:S,elements:{reference:r,floating:n}});C=p??C,v=g??v,x={...x,[h]:{...x[h],...A}},D&&R<=50&&(R++,typeof D=="object"&&(D.placement&&(w=D.placement),D.rects&&(u=D.rects===!0?await S.getElementRects({reference:r,floating:n,strategy:d}):D.rects),{x:C,y:v}=f_(u,w,c)),b=-1)}return{x:C,y:v,placement:w,strategy:d,middlewareData:x}};async function ho(r,n){var a;n===void 0&&(n={});const{x:l,y:d,platform:y,rects:S,elements:o,strategy:c}=r,{boundary:u="clippingAncestors",rootBoundary:C="viewport",elementContext:v="floating",altBoundary:w=!1,padding:x=0}=Fi(n,r),R=qy(x),h=o[w?v==="floating"?"reference":"floating":v],m=cc(await y.getClippingRect({element:(a=await(y.isElement==null?void 0:y.isElement(h)))==null||a?h:h.contextElement||await(y.getDocumentElement==null?void 0:y.getDocumentElement(o.floating)),boundary:u,rootBoundary:C,strategy:c})),p=v==="floating"?{x:l,y:d,width:S.floating.width,height:S.floating.height}:S.reference,g=await(y.getOffsetParent==null?void 0:y.getOffsetParent(o.floating)),A=await(y.isElement==null?void 0:y.isElement(g))?await(y.getScale==null?void 0:y.getScale(g))||{x:1,y:1}:{x:1,y:1},D=cc(y.convertOffsetParentRelativeRectToViewportRelativeRect?await y.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:p,offsetParent:g,strategy:c}):p);return{top:(m.top-D.top+R.top)/A.y,bottom:(D.bottom-m.bottom+R.bottom)/A.y,left:(m.left-D.left+R.left)/A.x,right:(D.right-m.right+R.right)/A.x}}const i2=r=>({name:"arrow",options:r,async fn(n){const{x:a,y:l,placement:d,rects:y,platform:S,elements:o,middlewareData:c}=n,{element:u,padding:C=0}=Fi(r,n)||{};if(u==null)return{};const v=qy(C),w={x:a,y:l},x=sd(d),R=nd(x),b=await S.getDimensions(u),h=x==="y",m=h?"top":"left",p=h?"bottom":"right",g=h?"clientHeight":"clientWidth",A=y.reference[R]+y.reference[x]-w[x]-y.floating[R],D=w[x]-y.reference[x],L=await(S.getOffsetParent==null?void 0:S.getOffsetParent(u));let T=L?L[g]:0;(!T||!await(S.isElement==null?void 0:S.isElement(L)))&&(T=o.floating[g]||y.floating[R]);const E=A/2-D/2,B=T/2-b[R]/2-1,W=xn(v[m],B),F=xn(v[p],B),I=W,V=T-b[R]-F,ee=T/2-b[R]/2+E,ne=bf(I,ee,V),q=!c.arrow&&ia(d)!=null&&ee!==ne&&y.reference[R]/2-(ee<I?W:F)-b[R]/2<0,Z=q?ee<I?ee-I:ee-V:0;return{[x]:w[x]+Z,data:{[x]:ne,centerOffset:ee-ne-Z,...q&&{alignmentOffset:Z}},reset:q}}}),n2=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(n){var a,l;const{placement:d,middlewareData:y,rects:S,initialPlacement:o,platform:c,elements:u}=n,{mainAxis:C=!0,crossAxis:v=!0,fallbackPlacements:w,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:b=!0,...h}=Fi(r,n);if((a=y.arrow)!=null&&a.alignmentOffset)return{};const m=qi(d),p=oi(o),g=qi(o)===o,A=await(c.isRTL==null?void 0:c.isRTL(u.floating)),D=w||(g||!b?[lc(o)]:XR(o)),L=R!=="none";!w&&L&&D.push(...e2(o,b,R,A));const T=[o,...D],E=await ho(n,h),B=[];let W=((l=y.flip)==null?void 0:l.overflows)||[];if(C&&B.push(E[m]),v){const ee=YR(d,S,A);B.push(E[ee[0]],E[ee[1]])}if(W=[...W,{placement:d,overflows:B}],!B.every(ee=>ee<=0)){var F,I;const ee=(((F=y.flip)==null?void 0:F.index)||0)+1,ne=T[ee];if(ne&&(!(v==="alignment"?p!==oi(ne):!1)||W.every(K=>oi(K.placement)===p?K.overflows[0]>0:!0)))return{data:{index:ee,overflows:W},reset:{placement:ne}};let q=(I=W.filter(Z=>Z.overflows[0]<=0).sort((Z,K)=>Z.overflows[1]-K.overflows[1])[0])==null?void 0:I.placement;if(!q)switch(x){case"bestFit":{var V;const Z=(V=W.filter(K=>{if(L){const j=oi(K.placement);return j===p||j==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(j=>j>0).reduce((j,U)=>j+U,0)]).sort((K,j)=>K[1]-j[1])[0])==null?void 0:V[0];Z&&(q=Z);break}case"initialPlacement":q=o;break}if(d!==q)return{reset:{placement:q}}}return{}}}};function d_(r,n){return{top:r.top-n.height,right:r.right-n.width,bottom:r.bottom-n.height,left:r.left-n.width}}function m_(r){return VR.some(n=>r[n]>=0)}const s2=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(n){const{rects:a}=n,{strategy:l="referenceHidden",...d}=Fi(r,n);switch(l){case"referenceHidden":{const y=await ho(n,{...d,elementContext:"reference"}),S=d_(y,a.reference);return{data:{referenceHiddenOffsets:S,referenceHidden:m_(S)}}}case"escaped":{const y=await ho(n,{...d,altBoundary:!0}),S=d_(y,a.floating);return{data:{escapedOffsets:S,escaped:m_(S)}}}default:return{}}}}},Wy=new Set(["left","top"]);async function a2(r,n){const{placement:a,platform:l,elements:d}=r,y=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=qi(a),o=ia(a),c=oi(a)==="y",u=Wy.has(S)?-1:1,C=y&&c?-1:1,v=Fi(n,r);let{mainAxis:w,crossAxis:x,alignmentAxis:R}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return o&&typeof R=="number"&&(x=o==="end"?R*-1:R),c?{x:x*C,y:w*u}:{x:w*u,y:x*C}}const o2=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(n){var a,l;const{x:d,y,placement:S,middlewareData:o}=n,c=await a2(n,r);return S===((a=o.offset)==null?void 0:a.placement)&&(l=o.arrow)!=null&&l.alignmentOffset?{}:{x:d+c.x,y:y+c.y,data:{...c,placement:S}}}}},l2=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(n){const{x:a,y:l,placement:d}=n,{mainAxis:y=!0,crossAxis:S=!1,limiter:o={fn:h=>{let{x:m,y:p}=h;return{x:m,y:p}}},...c}=Fi(r,n),u={x:a,y:l},C=await ho(n,c),v=oi(qi(d)),w=id(v);let x=u[w],R=u[v];if(y){const h=w==="y"?"top":"left",m=w==="y"?"bottom":"right",p=x+C[h],g=x-C[m];x=bf(p,x,g)}if(S){const h=v==="y"?"top":"left",m=v==="y"?"bottom":"right",p=R+C[h],g=R-C[m];R=bf(p,R,g)}const b=o.fn({...n,[w]:x,[v]:R});return{...b,data:{x:b.x-a,y:b.y-l,enabled:{[w]:y,[v]:S}}}}}},c2=function(r){return r===void 0&&(r={}),{options:r,fn(n){const{x:a,y:l,placement:d,rects:y,middlewareData:S}=n,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=Fi(r,n),C={x:a,y:l},v=oi(d),w=id(v);let x=C[w],R=C[v];const b=Fi(o,n),h=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const g=w==="y"?"height":"width",A=y.reference[w]-y.floating[g]+h.mainAxis,D=y.reference[w]+y.reference[g]-h.mainAxis;x<A?x=A:x>D&&(x=D)}if(u){var m,p;const g=w==="y"?"width":"height",A=Wy.has(qi(d)),D=y.reference[v]-y.floating[g]+(A&&((m=S.offset)==null?void 0:m[v])||0)+(A?0:h.crossAxis),L=y.reference[v]+y.reference[g]+(A?0:((p=S.offset)==null?void 0:p[v])||0)-(A?h.crossAxis:0);R<D?R=D:R>L&&(R=L)}return{[w]:x,[v]:R}}}},u2=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(n){var a,l;const{placement:d,rects:y,platform:S,elements:o}=n,{apply:c=()=>{},...u}=Fi(r,n),C=await ho(n,u),v=qi(d),w=ia(d),x=oi(d)==="y",{width:R,height:b}=y.floating;let h,m;v==="top"||v==="bottom"?(h=v,m=w===(await(S.isRTL==null?void 0:S.isRTL(o.floating))?"start":"end")?"left":"right"):(m=v,h=w==="end"?"top":"bottom");const p=b-C.top-C.bottom,g=R-C.left-C.right,A=xn(b-C[h],p),D=xn(R-C[m],g),L=!n.middlewareData.shift;let T=A,E=D;if((a=n.middlewareData.shift)!=null&&a.enabled.x&&(E=g),(l=n.middlewareData.shift)!=null&&l.enabled.y&&(T=p),L&&!w){const W=Sr(C.left,0),F=Sr(C.right,0),I=Sr(C.top,0),V=Sr(C.bottom,0);x?E=R-2*(W!==0||F!==0?W+F:Sr(C.left,C.right)):T=b-2*(I!==0||V!==0?I+V:Sr(C.top,C.bottom))}await c({...n,availableWidth:E,availableHeight:T});const B=await S.getDimensions(o.floating);return R!==B.width||b!==B.height?{reset:{rects:!0}}:{}}}};function Sc(){return typeof window<"u"}function na(r){return Vy(r)?(r.nodeName||"").toLowerCase():"#document"}function Cr(r){var n;return(r==null||(n=r.ownerDocument)==null?void 0:n.defaultView)||window}function di(r){var n;return(n=(Vy(r)?r.ownerDocument:r.document)||window.document)==null?void 0:n.documentElement}function Vy(r){return Sc()?r instanceof Node||r instanceof Cr(r).Node:!1}function $r(r){return Sc()?r instanceof Element||r instanceof Cr(r).Element:!1}function hi(r){return Sc()?r instanceof HTMLElement||r instanceof Cr(r).HTMLElement:!1}function p_(r){return!Sc()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Cr(r).ShadowRoot}const h2=new Set(["inline","contents"]);function So(r){const{overflow:n,overflowX:a,overflowY:l,display:d}=Yr(r);return/auto|scroll|overlay|hidden|clip/.test(n+l+a)&&!h2.has(d)}const f2=new Set(["table","td","th"]);function d2(r){return f2.has(na(r))}const m2=[":popover-open",":modal"];function bc(r){return m2.some(n=>{try{return r.matches(n)}catch{return!1}})}const p2=["transform","translate","scale","rotate","perspective"],v2=["transform","translate","scale","rotate","perspective","filter"],g2=["paint","layout","strict","content"];function ad(r){const n=od(),a=$r(r)?Yr(r):r;return p2.some(l=>a[l]?a[l]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!n&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!n&&(a.filter?a.filter!=="none":!1)||v2.some(l=>(a.willChange||"").includes(l))||g2.some(l=>(a.contain||"").includes(l))}function _2(r){let n=En(r);for(;hi(n)&&!Zs(n);){if(ad(n))return n;if(bc(n))return null;n=En(n)}return null}function od(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const y2=new Set(["html","body","#document"]);function Zs(r){return y2.has(na(r))}function Yr(r){return Cr(r).getComputedStyle(r)}function Cc(r){return $r(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function En(r){if(na(r)==="html")return r;const n=r.assignedSlot||r.parentNode||p_(r)&&r.host||di(r);return p_(n)?n.host:n}function Ky(r){const n=En(r);return Zs(n)?r.ownerDocument?r.ownerDocument.body:r.body:hi(n)&&So(n)?n:Ky(n)}function fo(r,n,a){var l;n===void 0&&(n=[]),a===void 0&&(a=!0);const d=Ky(r),y=d===((l=r.ownerDocument)==null?void 0:l.body),S=Cr(d);if(y){const o=wf(S);return n.concat(S,S.visualViewport||[],So(d)?d:[],o&&a?fo(o):[])}return n.concat(d,fo(d,[],a))}function wf(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function Gy(r){const n=Yr(r);let a=parseFloat(n.width)||0,l=parseFloat(n.height)||0;const d=hi(r),y=d?r.offsetWidth:a,S=d?r.offsetHeight:l,o=oc(a)!==y||oc(l)!==S;return o&&(a=y,l=S),{width:a,height:l,$:o}}function ld(r){return $r(r)?r:r.contextElement}function Xs(r){const n=ld(r);if(!hi(n))return ci(1);const a=n.getBoundingClientRect(),{width:l,height:d,$:y}=Gy(n);let S=(y?oc(a.width):a.width)/l,o=(y?oc(a.height):a.height)/d;return(!S||!Number.isFinite(S))&&(S=1),(!o||!Number.isFinite(o))&&(o=1),{x:S,y:o}}const S2=ci(0);function $y(r){const n=Cr(r);return!od()||!n.visualViewport?S2:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function b2(r,n,a){return n===void 0&&(n=!1),!a||n&&a!==Cr(r)?!1:n}function rs(r,n,a,l){n===void 0&&(n=!1),a===void 0&&(a=!1);const d=r.getBoundingClientRect(),y=ld(r);let S=ci(1);n&&(l?$r(l)&&(S=Xs(l)):S=Xs(r));const o=b2(y,a,l)?$y(y):ci(0);let c=(d.left+o.x)/S.x,u=(d.top+o.y)/S.y,C=d.width/S.x,v=d.height/S.y;if(y){const w=Cr(y),x=l&&$r(l)?Cr(l):l;let R=w,b=wf(R);for(;b&&l&&x!==R;){const h=Xs(b),m=b.getBoundingClientRect(),p=Yr(b),g=m.left+(b.clientLeft+parseFloat(p.paddingLeft))*h.x,A=m.top+(b.clientTop+parseFloat(p.paddingTop))*h.y;c*=h.x,u*=h.y,C*=h.x,v*=h.y,c+=g,u+=A,R=Cr(b),b=wf(R)}}return cc({width:C,height:v,x:c,y:u})}function wc(r,n){const a=Cc(r).scrollLeft;return n?n.left+a:rs(di(r)).left+a}function Yy(r,n){const a=r.getBoundingClientRect(),l=a.left+n.scrollLeft-wc(r,a),d=a.top+n.scrollTop;return{x:l,y:d}}function C2(r){let{elements:n,rect:a,offsetParent:l,strategy:d}=r;const y=d==="fixed",S=di(l),o=n?bc(n.floating):!1;if(l===S||o&&y)return a;let c={scrollLeft:0,scrollTop:0},u=ci(1);const C=ci(0),v=hi(l);if((v||!v&&!y)&&((na(l)!=="body"||So(S))&&(c=Cc(l)),hi(l))){const x=rs(l);u=Xs(l),C.x=x.x+l.clientLeft,C.y=x.y+l.clientTop}const w=S&&!v&&!y?Yy(S,c):ci(0);return{width:a.width*u.x,height:a.height*u.y,x:a.x*u.x-c.scrollLeft*u.x+C.x+w.x,y:a.y*u.y-c.scrollTop*u.y+C.y+w.y}}function w2(r){return Array.from(r.getClientRects())}function x2(r){const n=di(r),a=Cc(r),l=r.ownerDocument.body,d=Sr(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),y=Sr(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let S=-a.scrollLeft+wc(r);const o=-a.scrollTop;return Yr(l).direction==="rtl"&&(S+=Sr(n.clientWidth,l.clientWidth)-d),{width:d,height:y,x:S,y:o}}const v_=25;function E2(r,n){const a=Cr(r),l=di(r),d=a.visualViewport;let y=l.clientWidth,S=l.clientHeight,o=0,c=0;if(d){y=d.width,S=d.height;const C=od();(!C||C&&n==="fixed")&&(o=d.offsetLeft,c=d.offsetTop)}const u=wc(l);if(u<=0){const C=l.ownerDocument,v=C.body,w=getComputedStyle(v),x=C.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,R=Math.abs(l.clientWidth-v.clientWidth-x);R<=v_&&(y-=R)}else u<=v_&&(y+=u);return{width:y,height:S,x:o,y:c}}const R2=new Set(["absolute","fixed"]);function A2(r,n){const a=rs(r,!0,n==="fixed"),l=a.top+r.clientTop,d=a.left+r.clientLeft,y=hi(r)?Xs(r):ci(1),S=r.clientWidth*y.x,o=r.clientHeight*y.y,c=d*y.x,u=l*y.y;return{width:S,height:o,x:c,y:u}}function g_(r,n,a){let l;if(n==="viewport")l=E2(r,a);else if(n==="document")l=x2(di(r));else if($r(n))l=A2(n,a);else{const d=$y(r);l={x:n.x-d.x,y:n.y-d.y,width:n.width,height:n.height}}return cc(l)}function Xy(r,n){const a=En(r);return a===n||!$r(a)||Zs(a)?!1:Yr(a).position==="fixed"||Xy(a,n)}function T2(r,n){const a=n.get(r);if(a)return a;let l=fo(r,[],!1).filter(o=>$r(o)&&na(o)!=="body"),d=null;const y=Yr(r).position==="fixed";let S=y?En(r):r;for(;$r(S)&&!Zs(S);){const o=Yr(S),c=ad(S);!c&&o.position==="fixed"&&(d=null),(y?!c&&!d:!c&&o.position==="static"&&!!d&&R2.has(d.position)||So(S)&&!c&&Xy(r,S))?l=l.filter(C=>C!==S):d=o,S=En(S)}return n.set(r,l),l}function D2(r){let{element:n,boundary:a,rootBoundary:l,strategy:d}=r;const S=[...a==="clippingAncestors"?bc(n)?[]:T2(n,this._c):[].concat(a),l],o=S[0],c=S.reduce((u,C)=>{const v=g_(n,C,d);return u.top=Sr(v.top,u.top),u.right=xn(v.right,u.right),u.bottom=xn(v.bottom,u.bottom),u.left=Sr(v.left,u.left),u},g_(n,o,d));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function O2(r){const{width:n,height:a}=Gy(r);return{width:n,height:a}}function M2(r,n,a){const l=hi(n),d=di(n),y=a==="fixed",S=rs(r,!0,y,n);let o={scrollLeft:0,scrollTop:0};const c=ci(0);function u(){c.x=wc(d)}if(l||!l&&!y)if((na(n)!=="body"||So(d))&&(o=Cc(n)),l){const x=rs(n,!0,y,n);c.x=x.x+n.clientLeft,c.y=x.y+n.clientTop}else d&&u();y&&!l&&d&&u();const C=d&&!l&&!y?Yy(d,o):ci(0),v=S.left+o.scrollLeft-c.x-C.x,w=S.top+o.scrollTop-c.y-C.y;return{x:v,y:w,width:S.width,height:S.height}}function ef(r){return Yr(r).position==="static"}function __(r,n){if(!hi(r)||Yr(r).position==="fixed")return null;if(n)return n(r);let a=r.offsetParent;return di(r)===a&&(a=a.ownerDocument.body),a}function Qy(r,n){const a=Cr(r);if(bc(r))return a;if(!hi(r)){let d=En(r);for(;d&&!Zs(d);){if($r(d)&&!ef(d))return d;d=En(d)}return a}let l=__(r,n);for(;l&&d2(l)&&ef(l);)l=__(l,n);return l&&Zs(l)&&ef(l)&&!ad(l)?a:l||_2(r)||a}const L2=async function(r){const n=this.getOffsetParent||Qy,a=this.getDimensions,l=await a(r.floating);return{reference:M2(r.reference,await n(r.floating),r.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function k2(r){return Yr(r).direction==="rtl"}const B2={convertOffsetParentRelativeRectToViewportRelativeRect:C2,getDocumentElement:di,getClippingRect:D2,getOffsetParent:Qy,getElementRects:L2,getClientRects:w2,getDimensions:O2,getScale:Xs,isElement:$r,isRTL:k2};function Zy(r,n){return r.x===n.x&&r.y===n.y&&r.width===n.width&&r.height===n.height}function N2(r,n){let a=null,l;const d=di(r);function y(){var o;clearTimeout(l),(o=a)==null||o.disconnect(),a=null}function S(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),y();const u=r.getBoundingClientRect(),{left:C,top:v,width:w,height:x}=u;if(o||n(),!w||!x)return;const R=ql(v),b=ql(d.clientWidth-(C+w)),h=ql(d.clientHeight-(v+x)),m=ql(C),g={rootMargin:-R+"px "+-b+"px "+-h+"px "+-m+"px",threshold:Sr(0,xn(1,c))||1};let A=!0;function D(L){const T=L[0].intersectionRatio;if(T!==c){if(!A)return S();T?S(!1,T):l=setTimeout(()=>{S(!1,1e-7)},1e3)}T===1&&!Zy(u,r.getBoundingClientRect())&&S(),A=!1}try{a=new IntersectionObserver(D,{...g,root:d.ownerDocument})}catch{a=new IntersectionObserver(D,g)}a.observe(r)}return S(!0),y}function j2(r,n,a,l){l===void 0&&(l={});const{ancestorScroll:d=!0,ancestorResize:y=!0,elementResize:S=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=l,u=ld(r),C=d||y?[...u?fo(u):[],...fo(n)]:[];C.forEach(m=>{d&&m.addEventListener("scroll",a,{passive:!0}),y&&m.addEventListener("resize",a)});const v=u&&o?N2(u,a):null;let w=-1,x=null;S&&(x=new ResizeObserver(m=>{let[p]=m;p&&p.target===u&&x&&(x.unobserve(n),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var g;(g=x)==null||g.observe(n)})),a()}),u&&!c&&x.observe(u),x.observe(n));let R,b=c?rs(r):null;c&&h();function h(){const m=rs(r);b&&!Zy(b,m)&&a(),b=m,R=requestAnimationFrame(h)}return a(),()=>{var m;C.forEach(p=>{d&&p.removeEventListener("scroll",a),y&&p.removeEventListener("resize",a)}),v?.(),(m=x)==null||m.disconnect(),x=null,c&&cancelAnimationFrame(R)}}const H2=o2,z2=l2,P2=n2,U2=u2,I2=s2,y_=i2,F2=c2,q2=(r,n,a)=>{const l=new Map,d={platform:B2,...a},y={...d.platform,_c:l};return r2(r,n,{...d,platform:y})};var W2=typeof document<"u",V2=function(){},Zl=W2?k.useLayoutEffect:V2;function uc(r,n){if(r===n)return!0;if(typeof r!=typeof n)return!1;if(typeof r=="function"&&r.toString()===n.toString())return!0;let a,l,d;if(r&&n&&typeof r=="object"){if(Array.isArray(r)){if(a=r.length,a!==n.length)return!1;for(l=a;l--!==0;)if(!uc(r[l],n[l]))return!1;return!0}if(d=Object.keys(r),a=d.length,a!==Object.keys(n).length)return!1;for(l=a;l--!==0;)if(!{}.hasOwnProperty.call(n,d[l]))return!1;for(l=a;l--!==0;){const y=d[l];if(!(y==="_owner"&&r.$$typeof)&&!uc(r[y],n[y]))return!1}return!0}return r!==r&&n!==n}function Jy(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function S_(r,n){const a=Jy(r);return Math.round(n*a)/a}function tf(r){const n=k.useRef(r);return Zl(()=>{n.current=r}),n}function K2(r){r===void 0&&(r={});const{placement:n="bottom",strategy:a="absolute",middleware:l=[],platform:d,elements:{reference:y,floating:S}={},transform:o=!0,whileElementsMounted:c,open:u}=r,[C,v]=k.useState({x:0,y:0,strategy:a,placement:n,middlewareData:{},isPositioned:!1}),[w,x]=k.useState(l);uc(w,l)||x(l);const[R,b]=k.useState(null),[h,m]=k.useState(null),p=k.useCallback(K=>{K!==L.current&&(L.current=K,b(K))},[]),g=k.useCallback(K=>{K!==T.current&&(T.current=K,m(K))},[]),A=y||R,D=S||h,L=k.useRef(null),T=k.useRef(null),E=k.useRef(C),B=c!=null,W=tf(c),F=tf(d),I=tf(u),V=k.useCallback(()=>{if(!L.current||!T.current)return;const K={placement:n,strategy:a,middleware:w};F.current&&(K.platform=F.current),q2(L.current,T.current,K).then(j=>{const U={...j,isPositioned:I.current!==!1};ee.current&&!uc(E.current,U)&&(E.current=U,ea.flushSync(()=>{v(U)}))})},[w,n,a,F,I]);Zl(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[u]);const ee=k.useRef(!1);Zl(()=>(ee.current=!0,()=>{ee.current=!1}),[]),Zl(()=>{if(A&&(L.current=A),D&&(T.current=D),A&&D){if(W.current)return W.current(A,D,V);V()}},[A,D,V,W,B]);const ne=k.useMemo(()=>({reference:L,floating:T,setReference:p,setFloating:g}),[p,g]),q=k.useMemo(()=>({reference:A,floating:D}),[A,D]),Z=k.useMemo(()=>{const K={position:a,left:0,top:0};if(!q.floating)return K;const j=S_(q.floating,C.x),U=S_(q.floating,C.y);return o?{...K,transform:"translate("+j+"px, "+U+"px)",...Jy(q.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:j,top:U}},[a,o,q.floating,C.x,C.y]);return k.useMemo(()=>({...C,update:V,refs:ne,elements:q,floatingStyles:Z}),[C,V,ne,q,Z])}const G2=r=>{function n(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:r,fn(a){const{element:l,padding:d}=typeof r=="function"?r(a):r;return l&&n(l)?l.current!=null?y_({element:l.current,padding:d}).fn(a):{}:l?y_({element:l,padding:d}).fn(a):{}}}},$2=(r,n)=>({...H2(r),options:[r,n]}),Y2=(r,n)=>({...z2(r),options:[r,n]}),X2=(r,n)=>({...F2(r),options:[r,n]}),Q2=(r,n)=>({...P2(r),options:[r,n]}),Z2=(r,n)=>({...U2(r),options:[r,n]}),J2=(r,n)=>({...I2(r),options:[r,n]}),eA=(r,n)=>({...G2(r),options:[r,n]});var tA="Arrow",e0=k.forwardRef((r,n)=>{const{children:a,width:l=10,height:d=5,...y}=r;return O.jsx(Rt.svg,{...y,ref:n,width:l,height:d,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?a:O.jsx("polygon",{points:"0,0 30,0 15,10"})})});e0.displayName=tA;var rA=e0;function iA(r){const[n,a]=k.useState(void 0);return lr(()=>{if(r){a({width:r.offsetWidth,height:r.offsetHeight});const l=new ResizeObserver(d=>{if(!Array.isArray(d)||!d.length)return;const y=d[0];let S,o;if("borderBoxSize"in y){const c=y.borderBoxSize,u=Array.isArray(c)?c[0]:c;S=u.inlineSize,o=u.blockSize}else S=r.offsetWidth,o=r.offsetHeight;a({width:S,height:o})});return l.observe(r,{box:"border-box"}),()=>l.unobserve(r)}else a(void 0)},[r]),n}var cd="Popper",[t0,r0]=td(cd),[nA,i0]=t0(cd),n0=r=>{const{__scopePopper:n,children:a}=r,[l,d]=k.useState(null);return O.jsx(nA,{scope:n,anchor:l,onAnchorChange:d,children:a})};n0.displayName=cd;var s0="PopperAnchor",a0=k.forwardRef((r,n)=>{const{__scopePopper:a,virtualRef:l,...d}=r,y=i0(s0,a),S=k.useRef(null),o=Kt(n,S),c=k.useRef(null);return k.useEffect(()=>{const u=c.current;c.current=l?.current||S.current,u!==c.current&&y.onAnchorChange(c.current)}),l?null:O.jsx(Rt.div,{...d,ref:o})});a0.displayName=s0;var ud="PopperContent",[sA,aA]=t0(ud),o0=k.forwardRef((r,n)=>{const{__scopePopper:a,side:l="bottom",sideOffset:d=0,align:y="center",alignOffset:S=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:C=0,sticky:v="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:R,...b}=r,h=i0(ud,a),[m,p]=k.useState(null),g=Kt(n,X=>p(X)),[A,D]=k.useState(null),L=iA(A),T=L?.width??0,E=L?.height??0,B=l+(y!=="center"?"-"+y:""),W=typeof C=="number"?C:{top:0,right:0,bottom:0,left:0,...C},F=Array.isArray(u)?u:[u],I=F.length>0,V={padding:W,boundary:F.filter(lA),altBoundary:I},{refs:ee,floatingStyles:ne,placement:q,isPositioned:Z,middlewareData:K}=K2({strategy:"fixed",placement:B,whileElementsMounted:(...X)=>j2(...X,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[$2({mainAxis:d+E,alignmentAxis:S}),c&&Y2({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?X2():void 0,...V}),c&&Q2({...V}),Z2({...V,apply:({elements:X,rects:P,availableWidth:he,availableHeight:ge})=>{const{width:oe,height:me}=P.reference,Ce=X.floating.style;Ce.setProperty("--radix-popper-available-width",`${he}px`),Ce.setProperty("--radix-popper-available-height",`${ge}px`),Ce.setProperty("--radix-popper-anchor-width",`${oe}px`),Ce.setProperty("--radix-popper-anchor-height",`${me}px`)}}),A&&eA({element:A,padding:o}),cA({arrowWidth:T,arrowHeight:E}),w&&J2({strategy:"referenceHidden",...V})]}),[j,U]=u0(q),N=ts(R);lr(()=>{Z&&N?.()},[Z,N]);const z=K.arrow?.x,Q=K.arrow?.y,ie=K.arrow?.centerOffset!==0,[de,G]=k.useState();return lr(()=>{m&&G(window.getComputedStyle(m).zIndex)},[m]),O.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Z?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[K.transformOrigin?.x,K.transformOrigin?.y].join(" "),...K.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:r.dir,children:O.jsx(sA,{scope:a,placedSide:j,onArrowChange:D,arrowX:z,arrowY:Q,shouldHideArrow:ie,children:O.jsx(Rt.div,{"data-side":j,"data-align":U,...b,ref:g,style:{...b.style,animation:Z?void 0:"none"}})})})});o0.displayName=ud;var l0="PopperArrow",oA={top:"bottom",right:"left",bottom:"top",left:"right"},c0=k.forwardRef(function(n,a){const{__scopePopper:l,...d}=n,y=aA(l0,l),S=oA[y.placedSide];return O.jsx("span",{ref:y.onArrowChange,style:{position:"absolute",left:y.arrowX,top:y.arrowY,[S]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[y.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[y.placedSide],visibility:y.shouldHideArrow?"hidden":void 0},children:O.jsx(rA,{...d,ref:a,style:{...d.style,display:"block"}})})});c0.displayName=l0;function lA(r){return r!==null}var cA=r=>({name:"transformOrigin",options:r,fn(n){const{placement:a,rects:l,middlewareData:d}=n,S=d.arrow?.centerOffset!==0,o=S?0:r.arrowWidth,c=S?0:r.arrowHeight,[u,C]=u0(a),v={start:"0%",center:"50%",end:"100%"}[C],w=(d.arrow?.x??0)+o/2,x=(d.arrow?.y??0)+c/2;let R="",b="";return u==="bottom"?(R=S?v:`${w}px`,b=`${-c}px`):u==="top"?(R=S?v:`${w}px`,b=`${l.floating.height+c}px`):u==="right"?(R=`${-c}px`,b=S?v:`${x}px`):u==="left"&&(R=`${l.floating.width+c}px`,b=S?v:`${x}px`),{data:{x:R,y:b}}}});function u0(r){const[n,a="center"]=r.split("-");return[n,a]}var uA=n0,hA=a0,fA=o0,dA=c0,mA="Portal",h0=k.forwardRef((r,n)=>{const{container:a,...l}=r,[d,y]=k.useState(!1);lr(()=>y(!0),[]);const S=a||d&&globalThis?.document?.body;return S?xx.createPortal(O.jsx(Rt.div,{...l,ref:n}),S):null});h0.displayName=mA;function pA(r){const n=vA(r),a=k.forwardRef((l,d)=>{const{children:y,...S}=l,o=k.Children.toArray(y),c=o.find(_A);if(c){const u=c.props.children,C=o.map(v=>v===c?k.Children.count(u)>1?k.Children.only(null):k.isValidElement(u)?u.props.children:null:v);return O.jsx(n,{...S,ref:d,children:k.isValidElement(u)?k.cloneElement(u,void 0,C):null})}return O.jsx(n,{...S,ref:d,children:y})});return a.displayName=`${r}.Slot`,a}function vA(r){const n=k.forwardRef((a,l)=>{const{children:d,...y}=a;if(k.isValidElement(d)){const S=SA(d),o=yA(y,d.props);return d.type!==k.Fragment&&(o.ref=l?yo(l,S):S),k.cloneElement(d,o)}return k.Children.count(d)>1?k.Children.only(null):null});return n.displayName=`${r}.SlotClone`,n}var gA=Symbol("radix.slottable");function _A(r){return k.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===gA}function yA(r,n){const a={...n};for(const l in n){const d=r[l],y=n[l];/^on[A-Z]/.test(l)?d&&y?a[l]=(...o)=>{const c=y(...o);return d(...o),c}:d&&(a[l]=d):l==="style"?a[l]={...d,...y}:l==="className"&&(a[l]=[d,y].filter(Boolean).join(" "))}return{...r,...a}}function SA(r){let n=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?r.ref:(n=Object.getOwnPropertyDescriptor(r,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?r.props.ref:r.props.ref||r.ref)}var bA=dc[" useInsertionEffect ".trim().toString()]||lr;function b_({prop:r,defaultProp:n,onChange:a=()=>{},caller:l}){const[d,y,S]=CA({defaultProp:n,onChange:a}),o=r!==void 0,c=o?r:d;{const C=k.useRef(r!==void 0);k.useEffect(()=>{const v=C.current;v!==o&&console.warn(`${l} is changing from ${v?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),C.current=o},[o,l])}const u=k.useCallback(C=>{if(o){const v=wA(C)?C(r):C;v!==r&&S.current?.(v)}else y(C)},[o,r,y,S]);return[c,u]}function CA({defaultProp:r,onChange:n}){const[a,l]=k.useState(r),d=k.useRef(a),y=k.useRef(n);return bA(()=>{y.current=n},[n]),k.useEffect(()=>{d.current!==a&&(y.current?.(a),d.current=a)},[a,d]),[a,l,y]}function wA(r){return typeof r=="function"}function xA(r){const n=k.useRef({value:r,previous:r});return k.useMemo(()=>(n.current.value!==r&&(n.current.previous=n.current.value,n.current.value=r),n.current.previous),[r])}var f0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),EA="VisuallyHidden",RA=k.forwardRef((r,n)=>O.jsx(Rt.span,{...r,ref:n,style:{...f0,...r.style}}));RA.displayName=EA;var AA=function(r){if(typeof document>"u")return null;var n=Array.isArray(r)?r[0]:r;return n.ownerDocument.body},Ws=new WeakMap,Wl=new WeakMap,Vl={},rf=0,d0=function(r){return r&&(r.host||d0(r.parentNode))},TA=function(r,n){return n.map(function(a){if(r.contains(a))return a;var l=d0(a);return l&&r.contains(l)?l:(console.error("aria-hidden",a,"in not contained inside",r,". Doing nothing"),null)}).filter(function(a){return!!a})},DA=function(r,n,a,l){var d=TA(n,Array.isArray(r)?r:[r]);Vl[a]||(Vl[a]=new WeakMap);var y=Vl[a],S=[],o=new Set,c=new Set(d),u=function(v){!v||o.has(v)||(o.add(v),u(v.parentNode))};d.forEach(u);var C=function(v){!v||c.has(v)||Array.prototype.forEach.call(v.children,function(w){if(o.has(w))C(w);else try{var x=w.getAttribute(l),R=x!==null&&x!=="false",b=(Ws.get(w)||0)+1,h=(y.get(w)||0)+1;Ws.set(w,b),y.set(w,h),S.push(w),b===1&&R&&Wl.set(w,!0),h===1&&w.setAttribute(a,"true"),R||w.setAttribute(l,"true")}catch(m){console.error("aria-hidden: cannot operate on ",w,m)}})};return C(n),o.clear(),rf++,function(){S.forEach(function(v){var w=Ws.get(v)-1,x=y.get(v)-1;Ws.set(v,w),y.set(v,x),w||(Wl.has(v)||v.removeAttribute(l),Wl.delete(v)),x||v.removeAttribute(a)}),rf--,rf||(Ws=new WeakMap,Ws=new WeakMap,Wl=new WeakMap,Vl={})}},OA=function(r,n,a){a===void 0&&(a="data-aria-hidden");var l=Array.from(Array.isArray(r)?r:[r]),d=AA(r);return d?(l.push.apply(l,Array.from(d.querySelectorAll("[aria-live], script"))),DA(l,d,a,"aria-hidden")):function(){return null}},ai=function(){return ai=Object.assign||function(n){for(var a,l=1,d=arguments.length;l<d;l++){a=arguments[l];for(var y in a)Object.prototype.hasOwnProperty.call(a,y)&&(n[y]=a[y])}return n},ai.apply(this,arguments)};function m0(r,n){var a={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&n.indexOf(l)<0&&(a[l]=r[l]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,l=Object.getOwnPropertySymbols(r);d<l.length;d++)n.indexOf(l[d])<0&&Object.prototype.propertyIsEnumerable.call(r,l[d])&&(a[l[d]]=r[l[d]]);return a}function MA(r,n,a){if(a||arguments.length===2)for(var l=0,d=n.length,y;l<d;l++)(y||!(l in n))&&(y||(y=Array.prototype.slice.call(n,0,l)),y[l]=n[l]);return r.concat(y||Array.prototype.slice.call(n))}var Jl="right-scroll-bar-position",ec="width-before-scroll-bar",LA="with-scroll-bars-hidden",kA="--removed-body-scroll-bar-size";function nf(r,n){return typeof r=="function"?r(n):r&&(r.current=n),r}function BA(r,n){var a=k.useState(function(){return{value:r,callback:n,facade:{get current(){return a.value},set current(l){var d=a.value;d!==l&&(a.value=l,a.callback(l,d))}}}})[0];return a.callback=n,a.facade}var NA=typeof window<"u"?k.useLayoutEffect:k.useEffect,C_=new WeakMap;function jA(r,n){var a=BA(null,function(l){return r.forEach(function(d){return nf(d,l)})});return NA(function(){var l=C_.get(a);if(l){var d=new Set(l),y=new Set(r),S=a.current;d.forEach(function(o){y.has(o)||nf(o,null)}),y.forEach(function(o){d.has(o)||nf(o,S)})}C_.set(a,r)},[r]),a}function HA(r){return r}function zA(r,n){n===void 0&&(n=HA);var a=[],l=!1,d={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:r},useMedium:function(y){var S=n(y,l);return a.push(S),function(){a=a.filter(function(o){return o!==S})}},assignSyncMedium:function(y){for(l=!0;a.length;){var S=a;a=[],S.forEach(y)}a={push:function(o){return y(o)},filter:function(){return a}}},assignMedium:function(y){l=!0;var S=[];if(a.length){var o=a;a=[],o.forEach(y),S=a}var c=function(){var C=S;S=[],C.forEach(y)},u=function(){return Promise.resolve().then(c)};u(),a={push:function(C){S.push(C),u()},filter:function(C){return S=S.filter(C),a}}}};return d}function PA(r){r===void 0&&(r={});var n=zA(null);return n.options=ai({async:!0,ssr:!1},r),n}var p0=function(r){var n=r.sideCar,a=m0(r,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=n.read();if(!l)throw new Error("Sidecar medium not found");return k.createElement(l,ai({},a))};p0.isSideCarExport=!0;function UA(r,n){return r.useMedium(n),p0}var v0=PA(),sf=function(){},xc=k.forwardRef(function(r,n){var a=k.useRef(null),l=k.useState({onScrollCapture:sf,onWheelCapture:sf,onTouchMoveCapture:sf}),d=l[0],y=l[1],S=r.forwardProps,o=r.children,c=r.className,u=r.removeScrollBar,C=r.enabled,v=r.shards,w=r.sideCar,x=r.noRelative,R=r.noIsolation,b=r.inert,h=r.allowPinchZoom,m=r.as,p=m===void 0?"div":m,g=r.gapMode,A=m0(r,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=w,L=jA([a,n]),T=ai(ai({},A),d);return k.createElement(k.Fragment,null,C&&k.createElement(D,{sideCar:v0,removeScrollBar:u,shards:v,noRelative:x,noIsolation:R,inert:b,setCallbacks:y,allowPinchZoom:!!h,lockRef:a,gapMode:g}),S?k.cloneElement(k.Children.only(o),ai(ai({},T),{ref:L})):k.createElement(p,ai({},T,{className:c,ref:L}),o))});xc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xc.classNames={fullWidth:ec,zeroRight:Jl};var IA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function FA(){if(!document)return null;var r=document.createElement("style");r.type="text/css";var n=IA();return n&&r.setAttribute("nonce",n),r}function qA(r,n){r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}function WA(r){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(r)}var VA=function(){var r=0,n=null;return{add:function(a){r==0&&(n=FA())&&(qA(n,a),WA(n)),r++},remove:function(){r--,!r&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},KA=function(){var r=VA();return function(n,a){k.useEffect(function(){return r.add(n),function(){r.remove()}},[n&&a])}},g0=function(){var r=KA(),n=function(a){var l=a.styles,d=a.dynamic;return r(l,d),null};return n},GA={left:0,top:0,right:0,gap:0},af=function(r){return parseInt(r||"",10)||0},$A=function(r){var n=window.getComputedStyle(document.body),a=n[r==="padding"?"paddingLeft":"marginLeft"],l=n[r==="padding"?"paddingTop":"marginTop"],d=n[r==="padding"?"paddingRight":"marginRight"];return[af(a),af(l),af(d)]},YA=function(r){if(r===void 0&&(r="margin"),typeof window>"u")return GA;var n=$A(r),a=document.documentElement.clientWidth,l=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,l-a+n[2]-n[0])}},XA=g0(),Qs="data-scroll-locked",QA=function(r,n,a,l){var d=r.left,y=r.top,S=r.right,o=r.gap;return a===void 0&&(a="margin"),`
|
|
13
13
|
.`.concat(LA,` {
|
|
14
14
|
overflow: hidden `).concat(l,`;
|
|
15
15
|
padding-right: `).concat(o,"px ").concat(l,`;
|
|
16
16
|
}
|
|
17
|
-
body[`).concat(
|
|
17
|
+
body[`).concat(Qs,`] {
|
|
18
18
|
overflow: hidden `).concat(l,`;
|
|
19
19
|
overscroll-behavior: contain;
|
|
20
20
|
`).concat([n&&"position: relative ".concat(l,";"),a==="margin"&&`
|
|
@@ -43,21 +43,21 @@ Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}
|
|
|
43
43
|
margin-right: 0 `).concat(l,`;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
body[`).concat(
|
|
46
|
+
body[`).concat(Qs,`] {
|
|
47
47
|
`).concat(kA,": ").concat(o,`px;
|
|
48
48
|
}
|
|
49
|
-
`)},w_=function(){var r=parseInt(document.body.getAttribute(
|
|
49
|
+
`)},w_=function(){var r=parseInt(document.body.getAttribute(Qs)||"0",10);return isFinite(r)?r:0},ZA=function(){k.useEffect(function(){return document.body.setAttribute(Qs,(w_()+1).toString()),function(){var r=w_()-1;r<=0?document.body.removeAttribute(Qs):document.body.setAttribute(Qs,r.toString())}},[])},JA=function(r){var n=r.noRelative,a=r.noImportant,l=r.gapMode,d=l===void 0?"margin":l;ZA();var y=k.useMemo(function(){return YA(d)},[d]);return k.createElement(XA,{styles:QA(y,!n,d,a?"":"!important")})},xf=!1;if(typeof window<"u")try{var Kl=Object.defineProperty({},"passive",{get:function(){return xf=!0,!0}});window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{xf=!1}var Vs=xf?{passive:!1}:!1,eT=function(r){return r.tagName==="TEXTAREA"},_0=function(r,n){if(!(r instanceof Element))return!1;var a=window.getComputedStyle(r);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!eT(r)&&a[n]==="visible")},tT=function(r){return _0(r,"overflowY")},rT=function(r){return _0(r,"overflowX")},x_=function(r,n){var a=n.ownerDocument,l=n;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var d=y0(r,l);if(d){var y=S0(r,l),S=y[1],o=y[2];if(S>o)return!0}l=l.parentNode}while(l&&l!==a.body);return!1},iT=function(r){var n=r.scrollTop,a=r.scrollHeight,l=r.clientHeight;return[n,a,l]},nT=function(r){var n=r.scrollLeft,a=r.scrollWidth,l=r.clientWidth;return[n,a,l]},y0=function(r,n){return r==="v"?tT(n):rT(n)},S0=function(r,n){return r==="v"?iT(n):nT(n)},sT=function(r,n){return r==="h"&&n==="rtl"?-1:1},aT=function(r,n,a,l,d){var y=sT(r,window.getComputedStyle(n).direction),S=y*l,o=a.target,c=n.contains(o),u=!1,C=S>0,v=0,w=0;do{if(!o)break;var x=S0(r,o),R=x[0],b=x[1],h=x[2],m=b-h-y*R;(R||m)&&y0(r,o)&&(v+=m,w+=R);var p=o.parentNode;o=p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE?p.host:p}while(!c&&o!==document.body||c&&(n.contains(o)||n===o));return(C&&Math.abs(v)<1||!C&&Math.abs(w)<1)&&(u=!0),u},Gl=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},E_=function(r){return[r.deltaX,r.deltaY]},R_=function(r){return r&&"current"in r?r.current:r},oT=function(r,n){return r[0]===n[0]&&r[1]===n[1]},lT=function(r){return`
|
|
50
50
|
.block-interactivity-`.concat(r,` {pointer-events: none;}
|
|
51
51
|
.allow-interactivity-`).concat(r,` {pointer-events: all;}
|
|
52
|
-
`)},cT=0,Ks=[];function uT(r){var n=k.useRef([]),a=k.useRef([0,0]),l=k.useRef(),d=k.useState(cT++)[0],y=k.useState(g0)[0],S=k.useRef(r);k.useEffect(function(){S.current=r},[r]),k.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(d));var b=MA([r.lockRef.current],(r.shards||[]).map(R_),!0).filter(Boolean);return b.forEach(function(h){return h.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),b.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(d))})}}},[r.inert,r.lockRef.current,r.shards]);var o=k.useCallback(function(b,h){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!S.current.allowPinchZoom;var m=Gl(b),p=a.current,g="deltaX"in b?b.deltaX:p[0]-m[0],A="deltaY"in b?b.deltaY:p[1]-m[1],D,L=b.target,T=Math.abs(g)>Math.abs(A)?"h":"v";if("touches"in b&&T==="h"&&L.type==="range")return!1;var E=window.getSelection(),B=E&&E.anchorNode,W=B?B===L||B.contains(L):!1;if(W)return!1;var F=x_(T,L);if(!F)return!0;if(F?D=T:(D=T==="v"?"h":"v",F=x_(T,L)),!F)return!1;if(!l.current&&"changedTouches"in b&&(g||A)&&(l.current=D),!D)return!0;var I=l.current||D;return aT(I,h,b,I==="h"?g:A)},[]),c=k.useCallback(function(b){var h=b;if(!(!Ks.length||Ks[Ks.length-1]!==y)){var m="deltaY"in h?E_(h):Gl(h),p=n.current.filter(function(D){return D.name===h.type&&(D.target===h.target||h.target===D.shadowParent)&&oT(D.delta,m)})[0];if(p&&p.should){h.cancelable&&h.preventDefault();return}if(!p){var g=(S.current.shards||[]).map(R_).filter(Boolean).filter(function(D){return D.contains(h.target)}),A=g.length>0?o(h,g[0]):!S.current.noIsolation;A&&h.cancelable&&h.preventDefault()}}},[]),u=k.useCallback(function(b,h,m,p){var g={name:b,delta:h,target:m,should:p,shadowParent:hT(m)};n.current.push(g),setTimeout(function(){n.current=n.current.filter(function(A){return A!==g})},1)},[]),C=k.useCallback(function(b){a.current=Gl(b),l.current=void 0},[]),v=k.useCallback(function(b){u(b.type,E_(b),b.target,o(b,r.lockRef.current))},[]),w=k.useCallback(function(b){u(b.type,Gl(b),b.target,o(b,r.lockRef.current))},[]);k.useEffect(function(){return Ks.push(y),r.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:w}),document.addEventListener("wheel",c,Vs),document.addEventListener("touchmove",c,Vs),document.addEventListener("touchstart",C,Vs),function(){Ks=Ks.filter(function(b){return b!==y}),document.removeEventListener("wheel",c,Vs),document.removeEventListener("touchmove",c,Vs),document.removeEventListener("touchstart",C,Vs)}},[]);var x=r.removeScrollBar,R=r.inert;return k.createElement(k.Fragment,null,R?k.createElement(y,{styles:lT(d)}):null,x?k.createElement(JA,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function hT(r){for(var n=null;r!==null;)r instanceof ShadowRoot&&(n=r.host,r=r.host),r=r.parentNode;return n}const fT=UA(v0,uT);var b0=k.forwardRef(function(r,n){return k.createElement(xc,ai({},r,{ref:n,sideCar:fT}))});b0.classNames=xc.classNames;var dT=[" ","Enter","ArrowUp","ArrowDown"],mT=[" ","Enter"],is="Select",[Ec,Rc,pT]=vR(is),[sa]=td(is,[pT,r0]),Ac=r0(),[vT,An]=sa(is),[gT,_T]=sa(is),C0=r=>{const{__scopeSelect:n,children:a,open:l,defaultOpen:d,onOpenChange:y,value:S,defaultValue:o,onValueChange:c,dir:u,name:C,autoComplete:v,disabled:w,required:x,form:R}=r,b=Ac(n),[h,m]=k.useState(null),[p,g]=k.useState(null),[A,D]=k.useState(!1),L=_R(u),[T,E]=b_({prop:l,defaultProp:d??!1,onChange:y,caller:is}),[B,W]=b_({prop:S,defaultProp:o,onChange:c,caller:is}),F=k.useRef(null),I=h?R||!!h.closest("form"):!0,[V,ee]=k.useState(new Set),ne=Array.from(V).map(q=>q.props.value).join(";");return O.jsx(uA,{...b,children:O.jsxs(vT,{required:x,scope:n,trigger:h,onTriggerChange:m,valueNode:p,onValueNodeChange:g,valueNodeHasChildren:A,onValueNodeHasChildrenChange:D,contentId:rd(),value:B,onValueChange:W,open:T,onOpenChange:E,dir:L,triggerPointerDownPosRef:F,disabled:w,children:[O.jsx(Ec.Provider,{scope:n,children:O.jsx(gT,{scope:r.__scopeSelect,onNativeOptionAdd:k.useCallback(q=>{ee(Z=>new Set(Z).add(q))},[]),onNativeOptionRemove:k.useCallback(q=>{ee(Z=>{const K=new Set(Z);return K.delete(q),K})},[]),children:a})}),I?O.jsxs(K0,{"aria-hidden":!0,required:x,tabIndex:-1,name:C,autoComplete:v,value:B,onChange:q=>W(q.target.value),disabled:w,form:R,children:[B===void 0?O.jsx("option",{value:""}):null,Array.from(V)]},ne):null]})})};C0.displayName=is;var w0="SelectTrigger",x0=k.forwardRef((r,n)=>{const{__scopeSelect:a,disabled:l=!1,...d}=r,y=Ac(a),S=An(w0,a),o=S.disabled||l,c=Kt(n,S.onTriggerChange),u=Rc(a),C=k.useRef("touch"),[v,w,x]=$0(b=>{const h=u().filter(g=>!g.disabled),m=h.find(g=>g.value===S.value),p=Y0(h,b,m);p!==void 0&&S.onValueChange(p.value)}),R=b=>{o||(S.onOpenChange(!0),x()),b&&(S.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return O.jsx(hA,{asChild:!0,...y,children:O.jsx(Rt.button,{type:"button",role:"combobox","aria-controls":S.contentId,"aria-expanded":S.open,"aria-required":S.required,"aria-autocomplete":"none",dir:S.dir,"data-state":S.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":G0(S.value)?"":void 0,...d,ref:c,onClick:Mt(d.onClick,b=>{b.currentTarget.focus(),C.current!=="mouse"&&R(b)}),onPointerDown:Mt(d.onPointerDown,b=>{C.current=b.pointerType;const h=b.target;h.hasPointerCapture(b.pointerId)&&h.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(R(b),b.preventDefault())}),onKeyDown:Mt(d.onKeyDown,b=>{const h=v.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&w(b.key),!(h&&b.key===" ")&&dT.includes(b.key)&&(R(),b.preventDefault())})})})});x0.displayName=w0;var E0="SelectValue",R0=k.forwardRef((r,n)=>{const{__scopeSelect:a,className:l,style:d,children:y,placeholder:S="",...o}=r,c=An(E0,a),{onValueNodeHasChildrenChange:u}=c,C=y!==void 0,v=Kt(n,c.onValueNodeChange);return lr(()=>{u(C)},[u,C]),O.jsx(Rt.span,{...o,ref:v,style:{pointerEvents:"none"},children:G0(c.value)?O.jsx(O.Fragment,{children:S}):y})});R0.displayName=E0;var yT="SelectIcon",A0=k.forwardRef((r,n)=>{const{__scopeSelect:a,children:l,...d}=r;return O.jsx(Rt.span,{"aria-hidden":!0,...d,ref:n,children:l||"▼"})});A0.displayName=yT;var ST="SelectPortal",T0=r=>O.jsx(h0,{asChild:!0,...r});T0.displayName=ST;var ns="SelectContent",D0=k.forwardRef((r,n)=>{const a=An(ns,r.__scopeSelect),[l,d]=k.useState();if(lr(()=>{d(new DocumentFragment)},[]),!a.open){const y=l;return y?ea.createPortal(O.jsx(O0,{scope:r.__scopeSelect,children:O.jsx(Ec.Slot,{scope:r.__scopeSelect,children:O.jsx("div",{children:r.children})})}),y):null}return O.jsx(M0,{...r,ref:n})});D0.displayName=ns;var Kr=10,[O0,Tn]=sa(ns),bT="SelectContentImpl",CT=pA("SelectContent.RemoveScroll"),M0=k.forwardRef((r,n)=>{const{__scopeSelect:a,position:l="item-aligned",onCloseAutoFocus:d,onEscapeKeyDown:y,onPointerDownOutside:S,side:o,sideOffset:c,align:u,alignOffset:C,arrowPadding:v,collisionBoundary:w,collisionPadding:x,sticky:R,hideWhenDetached:b,avoidCollisions:h,...m}=r,p=An(ns,a),[g,A]=k.useState(null),[D,L]=k.useState(null),T=Kt(n,Q=>A(Q)),[E,B]=k.useState(null),[W,F]=k.useState(null),I=Rc(a),[V,ee]=k.useState(!1),ne=k.useRef(!1);k.useEffect(()=>{if(g)return OA(g)},[g]),NR();const q=k.useCallback(Q=>{const[P,...he]=I().map(me=>me.ref.current),[ge]=he.slice(-1),oe=document.activeElement;for(const me of Q)if(me===oe||(me?.scrollIntoView({block:"nearest"}),me===P&&D&&(D.scrollTop=0),me===ge&&D&&(D.scrollTop=D.scrollHeight),me?.focus(),document.activeElement!==oe))return},[I,D]),Z=k.useCallback(()=>q([E,g]),[q,E,g]);k.useEffect(()=>{V&&Z()},[V,Z]);const{onOpenChange:K,triggerPointerDownPosRef:j}=p;k.useEffect(()=>{if(g){let Q={x:0,y:0};const P=ge=>{Q={x:Math.abs(Math.round(ge.pageX)-(j.current?.x??0)),y:Math.abs(Math.round(ge.pageY)-(j.current?.y??0))}},he=ge=>{Q.x<=10&&Q.y<=10?ge.preventDefault():g.contains(ge.target)||K(!1),document.removeEventListener("pointermove",P),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",P),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",P),document.removeEventListener("pointerup",he,{capture:!0})}}},[g,K,j]),k.useEffect(()=>{const Q=()=>K(!1);return window.addEventListener("blur",Q),window.addEventListener("resize",Q),()=>{window.removeEventListener("blur",Q),window.removeEventListener("resize",Q)}},[K]);const[U,N]=$0(Q=>{const P=I().filter(oe=>!oe.disabled),he=P.find(oe=>oe.ref.current===document.activeElement),ge=Y0(P,Q,he);ge&&setTimeout(()=>ge.ref.current.focus())}),z=k.useCallback((Q,P,he)=>{const ge=!ne.current&&!he;(p.value!==void 0&&p.value===P||ge)&&(B(Q),ge&&(ne.current=!0))},[p.value]),X=k.useCallback(()=>g?.focus(),[g]),ie=k.useCallback((Q,P,he)=>{const ge=!ne.current&&!he;(p.value!==void 0&&p.value===P||ge)&&F(Q)},[p.value]),de=l==="popper"?Ef:L0,G=de===Ef?{side:o,sideOffset:c,align:u,alignOffset:C,arrowPadding:v,collisionBoundary:w,collisionPadding:x,sticky:R,hideWhenDetached:b,avoidCollisions:h}:{};return O.jsx(O0,{scope:a,content:g,viewport:D,onViewportChange:L,itemRefCallback:z,selectedItem:E,onItemLeave:X,itemTextRefCallback:ie,focusSelectedItem:Z,selectedItemText:W,position:l,isPositioned:V,searchRef:U,children:O.jsx(b0,{as:CT,allowPinchZoom:!0,children:O.jsx(Iy,{asChild:!0,trapped:p.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:Mt(d,Q=>{p.trigger?.focus({preventScroll:!0}),Q.preventDefault()}),children:O.jsx(Py,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:y,onPointerDownOutside:S,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:O.jsx(de,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:Q=>Q.preventDefault(),...m,...G,onPlaced:()=>ee(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:Mt(m.onKeyDown,Q=>{const P=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!P&&Q.key.length===1&&N(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let ge=I().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const oe=Q.target,me=ge.indexOf(oe);ge=ge.slice(me+1)}setTimeout(()=>q(ge)),Q.preventDefault()}})})})})})})});M0.displayName=bT;var wT="SelectItemAlignedPosition",L0=k.forwardRef((r,n)=>{const{__scopeSelect:a,onPlaced:l,...d}=r,y=An(ns,a),S=Tn(ns,a),[o,c]=k.useState(null),[u,C]=k.useState(null),v=Kt(n,T=>C(T)),w=Rc(a),x=k.useRef(!1),R=k.useRef(!0),{viewport:b,selectedItem:h,selectedItemText:m,focusSelectedItem:p}=S,g=k.useCallback(()=>{if(y.trigger&&y.valueNode&&o&&u&&b&&h&&m){const T=y.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),B=y.valueNode.getBoundingClientRect(),W=m.getBoundingClientRect();if(y.dir!=="rtl"){const oe=W.left-E.left,me=B.left-oe,Ce=T.left-me,ze=T.width+Ce,ct=Math.max(ze,E.width),tt=window.innerWidth-Kr,ke=t_(me,[Kr,Math.max(Kr,tt-ct)]);o.style.minWidth=ze+"px",o.style.left=ke+"px"}else{const oe=E.right-W.right,me=window.innerWidth-B.right-oe,Ce=window.innerWidth-T.right-me,ze=T.width+Ce,ct=Math.max(ze,E.width),tt=window.innerWidth-Kr,ke=t_(me,[Kr,Math.max(Kr,tt-ct)]);o.style.minWidth=ze+"px",o.style.right=ke+"px"}const F=w(),I=window.innerHeight-Kr*2,V=b.scrollHeight,ee=window.getComputedStyle(u),ne=parseInt(ee.borderTopWidth,10),q=parseInt(ee.paddingTop,10),Z=parseInt(ee.borderBottomWidth,10),K=parseInt(ee.paddingBottom,10),j=ne+q+V+K+Z,U=Math.min(h.offsetHeight*5,j),N=window.getComputedStyle(b),z=parseInt(N.paddingTop,10),X=parseInt(N.paddingBottom,10),ie=T.top+T.height/2-Kr,de=I-ie,G=h.offsetHeight/2,Q=h.offsetTop+G,P=ne+q+Q,he=j-P;if(P<=ie){const oe=F.length>0&&h===F[F.length-1].ref.current;o.style.bottom="0px";const me=u.clientHeight-b.offsetTop-b.offsetHeight,Ce=Math.max(de,G+(oe?X:0)+me+Z),ze=P+Ce;o.style.height=ze+"px"}else{const oe=F.length>0&&h===F[0].ref.current;o.style.top="0px";const Ce=Math.max(ie,ne+b.offsetTop+(oe?z:0)+G)+he;o.style.height=Ce+"px",b.scrollTop=P-ie+b.offsetTop}o.style.margin=`${Kr}px 0`,o.style.minHeight=U+"px",o.style.maxHeight=I+"px",l?.(),requestAnimationFrame(()=>x.current=!0)}},[w,y.trigger,y.valueNode,o,u,b,h,m,y.dir,l]);lr(()=>g(),[g]);const[A,D]=k.useState();lr(()=>{u&&D(window.getComputedStyle(u).zIndex)},[u]);const L=k.useCallback(T=>{T&&R.current===!0&&(g(),p?.(),R.current=!1)},[g,p]);return O.jsx(ET,{scope:a,contentWrapper:o,shouldExpandOnScrollRef:x,onScrollButtonChange:L,children:O.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:O.jsx(Rt.div,{...d,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...d.style}})})})});L0.displayName=wT;var xT="SelectPopperPosition",Ef=k.forwardRef((r,n)=>{const{__scopeSelect:a,align:l="start",collisionPadding:d=Kr,...y}=r,S=Ac(a);return O.jsx(fA,{...S,...y,ref:n,align:l,collisionPadding:d,style:{boxSizing:"border-box",...y.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ef.displayName=xT;var[ET,hd]=sa(ns,{}),Rf="SelectViewport",k0=k.forwardRef((r,n)=>{const{__scopeSelect:a,nonce:l,...d}=r,y=Tn(Rf,a),S=hd(Rf,a),o=Kt(n,y.onViewportChange),c=k.useRef(0);return O.jsxs(O.Fragment,{children:[O.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),O.jsx(Ec.Slot,{scope:a,children:O.jsx(Rt.div,{"data-radix-select-viewport":"",role:"presentation",...d,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...d.style},onScroll:Mt(d.onScroll,u=>{const C=u.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:w}=S;if(w?.current&&v){const x=Math.abs(c.current-C.scrollTop);if(x>0){const R=window.innerHeight-Kr*2,b=parseFloat(v.style.minHeight),h=parseFloat(v.style.height),m=Math.max(b,h);if(m<R){const p=m+x,g=Math.min(R,p),A=p-g;v.style.height=g+"px",v.style.bottom==="0px"&&(C.scrollTop=A>0?A:0,v.style.justifyContent="flex-end")}}}c.current=C.scrollTop})})})]})});k0.displayName=Rf;var B0="SelectGroup",[RT,AT]=sa(B0),TT=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r,d=rd();return O.jsx(RT,{scope:a,id:d,children:O.jsx(Rt.div,{role:"group","aria-labelledby":d,...l,ref:n})})});TT.displayName=B0;var N0="SelectLabel",j0=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r,d=AT(N0,a);return O.jsx(Rt.div,{id:d.id,...l,ref:n})});j0.displayName=N0;var hc="SelectItem",[DT,H0]=sa(hc),z0=k.forwardRef((r,n)=>{const{__scopeSelect:a,value:l,disabled:d=!1,textValue:y,...S}=r,o=An(hc,a),c=Tn(hc,a),u=o.value===l,[C,v]=k.useState(y??""),[w,x]=k.useState(!1),R=Kt(n,p=>c.itemRefCallback?.(p,l,d)),b=rd(),h=k.useRef("touch"),m=()=>{d||(o.onValueChange(l),o.onOpenChange(!1))};if(l==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return O.jsx(DT,{scope:a,value:l,disabled:d,textId:b,isSelected:u,onItemTextChange:k.useCallback(p=>{v(g=>g||(p?.textContent??"").trim())},[]),children:O.jsx(Ec.ItemSlot,{scope:a,value:l,disabled:d,textValue:C,children:O.jsx(Rt.div,{role:"option","aria-labelledby":b,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":d||void 0,"data-disabled":d?"":void 0,tabIndex:d?void 0:-1,...S,ref:R,onFocus:Mt(S.onFocus,()=>x(!0)),onBlur:Mt(S.onBlur,()=>x(!1)),onClick:Mt(S.onClick,()=>{h.current!=="mouse"&&m()}),onPointerUp:Mt(S.onPointerUp,()=>{h.current==="mouse"&&m()}),onPointerDown:Mt(S.onPointerDown,p=>{h.current=p.pointerType}),onPointerMove:Mt(S.onPointerMove,p=>{h.current=p.pointerType,d?c.onItemLeave?.():h.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Mt(S.onPointerLeave,p=>{p.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Mt(S.onKeyDown,p=>{c.searchRef?.current!==""&&p.key===" "||(mT.includes(p.key)&&m(),p.key===" "&&p.preventDefault())})})})})});z0.displayName=hc;var io="SelectItemText",P0=k.forwardRef((r,n)=>{const{__scopeSelect:a,className:l,style:d,...y}=r,S=An(io,a),o=Tn(io,a),c=H0(io,a),u=_T(io,a),[C,v]=k.useState(null),w=Kt(n,m=>v(m),c.onItemTextChange,m=>o.itemTextRefCallback?.(m,c.value,c.disabled)),x=C?.textContent,R=k.useMemo(()=>O.jsx("option",{value:c.value,disabled:c.disabled,children:x},c.value),[c.disabled,c.value,x]),{onNativeOptionAdd:b,onNativeOptionRemove:h}=u;return lr(()=>(b(R),()=>h(R)),[b,h,R]),O.jsxs(O.Fragment,{children:[O.jsx(Rt.span,{id:c.textId,...y,ref:w}),c.isSelected&&S.valueNode&&!S.valueNodeHasChildren?ea.createPortal(y.children,S.valueNode):null]})});P0.displayName=io;var U0="SelectItemIndicator",I0=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r;return H0(U0,a).isSelected?O.jsx(Rt.span,{"aria-hidden":!0,...l,ref:n}):null});I0.displayName=U0;var Af="SelectScrollUpButton",F0=k.forwardRef((r,n)=>{const a=Tn(Af,r.__scopeSelect),l=hd(Af,r.__scopeSelect),[d,y]=k.useState(!1),S=Kt(n,l.onScrollButtonChange);return lr(()=>{if(a.viewport&&a.isPositioned){let o=function(){const u=c.scrollTop>0;y(u)};const c=a.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[a.viewport,a.isPositioned]),d?O.jsx(W0,{...r,ref:S,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=a;o&&c&&(o.scrollTop=o.scrollTop-c.offsetHeight)}}):null});F0.displayName=Af;var Tf="SelectScrollDownButton",q0=k.forwardRef((r,n)=>{const a=Tn(Tf,r.__scopeSelect),l=hd(Tf,r.__scopeSelect),[d,y]=k.useState(!1),S=Kt(n,l.onScrollButtonChange);return lr(()=>{if(a.viewport&&a.isPositioned){let o=function(){const u=c.scrollHeight-c.clientHeight,C=Math.ceil(c.scrollTop)<u;y(C)};const c=a.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[a.viewport,a.isPositioned]),d?O.jsx(W0,{...r,ref:S,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=a;o&&c&&(o.scrollTop=o.scrollTop+c.offsetHeight)}}):null});q0.displayName=Tf;var W0=k.forwardRef((r,n)=>{const{__scopeSelect:a,onAutoScroll:l,...d}=r,y=Tn("SelectScrollButton",a),S=k.useRef(null),o=Rc(a),c=k.useCallback(()=>{S.current!==null&&(window.clearInterval(S.current),S.current=null)},[]);return k.useEffect(()=>()=>c(),[c]),lr(()=>{o().find(C=>C.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[o]),O.jsx(Rt.div,{"aria-hidden":!0,...d,ref:n,style:{flexShrink:0,...d.style},onPointerDown:Mt(d.onPointerDown,()=>{S.current===null&&(S.current=window.setInterval(l,50))}),onPointerMove:Mt(d.onPointerMove,()=>{y.onItemLeave?.(),S.current===null&&(S.current=window.setInterval(l,50))}),onPointerLeave:Mt(d.onPointerLeave,()=>{c()})})}),OT="SelectSeparator",V0=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r;return O.jsx(Rt.div,{"aria-hidden":!0,...l,ref:n})});V0.displayName=OT;var Df="SelectArrow",MT=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r,d=Ac(a),y=An(Df,a),S=Tn(Df,a);return y.open&&S.position==="popper"?O.jsx(dA,{...d,...l,ref:n}):null});MT.displayName=Df;var LT="SelectBubbleInput",K0=k.forwardRef(({__scopeSelect:r,value:n,...a},l)=>{const d=k.useRef(null),y=Kt(l,d),S=xA(n);return k.useEffect(()=>{const o=d.current;if(!o)return;const c=window.HTMLSelectElement.prototype,C=Object.getOwnPropertyDescriptor(c,"value").set;if(S!==n&&C){const v=new Event("change",{bubbles:!0});C.call(o,n),o.dispatchEvent(v)}},[S,n]),O.jsx(Rt.select,{...a,style:{...f0,...a.style},ref:y,defaultValue:n})});K0.displayName=LT;function G0(r){return r===""||r===void 0}function $0(r){const n=ts(r),a=k.useRef(""),l=k.useRef(0),d=k.useCallback(S=>{const o=a.current+S;n(o),(function c(u){a.current=u,window.clearTimeout(l.current),u!==""&&(l.current=window.setTimeout(()=>c(""),1e3))})(o)},[n]),y=k.useCallback(()=>{a.current="",window.clearTimeout(l.current)},[]);return k.useEffect(()=>()=>window.clearTimeout(l.current),[]),[a,d,y]}function Y0(r,n,a){const d=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,y=a?r.indexOf(a):-1;let S=kT(r,Math.max(y,0));d.length===1&&(S=S.filter(u=>u!==a));const c=S.find(u=>u.textValue.toLowerCase().startsWith(d.toLowerCase()));return c!==a?c:void 0}function kT(r,n){return r.map((a,l)=>r[(n+l)%r.length])}var BT=C0,Q0=x0,NT=R0,jT=A0,HT=T0,X0=D0,zT=k0,Z0=j0,J0=z0,PT=P0,UT=I0,eS=F0,tS=q0,rS=V0;const A_=BT,T_=NT,Of=k.forwardRef(({className:r,children:n,...a},l)=>O.jsxs(Q0,{ref:l,className:Ue("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...a,children:[n,O.jsx(jT,{asChild:!0,children:O.jsx(Ny,{className:"h-4 w-4 opacity-50"})})]}));Of.displayName=Q0.displayName;const iS=k.forwardRef(({className:r,...n},a)=>O.jsx(eS,{ref:a,className:Ue("flex cursor-default items-center justify-center py-1",r),...n,children:O.jsx(NE,{className:"h-4 w-4"})}));iS.displayName=eS.displayName;const nS=k.forwardRef(({className:r,...n},a)=>O.jsx(tS,{ref:a,className:Ue("flex cursor-default items-center justify-center py-1",r),...n,children:O.jsx(Ny,{className:"h-4 w-4"})}));nS.displayName=tS.displayName;const Mf=k.forwardRef(({className:r,children:n,position:a="popper",...l},d)=>O.jsx(HT,{children:O.jsxs(X0,{ref:d,className:Ue("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:a,...l,children:[O.jsx(iS,{}),O.jsx(zT,{className:Ue("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),O.jsx(nS,{})]})}));Mf.displayName=X0.displayName;const IT=k.forwardRef(({className:r,...n},a)=>O.jsx(Z0,{ref:a,className:Ue("px-2 py-1.5 text-sm font-semibold",r),...n}));IT.displayName=Z0.displayName;const no=k.forwardRef(({className:r,children:n,...a},l)=>O.jsxs(J0,{ref:l,className:Ue("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...a,children:[O.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(UT,{children:O.jsx(LE,{className:"h-4 w-4"})})}),O.jsx(PT,{children:n})]}));no.displayName=J0.displayName;const FT=k.forwardRef(({className:r,...n},a)=>O.jsx(rS,{ref:a,className:Ue("-mx-1 my-1 h-px bg-muted",r),...n}));FT.displayName=rS.displayName;const qT={"claude-code":{command:"claude",defaultArgs:[],modeArgs:{normal:[],continue:["-c"],resume:["-r"]},permissionSkipArgs:["--dangerously-skip-permissions"]},"codex-cli":{command:"codex",defaultArgs:["--auto-approve","--verbose"],modeArgs:{normal:[],continue:["resume","--last"],resume:["resume"]}}};function WT({branch:r,availableTools:n,selectedToolId:a,selectedMode:l,skipPermissions:d,extraArgsText:y,isConfigLoading:S,configError:o,isStartingSession:c,isSyncingBranch:u,needsRemoteSync:C,hasBlockingDivergence:v,onToolChange:w,onModeChange:x,onSkipPermissionsChange:R,onExtraArgsChange:b,onStartSession:h,onSyncBranch:m}){const p=!!r.worktreePath,g=n.find(L=>L.id===a),A=k.useMemo(()=>g?g.target==="custom"?{command:g.definition.command,defaultArgs:g.definition.defaultArgs??null,modeArgs:g.definition.modeArgs,permissionSkipArgs:g.definition.permissionSkipArgs??null}:qT[g.id]??null:null,[g]),D=k.useMemo(()=>{if(!A)return null;const L=[];A.defaultArgs?.length&&L.push(...A.defaultArgs);const T=A.modeArgs?.[l];T?.length&&L.push(...T),d&&A.permissionSkipArgs?.length&&L.push(...A.permissionSkipArgs);const E=y.split(/\s+/).map(B=>B.trim()).filter(Boolean);return E.length&&L.push(...E),{command:A.command,args:L}},[A,l,d,y]);return O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-3",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tool Launcher"}),O.jsx("h3",{className:"mt-1 text-lg font-semibold",children:"AIツール起動"})]}),o&&O.jsx(Ct,{variant:"warning",children:"設定の取得に失敗"})]}),O.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Web UI から直接AIツールを起動できます。設定したカスタムツールも一覧に表示されます。"})]}),O.jsx(Vt,{className:"space-y-4",children:p?O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[O.jsxs("div",{className:"space-y-2",children:[O.jsx("label",{className:"text-sm font-medium",children:"AIツール"}),O.jsxs(A_,{value:a,onValueChange:w,disabled:S??!1,children:[O.jsx(Of,{children:O.jsx(T_,{placeholder:"ツールを選択"})}),O.jsx(Mf,{children:n.map(L=>O.jsx(no,{value:L.id,children:L.label},L.id))})]})]}),O.jsxs("div",{className:"space-y-2",children:[O.jsx("label",{className:"text-sm font-medium",children:"起動モード"}),O.jsxs(A_,{value:l,onValueChange:L=>x(L),children:[O.jsx(Of,{children:O.jsx(T_,{})}),O.jsxs(Mf,{children:[O.jsx(no,{value:"normal",children:"Normal"}),O.jsx(no,{value:"continue",children:"Continue"}),O.jsx(no,{value:"resume",children:"Resume"})]})]})]}),O.jsxs("div",{className:"space-y-2 sm:col-span-2 lg:col-span-1",children:[O.jsx("label",{className:"text-sm font-medium",children:"追加引数"}),O.jsx(co,{type:"text",value:y,onChange:L=>b(L.target.value),placeholder:"--flag value"})]})]}),O.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[O.jsx("input",{type:"checkbox",checked:d,onChange:L=>R(L.target.checked),className:"h-4 w-4 rounded border-border"}),O.jsx("span",{children:"権限チェックをスキップ (自己責任)"})]}),d&&O.jsx(Ui,{variant:"warning",children:O.jsx(Ii,{children:"権限チェックをスキップすることで、CLI での `--dangerously-skip-permissions` 指定と同様のリスクを負います。"})}),C&&O.jsx(Ui,{variant:"info","data-testid":"sync-required",children:O.jsxs(Ii,{children:[O.jsxs("p",{children:["リモートに未取得の更新 (",r.divergence?.behind??0," ","commits) があるため、AIツールを起動する前に同期してください。"]}),O.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"CLI の `git fetch --all` と `git pull --ff-only` と同じ処理を Web UI から実行できます。"})]})}),v&&O.jsx(Ui,{variant:"warning","data-testid":"divergence-warning",children:O.jsxs(Ii,{children:[O.jsx("p",{children:"リモートとローカルの両方に未解決の差分があるため、起動をブロックしています。"}),O.jsxs("ul",{className:"mt-2 list-inside list-disc text-xs text-muted-foreground",children:[O.jsxs("li",{children:["git fetch && git pull --ff-only origin ",r.name]}),O.jsxs("li",{children:["git push origin ",r.name," でローカル進捗を共有"]})]})]})}),O.jsxs("div",{className:"flex flex-wrap gap-2 pt-2",children:[O.jsx(Pt,{onClick:h,disabled:c||!g||v||C||u,children:c?"起動中...":"セッションを起動"}),O.jsx(Pt,{variant:"secondary",onClick:m,disabled:!r.worktreePath||u,children:u?"同期中...":"最新の変更を同期"}),O.jsx(Pt,{variant:"ghost",asChild:!0,children:O.jsx(jr,{to:"/config",children:"設定を編集"})})]}),A&&O.jsxs("div",{className:"space-y-2 rounded-lg border bg-muted/30 p-4",children:[O.jsxs("div",{className:"grid gap-2 text-sm sm:grid-cols-2",children:[O.jsxs("div",{children:[O.jsx("span",{className:"text-muted-foreground",children:"コマンド:"})," ",O.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:A.command})]}),O.jsxs("div",{children:[O.jsx("span",{className:"text-muted-foreground",children:"defaultArgs:"})," ",O.jsx("span",{className:Ue(!A.defaultArgs?.length&&"text-muted-foreground/50"),children:A.defaultArgs?.join(" ")||"未設定"})]})]}),D&&O.jsxs("div",{className:"border-t pt-2",children:[O.jsx("span",{className:"text-xs text-muted-foreground",children:"最終コマンド:"}),O.jsxs("pre",{className:"mt-1 overflow-x-auto rounded bg-background p-2 font-mono text-sm",children:[D.command," ",D.args.join(" ")]})]})]})]}):O.jsx("p",{className:"py-4 text-center text-sm text-muted-foreground",children:"Worktreeが未作成のため、先にWorktreeを作成してください。"})})]})}function VT(r,n){return r==="claude-code"?"Claude":r==="codex-cli"?"Codex":r==="gemini-cli"?"Gemini":r==="qwen-cli"?"Qwen":n||"Custom"}function KT(r){const n=r.mode==="normal"?"New":r.mode==="continue"?"Continue":r.mode==="resume"?"Resume":null;return[VT(r.toolId,r.toolLabel),n,r.model].filter(Boolean).join(" | ")}function GT(r){try{return new Intl.DateTimeFormat("ja-JP",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(r))}catch{return"--"}}function $T({branch:r,formattedCommitDate:n,latestToolUsage:a}){return O.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Branch Insights"}),O.jsx("h3",{className:"text-lg font-semibold",children:"ブランチインサイト"})]}),O.jsx(Vt,{children:O.jsxs("dl",{className:"grid gap-3 text-sm",children:[O.jsxs("div",{className:"flex justify-between border-b border-border/50 pb-2",children:[O.jsx("dt",{className:"text-muted-foreground",children:"コミット"}),O.jsx("dd",{className:"font-mono text-xs",children:r.commitHash})]}),O.jsxs("div",{className:"flex justify-between border-b border-border/50 pb-2",children:[O.jsx("dt",{className:"text-muted-foreground",children:"Author"}),O.jsx("dd",{children:r.author??"N/A"})]}),O.jsxs("div",{className:"flex justify-between border-b border-border/50 pb-2",children:[O.jsx("dt",{className:"text-muted-foreground",children:"更新日"}),O.jsx("dd",{children:n})]}),O.jsxs("div",{className:"flex justify-between",children:[O.jsx("dt",{className:"text-muted-foreground",children:"Worktree"}),O.jsx("dd",{className:"max-w-[200px] truncate text-right",title:r.worktreePath??void 0,children:r.worktreePath??"未作成"})]})]})})]}),O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Latest Commit"}),O.jsx("h3",{className:"text-lg font-semibold",children:"コミット情報"})]}),O.jsx(Vt,{children:O.jsx("p",{className:"text-sm text-muted-foreground",children:r.commitMessage??"コミットメッセージがありません。"})})]}),r.divergence&&O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Divergence"}),O.jsx("h3",{className:"text-lg font-semibold",children:"差分状況"})]}),O.jsx(Vt,{children:O.jsxs("div",{className:"flex flex-wrap gap-2",children:[O.jsxs(Ct,{variant:"outline",children:["↑ Ahead ",r.divergence.ahead]}),O.jsxs(Ct,{variant:"outline",children:["↓ Behind ",r.divergence.behind]}),O.jsx(Ct,{variant:r.divergence.upToDate?"success":"warning",children:r.divergence.upToDate?"最新":"更新あり"})]})})]}),O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Worktree"}),O.jsx("h3",{className:"text-lg font-semibold",children:"Worktree情報"})]}),O.jsxs(Vt,{className:"space-y-2 text-sm text-muted-foreground",children:[O.jsxs("p",{children:["パス:"," ",O.jsx("strong",{className:"text-foreground",children:r.worktreePath??"未作成"})]}),O.jsxs("ul",{className:"list-inside list-disc space-y-1 text-xs",children:[O.jsx("li",{children:"AIツールの起動にはクリーンなワークツリーであることを推奨"}),O.jsx("li",{children:"Worktree再作成で既存のローカル変更が失われる可能性あり"})]})]})]}),a&&O.jsxs(zt,{className:"lg:col-span-2",children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Last Activity"}),O.jsx("h3",{className:"text-lg font-semibold",children:"最終ツール使用"})]}),O.jsx(Vt,{children:O.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[O.jsx(Ct,{variant:"outline",children:KT(a)}),O.jsx("span",{className:"text-muted-foreground",children:GT(a.timestamp)}),a.worktreePath&&O.jsxs("span",{className:"text-xs text-muted-foreground",children:["@ ",a.worktreePath]})]})})]})]})}var of={exports:{}},D_;function YT(){return D_||(D_=1,(function(r,n){(function(a,l){r.exports=l()})(globalThis,(()=>(()=>{var a={4567:function(S,o,c){var u=this&&this.__decorate||function(m,p,g,A){var D,L=arguments.length,T=L<3?p:A===null?A=Object.getOwnPropertyDescriptor(p,g):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,p,g,A);else for(var E=m.length-1;E>=0;E--)(D=m[E])&&(T=(L<3?D(T):L>3?D(p,g,T):D(p,g))||T);return L>3&&T&&Object.defineProperty(p,g,T),T},C=this&&this.__param||function(m,p){return function(g,A){p(g,A,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const v=c(9042),w=c(9924),x=c(844),R=c(4725),b=c(2585);let h=o.AccessibilityManager=class extends x.Disposable{constructor(m,p,g,A){super(),this._terminal=m,this._coreBrowserService=g,this._renderService=A,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let D=0;D<this._terminal.rows;D++)this._rowElements[D]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[D]);if(this._topBoundaryFocusListener=D=>this._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new w.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
52
|
+
`)},cT=0,Ks=[];function uT(r){var n=k.useRef([]),a=k.useRef([0,0]),l=k.useRef(),d=k.useState(cT++)[0],y=k.useState(g0)[0],S=k.useRef(r);k.useEffect(function(){S.current=r},[r]),k.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(d));var b=MA([r.lockRef.current],(r.shards||[]).map(R_),!0).filter(Boolean);return b.forEach(function(h){return h.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),b.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(d))})}}},[r.inert,r.lockRef.current,r.shards]);var o=k.useCallback(function(b,h){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!S.current.allowPinchZoom;var m=Gl(b),p=a.current,g="deltaX"in b?b.deltaX:p[0]-m[0],A="deltaY"in b?b.deltaY:p[1]-m[1],D,L=b.target,T=Math.abs(g)>Math.abs(A)?"h":"v";if("touches"in b&&T==="h"&&L.type==="range")return!1;var E=window.getSelection(),B=E&&E.anchorNode,W=B?B===L||B.contains(L):!1;if(W)return!1;var F=x_(T,L);if(!F)return!0;if(F?D=T:(D=T==="v"?"h":"v",F=x_(T,L)),!F)return!1;if(!l.current&&"changedTouches"in b&&(g||A)&&(l.current=D),!D)return!0;var I=l.current||D;return aT(I,h,b,I==="h"?g:A)},[]),c=k.useCallback(function(b){var h=b;if(!(!Ks.length||Ks[Ks.length-1]!==y)){var m="deltaY"in h?E_(h):Gl(h),p=n.current.filter(function(D){return D.name===h.type&&(D.target===h.target||h.target===D.shadowParent)&&oT(D.delta,m)})[0];if(p&&p.should){h.cancelable&&h.preventDefault();return}if(!p){var g=(S.current.shards||[]).map(R_).filter(Boolean).filter(function(D){return D.contains(h.target)}),A=g.length>0?o(h,g[0]):!S.current.noIsolation;A&&h.cancelable&&h.preventDefault()}}},[]),u=k.useCallback(function(b,h,m,p){var g={name:b,delta:h,target:m,should:p,shadowParent:hT(m)};n.current.push(g),setTimeout(function(){n.current=n.current.filter(function(A){return A!==g})},1)},[]),C=k.useCallback(function(b){a.current=Gl(b),l.current=void 0},[]),v=k.useCallback(function(b){u(b.type,E_(b),b.target,o(b,r.lockRef.current))},[]),w=k.useCallback(function(b){u(b.type,Gl(b),b.target,o(b,r.lockRef.current))},[]);k.useEffect(function(){return Ks.push(y),r.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:w}),document.addEventListener("wheel",c,Vs),document.addEventListener("touchmove",c,Vs),document.addEventListener("touchstart",C,Vs),function(){Ks=Ks.filter(function(b){return b!==y}),document.removeEventListener("wheel",c,Vs),document.removeEventListener("touchmove",c,Vs),document.removeEventListener("touchstart",C,Vs)}},[]);var x=r.removeScrollBar,R=r.inert;return k.createElement(k.Fragment,null,R?k.createElement(y,{styles:lT(d)}):null,x?k.createElement(JA,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function hT(r){for(var n=null;r!==null;)r instanceof ShadowRoot&&(n=r.host,r=r.host),r=r.parentNode;return n}const fT=UA(v0,uT);var b0=k.forwardRef(function(r,n){return k.createElement(xc,ai({},r,{ref:n,sideCar:fT}))});b0.classNames=xc.classNames;var dT=[" ","Enter","ArrowUp","ArrowDown"],mT=[" ","Enter"],is="Select",[Ec,Rc,pT]=vR(is),[sa]=td(is,[pT,r0]),Ac=r0(),[vT,An]=sa(is),[gT,_T]=sa(is),C0=r=>{const{__scopeSelect:n,children:a,open:l,defaultOpen:d,onOpenChange:y,value:S,defaultValue:o,onValueChange:c,dir:u,name:C,autoComplete:v,disabled:w,required:x,form:R}=r,b=Ac(n),[h,m]=k.useState(null),[p,g]=k.useState(null),[A,D]=k.useState(!1),L=_R(u),[T,E]=b_({prop:l,defaultProp:d??!1,onChange:y,caller:is}),[B,W]=b_({prop:S,defaultProp:o,onChange:c,caller:is}),F=k.useRef(null),I=h?R||!!h.closest("form"):!0,[V,ee]=k.useState(new Set),ne=Array.from(V).map(q=>q.props.value).join(";");return O.jsx(uA,{...b,children:O.jsxs(vT,{required:x,scope:n,trigger:h,onTriggerChange:m,valueNode:p,onValueNodeChange:g,valueNodeHasChildren:A,onValueNodeHasChildrenChange:D,contentId:rd(),value:B,onValueChange:W,open:T,onOpenChange:E,dir:L,triggerPointerDownPosRef:F,disabled:w,children:[O.jsx(Ec.Provider,{scope:n,children:O.jsx(gT,{scope:r.__scopeSelect,onNativeOptionAdd:k.useCallback(q=>{ee(Z=>new Set(Z).add(q))},[]),onNativeOptionRemove:k.useCallback(q=>{ee(Z=>{const K=new Set(Z);return K.delete(q),K})},[]),children:a})}),I?O.jsxs(K0,{"aria-hidden":!0,required:x,tabIndex:-1,name:C,autoComplete:v,value:B,onChange:q=>W(q.target.value),disabled:w,form:R,children:[B===void 0?O.jsx("option",{value:""}):null,Array.from(V)]},ne):null]})})};C0.displayName=is;var w0="SelectTrigger",x0=k.forwardRef((r,n)=>{const{__scopeSelect:a,disabled:l=!1,...d}=r,y=Ac(a),S=An(w0,a),o=S.disabled||l,c=Kt(n,S.onTriggerChange),u=Rc(a),C=k.useRef("touch"),[v,w,x]=$0(b=>{const h=u().filter(g=>!g.disabled),m=h.find(g=>g.value===S.value),p=Y0(h,b,m);p!==void 0&&S.onValueChange(p.value)}),R=b=>{o||(S.onOpenChange(!0),x()),b&&(S.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return O.jsx(hA,{asChild:!0,...y,children:O.jsx(Rt.button,{type:"button",role:"combobox","aria-controls":S.contentId,"aria-expanded":S.open,"aria-required":S.required,"aria-autocomplete":"none",dir:S.dir,"data-state":S.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":G0(S.value)?"":void 0,...d,ref:c,onClick:Mt(d.onClick,b=>{b.currentTarget.focus(),C.current!=="mouse"&&R(b)}),onPointerDown:Mt(d.onPointerDown,b=>{C.current=b.pointerType;const h=b.target;h.hasPointerCapture(b.pointerId)&&h.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(R(b),b.preventDefault())}),onKeyDown:Mt(d.onKeyDown,b=>{const h=v.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&w(b.key),!(h&&b.key===" ")&&dT.includes(b.key)&&(R(),b.preventDefault())})})})});x0.displayName=w0;var E0="SelectValue",R0=k.forwardRef((r,n)=>{const{__scopeSelect:a,className:l,style:d,children:y,placeholder:S="",...o}=r,c=An(E0,a),{onValueNodeHasChildrenChange:u}=c,C=y!==void 0,v=Kt(n,c.onValueNodeChange);return lr(()=>{u(C)},[u,C]),O.jsx(Rt.span,{...o,ref:v,style:{pointerEvents:"none"},children:G0(c.value)?O.jsx(O.Fragment,{children:S}):y})});R0.displayName=E0;var yT="SelectIcon",A0=k.forwardRef((r,n)=>{const{__scopeSelect:a,children:l,...d}=r;return O.jsx(Rt.span,{"aria-hidden":!0,...d,ref:n,children:l||"▼"})});A0.displayName=yT;var ST="SelectPortal",T0=r=>O.jsx(h0,{asChild:!0,...r});T0.displayName=ST;var ns="SelectContent",D0=k.forwardRef((r,n)=>{const a=An(ns,r.__scopeSelect),[l,d]=k.useState();if(lr(()=>{d(new DocumentFragment)},[]),!a.open){const y=l;return y?ea.createPortal(O.jsx(O0,{scope:r.__scopeSelect,children:O.jsx(Ec.Slot,{scope:r.__scopeSelect,children:O.jsx("div",{children:r.children})})}),y):null}return O.jsx(M0,{...r,ref:n})});D0.displayName=ns;var Kr=10,[O0,Tn]=sa(ns),bT="SelectContentImpl",CT=pA("SelectContent.RemoveScroll"),M0=k.forwardRef((r,n)=>{const{__scopeSelect:a,position:l="item-aligned",onCloseAutoFocus:d,onEscapeKeyDown:y,onPointerDownOutside:S,side:o,sideOffset:c,align:u,alignOffset:C,arrowPadding:v,collisionBoundary:w,collisionPadding:x,sticky:R,hideWhenDetached:b,avoidCollisions:h,...m}=r,p=An(ns,a),[g,A]=k.useState(null),[D,L]=k.useState(null),T=Kt(n,X=>A(X)),[E,B]=k.useState(null),[W,F]=k.useState(null),I=Rc(a),[V,ee]=k.useState(!1),ne=k.useRef(!1);k.useEffect(()=>{if(g)return OA(g)},[g]),NR();const q=k.useCallback(X=>{const[P,...he]=I().map(me=>me.ref.current),[ge]=he.slice(-1),oe=document.activeElement;for(const me of X)if(me===oe||(me?.scrollIntoView({block:"nearest"}),me===P&&D&&(D.scrollTop=0),me===ge&&D&&(D.scrollTop=D.scrollHeight),me?.focus(),document.activeElement!==oe))return},[I,D]),Z=k.useCallback(()=>q([E,g]),[q,E,g]);k.useEffect(()=>{V&&Z()},[V,Z]);const{onOpenChange:K,triggerPointerDownPosRef:j}=p;k.useEffect(()=>{if(g){let X={x:0,y:0};const P=ge=>{X={x:Math.abs(Math.round(ge.pageX)-(j.current?.x??0)),y:Math.abs(Math.round(ge.pageY)-(j.current?.y??0))}},he=ge=>{X.x<=10&&X.y<=10?ge.preventDefault():g.contains(ge.target)||K(!1),document.removeEventListener("pointermove",P),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",P),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",P),document.removeEventListener("pointerup",he,{capture:!0})}}},[g,K,j]),k.useEffect(()=>{const X=()=>K(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[K]);const[U,N]=$0(X=>{const P=I().filter(oe=>!oe.disabled),he=P.find(oe=>oe.ref.current===document.activeElement),ge=Y0(P,X,he);ge&&setTimeout(()=>ge.ref.current.focus())}),z=k.useCallback((X,P,he)=>{const ge=!ne.current&&!he;(p.value!==void 0&&p.value===P||ge)&&(B(X),ge&&(ne.current=!0))},[p.value]),Q=k.useCallback(()=>g?.focus(),[g]),ie=k.useCallback((X,P,he)=>{const ge=!ne.current&&!he;(p.value!==void 0&&p.value===P||ge)&&F(X)},[p.value]),de=l==="popper"?Ef:L0,G=de===Ef?{side:o,sideOffset:c,align:u,alignOffset:C,arrowPadding:v,collisionBoundary:w,collisionPadding:x,sticky:R,hideWhenDetached:b,avoidCollisions:h}:{};return O.jsx(O0,{scope:a,content:g,viewport:D,onViewportChange:L,itemRefCallback:z,selectedItem:E,onItemLeave:Q,itemTextRefCallback:ie,focusSelectedItem:Z,selectedItemText:W,position:l,isPositioned:V,searchRef:U,children:O.jsx(b0,{as:CT,allowPinchZoom:!0,children:O.jsx(Iy,{asChild:!0,trapped:p.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:Mt(d,X=>{p.trigger?.focus({preventScroll:!0}),X.preventDefault()}),children:O.jsx(Py,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:y,onPointerDownOutside:S,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:O.jsx(de,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:X=>X.preventDefault(),...m,...G,onPlaced:()=>ee(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:Mt(m.onKeyDown,X=>{const P=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!P&&X.key.length===1&&N(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let ge=I().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(X.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const oe=X.target,me=ge.indexOf(oe);ge=ge.slice(me+1)}setTimeout(()=>q(ge)),X.preventDefault()}})})})})})})});M0.displayName=bT;var wT="SelectItemAlignedPosition",L0=k.forwardRef((r,n)=>{const{__scopeSelect:a,onPlaced:l,...d}=r,y=An(ns,a),S=Tn(ns,a),[o,c]=k.useState(null),[u,C]=k.useState(null),v=Kt(n,T=>C(T)),w=Rc(a),x=k.useRef(!1),R=k.useRef(!0),{viewport:b,selectedItem:h,selectedItemText:m,focusSelectedItem:p}=S,g=k.useCallback(()=>{if(y.trigger&&y.valueNode&&o&&u&&b&&h&&m){const T=y.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),B=y.valueNode.getBoundingClientRect(),W=m.getBoundingClientRect();if(y.dir!=="rtl"){const oe=W.left-E.left,me=B.left-oe,Ce=T.left-me,ze=T.width+Ce,ct=Math.max(ze,E.width),tt=window.innerWidth-Kr,ke=t_(me,[Kr,Math.max(Kr,tt-ct)]);o.style.minWidth=ze+"px",o.style.left=ke+"px"}else{const oe=E.right-W.right,me=window.innerWidth-B.right-oe,Ce=window.innerWidth-T.right-me,ze=T.width+Ce,ct=Math.max(ze,E.width),tt=window.innerWidth-Kr,ke=t_(me,[Kr,Math.max(Kr,tt-ct)]);o.style.minWidth=ze+"px",o.style.right=ke+"px"}const F=w(),I=window.innerHeight-Kr*2,V=b.scrollHeight,ee=window.getComputedStyle(u),ne=parseInt(ee.borderTopWidth,10),q=parseInt(ee.paddingTop,10),Z=parseInt(ee.borderBottomWidth,10),K=parseInt(ee.paddingBottom,10),j=ne+q+V+K+Z,U=Math.min(h.offsetHeight*5,j),N=window.getComputedStyle(b),z=parseInt(N.paddingTop,10),Q=parseInt(N.paddingBottom,10),ie=T.top+T.height/2-Kr,de=I-ie,G=h.offsetHeight/2,X=h.offsetTop+G,P=ne+q+X,he=j-P;if(P<=ie){const oe=F.length>0&&h===F[F.length-1].ref.current;o.style.bottom="0px";const me=u.clientHeight-b.offsetTop-b.offsetHeight,Ce=Math.max(de,G+(oe?Q:0)+me+Z),ze=P+Ce;o.style.height=ze+"px"}else{const oe=F.length>0&&h===F[0].ref.current;o.style.top="0px";const Ce=Math.max(ie,ne+b.offsetTop+(oe?z:0)+G)+he;o.style.height=Ce+"px",b.scrollTop=P-ie+b.offsetTop}o.style.margin=`${Kr}px 0`,o.style.minHeight=U+"px",o.style.maxHeight=I+"px",l?.(),requestAnimationFrame(()=>x.current=!0)}},[w,y.trigger,y.valueNode,o,u,b,h,m,y.dir,l]);lr(()=>g(),[g]);const[A,D]=k.useState();lr(()=>{u&&D(window.getComputedStyle(u).zIndex)},[u]);const L=k.useCallback(T=>{T&&R.current===!0&&(g(),p?.(),R.current=!1)},[g,p]);return O.jsx(ET,{scope:a,contentWrapper:o,shouldExpandOnScrollRef:x,onScrollButtonChange:L,children:O.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:O.jsx(Rt.div,{...d,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...d.style}})})})});L0.displayName=wT;var xT="SelectPopperPosition",Ef=k.forwardRef((r,n)=>{const{__scopeSelect:a,align:l="start",collisionPadding:d=Kr,...y}=r,S=Ac(a);return O.jsx(fA,{...S,...y,ref:n,align:l,collisionPadding:d,style:{boxSizing:"border-box",...y.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ef.displayName=xT;var[ET,hd]=sa(ns,{}),Rf="SelectViewport",k0=k.forwardRef((r,n)=>{const{__scopeSelect:a,nonce:l,...d}=r,y=Tn(Rf,a),S=hd(Rf,a),o=Kt(n,y.onViewportChange),c=k.useRef(0);return O.jsxs(O.Fragment,{children:[O.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),O.jsx(Ec.Slot,{scope:a,children:O.jsx(Rt.div,{"data-radix-select-viewport":"",role:"presentation",...d,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...d.style},onScroll:Mt(d.onScroll,u=>{const C=u.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:w}=S;if(w?.current&&v){const x=Math.abs(c.current-C.scrollTop);if(x>0){const R=window.innerHeight-Kr*2,b=parseFloat(v.style.minHeight),h=parseFloat(v.style.height),m=Math.max(b,h);if(m<R){const p=m+x,g=Math.min(R,p),A=p-g;v.style.height=g+"px",v.style.bottom==="0px"&&(C.scrollTop=A>0?A:0,v.style.justifyContent="flex-end")}}}c.current=C.scrollTop})})})]})});k0.displayName=Rf;var B0="SelectGroup",[RT,AT]=sa(B0),TT=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r,d=rd();return O.jsx(RT,{scope:a,id:d,children:O.jsx(Rt.div,{role:"group","aria-labelledby":d,...l,ref:n})})});TT.displayName=B0;var N0="SelectLabel",j0=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r,d=AT(N0,a);return O.jsx(Rt.div,{id:d.id,...l,ref:n})});j0.displayName=N0;var hc="SelectItem",[DT,H0]=sa(hc),z0=k.forwardRef((r,n)=>{const{__scopeSelect:a,value:l,disabled:d=!1,textValue:y,...S}=r,o=An(hc,a),c=Tn(hc,a),u=o.value===l,[C,v]=k.useState(y??""),[w,x]=k.useState(!1),R=Kt(n,p=>c.itemRefCallback?.(p,l,d)),b=rd(),h=k.useRef("touch"),m=()=>{d||(o.onValueChange(l),o.onOpenChange(!1))};if(l==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return O.jsx(DT,{scope:a,value:l,disabled:d,textId:b,isSelected:u,onItemTextChange:k.useCallback(p=>{v(g=>g||(p?.textContent??"").trim())},[]),children:O.jsx(Ec.ItemSlot,{scope:a,value:l,disabled:d,textValue:C,children:O.jsx(Rt.div,{role:"option","aria-labelledby":b,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":d||void 0,"data-disabled":d?"":void 0,tabIndex:d?void 0:-1,...S,ref:R,onFocus:Mt(S.onFocus,()=>x(!0)),onBlur:Mt(S.onBlur,()=>x(!1)),onClick:Mt(S.onClick,()=>{h.current!=="mouse"&&m()}),onPointerUp:Mt(S.onPointerUp,()=>{h.current==="mouse"&&m()}),onPointerDown:Mt(S.onPointerDown,p=>{h.current=p.pointerType}),onPointerMove:Mt(S.onPointerMove,p=>{h.current=p.pointerType,d?c.onItemLeave?.():h.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Mt(S.onPointerLeave,p=>{p.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Mt(S.onKeyDown,p=>{c.searchRef?.current!==""&&p.key===" "||(mT.includes(p.key)&&m(),p.key===" "&&p.preventDefault())})})})})});z0.displayName=hc;var io="SelectItemText",P0=k.forwardRef((r,n)=>{const{__scopeSelect:a,className:l,style:d,...y}=r,S=An(io,a),o=Tn(io,a),c=H0(io,a),u=_T(io,a),[C,v]=k.useState(null),w=Kt(n,m=>v(m),c.onItemTextChange,m=>o.itemTextRefCallback?.(m,c.value,c.disabled)),x=C?.textContent,R=k.useMemo(()=>O.jsx("option",{value:c.value,disabled:c.disabled,children:x},c.value),[c.disabled,c.value,x]),{onNativeOptionAdd:b,onNativeOptionRemove:h}=u;return lr(()=>(b(R),()=>h(R)),[b,h,R]),O.jsxs(O.Fragment,{children:[O.jsx(Rt.span,{id:c.textId,...y,ref:w}),c.isSelected&&S.valueNode&&!S.valueNodeHasChildren?ea.createPortal(y.children,S.valueNode):null]})});P0.displayName=io;var U0="SelectItemIndicator",I0=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r;return H0(U0,a).isSelected?O.jsx(Rt.span,{"aria-hidden":!0,...l,ref:n}):null});I0.displayName=U0;var Af="SelectScrollUpButton",F0=k.forwardRef((r,n)=>{const a=Tn(Af,r.__scopeSelect),l=hd(Af,r.__scopeSelect),[d,y]=k.useState(!1),S=Kt(n,l.onScrollButtonChange);return lr(()=>{if(a.viewport&&a.isPositioned){let o=function(){const u=c.scrollTop>0;y(u)};const c=a.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[a.viewport,a.isPositioned]),d?O.jsx(W0,{...r,ref:S,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=a;o&&c&&(o.scrollTop=o.scrollTop-c.offsetHeight)}}):null});F0.displayName=Af;var Tf="SelectScrollDownButton",q0=k.forwardRef((r,n)=>{const a=Tn(Tf,r.__scopeSelect),l=hd(Tf,r.__scopeSelect),[d,y]=k.useState(!1),S=Kt(n,l.onScrollButtonChange);return lr(()=>{if(a.viewport&&a.isPositioned){let o=function(){const u=c.scrollHeight-c.clientHeight,C=Math.ceil(c.scrollTop)<u;y(C)};const c=a.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[a.viewport,a.isPositioned]),d?O.jsx(W0,{...r,ref:S,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=a;o&&c&&(o.scrollTop=o.scrollTop+c.offsetHeight)}}):null});q0.displayName=Tf;var W0=k.forwardRef((r,n)=>{const{__scopeSelect:a,onAutoScroll:l,...d}=r,y=Tn("SelectScrollButton",a),S=k.useRef(null),o=Rc(a),c=k.useCallback(()=>{S.current!==null&&(window.clearInterval(S.current),S.current=null)},[]);return k.useEffect(()=>()=>c(),[c]),lr(()=>{o().find(C=>C.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[o]),O.jsx(Rt.div,{"aria-hidden":!0,...d,ref:n,style:{flexShrink:0,...d.style},onPointerDown:Mt(d.onPointerDown,()=>{S.current===null&&(S.current=window.setInterval(l,50))}),onPointerMove:Mt(d.onPointerMove,()=>{y.onItemLeave?.(),S.current===null&&(S.current=window.setInterval(l,50))}),onPointerLeave:Mt(d.onPointerLeave,()=>{c()})})}),OT="SelectSeparator",V0=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r;return O.jsx(Rt.div,{"aria-hidden":!0,...l,ref:n})});V0.displayName=OT;var Df="SelectArrow",MT=k.forwardRef((r,n)=>{const{__scopeSelect:a,...l}=r,d=Ac(a),y=An(Df,a),S=Tn(Df,a);return y.open&&S.position==="popper"?O.jsx(dA,{...d,...l,ref:n}):null});MT.displayName=Df;var LT="SelectBubbleInput",K0=k.forwardRef(({__scopeSelect:r,value:n,...a},l)=>{const d=k.useRef(null),y=Kt(l,d),S=xA(n);return k.useEffect(()=>{const o=d.current;if(!o)return;const c=window.HTMLSelectElement.prototype,C=Object.getOwnPropertyDescriptor(c,"value").set;if(S!==n&&C){const v=new Event("change",{bubbles:!0});C.call(o,n),o.dispatchEvent(v)}},[S,n]),O.jsx(Rt.select,{...a,style:{...f0,...a.style},ref:y,defaultValue:n})});K0.displayName=LT;function G0(r){return r===""||r===void 0}function $0(r){const n=ts(r),a=k.useRef(""),l=k.useRef(0),d=k.useCallback(S=>{const o=a.current+S;n(o),(function c(u){a.current=u,window.clearTimeout(l.current),u!==""&&(l.current=window.setTimeout(()=>c(""),1e3))})(o)},[n]),y=k.useCallback(()=>{a.current="",window.clearTimeout(l.current)},[]);return k.useEffect(()=>()=>window.clearTimeout(l.current),[]),[a,d,y]}function Y0(r,n,a){const d=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,y=a?r.indexOf(a):-1;let S=kT(r,Math.max(y,0));d.length===1&&(S=S.filter(u=>u!==a));const c=S.find(u=>u.textValue.toLowerCase().startsWith(d.toLowerCase()));return c!==a?c:void 0}function kT(r,n){return r.map((a,l)=>r[(n+l)%r.length])}var BT=C0,X0=x0,NT=R0,jT=A0,HT=T0,Q0=D0,zT=k0,Z0=j0,J0=z0,PT=P0,UT=I0,eS=F0,tS=q0,rS=V0;const A_=BT,T_=NT,Of=k.forwardRef(({className:r,children:n,...a},l)=>O.jsxs(X0,{ref:l,className:Ue("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...a,children:[n,O.jsx(jT,{asChild:!0,children:O.jsx(Ny,{className:"h-4 w-4 opacity-50"})})]}));Of.displayName=X0.displayName;const iS=k.forwardRef(({className:r,...n},a)=>O.jsx(eS,{ref:a,className:Ue("flex cursor-default items-center justify-center py-1",r),...n,children:O.jsx(NE,{className:"h-4 w-4"})}));iS.displayName=eS.displayName;const nS=k.forwardRef(({className:r,...n},a)=>O.jsx(tS,{ref:a,className:Ue("flex cursor-default items-center justify-center py-1",r),...n,children:O.jsx(Ny,{className:"h-4 w-4"})}));nS.displayName=tS.displayName;const Mf=k.forwardRef(({className:r,children:n,position:a="popper",...l},d)=>O.jsx(HT,{children:O.jsxs(Q0,{ref:d,className:Ue("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:a,...l,children:[O.jsx(iS,{}),O.jsx(zT,{className:Ue("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),O.jsx(nS,{})]})}));Mf.displayName=Q0.displayName;const IT=k.forwardRef(({className:r,...n},a)=>O.jsx(Z0,{ref:a,className:Ue("px-2 py-1.5 text-sm font-semibold",r),...n}));IT.displayName=Z0.displayName;const no=k.forwardRef(({className:r,children:n,...a},l)=>O.jsxs(J0,{ref:l,className:Ue("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...a,children:[O.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(UT,{children:O.jsx(LE,{className:"h-4 w-4"})})}),O.jsx(PT,{children:n})]}));no.displayName=J0.displayName;const FT=k.forwardRef(({className:r,...n},a)=>O.jsx(rS,{ref:a,className:Ue("-mx-1 my-1 h-px bg-muted",r),...n}));FT.displayName=rS.displayName;const qT={"claude-code":{command:"claude",defaultArgs:[],modeArgs:{normal:[],continue:["-c"],resume:["-r"]},permissionSkipArgs:["--dangerously-skip-permissions"]},"codex-cli":{command:"codex",defaultArgs:["--auto-approve","--verbose"],modeArgs:{normal:[],continue:["resume","--last"],resume:["resume"]}}};function WT({branch:r,availableTools:n,selectedToolId:a,selectedMode:l,skipPermissions:d,extraArgsText:y,isConfigLoading:S,configError:o,isStartingSession:c,isSyncingBranch:u,needsRemoteSync:C,hasBlockingDivergence:v,onToolChange:w,onModeChange:x,onSkipPermissionsChange:R,onExtraArgsChange:b,onStartSession:h,onSyncBranch:m}){const p=!!r.worktreePath,g=n.find(L=>L.id===a),A=k.useMemo(()=>g?g.target==="custom"?{command:g.definition.command,defaultArgs:g.definition.defaultArgs??null,modeArgs:g.definition.modeArgs,permissionSkipArgs:g.definition.permissionSkipArgs??null}:qT[g.id]??null:null,[g]),D=k.useMemo(()=>{if(!A)return null;const L=[];A.defaultArgs?.length&&L.push(...A.defaultArgs);const T=A.modeArgs?.[l];T?.length&&L.push(...T),d&&A.permissionSkipArgs?.length&&L.push(...A.permissionSkipArgs);const E=y.split(/\s+/).map(B=>B.trim()).filter(Boolean);return E.length&&L.push(...E),{command:A.command,args:L}},[A,l,d,y]);return O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-3",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tool Launcher"}),O.jsx("h3",{className:"mt-1 text-lg font-semibold",children:"AIツール起動"})]}),o&&O.jsx(Ct,{variant:"warning",children:"設定の取得に失敗"})]}),O.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Web UI から直接AIツールを起動できます。設定したカスタムツールも一覧に表示されます。"})]}),O.jsx(Vt,{className:"space-y-4",children:p?O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[O.jsxs("div",{className:"space-y-2",children:[O.jsx("label",{className:"text-sm font-medium",children:"AIツール"}),O.jsxs(A_,{value:a,onValueChange:w,disabled:S??!1,children:[O.jsx(Of,{children:O.jsx(T_,{placeholder:"ツールを選択"})}),O.jsx(Mf,{children:n.map(L=>O.jsx(no,{value:L.id,children:L.label},L.id))})]})]}),O.jsxs("div",{className:"space-y-2",children:[O.jsx("label",{className:"text-sm font-medium",children:"起動モード"}),O.jsxs(A_,{value:l,onValueChange:L=>x(L),children:[O.jsx(Of,{children:O.jsx(T_,{})}),O.jsxs(Mf,{children:[O.jsx(no,{value:"normal",children:"Normal"}),O.jsx(no,{value:"continue",children:"Continue"}),O.jsx(no,{value:"resume",children:"Resume"})]})]})]}),O.jsxs("div",{className:"space-y-2 sm:col-span-2 lg:col-span-1",children:[O.jsx("label",{className:"text-sm font-medium",children:"追加引数"}),O.jsx(co,{type:"text",value:y,onChange:L=>b(L.target.value),placeholder:"--flag value"})]})]}),O.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[O.jsx("input",{type:"checkbox",checked:d,onChange:L=>R(L.target.checked),className:"h-4 w-4 rounded border-border"}),O.jsx("span",{children:"権限チェックをスキップ (自己責任)"})]}),d&&O.jsx(Ui,{variant:"warning",children:O.jsx(Ii,{children:"権限チェックをスキップすることで、CLI での `--dangerously-skip-permissions` 指定と同様のリスクを負います。"})}),C&&O.jsx(Ui,{variant:"info","data-testid":"sync-required",children:O.jsxs(Ii,{children:[O.jsxs("p",{children:["リモートに未取得の更新 (",r.divergence?.behind??0," ","commits) があるため、AIツールを起動する前に同期してください。"]}),O.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"CLI の `git fetch --all` と `git pull --ff-only` と同じ処理を Web UI から実行できます。"})]})}),v&&O.jsx(Ui,{variant:"warning","data-testid":"divergence-warning",children:O.jsxs(Ii,{children:[O.jsx("p",{children:"リモートとローカルの両方に未解決の差分があるため、起動をブロックしています。"}),O.jsxs("ul",{className:"mt-2 list-inside list-disc text-xs text-muted-foreground",children:[O.jsxs("li",{children:["git fetch && git pull --ff-only origin ",r.name]}),O.jsxs("li",{children:["git push origin ",r.name," でローカル進捗を共有"]})]})]})}),O.jsxs("div",{className:"flex flex-wrap gap-2 pt-2",children:[O.jsx(Pt,{onClick:h,disabled:c||!g||v||C||u,children:c?"起動中...":"セッションを起動"}),O.jsx(Pt,{variant:"secondary",onClick:m,disabled:!r.worktreePath||u,children:u?"同期中...":"最新の変更を同期"}),O.jsx(Pt,{variant:"ghost",asChild:!0,children:O.jsx(jr,{to:"/config",children:"設定を編集"})})]}),A&&O.jsxs("div",{className:"space-y-2 rounded-lg border bg-muted/30 p-4",children:[O.jsxs("div",{className:"grid gap-2 text-sm sm:grid-cols-2",children:[O.jsxs("div",{children:[O.jsx("span",{className:"text-muted-foreground",children:"コマンド:"})," ",O.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:A.command})]}),O.jsxs("div",{children:[O.jsx("span",{className:"text-muted-foreground",children:"defaultArgs:"})," ",O.jsx("span",{className:Ue(!A.defaultArgs?.length&&"text-muted-foreground/50"),children:A.defaultArgs?.join(" ")||"未設定"})]})]}),D&&O.jsxs("div",{className:"border-t pt-2",children:[O.jsx("span",{className:"text-xs text-muted-foreground",children:"最終コマンド:"}),O.jsxs("pre",{className:"mt-1 overflow-x-auto rounded bg-background p-2 font-mono text-sm",children:[D.command," ",D.args.join(" ")]})]})]})]}):O.jsx("p",{className:"py-4 text-center text-sm text-muted-foreground",children:"Worktreeが未作成のため、先にWorktreeを作成してください。"})})]})}function VT(r,n){return r==="claude-code"?"Claude":r==="codex-cli"?"Codex":r==="gemini-cli"?"Gemini":n||"Custom"}function KT(r){const n=r.mode==="normal"?"New":r.mode==="continue"?"Continue":r.mode==="resume"?"Resume":null;return[VT(r.toolId,r.toolLabel),n,r.model].filter(Boolean).join(" | ")}function GT(r){try{return new Intl.DateTimeFormat("ja-JP",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(r))}catch{return"--"}}function $T({branch:r,formattedCommitDate:n,latestToolUsage:a}){return O.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Branch Insights"}),O.jsx("h3",{className:"text-lg font-semibold",children:"ブランチインサイト"})]}),O.jsx(Vt,{children:O.jsxs("dl",{className:"grid gap-3 text-sm",children:[O.jsxs("div",{className:"flex justify-between border-b border-border/50 pb-2",children:[O.jsx("dt",{className:"text-muted-foreground",children:"コミット"}),O.jsx("dd",{className:"font-mono text-xs",children:r.commitHash})]}),O.jsxs("div",{className:"flex justify-between border-b border-border/50 pb-2",children:[O.jsx("dt",{className:"text-muted-foreground",children:"Author"}),O.jsx("dd",{children:r.author??"N/A"})]}),O.jsxs("div",{className:"flex justify-between border-b border-border/50 pb-2",children:[O.jsx("dt",{className:"text-muted-foreground",children:"更新日"}),O.jsx("dd",{children:n})]}),O.jsxs("div",{className:"flex justify-between",children:[O.jsx("dt",{className:"text-muted-foreground",children:"Worktree"}),O.jsx("dd",{className:"max-w-[200px] truncate text-right",title:r.worktreePath??void 0,children:r.worktreePath??"未作成"})]})]})})]}),O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Latest Commit"}),O.jsx("h3",{className:"text-lg font-semibold",children:"コミット情報"})]}),O.jsx(Vt,{children:O.jsx("p",{className:"text-sm text-muted-foreground",children:r.commitMessage??"コミットメッセージがありません。"})})]}),r.divergence&&O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Divergence"}),O.jsx("h3",{className:"text-lg font-semibold",children:"差分状況"})]}),O.jsx(Vt,{children:O.jsxs("div",{className:"flex flex-wrap gap-2",children:[O.jsxs(Ct,{variant:"outline",children:["↑ Ahead ",r.divergence.ahead]}),O.jsxs(Ct,{variant:"outline",children:["↓ Behind ",r.divergence.behind]}),O.jsx(Ct,{variant:r.divergence.upToDate?"success":"warning",children:r.divergence.upToDate?"最新":"更新あり"})]})})]}),O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Worktree"}),O.jsx("h3",{className:"text-lg font-semibold",children:"Worktree情報"})]}),O.jsxs(Vt,{className:"space-y-2 text-sm text-muted-foreground",children:[O.jsxs("p",{children:["パス:"," ",O.jsx("strong",{className:"text-foreground",children:r.worktreePath??"未作成"})]}),O.jsxs("ul",{className:"list-inside list-disc space-y-1 text-xs",children:[O.jsx("li",{children:"AIツールの起動にはクリーンなワークツリーであることを推奨"}),O.jsx("li",{children:"Worktree再作成で既存のローカル変更が失われる可能性あり"})]})]})]}),a&&O.jsxs(zt,{className:"lg:col-span-2",children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Last Activity"}),O.jsx("h3",{className:"text-lg font-semibold",children:"最終ツール使用"})]}),O.jsx(Vt,{children:O.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[O.jsx(Ct,{variant:"outline",children:KT(a)}),O.jsx("span",{className:"text-muted-foreground",children:GT(a.timestamp)}),a.worktreePath&&O.jsxs("span",{className:"text-xs text-muted-foreground",children:["@ ",a.worktreePath]})]})})]})]})}var of={exports:{}},D_;function YT(){return D_||(D_=1,(function(r,n){(function(a,l){r.exports=l()})(globalThis,(()=>(()=>{var a={4567:function(S,o,c){var u=this&&this.__decorate||function(m,p,g,A){var D,L=arguments.length,T=L<3?p:A===null?A=Object.getOwnPropertyDescriptor(p,g):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,p,g,A);else for(var E=m.length-1;E>=0;E--)(D=m[E])&&(T=(L<3?D(T):L>3?D(p,g,T):D(p,g))||T);return L>3&&T&&Object.defineProperty(p,g,T),T},C=this&&this.__param||function(m,p){return function(g,A){p(g,A,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const v=c(9042),w=c(9924),x=c(844),R=c(4725),b=c(2585);let h=o.AccessibilityManager=class extends x.Disposable{constructor(m,p,g,A){super(),this._terminal=m,this._coreBrowserService=g,this._renderService=A,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let D=0;D<this._terminal.rows;D++)this._rowElements[D]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[D]);if(this._topBoundaryFocusListener=D=>this._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new w.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
53
53
|
`)))),this.register(this._terminal.onA11yTab((D=>this._handleTab(D)))),this.register(this._terminal.onKey((D=>this._handleKey(D.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,x.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(m){for(let p=0;p<m;p++)this._handleChar(" ")}_handleChar(m){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==m&&(this._charsToAnnounce+=m):this._charsToAnnounce+=m,m===`
|
|
54
54
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=v.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(m){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(m)||this._charsToConsume.push(m)}_refreshRows(m,p){this._liveRegionDebouncer.refresh(m,p,this._terminal.rows)}_renderRows(m,p){const g=this._terminal.buffer,A=g.lines.length.toString();for(let D=m;D<=p;D++){const L=g.translateBufferLineToString(g.ydisp+D,!0),T=(g.ydisp+D+1).toString(),E=this._rowElements[D];E&&(L.length===0?E.innerText=" ":E.textContent=L,E.setAttribute("aria-posinset",T),E.setAttribute("aria-setsize",A))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(m,p){const g=m.target,A=this._rowElements[p===0?1:this._rowElements.length-2];if(g.getAttribute("aria-posinset")===(p===0?"1":`${this._terminal.buffer.lines.length}`)||m.relatedTarget!==A)return;let D,L;if(p===0?(D=g,L=this._rowElements.pop(),this._rowContainer.removeChild(L)):(D=this._rowElements.shift(),L=g,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),L.removeEventListener("focus",this._bottomBoundaryFocusListener),p===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(p===0?-1:1),this._rowElements[p===0?1:this._rowElements.length-2].focus(),m.preventDefault(),m.stopImmediatePropagation()}_handleResize(m){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let p=this._rowContainer.children.length;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);for(;this._rowElements.length>m;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const m=this._coreBrowserService.mainDocument.createElement("div");return m.setAttribute("role","listitem"),m.tabIndex=-1,this._refreshRowDimensions(m),m}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let m=0;m<this._terminal.rows;m++)this._refreshRowDimensions(this._rowElements[m])}}_refreshRowDimensions(m){m.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=h=u([C(1,b.IInstantiationService),C(2,R.ICoreBrowserService),C(3,R.IRenderService)],h)},3614:(S,o)=>{function c(w){return w.replace(/\r?\n/g,"\r")}function u(w,x){return x?"\x1B[200~"+w+"\x1B[201~":w}function C(w,x,R,b){w=u(w=c(w),R.decPrivateModes.bracketedPasteMode&&b.rawOptions.ignoreBracketedPasteMode!==!0),R.triggerDataEvent(w,!0),x.value=""}function v(w,x,R){const b=R.getBoundingClientRect(),h=w.clientX-b.left-10,m=w.clientY-b.top-10;x.style.width="20px",x.style.height="20px",x.style.left=`${h}px`,x.style.top=`${m}px`,x.style.zIndex="1000",x.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=c,o.bracketTextForPaste=u,o.copyHandler=function(w,x){w.clipboardData&&w.clipboardData.setData("text/plain",x.selectionText),w.preventDefault()},o.handlePasteEvent=function(w,x,R,b){w.stopPropagation(),w.clipboardData&&C(w.clipboardData.getData("text/plain"),x,R,b)},o.paste=C,o.moveTextAreaUnderMouseCursor=v,o.rightClickHandler=function(w,x,R,b,h){v(w,x,R),h&&b.rightClickSelect(w),x.value=b.selectionText,x.select()}},7239:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const u=c(1505);o.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(C,v,w){this._css.set(C,v,w)}getCss(C,v){return this._css.get(C,v)}setColor(C,v,w){this._color.set(C,v,w)}getColor(C,v){return this._color.get(C,v)}clear(){this._color.clear(),this._css.clear()}}},3656:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,u,C,v){c.addEventListener(u,C,v);let w=!1;return{dispose:()=>{w||(w=!0,c.removeEventListener(u,C,v))}}}},6465:function(S,o,c){var u=this&&this.__decorate||function(h,m,p,g){var A,D=arguments.length,L=D<3?m:g===null?g=Object.getOwnPropertyDescriptor(m,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(h,m,p,g);else for(var T=h.length-1;T>=0;T--)(A=h[T])&&(L=(D<3?A(L):D>3?A(m,p,L):A(m,p))||L);return D>3&&L&&Object.defineProperty(m,p,L),L},C=this&&this.__param||function(h,m){return function(p,g){m(p,g,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier2=void 0;const v=c(3656),w=c(8460),x=c(844),R=c(2585);let b=o.Linkifier2=class extends x.Disposable{get currentLink(){return this._currentLink}constructor(h){super(),this._bufferService=h,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new w.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new w.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,x.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,x.toDisposable)((()=>{this._lastMouseEvent=void 0}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0})))}registerLinkProvider(h){return this._linkProviders.push(h),{dispose:()=>{const m=this._linkProviders.indexOf(h);m!==-1&&this._linkProviders.splice(m,1)}}}attachToDom(h,m,p){this._element=h,this._mouseService=m,this._renderService=p,this.register((0,v.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,v.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,v.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,v.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){if(this._lastMouseEvent=h,!this._element||!this._mouseService)return;const m=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!m)return;this._isMouseOut=!1;const p=h.composedPath();for(let g=0;g<p.length;g++){const A=p[g];if(A.classList.contains("xterm"))break;if(A.classList.contains("xterm-hover"))return}this._lastBufferCell&&m.x===this._lastBufferCell.x&&m.y===this._lastBufferCell.y||(this._handleHover(m),this._lastBufferCell=m)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,m){this._activeProviderReplies&&m||(this._activeProviderReplies?.forEach((g=>{g?.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let p=!1;for(const[g,A]of this._linkProviders.entries())m?this._activeProviderReplies?.get(g)&&(p=this._checkLinkProviderResult(g,h,p)):A.provideLinks(h.y,(D=>{if(this._isMouseOut)return;const L=D?.map((T=>({link:T})));this._activeProviderReplies?.set(g,L),p=this._checkLinkProviderResult(g,h,p),this._activeProviderReplies?.size===this._linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,m){const p=new Set;for(let g=0;g<m.size;g++){const A=m.get(g);if(A)for(let D=0;D<A.length;D++){const L=A[D],T=L.link.range.start.y<h?0:L.link.range.start.x,E=L.link.range.end.y>h?this._bufferService.cols:L.link.range.end.x;for(let B=T;B<=E;B++){if(p.has(B)){A.splice(D--,1);break}p.add(B)}}}}_checkLinkProviderResult(h,m,p){if(!this._activeProviderReplies)return p;const g=this._activeProviderReplies.get(h);let A=!1;for(let D=0;D<h;D++)this._activeProviderReplies.has(D)&&!this._activeProviderReplies.get(D)||(A=!0);if(!A&&g){const D=g.find((L=>this._linkAtPosition(L.link,m)));D&&(p=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviders.length&&!p)for(let D=0;D<this._activeProviderReplies.size;D++){const L=this._activeProviderReplies.get(D)?.find((T=>this._linkAtPosition(T.link,m)));if(L){p=!0,this._handleNewLink(L);break}}return p}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._element||!this._mouseService||!this._currentLink)return;const m=this._positionFromMouseEvent(h,this._element,this._mouseService);m&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,m)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,m){this._element&&this._currentLink&&this._lastMouseEvent&&(!h||!m||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=m)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,x.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const m=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);m&&this._linkAtPosition(h.link,m)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:p=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==p&&(this._currentLink.state.decorations.pointerCursor=p,this._currentLink.state.isHovered&&this._element?.classList.toggle("xterm-cursor-pointer",p))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:p=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==p&&(this._currentLink.state.decorations.underline=p,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,p))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((p=>{if(!this._currentLink)return;const g=p.start===0?0:p.start+1+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.ydisp+1+p.end;if(this._currentLink.link.range.start.y>=g&&this._currentLink.link.range.end.y<=A&&(this._clearCurrentLink(g,A),this._lastMouseEvent&&this._element)){const D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}}))))}_linkHover(h,m,p){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(m,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),m.hover&&m.hover(p,m.text)}_fireUnderlineEvent(h,m){const p=h.range,g=this._bufferService.buffer.ydisp,A=this._createLinkUnderlineEvent(p.start.x-1,p.start.y-g-1,p.end.x,p.end.y-g-1,void 0);(m?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(A)}_linkLeave(h,m,p){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(m,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),m.leave&&m.leave(p,m.text)}_linkAtPosition(h,m){const p=h.range.start.y*this._bufferService.cols+h.range.start.x,g=h.range.end.y*this._bufferService.cols+h.range.end.x,A=m.y*this._bufferService.cols+m.x;return p<=A&&A<=g}_positionFromMouseEvent(h,m,p){const g=p.getCoords(h,m,this._bufferService.cols,this._bufferService.rows);if(g)return{x:g[0],y:g[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,m,p,g,A){return{x1:h,y1:m,x2:p,y2:g,cols:this._bufferService.cols,fg:A}}};o.Linkifier2=b=u([C(0,R.IBufferService)],b)},9042:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(S,o,c){var u=this&&this.__decorate||function(b,h,m,p){var g,A=arguments.length,D=A<3?h:p===null?p=Object.getOwnPropertyDescriptor(h,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,h,m,p);else for(var L=b.length-1;L>=0;L--)(g=b[L])&&(D=(A<3?g(D):A>3?g(h,m,D):g(h,m))||D);return A>3&&D&&Object.defineProperty(h,m,D),D},C=this&&this.__param||function(b,h){return function(m,p){h(m,p,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const v=c(511),w=c(2585);let x=o.OscLinkProvider=class{constructor(b,h,m){this._bufferService=b,this._optionsService=h,this._oscLinkService=m}provideLinks(b,h){const m=this._bufferService.buffer.lines.get(b-1);if(!m)return void h(void 0);const p=[],g=this._optionsService.rawOptions.linkHandler,A=new v.CellData,D=m.getTrimmedLength();let L=-1,T=-1,E=!1;for(let B=0;B<D;B++)if(T!==-1||m.hasContent(B)){if(m.loadCell(B,A),A.hasExtendedAttrs()&&A.extended.urlId){if(T===-1){T=B,L=A.extended.urlId;continue}E=A.extended.urlId!==L}else T!==-1&&(E=!0);if(E||T!==-1&&B===D-1){const W=this._oscLinkService.getLinkData(L)?.uri;if(W){const F={start:{x:T+1,y:b},end:{x:B+(E||B!==D-1?0:1),y:b}};let I=!1;if(!g?.allowNonHttpProtocols)try{const V=new URL(W);["http:","https:"].includes(V.protocol)||(I=!0)}catch{I=!0}I||p.push({text:W,range:F,activate:(V,ee)=>g?g.activate(V,ee,F):R(0,ee),hover:(V,ee)=>g?.hover?.(V,ee,F),leave:(V,ee)=>g?.leave?.(V,ee,F)})}E=!1,A.hasExtendedAttrs()&&A.extended.urlId?(T=B,L=A.extended.urlId):(T=-1,L=-1)}}h(p)}};function R(b,h){if(confirm(`Do you want to navigate to ${h}?
|
|
55
55
|
|
|
56
|
-
WARNING: This link could potentially be dangerous`)){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=x=u([C(0,w.IBufferService),C(1,w.IOptionsService),C(2,w.IOscLinkService)],x)},6193:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,u){this._parentWindow=c,this._renderCallback=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,C){this._rowCount=C,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=c(3614),C=c(3656),v=c(6465),w=c(9042),x=c(3730),R=c(1680),b=c(3107),h=c(5744),m=c(2950),p=c(1296),g=c(428),A=c(4269),D=c(5114),L=c(8934),T=c(3230),E=c(9312),B=c(4725),W=c(6731),F=c(8055),I=c(8969),V=c(8460),ee=c(844),ne=c(6114),q=c(8437),Z=c(2584),K=c(7399),j=c(5941),U=c(9074),N=c(2585),z=c(5435),X=c(4567);class ie extends I.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(G={}){super(G),this.browser=ne,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new ee.MutableDisposable),this._onCursorMove=this.register(new V.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new V.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new V.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new V.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new V.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new V.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new V.EventEmitter),this._onBlur=this.register(new V.EventEmitter),this._onA11yCharEmitter=this.register(new V.EventEmitter),this._onA11yTabEmitter=this.register(new V.EventEmitter),this._onWillOpen=this.register(new V.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(v.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(x.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(U.DecorationService),this._instantiationService.setService(N.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((Q,P)=>this.refresh(Q,P)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((Q=>this._reportWindowsOptions(Q)))),this.register(this._inputHandler.onColor((Q=>this._handleColorEvent(Q)))),this.register((0,V.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,V.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,V.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,V.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((Q=>this._afterResize(Q.cols,Q.rows)))),this.register((0,ee.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(G){if(this._themeService)for(const Q of G){let P,he="";switch(Q.index){case 256:P="foreground",he="10";break;case 257:P="background",he="11";break;case 258:P="cursor",he="12";break;default:P="ansi",he="4;"+Q.index}switch(Q.type){case 0:const ge=F.color.toColorRGB(P==="ansi"?this._themeService.colors.ansi[Q.index]:this._themeService.colors[P]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${he};${(0,j.toRgbString)(ge)}${Z.C1_ESCAPED.ST}`);break;case 1:if(P==="ansi")this._themeService.modifyColors((oe=>oe.ansi[Q.index]=F.rgba.toColor(...Q.color)));else{const oe=P;this._themeService.modifyColors((me=>me[oe]=F.rgba.toColor(...Q.color)))}break;case 2:this._themeService.restoreColor(Q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(G){G?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(X.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(G){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.updateCursorStyle(G),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const G=this.buffer.ybase+this.buffer.y,Q=this.buffer.lines.get(G);if(!Q)return;const P=Math.min(this.buffer.x,this.cols-1),he=this._renderService.dimensions.css.cell.height,ge=Q.getWidth(P),oe=this._renderService.dimensions.css.cell.width*ge,me=this.buffer.y*this._renderService.dimensions.css.cell.height,Ce=P*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ce+"px",this.textarea.style.top=me+"px",this.textarea.style.width=oe+"px",this.textarea.style.height=he+"px",this.textarea.style.lineHeight=he+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,C.addDisposableDomListener)(this.element,"copy",(Q=>{this.hasSelection()&&(0,u.copyHandler)(Q,this._selectionService)})));const G=Q=>(0,u.handlePasteEvent)(Q,this.textarea,this.coreService,this.optionsService);this.register((0,C.addDisposableDomListener)(this.textarea,"paste",G)),this.register((0,C.addDisposableDomListener)(this.element,"paste",G)),ne.isFirefox?this.register((0,C.addDisposableDomListener)(this.element,"mousedown",(Q=>{Q.button===2&&(0,u.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,C.addDisposableDomListener)(this.element,"contextmenu",(Q=>{(0,u.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ne.isLinux&&this.register((0,C.addDisposableDomListener)(this.element,"auxclick",(Q=>{Q.button===1&&(0,u.moveTextAreaUnderMouseCursor)(Q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,C.addDisposableDomListener)(this.textarea,"keyup",(G=>this._keyUp(G)),!0)),this.register((0,C.addDisposableDomListener)(this.textarea,"keydown",(G=>this._keyDown(G)),!0)),this.register((0,C.addDisposableDomListener)(this.textarea,"keypress",(G=>this._keyPress(G)),!0)),this.register((0,C.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,C.addDisposableDomListener)(this.textarea,"compositionupdate",(G=>this._compositionHelper.compositionupdate(G)))),this.register((0,C.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,C.addDisposableDomListener)(this.textarea,"input",(G=>this._inputEvent(G)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(G){if(!G)throw new Error("Terminal requires a parent element.");if(G.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=G.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),G.appendChild(this.element);const Q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",w.promptLabel),ne.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(D.CoreBrowserService,this.textarea,G.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(B.ICoreBrowserService,this._coreBrowserService),this.register((0,C.addDisposableDomListener)(this.textarea,"focus",(P=>this._handleTextAreaFocus(P)))),this.register((0,C.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(g.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(B.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(W.ThemeService),this._instantiationService.setService(B.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(A.CharacterJoinerService),this._instantiationService.setService(B.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(B.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((P=>this._onRender.fire(P)))),this.onResize((P=>this._renderService.resize(P.cols,P.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(m.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(Q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(L.MouseService),this._instantiationService.setService(B.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(R.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((P=>this.scrollLines(P.amount,P.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(E.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(B.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((P=>this.scrollLines(P.amount,P.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((P=>this._renderService.handleSelectionChanged(P.start,P.end,P.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((P=>{this.textarea.value=P,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((P=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,C.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer,this.screenElement)),this.register((0,C.addDisposableDomListener)(this.element,"mousedown",(P=>this._selectionService.handleMouseDown(P)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(X.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(P=>this._handleScreenReaderModeOptionChange(P)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(h.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(P=>{!this._overviewRulerRenderer&&P&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(h.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(p.DomRenderer,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier2)}bindMouse(){const G=this,Q=this.element;function P(oe){const me=G._mouseService.getMouseReportCoords(oe,G.screenElement);if(!me)return!1;let Ce,ze;switch(oe.overrideType||oe.type){case"mousemove":ze=32,oe.buttons===void 0?(Ce=3,oe.button!==void 0&&(Ce=oe.button<3?oe.button:3)):Ce=1&oe.buttons?0:4&oe.buttons?1:2&oe.buttons?2:3;break;case"mouseup":ze=0,Ce=oe.button<3?oe.button:3;break;case"mousedown":ze=1,Ce=oe.button<3?oe.button:3;break;case"wheel":if(G.viewport.getLinesScrolled(oe)===0)return!1;ze=oe.deltaY<0?0:1,Ce=4;break;default:return!1}return!(ze===void 0||Ce===void 0||Ce>4)&&G.coreMouseService.triggerMouseEvent({col:me.col,row:me.row,x:me.x,y:me.y,button:Ce,action:ze,ctrl:oe.ctrlKey,alt:oe.altKey,shift:oe.shiftKey})}const he={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:oe=>(P(oe),oe.buttons||(this._document.removeEventListener("mouseup",he.mouseup),he.mousedrag&&this._document.removeEventListener("mousemove",he.mousedrag)),this.cancel(oe)),wheel:oe=>(P(oe),this.cancel(oe,!0)),mousedrag:oe=>{oe.buttons&&P(oe)},mousemove:oe=>{oe.buttons||P(oe)}};this.register(this.coreMouseService.onProtocolChange((oe=>{oe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(oe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&oe?he.mousemove||(Q.addEventListener("mousemove",ge.mousemove),he.mousemove=ge.mousemove):(Q.removeEventListener("mousemove",he.mousemove),he.mousemove=null),16&oe?he.wheel||(Q.addEventListener("wheel",ge.wheel,{passive:!1}),he.wheel=ge.wheel):(Q.removeEventListener("wheel",he.wheel),he.wheel=null),2&oe?he.mouseup||(he.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",he.mouseup),he.mouseup=null),4&oe?he.mousedrag||(he.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",he.mousedrag),he.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,C.addDisposableDomListener)(Q,"mousedown",(oe=>{if(oe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(oe))return P(oe),he.mouseup&&this._document.addEventListener("mouseup",he.mouseup),he.mousedrag&&this._document.addEventListener("mousemove",he.mousedrag),this.cancel(oe)}))),this.register((0,C.addDisposableDomListener)(Q,"wheel",(oe=>{if(!he.wheel){if(!this.buffer.hasScrollback){const me=this.viewport.getLinesScrolled(oe);if(me===0)return;const Ce=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(oe.deltaY<0?"A":"B");let ze="";for(let ct=0;ct<Math.abs(me);ct++)ze+=Ce;return this.coreService.triggerDataEvent(ze,!0),this.cancel(oe,!0)}return this.viewport.handleWheel(oe)?this.cancel(oe):void 0}}),{passive:!1})),this.register((0,C.addDisposableDomListener)(Q,"touchstart",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(oe),this.cancel(oe)}),{passive:!0})),this.register((0,C.addDisposableDomListener)(Q,"touchmove",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(oe)?void 0:this.cancel(oe)}),{passive:!1}))}refresh(G,Q){this._renderService?.refreshRows(G,Q)}updateCursorStyle(G){this._selectionService?.shouldColumnSelect(G)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(G,Q,P=0){P===1?(super.scrollLines(G,Q,P),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(G)}paste(G){(0,u.paste)(G,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(G){this._customKeyEventHandler=G}registerLinkProvider(G){return this.linkifier2.registerLinkProvider(G)}registerCharacterJoiner(G){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const Q=this._characterJoinerService.register(G);return this.refresh(0,this.rows-1),Q}deregisterCharacterJoiner(G){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(G)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(G){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+G)}registerDecoration(G){return this._decorationService.registerDecoration(G)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(G,Q,P){this._selectionService.setSelection(G,Q,P)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(G,Q){this._selectionService?.selectLines(G,Q)}_keyDown(G){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1)return!1;const Q=this.browser.isMac&&this.options.macOptionIsMeta&&G.altKey;if(!Q&&!this._compositionHelper.keydown(G))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Q||G.key!=="Dead"&&G.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const P=(0,K.evaluateKeyboardEvent)(G,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(G),P.type===3||P.type===2){const he=this.rows-1;return this.scrollLines(P.type===2?-he:he),this.cancel(G,!0)}return P.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,G)||(P.cancel&&this.cancel(G,!0),!P.key||!!(G.key&&!G.ctrlKey&&!G.altKey&&!G.metaKey&&G.key.length===1&&G.key.charCodeAt(0)>=65&&G.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(P.key!==Z.C0.ETX&&P.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:P.key,domEvent:G}),this._showCursor(),this.coreService.triggerDataEvent(P.key,!0),!this.optionsService.rawOptions.screenReaderMode||G.altKey||G.ctrlKey?this.cancel(G,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(G,Q){const P=G.isMac&&!this.options.macOptionIsMeta&&Q.altKey&&!Q.ctrlKey&&!Q.metaKey||G.isWindows&&Q.altKey&&Q.ctrlKey&&!Q.metaKey||G.isWindows&&Q.getModifierState("AltGraph");return Q.type==="keypress"?P:P&&(!Q.keyCode||Q.keyCode>47)}_keyUp(G){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1||((function(Q){return Q.keyCode===16||Q.keyCode===17||Q.keyCode===18})(G)||this.focus(),this.updateCursorStyle(G),this._keyPressHandled=!1)}_keyPress(G){let Q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1)return!1;if(this.cancel(G),G.charCode)Q=G.charCode;else if(G.which===null||G.which===void 0)Q=G.keyCode;else{if(G.which===0||G.charCode===0)return!1;Q=G.which}return!(!Q||(G.altKey||G.ctrlKey||G.metaKey)&&!this._isThirdLevelShift(this.browser,G)||(Q=String.fromCharCode(Q),this._onKey.fire({key:Q,domEvent:G}),this._showCursor(),this.coreService.triggerDataEvent(Q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(G){if(G.data&&G.inputType==="insertText"&&(!G.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const Q=G.data;return this.coreService.triggerDataEvent(Q,!0),this.cancel(G),!0}return!1}resize(G,Q){G!==this.cols||Q!==this.rows?super.resize(G,Q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(G,Q){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let G=1;G<this.rows;G++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const G=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=G,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(Z.C0.ESC+"[I"):this.coreService.triggerDataEvent(Z.C0.ESC+"[O")}_reportWindowsOptions(G){if(this._renderService)switch(G){case z.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const Q=this._renderService.dimensions.css.canvas.width.toFixed(0),P=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Z.C0.ESC}[4;${P};${Q}t`);break;case z.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const he=this._renderService.dimensions.css.cell.width.toFixed(0),ge=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Z.C0.ESC}[6;${ge};${he}t`)}}cancel(G,Q){if(this.options.cancelEvents||Q)return G.preventDefault(),G.stopPropagation(),!1}}o.Terminal=ie},9924:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,C){this._rowCount=C,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const v=Date.now();if(v-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=v,this._innerRefresh();else if(!this._additionalRefreshRequested){const w=v-this._lastRefreshMs,x=this._debounceThresholdMS-w;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),x)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(S,o,c){var u=this&&this.__decorate||function(m,p,g,A){var D,L=arguments.length,T=L<3?p:A===null?A=Object.getOwnPropertyDescriptor(p,g):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,p,g,A);else for(var E=m.length-1;E>=0;E--)(D=m[E])&&(T=(L<3?D(T):L>3?D(p,g,T):D(p,g))||T);return L>3&&T&&Object.defineProperty(p,g,T),T},C=this&&this.__param||function(m,p){return function(g,A){p(g,A,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const v=c(3656),w=c(4725),x=c(8460),R=c(844),b=c(2585);let h=o.Viewport=class extends R.Disposable{constructor(m,p,g,A,D,L,T,E){super(),this._viewportElement=m,this._scrollArea=p,this._bufferService=g,this._optionsService=A,this._charSizeService=D,this._renderService=L,this._coreBrowserService=T,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((B=>this._renderDimensions=B))),this._handleThemeChange(E.colors),this.register(E.onChangeColors((B=>this._handleThemeChange(B)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(m){this._viewportElement.style.backgroundColor=m.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(m){if(m)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const p=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==p&&(this._lastRecordedBufferHeight=p,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const m=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==m&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=m),this._refreshAnimationFrame=null}syncScrollArea(m=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(m);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(m)}_handleScroll(m){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const p=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:p,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const m=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(m*(this._smoothScrollState.target-this._smoothScrollState.origin)),m<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(m,p){const g=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(p<0&&this._viewportElement.scrollTop!==0||p>0&&g<this._lastRecordedBufferHeight)||(m.cancelable&&m.preventDefault(),!1)}handleWheel(m){const p=this._getPixelsScrolled(m);return p!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+p:this._smoothScrollState.target+=p,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=p,this._bubbleScroll(m,p))}scrollLines(m){if(m!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const p=m*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+p,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:m,suppressScrollEvent:!1})}_getPixelsScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let p=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_LINE?p*=this._currentRowHeight:m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._currentRowHeight*this._bufferService.rows),p}getBufferElements(m,p){let g,A="";const D=[],L=p??this._bufferService.buffer.lines.length,T=this._bufferService.buffer.lines;for(let E=m;E<L;E++){const B=T.get(E);if(!B)continue;const W=T.get(E+1)?.isWrapped;if(A+=B.translateToString(!W),!W||E===T.length-1){const F=document.createElement("div");F.textContent=A,D.push(F),A.length>0&&(g=F),A=""}}return{bufferElements:D,cursorElement:g}}getLinesScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let p=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(p/=this._currentRowHeight+0,this._wheelPartialScroll+=p,p=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._bufferService.rows),p}_applyScrollModifier(m,p){const g=this._optionsService.rawOptions.fastScrollModifier;return g==="alt"&&p.altKey||g==="ctrl"&&p.ctrlKey||g==="shift"&&p.shiftKey?m*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:m*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(m){this._lastTouchY=m.touches[0].pageY}handleTouchMove(m){const p=this._lastTouchY-m.touches[0].pageY;return this._lastTouchY=m.touches[0].pageY,p!==0&&(this._viewportElement.scrollTop+=p,this._bubbleScroll(m,p))}};o.Viewport=h=u([C(2,b.IBufferService),C(3,b.IOptionsService),C(4,w.ICharSizeService),C(5,w.IRenderService),C(6,w.ICoreBrowserService),C(7,w.IThemeService)],h)},3107:function(S,o,c){var u=this&&this.__decorate||function(b,h,m,p){var g,A=arguments.length,D=A<3?h:p===null?p=Object.getOwnPropertyDescriptor(h,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,h,m,p);else for(var L=b.length-1;L>=0;L--)(g=b[L])&&(D=(A<3?g(D):A>3?g(h,m,D):g(h,m))||D);return A>3&&D&&Object.defineProperty(h,m,D),D},C=this&&this.__param||function(b,h){return function(m,p){h(m,p,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const v=c(4725),w=c(844),x=c(2585);let R=o.BufferDecorationRenderer=class extends w.Disposable{constructor(b,h,m,p,g){super(),this._screenElement=b,this._bufferService=h,this._coreBrowserService=m,this._decorationService=p,this._renderService=g,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((A=>this._removeDecoration(A)))),this.register((0,w.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const b of this._decorationService.decorations)this._renderDecoration(b);this._dimensionsChanged=!1}_renderDecoration(b){this._refreshStyle(b),this._dimensionsChanged&&this._refreshXPosition(b)}_createElement(b){const h=this._coreBrowserService.mainDocument.createElement("div");h.classList.add("xterm-decoration"),h.classList.toggle("xterm-decoration-top-layer",b?.options?.layer==="top"),h.style.width=`${Math.round((b.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,h.style.height=(b.options.height||1)*this._renderService.dimensions.css.cell.height+"px",h.style.top=(b.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",h.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const m=b.options.x??0;return m&&m>this._bufferService.cols&&(h.style.display="none"),this._refreshXPosition(b,h),h}_refreshStyle(b){const h=b.marker.line-this._bufferService.buffers.active.ydisp;if(h<0||h>=this._bufferService.rows)b.element&&(b.element.style.display="none",b.onRenderEmitter.fire(b.element));else{let m=this._decorationElements.get(b);m||(m=this._createElement(b),b.element=m,this._decorationElements.set(b,m),this._container.appendChild(m),b.onDispose((()=>{this._decorationElements.delete(b),m.remove()}))),m.style.top=h*this._renderService.dimensions.css.cell.height+"px",m.style.display=this._altBufferIsActive?"none":"block",b.onRenderEmitter.fire(m)}}_refreshXPosition(b,h=b.element){if(!h)return;const m=b.options.x??0;(b.options.anchor||"left")==="right"?h.style.right=m?m*this._renderService.dimensions.css.cell.width+"px":"":h.style.left=m?m*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(b){this._decorationElements.get(b)?.remove(),this._decorationElements.delete(b),b.dispose()}};o.BufferDecorationRenderer=R=u([C(1,x.IBufferService),C(2,v.ICoreBrowserService),C(3,x.IDecorationService),C(4,v.IRenderService)],R)},5871:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,u){return u>=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,C){return u>=c.startBufferLine-this._linePadding[C||"full"]&&u<=c.endBufferLine+this._linePadding[C||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(S,o,c){var u=this&&this.__decorate||function(g,A,D,L){var T,E=arguments.length,B=E<3?A:L===null?L=Object.getOwnPropertyDescriptor(A,D):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,A,D,L);else for(var W=g.length-1;W>=0;W--)(T=g[W])&&(B=(E<3?T(B):E>3?T(A,D,B):T(A,D))||B);return E>3&&B&&Object.defineProperty(A,D,B),B},C=this&&this.__param||function(g,A){return function(D,L){A(D,L,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const v=c(5871),w=c(4725),x=c(844),R=c(2585),b={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0},m={full:0,left:0,center:0,right:0};let p=o.OverviewRulerRenderer=class extends x.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,A,D,L,T,E,B){super(),this._viewportElement=g,this._screenElement=A,this._bufferService=D,this._decorationService=L,this._renderService=T,this._optionsService=E,this._coreBrowserService=B,this._colorZoneStore=new v.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const W=this._canvas.getContext("2d");if(!W)throw new Error("Ctx cannot be null");this._ctx=W,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,x.toDisposable)((()=>{this._canvas?.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const g=Math.floor(this._canvas.width/3),A=Math.ceil(this._canvas.width/3);h.full=this._canvas.width,h.left=g,h.center=A,h.right=g,this._refreshDrawHeightConstants(),m.full=0,m.left=0,m.center=h.left,m.right=h.left+h.center}_refreshDrawHeightConstants(){b.full=Math.round(2*this._coreBrowserService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,A=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowserService.dpr);b.left=A,b.center=A,b.right=A}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const A of this._decorationService.decorations)this._colorZoneStore.addDecoration(A);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const A of g)A.position!=="full"&&this._renderColorZone(A);for(const A of g)A.position==="full"&&this._renderColorZone(A);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(m[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-b[g.position||"full"]/2),h[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+b[g.position||"full"]))}_queueRefresh(g,A){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=A||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=p=u([C(2,R.IBufferService),C(3,R.IDecorationService),C(4,w.IRenderService),C(5,R.IOptionsService),C(6,w.ICoreBrowserService)],p)},2950:function(S,o,c){var u=this&&this.__decorate||function(b,h,m,p){var g,A=arguments.length,D=A<3?h:p===null?p=Object.getOwnPropertyDescriptor(h,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,h,m,p);else for(var L=b.length-1;L>=0;L--)(g=b[L])&&(D=(A<3?g(D):A>3?g(h,m,D):g(h,m))||D);return A>3&&D&&Object.defineProperty(h,m,D),D},C=this&&this.__param||function(b,h){return function(m,p){h(m,p,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const v=c(4725),w=c(2585),x=c(2584);let R=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(b,h,m,p,g,A){this._textarea=b,this._compositionView=h,this._bufferService=m,this._optionsService=p,this._coreService=g,this._renderService=A,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(b){this._compositionView.textContent=b.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(b){if(this._isComposing||this._isSendingComposition){if(b.keyCode===229||b.keyCode===16||b.keyCode===17||b.keyCode===18)return!1;this._finalizeComposition(!1)}return b.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(b){if(this._compositionView.classList.remove("active"),this._isComposing=!1,b){const h={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let m;this._isSendingComposition=!1,h.start+=this._dataAlreadySent.length,m=this._isComposing?this._textarea.value.substring(h.start,h.end):this._textarea.value.substring(h.start),m.length>0&&this._coreService.triggerDataEvent(m,!0)}}),0)}else{this._isSendingComposition=!1;const h=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(h,!0)}}_handleAnyTextareaChanges(){const b=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const h=this._textarea.value,m=h.replace(b,"");this._dataAlreadySent=m,h.length>b.length?this._coreService.triggerDataEvent(m,!0):h.length<b.length?this._coreService.triggerDataEvent(`${x.C0.DEL}`,!0):h.length===b.length&&h!==b&&this._coreService.triggerDataEvent(h,!0)}}),0)}updateCompositionElements(b){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const h=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),m=this._renderService.dimensions.css.cell.height,p=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,g=h*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=g+"px",this._compositionView.style.top=p+"px",this._compositionView.style.height=m+"px",this._compositionView.style.lineHeight=m+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const A=this._compositionView.getBoundingClientRect();this._textarea.style.left=g+"px",this._textarea.style.top=p+"px",this._textarea.style.width=Math.max(A.width,1)+"px",this._textarea.style.height=Math.max(A.height,1)+"px",this._textarea.style.lineHeight=A.height+"px"}b||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};o.CompositionHelper=R=u([C(2,w.IBufferService),C(3,w.IOptionsService),C(4,w.ICoreService),C(5,v.IRenderService)],R)},9806:(S,o)=>{function c(u,C,v){const w=v.getBoundingClientRect(),x=u.getComputedStyle(v),R=parseInt(x.getPropertyValue("padding-left")),b=parseInt(x.getPropertyValue("padding-top"));return[C.clientX-w.left-R,C.clientY-w.top-b]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,C,v,w,x,R,b,h,m){if(!R)return;const p=c(u,C,v);return p?(p[0]=Math.ceil((p[0]+(m?b/2:0))/b),p[1]=Math.ceil(p[1]/h),p[0]=Math.min(Math.max(p[0],1),w+(m?1:0)),p[1]=Math.min(Math.max(p[1],1),x),p):void 0}},9504:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function C(h,m,p,g){const A=h-v(h,p),D=m-v(m,p),L=Math.abs(A-D)-(function(T,E,B){let W=0;const F=T-v(T,B),I=E-v(E,B);for(let V=0;V<Math.abs(F-I);V++){const ee=w(T,E)==="A"?-1:1;B.buffer.lines.get(F+ee*V)?.isWrapped&&W++}return W})(h,m,p);return b(L,R(w(h,m),g))}function v(h,m){let p=0,g=m.buffer.lines.get(h),A=g?.isWrapped;for(;A&&h>=0&&h<m.rows;)p++,g=m.buffer.lines.get(--h),A=g?.isWrapped;return p}function w(h,m){return h>m?"A":"B"}function x(h,m,p,g,A,D){let L=h,T=m,E="";for(;L!==p||T!==g;)L+=A?1:-1,A&&L>D.cols-1?(E+=D.buffer.translateBufferLineToString(T,!1,h,L),L=0,h=0,T++):!A&&L<0&&(E+=D.buffer.translateBufferLineToString(T,!1,0,h+1),L=D.cols-1,h=L,T--);return E+D.buffer.translateBufferLineToString(T,!1,h,L)}function R(h,m){const p=m?"O":"[";return u.C0.ESC+p+h}function b(h,m){h=Math.floor(h);let p="";for(let g=0;g<h;g++)p+=m;return p}o.moveToCellSequence=function(h,m,p,g){const A=p.buffer.x,D=p.buffer.y;if(!p.buffer.hasScrollback)return(function(E,B,W,F,I,V){return C(B,F,I,V).length===0?"":b(x(E,B,E,B-v(B,I),!1,I).length,R("D",V))})(A,D,0,m,p,g)+C(D,m,p,g)+(function(E,B,W,F,I,V){let ee;ee=C(B,F,I,V).length>0?F-v(F,I):B;const ne=F,q=(function(Z,K,j,U,N,z){let X;return X=C(j,U,N,z).length>0?U-v(U,N):K,Z<j&&X<=U||Z>=j&&X<U?"C":"D"})(E,B,W,F,I,V);return b(x(E,ee,W,ne,q==="C",I).length,R(q,V))})(A,D,h,m,p,g);let L;if(D===m)return L=A>h?"D":"C",b(Math.abs(A-h),R(L,g));L=D>m?"D":"C";const T=Math.abs(D-m);return b((function(E,B){return B.cols-E})(D>m?h:A,p)+(T-1)*p.cols+1+((D>m?A:h)-1),R(L,g))}},1296:function(S,o,c){var u=this&&this.__decorate||function(I,V,ee,ne){var q,Z=arguments.length,K=Z<3?V:ne===null?ne=Object.getOwnPropertyDescriptor(V,ee):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(I,V,ee,ne);else for(var j=I.length-1;j>=0;j--)(q=I[j])&&(K=(Z<3?q(K):Z>3?q(V,ee,K):q(V,ee))||K);return Z>3&&K&&Object.defineProperty(V,ee,K),K},C=this&&this.__param||function(I,V){return function(ee,ne){V(ee,ne,I)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const v=c(3787),w=c(2550),x=c(2223),R=c(6171),b=c(4725),h=c(8055),m=c(8460),p=c(844),g=c(2585),A="xterm-dom-renderer-owner-",D="xterm-rows",L="xterm-fg-",T="xterm-bg-",E="xterm-focus",B="xterm-selection";let W=1,F=o.DomRenderer=class extends p.Disposable{constructor(I,V,ee,ne,q,Z,K,j,U,N,z,X){super(),this._document=I,this._element=V,this._screenElement=ee,this._viewportElement=ne,this._helperContainer=q,this._linkifier2=Z,this._charSizeService=j,this._optionsService=U,this._bufferService=N,this._coreBrowserService=z,this._themeService=X,this._terminalClass=W++,this._rowElements=[],this.onRequestRedraw=this.register(new m.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(B),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,R.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ie=>this._injectCss(ie)))),this._injectCss(this._themeService.colors),this._rowFactory=K.createInstance(v.DomRendererRowFactory,document),this._element.classList.add(A+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ie=>this._handleLinkHover(ie)))),this.register(this._linkifier2.onHideLinkUnderline((ie=>this._handleLinkLeave(ie)))),this.register((0,p.toDisposable)((()=>{this._element.classList.remove(A+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new w.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const I=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*I,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*I),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/I),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/I),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const ee of this._rowElements)ee.style.width=`${this.dimensions.css.canvas.width}px`,ee.style.height=`${this.dimensions.css.cell.height}px`,ee.style.lineHeight=`${this.dimensions.css.cell.height}px`,ee.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(I){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${D} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${D} .xterm-dim { color: ${h.color.multiplyOpacity(I.foreground,.5).css};}`,V+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`,V+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",V+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,V+=`${this._terminalSelector} .${D}.${E} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${D}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${B} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${B} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${B} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,ne]of I.ansi.entries())V+=`${this._terminalSelector} .${L}${ee} { color: ${ne.css}; }${this._terminalSelector} .${L}${ee}.xterm-dim { color: ${h.color.multiplyOpacity(ne,.5).css}; }${this._terminalSelector} .${T}${ee} { background-color: ${ne.css}; }`;V+=`${this._terminalSelector} .${L}${x.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(I.background).css}; }${this._terminalSelector} .${L}${x.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${T}${x.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const I=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${I}px`,this._rowFactory.defaultSpacing=I}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(I,V){for(let ee=this._rowElements.length;ee<=V;ee++){const ne=this._document.createElement("div");this._rowContainer.appendChild(ne),this._rowElements.push(ne)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,V){this._refreshRowElements(I,V),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(E),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(E),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(I,V,ee){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,V,ee),this.renderRows(0,this._bufferService.rows-1),!I||!V)return;const ne=I[1]-this._bufferService.buffer.ydisp,q=V[1]-this._bufferService.buffer.ydisp,Z=Math.max(ne,0),K=Math.min(q,this._bufferService.rows-1);if(Z>=this._bufferService.rows||K<0)return;const j=this._document.createDocumentFragment();if(ee){const U=I[0]>V[0];j.appendChild(this._createSelectionElement(Z,U?V[0]:I[0],U?I[0]:V[0],K-Z+1))}else{const U=ne===Z?I[0]:0,N=Z===q?V[0]:this._bufferService.cols;j.appendChild(this._createSelectionElement(Z,U,N));const z=K-Z-1;if(j.appendChild(this._createSelectionElement(Z+1,0,this._bufferService.cols,z)),Z!==K){const X=q===K?V[0]:this._bufferService.cols;j.appendChild(this._createSelectionElement(K,0,X))}}this._selectionContainer.appendChild(j)}_createSelectionElement(I,V,ee,ne=1){const q=this._document.createElement("div");return q.style.height=ne*this.dimensions.css.cell.height+"px",q.style.top=I*this.dimensions.css.cell.height+"px",q.style.left=V*this.dimensions.css.cell.width+"px",q.style.width=this.dimensions.css.cell.width*(ee-V)+"px",q}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const I of this._rowElements)I.replaceChildren()}renderRows(I,V){const ee=this._bufferService.buffer,ne=ee.ybase+ee.y,q=Math.min(ee.x,this._bufferService.cols-1),Z=this._optionsService.rawOptions.cursorBlink,K=this._optionsService.rawOptions.cursorStyle,j=this._optionsService.rawOptions.cursorInactiveStyle;for(let U=I;U<=V;U++){const N=U+ee.ydisp,z=this._rowElements[U],X=ee.lines.get(N);if(!z||!X)break;z.replaceChildren(...this._rowFactory.createRow(X,N,N===ne,K,j,q,Z,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${A}${this._terminalClass}`}_handleLinkHover(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!0)}_handleLinkLeave(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!1)}_setCellUnderline(I,V,ee,ne,q,Z){ee<0&&(I=0),ne<0&&(V=0);const K=this._bufferService.rows-1;ee=Math.max(Math.min(ee,K),0),ne=Math.max(Math.min(ne,K),0),q=Math.min(q,this._bufferService.cols);const j=this._bufferService.buffer,U=j.ybase+j.y,N=Math.min(j.x,q-1),z=this._optionsService.rawOptions.cursorBlink,X=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let de=ee;de<=ne;++de){const G=de+j.ydisp,Q=this._rowElements[de],P=j.lines.get(G);if(!Q||!P)break;Q.replaceChildren(...this._rowFactory.createRow(P,G,G===U,X,ie,N,z,this.dimensions.css.cell.width,this._widthCache,Z?de===ee?I:0:-1,Z?(de===ne?V:q)-1:-1))}}};o.DomRenderer=F=u([C(6,g.IInstantiationService),C(7,b.ICharSizeService),C(8,g.IOptionsService),C(9,g.IBufferService),C(10,b.ICoreBrowserService),C(11,b.IThemeService)],F)},3787:function(S,o,c){var u=this&&this.__decorate||function(L,T,E,B){var W,F=arguments.length,I=F<3?T:B===null?B=Object.getOwnPropertyDescriptor(T,E):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(L,T,E,B);else for(var V=L.length-1;V>=0;V--)(W=L[V])&&(I=(F<3?W(I):F>3?W(T,E,I):W(T,E))||I);return F>3&&I&&Object.defineProperty(T,E,I),I},C=this&&this.__param||function(L,T){return function(E,B){T(E,B,L)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const v=c(2223),w=c(643),x=c(511),R=c(2585),b=c(8055),h=c(4725),m=c(4269),p=c(6171),g=c(3734);let A=o.DomRendererRowFactory=class{constructor(L,T,E,B,W,F,I){this._document=L,this._characterJoinerService=T,this._optionsService=E,this._coreBrowserService=B,this._coreService=W,this._decorationService=F,this._themeService=I,this._workCell=new x.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(L,T,E){this._selectionStart=L,this._selectionEnd=T,this._columnSelectMode=E}createRow(L,T,E,B,W,F,I,V,ee,ne,q){const Z=[],K=this._characterJoinerService.getJoinedCharacters(T),j=this._themeService.colors;let U,N=L.getNoBgTrimmedLength();E&&N<F+1&&(N=F+1);let z=0,X="",ie=0,de=0,G=0,Q=!1,P=0,he=!1,ge=0;const oe=[],me=ne!==-1&&q!==-1;for(let Ce=0;Ce<N;Ce++){L.loadCell(Ce,this._workCell);let ze=this._workCell.getWidth();if(ze===0)continue;let ct=!1,tt=Ce,ke=this._workCell;if(K.length>0&&Ce===K[0][0]){ct=!0;const rt=K.shift();ke=new m.JoinedCellData(this._workCell,L.translateToString(!0,rt[0],rt[1]),rt[1]-rt[0]),tt=rt[1]-1,ze=ke.getWidth()}const Xr=this._isCellInSelection(Ce,T),Zr=E&&Ce===F,mi=me&&Ce>=ne&&Ce<=q;let pi=!1;this._decorationService.forEachDecorationAtCell(Ce,T,void 0,(rt=>{pi=!0}));let Wi=ke.getChars()||w.WHITESPACE_CELL_CHAR;if(Wi===" "&&(ke.isUnderline()||ke.isOverline())&&(Wi=" "),ge=ze*V-ee.get(Wi,ke.isBold(),ke.isItalic()),U){if(z&&(Xr&&he||!Xr&&!he&&ke.bg===ie)&&(Xr&&he&&j.selectionForeground||ke.fg===de)&&ke.extended.ext===G&&mi===Q&&ge===P&&!Zr&&!ct&&!pi){ke.isInvisible()?X+=w.WHITESPACE_CELL_CHAR:X+=Wi,z++;continue}z&&(U.textContent=X),U=this._document.createElement("span"),z=0,X=""}else U=this._document.createElement("span");if(ie=ke.bg,de=ke.fg,G=ke.extended.ext,Q=mi,P=ge,he=Xr,ct&&F>=Ce&&F<=tt&&(F=Ce),!this._coreService.isCursorHidden&&Zr&&this._coreService.isCursorInitialized){if(oe.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&oe.push("xterm-cursor-blink"),oe.push(B==="bar"?"xterm-cursor-bar":B==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(W)switch(W){case"outline":oe.push("xterm-cursor-outline");break;case"block":oe.push("xterm-cursor-block");break;case"bar":oe.push("xterm-cursor-bar");break;case"underline":oe.push("xterm-cursor-underline")}}if(ke.isBold()&&oe.push("xterm-bold"),ke.isItalic()&&oe.push("xterm-italic"),ke.isDim()&&oe.push("xterm-dim"),X=ke.isInvisible()?w.WHITESPACE_CELL_CHAR:ke.getChars()||w.WHITESPACE_CELL_CHAR,ke.isUnderline()&&(oe.push(`xterm-underline-${ke.extended.underlineStyle}`),X===" "&&(X=" "),!ke.isUnderlineColorDefault()))if(ke.isUnderlineColorRGB())U.style.textDecorationColor=`rgb(${g.AttributeData.toColorRGB(ke.getUnderlineColor()).join(",")})`;else{let rt=ke.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ke.isBold()&&rt<8&&(rt+=8),U.style.textDecorationColor=j.ansi[rt].css}ke.isOverline()&&(oe.push("xterm-overline"),X===" "&&(X=" ")),ke.isStrikethrough()&&oe.push("xterm-strikethrough"),mi&&(U.style.textDecoration="underline");let Gt=ke.getFgColor(),ut=ke.getFgColorMode(),Nt=ke.getBgColor(),Ur=ke.getBgColorMode();const Jr=!!ke.isInverse();if(Jr){const rt=Gt;Gt=Nt,Nt=rt;const gi=ut;ut=Ur,Ur=gi}let gt,$t,er,vi=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,T,void 0,(rt=>{rt.options.layer!=="top"&&vi||(rt.backgroundColorRGB&&(Ur=50331648,Nt=rt.backgroundColorRGB.rgba>>8&16777215,gt=rt.backgroundColorRGB),rt.foregroundColorRGB&&(ut=50331648,Gt=rt.foregroundColorRGB.rgba>>8&16777215,$t=rt.foregroundColorRGB),vi=rt.options.layer==="top")})),!vi&&Xr&&(gt=this._coreBrowserService.isFocused?j.selectionBackgroundOpaque:j.selectionInactiveBackgroundOpaque,Nt=gt.rgba>>8&16777215,Ur=50331648,vi=!0,j.selectionForeground&&(ut=50331648,Gt=j.selectionForeground.rgba>>8&16777215,$t=j.selectionForeground)),vi&&oe.push("xterm-decoration-top"),Ur){case 16777216:case 33554432:er=j.ansi[Nt],oe.push(`xterm-bg-${Nt}`);break;case 50331648:er=b.rgba.toColor(Nt>>16,Nt>>8&255,255&Nt),this._addStyle(U,`background-color:#${D((Nt>>>0).toString(16),"0",6)}`);break;default:Jr?(er=j.foreground,oe.push(`xterm-bg-${v.INVERTED_DEFAULT_COLOR}`)):er=j.background}switch(gt||ke.isDim()&&(gt=b.color.multiplyOpacity(er,.5)),ut){case 16777216:case 33554432:ke.isBold()&&Gt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Gt+=8),this._applyMinimumContrast(U,er,j.ansi[Gt],ke,gt,void 0)||oe.push(`xterm-fg-${Gt}`);break;case 50331648:const rt=b.rgba.toColor(Gt>>16&255,Gt>>8&255,255&Gt);this._applyMinimumContrast(U,er,rt,ke,gt,$t)||this._addStyle(U,`color:#${D(Gt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(U,er,j.foreground,ke,gt,$t)||Jr&&oe.push(`xterm-fg-${v.INVERTED_DEFAULT_COLOR}`)}oe.length&&(U.className=oe.join(" "),oe.length=0),Zr||ct||pi?U.textContent=X:z++,ge!==this.defaultSpacing&&(U.style.letterSpacing=`${ge}px`),Z.push(U),Ce=tt}return U&&z&&(U.textContent=X),Z}_applyMinimumContrast(L,T,E,B,W,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,p.excludeFromContrastRatioDemands)(B.getCode()))return!1;const I=this._getContrastCache(B);let V;if(W||F||(V=I.getColor(T.rgba,E.rgba)),V===void 0){const ee=this._optionsService.rawOptions.minimumContrastRatio/(B.isDim()?2:1);V=b.color.ensureContrastRatio(W||T,F||E,ee),I.setColor((W||T).rgba,(F||E).rgba,V??null)}return!!V&&(this._addStyle(L,`color:${V.css}`),!0)}_getContrastCache(L){return L.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(L,T){L.setAttribute("style",`${L.getAttribute("style")||""}${T};`)}_isCellInSelection(L,T){const E=this._selectionStart,B=this._selectionEnd;return!(!E||!B)&&(this._columnSelectMode?E[0]<=B[0]?L>=E[0]&&T>=E[1]&&L<B[0]&&T<=B[1]:L<E[0]&&T>=E[1]&&L>=B[0]&&T<=B[1]:T>E[1]&&T<B[1]||E[1]===B[1]&&T===E[1]&&L>=E[0]&&L<B[0]||E[1]<B[1]&&T===B[1]&&L<B[0]||E[1]<B[1]&&T===E[1]&&L>=E[0])}};function D(L,T,E){for(;L.length<E;)L=T+L;return L}o.DomRendererRowFactory=A=u([C(1,h.ICharacterJoinerService),C(2,R.IOptionsService),C(3,h.ICoreBrowserService),C(4,R.ICoreService),C(5,R.IDecorationService),C(6,h.IThemeService)],A)},2550:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const C=c.createElement("span");C.classList.add("xterm-char-measure-element");const v=c.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontWeight="bold";const w=c.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontStyle="italic";const x=c.createElement("span");x.classList.add("xterm-char-measure-element"),x.style.fontWeight="bold",x.style.fontStyle="italic",this._measureElements=[C,v,w,x],this._container.appendChild(C),this._container.appendChild(v),this._container.appendChild(w),this._container.appendChild(x),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,C,v){c===this._font&&u===this._fontSize&&C===this._weight&&v===this._weightBold||(this._font=c,this._fontSize=u,this._weight=C,this._weightBold=v,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${C}`,this._measureElements[1].style.fontWeight=`${v}`,this._measureElements[2].style.fontWeight=`${C}`,this._measureElements[3].style.fontWeight=`${v}`,this.clear())}get(c,u,C){let v=0;if(!u&&!C&&c.length===1&&(v=c.charCodeAt(0))<256)return this._flat[v]!==-9999?this._flat[v]:this._flat[v]=this._measure(c,0);let w=c;u&&(w+="B"),C&&(w+="I");let x=this._holey.get(w);if(x===void 0){let R=0;u&&(R|=1),C&&(R|=2),x=this._measure(c,R),this._holey.set(w,x)}return x}_measure(c,u){const C=this._measureElements[u];return C.textContent=c.repeat(32),C.offsetWidth/32}}},2223:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(S,o)=>{function c(u){return 57508<=u&&u<=57558}Object.defineProperty(o,"__esModule",{value:!0}),o.createRenderDimensions=o.excludeFromContrastRatioDemands=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(u){if(!u)throw new Error("value must not be falsy");return u},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(u){return 57520<=u&&u<=57527},o.excludeFromContrastRatioDemands=function(u){return c(u)||(function(C){return 9472<=C&&C<=9631})(u)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}}},456:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(S,o,c){var u=this&&this.__decorate||function(h,m,p,g){var A,D=arguments.length,L=D<3?m:g===null?g=Object.getOwnPropertyDescriptor(m,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(h,m,p,g);else for(var T=h.length-1;T>=0;T--)(A=h[T])&&(L=(D<3?A(L):D>3?A(m,p,L):A(m,p))||L);return D>3&&L&&Object.defineProperty(m,p,L),L},C=this&&this.__param||function(h,m){return function(p,g){m(p,g,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const v=c(2585),w=c(8460),x=c(844);let R=o.CharSizeService=class extends x.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(h,m,p){super(),this._optionsService=p,this.width=0,this.height=0,this._onCharSizeChange=this.register(new w.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new b(h,m,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const h=this._measureStrategy.measure();h.width===this.width&&h.height===this.height||(this.width=h.width,this.height=h.height,this._onCharSizeChange.fire())}};o.CharSizeService=R=u([C(2,v.IOptionsService)],R);class b{constructor(m,p,g){this._document=m,this._parentElement=p,this._optionsService=g,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const m={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return m.width!==0&&m.height!==0&&(this._result.width=m.width/32,this._result.height=Math.ceil(m.height)),this._result}}},4269:function(S,o,c){var u=this&&this.__decorate||function(m,p,g,A){var D,L=arguments.length,T=L<3?p:A===null?A=Object.getOwnPropertyDescriptor(p,g):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,p,g,A);else for(var E=m.length-1;E>=0;E--)(D=m[E])&&(T=(L<3?D(T):L>3?D(p,g,T):D(p,g))||T);return L>3&&T&&Object.defineProperty(p,g,T),T},C=this&&this.__param||function(m,p){return function(g,A){p(g,A,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const v=c(3734),w=c(643),x=c(511),R=c(2585);class b extends v.AttributeData{constructor(p,g,A){super(),this.content=0,this.combinedData="",this.fg=p.fg,this.bg=p.bg,this.combinedData=g,this._width=A}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(p){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=b;let h=o.CharacterJoinerService=class sS{constructor(p){this._bufferService=p,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new x.CellData}register(p){const g={id:this._nextCharacterJoinerId++,handler:p};return this._characterJoiners.push(g),g.id}deregister(p){for(let g=0;g<this._characterJoiners.length;g++)if(this._characterJoiners[g].id===p)return this._characterJoiners.splice(g,1),!0;return!1}getJoinedCharacters(p){if(this._characterJoiners.length===0)return[];const g=this._bufferService.buffer.lines.get(p);if(!g||g.length===0)return[];const A=[],D=g.translateToString(!0);let L=0,T=0,E=0,B=g.getFg(0),W=g.getBg(0);for(let F=0;F<g.getTrimmedLength();F++)if(g.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==B||this._workCell.bg!==W){if(F-L>1){const I=this._getJoinedRanges(D,E,T,g,L);for(let V=0;V<I.length;V++)A.push(I[V])}L=F,E=T,B=this._workCell.fg,W=this._workCell.bg}T+=this._workCell.getChars().length||w.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-L>1){const F=this._getJoinedRanges(D,E,T,g,L);for(let I=0;I<F.length;I++)A.push(F[I])}return A}_getJoinedRanges(p,g,A,D,L){const T=p.substring(g,A);let E=[];try{E=this._characterJoiners[0].handler(T)}catch(B){console.error(B)}for(let B=1;B<this._characterJoiners.length;B++)try{const W=this._characterJoiners[B].handler(T);for(let F=0;F<W.length;F++)sS._mergeRanges(E,W[F])}catch(W){console.error(W)}return this._stringRangesToCellRanges(E,D,L),E}_stringRangesToCellRanges(p,g,A){let D=0,L=!1,T=0,E=p[D];if(E){for(let B=A;B<this._bufferService.cols;B++){const W=g.getWidth(B),F=g.getString(B).length||w.WHITESPACE_CELL_CHAR.length;if(W!==0){if(!L&&E[0]<=T&&(E[0]=B,L=!0),E[1]<=T){if(E[1]=B,E=p[++D],!E)break;E[0]<=T?(E[0]=B,L=!0):L=!1}T+=F}}E&&(E[1]=this._bufferService.cols)}}static _mergeRanges(p,g){let A=!1;for(let D=0;D<p.length;D++){const L=p[D];if(A){if(g[1]<=L[0])return p[D-1][1]=g[1],p;if(g[1]<=L[1])return p[D-1][1]=Math.max(g[1],L[1]),p.splice(D,1),p;p.splice(D,1),D--}else{if(g[1]<=L[0])return p.splice(D,0,g),p;if(g[1]<=L[1])return L[0]=Math.min(g[0],L[0]),p;g[0]<L[1]&&(L[0]=Math.min(g[0],L[0]),A=!0)}}return A?p[p.length-1][1]=g[1]:p.push(g),p}};o.CharacterJoinerService=h=u([C(0,R.IBufferService)],h)},5114:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),C=c(8460),v=c(3656);class w extends u.Disposable{constructor(b,h,m){super(),this._textarea=b,this._window=h,this.mainDocument=m,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new x(this._window),this._onDprChange=this.register(new C.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new C.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((p=>this._screenDprMonitor.setWindow(p)))),this.register((0,C.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(b){this._window!==b&&(this._window=b,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}o.CoreBrowserService=w;class x extends u.Disposable{constructor(b){super(),this._parentWindow=b,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new C.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(b){this._parentWindow=b,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,v.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},8934:function(S,o,c){var u=this&&this.__decorate||function(R,b,h,m){var p,g=arguments.length,A=g<3?b:m===null?m=Object.getOwnPropertyDescriptor(b,h):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(R,b,h,m);else for(var D=R.length-1;D>=0;D--)(p=R[D])&&(A=(g<3?p(A):g>3?p(b,h,A):p(b,h))||A);return g>3&&A&&Object.defineProperty(b,h,A),A},C=this&&this.__param||function(R,b){return function(h,m){b(h,m,R)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const v=c(4725),w=c(9806);let x=o.MouseService=class{constructor(R,b){this._renderService=R,this._charSizeService=b}getCoords(R,b,h,m,p){return(0,w.getCoords)(window,R,b,h,m,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,p)}getMouseReportCoords(R,b){const h=(0,w.getCoordsRelativeToElement)(window,R,b);if(this._charSizeService.hasValidSize)return h[0]=Math.min(Math.max(h[0],0),this._renderService.dimensions.css.canvas.width-1),h[1]=Math.min(Math.max(h[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(h[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(h[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(h[0]),y:Math.floor(h[1])}}};o.MouseService=x=u([C(0,v.IRenderService),C(1,v.ICharSizeService)],x)},3230:function(S,o,c){var u=this&&this.__decorate||function(p,g,A,D){var L,T=arguments.length,E=T<3?g:D===null?D=Object.getOwnPropertyDescriptor(g,A):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(p,g,A,D);else for(var B=p.length-1;B>=0;B--)(L=p[B])&&(E=(T<3?L(E):T>3?L(g,A,E):L(g,A))||E);return T>3&&E&&Object.defineProperty(g,A,E),E},C=this&&this.__param||function(p,g){return function(A,D){g(A,D,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const v=c(6193),w=c(4725),x=c(8460),R=c(844),b=c(7226),h=c(2585);let m=o.RenderService=class extends R.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(p,g,A,D,L,T,E,B,W){if(super(),this._rowCount=p,this._charSizeService=D,this._renderer=this.register(new R.MutableDisposable),this._pausedResizeTask=new b.DebouncedIdleTask,this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new x.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new x.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new x.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new x.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new v.RenderDebouncer(E.window,((F,I)=>this._renderRows(F,I))),this.register(this._renderDebouncer),this.register(E.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(A.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(L.onDecorationRegistered((()=>this._fullRefresh()))),this.register(L.onDecorationRemoved((()=>this._fullRefresh()))),this.register(A.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(A.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(W.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in E.window){const F=new E.window.IntersectionObserver((I=>this._handleIntersectionChange(I[I.length-1])),{threshold:0});F.observe(g),this.register({dispose:()=>F.disconnect()})}}_handleIntersectionChange(p){this._isPaused=p.isIntersecting===void 0?p.intersectionRatio===0:!p.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(p,g,A=!1){this._isPaused?this._needsFullRefresh=!0:(A||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(p,g,this._rowCount))}_renderRows(p,g){this._renderer.value&&(p=Math.min(p,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(p,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:p,end:g}),this._onRender.fire({start:p,end:g}),this._isNextRenderRedrawOnly=!0)}resize(p,g){this._rowCount=g,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(p){this._renderer.value=p,this._renderer.value&&(this._renderer.value.onRequestRedraw((g=>this.refreshRows(g.start,g.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(p){return this._renderDebouncer.addRefreshCallback(p)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(p,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value.handleResize(p,g))):this._renderer.value.handleResize(p,g),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(p,g,A){this._selectionState.start=p,this._selectionState.end=g,this._selectionState.columnSelectMode=A,this._renderer.value?.handleSelectionChanged(p,g,A)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};o.RenderService=m=u([C(2,h.IOptionsService),C(3,w.ICharSizeService),C(4,h.IDecorationService),C(5,h.IBufferService),C(6,w.ICoreBrowserService),C(7,h.IInstantiationService),C(8,w.IThemeService)],m)},9312:function(S,o,c){var u=this&&this.__decorate||function(E,B,W,F){var I,V=arguments.length,ee=V<3?B:F===null?F=Object.getOwnPropertyDescriptor(B,W):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(E,B,W,F);else for(var ne=E.length-1;ne>=0;ne--)(I=E[ne])&&(ee=(V<3?I(ee):V>3?I(B,W,ee):I(B,W))||ee);return V>3&&ee&&Object.defineProperty(B,W,ee),ee},C=this&&this.__param||function(E,B){return function(W,F){B(W,F,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const v=c(9806),w=c(9504),x=c(456),R=c(4725),b=c(8460),h=c(844),m=c(6114),p=c(4841),g=c(511),A=c(2585),D=" ",L=new RegExp(D,"g");let T=o.SelectionService=class extends h.Disposable{constructor(E,B,W,F,I,V,ee,ne,q){super(),this._element=E,this._screenElement=B,this._linkifier=W,this._bufferService=F,this._coreService=I,this._mouseService=V,this._optionsService=ee,this._renderService=ne,this._coreBrowserService=q,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new g.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new b.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new b.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Z=>this._handleMouseMove(Z),this._mouseUpListener=Z=>this._handleMouseUp(Z),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Z=>this._handleTrim(Z))),this.register(this._bufferService.buffers.onBufferActivate((Z=>this._handleBufferActivate(Z)))),this.enable(),this._model=new x.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,h.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const E=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!E||!B||E[0]===B[0]&&E[1]===B[1])}get selectionText(){const E=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;if(!E||!B)return"";const W=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(E[0]===B[0])return"";const I=E[0]<B[0]?E[0]:B[0],V=E[0]<B[0]?B[0]:E[0];for(let ee=E[1];ee<=B[1];ee++){const ne=W.translateBufferLineToString(ee,!0,I,V);F.push(ne)}}else{const I=E[1]===B[1]?B[0]:void 0;F.push(W.translateBufferLineToString(E[1],!0,E[0],I));for(let V=E[1]+1;V<=B[1]-1;V++){const ee=W.lines.get(V),ne=W.translateBufferLineToString(V,!0);ee?.isWrapped?F[F.length-1]+=ne:F.push(ne)}if(E[1]!==B[1]){const V=W.lines.get(B[1]),ee=W.translateBufferLineToString(B[1],!0,0,B[0]);V&&V.isWrapped?F[F.length-1]+=ee:F.push(ee)}}return F.map((I=>I.replace(L," "))).join(m.isWindows?`\r
|
|
56
|
+
WARNING: This link could potentially be dangerous`)){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=x=u([C(0,w.IBufferService),C(1,w.IOptionsService),C(2,w.IOscLinkService)],x)},6193:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,u){this._parentWindow=c,this._renderCallback=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,C){this._rowCount=C,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=c(3614),C=c(3656),v=c(6465),w=c(9042),x=c(3730),R=c(1680),b=c(3107),h=c(5744),m=c(2950),p=c(1296),g=c(428),A=c(4269),D=c(5114),L=c(8934),T=c(3230),E=c(9312),B=c(4725),W=c(6731),F=c(8055),I=c(8969),V=c(8460),ee=c(844),ne=c(6114),q=c(8437),Z=c(2584),K=c(7399),j=c(5941),U=c(9074),N=c(2585),z=c(5435),Q=c(4567);class ie extends I.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(G={}){super(G),this.browser=ne,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new ee.MutableDisposable),this._onCursorMove=this.register(new V.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new V.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new V.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new V.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new V.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new V.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new V.EventEmitter),this._onBlur=this.register(new V.EventEmitter),this._onA11yCharEmitter=this.register(new V.EventEmitter),this._onA11yTabEmitter=this.register(new V.EventEmitter),this._onWillOpen=this.register(new V.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(v.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(x.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(U.DecorationService),this._instantiationService.setService(N.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((X,P)=>this.refresh(X,P)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((X=>this._reportWindowsOptions(X)))),this.register(this._inputHandler.onColor((X=>this._handleColorEvent(X)))),this.register((0,V.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,V.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,V.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,V.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((X=>this._afterResize(X.cols,X.rows)))),this.register((0,ee.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(G){if(this._themeService)for(const X of G){let P,he="";switch(X.index){case 256:P="foreground",he="10";break;case 257:P="background",he="11";break;case 258:P="cursor",he="12";break;default:P="ansi",he="4;"+X.index}switch(X.type){case 0:const ge=F.color.toColorRGB(P==="ansi"?this._themeService.colors.ansi[X.index]:this._themeService.colors[P]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${he};${(0,j.toRgbString)(ge)}${Z.C1_ESCAPED.ST}`);break;case 1:if(P==="ansi")this._themeService.modifyColors((oe=>oe.ansi[X.index]=F.rgba.toColor(...X.color)));else{const oe=P;this._themeService.modifyColors((me=>me[oe]=F.rgba.toColor(...X.color)))}break;case 2:this._themeService.restoreColor(X.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(G){G?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Q.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(G){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.updateCursorStyle(G),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const G=this.buffer.ybase+this.buffer.y,X=this.buffer.lines.get(G);if(!X)return;const P=Math.min(this.buffer.x,this.cols-1),he=this._renderService.dimensions.css.cell.height,ge=X.getWidth(P),oe=this._renderService.dimensions.css.cell.width*ge,me=this.buffer.y*this._renderService.dimensions.css.cell.height,Ce=P*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ce+"px",this.textarea.style.top=me+"px",this.textarea.style.width=oe+"px",this.textarea.style.height=he+"px",this.textarea.style.lineHeight=he+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,C.addDisposableDomListener)(this.element,"copy",(X=>{this.hasSelection()&&(0,u.copyHandler)(X,this._selectionService)})));const G=X=>(0,u.handlePasteEvent)(X,this.textarea,this.coreService,this.optionsService);this.register((0,C.addDisposableDomListener)(this.textarea,"paste",G)),this.register((0,C.addDisposableDomListener)(this.element,"paste",G)),ne.isFirefox?this.register((0,C.addDisposableDomListener)(this.element,"mousedown",(X=>{X.button===2&&(0,u.rightClickHandler)(X,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,C.addDisposableDomListener)(this.element,"contextmenu",(X=>{(0,u.rightClickHandler)(X,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ne.isLinux&&this.register((0,C.addDisposableDomListener)(this.element,"auxclick",(X=>{X.button===1&&(0,u.moveTextAreaUnderMouseCursor)(X,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,C.addDisposableDomListener)(this.textarea,"keyup",(G=>this._keyUp(G)),!0)),this.register((0,C.addDisposableDomListener)(this.textarea,"keydown",(G=>this._keyDown(G)),!0)),this.register((0,C.addDisposableDomListener)(this.textarea,"keypress",(G=>this._keyPress(G)),!0)),this.register((0,C.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,C.addDisposableDomListener)(this.textarea,"compositionupdate",(G=>this._compositionHelper.compositionupdate(G)))),this.register((0,C.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,C.addDisposableDomListener)(this.textarea,"input",(G=>this._inputEvent(G)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(G){if(!G)throw new Error("Terminal requires a parent element.");if(G.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=G.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),G.appendChild(this.element);const X=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),X.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),X.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",w.promptLabel),ne.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(D.CoreBrowserService,this.textarea,G.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(B.ICoreBrowserService,this._coreBrowserService),this.register((0,C.addDisposableDomListener)(this.textarea,"focus",(P=>this._handleTextAreaFocus(P)))),this.register((0,C.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(g.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(B.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(W.ThemeService),this._instantiationService.setService(B.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(A.CharacterJoinerService),this._instantiationService.setService(B.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(B.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((P=>this._onRender.fire(P)))),this.onResize((P=>this._renderService.resize(P.cols,P.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(m.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(X);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(L.MouseService),this._instantiationService.setService(B.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(R.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((P=>this.scrollLines(P.amount,P.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(E.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(B.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((P=>this.scrollLines(P.amount,P.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((P=>this._renderService.handleSelectionChanged(P.start,P.end,P.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((P=>{this.textarea.value=P,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((P=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,C.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer,this.screenElement)),this.register((0,C.addDisposableDomListener)(this.element,"mousedown",(P=>this._selectionService.handleMouseDown(P)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(Q.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(P=>this._handleScreenReaderModeOptionChange(P)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(h.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(P=>{!this._overviewRulerRenderer&&P&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(h.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(p.DomRenderer,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier2)}bindMouse(){const G=this,X=this.element;function P(oe){const me=G._mouseService.getMouseReportCoords(oe,G.screenElement);if(!me)return!1;let Ce,ze;switch(oe.overrideType||oe.type){case"mousemove":ze=32,oe.buttons===void 0?(Ce=3,oe.button!==void 0&&(Ce=oe.button<3?oe.button:3)):Ce=1&oe.buttons?0:4&oe.buttons?1:2&oe.buttons?2:3;break;case"mouseup":ze=0,Ce=oe.button<3?oe.button:3;break;case"mousedown":ze=1,Ce=oe.button<3?oe.button:3;break;case"wheel":if(G.viewport.getLinesScrolled(oe)===0)return!1;ze=oe.deltaY<0?0:1,Ce=4;break;default:return!1}return!(ze===void 0||Ce===void 0||Ce>4)&&G.coreMouseService.triggerMouseEvent({col:me.col,row:me.row,x:me.x,y:me.y,button:Ce,action:ze,ctrl:oe.ctrlKey,alt:oe.altKey,shift:oe.shiftKey})}const he={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:oe=>(P(oe),oe.buttons||(this._document.removeEventListener("mouseup",he.mouseup),he.mousedrag&&this._document.removeEventListener("mousemove",he.mousedrag)),this.cancel(oe)),wheel:oe=>(P(oe),this.cancel(oe,!0)),mousedrag:oe=>{oe.buttons&&P(oe)},mousemove:oe=>{oe.buttons||P(oe)}};this.register(this.coreMouseService.onProtocolChange((oe=>{oe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(oe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&oe?he.mousemove||(X.addEventListener("mousemove",ge.mousemove),he.mousemove=ge.mousemove):(X.removeEventListener("mousemove",he.mousemove),he.mousemove=null),16&oe?he.wheel||(X.addEventListener("wheel",ge.wheel,{passive:!1}),he.wheel=ge.wheel):(X.removeEventListener("wheel",he.wheel),he.wheel=null),2&oe?he.mouseup||(he.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",he.mouseup),he.mouseup=null),4&oe?he.mousedrag||(he.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",he.mousedrag),he.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,C.addDisposableDomListener)(X,"mousedown",(oe=>{if(oe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(oe))return P(oe),he.mouseup&&this._document.addEventListener("mouseup",he.mouseup),he.mousedrag&&this._document.addEventListener("mousemove",he.mousedrag),this.cancel(oe)}))),this.register((0,C.addDisposableDomListener)(X,"wheel",(oe=>{if(!he.wheel){if(!this.buffer.hasScrollback){const me=this.viewport.getLinesScrolled(oe);if(me===0)return;const Ce=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(oe.deltaY<0?"A":"B");let ze="";for(let ct=0;ct<Math.abs(me);ct++)ze+=Ce;return this.coreService.triggerDataEvent(ze,!0),this.cancel(oe,!0)}return this.viewport.handleWheel(oe)?this.cancel(oe):void 0}}),{passive:!1})),this.register((0,C.addDisposableDomListener)(X,"touchstart",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(oe),this.cancel(oe)}),{passive:!0})),this.register((0,C.addDisposableDomListener)(X,"touchmove",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(oe)?void 0:this.cancel(oe)}),{passive:!1}))}refresh(G,X){this._renderService?.refreshRows(G,X)}updateCursorStyle(G){this._selectionService?.shouldColumnSelect(G)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(G,X,P=0){P===1?(super.scrollLines(G,X,P),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(G)}paste(G){(0,u.paste)(G,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(G){this._customKeyEventHandler=G}registerLinkProvider(G){return this.linkifier2.registerLinkProvider(G)}registerCharacterJoiner(G){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const X=this._characterJoinerService.register(G);return this.refresh(0,this.rows-1),X}deregisterCharacterJoiner(G){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(G)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(G){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+G)}registerDecoration(G){return this._decorationService.registerDecoration(G)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(G,X,P){this._selectionService.setSelection(G,X,P)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(G,X){this._selectionService?.selectLines(G,X)}_keyDown(G){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1)return!1;const X=this.browser.isMac&&this.options.macOptionIsMeta&&G.altKey;if(!X&&!this._compositionHelper.keydown(G))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;X||G.key!=="Dead"&&G.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const P=(0,K.evaluateKeyboardEvent)(G,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(G),P.type===3||P.type===2){const he=this.rows-1;return this.scrollLines(P.type===2?-he:he),this.cancel(G,!0)}return P.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,G)||(P.cancel&&this.cancel(G,!0),!P.key||!!(G.key&&!G.ctrlKey&&!G.altKey&&!G.metaKey&&G.key.length===1&&G.key.charCodeAt(0)>=65&&G.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(P.key!==Z.C0.ETX&&P.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:P.key,domEvent:G}),this._showCursor(),this.coreService.triggerDataEvent(P.key,!0),!this.optionsService.rawOptions.screenReaderMode||G.altKey||G.ctrlKey?this.cancel(G,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(G,X){const P=G.isMac&&!this.options.macOptionIsMeta&&X.altKey&&!X.ctrlKey&&!X.metaKey||G.isWindows&&X.altKey&&X.ctrlKey&&!X.metaKey||G.isWindows&&X.getModifierState("AltGraph");return X.type==="keypress"?P:P&&(!X.keyCode||X.keyCode>47)}_keyUp(G){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1||((function(X){return X.keyCode===16||X.keyCode===17||X.keyCode===18})(G)||this.focus(),this.updateCursorStyle(G),this._keyPressHandled=!1)}_keyPress(G){let X;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1)return!1;if(this.cancel(G),G.charCode)X=G.charCode;else if(G.which===null||G.which===void 0)X=G.keyCode;else{if(G.which===0||G.charCode===0)return!1;X=G.which}return!(!X||(G.altKey||G.ctrlKey||G.metaKey)&&!this._isThirdLevelShift(this.browser,G)||(X=String.fromCharCode(X),this._onKey.fire({key:X,domEvent:G}),this._showCursor(),this.coreService.triggerDataEvent(X,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(G){if(G.data&&G.inputType==="insertText"&&(!G.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const X=G.data;return this.coreService.triggerDataEvent(X,!0),this.cancel(G),!0}return!1}resize(G,X){G!==this.cols||X!==this.rows?super.resize(G,X):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(G,X){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let G=1;G<this.rows;G++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const G=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=G,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(Z.C0.ESC+"[I"):this.coreService.triggerDataEvent(Z.C0.ESC+"[O")}_reportWindowsOptions(G){if(this._renderService)switch(G){case z.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const X=this._renderService.dimensions.css.canvas.width.toFixed(0),P=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Z.C0.ESC}[4;${P};${X}t`);break;case z.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const he=this._renderService.dimensions.css.cell.width.toFixed(0),ge=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Z.C0.ESC}[6;${ge};${he}t`)}}cancel(G,X){if(this.options.cancelEvents||X)return G.preventDefault(),G.stopPropagation(),!1}}o.Terminal=ie},9924:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,C){this._rowCount=C,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const v=Date.now();if(v-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=v,this._innerRefresh();else if(!this._additionalRefreshRequested){const w=v-this._lastRefreshMs,x=this._debounceThresholdMS-w;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),x)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(S,o,c){var u=this&&this.__decorate||function(m,p,g,A){var D,L=arguments.length,T=L<3?p:A===null?A=Object.getOwnPropertyDescriptor(p,g):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,p,g,A);else for(var E=m.length-1;E>=0;E--)(D=m[E])&&(T=(L<3?D(T):L>3?D(p,g,T):D(p,g))||T);return L>3&&T&&Object.defineProperty(p,g,T),T},C=this&&this.__param||function(m,p){return function(g,A){p(g,A,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const v=c(3656),w=c(4725),x=c(8460),R=c(844),b=c(2585);let h=o.Viewport=class extends R.Disposable{constructor(m,p,g,A,D,L,T,E){super(),this._viewportElement=m,this._scrollArea=p,this._bufferService=g,this._optionsService=A,this._charSizeService=D,this._renderService=L,this._coreBrowserService=T,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((B=>this._renderDimensions=B))),this._handleThemeChange(E.colors),this.register(E.onChangeColors((B=>this._handleThemeChange(B)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(m){this._viewportElement.style.backgroundColor=m.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(m){if(m)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const p=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==p&&(this._lastRecordedBufferHeight=p,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const m=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==m&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=m),this._refreshAnimationFrame=null}syncScrollArea(m=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(m);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(m)}_handleScroll(m){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const p=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:p,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const m=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(m*(this._smoothScrollState.target-this._smoothScrollState.origin)),m<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(m,p){const g=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(p<0&&this._viewportElement.scrollTop!==0||p>0&&g<this._lastRecordedBufferHeight)||(m.cancelable&&m.preventDefault(),!1)}handleWheel(m){const p=this._getPixelsScrolled(m);return p!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+p:this._smoothScrollState.target+=p,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=p,this._bubbleScroll(m,p))}scrollLines(m){if(m!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const p=m*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+p,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:m,suppressScrollEvent:!1})}_getPixelsScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let p=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_LINE?p*=this._currentRowHeight:m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._currentRowHeight*this._bufferService.rows),p}getBufferElements(m,p){let g,A="";const D=[],L=p??this._bufferService.buffer.lines.length,T=this._bufferService.buffer.lines;for(let E=m;E<L;E++){const B=T.get(E);if(!B)continue;const W=T.get(E+1)?.isWrapped;if(A+=B.translateToString(!W),!W||E===T.length-1){const F=document.createElement("div");F.textContent=A,D.push(F),A.length>0&&(g=F),A=""}}return{bufferElements:D,cursorElement:g}}getLinesScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let p=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(p/=this._currentRowHeight+0,this._wheelPartialScroll+=p,p=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._bufferService.rows),p}_applyScrollModifier(m,p){const g=this._optionsService.rawOptions.fastScrollModifier;return g==="alt"&&p.altKey||g==="ctrl"&&p.ctrlKey||g==="shift"&&p.shiftKey?m*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:m*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(m){this._lastTouchY=m.touches[0].pageY}handleTouchMove(m){const p=this._lastTouchY-m.touches[0].pageY;return this._lastTouchY=m.touches[0].pageY,p!==0&&(this._viewportElement.scrollTop+=p,this._bubbleScroll(m,p))}};o.Viewport=h=u([C(2,b.IBufferService),C(3,b.IOptionsService),C(4,w.ICharSizeService),C(5,w.IRenderService),C(6,w.ICoreBrowserService),C(7,w.IThemeService)],h)},3107:function(S,o,c){var u=this&&this.__decorate||function(b,h,m,p){var g,A=arguments.length,D=A<3?h:p===null?p=Object.getOwnPropertyDescriptor(h,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,h,m,p);else for(var L=b.length-1;L>=0;L--)(g=b[L])&&(D=(A<3?g(D):A>3?g(h,m,D):g(h,m))||D);return A>3&&D&&Object.defineProperty(h,m,D),D},C=this&&this.__param||function(b,h){return function(m,p){h(m,p,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const v=c(4725),w=c(844),x=c(2585);let R=o.BufferDecorationRenderer=class extends w.Disposable{constructor(b,h,m,p,g){super(),this._screenElement=b,this._bufferService=h,this._coreBrowserService=m,this._decorationService=p,this._renderService=g,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((A=>this._removeDecoration(A)))),this.register((0,w.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const b of this._decorationService.decorations)this._renderDecoration(b);this._dimensionsChanged=!1}_renderDecoration(b){this._refreshStyle(b),this._dimensionsChanged&&this._refreshXPosition(b)}_createElement(b){const h=this._coreBrowserService.mainDocument.createElement("div");h.classList.add("xterm-decoration"),h.classList.toggle("xterm-decoration-top-layer",b?.options?.layer==="top"),h.style.width=`${Math.round((b.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,h.style.height=(b.options.height||1)*this._renderService.dimensions.css.cell.height+"px",h.style.top=(b.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",h.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const m=b.options.x??0;return m&&m>this._bufferService.cols&&(h.style.display="none"),this._refreshXPosition(b,h),h}_refreshStyle(b){const h=b.marker.line-this._bufferService.buffers.active.ydisp;if(h<0||h>=this._bufferService.rows)b.element&&(b.element.style.display="none",b.onRenderEmitter.fire(b.element));else{let m=this._decorationElements.get(b);m||(m=this._createElement(b),b.element=m,this._decorationElements.set(b,m),this._container.appendChild(m),b.onDispose((()=>{this._decorationElements.delete(b),m.remove()}))),m.style.top=h*this._renderService.dimensions.css.cell.height+"px",m.style.display=this._altBufferIsActive?"none":"block",b.onRenderEmitter.fire(m)}}_refreshXPosition(b,h=b.element){if(!h)return;const m=b.options.x??0;(b.options.anchor||"left")==="right"?h.style.right=m?m*this._renderService.dimensions.css.cell.width+"px":"":h.style.left=m?m*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(b){this._decorationElements.get(b)?.remove(),this._decorationElements.delete(b),b.dispose()}};o.BufferDecorationRenderer=R=u([C(1,x.IBufferService),C(2,v.ICoreBrowserService),C(3,x.IDecorationService),C(4,v.IRenderService)],R)},5871:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,u){return u>=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,C){return u>=c.startBufferLine-this._linePadding[C||"full"]&&u<=c.endBufferLine+this._linePadding[C||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(S,o,c){var u=this&&this.__decorate||function(g,A,D,L){var T,E=arguments.length,B=E<3?A:L===null?L=Object.getOwnPropertyDescriptor(A,D):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,A,D,L);else for(var W=g.length-1;W>=0;W--)(T=g[W])&&(B=(E<3?T(B):E>3?T(A,D,B):T(A,D))||B);return E>3&&B&&Object.defineProperty(A,D,B),B},C=this&&this.__param||function(g,A){return function(D,L){A(D,L,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const v=c(5871),w=c(4725),x=c(844),R=c(2585),b={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0},m={full:0,left:0,center:0,right:0};let p=o.OverviewRulerRenderer=class extends x.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,A,D,L,T,E,B){super(),this._viewportElement=g,this._screenElement=A,this._bufferService=D,this._decorationService=L,this._renderService=T,this._optionsService=E,this._coreBrowserService=B,this._colorZoneStore=new v.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const W=this._canvas.getContext("2d");if(!W)throw new Error("Ctx cannot be null");this._ctx=W,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,x.toDisposable)((()=>{this._canvas?.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const g=Math.floor(this._canvas.width/3),A=Math.ceil(this._canvas.width/3);h.full=this._canvas.width,h.left=g,h.center=A,h.right=g,this._refreshDrawHeightConstants(),m.full=0,m.left=0,m.center=h.left,m.right=h.left+h.center}_refreshDrawHeightConstants(){b.full=Math.round(2*this._coreBrowserService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,A=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowserService.dpr);b.left=A,b.center=A,b.right=A}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const A of this._decorationService.decorations)this._colorZoneStore.addDecoration(A);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const A of g)A.position!=="full"&&this._renderColorZone(A);for(const A of g)A.position==="full"&&this._renderColorZone(A);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(m[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-b[g.position||"full"]/2),h[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+b[g.position||"full"]))}_queueRefresh(g,A){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=A||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=p=u([C(2,R.IBufferService),C(3,R.IDecorationService),C(4,w.IRenderService),C(5,R.IOptionsService),C(6,w.ICoreBrowserService)],p)},2950:function(S,o,c){var u=this&&this.__decorate||function(b,h,m,p){var g,A=arguments.length,D=A<3?h:p===null?p=Object.getOwnPropertyDescriptor(h,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,h,m,p);else for(var L=b.length-1;L>=0;L--)(g=b[L])&&(D=(A<3?g(D):A>3?g(h,m,D):g(h,m))||D);return A>3&&D&&Object.defineProperty(h,m,D),D},C=this&&this.__param||function(b,h){return function(m,p){h(m,p,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const v=c(4725),w=c(2585),x=c(2584);let R=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(b,h,m,p,g,A){this._textarea=b,this._compositionView=h,this._bufferService=m,this._optionsService=p,this._coreService=g,this._renderService=A,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(b){this._compositionView.textContent=b.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(b){if(this._isComposing||this._isSendingComposition){if(b.keyCode===229||b.keyCode===16||b.keyCode===17||b.keyCode===18)return!1;this._finalizeComposition(!1)}return b.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(b){if(this._compositionView.classList.remove("active"),this._isComposing=!1,b){const h={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let m;this._isSendingComposition=!1,h.start+=this._dataAlreadySent.length,m=this._isComposing?this._textarea.value.substring(h.start,h.end):this._textarea.value.substring(h.start),m.length>0&&this._coreService.triggerDataEvent(m,!0)}}),0)}else{this._isSendingComposition=!1;const h=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(h,!0)}}_handleAnyTextareaChanges(){const b=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const h=this._textarea.value,m=h.replace(b,"");this._dataAlreadySent=m,h.length>b.length?this._coreService.triggerDataEvent(m,!0):h.length<b.length?this._coreService.triggerDataEvent(`${x.C0.DEL}`,!0):h.length===b.length&&h!==b&&this._coreService.triggerDataEvent(h,!0)}}),0)}updateCompositionElements(b){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const h=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),m=this._renderService.dimensions.css.cell.height,p=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,g=h*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=g+"px",this._compositionView.style.top=p+"px",this._compositionView.style.height=m+"px",this._compositionView.style.lineHeight=m+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const A=this._compositionView.getBoundingClientRect();this._textarea.style.left=g+"px",this._textarea.style.top=p+"px",this._textarea.style.width=Math.max(A.width,1)+"px",this._textarea.style.height=Math.max(A.height,1)+"px",this._textarea.style.lineHeight=A.height+"px"}b||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};o.CompositionHelper=R=u([C(2,w.IBufferService),C(3,w.IOptionsService),C(4,w.ICoreService),C(5,v.IRenderService)],R)},9806:(S,o)=>{function c(u,C,v){const w=v.getBoundingClientRect(),x=u.getComputedStyle(v),R=parseInt(x.getPropertyValue("padding-left")),b=parseInt(x.getPropertyValue("padding-top"));return[C.clientX-w.left-R,C.clientY-w.top-b]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,C,v,w,x,R,b,h,m){if(!R)return;const p=c(u,C,v);return p?(p[0]=Math.ceil((p[0]+(m?b/2:0))/b),p[1]=Math.ceil(p[1]/h),p[0]=Math.min(Math.max(p[0],1),w+(m?1:0)),p[1]=Math.min(Math.max(p[1],1),x),p):void 0}},9504:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function C(h,m,p,g){const A=h-v(h,p),D=m-v(m,p),L=Math.abs(A-D)-(function(T,E,B){let W=0;const F=T-v(T,B),I=E-v(E,B);for(let V=0;V<Math.abs(F-I);V++){const ee=w(T,E)==="A"?-1:1;B.buffer.lines.get(F+ee*V)?.isWrapped&&W++}return W})(h,m,p);return b(L,R(w(h,m),g))}function v(h,m){let p=0,g=m.buffer.lines.get(h),A=g?.isWrapped;for(;A&&h>=0&&h<m.rows;)p++,g=m.buffer.lines.get(--h),A=g?.isWrapped;return p}function w(h,m){return h>m?"A":"B"}function x(h,m,p,g,A,D){let L=h,T=m,E="";for(;L!==p||T!==g;)L+=A?1:-1,A&&L>D.cols-1?(E+=D.buffer.translateBufferLineToString(T,!1,h,L),L=0,h=0,T++):!A&&L<0&&(E+=D.buffer.translateBufferLineToString(T,!1,0,h+1),L=D.cols-1,h=L,T--);return E+D.buffer.translateBufferLineToString(T,!1,h,L)}function R(h,m){const p=m?"O":"[";return u.C0.ESC+p+h}function b(h,m){h=Math.floor(h);let p="";for(let g=0;g<h;g++)p+=m;return p}o.moveToCellSequence=function(h,m,p,g){const A=p.buffer.x,D=p.buffer.y;if(!p.buffer.hasScrollback)return(function(E,B,W,F,I,V){return C(B,F,I,V).length===0?"":b(x(E,B,E,B-v(B,I),!1,I).length,R("D",V))})(A,D,0,m,p,g)+C(D,m,p,g)+(function(E,B,W,F,I,V){let ee;ee=C(B,F,I,V).length>0?F-v(F,I):B;const ne=F,q=(function(Z,K,j,U,N,z){let Q;return Q=C(j,U,N,z).length>0?U-v(U,N):K,Z<j&&Q<=U||Z>=j&&Q<U?"C":"D"})(E,B,W,F,I,V);return b(x(E,ee,W,ne,q==="C",I).length,R(q,V))})(A,D,h,m,p,g);let L;if(D===m)return L=A>h?"D":"C",b(Math.abs(A-h),R(L,g));L=D>m?"D":"C";const T=Math.abs(D-m);return b((function(E,B){return B.cols-E})(D>m?h:A,p)+(T-1)*p.cols+1+((D>m?A:h)-1),R(L,g))}},1296:function(S,o,c){var u=this&&this.__decorate||function(I,V,ee,ne){var q,Z=arguments.length,K=Z<3?V:ne===null?ne=Object.getOwnPropertyDescriptor(V,ee):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(I,V,ee,ne);else for(var j=I.length-1;j>=0;j--)(q=I[j])&&(K=(Z<3?q(K):Z>3?q(V,ee,K):q(V,ee))||K);return Z>3&&K&&Object.defineProperty(V,ee,K),K},C=this&&this.__param||function(I,V){return function(ee,ne){V(ee,ne,I)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const v=c(3787),w=c(2550),x=c(2223),R=c(6171),b=c(4725),h=c(8055),m=c(8460),p=c(844),g=c(2585),A="xterm-dom-renderer-owner-",D="xterm-rows",L="xterm-fg-",T="xterm-bg-",E="xterm-focus",B="xterm-selection";let W=1,F=o.DomRenderer=class extends p.Disposable{constructor(I,V,ee,ne,q,Z,K,j,U,N,z,Q){super(),this._document=I,this._element=V,this._screenElement=ee,this._viewportElement=ne,this._helperContainer=q,this._linkifier2=Z,this._charSizeService=j,this._optionsService=U,this._bufferService=N,this._coreBrowserService=z,this._themeService=Q,this._terminalClass=W++,this._rowElements=[],this.onRequestRedraw=this.register(new m.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(B),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,R.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ie=>this._injectCss(ie)))),this._injectCss(this._themeService.colors),this._rowFactory=K.createInstance(v.DomRendererRowFactory,document),this._element.classList.add(A+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ie=>this._handleLinkHover(ie)))),this.register(this._linkifier2.onHideLinkUnderline((ie=>this._handleLinkLeave(ie)))),this.register((0,p.toDisposable)((()=>{this._element.classList.remove(A+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new w.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const I=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*I,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*I),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/I),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/I),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const ee of this._rowElements)ee.style.width=`${this.dimensions.css.canvas.width}px`,ee.style.height=`${this.dimensions.css.cell.height}px`,ee.style.lineHeight=`${this.dimensions.css.cell.height}px`,ee.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(I){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${D} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${D} .xterm-dim { color: ${h.color.multiplyOpacity(I.foreground,.5).css};}`,V+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`,V+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",V+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,V+=`${this._terminalSelector} .${D}.${E} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${D}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${B} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${B} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${B} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,ne]of I.ansi.entries())V+=`${this._terminalSelector} .${L}${ee} { color: ${ne.css}; }${this._terminalSelector} .${L}${ee}.xterm-dim { color: ${h.color.multiplyOpacity(ne,.5).css}; }${this._terminalSelector} .${T}${ee} { background-color: ${ne.css}; }`;V+=`${this._terminalSelector} .${L}${x.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(I.background).css}; }${this._terminalSelector} .${L}${x.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${T}${x.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const I=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${I}px`,this._rowFactory.defaultSpacing=I}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(I,V){for(let ee=this._rowElements.length;ee<=V;ee++){const ne=this._document.createElement("div");this._rowContainer.appendChild(ne),this._rowElements.push(ne)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,V){this._refreshRowElements(I,V),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(E),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(E),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(I,V,ee){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,V,ee),this.renderRows(0,this._bufferService.rows-1),!I||!V)return;const ne=I[1]-this._bufferService.buffer.ydisp,q=V[1]-this._bufferService.buffer.ydisp,Z=Math.max(ne,0),K=Math.min(q,this._bufferService.rows-1);if(Z>=this._bufferService.rows||K<0)return;const j=this._document.createDocumentFragment();if(ee){const U=I[0]>V[0];j.appendChild(this._createSelectionElement(Z,U?V[0]:I[0],U?I[0]:V[0],K-Z+1))}else{const U=ne===Z?I[0]:0,N=Z===q?V[0]:this._bufferService.cols;j.appendChild(this._createSelectionElement(Z,U,N));const z=K-Z-1;if(j.appendChild(this._createSelectionElement(Z+1,0,this._bufferService.cols,z)),Z!==K){const Q=q===K?V[0]:this._bufferService.cols;j.appendChild(this._createSelectionElement(K,0,Q))}}this._selectionContainer.appendChild(j)}_createSelectionElement(I,V,ee,ne=1){const q=this._document.createElement("div");return q.style.height=ne*this.dimensions.css.cell.height+"px",q.style.top=I*this.dimensions.css.cell.height+"px",q.style.left=V*this.dimensions.css.cell.width+"px",q.style.width=this.dimensions.css.cell.width*(ee-V)+"px",q}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const I of this._rowElements)I.replaceChildren()}renderRows(I,V){const ee=this._bufferService.buffer,ne=ee.ybase+ee.y,q=Math.min(ee.x,this._bufferService.cols-1),Z=this._optionsService.rawOptions.cursorBlink,K=this._optionsService.rawOptions.cursorStyle,j=this._optionsService.rawOptions.cursorInactiveStyle;for(let U=I;U<=V;U++){const N=U+ee.ydisp,z=this._rowElements[U],Q=ee.lines.get(N);if(!z||!Q)break;z.replaceChildren(...this._rowFactory.createRow(Q,N,N===ne,K,j,q,Z,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${A}${this._terminalClass}`}_handleLinkHover(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!0)}_handleLinkLeave(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!1)}_setCellUnderline(I,V,ee,ne,q,Z){ee<0&&(I=0),ne<0&&(V=0);const K=this._bufferService.rows-1;ee=Math.max(Math.min(ee,K),0),ne=Math.max(Math.min(ne,K),0),q=Math.min(q,this._bufferService.cols);const j=this._bufferService.buffer,U=j.ybase+j.y,N=Math.min(j.x,q-1),z=this._optionsService.rawOptions.cursorBlink,Q=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let de=ee;de<=ne;++de){const G=de+j.ydisp,X=this._rowElements[de],P=j.lines.get(G);if(!X||!P)break;X.replaceChildren(...this._rowFactory.createRow(P,G,G===U,Q,ie,N,z,this.dimensions.css.cell.width,this._widthCache,Z?de===ee?I:0:-1,Z?(de===ne?V:q)-1:-1))}}};o.DomRenderer=F=u([C(6,g.IInstantiationService),C(7,b.ICharSizeService),C(8,g.IOptionsService),C(9,g.IBufferService),C(10,b.ICoreBrowserService),C(11,b.IThemeService)],F)},3787:function(S,o,c){var u=this&&this.__decorate||function(L,T,E,B){var W,F=arguments.length,I=F<3?T:B===null?B=Object.getOwnPropertyDescriptor(T,E):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(L,T,E,B);else for(var V=L.length-1;V>=0;V--)(W=L[V])&&(I=(F<3?W(I):F>3?W(T,E,I):W(T,E))||I);return F>3&&I&&Object.defineProperty(T,E,I),I},C=this&&this.__param||function(L,T){return function(E,B){T(E,B,L)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const v=c(2223),w=c(643),x=c(511),R=c(2585),b=c(8055),h=c(4725),m=c(4269),p=c(6171),g=c(3734);let A=o.DomRendererRowFactory=class{constructor(L,T,E,B,W,F,I){this._document=L,this._characterJoinerService=T,this._optionsService=E,this._coreBrowserService=B,this._coreService=W,this._decorationService=F,this._themeService=I,this._workCell=new x.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(L,T,E){this._selectionStart=L,this._selectionEnd=T,this._columnSelectMode=E}createRow(L,T,E,B,W,F,I,V,ee,ne,q){const Z=[],K=this._characterJoinerService.getJoinedCharacters(T),j=this._themeService.colors;let U,N=L.getNoBgTrimmedLength();E&&N<F+1&&(N=F+1);let z=0,Q="",ie=0,de=0,G=0,X=!1,P=0,he=!1,ge=0;const oe=[],me=ne!==-1&&q!==-1;for(let Ce=0;Ce<N;Ce++){L.loadCell(Ce,this._workCell);let ze=this._workCell.getWidth();if(ze===0)continue;let ct=!1,tt=Ce,ke=this._workCell;if(K.length>0&&Ce===K[0][0]){ct=!0;const rt=K.shift();ke=new m.JoinedCellData(this._workCell,L.translateToString(!0,rt[0],rt[1]),rt[1]-rt[0]),tt=rt[1]-1,ze=ke.getWidth()}const Qr=this._isCellInSelection(Ce,T),Zr=E&&Ce===F,mi=me&&Ce>=ne&&Ce<=q;let pi=!1;this._decorationService.forEachDecorationAtCell(Ce,T,void 0,(rt=>{pi=!0}));let Wi=ke.getChars()||w.WHITESPACE_CELL_CHAR;if(Wi===" "&&(ke.isUnderline()||ke.isOverline())&&(Wi=" "),ge=ze*V-ee.get(Wi,ke.isBold(),ke.isItalic()),U){if(z&&(Qr&&he||!Qr&&!he&&ke.bg===ie)&&(Qr&&he&&j.selectionForeground||ke.fg===de)&&ke.extended.ext===G&&mi===X&&ge===P&&!Zr&&!ct&&!pi){ke.isInvisible()?Q+=w.WHITESPACE_CELL_CHAR:Q+=Wi,z++;continue}z&&(U.textContent=Q),U=this._document.createElement("span"),z=0,Q=""}else U=this._document.createElement("span");if(ie=ke.bg,de=ke.fg,G=ke.extended.ext,X=mi,P=ge,he=Qr,ct&&F>=Ce&&F<=tt&&(F=Ce),!this._coreService.isCursorHidden&&Zr&&this._coreService.isCursorInitialized){if(oe.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&oe.push("xterm-cursor-blink"),oe.push(B==="bar"?"xterm-cursor-bar":B==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(W)switch(W){case"outline":oe.push("xterm-cursor-outline");break;case"block":oe.push("xterm-cursor-block");break;case"bar":oe.push("xterm-cursor-bar");break;case"underline":oe.push("xterm-cursor-underline")}}if(ke.isBold()&&oe.push("xterm-bold"),ke.isItalic()&&oe.push("xterm-italic"),ke.isDim()&&oe.push("xterm-dim"),Q=ke.isInvisible()?w.WHITESPACE_CELL_CHAR:ke.getChars()||w.WHITESPACE_CELL_CHAR,ke.isUnderline()&&(oe.push(`xterm-underline-${ke.extended.underlineStyle}`),Q===" "&&(Q=" "),!ke.isUnderlineColorDefault()))if(ke.isUnderlineColorRGB())U.style.textDecorationColor=`rgb(${g.AttributeData.toColorRGB(ke.getUnderlineColor()).join(",")})`;else{let rt=ke.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ke.isBold()&&rt<8&&(rt+=8),U.style.textDecorationColor=j.ansi[rt].css}ke.isOverline()&&(oe.push("xterm-overline"),Q===" "&&(Q=" ")),ke.isStrikethrough()&&oe.push("xterm-strikethrough"),mi&&(U.style.textDecoration="underline");let Gt=ke.getFgColor(),ut=ke.getFgColorMode(),Nt=ke.getBgColor(),Ur=ke.getBgColorMode();const Jr=!!ke.isInverse();if(Jr){const rt=Gt;Gt=Nt,Nt=rt;const gi=ut;ut=Ur,Ur=gi}let gt,$t,er,vi=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,T,void 0,(rt=>{rt.options.layer!=="top"&&vi||(rt.backgroundColorRGB&&(Ur=50331648,Nt=rt.backgroundColorRGB.rgba>>8&16777215,gt=rt.backgroundColorRGB),rt.foregroundColorRGB&&(ut=50331648,Gt=rt.foregroundColorRGB.rgba>>8&16777215,$t=rt.foregroundColorRGB),vi=rt.options.layer==="top")})),!vi&&Qr&&(gt=this._coreBrowserService.isFocused?j.selectionBackgroundOpaque:j.selectionInactiveBackgroundOpaque,Nt=gt.rgba>>8&16777215,Ur=50331648,vi=!0,j.selectionForeground&&(ut=50331648,Gt=j.selectionForeground.rgba>>8&16777215,$t=j.selectionForeground)),vi&&oe.push("xterm-decoration-top"),Ur){case 16777216:case 33554432:er=j.ansi[Nt],oe.push(`xterm-bg-${Nt}`);break;case 50331648:er=b.rgba.toColor(Nt>>16,Nt>>8&255,255&Nt),this._addStyle(U,`background-color:#${D((Nt>>>0).toString(16),"0",6)}`);break;default:Jr?(er=j.foreground,oe.push(`xterm-bg-${v.INVERTED_DEFAULT_COLOR}`)):er=j.background}switch(gt||ke.isDim()&&(gt=b.color.multiplyOpacity(er,.5)),ut){case 16777216:case 33554432:ke.isBold()&&Gt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Gt+=8),this._applyMinimumContrast(U,er,j.ansi[Gt],ke,gt,void 0)||oe.push(`xterm-fg-${Gt}`);break;case 50331648:const rt=b.rgba.toColor(Gt>>16&255,Gt>>8&255,255&Gt);this._applyMinimumContrast(U,er,rt,ke,gt,$t)||this._addStyle(U,`color:#${D(Gt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(U,er,j.foreground,ke,gt,$t)||Jr&&oe.push(`xterm-fg-${v.INVERTED_DEFAULT_COLOR}`)}oe.length&&(U.className=oe.join(" "),oe.length=0),Zr||ct||pi?U.textContent=Q:z++,ge!==this.defaultSpacing&&(U.style.letterSpacing=`${ge}px`),Z.push(U),Ce=tt}return U&&z&&(U.textContent=Q),Z}_applyMinimumContrast(L,T,E,B,W,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,p.excludeFromContrastRatioDemands)(B.getCode()))return!1;const I=this._getContrastCache(B);let V;if(W||F||(V=I.getColor(T.rgba,E.rgba)),V===void 0){const ee=this._optionsService.rawOptions.minimumContrastRatio/(B.isDim()?2:1);V=b.color.ensureContrastRatio(W||T,F||E,ee),I.setColor((W||T).rgba,(F||E).rgba,V??null)}return!!V&&(this._addStyle(L,`color:${V.css}`),!0)}_getContrastCache(L){return L.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(L,T){L.setAttribute("style",`${L.getAttribute("style")||""}${T};`)}_isCellInSelection(L,T){const E=this._selectionStart,B=this._selectionEnd;return!(!E||!B)&&(this._columnSelectMode?E[0]<=B[0]?L>=E[0]&&T>=E[1]&&L<B[0]&&T<=B[1]:L<E[0]&&T>=E[1]&&L>=B[0]&&T<=B[1]:T>E[1]&&T<B[1]||E[1]===B[1]&&T===E[1]&&L>=E[0]&&L<B[0]||E[1]<B[1]&&T===B[1]&&L<B[0]||E[1]<B[1]&&T===E[1]&&L>=E[0])}};function D(L,T,E){for(;L.length<E;)L=T+L;return L}o.DomRendererRowFactory=A=u([C(1,h.ICharacterJoinerService),C(2,R.IOptionsService),C(3,h.ICoreBrowserService),C(4,R.ICoreService),C(5,R.IDecorationService),C(6,h.IThemeService)],A)},2550:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const C=c.createElement("span");C.classList.add("xterm-char-measure-element");const v=c.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontWeight="bold";const w=c.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontStyle="italic";const x=c.createElement("span");x.classList.add("xterm-char-measure-element"),x.style.fontWeight="bold",x.style.fontStyle="italic",this._measureElements=[C,v,w,x],this._container.appendChild(C),this._container.appendChild(v),this._container.appendChild(w),this._container.appendChild(x),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,C,v){c===this._font&&u===this._fontSize&&C===this._weight&&v===this._weightBold||(this._font=c,this._fontSize=u,this._weight=C,this._weightBold=v,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${C}`,this._measureElements[1].style.fontWeight=`${v}`,this._measureElements[2].style.fontWeight=`${C}`,this._measureElements[3].style.fontWeight=`${v}`,this.clear())}get(c,u,C){let v=0;if(!u&&!C&&c.length===1&&(v=c.charCodeAt(0))<256)return this._flat[v]!==-9999?this._flat[v]:this._flat[v]=this._measure(c,0);let w=c;u&&(w+="B"),C&&(w+="I");let x=this._holey.get(w);if(x===void 0){let R=0;u&&(R|=1),C&&(R|=2),x=this._measure(c,R),this._holey.set(w,x)}return x}_measure(c,u){const C=this._measureElements[u];return C.textContent=c.repeat(32),C.offsetWidth/32}}},2223:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(S,o)=>{function c(u){return 57508<=u&&u<=57558}Object.defineProperty(o,"__esModule",{value:!0}),o.createRenderDimensions=o.excludeFromContrastRatioDemands=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(u){if(!u)throw new Error("value must not be falsy");return u},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(u){return 57520<=u&&u<=57527},o.excludeFromContrastRatioDemands=function(u){return c(u)||(function(C){return 9472<=C&&C<=9631})(u)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}}},456:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(S,o,c){var u=this&&this.__decorate||function(h,m,p,g){var A,D=arguments.length,L=D<3?m:g===null?g=Object.getOwnPropertyDescriptor(m,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(h,m,p,g);else for(var T=h.length-1;T>=0;T--)(A=h[T])&&(L=(D<3?A(L):D>3?A(m,p,L):A(m,p))||L);return D>3&&L&&Object.defineProperty(m,p,L),L},C=this&&this.__param||function(h,m){return function(p,g){m(p,g,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const v=c(2585),w=c(8460),x=c(844);let R=o.CharSizeService=class extends x.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(h,m,p){super(),this._optionsService=p,this.width=0,this.height=0,this._onCharSizeChange=this.register(new w.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new b(h,m,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const h=this._measureStrategy.measure();h.width===this.width&&h.height===this.height||(this.width=h.width,this.height=h.height,this._onCharSizeChange.fire())}};o.CharSizeService=R=u([C(2,v.IOptionsService)],R);class b{constructor(m,p,g){this._document=m,this._parentElement=p,this._optionsService=g,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const m={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return m.width!==0&&m.height!==0&&(this._result.width=m.width/32,this._result.height=Math.ceil(m.height)),this._result}}},4269:function(S,o,c){var u=this&&this.__decorate||function(m,p,g,A){var D,L=arguments.length,T=L<3?p:A===null?A=Object.getOwnPropertyDescriptor(p,g):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,p,g,A);else for(var E=m.length-1;E>=0;E--)(D=m[E])&&(T=(L<3?D(T):L>3?D(p,g,T):D(p,g))||T);return L>3&&T&&Object.defineProperty(p,g,T),T},C=this&&this.__param||function(m,p){return function(g,A){p(g,A,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const v=c(3734),w=c(643),x=c(511),R=c(2585);class b extends v.AttributeData{constructor(p,g,A){super(),this.content=0,this.combinedData="",this.fg=p.fg,this.bg=p.bg,this.combinedData=g,this._width=A}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(p){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=b;let h=o.CharacterJoinerService=class sS{constructor(p){this._bufferService=p,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new x.CellData}register(p){const g={id:this._nextCharacterJoinerId++,handler:p};return this._characterJoiners.push(g),g.id}deregister(p){for(let g=0;g<this._characterJoiners.length;g++)if(this._characterJoiners[g].id===p)return this._characterJoiners.splice(g,1),!0;return!1}getJoinedCharacters(p){if(this._characterJoiners.length===0)return[];const g=this._bufferService.buffer.lines.get(p);if(!g||g.length===0)return[];const A=[],D=g.translateToString(!0);let L=0,T=0,E=0,B=g.getFg(0),W=g.getBg(0);for(let F=0;F<g.getTrimmedLength();F++)if(g.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==B||this._workCell.bg!==W){if(F-L>1){const I=this._getJoinedRanges(D,E,T,g,L);for(let V=0;V<I.length;V++)A.push(I[V])}L=F,E=T,B=this._workCell.fg,W=this._workCell.bg}T+=this._workCell.getChars().length||w.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-L>1){const F=this._getJoinedRanges(D,E,T,g,L);for(let I=0;I<F.length;I++)A.push(F[I])}return A}_getJoinedRanges(p,g,A,D,L){const T=p.substring(g,A);let E=[];try{E=this._characterJoiners[0].handler(T)}catch(B){console.error(B)}for(let B=1;B<this._characterJoiners.length;B++)try{const W=this._characterJoiners[B].handler(T);for(let F=0;F<W.length;F++)sS._mergeRanges(E,W[F])}catch(W){console.error(W)}return this._stringRangesToCellRanges(E,D,L),E}_stringRangesToCellRanges(p,g,A){let D=0,L=!1,T=0,E=p[D];if(E){for(let B=A;B<this._bufferService.cols;B++){const W=g.getWidth(B),F=g.getString(B).length||w.WHITESPACE_CELL_CHAR.length;if(W!==0){if(!L&&E[0]<=T&&(E[0]=B,L=!0),E[1]<=T){if(E[1]=B,E=p[++D],!E)break;E[0]<=T?(E[0]=B,L=!0):L=!1}T+=F}}E&&(E[1]=this._bufferService.cols)}}static _mergeRanges(p,g){let A=!1;for(let D=0;D<p.length;D++){const L=p[D];if(A){if(g[1]<=L[0])return p[D-1][1]=g[1],p;if(g[1]<=L[1])return p[D-1][1]=Math.max(g[1],L[1]),p.splice(D,1),p;p.splice(D,1),D--}else{if(g[1]<=L[0])return p.splice(D,0,g),p;if(g[1]<=L[1])return L[0]=Math.min(g[0],L[0]),p;g[0]<L[1]&&(L[0]=Math.min(g[0],L[0]),A=!0)}}return A?p[p.length-1][1]=g[1]:p.push(g),p}};o.CharacterJoinerService=h=u([C(0,R.IBufferService)],h)},5114:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),C=c(8460),v=c(3656);class w extends u.Disposable{constructor(b,h,m){super(),this._textarea=b,this._window=h,this.mainDocument=m,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new x(this._window),this._onDprChange=this.register(new C.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new C.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((p=>this._screenDprMonitor.setWindow(p)))),this.register((0,C.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(b){this._window!==b&&(this._window=b,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}o.CoreBrowserService=w;class x extends u.Disposable{constructor(b){super(),this._parentWindow=b,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new C.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(b){this._parentWindow=b,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,v.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},8934:function(S,o,c){var u=this&&this.__decorate||function(R,b,h,m){var p,g=arguments.length,A=g<3?b:m===null?m=Object.getOwnPropertyDescriptor(b,h):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(R,b,h,m);else for(var D=R.length-1;D>=0;D--)(p=R[D])&&(A=(g<3?p(A):g>3?p(b,h,A):p(b,h))||A);return g>3&&A&&Object.defineProperty(b,h,A),A},C=this&&this.__param||function(R,b){return function(h,m){b(h,m,R)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const v=c(4725),w=c(9806);let x=o.MouseService=class{constructor(R,b){this._renderService=R,this._charSizeService=b}getCoords(R,b,h,m,p){return(0,w.getCoords)(window,R,b,h,m,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,p)}getMouseReportCoords(R,b){const h=(0,w.getCoordsRelativeToElement)(window,R,b);if(this._charSizeService.hasValidSize)return h[0]=Math.min(Math.max(h[0],0),this._renderService.dimensions.css.canvas.width-1),h[1]=Math.min(Math.max(h[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(h[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(h[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(h[0]),y:Math.floor(h[1])}}};o.MouseService=x=u([C(0,v.IRenderService),C(1,v.ICharSizeService)],x)},3230:function(S,o,c){var u=this&&this.__decorate||function(p,g,A,D){var L,T=arguments.length,E=T<3?g:D===null?D=Object.getOwnPropertyDescriptor(g,A):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(p,g,A,D);else for(var B=p.length-1;B>=0;B--)(L=p[B])&&(E=(T<3?L(E):T>3?L(g,A,E):L(g,A))||E);return T>3&&E&&Object.defineProperty(g,A,E),E},C=this&&this.__param||function(p,g){return function(A,D){g(A,D,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const v=c(6193),w=c(4725),x=c(8460),R=c(844),b=c(7226),h=c(2585);let m=o.RenderService=class extends R.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(p,g,A,D,L,T,E,B,W){if(super(),this._rowCount=p,this._charSizeService=D,this._renderer=this.register(new R.MutableDisposable),this._pausedResizeTask=new b.DebouncedIdleTask,this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new x.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new x.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new x.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new x.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new v.RenderDebouncer(E.window,((F,I)=>this._renderRows(F,I))),this.register(this._renderDebouncer),this.register(E.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(A.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(L.onDecorationRegistered((()=>this._fullRefresh()))),this.register(L.onDecorationRemoved((()=>this._fullRefresh()))),this.register(A.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(A.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(W.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in E.window){const F=new E.window.IntersectionObserver((I=>this._handleIntersectionChange(I[I.length-1])),{threshold:0});F.observe(g),this.register({dispose:()=>F.disconnect()})}}_handleIntersectionChange(p){this._isPaused=p.isIntersecting===void 0?p.intersectionRatio===0:!p.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(p,g,A=!1){this._isPaused?this._needsFullRefresh=!0:(A||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(p,g,this._rowCount))}_renderRows(p,g){this._renderer.value&&(p=Math.min(p,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(p,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:p,end:g}),this._onRender.fire({start:p,end:g}),this._isNextRenderRedrawOnly=!0)}resize(p,g){this._rowCount=g,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(p){this._renderer.value=p,this._renderer.value&&(this._renderer.value.onRequestRedraw((g=>this.refreshRows(g.start,g.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(p){return this._renderDebouncer.addRefreshCallback(p)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(p,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value.handleResize(p,g))):this._renderer.value.handleResize(p,g),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(p,g,A){this._selectionState.start=p,this._selectionState.end=g,this._selectionState.columnSelectMode=A,this._renderer.value?.handleSelectionChanged(p,g,A)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};o.RenderService=m=u([C(2,h.IOptionsService),C(3,w.ICharSizeService),C(4,h.IDecorationService),C(5,h.IBufferService),C(6,w.ICoreBrowserService),C(7,h.IInstantiationService),C(8,w.IThemeService)],m)},9312:function(S,o,c){var u=this&&this.__decorate||function(E,B,W,F){var I,V=arguments.length,ee=V<3?B:F===null?F=Object.getOwnPropertyDescriptor(B,W):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(E,B,W,F);else for(var ne=E.length-1;ne>=0;ne--)(I=E[ne])&&(ee=(V<3?I(ee):V>3?I(B,W,ee):I(B,W))||ee);return V>3&&ee&&Object.defineProperty(B,W,ee),ee},C=this&&this.__param||function(E,B){return function(W,F){B(W,F,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const v=c(9806),w=c(9504),x=c(456),R=c(4725),b=c(8460),h=c(844),m=c(6114),p=c(4841),g=c(511),A=c(2585),D=" ",L=new RegExp(D,"g");let T=o.SelectionService=class extends h.Disposable{constructor(E,B,W,F,I,V,ee,ne,q){super(),this._element=E,this._screenElement=B,this._linkifier=W,this._bufferService=F,this._coreService=I,this._mouseService=V,this._optionsService=ee,this._renderService=ne,this._coreBrowserService=q,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new g.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new b.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new b.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Z=>this._handleMouseMove(Z),this._mouseUpListener=Z=>this._handleMouseUp(Z),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Z=>this._handleTrim(Z))),this.register(this._bufferService.buffers.onBufferActivate((Z=>this._handleBufferActivate(Z)))),this.enable(),this._model=new x.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,h.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const E=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!E||!B||E[0]===B[0]&&E[1]===B[1])}get selectionText(){const E=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;if(!E||!B)return"";const W=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(E[0]===B[0])return"";const I=E[0]<B[0]?E[0]:B[0],V=E[0]<B[0]?B[0]:E[0];for(let ee=E[1];ee<=B[1];ee++){const ne=W.translateBufferLineToString(ee,!0,I,V);F.push(ne)}}else{const I=E[1]===B[1]?B[0]:void 0;F.push(W.translateBufferLineToString(E[1],!0,E[0],I));for(let V=E[1]+1;V<=B[1]-1;V++){const ee=W.lines.get(V),ne=W.translateBufferLineToString(V,!0);ee?.isWrapped?F[F.length-1]+=ne:F.push(ne)}if(E[1]!==B[1]){const V=W.lines.get(B[1]),ee=W.translateBufferLineToString(B[1],!0,0,B[0]);V&&V.isWrapped?F[F.length-1]+=ee:F.push(ee)}}return F.map((I=>I.replace(L," "))).join(m.isWindows?`\r
|
|
57
57
|
`:`
|
|
58
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(E){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),m.isLinux&&E&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(E){const B=this._getMouseBufferCoords(E),W=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(W&&F&&B)&&this._areCoordsInSelection(B,W,F)}isCellInSelection(E,B){const W=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!W||!F)&&this._areCoordsInSelection([E,B],W,F)}_areCoordsInSelection(E,B,W){return E[1]>B[1]&&E[1]<W[1]||B[1]===W[1]&&E[1]===B[1]&&E[0]>=B[0]&&E[0]<W[0]||B[1]<W[1]&&E[1]===W[1]&&E[0]<W[0]||B[1]<W[1]&&E[1]===B[1]&&E[0]>=B[0]}_selectWordAtCursor(E,B){const W=this._linkifier.currentLink?.link?.range;if(W)return this._model.selectionStart=[W.start.x-1,W.start.y-1],this._model.selectionStartLength=(0,p.getRangeLength)(W,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(E);return!!F&&(this._selectWordAt(F,B),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(E,B){this._model.clearSelection(),E=Math.max(E,0),B=Math.min(B,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,B],this.refresh(),this._onSelectionChange.fire()}_handleTrim(E){this._model.handleTrim(E)&&this.refresh()}_getMouseBufferCoords(E){const B=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(B)return B[0]--,B[1]--,B[1]+=this._bufferService.buffer.ydisp,B}_getMouseEventScrollAmount(E){let B=(0,v.getCoordsRelativeToElement)(this._coreBrowserService.window,E,this._screenElement)[1];const W=this._renderService.dimensions.css.canvas.height;return B>=0&&B<=W?0:(B>W&&(B-=W),B=Math.min(Math.max(B,-50),50),B/=50,B/Math.abs(B)+Math.round(14*B))}shouldForceSelection(E){return m.isMac?E.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:E.shiftKey}handleMouseDown(E){if(this._mouseDownTimeStamp=E.timeStamp,(E.button!==2||!this.hasSelection)&&E.button===0){if(!this._enabled){if(!this.shouldForceSelection(E))return;E.stopPropagation()}E.preventDefault(),this._dragScrollAmount=0,this._enabled&&E.shiftKey?this._handleIncrementalClick(E):E.detail===1?this._handleSingleClick(E):E.detail===2?this._handleDoubleClick(E):E.detail===3&&this._handleTripleClick(E),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))}_handleSingleClick(E){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(E)?3:0,this._model.selectionStart=this._getMouseBufferCoords(E),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const B=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);B&&B.length!==this._model.selectionStart[0]&&B.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(E){this._selectWordAtCursor(E,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(E){const B=this._getMouseBufferCoords(E);B&&(this._activeSelectionMode=2,this._selectLineAt(B[1]))}shouldColumnSelect(E){return E.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(E){if(E.stopImmediatePropagation(),!this._model.selectionStart)return;const B=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(E),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(E),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const W=this._bufferService.buffer;if(this._model.selectionEnd[1]<W.lines.length){const F=W.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}B&&B[0]===this._model.selectionEnd[0]&&B[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const E=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(E.ydisp+this._bufferService.rows,E.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=E.ydisp),this.refresh()}}_handleMouseUp(E){const B=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&B<500&&E.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const W=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(W&&W[0]!==void 0&&W[1]!==void 0){const F=(0,w.moveToCellSequence)(W[0]-1,W[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const E=this._model.finalSelectionStart,B=this._model.finalSelectionEnd,W=!(!E||!B||E[0]===B[0]&&E[1]===B[1]);W?E&&B&&(this._oldSelectionStart&&this._oldSelectionEnd&&E[0]===this._oldSelectionStart[0]&&E[1]===this._oldSelectionStart[1]&&B[0]===this._oldSelectionEnd[0]&&B[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(E,B,W)):this._oldHasSelection&&this._fireOnSelectionChange(E,B,W)}_fireOnSelectionChange(E,B,W){this._oldSelectionStart=E,this._oldSelectionEnd=B,this._oldHasSelection=W,this._onSelectionChange.fire()}_handleBufferActivate(E){this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim((B=>this._handleTrim(B)))}_convertViewportColToCharacterIndex(E,B){let W=B;for(let F=0;B>=F;F++){const I=E.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?W--:I>1&&B!==F&&(W+=I-1)}return W}setSelection(E,B,W){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,B],this._model.selectionStartLength=W,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(E){this._isClickInSelection(E)||(this._selectWordAtCursor(E,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(E,B,W=!0,F=!0){if(E[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,V=I.lines.get(E[1]);if(!V)return;const ee=I.translateBufferLineToString(E[1],!1);let ne=this._convertViewportColToCharacterIndex(V,E[0]),q=ne;const Z=E[0]-ne;let K=0,j=0,U=0,N=0;if(ee.charAt(ne)===" "){for(;ne>0&&ee.charAt(ne-1)===" ";)ne--;for(;q<ee.length&&ee.charAt(q+1)===" ";)q++}else{let ie=E[0],de=E[0];V.getWidth(ie)===0&&(K++,ie--),V.getWidth(de)===2&&(j++,de++);const G=V.getString(de).length;for(G>1&&(N+=G-1,q+=G-1);ie>0&&ne>0&&!this._isCharWordSeparator(V.loadCell(ie-1,this._workCell));){V.loadCell(ie-1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===0?(K++,ie--):Q>1&&(U+=Q-1,ne-=Q-1),ne--,ie--}for(;de<V.length&&q+1<ee.length&&!this._isCharWordSeparator(V.loadCell(de+1,this._workCell));){V.loadCell(de+1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===2?(j++,de++):Q>1&&(N+=Q-1,q+=Q-1),q++,de++}}q++;let z=ne+Z-K+U,X=Math.min(this._bufferService.cols,q-ne+K+j-U-N);if(B||ee.slice(ne,q).trim()!==""){if(W&&z===0&&V.getCodePoint(0)!==32){const ie=I.lines.get(E[1]-1);if(ie&&V.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const de=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(de){const G=this._bufferService.cols-de.start;z-=G,X+=G}}}if(F&&z+X===this._bufferService.cols&&V.getCodePoint(this._bufferService.cols-1)!==32){const ie=I.lines.get(E[1]+1);if(ie?.isWrapped&&ie.getCodePoint(0)!==32){const de=this._getWordAt([0,E[1]+1],!1,!1,!0);de&&(X+=de.length)}}return{start:z,length:X}}}_selectWordAt(E,B){const W=this._getWordAt(E,B);if(W){for(;W.start<0;)W.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[W.start,E[1]],this._model.selectionStartLength=W.length}}_selectToWordAt(E){const B=this._getWordAt(E,!0);if(B){let W=E[1];for(;B.start<0;)B.start+=this._bufferService.cols,W--;if(!this._model.areSelectionValuesReversed())for(;B.start+B.length>this._bufferService.cols;)B.length-=this._bufferService.cols,W++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?B.start:B.start+B.length,W]}}_isCharWordSeparator(E){return E.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(E.getChars())>=0}_selectLineAt(E){const B=this._bufferService.buffer.getWrappedRangeForLine(E),W={start:{x:0,y:B.first},end:{x:this._bufferService.cols-1,y:B.last}};this._model.selectionStart=[0,B.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,p.getRangeLength)(W,this._bufferService.cols)}};o.SelectionService=T=u([C(3,A.IBufferService),C(4,A.ICoreService),C(5,R.IMouseService),C(6,A.IOptionsService),C(7,R.IRenderService),C(8,R.ICoreBrowserService)],T)},4725:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const u=c(8343);o.ICharSizeService=(0,u.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),o.IMouseService=(0,u.createDecorator)("MouseService"),o.IRenderService=(0,u.createDecorator)("RenderService"),o.ISelectionService=(0,u.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,u.createDecorator)("ThemeService")},6731:function(S,o,c){var u=this&&this.__decorate||function(T,E,B,W){var F,I=arguments.length,V=I<3?E:W===null?W=Object.getOwnPropertyDescriptor(E,B):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(T,E,B,W);else for(var ee=T.length-1;ee>=0;ee--)(F=T[ee])&&(V=(I<3?F(V):I>3?F(E,B,V):F(E,B))||V);return I>3&&V&&Object.defineProperty(E,B,V),V},C=this&&this.__param||function(T,E){return function(B,W){E(B,W,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const v=c(7239),w=c(8055),x=c(8460),R=c(844),b=c(2585),h=w.css.toColor("#ffffff"),m=w.css.toColor("#000000"),p=w.css.toColor("#ffffff"),g=w.css.toColor("#000000"),A={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[w.css.toColor("#2e3436"),w.css.toColor("#cc0000"),w.css.toColor("#4e9a06"),w.css.toColor("#c4a000"),w.css.toColor("#3465a4"),w.css.toColor("#75507b"),w.css.toColor("#06989a"),w.css.toColor("#d3d7cf"),w.css.toColor("#555753"),w.css.toColor("#ef2929"),w.css.toColor("#8ae234"),w.css.toColor("#fce94f"),w.css.toColor("#729fcf"),w.css.toColor("#ad7fa8"),w.css.toColor("#34e2e2"),w.css.toColor("#eeeeec")],E=[0,95,135,175,215,255];for(let B=0;B<216;B++){const W=E[B/36%6|0],F=E[B/6%6|0],I=E[B%6];T.push({css:w.channels.toCss(W,F,I),rgba:w.channels.toRgba(W,F,I)})}for(let B=0;B<24;B++){const W=8+10*B;T.push({css:w.channels.toCss(W,W,W),rgba:w.channels.toRgba(W,W,W)})}return T})());let D=o.ThemeService=class extends R.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new v.ColorContrastCache,this._halfContrastCache=new v.ColorContrastCache,this._onChangeColors=this.register(new x.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:h,background:m,cursor:p,cursorAccent:g,selectionForeground:void 0,selectionBackgroundTransparent:A,selectionBackgroundOpaque:w.color.blend(m,A),selectionInactiveBackgroundTransparent:A,selectionInactiveBackgroundOpaque:w.color.blend(m,A),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(T={}){const E=this._colors;if(E.foreground=L(T.foreground,h),E.background=L(T.background,m),E.cursor=L(T.cursor,p),E.cursorAccent=L(T.cursorAccent,g),E.selectionBackgroundTransparent=L(T.selectionBackground,A),E.selectionBackgroundOpaque=w.color.blend(E.background,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundTransparent=L(T.selectionInactiveBackground,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundOpaque=w.color.blend(E.background,E.selectionInactiveBackgroundTransparent),E.selectionForeground=T.selectionForeground?L(T.selectionForeground,w.NULL_COLOR):void 0,E.selectionForeground===w.NULL_COLOR&&(E.selectionForeground=void 0),w.color.isOpaque(E.selectionBackgroundTransparent)&&(E.selectionBackgroundTransparent=w.color.opacity(E.selectionBackgroundTransparent,.3)),w.color.isOpaque(E.selectionInactiveBackgroundTransparent)&&(E.selectionInactiveBackgroundTransparent=w.color.opacity(E.selectionInactiveBackgroundTransparent,.3)),E.ansi=o.DEFAULT_ANSI_COLORS.slice(),E.ansi[0]=L(T.black,o.DEFAULT_ANSI_COLORS[0]),E.ansi[1]=L(T.red,o.DEFAULT_ANSI_COLORS[1]),E.ansi[2]=L(T.green,o.DEFAULT_ANSI_COLORS[2]),E.ansi[3]=L(T.yellow,o.DEFAULT_ANSI_COLORS[3]),E.ansi[4]=L(T.blue,o.DEFAULT_ANSI_COLORS[4]),E.ansi[5]=L(T.magenta,o.DEFAULT_ANSI_COLORS[5]),E.ansi[6]=L(T.cyan,o.DEFAULT_ANSI_COLORS[6]),E.ansi[7]=L(T.white,o.DEFAULT_ANSI_COLORS[7]),E.ansi[8]=L(T.brightBlack,o.DEFAULT_ANSI_COLORS[8]),E.ansi[9]=L(T.brightRed,o.DEFAULT_ANSI_COLORS[9]),E.ansi[10]=L(T.brightGreen,o.DEFAULT_ANSI_COLORS[10]),E.ansi[11]=L(T.brightYellow,o.DEFAULT_ANSI_COLORS[11]),E.ansi[12]=L(T.brightBlue,o.DEFAULT_ANSI_COLORS[12]),E.ansi[13]=L(T.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),E.ansi[14]=L(T.brightCyan,o.DEFAULT_ANSI_COLORS[14]),E.ansi[15]=L(T.brightWhite,o.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const B=Math.min(E.ansi.length-16,T.extendedAnsi.length);for(let W=0;W<B;W++)E.ansi[W+16]=L(T.extendedAnsi[W],o.DEFAULT_ANSI_COLORS[W+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(T){this._restoreColor(T),this._onChangeColors.fire(this.colors)}_restoreColor(T){if(T!==void 0)switch(T){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[T]=this._restoreColors.ansi[T]}else for(let E=0;E<this._restoreColors.ansi.length;++E)this._colors.ansi[E]=this._restoreColors.ansi[E]}modifyColors(T){T(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function L(T,E){if(T!==void 0)try{return w.css.toColor(T)}catch{}return E}o.ThemeService=D=u([C(0,b.IOptionsService)],D)},6349:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=c(8460),C=c(844);class v extends C.Disposable{constructor(x){super(),this._maxLength=x,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(x){if(this._maxLength===x)return;const R=new Array(x);for(let b=0;b<Math.min(x,this.length);b++)R[b]=this._array[this._getCyclicIndex(b)];this._array=R,this._maxLength=x,this._startIndex=0}get length(){return this._length}set length(x){if(x>this._length)for(let R=this._length;R<x;R++)this._array[R]=void 0;this._length=x}get(x){return this._array[this._getCyclicIndex(x)]}set(x,R){this._array[this._getCyclicIndex(x)]=R}push(x){this._array[this._getCyclicIndex(this._length)]=x,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(x,R,...b){if(R){for(let h=x;h<this._length-R;h++)this._array[this._getCyclicIndex(h)]=this._array[this._getCyclicIndex(h+R)];this._length-=R,this.onDeleteEmitter.fire({index:x,amount:R})}for(let h=this._length-1;h>=x;h--)this._array[this._getCyclicIndex(h+b.length)]=this._array[this._getCyclicIndex(h)];for(let h=0;h<b.length;h++)this._array[this._getCyclicIndex(x+h)]=b[h];if(b.length&&this.onInsertEmitter.fire({index:x,amount:b.length}),this._length+b.length>this._maxLength){const h=this._length+b.length-this._maxLength;this._startIndex+=h,this._length=this._maxLength,this.onTrimEmitter.fire(h)}else this._length+=b.length}trimStart(x){x>this._length&&(x=this._length),this._startIndex+=x,this._length-=x,this.onTrimEmitter.fire(x)}shiftElements(x,R,b){if(!(R<=0)){if(x<0||x>=this._length)throw new Error("start argument out of range");if(x+b<0)throw new Error("Cannot shift elements in list beyond index 0");if(b>0){for(let m=R-1;m>=0;m--)this.set(x+m+b,this.get(x+m));const h=x+R+b-this._length;if(h>0)for(this._length+=h;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let h=0;h<R;h++)this.set(x+h+b,this.get(x+h))}}_getCyclicIndex(x){return(this._startIndex+x)%this._maxLength}}o.CircularList=v},1439:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(u,C=5){if(typeof u!="object")return u;const v=Array.isArray(u)?[]:{};for(const w in u)v[w]=C<=1?u[w]:u[w]&&c(u[w],C-1);return v}},8055:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;const u=c(6114);let C=0,v=0,w=0,x=0;var R,b,h,m,p;function g(D){const L=D.toString(16);return L.length<2?"0"+L:L}function A(D,L){return D<L?(L+.05)/(D+.05):(D+.05)/(L+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},(function(D){D.toCss=function(L,T,E,B){return B!==void 0?`#${g(L)}${g(T)}${g(E)}${g(B)}`:`#${g(L)}${g(T)}${g(E)}`},D.toRgba=function(L,T,E,B=255){return(L<<24|T<<16|E<<8|B)>>>0}})(R||(o.channels=R={})),(function(D){function L(T,E){return x=Math.round(255*E),[C,v,w]=p.toChannels(T.rgba),{css:R.toCss(C,v,w,x),rgba:R.toRgba(C,v,w,x)}}D.blend=function(T,E){if(x=(255&E.rgba)/255,x===1)return{css:E.css,rgba:E.rgba};const B=E.rgba>>24&255,W=E.rgba>>16&255,F=E.rgba>>8&255,I=T.rgba>>24&255,V=T.rgba>>16&255,ee=T.rgba>>8&255;return C=I+Math.round((B-I)*x),v=V+Math.round((W-V)*x),w=ee+Math.round((F-ee)*x),{css:R.toCss(C,v,w),rgba:R.toRgba(C,v,w)}},D.isOpaque=function(T){return(255&T.rgba)==255},D.ensureContrastRatio=function(T,E,B){const W=p.ensureContrastRatio(T.rgba,E.rgba,B);if(W)return p.toColor(W>>24&255,W>>16&255,W>>8&255)},D.opaque=function(T){const E=(255|T.rgba)>>>0;return[C,v,w]=p.toChannels(E),{css:R.toCss(C,v,w),rgba:E}},D.opacity=L,D.multiplyOpacity=function(T,E){return x=255&T.rgba,L(T,x*E/255)},D.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}})(b||(o.color=b={})),(function(D){let L,T;if(!u.isNode){const E=document.createElement("canvas");E.width=1,E.height=1;const B=E.getContext("2d",{willReadFrequently:!0});B&&(L=B,L.globalCompositeOperation="copy",T=L.createLinearGradient(0,0,1,1))}D.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return C=parseInt(E.slice(1,2).repeat(2),16),v=parseInt(E.slice(2,3).repeat(2),16),w=parseInt(E.slice(3,4).repeat(2),16),p.toColor(C,v,w);case 5:return C=parseInt(E.slice(1,2).repeat(2),16),v=parseInt(E.slice(2,3).repeat(2),16),w=parseInt(E.slice(3,4).repeat(2),16),x=parseInt(E.slice(4,5).repeat(2),16),p.toColor(C,v,w,x);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const B=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(B)return C=parseInt(B[1]),v=parseInt(B[2]),w=parseInt(B[3]),x=Math.round(255*(B[5]===void 0?1:parseFloat(B[5]))),p.toColor(C,v,w,x);if(!L||!T)throw new Error("css.toColor: Unsupported css format");if(L.fillStyle=T,L.fillStyle=E,typeof L.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(L.fillRect(0,0,1,1),[C,v,w,x]=L.getImageData(0,0,1,1).data,x!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:R.toRgba(C,v,w,x),css:E}}})(h||(o.css=h={})),(function(D){function L(T,E,B){const W=T/255,F=E/255,I=B/255;return .2126*(W<=.03928?W/12.92:Math.pow((W+.055)/1.055,2.4))+.7152*(F<=.03928?F/12.92:Math.pow((F+.055)/1.055,2.4))+.0722*(I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4))}D.relativeLuminance=function(T){return L(T>>16&255,T>>8&255,255&T)},D.relativeLuminance2=L})(m||(o.rgb=m={})),(function(D){function L(E,B,W){const F=E>>24&255,I=E>>16&255,V=E>>8&255;let ee=B>>24&255,ne=B>>16&255,q=B>>8&255,Z=A(m.relativeLuminance2(ee,ne,q),m.relativeLuminance2(F,I,V));for(;Z<W&&(ee>0||ne>0||q>0);)ee-=Math.max(0,Math.ceil(.1*ee)),ne-=Math.max(0,Math.ceil(.1*ne)),q-=Math.max(0,Math.ceil(.1*q)),Z=A(m.relativeLuminance2(ee,ne,q),m.relativeLuminance2(F,I,V));return(ee<<24|ne<<16|q<<8|255)>>>0}function T(E,B,W){const F=E>>24&255,I=E>>16&255,V=E>>8&255;let ee=B>>24&255,ne=B>>16&255,q=B>>8&255,Z=A(m.relativeLuminance2(ee,ne,q),m.relativeLuminance2(F,I,V));for(;Z<W&&(ee<255||ne<255||q<255);)ee=Math.min(255,ee+Math.ceil(.1*(255-ee))),ne=Math.min(255,ne+Math.ceil(.1*(255-ne))),q=Math.min(255,q+Math.ceil(.1*(255-q))),Z=A(m.relativeLuminance2(ee,ne,q),m.relativeLuminance2(F,I,V));return(ee<<24|ne<<16|q<<8|255)>>>0}D.ensureContrastRatio=function(E,B,W){const F=m.relativeLuminance(E>>8),I=m.relativeLuminance(B>>8);if(A(F,I)<W){if(I<F){const ne=L(E,B,W),q=A(F,m.relativeLuminance(ne>>8));if(q<W){const Z=T(E,B,W);return q>A(F,m.relativeLuminance(Z>>8))?ne:Z}return ne}const V=T(E,B,W),ee=A(F,m.relativeLuminance(V>>8));if(ee<W){const ne=L(E,B,W);return ee>A(F,m.relativeLuminance(ne>>8))?V:ne}return V}},D.reduceLuminance=L,D.increaseLuminance=T,D.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]},D.toColor=function(E,B,W,F){return{css:R.toCss(E,B,W,F),rgba:R.toRgba(E,B,W,F)}}})(p||(o.rgba=p={})),o.toPaddedHex=g,o.contrastRatio=A},8969:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),C=c(2585),v=c(4348),w=c(7866),x=c(744),R=c(7302),b=c(6975),h=c(8460),m=c(1753),p=c(1480),g=c(7994),A=c(9282),D=c(5435),L=c(5981),T=c(2660);let E=!1;class B extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new h.EventEmitter),this._onScroll.event((F=>{this._onScrollApi?.fire(F.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(F){for(const I in F)this.optionsService.options[I]=F[I]}constructor(F){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new h.EventEmitter),this._instantiationService=new v.InstantiationService,this.optionsService=this.register(new R.OptionsService(F)),this._instantiationService.setService(C.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(x.BufferService)),this._instantiationService.setService(C.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(w.LogService)),this._instantiationService.setService(C.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(b.CoreService)),this._instantiationService.setService(C.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(m.CoreMouseService)),this._instantiationService.setService(C.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(p.UnicodeService)),this._instantiationService.setService(C.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(g.CharsetService),this._instantiationService.setService(C.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(C.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new D.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,h.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,h.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,h.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,h.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new L.WriteBuffer(((I,V)=>this._inputHandler.parse(I,V)))),this.register((0,h.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,I){this._writeBuffer.write(F,I)}writeSync(F,I){this._logService.logLevel<=C.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(F,I)}resize(F,I){isNaN(F)||isNaN(I)||(F=Math.max(F,x.MINIMUM_COLS),I=Math.max(I,x.MINIMUM_ROWS),this._bufferService.resize(F,I))}scroll(F,I=!1){this._bufferService.scroll(F,I)}scrollLines(F,I,V){this._bufferService.scrollLines(F,I,V)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const I=F-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(F,I){return this._inputHandler.registerEscHandler(F,I)}registerDcsHandler(F,I){return this._inputHandler.registerDcsHandler(F,I)}registerCsiHandler(F,I){return this._inputHandler.registerCsiHandler(F,I)}registerOscHandler(F,I){return this._inputHandler.registerOscHandler(F,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?F=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(A.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},(()=>((0,A.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const I of F)I.dispose()}))}}}o.CoreTerminal=B},8460:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;u<this._listeners.length;u++)if(this._listeners[u]===c)return void this._listeners.splice(u,1)}}})),this._event}fire(c,u){const C=[];for(let v=0;v<this._listeners.length;v++)C.push(this._listeners[v]);for(let v=0;v<C.length;v++)C[v].call(void 0,c,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(c,u){return c((C=>u.fire(C)))},o.runAndSubscribe=function(c,u){return u(void 0),c((C=>u(C)))}},5435:function(S,o,c){var u=this&&this.__decorate||function(K,j,U,N){var z,X=arguments.length,ie=X<3?j:N===null?N=Object.getOwnPropertyDescriptor(j,U):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(K,j,U,N);else for(var de=K.length-1;de>=0;de--)(z=K[de])&&(ie=(X<3?z(ie):X>3?z(j,U,ie):z(j,U))||ie);return X>3&&ie&&Object.defineProperty(j,U,ie),ie},C=this&&this.__param||function(K,j){return function(U,N){j(U,N,K)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const v=c(2584),w=c(7116),x=c(2015),R=c(844),b=c(482),h=c(8437),m=c(8460),p=c(643),g=c(511),A=c(3734),D=c(2585),L=c(1480),T=c(6242),E=c(6351),B=c(5941),W={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function I(K,j){if(K>24)return j.setWinLines||!1;switch(K){case 1:return!!j.restoreWin;case 2:return!!j.minimizeWin;case 3:return!!j.setWinPosition;case 4:return!!j.setWinSizePixels;case 5:return!!j.raiseWin;case 6:return!!j.lowerWin;case 7:return!!j.refreshWin;case 8:return!!j.setWinSizeChars;case 9:return!!j.maximizeWin;case 10:return!!j.fullscreenWin;case 11:return!!j.getWinState;case 13:return!!j.getWinPosition;case 14:return!!j.getWinSizePixels;case 15:return!!j.getScreenSizePixels;case 16:return!!j.getCellSizePixels;case 18:return!!j.getWinSizeChars;case 19:return!!j.getScreenSizeChars;case 20:return!!j.getIconTitle;case 21:return!!j.getWinTitle;case 22:return!!j.pushTitle;case 23:return!!j.popTitle;case 24:return!!j.setWinLines}return!1}var V;(function(K){K[K.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",K[K.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(V||(o.WindowsOptionsReportType=V={}));let ee=0;class ne extends R.Disposable{getAttrData(){return this._curAttrData}constructor(j,U,N,z,X,ie,de,G,Q=new x.EscapeSequenceParser){super(),this._bufferService=j,this._charsetService=U,this._coreService=N,this._logService=z,this._optionsService=X,this._oscLinkService=ie,this._coreMouseService=de,this._unicodeService=G,this._parser=Q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b.StringToUtf32,this._utf8Decoder=new b.Utf8ToUtf32,this._workCell=new g.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new m.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new m.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new m.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new m.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new m.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new m.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new m.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new m.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new m.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new m.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new m.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new m.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((P=>this._activeBuffer=P.activeBuffer))),this._parser.setCsiHandlerFallback(((P,he)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(P),params:he.toArray()})})),this._parser.setEscHandlerFallback((P=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(P)})})),this._parser.setExecuteHandlerFallback((P=>{this._logService.debug("Unknown EXECUTE code: ",{code:P})})),this._parser.setOscHandlerFallback(((P,he,ge)=>{this._logService.debug("Unknown OSC code: ",{identifier:P,action:he,data:ge})})),this._parser.setDcsHandlerFallback(((P,he,ge)=>{he==="HOOK"&&(ge=ge.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(P),action:he,payload:ge})})),this._parser.setPrintHandler(((P,he,ge)=>this.print(P,he,ge))),this._parser.registerCsiHandler({final:"@"},(P=>this.insertChars(P))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(P=>this.scrollLeft(P))),this._parser.registerCsiHandler({final:"A"},(P=>this.cursorUp(P))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(P=>this.scrollRight(P))),this._parser.registerCsiHandler({final:"B"},(P=>this.cursorDown(P))),this._parser.registerCsiHandler({final:"C"},(P=>this.cursorForward(P))),this._parser.registerCsiHandler({final:"D"},(P=>this.cursorBackward(P))),this._parser.registerCsiHandler({final:"E"},(P=>this.cursorNextLine(P))),this._parser.registerCsiHandler({final:"F"},(P=>this.cursorPrecedingLine(P))),this._parser.registerCsiHandler({final:"G"},(P=>this.cursorCharAbsolute(P))),this._parser.registerCsiHandler({final:"H"},(P=>this.cursorPosition(P))),this._parser.registerCsiHandler({final:"I"},(P=>this.cursorForwardTab(P))),this._parser.registerCsiHandler({final:"J"},(P=>this.eraseInDisplay(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(P=>this.eraseInDisplay(P,!0))),this._parser.registerCsiHandler({final:"K"},(P=>this.eraseInLine(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(P=>this.eraseInLine(P,!0))),this._parser.registerCsiHandler({final:"L"},(P=>this.insertLines(P))),this._parser.registerCsiHandler({final:"M"},(P=>this.deleteLines(P))),this._parser.registerCsiHandler({final:"P"},(P=>this.deleteChars(P))),this._parser.registerCsiHandler({final:"S"},(P=>this.scrollUp(P))),this._parser.registerCsiHandler({final:"T"},(P=>this.scrollDown(P))),this._parser.registerCsiHandler({final:"X"},(P=>this.eraseChars(P))),this._parser.registerCsiHandler({final:"Z"},(P=>this.cursorBackwardTab(P))),this._parser.registerCsiHandler({final:"`"},(P=>this.charPosAbsolute(P))),this._parser.registerCsiHandler({final:"a"},(P=>this.hPositionRelative(P))),this._parser.registerCsiHandler({final:"b"},(P=>this.repeatPrecedingCharacter(P))),this._parser.registerCsiHandler({final:"c"},(P=>this.sendDeviceAttributesPrimary(P))),this._parser.registerCsiHandler({prefix:">",final:"c"},(P=>this.sendDeviceAttributesSecondary(P))),this._parser.registerCsiHandler({final:"d"},(P=>this.linePosAbsolute(P))),this._parser.registerCsiHandler({final:"e"},(P=>this.vPositionRelative(P))),this._parser.registerCsiHandler({final:"f"},(P=>this.hVPosition(P))),this._parser.registerCsiHandler({final:"g"},(P=>this.tabClear(P))),this._parser.registerCsiHandler({final:"h"},(P=>this.setMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(P=>this.setModePrivate(P))),this._parser.registerCsiHandler({final:"l"},(P=>this.resetMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(P=>this.resetModePrivate(P))),this._parser.registerCsiHandler({final:"m"},(P=>this.charAttributes(P))),this._parser.registerCsiHandler({final:"n"},(P=>this.deviceStatus(P))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(P=>this.deviceStatusPrivate(P))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(P=>this.softReset(P))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(P=>this.setCursorStyle(P))),this._parser.registerCsiHandler({final:"r"},(P=>this.setScrollRegion(P))),this._parser.registerCsiHandler({final:"s"},(P=>this.saveCursor(P))),this._parser.registerCsiHandler({final:"t"},(P=>this.windowOptions(P))),this._parser.registerCsiHandler({final:"u"},(P=>this.restoreCursor(P))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(P=>this.insertColumns(P))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(P=>this.deleteColumns(P))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(P=>this.selectProtected(P))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(P=>this.requestMode(P,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(P=>this.requestMode(P,!1))),this._parser.setExecuteHandler(v.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(v.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(v.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(v.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(v.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(v.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(v.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(v.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(v.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(v.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(v.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(v.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((P=>(this.setTitle(P),this.setIconName(P),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((P=>this.setIconName(P)))),this._parser.registerOscHandler(2,new T.OscHandler((P=>this.setTitle(P)))),this._parser.registerOscHandler(4,new T.OscHandler((P=>this.setOrReportIndexedColor(P)))),this._parser.registerOscHandler(8,new T.OscHandler((P=>this.setHyperlink(P)))),this._parser.registerOscHandler(10,new T.OscHandler((P=>this.setOrReportFgColor(P)))),this._parser.registerOscHandler(11,new T.OscHandler((P=>this.setOrReportBgColor(P)))),this._parser.registerOscHandler(12,new T.OscHandler((P=>this.setOrReportCursorColor(P)))),this._parser.registerOscHandler(104,new T.OscHandler((P=>this.restoreIndexedColor(P)))),this._parser.registerOscHandler(110,new T.OscHandler((P=>this.restoreFgColor(P)))),this._parser.registerOscHandler(111,new T.OscHandler((P=>this.restoreBgColor(P)))),this._parser.registerOscHandler(112,new T.OscHandler((P=>this.restoreCursorColor(P)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const P in w.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:P},(()=>this.selectCharset("("+P))),this._parser.registerEscHandler({intermediates:")",final:P},(()=>this.selectCharset(")"+P))),this._parser.registerEscHandler({intermediates:"*",final:P},(()=>this.selectCharset("*"+P))),this._parser.registerEscHandler({intermediates:"+",final:P},(()=>this.selectCharset("+"+P))),this._parser.registerEscHandler({intermediates:"-",final:P},(()=>this.selectCharset("-"+P))),this._parser.registerEscHandler({intermediates:".",final:P},(()=>this.selectCharset("."+P))),this._parser.registerEscHandler({intermediates:"/",final:P},(()=>this.selectCharset("/"+P)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((P=>(this._logService.error("Parsing error: ",P),P))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new E.DcsHandler(((P,he)=>this.requestStatusString(P,he))))}_preserveStack(j,U,N,z){this._parseStack.paused=!0,this._parseStack.cursorStartX=j,this._parseStack.cursorStartY=U,this._parseStack.decodedLength=N,this._parseStack.position=z}_logSlowResolvingAsync(j){this._logService.logLevel<=D.LogLevelEnum.WARN&&Promise.race([j,new Promise(((U,N)=>setTimeout((()=>N("#SLOW_TIMEOUT")),5e3)))]).catch((U=>{if(U!=="#SLOW_TIMEOUT")throw U;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(j,U){let N,z=this._activeBuffer.x,X=this._activeBuffer.y,ie=0;const de=this._parseStack.paused;if(de){if(N=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,U))return this._logSlowResolvingAsync(N),N;z=this._parseStack.cursorStartX,X=this._parseStack.cursorStartY,this._parseStack.paused=!1,j.length>F&&(ie=this._parseStack.position+F)}if(this._logService.logLevel<=D.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof j=="string"?` "${j}"`:` "${Array.prototype.map.call(j,(P=>String.fromCharCode(P))).join("")}"`),typeof j=="string"?j.split("").map((P=>P.charCodeAt(0))):j),this._parseBuffer.length<j.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(j.length,F))),de||this._dirtyRowTracker.clearRange(),j.length>F)for(let P=ie;P<j.length;P+=F){const he=P+F<j.length?P+F:j.length,ge=typeof j=="string"?this._stringDecoder.decode(j.substring(P,he),this._parseBuffer):this._utf8Decoder.decode(j.subarray(P,he),this._parseBuffer);if(N=this._parser.parse(this._parseBuffer,ge))return this._preserveStack(z,X,ge,P),this._logSlowResolvingAsync(N),N}else if(!de){const P=typeof j=="string"?this._stringDecoder.decode(j,this._parseBuffer):this._utf8Decoder.decode(j,this._parseBuffer);if(N=this._parser.parse(this._parseBuffer,P))return this._preserveStack(z,X,P,0),this._logSlowResolvingAsync(N),N}this._activeBuffer.x===z&&this._activeBuffer.y===X||this._onCursorMove.fire();const G=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Q,this._bufferService.rows-1),Math.min(G,this._bufferService.rows-1))}print(j,U,N){let z,X;const ie=this._charsetService.charset,de=this._optionsService.rawOptions.screenReaderMode,G=this._bufferService.cols,Q=this._coreService.decPrivateModes.wraparound,P=this._coreService.modes.insertMode,he=this._curAttrData;let ge=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&N-U>0&&ge.getWidth(this._activeBuffer.x-1)===2&&ge.setCellFromCodePoint(this._activeBuffer.x-1,0,1,he.fg,he.bg,he.extended);let oe=this._parser.precedingJoinState;for(let me=U;me<N;++me){if(z=j[me],z<127&&ie){const tt=ie[String.fromCharCode(z)];tt&&(z=tt.charCodeAt(0))}const Ce=this._unicodeService.charProperties(z,oe);X=L.UnicodeService.extractWidth(Ce);const ze=L.UnicodeService.extractShouldJoin(Ce),ct=ze?L.UnicodeService.extractWidth(oe):0;if(oe=Ce,de&&this._onA11yChar.fire((0,b.stringFromCodePoint)(z)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+X-ct>G){if(Q){const tt=ge;let ke=this._activeBuffer.x-ct;for(this._activeBuffer.x=ct,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ge=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ct>0&&ge instanceof h.BufferLine&&ge.copyCellsFrom(tt,ke,0,ct,!1);ke<G;)tt.setCellFromCodePoint(ke++,0,1,he.fg,he.bg,he.extended)}else if(this._activeBuffer.x=G-1,X===2)continue}if(ze&&this._activeBuffer.x){const tt=ge.getWidth(this._activeBuffer.x-1)?1:2;ge.addCodepointToCell(this._activeBuffer.x-tt,z,X);for(let ke=X-ct;--ke>=0;)ge.setCellFromCodePoint(this._activeBuffer.x++,0,0,he.fg,he.bg,he.extended)}else if(P&&(ge.insertCells(this._activeBuffer.x,X-ct,this._activeBuffer.getNullCell(he),he),ge.getWidth(G-1)===2&&ge.setCellFromCodePoint(G-1,p.NULL_CELL_CODE,p.NULL_CELL_WIDTH,he.fg,he.bg,he.extended)),ge.setCellFromCodePoint(this._activeBuffer.x++,z,X,he.fg,he.bg,he.extended),X>0)for(;--X;)ge.setCellFromCodePoint(this._activeBuffer.x++,0,0,he.fg,he.bg,he.extended)}this._parser.precedingJoinState=oe,this._activeBuffer.x<G&&N-U>0&&ge.getWidth(this._activeBuffer.x)===0&&!ge.hasContent(this._activeBuffer.x)&&ge.setCellFromCodePoint(this._activeBuffer.x,0,1,he.fg,he.bg,he.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(j,U){return j.final!=="t"||j.prefix||j.intermediates?this._parser.registerCsiHandler(j,U):this._parser.registerCsiHandler(j,(N=>!I(N.params[0],this._optionsService.rawOptions.windowOptions)||U(N)))}registerDcsHandler(j,U){return this._parser.registerDcsHandler(j,new E.DcsHandler(U))}registerEscHandler(j,U){return this._parser.registerEscHandler(j,U)}registerOscHandler(j,U){return this._parser.registerOscHandler(j,new T.OscHandler(U))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);j.hasWidth(this._activeBuffer.x)&&!j.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const j=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-j),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(j=this._bufferService.cols-1){this._activeBuffer.x=Math.min(j,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(j,U){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=j,this._activeBuffer.y=this._activeBuffer.scrollTop+U):(this._activeBuffer.x=j,this._activeBuffer.y=U),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(j,U){this._restrictCursor(),this._setCursor(this._activeBuffer.x+j,this._activeBuffer.y+U)}cursorUp(j){const U=this._activeBuffer.y-this._activeBuffer.scrollTop;return U>=0?this._moveCursor(0,-Math.min(U,j.params[0]||1)):this._moveCursor(0,-(j.params[0]||1)),!0}cursorDown(j){const U=this._activeBuffer.scrollBottom-this._activeBuffer.y;return U>=0?this._moveCursor(0,Math.min(U,j.params[0]||1)):this._moveCursor(0,j.params[0]||1),!0}cursorForward(j){return this._moveCursor(j.params[0]||1,0),!0}cursorBackward(j){return this._moveCursor(-(j.params[0]||1),0),!0}cursorNextLine(j){return this.cursorDown(j),this._activeBuffer.x=0,!0}cursorPrecedingLine(j){return this.cursorUp(j),this._activeBuffer.x=0,!0}cursorCharAbsolute(j){return this._setCursor((j.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(j){return this._setCursor(j.length>=2?(j.params[1]||1)-1:0,(j.params[0]||1)-1),!0}charPosAbsolute(j){return this._setCursor((j.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(j){return this._moveCursor(j.params[0]||1,0),!0}linePosAbsolute(j){return this._setCursor(this._activeBuffer.x,(j.params[0]||1)-1),!0}vPositionRelative(j){return this._moveCursor(0,j.params[0]||1),!0}hVPosition(j){return this.cursorPosition(j),!0}tabClear(j){const U=j.params[0];return U===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:U===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let U=j.params[0]||1;for(;U--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let U=j.params[0]||1;for(;U--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(j){const U=j.params[0];return U===1&&(this._curAttrData.bg|=536870912),U!==2&&U!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(j,U,N,z=!1,X=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);ie.replaceCells(U,N,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),X),z&&(ie.isWrapped=!1)}_resetBufferLine(j,U=!1){const N=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);N&&(N.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),U),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+j),N.isWrapped=!1)}eraseInDisplay(j,U=!1){let N;switch(this._restrictCursor(this._bufferService.cols),j.params[0]){case 0:for(N=this._activeBuffer.y,this._dirtyRowTracker.markDirty(N),this._eraseInBufferLine(N++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,U);N<this._bufferService.rows;N++)this._resetBufferLine(N,U);this._dirtyRowTracker.markDirty(N);break;case 1:for(N=this._activeBuffer.y,this._dirtyRowTracker.markDirty(N),this._eraseInBufferLine(N,0,this._activeBuffer.x+1,!0,U),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(N+1).isWrapped=!1);N--;)this._resetBufferLine(N,U);this._dirtyRowTracker.markDirty(0);break;case 2:for(N=this._bufferService.rows,this._dirtyRowTracker.markDirty(N-1);N--;)this._resetBufferLine(N,U);this._dirtyRowTracker.markDirty(0);break;case 3:const z=this._activeBuffer.lines.length-this._bufferService.rows;z>0&&(this._activeBuffer.lines.trimStart(z),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-z,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-z,0),this._onScroll.fire(0))}return!0}eraseInLine(j,U=!1){switch(this._restrictCursor(this._bufferService.cols),j.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,U);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,U);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,U)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(j){this._restrictCursor();let U=j.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=this._activeBuffer.ybase+this._activeBuffer.y,z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,X=this._bufferService.rows-1+this._activeBuffer.ybase-z+1;for(;U--;)this._activeBuffer.lines.splice(X-1,1),this._activeBuffer.lines.splice(N,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(j){this._restrictCursor();let U=j.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=this._activeBuffer.ybase+this._activeBuffer.y;let z;for(z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,z=this._bufferService.rows-1+this._activeBuffer.ybase-z;U--;)this._activeBuffer.lines.splice(N,1),this._activeBuffer.lines.splice(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(j){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.insertCells(this._activeBuffer.x,j.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(j){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.deleteCells(this._activeBuffer.x,j.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(j){let U=j.params[0]||1;for(;U--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(j){let U=j.params[0]||1;for(;U--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(h.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);z.deleteCells(0,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);z.insertCells(0,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);z.insertCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);z.deleteCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(j){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(j.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(j){const U=this._parser.precedingJoinState;if(!U)return!0;const N=j.params[0]||1,z=L.UnicodeService.extractWidth(U),X=this._activeBuffer.x-z,ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(X),de=new Uint32Array(ie.length*N);let G=0;for(let P=0;P<ie.length;){const he=ie.codePointAt(P)||0;de[G++]=he,P+=he>65535?2:1}let Q=G;for(let P=1;P<N;++P)de.copyWithin(Q,0,G),Q+=G;return this.print(de,0,Q),!0}sendDeviceAttributesPrimary(j){return j.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(v.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(v.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(j){return j.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(v.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(v.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(j.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(v.C0.ESC+"[>83;40003;0c")),!0}_is(j){return(this._optionsService.rawOptions.termName+"").indexOf(j)===0}setMode(j){for(let U=0;U<j.length;U++)switch(j.params[U]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(j){for(let U=0;U<j.length;U++)switch(j.params[U]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,w.DEFAULT_CHARSET),this._charsetService.setgCharset(1,w.DEFAULT_CHARSET),this._charsetService.setgCharset(2,w.DEFAULT_CHARSET),this._charsetService.setgCharset(3,w.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(j){for(let U=0;U<j.length;U++)switch(j.params[U]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(j){for(let U=0;U<j.length;U++)switch(j.params[U]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),j.params[U]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(j,U){const N=this._coreService.decPrivateModes,{activeProtocol:z,activeEncoding:X}=this._coreMouseService,ie=this._coreService,{buffers:de,cols:G}=this._bufferService,{active:Q,alt:P}=de,he=this._optionsService.rawOptions,ge=ze=>ze?1:2,oe=j.params[0];return me=oe,Ce=U?oe===2?4:oe===4?ge(ie.modes.insertMode):oe===12?3:oe===20?ge(he.convertEol):0:oe===1?ge(N.applicationCursorKeys):oe===3?he.windowOptions.setWinLines?G===80?2:G===132?1:0:0:oe===6?ge(N.origin):oe===7?ge(N.wraparound):oe===8?3:oe===9?ge(z==="X10"):oe===12?ge(he.cursorBlink):oe===25?ge(!ie.isCursorHidden):oe===45?ge(N.reverseWraparound):oe===66?ge(N.applicationKeypad):oe===67?4:oe===1e3?ge(z==="VT200"):oe===1002?ge(z==="DRAG"):oe===1003?ge(z==="ANY"):oe===1004?ge(N.sendFocus):oe===1005?4:oe===1006?ge(X==="SGR"):oe===1015?4:oe===1016?ge(X==="SGR_PIXELS"):oe===1048?1:oe===47||oe===1047||oe===1049?ge(Q===P):oe===2004?ge(N.bracketedPasteMode):0,ie.triggerDataEvent(`${v.C0.ESC}[${U?"":"?"}${me};${Ce}$y`),!0;var me,Ce}_updateAttrColor(j,U,N,z,X){return U===2?(j|=50331648,j&=-16777216,j|=A.AttributeData.fromColorRGB([N,z,X])):U===5&&(j&=-50331904,j|=33554432|255&N),j}_extractColor(j,U,N){const z=[0,0,-1,0,0,0];let X=0,ie=0;do{if(z[ie+X]=j.params[U+ie],j.hasSubParams(U+ie)){const de=j.getSubParams(U+ie);let G=0;do z[1]===5&&(X=1),z[ie+G+1+X]=de[G];while(++G<de.length&&G+ie+1+X<z.length);break}if(z[1]===5&&ie+X>=2||z[1]===2&&ie+X>=5)break;z[1]&&(X=1)}while(++ie+U<j.length&&ie+X<z.length);for(let de=2;de<z.length;++de)z[de]===-1&&(z[de]=0);switch(z[0]){case 38:N.fg=this._updateAttrColor(N.fg,z[1],z[3],z[4],z[5]);break;case 48:N.bg=this._updateAttrColor(N.bg,z[1],z[3],z[4],z[5]);break;case 58:N.extended=N.extended.clone(),N.extended.underlineColor=this._updateAttrColor(N.extended.underlineColor,z[1],z[3],z[4],z[5])}return ie}_processUnderline(j,U){U.extended=U.extended.clone(),(!~j||j>5)&&(j=1),U.extended.underlineStyle=j,U.fg|=268435456,j===0&&(U.fg&=-268435457),U.updateExtended()}_processSGR0(j){j.fg=h.DEFAULT_ATTR_DATA.fg,j.bg=h.DEFAULT_ATTR_DATA.bg,j.extended=j.extended.clone(),j.extended.underlineStyle=0,j.extended.underlineColor&=-67108864,j.updateExtended()}charAttributes(j){if(j.length===1&&j.params[0]===0)return this._processSGR0(this._curAttrData),!0;const U=j.length;let N;const z=this._curAttrData;for(let X=0;X<U;X++)N=j.params[X],N>=30&&N<=37?(z.fg&=-50331904,z.fg|=16777216|N-30):N>=40&&N<=47?(z.bg&=-50331904,z.bg|=16777216|N-40):N>=90&&N<=97?(z.fg&=-50331904,z.fg|=16777224|N-90):N>=100&&N<=107?(z.bg&=-50331904,z.bg|=16777224|N-100):N===0?this._processSGR0(z):N===1?z.fg|=134217728:N===3?z.bg|=67108864:N===4?(z.fg|=268435456,this._processUnderline(j.hasSubParams(X)?j.getSubParams(X)[0]:1,z)):N===5?z.fg|=536870912:N===7?z.fg|=67108864:N===8?z.fg|=1073741824:N===9?z.fg|=2147483648:N===2?z.bg|=134217728:N===21?this._processUnderline(2,z):N===22?(z.fg&=-134217729,z.bg&=-134217729):N===23?z.bg&=-67108865:N===24?(z.fg&=-268435457,this._processUnderline(0,z)):N===25?z.fg&=-536870913:N===27?z.fg&=-67108865:N===28?z.fg&=-1073741825:N===29?z.fg&=2147483647:N===39?(z.fg&=-67108864,z.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):N===49?(z.bg&=-67108864,z.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):N===38||N===48||N===58?X+=this._extractColor(j,X,z):N===53?z.bg|=1073741824:N===55?z.bg&=-1073741825:N===59?(z.extended=z.extended.clone(),z.extended.underlineColor=-1,z.updateExtended()):N===100?(z.fg&=-67108864,z.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,z.bg&=-67108864,z.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",N);return!0}deviceStatus(j){switch(j.params[0]){case 5:this._coreService.triggerDataEvent(`${v.C0.ESC}[0n`);break;case 6:const U=this._activeBuffer.y+1,N=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${v.C0.ESC}[${U};${N}R`)}return!0}deviceStatusPrivate(j){if(j.params[0]===6){const U=this._activeBuffer.y+1,N=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${v.C0.ESC}[?${U};${N}R`)}return!0}softReset(j){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(j){const U=j.params[0]||1;switch(U){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const N=U%2==1;return this._optionsService.options.cursorBlink=N,!0}setScrollRegion(j){const U=j.params[0]||1;let N;return(j.length<2||(N=j.params[1])>this._bufferService.rows||N===0)&&(N=this._bufferService.rows),N>U&&(this._activeBuffer.scrollTop=U-1,this._activeBuffer.scrollBottom=N-1,this._setCursor(0,0)),!0}windowOptions(j){if(!I(j.params[0],this._optionsService.rawOptions.windowOptions))return!0;const U=j.length>1?j.params[1]:0;switch(j.params[0]){case 14:U!==2&&this._onRequestWindowsOptionsReport.fire(V.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(V.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${v.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:U!==0&&U!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),U!==0&&U!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:U!==0&&U!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),U!==0&&U!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(j){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(j){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(j){return this._windowTitle=j,this._onTitleChange.fire(j),!0}setIconName(j){return this._iconName=j,!0}setOrReportIndexedColor(j){const U=[],N=j.split(";");for(;N.length>1;){const z=N.shift(),X=N.shift();if(/^\d+$/.exec(z)){const ie=parseInt(z);if(Z(ie))if(X==="?")U.push({type:0,index:ie});else{const de=(0,B.parseColor)(X);de&&U.push({type:1,index:ie,color:de})}}}return U.length&&this._onColor.fire(U),!0}setHyperlink(j){const U=j.split(";");return!(U.length<2)&&(U[1]?this._createHyperlink(U[0],U[1]):!U[0]&&this._finishHyperlink())}_createHyperlink(j,U){this._getCurrentLinkId()&&this._finishHyperlink();const N=j.split(":");let z;const X=N.findIndex((ie=>ie.startsWith("id=")));return X!==-1&&(z=N[X].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:z,uri:U}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(j,U){const N=j.split(";");for(let z=0;z<N.length&&!(U>=this._specialColors.length);++z,++U)if(N[z]==="?")this._onColor.fire([{type:0,index:this._specialColors[U]}]);else{const X=(0,B.parseColor)(N[z]);X&&this._onColor.fire([{type:1,index:this._specialColors[U],color:X}])}return!0}setOrReportFgColor(j){return this._setOrReportSpecialColor(j,0)}setOrReportBgColor(j){return this._setOrReportSpecialColor(j,1)}setOrReportCursorColor(j){return this._setOrReportSpecialColor(j,2)}restoreIndexedColor(j){if(!j)return this._onColor.fire([{type:2}]),!0;const U=[],N=j.split(";");for(let z=0;z<N.length;++z)if(/^\d+$/.exec(N[z])){const X=parseInt(N[z]);Z(X)&&U.push({type:2,index:X})}return U.length&&this._onColor.fire(U),!0}restoreFgColor(j){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(j){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(j){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,w.DEFAULT_CHARSET),!0}selectCharset(j){return j.length!==2?(this.selectDefaultCharset(),!0):(j[0]==="/"||this._charsetService.setgCharset(W[j[0]],w.CHARSETS[j[1]]||w.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const j=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,j,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(j){return this._charsetService.setgLevel(j),!0}screenAlignmentPattern(){const j=new g.CellData;j.content=4194373,j.fg=this._curAttrData.fg,j.bg=this._curAttrData.bg,this._setCursor(0,0);for(let U=0;U<this._bufferService.rows;++U){const N=this._activeBuffer.ybase+this._activeBuffer.y+U,z=this._activeBuffer.lines.get(N);z&&(z.fill(j),z.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(j,U){const N=this._bufferService.buffer,z=this._optionsService.rawOptions;return(X=>(this._coreService.triggerDataEvent(`${v.C0.ESC}${X}${v.C0.ESC}\\`),!0))(j==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:j==='"p'?'P1$r61;1"p':j==="r"?`P1$r${N.scrollTop+1};${N.scrollBottom+1}r`:j==="m"?"P1$r0m":j===" q"?`P1$r${{block:2,underline:4,bar:6}[z.cursorStyle]-(z.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(j,U){this._dirtyRowTracker.markRangeDirty(j,U)}}o.InputHandler=ne;let q=class{constructor(K){this._bufferService=K,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(K){K<this.start?this.start=K:K>this.end&&(this.end=K)}markRangeDirty(K,j){K>j&&(ee=K,K=j,j=ee),K<this.start&&(this.start=K),j>this.end&&(this.end=j)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(K){return 0<=K&&K<256}q=u([C(0,D.IBufferService)],q)},844:(S,o)=>{function c(u){for(const C of u)C.dispose();u.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const C=this._disposables.indexOf(u);C!==-1&&this._disposables.splice(C,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){this._isDisposed||u===this._value||(this._value?.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},o.toDisposable=function(u){return{dispose:u}},o.disposeArray=c,o.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(C,v,w){this._data[C]||(this._data[C]={}),this._data[C][v]=w}get(C,v){return this._data[C]?this._data[C][v]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,C,v,w,x){this._data.get(u,C)||this._data.set(u,C,new c),this._data.get(u,C).set(v,w,x)}get(u,C,v,w){return this._data.get(u,C)?.get(v,w)}clear(){this._data.clear()}}},6114:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u";const c=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const C=c.match(/Version\/(\d+)/);return C===null||C.length<2?0:parseInt(C[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),o.isIpad=u==="iPad",o.isIphone=u==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),o.isLinux=u.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(c)},6106:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const C=this._getKey(u);if(C===void 0||(c=this._search(C),c===-1)||this._getKey(this._array[c])!==C)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===C);return!1}*getKeyIterator(u){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===u)}forEachByKey(u,C){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do C(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===u)}values(){return[...this._array].values()}_search(u){let C=0,v=this._array.length-1;for(;v>=C;){let w=C+v>>1;const x=this._getKey(this._array[w]);if(x>u)v=w-1;else{if(!(x<u)){for(;w>0&&this._getKey(this._array[w-1])===u;)w--;return w}C=w+1}}return C}}},7226:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class C{constructor(){this._tasks=[],this._i=0}enqueue(x){this._tasks.push(x),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(x){this._idleCallback=void 0;let R=0,b=0,h=x.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(R=Date.now(),this._tasks[this._i]()||this._i++,R=Math.max(1,Date.now()-R),b=Math.max(R,b),m=x.timeRemaining(),1.5*b>m)return h-R<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(h-R))}ms`),void this._start();h=m}this.clear()}}class v extends C{_requestCallback(x){return setTimeout((()=>x(this._createDeadline(16))))}_cancelCallback(x){clearTimeout(x)}_createDeadline(x){const R=Date.now()+x;return{timeRemaining:()=>Math.max(0,R-Date.now())}}}o.PriorityTaskQueue=v,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends C{_requestCallback(w){return requestIdleCallback(w)}_cancelCallback(w){cancelIdleCallback(w)}}:v,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(w){this._queue.clear(),this._queue.enqueue(w)}flush(){this._queue.flush()}}},9282:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=c(643);o.updateWindowsModeWrappedState=function(C){const v=C.buffer.lines.get(C.buffer.ybase+C.buffer.y-1),w=v?.get(C.cols-1),x=C.buffer.lines.get(C.buffer.ybase+C.buffer.y);x&&w&&(x.isWrapped=w[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&w[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(v){return[v>>>16&255,v>>>8&255,255&v]}static fromColorRGB(v){return(255&v[0])<<16|(255&v[1])<<8|255&v[2]}clone(){const v=new c;return v.fg=this.fg,v.bg=this.bg,v.extended=this.extended.clone(),v}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}o.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(v){this._ext=v}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(v){this._ext&=-469762049,this._ext|=v<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(v){this._ext&=-67108864,this._ext|=67108863&v}get urlId(){return this._urlId}set urlId(v){this._urlId=v}constructor(v=0,w=0){this._ext=0,this._urlId=0,this._ext=v,this._urlId=w}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=u},9092:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=c(6349),C=c(7226),v=c(3734),w=c(8437),x=c(4634),R=c(511),b=c(643),h=c(4863),m=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(p,g,A){this._hasScrollback=p,this._optionsService=g,this._bufferService=A,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=w.DEFAULT_ATTR_DATA.clone(),this.savedCharset=m.DEFAULT_CHARSET,this.markers=[],this._nullCell=R.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),this._whitespaceCell=R.CellData.fromCharData([0,b.WHITESPACE_CELL_CHAR,b.WHITESPACE_CELL_WIDTH,b.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new C.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(p){return p?(this._nullCell.fg=p.fg,this._nullCell.bg=p.bg,this._nullCell.extended=p.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new v.ExtendedAttrs),this._nullCell}getWhitespaceCell(p){return p?(this._whitespaceCell.fg=p.fg,this._whitespaceCell.bg=p.bg,this._whitespaceCell.extended=p.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new v.ExtendedAttrs),this._whitespaceCell}getBlankLine(p,g){return new w.BufferLine(this._bufferService.cols,this.getNullCell(p),g)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const p=this.ybase+this.y-this.ydisp;return p>=0&&p<this._rows}_getCorrectBufferLength(p){if(!this._hasScrollback)return p;const g=p+this._optionsService.rawOptions.scrollback;return g>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:g}fillViewportRows(p){if(this.lines.length===0){p===void 0&&(p=w.DEFAULT_ATTR_DATA);let g=this._rows;for(;g--;)this.lines.push(this.getBlankLine(p))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(p,g){const A=this.getNullCell(w.DEFAULT_ATTR_DATA);let D=0;const L=this._getCorrectBufferLength(g);if(L>this.lines.maxLength&&(this.lines.maxLength=L),this.lines.length>0){if(this._cols<p)for(let E=0;E<this.lines.length;E++)D+=+this.lines.get(E).resize(p,A);let T=0;if(this._rows<g)for(let E=this._rows;E<g;E++)this.lines.length<g+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new w.BufferLine(p,A)):this.ybase>0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new w.BufferLine(p,A)));else for(let E=this._rows;E>g;E--)this.lines.length>g+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(L<this.lines.maxLength){const E=this.lines.length-L;E>0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=L}this.x=Math.min(this.x,p-1),this.y=Math.min(this.y,g-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,p-1),this.scrollTop=0}if(this.scrollBottom=g-1,this._isReflowEnabled&&(this._reflow(p,g),this._cols>p))for(let T=0;T<this.lines.length;T++)D+=+this.lines.get(T).resize(p,A);this._cols=p,this._rows=g,this._memoryCleanupQueue.clear(),D>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let p=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,p=!1);let g=0;for(;this._memoryCleanupPosition<this.lines.length;)if(g+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),g>100)return!0;return p}get _isReflowEnabled(){const p=this._optionsService.rawOptions.windowsPty;return p&&p.buildNumber?this._hasScrollback&&p.backend==="conpty"&&p.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(p,g){this._cols!==p&&(p>this._cols?this._reflowLarger(p,g):this._reflowSmaller(p,g))}_reflowLarger(p,g){const A=(0,x.reflowLargerGetLinesToRemove)(this.lines,this._cols,p,this.ybase+this.y,this.getNullCell(w.DEFAULT_ATTR_DATA));if(A.length>0){const D=(0,x.reflowLargerCreateNewLayout)(this.lines,A);(0,x.reflowLargerApplyNewLayout)(this.lines,D.layout),this._reflowLargerAdjustViewport(p,g,D.countRemoved)}}_reflowLargerAdjustViewport(p,g,A){const D=this.getNullCell(w.DEFAULT_ATTR_DATA);let L=A;for(;L-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<g&&this.lines.push(new w.BufferLine(p,D))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-A,0)}_reflowSmaller(p,g){const A=this.getNullCell(w.DEFAULT_ATTR_DATA),D=[];let L=0;for(let T=this.lines.length-1;T>=0;T--){let E=this.lines.get(T);if(!E||!E.isWrapped&&E.getTrimmedLength()<=p)continue;const B=[E];for(;E.isWrapped&&T>0;)E=this.lines.get(--T),B.unshift(E);const W=this.ybase+this.y;if(W>=T&&W<T+B.length)continue;const F=B[B.length-1].getTrimmedLength(),I=(0,x.reflowSmallerGetNewLineLengths)(B,this._cols,p),V=I.length-B.length;let ee;ee=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+V):Math.max(0,this.lines.length-this.lines.maxLength+V);const ne=[];for(let N=0;N<V;N++){const z=this.getBlankLine(w.DEFAULT_ATTR_DATA,!0);ne.push(z)}ne.length>0&&(D.push({start:T+B.length+L,newLines:ne}),L+=ne.length),B.push(...ne);let q=I.length-1,Z=I[q];Z===0&&(q--,Z=I[q]);let K=B.length-V-1,j=F;for(;K>=0;){const N=Math.min(j,Z);if(B[q]===void 0)break;if(B[q].copyCellsFrom(B[K],j-N,Z-N,N,!0),Z-=N,Z===0&&(q--,Z=I[q]),j-=N,j===0){K--;const z=Math.max(K,0);j=(0,x.getWrappedLineTrimmedLength)(B,z,this._cols)}}for(let N=0;N<B.length;N++)I[N]<p&&B[N].setCell(I[N],A);let U=V-ee;for(;U-- >0;)this.ybase===0?this.y<g-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+L)-g&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+V,this.ybase+g-1)}if(D.length>0){const T=[],E=[];for(let q=0;q<this.lines.length;q++)E.push(this.lines.get(q));const B=this.lines.length;let W=B-1,F=0,I=D[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+L);let V=0;for(let q=Math.min(this.lines.maxLength-1,B+L-1);q>=0;q--)if(I&&I.start>W+V){for(let Z=I.newLines.length-1;Z>=0;Z--)this.lines.set(q--,I.newLines[Z]);q++,T.push({index:W+1,amount:I.newLines.length}),V+=I.newLines.length,I=D[++F]}else this.lines.set(q,E[W--]);let ee=0;for(let q=T.length-1;q>=0;q--)T[q].index+=ee,this.lines.onInsertEmitter.fire(T[q]),ee+=T[q].amount;const ne=Math.max(0,B+L-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(p,g,A=0,D){const L=this.lines.get(p);return L?L.translateToString(g,A,D):""}getWrappedRangeForLine(p){let g=p,A=p;for(;g>0&&this.lines.get(g).isWrapped;)g--;for(;A+1<this.lines.length&&this.lines.get(A+1).isWrapped;)A++;return{first:g,last:A}}setupTabStops(p){for(p!=null?this.tabs[p]||(p=this.prevStop(p)):(this.tabs={},p=0);p<this._cols;p+=this._optionsService.rawOptions.tabStopWidth)this.tabs[p]=!0}prevStop(p){for(p==null&&(p=this.x);!this.tabs[--p]&&p>0;);return p>=this._cols?this._cols-1:p<0?0:p}nextStop(p){for(p==null&&(p=this.x);!this.tabs[++p]&&p<this._cols;);return p>=this._cols?this._cols-1:p<0?0:p}clearMarkers(p){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].line===p&&(this.markers[g].dispose(),this.markers.splice(g--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let p=0;p<this.markers.length;p++)this.markers[p].dispose(),this.markers.splice(p--,1);this._isClearing=!1}addMarker(p){const g=new h.Marker(p);return this.markers.push(g),g.register(this.lines.onTrim((A=>{g.line-=A,g.line<0&&g.dispose()}))),g.register(this.lines.onInsert((A=>{g.line>=A.index&&(g.line+=A.amount)}))),g.register(this.lines.onDelete((A=>{g.line>=A.index&&g.line<A.index+A.amount&&g.dispose(),g.line>A.index&&(g.line-=A.amount)}))),g.register(g.onDispose((()=>this._removeMarker(g)))),g}_removeMarker(p){this._isClearing||this.markers.splice(this.markers.indexOf(p),1)}}},8437:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),C=c(511),v=c(643),w=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let x=0;class R{constructor(h,m,p=!1){this.isWrapped=p,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*h);const g=m||C.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]);for(let A=0;A<h;++A)this.setCell(A,g);this.length=h}get(h){const m=this._data[3*h+0],p=2097151&m;return[this._data[3*h+1],2097152&m?this._combined[h]:p?(0,w.stringFromCodePoint)(p):"",m>>22,2097152&m?this._combined[h].charCodeAt(this._combined[h].length-1):p]}set(h,m){this._data[3*h+1]=m[v.CHAR_DATA_ATTR_INDEX],m[v.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[h]=m[1],this._data[3*h+0]=2097152|h|m[v.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*h+0]=m[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|m[v.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(h){return this._data[3*h+0]>>22}hasWidth(h){return 12582912&this._data[3*h+0]}getFg(h){return this._data[3*h+1]}getBg(h){return this._data[3*h+2]}hasContent(h){return 4194303&this._data[3*h+0]}getCodePoint(h){const m=this._data[3*h+0];return 2097152&m?this._combined[h].charCodeAt(this._combined[h].length-1):2097151&m}isCombined(h){return 2097152&this._data[3*h+0]}getString(h){const m=this._data[3*h+0];return 2097152&m?this._combined[h]:2097151&m?(0,w.stringFromCodePoint)(2097151&m):""}isProtected(h){return 536870912&this._data[3*h+2]}loadCell(h,m){return x=3*h,m.content=this._data[x+0],m.fg=this._data[x+1],m.bg=this._data[x+2],2097152&m.content&&(m.combinedData=this._combined[h]),268435456&m.bg&&(m.extended=this._extendedAttrs[h]),m}setCell(h,m){2097152&m.content&&(this._combined[h]=m.combinedData),268435456&m.bg&&(this._extendedAttrs[h]=m.extended),this._data[3*h+0]=m.content,this._data[3*h+1]=m.fg,this._data[3*h+2]=m.bg}setCellFromCodePoint(h,m,p,g,A,D){268435456&A&&(this._extendedAttrs[h]=D),this._data[3*h+0]=m|p<<22,this._data[3*h+1]=g,this._data[3*h+2]=A}addCodepointToCell(h,m,p){let g=this._data[3*h+0];2097152&g?this._combined[h]+=(0,w.stringFromCodePoint)(m):2097151&g?(this._combined[h]=(0,w.stringFromCodePoint)(2097151&g)+(0,w.stringFromCodePoint)(m),g&=-2097152,g|=2097152):g=m|4194304,p&&(g&=-12582913,g|=p<<22),this._data[3*h+0]=g}insertCells(h,m,p,g){if((h%=this.length)&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs),m<this.length-h){const A=new C.CellData;for(let D=this.length-h-m-1;D>=0;--D)this.setCell(h+m+D,this.loadCell(h+D,A));for(let D=0;D<m;++D)this.setCell(h+D,p)}else for(let A=h;A<this.length;++A)this.setCell(A,p);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs)}deleteCells(h,m,p,g){if(h%=this.length,m<this.length-h){const A=new C.CellData;for(let D=0;D<this.length-h-m;++D)this.setCell(h+D,this.loadCell(h+m+D,A));for(let D=this.length-m;D<this.length;++D)this.setCell(D,p)}else for(let A=h;A<this.length;++A)this.setCell(A,p);h&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs),this.getWidth(h)!==0||this.hasContent(h)||this.setCellFromCodePoint(h,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs)}replaceCells(h,m,p,g,A=!1){if(A)for(h&&this.getWidth(h-1)===2&&!this.isProtected(h-1)&&this.setCellFromCodePoint(h-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs),m<this.length&&this.getWidth(m-1)===2&&!this.isProtected(m)&&this.setCellFromCodePoint(m,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs);h<m&&h<this.length;)this.isProtected(h)||this.setCell(h,p),h++;else for(h&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs),m<this.length&&this.getWidth(m-1)===2&&this.setCellFromCodePoint(m,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs);h<m&&h<this.length;)this.setCell(h++,p)}resize(h,m){if(h===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const p=3*h;if(h>this.length){if(this._data.buffer.byteLength>=4*p)this._data=new Uint32Array(this._data.buffer,0,p);else{const g=new Uint32Array(p);g.set(this._data),this._data=g}for(let g=this.length;g<h;++g)this.setCell(g,m)}else{this._data=this._data.subarray(0,p);const g=Object.keys(this._combined);for(let D=0;D<g.length;D++){const L=parseInt(g[D],10);L>=h&&delete this._combined[L]}const A=Object.keys(this._extendedAttrs);for(let D=0;D<A.length;D++){const L=parseInt(A[D],10);L>=h&&delete this._extendedAttrs[L]}}return this.length=h,4*p*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const h=new Uint32Array(this._data.length);return h.set(this._data),this._data=h,1}return 0}fill(h,m=!1){if(m)for(let p=0;p<this.length;++p)this.isProtected(p)||this.setCell(p,h);else{this._combined={},this._extendedAttrs={};for(let p=0;p<this.length;++p)this.setCell(p,h)}}copyFrom(h){this.length!==h.length?this._data=new Uint32Array(h._data):this._data.set(h._data),this.length=h.length,this._combined={};for(const m in h._combined)this._combined[m]=h._combined[m];this._extendedAttrs={};for(const m in h._extendedAttrs)this._extendedAttrs[m]=h._extendedAttrs[m];this.isWrapped=h.isWrapped}clone(){const h=new R(0);h._data=new Uint32Array(this._data),h.length=this.length;for(const m in this._combined)h._combined[m]=this._combined[m];for(const m in this._extendedAttrs)h._extendedAttrs[m]=this._extendedAttrs[m];return h.isWrapped=this.isWrapped,h}getTrimmedLength(){for(let h=this.length-1;h>=0;--h)if(4194303&this._data[3*h+0])return h+(this._data[3*h+0]>>22);return 0}getNoBgTrimmedLength(){for(let h=this.length-1;h>=0;--h)if(4194303&this._data[3*h+0]||50331648&this._data[3*h+2])return h+(this._data[3*h+0]>>22);return 0}copyCellsFrom(h,m,p,g,A){const D=h._data;if(A)for(let T=g-1;T>=0;T--){for(let E=0;E<3;E++)this._data[3*(p+T)+E]=D[3*(m+T)+E];268435456&D[3*(m+T)+2]&&(this._extendedAttrs[p+T]=h._extendedAttrs[m+T])}else for(let T=0;T<g;T++){for(let E=0;E<3;E++)this._data[3*(p+T)+E]=D[3*(m+T)+E];268435456&D[3*(m+T)+2]&&(this._extendedAttrs[p+T]=h._extendedAttrs[m+T])}const L=Object.keys(h._combined);for(let T=0;T<L.length;T++){const E=parseInt(L[T],10);E>=m&&(this._combined[E-m+p]=h._combined[E])}}translateToString(h=!1,m=0,p=this.length){h&&(p=Math.min(p,this.getTrimmedLength()));let g="";for(;m<p;){const A=this._data[3*m+0],D=2097151&A;g+=2097152&A?this._combined[m]:D?(0,w.stringFromCodePoint)(D):v.WHITESPACE_CELL_CHAR,m+=A>>22||1}return g}}o.BufferLine=R},4841:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(S,o)=>{function c(u,C,v){if(C===u.length-1)return u[C].getTrimmedLength();const w=!u[C].hasContent(v-1)&&u[C].getWidth(v-1)===1,x=u[C+1].getWidth(0)===2;return w&&x?v-1:v}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,C,v,w,x){const R=[];for(let b=0;b<u.length-1;b++){let h=b,m=u.get(++h);if(!m.isWrapped)continue;const p=[u.get(b)];for(;h<u.length&&m.isWrapped;)p.push(m),m=u.get(++h);if(w>=b&&w<h){b+=p.length-1;continue}let g=0,A=c(p,g,C),D=1,L=0;for(;D<p.length;){const E=c(p,D,C),B=E-L,W=v-A,F=Math.min(B,W);p[g].copyCellsFrom(p[D],L,A,F,!1),A+=F,A===v&&(g++,A=0),L+=F,L===E&&(D++,L=0),A===0&&g!==0&&p[g-1].getWidth(v-1)===2&&(p[g].copyCellsFrom(p[g-1],v-1,A++,1,!1),p[g-1].setCell(v-1,x))}p[g].replaceCells(A,v,x);let T=0;for(let E=p.length-1;E>0&&(E>g||p[E].getTrimmedLength()===0);E--)T++;T>0&&(R.push(b+p.length-T),R.push(T)),b+=p.length-1}return R},o.reflowLargerCreateNewLayout=function(u,C){const v=[];let w=0,x=C[w],R=0;for(let b=0;b<u.length;b++)if(x===b){const h=C[++w];u.onDeleteEmitter.fire({index:b-R,amount:h}),b+=h-1,R+=h,x=C[++w]}else v.push(b);return{layout:v,countRemoved:R}},o.reflowLargerApplyNewLayout=function(u,C){const v=[];for(let w=0;w<C.length;w++)v.push(u.get(C[w]));for(let w=0;w<v.length;w++)u.set(w,v[w]);u.length=C.length},o.reflowSmallerGetNewLineLengths=function(u,C,v){const w=[],x=u.map(((m,p)=>c(u,p,C))).reduce(((m,p)=>m+p));let R=0,b=0,h=0;for(;h<x;){if(x-h<v){w.push(x-h);break}R+=v;const m=c(u,b,C);R>m&&(R-=m,b++);const p=u[b].getWidth(R-1)===2;p&&R--;const g=p?v-1:v;w.push(g),h+=g}return w},o.getWrappedLineTrimmedLength=c},5295:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),C=c(844),v=c(9092);class w extends C.Disposable{constructor(R,b){super(),this._optionsService=R,this._bufferService=b,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new v.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new v.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(R){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(R),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(R,b){this._normal.resize(R,b),this._alt.resize(R,b),this.setupTabStops(R)}setupTabStops(R){this._normal.setupTabStops(R),this._alt.setupTabStops(R)}}o.BufferSet=w},511:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=c(482),C=c(643),v=c(3734);class w extends v.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new v.ExtendedAttrs,this.combinedData=""}static fromCharData(R){const b=new w;return b.setFromCharData(R),b}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(R){this.fg=R[C.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(R[C.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(R[C.CHAR_DATA_CHAR_INDEX].length===2){const h=R[C.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=h&&h<=56319){const m=R[C.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(h-55296)+m-56320+65536|R[C.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=R[C.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|R[C.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=R[C.CHAR_DATA_CHAR_INDEX],this.content=2097152|R[C.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=w},643:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=c(8460),C=c(844);class v{get id(){return this._id}constructor(x){this.line=x,this.isDisposed=!1,this._disposables=[],this._id=v._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,C.disposeArray)(this._disposables),this._disposables.length=0)}register(x){return this._disposables.push(x),x}}o.Marker=v,v._nextId=1},7116:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(S,o)=>{var c,u,C;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(v){v.NUL="\0",v.SOH="",v.STX="",v.ETX="",v.EOT="",v.ENQ="",v.ACK="",v.BEL="\x07",v.BS="\b",v.HT=" ",v.LF=`
|
|
58
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(E){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),m.isLinux&&E&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(E){const B=this._getMouseBufferCoords(E),W=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(W&&F&&B)&&this._areCoordsInSelection(B,W,F)}isCellInSelection(E,B){const W=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!W||!F)&&this._areCoordsInSelection([E,B],W,F)}_areCoordsInSelection(E,B,W){return E[1]>B[1]&&E[1]<W[1]||B[1]===W[1]&&E[1]===B[1]&&E[0]>=B[0]&&E[0]<W[0]||B[1]<W[1]&&E[1]===W[1]&&E[0]<W[0]||B[1]<W[1]&&E[1]===B[1]&&E[0]>=B[0]}_selectWordAtCursor(E,B){const W=this._linkifier.currentLink?.link?.range;if(W)return this._model.selectionStart=[W.start.x-1,W.start.y-1],this._model.selectionStartLength=(0,p.getRangeLength)(W,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(E);return!!F&&(this._selectWordAt(F,B),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(E,B){this._model.clearSelection(),E=Math.max(E,0),B=Math.min(B,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,B],this.refresh(),this._onSelectionChange.fire()}_handleTrim(E){this._model.handleTrim(E)&&this.refresh()}_getMouseBufferCoords(E){const B=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(B)return B[0]--,B[1]--,B[1]+=this._bufferService.buffer.ydisp,B}_getMouseEventScrollAmount(E){let B=(0,v.getCoordsRelativeToElement)(this._coreBrowserService.window,E,this._screenElement)[1];const W=this._renderService.dimensions.css.canvas.height;return B>=0&&B<=W?0:(B>W&&(B-=W),B=Math.min(Math.max(B,-50),50),B/=50,B/Math.abs(B)+Math.round(14*B))}shouldForceSelection(E){return m.isMac?E.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:E.shiftKey}handleMouseDown(E){if(this._mouseDownTimeStamp=E.timeStamp,(E.button!==2||!this.hasSelection)&&E.button===0){if(!this._enabled){if(!this.shouldForceSelection(E))return;E.stopPropagation()}E.preventDefault(),this._dragScrollAmount=0,this._enabled&&E.shiftKey?this._handleIncrementalClick(E):E.detail===1?this._handleSingleClick(E):E.detail===2?this._handleDoubleClick(E):E.detail===3&&this._handleTripleClick(E),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))}_handleSingleClick(E){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(E)?3:0,this._model.selectionStart=this._getMouseBufferCoords(E),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const B=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);B&&B.length!==this._model.selectionStart[0]&&B.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(E){this._selectWordAtCursor(E,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(E){const B=this._getMouseBufferCoords(E);B&&(this._activeSelectionMode=2,this._selectLineAt(B[1]))}shouldColumnSelect(E){return E.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(E){if(E.stopImmediatePropagation(),!this._model.selectionStart)return;const B=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(E),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(E),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const W=this._bufferService.buffer;if(this._model.selectionEnd[1]<W.lines.length){const F=W.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}B&&B[0]===this._model.selectionEnd[0]&&B[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const E=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(E.ydisp+this._bufferService.rows,E.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=E.ydisp),this.refresh()}}_handleMouseUp(E){const B=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&B<500&&E.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const W=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(W&&W[0]!==void 0&&W[1]!==void 0){const F=(0,w.moveToCellSequence)(W[0]-1,W[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const E=this._model.finalSelectionStart,B=this._model.finalSelectionEnd,W=!(!E||!B||E[0]===B[0]&&E[1]===B[1]);W?E&&B&&(this._oldSelectionStart&&this._oldSelectionEnd&&E[0]===this._oldSelectionStart[0]&&E[1]===this._oldSelectionStart[1]&&B[0]===this._oldSelectionEnd[0]&&B[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(E,B,W)):this._oldHasSelection&&this._fireOnSelectionChange(E,B,W)}_fireOnSelectionChange(E,B,W){this._oldSelectionStart=E,this._oldSelectionEnd=B,this._oldHasSelection=W,this._onSelectionChange.fire()}_handleBufferActivate(E){this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim((B=>this._handleTrim(B)))}_convertViewportColToCharacterIndex(E,B){let W=B;for(let F=0;B>=F;F++){const I=E.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?W--:I>1&&B!==F&&(W+=I-1)}return W}setSelection(E,B,W){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,B],this._model.selectionStartLength=W,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(E){this._isClickInSelection(E)||(this._selectWordAtCursor(E,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(E,B,W=!0,F=!0){if(E[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,V=I.lines.get(E[1]);if(!V)return;const ee=I.translateBufferLineToString(E[1],!1);let ne=this._convertViewportColToCharacterIndex(V,E[0]),q=ne;const Z=E[0]-ne;let K=0,j=0,U=0,N=0;if(ee.charAt(ne)===" "){for(;ne>0&&ee.charAt(ne-1)===" ";)ne--;for(;q<ee.length&&ee.charAt(q+1)===" ";)q++}else{let ie=E[0],de=E[0];V.getWidth(ie)===0&&(K++,ie--),V.getWidth(de)===2&&(j++,de++);const G=V.getString(de).length;for(G>1&&(N+=G-1,q+=G-1);ie>0&&ne>0&&!this._isCharWordSeparator(V.loadCell(ie-1,this._workCell));){V.loadCell(ie-1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===0?(K++,ie--):X>1&&(U+=X-1,ne-=X-1),ne--,ie--}for(;de<V.length&&q+1<ee.length&&!this._isCharWordSeparator(V.loadCell(de+1,this._workCell));){V.loadCell(de+1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===2?(j++,de++):X>1&&(N+=X-1,q+=X-1),q++,de++}}q++;let z=ne+Z-K+U,Q=Math.min(this._bufferService.cols,q-ne+K+j-U-N);if(B||ee.slice(ne,q).trim()!==""){if(W&&z===0&&V.getCodePoint(0)!==32){const ie=I.lines.get(E[1]-1);if(ie&&V.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const de=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(de){const G=this._bufferService.cols-de.start;z-=G,Q+=G}}}if(F&&z+Q===this._bufferService.cols&&V.getCodePoint(this._bufferService.cols-1)!==32){const ie=I.lines.get(E[1]+1);if(ie?.isWrapped&&ie.getCodePoint(0)!==32){const de=this._getWordAt([0,E[1]+1],!1,!1,!0);de&&(Q+=de.length)}}return{start:z,length:Q}}}_selectWordAt(E,B){const W=this._getWordAt(E,B);if(W){for(;W.start<0;)W.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[W.start,E[1]],this._model.selectionStartLength=W.length}}_selectToWordAt(E){const B=this._getWordAt(E,!0);if(B){let W=E[1];for(;B.start<0;)B.start+=this._bufferService.cols,W--;if(!this._model.areSelectionValuesReversed())for(;B.start+B.length>this._bufferService.cols;)B.length-=this._bufferService.cols,W++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?B.start:B.start+B.length,W]}}_isCharWordSeparator(E){return E.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(E.getChars())>=0}_selectLineAt(E){const B=this._bufferService.buffer.getWrappedRangeForLine(E),W={start:{x:0,y:B.first},end:{x:this._bufferService.cols-1,y:B.last}};this._model.selectionStart=[0,B.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,p.getRangeLength)(W,this._bufferService.cols)}};o.SelectionService=T=u([C(3,A.IBufferService),C(4,A.ICoreService),C(5,R.IMouseService),C(6,A.IOptionsService),C(7,R.IRenderService),C(8,R.ICoreBrowserService)],T)},4725:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const u=c(8343);o.ICharSizeService=(0,u.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),o.IMouseService=(0,u.createDecorator)("MouseService"),o.IRenderService=(0,u.createDecorator)("RenderService"),o.ISelectionService=(0,u.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,u.createDecorator)("ThemeService")},6731:function(S,o,c){var u=this&&this.__decorate||function(T,E,B,W){var F,I=arguments.length,V=I<3?E:W===null?W=Object.getOwnPropertyDescriptor(E,B):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(T,E,B,W);else for(var ee=T.length-1;ee>=0;ee--)(F=T[ee])&&(V=(I<3?F(V):I>3?F(E,B,V):F(E,B))||V);return I>3&&V&&Object.defineProperty(E,B,V),V},C=this&&this.__param||function(T,E){return function(B,W){E(B,W,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const v=c(7239),w=c(8055),x=c(8460),R=c(844),b=c(2585),h=w.css.toColor("#ffffff"),m=w.css.toColor("#000000"),p=w.css.toColor("#ffffff"),g=w.css.toColor("#000000"),A={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[w.css.toColor("#2e3436"),w.css.toColor("#cc0000"),w.css.toColor("#4e9a06"),w.css.toColor("#c4a000"),w.css.toColor("#3465a4"),w.css.toColor("#75507b"),w.css.toColor("#06989a"),w.css.toColor("#d3d7cf"),w.css.toColor("#555753"),w.css.toColor("#ef2929"),w.css.toColor("#8ae234"),w.css.toColor("#fce94f"),w.css.toColor("#729fcf"),w.css.toColor("#ad7fa8"),w.css.toColor("#34e2e2"),w.css.toColor("#eeeeec")],E=[0,95,135,175,215,255];for(let B=0;B<216;B++){const W=E[B/36%6|0],F=E[B/6%6|0],I=E[B%6];T.push({css:w.channels.toCss(W,F,I),rgba:w.channels.toRgba(W,F,I)})}for(let B=0;B<24;B++){const W=8+10*B;T.push({css:w.channels.toCss(W,W,W),rgba:w.channels.toRgba(W,W,W)})}return T})());let D=o.ThemeService=class extends R.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new v.ColorContrastCache,this._halfContrastCache=new v.ColorContrastCache,this._onChangeColors=this.register(new x.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:h,background:m,cursor:p,cursorAccent:g,selectionForeground:void 0,selectionBackgroundTransparent:A,selectionBackgroundOpaque:w.color.blend(m,A),selectionInactiveBackgroundTransparent:A,selectionInactiveBackgroundOpaque:w.color.blend(m,A),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(T={}){const E=this._colors;if(E.foreground=L(T.foreground,h),E.background=L(T.background,m),E.cursor=L(T.cursor,p),E.cursorAccent=L(T.cursorAccent,g),E.selectionBackgroundTransparent=L(T.selectionBackground,A),E.selectionBackgroundOpaque=w.color.blend(E.background,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundTransparent=L(T.selectionInactiveBackground,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundOpaque=w.color.blend(E.background,E.selectionInactiveBackgroundTransparent),E.selectionForeground=T.selectionForeground?L(T.selectionForeground,w.NULL_COLOR):void 0,E.selectionForeground===w.NULL_COLOR&&(E.selectionForeground=void 0),w.color.isOpaque(E.selectionBackgroundTransparent)&&(E.selectionBackgroundTransparent=w.color.opacity(E.selectionBackgroundTransparent,.3)),w.color.isOpaque(E.selectionInactiveBackgroundTransparent)&&(E.selectionInactiveBackgroundTransparent=w.color.opacity(E.selectionInactiveBackgroundTransparent,.3)),E.ansi=o.DEFAULT_ANSI_COLORS.slice(),E.ansi[0]=L(T.black,o.DEFAULT_ANSI_COLORS[0]),E.ansi[1]=L(T.red,o.DEFAULT_ANSI_COLORS[1]),E.ansi[2]=L(T.green,o.DEFAULT_ANSI_COLORS[2]),E.ansi[3]=L(T.yellow,o.DEFAULT_ANSI_COLORS[3]),E.ansi[4]=L(T.blue,o.DEFAULT_ANSI_COLORS[4]),E.ansi[5]=L(T.magenta,o.DEFAULT_ANSI_COLORS[5]),E.ansi[6]=L(T.cyan,o.DEFAULT_ANSI_COLORS[6]),E.ansi[7]=L(T.white,o.DEFAULT_ANSI_COLORS[7]),E.ansi[8]=L(T.brightBlack,o.DEFAULT_ANSI_COLORS[8]),E.ansi[9]=L(T.brightRed,o.DEFAULT_ANSI_COLORS[9]),E.ansi[10]=L(T.brightGreen,o.DEFAULT_ANSI_COLORS[10]),E.ansi[11]=L(T.brightYellow,o.DEFAULT_ANSI_COLORS[11]),E.ansi[12]=L(T.brightBlue,o.DEFAULT_ANSI_COLORS[12]),E.ansi[13]=L(T.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),E.ansi[14]=L(T.brightCyan,o.DEFAULT_ANSI_COLORS[14]),E.ansi[15]=L(T.brightWhite,o.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const B=Math.min(E.ansi.length-16,T.extendedAnsi.length);for(let W=0;W<B;W++)E.ansi[W+16]=L(T.extendedAnsi[W],o.DEFAULT_ANSI_COLORS[W+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(T){this._restoreColor(T),this._onChangeColors.fire(this.colors)}_restoreColor(T){if(T!==void 0)switch(T){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[T]=this._restoreColors.ansi[T]}else for(let E=0;E<this._restoreColors.ansi.length;++E)this._colors.ansi[E]=this._restoreColors.ansi[E]}modifyColors(T){T(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function L(T,E){if(T!==void 0)try{return w.css.toColor(T)}catch{}return E}o.ThemeService=D=u([C(0,b.IOptionsService)],D)},6349:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=c(8460),C=c(844);class v extends C.Disposable{constructor(x){super(),this._maxLength=x,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(x){if(this._maxLength===x)return;const R=new Array(x);for(let b=0;b<Math.min(x,this.length);b++)R[b]=this._array[this._getCyclicIndex(b)];this._array=R,this._maxLength=x,this._startIndex=0}get length(){return this._length}set length(x){if(x>this._length)for(let R=this._length;R<x;R++)this._array[R]=void 0;this._length=x}get(x){return this._array[this._getCyclicIndex(x)]}set(x,R){this._array[this._getCyclicIndex(x)]=R}push(x){this._array[this._getCyclicIndex(this._length)]=x,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(x,R,...b){if(R){for(let h=x;h<this._length-R;h++)this._array[this._getCyclicIndex(h)]=this._array[this._getCyclicIndex(h+R)];this._length-=R,this.onDeleteEmitter.fire({index:x,amount:R})}for(let h=this._length-1;h>=x;h--)this._array[this._getCyclicIndex(h+b.length)]=this._array[this._getCyclicIndex(h)];for(let h=0;h<b.length;h++)this._array[this._getCyclicIndex(x+h)]=b[h];if(b.length&&this.onInsertEmitter.fire({index:x,amount:b.length}),this._length+b.length>this._maxLength){const h=this._length+b.length-this._maxLength;this._startIndex+=h,this._length=this._maxLength,this.onTrimEmitter.fire(h)}else this._length+=b.length}trimStart(x){x>this._length&&(x=this._length),this._startIndex+=x,this._length-=x,this.onTrimEmitter.fire(x)}shiftElements(x,R,b){if(!(R<=0)){if(x<0||x>=this._length)throw new Error("start argument out of range");if(x+b<0)throw new Error("Cannot shift elements in list beyond index 0");if(b>0){for(let m=R-1;m>=0;m--)this.set(x+m+b,this.get(x+m));const h=x+R+b-this._length;if(h>0)for(this._length+=h;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let h=0;h<R;h++)this.set(x+h+b,this.get(x+h))}}_getCyclicIndex(x){return(this._startIndex+x)%this._maxLength}}o.CircularList=v},1439:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(u,C=5){if(typeof u!="object")return u;const v=Array.isArray(u)?[]:{};for(const w in u)v[w]=C<=1?u[w]:u[w]&&c(u[w],C-1);return v}},8055:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;const u=c(6114);let C=0,v=0,w=0,x=0;var R,b,h,m,p;function g(D){const L=D.toString(16);return L.length<2?"0"+L:L}function A(D,L){return D<L?(L+.05)/(D+.05):(D+.05)/(L+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},(function(D){D.toCss=function(L,T,E,B){return B!==void 0?`#${g(L)}${g(T)}${g(E)}${g(B)}`:`#${g(L)}${g(T)}${g(E)}`},D.toRgba=function(L,T,E,B=255){return(L<<24|T<<16|E<<8|B)>>>0}})(R||(o.channels=R={})),(function(D){function L(T,E){return x=Math.round(255*E),[C,v,w]=p.toChannels(T.rgba),{css:R.toCss(C,v,w,x),rgba:R.toRgba(C,v,w,x)}}D.blend=function(T,E){if(x=(255&E.rgba)/255,x===1)return{css:E.css,rgba:E.rgba};const B=E.rgba>>24&255,W=E.rgba>>16&255,F=E.rgba>>8&255,I=T.rgba>>24&255,V=T.rgba>>16&255,ee=T.rgba>>8&255;return C=I+Math.round((B-I)*x),v=V+Math.round((W-V)*x),w=ee+Math.round((F-ee)*x),{css:R.toCss(C,v,w),rgba:R.toRgba(C,v,w)}},D.isOpaque=function(T){return(255&T.rgba)==255},D.ensureContrastRatio=function(T,E,B){const W=p.ensureContrastRatio(T.rgba,E.rgba,B);if(W)return p.toColor(W>>24&255,W>>16&255,W>>8&255)},D.opaque=function(T){const E=(255|T.rgba)>>>0;return[C,v,w]=p.toChannels(E),{css:R.toCss(C,v,w),rgba:E}},D.opacity=L,D.multiplyOpacity=function(T,E){return x=255&T.rgba,L(T,x*E/255)},D.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}})(b||(o.color=b={})),(function(D){let L,T;if(!u.isNode){const E=document.createElement("canvas");E.width=1,E.height=1;const B=E.getContext("2d",{willReadFrequently:!0});B&&(L=B,L.globalCompositeOperation="copy",T=L.createLinearGradient(0,0,1,1))}D.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return C=parseInt(E.slice(1,2).repeat(2),16),v=parseInt(E.slice(2,3).repeat(2),16),w=parseInt(E.slice(3,4).repeat(2),16),p.toColor(C,v,w);case 5:return C=parseInt(E.slice(1,2).repeat(2),16),v=parseInt(E.slice(2,3).repeat(2),16),w=parseInt(E.slice(3,4).repeat(2),16),x=parseInt(E.slice(4,5).repeat(2),16),p.toColor(C,v,w,x);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const B=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(B)return C=parseInt(B[1]),v=parseInt(B[2]),w=parseInt(B[3]),x=Math.round(255*(B[5]===void 0?1:parseFloat(B[5]))),p.toColor(C,v,w,x);if(!L||!T)throw new Error("css.toColor: Unsupported css format");if(L.fillStyle=T,L.fillStyle=E,typeof L.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(L.fillRect(0,0,1,1),[C,v,w,x]=L.getImageData(0,0,1,1).data,x!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:R.toRgba(C,v,w,x),css:E}}})(h||(o.css=h={})),(function(D){function L(T,E,B){const W=T/255,F=E/255,I=B/255;return .2126*(W<=.03928?W/12.92:Math.pow((W+.055)/1.055,2.4))+.7152*(F<=.03928?F/12.92:Math.pow((F+.055)/1.055,2.4))+.0722*(I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4))}D.relativeLuminance=function(T){return L(T>>16&255,T>>8&255,255&T)},D.relativeLuminance2=L})(m||(o.rgb=m={})),(function(D){function L(E,B,W){const F=E>>24&255,I=E>>16&255,V=E>>8&255;let ee=B>>24&255,ne=B>>16&255,q=B>>8&255,Z=A(m.relativeLuminance2(ee,ne,q),m.relativeLuminance2(F,I,V));for(;Z<W&&(ee>0||ne>0||q>0);)ee-=Math.max(0,Math.ceil(.1*ee)),ne-=Math.max(0,Math.ceil(.1*ne)),q-=Math.max(0,Math.ceil(.1*q)),Z=A(m.relativeLuminance2(ee,ne,q),m.relativeLuminance2(F,I,V));return(ee<<24|ne<<16|q<<8|255)>>>0}function T(E,B,W){const F=E>>24&255,I=E>>16&255,V=E>>8&255;let ee=B>>24&255,ne=B>>16&255,q=B>>8&255,Z=A(m.relativeLuminance2(ee,ne,q),m.relativeLuminance2(F,I,V));for(;Z<W&&(ee<255||ne<255||q<255);)ee=Math.min(255,ee+Math.ceil(.1*(255-ee))),ne=Math.min(255,ne+Math.ceil(.1*(255-ne))),q=Math.min(255,q+Math.ceil(.1*(255-q))),Z=A(m.relativeLuminance2(ee,ne,q),m.relativeLuminance2(F,I,V));return(ee<<24|ne<<16|q<<8|255)>>>0}D.ensureContrastRatio=function(E,B,W){const F=m.relativeLuminance(E>>8),I=m.relativeLuminance(B>>8);if(A(F,I)<W){if(I<F){const ne=L(E,B,W),q=A(F,m.relativeLuminance(ne>>8));if(q<W){const Z=T(E,B,W);return q>A(F,m.relativeLuminance(Z>>8))?ne:Z}return ne}const V=T(E,B,W),ee=A(F,m.relativeLuminance(V>>8));if(ee<W){const ne=L(E,B,W);return ee>A(F,m.relativeLuminance(ne>>8))?V:ne}return V}},D.reduceLuminance=L,D.increaseLuminance=T,D.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]},D.toColor=function(E,B,W,F){return{css:R.toCss(E,B,W,F),rgba:R.toRgba(E,B,W,F)}}})(p||(o.rgba=p={})),o.toPaddedHex=g,o.contrastRatio=A},8969:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),C=c(2585),v=c(4348),w=c(7866),x=c(744),R=c(7302),b=c(6975),h=c(8460),m=c(1753),p=c(1480),g=c(7994),A=c(9282),D=c(5435),L=c(5981),T=c(2660);let E=!1;class B extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new h.EventEmitter),this._onScroll.event((F=>{this._onScrollApi?.fire(F.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(F){for(const I in F)this.optionsService.options[I]=F[I]}constructor(F){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new h.EventEmitter),this._instantiationService=new v.InstantiationService,this.optionsService=this.register(new R.OptionsService(F)),this._instantiationService.setService(C.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(x.BufferService)),this._instantiationService.setService(C.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(w.LogService)),this._instantiationService.setService(C.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(b.CoreService)),this._instantiationService.setService(C.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(m.CoreMouseService)),this._instantiationService.setService(C.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(p.UnicodeService)),this._instantiationService.setService(C.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(g.CharsetService),this._instantiationService.setService(C.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(C.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new D.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,h.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,h.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,h.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,h.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new L.WriteBuffer(((I,V)=>this._inputHandler.parse(I,V)))),this.register((0,h.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,I){this._writeBuffer.write(F,I)}writeSync(F,I){this._logService.logLevel<=C.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(F,I)}resize(F,I){isNaN(F)||isNaN(I)||(F=Math.max(F,x.MINIMUM_COLS),I=Math.max(I,x.MINIMUM_ROWS),this._bufferService.resize(F,I))}scroll(F,I=!1){this._bufferService.scroll(F,I)}scrollLines(F,I,V){this._bufferService.scrollLines(F,I,V)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const I=F-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(F,I){return this._inputHandler.registerEscHandler(F,I)}registerDcsHandler(F,I){return this._inputHandler.registerDcsHandler(F,I)}registerCsiHandler(F,I){return this._inputHandler.registerCsiHandler(F,I)}registerOscHandler(F,I){return this._inputHandler.registerOscHandler(F,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?F=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(A.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},(()=>((0,A.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const I of F)I.dispose()}))}}}o.CoreTerminal=B},8460:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;u<this._listeners.length;u++)if(this._listeners[u]===c)return void this._listeners.splice(u,1)}}})),this._event}fire(c,u){const C=[];for(let v=0;v<this._listeners.length;v++)C.push(this._listeners[v]);for(let v=0;v<C.length;v++)C[v].call(void 0,c,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(c,u){return c((C=>u.fire(C)))},o.runAndSubscribe=function(c,u){return u(void 0),c((C=>u(C)))}},5435:function(S,o,c){var u=this&&this.__decorate||function(K,j,U,N){var z,Q=arguments.length,ie=Q<3?j:N===null?N=Object.getOwnPropertyDescriptor(j,U):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(K,j,U,N);else for(var de=K.length-1;de>=0;de--)(z=K[de])&&(ie=(Q<3?z(ie):Q>3?z(j,U,ie):z(j,U))||ie);return Q>3&&ie&&Object.defineProperty(j,U,ie),ie},C=this&&this.__param||function(K,j){return function(U,N){j(U,N,K)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const v=c(2584),w=c(7116),x=c(2015),R=c(844),b=c(482),h=c(8437),m=c(8460),p=c(643),g=c(511),A=c(3734),D=c(2585),L=c(1480),T=c(6242),E=c(6351),B=c(5941),W={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function I(K,j){if(K>24)return j.setWinLines||!1;switch(K){case 1:return!!j.restoreWin;case 2:return!!j.minimizeWin;case 3:return!!j.setWinPosition;case 4:return!!j.setWinSizePixels;case 5:return!!j.raiseWin;case 6:return!!j.lowerWin;case 7:return!!j.refreshWin;case 8:return!!j.setWinSizeChars;case 9:return!!j.maximizeWin;case 10:return!!j.fullscreenWin;case 11:return!!j.getWinState;case 13:return!!j.getWinPosition;case 14:return!!j.getWinSizePixels;case 15:return!!j.getScreenSizePixels;case 16:return!!j.getCellSizePixels;case 18:return!!j.getWinSizeChars;case 19:return!!j.getScreenSizeChars;case 20:return!!j.getIconTitle;case 21:return!!j.getWinTitle;case 22:return!!j.pushTitle;case 23:return!!j.popTitle;case 24:return!!j.setWinLines}return!1}var V;(function(K){K[K.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",K[K.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(V||(o.WindowsOptionsReportType=V={}));let ee=0;class ne extends R.Disposable{getAttrData(){return this._curAttrData}constructor(j,U,N,z,Q,ie,de,G,X=new x.EscapeSequenceParser){super(),this._bufferService=j,this._charsetService=U,this._coreService=N,this._logService=z,this._optionsService=Q,this._oscLinkService=ie,this._coreMouseService=de,this._unicodeService=G,this._parser=X,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b.StringToUtf32,this._utf8Decoder=new b.Utf8ToUtf32,this._workCell=new g.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new m.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new m.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new m.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new m.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new m.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new m.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new m.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new m.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new m.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new m.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new m.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new m.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((P=>this._activeBuffer=P.activeBuffer))),this._parser.setCsiHandlerFallback(((P,he)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(P),params:he.toArray()})})),this._parser.setEscHandlerFallback((P=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(P)})})),this._parser.setExecuteHandlerFallback((P=>{this._logService.debug("Unknown EXECUTE code: ",{code:P})})),this._parser.setOscHandlerFallback(((P,he,ge)=>{this._logService.debug("Unknown OSC code: ",{identifier:P,action:he,data:ge})})),this._parser.setDcsHandlerFallback(((P,he,ge)=>{he==="HOOK"&&(ge=ge.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(P),action:he,payload:ge})})),this._parser.setPrintHandler(((P,he,ge)=>this.print(P,he,ge))),this._parser.registerCsiHandler({final:"@"},(P=>this.insertChars(P))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(P=>this.scrollLeft(P))),this._parser.registerCsiHandler({final:"A"},(P=>this.cursorUp(P))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(P=>this.scrollRight(P))),this._parser.registerCsiHandler({final:"B"},(P=>this.cursorDown(P))),this._parser.registerCsiHandler({final:"C"},(P=>this.cursorForward(P))),this._parser.registerCsiHandler({final:"D"},(P=>this.cursorBackward(P))),this._parser.registerCsiHandler({final:"E"},(P=>this.cursorNextLine(P))),this._parser.registerCsiHandler({final:"F"},(P=>this.cursorPrecedingLine(P))),this._parser.registerCsiHandler({final:"G"},(P=>this.cursorCharAbsolute(P))),this._parser.registerCsiHandler({final:"H"},(P=>this.cursorPosition(P))),this._parser.registerCsiHandler({final:"I"},(P=>this.cursorForwardTab(P))),this._parser.registerCsiHandler({final:"J"},(P=>this.eraseInDisplay(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(P=>this.eraseInDisplay(P,!0))),this._parser.registerCsiHandler({final:"K"},(P=>this.eraseInLine(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(P=>this.eraseInLine(P,!0))),this._parser.registerCsiHandler({final:"L"},(P=>this.insertLines(P))),this._parser.registerCsiHandler({final:"M"},(P=>this.deleteLines(P))),this._parser.registerCsiHandler({final:"P"},(P=>this.deleteChars(P))),this._parser.registerCsiHandler({final:"S"},(P=>this.scrollUp(P))),this._parser.registerCsiHandler({final:"T"},(P=>this.scrollDown(P))),this._parser.registerCsiHandler({final:"X"},(P=>this.eraseChars(P))),this._parser.registerCsiHandler({final:"Z"},(P=>this.cursorBackwardTab(P))),this._parser.registerCsiHandler({final:"`"},(P=>this.charPosAbsolute(P))),this._parser.registerCsiHandler({final:"a"},(P=>this.hPositionRelative(P))),this._parser.registerCsiHandler({final:"b"},(P=>this.repeatPrecedingCharacter(P))),this._parser.registerCsiHandler({final:"c"},(P=>this.sendDeviceAttributesPrimary(P))),this._parser.registerCsiHandler({prefix:">",final:"c"},(P=>this.sendDeviceAttributesSecondary(P))),this._parser.registerCsiHandler({final:"d"},(P=>this.linePosAbsolute(P))),this._parser.registerCsiHandler({final:"e"},(P=>this.vPositionRelative(P))),this._parser.registerCsiHandler({final:"f"},(P=>this.hVPosition(P))),this._parser.registerCsiHandler({final:"g"},(P=>this.tabClear(P))),this._parser.registerCsiHandler({final:"h"},(P=>this.setMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(P=>this.setModePrivate(P))),this._parser.registerCsiHandler({final:"l"},(P=>this.resetMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(P=>this.resetModePrivate(P))),this._parser.registerCsiHandler({final:"m"},(P=>this.charAttributes(P))),this._parser.registerCsiHandler({final:"n"},(P=>this.deviceStatus(P))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(P=>this.deviceStatusPrivate(P))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(P=>this.softReset(P))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(P=>this.setCursorStyle(P))),this._parser.registerCsiHandler({final:"r"},(P=>this.setScrollRegion(P))),this._parser.registerCsiHandler({final:"s"},(P=>this.saveCursor(P))),this._parser.registerCsiHandler({final:"t"},(P=>this.windowOptions(P))),this._parser.registerCsiHandler({final:"u"},(P=>this.restoreCursor(P))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(P=>this.insertColumns(P))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(P=>this.deleteColumns(P))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(P=>this.selectProtected(P))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(P=>this.requestMode(P,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(P=>this.requestMode(P,!1))),this._parser.setExecuteHandler(v.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(v.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(v.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(v.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(v.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(v.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(v.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(v.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(v.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(v.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(v.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(v.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((P=>(this.setTitle(P),this.setIconName(P),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((P=>this.setIconName(P)))),this._parser.registerOscHandler(2,new T.OscHandler((P=>this.setTitle(P)))),this._parser.registerOscHandler(4,new T.OscHandler((P=>this.setOrReportIndexedColor(P)))),this._parser.registerOscHandler(8,new T.OscHandler((P=>this.setHyperlink(P)))),this._parser.registerOscHandler(10,new T.OscHandler((P=>this.setOrReportFgColor(P)))),this._parser.registerOscHandler(11,new T.OscHandler((P=>this.setOrReportBgColor(P)))),this._parser.registerOscHandler(12,new T.OscHandler((P=>this.setOrReportCursorColor(P)))),this._parser.registerOscHandler(104,new T.OscHandler((P=>this.restoreIndexedColor(P)))),this._parser.registerOscHandler(110,new T.OscHandler((P=>this.restoreFgColor(P)))),this._parser.registerOscHandler(111,new T.OscHandler((P=>this.restoreBgColor(P)))),this._parser.registerOscHandler(112,new T.OscHandler((P=>this.restoreCursorColor(P)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const P in w.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:P},(()=>this.selectCharset("("+P))),this._parser.registerEscHandler({intermediates:")",final:P},(()=>this.selectCharset(")"+P))),this._parser.registerEscHandler({intermediates:"*",final:P},(()=>this.selectCharset("*"+P))),this._parser.registerEscHandler({intermediates:"+",final:P},(()=>this.selectCharset("+"+P))),this._parser.registerEscHandler({intermediates:"-",final:P},(()=>this.selectCharset("-"+P))),this._parser.registerEscHandler({intermediates:".",final:P},(()=>this.selectCharset("."+P))),this._parser.registerEscHandler({intermediates:"/",final:P},(()=>this.selectCharset("/"+P)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((P=>(this._logService.error("Parsing error: ",P),P))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new E.DcsHandler(((P,he)=>this.requestStatusString(P,he))))}_preserveStack(j,U,N,z){this._parseStack.paused=!0,this._parseStack.cursorStartX=j,this._parseStack.cursorStartY=U,this._parseStack.decodedLength=N,this._parseStack.position=z}_logSlowResolvingAsync(j){this._logService.logLevel<=D.LogLevelEnum.WARN&&Promise.race([j,new Promise(((U,N)=>setTimeout((()=>N("#SLOW_TIMEOUT")),5e3)))]).catch((U=>{if(U!=="#SLOW_TIMEOUT")throw U;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(j,U){let N,z=this._activeBuffer.x,Q=this._activeBuffer.y,ie=0;const de=this._parseStack.paused;if(de){if(N=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,U))return this._logSlowResolvingAsync(N),N;z=this._parseStack.cursorStartX,Q=this._parseStack.cursorStartY,this._parseStack.paused=!1,j.length>F&&(ie=this._parseStack.position+F)}if(this._logService.logLevel<=D.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof j=="string"?` "${j}"`:` "${Array.prototype.map.call(j,(P=>String.fromCharCode(P))).join("")}"`),typeof j=="string"?j.split("").map((P=>P.charCodeAt(0))):j),this._parseBuffer.length<j.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(j.length,F))),de||this._dirtyRowTracker.clearRange(),j.length>F)for(let P=ie;P<j.length;P+=F){const he=P+F<j.length?P+F:j.length,ge=typeof j=="string"?this._stringDecoder.decode(j.substring(P,he),this._parseBuffer):this._utf8Decoder.decode(j.subarray(P,he),this._parseBuffer);if(N=this._parser.parse(this._parseBuffer,ge))return this._preserveStack(z,Q,ge,P),this._logSlowResolvingAsync(N),N}else if(!de){const P=typeof j=="string"?this._stringDecoder.decode(j,this._parseBuffer):this._utf8Decoder.decode(j,this._parseBuffer);if(N=this._parser.parse(this._parseBuffer,P))return this._preserveStack(z,Q,P,0),this._logSlowResolvingAsync(N),N}this._activeBuffer.x===z&&this._activeBuffer.y===Q||this._onCursorMove.fire();const G=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),X=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);X<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(X,this._bufferService.rows-1),Math.min(G,this._bufferService.rows-1))}print(j,U,N){let z,Q;const ie=this._charsetService.charset,de=this._optionsService.rawOptions.screenReaderMode,G=this._bufferService.cols,X=this._coreService.decPrivateModes.wraparound,P=this._coreService.modes.insertMode,he=this._curAttrData;let ge=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&N-U>0&&ge.getWidth(this._activeBuffer.x-1)===2&&ge.setCellFromCodePoint(this._activeBuffer.x-1,0,1,he.fg,he.bg,he.extended);let oe=this._parser.precedingJoinState;for(let me=U;me<N;++me){if(z=j[me],z<127&&ie){const tt=ie[String.fromCharCode(z)];tt&&(z=tt.charCodeAt(0))}const Ce=this._unicodeService.charProperties(z,oe);Q=L.UnicodeService.extractWidth(Ce);const ze=L.UnicodeService.extractShouldJoin(Ce),ct=ze?L.UnicodeService.extractWidth(oe):0;if(oe=Ce,de&&this._onA11yChar.fire((0,b.stringFromCodePoint)(z)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+Q-ct>G){if(X){const tt=ge;let ke=this._activeBuffer.x-ct;for(this._activeBuffer.x=ct,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ge=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ct>0&&ge instanceof h.BufferLine&&ge.copyCellsFrom(tt,ke,0,ct,!1);ke<G;)tt.setCellFromCodePoint(ke++,0,1,he.fg,he.bg,he.extended)}else if(this._activeBuffer.x=G-1,Q===2)continue}if(ze&&this._activeBuffer.x){const tt=ge.getWidth(this._activeBuffer.x-1)?1:2;ge.addCodepointToCell(this._activeBuffer.x-tt,z,Q);for(let ke=Q-ct;--ke>=0;)ge.setCellFromCodePoint(this._activeBuffer.x++,0,0,he.fg,he.bg,he.extended)}else if(P&&(ge.insertCells(this._activeBuffer.x,Q-ct,this._activeBuffer.getNullCell(he),he),ge.getWidth(G-1)===2&&ge.setCellFromCodePoint(G-1,p.NULL_CELL_CODE,p.NULL_CELL_WIDTH,he.fg,he.bg,he.extended)),ge.setCellFromCodePoint(this._activeBuffer.x++,z,Q,he.fg,he.bg,he.extended),Q>0)for(;--Q;)ge.setCellFromCodePoint(this._activeBuffer.x++,0,0,he.fg,he.bg,he.extended)}this._parser.precedingJoinState=oe,this._activeBuffer.x<G&&N-U>0&&ge.getWidth(this._activeBuffer.x)===0&&!ge.hasContent(this._activeBuffer.x)&&ge.setCellFromCodePoint(this._activeBuffer.x,0,1,he.fg,he.bg,he.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(j,U){return j.final!=="t"||j.prefix||j.intermediates?this._parser.registerCsiHandler(j,U):this._parser.registerCsiHandler(j,(N=>!I(N.params[0],this._optionsService.rawOptions.windowOptions)||U(N)))}registerDcsHandler(j,U){return this._parser.registerDcsHandler(j,new E.DcsHandler(U))}registerEscHandler(j,U){return this._parser.registerEscHandler(j,U)}registerOscHandler(j,U){return this._parser.registerOscHandler(j,new T.OscHandler(U))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);j.hasWidth(this._activeBuffer.x)&&!j.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const j=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-j),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(j=this._bufferService.cols-1){this._activeBuffer.x=Math.min(j,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(j,U){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=j,this._activeBuffer.y=this._activeBuffer.scrollTop+U):(this._activeBuffer.x=j,this._activeBuffer.y=U),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(j,U){this._restrictCursor(),this._setCursor(this._activeBuffer.x+j,this._activeBuffer.y+U)}cursorUp(j){const U=this._activeBuffer.y-this._activeBuffer.scrollTop;return U>=0?this._moveCursor(0,-Math.min(U,j.params[0]||1)):this._moveCursor(0,-(j.params[0]||1)),!0}cursorDown(j){const U=this._activeBuffer.scrollBottom-this._activeBuffer.y;return U>=0?this._moveCursor(0,Math.min(U,j.params[0]||1)):this._moveCursor(0,j.params[0]||1),!0}cursorForward(j){return this._moveCursor(j.params[0]||1,0),!0}cursorBackward(j){return this._moveCursor(-(j.params[0]||1),0),!0}cursorNextLine(j){return this.cursorDown(j),this._activeBuffer.x=0,!0}cursorPrecedingLine(j){return this.cursorUp(j),this._activeBuffer.x=0,!0}cursorCharAbsolute(j){return this._setCursor((j.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(j){return this._setCursor(j.length>=2?(j.params[1]||1)-1:0,(j.params[0]||1)-1),!0}charPosAbsolute(j){return this._setCursor((j.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(j){return this._moveCursor(j.params[0]||1,0),!0}linePosAbsolute(j){return this._setCursor(this._activeBuffer.x,(j.params[0]||1)-1),!0}vPositionRelative(j){return this._moveCursor(0,j.params[0]||1),!0}hVPosition(j){return this.cursorPosition(j),!0}tabClear(j){const U=j.params[0];return U===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:U===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let U=j.params[0]||1;for(;U--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let U=j.params[0]||1;for(;U--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(j){const U=j.params[0];return U===1&&(this._curAttrData.bg|=536870912),U!==2&&U!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(j,U,N,z=!1,Q=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);ie.replaceCells(U,N,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),Q),z&&(ie.isWrapped=!1)}_resetBufferLine(j,U=!1){const N=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);N&&(N.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),U),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+j),N.isWrapped=!1)}eraseInDisplay(j,U=!1){let N;switch(this._restrictCursor(this._bufferService.cols),j.params[0]){case 0:for(N=this._activeBuffer.y,this._dirtyRowTracker.markDirty(N),this._eraseInBufferLine(N++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,U);N<this._bufferService.rows;N++)this._resetBufferLine(N,U);this._dirtyRowTracker.markDirty(N);break;case 1:for(N=this._activeBuffer.y,this._dirtyRowTracker.markDirty(N),this._eraseInBufferLine(N,0,this._activeBuffer.x+1,!0,U),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(N+1).isWrapped=!1);N--;)this._resetBufferLine(N,U);this._dirtyRowTracker.markDirty(0);break;case 2:for(N=this._bufferService.rows,this._dirtyRowTracker.markDirty(N-1);N--;)this._resetBufferLine(N,U);this._dirtyRowTracker.markDirty(0);break;case 3:const z=this._activeBuffer.lines.length-this._bufferService.rows;z>0&&(this._activeBuffer.lines.trimStart(z),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-z,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-z,0),this._onScroll.fire(0))}return!0}eraseInLine(j,U=!1){switch(this._restrictCursor(this._bufferService.cols),j.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,U);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,U);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,U)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(j){this._restrictCursor();let U=j.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=this._activeBuffer.ybase+this._activeBuffer.y,z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Q=this._bufferService.rows-1+this._activeBuffer.ybase-z+1;for(;U--;)this._activeBuffer.lines.splice(Q-1,1),this._activeBuffer.lines.splice(N,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(j){this._restrictCursor();let U=j.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=this._activeBuffer.ybase+this._activeBuffer.y;let z;for(z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,z=this._bufferService.rows-1+this._activeBuffer.ybase-z;U--;)this._activeBuffer.lines.splice(N,1),this._activeBuffer.lines.splice(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(j){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.insertCells(this._activeBuffer.x,j.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(j){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.deleteCells(this._activeBuffer.x,j.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(j){let U=j.params[0]||1;for(;U--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(j){let U=j.params[0]||1;for(;U--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(h.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);z.deleteCells(0,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);z.insertCells(0,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);z.insertCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);z.deleteCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(j){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(j.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(j){const U=this._parser.precedingJoinState;if(!U)return!0;const N=j.params[0]||1,z=L.UnicodeService.extractWidth(U),Q=this._activeBuffer.x-z,ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(Q),de=new Uint32Array(ie.length*N);let G=0;for(let P=0;P<ie.length;){const he=ie.codePointAt(P)||0;de[G++]=he,P+=he>65535?2:1}let X=G;for(let P=1;P<N;++P)de.copyWithin(X,0,G),X+=G;return this.print(de,0,X),!0}sendDeviceAttributesPrimary(j){return j.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(v.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(v.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(j){return j.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(v.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(v.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(j.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(v.C0.ESC+"[>83;40003;0c")),!0}_is(j){return(this._optionsService.rawOptions.termName+"").indexOf(j)===0}setMode(j){for(let U=0;U<j.length;U++)switch(j.params[U]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(j){for(let U=0;U<j.length;U++)switch(j.params[U]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,w.DEFAULT_CHARSET),this._charsetService.setgCharset(1,w.DEFAULT_CHARSET),this._charsetService.setgCharset(2,w.DEFAULT_CHARSET),this._charsetService.setgCharset(3,w.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(j){for(let U=0;U<j.length;U++)switch(j.params[U]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(j){for(let U=0;U<j.length;U++)switch(j.params[U]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),j.params[U]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(j,U){const N=this._coreService.decPrivateModes,{activeProtocol:z,activeEncoding:Q}=this._coreMouseService,ie=this._coreService,{buffers:de,cols:G}=this._bufferService,{active:X,alt:P}=de,he=this._optionsService.rawOptions,ge=ze=>ze?1:2,oe=j.params[0];return me=oe,Ce=U?oe===2?4:oe===4?ge(ie.modes.insertMode):oe===12?3:oe===20?ge(he.convertEol):0:oe===1?ge(N.applicationCursorKeys):oe===3?he.windowOptions.setWinLines?G===80?2:G===132?1:0:0:oe===6?ge(N.origin):oe===7?ge(N.wraparound):oe===8?3:oe===9?ge(z==="X10"):oe===12?ge(he.cursorBlink):oe===25?ge(!ie.isCursorHidden):oe===45?ge(N.reverseWraparound):oe===66?ge(N.applicationKeypad):oe===67?4:oe===1e3?ge(z==="VT200"):oe===1002?ge(z==="DRAG"):oe===1003?ge(z==="ANY"):oe===1004?ge(N.sendFocus):oe===1005?4:oe===1006?ge(Q==="SGR"):oe===1015?4:oe===1016?ge(Q==="SGR_PIXELS"):oe===1048?1:oe===47||oe===1047||oe===1049?ge(X===P):oe===2004?ge(N.bracketedPasteMode):0,ie.triggerDataEvent(`${v.C0.ESC}[${U?"":"?"}${me};${Ce}$y`),!0;var me,Ce}_updateAttrColor(j,U,N,z,Q){return U===2?(j|=50331648,j&=-16777216,j|=A.AttributeData.fromColorRGB([N,z,Q])):U===5&&(j&=-50331904,j|=33554432|255&N),j}_extractColor(j,U,N){const z=[0,0,-1,0,0,0];let Q=0,ie=0;do{if(z[ie+Q]=j.params[U+ie],j.hasSubParams(U+ie)){const de=j.getSubParams(U+ie);let G=0;do z[1]===5&&(Q=1),z[ie+G+1+Q]=de[G];while(++G<de.length&&G+ie+1+Q<z.length);break}if(z[1]===5&&ie+Q>=2||z[1]===2&&ie+Q>=5)break;z[1]&&(Q=1)}while(++ie+U<j.length&&ie+Q<z.length);for(let de=2;de<z.length;++de)z[de]===-1&&(z[de]=0);switch(z[0]){case 38:N.fg=this._updateAttrColor(N.fg,z[1],z[3],z[4],z[5]);break;case 48:N.bg=this._updateAttrColor(N.bg,z[1],z[3],z[4],z[5]);break;case 58:N.extended=N.extended.clone(),N.extended.underlineColor=this._updateAttrColor(N.extended.underlineColor,z[1],z[3],z[4],z[5])}return ie}_processUnderline(j,U){U.extended=U.extended.clone(),(!~j||j>5)&&(j=1),U.extended.underlineStyle=j,U.fg|=268435456,j===0&&(U.fg&=-268435457),U.updateExtended()}_processSGR0(j){j.fg=h.DEFAULT_ATTR_DATA.fg,j.bg=h.DEFAULT_ATTR_DATA.bg,j.extended=j.extended.clone(),j.extended.underlineStyle=0,j.extended.underlineColor&=-67108864,j.updateExtended()}charAttributes(j){if(j.length===1&&j.params[0]===0)return this._processSGR0(this._curAttrData),!0;const U=j.length;let N;const z=this._curAttrData;for(let Q=0;Q<U;Q++)N=j.params[Q],N>=30&&N<=37?(z.fg&=-50331904,z.fg|=16777216|N-30):N>=40&&N<=47?(z.bg&=-50331904,z.bg|=16777216|N-40):N>=90&&N<=97?(z.fg&=-50331904,z.fg|=16777224|N-90):N>=100&&N<=107?(z.bg&=-50331904,z.bg|=16777224|N-100):N===0?this._processSGR0(z):N===1?z.fg|=134217728:N===3?z.bg|=67108864:N===4?(z.fg|=268435456,this._processUnderline(j.hasSubParams(Q)?j.getSubParams(Q)[0]:1,z)):N===5?z.fg|=536870912:N===7?z.fg|=67108864:N===8?z.fg|=1073741824:N===9?z.fg|=2147483648:N===2?z.bg|=134217728:N===21?this._processUnderline(2,z):N===22?(z.fg&=-134217729,z.bg&=-134217729):N===23?z.bg&=-67108865:N===24?(z.fg&=-268435457,this._processUnderline(0,z)):N===25?z.fg&=-536870913:N===27?z.fg&=-67108865:N===28?z.fg&=-1073741825:N===29?z.fg&=2147483647:N===39?(z.fg&=-67108864,z.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):N===49?(z.bg&=-67108864,z.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):N===38||N===48||N===58?Q+=this._extractColor(j,Q,z):N===53?z.bg|=1073741824:N===55?z.bg&=-1073741825:N===59?(z.extended=z.extended.clone(),z.extended.underlineColor=-1,z.updateExtended()):N===100?(z.fg&=-67108864,z.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,z.bg&=-67108864,z.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",N);return!0}deviceStatus(j){switch(j.params[0]){case 5:this._coreService.triggerDataEvent(`${v.C0.ESC}[0n`);break;case 6:const U=this._activeBuffer.y+1,N=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${v.C0.ESC}[${U};${N}R`)}return!0}deviceStatusPrivate(j){if(j.params[0]===6){const U=this._activeBuffer.y+1,N=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${v.C0.ESC}[?${U};${N}R`)}return!0}softReset(j){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(j){const U=j.params[0]||1;switch(U){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const N=U%2==1;return this._optionsService.options.cursorBlink=N,!0}setScrollRegion(j){const U=j.params[0]||1;let N;return(j.length<2||(N=j.params[1])>this._bufferService.rows||N===0)&&(N=this._bufferService.rows),N>U&&(this._activeBuffer.scrollTop=U-1,this._activeBuffer.scrollBottom=N-1,this._setCursor(0,0)),!0}windowOptions(j){if(!I(j.params[0],this._optionsService.rawOptions.windowOptions))return!0;const U=j.length>1?j.params[1]:0;switch(j.params[0]){case 14:U!==2&&this._onRequestWindowsOptionsReport.fire(V.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(V.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${v.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:U!==0&&U!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),U!==0&&U!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:U!==0&&U!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),U!==0&&U!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(j){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(j){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(j){return this._windowTitle=j,this._onTitleChange.fire(j),!0}setIconName(j){return this._iconName=j,!0}setOrReportIndexedColor(j){const U=[],N=j.split(";");for(;N.length>1;){const z=N.shift(),Q=N.shift();if(/^\d+$/.exec(z)){const ie=parseInt(z);if(Z(ie))if(Q==="?")U.push({type:0,index:ie});else{const de=(0,B.parseColor)(Q);de&&U.push({type:1,index:ie,color:de})}}}return U.length&&this._onColor.fire(U),!0}setHyperlink(j){const U=j.split(";");return!(U.length<2)&&(U[1]?this._createHyperlink(U[0],U[1]):!U[0]&&this._finishHyperlink())}_createHyperlink(j,U){this._getCurrentLinkId()&&this._finishHyperlink();const N=j.split(":");let z;const Q=N.findIndex((ie=>ie.startsWith("id=")));return Q!==-1&&(z=N[Q].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:z,uri:U}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(j,U){const N=j.split(";");for(let z=0;z<N.length&&!(U>=this._specialColors.length);++z,++U)if(N[z]==="?")this._onColor.fire([{type:0,index:this._specialColors[U]}]);else{const Q=(0,B.parseColor)(N[z]);Q&&this._onColor.fire([{type:1,index:this._specialColors[U],color:Q}])}return!0}setOrReportFgColor(j){return this._setOrReportSpecialColor(j,0)}setOrReportBgColor(j){return this._setOrReportSpecialColor(j,1)}setOrReportCursorColor(j){return this._setOrReportSpecialColor(j,2)}restoreIndexedColor(j){if(!j)return this._onColor.fire([{type:2}]),!0;const U=[],N=j.split(";");for(let z=0;z<N.length;++z)if(/^\d+$/.exec(N[z])){const Q=parseInt(N[z]);Z(Q)&&U.push({type:2,index:Q})}return U.length&&this._onColor.fire(U),!0}restoreFgColor(j){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(j){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(j){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,w.DEFAULT_CHARSET),!0}selectCharset(j){return j.length!==2?(this.selectDefaultCharset(),!0):(j[0]==="/"||this._charsetService.setgCharset(W[j[0]],w.CHARSETS[j[1]]||w.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const j=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,j,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(j){return this._charsetService.setgLevel(j),!0}screenAlignmentPattern(){const j=new g.CellData;j.content=4194373,j.fg=this._curAttrData.fg,j.bg=this._curAttrData.bg,this._setCursor(0,0);for(let U=0;U<this._bufferService.rows;++U){const N=this._activeBuffer.ybase+this._activeBuffer.y+U,z=this._activeBuffer.lines.get(N);z&&(z.fill(j),z.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(j,U){const N=this._bufferService.buffer,z=this._optionsService.rawOptions;return(Q=>(this._coreService.triggerDataEvent(`${v.C0.ESC}${Q}${v.C0.ESC}\\`),!0))(j==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:j==='"p'?'P1$r61;1"p':j==="r"?`P1$r${N.scrollTop+1};${N.scrollBottom+1}r`:j==="m"?"P1$r0m":j===" q"?`P1$r${{block:2,underline:4,bar:6}[z.cursorStyle]-(z.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(j,U){this._dirtyRowTracker.markRangeDirty(j,U)}}o.InputHandler=ne;let q=class{constructor(K){this._bufferService=K,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(K){K<this.start?this.start=K:K>this.end&&(this.end=K)}markRangeDirty(K,j){K>j&&(ee=K,K=j,j=ee),K<this.start&&(this.start=K),j>this.end&&(this.end=j)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(K){return 0<=K&&K<256}q=u([C(0,D.IBufferService)],q)},844:(S,o)=>{function c(u){for(const C of u)C.dispose();u.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const C=this._disposables.indexOf(u);C!==-1&&this._disposables.splice(C,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){this._isDisposed||u===this._value||(this._value?.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},o.toDisposable=function(u){return{dispose:u}},o.disposeArray=c,o.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(C,v,w){this._data[C]||(this._data[C]={}),this._data[C][v]=w}get(C,v){return this._data[C]?this._data[C][v]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,C,v,w,x){this._data.get(u,C)||this._data.set(u,C,new c),this._data.get(u,C).set(v,w,x)}get(u,C,v,w){return this._data.get(u,C)?.get(v,w)}clear(){this._data.clear()}}},6114:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u";const c=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const C=c.match(/Version\/(\d+)/);return C===null||C.length<2?0:parseInt(C[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),o.isIpad=u==="iPad",o.isIphone=u==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),o.isLinux=u.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(c)},6106:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const C=this._getKey(u);if(C===void 0||(c=this._search(C),c===-1)||this._getKey(this._array[c])!==C)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===C);return!1}*getKeyIterator(u){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===u)}forEachByKey(u,C){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do C(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===u)}values(){return[...this._array].values()}_search(u){let C=0,v=this._array.length-1;for(;v>=C;){let w=C+v>>1;const x=this._getKey(this._array[w]);if(x>u)v=w-1;else{if(!(x<u)){for(;w>0&&this._getKey(this._array[w-1])===u;)w--;return w}C=w+1}}return C}}},7226:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class C{constructor(){this._tasks=[],this._i=0}enqueue(x){this._tasks.push(x),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(x){this._idleCallback=void 0;let R=0,b=0,h=x.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(R=Date.now(),this._tasks[this._i]()||this._i++,R=Math.max(1,Date.now()-R),b=Math.max(R,b),m=x.timeRemaining(),1.5*b>m)return h-R<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(h-R))}ms`),void this._start();h=m}this.clear()}}class v extends C{_requestCallback(x){return setTimeout((()=>x(this._createDeadline(16))))}_cancelCallback(x){clearTimeout(x)}_createDeadline(x){const R=Date.now()+x;return{timeRemaining:()=>Math.max(0,R-Date.now())}}}o.PriorityTaskQueue=v,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends C{_requestCallback(w){return requestIdleCallback(w)}_cancelCallback(w){cancelIdleCallback(w)}}:v,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(w){this._queue.clear(),this._queue.enqueue(w)}flush(){this._queue.flush()}}},9282:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=c(643);o.updateWindowsModeWrappedState=function(C){const v=C.buffer.lines.get(C.buffer.ybase+C.buffer.y-1),w=v?.get(C.cols-1),x=C.buffer.lines.get(C.buffer.ybase+C.buffer.y);x&&w&&(x.isWrapped=w[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&w[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(v){return[v>>>16&255,v>>>8&255,255&v]}static fromColorRGB(v){return(255&v[0])<<16|(255&v[1])<<8|255&v[2]}clone(){const v=new c;return v.fg=this.fg,v.bg=this.bg,v.extended=this.extended.clone(),v}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}o.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(v){this._ext=v}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(v){this._ext&=-469762049,this._ext|=v<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(v){this._ext&=-67108864,this._ext|=67108863&v}get urlId(){return this._urlId}set urlId(v){this._urlId=v}constructor(v=0,w=0){this._ext=0,this._urlId=0,this._ext=v,this._urlId=w}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=u},9092:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=c(6349),C=c(7226),v=c(3734),w=c(8437),x=c(4634),R=c(511),b=c(643),h=c(4863),m=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(p,g,A){this._hasScrollback=p,this._optionsService=g,this._bufferService=A,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=w.DEFAULT_ATTR_DATA.clone(),this.savedCharset=m.DEFAULT_CHARSET,this.markers=[],this._nullCell=R.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),this._whitespaceCell=R.CellData.fromCharData([0,b.WHITESPACE_CELL_CHAR,b.WHITESPACE_CELL_WIDTH,b.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new C.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(p){return p?(this._nullCell.fg=p.fg,this._nullCell.bg=p.bg,this._nullCell.extended=p.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new v.ExtendedAttrs),this._nullCell}getWhitespaceCell(p){return p?(this._whitespaceCell.fg=p.fg,this._whitespaceCell.bg=p.bg,this._whitespaceCell.extended=p.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new v.ExtendedAttrs),this._whitespaceCell}getBlankLine(p,g){return new w.BufferLine(this._bufferService.cols,this.getNullCell(p),g)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const p=this.ybase+this.y-this.ydisp;return p>=0&&p<this._rows}_getCorrectBufferLength(p){if(!this._hasScrollback)return p;const g=p+this._optionsService.rawOptions.scrollback;return g>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:g}fillViewportRows(p){if(this.lines.length===0){p===void 0&&(p=w.DEFAULT_ATTR_DATA);let g=this._rows;for(;g--;)this.lines.push(this.getBlankLine(p))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(p,g){const A=this.getNullCell(w.DEFAULT_ATTR_DATA);let D=0;const L=this._getCorrectBufferLength(g);if(L>this.lines.maxLength&&(this.lines.maxLength=L),this.lines.length>0){if(this._cols<p)for(let E=0;E<this.lines.length;E++)D+=+this.lines.get(E).resize(p,A);let T=0;if(this._rows<g)for(let E=this._rows;E<g;E++)this.lines.length<g+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new w.BufferLine(p,A)):this.ybase>0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new w.BufferLine(p,A)));else for(let E=this._rows;E>g;E--)this.lines.length>g+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(L<this.lines.maxLength){const E=this.lines.length-L;E>0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=L}this.x=Math.min(this.x,p-1),this.y=Math.min(this.y,g-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,p-1),this.scrollTop=0}if(this.scrollBottom=g-1,this._isReflowEnabled&&(this._reflow(p,g),this._cols>p))for(let T=0;T<this.lines.length;T++)D+=+this.lines.get(T).resize(p,A);this._cols=p,this._rows=g,this._memoryCleanupQueue.clear(),D>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let p=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,p=!1);let g=0;for(;this._memoryCleanupPosition<this.lines.length;)if(g+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),g>100)return!0;return p}get _isReflowEnabled(){const p=this._optionsService.rawOptions.windowsPty;return p&&p.buildNumber?this._hasScrollback&&p.backend==="conpty"&&p.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(p,g){this._cols!==p&&(p>this._cols?this._reflowLarger(p,g):this._reflowSmaller(p,g))}_reflowLarger(p,g){const A=(0,x.reflowLargerGetLinesToRemove)(this.lines,this._cols,p,this.ybase+this.y,this.getNullCell(w.DEFAULT_ATTR_DATA));if(A.length>0){const D=(0,x.reflowLargerCreateNewLayout)(this.lines,A);(0,x.reflowLargerApplyNewLayout)(this.lines,D.layout),this._reflowLargerAdjustViewport(p,g,D.countRemoved)}}_reflowLargerAdjustViewport(p,g,A){const D=this.getNullCell(w.DEFAULT_ATTR_DATA);let L=A;for(;L-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<g&&this.lines.push(new w.BufferLine(p,D))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-A,0)}_reflowSmaller(p,g){const A=this.getNullCell(w.DEFAULT_ATTR_DATA),D=[];let L=0;for(let T=this.lines.length-1;T>=0;T--){let E=this.lines.get(T);if(!E||!E.isWrapped&&E.getTrimmedLength()<=p)continue;const B=[E];for(;E.isWrapped&&T>0;)E=this.lines.get(--T),B.unshift(E);const W=this.ybase+this.y;if(W>=T&&W<T+B.length)continue;const F=B[B.length-1].getTrimmedLength(),I=(0,x.reflowSmallerGetNewLineLengths)(B,this._cols,p),V=I.length-B.length;let ee;ee=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+V):Math.max(0,this.lines.length-this.lines.maxLength+V);const ne=[];for(let N=0;N<V;N++){const z=this.getBlankLine(w.DEFAULT_ATTR_DATA,!0);ne.push(z)}ne.length>0&&(D.push({start:T+B.length+L,newLines:ne}),L+=ne.length),B.push(...ne);let q=I.length-1,Z=I[q];Z===0&&(q--,Z=I[q]);let K=B.length-V-1,j=F;for(;K>=0;){const N=Math.min(j,Z);if(B[q]===void 0)break;if(B[q].copyCellsFrom(B[K],j-N,Z-N,N,!0),Z-=N,Z===0&&(q--,Z=I[q]),j-=N,j===0){K--;const z=Math.max(K,0);j=(0,x.getWrappedLineTrimmedLength)(B,z,this._cols)}}for(let N=0;N<B.length;N++)I[N]<p&&B[N].setCell(I[N],A);let U=V-ee;for(;U-- >0;)this.ybase===0?this.y<g-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+L)-g&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+V,this.ybase+g-1)}if(D.length>0){const T=[],E=[];for(let q=0;q<this.lines.length;q++)E.push(this.lines.get(q));const B=this.lines.length;let W=B-1,F=0,I=D[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+L);let V=0;for(let q=Math.min(this.lines.maxLength-1,B+L-1);q>=0;q--)if(I&&I.start>W+V){for(let Z=I.newLines.length-1;Z>=0;Z--)this.lines.set(q--,I.newLines[Z]);q++,T.push({index:W+1,amount:I.newLines.length}),V+=I.newLines.length,I=D[++F]}else this.lines.set(q,E[W--]);let ee=0;for(let q=T.length-1;q>=0;q--)T[q].index+=ee,this.lines.onInsertEmitter.fire(T[q]),ee+=T[q].amount;const ne=Math.max(0,B+L-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(p,g,A=0,D){const L=this.lines.get(p);return L?L.translateToString(g,A,D):""}getWrappedRangeForLine(p){let g=p,A=p;for(;g>0&&this.lines.get(g).isWrapped;)g--;for(;A+1<this.lines.length&&this.lines.get(A+1).isWrapped;)A++;return{first:g,last:A}}setupTabStops(p){for(p!=null?this.tabs[p]||(p=this.prevStop(p)):(this.tabs={},p=0);p<this._cols;p+=this._optionsService.rawOptions.tabStopWidth)this.tabs[p]=!0}prevStop(p){for(p==null&&(p=this.x);!this.tabs[--p]&&p>0;);return p>=this._cols?this._cols-1:p<0?0:p}nextStop(p){for(p==null&&(p=this.x);!this.tabs[++p]&&p<this._cols;);return p>=this._cols?this._cols-1:p<0?0:p}clearMarkers(p){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].line===p&&(this.markers[g].dispose(),this.markers.splice(g--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let p=0;p<this.markers.length;p++)this.markers[p].dispose(),this.markers.splice(p--,1);this._isClearing=!1}addMarker(p){const g=new h.Marker(p);return this.markers.push(g),g.register(this.lines.onTrim((A=>{g.line-=A,g.line<0&&g.dispose()}))),g.register(this.lines.onInsert((A=>{g.line>=A.index&&(g.line+=A.amount)}))),g.register(this.lines.onDelete((A=>{g.line>=A.index&&g.line<A.index+A.amount&&g.dispose(),g.line>A.index&&(g.line-=A.amount)}))),g.register(g.onDispose((()=>this._removeMarker(g)))),g}_removeMarker(p){this._isClearing||this.markers.splice(this.markers.indexOf(p),1)}}},8437:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),C=c(511),v=c(643),w=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let x=0;class R{constructor(h,m,p=!1){this.isWrapped=p,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*h);const g=m||C.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]);for(let A=0;A<h;++A)this.setCell(A,g);this.length=h}get(h){const m=this._data[3*h+0],p=2097151&m;return[this._data[3*h+1],2097152&m?this._combined[h]:p?(0,w.stringFromCodePoint)(p):"",m>>22,2097152&m?this._combined[h].charCodeAt(this._combined[h].length-1):p]}set(h,m){this._data[3*h+1]=m[v.CHAR_DATA_ATTR_INDEX],m[v.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[h]=m[1],this._data[3*h+0]=2097152|h|m[v.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*h+0]=m[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|m[v.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(h){return this._data[3*h+0]>>22}hasWidth(h){return 12582912&this._data[3*h+0]}getFg(h){return this._data[3*h+1]}getBg(h){return this._data[3*h+2]}hasContent(h){return 4194303&this._data[3*h+0]}getCodePoint(h){const m=this._data[3*h+0];return 2097152&m?this._combined[h].charCodeAt(this._combined[h].length-1):2097151&m}isCombined(h){return 2097152&this._data[3*h+0]}getString(h){const m=this._data[3*h+0];return 2097152&m?this._combined[h]:2097151&m?(0,w.stringFromCodePoint)(2097151&m):""}isProtected(h){return 536870912&this._data[3*h+2]}loadCell(h,m){return x=3*h,m.content=this._data[x+0],m.fg=this._data[x+1],m.bg=this._data[x+2],2097152&m.content&&(m.combinedData=this._combined[h]),268435456&m.bg&&(m.extended=this._extendedAttrs[h]),m}setCell(h,m){2097152&m.content&&(this._combined[h]=m.combinedData),268435456&m.bg&&(this._extendedAttrs[h]=m.extended),this._data[3*h+0]=m.content,this._data[3*h+1]=m.fg,this._data[3*h+2]=m.bg}setCellFromCodePoint(h,m,p,g,A,D){268435456&A&&(this._extendedAttrs[h]=D),this._data[3*h+0]=m|p<<22,this._data[3*h+1]=g,this._data[3*h+2]=A}addCodepointToCell(h,m,p){let g=this._data[3*h+0];2097152&g?this._combined[h]+=(0,w.stringFromCodePoint)(m):2097151&g?(this._combined[h]=(0,w.stringFromCodePoint)(2097151&g)+(0,w.stringFromCodePoint)(m),g&=-2097152,g|=2097152):g=m|4194304,p&&(g&=-12582913,g|=p<<22),this._data[3*h+0]=g}insertCells(h,m,p,g){if((h%=this.length)&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs),m<this.length-h){const A=new C.CellData;for(let D=this.length-h-m-1;D>=0;--D)this.setCell(h+m+D,this.loadCell(h+D,A));for(let D=0;D<m;++D)this.setCell(h+D,p)}else for(let A=h;A<this.length;++A)this.setCell(A,p);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs)}deleteCells(h,m,p,g){if(h%=this.length,m<this.length-h){const A=new C.CellData;for(let D=0;D<this.length-h-m;++D)this.setCell(h+D,this.loadCell(h+m+D,A));for(let D=this.length-m;D<this.length;++D)this.setCell(D,p)}else for(let A=h;A<this.length;++A)this.setCell(A,p);h&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs),this.getWidth(h)!==0||this.hasContent(h)||this.setCellFromCodePoint(h,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs)}replaceCells(h,m,p,g,A=!1){if(A)for(h&&this.getWidth(h-1)===2&&!this.isProtected(h-1)&&this.setCellFromCodePoint(h-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs),m<this.length&&this.getWidth(m-1)===2&&!this.isProtected(m)&&this.setCellFromCodePoint(m,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs);h<m&&h<this.length;)this.isProtected(h)||this.setCell(h,p),h++;else for(h&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h-1,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs),m<this.length&&this.getWidth(m-1)===2&&this.setCellFromCodePoint(m,0,1,g?.fg||0,g?.bg||0,g?.extended||new u.ExtendedAttrs);h<m&&h<this.length;)this.setCell(h++,p)}resize(h,m){if(h===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const p=3*h;if(h>this.length){if(this._data.buffer.byteLength>=4*p)this._data=new Uint32Array(this._data.buffer,0,p);else{const g=new Uint32Array(p);g.set(this._data),this._data=g}for(let g=this.length;g<h;++g)this.setCell(g,m)}else{this._data=this._data.subarray(0,p);const g=Object.keys(this._combined);for(let D=0;D<g.length;D++){const L=parseInt(g[D],10);L>=h&&delete this._combined[L]}const A=Object.keys(this._extendedAttrs);for(let D=0;D<A.length;D++){const L=parseInt(A[D],10);L>=h&&delete this._extendedAttrs[L]}}return this.length=h,4*p*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const h=new Uint32Array(this._data.length);return h.set(this._data),this._data=h,1}return 0}fill(h,m=!1){if(m)for(let p=0;p<this.length;++p)this.isProtected(p)||this.setCell(p,h);else{this._combined={},this._extendedAttrs={};for(let p=0;p<this.length;++p)this.setCell(p,h)}}copyFrom(h){this.length!==h.length?this._data=new Uint32Array(h._data):this._data.set(h._data),this.length=h.length,this._combined={};for(const m in h._combined)this._combined[m]=h._combined[m];this._extendedAttrs={};for(const m in h._extendedAttrs)this._extendedAttrs[m]=h._extendedAttrs[m];this.isWrapped=h.isWrapped}clone(){const h=new R(0);h._data=new Uint32Array(this._data),h.length=this.length;for(const m in this._combined)h._combined[m]=this._combined[m];for(const m in this._extendedAttrs)h._extendedAttrs[m]=this._extendedAttrs[m];return h.isWrapped=this.isWrapped,h}getTrimmedLength(){for(let h=this.length-1;h>=0;--h)if(4194303&this._data[3*h+0])return h+(this._data[3*h+0]>>22);return 0}getNoBgTrimmedLength(){for(let h=this.length-1;h>=0;--h)if(4194303&this._data[3*h+0]||50331648&this._data[3*h+2])return h+(this._data[3*h+0]>>22);return 0}copyCellsFrom(h,m,p,g,A){const D=h._data;if(A)for(let T=g-1;T>=0;T--){for(let E=0;E<3;E++)this._data[3*(p+T)+E]=D[3*(m+T)+E];268435456&D[3*(m+T)+2]&&(this._extendedAttrs[p+T]=h._extendedAttrs[m+T])}else for(let T=0;T<g;T++){for(let E=0;E<3;E++)this._data[3*(p+T)+E]=D[3*(m+T)+E];268435456&D[3*(m+T)+2]&&(this._extendedAttrs[p+T]=h._extendedAttrs[m+T])}const L=Object.keys(h._combined);for(let T=0;T<L.length;T++){const E=parseInt(L[T],10);E>=m&&(this._combined[E-m+p]=h._combined[E])}}translateToString(h=!1,m=0,p=this.length){h&&(p=Math.min(p,this.getTrimmedLength()));let g="";for(;m<p;){const A=this._data[3*m+0],D=2097151&A;g+=2097152&A?this._combined[m]:D?(0,w.stringFromCodePoint)(D):v.WHITESPACE_CELL_CHAR,m+=A>>22||1}return g}}o.BufferLine=R},4841:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(S,o)=>{function c(u,C,v){if(C===u.length-1)return u[C].getTrimmedLength();const w=!u[C].hasContent(v-1)&&u[C].getWidth(v-1)===1,x=u[C+1].getWidth(0)===2;return w&&x?v-1:v}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,C,v,w,x){const R=[];for(let b=0;b<u.length-1;b++){let h=b,m=u.get(++h);if(!m.isWrapped)continue;const p=[u.get(b)];for(;h<u.length&&m.isWrapped;)p.push(m),m=u.get(++h);if(w>=b&&w<h){b+=p.length-1;continue}let g=0,A=c(p,g,C),D=1,L=0;for(;D<p.length;){const E=c(p,D,C),B=E-L,W=v-A,F=Math.min(B,W);p[g].copyCellsFrom(p[D],L,A,F,!1),A+=F,A===v&&(g++,A=0),L+=F,L===E&&(D++,L=0),A===0&&g!==0&&p[g-1].getWidth(v-1)===2&&(p[g].copyCellsFrom(p[g-1],v-1,A++,1,!1),p[g-1].setCell(v-1,x))}p[g].replaceCells(A,v,x);let T=0;for(let E=p.length-1;E>0&&(E>g||p[E].getTrimmedLength()===0);E--)T++;T>0&&(R.push(b+p.length-T),R.push(T)),b+=p.length-1}return R},o.reflowLargerCreateNewLayout=function(u,C){const v=[];let w=0,x=C[w],R=0;for(let b=0;b<u.length;b++)if(x===b){const h=C[++w];u.onDeleteEmitter.fire({index:b-R,amount:h}),b+=h-1,R+=h,x=C[++w]}else v.push(b);return{layout:v,countRemoved:R}},o.reflowLargerApplyNewLayout=function(u,C){const v=[];for(let w=0;w<C.length;w++)v.push(u.get(C[w]));for(let w=0;w<v.length;w++)u.set(w,v[w]);u.length=C.length},o.reflowSmallerGetNewLineLengths=function(u,C,v){const w=[],x=u.map(((m,p)=>c(u,p,C))).reduce(((m,p)=>m+p));let R=0,b=0,h=0;for(;h<x;){if(x-h<v){w.push(x-h);break}R+=v;const m=c(u,b,C);R>m&&(R-=m,b++);const p=u[b].getWidth(R-1)===2;p&&R--;const g=p?v-1:v;w.push(g),h+=g}return w},o.getWrappedLineTrimmedLength=c},5295:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),C=c(844),v=c(9092);class w extends C.Disposable{constructor(R,b){super(),this._optionsService=R,this._bufferService=b,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new v.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new v.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(R){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(R),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(R,b){this._normal.resize(R,b),this._alt.resize(R,b),this.setupTabStops(R)}setupTabStops(R){this._normal.setupTabStops(R),this._alt.setupTabStops(R)}}o.BufferSet=w},511:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=c(482),C=c(643),v=c(3734);class w extends v.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new v.ExtendedAttrs,this.combinedData=""}static fromCharData(R){const b=new w;return b.setFromCharData(R),b}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(R){this.fg=R[C.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(R[C.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(R[C.CHAR_DATA_CHAR_INDEX].length===2){const h=R[C.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=h&&h<=56319){const m=R[C.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(h-55296)+m-56320+65536|R[C.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=R[C.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|R[C.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=R[C.CHAR_DATA_CHAR_INDEX],this.content=2097152|R[C.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=w},643:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=c(8460),C=c(844);class v{get id(){return this._id}constructor(x){this.line=x,this.isDisposed=!1,this._disposables=[],this._id=v._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,C.disposeArray)(this._disposables),this._disposables.length=0)}register(x){return this._disposables.push(x),x}}o.Marker=v,v._nextId=1},7116:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(S,o)=>{var c,u,C;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(v){v.NUL="\0",v.SOH="",v.STX="",v.ETX="",v.EOT="",v.ENQ="",v.ACK="",v.BEL="\x07",v.BS="\b",v.HT=" ",v.LF=`
|
|
59
59
|
`,v.VT="\v",v.FF="\f",v.CR="\r",v.SO="",v.SI="",v.DLE="",v.DC1="",v.DC2="",v.DC3="",v.DC4="",v.NAK="",v.SYN="",v.ETB="",v.CAN="",v.EM="",v.SUB="",v.ESC="\x1B",v.FS="",v.GS="",v.RS="",v.US="",v.SP=" ",v.DEL=""})(c||(o.C0=c={})),(function(v){v.PAD="",v.HOP="",v.BPH="",v.NBH="",v.IND="",v.NEL="
",v.SSA="",v.ESA="",v.HTS="",v.HTJ="",v.VTS="",v.PLD="",v.PLU="",v.RI="",v.SS2="",v.SS3="",v.DCS="",v.PU1="",v.PU2="",v.STS="",v.CCH="",v.MW="",v.SPA="",v.EPA="",v.SOS="",v.SGCI="",v.SCI="",v.CSI="",v.ST="",v.OSC="",v.PM="",v.APC=""})(u||(o.C1=u={})),(function(v){v.ST=`${c.ESC}\\`})(C||(o.C1_ESCAPED=C={}))},7399:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=c(2584),C={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(v,w,x,R){const b={type:0,cancel:!1,key:void 0},h=(v.shiftKey?1:0)|(v.altKey?2:0)|(v.ctrlKey?4:0)|(v.metaKey?8:0);switch(v.keyCode){case 0:v.key==="UIKeyInputUpArrow"?b.key=w?u.C0.ESC+"OA":u.C0.ESC+"[A":v.key==="UIKeyInputLeftArrow"?b.key=w?u.C0.ESC+"OD":u.C0.ESC+"[D":v.key==="UIKeyInputRightArrow"?b.key=w?u.C0.ESC+"OC":u.C0.ESC+"[C":v.key==="UIKeyInputDownArrow"&&(b.key=w?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:if(v.altKey){b.key=u.C0.ESC+u.C0.DEL;break}b.key=u.C0.DEL;break;case 9:if(v.shiftKey){b.key=u.C0.ESC+"[Z";break}b.key=u.C0.HT,b.cancel=!0;break;case 13:b.key=v.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,b.cancel=!0;break;case 27:b.key=u.C0.ESC,v.altKey&&(b.key=u.C0.ESC+u.C0.ESC),b.cancel=!0;break;case 37:if(v.metaKey)break;h?(b.key=u.C0.ESC+"[1;"+(h+1)+"D",b.key===u.C0.ESC+"[1;3D"&&(b.key=u.C0.ESC+(x?"b":"[1;5D"))):b.key=w?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(v.metaKey)break;h?(b.key=u.C0.ESC+"[1;"+(h+1)+"C",b.key===u.C0.ESC+"[1;3C"&&(b.key=u.C0.ESC+(x?"f":"[1;5C"))):b.key=w?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(v.metaKey)break;h?(b.key=u.C0.ESC+"[1;"+(h+1)+"A",x||b.key!==u.C0.ESC+"[1;3A"||(b.key=u.C0.ESC+"[1;5A")):b.key=w?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(v.metaKey)break;h?(b.key=u.C0.ESC+"[1;"+(h+1)+"B",x||b.key!==u.C0.ESC+"[1;3B"||(b.key=u.C0.ESC+"[1;5B")):b.key=w?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:v.shiftKey||v.ctrlKey||(b.key=u.C0.ESC+"[2~");break;case 46:b.key=h?u.C0.ESC+"[3;"+(h+1)+"~":u.C0.ESC+"[3~";break;case 36:b.key=h?u.C0.ESC+"[1;"+(h+1)+"H":w?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:b.key=h?u.C0.ESC+"[1;"+(h+1)+"F":w?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:v.shiftKey?b.type=2:v.ctrlKey?b.key=u.C0.ESC+"[5;"+(h+1)+"~":b.key=u.C0.ESC+"[5~";break;case 34:v.shiftKey?b.type=3:v.ctrlKey?b.key=u.C0.ESC+"[6;"+(h+1)+"~":b.key=u.C0.ESC+"[6~";break;case 112:b.key=h?u.C0.ESC+"[1;"+(h+1)+"P":u.C0.ESC+"OP";break;case 113:b.key=h?u.C0.ESC+"[1;"+(h+1)+"Q":u.C0.ESC+"OQ";break;case 114:b.key=h?u.C0.ESC+"[1;"+(h+1)+"R":u.C0.ESC+"OR";break;case 115:b.key=h?u.C0.ESC+"[1;"+(h+1)+"S":u.C0.ESC+"OS";break;case 116:b.key=h?u.C0.ESC+"[15;"+(h+1)+"~":u.C0.ESC+"[15~";break;case 117:b.key=h?u.C0.ESC+"[17;"+(h+1)+"~":u.C0.ESC+"[17~";break;case 118:b.key=h?u.C0.ESC+"[18;"+(h+1)+"~":u.C0.ESC+"[18~";break;case 119:b.key=h?u.C0.ESC+"[19;"+(h+1)+"~":u.C0.ESC+"[19~";break;case 120:b.key=h?u.C0.ESC+"[20;"+(h+1)+"~":u.C0.ESC+"[20~";break;case 121:b.key=h?u.C0.ESC+"[21;"+(h+1)+"~":u.C0.ESC+"[21~";break;case 122:b.key=h?u.C0.ESC+"[23;"+(h+1)+"~":u.C0.ESC+"[23~";break;case 123:b.key=h?u.C0.ESC+"[24;"+(h+1)+"~":u.C0.ESC+"[24~";break;default:if(!v.ctrlKey||v.shiftKey||v.altKey||v.metaKey)if(x&&!R||!v.altKey||v.metaKey)!x||v.altKey||v.ctrlKey||v.shiftKey||!v.metaKey?v.key&&!v.ctrlKey&&!v.altKey&&!v.metaKey&&v.keyCode>=48&&v.key.length===1?b.key=v.key:v.key&&v.ctrlKey&&(v.key==="_"&&(b.key=u.C0.US),v.key==="@"&&(b.key=u.C0.NUL)):v.keyCode===65&&(b.type=1);else{const m=C[v.keyCode],p=m?.[v.shiftKey?1:0];if(p)b.key=u.C0.ESC+p;else if(v.keyCode>=65&&v.keyCode<=90){const g=v.ctrlKey?v.keyCode-64:v.keyCode+32;let A=String.fromCharCode(g);v.shiftKey&&(A=A.toUpperCase()),b.key=u.C0.ESC+A}else if(v.keyCode===32)b.key=u.C0.ESC+(v.ctrlKey?u.C0.NUL:" ");else if(v.key==="Dead"&&v.code.startsWith("Key")){let g=v.code.slice(3,4);v.shiftKey||(g=g.toLowerCase()),b.key=u.C0.ESC+g,b.cancel=!0}}else v.keyCode>=65&&v.keyCode<=90?b.key=String.fromCharCode(v.keyCode-64):v.keyCode===32?b.key=u.C0.NUL:v.keyCode>=51&&v.keyCode<=55?b.key=String.fromCharCode(v.keyCode-51+27):v.keyCode===56?b.key=u.C0.DEL:v.keyCode===219?b.key=u.C0.ESC:v.keyCode===220?b.key=u.C0.FS:v.keyCode===221&&(b.key=u.C0.GS)}return b}},482:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},o.utf32ToString=function(c,u=0,C=c.length){let v="";for(let w=u;w<C;++w){let x=c[w];x>65535?(x-=65536,v+=String.fromCharCode(55296+(x>>10))+String.fromCharCode(x%1024+56320)):v+=String.fromCharCode(x)}return v},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const C=c.length;if(!C)return 0;let v=0,w=0;if(this._interim){const x=c.charCodeAt(w++);56320<=x&&x<=57343?u[v++]=1024*(this._interim-55296)+x-56320+65536:(u[v++]=this._interim,u[v++]=x),this._interim=0}for(let x=w;x<C;++x){const R=c.charCodeAt(x);if(55296<=R&&R<=56319){if(++x>=C)return this._interim=R,v;const b=c.charCodeAt(x);56320<=b&&b<=57343?u[v++]=1024*(R-55296)+b-56320+65536:(u[v++]=R,u[v++]=b)}else R!==65279&&(u[v++]=R)}return v}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const C=c.length;if(!C)return 0;let v,w,x,R,b=0,h=0,m=0;if(this.interim[0]){let A=!1,D=this.interim[0];D&=(224&D)==192?31:(240&D)==224?15:7;let L,T=0;for(;(L=63&this.interim[++T])&&T<4;)D<<=6,D|=L;const E=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,B=E-T;for(;m<B;){if(m>=C)return 0;if(L=c[m++],(192&L)!=128){m--,A=!0;break}this.interim[T++]=L,D<<=6,D|=63&L}A||(E===2?D<128?m--:u[b++]=D:E===3?D<2048||D>=55296&&D<=57343||D===65279||(u[b++]=D):D<65536||D>1114111||(u[b++]=D)),this.interim.fill(0)}const p=C-4;let g=m;for(;g<C;){for(;!(!(g<p)||128&(v=c[g])||128&(w=c[g+1])||128&(x=c[g+2])||128&(R=c[g+3]));)u[b++]=v,u[b++]=w,u[b++]=x,u[b++]=R,g+=4;if(v=c[g++],v<128)u[b++]=v;else if((224&v)==192){if(g>=C)return this.interim[0]=v,b;if(w=c[g++],(192&w)!=128){g--;continue}if(h=(31&v)<<6|63&w,h<128){g--;continue}u[b++]=h}else if((240&v)==224){if(g>=C)return this.interim[0]=v,b;if(w=c[g++],(192&w)!=128){g--;continue}if(g>=C)return this.interim[0]=v,this.interim[1]=w,b;if(x=c[g++],(192&x)!=128){g--;continue}if(h=(15&v)<<12|(63&w)<<6|63&x,h<2048||h>=55296&&h<=57343||h===65279)continue;u[b++]=h}else if((248&v)==240){if(g>=C)return this.interim[0]=v,b;if(w=c[g++],(192&w)!=128){g--;continue}if(g>=C)return this.interim[0]=v,this.interim[1]=w,b;if(x=c[g++],(192&x)!=128){g--;continue}if(g>=C)return this.interim[0]=v,this.interim[1]=w,this.interim[2]=x,b;if(R=c[g++],(192&R)!=128){g--;continue}if(h=(7&v)<<18|(63&w)<<12|(63&x)<<6|63&R,h<65536||h>1114111)continue;u[b++]=h}}return b}}},225:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const u=c(1480),C=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],v=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let w;o.UnicodeV6=class{constructor(){if(this.version="6",!w){w=new Uint8Array(65536),w.fill(1),w[0]=0,w.fill(0,1,32),w.fill(0,127,160),w.fill(2,4352,4448),w[9001]=2,w[9002]=2,w.fill(2,11904,42192),w[12351]=1,w.fill(2,44032,55204),w.fill(2,63744,64256),w.fill(2,65040,65050),w.fill(2,65072,65136),w.fill(2,65280,65377),w.fill(2,65504,65511);for(let x=0;x<C.length;++x)w.fill(0,C[x][0],C[x][1]+1)}}wcwidth(x){return x<32?0:x<127?1:x<65536?w[x]:(function(R,b){let h,m=0,p=b.length-1;if(R<b[0][0]||R>b[p][1])return!1;for(;p>=m;)if(h=m+p>>1,R>b[h][1])m=h+1;else{if(!(R<b[h][0]))return!0;p=h-1}return!1})(x,v)?0:x>=131072&&x<=196605||x>=196608&&x<=262141?2:1}charProperties(x,R){let b=this.wcwidth(x),h=b===0&&R!==0;if(h){const m=u.UnicodeService.extractWidth(R);m===0?h=!1:m>b&&(b=m)}return u.UnicodeService.createPropertyValue(0,b,h)}}},5981:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const u=c(8460),C=c(844);class v extends C.Disposable{constructor(x){super(),this._action=x,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(x,R){if(R!==void 0&&this._syncCalls>R)return void(this._syncCalls=0);if(this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let b;for(this._isSyncWriting=!0;b=this._writeBuffer.shift();){this._action(b);const h=this._callbacks.shift();h&&h()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(x,R){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(R),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(R)}_innerWrite(x=0,R=!0){const b=x||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const h=this._writeBuffer[this._bufferOffset],m=this._action(h,R);if(m){const g=A=>Date.now()-b>=12?setTimeout((()=>this._innerWrite(0,A))):this._innerWrite(b,A);return void m.catch((A=>(queueMicrotask((()=>{throw A})),Promise.resolve(!1)))).then(g)}const p=this._callbacks[this._bufferOffset];if(p&&p(),this._bufferOffset++,this._pendingData-=h.length,Date.now()-b>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=v},5941:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function C(v,w){const x=v.toString(16),R=x.length<2?"0"+x:x;switch(w){case 4:return x[0];case 8:return R;case 12:return(R+R).slice(0,3);default:return R+R}}o.parseColor=function(v){if(!v)return;let w=v.toLowerCase();if(w.indexOf("rgb:")===0){w=w.slice(4);const x=c.exec(w);if(x){const R=x[1]?15:x[4]?255:x[7]?4095:65535;return[Math.round(parseInt(x[1]||x[4]||x[7]||x[10],16)/R*255),Math.round(parseInt(x[2]||x[5]||x[8]||x[11],16)/R*255),Math.round(parseInt(x[3]||x[6]||x[9]||x[12],16)/R*255)]}}else if(w.indexOf("#")===0&&(w=w.slice(1),u.exec(w)&&[3,6,9,12].includes(w.length))){const x=w.length/3,R=[0,0,0];for(let b=0;b<3;++b){const h=parseInt(w.slice(x*b,x*b+x),16);R[b]=x===1?h<<4:x===2?h:x===3?h>>4:h>>8}return R}},o.toRgbString=function(v,w=16){const[x,R,b]=v;return`rgb:${C(x,w)}/${C(R,w)}/${C(b,w)}`}},5770:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const u=c(482),C=c(8742),v=c(5770),w=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=w,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=w}registerHandler(R,b){this._handlers[R]===void 0&&(this._handlers[R]=[]);const h=this._handlers[R];return h.push(b),{dispose:()=>{const m=h.indexOf(b);m!==-1&&h.splice(m,1)}}}clearHandler(R){this._handlers[R]&&delete this._handlers[R]}setHandlerFallback(R){this._handlerFb=R}reset(){if(this._active.length)for(let R=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;R>=0;--R)this._active[R].unhook(!1);this._stack.paused=!1,this._active=w,this._ident=0}hook(R,b){if(this.reset(),this._ident=R,this._active=this._handlers[R]||w,this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].hook(b);else this._handlerFb(this._ident,"HOOK",b)}put(R,b,h){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(R,b,h);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(R,b,h))}unhook(R,b=!0){if(this._active.length){let h=!1,m=this._active.length-1,p=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,h=b,p=this._stack.fallThrough,this._stack.paused=!1),!p&&h===!1){for(;m>=0&&(h=this._active[m].unhook(R),h!==!0);m--)if(h instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,h;m--}for(;m>=0;m--)if(h=this._active[m].unhook(!1),h instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,h}else this._handlerFb(this._ident,"UNHOOK",R);this._active=w,this._ident=0}};const x=new C.Params;x.addParam(0),o.DcsHandler=class{constructor(R){this._handler=R,this._data="",this._params=x,this._hitLimit=!1}hook(R){this._params=R.length>1||R.params[0]?R.clone():x,this._data="",this._hitLimit=!1}put(R,b,h){this._hitLimit||(this._data+=(0,u.utf32ToString)(R,b,h),this._data.length>v.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(R){let b=!1;if(this._hitLimit)b=!1;else if(R&&(b=this._handler(this._data,this._params),b instanceof Promise))return b.then((h=>(this._params=x,this._data="",this._hitLimit=!1,h)));return this._params=x,this._data="",this._hitLimit=!1,b}}},2015:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const u=c(844),C=c(8742),v=c(6242),w=c(6351);class x{constructor(m){this.table=new Uint8Array(m)}setDefault(m,p){this.table.fill(m<<4|p)}add(m,p,g,A){this.table[p<<8|m]=g<<4|A}addMany(m,p,g,A){for(let D=0;D<m.length;D++)this.table[p<<8|m[D]]=g<<4|A}}o.TransitionTable=x;const R=160;o.VT500_TRANSITION_TABLE=(function(){const h=new x(4095),m=Array.apply(null,Array(256)).map(((T,E)=>E)),p=(T,E)=>m.slice(T,E),g=p(32,127),A=p(0,24);A.push(25),A.push.apply(A,p(28,32));const D=p(0,14);let L;for(L in h.setDefault(1,0),h.addMany(g,0,2,0),D)h.addMany([24,26,153,154],L,3,0),h.addMany(p(128,144),L,3,0),h.addMany(p(144,152),L,3,0),h.add(156,L,0,0),h.add(27,L,11,1),h.add(157,L,4,8),h.addMany([152,158,159],L,0,7),h.add(155,L,11,3),h.add(144,L,11,9);return h.addMany(A,0,3,0),h.addMany(A,1,3,1),h.add(127,1,0,1),h.addMany(A,8,0,8),h.addMany(A,3,3,3),h.add(127,3,0,3),h.addMany(A,4,3,4),h.add(127,4,0,4),h.addMany(A,6,3,6),h.addMany(A,5,3,5),h.add(127,5,0,5),h.addMany(A,2,3,2),h.add(127,2,0,2),h.add(93,1,4,8),h.addMany(g,8,5,8),h.add(127,8,5,8),h.addMany([156,27,24,26,7],8,6,0),h.addMany(p(28,32),8,0,8),h.addMany([88,94,95],1,0,7),h.addMany(g,7,0,7),h.addMany(A,7,0,7),h.add(156,7,0,0),h.add(127,7,0,7),h.add(91,1,11,3),h.addMany(p(64,127),3,7,0),h.addMany(p(48,60),3,8,4),h.addMany([60,61,62,63],3,9,4),h.addMany(p(48,60),4,8,4),h.addMany(p(64,127),4,7,0),h.addMany([60,61,62,63],4,0,6),h.addMany(p(32,64),6,0,6),h.add(127,6,0,6),h.addMany(p(64,127),6,0,0),h.addMany(p(32,48),3,9,5),h.addMany(p(32,48),5,9,5),h.addMany(p(48,64),5,0,6),h.addMany(p(64,127),5,7,0),h.addMany(p(32,48),4,9,5),h.addMany(p(32,48),1,9,2),h.addMany(p(32,48),2,9,2),h.addMany(p(48,127),2,10,0),h.addMany(p(48,80),1,10,0),h.addMany(p(81,88),1,10,0),h.addMany([89,90,92],1,10,0),h.addMany(p(96,127),1,10,0),h.add(80,1,11,9),h.addMany(A,9,0,9),h.add(127,9,0,9),h.addMany(p(28,32),9,0,9),h.addMany(p(32,48),9,9,12),h.addMany(p(48,60),9,8,10),h.addMany([60,61,62,63],9,9,10),h.addMany(A,11,0,11),h.addMany(p(32,128),11,0,11),h.addMany(p(28,32),11,0,11),h.addMany(A,10,0,10),h.add(127,10,0,10),h.addMany(p(28,32),10,0,10),h.addMany(p(48,60),10,8,10),h.addMany([60,61,62,63],10,0,11),h.addMany(p(32,48),10,9,12),h.addMany(A,12,0,12),h.add(127,12,0,12),h.addMany(p(28,32),12,0,12),h.addMany(p(32,48),12,9,12),h.addMany(p(48,64),12,0,11),h.addMany(p(64,127),12,12,13),h.addMany(p(64,127),10,12,13),h.addMany(p(64,127),9,12,13),h.addMany(A,13,13,13),h.addMany(g,13,13,13),h.add(127,13,0,13),h.addMany([27,156,24,26],13,14,0),h.add(R,0,2,0),h.add(R,8,5,8),h.add(R,6,0,6),h.add(R,11,0,11),h.add(R,13,13,13),h})();class b extends u.Disposable{constructor(m=o.VT500_TRANSITION_TABLE){super(),this._transitions=m,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new C.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(p,g,A)=>{},this._executeHandlerFb=p=>{},this._csiHandlerFb=(p,g)=>{},this._escHandlerFb=p=>{},this._errorHandlerFb=p=>p,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new v.OscParser),this._dcsParser=this.register(new w.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(m,p=[64,126]){let g=0;if(m.prefix){if(m.prefix.length>1)throw new Error("only one byte as prefix supported");if(g=m.prefix.charCodeAt(0),g&&60>g||g>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(m.intermediates){if(m.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let D=0;D<m.intermediates.length;++D){const L=m.intermediates.charCodeAt(D);if(32>L||L>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");g<<=8,g|=L}}if(m.final.length!==1)throw new Error("final must be a single byte");const A=m.final.charCodeAt(0);if(p[0]>A||A>p[1])throw new Error(`final must be in range ${p[0]} .. ${p[1]}`);return g<<=8,g|=A,g}identToString(m){const p=[];for(;m;)p.push(String.fromCharCode(255&m)),m>>=8;return p.reverse().join("")}setPrintHandler(m){this._printHandler=m}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(m,p){const g=this._identifier(m,[48,126]);this._escHandlers[g]===void 0&&(this._escHandlers[g]=[]);const A=this._escHandlers[g];return A.push(p),{dispose:()=>{const D=A.indexOf(p);D!==-1&&A.splice(D,1)}}}clearEscHandler(m){this._escHandlers[this._identifier(m,[48,126])]&&delete this._escHandlers[this._identifier(m,[48,126])]}setEscHandlerFallback(m){this._escHandlerFb=m}setExecuteHandler(m,p){this._executeHandlers[m.charCodeAt(0)]=p}clearExecuteHandler(m){this._executeHandlers[m.charCodeAt(0)]&&delete this._executeHandlers[m.charCodeAt(0)]}setExecuteHandlerFallback(m){this._executeHandlerFb=m}registerCsiHandler(m,p){const g=this._identifier(m);this._csiHandlers[g]===void 0&&(this._csiHandlers[g]=[]);const A=this._csiHandlers[g];return A.push(p),{dispose:()=>{const D=A.indexOf(p);D!==-1&&A.splice(D,1)}}}clearCsiHandler(m){this._csiHandlers[this._identifier(m)]&&delete this._csiHandlers[this._identifier(m)]}setCsiHandlerFallback(m){this._csiHandlerFb=m}registerDcsHandler(m,p){return this._dcsParser.registerHandler(this._identifier(m),p)}clearDcsHandler(m){this._dcsParser.clearHandler(this._identifier(m))}setDcsHandlerFallback(m){this._dcsParser.setHandlerFallback(m)}registerOscHandler(m,p){return this._oscParser.registerHandler(m,p)}clearOscHandler(m){this._oscParser.clearHandler(m)}setOscHandlerFallback(m){this._oscParser.setHandlerFallback(m)}setErrorHandler(m){this._errorHandler=m}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(m,p,g,A,D){this._parseStack.state=m,this._parseStack.handlers=p,this._parseStack.handlerPos=g,this._parseStack.transition=A,this._parseStack.chunkPos=D}parse(m,p,g){let A,D=0,L=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(g===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const E=this._parseStack.handlers;let B=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(g===!1&&B>-1){for(;B>=0&&(A=E[B](this._params),A!==!0);B--)if(A instanceof Promise)return this._parseStack.handlerPos=B,A}this._parseStack.handlers=[];break;case 4:if(g===!1&&B>-1){for(;B>=0&&(A=E[B](),A!==!0);B--)if(A instanceof Promise)return this._parseStack.handlerPos=B,A}this._parseStack.handlers=[];break;case 6:if(D=m[this._parseStack.chunkPos],A=this._dcsParser.unhook(D!==24&&D!==26,g),A)return A;D===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(D=m[this._parseStack.chunkPos],A=this._oscParser.end(D!==24&&D!==26,g),A)return A;D===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,T=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let E=T;E<p;++E){switch(D=m[E],L=this._transitions.table[this.currentState<<8|(D<160?D:R)],L>>4){case 2:for(let V=E+1;;++V){if(V>=p||(D=m[V])<32||D>126&&D<R){this._printHandler(m,E,V),E=V-1;break}if(++V>=p||(D=m[V])<32||D>126&&D<R){this._printHandler(m,E,V),E=V-1;break}if(++V>=p||(D=m[V])<32||D>126&&D<R){this._printHandler(m,E,V),E=V-1;break}if(++V>=p||(D=m[V])<32||D>126&&D<R){this._printHandler(m,E,V),E=V-1;break}}break;case 3:this._executeHandlers[D]?this._executeHandlers[D]():this._executeHandlerFb(D),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:E,code:D,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const B=this._csiHandlers[this._collect<<8|D];let W=B?B.length-1:-1;for(;W>=0&&(A=B[W](this._params),A!==!0);W--)if(A instanceof Promise)return this._preserveStack(3,B,W,L,E),A;W<0&&this._csiHandlerFb(this._collect<<8|D,this._params),this.precedingJoinState=0;break;case 8:do switch(D){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(D-48)}while(++E<p&&(D=m[E])>47&&D<60);E--;break;case 9:this._collect<<=8,this._collect|=D;break;case 10:const F=this._escHandlers[this._collect<<8|D];let I=F?F.length-1:-1;for(;I>=0&&(A=F[I](),A!==!0);I--)if(A instanceof Promise)return this._preserveStack(4,F,I,L,E),A;I<0&&this._escHandlerFb(this._collect<<8|D),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|D,this._params);break;case 13:for(let V=E+1;;++V)if(V>=p||(D=m[V])===24||D===26||D===27||D>127&&D<R){this._dcsParser.put(m,E,V),E=V-1;break}break;case 14:if(A=this._dcsParser.unhook(D!==24&&D!==26),A)return this._preserveStack(6,[],0,L,E),A;D===27&&(L|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let V=E+1;;V++)if(V>=p||(D=m[V])<32||D>127&&D<R){this._oscParser.put(m,E,V),E=V-1;break}break;case 6:if(A=this._oscParser.end(D!==24&&D!==26),A)return this._preserveStack(5,[],0,L,E),A;D===27&&(L|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&L}}}o.EscapeSequenceParser=b},6242:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=c(5770),C=c(482),v=[];o.OscParser=class{constructor(){this._state=0,this._active=v,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(w,x){this._handlers[w]===void 0&&(this._handlers[w]=[]);const R=this._handlers[w];return R.push(x),{dispose:()=>{const b=R.indexOf(x);b!==-1&&R.splice(b,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=v}reset(){if(this._state===2)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].end(!1);this._stack.paused=!1,this._active=v,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||v,this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].start();else this._handlerFb(this._id,"START")}_put(w,x,R){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(w,x,R);else this._handlerFb(this._id,"PUT",(0,C.utf32ToString)(w,x,R))}start(){this.reset(),this._state=1}put(w,x,R){if(this._state!==3){if(this._state===1)for(;x<R;){const b=w[x++];if(b===59){this._state=2,this._start();break}if(b<48||57<b)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+b-48}this._state===2&&R-x>0&&this._put(w,x,R)}}end(w,x=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let R=!1,b=this._active.length-1,h=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,R=x,h=this._stack.fallThrough,this._stack.paused=!1),!h&&R===!1){for(;b>=0&&(R=this._active[b].end(w),R!==!0);b--)if(R instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,R;b--}for(;b>=0;b--)if(R=this._active[b].end(!1),R instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,R}else this._handlerFb(this._id,"END",w);this._active=v,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(w){this._handler=w,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(w,x,R){this._hitLimit||(this._data+=(0,C.utf32ToString)(w,x,R),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(w){let x=!1;if(this._hitLimit)x=!1;else if(w&&(x=this._handler(this._data),x instanceof Promise))return x.then((R=>(this._data="",this._hitLimit=!1,R)));return this._data="",this._hitLimit=!1,x}}},8742:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const c=2147483647;class u{static fromArray(v){const w=new u;if(!v.length)return w;for(let x=Array.isArray(v[0])?1:0;x<v.length;++x){const R=v[x];if(Array.isArray(R))for(let b=0;b<R.length;++b)w.addSubParam(R[b]);else w.addParam(R)}return w}constructor(v=32,w=32){if(this.maxLength=v,this.maxSubParamsLength=w,w>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(v),this.length=0,this._subParams=new Int32Array(w),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(v),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const v=new u(this.maxLength,this.maxSubParamsLength);return v.params.set(this.params),v.length=this.length,v._subParams.set(this._subParams),v._subParamsLength=this._subParamsLength,v._subParamsIdx.set(this._subParamsIdx),v._rejectDigits=this._rejectDigits,v._rejectSubDigits=this._rejectSubDigits,v._digitIsSub=this._digitIsSub,v}toArray(){const v=[];for(let w=0;w<this.length;++w){v.push(this.params[w]);const x=this._subParamsIdx[w]>>8,R=255&this._subParamsIdx[w];R-x>0&&v.push(Array.prototype.slice.call(this._subParams,x,R))}return v}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(v){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(v<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=v>c?c:v}}addSubParam(v){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(v<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=v>c?c:v,this._subParamsIdx[this.length-1]++}}hasSubParams(v){return(255&this._subParamsIdx[v])-(this._subParamsIdx[v]>>8)>0}getSubParams(v){const w=this._subParamsIdx[v]>>8,x=255&this._subParamsIdx[v];return x-w>0?this._subParams.subarray(w,x):null}getSubParamsAll(){const v={};for(let w=0;w<this.length;++w){const x=this._subParamsIdx[w]>>8,R=255&this._subParamsIdx[w];R-x>0&&(v[w]=this._subParams.slice(x,R))}return v}addDigit(v){let w;if(this._rejectDigits||!(w=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const x=this._digitIsSub?this._subParams:this.params,R=x[w-1];x[w-1]=~R?Math.min(10*R+v,c):v}}o.Params=u},5741:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const C={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(C),u.dispose=()=>this._wrappedAddonDispose(C),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let C=0;C<this._addons.length;C++)if(this._addons[C]===c){u=C;break}if(u===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(u,1)}}},8771:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=c(3785),C=c(511);o.BufferApiView=class{constructor(v,w){this._buffer=v,this.type=w}init(v){return this._buffer=v,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(v){const w=this._buffer.lines.get(v);if(w)return new u.BufferLineApiView(w)}getNullCell(){return new C.CellData}}},3785:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=c(511);o.BufferLineApiView=class{constructor(C){this._line=C}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(C,v){if(!(C<0||C>=this._line.length))return v?(this._line.loadCell(C,v),v):this._line.loadCell(C,new u.CellData)}translateToString(C,v,w){return this._line.translateToString(C,v,w)}}},8285:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=c(8771),C=c(8460),v=c(844);class w extends v.Disposable{constructor(R){super(),this._core=R,this._onBufferChange=this.register(new C.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=w},7975:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(C=>u(C.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((C,v)=>u(C,v.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(S,o,c){var u=this&&this.__decorate||function(h,m,p,g){var A,D=arguments.length,L=D<3?m:g===null?g=Object.getOwnPropertyDescriptor(m,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(h,m,p,g);else for(var T=h.length-1;T>=0;T--)(A=h[T])&&(L=(D<3?A(L):D>3?A(m,p,L):A(m,p))||L);return D>3&&L&&Object.defineProperty(m,p,L),L},C=this&&this.__param||function(h,m){return function(p,g){m(p,g,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const v=c(8460),w=c(844),x=c(5295),R=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let b=o.BufferService=class extends w.Disposable{get buffer(){return this.buffers.active}constructor(h){super(),this.isUserScrolling=!1,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(h.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(h.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new x.BufferSet(h,this))}resize(h,m){this.cols=h,this.rows=m,this.buffers.resize(h,m),this._onResize.fire({cols:h,rows:m})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(h,m=!1){const p=this.buffer;let g;g=this._cachedBlankLine,g&&g.length===this.cols&&g.getFg(0)===h.fg&&g.getBg(0)===h.bg||(g=p.getBlankLine(h,m),this._cachedBlankLine=g),g.isWrapped=m;const A=p.ybase+p.scrollTop,D=p.ybase+p.scrollBottom;if(p.scrollTop===0){const L=p.lines.isFull;D===p.lines.length-1?L?p.lines.recycle().copyFrom(g):p.lines.push(g.clone()):p.lines.splice(D+1,0,g.clone()),L?this.isUserScrolling&&(p.ydisp=Math.max(p.ydisp-1,0)):(p.ybase++,this.isUserScrolling||p.ydisp++)}else{const L=D-A+1;p.lines.shiftElements(A+1,L-1,-1),p.lines.set(D,g.clone())}this.isUserScrolling||(p.ydisp=p.ybase),this._onScroll.fire(p.ydisp)}scrollLines(h,m,p){const g=this.buffer;if(h<0){if(g.ydisp===0)return;this.isUserScrolling=!0}else h+g.ydisp>=g.ybase&&(this.isUserScrolling=!1);const A=g.ydisp;g.ydisp=Math.max(Math.min(g.ydisp+h,g.ybase),0),A!==g.ydisp&&(m||this._onScroll.fire(g.ydisp))}};o.BufferService=b=u([C(0,R.IOptionsService)],b)},7994:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(S,o,c){var u=this&&this.__decorate||function(g,A,D,L){var T,E=arguments.length,B=E<3?A:L===null?L=Object.getOwnPropertyDescriptor(A,D):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,A,D,L);else for(var W=g.length-1;W>=0;W--)(T=g[W])&&(B=(E<3?T(B):E>3?T(A,D,B):T(A,D))||B);return E>3&&B&&Object.defineProperty(A,D,B),B},C=this&&this.__param||function(g,A){return function(D,L){A(D,L,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const v=c(2585),w=c(8460),x=c(844),R={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:g=>g.button!==4&&g.action===1&&(g.ctrl=!1,g.alt=!1,g.shift=!1,!0)},VT200:{events:19,restrict:g=>g.action!==32},DRAG:{events:23,restrict:g=>g.action!==32||g.button!==3},ANY:{events:31,restrict:g=>!0}};function b(g,A){let D=(g.ctrl?16:0)|(g.shift?4:0)|(g.alt?8:0);return g.button===4?(D|=64,D|=g.action):(D|=3&g.button,4&g.button&&(D|=64),8&g.button&&(D|=128),g.action===32?D|=32:g.action!==0||A||(D|=3)),D}const h=String.fromCharCode,m={DEFAULT:g=>{const A=[b(g,!1)+32,g.col+32,g.row+32];return A[0]>255||A[1]>255||A[2]>255?"":`\x1B[M${h(A[0])}${h(A[1])}${h(A[2])}`},SGR:g=>{const A=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${b(g,!0)};${g.col};${g.row}${A}`},SGR_PIXELS:g=>{const A=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${b(g,!0)};${g.x};${g.y}${A}`}};let p=o.CoreMouseService=class extends x.Disposable{constructor(g,A){super(),this._bufferService=g,this._coreService=A,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new w.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const D of Object.keys(R))this.addProtocol(D,R[D]);for(const D of Object.keys(m))this.addEncoding(D,m[D]);this.reset()}addProtocol(g,A){this._protocols[g]=A}addEncoding(g,A){this._encodings[g]=A}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(g){if(!this._protocols[g])throw new Error(`unknown protocol "${g}"`);this._activeProtocol=g,this._onProtocolChange.fire(this._protocols[g].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(g){if(!this._encodings[g])throw new Error(`unknown encoding "${g}"`);this._activeEncoding=g}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(g){if(g.col<0||g.col>=this._bufferService.cols||g.row<0||g.row>=this._bufferService.rows||g.button===4&&g.action===32||g.button===3&&g.action!==32||g.button!==4&&(g.action===2||g.action===3)||(g.col++,g.row++,g.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,g,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(g))return!1;const A=this._encodings[this._activeEncoding](g);return A&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(A):this._coreService.triggerDataEvent(A,!0)),this._lastEvent=g,!0}explainEvents(g){return{down:!!(1&g),up:!!(2&g),drag:!!(4&g),move:!!(8&g),wheel:!!(16&g)}}_equalEvents(g,A,D){if(D){if(g.x!==A.x||g.y!==A.y)return!1}else if(g.col!==A.col||g.row!==A.row)return!1;return g.button===A.button&&g.action===A.action&&g.ctrl===A.ctrl&&g.alt===A.alt&&g.shift===A.shift}};o.CoreMouseService=p=u([C(0,v.IBufferService),C(1,v.ICoreService)],p)},6975:function(S,o,c){var u=this&&this.__decorate||function(p,g,A,D){var L,T=arguments.length,E=T<3?g:D===null?D=Object.getOwnPropertyDescriptor(g,A):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(p,g,A,D);else for(var B=p.length-1;B>=0;B--)(L=p[B])&&(E=(T<3?L(E):T>3?L(g,A,E):L(g,A))||E);return T>3&&E&&Object.defineProperty(g,A,E),E},C=this&&this.__param||function(p,g){return function(A,D){g(A,D,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const v=c(1439),w=c(8460),x=c(844),R=c(2585),b=Object.freeze({insertMode:!1}),h=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let m=o.CoreService=class extends x.Disposable{constructor(p,g,A){super(),this._bufferService=p,this._logService=g,this._optionsService=A,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new w.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new w.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new w.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new w.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,v.clone)(b),this.decPrivateModes=(0,v.clone)(h)}reset(){this.modes=(0,v.clone)(b),this.decPrivateModes=(0,v.clone)(h)}triggerDataEvent(p,g=!1){if(this._optionsService.rawOptions.disableStdin)return;const A=this._bufferService.buffer;g&&this._optionsService.rawOptions.scrollOnUserInput&&A.ybase!==A.ydisp&&this._onRequestScrollToBottom.fire(),g&&this._onUserInput.fire(),this._logService.debug(`sending data "${p}"`,(()=>p.split("").map((D=>D.charCodeAt(0))))),this._onData.fire(p)}triggerBinaryEvent(p){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${p}"`,(()=>p.split("").map((g=>g.charCodeAt(0))))),this._onBinary.fire(p))}};o.CoreService=m=u([C(0,R.IBufferService),C(1,R.ILogService),C(2,R.IOptionsService)],m)},9074:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=c(8055),C=c(8460),v=c(844),w=c(6106);let x=0,R=0;class b extends v.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new w.SortedList((p=>p?.marker.line)),this._onDecorationRegistered=this.register(new C.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new C.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,v.toDisposable)((()=>this.reset())))}registerDecoration(p){if(p.marker.isDisposed)return;const g=new h(p);if(g){const A=g.marker.onDispose((()=>g.dispose()));g.onDispose((()=>{g&&(this._decorations.delete(g)&&this._onDecorationRemoved.fire(g),A.dispose())})),this._decorations.insert(g),this._onDecorationRegistered.fire(g)}return g}reset(){for(const p of this._decorations.values())p.dispose();this._decorations.clear()}*getDecorationsAtCell(p,g,A){let D=0,L=0;for(const T of this._decorations.getKeyIterator(g))D=T.options.x??0,L=D+(T.options.width??1),p>=D&&p<L&&(!A||(T.options.layer??"bottom")===A)&&(yield T)}forEachDecorationAtCell(p,g,A,D){this._decorations.forEachByKey(g,(L=>{x=L.options.x??0,R=x+(L.options.width??1),p>=x&&p<R&&(!A||(L.options.layer??"bottom")===A)&&D(L)}))}}o.DecorationService=b;class h extends v.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=u.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=u.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(p){super(),this.options=p,this.onRenderEmitter=this.register(new C.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new C.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=p.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=c(2585),C=c(8343);class v{constructor(...x){this._entries=new Map;for(const[R,b]of x)this.set(R,b)}set(x,R){const b=this._entries.get(x);return this._entries.set(x,R),b}forEach(x){for(const[R,b]of this._entries.entries())x(R,b)}has(x){return this._entries.has(x)}get(x){return this._entries.get(x)}}o.ServiceCollection=v,o.InstantiationService=class{constructor(){this._services=new v,this._services.set(u.IInstantiationService,this)}setService(w,x){this._services.set(w,x)}getService(w){return this._services.get(w)}createInstance(w,...x){const R=(0,C.getServiceDependencies)(w).sort(((m,p)=>m.index-p.index)),b=[];for(const m of R){const p=this._services.get(m.id);if(!p)throw new Error(`[createInstance] ${w.name} depends on UNKNOWN service ${m.id}.`);b.push(p)}const h=R.length>0?R[0].index:x.length;if(x.length!==h)throw new Error(`[createInstance] First service dependency of ${w.name} at position ${h+1} conflicts with ${x.length} static arguments`);return new w(...x,...b)}}},7866:function(S,o,c){var u=this&&this.__decorate||function(h,m,p,g){var A,D=arguments.length,L=D<3?m:g===null?g=Object.getOwnPropertyDescriptor(m,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(h,m,p,g);else for(var T=h.length-1;T>=0;T--)(A=h[T])&&(L=(D<3?A(L):D>3?A(m,p,L):A(m,p))||L);return D>3&&L&&Object.defineProperty(m,p,L),L},C=this&&this.__param||function(h,m){return function(p,g){m(p,g,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const v=c(844),w=c(2585),x={trace:w.LogLevelEnum.TRACE,debug:w.LogLevelEnum.DEBUG,info:w.LogLevelEnum.INFO,warn:w.LogLevelEnum.WARN,error:w.LogLevelEnum.ERROR,off:w.LogLevelEnum.OFF};let R,b=o.LogService=class extends v.Disposable{get logLevel(){return this._logLevel}constructor(h){super(),this._optionsService=h,this._logLevel=w.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),R=this}_updateLogLevel(){this._logLevel=x[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(h){for(let m=0;m<h.length;m++)typeof h[m]=="function"&&(h[m]=h[m]())}_log(h,m,p){this._evalLazyOptionalParams(p),h.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+m,...p)}trace(h,...m){this._logLevel<=w.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,h,m)}debug(h,...m){this._logLevel<=w.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,h,m)}info(h,...m){this._logLevel<=w.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,h,m)}warn(h,...m){this._logLevel<=w.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,h,m)}error(h,...m){this._logLevel<=w.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,h,m)}};o.LogService=b=u([C(0,w.IOptionsService)],b),o.setTraceLogger=function(h){R=h},o.traceCall=function(h,m,p){if(typeof p.value!="function")throw new Error("not supported");const g=p.value;p.value=function(...A){if(R.logLevel!==w.LogLevelEnum.TRACE)return g.apply(this,A);R.trace(`GlyphRenderer#${g.name}(${A.map((L=>JSON.stringify(L))).join(", ")})`);const D=g.apply(this,A);return R.trace(`GlyphRenderer#${g.name} return`,D),D}}},7302:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const u=c(8460),C=c(844),v=c(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:v.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const w=["normal","bold","100","200","300","400","500","600","700","800","900"];class x extends C.Disposable{constructor(b){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const h={...o.DEFAULT_OPTIONS};for(const m in b)if(m in h)try{const p=b[m];h[m]=this._sanitizeAndValidateOption(m,p)}catch(p){console.error(p)}this.rawOptions=h,this.options={...h},this._setupOptions()}onSpecificOptionChange(b,h){return this.onOptionChange((m=>{m===b&&h(this.rawOptions[b])}))}onMultipleOptionChange(b,h){return this.onOptionChange((m=>{b.indexOf(m)!==-1&&h()}))}_setupOptions(){const b=m=>{if(!(m in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);return this.rawOptions[m]},h=(m,p)=>{if(!(m in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);p=this._sanitizeAndValidateOption(m,p),this.rawOptions[m]!==p&&(this.rawOptions[m]=p,this._onOptionChange.fire(m))};for(const m in this.rawOptions){const p={get:b.bind(this,m),set:h.bind(this,m)};Object.defineProperty(this.options,m,p)}}_sanitizeAndValidateOption(b,h){switch(b){case"cursorStyle":if(h||(h=o.DEFAULT_OPTIONS[b]),!(function(m){return m==="block"||m==="underline"||m==="bar"})(h))throw new Error(`"${h}" is not a valid value for ${b}`);break;case"wordSeparator":h||(h=o.DEFAULT_OPTIONS[b]);break;case"fontWeight":case"fontWeightBold":if(typeof h=="number"&&1<=h&&h<=1e3)break;h=w.includes(h)?h:o.DEFAULT_OPTIONS[b];break;case"cursorWidth":h=Math.floor(h);case"lineHeight":case"tabStopWidth":if(h<1)throw new Error(`${b} cannot be less than 1, value: ${h}`);break;case"minimumContrastRatio":h=Math.max(1,Math.min(21,Math.round(10*h)/10));break;case"scrollback":if((h=Math.min(h,4294967295))<0)throw new Error(`${b} cannot be less than 0, value: ${h}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(h<=0)throw new Error(`${b} cannot be less than or equal to 0, value: ${h}`);break;case"rows":case"cols":if(!h&&h!==0)throw new Error(`${b} must be numeric, value: ${h}`);break;case"windowsPty":h=h??{}}return h}}o.OptionsService=x},2660:function(S,o,c){var u=this&&this.__decorate||function(x,R,b,h){var m,p=arguments.length,g=p<3?R:h===null?h=Object.getOwnPropertyDescriptor(R,b):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(x,R,b,h);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(g=(p<3?m(g):p>3?m(R,b,g):m(R,b))||g);return p>3&&g&&Object.defineProperty(R,b,g),g},C=this&&this.__param||function(x,R){return function(b,h){R(b,h,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const v=c(2585);let w=o.OscLinkService=class{constructor(x){this._bufferService=x,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(x){const R=this._bufferService.buffer;if(x.id===void 0){const A=R.addMarker(R.ybase+R.y),D={data:x,id:this._nextId++,lines:[A]};return A.onDispose((()=>this._removeMarkerFromLink(D,A))),this._dataByLinkId.set(D.id,D),D.id}const b=x,h=this._getEntryIdKey(b),m=this._entriesWithId.get(h);if(m)return this.addLineToLink(m.id,R.ybase+R.y),m.id;const p=R.addMarker(R.ybase+R.y),g={id:this._nextId++,key:this._getEntryIdKey(b),data:b,lines:[p]};return p.onDispose((()=>this._removeMarkerFromLink(g,p))),this._entriesWithId.set(g.key,g),this._dataByLinkId.set(g.id,g),g.id}addLineToLink(x,R){const b=this._dataByLinkId.get(x);if(b&&b.lines.every((h=>h.line!==R))){const h=this._bufferService.buffer.addMarker(R);b.lines.push(h),h.onDispose((()=>this._removeMarkerFromLink(b,h)))}}getLinkData(x){return this._dataByLinkId.get(x)?.data}_getEntryIdKey(x){return`${x.id};;${x.uri}`}_removeMarkerFromLink(x,R){const b=x.lines.indexOf(R);b!==-1&&(x.lines.splice(b,1),x.lines.length===0&&(x.data.id!==void 0&&this._entriesWithId.delete(x.key),this._dataByLinkId.delete(x.id)))}};o.OscLinkService=w=u([C(0,v.IBufferService)],w)},8343:(S,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",u="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(C){return C[u]||[]},o.createDecorator=function(C){if(o.serviceRegistry.has(C))return o.serviceRegistry.get(C);const v=function(w,x,R){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,h,m){h[c]===h?h[u].push({id:b,index:m}):(h[u]=[{id:b,index:m}],h[c]=h)})(v,w,R)};return v.toString=()=>C,o.serviceRegistry.set(C,v),v}},2585:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const u=c(8343);var C;o.IBufferService=(0,u.createDecorator)("BufferService"),o.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),o.ICoreService=(0,u.createDecorator)("CoreService"),o.ICharsetService=(0,u.createDecorator)("CharsetService"),o.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(v){v[v.TRACE=0]="TRACE",v[v.DEBUG=1]="DEBUG",v[v.INFO=2]="INFO",v[v.WARN=3]="WARN",v[v.ERROR=4]="ERROR",v[v.OFF=5]="OFF"})(C||(o.LogLevelEnum=C={})),o.ILogService=(0,u.createDecorator)("LogService"),o.IOptionsService=(0,u.createDecorator)("OptionsService"),o.IOscLinkService=(0,u.createDecorator)("OscLinkService"),o.IUnicodeService=(0,u.createDecorator)("UnicodeService"),o.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(S,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const u=c(8460),C=c(225);class v{static extractShouldJoin(x){return(1&x)!=0}static extractWidth(x){return x>>1&3}static extractCharKind(x){return x>>3}static createPropertyValue(x,R,b=!1){return(16777215&x)<<3|(3&R)<<1|(b?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const x=new C.UnicodeV6;this.register(x),this._active=x.version,this._activeProvider=x}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(x){if(!this._providers[x])throw new Error(`unknown Unicode version "${x}"`);this._active=x,this._activeProvider=this._providers[x],this._onChange.fire(x)}register(x){this._providers[x.version]=x}wcwidth(x){return this._activeProvider.wcwidth(x)}getStringCellWidth(x){let R=0,b=0;const h=x.length;for(let m=0;m<h;++m){let p=x.charCodeAt(m);if(55296<=p&&p<=56319){if(++m>=h)return R+this.wcwidth(p);const D=x.charCodeAt(m);56320<=D&&D<=57343?p=1024*(p-55296)+D-56320+65536:R+=this.wcwidth(D)}const g=this.charProperties(p,b);let A=v.extractWidth(g);v.extractShouldJoin(g)&&(A-=v.extractWidth(b)),R+=A,b=g}return R}charProperties(x,R){return this._activeProvider.charProperties(x,R)}}o.UnicodeService=v}},l={};function d(S){var o=l[S];if(o!==void 0)return o.exports;var c=l[S]={exports:{}};return a[S].call(c.exports,c,c.exports,d),c.exports}var y={};return(()=>{var S=y;Object.defineProperty(S,"__esModule",{value:!0}),S.Terminal=void 0;const o=d(9042),c=d(3236),u=d(844),C=d(5741),v=d(8285),w=d(7975),x=d(7090),R=["cols","rows"];class b extends u.Disposable{constructor(m){super(),this._core=this.register(new c.Terminal(m)),this._addonManager=this.register(new C.AddonManager),this._publicOptions={...this._core.options};const p=A=>this._core.options[A],g=(A,D)=>{this._checkReadonlyOptions(A),this._core.options[A]=D};for(const A in this._core.options){const D={get:p.bind(this,A),set:g.bind(this,A)};Object.defineProperty(this._publicOptions,A,D)}}_checkReadonlyOptions(m){if(R.includes(m))throw new Error(`Option "${m}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new w.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new x.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new v.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const m=this._core.coreService.decPrivateModes;let p="none";switch(this._core.coreMouseService.activeProtocol){case"X10":p="x10";break;case"VT200":p="vt200";break;case"DRAG":p="drag";break;case"ANY":p="any"}return{applicationCursorKeysMode:m.applicationCursorKeys,applicationKeypadMode:m.applicationKeypad,bracketedPasteMode:m.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:p,originMode:m.origin,reverseWraparoundMode:m.reverseWraparound,sendFocusMode:m.sendFocus,wraparoundMode:m.wraparound}}get options(){return this._publicOptions}set options(m){for(const p in m)this._publicOptions[p]=m[p]}blur(){this._core.blur()}focus(){this._core.focus()}resize(m,p){this._verifyIntegers(m,p),this._core.resize(m,p)}open(m){this._core.open(m)}attachCustomKeyEventHandler(m){this._core.attachCustomKeyEventHandler(m)}registerLinkProvider(m){return this._core.registerLinkProvider(m)}registerCharacterJoiner(m){return this._checkProposedApi(),this._core.registerCharacterJoiner(m)}deregisterCharacterJoiner(m){this._checkProposedApi(),this._core.deregisterCharacterJoiner(m)}registerMarker(m=0){return this._verifyIntegers(m),this._core.registerMarker(m)}registerDecoration(m){return this._checkProposedApi(),this._verifyPositiveIntegers(m.x??0,m.width??0,m.height??0),this._core.registerDecoration(m)}hasSelection(){return this._core.hasSelection()}select(m,p,g){this._verifyIntegers(m,p,g),this._core.select(m,p,g)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(m,p){this._verifyIntegers(m,p),this._core.selectLines(m,p)}dispose(){super.dispose()}scrollLines(m){this._verifyIntegers(m),this._core.scrollLines(m)}scrollPages(m){this._verifyIntegers(m),this._core.scrollPages(m)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(m){this._verifyIntegers(m),this._core.scrollToLine(m)}clear(){this._core.clear()}write(m,p){this._core.write(m,p)}writeln(m,p){this._core.write(m),this._core.write(`\r
|
|
60
|
-
`,p)}paste(m){this._core.paste(m)}refresh(m,p){this._verifyIntegers(m,p),this._core.refresh(m,p)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(m){this._addonManager.loadAddon(this,m)}static get strings(){return o}_verifyIntegers(...m){for(const p of m)if(p===1/0||isNaN(p)||p%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...m){for(const p of m)if(p&&(p===1/0||isNaN(p)||p%1!=0||p<0))throw new Error("This API only accepts positive integers")}}S.Terminal=b})(),y})()))})(of)),of.exports}var
|
|
60
|
+
`,p)}paste(m){this._core.paste(m)}refresh(m,p){this._verifyIntegers(m,p),this._core.refresh(m,p)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(m){this._addonManager.loadAddon(this,m)}static get strings(){return o}_verifyIntegers(...m){for(const p of m)if(p===1/0||isNaN(p)||p%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...m){for(const p of m)if(p&&(p===1/0||isNaN(p)||p%1!=0||p<0))throw new Error("This API only accepts positive integers")}}S.Terminal=b})(),y})()))})(of)),of.exports}var XT=YT(),lf={exports:{}},O_;function QT(){return O_||(O_=1,(function(r,n){(function(a,l){r.exports=l()})(self,(()=>(()=>{var a={};return(()=>{var l=a;Object.defineProperty(l,"__esModule",{value:!0}),l.FitAddon=void 0,l.FitAddon=class{activate(d){this._terminal=d}dispose(){}fit(){const d=this.proposeDimensions();if(!d||!this._terminal||isNaN(d.cols)||isNaN(d.rows))return;const y=this._terminal._core;this._terminal.rows===d.rows&&this._terminal.cols===d.cols||(y._renderService.clear(),this._terminal.resize(d.cols,d.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const d=this._terminal._core,y=d._renderService.dimensions;if(y.css.cell.width===0||y.css.cell.height===0)return;const S=this._terminal.options.scrollback===0?0:d.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(o.getPropertyValue("height")),u=Math.max(0,parseInt(o.getPropertyValue("width"))),C=window.getComputedStyle(this._terminal.element),v=c-(parseInt(C.getPropertyValue("padding-top"))+parseInt(C.getPropertyValue("padding-bottom"))),w=u-(parseInt(C.getPropertyValue("padding-right"))+parseInt(C.getPropertyValue("padding-left")))-S;return{cols:Math.max(2,Math.floor(w/y.css.cell.width)),rows:Math.max(1,Math.floor(v/y.css.cell.height))}}}})(),a})()))})(lf)),lf.exports}var ZT=QT();class JT{ws=null;handlers;sessionId;reconnectTimer=null;retryCount=0;exitReceived=!1;manualClose=!1;reconnectScheduled=!1;constructor(n,a){this.sessionId=n,this.handlers=a}connect(){this.clearReconnectTimer();const n=window.location.protocol==="https:"?"wss:":"ws:",a=window.location.host,l=`${n}//${a}/api/sessions/${this.sessionId}/terminal?sessionId=${this.sessionId}`;this.ws=new WebSocket(l),this.manualClose=!1,this.exitReceived=!1,this.reconnectScheduled=!1,this.ws.onopen=()=>{this.retryCount=0,this.handlers.onOpen?.()},this.ws.onmessage=d=>{try{const y=JSON.parse(d.data);this.handleServerMessage(y)}catch(y){console.error("Failed to parse WebSocket message:",y)}},this.ws.onerror=d=>{console.error("WebSocket error:",d),this.handlers.onError?.("WebSocket connection error"),this.scheduleReconnect()},this.ws.onclose=()=>{this.handlers.onClose?.(),this.scheduleReconnect()}}handleServerMessage(n){switch(n.type){case"output":{const a=n;this.handlers.onOutput?.(a.data);break}case"exit":{const a=n;this.exitReceived=!0,this.handlers.onExit?.(a.data.code,a.data.signal);break}case"error":{const a=n;this.handlers.onError?.(a.data.message);break}case"pong":{this.handlers.onPong?.();break}default:{console.warn("Unknown server message type:",n.type);break}}}sendInput(n){if(!this.ws||this.ws.readyState!==WebSocket.OPEN){console.error("WebSocket is not connected");return}const a={type:"input",data:n,timestamp:new Date().toISOString()};this.ws.send(JSON.stringify(a))}sendResize(n,a){if(!this.ws||this.ws.readyState!==WebSocket.OPEN){console.error("WebSocket is not connected");return}const l={type:"resize",data:{cols:n,rows:a},timestamp:new Date().toISOString()};this.ws.send(JSON.stringify(l))}sendPing(){if(!this.ws||this.ws.readyState!==WebSocket.OPEN){console.error("WebSocket is not connected");return}const n={type:"ping",timestamp:new Date().toISOString()};this.ws.send(JSON.stringify(n))}disconnect(){this.manualClose=!0,this.exitReceived=!0,this.clearReconnectTimer(),this.ws&&(this.ws.close(),this.ws=null)}isConnected(){return this.ws!==null&&this.ws.readyState===WebSocket.OPEN}scheduleReconnect(){if(this.reconnectScheduled||this.manualClose||this.exitReceived)return;if(this.retryCount>=eD){this.handlers.onError?.("Unable to reconnect to session.");return}this.retryCount+=1;const n=Math.min(2e3,this.retryCount*500);this.clearReconnectTimer(),this.reconnectScheduled=!0,this.reconnectTimer=window.setTimeout(()=>{this.reconnectScheduled=!1,this.connect()},n)}clearReconnectTimer(){this.reconnectTimer!==null&&(window.clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.reconnectScheduled=!1)}}const eD=5;function tD({sessionId:r,onExit:n,onError:a}){const l=k.useRef(null),d=k.useRef(null),y=k.useRef(null),S=k.useRef(null),o=k.useRef(n),c=k.useRef(a);return k.useEffect(()=>{o.current=n,c.current=a},[n,a]),k.useEffect(()=>{if(!l.current)return;const u=new XT.Terminal({cursorBlink:!0,fontSize:14,fontFamily:'"Cascadia Code", "SF Mono", Monaco, Consolas, monospace',theme:{background:"#1e1e1e",foreground:"#d4d4d4",cursor:"#aeafad",black:"#000000",red:"#cd3131",green:"#0dbc79",yellow:"#e5e510",blue:"#2472c8",magenta:"#bc3fbc",cyan:"#11a8cd",white:"#e5e5e5",brightBlack:"#666666",brightRed:"#f14c4c",brightGreen:"#23d18b",brightYellow:"#f5f543",brightBlue:"#3b8eea",brightMagenta:"#d670d6",brightCyan:"#29b8db",brightWhite:"#ffffff"}}),C=new ZT.FitAddon;u.loadAddon(C),u.open(l.current),C.fit(),d.current=u,y.current=C;const v=new JT(r,{onOutput:R=>{u.write(R)},onExit:R=>{u.write(`\r
|
|
61
61
|
\r
|
|
62
62
|
[Process exited with code ${R}]\r
|
|
63
63
|
`),o.current?.(R)},onError:R=>{u.write(`\r
|
|
@@ -66,7 +66,7 @@ WARNING: This link could potentially be dangerous`)){const m=window.open();if(m)
|
|
|
66
66
|
`),c.current?.(R)},onOpen:()=>{u.write(`Connected to session...\r
|
|
67
67
|
`)},onClose:()=>{u.write(`\r
|
|
68
68
|
[Connection closed]\r
|
|
69
|
-
`)}});v.connect(),S.current=v,u.onData(R=>{v.sendInput(R)});const w=()=>{C.fit(),v.isConnected()&&v.sendResize(u.cols,u.rows)};window.addEventListener("resize",w);let x=null;return typeof ResizeObserver<"u"&&(x=new ResizeObserver(()=>{w()}),x.observe(l.current)),()=>{window.removeEventListener("resize",w),x?.disconnect(),v.disconnect(),u.dispose()}},[r]),O.jsx("div",{ref:l,style:{width:"100%",height:"100%",padding:"8px",backgroundColor:"#1e1e1e"}})}function rD({sessionId:r,isFullscreen:n,onToggleFullscreen:a,onExit:l,onError:d}){return r?O.jsxs(zt,{className:Ue("flex flex-col transition-all",n&&"fixed inset-4 z-50 h-auto"),"data-testid":"active-terminal",children:[O.jsxs(br,{className:"flex-shrink-0 pb-2",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Active Session"}),O.jsx("h3",{className:"text-lg font-semibold",children:"ターミナルセッション"})]}),O.jsxs("div",{className:"flex gap-2",children:[O.jsx(Pt,{variant:"ghost",size:"sm",onClick:a,children:n?"通常表示に戻す":"最大化"}),n&&O.jsx(Pt,{variant:"ghost",size:"sm",onClick:a,"aria-label":"ターミナルを閉じる",children:"×"})]})]}),O.jsx("p",{className:"text-sm text-muted-foreground",children:"出力はリアルタイムにストリームされます。終了するとこのパネルは自動で閉じます。"})]}),O.jsx(Vt,{className:Ue("flex-1 overflow-hidden",n&&"h-full"),children:O.jsx("div",{className:Ue("h-full min-h-[300px] overflow-auto rounded-lg border bg-black p-4",n&&"min-h-0"),children:O.jsx(tD,{sessionId:r,onExit:l,onError:d})})})]}):O.jsxs(zt,{className:"h-full",children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Terminal"}),O.jsx("h3",{className:"text-lg font-semibold",children:"セッションは未起動"})]}),O.jsx(Vt,{className:"flex min-h-[200px] items-center justify-center",children:O.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["上部のアクションからAIツールを起動すると、",O.jsx("br",{}),"このエリアにターミナルが表示されます。"]})})]})}const iD={local:"ローカル",remote:"リモート"},nD={merged:"マージ済み",unmerged:"未マージ",unknown:"状態不明"};function sD(){const{branchName:r}=bw(),n=r?decodeURIComponent(r):"",{data:a,isLoading:l,error:d}=Tx(n),y=Dx(n),S=JE(),o=tR(),{data:c,isLoading:u}=eR(),C=rR(),{data:v,isLoading:w,error:x}=Hy(),[R,b]=k.useState(null),[h,m]=k.useState(!1),[p,g]=k.useState(null),[A,D]=k.useState(!1),[L,T]=k.useState("claude-code"),[E,B]=k.useState("normal"),[W,F]=k.useState(!1),[I,V]=k.useState(""),[ee,ne]=k.useState(null),q=k.useMemo(()=>aD(a?.commitDate),[a?.commitDate]);k.useEffect(()=>{if(!A)return;const me=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=me}},[A]);const Z=v?.tools??[],K=k.useMemo(()=>[{id:"claude-code",label:"Claude Code",target:"claude"},{id:"codex-cli",label:"Codex CLI",target:"codex"},...Z.map(me=>({id:me.id,label:me.displayName,target:"custom",definition:me}))],[Z]);k.useEffect(()=>{if(!K.length){T("claude-code");return}if(!K.find(me=>me.id===L)){const me=K[0];me&&T(me.id)}},[K,L]);const j=k.useMemo(()=>(c??[]).filter(me=>me.worktreePath===a?.worktreePath).sort((me,Ce)=>(Ce.startedAt??"").localeCompare(me.startedAt??"")),[c,a?.worktreePath]),U=k.useMemo(()=>{if(!a)return null;if(a.lastToolUsage)return a.lastToolUsage;const me=j[0];return me?{branch:a.name,worktreePath:a.worktreePath??null,toolId:me.toolType==="custom"?me.toolName??"custom":me.toolType,toolLabel:me.toolType==="custom"?me.toolName??"Custom":M_(me.toolType),mode:me.mode??"normal",model:null,timestamp:me.startedAt?Date.parse(me.startedAt):Date.now()}:null},[a,j]);if(l)return O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"BRANCH DETAIL",title:"読み込み中...",subtitle:"ブランチ情報を取得しています"}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx("div",{className:"flex items-center justify-center py-20",children:O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"mb-4 text-4xl",children:"⏳"}),O.jsx("p",{className:"text-muted-foreground",children:"Loading branch..."})]})})})]});if(d)return O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"BRANCH DETAIL",title:"エラー"}),O.jsxs("main",{className:"mx-auto max-w-7xl px-6 py-8",children:[O.jsx(Ui,{variant:"destructive",children:O.jsx(Ii,{children:d instanceof Error?d.message:"未知のエラーです"})}),O.jsx("div",{className:"mt-4",children:O.jsx(Pt,{variant:"ghost",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧に戻る"})})})]})]});if(!a)return O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"BRANCH DETAIL",title:"Branch not found"}),O.jsxs("main",{className:"mx-auto max-w-7xl px-6 py-8",children:[O.jsx("p",{className:"mb-4 text-muted-foreground",children:"指定されたブランチは存在しません。"}),O.jsx(Pt,{variant:"ghost",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧に戻る"})})]})]});const N=!!a.worktreePath,z=a.divergence??null,
|
|
69
|
+
`)}});v.connect(),S.current=v,u.onData(R=>{v.sendInput(R)});const w=()=>{C.fit(),v.isConnected()&&v.sendResize(u.cols,u.rows)};window.addEventListener("resize",w);let x=null;return typeof ResizeObserver<"u"&&(x=new ResizeObserver(()=>{w()}),x.observe(l.current)),()=>{window.removeEventListener("resize",w),x?.disconnect(),v.disconnect(),u.dispose()}},[r]),O.jsx("div",{ref:l,style:{width:"100%",height:"100%",padding:"8px",backgroundColor:"#1e1e1e"}})}function rD({sessionId:r,isFullscreen:n,onToggleFullscreen:a,onExit:l,onError:d}){return r?O.jsxs(zt,{className:Ue("flex flex-col transition-all",n&&"fixed inset-4 z-50 h-auto"),"data-testid":"active-terminal",children:[O.jsxs(br,{className:"flex-shrink-0 pb-2",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Active Session"}),O.jsx("h3",{className:"text-lg font-semibold",children:"ターミナルセッション"})]}),O.jsxs("div",{className:"flex gap-2",children:[O.jsx(Pt,{variant:"ghost",size:"sm",onClick:a,children:n?"通常表示に戻す":"最大化"}),n&&O.jsx(Pt,{variant:"ghost",size:"sm",onClick:a,"aria-label":"ターミナルを閉じる",children:"×"})]})]}),O.jsx("p",{className:"text-sm text-muted-foreground",children:"出力はリアルタイムにストリームされます。終了するとこのパネルは自動で閉じます。"})]}),O.jsx(Vt,{className:Ue("flex-1 overflow-hidden",n&&"h-full"),children:O.jsx("div",{className:Ue("h-full min-h-[300px] overflow-auto rounded-lg border bg-black p-4",n&&"min-h-0"),children:O.jsx(tD,{sessionId:r,onExit:l,onError:d})})})]}):O.jsxs(zt,{className:"h-full",children:[O.jsxs(br,{className:"pb-2",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Terminal"}),O.jsx("h3",{className:"text-lg font-semibold",children:"セッションは未起動"})]}),O.jsx(Vt,{className:"flex min-h-[200px] items-center justify-center",children:O.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["上部のアクションからAIツールを起動すると、",O.jsx("br",{}),"このエリアにターミナルが表示されます。"]})})]})}const iD={local:"ローカル",remote:"リモート"},nD={merged:"マージ済み",unmerged:"未マージ",unknown:"状態不明"};function sD(){const{branchName:r}=bw(),n=r?decodeURIComponent(r):"",{data:a,isLoading:l,error:d}=Tx(n),y=Dx(n),S=JE(),o=tR(),{data:c,isLoading:u}=eR(),C=rR(),{data:v,isLoading:w,error:x}=Hy(),[R,b]=k.useState(null),[h,m]=k.useState(!1),[p,g]=k.useState(null),[A,D]=k.useState(!1),[L,T]=k.useState("claude-code"),[E,B]=k.useState("normal"),[W,F]=k.useState(!1),[I,V]=k.useState(""),[ee,ne]=k.useState(null),q=k.useMemo(()=>aD(a?.commitDate),[a?.commitDate]);k.useEffect(()=>{if(!A)return;const me=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=me}},[A]);const Z=v?.tools??[],K=k.useMemo(()=>[{id:"claude-code",label:"Claude Code",target:"claude"},{id:"codex-cli",label:"Codex CLI",target:"codex"},...Z.map(me=>({id:me.id,label:me.displayName,target:"custom",definition:me}))],[Z]);k.useEffect(()=>{if(!K.length){T("claude-code");return}if(!K.find(me=>me.id===L)){const me=K[0];me&&T(me.id)}},[K,L]);const j=k.useMemo(()=>(c??[]).filter(me=>me.worktreePath===a?.worktreePath).sort((me,Ce)=>(Ce.startedAt??"").localeCompare(me.startedAt??"")),[c,a?.worktreePath]),U=k.useMemo(()=>{if(!a)return null;if(a.lastToolUsage)return a.lastToolUsage;const me=j[0];return me?{branch:a.name,worktreePath:a.worktreePath??null,toolId:me.toolType==="custom"?me.toolName??"custom":me.toolType,toolLabel:me.toolType==="custom"?me.toolName??"Custom":M_(me.toolType),mode:me.mode??"normal",model:null,timestamp:me.startedAt?Date.parse(me.startedAt):Date.now()}:null},[a,j]);if(l)return O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"BRANCH DETAIL",title:"読み込み中...",subtitle:"ブランチ情報を取得しています"}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx("div",{className:"flex items-center justify-center py-20",children:O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"mb-4 text-4xl",children:"⏳"}),O.jsx("p",{className:"text-muted-foreground",children:"Loading branch..."})]})})})]});if(d)return O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"BRANCH DETAIL",title:"エラー"}),O.jsxs("main",{className:"mx-auto max-w-7xl px-6 py-8",children:[O.jsx(Ui,{variant:"destructive",children:O.jsx(Ii,{children:d instanceof Error?d.message:"未知のエラーです"})}),O.jsx("div",{className:"mt-4",children:O.jsx(Pt,{variant:"ghost",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧に戻る"})})})]})]});if(!a)return O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"BRANCH DETAIL",title:"Branch not found"}),O.jsxs("main",{className:"mx-auto max-w-7xl px-6 py-8",children:[O.jsx("p",{className:"mb-4 text-muted-foreground",children:"指定されたブランチは存在しません。"}),O.jsx(Pt,{variant:"ghost",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧に戻る"})})]})]});const N=!!a.worktreePath,z=a.divergence??null,Q=!!(z&&z.ahead>0&&z.behind>0),ie=!!(a.worktreePath&&z&&z.behind>0&&z.ahead===0&&!Q),de=y.isPending,G=K.find(me=>me.id===L),X=async()=>{try{await S.mutateAsync({branchName:a.name,createBranch:!1}),g({type:"success",message:`${a.name} のWorktreeを作成しました。`})}catch(me){g({type:"error",message:$l(me,"Worktreeの作成に失敗しました")})}},P=async()=>{if(!a.worktreePath){g({type:"error",message:"Worktreeが存在しないため、先に作成してください。"});return}if(!G){g({type:"error",message:"起動するAIツールを選択してください"});return}if(ie){g({type:"error",message:"リモートの更新を取り込むまでAIツールは起動できません。"});return}if(Q){g({type:"error",message:"差分を解消してから起動してください。"});return}if(!(W&&!window.confirm("権限チェックをスキップして起動します。続行しますか?"))){m(!0);try{const me=G.target==="codex"?"codex-cli":G.target==="custom"?"custom":"claude-code",Ce=I.split(/\s+/).map(tt=>tt.trim()).filter(Boolean),ze={toolType:me,toolName:G.target==="custom"?G.id:null,...G.target==="custom"?{customToolId:G.id}:{},mode:E,worktreePath:a.worktreePath,skipPermissions:W,...G.target==="codex"?{bypassApprovals:W}:{},...Ce.length?{extraArgs:Ce}:{}},ct=await o.mutateAsync(ze);b(ct.sessionId),D(!1),g({type:"info",message:`${M_(me,G)} を起動しました。`})}catch(me){g({type:"error",message:$l(me,"セッションの起動に失敗しました")})}finally{m(!1)}}},he=async me=>{ne(me);try{await C.mutateAsync(me),g({type:"success",message:"セッションを終了しました"}),R===me&&b(null)}catch(Ce){g({type:"error",message:$l(Ce,"セッションの終了に失敗しました")})}finally{ne(null)}},ge=async()=>{if(!a.worktreePath){g({type:"error",message:"Worktreeが存在しないため同期できません。"});return}try{const me=await y.mutateAsync({worktreePath:a.worktreePath});if(me.pullStatus==="success")g({type:"success",message:"リモートの最新変更を取り込みました。"});else{const Ce=me.warnings?.join(`
|
|
70
70
|
`)??"fast-forward pull が完了しませんでした";g({type:"error",message:`git pull --ff-only が失敗しました。
|
|
71
|
-
${Ce}`})}}catch(me){g({type:"error",message:$l(me,"Git同期に失敗しました")})}},oe=me=>{b(null),D(!1),g({type:me===0?"success":"error",message:`セッションがコード ${me} で終了しました。`})};return O.jsxs("div",{className:"min-h-screen bg-background",children:[A&&O.jsx("div",{className:"fixed inset-0 z-40 bg-black/80","aria-hidden":"true",onClick:()=>D(!1)}),O.jsxs(Gr,{eyebrow:"BRANCH DETAIL",title:a.name,subtitle:`最新コミット ${a.commitHash.slice(0,7)} · ${q}`,children:[O.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[O.jsx(Ct,{variant:a.type==="local"?"local":"remote",children:iD[a.type]}),O.jsx(Ct,{variant:a.mergeStatus==="merged"?"success":a.mergeStatus==="unmerged"?"warning":"outline",children:nD[a.mergeStatus]}),O.jsx(Ct,{variant:a.worktreePath?"success":"outline",children:a.worktreePath?"Worktreeあり":"Worktree未作成"})]}),O.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[O.jsx(Pt,{variant:"ghost",size:"sm",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧"})}),N?O.jsx(Pt,{variant:"secondary",asChild:!0,children:O.jsx(jr,{to:"/config",children:"カスタムツール設定"})}):O.jsx(Pt,{onClick:
|
|
72
|
-
${r.details}`:""}`:r instanceof Error?r.message:n}function M_(r,n){return r==="custom"&&n?.target==="custom"?n.label:r==="codex-cli"?"Codex CLI":"Claude Code"}const oD=/^[A-Z0-9_]+$/;function aS(r){const n={id:r?.id??`env-${Date.now()}-${Math.random().toString(36).slice(2)}`,key:r?.key??"",value:r?.value??""};return typeof r?.importedFromOs=="boolean"&&(n.importedFromOs=r.importedFromOs),r?.lastUpdated&&(n.lastUpdated=r.lastUpdated),n}function lD(r){return r.key?!oD.test(r.key):!0}function L_({title:r,rows:n,onChange:a,description:l,allowAdd:d=!0,emptyLabel:y="環境変数はまだありません"}){const S=(u,C,v)=>{a(n.map(w=>w.id===u?{...w,[C]:C==="key"?v.toUpperCase().replace(/[^A-Z0-9_]/g,"_"):v}:w))},o=u=>{a(n.filter(C=>C.id!==u))},c=()=>{a([...n,aS()])};return O.jsxs("div",{className:"space-y-4",children:[O.jsxs("div",{className:"flex items-start justify-between gap-4",children:[O.jsxs("div",{children:[O.jsx("h3",{className:"font-semibold",children:r}),l&&O.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:l})]}),d&&O.jsx(Pt,{variant:"secondary",size:"sm",onClick:c,children:"変数を追加"})]}),n.length===0?O.jsx("p",{className:"py-4 text-center text-sm text-muted-foreground",children:y}):O.jsx("div",{className:"rounded-md border",children:O.jsxs(Zf,{children:[O.jsx(Jf,{children:O.jsxs(uo,{children:[O.jsx(ni,{children:"キー"}),O.jsx(ni,{children:"値"}),O.jsx(ni,{className:"w-24 text-right",children:"操作"})]})}),O.jsx(ed,{children:n.map(u=>{const C=lD(u);return O.jsxs(uo,{className:Ue(C&&"bg-destructive/10"),children:[O.jsxs(si,{className:"space-y-1",children:[O.jsx(co,{type:"text",value:u.key,onChange:v=>S(u.id,"key",v.target.value),placeholder:"EXAMPLE_KEY",className:Ue(C&&"border-destructive")}),O.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.importedFromOs&&O.jsx(Ct,{variant:"outline",className:"text-xs",children:"OSから取り込み"}),u.lastUpdated&&O.jsxs("span",{className:"text-xs text-muted-foreground",children:["更新: ",new Date(u.lastUpdated).toLocaleString()]})]}),C&&O.jsx("p",{className:"text-xs text-destructive",children:"A-Z,0-9,_ のみ使用できます"})]}),O.jsx(si,{children:O.jsx(co,{type:"text",value:u.value,onChange:v=>S(u.id,"value",v.target.value),placeholder:"値"})}),O.jsx(si,{className:"text-right",children:O.jsx(Pt,{variant:"ghost",size:"sm",onClick:()=>o(u.id),children:"削除"})})]},u.id)})})]})})]})}function k_(r){return r?r.map(n=>{const a={key:n.key,value:n.value};return typeof n.importedFromOs=="boolean"&&(a.importedFromOs=n.importedFromOs),n.lastUpdated&&(a.lastUpdated=n.lastUpdated),aS(a)}):[]}function fc(r){return r.filter(n=>n.key.trim().length>0).map(n=>({key:n.key.trim().toUpperCase(),value:n.value}))}function cD(r,n,a){const l=(r?.tools??[]).map(d=>({...d,env:fc(a[d.id]??[])}));return{version:r?.version??"1.0.0",env:fc(n),tools:l}}function uD(){const{data:r,isLoading:n,error:a}=Hy(),l=iR(),[d,y]=k.useState([]),[S,o]=k.useState({}),[c,u]=k.useState(null);k.useEffect(()=>{if(!r)return;y(k_(r.env));const b={};r.tools?.forEach(h=>{b[h.id]=k_(h.env)}),o(b)},[r]);const C=k.useMemo(()=>JSON.stringify(r?.env??[]),[r?.env]),v=k.useMemo(()=>JSON.stringify(fc(d)),[d]),w=k.useMemo(()=>{const b=d.some(p=>!p.key||/[^A-Z0-9_]/.test(p.key)),h=d.some(p=>p.key&&p.value.trim().length===0),m=Object.values(S).some(p=>p.some(g=>!g.key||/[^A-Z0-9_]/.test(g.key)||g.value.trim().length===0));return b||h||m},[d,S]),x=k.useMemo(()=>{if(C!==v)return!0;if(!r)return!1;const b=r.tools?.map(m=>fc(S[m.id]??[]))??[],h=r.tools?.map(m=>m.env??[])??[];return JSON.stringify(b)!==JSON.stringify(h)},[r,C,v,S]),R=async()=>{if(r)try{const b=cD(r,d,S);await l.mutateAsync(b),u({type:"success",message:"設定を保存しました"})}catch(b){u({type:"error",message:b instanceof Error?b.message:"保存に失敗しました"})}};return n?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"CONFIG",title:"環境変数の管理",subtitle:"読み込み中..."}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx("div",{className:"flex items-center justify-center py-20",children:O.jsx("p",{className:"text-muted-foreground",children:"設定を読み込んでいます..."})})})]}):a?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"CONFIG",title:"エラー"}),O.jsxs("main",{className:"mx-auto max-w-7xl px-6 py-8",children:[O.jsx(Ui,{variant:"destructive",children:O.jsx(Ii,{children:a instanceof Error?a.message:"未知のエラーです"})}),O.jsx("div",{className:"mt-4",children:O.jsx(Pt,{variant:"ghost",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧に戻る"})})})]})]}):O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"CONFIG",title:"環境変数の管理",subtitle:"共通環境変数とツールごとの上書きをブラウザから編集できます。",children:O.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[O.jsx(Pt,{variant:"ghost",size:"sm",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧へ"})}),O.jsx(Pt,{onClick:R,disabled:l.isPending||w||!x,children:l.isPending?"保存中...":"保存"})]})}),c&&O.jsx("div",{className:"mx-auto max-w-7xl px-6 pt-4",children:O.jsx(Ui,{variant:c.type==="error"?"destructive":"success",children:O.jsx(Ii,{children:c.message})})}),O.jsxs("main",{className:"mx-auto max-w-7xl space-y-6 px-6 py-8",children:[O.jsx(zt,{children:O.jsx(Vt,{className:"pt-6",children:O.jsx(L_,{title:"共通環境変数",description:"全てのAIツールで共有される値。PAT やプロキシ設定などはこちらに入力してください。",rows:d,onChange:y})})}),O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-3",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tool-specific"}),O.jsx("h3",{className:"mt-1 text-lg font-semibold",children:"ツール固有の環境変数"}),O.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"各ツール固有に上書きしたい値がある場合はこちらから設定します。 共通設定との競合がある場合はツール設定が優先されます。"})]}),O.jsxs(Vt,{className:"space-y-6",children:[r?.tools?.map(b=>O.jsx("div",{className:"rounded-lg border p-4",children:O.jsx(L_,{title:b.displayName,description:`${b.executionType} / ${b.command}`,rows:S[b.id]??[],onChange:h=>o(m=>({...m,[b.id]:h}))})},b.id)),!r?.tools?.length&&O.jsx("p",{className:"py-4 text-center text-sm text-muted-foreground",children:"登録されているツールがありません。"})]})]})]})]})}const hD=fx([{path:"/",element:O.jsx(
|
|
71
|
+
${Ce}`})}}catch(me){g({type:"error",message:$l(me,"Git同期に失敗しました")})}},oe=me=>{b(null),D(!1),g({type:me===0?"success":"error",message:`セッションがコード ${me} で終了しました。`})};return O.jsxs("div",{className:"min-h-screen bg-background",children:[A&&O.jsx("div",{className:"fixed inset-0 z-40 bg-black/80","aria-hidden":"true",onClick:()=>D(!1)}),O.jsxs(Gr,{eyebrow:"BRANCH DETAIL",title:a.name,subtitle:`最新コミット ${a.commitHash.slice(0,7)} · ${q}`,children:[O.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[O.jsx(Ct,{variant:a.type==="local"?"local":"remote",children:iD[a.type]}),O.jsx(Ct,{variant:a.mergeStatus==="merged"?"success":a.mergeStatus==="unmerged"?"warning":"outline",children:nD[a.mergeStatus]}),O.jsx(Ct,{variant:a.worktreePath?"success":"outline",children:a.worktreePath?"Worktreeあり":"Worktree未作成"})]}),O.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[O.jsx(Pt,{variant:"ghost",size:"sm",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧"})}),N?O.jsx(Pt,{variant:"secondary",asChild:!0,children:O.jsx(jr,{to:"/config",children:"カスタムツール設定"})}):O.jsx(Pt,{onClick:X,disabled:S.isPending,children:S.isPending?"作成中...":"Worktreeを作成"})]})]}),p&&O.jsx("div",{className:"mx-auto max-w-7xl px-6 pt-4",children:O.jsx(Ui,{variant:p.type==="error"?"destructive":p.type==="success"?"success":"info",children:O.jsx(Ii,{children:p.message})})}),O.jsx("main",{className:"mx-auto max-w-7xl space-y-6 px-6 py-8",children:O.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[O.jsxs("div",{className:"space-y-6",children:[O.jsx(WT,{branch:a,availableTools:K,selectedToolId:L,selectedMode:E,skipPermissions:W,extraArgsText:I,isConfigLoading:w,configError:x??null,isStartingSession:h,isSyncingBranch:de,needsRemoteSync:ie,hasBlockingDivergence:Q,onToolChange:T,onModeChange:B,onSkipPermissionsChange:F,onExtraArgsChange:V,onStartSession:P,onSyncBranch:ge}),O.jsx(cR,{sessions:j,isLoading:u,terminatingSessionId:ee,isDeleting:C.isPending,onTerminate:he,onSelectSession:b}),O.jsx($T,{branch:a,formattedCommitDate:q,latestToolUsage:U})]}),O.jsx("div",{className:"lg:sticky lg:top-6 lg:self-start",children:O.jsx(rD,{sessionId:R,isFullscreen:A,onToggleFullscreen:()=>D(me=>!me),onExit:oe,onError:me=>g({type:"error",message:me??"不明なエラー"})})})]})})]})}function aD(r){if(!r)return"日時不明";try{return new Intl.DateTimeFormat("ja-JP",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(r))}catch{return r}}function $l(r,n){return r instanceof gy?`${r.message}${r.details?`
|
|
72
|
+
${r.details}`:""}`:r instanceof Error?r.message:n}function M_(r,n){return r==="custom"&&n?.target==="custom"?n.label:r==="codex-cli"?"Codex CLI":"Claude Code"}const oD=/^[A-Z0-9_]+$/;function aS(r){const n={id:r?.id??`env-${Date.now()}-${Math.random().toString(36).slice(2)}`,key:r?.key??"",value:r?.value??""};return typeof r?.importedFromOs=="boolean"&&(n.importedFromOs=r.importedFromOs),r?.lastUpdated&&(n.lastUpdated=r.lastUpdated),n}function lD(r){return r.key?!oD.test(r.key):!0}function L_({title:r,rows:n,onChange:a,description:l,allowAdd:d=!0,emptyLabel:y="環境変数はまだありません"}){const S=(u,C,v)=>{a(n.map(w=>w.id===u?{...w,[C]:C==="key"?v.toUpperCase().replace(/[^A-Z0-9_]/g,"_"):v}:w))},o=u=>{a(n.filter(C=>C.id!==u))},c=()=>{a([...n,aS()])};return O.jsxs("div",{className:"space-y-4",children:[O.jsxs("div",{className:"flex items-start justify-between gap-4",children:[O.jsxs("div",{children:[O.jsx("h3",{className:"font-semibold",children:r}),l&&O.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:l})]}),d&&O.jsx(Pt,{variant:"secondary",size:"sm",onClick:c,children:"変数を追加"})]}),n.length===0?O.jsx("p",{className:"py-4 text-center text-sm text-muted-foreground",children:y}):O.jsx("div",{className:"rounded-md border",children:O.jsxs(Zf,{children:[O.jsx(Jf,{children:O.jsxs(uo,{children:[O.jsx(ni,{children:"キー"}),O.jsx(ni,{children:"値"}),O.jsx(ni,{className:"w-24 text-right",children:"操作"})]})}),O.jsx(ed,{children:n.map(u=>{const C=lD(u);return O.jsxs(uo,{className:Ue(C&&"bg-destructive/10"),children:[O.jsxs(si,{className:"space-y-1",children:[O.jsx(co,{type:"text",value:u.key,onChange:v=>S(u.id,"key",v.target.value),placeholder:"EXAMPLE_KEY",className:Ue(C&&"border-destructive")}),O.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.importedFromOs&&O.jsx(Ct,{variant:"outline",className:"text-xs",children:"OSから取り込み"}),u.lastUpdated&&O.jsxs("span",{className:"text-xs text-muted-foreground",children:["更新: ",new Date(u.lastUpdated).toLocaleString()]})]}),C&&O.jsx("p",{className:"text-xs text-destructive",children:"A-Z,0-9,_ のみ使用できます"})]}),O.jsx(si,{children:O.jsx(co,{type:"text",value:u.value,onChange:v=>S(u.id,"value",v.target.value),placeholder:"値"})}),O.jsx(si,{className:"text-right",children:O.jsx(Pt,{variant:"ghost",size:"sm",onClick:()=>o(u.id),children:"削除"})})]},u.id)})})]})})]})}function k_(r){return r?r.map(n=>{const a={key:n.key,value:n.value};return typeof n.importedFromOs=="boolean"&&(a.importedFromOs=n.importedFromOs),n.lastUpdated&&(a.lastUpdated=n.lastUpdated),aS(a)}):[]}function fc(r){return r.filter(n=>n.key.trim().length>0).map(n=>({key:n.key.trim().toUpperCase(),value:n.value}))}function cD(r,n,a){const l=(r?.tools??[]).map(d=>({...d,env:fc(a[d.id]??[])}));return{version:r?.version??"1.0.0",env:fc(n),tools:l}}function uD(){const{data:r,isLoading:n,error:a}=Hy(),l=iR(),[d,y]=k.useState([]),[S,o]=k.useState({}),[c,u]=k.useState(null);k.useEffect(()=>{if(!r)return;y(k_(r.env));const b={};r.tools?.forEach(h=>{b[h.id]=k_(h.env)}),o(b)},[r]);const C=k.useMemo(()=>JSON.stringify(r?.env??[]),[r?.env]),v=k.useMemo(()=>JSON.stringify(fc(d)),[d]),w=k.useMemo(()=>{const b=d.some(p=>!p.key||/[^A-Z0-9_]/.test(p.key)),h=d.some(p=>p.key&&p.value.trim().length===0),m=Object.values(S).some(p=>p.some(g=>!g.key||/[^A-Z0-9_]/.test(g.key)||g.value.trim().length===0));return b||h||m},[d,S]),x=k.useMemo(()=>{if(C!==v)return!0;if(!r)return!1;const b=r.tools?.map(m=>fc(S[m.id]??[]))??[],h=r.tools?.map(m=>m.env??[])??[];return JSON.stringify(b)!==JSON.stringify(h)},[r,C,v,S]),R=async()=>{if(r)try{const b=cD(r,d,S);await l.mutateAsync(b),u({type:"success",message:"設定を保存しました"})}catch(b){u({type:"error",message:b instanceof Error?b.message:"保存に失敗しました"})}};return n?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"CONFIG",title:"環境変数の管理",subtitle:"読み込み中..."}),O.jsx("main",{className:"mx-auto max-w-7xl px-6 py-8",children:O.jsx("div",{className:"flex items-center justify-center py-20",children:O.jsx("p",{className:"text-muted-foreground",children:"設定を読み込んでいます..."})})})]}):a?O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"CONFIG",title:"エラー"}),O.jsxs("main",{className:"mx-auto max-w-7xl px-6 py-8",children:[O.jsx(Ui,{variant:"destructive",children:O.jsx(Ii,{children:a instanceof Error?a.message:"未知のエラーです"})}),O.jsx("div",{className:"mt-4",children:O.jsx(Pt,{variant:"ghost",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧に戻る"})})})]})]}):O.jsxs("div",{className:"min-h-screen bg-background",children:[O.jsx(Gr,{eyebrow:"CONFIG",title:"環境変数の管理",subtitle:"共通環境変数とツールごとの上書きをブラウザから編集できます。",children:O.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[O.jsx(Pt,{variant:"ghost",size:"sm",asChild:!0,children:O.jsx(jr,{to:"/",children:"← ブランチ一覧へ"})}),O.jsx(Pt,{onClick:R,disabled:l.isPending||w||!x,children:l.isPending?"保存中...":"保存"})]})}),c&&O.jsx("div",{className:"mx-auto max-w-7xl px-6 pt-4",children:O.jsx(Ui,{variant:c.type==="error"?"destructive":"success",children:O.jsx(Ii,{children:c.message})})}),O.jsxs("main",{className:"mx-auto max-w-7xl space-y-6 px-6 py-8",children:[O.jsx(zt,{children:O.jsx(Vt,{className:"pt-6",children:O.jsx(L_,{title:"共通環境変数",description:"全てのAIツールで共有される値。PAT やプロキシ設定などはこちらに入力してください。",rows:d,onChange:y})})}),O.jsxs(zt,{children:[O.jsxs(br,{className:"pb-3",children:[O.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tool-specific"}),O.jsx("h3",{className:"mt-1 text-lg font-semibold",children:"ツール固有の環境変数"}),O.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"各ツール固有に上書きしたい値がある場合はこちらから設定します。 共通設定との競合がある場合はツール設定が優先されます。"})]}),O.jsxs(Vt,{className:"space-y-6",children:[r?.tools?.map(b=>O.jsx("div",{className:"rounded-lg border p-4",children:O.jsx(L_,{title:b.displayName,description:`${b.executionType} / ${b.command}`,rows:S[b.id]??[],onChange:h=>o(m=>({...m,[b.id]:h}))})},b.id)),!r?.tools?.length&&O.jsx("p",{className:"py-4 text-center text-sm text-muted-foreground",children:"登録されているツールがありません。"})]})]})]})]})}const hD=fx([{path:"/",element:O.jsx(QE,{})},{path:"/:branchName",element:O.jsx(sD,{})},{path:"/config",element:O.jsx(uD,{})}]),fD=new GC({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:3e4}}}),oS=document.getElementById("root");if(!oS)throw new Error("Root element not found");xC.createRoot(oS).render(O.jsx(Pi.StrictMode,{children:O.jsx($C,{client:fD,children:O.jsx(Ex,{router:hD})})}));
|