@launchsecure/launch-kit 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart-client/assets/index--120d9P9.css +1 -0
- package/dist/chart-client/assets/index-D7x8nz-H.js +441 -0
- package/dist/chart-client/index.html +2 -2
- package/dist/client/assets/index-Bf8zdL3x.css +32 -0
- package/dist/client/assets/index-Ds9UP_cj.js +291 -0
- package/dist/client/index.html +2 -2
- package/dist/council-client/assets/index-CofZh7pS.css +1 -0
- package/dist/council-client/assets/index-Dc41S-R2.js +198 -0
- package/dist/council-client/index.html +21 -0
- package/dist/deck-client/assets/_baseUniq-2gclQXo7.js +1 -0
- package/dist/deck-client/assets/arc-DcMY5Wm0.js +1 -0
- package/dist/deck-client/assets/architectureDiagram-Q4EWVU46-B8iirmmJ.js +36 -0
- package/dist/deck-client/assets/blockDiagram-DXYQGD6D-B4JBLjmJ.js +132 -0
- package/dist/deck-client/assets/c4Diagram-AHTNJAMY-CojrJAk8.js +10 -0
- package/dist/deck-client/assets/channel-ERh5jKXV.js +1 -0
- package/dist/deck-client/assets/chunk-4BX2VUAB-Bmb_BMDo.js +1 -0
- package/dist/deck-client/assets/chunk-4TB4RGXK-CumBy8qe.js +206 -0
- package/dist/deck-client/assets/chunk-55IACEB6-Ka8Hb1wD.js +1 -0
- package/dist/deck-client/assets/chunk-EDXVE4YY-B3sIPiQo.js +1 -0
- package/dist/deck-client/assets/chunk-FMBD7UC4-C1tYkaqu.js +15 -0
- package/dist/deck-client/assets/chunk-OYMX7WX6-D7Wacbky.js +231 -0
- package/dist/deck-client/assets/chunk-QZHKN3VN-ChXI0vO3.js +1 -0
- package/dist/deck-client/assets/chunk-YZCP3GAM-BXhiqf8u.js +1 -0
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-CMi1Gaev.js +1 -0
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-CMi1Gaev.js +1 -0
- package/dist/deck-client/assets/clone-DfWhlD4X.js +1 -0
- package/dist/deck-client/assets/cose-bilkent-S5V4N54A-Bqp3p68D.js +1 -0
- package/dist/deck-client/assets/cytoscape.esm-BQk4lpUV.js +331 -0
- package/dist/deck-client/assets/dagre-KV5264BT-BS-rtyhZ.js +4 -0
- package/dist/deck-client/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/deck-client/assets/diagram-5BDNPKRD-BIrj9YGI.js +10 -0
- package/dist/deck-client/assets/diagram-G4DWMVQ6-noHWPIg4.js +24 -0
- package/dist/deck-client/assets/diagram-MMDJMWI5-C2qHxvqV.js +43 -0
- package/dist/deck-client/assets/diagram-TYMM5635-BytnGQr-.js +24 -0
- package/dist/deck-client/assets/erDiagram-SMLLAGMA-BfK5m2YQ.js +85 -0
- package/dist/deck-client/assets/flowDiagram-DWJPFMVM-Cq925G1Z.js +162 -0
- package/dist/deck-client/assets/ganttDiagram-T4ZO3ILL-DhhHPAmj.js +292 -0
- package/dist/deck-client/assets/gitGraphDiagram-UUTBAWPF-B3Lc0h9q.js +106 -0
- package/dist/deck-client/assets/graph-RTawgVWm.js +1 -0
- package/dist/deck-client/assets/index-765AIQ9z.css +1 -0
- package/dist/deck-client/assets/index-BfIfJXmS.js +476 -0
- package/dist/deck-client/assets/infoDiagram-42DDH7IO-BlR584kX.js +2 -0
- package/dist/deck-client/assets/init-Gi6I4Gst.js +1 -0
- package/dist/deck-client/assets/ishikawaDiagram-UXIWVN3A-DygKoNGY.js +70 -0
- package/dist/deck-client/assets/journeyDiagram-VCZTEJTY-BnaiYp9N.js +139 -0
- package/dist/deck-client/assets/kanban-definition-6JOO6SKY-BQBUBzJC.js +89 -0
- package/dist/deck-client/assets/katex-DkKDou_j.js +257 -0
- package/dist/deck-client/assets/layout-DeZ8HI1T.js +1 -0
- package/dist/deck-client/assets/linear-C6roLi_9.js +1 -0
- package/dist/deck-client/assets/min-CbUksbuI.js +1 -0
- package/dist/deck-client/assets/mindmap-definition-QFDTVHPH-iNxV62yN.js +96 -0
- package/dist/deck-client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/deck-client/assets/pieDiagram-DEJITSTG-DHVA0jaG.js +30 -0
- package/dist/deck-client/assets/quadrantDiagram-34T5L4WZ-DBeKKLUQ.js +7 -0
- package/dist/deck-client/assets/requirementDiagram-MS252O5E-CBwITx7p.js +84 -0
- package/dist/deck-client/assets/sankeyDiagram-XADWPNL6-BtE-1YTU.js +10 -0
- package/dist/deck-client/assets/sequenceDiagram-FGHM5R23-DN96yPP2.js +157 -0
- package/dist/deck-client/assets/stateDiagram-FHFEXIEX-VUkKC2uJ.js +1 -0
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CA0IjulK.js +1 -0
- package/dist/deck-client/assets/timeline-definition-GMOUNBTQ-oUeZhRns.js +120 -0
- package/dist/deck-client/assets/vennDiagram-DHZGUBPP-D87fK90n.js +34 -0
- package/dist/deck-client/assets/wardley-RL74JXVD-DYbYcpDp.js +162 -0
- package/dist/deck-client/assets/wardleyDiagram-NUSXRM2D-Ca_i0QRA.js +20 -0
- package/dist/deck-client/assets/xychartDiagram-5P7HB3ND-CUOJVIvq.js +7 -0
- package/dist/deck-client/index.html +21 -0
- package/dist/server/chart-serve.js +258 -273
- package/dist/server/cli.js +305 -713
- package/dist/server/council-entry.js +1418 -0
- package/dist/server/council-serve.js +1039 -0
- package/dist/server/deck-mcp-entry.js +1789 -0
- package/dist/server/deck-serve.js +1275 -0
- package/dist/server/deck-server/deck-mcp-entry.js +1789 -0
- package/dist/server/deck-server/deck-serve.js +1275 -0
- package/dist/server/fb-wizard.js +0 -0
- package/dist/server/graph-mcp-entry.js +268 -701
- package/dist/server/server/chart-serve.js +4643 -0
- package/dist/server/server/cli.js +13360 -0
- package/dist/server/server/fb-wizard.js +136 -0
- package/dist/server/server/graph-mcp-entry.js +6776 -0
- package/package.json +25 -18
- package/dist/chart-client/assets/index-BpQPtTuo.js +0 -441
- package/dist/chart-client/assets/index-CbZ13AXL.css +0 -1
- package/dist/client/assets/index-3ENenBk-.js +0 -291
- package/dist/client/assets/index-BCYw64M7.css +0 -32
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
function Gy(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function Uf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vf={exports:{}},Xo={},Kf={exports:{}},le={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var ni=Symbol.for("react.element"),qy=Symbol.for("react.portal"),Xy=Symbol.for("react.fragment"),Yy=Symbol.for("react.strict_mode"),Qy=Symbol.for("react.profiler"),Jy=Symbol.for("react.provider"),Zy=Symbol.for("react.context"),eS=Symbol.for("react.forward_ref"),tS=Symbol.for("react.suspense"),rS=Symbol.for("react.memo"),nS=Symbol.for("react.lazy"),Td=Symbol.iterator;function sS(e){return e===null||typeof e!="object"?null:(e=Td&&e[Td]||e["@@iterator"],typeof e=="function"?e:null)}var Gf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qf=Object.assign,Xf={};function Xn(e,t,r){this.props=e,this.context=t,this.refs=Xf,this.updater=r||Gf}Xn.prototype.isReactComponent={};Xn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Xn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Yf(){}Yf.prototype=Xn.prototype;function zc(e,t,r){this.props=e,this.context=t,this.refs=Xf,this.updater=r||Gf}var Wc=zc.prototype=new Yf;Wc.constructor=zc;qf(Wc,Xn.prototype);Wc.isPureReactComponent=!0;var Ld=Array.isArray,Qf=Object.prototype.hasOwnProperty,Uc={current:null},Jf={key:!0,ref:!0,__self:!0,__source:!0};function Zf(e,t,r){var n,s={},o=null,c=null;if(t!=null)for(n in t.ref!==void 0&&(c=t.ref),t.key!==void 0&&(o=""+t.key),t)Qf.call(t,n)&&!Jf.hasOwnProperty(n)&&(s[n]=t[n]);var i=arguments.length-2;if(i===1)s.children=r;else if(1<i){for(var a=Array(i),d=0;d<i;d++)a[d]=arguments[d+2];s.children=a}if(e&&e.defaultProps)for(n in i=e.defaultProps,i)s[n]===void 0&&(s[n]=i[n]);return{$$typeof:ni,type:e,key:o,ref:c,props:s,_owner:Uc.current}}function iS(e,t){return{$$typeof:ni,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Vc(e){return typeof e=="object"&&e!==null&&e.$$typeof===ni}function oS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Ad=/\/+/g;function Fa(e,t){return typeof e=="object"&&e!==null&&e.key!=null?oS(""+e.key):t.toString(36)}function Qi(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var c=!1;if(e===null)c=!0;else switch(o){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case ni:case qy:c=!0}}if(c)return c=e,s=s(c),e=n===""?"."+Fa(c,0):n,Ld(s)?(r="",e!=null&&(r=e.replace(Ad,"$&/")+"/"),Qi(s,t,r,"",function(d){return d})):s!=null&&(Vc(s)&&(s=iS(s,r+(!s.key||c&&c.key===s.key?"":(""+s.key).replace(Ad,"$&/")+"/")+e)),t.push(s)),1;if(c=0,n=n===""?".":n+":",Ld(e))for(var i=0;i<e.length;i++){o=e[i];var a=n+Fa(o,i);c+=Qi(o,t,r,a,s)}else if(a=sS(e),typeof a=="function")for(e=a.call(e),i=0;!(o=e.next()).done;)o=o.value,a=n+Fa(o,i++),c+=Qi(o,t,r,a,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function bi(e,t,r){if(e==null)return e;var n=[],s=0;return Qi(e,n,"","",function(o){return t.call(r,o,s++)}),n}function aS(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ze={current:null},Ji={transition:null},lS={ReactCurrentDispatcher:ze,ReactCurrentBatchConfig:Ji,ReactCurrentOwner:Uc};function ep(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:bi,forEach:function(e,t,r){bi(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return bi(e,function(){t++}),t},toArray:function(e){return bi(e,function(t){return t})||[]},only:function(e){if(!Vc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Component=Xn;le.Fragment=Xy;le.Profiler=Qy;le.PureComponent=zc;le.StrictMode=Yy;le.Suspense=tS;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lS;le.act=ep;le.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=qf({},e.props),s=e.key,o=e.ref,c=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,c=Uc.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(a in t)Qf.call(t,a)&&!Jf.hasOwnProperty(a)&&(n[a]=t[a]===void 0&&i!==void 0?i[a]:t[a])}var a=arguments.length-2;if(a===1)n.children=r;else if(1<a){i=Array(a);for(var d=0;d<a;d++)i[d]=arguments[d+2];n.children=i}return{$$typeof:ni,type:e.type,key:s,ref:o,props:n,_owner:c}};le.createContext=function(e){return e={$$typeof:Zy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Jy,_context:e},e.Consumer=e};le.createElement=Zf;le.createFactory=function(e){var t=Zf.bind(null,e);return t.type=e,t};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:eS,render:e}};le.isValidElement=Vc;le.lazy=function(e){return{$$typeof:nS,_payload:{_status:-1,_result:e},_init:aS}};le.memo=function(e,t){return{$$typeof:rS,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=Ji.transition;Ji.transition={};try{e()}finally{Ji.transition=t}};le.unstable_act=ep;le.useCallback=function(e,t){return ze.current.useCallback(e,t)};le.useContext=function(e){return ze.current.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e){return ze.current.useDeferredValue(e)};le.useEffect=function(e,t){return ze.current.useEffect(e,t)};le.useId=function(){return ze.current.useId()};le.useImperativeHandle=function(e,t,r){return ze.current.useImperativeHandle(e,t,r)};le.useInsertionEffect=function(e,t){return ze.current.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return ze.current.useLayoutEffect(e,t)};le.useMemo=function(e,t){return ze.current.useMemo(e,t)};le.useReducer=function(e,t,r){return ze.current.useReducer(e,t,r)};le.useRef=function(e){return ze.current.useRef(e)};le.useState=function(e){return ze.current.useState(e)};le.useSyncExternalStore=function(e,t,r){return ze.current.useSyncExternalStore(e,t,r)};le.useTransition=function(){return ze.current.useTransition()};le.version="18.3.1";Kf.exports=le;var b=Kf.exports;const Ve=Uf(b),Yo=Gy({__proto__:null,default:Ve},[b]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var cS=b,uS=Symbol.for("react.element"),dS=Symbol.for("react.fragment"),hS=Object.prototype.hasOwnProperty,fS=cS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pS={key:!0,ref:!0,__self:!0,__source:!0};function tp(e,t,r){var n,s={},o=null,c=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(c=t.ref);for(n in t)hS.call(t,n)&&!pS.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:uS,type:e,key:o,ref:c,props:s,_owner:fS.current}}Xo.Fragment=dS;Xo.jsx=tp;Xo.jsxs=tp;Vf.exports=Xo;var x=Vf.exports,Tl={},rp={exports:{}},at={},np={exports:{}},sp={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(B,R){var L=B.length;B.push(R);e:for(;0<L;){var I=L-1>>>1,D=B[I];if(0<s(D,R))B[I]=R,B[L]=D,L=I;else break e}}function r(B){return B.length===0?null:B[0]}function n(B){if(B.length===0)return null;var R=B[0],L=B.pop();if(L!==R){B[0]=L;e:for(var I=0,D=B.length,W=D>>>1;I<W;){var H=2*(I+1)-1,U=B[H],G=H+1,O=B[G];if(0>s(U,L))G<D&&0>s(O,U)?(B[I]=O,B[G]=L,I=G):(B[I]=U,B[H]=L,I=H);else if(G<D&&0>s(O,L))B[I]=O,B[G]=L,I=G;else break e}}return R}function s(B,R){var L=B.sortIndex-R.sortIndex;return L!==0?L:B.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,i=c.now();e.unstable_now=function(){return c.now()-i}}var a=[],d=[],m=1,u=null,v=3,y=!1,S=!1,g=!1,p=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(B){for(var R=r(d);R!==null;){if(R.callback===null)n(d);else if(R.startTime<=B)n(d),R.sortIndex=R.expirationTime,t(a,R);else break;R=r(d)}}function _(B){if(g=!1,f(B),!S)if(r(a)!==null)S=!0,K(E);else{var R=r(d);R!==null&&q(_,R.startTime-B)}}function E(B,R){S=!1,g&&(g=!1,h(w),w=-1),y=!0;var L=v;try{for(f(R),u=r(a);u!==null&&(!(u.expirationTime>R)||B&&!M());){var I=u.callback;if(typeof I=="function"){u.callback=null,v=u.priorityLevel;var D=I(u.expirationTime<=R);R=e.unstable_now(),typeof D=="function"?u.callback=D:u===r(a)&&n(a),f(R)}else n(a);u=r(a)}if(u!==null)var W=!0;else{var H=r(d);H!==null&&q(_,H.startTime-R),W=!1}return W}finally{u=null,v=L,y=!1}}var k=!1,C=null,w=-1,P=5,T=-1;function M(){return!(e.unstable_now()-T<P)}function j(){if(C!==null){var B=e.unstable_now();T=B;var R=!0;try{R=C(!0,B)}finally{R?N():(k=!1,C=null)}}else k=!1}var N;if(typeof l=="function")N=function(){l(j)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,V=F.port2;F.port1.onmessage=j,N=function(){V.postMessage(null)}}else N=function(){p(j,0)};function K(B){C=B,k||(k=!0,N())}function q(B,R){w=p(function(){B(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){S||y||(S=!0,K(E))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(a)},e.unstable_next=function(B){switch(v){case 1:case 2:case 3:var R=3;break;default:R=v}var L=v;v=R;try{return B()}finally{v=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,R){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var L=v;v=B;try{return R()}finally{v=L}},e.unstable_scheduleCallback=function(B,R,L){var I=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?I+L:I):L=I,B){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=L+D,B={id:m++,callback:R,priorityLevel:B,startTime:L,expirationTime:D,sortIndex:-1},L>I?(B.sortIndex=L,t(d,B),r(a)===null&&B===r(d)&&(g?(h(w),w=-1):g=!0,q(_,L-I))):(B.sortIndex=D,t(a,B),S||y||(S=!0,K(E))),B},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(B){var R=v;return function(){var L=v;v=R;try{return B.apply(this,arguments)}finally{v=L}}}})(sp);np.exports=sp;var mS=np.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var vS=b,ot=mS;function Q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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."}var ip=new Set,Is={};function on(e,t){Bn(e,t),Bn(e+"Capture",t)}function Bn(e,t){for(Is[e]=t,e=0;e<t.length;e++)ip.add(t[e])}var qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ll=Object.prototype.hasOwnProperty,gS=/^[: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]*$/,Dd={},Md={};function _S(e){return Ll.call(Md,e)?!0:Ll.call(Dd,e)?!1:gS.test(e)?Md[e]=!0:(Dd[e]=!0,!1)}function yS(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function SS(e,t,r,n){if(t===null||typeof t>"u"||yS(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function We(e,t,r,n,s,o,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=c}var Ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ie[e]=new We(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ie[t]=new We(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ie[e]=new We(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ie[e]=new We(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ie[e]=new We(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ie[e]=new We(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ie[e]=new We(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ie[e]=new We(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ie[e]=new We(e,5,!1,e.toLowerCase(),null,!1,!1)});var Kc=/[\-:]([a-z])/g;function Gc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Kc,Gc);Ie[t]=new We(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Kc,Gc);Ie[t]=new We(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Kc,Gc);Ie[t]=new We(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ie[e]=new We(e,1,!1,e.toLowerCase(),null,!1,!1)});Ie.xlinkHref=new We("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ie[e]=new We(e,1,!1,e.toLowerCase(),null,!0,!0)});function qc(e,t,r,n){var s=Ie.hasOwnProperty(t)?Ie[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(SS(t,r,s,n)&&(r=null),n||s===null?_S(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var er=vS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ci=Symbol.for("react.element"),_n=Symbol.for("react.portal"),yn=Symbol.for("react.fragment"),Xc=Symbol.for("react.strict_mode"),Al=Symbol.for("react.profiler"),op=Symbol.for("react.provider"),ap=Symbol.for("react.context"),Yc=Symbol.for("react.forward_ref"),Dl=Symbol.for("react.suspense"),Ml=Symbol.for("react.suspense_list"),Qc=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),lp=Symbol.for("react.offscreen"),Nd=Symbol.iterator;function ls(e){return e===null||typeof e!="object"?null:(e=Nd&&e[Nd]||e["@@iterator"],typeof e=="function"?e:null)}var Se=Object.assign,Ha;function ys(e){if(Ha===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Ha=t&&t[1]||""}return`
|
|
34
|
+
`+Ha+e}var $a=!1;function za(e,t){if(!e||$a)return"";$a=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var n=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){n=d}e.call(t.prototype)}else{try{throw Error()}catch(d){n=d}e()}}catch(d){if(d&&n&&typeof d.stack=="string"){for(var s=d.stack.split(`
|
|
35
|
+
`),o=n.stack.split(`
|
|
36
|
+
`),c=s.length-1,i=o.length-1;1<=c&&0<=i&&s[c]!==o[i];)i--;for(;1<=c&&0<=i;c--,i--)if(s[c]!==o[i]){if(c!==1||i!==1)do if(c--,i--,0>i||s[c]!==o[i]){var a=`
|
|
37
|
+
`+s[c].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=c&&0<=i);break}}}finally{$a=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ys(e):""}function wS(e){switch(e.tag){case 5:return ys(e.type);case 16:return ys("Lazy");case 13:return ys("Suspense");case 19:return ys("SuspenseList");case 0:case 2:case 15:return e=za(e.type,!1),e;case 11:return e=za(e.type.render,!1),e;case 1:return e=za(e.type,!0),e;default:return""}}function Nl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yn:return"Fragment";case _n:return"Portal";case Al:return"Profiler";case Xc:return"StrictMode";case Dl:return"Suspense";case Ml:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ap:return(e.displayName||"Context")+".Consumer";case op:return(e._context.displayName||"Context")+".Provider";case Yc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qc:return t=e.displayName||null,t!==null?t:Nl(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Nl(e(t))}catch{}}return null}function xS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Nl(t);case 8:return t===Xc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Er(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bS(e){var t=cp(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(c){n=""+c,o.call(this,c)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ei(e){e._valueTracker||(e._valueTracker=bS(e))}function up(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=cp(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function fo(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}}function Il(e,t){var r=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Id(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Er(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dp(e,t){t=t.checked,t!=null&&qc(e,"checked",t,!1)}function Ol(e,t){dp(e,t);var r=Er(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jl(e,t.type,r):t.hasOwnProperty("defaultValue")&&jl(e,t.type,Er(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Od(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function jl(e,t,r){(t!=="number"||fo(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ss=Array.isArray;function Ln(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Er(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Bl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function jd(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Q(92));if(Ss(r)){if(1<r.length)throw Error(Q(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Er(r)}}function hp(e,t){var r=Er(t.value),n=Er(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Bd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function fp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?fp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ki,pp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ki=ki||document.createElement("div"),ki.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ki.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Os(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Es={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CS=["Webkit","ms","Moz","O"];Object.keys(Es).forEach(function(e){CS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Es[t]=Es[e]})});function mp(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Es.hasOwnProperty(e)&&Es[e]?(""+t).trim():t+"px"}function vp(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=mp(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var ES=Se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hl(e,t){if(t){if(ES[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function $l(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 zl=null;function Jc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wl=null,An=null,Dn=null;function Fd(e){if(e=oi(e)){if(typeof Wl!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=ta(t),Wl(e.stateNode,e.type,t))}}function gp(e){An?Dn?Dn.push(e):Dn=[e]:An=e}function _p(){if(An){var e=An,t=Dn;if(Dn=An=null,Fd(e),t)for(e=0;e<t.length;e++)Fd(t[e])}}function yp(e,t){return e(t)}function Sp(){}var Wa=!1;function wp(e,t,r){if(Wa)return e(t,r);Wa=!0;try{return yp(e,t,r)}finally{Wa=!1,(An!==null||Dn!==null)&&(Sp(),_p())}}function js(e,t){var r=e.stateNode;if(r===null)return null;var n=ta(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Q(231,t,typeof r));return r}var Ul=!1;if(qt)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){Ul=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{Ul=!1}function kS(e,t,r,n,s,o,c,i,a){var d=Array.prototype.slice.call(arguments,3);try{t.apply(r,d)}catch(m){this.onError(m)}}var ks=!1,po=null,mo=!1,Vl=null,RS={onError:function(e){ks=!0,po=e}};function PS(e,t,r,n,s,o,c,i,a){ks=!1,po=null,kS.apply(RS,arguments)}function TS(e,t,r,n,s,o,c,i,a){if(PS.apply(this,arguments),ks){if(ks){var d=po;ks=!1,po=null}else throw Error(Q(198));mo||(mo=!0,Vl=d)}}function an(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function xp(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 Hd(e){if(an(e)!==e)throw Error(Q(188))}function LS(e){var t=e.alternate;if(!t){if(t=an(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return Hd(s),e;if(o===n)return Hd(s),t;o=o.sibling}throw Error(Q(188))}if(r.return!==n.return)r=s,n=o;else{for(var c=!1,i=s.child;i;){if(i===r){c=!0,r=s,n=o;break}if(i===n){c=!0,n=s,r=o;break}i=i.sibling}if(!c){for(i=o.child;i;){if(i===r){c=!0,r=o,n=s;break}if(i===n){c=!0,n=o,r=s;break}i=i.sibling}if(!c)throw Error(Q(189))}}if(r.alternate!==n)throw Error(Q(190))}if(r.tag!==3)throw Error(Q(188));return r.stateNode.current===r?e:t}function bp(e){return e=LS(e),e!==null?Cp(e):null}function Cp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Cp(e);if(t!==null)return t;e=e.sibling}return null}var Ep=ot.unstable_scheduleCallback,$d=ot.unstable_cancelCallback,AS=ot.unstable_shouldYield,DS=ot.unstable_requestPaint,xe=ot.unstable_now,MS=ot.unstable_getCurrentPriorityLevel,Zc=ot.unstable_ImmediatePriority,kp=ot.unstable_UserBlockingPriority,vo=ot.unstable_NormalPriority,NS=ot.unstable_LowPriority,Rp=ot.unstable_IdlePriority,Qo=null,Ot=null;function IS(e){if(Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Qo,e,void 0,(e.current.flags&128)===128)}catch{}}var Ct=Math.clz32?Math.clz32:BS,OS=Math.log,jS=Math.LN2;function BS(e){return e>>>=0,e===0?32:31-(OS(e)/jS|0)|0}var Ri=64,Pi=4194304;function ws(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function go(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,c=r&268435455;if(c!==0){var i=c&~s;i!==0?n=ws(i):(o&=c,o!==0&&(n=ws(o)))}else c=r&~s,c!==0?n=ws(c):o!==0&&(n=ws(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Ct(t),s=1<<r,n|=e[r],t&=~s;return n}function FS(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function HS(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var c=31-Ct(o),i=1<<c,a=s[c];a===-1?(!(i&r)||i&n)&&(s[c]=FS(i,t)):a<=t&&(e.expiredLanes|=i),o&=~i}}function Kl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Pp(){var e=Ri;return Ri<<=1,!(Ri&4194240)&&(Ri=64),e}function Ua(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function si(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ct(t),e[t]=r}function $S(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Ct(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function eu(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ct(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var de=0;function Tp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Lp,tu,Ap,Dp,Mp,Gl=!1,Ti=[],vr=null,gr=null,_r=null,Bs=new Map,Fs=new Map,dr=[],zS="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 submit".split(" ");function zd(e,t){switch(e){case"focusin":case"focusout":vr=null;break;case"dragenter":case"dragleave":gr=null;break;case"mouseover":case"mouseout":_r=null;break;case"pointerover":case"pointerout":Bs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fs.delete(t.pointerId)}}function us(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=oi(t),t!==null&&tu(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function WS(e,t,r,n,s){switch(t){case"focusin":return vr=us(vr,e,t,r,n,s),!0;case"dragenter":return gr=us(gr,e,t,r,n,s),!0;case"mouseover":return _r=us(_r,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return Bs.set(o,us(Bs.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Fs.set(o,us(Fs.get(o)||null,e,t,r,n,s)),!0}return!1}function Np(e){var t=Wr(e.target);if(t!==null){var r=an(t);if(r!==null){if(t=r.tag,t===13){if(t=xp(r),t!==null){e.blockedOn=t,Mp(e.priority,function(){Ap(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=ql(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);zl=n,r.target.dispatchEvent(n),zl=null}else return t=oi(r),t!==null&&tu(t),e.blockedOn=r,!1;t.shift()}return!0}function Wd(e,t,r){Zi(e)&&r.delete(t)}function US(){Gl=!1,vr!==null&&Zi(vr)&&(vr=null),gr!==null&&Zi(gr)&&(gr=null),_r!==null&&Zi(_r)&&(_r=null),Bs.forEach(Wd),Fs.forEach(Wd)}function ds(e,t){e.blockedOn===t&&(e.blockedOn=null,Gl||(Gl=!0,ot.unstable_scheduleCallback(ot.unstable_NormalPriority,US)))}function Hs(e){function t(s){return ds(s,e)}if(0<Ti.length){ds(Ti[0],e);for(var r=1;r<Ti.length;r++){var n=Ti[r];n.blockedOn===e&&(n.blockedOn=null)}}for(vr!==null&&ds(vr,e),gr!==null&&ds(gr,e),_r!==null&&ds(_r,e),Bs.forEach(t),Fs.forEach(t),r=0;r<dr.length;r++)n=dr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<dr.length&&(r=dr[0],r.blockedOn===null);)Np(r),r.blockedOn===null&&dr.shift()}var Mn=er.ReactCurrentBatchConfig,_o=!0;function VS(e,t,r,n){var s=de,o=Mn.transition;Mn.transition=null;try{de=1,ru(e,t,r,n)}finally{de=s,Mn.transition=o}}function KS(e,t,r,n){var s=de,o=Mn.transition;Mn.transition=null;try{de=4,ru(e,t,r,n)}finally{de=s,Mn.transition=o}}function ru(e,t,r,n){if(_o){var s=ql(e,t,r,n);if(s===null)el(e,t,n,yo,r),zd(e,n);else if(WS(s,e,t,r,n))n.stopPropagation();else if(zd(e,n),t&4&&-1<zS.indexOf(e)){for(;s!==null;){var o=oi(s);if(o!==null&&Lp(o),o=ql(e,t,r,n),o===null&&el(e,t,n,yo,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else el(e,t,n,null,r)}}var yo=null;function ql(e,t,r,n){if(yo=null,e=Jc(n),e=Wr(e),e!==null)if(t=an(e),t===null)e=null;else if(r=t.tag,r===13){if(e=xp(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return yo=e,null}function Ip(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(MS()){case Zc:return 1;case kp:return 4;case vo:case NS:return 16;case Rp:return 536870912;default:return 16}default:return 16}}var fr=null,nu=null,eo=null;function Op(){if(eo)return eo;var e,t=nu,r=t.length,n,s="value"in fr?fr.value:fr.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var c=r-e;for(n=1;n<=c&&t[r-n]===s[o-n];n++);return eo=s.slice(e,1<n?1-n: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 Li(){return!0}function Ud(){return!1}function lt(e){function t(r,n,s,o,c){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=c,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(r=e[i],this[i]=r?r(o):o[i]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Li:Ud,this.isPropagationStopped=Ud,this}return Se(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Li)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Li)},persist:function(){},isPersistent:Li}),t}var Yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},su=lt(Yn),ii=Se({},Yn,{view:0,detail:0}),GS=lt(ii),Va,Ka,hs,Jo=Se({},ii,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iu,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!==hs&&(hs&&e.type==="mousemove"?(Va=e.screenX-hs.screenX,Ka=e.screenY-hs.screenY):Ka=Va=0,hs=e),Va)},movementY:function(e){return"movementY"in e?e.movementY:Ka}}),Vd=lt(Jo),qS=Se({},Jo,{dataTransfer:0}),XS=lt(qS),YS=Se({},ii,{relatedTarget:0}),Ga=lt(YS),QS=Se({},Yn,{animationName:0,elapsedTime:0,pseudoElement:0}),JS=lt(QS),ZS=Se({},Yn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ew=lt(ZS),tw=Se({},Yn,{data:0}),Kd=lt(tw),rw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nw={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"},sw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sw[e])?!!t[e]:!1}function iu(){return iw}var ow=Se({},ii,{key:function(e){if(e.key){var t=rw[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"?nw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iu,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}}),aw=lt(ow),lw=Se({},Jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gd=lt(lw),cw=Se({},ii,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iu}),uw=lt(cw),dw=Se({},Yn,{propertyName:0,elapsedTime:0,pseudoElement:0}),hw=lt(dw),fw=Se({},Jo,{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}),pw=lt(fw),mw=[9,13,27,32],ou=qt&&"CompositionEvent"in window,Rs=null;qt&&"documentMode"in document&&(Rs=document.documentMode);var vw=qt&&"TextEvent"in window&&!Rs,jp=qt&&(!ou||Rs&&8<Rs&&11>=Rs),qd=" ",Xd=!1;function Bp(e,t){switch(e){case"keyup":return mw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sn=!1;function gw(e,t){switch(e){case"compositionend":return Fp(t);case"keypress":return t.which!==32?null:(Xd=!0,qd);case"textInput":return e=t.data,e===qd&&Xd?null:e;default:return null}}function _w(e,t){if(Sn)return e==="compositionend"||!ou&&Bp(e,t)?(e=Op(),eo=nu=fr=null,Sn=!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 jp&&t.locale!=="ko"?null:t.data;default:return null}}var yw={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 Yd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yw[e.type]:t==="textarea"}function Hp(e,t,r,n){gp(n),t=So(t,"onChange"),0<t.length&&(r=new su("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ps=null,$s=null;function Sw(e){Qp(e,0)}function Zo(e){var t=bn(e);if(up(t))return e}function ww(e,t){if(e==="change")return t}var $p=!1;if(qt){var qa;if(qt){var Xa="oninput"in document;if(!Xa){var Qd=document.createElement("div");Qd.setAttribute("oninput","return;"),Xa=typeof Qd.oninput=="function"}qa=Xa}else qa=!1;$p=qa&&(!document.documentMode||9<document.documentMode)}function Jd(){Ps&&(Ps.detachEvent("onpropertychange",zp),$s=Ps=null)}function zp(e){if(e.propertyName==="value"&&Zo($s)){var t=[];Hp(t,$s,e,Jc(e)),wp(Sw,t)}}function xw(e,t,r){e==="focusin"?(Jd(),Ps=t,$s=r,Ps.attachEvent("onpropertychange",zp)):e==="focusout"&&Jd()}function bw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zo($s)}function Cw(e,t){if(e==="click")return Zo(t)}function Ew(e,t){if(e==="input"||e==="change")return Zo(t)}function kw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:kw;function zs(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Ll.call(t,s)||!kt(e[s],t[s]))return!1}return!0}function Zd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eh(e,t){var r=Zd(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Zd(r)}}function Wp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Up(){for(var e=window,t=fo();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=fo(e.document)}return t}function au(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")}function Rw(e){var t=Up(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Wp(r.ownerDocument.documentElement,r)){if(n!==null&&au(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=eh(r,o);var c=eh(r,n);s&&c&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==c.node||e.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(c.node,c.offset)):(t.setEnd(c.node,c.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Pw=qt&&"documentMode"in document&&11>=document.documentMode,wn=null,Xl=null,Ts=null,Yl=!1;function th(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Yl||wn==null||wn!==fo(n)||(n=wn,"selectionStart"in n&&au(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ts&&zs(Ts,n)||(Ts=n,n=So(Xl,"onSelect"),0<n.length&&(t=new su("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=wn)))}function Ai(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var xn={animationend:Ai("Animation","AnimationEnd"),animationiteration:Ai("Animation","AnimationIteration"),animationstart:Ai("Animation","AnimationStart"),transitionend:Ai("Transition","TransitionEnd")},Ya={},Vp={};qt&&(Vp=document.createElement("div").style,"AnimationEvent"in window||(delete xn.animationend.animation,delete xn.animationiteration.animation,delete xn.animationstart.animation),"TransitionEvent"in window||delete xn.transitionend.transition);function ea(e){if(Ya[e])return Ya[e];if(!xn[e])return e;var t=xn[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Vp)return Ya[e]=t[r];return e}var Kp=ea("animationend"),Gp=ea("animationiteration"),qp=ea("animationstart"),Xp=ea("transitionend"),Yp=new Map,rh="abort auxClick 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(" ");function Lr(e,t){Yp.set(e,t),on(t,[e])}for(var Qa=0;Qa<rh.length;Qa++){var Ja=rh[Qa],Tw=Ja.toLowerCase(),Lw=Ja[0].toUpperCase()+Ja.slice(1);Lr(Tw,"on"+Lw)}Lr(Kp,"onAnimationEnd");Lr(Gp,"onAnimationIteration");Lr(qp,"onAnimationStart");Lr("dblclick","onDoubleClick");Lr("focusin","onFocus");Lr("focusout","onBlur");Lr(Xp,"onTransitionEnd");Bn("onMouseEnter",["mouseout","mouseover"]);Bn("onMouseLeave",["mouseout","mouseover"]);Bn("onPointerEnter",["pointerout","pointerover"]);Bn("onPointerLeave",["pointerout","pointerover"]);on("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));on("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));on("onBeforeInput",["compositionend","keypress","textInput","paste"]);on("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));on("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));on("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xs="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(" "),Aw=new Set("cancel close invalid load scroll toggle".split(" ").concat(xs));function nh(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,TS(n,t,void 0,e),e.currentTarget=null}function Qp(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var c=n.length-1;0<=c;c--){var i=n[c],a=i.instance,d=i.currentTarget;if(i=i.listener,a!==o&&s.isPropagationStopped())break e;nh(s,i,d),o=a}else for(c=0;c<n.length;c++){if(i=n[c],a=i.instance,d=i.currentTarget,i=i.listener,a!==o&&s.isPropagationStopped())break e;nh(s,i,d),o=a}}}if(mo)throw e=Vl,mo=!1,Vl=null,e}function pe(e,t){var r=t[tc];r===void 0&&(r=t[tc]=new Set);var n=e+"__bubble";r.has(n)||(Jp(t,e,2,!1),r.add(n))}function Za(e,t,r){var n=0;t&&(n|=4),Jp(r,e,n,t)}var Di="_reactListening"+Math.random().toString(36).slice(2);function Ws(e){if(!e[Di]){e[Di]=!0,ip.forEach(function(r){r!=="selectionchange"&&(Aw.has(r)||Za(r,!1,e),Za(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Di]||(t[Di]=!0,Za("selectionchange",!1,t))}}function Jp(e,t,r,n){switch(Ip(t)){case 1:var s=VS;break;case 4:s=KS;break;default:s=ru}r=s.bind(null,t,r,e),s=void 0,!Ul||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function el(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var c=n.tag;if(c===3||c===4){var i=n.stateNode.containerInfo;if(i===s||i.nodeType===8&&i.parentNode===s)break;if(c===4)for(c=n.return;c!==null;){var a=c.tag;if((a===3||a===4)&&(a=c.stateNode.containerInfo,a===s||a.nodeType===8&&a.parentNode===s))return;c=c.return}for(;i!==null;){if(c=Wr(i),c===null)return;if(a=c.tag,a===5||a===6){n=o=c;continue e}i=i.parentNode}}n=n.return}wp(function(){var d=o,m=Jc(r),u=[];e:{var v=Yp.get(e);if(v!==void 0){var y=su,S=e;switch(e){case"keypress":if(to(r)===0)break e;case"keydown":case"keyup":y=aw;break;case"focusin":S="focus",y=Ga;break;case"focusout":S="blur",y=Ga;break;case"beforeblur":case"afterblur":y=Ga;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Vd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=XS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=uw;break;case Kp:case Gp:case qp:y=JS;break;case Xp:y=hw;break;case"scroll":y=GS;break;case"wheel":y=pw;break;case"copy":case"cut":case"paste":y=ew;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Gd}var g=(t&4)!==0,p=!g&&e==="scroll",h=g?v!==null?v+"Capture":null:v;g=[];for(var l=d,f;l!==null;){f=l;var _=f.stateNode;if(f.tag===5&&_!==null&&(f=_,h!==null&&(_=js(l,h),_!=null&&g.push(Us(l,_,f)))),p)break;l=l.return}0<g.length&&(v=new y(v,S,null,r,m),u.push({event:v,listeners:g}))}}if(!(t&7)){e:{if(v=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",v&&r!==zl&&(S=r.relatedTarget||r.fromElement)&&(Wr(S)||S[Xt]))break e;if((y||v)&&(v=m.window===m?m:(v=m.ownerDocument)?v.defaultView||v.parentWindow:window,y?(S=r.relatedTarget||r.toElement,y=d,S=S?Wr(S):null,S!==null&&(p=an(S),S!==p||S.tag!==5&&S.tag!==6)&&(S=null)):(y=null,S=d),y!==S)){if(g=Vd,_="onMouseLeave",h="onMouseEnter",l="mouse",(e==="pointerout"||e==="pointerover")&&(g=Gd,_="onPointerLeave",h="onPointerEnter",l="pointer"),p=y==null?v:bn(y),f=S==null?v:bn(S),v=new g(_,l+"leave",y,r,m),v.target=p,v.relatedTarget=f,_=null,Wr(m)===d&&(g=new g(h,l+"enter",S,r,m),g.target=f,g.relatedTarget=p,_=g),p=_,y&&S)t:{for(g=y,h=S,l=0,f=g;f;f=hn(f))l++;for(f=0,_=h;_;_=hn(_))f++;for(;0<l-f;)g=hn(g),l--;for(;0<f-l;)h=hn(h),f--;for(;l--;){if(g===h||h!==null&&g===h.alternate)break t;g=hn(g),h=hn(h)}g=null}else g=null;y!==null&&sh(u,v,y,g,!1),S!==null&&p!==null&&sh(u,p,S,g,!0)}}e:{if(v=d?bn(d):window,y=v.nodeName&&v.nodeName.toLowerCase(),y==="select"||y==="input"&&v.type==="file")var E=ww;else if(Yd(v))if($p)E=Ew;else{E=bw;var k=xw}else(y=v.nodeName)&&y.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(E=Cw);if(E&&(E=E(e,d))){Hp(u,E,r,m);break e}k&&k(e,v,d),e==="focusout"&&(k=v._wrapperState)&&k.controlled&&v.type==="number"&&jl(v,"number",v.value)}switch(k=d?bn(d):window,e){case"focusin":(Yd(k)||k.contentEditable==="true")&&(wn=k,Xl=d,Ts=null);break;case"focusout":Ts=Xl=wn=null;break;case"mousedown":Yl=!0;break;case"contextmenu":case"mouseup":case"dragend":Yl=!1,th(u,r,m);break;case"selectionchange":if(Pw)break;case"keydown":case"keyup":th(u,r,m)}var C;if(ou)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Sn?Bp(e,r)&&(w="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(w="onCompositionStart");w&&(jp&&r.locale!=="ko"&&(Sn||w!=="onCompositionStart"?w==="onCompositionEnd"&&Sn&&(C=Op()):(fr=m,nu="value"in fr?fr.value:fr.textContent,Sn=!0)),k=So(d,w),0<k.length&&(w=new Kd(w,e,null,r,m),u.push({event:w,listeners:k}),C?w.data=C:(C=Fp(r),C!==null&&(w.data=C)))),(C=vw?gw(e,r):_w(e,r))&&(d=So(d,"onBeforeInput"),0<d.length&&(m=new Kd("onBeforeInput","beforeinput",null,r,m),u.push({event:m,listeners:d}),m.data=C))}Qp(u,t)})}function Us(e,t,r){return{instance:e,listener:t,currentTarget:r}}function So(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=js(e,r),o!=null&&n.unshift(Us(e,o,s)),o=js(e,t),o!=null&&n.push(Us(e,o,s))),e=e.return}return n}function hn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sh(e,t,r,n,s){for(var o=t._reactName,c=[];r!==null&&r!==n;){var i=r,a=i.alternate,d=i.stateNode;if(a!==null&&a===n)break;i.tag===5&&d!==null&&(i=d,s?(a=js(r,o),a!=null&&c.unshift(Us(r,a,i))):s||(a=js(r,o),a!=null&&c.push(Us(r,a,i)))),r=r.return}c.length!==0&&e.push({event:t,listeners:c})}var Dw=/\r\n?/g,Mw=/\u0000|\uFFFD/g;function ih(e){return(typeof e=="string"?e:""+e).replace(Dw,`
|
|
38
|
+
`).replace(Mw,"")}function Mi(e,t,r){if(t=ih(t),ih(e)!==t&&r)throw Error(Q(425))}function wo(){}var Ql=null,Jl=null;function Zl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ec=typeof setTimeout=="function"?setTimeout:void 0,Nw=typeof clearTimeout=="function"?clearTimeout:void 0,oh=typeof Promise=="function"?Promise:void 0,Iw=typeof queueMicrotask=="function"?queueMicrotask:typeof oh<"u"?function(e){return oh.resolve(null).then(e).catch(Ow)}:ec;function Ow(e){setTimeout(function(){throw e})}function tl(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Hs(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Hs(t)}function yr(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==="$?")break;if(t==="/$")return null}}return e}function ah(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Qn=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Qn,Vs="__reactProps$"+Qn,Xt="__reactContainer$"+Qn,tc="__reactEvents$"+Qn,jw="__reactListeners$"+Qn,Bw="__reactHandles$"+Qn;function Wr(e){var t=e[Mt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Xt]||r[Mt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ah(e);e!==null;){if(r=e[Mt])return r;e=ah(e)}return t}e=r,r=e.parentNode}return null}function oi(e){return e=e[Mt]||e[Xt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function bn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function ta(e){return e[Vs]||null}var rc=[],Cn=-1;function Ar(e){return{current:e}}function me(e){0>Cn||(e.current=rc[Cn],rc[Cn]=null,Cn--)}function fe(e,t){Cn++,rc[Cn]=e.current,e.current=t}var kr={},Fe=Ar(kr),qe=Ar(!1),Xr=kr;function Fn(e,t){var r=e.type.contextTypes;if(!r)return kr;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Xe(e){return e=e.childContextTypes,e!=null}function xo(){me(qe),me(Fe)}function lh(e,t,r){if(Fe.current!==kr)throw Error(Q(168));fe(Fe,t),fe(qe,r)}function Zp(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(Q(108,xS(e)||"Unknown",s));return Se({},r,n)}function bo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kr,Xr=Fe.current,fe(Fe,e),fe(qe,qe.current),!0}function ch(e,t,r){var n=e.stateNode;if(!n)throw Error(Q(169));r?(e=Zp(e,t,Xr),n.__reactInternalMemoizedMergedChildContext=e,me(qe),me(Fe),fe(Fe,e)):me(qe),fe(qe,r)}var Ut=null,ra=!1,rl=!1;function em(e){Ut===null?Ut=[e]:Ut.push(e)}function Fw(e){ra=!0,em(e)}function Dr(){if(!rl&&Ut!==null){rl=!0;var e=0,t=de;try{var r=Ut;for(de=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ut=null,ra=!1}catch(s){throw Ut!==null&&(Ut=Ut.slice(e+1)),Ep(Zc,Dr),s}finally{de=t,rl=!1}}return null}var En=[],kn=0,Co=null,Eo=0,dt=[],ht=0,Yr=null,Vt=1,Kt="";function $r(e,t){En[kn++]=Eo,En[kn++]=Co,Co=e,Eo=t}function tm(e,t,r){dt[ht++]=Vt,dt[ht++]=Kt,dt[ht++]=Yr,Yr=e;var n=Vt;e=Kt;var s=32-Ct(n)-1;n&=~(1<<s),r+=1;var o=32-Ct(t)+s;if(30<o){var c=s-s%5;o=(n&(1<<c)-1).toString(32),n>>=c,s-=c,Vt=1<<32-Ct(t)+s|r<<s|n,Kt=o+e}else Vt=1<<o|r<<s|n,Kt=e}function lu(e){e.return!==null&&($r(e,1),tm(e,1,0))}function cu(e){for(;e===Co;)Co=En[--kn],En[kn]=null,Eo=En[--kn],En[kn]=null;for(;e===Yr;)Yr=dt[--ht],dt[ht]=null,Kt=dt[--ht],dt[ht]=null,Vt=dt[--ht],dt[ht]=null}var nt=null,rt=null,ve=!1,bt=null;function rm(e,t){var r=ft(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function uh(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,nt=e,rt=yr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,nt=e,rt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Yr!==null?{id:Vt,overflow:Kt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ft(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,nt=e,rt=null,!0):!1;default:return!1}}function nc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sc(e){if(ve){var t=rt;if(t){var r=t;if(!uh(e,t)){if(nc(e))throw Error(Q(418));t=yr(r.nextSibling);var n=nt;t&&uh(e,t)?rm(n,r):(e.flags=e.flags&-4097|2,ve=!1,nt=e)}}else{if(nc(e))throw Error(Q(418));e.flags=e.flags&-4097|2,ve=!1,nt=e}}}function dh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;nt=e}function Ni(e){if(e!==nt)return!1;if(!ve)return dh(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zl(e.type,e.memoizedProps)),t&&(t=rt)){if(nc(e))throw nm(),Error(Q(418));for(;t;)rm(e,t),t=yr(t.nextSibling)}if(dh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){rt=yr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}rt=null}}else rt=nt?yr(e.stateNode.nextSibling):null;return!0}function nm(){for(var e=rt;e;)e=yr(e.nextSibling)}function Hn(){rt=nt=null,ve=!1}function uu(e){bt===null?bt=[e]:bt.push(e)}var Hw=er.ReactCurrentBatchConfig;function fs(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Q(309));var n=r.stateNode}if(!n)throw Error(Q(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(c){var i=s.refs;c===null?delete i[o]:i[o]=c},t._stringRef=o,t)}if(typeof e!="string")throw Error(Q(284));if(!r._owner)throw Error(Q(290,e))}return e}function Ii(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function hh(e){var t=e._init;return t(e._payload)}function sm(e){function t(h,l){if(e){var f=h.deletions;f===null?(h.deletions=[l],h.flags|=16):f.push(l)}}function r(h,l){if(!e)return null;for(;l!==null;)t(h,l),l=l.sibling;return null}function n(h,l){for(h=new Map;l!==null;)l.key!==null?h.set(l.key,l):h.set(l.index,l),l=l.sibling;return h}function s(h,l){return h=br(h,l),h.index=0,h.sibling=null,h}function o(h,l,f){return h.index=f,e?(f=h.alternate,f!==null?(f=f.index,f<l?(h.flags|=2,l):f):(h.flags|=2,l)):(h.flags|=1048576,l)}function c(h){return e&&h.alternate===null&&(h.flags|=2),h}function i(h,l,f,_){return l===null||l.tag!==6?(l=cl(f,h.mode,_),l.return=h,l):(l=s(l,f),l.return=h,l)}function a(h,l,f,_){var E=f.type;return E===yn?m(h,l,f.props.children,_,f.key):l!==null&&(l.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===cr&&hh(E)===l.type)?(_=s(l,f.props),_.ref=fs(h,l,f),_.return=h,_):(_=lo(f.type,f.key,f.props,null,h.mode,_),_.ref=fs(h,l,f),_.return=h,_)}function d(h,l,f,_){return l===null||l.tag!==4||l.stateNode.containerInfo!==f.containerInfo||l.stateNode.implementation!==f.implementation?(l=ul(f,h.mode,_),l.return=h,l):(l=s(l,f.children||[]),l.return=h,l)}function m(h,l,f,_,E){return l===null||l.tag!==7?(l=Gr(f,h.mode,_,E),l.return=h,l):(l=s(l,f),l.return=h,l)}function u(h,l,f){if(typeof l=="string"&&l!==""||typeof l=="number")return l=cl(""+l,h.mode,f),l.return=h,l;if(typeof l=="object"&&l!==null){switch(l.$$typeof){case Ci:return f=lo(l.type,l.key,l.props,null,h.mode,f),f.ref=fs(h,null,l),f.return=h,f;case _n:return l=ul(l,h.mode,f),l.return=h,l;case cr:var _=l._init;return u(h,_(l._payload),f)}if(Ss(l)||ls(l))return l=Gr(l,h.mode,f,null),l.return=h,l;Ii(h,l)}return null}function v(h,l,f,_){var E=l!==null?l.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return E!==null?null:i(h,l,""+f,_);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Ci:return f.key===E?a(h,l,f,_):null;case _n:return f.key===E?d(h,l,f,_):null;case cr:return E=f._init,v(h,l,E(f._payload),_)}if(Ss(f)||ls(f))return E!==null?null:m(h,l,f,_,null);Ii(h,f)}return null}function y(h,l,f,_,E){if(typeof _=="string"&&_!==""||typeof _=="number")return h=h.get(f)||null,i(l,h,""+_,E);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ci:return h=h.get(_.key===null?f:_.key)||null,a(l,h,_,E);case _n:return h=h.get(_.key===null?f:_.key)||null,d(l,h,_,E);case cr:var k=_._init;return y(h,l,f,k(_._payload),E)}if(Ss(_)||ls(_))return h=h.get(f)||null,m(l,h,_,E,null);Ii(l,_)}return null}function S(h,l,f,_){for(var E=null,k=null,C=l,w=l=0,P=null;C!==null&&w<f.length;w++){C.index>w?(P=C,C=null):P=C.sibling;var T=v(h,C,f[w],_);if(T===null){C===null&&(C=P);break}e&&C&&T.alternate===null&&t(h,C),l=o(T,l,w),k===null?E=T:k.sibling=T,k=T,C=P}if(w===f.length)return r(h,C),ve&&$r(h,w),E;if(C===null){for(;w<f.length;w++)C=u(h,f[w],_),C!==null&&(l=o(C,l,w),k===null?E=C:k.sibling=C,k=C);return ve&&$r(h,w),E}for(C=n(h,C);w<f.length;w++)P=y(C,h,w,f[w],_),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?w:P.key),l=o(P,l,w),k===null?E=P:k.sibling=P,k=P);return e&&C.forEach(function(M){return t(h,M)}),ve&&$r(h,w),E}function g(h,l,f,_){var E=ls(f);if(typeof E!="function")throw Error(Q(150));if(f=E.call(f),f==null)throw Error(Q(151));for(var k=E=null,C=l,w=l=0,P=null,T=f.next();C!==null&&!T.done;w++,T=f.next()){C.index>w?(P=C,C=null):P=C.sibling;var M=v(h,C,T.value,_);if(M===null){C===null&&(C=P);break}e&&C&&M.alternate===null&&t(h,C),l=o(M,l,w),k===null?E=M:k.sibling=M,k=M,C=P}if(T.done)return r(h,C),ve&&$r(h,w),E;if(C===null){for(;!T.done;w++,T=f.next())T=u(h,T.value,_),T!==null&&(l=o(T,l,w),k===null?E=T:k.sibling=T,k=T);return ve&&$r(h,w),E}for(C=n(h,C);!T.done;w++,T=f.next())T=y(C,h,w,T.value,_),T!==null&&(e&&T.alternate!==null&&C.delete(T.key===null?w:T.key),l=o(T,l,w),k===null?E=T:k.sibling=T,k=T);return e&&C.forEach(function(j){return t(h,j)}),ve&&$r(h,w),E}function p(h,l,f,_){if(typeof f=="object"&&f!==null&&f.type===yn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case Ci:e:{for(var E=f.key,k=l;k!==null;){if(k.key===E){if(E=f.type,E===yn){if(k.tag===7){r(h,k.sibling),l=s(k,f.props.children),l.return=h,h=l;break e}}else if(k.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===cr&&hh(E)===k.type){r(h,k.sibling),l=s(k,f.props),l.ref=fs(h,k,f),l.return=h,h=l;break e}r(h,k);break}else t(h,k);k=k.sibling}f.type===yn?(l=Gr(f.props.children,h.mode,_,f.key),l.return=h,h=l):(_=lo(f.type,f.key,f.props,null,h.mode,_),_.ref=fs(h,l,f),_.return=h,h=_)}return c(h);case _n:e:{for(k=f.key;l!==null;){if(l.key===k)if(l.tag===4&&l.stateNode.containerInfo===f.containerInfo&&l.stateNode.implementation===f.implementation){r(h,l.sibling),l=s(l,f.children||[]),l.return=h,h=l;break e}else{r(h,l);break}else t(h,l);l=l.sibling}l=ul(f,h.mode,_),l.return=h,h=l}return c(h);case cr:return k=f._init,p(h,l,k(f._payload),_)}if(Ss(f))return S(h,l,f,_);if(ls(f))return g(h,l,f,_);Ii(h,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,l!==null&&l.tag===6?(r(h,l.sibling),l=s(l,f),l.return=h,h=l):(r(h,l),l=cl(f,h.mode,_),l.return=h,h=l),c(h)):r(h,l)}return p}var $n=sm(!0),im=sm(!1),ko=Ar(null),Ro=null,Rn=null,du=null;function hu(){du=Rn=Ro=null}function fu(e){var t=ko.current;me(ko),e._currentValue=t}function ic(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Nn(e,t){Ro=e,du=Rn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function vt(e){var t=e._currentValue;if(du!==e)if(e={context:e,memoizedValue:t,next:null},Rn===null){if(Ro===null)throw Error(Q(308));Rn=e,Ro.dependencies={lanes:0,firstContext:e}}else Rn=Rn.next=e;return t}var Ur=null;function pu(e){Ur===null?Ur=[e]:Ur.push(e)}function om(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,pu(t)):(r.next=s.next,s.next=r),t.interleaved=r,Yt(e,n)}function Yt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ur=!1;function mu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function am(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Sr(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ue&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Yt(e,r)}return s=n.interleaved,s===null?(t.next=t,pu(n)):(t.next=s.next,s.next=t),n.interleaved=t,Yt(e,r)}function ro(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,eu(e,r)}}function fh(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var c={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=c:o=o.next=c,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Po(e,t,r,n){var s=e.updateQueue;ur=!1;var o=s.firstBaseUpdate,c=s.lastBaseUpdate,i=s.shared.pending;if(i!==null){s.shared.pending=null;var a=i,d=a.next;a.next=null,c===null?o=d:c.next=d,c=a;var m=e.alternate;m!==null&&(m=m.updateQueue,i=m.lastBaseUpdate,i!==c&&(i===null?m.firstBaseUpdate=d:i.next=d,m.lastBaseUpdate=a))}if(o!==null){var u=s.baseState;c=0,m=d=a=null,i=o;do{var v=i.lane,y=i.eventTime;if((n&v)===v){m!==null&&(m=m.next={eventTime:y,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var S=e,g=i;switch(v=t,y=r,g.tag){case 1:if(S=g.payload,typeof S=="function"){u=S.call(y,u,v);break e}u=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=g.payload,v=typeof S=="function"?S.call(y,u,v):S,v==null)break e;u=Se({},u,v);break e;case 2:ur=!0}}i.callback!==null&&i.lane!==0&&(e.flags|=64,v=s.effects,v===null?s.effects=[i]:v.push(i))}else y={eventTime:y,lane:v,tag:i.tag,payload:i.payload,callback:i.callback,next:null},m===null?(d=m=y,a=u):m=m.next=y,c|=v;if(i=i.next,i===null){if(i=s.shared.pending,i===null)break;v=i,i=v.next,v.next=null,s.lastBaseUpdate=v,s.shared.pending=null}}while(!0);if(m===null&&(a=u),s.baseState=a,s.firstBaseUpdate=d,s.lastBaseUpdate=m,t=s.shared.interleaved,t!==null){s=t;do c|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Jr|=c,e.lanes=c,e.memoizedState=u}}function ph(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(Q(191,s));s.call(n)}}}var ai={},jt=Ar(ai),Ks=Ar(ai),Gs=Ar(ai);function Vr(e){if(e===ai)throw Error(Q(174));return e}function vu(e,t){switch(fe(Gs,t),fe(Ks,e),fe(jt,ai),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fl(t,e)}me(jt),fe(jt,t)}function zn(){me(jt),me(Ks),me(Gs)}function lm(e){Vr(Gs.current);var t=Vr(jt.current),r=Fl(t,e.type);t!==r&&(fe(Ks,e),fe(jt,r))}function gu(e){Ks.current===e&&(me(jt),me(Ks))}var _e=Ar(0);function To(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nl=[];function _u(){for(var e=0;e<nl.length;e++)nl[e]._workInProgressVersionPrimary=null;nl.length=0}var no=er.ReactCurrentDispatcher,sl=er.ReactCurrentBatchConfig,Qr=0,ye=null,Pe=null,Ae=null,Lo=!1,Ls=!1,qs=0,$w=0;function Oe(){throw Error(Q(321))}function yu(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!kt(e[r],t[r]))return!1;return!0}function Su(e,t,r,n,s,o){if(Qr=o,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,no.current=e===null||e.memoizedState===null?Vw:Kw,e=r(n,s),Ls){o=0;do{if(Ls=!1,qs=0,25<=o)throw Error(Q(301));o+=1,Ae=Pe=null,t.updateQueue=null,no.current=Gw,e=r(n,s)}while(Ls)}if(no.current=Ao,t=Pe!==null&&Pe.next!==null,Qr=0,Ae=Pe=ye=null,Lo=!1,t)throw Error(Q(300));return e}function wu(){var e=qs!==0;return qs=0,e}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ae===null?ye.memoizedState=Ae=e:Ae=Ae.next=e,Ae}function gt(){if(Pe===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=Ae===null?ye.memoizedState:Ae.next;if(t!==null)Ae=t,Pe=e;else{if(e===null)throw Error(Q(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Ae===null?ye.memoizedState=Ae=e:Ae=Ae.next=e}return Ae}function Xs(e,t){return typeof t=="function"?t(e):t}function il(e){var t=gt(),r=t.queue;if(r===null)throw Error(Q(311));r.lastRenderedReducer=e;var n=Pe,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var c=s.next;s.next=o.next,o.next=c}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var i=c=null,a=null,d=o;do{var m=d.lane;if((Qr&m)===m)a!==null&&(a=a.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var u={lane:m,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};a===null?(i=a=u,c=n):a=a.next=u,ye.lanes|=m,Jr|=m}d=d.next}while(d!==null&&d!==o);a===null?c=n:a.next=i,kt(n,t.memoizedState)||(Ge=!0),t.memoizedState=n,t.baseState=c,t.baseQueue=a,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,ye.lanes|=o,Jr|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ol(e){var t=gt(),r=t.queue;if(r===null)throw Error(Q(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var c=s=s.next;do o=e(o,c.action),c=c.next;while(c!==s);kt(o,t.memoizedState)||(Ge=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function cm(){}function um(e,t){var r=ye,n=gt(),s=t(),o=!kt(n.memoizedState,s);if(o&&(n.memoizedState=s,Ge=!0),n=n.queue,xu(fm.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Ae!==null&&Ae.memoizedState.tag&1){if(r.flags|=2048,Ys(9,hm.bind(null,r,n,s,t),void 0,null),De===null)throw Error(Q(349));Qr&30||dm(r,t,s)}return s}function dm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ye.updateQueue,t===null?(t={lastEffect:null,stores:null},ye.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function hm(e,t,r,n){t.value=r,t.getSnapshot=n,pm(t)&&mm(e)}function fm(e,t,r){return r(function(){pm(t)&&mm(e)})}function pm(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!kt(e,r)}catch{return!0}}function mm(e){var t=Yt(e,1);t!==null&&Et(t,e,1,-1)}function mh(e){var t=Dt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xs,lastRenderedState:e},t.queue=e,e=e.dispatch=Uw.bind(null,ye,e),[t.memoizedState,e]}function Ys(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ye.updateQueue,t===null?(t={lastEffect:null,stores:null},ye.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function vm(){return gt().memoizedState}function so(e,t,r,n){var s=Dt();ye.flags|=e,s.memoizedState=Ys(1|t,r,void 0,n===void 0?null:n)}function na(e,t,r,n){var s=gt();n=n===void 0?null:n;var o=void 0;if(Pe!==null){var c=Pe.memoizedState;if(o=c.destroy,n!==null&&yu(n,c.deps)){s.memoizedState=Ys(t,r,o,n);return}}ye.flags|=e,s.memoizedState=Ys(1|t,r,o,n)}function vh(e,t){return so(8390656,8,e,t)}function xu(e,t){return na(2048,8,e,t)}function gm(e,t){return na(4,2,e,t)}function _m(e,t){return na(4,4,e,t)}function ym(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sm(e,t,r){return r=r!=null?r.concat([e]):null,na(4,4,ym.bind(null,t,e),r)}function bu(){}function wm(e,t){var r=gt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&yu(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function xm(e,t){var r=gt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&yu(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function bm(e,t,r){return Qr&21?(kt(r,t)||(r=Pp(),ye.lanes|=r,Jr|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ge=!0),e.memoizedState=r)}function zw(e,t){var r=de;de=r!==0&&4>r?r:4,e(!0);var n=sl.transition;sl.transition={};try{e(!1),t()}finally{de=r,sl.transition=n}}function Cm(){return gt().memoizedState}function Ww(e,t,r){var n=xr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Em(e))km(t,r);else if(r=om(e,t,r,n),r!==null){var s=$e();Et(r,e,n,s),Rm(r,t,n)}}function Uw(e,t,r){var n=xr(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Em(e))km(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var c=t.lastRenderedState,i=o(c,r);if(s.hasEagerState=!0,s.eagerState=i,kt(i,c)){var a=t.interleaved;a===null?(s.next=s,pu(t)):(s.next=a.next,a.next=s),t.interleaved=s;return}}catch{}finally{}r=om(e,t,s,n),r!==null&&(s=$e(),Et(r,e,n,s),Rm(r,t,n))}}function Em(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function km(e,t){Ls=Lo=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Rm(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,eu(e,r)}}var Ao={readContext:vt,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},Vw={readContext:vt,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:vh,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,so(4194308,4,ym.bind(null,t,e),r)},useLayoutEffect:function(e,t){return so(4194308,4,e,t)},useInsertionEffect:function(e,t){return so(4,2,e,t)},useMemo:function(e,t){var r=Dt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Dt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Ww.bind(null,ye,e),[n.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:mh,useDebugValue:bu,useDeferredValue:function(e){return Dt().memoizedState=e},useTransition:function(){var e=mh(!1),t=e[0];return e=zw.bind(null,e[1]),Dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ye,s=Dt();if(ve){if(r===void 0)throw Error(Q(407));r=r()}else{if(r=t(),De===null)throw Error(Q(349));Qr&30||dm(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,vh(fm.bind(null,n,o,e),[e]),n.flags|=2048,Ys(9,hm.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Dt(),t=De.identifierPrefix;if(ve){var r=Kt,n=Vt;r=(n&~(1<<32-Ct(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=qs++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=$w++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Kw={readContext:vt,useCallback:wm,useContext:vt,useEffect:xu,useImperativeHandle:Sm,useInsertionEffect:gm,useLayoutEffect:_m,useMemo:xm,useReducer:il,useRef:vm,useState:function(){return il(Xs)},useDebugValue:bu,useDeferredValue:function(e){var t=gt();return bm(t,Pe.memoizedState,e)},useTransition:function(){var e=il(Xs)[0],t=gt().memoizedState;return[e,t]},useMutableSource:cm,useSyncExternalStore:um,useId:Cm,unstable_isNewReconciler:!1},Gw={readContext:vt,useCallback:wm,useContext:vt,useEffect:xu,useImperativeHandle:Sm,useInsertionEffect:gm,useLayoutEffect:_m,useMemo:xm,useReducer:ol,useRef:vm,useState:function(){return ol(Xs)},useDebugValue:bu,useDeferredValue:function(e){var t=gt();return Pe===null?t.memoizedState=e:bm(t,Pe.memoizedState,e)},useTransition:function(){var e=ol(Xs)[0],t=gt().memoizedState;return[e,t]},useMutableSource:cm,useSyncExternalStore:um,useId:Cm,unstable_isNewReconciler:!1};function wt(e,t){if(e&&e.defaultProps){t=Se({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function oc(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Se({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var sa={isMounted:function(e){return(e=e._reactInternals)?an(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=$e(),s=xr(e),o=Gt(n,s);o.payload=t,r!=null&&(o.callback=r),t=Sr(e,o,s),t!==null&&(Et(t,e,s,n),ro(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=$e(),s=xr(e),o=Gt(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=Sr(e,o,s),t!==null&&(Et(t,e,s,n),ro(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=$e(),n=xr(e),s=Gt(r,n);s.tag=2,t!=null&&(s.callback=t),t=Sr(e,s,n),t!==null&&(Et(t,e,n,r),ro(t,e,n))}};function gh(e,t,r,n,s,o,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,c):t.prototype&&t.prototype.isPureReactComponent?!zs(r,n)||!zs(s,o):!0}function Pm(e,t,r){var n=!1,s=kr,o=t.contextType;return typeof o=="object"&&o!==null?o=vt(o):(s=Xe(t)?Xr:Fe.current,n=t.contextTypes,o=(n=n!=null)?Fn(e,s):kr),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=sa,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function _h(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&sa.enqueueReplaceState(t,t.state,null)}function ac(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},mu(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=vt(o):(o=Xe(t)?Xr:Fe.current,s.context=Fn(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(oc(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&sa.enqueueReplaceState(s,s.state,null),Po(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Wn(e,t){try{var r="",n=t;do r+=wS(n),n=n.return;while(n);var s=r}catch(o){s=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function al(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function lc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var qw=typeof WeakMap=="function"?WeakMap:Map;function Tm(e,t,r){r=Gt(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Mo||(Mo=!0,_c=n),lc(e,t)},r}function Lm(e,t,r){r=Gt(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){lc(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){lc(e,t),typeof n!="function"&&(wr===null?wr=new Set([this]):wr.add(this));var c=t.stack;this.componentDidCatch(t.value,{componentStack:c!==null?c:""})}),r}function yh(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new qw;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=l1.bind(null,e,t,r),t.then(e,e))}function Sh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function wh(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Gt(-1,1),t.tag=2,Sr(r,t,1))),r.lanes|=1),e)}var Xw=er.ReactCurrentOwner,Ge=!1;function He(e,t,r,n){t.child=e===null?im(t,null,r,n):$n(t,e.child,r,n)}function xh(e,t,r,n,s){r=r.render;var o=t.ref;return Nn(t,s),n=Su(e,t,r,n,o,s),r=wu(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Qt(e,t,s)):(ve&&r&&lu(t),t.flags|=1,He(e,t,n,s),t.child)}function bh(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!Au(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,Am(e,t,o,n,s)):(e=lo(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var c=o.memoizedProps;if(r=r.compare,r=r!==null?r:zs,r(c,n)&&e.ref===t.ref)return Qt(e,t,s)}return t.flags|=1,e=br(o,n),e.ref=t.ref,e.return=t,t.child=e}function Am(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(zs(o,n)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(Ge=!0);else return t.lanes=e.lanes,Qt(e,t,s)}return cc(e,t,r,n,s)}function Dm(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},fe(Tn,et),et|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,fe(Tn,et),et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,fe(Tn,et),et|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,fe(Tn,et),et|=n;return He(e,t,s,r),t.child}function Mm(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function cc(e,t,r,n,s){var o=Xe(r)?Xr:Fe.current;return o=Fn(t,o),Nn(t,s),r=Su(e,t,r,n,o,s),n=wu(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Qt(e,t,s)):(ve&&n&&lu(t),t.flags|=1,He(e,t,r,s),t.child)}function Ch(e,t,r,n,s){if(Xe(r)){var o=!0;bo(t)}else o=!1;if(Nn(t,s),t.stateNode===null)io(e,t),Pm(t,r,n),ac(t,r,n,s),n=!0;else if(e===null){var c=t.stateNode,i=t.memoizedProps;c.props=i;var a=c.context,d=r.contextType;typeof d=="object"&&d!==null?d=vt(d):(d=Xe(r)?Xr:Fe.current,d=Fn(t,d));var m=r.getDerivedStateFromProps,u=typeof m=="function"||typeof c.getSnapshotBeforeUpdate=="function";u||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(i!==n||a!==d)&&_h(t,c,n,d),ur=!1;var v=t.memoizedState;c.state=v,Po(t,n,c,s),a=t.memoizedState,i!==n||v!==a||qe.current||ur?(typeof m=="function"&&(oc(t,r,m,n),a=t.memoizedState),(i=ur||gh(t,r,i,n,v,a,d))?(u||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=a),c.props=n,c.state=a,c.context=d,n=i):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,am(e,t),i=t.memoizedProps,d=t.type===t.elementType?i:wt(t.type,i),c.props=d,u=t.pendingProps,v=c.context,a=r.contextType,typeof a=="object"&&a!==null?a=vt(a):(a=Xe(r)?Xr:Fe.current,a=Fn(t,a));var y=r.getDerivedStateFromProps;(m=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(i!==u||v!==a)&&_h(t,c,n,a),ur=!1,v=t.memoizedState,c.state=v,Po(t,n,c,s);var S=t.memoizedState;i!==u||v!==S||qe.current||ur?(typeof y=="function"&&(oc(t,r,y,n),S=t.memoizedState),(d=ur||gh(t,r,d,n,v,S,a)||!1)?(m||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,S,a),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,S,a)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||i===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=S),c.props=n,c.state=S,c.context=a,n=d):(typeof c.componentDidUpdate!="function"||i===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),n=!1)}return uc(e,t,r,n,o,s)}function uc(e,t,r,n,s,o){Mm(e,t);var c=(t.flags&128)!==0;if(!n&&!c)return s&&ch(t,r,!1),Qt(e,t,o);n=t.stateNode,Xw.current=t;var i=c&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&c?(t.child=$n(t,e.child,null,o),t.child=$n(t,null,i,o)):He(e,t,i,o),t.memoizedState=n.state,s&&ch(t,r,!0),t.child}function Nm(e){var t=e.stateNode;t.pendingContext?lh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lh(e,t.context,!1),vu(e,t.containerInfo)}function Eh(e,t,r,n,s){return Hn(),uu(s),t.flags|=256,He(e,t,r,n),t.child}var dc={dehydrated:null,treeContext:null,retryLane:0};function hc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Im(e,t,r){var n=t.pendingProps,s=_e.current,o=!1,c=(t.flags&128)!==0,i;if((i=c)||(i=e!==null&&e.memoizedState===null?!1:(s&2)!==0),i?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),fe(_e,s&1),e===null)return sc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(c=n.children,e=n.fallback,o?(n=t.mode,o=t.child,c={mode:"hidden",children:c},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=c):o=aa(c,n,0,null),e=Gr(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=hc(r),t.memoizedState=dc,e):Cu(t,c));if(s=e.memoizedState,s!==null&&(i=s.dehydrated,i!==null))return Yw(e,t,c,n,i,s,r);if(o){o=n.fallback,c=t.mode,s=e.child,i=s.sibling;var a={mode:"hidden",children:n.children};return!(c&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=a,t.deletions=null):(n=br(s,a),n.subtreeFlags=s.subtreeFlags&14680064),i!==null?o=br(i,o):(o=Gr(o,c,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,c=e.child.memoizedState,c=c===null?hc(r):{baseLanes:c.baseLanes|r,cachePool:null,transitions:c.transitions},o.memoizedState=c,o.childLanes=e.childLanes&~r,t.memoizedState=dc,n}return o=e.child,e=o.sibling,n=br(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Cu(e,t){return t=aa({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Oi(e,t,r,n){return n!==null&&uu(n),$n(t,e.child,null,r),e=Cu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yw(e,t,r,n,s,o,c){if(r)return t.flags&256?(t.flags&=-257,n=al(Error(Q(422))),Oi(e,t,c,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=aa({mode:"visible",children:n.children},s,0,null),o=Gr(o,s,c,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&$n(t,e.child,null,c),t.child.memoizedState=hc(c),t.memoizedState=dc,o);if(!(t.mode&1))return Oi(e,t,c,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var i=n.dgst;return n=i,o=Error(Q(419)),n=al(o,n,void 0),Oi(e,t,c,n)}if(i=(c&e.childLanes)!==0,Ge||i){if(n=De,n!==null){switch(c&-c){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|c)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Yt(e,s),Et(n,e,s,-1))}return Lu(),n=al(Error(Q(421))),Oi(e,t,c,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=c1.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,rt=yr(s.nextSibling),nt=t,ve=!0,bt=null,e!==null&&(dt[ht++]=Vt,dt[ht++]=Kt,dt[ht++]=Yr,Vt=e.id,Kt=e.overflow,Yr=t),t=Cu(t,n.children),t.flags|=4096,t)}function kh(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ic(e.return,t,r)}function ll(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function Om(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(He(e,t,n.children,r),n=_e.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kh(e,r,t);else if(e.tag===19)kh(e,r,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}n&=1}if(fe(_e,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&To(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),ll(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&To(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}ll(t,!0,r,null,o);break;case"together":ll(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function io(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Jr|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,r=br(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=br(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Qw(e,t,r){switch(t.tag){case 3:Nm(t),Hn();break;case 5:lm(t);break;case 1:Xe(t.type)&&bo(t);break;case 4:vu(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;fe(ko,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(fe(_e,_e.current&1),t.flags|=128,null):r&t.child.childLanes?Im(e,t,r):(fe(_e,_e.current&1),e=Qt(e,t,r),e!==null?e.sibling:null);fe(_e,_e.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Om(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),fe(_e,_e.current),n)break;return null;case 22:case 23:return t.lanes=0,Dm(e,t,r)}return Qt(e,t,r)}var jm,fc,Bm,Fm;jm=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};fc=function(){};Bm=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Vr(jt.current);var o=null;switch(r){case"input":s=Il(e,s),n=Il(e,n),o=[];break;case"select":s=Se({},s,{value:void 0}),n=Se({},n,{value:void 0}),o=[];break;case"textarea":s=Bl(e,s),n=Bl(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=wo)}Hl(r,n);var c;r=null;for(d in s)if(!n.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var i=s[d];for(c in i)i.hasOwnProperty(c)&&(r||(r={}),r[c]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Is.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in n){var a=n[d];if(i=s!=null?s[d]:void 0,n.hasOwnProperty(d)&&a!==i&&(a!=null||i!=null))if(d==="style")if(i){for(c in i)!i.hasOwnProperty(c)||a&&a.hasOwnProperty(c)||(r||(r={}),r[c]="");for(c in a)a.hasOwnProperty(c)&&i[c]!==a[c]&&(r||(r={}),r[c]=a[c])}else r||(o||(o=[]),o.push(d,r)),r=a;else d==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,i=i?i.__html:void 0,a!=null&&i!==a&&(o=o||[]).push(d,a)):d==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(d,""+a):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Is.hasOwnProperty(d)?(a!=null&&d==="onScroll"&&pe("scroll",e),o||i===a||(o=[])):(o=o||[]).push(d,a))}r&&(o=o||[]).push("style",r);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};Fm=function(e,t,r,n){r!==n&&(t.flags|=4)};function ps(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function je(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Jw(e,t,r){var n=t.pendingProps;switch(cu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return je(t),null;case 1:return Xe(t.type)&&xo(),je(t),null;case 3:return n=t.stateNode,zn(),me(qe),me(Fe),_u(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ni(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bt!==null&&(wc(bt),bt=null))),fc(e,t),je(t),null;case 5:gu(t);var s=Vr(Gs.current);if(r=t.type,e!==null&&t.stateNode!=null)Bm(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Q(166));return je(t),null}if(e=Vr(jt.current),Ni(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Mt]=t,n[Vs]=o,e=(t.mode&1)!==0,r){case"dialog":pe("cancel",n),pe("close",n);break;case"iframe":case"object":case"embed":pe("load",n);break;case"video":case"audio":for(s=0;s<xs.length;s++)pe(xs[s],n);break;case"source":pe("error",n);break;case"img":case"image":case"link":pe("error",n),pe("load",n);break;case"details":pe("toggle",n);break;case"input":Id(n,o),pe("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},pe("invalid",n);break;case"textarea":jd(n,o),pe("invalid",n)}Hl(r,o),s=null;for(var c in o)if(o.hasOwnProperty(c)){var i=o[c];c==="children"?typeof i=="string"?n.textContent!==i&&(o.suppressHydrationWarning!==!0&&Mi(n.textContent,i,e),s=["children",i]):typeof i=="number"&&n.textContent!==""+i&&(o.suppressHydrationWarning!==!0&&Mi(n.textContent,i,e),s=["children",""+i]):Is.hasOwnProperty(c)&&i!=null&&c==="onScroll"&&pe("scroll",n)}switch(r){case"input":Ei(n),Od(n,o,!0);break;case"textarea":Ei(n),Bd(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=wo)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{c=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=fp(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=c.createElement(r,{is:n.is}):(e=c.createElement(r),r==="select"&&(c=e,n.multiple?c.multiple=!0:n.size&&(c.size=n.size))):e=c.createElementNS(e,r),e[Mt]=t,e[Vs]=n,jm(e,t,!1,!1),t.stateNode=e;e:{switch(c=$l(r,n),r){case"dialog":pe("cancel",e),pe("close",e),s=n;break;case"iframe":case"object":case"embed":pe("load",e),s=n;break;case"video":case"audio":for(s=0;s<xs.length;s++)pe(xs[s],e);s=n;break;case"source":pe("error",e),s=n;break;case"img":case"image":case"link":pe("error",e),pe("load",e),s=n;break;case"details":pe("toggle",e),s=n;break;case"input":Id(e,n),s=Il(e,n),pe("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Se({},n,{value:void 0}),pe("invalid",e);break;case"textarea":jd(e,n),s=Bl(e,n),pe("invalid",e);break;default:s=n}Hl(r,s),i=s;for(o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="style"?vp(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&pp(e,a)):o==="children"?typeof a=="string"?(r!=="textarea"||a!=="")&&Os(e,a):typeof a=="number"&&Os(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Is.hasOwnProperty(o)?a!=null&&o==="onScroll"&&pe("scroll",e):a!=null&&qc(e,o,a,c))}switch(r){case"input":Ei(e),Od(e,n,!1);break;case"textarea":Ei(e),Bd(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Er(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Ln(e,!!n.multiple,o,!1):n.defaultValue!=null&&Ln(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=wo)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return je(t),null;case 6:if(e&&t.stateNode!=null)Fm(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Q(166));if(r=Vr(Gs.current),Vr(jt.current),Ni(t)){if(n=t.stateNode,r=t.memoizedProps,n[Mt]=t,(o=n.nodeValue!==r)&&(e=nt,e!==null))switch(e.tag){case 3:Mi(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mi(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Mt]=t,t.stateNode=n}return je(t),null;case 13:if(me(_e),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&rt!==null&&t.mode&1&&!(t.flags&128))nm(),Hn(),t.flags|=98560,o=!1;else if(o=Ni(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(Q(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Q(317));o[Mt]=t}else Hn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;je(t),o=!1}else bt!==null&&(wc(bt),bt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||_e.current&1?Te===0&&(Te=3):Lu())),t.updateQueue!==null&&(t.flags|=4),je(t),null);case 4:return zn(),fc(e,t),e===null&&Ws(t.stateNode.containerInfo),je(t),null;case 10:return fu(t.type._context),je(t),null;case 17:return Xe(t.type)&&xo(),je(t),null;case 19:if(me(_e),o=t.memoizedState,o===null)return je(t),null;if(n=(t.flags&128)!==0,c=o.rendering,c===null)if(n)ps(o,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=To(e),c!==null){for(t.flags|=128,ps(o,!1),n=c.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,c=o.alternate,c===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=c.childLanes,o.lanes=c.lanes,o.child=c.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=c.memoizedProps,o.memoizedState=c.memoizedState,o.updateQueue=c.updateQueue,o.type=c.type,e=c.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return fe(_e,_e.current&1|2),t.child}e=e.sibling}o.tail!==null&&xe()>Un&&(t.flags|=128,n=!0,ps(o,!1),t.lanes=4194304)}else{if(!n)if(e=To(c),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ps(o,!0),o.tail===null&&o.tailMode==="hidden"&&!c.alternate&&!ve)return je(t),null}else 2*xe()-o.renderingStartTime>Un&&r!==1073741824&&(t.flags|=128,n=!0,ps(o,!1),t.lanes=4194304);o.isBackwards?(c.sibling=t.child,t.child=c):(r=o.last,r!==null?r.sibling=c:t.child=c,o.last=c)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=xe(),t.sibling=null,r=_e.current,fe(_e,n?r&1|2:r&1),t):(je(t),null);case 22:case 23:return Tu(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?et&1073741824&&(je(t),t.subtreeFlags&6&&(t.flags|=8192)):je(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function Zw(e,t){switch(cu(t),t.tag){case 1:return Xe(t.type)&&xo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zn(),me(qe),me(Fe),_u(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gu(t),null;case 13:if(me(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Hn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(_e),null;case 4:return zn(),null;case 10:return fu(t.type._context),null;case 22:case 23:return Tu(),null;case 24:return null;default:return null}}var ji=!1,Be=!1,e1=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Pn(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){we(e,t,n)}else r.current=null}function pc(e,t,r){try{r()}catch(n){we(e,t,n)}}var Rh=!1;function t1(e,t){if(Ql=_o,e=Up(),au(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var c=0,i=-1,a=-1,d=0,m=0,u=e,v=null;t:for(;;){for(var y;u!==r||s!==0&&u.nodeType!==3||(i=c+s),u!==o||n!==0&&u.nodeType!==3||(a=c+n),u.nodeType===3&&(c+=u.nodeValue.length),(y=u.firstChild)!==null;)v=u,u=y;for(;;){if(u===e)break t;if(v===r&&++d===s&&(i=c),v===o&&++m===n&&(a=c),(y=u.nextSibling)!==null)break;u=v,v=u.parentNode}u=y}r=i===-1||a===-1?null:{start:i,end:a}}else r=null}r=r||{start:0,end:0}}else r=null;for(Jl={focusedElem:e,selectionRange:r},_o=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var g=S.memoizedProps,p=S.memoizedState,h=t.stateNode,l=h.getSnapshotBeforeUpdate(t.elementType===t.type?g:wt(t.type,g),p);h.__reactInternalSnapshotBeforeUpdate=l}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(_){we(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return S=Rh,Rh=!1,S}function As(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&pc(t,r,o)}s=s.next}while(s!==n)}}function ia(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function mc(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Hm(e){var t=e.alternate;t!==null&&(e.alternate=null,Hm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[Vs],delete t[tc],delete t[jw],delete t[Bw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $m(e){return e.tag===5||e.tag===3||e.tag===4}function Ph(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$m(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.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 vc(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=wo));else if(n!==4&&(e=e.child,e!==null))for(vc(e,t,r),e=e.sibling;e!==null;)vc(e,t,r),e=e.sibling}function gc(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(gc(e,t,r),e=e.sibling;e!==null;)gc(e,t,r),e=e.sibling}var Me=null,xt=!1;function ir(e,t,r){for(r=r.child;r!==null;)zm(e,t,r),r=r.sibling}function zm(e,t,r){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Qo,r)}catch{}switch(r.tag){case 5:Be||Pn(r,t);case 6:var n=Me,s=xt;Me=null,ir(e,t,r),Me=n,xt=s,Me!==null&&(xt?(e=Me,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Me.removeChild(r.stateNode));break;case 18:Me!==null&&(xt?(e=Me,r=r.stateNode,e.nodeType===8?tl(e.parentNode,r):e.nodeType===1&&tl(e,r),Hs(e)):tl(Me,r.stateNode));break;case 4:n=Me,s=xt,Me=r.stateNode.containerInfo,xt=!0,ir(e,t,r),Me=n,xt=s;break;case 0:case 11:case 14:case 15:if(!Be&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,c=o.destroy;o=o.tag,c!==void 0&&(o&2||o&4)&&pc(r,t,c),s=s.next}while(s!==n)}ir(e,t,r);break;case 1:if(!Be&&(Pn(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(i){we(r,t,i)}ir(e,t,r);break;case 21:ir(e,t,r);break;case 22:r.mode&1?(Be=(n=Be)||r.memoizedState!==null,ir(e,t,r),Be=n):ir(e,t,r);break;default:ir(e,t,r)}}function Th(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new e1),t.forEach(function(n){var s=u1.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function yt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,c=t,i=c;e:for(;i!==null;){switch(i.tag){case 5:Me=i.stateNode,xt=!1;break e;case 3:Me=i.stateNode.containerInfo,xt=!0;break e;case 4:Me=i.stateNode.containerInfo,xt=!0;break e}i=i.return}if(Me===null)throw Error(Q(160));zm(o,c,s),Me=null,xt=!1;var a=s.alternate;a!==null&&(a.return=null),s.return=null}catch(d){we(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wm(t,e),t=t.sibling}function Wm(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yt(t,e),At(e),n&4){try{As(3,e,e.return),ia(3,e)}catch(g){we(e,e.return,g)}try{As(5,e,e.return)}catch(g){we(e,e.return,g)}}break;case 1:yt(t,e),At(e),n&512&&r!==null&&Pn(r,r.return);break;case 5:if(yt(t,e),At(e),n&512&&r!==null&&Pn(r,r.return),e.flags&32){var s=e.stateNode;try{Os(s,"")}catch(g){we(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,c=r!==null?r.memoizedProps:o,i=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{i==="input"&&o.type==="radio"&&o.name!=null&&dp(s,o),$l(i,c);var d=$l(i,o);for(c=0;c<a.length;c+=2){var m=a[c],u=a[c+1];m==="style"?vp(s,u):m==="dangerouslySetInnerHTML"?pp(s,u):m==="children"?Os(s,u):qc(s,m,u,d)}switch(i){case"input":Ol(s,o);break;case"textarea":hp(s,o);break;case"select":var v=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?Ln(s,!!o.multiple,y,!1):v!==!!o.multiple&&(o.defaultValue!=null?Ln(s,!!o.multiple,o.defaultValue,!0):Ln(s,!!o.multiple,o.multiple?[]:"",!1))}s[Vs]=o}catch(g){we(e,e.return,g)}}break;case 6:if(yt(t,e),At(e),n&4){if(e.stateNode===null)throw Error(Q(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(g){we(e,e.return,g)}}break;case 3:if(yt(t,e),At(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Hs(t.containerInfo)}catch(g){we(e,e.return,g)}break;case 4:yt(t,e),At(e);break;case 13:yt(t,e),At(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Ru=xe())),n&4&&Th(e);break;case 22:if(m=r!==null&&r.memoizedState!==null,e.mode&1?(Be=(d=Be)||m,yt(t,e),Be=d):yt(t,e),At(e),n&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!m&&e.mode&1)for(Z=e,m=e.child;m!==null;){for(u=Z=m;Z!==null;){switch(v=Z,y=v.child,v.tag){case 0:case 11:case 14:case 15:As(4,v,v.return);break;case 1:Pn(v,v.return);var S=v.stateNode;if(typeof S.componentWillUnmount=="function"){n=v,r=v.return;try{t=n,S.props=t.memoizedProps,S.state=t.memoizedState,S.componentWillUnmount()}catch(g){we(n,r,g)}}break;case 5:Pn(v,v.return);break;case 22:if(v.memoizedState!==null){Ah(u);continue}}y!==null?(y.return=v,Z=y):Ah(u)}m=m.sibling}e:for(m=null,u=e;;){if(u.tag===5){if(m===null){m=u;try{s=u.stateNode,d?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(i=u.stateNode,a=u.memoizedProps.style,c=a!=null&&a.hasOwnProperty("display")?a.display:null,i.style.display=mp("display",c))}catch(g){we(e,e.return,g)}}}else if(u.tag===6){if(m===null)try{u.stateNode.nodeValue=d?"":u.memoizedProps}catch(g){we(e,e.return,g)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;m===u&&(m=null),u=u.return}m===u&&(m=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:yt(t,e),At(e),n&4&&Th(e);break;case 21:break;default:yt(t,e),At(e)}}function At(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if($m(r)){var n=r;break e}r=r.return}throw Error(Q(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Os(s,""),n.flags&=-33);var o=Ph(e);gc(e,o,s);break;case 3:case 4:var c=n.stateNode.containerInfo,i=Ph(e);vc(e,i,c);break;default:throw Error(Q(161))}}catch(a){we(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function r1(e,t,r){Z=e,Um(e)}function Um(e,t,r){for(var n=(e.mode&1)!==0;Z!==null;){var s=Z,o=s.child;if(s.tag===22&&n){var c=s.memoizedState!==null||ji;if(!c){var i=s.alternate,a=i!==null&&i.memoizedState!==null||Be;i=ji;var d=Be;if(ji=c,(Be=a)&&!d)for(Z=s;Z!==null;)c=Z,a=c.child,c.tag===22&&c.memoizedState!==null?Dh(s):a!==null?(a.return=c,Z=a):Dh(s);for(;o!==null;)Z=o,Um(o),o=o.sibling;Z=s,ji=i,Be=d}Lh(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Z=o):Lh(e)}}function Lh(e){for(;Z!==null;){var t=Z;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Be||ia(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Be)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:wt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ph(t,o,n);break;case 3:var c=t.updateQueue;if(c!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}ph(t,c,r)}break;case 5:var i=t.stateNode;if(r===null&&t.flags&4){r=i;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break;case"img":a.src&&(r.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var m=d.memoizedState;if(m!==null){var u=m.dehydrated;u!==null&&Hs(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Be||t.flags&512&&mc(t)}catch(v){we(t,t.return,v)}}if(t===e){Z=null;break}if(r=t.sibling,r!==null){r.return=t.return,Z=r;break}Z=t.return}}function Ah(e){for(;Z!==null;){var t=Z;if(t===e){Z=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Z=r;break}Z=t.return}}function Dh(e){for(;Z!==null;){var t=Z;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{ia(4,t)}catch(a){we(t,r,a)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(a){we(t,s,a)}}var o=t.return;try{mc(t)}catch(a){we(t,o,a)}break;case 5:var c=t.return;try{mc(t)}catch(a){we(t,c,a)}}}catch(a){we(t,t.return,a)}if(t===e){Z=null;break}var i=t.sibling;if(i!==null){i.return=t.return,Z=i;break}Z=t.return}}var n1=Math.ceil,Do=er.ReactCurrentDispatcher,Eu=er.ReactCurrentOwner,pt=er.ReactCurrentBatchConfig,ue=0,De=null,Ee=null,Ne=0,et=0,Tn=Ar(0),Te=0,Qs=null,Jr=0,oa=0,ku=0,Ds=null,Ke=null,Ru=0,Un=1/0,Wt=null,Mo=!1,_c=null,wr=null,Bi=!1,pr=null,No=0,Ms=0,yc=null,oo=-1,ao=0;function $e(){return ue&6?xe():oo!==-1?oo:oo=xe()}function xr(e){return e.mode&1?ue&2&&Ne!==0?Ne&-Ne:Hw.transition!==null?(ao===0&&(ao=Pp()),ao):(e=de,e!==0||(e=window.event,e=e===void 0?16:Ip(e.type)),e):1}function Et(e,t,r,n){if(50<Ms)throw Ms=0,yc=null,Error(Q(185));si(e,r,n),(!(ue&2)||e!==De)&&(e===De&&(!(ue&2)&&(oa|=r),Te===4&&hr(e,Ne)),Ye(e,n),r===1&&ue===0&&!(t.mode&1)&&(Un=xe()+500,ra&&Dr()))}function Ye(e,t){var r=e.callbackNode;HS(e,t);var n=go(e,e===De?Ne:0);if(n===0)r!==null&&$d(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&$d(r),t===1)e.tag===0?Fw(Mh.bind(null,e)):em(Mh.bind(null,e)),Iw(function(){!(ue&6)&&Dr()}),r=null;else{switch(Tp(n)){case 1:r=Zc;break;case 4:r=kp;break;case 16:r=vo;break;case 536870912:r=Rp;break;default:r=vo}r=Jm(r,Vm.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Vm(e,t){if(oo=-1,ao=0,ue&6)throw Error(Q(327));var r=e.callbackNode;if(In()&&e.callbackNode!==r)return null;var n=go(e,e===De?Ne:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Io(e,n);else{t=n;var s=ue;ue|=2;var o=Gm();(De!==e||Ne!==t)&&(Wt=null,Un=xe()+500,Kr(e,t));do try{o1();break}catch(i){Km(e,i)}while(!0);hu(),Do.current=o,ue=s,Ee!==null?t=0:(De=null,Ne=0,t=Te)}if(t!==0){if(t===2&&(s=Kl(e),s!==0&&(n=s,t=Sc(e,s))),t===1)throw r=Qs,Kr(e,0),hr(e,n),Ye(e,xe()),r;if(t===6)hr(e,n);else{if(s=e.current.alternate,!(n&30)&&!s1(s)&&(t=Io(e,n),t===2&&(o=Kl(e),o!==0&&(n=o,t=Sc(e,o))),t===1))throw r=Qs,Kr(e,0),hr(e,n),Ye(e,xe()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(Q(345));case 2:zr(e,Ke,Wt);break;case 3:if(hr(e,n),(n&130023424)===n&&(t=Ru+500-xe(),10<t)){if(go(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){$e(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ec(zr.bind(null,e,Ke,Wt),t);break}zr(e,Ke,Wt);break;case 4:if(hr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var c=31-Ct(n);o=1<<c,c=t[c],c>s&&(s=c),n&=~o}if(n=s,n=xe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*n1(n/1960))-n,10<n){e.timeoutHandle=ec(zr.bind(null,e,Ke,Wt),n);break}zr(e,Ke,Wt);break;case 5:zr(e,Ke,Wt);break;default:throw Error(Q(329))}}}return Ye(e,xe()),e.callbackNode===r?Vm.bind(null,e):null}function Sc(e,t){var r=Ds;return e.current.memoizedState.isDehydrated&&(Kr(e,t).flags|=256),e=Io(e,t),e!==2&&(t=Ke,Ke=r,t!==null&&wc(t)),e}function wc(e){Ke===null?Ke=e:Ke.push.apply(Ke,e)}function s1(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!kt(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 hr(e,t){for(t&=~ku,t&=~oa,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ct(t),n=1<<r;e[r]=-1,t&=~n}}function Mh(e){if(ue&6)throw Error(Q(327));In();var t=go(e,0);if(!(t&1))return Ye(e,xe()),null;var r=Io(e,t);if(e.tag!==0&&r===2){var n=Kl(e);n!==0&&(t=n,r=Sc(e,n))}if(r===1)throw r=Qs,Kr(e,0),hr(e,t),Ye(e,xe()),r;if(r===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zr(e,Ke,Wt),Ye(e,xe()),null}function Pu(e,t){var r=ue;ue|=1;try{return e(t)}finally{ue=r,ue===0&&(Un=xe()+500,ra&&Dr())}}function Zr(e){pr!==null&&pr.tag===0&&!(ue&6)&&In();var t=ue;ue|=1;var r=pt.transition,n=de;try{if(pt.transition=null,de=1,e)return e()}finally{de=n,pt.transition=r,ue=t,!(ue&6)&&Dr()}}function Tu(){et=Tn.current,me(Tn)}function Kr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Nw(r)),Ee!==null)for(r=Ee.return;r!==null;){var n=r;switch(cu(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&xo();break;case 3:zn(),me(qe),me(Fe),_u();break;case 5:gu(n);break;case 4:zn();break;case 13:me(_e);break;case 19:me(_e);break;case 10:fu(n.type._context);break;case 22:case 23:Tu()}r=r.return}if(De=e,Ee=e=br(e.current,null),Ne=et=t,Te=0,Qs=null,ku=oa=Jr=0,Ke=Ds=null,Ur!==null){for(t=0;t<Ur.length;t++)if(r=Ur[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var c=o.next;o.next=s,n.next=c}r.pending=n}Ur=null}return e}function Km(e,t){do{var r=Ee;try{if(hu(),no.current=Ao,Lo){for(var n=ye.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Lo=!1}if(Qr=0,Ae=Pe=ye=null,Ls=!1,qs=0,Eu.current=null,r===null||r.return===null){Te=1,Qs=t,Ee=null;break}e:{var o=e,c=r.return,i=r,a=t;if(t=Ne,i.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var d=a,m=i,u=m.tag;if(!(m.mode&1)&&(u===0||u===11||u===15)){var v=m.alternate;v?(m.updateQueue=v.updateQueue,m.memoizedState=v.memoizedState,m.lanes=v.lanes):(m.updateQueue=null,m.memoizedState=null)}var y=Sh(c);if(y!==null){y.flags&=-257,wh(y,c,i,o,t),y.mode&1&&yh(o,d,t),t=y,a=d;var S=t.updateQueue;if(S===null){var g=new Set;g.add(a),t.updateQueue=g}else S.add(a);break e}else{if(!(t&1)){yh(o,d,t),Lu();break e}a=Error(Q(426))}}else if(ve&&i.mode&1){var p=Sh(c);if(p!==null){!(p.flags&65536)&&(p.flags|=256),wh(p,c,i,o,t),uu(Wn(a,i));break e}}o=a=Wn(a,i),Te!==4&&(Te=2),Ds===null?Ds=[o]:Ds.push(o),o=c;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var h=Tm(o,a,t);fh(o,h);break e;case 1:i=a;var l=o.type,f=o.stateNode;if(!(o.flags&128)&&(typeof l.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(wr===null||!wr.has(f)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=Lm(o,i,t);fh(o,_);break e}}o=o.return}while(o!==null)}Xm(r)}catch(E){t=E,Ee===r&&r!==null&&(Ee=r=r.return);continue}break}while(!0)}function Gm(){var e=Do.current;return Do.current=Ao,e===null?Ao:e}function Lu(){(Te===0||Te===3||Te===2)&&(Te=4),De===null||!(Jr&268435455)&&!(oa&268435455)||hr(De,Ne)}function Io(e,t){var r=ue;ue|=2;var n=Gm();(De!==e||Ne!==t)&&(Wt=null,Kr(e,t));do try{i1();break}catch(s){Km(e,s)}while(!0);if(hu(),ue=r,Do.current=n,Ee!==null)throw Error(Q(261));return De=null,Ne=0,Te}function i1(){for(;Ee!==null;)qm(Ee)}function o1(){for(;Ee!==null&&!AS();)qm(Ee)}function qm(e){var t=Qm(e.alternate,e,et);e.memoizedProps=e.pendingProps,t===null?Xm(e):Ee=t,Eu.current=null}function Xm(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Zw(r,t),r!==null){r.flags&=32767,Ee=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Te=6,Ee=null;return}}else if(r=Jw(r,t,et),r!==null){Ee=r;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);Te===0&&(Te=5)}function zr(e,t,r){var n=de,s=pt.transition;try{pt.transition=null,de=1,a1(e,t,r,n)}finally{pt.transition=s,de=n}return null}function a1(e,t,r,n){do In();while(pr!==null);if(ue&6)throw Error(Q(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if($S(e,o),e===De&&(Ee=De=null,Ne=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Bi||(Bi=!0,Jm(vo,function(){return In(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=pt.transition,pt.transition=null;var c=de;de=1;var i=ue;ue|=4,Eu.current=null,t1(e,r),Wm(r,e),Rw(Jl),_o=!!Ql,Jl=Ql=null,e.current=r,r1(r),DS(),ue=i,de=c,pt.transition=o}else e.current=r;if(Bi&&(Bi=!1,pr=e,No=s),o=e.pendingLanes,o===0&&(wr=null),IS(r.stateNode),Ye(e,xe()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Mo)throw Mo=!1,e=_c,_c=null,e;return No&1&&e.tag!==0&&In(),o=e.pendingLanes,o&1?e===yc?Ms++:(Ms=0,yc=e):Ms=0,Dr(),null}function In(){if(pr!==null){var e=Tp(No),t=pt.transition,r=de;try{if(pt.transition=null,de=16>e?16:e,pr===null)var n=!1;else{if(e=pr,pr=null,No=0,ue&6)throw Error(Q(331));var s=ue;for(ue|=4,Z=e.current;Z!==null;){var o=Z,c=o.child;if(Z.flags&16){var i=o.deletions;if(i!==null){for(var a=0;a<i.length;a++){var d=i[a];for(Z=d;Z!==null;){var m=Z;switch(m.tag){case 0:case 11:case 15:As(8,m,o)}var u=m.child;if(u!==null)u.return=m,Z=u;else for(;Z!==null;){m=Z;var v=m.sibling,y=m.return;if(Hm(m),m===d){Z=null;break}if(v!==null){v.return=y,Z=v;break}Z=y}}}var S=o.alternate;if(S!==null){var g=S.child;if(g!==null){S.child=null;do{var p=g.sibling;g.sibling=null,g=p}while(g!==null)}}Z=o}}if(o.subtreeFlags&2064&&c!==null)c.return=o,Z=c;else e:for(;Z!==null;){if(o=Z,o.flags&2048)switch(o.tag){case 0:case 11:case 15:As(9,o,o.return)}var h=o.sibling;if(h!==null){h.return=o.return,Z=h;break e}Z=o.return}}var l=e.current;for(Z=l;Z!==null;){c=Z;var f=c.child;if(c.subtreeFlags&2064&&f!==null)f.return=c,Z=f;else e:for(c=l;Z!==null;){if(i=Z,i.flags&2048)try{switch(i.tag){case 0:case 11:case 15:ia(9,i)}}catch(E){we(i,i.return,E)}if(i===c){Z=null;break e}var _=i.sibling;if(_!==null){_.return=i.return,Z=_;break e}Z=i.return}}if(ue=s,Dr(),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Qo,e)}catch{}n=!0}return n}finally{de=r,pt.transition=t}}return!1}function Nh(e,t,r){t=Wn(r,t),t=Tm(e,t,1),e=Sr(e,t,1),t=$e(),e!==null&&(si(e,1,t),Ye(e,t))}function we(e,t,r){if(e.tag===3)Nh(e,e,r);else for(;t!==null;){if(t.tag===3){Nh(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(wr===null||!wr.has(n))){e=Wn(r,e),e=Lm(t,e,1),t=Sr(t,e,1),e=$e(),t!==null&&(si(t,1,e),Ye(t,e));break}}t=t.return}}function l1(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=$e(),e.pingedLanes|=e.suspendedLanes&r,De===e&&(Ne&r)===r&&(Te===4||Te===3&&(Ne&130023424)===Ne&&500>xe()-Ru?Kr(e,0):ku|=r),Ye(e,t)}function Ym(e,t){t===0&&(e.mode&1?(t=Pi,Pi<<=1,!(Pi&130023424)&&(Pi=4194304)):t=1);var r=$e();e=Yt(e,t),e!==null&&(si(e,t,r),Ye(e,r))}function c1(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Ym(e,r)}function u1(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Q(314))}n!==null&&n.delete(t),Ym(e,r)}var Qm;Qm=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ge=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ge=!1,Qw(e,t,r);Ge=!!(e.flags&131072)}else Ge=!1,ve&&t.flags&1048576&&tm(t,Eo,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;io(e,t),e=t.pendingProps;var s=Fn(t,Fe.current);Nn(t,r),s=Su(null,t,n,e,s,r);var o=wu();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xe(n)?(o=!0,bo(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,mu(t),s.updater=sa,t.stateNode=s,s._reactInternals=t,ac(t,n,e,r),t=uc(null,t,n,!0,o,r)):(t.tag=0,ve&&o&&lu(t),He(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(io(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=h1(n),e=wt(n,e),s){case 0:t=cc(null,t,n,e,r);break e;case 1:t=Ch(null,t,n,e,r);break e;case 11:t=xh(null,t,n,e,r);break e;case 14:t=bh(null,t,n,wt(n.type,e),r);break e}throw Error(Q(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:wt(n,s),cc(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:wt(n,s),Ch(e,t,n,s,r);case 3:e:{if(Nm(t),e===null)throw Error(Q(387));n=t.pendingProps,o=t.memoizedState,s=o.element,am(e,t),Po(t,n,null,r);var c=t.memoizedState;if(n=c.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Wn(Error(Q(423)),t),t=Eh(e,t,n,r,s);break e}else if(n!==s){s=Wn(Error(Q(424)),t),t=Eh(e,t,n,r,s);break e}else for(rt=yr(t.stateNode.containerInfo.firstChild),nt=t,ve=!0,bt=null,r=im(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Hn(),n===s){t=Qt(e,t,r);break e}He(e,t,n,r)}t=t.child}return t;case 5:return lm(t),e===null&&sc(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,c=s.children,Zl(n,s)?c=null:o!==null&&Zl(n,o)&&(t.flags|=32),Mm(e,t),He(e,t,c,r),t.child;case 6:return e===null&&sc(t),null;case 13:return Im(e,t,r);case 4:return vu(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=$n(t,null,n,r):He(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:wt(n,s),xh(e,t,n,s,r);case 7:return He(e,t,t.pendingProps,r),t.child;case 8:return He(e,t,t.pendingProps.children,r),t.child;case 12:return He(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,c=s.value,fe(ko,n._currentValue),n._currentValue=c,o!==null)if(kt(o.value,c)){if(o.children===s.children&&!qe.current){t=Qt(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var i=o.dependencies;if(i!==null){c=o.child;for(var a=i.firstContext;a!==null;){if(a.context===n){if(o.tag===1){a=Gt(-1,r&-r),a.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var m=d.pending;m===null?a.next=a:(a.next=m.next,m.next=a),d.pending=a}}o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),ic(o.return,r,t),i.lanes|=r;break}a=a.next}}else if(o.tag===10)c=o.type===t.type?null:o.child;else if(o.tag===18){if(c=o.return,c===null)throw Error(Q(341));c.lanes|=r,i=c.alternate,i!==null&&(i.lanes|=r),ic(c,r,t),c=o.sibling}else c=o.child;if(c!==null)c.return=o;else for(c=o;c!==null;){if(c===t){c=null;break}if(o=c.sibling,o!==null){o.return=c.return,c=o;break}c=c.return}o=c}He(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Nn(t,r),s=vt(s),n=n(s),t.flags|=1,He(e,t,n,r),t.child;case 14:return n=t.type,s=wt(n,t.pendingProps),s=wt(n.type,s),bh(e,t,n,s,r);case 15:return Am(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:wt(n,s),io(e,t),t.tag=1,Xe(n)?(e=!0,bo(t)):e=!1,Nn(t,r),Pm(t,n,s),ac(t,n,s,r),uc(null,t,n,!0,e,r);case 19:return Om(e,t,r);case 22:return Dm(e,t,r)}throw Error(Q(156,t.tag))};function Jm(e,t){return Ep(e,t)}function d1(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(e,t,r,n){return new d1(e,t,r,n)}function Au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function h1(e){if(typeof e=="function")return Au(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yc)return 11;if(e===Qc)return 14}return 2}function br(e,t){var r=e.alternate;return r===null?(r=ft(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function lo(e,t,r,n,s,o){var c=2;if(n=e,typeof e=="function")Au(e)&&(c=1);else if(typeof e=="string")c=5;else e:switch(e){case yn:return Gr(r.children,s,o,t);case Xc:c=8,s|=8;break;case Al:return e=ft(12,r,t,s|2),e.elementType=Al,e.lanes=o,e;case Dl:return e=ft(13,r,t,s),e.elementType=Dl,e.lanes=o,e;case Ml:return e=ft(19,r,t,s),e.elementType=Ml,e.lanes=o,e;case lp:return aa(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case op:c=10;break e;case ap:c=9;break e;case Yc:c=11;break e;case Qc:c=14;break e;case cr:c=16,n=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=ft(c,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Gr(e,t,r,n){return e=ft(7,e,n,t),e.lanes=r,e}function aa(e,t,r,n){return e=ft(22,e,n,t),e.elementType=lp,e.lanes=r,e.stateNode={isHidden:!1},e}function cl(e,t,r){return e=ft(6,e,null,t),e.lanes=r,e}function ul(e,t,r){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function f1(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ua(0),this.expirationTimes=Ua(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ua(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Du(e,t,r,n,s,o,c,i,a){return e=new f1(e,t,r,i,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ft(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},mu(o),e}function p1(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_n,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Zm(e){if(!e)return kr;e=e._reactInternals;e:{if(an(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Xe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var r=e.type;if(Xe(r))return Zp(e,r,t)}return t}function ev(e,t,r,n,s,o,c,i,a){return e=Du(r,n,!0,e,s,o,c,i,a),e.context=Zm(null),r=e.current,n=$e(),s=xr(r),o=Gt(n,s),o.callback=t??null,Sr(r,o,s),e.current.lanes=s,si(e,s,n),Ye(e,n),e}function la(e,t,r,n){var s=t.current,o=$e(),c=xr(s);return r=Zm(r),t.context===null?t.context=r:t.pendingContext=r,t=Gt(o,c),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Sr(s,t,c),e!==null&&(Et(e,s,c,o),ro(e,s,c)),c}function Oo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ih(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Mu(e,t){Ih(e,t),(e=e.alternate)&&Ih(e,t)}function m1(){return null}var tv=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nu(e){this._internalRoot=e}ca.prototype.render=Nu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));la(e,t,null,null)};ca.prototype.unmount=Nu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zr(function(){la(null,e,null,null)}),t[Xt]=null}};function ca(e){this._internalRoot=e}ca.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dp();e={blockedOn:null,target:e,priority:t};for(var r=0;r<dr.length&&t!==0&&t<dr[r].priority;r++);dr.splice(r,0,e),r===0&&Np(e)}};function Iu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ua(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Oh(){}function v1(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var d=Oo(c);o.call(d)}}var c=ev(t,n,e,0,null,!1,!1,"",Oh);return e._reactRootContainer=c,e[Xt]=c.current,Ws(e.nodeType===8?e.parentNode:e),Zr(),c}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var i=n;n=function(){var d=Oo(a);i.call(d)}}var a=Du(e,0,!1,null,null,!1,!1,"",Oh);return e._reactRootContainer=a,e[Xt]=a.current,Ws(e.nodeType===8?e.parentNode:e),Zr(function(){la(t,a,r,n)}),a}function da(e,t,r,n,s){var o=r._reactRootContainer;if(o){var c=o;if(typeof s=="function"){var i=s;s=function(){var a=Oo(c);i.call(a)}}la(t,c,e,s)}else c=v1(r,t,e,s,n);return Oo(c)}Lp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ws(t.pendingLanes);r!==0&&(eu(t,r|1),Ye(t,xe()),!(ue&6)&&(Un=xe()+500,Dr()))}break;case 13:Zr(function(){var n=Yt(e,1);if(n!==null){var s=$e();Et(n,e,1,s)}}),Mu(e,1)}};tu=function(e){if(e.tag===13){var t=Yt(e,134217728);if(t!==null){var r=$e();Et(t,e,134217728,r)}Mu(e,134217728)}};Ap=function(e){if(e.tag===13){var t=xr(e),r=Yt(e,t);if(r!==null){var n=$e();Et(r,e,t,n)}Mu(e,t)}};Dp=function(){return de};Mp=function(e,t){var r=de;try{return de=e,t()}finally{de=r}};Wl=function(e,t,r){switch(t){case"input":if(Ol(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=ta(n);if(!s)throw Error(Q(90));up(n),Ol(n,s)}}}break;case"textarea":hp(e,r);break;case"select":t=r.value,t!=null&&Ln(e,!!r.multiple,t,!1)}};yp=Pu;Sp=Zr;var g1={usingClientEntryPoint:!1,Events:[oi,bn,ta,gp,_p,Pu]},ms={findFiberByHostInstance:Wr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_1={bundleType:ms.bundleType,version:ms.version,rendererPackageName:ms.rendererPackageName,rendererConfig:ms.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:er.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=bp(e),e===null?null:e.stateNode},findFiberByHostInstance:ms.findFiberByHostInstance||m1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fi.isDisabled&&Fi.supportsFiber)try{Qo=Fi.inject(_1),Ot=Fi}catch{}}at.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g1;at.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Iu(t))throw Error(Q(200));return p1(e,t,null,r)};at.createRoot=function(e,t){if(!Iu(e))throw Error(Q(299));var r=!1,n="",s=tv;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Du(e,1,!1,null,null,r,!1,n,s),e[Xt]=t.current,Ws(e.nodeType===8?e.parentNode:e),new Nu(t)};at.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=bp(t),e=e===null?null:e.stateNode,e};at.flushSync=function(e){return Zr(e)};at.hydrate=function(e,t,r){if(!ua(t))throw Error(Q(200));return da(null,e,t,!0,r)};at.hydrateRoot=function(e,t,r){if(!Iu(e))throw Error(Q(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",c=tv;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(c=r.onRecoverableError)),t=ev(t,null,e,1,r??null,s,!1,o,c),e[Xt]=t.current,Ws(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new ca(t)};at.render=function(e,t,r){if(!ua(t))throw Error(Q(200));return da(null,e,t,!1,r)};at.unmountComponentAtNode=function(e){if(!ua(e))throw Error(Q(40));return e._reactRootContainer?(Zr(function(){da(null,null,e,!1,function(){e._reactRootContainer=null,e[Xt]=null})}),!0):!1};at.unstable_batchedUpdates=Pu;at.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!ua(r))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return da(e,t,r,!1,n)};at.version="18.3.1-next-f1338f8080-20240426";function rv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rv)}catch(e){console.error(e)}}rv(),rp.exports=at;var Jn=rp.exports;const y1=Uf(Jn);var jh=Jn;Tl.createRoot=jh.createRoot,Tl.hydrateRoot=jh.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function Js(){return Js=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Js.apply(this,arguments)}var mr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(mr||(mr={}));const Bh="popstate";function S1(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:c,hash:i}=n.location;return xc("",{pathname:o,search:c,hash:i},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:nv(s)}return x1(t,r,null,e)}function ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ou(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function w1(){return Math.random().toString(36).substr(2,8)}function Fh(e,t){return{usr:e.state,key:e.key,idx:t}}function xc(e,t,r,n){return r===void 0&&(r=null),Js({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Zn(t):t,{state:r,key:t&&t.key||n||w1()})}function nv(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Zn(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function x1(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,c=s.history,i=mr.Pop,a=null,d=m();d==null&&(d=0,c.replaceState(Js({},c.state,{idx:d}),""));function m(){return(c.state||{idx:null}).idx}function u(){i=mr.Pop;let p=m(),h=p==null?null:p-d;d=p,a&&a({action:i,location:g.location,delta:h})}function v(p,h){i=mr.Push;let l=xc(g.location,p,h);d=m()+1;let f=Fh(l,d),_=g.createHref(l);try{c.pushState(f,"",_)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(_)}o&&a&&a({action:i,location:g.location,delta:1})}function y(p,h){i=mr.Replace;let l=xc(g.location,p,h);d=m();let f=Fh(l,d),_=g.createHref(l);c.replaceState(f,"",_),o&&a&&a({action:i,location:g.location,delta:0})}function S(p){let h=s.location.origin!=="null"?s.location.origin:s.location.href,l=typeof p=="string"?p:nv(p);return l=l.replace(/ $/,"%20"),ke(h,"No window.location.(origin|href) available to create URL for href: "+l),new URL(l,h)}let g={get action(){return i},get location(){return e(s,c)},listen(p){if(a)throw new Error("A history only accepts one active listener");return s.addEventListener(Bh,u),a=p,()=>{s.removeEventListener(Bh,u),a=null}},createHref(p){return t(s,p)},createURL:S,encodeLocation(p){let h=S(p);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:v,replace:y,go(p){return c.go(p)}};return g}var Hh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Hh||(Hh={}));function b1(e,t,r){return r===void 0&&(r="/"),C1(e,t,r)}function C1(e,t,r,n){let s=typeof t=="string"?Zn(t):t,o=ov(s.pathname||"/",r);if(o==null)return null;let c=sv(e);E1(c);let i=null;for(let a=0;i==null&&a<c.length;++a){let d=j1(o);i=N1(c[a],d)}return i}function sv(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,c,i)=>{let a={relativePath:i===void 0?o.path||"":i,caseSensitive:o.caseSensitive===!0,childrenIndex:c,route:o};a.relativePath.startsWith("/")&&(ke(a.relativePath.startsWith(n),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(n.length));let d=qr([n,a.relativePath]),m=r.concat(a);o.children&&o.children.length>0&&(ke(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),sv(o.children,t,m,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:D1(d,o.index),routesMeta:m})};return e.forEach((o,c)=>{var i;if(o.path===""||!((i=o.path)!=null&&i.includes("?")))s(o,c);else for(let a of iv(o.path))s(o,c,a)}),t}function iv(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let c=iv(n.join("/")),i=[];return i.push(...c.map(a=>a===""?o:[o,a].join("/"))),s&&i.push(...c),i.map(a=>e.startsWith("/")&&a===""?"/":a)}function E1(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:M1(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const k1=/^:[\w-]+$/,R1=3,P1=2,T1=1,L1=10,A1=-2,$h=e=>e==="*";function D1(e,t){let r=e.split("/"),n=r.length;return r.some($h)&&(n+=A1),t&&(n+=P1),r.filter(s=>!$h(s)).reduce((s,o)=>s+(k1.test(o)?R1:o===""?T1:L1),n)}function M1(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function N1(e,t,r){let{routesMeta:n}=e,s={},o="/",c=[];for(let i=0;i<n.length;++i){let a=n[i],d=i===n.length-1,m=o==="/"?t:t.slice(o.length)||"/",u=I1({path:a.relativePath,caseSensitive:a.caseSensitive,end:d},m),v=a.route;if(!u)return null;Object.assign(s,u.params),c.push({params:s,pathname:qr([o,u.pathname]),pathnameBase:z1(qr([o,u.pathnameBase])),route:v}),u.pathnameBase!=="/"&&(o=qr([o,u.pathnameBase]))}return c}function I1(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=O1(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),i=s.slice(1);return{params:n.reduce((d,m,u)=>{let{paramName:v,isOptional:y}=m;if(v==="*"){let g=i[u]||"";c=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const S=i[u];return y&&!S?d[v]=void 0:d[v]=(S||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:c,pattern:e}}function O1(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Ou(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,i,a)=>(n.push({paramName:i,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function j1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ou(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ov(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const B1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,F1=e=>B1.test(e);function H1(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Zn(e):e,o;if(r)if(F1(r))o=r;else{if(r.includes("//")){let c=r;r=r.replace(/\/\/+/g,"/"),Ou(!1,"Pathnames cannot have embedded double slashes - normalizing "+(c+" -> "+r))}r.startsWith("/")?o=zh(r.substring(1),"/"):o=zh(r,t)}else o=t;return{pathname:o,search:W1(n),hash:U1(s)}}function zh(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function dl(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function $1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function av(e,t){let r=$1(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function lv(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Zn(e):(s=Js({},e),ke(!s.pathname||!s.pathname.includes("?"),dl("?","pathname","search",s)),ke(!s.pathname||!s.pathname.includes("#"),dl("#","pathname","hash",s)),ke(!s.search||!s.search.includes("#"),dl("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,i;if(c==null)i=r;else{let u=t.length-1;if(!n&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),u-=1;s.pathname=v.join("/")}i=u>=0?t[u]:"/"}let a=H1(s,i),d=c&&c!=="/"&&c.endsWith("/"),m=(o||c===".")&&r.endsWith("/");return!a.pathname.endsWith("/")&&(d||m)&&(a.pathname+="/"),a}const qr=e=>e.join("/").replace(/\/\/+/g,"/"),z1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),W1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,U1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function V1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const cv=["post","put","patch","delete"];new Set(cv);const K1=["get",...cv];new Set(K1);/**
|
|
50
|
+
* React Router v6.30.3
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function Zs(){return Zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zs.apply(this,arguments)}const ju=b.createContext(null),G1=b.createContext(null),li=b.createContext(null),ha=b.createContext(null),ln=b.createContext({outlet:null,matches:[],isDataRoute:!1}),uv=b.createContext(null);function ci(){return b.useContext(ha)!=null}function Bu(){return ci()||ke(!1),b.useContext(ha).location}function dv(e){b.useContext(li).static||b.useLayoutEffect(e)}function q1(){let{isDataRoute:e}=b.useContext(ln);return e?ax():X1()}function X1(){ci()||ke(!1);let e=b.useContext(ju),{basename:t,future:r,navigator:n}=b.useContext(li),{matches:s}=b.useContext(ln),{pathname:o}=Bu(),c=JSON.stringify(av(s,r.v7_relativeSplatPath)),i=b.useRef(!1);return dv(()=>{i.current=!0}),b.useCallback(function(d,m){if(m===void 0&&(m={}),!i.current)return;if(typeof d=="number"){n.go(d);return}let u=lv(d,JSON.parse(c),o,m.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:qr([t,u.pathname])),(m.replace?n.replace:n.push)(u,m.state,m)},[t,n,c,o,e])}function Y1(e,t){return Q1(e,t)}function Q1(e,t,r,n){ci()||ke(!1);let{navigator:s}=b.useContext(li),{matches:o}=b.useContext(ln),c=o[o.length-1],i=c?c.params:{};c&&c.pathname;let a=c?c.pathnameBase:"/";c&&c.route;let d=Bu(),m;if(t){var u;let p=typeof t=="string"?Zn(t):t;a==="/"||(u=p.pathname)!=null&&u.startsWith(a)||ke(!1),m=p}else m=d;let v=m.pathname||"/",y=v;if(a!=="/"){let p=a.replace(/^\//,"").split("/");y="/"+v.replace(/^\//,"").split("/").slice(p.length).join("/")}let S=b1(e,{pathname:y}),g=rx(S&&S.map(p=>Object.assign({},p,{params:Object.assign({},i,p.params),pathname:qr([a,s.encodeLocation?s.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?a:qr([a,s.encodeLocation?s.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),o,r,n);return t&&g?b.createElement(ha.Provider,{value:{location:Zs({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:mr.Pop}},g):g}function J1(){let e=ox(),t=V1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),r?b.createElement("pre",{style:s},r):null,null)}const Z1=b.createElement(J1,null);class ex extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?b.createElement(ln.Provider,{value:this.props.routeContext},b.createElement(uv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tx(e){let{routeContext:t,match:r,children:n}=e,s=b.useContext(ju);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(ln.Provider,{value:t},n)}function rx(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let c=e,i=(s=r)==null?void 0:s.errors;if(i!=null){let m=c.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);m>=0||ke(!1),c=c.slice(0,Math.min(c.length,m+1))}let a=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let m=0;m<c.length;m++){let u=c[m];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(d=m),u.route.id){let{loaderData:v,errors:y}=r,S=u.route.loader&&v[u.route.id]===void 0&&(!y||y[u.route.id]===void 0);if(u.route.lazy||S){a=!0,d>=0?c=c.slice(0,d+1):c=[c[0]];break}}}return c.reduceRight((m,u,v)=>{let y,S=!1,g=null,p=null;r&&(y=i&&u.route.id?i[u.route.id]:void 0,g=u.route.errorElement||Z1,a&&(d<0&&v===0?(lx("route-fallback"),S=!0,p=null):d===v&&(S=!0,p=u.route.hydrateFallbackElement||null)));let h=t.concat(c.slice(0,v+1)),l=()=>{let f;return y?f=g:S?f=p:u.route.Component?f=b.createElement(u.route.Component,null):u.route.element?f=u.route.element:f=m,b.createElement(tx,{match:u,routeContext:{outlet:m,matches:h,isDataRoute:r!=null},children:f})};return r&&(u.route.ErrorBoundary||u.route.errorElement||v===0)?b.createElement(ex,{location:r.location,revalidation:r.revalidation,component:g,error:y,children:l(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):l()},null)}var hv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(hv||{}),fv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fv||{});function nx(e){let t=b.useContext(ju);return t||ke(!1),t}function sx(e){let t=b.useContext(G1);return t||ke(!1),t}function ix(e){let t=b.useContext(ln);return t||ke(!1),t}function pv(e){let t=ix(),r=t.matches[t.matches.length-1];return r.route.id||ke(!1),r.route.id}function ox(){var e;let t=b.useContext(uv),r=sx(),n=pv();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function ax(){let{router:e}=nx(hv.UseNavigateStable),t=pv(fv.UseNavigateStable),r=b.useRef(!1);return dv(()=>{r.current=!0}),b.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Zs({fromRouteId:t},o)))},[e,t])}const Wh={};function lx(e,t,r){Wh[e]||(Wh[e]=!0)}function cx(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Uh(e){let{to:t,replace:r,state:n,relative:s}=e;ci()||ke(!1);let{future:o,static:c}=b.useContext(li),{matches:i}=b.useContext(ln),{pathname:a}=Bu(),d=q1(),m=lv(t,av(i,o.v7_relativeSplatPath),a,s==="path"),u=JSON.stringify(m);return b.useEffect(()=>d(JSON.parse(u),{replace:r,state:n,relative:s}),[d,u,s,r,n]),null}function bc(e){ke(!1)}function ux(e){let{basename:t="/",children:r=null,location:n,navigationType:s=mr.Pop,navigator:o,static:c=!1,future:i}=e;ci()&&ke(!1);let a=t.replace(/^\/*/,"/"),d=b.useMemo(()=>({basename:a,navigator:o,static:c,future:Zs({v7_relativeSplatPath:!1},i)}),[a,i,o,c]);typeof n=="string"&&(n=Zn(n));let{pathname:m="/",search:u="",hash:v="",state:y=null,key:S="default"}=n,g=b.useMemo(()=>{let p=ov(m,a);return p==null?null:{location:{pathname:p,search:u,hash:v,state:y,key:S},navigationType:s}},[a,m,u,v,y,S,s]);return g==null?null:b.createElement(li.Provider,{value:d},b.createElement(ha.Provider,{children:r,value:g}))}function dx(e){let{children:t,location:r}=e;return Y1(Cc(t),r)}new Promise(()=>{});function Cc(e,t){t===void 0&&(t=[]);let r=[];return b.Children.forEach(e,(n,s)=>{if(!b.isValidElement(n))return;let o=[...t,s];if(n.type===b.Fragment){r.push.apply(r,Cc(n.props.children,o));return}n.type!==bc&&ke(!1),!n.props.index||!n.props.children||ke(!1);let c={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(c.children=Cc(n.props.children,o)),r.push(c)}),r}/**
|
|
59
|
+
* React Router DOM v6.30.3
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/const hx="6";try{window.__reactRouterVersion=hx}catch{}const fx="startTransition",Vh=Yo[fx];function px(e){let{basename:t,children:r,future:n,window:s}=e,o=b.useRef();o.current==null&&(o.current=S1({window:s,v5Compat:!0}));let c=o.current,[i,a]=b.useState({action:c.action,location:c.location}),{v7_startTransition:d}=n||{},m=b.useCallback(u=>{d&&Vh?Vh(()=>a(u)):a(u)},[a,d]);return b.useLayoutEffect(()=>c.listen(m),[c,m]),b.useEffect(()=>cx(n),[n]),b.createElement(ux,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:c,future:n})}var Kh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Kh||(Kh={}));var Gh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Gh||(Gh={}));const mv=b.createContext({theme:"system",resolvedTheme:"light",setTheme:()=>{}});function mx(){return b.useContext(mv)}function vx(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function qh(e){return e==="system"?vx():e}function gx({children:e}){const[t,r]=b.useState(()=>localStorage.getItem("launchpod-theme")||"system"),[n,s]=b.useState(()=>qh(localStorage.getItem("launchpod-theme")||"system")),o=b.useCallback(i=>{const a=qh(i);s(a),document.documentElement.classList.toggle("dark",a==="dark")},[]),c=b.useCallback(i=>{r(i),localStorage.setItem("launchpod-theme",i),o(i)},[o]);return b.useEffect(()=>{o(t);const i=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>{t==="system"&&o("system")};return i.addEventListener("change",a),()=>i.removeEventListener("change",a)},[t,o]),x.jsx(mv.Provider,{value:{theme:t,resolvedTheme:n,setTheme:c},children:e})}function vv(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=vv(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function gv(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=vv(e))&&(n&&(n+=" "),n+=t);return n}const _x=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},yx=(e,t)=>({classGroupId:e,validator:t}),_v=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),jo="-",Xh=[],Sx="arbitrary..",wx=e=>{const t=bx(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return xx(c);const i=c.split(jo),a=i[0]===""&&i.length>1?1:0;return yv(i,a,t)},getConflictingClassGroupIds:(c,i)=>{if(i){const a=n[c],d=r[c];return a?d?_x(d,a):a:d||Xh}return r[c]||Xh}}},yv=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],o=r.nextPart.get(s);if(o){const d=yv(e,t+1,o);if(d)return d}const c=r.validators;if(c===null)return;const i=t===0?e.join(jo):e.slice(t).join(jo),a=c.length;for(let d=0;d<a;d++){const m=c[d];if(m.validator(i))return m.classGroupId}},xx=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Sx+n:void 0})(),bx=e=>{const{theme:t,classGroups:r}=e;return Cx(r,t)},Cx=(e,t)=>{const r=_v();for(const n in e){const s=e[n];Fu(s,r,n,t)}return r},Fu=(e,t,r,n)=>{const s=e.length;for(let o=0;o<s;o++){const c=e[o];Ex(c,t,r,n)}},Ex=(e,t,r,n)=>{if(typeof e=="string"){kx(e,t,r);return}if(typeof e=="function"){Rx(e,t,r,n);return}Px(e,t,r,n)},kx=(e,t,r)=>{const n=e===""?t:Sv(t,e);n.classGroupId=r},Rx=(e,t,r,n)=>{if(Tx(e)){Fu(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(yx(r,e))},Px=(e,t,r,n)=>{const s=Object.entries(e),o=s.length;for(let c=0;c<o;c++){const[i,a]=s[c];Fu(a,Sv(t,i),r,n)}},Sv=(e,t)=>{let r=e;const n=t.split(jo),s=n.length;for(let o=0;o<s;o++){const c=n[o];let i=r.nextPart.get(c);i||(i=_v(),r.nextPart.set(c,i)),r=i}return r},Tx=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Lx=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(o,c)=>{r[o]=c,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let c=r[o];if(c!==void 0)return c;if((c=n[o])!==void 0)return s(o,c),c},set(o,c){o in r?r[o]=c:s(o,c)}}},Ec="!",Yh=":",Ax=[],Qh=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Dx=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const o=[];let c=0,i=0,a=0,d;const m=s.length;for(let g=0;g<m;g++){const p=s[g];if(c===0&&i===0){if(p===Yh){o.push(s.slice(a,g)),a=g+1;continue}if(p==="/"){d=g;continue}}p==="["?c++:p==="]"?c--:p==="("?i++:p===")"&&i--}const u=o.length===0?s:s.slice(a);let v=u,y=!1;u.endsWith(Ec)?(v=u.slice(0,-1),y=!0):u.startsWith(Ec)&&(v=u.slice(1),y=!0);const S=d&&d>a?d-a:void 0;return Qh(o,y,v,S)};if(t){const s=t+Yh,o=n;n=c=>c.startsWith(s)?o(c.slice(s.length)):Qh(Ax,!1,c,void 0,!0)}if(r){const s=n;n=o=>r({className:o,parseClassName:s})}return n},Mx=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let o=0;o<r.length;o++){const c=r[o],i=c[0]==="[",a=t.has(c);i||a?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(c)):s.push(c)}return s.length>0&&(s.sort(),n.push(...s)),n}},Nx=e=>({cache:Lx(e.cacheSize),parseClassName:Dx(e),sortModifiers:Mx(e),...wx(e)}),Ix=/\s+/,Ox=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o}=t,c=[],i=e.trim().split(Ix);let a="";for(let d=i.length-1;d>=0;d-=1){const m=i[d],{isExternal:u,modifiers:v,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:g}=r(m);if(u){a=m+(a.length>0?" "+a:a);continue}let p=!!g,h=n(p?S.substring(0,g):S);if(!h){if(!p){a=m+(a.length>0?" "+a:a);continue}if(h=n(S),!h){a=m+(a.length>0?" "+a:a);continue}p=!1}const l=v.length===0?"":v.length===1?v[0]:o(v).join(":"),f=y?l+Ec:l,_=f+h;if(c.indexOf(_)>-1)continue;c.push(_);const E=s(h,p);for(let k=0;k<E.length;++k){const C=E[k];c.push(f+C)}a=m+(a.length>0?" "+a:a)}return a},jx=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=wv(r))&&(s&&(s+=" "),s+=n);return s},wv=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=wv(e[n]))&&(r&&(r+=" "),r+=t);return r},Bx=(e,...t)=>{let r,n,s,o;const c=a=>{const d=t.reduce((m,u)=>u(m),e());return r=Nx(d),n=r.cache.get,s=r.cache.set,o=i,i(a)},i=a=>{const d=n(a);if(d)return d;const m=Ox(a,r);return s(a,m),m};return o=c,(...a)=>o(jx(...a))},Fx=[],Re=e=>{const t=r=>r[e]||Fx;return t.isThemeGetter=!0,t},xv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hx=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,$x=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zx=/\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$/,Wx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ux=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,or=e=>Hx.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),ar=e=>!!e&&Number.isInteger(Number(e)),hl=e=>e.endsWith("%")&&ae(e.slice(0,-1)),zt=e=>$x.test(e),Cv=()=>!0,Kx=e=>zx.test(e)&&!Wx.test(e),Hu=()=>!1,Gx=e=>Ux.test(e),qx=e=>Vx.test(e),Xx=e=>!ee(e)&&!te(e),Yx=e=>Mr(e,Rv,Hu),ee=e=>xv.test(e),Fr=e=>Mr(e,Pv,Kx),Jh=e=>Mr(e,sb,ae),Qx=e=>Mr(e,Lv,Cv),Jx=e=>Mr(e,Tv,Hu),Zh=e=>Mr(e,Ev,Hu),Zx=e=>Mr(e,kv,qx),Hi=e=>Mr(e,Av,Gx),te=e=>bv.test(e),vs=e=>cn(e,Pv),eb=e=>cn(e,Tv),ef=e=>cn(e,Ev),tb=e=>cn(e,Rv),rb=e=>cn(e,kv),$i=e=>cn(e,Av,!0),nb=e=>cn(e,Lv,!0),Mr=(e,t,r)=>{const n=xv.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},cn=(e,t,r=!1)=>{const n=bv.exec(e);return n?n[1]?t(n[1]):r:!1},Ev=e=>e==="position"||e==="percentage",kv=e=>e==="image"||e==="url",Rv=e=>e==="length"||e==="size"||e==="bg-size",Pv=e=>e==="length",sb=e=>e==="number",Tv=e=>e==="family-name",Lv=e=>e==="number"||e==="weight",Av=e=>e==="shadow",ib=()=>{const e=Re("color"),t=Re("font"),r=Re("text"),n=Re("font-weight"),s=Re("tracking"),o=Re("leading"),c=Re("breakpoint"),i=Re("container"),a=Re("spacing"),d=Re("radius"),m=Re("shadow"),u=Re("inset-shadow"),v=Re("text-shadow"),y=Re("drop-shadow"),S=Re("blur"),g=Re("perspective"),p=Re("aspect"),h=Re("ease"),l=Re("animate"),f=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[..._(),te,ee],k=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],w=()=>[te,ee,a],P=()=>[or,"full","auto",...w()],T=()=>[ar,"none","subgrid",te,ee],M=()=>["auto",{span:["full",ar,te,ee]},ar,te,ee],j=()=>[ar,"auto",te,ee],N=()=>["auto","min","max","fr",te,ee],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...w()],q=()=>[or,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],B=()=>[or,"screen","full","dvw","lvw","svw","min","max","fit",...w()],R=()=>[or,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],L=()=>[e,te,ee],I=()=>[..._(),ef,Zh,{position:[te,ee]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",tb,Yx,{size:[te,ee]}],H=()=>[hl,vs,Fr],U=()=>["","none","full",d,te,ee],G=()=>["",ae,vs,Fr],O=()=>["solid","dashed","dotted","double"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[ae,hl,ef,Zh],$=()=>["","none",S,te,ee],Y=()=>["none",ae,te,ee],X=()=>["none",ae,te,ee],ne=()=>[ae,te,ee],oe=()=>[or,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zt],breakpoint:[zt],color:[Cv],container:[zt],"drop-shadow":[zt],ease:["in","out","in-out"],font:[Xx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zt],shadow:[zt],spacing:["px",ae],text:[zt],"text-shadow":[zt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",or,ee,te,p]}],container:["container"],columns:[{columns:[ae,ee,te,i]}],"break-after":[{"break-after":f()}],"break-before":[{"break-before":f()}],"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:E()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ar,"auto",te,ee]}],basis:[{basis:[or,"full","auto",i,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,or,"auto","initial","none",ee]}],grow:[{grow:["",ae,te,ee]}],shrink:[{shrink:["",ae,te,ee]}],order:[{order:[ar,"first","last","none",te,ee]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...R()]}],"min-block-size":[{"min-block":["auto",...R()]}],"max-block-size":[{"max-block":["none",...R()]}],w:[{w:[i,"screen",...q()]}],"min-w":[{"min-w":[i,"screen","none",...q()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[c]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",r,vs,Fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,nb,Qx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hl,ee]}],"font-family":[{font:[eb,Jx,t]}],"font-features":[{"font-features":[ee]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,te,ee]}],"line-clamp":[{"line-clamp":[ae,"none",te,Jh]}],leading:[{leading:[o,...w()]}],"list-image":[{"list-image":["none",te,ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",te,ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",te,Fr]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[ae,"auto",te,ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te,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",te,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:I()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ar,te,ee],radial:["",te,ee],conic:[ar,te,ee]},rb,Zx]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-bs":[{"border-bs":G()}],"border-w-be":[{"border-be":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ae,te,ee]}],"outline-w":[{outline:["",ae,vs,Fr]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",m,$i,Hi]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",u,$i,Hi]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[ae,Fr]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",v,$i,Hi]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[ae,te,ee]}],"mix-blend":[{"mix-blend":[...A(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":A()}],"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":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[te,ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",te,ee]}],filter:[{filter:["","none",te,ee]}],blur:[{blur:$()}],brightness:[{brightness:[ae,te,ee]}],contrast:[{contrast:[ae,te,ee]}],"drop-shadow":[{"drop-shadow":["","none",y,$i,Hi]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",ae,te,ee]}],"hue-rotate":[{"hue-rotate":[ae,te,ee]}],invert:[{invert:["",ae,te,ee]}],saturate:[{saturate:[ae,te,ee]}],sepia:[{sepia:["",ae,te,ee]}],"backdrop-filter":[{"backdrop-filter":["","none",te,ee]}],"backdrop-blur":[{"backdrop-blur":$()}],"backdrop-brightness":[{"backdrop-brightness":[ae,te,ee]}],"backdrop-contrast":[{"backdrop-contrast":[ae,te,ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,te,ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,te,ee]}],"backdrop-invert":[{"backdrop-invert":["",ae,te,ee]}],"backdrop-opacity":[{"backdrop-opacity":[ae,te,ee]}],"backdrop-saturate":[{"backdrop-saturate":[ae,te,ee]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,te,ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",te,ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",te,ee]}],ease:[{ease:["linear","initial",h,te,ee]}],delay:[{delay:[ae,te,ee]}],animate:[{animate:["none",l,te,ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,te,ee]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[te,ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",te,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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",te,ee]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[ae,vs,Fr,Jh]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ob=Bx(ib);function re(...e){return ob(gv(e))}function Dv(e,t=[]){let r=[];function n(o,c){const i=b.createContext(c);i.displayName=o+"Context";const a=r.length;r=[...r,c];const d=u=>{var h;const{scope:v,children:y,...S}=u,g=((h=v==null?void 0:v[e])==null?void 0:h[a])||i,p=b.useMemo(()=>S,Object.values(S));return x.jsx(g.Provider,{value:p,children:y})};d.displayName=o+"Provider";function m(u,v){var g;const y=((g=v==null?void 0:v[e])==null?void 0:g[a])||i,S=b.useContext(y);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${u}\` must be used within \`${o}\``)}return[d,m]}const s=()=>{const o=r.map(c=>b.createContext(c));return function(i){const a=(i==null?void 0:i[e])||o;return b.useMemo(()=>({[`__scope${e}`]:{...i,[e]:a}}),[i,a])}};return s.scopeName=e,[n,ab(s,...t)]}function ab(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const c=n.reduce((i,{useScope:a,scopeName:d})=>{const u=a(o)[`__scope${d}`];return{...i,...u}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}function Ft(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var Le=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{};function tf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ht(...e){return t=>{let r=!1;const n=e.map(s=>{const o=tf(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():tf(e[s],null)}}}}function ce(...e){return b.useCallback(Ht(...e),e)}var lb=Symbol.for("react.lazy"),Bo=Yo[" use ".trim().toString()];function cb(e){return typeof e=="object"&&e!==null&&"then"in e}function Mv(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===lb&&"_payload"in e&&cb(e._payload)}function Nv(e){const t=ub(e),r=b.forwardRef((n,s)=>{let{children:o,...c}=n;Mv(o)&&typeof Bo=="function"&&(o=Bo(o._payload));const i=b.Children.toArray(o),a=i.find(hb);if(a){const d=a.props.children,m=i.map(u=>u===a?b.Children.count(d)>1?b.Children.only(null):b.isValidElement(d)?d.props.children:null:u);return x.jsx(t,{...c,ref:s,children:b.isValidElement(d)?b.cloneElement(d,void 0,m):null})}return x.jsx(t,{...c,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var Iv=Nv("Slot");function ub(e){const t=b.forwardRef((r,n)=>{let{children:s,...o}=r;if(Mv(s)&&typeof Bo=="function"&&(s=Bo(s._payload)),b.isValidElement(s)){const c=pb(s),i=fb(o,s.props);return s.type!==b.Fragment&&(i.ref=n?Ht(n,c):c),b.cloneElement(s,i)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var db=Symbol("radix.slottable");function hb(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===db}function fb(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const a=o(...i);return s(...i),a}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function pb(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var mb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ue=mb.reduce((e,t)=>{const r=Nv(`Primitive.${t}`),n=b.forwardRef((s,o)=>{const{asChild:c,...i}=s,a=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ov={exports:{}},jv={};/**
|
|
68
|
+
* @license React
|
|
69
|
+
* use-sync-external-store-shim.production.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/var Vn=b;function vb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gb=typeof Object.is=="function"?Object.is:vb,_b=Vn.useState,yb=Vn.useEffect,Sb=Vn.useLayoutEffect,wb=Vn.useDebugValue;function xb(e,t){var r=t(),n=_b({inst:{value:r,getSnapshot:t}}),s=n[0].inst,o=n[1];return Sb(function(){s.value=r,s.getSnapshot=t,fl(s)&&o({inst:s})},[e,r,t]),yb(function(){return fl(s)&&o({inst:s}),e(function(){fl(s)&&o({inst:s})})},[e]),wb(r),r}function fl(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!gb(e,r)}catch{return!0}}function bb(e,t){return t()}var Cb=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?bb:xb;jv.useSyncExternalStore=Vn.useSyncExternalStore!==void 0?Vn.useSyncExternalStore:Cb;Ov.exports=jv;var Eb=Ov.exports;function kb(){return Eb.useSyncExternalStore(Rb,()=>!0,()=>!1)}function Rb(){return()=>{}}var $u="Avatar",[Pb]=Dv($u),[Tb,Bv]=Pb($u),Fv=b.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[s,o]=b.useState("idle");return x.jsx(Tb,{scope:r,imageLoadingStatus:s,onImageLoadingStatusChange:o,children:x.jsx(Ue.span,{...n,ref:t})})});Fv.displayName=$u;var Hv="AvatarImage",$v=b.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:s=()=>{},...o}=e,c=Bv(Hv,r),i=Lb(n,o),a=Ft(d=>{s(d),c.onImageLoadingStatusChange(d)});return Le(()=>{i!=="idle"&&a(i)},[i,a]),i==="loaded"?x.jsx(Ue.img,{...o,ref:t,src:n}):null});$v.displayName=Hv;var zv="AvatarFallback",Wv=b.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...s}=e,o=Bv(zv,r),[c,i]=b.useState(n===void 0);return b.useEffect(()=>{if(n!==void 0){const a=window.setTimeout(()=>i(!0),n);return()=>window.clearTimeout(a)}},[n]),c&&o.imageLoadingStatus!=="loaded"?x.jsx(Ue.span,{...s,ref:t}):null});Wv.displayName=zv;function rf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Lb(e,{referrerPolicy:t,crossOrigin:r}){const n=kb(),s=b.useRef(null),o=n?(s.current||(s.current=new window.Image),s.current):null,[c,i]=b.useState(()=>rf(o,e));return Le(()=>{i(rf(o,e))},[o,e]),Le(()=>{const a=u=>()=>{i(u)};if(!o)return;const d=a("loaded"),m=a("error");return o.addEventListener("load",d),o.addEventListener("error",m),t&&(o.referrerPolicy=t),typeof r=="string"&&(o.crossOrigin=r),()=>{o.removeEventListener("load",d),o.removeEventListener("error",m)}},[o,r,t]),c}var Uv=Fv,Vv=$v,Kv=Wv;const Ab=b.forwardRef(({className:e,...t},r)=>x.jsx(Uv,{ref:r,className:re("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ab.displayName=Uv.displayName;const Db=b.forwardRef(({className:e,...t},r)=>x.jsx(Vv,{ref:r,className:re("aspect-square h-full w-full",e),...t}));Db.displayName=Vv.displayName;const Mb=b.forwardRef(({className:e,...t},r)=>x.jsx(Kv,{ref:r,className:re("flex h-full w-full items-center justify-center rounded-full bg-primary/10 text-primary font-medium",e),...t}));Mb.displayName=Kv.displayName;const nf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sf=gv,zu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return sf(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,c=Object.keys(s).map(d=>{const m=r==null?void 0:r[d],u=o==null?void 0:o[d];if(m===null)return null;const v=nf(m)||nf(u);return s[d][v]}),i=r&&Object.entries(r).reduce((d,m)=>{let[u,v]=m;return v===void 0||(d[u]=v),d},{}),a=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,m)=>{let{class:u,className:v,...y}=m;return Object.entries(y).every(S=>{let[g,p]=S;return Array.isArray(p)?p.includes({...o,...i}[g]):{...o,...i}[g]===p})?[...d,u,v]:d},[]);return sf(e,c,a,r==null?void 0:r.class,r==null?void 0:r.className)};/**
|
|
76
|
+
* @license lucide-react v0.576.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Gv=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
81
|
+
* @license lucide-react v0.576.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const Nb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
86
|
+
* @license lucide-react v0.576.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const Ib=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());/**
|
|
91
|
+
* @license lucide-react v0.576.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const of=e=>{const t=Ib(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
96
|
+
* @license lucide-react v0.576.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/var Ob={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"};/**
|
|
101
|
+
* @license lucide-react v0.576.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const jb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
106
|
+
* @license lucide-react v0.576.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const Bb=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:c,...i},a)=>b.createElement("svg",{ref:a,...Ob,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Gv("lucide",s),...!o&&!jb(i)&&{"aria-hidden":"true"},...i},[...c.map(([d,m])=>b.createElement(d,m)),...Array.isArray(o)?o:[o]]));/**
|
|
111
|
+
* @license lucide-react v0.576.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const be=(e,t)=>{const r=b.forwardRef(({className:n,...s},o)=>b.createElement(Bb,{ref:o,iconNode:t,className:Gv(`lucide-${Nb(of(e))}`,`lucide-${e}`,n),...s}));return r.displayName=of(e),r};/**
|
|
116
|
+
* @license lucide-react v0.576.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const Fb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Wu=be("check",Fb);/**
|
|
121
|
+
* @license lucide-react v0.576.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Hb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Uu=be("chevron-down",Hb);/**
|
|
126
|
+
* @license lucide-react v0.576.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const $b=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qv=be("chevron-right",$b);/**
|
|
131
|
+
* @license lucide-react v0.576.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const zb=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Wb=be("chevron-up",zb);/**
|
|
136
|
+
* @license lucide-react v0.576.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const Ub=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Vb=be("circle",Ub);/**
|
|
141
|
+
* @license lucide-react v0.576.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Kb=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Gb=be("layout-dashboard",Kb);/**
|
|
146
|
+
* @license lucide-react v0.576.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const qb=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Xb=be("loader-circle",qb);/**
|
|
151
|
+
* @license lucide-react v0.576.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Yb=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Qb=be("log-out",Yb);/**
|
|
156
|
+
* @license lucide-react v0.576.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const Jb=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Zb=be("moon",Jb);/**
|
|
161
|
+
* @license lucide-react v0.576.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const eC=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],tC=be("pause",eC);/**
|
|
166
|
+
* @license lucide-react v0.576.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const rC=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],nC=be("play",rC);/**
|
|
171
|
+
* @license lucide-react v0.576.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const sC=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],iC=be("refresh-cw",sC);/**
|
|
176
|
+
* @license lucide-react v0.576.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const oC=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],aC=be("rotate-ccw",oC);/**
|
|
181
|
+
* @license lucide-react v0.576.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const lC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],cC=be("search",lC);/**
|
|
186
|
+
* @license lucide-react v0.576.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const uC=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],dC=be("settings",uC);/**
|
|
191
|
+
* @license lucide-react v0.576.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const hC=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],fC=be("sun",hC);/**
|
|
196
|
+
* @license lucide-react v0.576.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const pC=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],mC=be("terminal",pC);/**
|
|
201
|
+
* @license lucide-react v0.576.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const vC=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],gC=be("trash-2",vC);/**
|
|
206
|
+
* @license lucide-react v0.576.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const _C=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],yC=be("wrench",_C);/**
|
|
211
|
+
* @license lucide-react v0.576.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const SC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xv=be("x",SC);/**
|
|
216
|
+
* @license lucide-react v0.576.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const wC=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],xC=be("zap",wC),bC=b.forwardRef(({...e},t)=>x.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));bC.displayName="Breadcrumb";const CC=b.forwardRef(({className:e,...t},r)=>x.jsx("ol",{ref:r,className:re("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));CC.displayName="BreadcrumbList";const EC=b.forwardRef(({className:e,...t},r)=>x.jsx("li",{ref:r,className:re("inline-flex items-center gap-1.5",e),...t}));EC.displayName="BreadcrumbItem";const kC=b.forwardRef(({asChild:e,className:t,...r},n)=>{const s=e?Iv:"a";return x.jsx(s,{ref:n,className:re("transition-colors hover:text-foreground",t),...r})});kC.displayName="BreadcrumbLink";const RC=b.forwardRef(({className:e,...t},r)=>x.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:re("font-normal text-foreground",e),...t}));RC.displayName="BreadcrumbPage";const PC=zu("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"}}),Yv=b.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const c=n?Iv:"button";return x.jsx(c,{className:re(PC({variant:t,size:r,className:e})),ref:o,...s})});Yv.displayName="Button";const TC=b.forwardRef(({className:e,onClick:t,...r},n)=>{const s=b.useRef(null),[o,c]=b.useState(!1);return b.useEffect(()=>{var d;const i=s.current;if(!i)return;const a=!!t||((d=i.parentElement)==null?void 0:d.tagName)==="A"||!!i.querySelector(":scope > a");c(a)},[t]),x.jsx("div",{ref:i=>{s.current=i,typeof n=="function"?n(i):n&&(n.current=i)},className:re("ls-card rounded-xl bg-card text-card-foreground",o&&"interactive",e),onClick:t,...r})});TC.displayName="Card";const LC=b.forwardRef(({className:e,...t},r)=>x.jsx("div",{ref:r,className:re("flex flex-col space-y-1.5 p-6",e),...t}));LC.displayName="CardHeader";const AC=b.forwardRef(({className:e,...t},r)=>x.jsx("div",{ref:r,className:re("font-semibold leading-none tracking-tight",e),...t}));AC.displayName="CardTitle";const DC=b.forwardRef(({className:e,...t},r)=>x.jsx("div",{ref:r,className:re("text-sm text-muted-foreground",e),...t}));DC.displayName="CardDescription";const MC=b.forwardRef(({className:e,...t},r)=>x.jsx("div",{ref:r,className:re("p-6 pt-0",e),...t}));MC.displayName="CardContent";const NC=b.forwardRef(({className:e,...t},r)=>x.jsx("div",{ref:r,className:re("flex items-center p-6 pt-0",e),...t}));NC.displayName="CardFooter";function IC(e,t){const r=b.createContext(t),n=o=>{const{children:c,...i}=o,a=b.useMemo(()=>i,Object.values(i));return x.jsx(r.Provider,{value:a,children:c})};n.displayName=e+"Provider";function s(o){const c=b.useContext(r);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function _t(e,t=[]){let r=[];function n(o,c){const i=b.createContext(c),a=r.length;r=[...r,c];const d=u=>{var h;const{scope:v,children:y,...S}=u,g=((h=v==null?void 0:v[e])==null?void 0:h[a])||i,p=b.useMemo(()=>S,Object.values(S));return x.jsx(g.Provider,{value:p,children:y})};d.displayName=o+"Provider";function m(u,v){var g;const y=((g=v==null?void 0:v[e])==null?void 0:g[a])||i,S=b.useContext(y);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${u}\` must be used within \`${o}\``)}return[d,m]}const s=()=>{const o=r.map(c=>b.createContext(c));return function(i){const a=(i==null?void 0:i[e])||o;return b.useMemo(()=>({[`__scope${e}`]:{...i,[e]:a}}),[i,a])}};return s.scopeName=e,[n,OC(s,...t)]}function OC(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const c=n.reduce((i,{useScope:a,scopeName:d})=>{const u=a(o)[`__scope${d}`];return{...i,...u}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}function J(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}var jC=Yo[" useInsertionEffect ".trim().toString()]||Le;function ui({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,c]=BC({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:s;{const m=b.useRef(e!==void 0);b.useEffect(()=>{const u=m.current;u!==i&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${i?"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.`),m.current=i},[i,n])}const d=b.useCallback(m=>{var u;if(i){const v=FC(m)?m(e):m;v!==e&&((u=c.current)==null||u.call(c,v))}else o(m)},[i,e,o,c]);return[a,d]}function BC({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),s=b.useRef(r),o=b.useRef(t);return jC(()=>{o.current=t},[t]),b.useEffect(()=>{var c;s.current!==r&&((c=o.current)==null||c.call(o,r),s.current=r)},[r,s]),[r,n,o]}function FC(e){return typeof e=="function"}function Vu(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ku(e){const[t,r]=b.useState(void 0);return Le(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let c,i;if("borderBoxSize"in o){const a=o.borderBoxSize,d=Array.isArray(a)?a[0]:a;c=d.inlineSize,i=d.blockSize}else c=e.offsetWidth,i=e.offsetHeight;r({width:c,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function HC(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var Qe=e=>{const{present:t,children:r}=e,n=$C(t),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),o=ce(n.ref,zC(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:o}):null};Qe.displayName="Presence";function $C(e){const[t,r]=b.useState(),n=b.useRef(null),s=b.useRef(e),o=b.useRef("none"),c=e?"mounted":"unmounted",[i,a]=HC(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const d=zi(n.current);o.current=i==="mounted"?d:"none"},[i]),Le(()=>{const d=n.current,m=s.current;if(m!==e){const v=o.current,y=zi(d);e?a("MOUNT"):y==="none"||(d==null?void 0:d.display)==="none"?a("UNMOUNT"):a(m&&v!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,a]),Le(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,u=y=>{const g=zi(n.current).includes(CSS.escape(y.animationName));if(y.target===t&&g&&(a("ANIMATION_END"),!s.current)){const p=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=p)})}},v=y=>{y.target===t&&(o.current=zi(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:b.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function zi(e){return(e==null?void 0:e.animationName)||"none"}function zC(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function en(e){const t=WC(e),r=b.forwardRef((n,s)=>{const{children:o,...c}=n,i=b.Children.toArray(o),a=i.find(VC);if(a){const d=a.props.children,m=i.map(u=>u===a?b.Children.count(d)>1?b.Children.only(null):b.isValidElement(d)?d.props.children:null:u);return x.jsx(t,{...c,ref:s,children:b.isValidElement(d)?b.cloneElement(d,void 0,m):null})}return x.jsx(t,{...c,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function WC(e){const t=b.forwardRef((r,n)=>{const{children:s,...o}=r;if(b.isValidElement(s)){const c=GC(s),i=KC(o,s.props);return s.type!==b.Fragment&&(i.ref=n?Ht(n,c):c),b.cloneElement(s,i)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qv=Symbol("radix.slottable");function UC(e){const t=({children:r})=>x.jsx(x.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Qv,t}function VC(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qv}function KC(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const a=o(...i);return s(...i),a}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function GC(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=qC.reduce((e,t)=>{const r=en(`Primitive.${t}`),n=b.forwardRef((s,o)=>{const{asChild:c,...i}=s,a=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Jv(e,t){e&&Jn.flushSync(()=>e.dispatchEvent(t))}var fa="Checkbox",[XC]=_t(fa),[YC,Gu]=XC(fa);function QC(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:o,form:c,name:i,onCheckedChange:a,required:d,value:m="on",internal_do_not_use_render:u}=e,[v,y]=ui({prop:r,defaultProp:s??!1,onChange:a,caller:fa}),[S,g]=b.useState(null),[p,h]=b.useState(null),l=b.useRef(!1),f=S?!!c||!!S.closest("form"):!0,_={checked:v,disabled:o,setChecked:y,control:S,setControl:g,name:i,form:c,value:m,hasConsumerStoppedPropagationRef:l,required:d,defaultChecked:Cr(s)?!1:s,isFormControl:f,bubbleInput:p,setBubbleInput:h};return x.jsx(YC,{scope:t,..._,children:JC(u)?u(_):n})}var Zv="CheckboxTrigger",eg=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:o,value:c,disabled:i,checked:a,required:d,setControl:m,setChecked:u,hasConsumerStoppedPropagationRef:v,isFormControl:y,bubbleInput:S}=Gu(Zv,e),g=ce(s,m),p=b.useRef(a);return b.useEffect(()=>{const h=o==null?void 0:o.form;if(h){const l=()=>u(p.current);return h.addEventListener("reset",l),()=>h.removeEventListener("reset",l)}},[o,u]),x.jsx(ie.button,{type:"button",role:"checkbox","aria-checked":Cr(a)?"mixed":a,"aria-required":d,"data-state":ig(a),"data-disabled":i?"":void 0,disabled:i,value:c,...n,ref:g,onKeyDown:J(t,h=>{h.key==="Enter"&&h.preventDefault()}),onClick:J(r,h=>{u(l=>Cr(l)?!0:!l),S&&y&&(v.current=h.isPropagationStopped(),v.current||h.stopPropagation())})})});eg.displayName=Zv;var qu=b.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:o,required:c,disabled:i,value:a,onCheckedChange:d,form:m,...u}=e;return x.jsx(QC,{__scopeCheckbox:r,checked:s,defaultChecked:o,disabled:i,required:c,onCheckedChange:d,name:n,form:m,value:a,internal_do_not_use_render:({isFormControl:v})=>x.jsxs(x.Fragment,{children:[x.jsx(eg,{...u,ref:t,__scopeCheckbox:r}),v&&x.jsx(sg,{__scopeCheckbox:r})]})})});qu.displayName=fa;var tg="CheckboxIndicator",rg=b.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,o=Gu(tg,r);return x.jsx(Qe,{present:n||Cr(o.checked)||o.checked===!0,children:x.jsx(ie.span,{"data-state":ig(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});rg.displayName=tg;var ng="CheckboxBubbleInput",sg=b.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:c,required:i,disabled:a,name:d,value:m,form:u,bubbleInput:v,setBubbleInput:y}=Gu(ng,e),S=ce(r,y),g=Vu(o),p=Ku(n);b.useEffect(()=>{const l=v;if(!l)return;const f=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(f,"checked").set,k=!s.current;if(g!==o&&E){const C=new Event("click",{bubbles:k});l.indeterminate=Cr(o),E.call(l,Cr(o)?!1:o),l.dispatchEvent(C)}},[v,g,o,s]);const h=b.useRef(Cr(o)?!1:o);return x.jsx(ie.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??h.current,required:i,disabled:a,name:d,value:m,form:u,...t,tabIndex:-1,ref:S,style:{...t.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});sg.displayName=ng;function JC(e){return typeof e=="function"}function Cr(e){return e==="indeterminate"}function ig(e){return Cr(e)?"indeterminate":e?"checked":"unchecked"}const ZC=b.forwardRef(({className:e,...t},r)=>x.jsx(qu,{ref:r,className:re("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:x.jsx(rg,{className:re("grid place-content-center text-current"),children:x.jsx(Wu,{className:"h-4 w-4"})})}));ZC.displayName=qu.displayName;var eE=Yo[" useId ".trim().toString()]||(()=>{}),tE=0;function st(e){const[t,r]=b.useState(eE());return Le(()=>{r(n=>n??String(tE++))},[e]),t?`radix-${t}`:""}var af=1,rE=.9,nE=.8,sE=.17,pl=.1,ml=.999,iE=.9999,oE=.99,aE=/[\\\/_+.#"@\[\(\{&]/,lE=/[\\\/_+.#"@\[\(\{&]/g,cE=/[\s-]/,og=/[\s-]/g;function kc(e,t,r,n,s,o,c){if(o===t.length)return s===e.length?af:oE;var i=`${s},${o}`;if(c[i]!==void 0)return c[i];for(var a=n.charAt(o),d=r.indexOf(a,s),m=0,u,v,y,S;d>=0;)u=kc(e,t,r,n,d+1,o+1,c),u>m&&(d===s?u*=af:aE.test(e.charAt(d-1))?(u*=nE,y=e.slice(s,d-1).match(lE),y&&s>0&&(u*=Math.pow(ml,y.length))):cE.test(e.charAt(d-1))?(u*=rE,S=e.slice(s,d-1).match(og),S&&s>0&&(u*=Math.pow(ml,S.length))):(u*=sE,s>0&&(u*=Math.pow(ml,d-s))),e.charAt(d)!==t.charAt(o)&&(u*=iE)),(u<pl&&r.charAt(d-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(d-1)!==n.charAt(o))&&(v=kc(e,t,r,n,d+1,o+2,c),v*pl>u&&(u=v*pl)),u>m&&(m=u),d=r.indexOf(a,d+1);return c[i]=m,m}function lf(e){return e.toLowerCase().replace(og," ")}function uE(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,kc(e,t,lf(e),lf(t),0,0,{})}function dE(e,t=globalThis==null?void 0:globalThis.document){const r=Ft(e);b.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var hE="DismissableLayer",Rc="dismissableLayer.update",fE="dismissableLayer.pointerDownOutside",pE="dismissableLayer.focusOutside",cf,ag=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),es=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:c,onDismiss:i,...a}=e,d=b.useContext(ag),[m,u]=b.useState(null),v=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=b.useState({}),S=ce(t,C=>u(C)),g=Array.from(d.layers),[p]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),h=g.indexOf(p),l=m?g.indexOf(m):-1,f=d.layersWithOutsidePointerEventsDisabled.size>0,_=l>=h,E=gE(C=>{const w=C.target,P=[...d.branches].some(T=>T.contains(w));!_||P||(s==null||s(C),c==null||c(C),C.defaultPrevented||i==null||i())},v),k=_E(C=>{const w=C.target;[...d.branches].some(T=>T.contains(w))||(o==null||o(C),c==null||c(C),C.defaultPrevented||i==null||i())},v);return dE(C=>{l===d.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},v),b.useEffect(()=>{if(m)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(cf=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),uf(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=cf)}},[m,v,r,d]),b.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),uf())},[m,d]),b.useEffect(()=>{const C=()=>y({});return document.addEventListener(Rc,C),()=>document.removeEventListener(Rc,C)},[]),x.jsx(ie.div,{...a,ref:S,style:{pointerEvents:f?_?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,k.onFocusCapture),onBlurCapture:J(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,E.onPointerDownCapture)})});es.displayName=hE;var mE="DismissableLayerBranch",vE=b.forwardRef((e,t)=>{const r=b.useContext(ag),n=b.useRef(null),s=ce(t,n);return b.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),x.jsx(ie.div,{...e,ref:s})});vE.displayName=mE;function gE(e,t=globalThis==null?void 0:globalThis.document){const r=Ft(e),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const o=i=>{if(i.target&&!n.current){let a=function(){lg(fE,r,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=a,t.addEventListener("click",s.current,{once:!0})):a()}else t.removeEventListener("click",s.current);n.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function _E(e,t=globalThis==null?void 0:globalThis.document){const r=Ft(e),n=b.useRef(!1);return b.useEffect(()=>{const s=o=>{o.target&&!n.current&&lg(pE,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function uf(){const e=new CustomEvent(Rc);document.dispatchEvent(e)}function lg(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Jv(s,o):s.dispatchEvent(o)}var vl="focusScope.autoFocusOnMount",gl="focusScope.autoFocusOnUnmount",df={bubbles:!1,cancelable:!0},yE="FocusScope",di=b.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...c}=e,[i,a]=b.useState(null),d=Ft(s),m=Ft(o),u=b.useRef(null),v=ce(t,g=>a(g)),y=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let g=function(f){if(y.paused||!i)return;const _=f.target;i.contains(_)?u.current=_:lr(u.current,{select:!0})},p=function(f){if(y.paused||!i)return;const _=f.relatedTarget;_!==null&&(i.contains(_)||lr(u.current,{select:!0}))},h=function(f){if(document.activeElement===document.body)for(const E of f)E.removedNodes.length>0&&lr(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",p);const l=new MutationObserver(h);return i&&l.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",p),l.disconnect()}}},[n,i,y.paused]),b.useEffect(()=>{if(i){ff.add(y);const g=document.activeElement;if(!i.contains(g)){const h=new CustomEvent(vl,df);i.addEventListener(vl,d),i.dispatchEvent(h),h.defaultPrevented||(SE(EE(cg(i)),{select:!0}),document.activeElement===g&&lr(i))}return()=>{i.removeEventListener(vl,d),setTimeout(()=>{const h=new CustomEvent(gl,df);i.addEventListener(gl,m),i.dispatchEvent(h),h.defaultPrevented||lr(g??document.body,{select:!0}),i.removeEventListener(gl,m),ff.remove(y)},0)}}},[i,d,m,y]);const S=b.useCallback(g=>{if(!r&&!n||y.paused)return;const p=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,h=document.activeElement;if(p&&h){const l=g.currentTarget,[f,_]=wE(l);f&&_?!g.shiftKey&&h===_?(g.preventDefault(),r&&lr(f,{select:!0})):g.shiftKey&&h===f&&(g.preventDefault(),r&&lr(_,{select:!0})):h===l&&g.preventDefault()}},[r,n,y.paused]);return x.jsx(ie.div,{tabIndex:-1,...c,ref:v,onKeyDown:S})});di.displayName=yE;function SE(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(lr(n,{select:t}),document.activeElement!==r)return}function wE(e){const t=cg(e),r=hf(t,e),n=hf(t.reverse(),e);return[r,n]}function cg(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function hf(e,t){for(const r of e)if(!xE(r,{upTo:t}))return r}function xE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function bE(e){return e instanceof HTMLInputElement&&"select"in e}function lr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&bE(e)&&t&&e.select()}}var ff=CE();function CE(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=pf(e,t),e.unshift(t)},remove(t){var r;e=pf(e,t),(r=e[0])==null||r.resume()}}}function pf(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function EE(e){return e.filter(t=>t.tagName!=="A")}var kE="Portal",ts=b.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[s,o]=b.useState(!1);Le(()=>o(!0),[]);const c=r||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return c?y1.createPortal(x.jsx(ie.div,{...n,ref:t}),c):null});ts.displayName=kE;var _l=0;function pa(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mf()),document.body.insertAdjacentElement("beforeend",e[1]??mf()),_l++,()=>{_l===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_l--}},[])}function mf(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Nt=function(){return Nt=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Nt.apply(this,arguments)};function ug(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function RE(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var co="right-scroll-bar-position",uo="width-before-scroll-bar",PE="with-scroll-bars-hidden",TE="--removed-body-scroll-bar-size";function yl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function LE(e,t){var r=b.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var AE=typeof window<"u"?b.useLayoutEffect:b.useEffect,vf=new WeakMap;function DE(e,t){var r=LE(null,function(n){return e.forEach(function(s){return yl(s,n)})});return AE(function(){var n=vf.get(r);if(n){var s=new Set(n),o=new Set(e),c=r.current;s.forEach(function(i){o.has(i)||yl(i,null)}),o.forEach(function(i){s.has(i)||yl(i,c)})}vf.set(r,e)},[e]),r}function ME(e){return e}function NE(e,t){t===void 0&&(t=ME);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var c=t(o,n);return r.push(c),function(){r=r.filter(function(i){return i!==c})}},assignSyncMedium:function(o){for(n=!0;r.length;){var c=r;r=[],c.forEach(o)}r={push:function(i){return o(i)},filter:function(){return r}}},assignMedium:function(o){n=!0;var c=[];if(r.length){var i=r;r=[],i.forEach(o),c=r}var a=function(){var m=c;c=[],m.forEach(o)},d=function(){return Promise.resolve().then(a)};d(),r={push:function(m){c.push(m),d()},filter:function(m){return c=c.filter(m),r}}}};return s}function IE(e){e===void 0&&(e={});var t=NE(null);return t.options=Nt({async:!0,ssr:!1},e),t}var dg=function(e){var t=e.sideCar,r=ug(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,Nt({},r))};dg.isSideCarExport=!0;function OE(e,t){return e.useMedium(t),dg}var hg=IE(),Sl=function(){},ma=b.forwardRef(function(e,t){var r=b.useRef(null),n=b.useState({onScrollCapture:Sl,onWheelCapture:Sl,onTouchMoveCapture:Sl}),s=n[0],o=n[1],c=e.forwardProps,i=e.children,a=e.className,d=e.removeScrollBar,m=e.enabled,u=e.shards,v=e.sideCar,y=e.noRelative,S=e.noIsolation,g=e.inert,p=e.allowPinchZoom,h=e.as,l=h===void 0?"div":h,f=e.gapMode,_=ug(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,k=DE([r,t]),C=Nt(Nt({},_),s);return b.createElement(b.Fragment,null,m&&b.createElement(E,{sideCar:hg,removeScrollBar:d,shards:u,noRelative:y,noIsolation:S,inert:g,setCallbacks:o,allowPinchZoom:!!p,lockRef:r,gapMode:f}),c?b.cloneElement(b.Children.only(i),Nt(Nt({},C),{ref:k})):b.createElement(l,Nt({},C,{className:a,ref:k}),i))});ma.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ma.classNames={fullWidth:uo,zeroRight:co};var jE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function BE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jE();return t&&e.setAttribute("nonce",t),e}function FE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function HE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $E=function(){var e=0,t=null;return{add:function(r){e==0&&(t=BE())&&(FE(t,r),HE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zE=function(){var e=$E();return function(t,r){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},fg=function(){var e=zE(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},WE={left:0,top:0,right:0,gap:0},wl=function(e){return parseInt(e||"",10)||0},UE=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[wl(r),wl(n),wl(s)]},VE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return WE;var t=UE(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},KE=fg(),On="data-scroll-locked",GE=function(e,t,r,n){var s=e.left,o=e.top,c=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
221
|
+
.`.concat(PE,` {
|
|
222
|
+
overflow: hidden `).concat(n,`;
|
|
223
|
+
padding-right: `).concat(i,"px ").concat(n,`;
|
|
224
|
+
}
|
|
225
|
+
body[`).concat(On,`] {
|
|
226
|
+
overflow: hidden `).concat(n,`;
|
|
227
|
+
overscroll-behavior: contain;
|
|
228
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
229
|
+
padding-left: `.concat(s,`px;
|
|
230
|
+
padding-top: `).concat(o,`px;
|
|
231
|
+
padding-right: `).concat(c,`px;
|
|
232
|
+
margin-left:0;
|
|
233
|
+
margin-top:0;
|
|
234
|
+
margin-right: `).concat(i,"px ").concat(n,`;
|
|
235
|
+
`),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.`).concat(co,` {
|
|
239
|
+
right: `).concat(i,"px ").concat(n,`;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.`).concat(uo,` {
|
|
243
|
+
margin-right: `).concat(i,"px ").concat(n,`;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.`).concat(co," .").concat(co,` {
|
|
247
|
+
right: 0 `).concat(n,`;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.`).concat(uo," .").concat(uo,` {
|
|
251
|
+
margin-right: 0 `).concat(n,`;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
body[`).concat(On,`] {
|
|
255
|
+
`).concat(TE,": ").concat(i,`px;
|
|
256
|
+
}
|
|
257
|
+
`)},gf=function(){var e=parseInt(document.body.getAttribute(On)||"0",10);return isFinite(e)?e:0},qE=function(){b.useEffect(function(){return document.body.setAttribute(On,(gf()+1).toString()),function(){var e=gf()-1;e<=0?document.body.removeAttribute(On):document.body.setAttribute(On,e.toString())}},[])},XE=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;qE();var o=b.useMemo(function(){return VE(s)},[s]);return b.createElement(KE,{styles:GE(o,!t,s,r?"":"!important")})},Pc=!1;if(typeof window<"u")try{var Wi=Object.defineProperty({},"passive",{get:function(){return Pc=!0,!0}});window.addEventListener("test",Wi,Wi),window.removeEventListener("test",Wi,Wi)}catch{Pc=!1}var fn=Pc?{passive:!1}:!1,YE=function(e){return e.tagName==="TEXTAREA"},pg=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!YE(e)&&r[t]==="visible")},QE=function(e){return pg(e,"overflowY")},JE=function(e){return pg(e,"overflowX")},_f=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=mg(e,n);if(s){var o=vg(e,n),c=o[1],i=o[2];if(c>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ZE=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},ek=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},mg=function(e,t){return e==="v"?QE(t):JE(t)},vg=function(e,t){return e==="v"?ZE(t):ek(t)},tk=function(e,t){return e==="h"&&t==="rtl"?-1:1},rk=function(e,t,r,n,s){var o=tk(e,window.getComputedStyle(t).direction),c=o*n,i=r.target,a=t.contains(i),d=!1,m=c>0,u=0,v=0;do{if(!i)break;var y=vg(e,i),S=y[0],g=y[1],p=y[2],h=g-p-o*S;(S||h)&&mg(e,i)&&(u+=h,v+=S);var l=i.parentNode;i=l&&l.nodeType===Node.DOCUMENT_FRAGMENT_NODE?l.host:l}while(!a&&i!==document.body||a&&(t.contains(i)||t===i));return(m&&Math.abs(u)<1||!m&&Math.abs(v)<1)&&(d=!0),d},Ui=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yf=function(e){return[e.deltaX,e.deltaY]},Sf=function(e){return e&&"current"in e?e.current:e},nk=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sk=function(e){return`
|
|
258
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
259
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
260
|
+
`)},ik=0,pn=[];function ok(e){var t=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),s=b.useState(ik++)[0],o=b.useState(fg)[0],c=b.useRef(e);b.useEffect(function(){c.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=RE([e.lockRef.current],(e.shards||[]).map(Sf),!0).filter(Boolean);return g.forEach(function(p){return p.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(p){return p.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var i=b.useCallback(function(g,p){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!c.current.allowPinchZoom;var h=Ui(g),l=r.current,f="deltaX"in g?g.deltaX:l[0]-h[0],_="deltaY"in g?g.deltaY:l[1]-h[1],E,k=g.target,C=Math.abs(f)>Math.abs(_)?"h":"v";if("touches"in g&&C==="h"&&k.type==="range")return!1;var w=window.getSelection(),P=w&&w.anchorNode,T=P?P===k||P.contains(k):!1;if(T)return!1;var M=_f(C,k);if(!M)return!0;if(M?E=C:(E=C==="v"?"h":"v",M=_f(C,k)),!M)return!1;if(!n.current&&"changedTouches"in g&&(f||_)&&(n.current=E),!E)return!0;var j=n.current||E;return rk(j,p,g,j==="h"?f:_)},[]),a=b.useCallback(function(g){var p=g;if(!(!pn.length||pn[pn.length-1]!==o)){var h="deltaY"in p?yf(p):Ui(p),l=t.current.filter(function(E){return E.name===p.type&&(E.target===p.target||p.target===E.shadowParent)&&nk(E.delta,h)})[0];if(l&&l.should){p.cancelable&&p.preventDefault();return}if(!l){var f=(c.current.shards||[]).map(Sf).filter(Boolean).filter(function(E){return E.contains(p.target)}),_=f.length>0?i(p,f[0]):!c.current.noIsolation;_&&p.cancelable&&p.preventDefault()}}},[]),d=b.useCallback(function(g,p,h,l){var f={name:g,delta:p,target:h,should:l,shadowParent:ak(h)};t.current.push(f),setTimeout(function(){t.current=t.current.filter(function(_){return _!==f})},1)},[]),m=b.useCallback(function(g){r.current=Ui(g),n.current=void 0},[]),u=b.useCallback(function(g){d(g.type,yf(g),g.target,i(g,e.lockRef.current))},[]),v=b.useCallback(function(g){d(g.type,Ui(g),g.target,i(g,e.lockRef.current))},[]);b.useEffect(function(){return pn.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:v}),document.addEventListener("wheel",a,fn),document.addEventListener("touchmove",a,fn),document.addEventListener("touchstart",m,fn),function(){pn=pn.filter(function(g){return g!==o}),document.removeEventListener("wheel",a,fn),document.removeEventListener("touchmove",a,fn),document.removeEventListener("touchstart",m,fn)}},[]);var y=e.removeScrollBar,S=e.inert;return b.createElement(b.Fragment,null,S?b.createElement(o,{styles:sk(s)}):null,y?b.createElement(XE,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ak(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const lk=OE(hg,ok);var hi=b.forwardRef(function(e,t){return b.createElement(ma,Nt({},e,{ref:t,sideCar:lk}))});hi.classNames=ma.classNames;var ck=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mn=new WeakMap,Vi=new WeakMap,Ki={},xl=0,gg=function(e){return e&&(e.host||gg(e.parentNode))},uk=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=gg(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},dk=function(e,t,r,n){var s=uk(t,Array.isArray(e)?e:[e]);Ki[r]||(Ki[r]=new WeakMap);var o=Ki[r],c=[],i=new Set,a=new Set(s),d=function(u){!u||i.has(u)||(i.add(u),d(u.parentNode))};s.forEach(d);var m=function(u){!u||a.has(u)||Array.prototype.forEach.call(u.children,function(v){if(i.has(v))m(v);else try{var y=v.getAttribute(n),S=y!==null&&y!=="false",g=(mn.get(v)||0)+1,p=(o.get(v)||0)+1;mn.set(v,g),o.set(v,p),c.push(v),g===1&&S&&Vi.set(v,!0),p===1&&v.setAttribute(r,"true"),S||v.setAttribute(n,"true")}catch(h){console.error("aria-hidden: cannot operate on ",v,h)}})};return m(t),i.clear(),xl++,function(){c.forEach(function(u){var v=mn.get(u)-1,y=o.get(u)-1;mn.set(u,v),o.set(u,y),v||(Vi.has(u)||u.removeAttribute(n),Vi.delete(u)),y||u.removeAttribute(r)}),xl--,xl||(mn=new WeakMap,mn=new WeakMap,Vi=new WeakMap,Ki={})}},va=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=ck(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),dk(n,s,r,"aria-hidden")):function(){return null}},ga="Dialog",[_g]=_t(ga),[hk,Tt]=_g(ga),yg=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:c=!0}=e,i=b.useRef(null),a=b.useRef(null),[d,m]=ui({prop:n,defaultProp:s??!1,onChange:o,caller:ga});return x.jsx(hk,{scope:t,triggerRef:i,contentRef:a,contentId:st(),titleId:st(),descriptionId:st(),open:d,onOpenChange:m,onOpenToggle:b.useCallback(()=>m(u=>!u),[m]),modal:c,children:r})};yg.displayName=ga;var Sg="DialogTrigger",fk=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt(Sg,r),o=ce(t,s.triggerRef);return x.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Qu(s.open),...n,ref:o,onClick:J(e.onClick,s.onOpenToggle)})});fk.displayName=Sg;var Xu="DialogPortal",[pk,wg]=_g(Xu,{forceMount:void 0}),xg=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=Tt(Xu,t);return x.jsx(pk,{scope:t,forceMount:r,children:b.Children.map(n,c=>x.jsx(Qe,{present:r||o.open,children:x.jsx(ts,{asChild:!0,container:s,children:c})}))})};xg.displayName=Xu;var Fo="DialogOverlay",bg=b.forwardRef((e,t)=>{const r=wg(Fo,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Tt(Fo,e.__scopeDialog);return o.modal?x.jsx(Qe,{present:n||o.open,children:x.jsx(vk,{...s,ref:t})}):null});bg.displayName=Fo;var mk=en("DialogOverlay.RemoveScroll"),vk=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt(Fo,r);return x.jsx(hi,{as:mk,allowPinchZoom:!0,shards:[s.contentRef],children:x.jsx(ie.div,{"data-state":Qu(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),tn="DialogContent",Cg=b.forwardRef((e,t)=>{const r=wg(tn,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Tt(tn,e.__scopeDialog);return x.jsx(Qe,{present:n||o.open,children:o.modal?x.jsx(gk,{...s,ref:t}):x.jsx(_k,{...s,ref:t})})});Cg.displayName=tn;var gk=b.forwardRef((e,t)=>{const r=Tt(tn,e.__scopeDialog),n=b.useRef(null),s=ce(t,r.contentRef,n);return b.useEffect(()=>{const o=n.current;if(o)return va(o)},[]),x.jsx(Eg,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,o=>{var c;o.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,i=c.button===0&&c.ctrlKey===!0;(c.button===2||i)&&o.preventDefault()}),onFocusOutside:J(e.onFocusOutside,o=>o.preventDefault())})}),_k=b.forwardRef((e,t)=>{const r=Tt(tn,e.__scopeDialog),n=b.useRef(!1),s=b.useRef(!1);return x.jsx(Eg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,o),o.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var a,d;(a=e.onInteractOutside)==null||a.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=o.target;((d=r.triggerRef.current)==null?void 0:d.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Eg=b.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...c}=e,i=Tt(tn,r),a=b.useRef(null),d=ce(t,a);return pa(),x.jsxs(x.Fragment,{children:[x.jsx(di,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:x.jsx(es,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Qu(i.open),...c,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(yk,{titleId:i.titleId}),x.jsx(wk,{contentRef:a,descriptionId:i.descriptionId})]})]})}),Yu="DialogTitle",kg=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt(Yu,r);return x.jsx(ie.h2,{id:s.titleId,...n,ref:t})});kg.displayName=Yu;var Rg="DialogDescription",Pg=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt(Rg,r);return x.jsx(ie.p,{id:s.descriptionId,...n,ref:t})});Pg.displayName=Rg;var Tg="DialogClose",Lg=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt(Tg,r);return x.jsx(ie.button,{type:"button",...n,ref:t,onClick:J(e.onClick,()=>s.onOpenChange(!1))})});Lg.displayName=Tg;function Qu(e){return e?"open":"closed"}var Ag="DialogTitleWarning",[pA,Dg]=IC(Ag,{contentName:tn,titleName:Yu,docsSlug:"dialog"}),yk=({titleId:e})=>{const t=Dg(Ag),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
261
|
+
|
|
262
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
263
|
+
|
|
264
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Sk="DialogDescriptionWarning",wk=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Dg(Sk).contentName}}.`;return b.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},xk=yg,Ju=xg,fi=bg,pi=Cg,_a=kg,ya=Pg,Mg=Lg,gs='[cmdk-group=""]',bl='[cmdk-group-items=""]',bk='[cmdk-group-heading=""]',Ng='[cmdk-item=""]',wf=`${Ng}:not([aria-disabled="true"])`,Tc="cmdk-item-select",vn="data-value",Ck=(e,t,r)=>uE(e,t,r),Ig=b.createContext(void 0),mi=()=>b.useContext(Ig),Og=b.createContext(void 0),Zu=()=>b.useContext(Og),jg=b.createContext(void 0),Bg=b.forwardRef((e,t)=>{let r=gn(()=>{var D,W;return{search:"",value:(W=(D=e.value)!=null?D:e.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=gn(()=>new Set),s=gn(()=>new Map),o=gn(()=>new Map),c=gn(()=>new Set),i=Fg(e),{label:a,children:d,value:m,onValueChange:u,filter:v,shouldFilter:y,loop:S,disablePointerSelection:g=!1,vimBindings:p=!0,...h}=e,l=st(),f=st(),_=st(),E=b.useRef(null),k=Ik();rn(()=>{if(m!==void 0){let D=m.trim();r.current.value=D,C.emit()}},[m]),rn(()=>{k(6,N)},[]);let C=b.useMemo(()=>({subscribe:D=>(c.current.add(D),()=>c.current.delete(D)),snapshot:()=>r.current,setState:(D,W,H)=>{var U,G,O,A;if(!Object.is(r.current[D],W)){if(r.current[D]=W,D==="search")j(),T(),k(1,M);else if(D==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let z=document.getElementById(_);z?z.focus():(U=document.getElementById(l))==null||U.focus()}if(k(7,()=>{var z;r.current.selectedItemId=(z=F())==null?void 0:z.id,C.emit()}),H||k(5,N),((G=i.current)==null?void 0:G.value)!==void 0){let z=W??"";(A=(O=i.current).onValueChange)==null||A.call(O,z);return}}C.emit()}},emit:()=>{c.current.forEach(D=>D())}}),[]),w=b.useMemo(()=>({value:(D,W,H)=>{var U;W!==((U=o.current.get(D))==null?void 0:U.value)&&(o.current.set(D,{value:W,keywords:H}),r.current.filtered.items.set(D,P(W,H)),k(2,()=>{T(),C.emit()}))},item:(D,W)=>(n.current.add(D),W&&(s.current.has(W)?s.current.get(W).add(D):s.current.set(W,new Set([D]))),k(3,()=>{j(),T(),r.current.value||M(),C.emit()}),()=>{o.current.delete(D),n.current.delete(D),r.current.filtered.items.delete(D);let H=F();k(4,()=>{j(),(H==null?void 0:H.getAttribute("id"))===D&&M(),C.emit()})}),group:D=>(s.current.has(D)||s.current.set(D,new Set),()=>{o.current.delete(D),s.current.delete(D)}),filter:()=>i.current.shouldFilter,label:a||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:l,inputId:_,labelId:f,listInnerRef:E}),[]);function P(D,W){var H,U;let G=(U=(H=i.current)==null?void 0:H.filter)!=null?U:Ck;return D?G(D,r.current.search,W):0}function T(){if(!r.current.search||i.current.shouldFilter===!1)return;let D=r.current.filtered.items,W=[];r.current.filtered.groups.forEach(U=>{let G=s.current.get(U),O=0;G.forEach(A=>{let z=D.get(A);O=Math.max(z,O)}),W.push([U,O])});let H=E.current;V().sort((U,G)=>{var O,A;let z=U.getAttribute("id"),$=G.getAttribute("id");return((O=D.get($))!=null?O:0)-((A=D.get(z))!=null?A:0)}).forEach(U=>{let G=U.closest(bl);G?G.appendChild(U.parentElement===G?U:U.closest(`${bl} > *`)):H.appendChild(U.parentElement===H?U:U.closest(`${bl} > *`))}),W.sort((U,G)=>G[1]-U[1]).forEach(U=>{var G;let O=(G=E.current)==null?void 0:G.querySelector(`${gs}[${vn}="${encodeURIComponent(U[0])}"]`);O==null||O.parentElement.appendChild(O)})}function M(){let D=V().find(H=>H.getAttribute("aria-disabled")!=="true"),W=D==null?void 0:D.getAttribute(vn);C.setState("value",W||void 0)}function j(){var D,W,H,U;if(!r.current.search||i.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let O of n.current){let A=(W=(D=o.current.get(O))==null?void 0:D.value)!=null?W:"",z=(U=(H=o.current.get(O))==null?void 0:H.keywords)!=null?U:[],$=P(A,z);r.current.filtered.items.set(O,$),$>0&&G++}for(let[O,A]of s.current)for(let z of A)if(r.current.filtered.items.get(z)>0){r.current.filtered.groups.add(O);break}r.current.filtered.count=G}function N(){var D,W,H;let U=F();U&&(((D=U.parentElement)==null?void 0:D.firstChild)===U&&((H=(W=U.closest(gs))==null?void 0:W.querySelector(bk))==null||H.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function F(){var D;return(D=E.current)==null?void 0:D.querySelector(`${Ng}[aria-selected="true"]`)}function V(){var D;return Array.from(((D=E.current)==null?void 0:D.querySelectorAll(wf))||[])}function K(D){let W=V()[D];W&&C.setState("value",W.getAttribute(vn))}function q(D){var W;let H=F(),U=V(),G=U.findIndex(A=>A===H),O=U[G+D];(W=i.current)!=null&&W.loop&&(O=G+D<0?U[U.length-1]:G+D===U.length?U[0]:U[G+D]),O&&C.setState("value",O.getAttribute(vn))}function B(D){let W=F(),H=W==null?void 0:W.closest(gs),U;for(;H&&!U;)H=D>0?Mk(H,gs):Nk(H,gs),U=H==null?void 0:H.querySelector(wf);U?C.setState("value",U.getAttribute(vn)):q(D)}let R=()=>K(V().length-1),L=D=>{D.preventDefault(),D.metaKey?R():D.altKey?B(1):q(1)},I=D=>{D.preventDefault(),D.metaKey?K(0):D.altKey?B(-1):q(-1)};return b.createElement(Ue.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:D=>{var W;(W=h.onKeyDown)==null||W.call(h,D);let H=D.nativeEvent.isComposing||D.keyCode===229;if(!(D.defaultPrevented||H))switch(D.key){case"n":case"j":{p&&D.ctrlKey&&L(D);break}case"ArrowDown":{L(D);break}case"p":case"k":{p&&D.ctrlKey&&I(D);break}case"ArrowUp":{I(D);break}case"Home":{D.preventDefault(),K(0);break}case"End":{D.preventDefault(),R();break}case"Enter":{D.preventDefault();let U=F();if(U){let G=new Event(Tc);U.dispatchEvent(G)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:w.inputId,id:w.labelId,style:jk},a),Sa(e,D=>b.createElement(Og.Provider,{value:C},b.createElement(Ig.Provider,{value:w},D))))}),Ek=b.forwardRef((e,t)=>{var r,n;let s=st(),o=b.useRef(null),c=b.useContext(jg),i=mi(),a=Fg(e),d=(n=(r=a.current)==null?void 0:r.forceMount)!=null?n:c==null?void 0:c.forceMount;rn(()=>{if(!d)return i.item(s,c==null?void 0:c.id)},[d]);let m=Hg(s,o,[e.value,e.children,o],e.keywords),u=Zu(),v=Rr(k=>k.value&&k.value===m.current),y=Rr(k=>d||i.filter()===!1?!0:k.search?k.filtered.items.get(s)>0:!0);b.useEffect(()=>{let k=o.current;if(!(!k||e.disabled))return k.addEventListener(Tc,S),()=>k.removeEventListener(Tc,S)},[y,e.onSelect,e.disabled]);function S(){var k,C;g(),(C=(k=a.current).onSelect)==null||C.call(k,m.current)}function g(){u.setState("value",m.current,!0)}if(!y)return null;let{disabled:p,value:h,onSelect:l,forceMount:f,keywords:_,...E}=e;return b.createElement(Ue.div,{ref:Ht(o,t),...E,id:s,"cmdk-item":"",role:"option","aria-disabled":!!p,"aria-selected":!!v,"data-disabled":!!p,"data-selected":!!v,onPointerMove:p||i.getDisablePointerSelection()?void 0:g,onClick:p?void 0:S},e.children)}),kk=b.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:s,...o}=e,c=st(),i=b.useRef(null),a=b.useRef(null),d=st(),m=mi(),u=Rr(y=>s||m.filter()===!1?!0:y.search?y.filtered.groups.has(c):!0);rn(()=>m.group(c),[]),Hg(c,i,[e.value,e.heading,a]);let v=b.useMemo(()=>({id:c,forceMount:s}),[s]);return b.createElement(Ue.div,{ref:Ht(i,t),...o,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},r&&b.createElement("div",{ref:a,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),Sa(e,y=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},b.createElement(jg.Provider,{value:v},y))))}),Rk=b.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,s=b.useRef(null),o=Rr(c=>!c.search);return!r&&!o?null:b.createElement(Ue.div,{ref:Ht(s,t),...n,"cmdk-separator":"",role:"separator"})}),Pk=b.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,s=e.value!=null,o=Zu(),c=Rr(d=>d.search),i=Rr(d=>d.selectedItemId),a=mi();return b.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),b.createElement(Ue.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":a.listId,"aria-labelledby":a.labelId,"aria-activedescendant":i,id:a.inputId,type:"text",value:s?e.value:c,onChange:d=>{s||o.setState("search",d.target.value),r==null||r(d.target.value)}})}),Tk=b.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...s}=e,o=b.useRef(null),c=b.useRef(null),i=Rr(d=>d.selectedItemId),a=mi();return b.useEffect(()=>{if(c.current&&o.current){let d=c.current,m=o.current,u,v=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let y=d.offsetHeight;m.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return v.observe(d),()=>{cancelAnimationFrame(u),v.unobserve(d)}}},[]),b.createElement(Ue.div,{ref:Ht(o,t),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":n,id:a.listId},Sa(e,d=>b.createElement("div",{ref:Ht(c,a.listInnerRef),"cmdk-list-sizer":""},d)))}),Lk=b.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:s,contentClassName:o,container:c,...i}=e;return b.createElement(xk,{open:r,onOpenChange:n},b.createElement(Ju,{container:c},b.createElement(fi,{"cmdk-overlay":"",className:s}),b.createElement(pi,{"aria-label":e.label,"cmdk-dialog":"",className:o},b.createElement(Bg,{ref:t,...i}))))}),Ak=b.forwardRef((e,t)=>Rr(r=>r.filtered.count===0)?b.createElement(Ue.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Dk=b.forwardRef((e,t)=>{let{progress:r,children:n,label:s="Loading...",...o}=e;return b.createElement(Ue.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Sa(e,c=>b.createElement("div",{"aria-hidden":!0},c)))}),Je=Object.assign(Bg,{List:Tk,Item:Ek,Input:Pk,Group:kk,Separator:Rk,Dialog:Lk,Empty:Ak,Loading:Dk});function Mk(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Nk(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Fg(e){let t=b.useRef(e);return rn(()=>{t.current=e}),t}var rn=typeof window>"u"?b.useEffect:b.useLayoutEffect;function gn(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function Rr(e){let t=Zu(),r=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,r,r)}function Hg(e,t,r,n=[]){let s=b.useRef(),o=mi();return rn(()=>{var c;let i=(()=>{var d;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(d=m.current.textContent)==null?void 0:d.trim():s.current}})(),a=n.map(d=>d.trim());o.value(e,i,a),(c=t.current)==null||c.setAttribute(vn,i),s.current=i}),s}var Ik=()=>{let[e,t]=b.useState(),r=gn(()=>new Map);return rn(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,s)=>{r.current.set(n,s),t({})}};function Ok(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Sa({asChild:e,children:t},r){return e&&b.isValidElement(t)?b.cloneElement(Ok(t),{ref:t.ref},r(t.props.children)):r(t)}var jk={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Bk=b.forwardRef(({className:e,...t},r)=>x.jsx(Je,{ref:r,className:re("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Bk.displayName=Je.displayName;const Fk=b.forwardRef(({className:e,...t},r)=>x.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[x.jsx(cC,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),x.jsx(Je.Input,{ref:r,className:re("flex h-9 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Fk.displayName=Je.Input.displayName;const Hk=b.forwardRef(({className:e,onWheel:t,...r},n)=>x.jsx(Je.List,{ref:n,className:re("overflow-y-auto overflow-x-hidden",e),style:{maxHeight:300},onWheel:t??(s=>{s.currentTarget.scrollTop+=s.deltaY}),...r}));Hk.displayName=Je.List.displayName;const $k=b.forwardRef((e,t)=>x.jsx(Je.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));$k.displayName=Je.Empty.displayName;const zk=b.forwardRef(({className:e,...t},r)=>x.jsx(Je.Group,{ref:r,className:re("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));zk.displayName=Je.Group.displayName;const Wk=b.forwardRef(({className:e,...t},r)=>x.jsx(Je.Separator,{ref:r,className:re("-mx-1 h-px bg-border",e),...t}));Wk.displayName=Je.Separator.displayName;const Uk=b.forwardRef(({className:e,...t},r)=>x.jsx(Je.Item,{ref:r,className:re("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Uk.displayName=Je.Item.displayName;const Vk=Ju,$g=b.forwardRef(({className:e,...t},r)=>x.jsx(fi,{ref:r,className:re("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));$g.displayName=fi.displayName;const Kk=b.forwardRef(({className:e,children:t,...r},n)=>x.jsxs(Vk,{children:[x.jsx($g,{}),x.jsxs(pi,{ref:n,className:re("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,x.jsxs(Mg,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[x.jsx(Xv,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Kk.displayName=pi.displayName;const Gk=b.forwardRef(({className:e,...t},r)=>x.jsx(_a,{ref:r,className:re("text-lg font-semibold leading-none tracking-tight",e),...t}));Gk.displayName=_a.displayName;const qk=b.forwardRef(({className:e,...t},r)=>x.jsx(ya,{ref:r,className:re("text-sm text-muted-foreground",e),...t}));qk.displayName=ya.displayName;function ed(e){const t=e+"CollectionProvider",[r,n]=_t(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=g=>{const{scope:p,children:h}=g,l=Ve.useRef(null),f=Ve.useRef(new Map).current;return x.jsx(s,{scope:p,itemMap:f,collectionRef:l,children:h})};c.displayName=t;const i=e+"CollectionSlot",a=en(i),d=Ve.forwardRef((g,p)=>{const{scope:h,children:l}=g,f=o(i,h),_=ce(p,f.collectionRef);return x.jsx(a,{ref:_,children:l})});d.displayName=i;const m=e+"CollectionItemSlot",u="data-radix-collection-item",v=en(m),y=Ve.forwardRef((g,p)=>{const{scope:h,children:l,...f}=g,_=Ve.useRef(null),E=ce(p,_),k=o(m,h);return Ve.useEffect(()=>(k.itemMap.set(_,{ref:_,...f}),()=>void k.itemMap.delete(_))),x.jsx(v,{[u]:"",ref:E,children:l})});y.displayName=m;function S(g){const p=o(e+"CollectionConsumer",g);return Ve.useCallback(()=>{const l=p.collectionRef.current;if(!l)return[];const f=Array.from(l.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((k,C)=>f.indexOf(k.ref.current)-f.indexOf(C.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:c,Slot:d,ItemSlot:y},S,n]}var Xk=b.createContext(void 0);function zg(e){const t=b.useContext(Xk);return e||t||"ltr"}const Yk=["top","right","bottom","left"],Pr=Math.min,tt=Math.max,Ho=Math.round,Gi=Math.floor,Bt=e=>({x:e,y:e}),Qk={left:"right",right:"left",bottom:"top",top:"bottom"};function Lc(e,t,r){return tt(e,Pr(t,r))}function Jt(e,t){return typeof e=="function"?e(t):e}function Zt(e){return e.split("-")[0]}function rs(e){return e.split("-")[1]}function td(e){return e==="x"?"y":"x"}function rd(e){return e==="y"?"height":"width"}function It(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function nd(e){return td(It(e))}function Jk(e,t,r){r===void 0&&(r=!1);const n=rs(e),s=nd(e),o=rd(s);let c=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=$o(c)),[c,$o(c)]}function Zk(e){const t=$o(e);return[Ac(e),t,Ac(t)]}function Ac(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const xf=["left","right"],bf=["right","left"],e2=["top","bottom"],t2=["bottom","top"];function r2(e,t,r){switch(e){case"top":case"bottom":return r?t?bf:xf:t?xf:bf;case"left":case"right":return t?e2:t2;default:return[]}}function n2(e,t,r,n){const s=rs(e);let o=r2(Zt(e),r==="start",n);return s&&(o=o.map(c=>c+"-"+s),t&&(o=o.concat(o.map(Ac)))),o}function $o(e){const t=Zt(e);return Qk[t]+e.slice(t.length)}function s2(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wg(e){return typeof e!="number"?s2(e):{top:e,right:e,bottom:e,left:e}}function zo(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Cf(e,t,r){let{reference:n,floating:s}=e;const o=It(t),c=nd(t),i=rd(c),a=Zt(t),d=o==="y",m=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,v=n[i]/2-s[i]/2;let y;switch(a){case"top":y={x:m,y:n.y-s.height};break;case"bottom":y={x:m,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:u};break;case"left":y={x:n.x-s.width,y:u};break;default:y={x:n.x,y:n.y}}switch(rs(t)){case"start":y[c]-=v*(r&&d?-1:1);break;case"end":y[c]+=v*(r&&d?-1:1);break}return y}async function i2(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:c,elements:i,strategy:a}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:u="floating",altBoundary:v=!1,padding:y=0}=Jt(t,e),S=Wg(y),p=i[v?u==="floating"?"reference":"floating":u],h=zo(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(p)))==null||r?p:p.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:d,rootBoundary:m,strategy:a})),l=u==="floating"?{x:n,y:s,width:c.floating.width,height:c.floating.height}:c.reference,f=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),_=await(o.isElement==null?void 0:o.isElement(f))?await(o.getScale==null?void 0:o.getScale(f))||{x:1,y:1}:{x:1,y:1},E=zo(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:l,offsetParent:f,strategy:a}):l);return{top:(h.top-E.top+S.top)/_.y,bottom:(E.bottom-h.bottom+S.bottom)/_.y,left:(h.left-E.left+S.left)/_.x,right:(E.right-h.right+S.right)/_.x}}const o2=50,a2=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:c}=r,i=c.detectOverflow?c:{...c,detectOverflow:i2},a=await(c.isRTL==null?void 0:c.isRTL(t));let d=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:u}=Cf(d,n,a),v=n,y=0;const S={};for(let g=0;g<o.length;g++){const p=o[g];if(!p)continue;const{name:h,fn:l}=p,{x:f,y:_,data:E,reset:k}=await l({x:m,y:u,initialPlacement:n,placement:v,strategy:s,middlewareData:S,rects:d,platform:i,elements:{reference:e,floating:t}});m=f??m,u=_??u,S[h]={...S[h],...E},k&&y<o2&&(y++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(d=k.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:m,y:u}=Cf(d,v,a)),g=-1)}return{x:m,y:u,placement:v,strategy:s,middlewareData:S}},l2=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:c,elements:i,middlewareData:a}=t,{element:d,padding:m=0}=Jt(e,t)||{};if(d==null)return{};const u=Wg(m),v={x:r,y:n},y=nd(s),S=rd(y),g=await c.getDimensions(d),p=y==="y",h=p?"top":"left",l=p?"bottom":"right",f=p?"clientHeight":"clientWidth",_=o.reference[S]+o.reference[y]-v[y]-o.floating[S],E=v[y]-o.reference[y],k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d));let C=k?k[f]:0;(!C||!await(c.isElement==null?void 0:c.isElement(k)))&&(C=i.floating[f]||o.floating[S]);const w=_/2-E/2,P=C/2-g[S]/2-1,T=Pr(u[h],P),M=Pr(u[l],P),j=T,N=C-g[S]-M,F=C/2-g[S]/2+w,V=Lc(j,F,N),K=!a.arrow&&rs(s)!=null&&F!==V&&o.reference[S]/2-(F<j?T:M)-g[S]/2<0,q=K?F<j?F-j:F-N:0;return{[y]:v[y]+q,data:{[y]:V,centerOffset:F-V-q,...K&&{alignmentOffset:q}},reset:K}}}),c2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:c,initialPlacement:i,platform:a,elements:d}=t,{mainAxis:m=!0,crossAxis:u=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:g=!0,...p}=Jt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const h=Zt(s),l=It(i),f=Zt(i)===i,_=await(a.isRTL==null?void 0:a.isRTL(d.floating)),E=v||(f||!g?[$o(i)]:Zk(i)),k=S!=="none";!v&&k&&E.push(...n2(i,g,S,_));const C=[i,...E],w=await a.detectOverflow(t,p),P=[];let T=((n=o.flip)==null?void 0:n.overflows)||[];if(m&&P.push(w[h]),u){const F=Jk(s,c,_);P.push(w[F[0]],w[F[1]])}if(T=[...T,{placement:s,overflows:P}],!P.every(F=>F<=0)){var M,j;const F=(((M=o.flip)==null?void 0:M.index)||0)+1,V=C[F];if(V&&(!(u==="alignment"?l!==It(V):!1)||T.every(B=>It(B.placement)===l?B.overflows[0]>0:!0)))return{data:{index:F,overflows:T},reset:{placement:V}};let K=(j=T.filter(q=>q.overflows[0]<=0).sort((q,B)=>q.overflows[1]-B.overflows[1])[0])==null?void 0:j.placement;if(!K)switch(y){case"bestFit":{var N;const q=(N=T.filter(B=>{if(k){const R=It(B.placement);return R===l||R==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(R=>R>0).reduce((R,L)=>R+L,0)]).sort((B,R)=>B[1]-R[1])[0])==null?void 0:N[0];q&&(K=q);break}case"initialPlacement":K=i;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function Ef(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kf(e){return Yk.some(t=>e[t]>=0)}const u2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...o}=Jt(e,t);switch(s){case"referenceHidden":{const c=await n.detectOverflow(t,{...o,elementContext:"reference"}),i=Ef(c,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:kf(i)}}}case"escaped":{const c=await n.detectOverflow(t,{...o,altBoundary:!0}),i=Ef(c,r.floating);return{data:{escapedOffsets:i,escaped:kf(i)}}}default:return{}}}}},Ug=new Set(["left","top"]);async function d2(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),c=Zt(r),i=rs(r),a=It(r)==="y",d=Ug.has(c)?-1:1,m=o&&a?-1:1,u=Jt(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:S}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&typeof S=="number"&&(y=i==="end"?S*-1:S),a?{x:y*m,y:v*d}:{x:v*d,y:y*m}}const h2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:c,middlewareData:i}=t,a=await d2(t,e);return c===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:s+a.x,y:o+a.y,data:{...a,placement:c}}}}},f2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s,platform:o}=t,{mainAxis:c=!0,crossAxis:i=!1,limiter:a={fn:h=>{let{x:l,y:f}=h;return{x:l,y:f}}},...d}=Jt(e,t),m={x:r,y:n},u=await o.detectOverflow(t,d),v=It(Zt(s)),y=td(v);let S=m[y],g=m[v];if(c){const h=y==="y"?"top":"left",l=y==="y"?"bottom":"right",f=S+u[h],_=S-u[l];S=Lc(f,S,_)}if(i){const h=v==="y"?"top":"left",l=v==="y"?"bottom":"right",f=g+u[h],_=g-u[l];g=Lc(f,g,_)}const p=a.fn({...t,[y]:S,[v]:g});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[y]:c,[v]:i}}}}}},p2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:c}=t,{offset:i=0,mainAxis:a=!0,crossAxis:d=!0}=Jt(e,t),m={x:r,y:n},u=It(s),v=td(u);let y=m[v],S=m[u];const g=Jt(i,t),p=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const f=v==="y"?"height":"width",_=o.reference[v]-o.floating[f]+p.mainAxis,E=o.reference[v]+o.reference[f]-p.mainAxis;y<_?y=_:y>E&&(y=E)}if(d){var h,l;const f=v==="y"?"width":"height",_=Ug.has(Zt(s)),E=o.reference[u]-o.floating[f]+(_&&((h=c.offset)==null?void 0:h[u])||0)+(_?0:p.crossAxis),k=o.reference[u]+o.reference[f]+(_?0:((l=c.offset)==null?void 0:l[u])||0)-(_?p.crossAxis:0);S<E?S=E:S>k&&(S=k)}return{[v]:y,[u]:S}}}},m2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:c,elements:i}=t,{apply:a=()=>{},...d}=Jt(e,t),m=await c.detectOverflow(t,d),u=Zt(s),v=rs(s),y=It(s)==="y",{width:S,height:g}=o.floating;let p,h;u==="top"||u==="bottom"?(p=u,h=v===(await(c.isRTL==null?void 0:c.isRTL(i.floating))?"start":"end")?"left":"right"):(h=u,p=v==="end"?"top":"bottom");const l=g-m.top-m.bottom,f=S-m.left-m.right,_=Pr(g-m[p],l),E=Pr(S-m[h],f),k=!t.middlewareData.shift;let C=_,w=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(w=f),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=l),k&&!v){const T=tt(m.left,0),M=tt(m.right,0),j=tt(m.top,0),N=tt(m.bottom,0);y?w=S-2*(T!==0||M!==0?T+M:tt(m.left,m.right)):C=g-2*(j!==0||N!==0?j+N:tt(m.top,m.bottom))}await a({...t,availableWidth:w,availableHeight:C});const P=await c.getDimensions(i.floating);return S!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function wa(){return typeof window<"u"}function ns(e){return Vg(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $t(e){var t;return(t=(Vg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vg(e){return wa()?e instanceof Node||e instanceof it(e).Node:!1}function Rt(e){return wa()?e instanceof Element||e instanceof it(e).Element:!1}function tr(e){return wa()?e instanceof HTMLElement||e instanceof it(e).HTMLElement:!1}function Rf(e){return!wa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof it(e).ShadowRoot}function vi(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function v2(e){return/^(table|td|th)$/.test(ns(e))}function xa(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const g2=/transform|translate|scale|rotate|perspective|filter/,_2=/paint|layout|strict|content/,Hr=e=>!!e&&e!=="none";let Cl;function sd(e){const t=Rt(e)?Pt(e):e;return Hr(t.transform)||Hr(t.translate)||Hr(t.scale)||Hr(t.rotate)||Hr(t.perspective)||!id()&&(Hr(t.backdropFilter)||Hr(t.filter))||g2.test(t.willChange||"")||_2.test(t.contain||"")}function y2(e){let t=Tr(e);for(;tr(t)&&!Kn(t);){if(sd(t))return t;if(xa(t))return null;t=Tr(t)}return null}function id(){return Cl==null&&(Cl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Cl}function Kn(e){return/^(html|body|#document)$/.test(ns(e))}function Pt(e){return it(e).getComputedStyle(e)}function ba(e){return Rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tr(e){if(ns(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rf(e)&&e.host||$t(e);return Rf(t)?t.host:t}function Kg(e){const t=Tr(e);return Kn(t)?e.ownerDocument?e.ownerDocument.body:e.body:tr(t)&&vi(t)?t:Kg(t)}function ei(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Kg(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),c=it(s);if(o){const i=Dc(c);return t.concat(c,c.visualViewport||[],vi(s)?s:[],i&&r?ei(i):[])}else return t.concat(s,ei(s,[],r))}function Dc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gg(e){const t=Pt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=tr(e),o=s?e.offsetWidth:r,c=s?e.offsetHeight:n,i=Ho(r)!==o||Ho(n)!==c;return i&&(r=o,n=c),{width:r,height:n,$:i}}function od(e){return Rt(e)?e:e.contextElement}function jn(e){const t=od(e);if(!tr(t))return Bt(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Gg(t);let c=(o?Ho(r.width):r.width)/n,i=(o?Ho(r.height):r.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!i||!Number.isFinite(i))&&(i=1),{x:c,y:i}}const S2=Bt(0);function qg(e){const t=it(e);return!id()||!t.visualViewport?S2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function w2(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==it(e)?!1:t}function nn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=od(e);let c=Bt(1);t&&(n?Rt(n)&&(c=jn(n)):c=jn(e));const i=w2(o,r,n)?qg(o):Bt(0);let a=(s.left+i.x)/c.x,d=(s.top+i.y)/c.y,m=s.width/c.x,u=s.height/c.y;if(o){const v=it(o),y=n&&Rt(n)?it(n):n;let S=v,g=Dc(S);for(;g&&n&&y!==S;){const p=jn(g),h=g.getBoundingClientRect(),l=Pt(g),f=h.left+(g.clientLeft+parseFloat(l.paddingLeft))*p.x,_=h.top+(g.clientTop+parseFloat(l.paddingTop))*p.y;a*=p.x,d*=p.y,m*=p.x,u*=p.y,a+=f,d+=_,S=it(g),g=Dc(S)}}return zo({width:m,height:u,x:a,y:d})}function Ca(e,t){const r=ba(e).scrollLeft;return t?t.left+r:nn($t(e)).left+r}function Xg(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Ca(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function x2(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",c=$t(n),i=t?xa(t.floating):!1;if(n===c||i&&o)return r;let a={scrollLeft:0,scrollTop:0},d=Bt(1);const m=Bt(0),u=tr(n);if((u||!u&&!o)&&((ns(n)!=="body"||vi(c))&&(a=ba(n)),u)){const y=nn(n);d=jn(n),m.x=y.x+n.clientLeft,m.y=y.y+n.clientTop}const v=c&&!u&&!o?Xg(c,a):Bt(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-a.scrollLeft*d.x+m.x+v.x,y:r.y*d.y-a.scrollTop*d.y+m.y+v.y}}function b2(e){return Array.from(e.getClientRects())}function C2(e){const t=$t(e),r=ba(e),n=e.ownerDocument.body,s=tt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=tt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let c=-r.scrollLeft+Ca(e);const i=-r.scrollTop;return Pt(n).direction==="rtl"&&(c+=tt(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:c,y:i}}const Pf=25;function E2(e,t){const r=it(e),n=$t(e),s=r.visualViewport;let o=n.clientWidth,c=n.clientHeight,i=0,a=0;if(s){o=s.width,c=s.height;const m=id();(!m||m&&t==="fixed")&&(i=s.offsetLeft,a=s.offsetTop)}const d=Ca(n);if(d<=0){const m=n.ownerDocument,u=m.body,v=getComputedStyle(u),y=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(n.clientWidth-u.clientWidth-y);S<=Pf&&(o-=S)}else d<=Pf&&(o+=d);return{width:o,height:c,x:i,y:a}}function k2(e,t){const r=nn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=tr(e)?jn(e):Bt(1),c=e.clientWidth*o.x,i=e.clientHeight*o.y,a=s*o.x,d=n*o.y;return{width:c,height:i,x:a,y:d}}function Tf(e,t,r){let n;if(t==="viewport")n=E2(e,r);else if(t==="document")n=C2($t(e));else if(Rt(t))n=k2(t,r);else{const s=qg(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return zo(n)}function Yg(e,t){const r=Tr(e);return r===t||!Rt(r)||Kn(r)?!1:Pt(r).position==="fixed"||Yg(r,t)}function R2(e,t){const r=t.get(e);if(r)return r;let n=ei(e,[],!1).filter(i=>Rt(i)&&ns(i)!=="body"),s=null;const o=Pt(e).position==="fixed";let c=o?Tr(e):e;for(;Rt(c)&&!Kn(c);){const i=Pt(c),a=sd(c);!a&&i.position==="fixed"&&(s=null),(o?!a&&!s:!a&&i.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||vi(c)&&!a&&Yg(e,c))?n=n.filter(m=>m!==c):s=i,c=Tr(c)}return t.set(e,n),n}function P2(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const c=[...r==="clippingAncestors"?xa(t)?[]:R2(t,this._c):[].concat(r),n],i=Tf(t,c[0],s);let a=i.top,d=i.right,m=i.bottom,u=i.left;for(let v=1;v<c.length;v++){const y=Tf(t,c[v],s);a=tt(y.top,a),d=Pr(y.right,d),m=Pr(y.bottom,m),u=tt(y.left,u)}return{width:d-u,height:m-a,x:u,y:a}}function T2(e){const{width:t,height:r}=Gg(e);return{width:t,height:r}}function L2(e,t,r){const n=tr(t),s=$t(t),o=r==="fixed",c=nn(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const a=Bt(0);function d(){a.x=Ca(s)}if(n||!n&&!o)if((ns(t)!=="body"||vi(s))&&(i=ba(t)),n){const y=nn(t,!0,o,t);a.x=y.x+t.clientLeft,a.y=y.y+t.clientTop}else s&&d();o&&!n&&s&&d();const m=s&&!n&&!o?Xg(s,i):Bt(0),u=c.left+i.scrollLeft-a.x-m.x,v=c.top+i.scrollTop-a.y-m.y;return{x:u,y:v,width:c.width,height:c.height}}function El(e){return Pt(e).position==="static"}function Lf(e,t){if(!tr(e)||Pt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return $t(e)===r&&(r=r.ownerDocument.body),r}function Qg(e,t){const r=it(e);if(xa(e))return r;if(!tr(e)){let s=Tr(e);for(;s&&!Kn(s);){if(Rt(s)&&!El(s))return s;s=Tr(s)}return r}let n=Lf(e,t);for(;n&&v2(n)&&El(n);)n=Lf(n,t);return n&&Kn(n)&&El(n)&&!sd(n)?r:n||y2(e)||r}const A2=async function(e){const t=this.getOffsetParent||Qg,r=this.getDimensions,n=await r(e.floating);return{reference:L2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function D2(e){return Pt(e).direction==="rtl"}const M2={convertOffsetParentRelativeRectToViewportRelativeRect:x2,getDocumentElement:$t,getClippingRect:P2,getOffsetParent:Qg,getElementRects:A2,getClientRects:b2,getDimensions:T2,getScale:jn,isElement:Rt,isRTL:D2};function Jg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function N2(e,t){let r=null,n;const s=$t(e);function o(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function c(i,a){i===void 0&&(i=!1),a===void 0&&(a=1),o();const d=e.getBoundingClientRect(),{left:m,top:u,width:v,height:y}=d;if(i||t(),!v||!y)return;const S=Gi(u),g=Gi(s.clientWidth-(m+v)),p=Gi(s.clientHeight-(u+y)),h=Gi(m),f={rootMargin:-S+"px "+-g+"px "+-p+"px "+-h+"px",threshold:tt(0,Pr(1,a))||1};let _=!0;function E(k){const C=k[0].intersectionRatio;if(C!==a){if(!_)return c();C?c(!1,C):n=setTimeout(()=>{c(!1,1e-7)},1e3)}C===1&&!Jg(d,e.getBoundingClientRect())&&c(),_=!1}try{r=new IntersectionObserver(E,{...f,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,f)}r.observe(e)}return c(!0),o}function I2(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,d=od(e),m=s||o?[...d?ei(d):[],...t?ei(t):[]]:[];m.forEach(h=>{s&&h.addEventListener("scroll",r,{passive:!0}),o&&h.addEventListener("resize",r)});const u=d&&i?N2(d,r):null;let v=-1,y=null;c&&(y=new ResizeObserver(h=>{let[l]=h;l&&l.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var f;(f=y)==null||f.observe(t)})),r()}),d&&!a&&y.observe(d),t&&y.observe(t));let S,g=a?nn(e):null;a&&p();function p(){const h=nn(e);g&&!Jg(g,h)&&r(),g=h,S=requestAnimationFrame(p)}return r(),()=>{var h;m.forEach(l=>{s&&l.removeEventListener("scroll",r),o&&l.removeEventListener("resize",r)}),u==null||u(),(h=y)==null||h.disconnect(),y=null,a&&cancelAnimationFrame(S)}}const O2=h2,j2=f2,B2=c2,F2=m2,H2=u2,Af=l2,$2=p2,z2=(e,t,r)=>{const n=new Map,s={platform:M2,...r},o={...s.platform,_c:n};return a2(e,t,{...s,platform:o})};var W2=typeof document<"u",U2=function(){},ho=W2?b.useLayoutEffect:U2;function Wo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Wo(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!Wo(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Zg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Df(e,t){const r=Zg(e);return Math.round(t*r)/r}function kl(e){const t=b.useRef(e);return ho(()=>{t.current=e}),t}function V2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:c}={},transform:i=!0,whileElementsMounted:a,open:d}=e,[m,u]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=b.useState(n);Wo(v,n)||y(n);const[S,g]=b.useState(null),[p,h]=b.useState(null),l=b.useCallback(B=>{B!==k.current&&(k.current=B,g(B))},[]),f=b.useCallback(B=>{B!==C.current&&(C.current=B,h(B))},[]),_=o||S,E=c||p,k=b.useRef(null),C=b.useRef(null),w=b.useRef(m),P=a!=null,T=kl(a),M=kl(s),j=kl(d),N=b.useCallback(()=>{if(!k.current||!C.current)return;const B={placement:t,strategy:r,middleware:v};M.current&&(B.platform=M.current),z2(k.current,C.current,B).then(R=>{const L={...R,isPositioned:j.current!==!1};F.current&&!Wo(w.current,L)&&(w.current=L,Jn.flushSync(()=>{u(L)}))})},[v,t,r,M,j]);ho(()=>{d===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,u(B=>({...B,isPositioned:!1})))},[d]);const F=b.useRef(!1);ho(()=>(F.current=!0,()=>{F.current=!1}),[]),ho(()=>{if(_&&(k.current=_),E&&(C.current=E),_&&E){if(T.current)return T.current(_,E,N);N()}},[_,E,N,T,P]);const V=b.useMemo(()=>({reference:k,floating:C,setReference:l,setFloating:f}),[l,f]),K=b.useMemo(()=>({reference:_,floating:E}),[_,E]),q=b.useMemo(()=>{const B={position:r,left:0,top:0};if(!K.floating)return B;const R=Df(K.floating,m.x),L=Df(K.floating,m.y);return i?{...B,transform:"translate("+R+"px, "+L+"px)",...Zg(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:L}},[r,i,K.floating,m.x,m.y]);return b.useMemo(()=>({...m,update:N,refs:V,elements:K,floatingStyles:q}),[m,N,V,K,q])}const K2=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Af({element:n.current,padding:s}).fn(r):{}:n?Af({element:n,padding:s}).fn(r):{}}}},G2=(e,t)=>{const r=O2(e);return{name:r.name,fn:r.fn,options:[e,t]}},q2=(e,t)=>{const r=j2(e);return{name:r.name,fn:r.fn,options:[e,t]}},X2=(e,t)=>({fn:$2(e).fn,options:[e,t]}),Y2=(e,t)=>{const r=B2(e);return{name:r.name,fn:r.fn,options:[e,t]}},Q2=(e,t)=>{const r=F2(e);return{name:r.name,fn:r.fn,options:[e,t]}},J2=(e,t)=>{const r=H2(e);return{name:r.name,fn:r.fn,options:[e,t]}},Z2=(e,t)=>{const r=K2(e);return{name:r.name,fn:r.fn,options:[e,t]}};var eR="Arrow",e_=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return x.jsx(ie.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});e_.displayName=eR;var tR=e_,t_="Popper",[r_,Nr]=_t(t_),[mA,n_]=r_(t_),s_="PopperAnchor",i_=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=n_(s_,r),c=b.useRef(null),i=ce(t,c),a=b.useRef(null);return b.useEffect(()=>{const d=a.current;a.current=(n==null?void 0:n.current)||c.current,d!==a.current&&o.onAnchorChange(a.current)}),n?null:x.jsx(ie.div,{...s,ref:i})});i_.displayName=s_;var ad="PopperContent",[rR,nR]=r_(ad),o_=b.forwardRef((e,t)=>{var O,A,z,$,Y,X;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:c=0,arrowPadding:i=0,avoidCollisions:a=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:u="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:S,...g}=e,p=n_(ad,r),[h,l]=b.useState(null),f=ce(t,ne=>l(ne)),[_,E]=b.useState(null),k=Ku(_),C=(k==null?void 0:k.width)??0,w=(k==null?void 0:k.height)??0,P=n+(o!=="center"?"-"+o:""),T=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},M=Array.isArray(d)?d:[d],j=M.length>0,N={padding:T,boundary:M.filter(iR),altBoundary:j},{refs:F,floatingStyles:V,placement:K,isPositioned:q,middlewareData:B}=V2({strategy:"fixed",placement:P,whileElementsMounted:(...ne)=>I2(...ne,{animationFrame:y==="always"}),elements:{reference:p.anchor},middleware:[G2({mainAxis:s+w,alignmentAxis:c}),a&&q2({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?X2():void 0,...N}),a&&Y2({...N}),Q2({...N,apply:({elements:ne,rects:oe,availableWidth:he,availableHeight:Ce})=>{const{width:se,height:Br}=oe.reference,rr=ne.floating.style;rr.setProperty("--radix-popper-available-width",`${he}px`),rr.setProperty("--radix-popper-available-height",`${Ce}px`),rr.setProperty("--radix-popper-anchor-width",`${se}px`),rr.setProperty("--radix-popper-anchor-height",`${Br}px`)}}),_&&Z2({element:_,padding:i}),oR({arrowWidth:C,arrowHeight:w}),v&&J2({strategy:"referenceHidden",...N})]}),[R,L]=c_(K),I=Ft(S);Le(()=>{q&&(I==null||I())},[q,I]);const D=(O=B.arrow)==null?void 0:O.x,W=(A=B.arrow)==null?void 0:A.y,H=((z=B.arrow)==null?void 0:z.centerOffset)!==0,[U,G]=b.useState();return Le(()=>{h&&G(window.getComputedStyle(h).zIndex)},[h]),x.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:q?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[($=B.transformOrigin)==null?void 0:$.x,(Y=B.transformOrigin)==null?void 0:Y.y].join(" "),...((X=B.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(rR,{scope:r,placedSide:R,onArrowChange:E,arrowX:D,arrowY:W,shouldHideArrow:H,children:x.jsx(ie.div,{"data-side":R,"data-align":L,...g,ref:f,style:{...g.style,animation:q?void 0:"none"}})})})});o_.displayName=ad;var a_="PopperArrow",sR={top:"bottom",right:"left",bottom:"top",left:"right"},l_=b.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=nR(a_,n),c=sR[o.placedSide];return x.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:x.jsx(tR,{...s,ref:r,style:{...s.style,display:"block"}})})});l_.displayName=a_;function iR(e){return e!==null}var oR=e=>({name:"transformOrigin",options:e,fn(t){var p,h,l;const{placement:r,rects:n,middlewareData:s}=t,c=((p=s.arrow)==null?void 0:p.centerOffset)!==0,i=c?0:e.arrowWidth,a=c?0:e.arrowHeight,[d,m]=c_(r),u={start:"0%",center:"50%",end:"100%"}[m],v=(((h=s.arrow)==null?void 0:h.x)??0)+i/2,y=(((l=s.arrow)==null?void 0:l.y)??0)+a/2;let S="",g="";return d==="bottom"?(S=c?u:`${v}px`,g=`${-a}px`):d==="top"?(S=c?u:`${v}px`,g=`${n.floating.height+a}px`):d==="right"?(S=`${-a}px`,g=c?u:`${y}px`):d==="left"&&(S=`${n.floating.width+a}px`,g=c?u:`${y}px`),{data:{x:S,y:g}}}});function c_(e){const[t,r="center"]=e.split("-");return[t,r]}var gi=i_,Ea=o_,ka=l_,Rl="rovingFocusGroup.onEntryFocus",aR={bubbles:!1,cancelable:!0},_i="RovingFocusGroup",[Mc,u_,lR]=ed(_i),[cR,Ra]=_t(_i,[lR]),[uR,dR]=cR(_i),d_=b.forwardRef((e,t)=>x.jsx(Mc.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(Mc.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(hR,{...e,ref:t})})}));d_.displayName=_i;var hR=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:c,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:a,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...u}=e,v=b.useRef(null),y=ce(t,v),S=zg(o),[g,p]=ui({prop:c,defaultProp:i??null,onChange:a,caller:_i}),[h,l]=b.useState(!1),f=Ft(d),_=u_(r),E=b.useRef(!1),[k,C]=b.useState(0);return b.useEffect(()=>{const w=v.current;if(w)return w.addEventListener(Rl,f),()=>w.removeEventListener(Rl,f)},[f]),x.jsx(uR,{scope:r,orientation:n,dir:S,loop:s,currentTabStopId:g,onItemFocus:b.useCallback(w=>p(w),[p]),onItemShiftTab:b.useCallback(()=>l(!0),[]),onFocusableItemAdd:b.useCallback(()=>C(w=>w+1),[]),onFocusableItemRemove:b.useCallback(()=>C(w=>w-1),[]),children:x.jsx(ie.div,{tabIndex:h||k===0?-1:0,"data-orientation":n,...u,ref:y,style:{outline:"none",...e.style},onMouseDown:J(e.onMouseDown,()=>{E.current=!0}),onFocus:J(e.onFocus,w=>{const P=!E.current;if(w.target===w.currentTarget&&P&&!h){const T=new CustomEvent(Rl,aR);if(w.currentTarget.dispatchEvent(T),!T.defaultPrevented){const M=_().filter(K=>K.focusable),j=M.find(K=>K.active),N=M.find(K=>K.id===g),V=[j,N,...M].filter(Boolean).map(K=>K.ref.current);p_(V,m)}}E.current=!1}),onBlur:J(e.onBlur,()=>l(!1))})})}),h_="RovingFocusGroupItem",f_=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:c,...i}=e,a=st(),d=o||a,m=dR(h_,r),u=m.currentTabStopId===d,v=u_(r),{onFocusableItemAdd:y,onFocusableItemRemove:S,currentTabStopId:g}=m;return b.useEffect(()=>{if(n)return y(),()=>S()},[n,y,S]),x.jsx(Mc.ItemSlot,{scope:r,id:d,focusable:n,active:s,children:x.jsx(ie.span,{tabIndex:u?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:J(e.onMouseDown,p=>{n?m.onItemFocus(d):p.preventDefault()}),onFocus:J(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:J(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){m.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const h=mR(p,m.orientation,m.dir);if(h!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let f=v().filter(_=>_.focusable).map(_=>_.ref.current);if(h==="last")f.reverse();else if(h==="prev"||h==="next"){h==="prev"&&f.reverse();const _=f.indexOf(p.currentTarget);f=m.loop?vR(f,_+1):f.slice(_+1)}setTimeout(()=>p_(f))}}),children:typeof c=="function"?c({isCurrentTabStop:u,hasTabStop:g!=null}):c})})});f_.displayName=h_;var fR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mR(e,t,r){const n=pR(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return fR[n]}function p_(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function vR(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var m_=d_,v_=f_,Nc=["Enter"," "],gR=["ArrowDown","PageUp","Home"],g_=["ArrowUp","PageDown","End"],_R=[...gR,...g_],yR={ltr:[...Nc,"ArrowRight"],rtl:[...Nc,"ArrowLeft"]},SR={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pa="Menu",[ti,wR,xR]=ed(Pa),[un,__]=_t(Pa,[xR,Nr,Ra]),ld=Nr(),y_=Ra(),[vA,dn]=un(Pa),[gA,yi]=un(Pa),bR="MenuAnchor",cd=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=ld(r);return x.jsx(gi,{...s,...n,ref:t})});cd.displayName=bR;var ud="MenuPortal",[CR,S_]=un(ud,{forceMount:void 0}),w_=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,o=dn(ud,t);return x.jsx(CR,{scope:t,forceMount:r,children:x.jsx(Qe,{present:r||o.open,children:x.jsx(ts,{asChild:!0,container:s,children:n})})})};w_.displayName=ud;var mt="MenuContent",[ER,dd]=un(mt),x_=b.forwardRef((e,t)=>{const r=S_(mt,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=dn(mt,e.__scopeMenu),c=yi(mt,e.__scopeMenu);return x.jsx(ti.Provider,{scope:e.__scopeMenu,children:x.jsx(Qe,{present:n||o.open,children:x.jsx(ti.Slot,{scope:e.__scopeMenu,children:c.modal?x.jsx(kR,{...s,ref:t}):x.jsx(RR,{...s,ref:t})})})})}),kR=b.forwardRef((e,t)=>{const r=dn(mt,e.__scopeMenu),n=b.useRef(null),s=ce(t,n);return b.useEffect(()=>{const o=n.current;if(o)return va(o)},[]),x.jsx(hd,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:J(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),RR=b.forwardRef((e,t)=>{const r=dn(mt,e.__scopeMenu);return x.jsx(hd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),PR=en("MenuContent.ScrollLock"),hd=b.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:c,disableOutsidePointerEvents:i,onEntryFocus:a,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:u,onInteractOutside:v,onDismiss:y,disableOutsideScroll:S,...g}=e,p=dn(mt,r),h=yi(mt,r),l=ld(r),f=y_(r),_=wR(r),[E,k]=b.useState(null),C=b.useRef(null),w=ce(t,C,p.onContentChange),P=b.useRef(0),T=b.useRef(""),M=b.useRef(0),j=b.useRef(null),N=b.useRef("right"),F=b.useRef(0),V=S?hi:b.Fragment,K=S?{as:PR,allowPinchZoom:!0}:void 0,q=R=>{var O,A;const L=T.current+R,I=_().filter(z=>!z.disabled),D=document.activeElement,W=(O=I.find(z=>z.ref.current===D))==null?void 0:O.textValue,H=I.map(z=>z.textValue),U=HR(H,L,W),G=(A=I.find(z=>z.textValue===U))==null?void 0:A.ref.current;(function z($){T.current=$,window.clearTimeout(P.current),$!==""&&(P.current=window.setTimeout(()=>z(""),1e3))})(L),G&&setTimeout(()=>G.focus())};b.useEffect(()=>()=>window.clearTimeout(P.current),[]),pa();const B=b.useCallback(R=>{var I,D;return N.current===((I=j.current)==null?void 0:I.side)&&zR(R,(D=j.current)==null?void 0:D.area)},[]);return x.jsx(ER,{scope:r,searchRef:T,onItemEnter:b.useCallback(R=>{B(R)&&R.preventDefault()},[B]),onItemLeave:b.useCallback(R=>{var L;B(R)||((L=C.current)==null||L.focus(),k(null))},[B]),onTriggerLeave:b.useCallback(R=>{B(R)&&R.preventDefault()},[B]),pointerGraceTimerRef:M,onPointerGraceIntentChange:b.useCallback(R=>{j.current=R},[]),children:x.jsx(V,{...K,children:x.jsx(di,{asChild:!0,trapped:s,onMountAutoFocus:J(o,R=>{var L;R.preventDefault(),(L=C.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:x.jsx(es,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:u,onInteractOutside:v,onDismiss:y,children:x.jsx(m_,{asChild:!0,...f,dir:h.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:k,onEntryFocus:J(a,R=>{h.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(Ea,{role:"menu","aria-orientation":"vertical","data-state":B_(p.open),"data-radix-menu-content":"",dir:h.dir,...l,...g,ref:w,style:{outline:"none",...g.style},onKeyDown:J(g.onKeyDown,R=>{const I=R.target.closest("[data-radix-menu-content]")===R.currentTarget,D=R.ctrlKey||R.altKey||R.metaKey,W=R.key.length===1;I&&(R.key==="Tab"&&R.preventDefault(),!D&&W&&q(R.key));const H=C.current;if(R.target!==H||!_R.includes(R.key))return;R.preventDefault();const G=_().filter(O=>!O.disabled).map(O=>O.ref.current);g_.includes(R.key)&&G.reverse(),BR(G)}),onBlur:J(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(P.current),T.current="")}),onPointerMove:J(e.onPointerMove,ri(R=>{const L=R.target,I=F.current!==R.clientX;if(R.currentTarget.contains(L)&&I){const D=R.clientX>F.current?"right":"left";N.current=D,F.current=R.clientX}}))})})})})})})});x_.displayName=mt;var TR="MenuGroup",fd=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return x.jsx(ie.div,{role:"group",...n,ref:t})});fd.displayName=TR;var LR="MenuLabel",b_=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return x.jsx(ie.div,{...n,ref:t})});b_.displayName=LR;var Uo="MenuItem",Mf="menu.itemSelect",Ta=b.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,o=b.useRef(null),c=yi(Uo,e.__scopeMenu),i=dd(Uo,e.__scopeMenu),a=ce(t,o),d=b.useRef(!1),m=()=>{const u=o.current;if(!r&&u){const v=new CustomEvent(Mf,{bubbles:!0,cancelable:!0});u.addEventListener(Mf,y=>n==null?void 0:n(y),{once:!0}),Jv(u,v),v.defaultPrevented?d.current=!1:c.onClose()}};return x.jsx(C_,{...s,ref:a,disabled:r,onClick:J(e.onClick,m),onPointerDown:u=>{var v;(v=e.onPointerDown)==null||v.call(e,u),d.current=!0},onPointerUp:J(e.onPointerUp,u=>{var v;d.current||(v=u.currentTarget)==null||v.click()}),onKeyDown:J(e.onKeyDown,u=>{const v=i.searchRef.current!=="";r||v&&u.key===" "||Nc.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Ta.displayName=Uo;var C_=b.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=e,c=dd(Uo,r),i=y_(r),a=b.useRef(null),d=ce(t,a),[m,u]=b.useState(!1),[v,y]=b.useState("");return b.useEffect(()=>{const S=a.current;S&&y((S.textContent??"").trim())},[o.children]),x.jsx(ti.ItemSlot,{scope:r,disabled:n,textValue:s??v,children:x.jsx(v_,{asChild:!0,...i,focusable:!n,children:x.jsx(ie.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:d,onPointerMove:J(e.onPointerMove,ri(S=>{n?c.onItemLeave(S):(c.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(e.onPointerLeave,ri(S=>c.onItemLeave(S))),onFocus:J(e.onFocus,()=>u(!0)),onBlur:J(e.onBlur,()=>u(!1))})})})}),AR="MenuCheckboxItem",E_=b.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return x.jsx(L_,{scope:e.__scopeMenu,checked:r,children:x.jsx(Ta,{role:"menuitemcheckbox","aria-checked":Vo(r)?"mixed":r,...s,ref:t,"data-state":md(r),onSelect:J(s.onSelect,()=>n==null?void 0:n(Vo(r)?!0:!r),{checkForDefaultPrevented:!1})})})});E_.displayName=AR;var k_="MenuRadioGroup",[DR,MR]=un(k_,{value:void 0,onValueChange:()=>{}}),R_=b.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,o=Ft(n);return x.jsx(DR,{scope:e.__scopeMenu,value:r,onValueChange:o,children:x.jsx(fd,{...s,ref:t})})});R_.displayName=k_;var P_="MenuRadioItem",T_=b.forwardRef((e,t)=>{const{value:r,...n}=e,s=MR(P_,e.__scopeMenu),o=r===s.value;return x.jsx(L_,{scope:e.__scopeMenu,checked:o,children:x.jsx(Ta,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":md(o),onSelect:J(n.onSelect,()=>{var c;return(c=s.onValueChange)==null?void 0:c.call(s,r)},{checkForDefaultPrevented:!1})})})});T_.displayName=P_;var pd="MenuItemIndicator",[L_,NR]=un(pd,{checked:!1}),A_=b.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,o=NR(pd,r);return x.jsx(Qe,{present:n||Vo(o.checked)||o.checked===!0,children:x.jsx(ie.span,{...s,ref:t,"data-state":md(o.checked)})})});A_.displayName=pd;var IR="MenuSeparator",D_=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return x.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});D_.displayName=IR;var OR="MenuArrow",M_=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=ld(r);return x.jsx(ka,{...s,...n,ref:t})});M_.displayName=OR;var jR="MenuSub",[_A,N_]=un(jR),bs="MenuSubTrigger",I_=b.forwardRef((e,t)=>{const r=dn(bs,e.__scopeMenu),n=yi(bs,e.__scopeMenu),s=N_(bs,e.__scopeMenu),o=dd(bs,e.__scopeMenu),c=b.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:a}=o,d={__scopeMenu:e.__scopeMenu},m=b.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return b.useEffect(()=>m,[m]),b.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),a(null)}},[i,a]),x.jsx(cd,{asChild:!0,...d,children:x.jsx(C_,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":B_(r.open),...e,ref:Ht(t,s.onTriggerChange),onClick:u=>{var v;(v=e.onClick)==null||v.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:J(e.onPointerMove,ri(u=>{o.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(o.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:J(e.onPointerLeave,ri(u=>{var y,S;m();const v=(y=r.content)==null?void 0:y.getBoundingClientRect();if(v){const g=(S=r.content)==null?void 0:S.dataset.side,p=g==="right",h=p?-5:5,l=v[p?"left":"right"],f=v[p?"right":"left"];o.onPointerGraceIntentChange({area:[{x:u.clientX+h,y:u.clientY},{x:l,y:v.top},{x:f,y:v.top},{x:f,y:v.bottom},{x:l,y:v.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(u),u.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:J(e.onKeyDown,u=>{var y;const v=o.searchRef.current!=="";e.disabled||v&&u.key===" "||yR[n.dir].includes(u.key)&&(r.onOpenChange(!0),(y=r.content)==null||y.focus(),u.preventDefault())})})})});I_.displayName=bs;var O_="MenuSubContent",j_=b.forwardRef((e,t)=>{const r=S_(mt,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=dn(mt,e.__scopeMenu),c=yi(mt,e.__scopeMenu),i=N_(O_,e.__scopeMenu),a=b.useRef(null),d=ce(t,a);return x.jsx(ti.Provider,{scope:e.__scopeMenu,children:x.jsx(Qe,{present:n||o.open,children:x.jsx(ti.Slot,{scope:e.__scopeMenu,children:x.jsx(hd,{id:i.contentId,"aria-labelledby":i.triggerId,...s,ref:d,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var u;c.isUsingKeyboardRef.current&&((u=a.current)==null||u.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:J(e.onFocusOutside,m=>{m.target!==i.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:J(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:J(e.onKeyDown,m=>{var y;const u=m.currentTarget.contains(m.target),v=SR[c.dir].includes(m.key);u&&v&&(o.onOpenChange(!1),(y=i.trigger)==null||y.focus(),m.preventDefault())})})})})})});j_.displayName=O_;function B_(e){return e?"open":"closed"}function Vo(e){return e==="indeterminate"}function md(e){return Vo(e)?"indeterminate":e?"checked":"unchecked"}function BR(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function FR(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function HR(e,t,r){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let c=FR(e,Math.max(o,0));s.length===1&&(c=c.filter(d=>d!==r));const a=c.find(d=>d.toLowerCase().startsWith(s.toLowerCase()));return a!==r?a:void 0}function $R(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,c=t.length-1;o<t.length;c=o++){const i=t[o],a=t[c],d=i.x,m=i.y,u=a.x,v=a.y;m>n!=v>n&&r<(u-d)*(n-m)/(v-m)+d&&(s=!s)}return s}function zR(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return $R(r,t)}function ri(e){return t=>t.pointerType==="mouse"?e(t):void 0}var WR=cd,UR=w_,VR=x_,KR=fd,GR=b_,qR=Ta,XR=E_,YR=R_,QR=T_,JR=A_,ZR=D_,eP=M_,tP=I_,rP=j_,F_="DropdownMenu",[nP]=_t(F_,[__]),Ze=__(),[yA,H_]=nP(F_),$_="DropdownMenuTrigger",sP=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,o=H_($_,r),c=Ze(r);return x.jsx(WR,{asChild:!0,...c,children:x.jsx(ie.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:Ht(t,o.triggerRef),onPointerDown:J(e.onPointerDown,i=>{!n&&i.button===0&&i.ctrlKey===!1&&(o.onOpenToggle(),o.open||i.preventDefault())}),onKeyDown:J(e.onKeyDown,i=>{n||(["Enter"," "].includes(i.key)&&o.onOpenToggle(),i.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});sP.displayName=$_;var iP="DropdownMenuPortal",z_=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Ze(t);return x.jsx(UR,{...n,...r})};z_.displayName=iP;var W_="DropdownMenuContent",U_=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=H_(W_,r),o=Ze(r),c=b.useRef(!1);return x.jsx(VR,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...n,ref:t,onCloseAutoFocus:J(e.onCloseAutoFocus,i=>{var a;c.current||(a=s.triggerRef.current)==null||a.focus(),c.current=!1,i.preventDefault()}),onInteractOutside:J(e.onInteractOutside,i=>{const a=i.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,m=a.button===2||d;(!s.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});U_.displayName=W_;var oP="DropdownMenuGroup",aP=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(KR,{...s,...n,ref:t})});aP.displayName=oP;var lP="DropdownMenuLabel",V_=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(GR,{...s,...n,ref:t})});V_.displayName=lP;var cP="DropdownMenuItem",K_=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(qR,{...s,...n,ref:t})});K_.displayName=cP;var uP="DropdownMenuCheckboxItem",G_=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(XR,{...s,...n,ref:t})});G_.displayName=uP;var dP="DropdownMenuRadioGroup",hP=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(YR,{...s,...n,ref:t})});hP.displayName=dP;var fP="DropdownMenuRadioItem",q_=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(QR,{...s,...n,ref:t})});q_.displayName=fP;var pP="DropdownMenuItemIndicator",X_=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(JR,{...s,...n,ref:t})});X_.displayName=pP;var mP="DropdownMenuSeparator",Y_=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(ZR,{...s,...n,ref:t})});Y_.displayName=mP;var vP="DropdownMenuArrow",gP=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(eP,{...s,...n,ref:t})});gP.displayName=vP;var _P="DropdownMenuSubTrigger",Q_=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(tP,{...s,...n,ref:t})});Q_.displayName=_P;var yP="DropdownMenuSubContent",J_=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return x.jsx(rP,{...s,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});J_.displayName=yP;var SP=z_,Z_=U_,e0=V_,t0=K_,r0=G_,n0=q_,s0=X_,i0=Y_,o0=Q_,a0=J_;const wP=b.forwardRef(({className:e,inset:t,children:r,...n},s)=>x.jsxs(o0,{ref:s,className:re("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,x.jsx(qv,{className:"ml-auto"})]}));wP.displayName=o0.displayName;const xP=b.forwardRef(({className:e,...t},r)=>x.jsx(a0,{ref:r,className:re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));xP.displayName=a0.displayName;const bP=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>x.jsx(SP,{children:x.jsx(Z_,{ref:n,sideOffset:t,className:re("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));bP.displayName=Z_.displayName;const CP=b.forwardRef(({className:e,inset:t,...r},n)=>x.jsx(t0,{ref:n,className:re("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));CP.displayName=t0.displayName;const EP=b.forwardRef(({className:e,children:t,checked:r,...n},s)=>x.jsxs(r0,{ref:s,className:re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(s0,{children:x.jsx(Wu,{className:"h-4 w-4"})})}),t]}));EP.displayName=r0.displayName;const kP=b.forwardRef(({className:e,children:t,...r},n)=>x.jsxs(n0,{ref:n,className:re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(s0,{children:x.jsx(Vb,{className:"h-2 w-2 fill-current"})})}),t]}));kP.displayName=n0.displayName;const RP=b.forwardRef(({className:e,inset:t,...r},n)=>x.jsx(e0,{ref:n,className:re("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));RP.displayName=e0.displayName;const PP=b.forwardRef(({className:e,...t},r)=>x.jsx(i0,{ref:r,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));PP.displayName=i0.displayName;const TP=b.forwardRef(({className:e,type:t,...r},n)=>x.jsx("input",{type:t,className:re("flex h-9 w-full rounded-md border border-transparent bg-input px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));TP.displayName="Input";var LP="Label",l0=b.forwardRef((e,t)=>x.jsx(Ue.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));l0.displayName=LP;var c0=l0;const AP=zu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),DP=b.forwardRef(({className:e,...t},r)=>x.jsx(c0,{ref:r,className:re(AP(),e),...t}));DP.displayName=c0.displayName;var u0="Popover",[d0]=_t(u0,[Nr]),La=Nr(),[SA,Ir]=d0(u0),h0="PopoverAnchor",MP=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Ir(h0,r),o=La(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=s;return b.useEffect(()=>(c(),()=>i()),[c,i]),x.jsx(gi,{...o,...n,ref:t})});MP.displayName=h0;var f0="PopoverTrigger",NP=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Ir(f0,r),o=La(r),c=ce(t,s.triggerRef),i=x.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":_0(s.open),...n,ref:c,onClick:J(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?i:x.jsx(gi,{asChild:!0,...o,children:i})});NP.displayName=f0;var vd="PopoverPortal",[IP,OP]=d0(vd,{forceMount:void 0}),p0=e=>{const{__scopePopover:t,forceMount:r,children:n,container:s}=e,o=Ir(vd,t);return x.jsx(IP,{scope:t,forceMount:r,children:x.jsx(Qe,{present:r||o.open,children:x.jsx(ts,{asChild:!0,container:s,children:n})})})};p0.displayName=vd;var Gn="PopoverContent",m0=b.forwardRef((e,t)=>{const r=OP(Gn,e.__scopePopover),{forceMount:n=r.forceMount,...s}=e,o=Ir(Gn,e.__scopePopover);return x.jsx(Qe,{present:n||o.open,children:o.modal?x.jsx(BP,{...s,ref:t}):x.jsx(FP,{...s,ref:t})})});m0.displayName=Gn;var jP=en("PopoverContent.RemoveScroll"),BP=b.forwardRef((e,t)=>{const r=Ir(Gn,e.__scopePopover),n=b.useRef(null),s=ce(t,n),o=b.useRef(!1);return b.useEffect(()=>{const c=n.current;if(c)return va(c)},[]),x.jsx(hi,{as:jP,allowPinchZoom:!0,children:x.jsx(v0,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),o.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0,d=i.button===2||a;o.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:J(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),FP=b.forwardRef((e,t)=>{const r=Ir(Gn,e.__scopePopover),n=b.useRef(!1),s=b.useRef(!1);return x.jsx(v0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,o),o.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var a,d;(a=e.onInteractOutside)==null||a.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=o.target;((d=r.triggerRef.current)==null?void 0:d.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),v0=b.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d,onInteractOutside:m,...u}=e,v=Ir(Gn,r),y=La(r);return pa(),x.jsx(di,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:x.jsx(es,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:m,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:x.jsx(Ea,{"data-state":_0(v.open),role:"dialog",id:v.contentId,...y,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),g0="PopoverClose",HP=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Ir(g0,r);return x.jsx(ie.button,{type:"button",...n,ref:t,onClick:J(e.onClick,()=>s.onOpenChange(!1))})});HP.displayName=g0;var $P="PopoverArrow",zP=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=La(r);return x.jsx(ka,{...s,...n,ref:t})});zP.displayName=$P;function _0(e){return e?"open":"closed"}var WP=p0,y0=m0;const UP=b.forwardRef(({className:e,align:t="start",sideOffset:r=4,...n},s)=>x.jsx(WP,{children:x.jsx(y0,{ref:s,align:t,sideOffset:r,className:re("z-50 w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-0 text-popover-foreground shadow-md outline-none 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",e),...n})}));UP.displayName=y0.displayName;var gd="Progress",_d=100,[VP]=Dv(gd),[KP,GP]=VP(gd),S0=b.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:o=qP,...c}=e;(s||s===0)&&!Nf(s)&&console.error(XP(`${s}`,"Progress"));const i=Nf(s)?s:_d;n!==null&&!If(n,i)&&console.error(YP(`${n}`,"Progress"));const a=If(n,i)?n:null,d=Ko(a)?o(a,i):void 0;return x.jsx(KP,{scope:r,value:a,max:i,children:x.jsx(Ue.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Ko(a)?a:void 0,"aria-valuetext":d,role:"progressbar","data-state":b0(a,i),"data-value":a??void 0,"data-max":i,...c,ref:t})})});S0.displayName=gd;var w0="ProgressIndicator",x0=b.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,s=GP(w0,r);return x.jsx(Ue.div,{"data-state":b0(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:t})});x0.displayName=w0;function qP(e,t){return`${Math.round(e/t*100)}%`}function b0(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ko(e){return typeof e=="number"}function Nf(e){return Ko(e)&&!isNaN(e)&&e>0}function If(e,t){return Ko(e)&&!isNaN(e)&&e<=t&&e>=0}function XP(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${_d}\`.`}function YP(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
265
|
+
- a positive number
|
|
266
|
+
- less than the value passed to \`max\` (or ${_d} if no \`max\` prop is set)
|
|
267
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
268
|
+
|
|
269
|
+
Defaulting to \`null\`.`}var C0=S0,QP=x0;const JP=b.forwardRef(({className:e,value:t,...r},n)=>x.jsx(C0,{ref:n,className:re("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:x.jsx(QP,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));JP.displayName=C0.displayName;function Of(e,[t,r]){return Math.min(r,Math.max(t,e))}var E0=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"}),ZP="VisuallyHidden",k0=b.forwardRef((e,t)=>x.jsx(ie.span,{...e,ref:t,style:{...E0,...e.style}}));k0.displayName=ZP;var eT=k0,tT=[" ","Enter","ArrowUp","ArrowDown"],rT=[" ","Enter"],Aa="Select",[yd,Da,nT]=ed(Aa),[ss]=_t(Aa,[nT,Nr]),Sd=Nr(),[wA,Or]=ss(Aa),[xA,sT]=ss(Aa),R0="SelectTrigger",P0=b.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=Sd(r),c=Or(R0,r),i=c.disabled||n,a=ce(t,c.onTriggerChange),d=Da(r),m=b.useRef("touch"),[u,v,y]=Y0(g=>{const p=d().filter(f=>!f.disabled),h=p.find(f=>f.value===c.value),l=Q0(p,g,h);l!==void 0&&c.onValueChange(l.value)}),S=g=>{i||(c.onOpenChange(!0),y()),g&&(c.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return x.jsx(gi,{asChild:!0,...o,children:x.jsx(ie.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":X0(c.value)?"":void 0,...s,ref:a,onClick:J(s.onClick,g=>{g.currentTarget.focus(),m.current!=="mouse"&&S(g)}),onPointerDown:J(s.onPointerDown,g=>{m.current=g.pointerType;const p=g.target;p.hasPointerCapture(g.pointerId)&&p.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(S(g),g.preventDefault())}),onKeyDown:J(s.onKeyDown,g=>{const p=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&v(g.key),!(p&&g.key===" ")&&tT.includes(g.key)&&(S(),g.preventDefault())})})})});P0.displayName=R0;var T0="SelectValue",iT=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:c="",...i}=e,a=Or(T0,r),{onValueNodeHasChildrenChange:d}=a,m=o!==void 0,u=ce(t,a.onValueNodeChange);return Le(()=>{d(m)},[d,m]),x.jsx(ie.span,{...i,ref:u,style:{pointerEvents:"none"},children:X0(a.value)?x.jsx(x.Fragment,{children:c}):o})});iT.displayName=T0;var oT="SelectIcon",L0=b.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return x.jsx(ie.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});L0.displayName=oT;var aT="SelectPortal",A0=e=>x.jsx(ts,{asChild:!0,...e});A0.displayName=aT;var sn="SelectContent",D0=b.forwardRef((e,t)=>{const r=Or(sn,e.__scopeSelect),[n,s]=b.useState();if(Le(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?Jn.createPortal(x.jsx(M0,{scope:e.__scopeSelect,children:x.jsx(yd.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),o):null}return x.jsx(N0,{...e,ref:t})});D0.displayName=sn;var St=10,[M0,jr]=ss(sn),lT="SelectContentImpl",cT=en("SelectContent.RemoveScroll"),N0=b.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:c,side:i,sideOffset:a,align:d,alignOffset:m,arrowPadding:u,collisionBoundary:v,collisionPadding:y,sticky:S,hideWhenDetached:g,avoidCollisions:p,...h}=e,l=Or(sn,r),[f,_]=b.useState(null),[E,k]=b.useState(null),C=ce(t,O=>_(O)),[w,P]=b.useState(null),[T,M]=b.useState(null),j=Da(r),[N,F]=b.useState(!1),V=b.useRef(!1);b.useEffect(()=>{if(f)return va(f)},[f]),pa();const K=b.useCallback(O=>{const[A,...z]=j().map(X=>X.ref.current),[$]=z.slice(-1),Y=document.activeElement;for(const X of O)if(X===Y||(X==null||X.scrollIntoView({block:"nearest"}),X===A&&E&&(E.scrollTop=0),X===$&&E&&(E.scrollTop=E.scrollHeight),X==null||X.focus(),document.activeElement!==Y))return},[j,E]),q=b.useCallback(()=>K([w,f]),[K,w,f]);b.useEffect(()=>{N&&q()},[N,q]);const{onOpenChange:B,triggerPointerDownPosRef:R}=l;b.useEffect(()=>{if(f){let O={x:0,y:0};const A=$=>{var Y,X;O={x:Math.abs(Math.round($.pageX)-(((Y=R.current)==null?void 0:Y.x)??0)),y:Math.abs(Math.round($.pageY)-(((X=R.current)==null?void 0:X.y)??0))}},z=$=>{O.x<=10&&O.y<=10?$.preventDefault():f.contains($.target)||B(!1),document.removeEventListener("pointermove",A),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",z,{capture:!0})}}},[f,B,R]),b.useEffect(()=>{const O=()=>B(!1);return window.addEventListener("blur",O),window.addEventListener("resize",O),()=>{window.removeEventListener("blur",O),window.removeEventListener("resize",O)}},[B]);const[L,I]=Y0(O=>{const A=j().filter(Y=>!Y.disabled),z=A.find(Y=>Y.ref.current===document.activeElement),$=Q0(A,O,z);$&&setTimeout(()=>$.ref.current.focus())}),D=b.useCallback((O,A,z)=>{const $=!V.current&&!z;(l.value!==void 0&&l.value===A||$)&&(P(O),$&&(V.current=!0))},[l.value]),W=b.useCallback(()=>f==null?void 0:f.focus(),[f]),H=b.useCallback((O,A,z)=>{const $=!V.current&&!z;(l.value!==void 0&&l.value===A||$)&&M(O)},[l.value]),U=n==="popper"?Ic:I0,G=U===Ic?{side:i,sideOffset:a,align:d,alignOffset:m,arrowPadding:u,collisionBoundary:v,collisionPadding:y,sticky:S,hideWhenDetached:g,avoidCollisions:p}:{};return x.jsx(M0,{scope:r,content:f,viewport:E,onViewportChange:k,itemRefCallback:D,selectedItem:w,onItemLeave:W,itemTextRefCallback:H,focusSelectedItem:q,selectedItemText:T,position:n,isPositioned:N,searchRef:L,children:x.jsx(hi,{as:cT,allowPinchZoom:!0,children:x.jsx(di,{asChild:!0,trapped:l.open,onMountAutoFocus:O=>{O.preventDefault()},onUnmountAutoFocus:J(s,O=>{var A;(A=l.trigger)==null||A.focus({preventScroll:!0}),O.preventDefault()}),children:x.jsx(es,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:O=>O.preventDefault(),onDismiss:()=>l.onOpenChange(!1),children:x.jsx(U,{role:"listbox",id:l.contentId,"data-state":l.open?"open":"closed",dir:l.dir,onContextMenu:O=>O.preventDefault(),...h,...G,onPlaced:()=>F(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...h.style},onKeyDown:J(h.onKeyDown,O=>{const A=O.ctrlKey||O.altKey||O.metaKey;if(O.key==="Tab"&&O.preventDefault(),!A&&O.key.length===1&&I(O.key),["ArrowUp","ArrowDown","Home","End"].includes(O.key)){let $=j().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(O.key)&&($=$.slice().reverse()),["ArrowUp","ArrowDown"].includes(O.key)){const Y=O.target,X=$.indexOf(Y);$=$.slice(X+1)}setTimeout(()=>K($)),O.preventDefault()}})})})})})})});N0.displayName=lT;var uT="SelectItemAlignedPosition",I0=b.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=Or(sn,r),c=jr(sn,r),[i,a]=b.useState(null),[d,m]=b.useState(null),u=ce(t,C=>m(C)),v=Da(r),y=b.useRef(!1),S=b.useRef(!0),{viewport:g,selectedItem:p,selectedItemText:h,focusSelectedItem:l}=c,f=b.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&d&&g&&p&&h){const C=o.trigger.getBoundingClientRect(),w=d.getBoundingClientRect(),P=o.valueNode.getBoundingClientRect(),T=h.getBoundingClientRect();if(o.dir!=="rtl"){const Y=T.left-w.left,X=P.left-Y,ne=C.left-X,oe=C.width+ne,he=Math.max(oe,w.width),Ce=window.innerWidth-St,se=Of(X,[St,Math.max(St,Ce-he)]);i.style.minWidth=oe+"px",i.style.left=se+"px"}else{const Y=w.right-T.right,X=window.innerWidth-P.right-Y,ne=window.innerWidth-C.right-X,oe=C.width+ne,he=Math.max(oe,w.width),Ce=window.innerWidth-St,se=Of(X,[St,Math.max(St,Ce-he)]);i.style.minWidth=oe+"px",i.style.right=se+"px"}const M=v(),j=window.innerHeight-St*2,N=g.scrollHeight,F=window.getComputedStyle(d),V=parseInt(F.borderTopWidth,10),K=parseInt(F.paddingTop,10),q=parseInt(F.borderBottomWidth,10),B=parseInt(F.paddingBottom,10),R=V+K+N+B+q,L=Math.min(p.offsetHeight*5,R),I=window.getComputedStyle(g),D=parseInt(I.paddingTop,10),W=parseInt(I.paddingBottom,10),H=C.top+C.height/2-St,U=j-H,G=p.offsetHeight/2,O=p.offsetTop+G,A=V+K+O,z=R-A;if(A<=H){const Y=M.length>0&&p===M[M.length-1].ref.current;i.style.bottom="0px";const X=d.clientHeight-g.offsetTop-g.offsetHeight,ne=Math.max(U,G+(Y?W:0)+X+q),oe=A+ne;i.style.height=oe+"px"}else{const Y=M.length>0&&p===M[0].ref.current;i.style.top="0px";const ne=Math.max(H,V+g.offsetTop+(Y?D:0)+G)+z;i.style.height=ne+"px",g.scrollTop=A-H+g.offsetTop}i.style.margin=`${St}px 0`,i.style.minHeight=L+"px",i.style.maxHeight=j+"px",n==null||n(),requestAnimationFrame(()=>y.current=!0)}},[v,o.trigger,o.valueNode,i,d,g,p,h,o.dir,n]);Le(()=>f(),[f]);const[_,E]=b.useState();Le(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const k=b.useCallback(C=>{C&&S.current===!0&&(f(),l==null||l(),S.current=!1)},[f,l]);return x.jsx(hT,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:y,onScrollButtonChange:k,children:x.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:x.jsx(ie.div,{...s,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});I0.displayName=uT;var dT="SelectPopperPosition",Ic=b.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=St,...o}=e,c=Sd(r);return x.jsx(Ea,{...c,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.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)"}})});Ic.displayName=dT;var[hT,wd]=ss(sn,{}),Oc="SelectViewport",O0=b.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=jr(Oc,r),c=wd(Oc,r),i=ce(t,o.onViewportChange),a=b.useRef(0);return x.jsxs(x.Fragment,{children:[x.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:n}),x.jsx(yd.Slot,{scope:r,children:x.jsx(ie.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:J(s.onScroll,d=>{const m=d.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:v}=c;if(v!=null&&v.current&&u){const y=Math.abs(a.current-m.scrollTop);if(y>0){const S=window.innerHeight-St*2,g=parseFloat(u.style.minHeight),p=parseFloat(u.style.height),h=Math.max(g,p);if(h<S){const l=h+y,f=Math.min(S,l),_=l-f;u.style.height=f+"px",u.style.bottom==="0px"&&(m.scrollTop=_>0?_:0,u.style.justifyContent="flex-end")}}}a.current=m.scrollTop})})})]})});O0.displayName=Oc;var j0="SelectGroup",[fT,pT]=ss(j0),mT=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=st();return x.jsx(fT,{scope:r,id:s,children:x.jsx(ie.div,{role:"group","aria-labelledby":s,...n,ref:t})})});mT.displayName=j0;var B0="SelectLabel",F0=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=pT(B0,r);return x.jsx(ie.div,{id:s.id,...n,ref:t})});F0.displayName=B0;var Go="SelectItem",[vT,H0]=ss(Go),$0=b.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...c}=e,i=Or(Go,r),a=jr(Go,r),d=i.value===n,[m,u]=b.useState(o??""),[v,y]=b.useState(!1),S=ce(t,l=>{var f;return(f=a.itemRefCallback)==null?void 0:f.call(a,l,n,s)}),g=st(),p=b.useRef("touch"),h=()=>{s||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")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 x.jsx(vT,{scope:r,value:n,disabled:s,textId:g,isSelected:d,onItemTextChange:b.useCallback(l=>{u(f=>f||((l==null?void 0:l.textContent)??"").trim())},[]),children:x.jsx(yd.ItemSlot,{scope:r,value:n,disabled:s,textValue:m,children:x.jsx(ie.div,{role:"option","aria-labelledby":g,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...c,ref:S,onFocus:J(c.onFocus,()=>y(!0)),onBlur:J(c.onBlur,()=>y(!1)),onClick:J(c.onClick,()=>{p.current!=="mouse"&&h()}),onPointerUp:J(c.onPointerUp,()=>{p.current==="mouse"&&h()}),onPointerDown:J(c.onPointerDown,l=>{p.current=l.pointerType}),onPointerMove:J(c.onPointerMove,l=>{var f;p.current=l.pointerType,s?(f=a.onItemLeave)==null||f.call(a):p.current==="mouse"&&l.currentTarget.focus({preventScroll:!0})}),onPointerLeave:J(c.onPointerLeave,l=>{var f;l.currentTarget===document.activeElement&&((f=a.onItemLeave)==null||f.call(a))}),onKeyDown:J(c.onKeyDown,l=>{var _;((_=a.searchRef)==null?void 0:_.current)!==""&&l.key===" "||(rT.includes(l.key)&&h(),l.key===" "&&l.preventDefault())})})})})});$0.displayName=Go;var Cs="SelectItemText",z0=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,c=Or(Cs,r),i=jr(Cs,r),a=H0(Cs,r),d=sT(Cs,r),[m,u]=b.useState(null),v=ce(t,h=>u(h),a.onItemTextChange,h=>{var l;return(l=i.itemTextRefCallback)==null?void 0:l.call(i,h,a.value,a.disabled)}),y=m==null?void 0:m.textContent,S=b.useMemo(()=>x.jsx("option",{value:a.value,disabled:a.disabled,children:y},a.value),[a.disabled,a.value,y]),{onNativeOptionAdd:g,onNativeOptionRemove:p}=d;return Le(()=>(g(S),()=>p(S)),[g,p,S]),x.jsxs(x.Fragment,{children:[x.jsx(ie.span,{id:a.textId,...o,ref:v}),a.isSelected&&c.valueNode&&!c.valueNodeHasChildren?Jn.createPortal(o.children,c.valueNode):null]})});z0.displayName=Cs;var W0="SelectItemIndicator",U0=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return H0(W0,r).isSelected?x.jsx(ie.span,{"aria-hidden":!0,...n,ref:t}):null});U0.displayName=W0;var jc="SelectScrollUpButton",V0=b.forwardRef((e,t)=>{const r=jr(jc,e.__scopeSelect),n=wd(jc,e.__scopeSelect),[s,o]=b.useState(!1),c=ce(t,n.onScrollButtonChange);return Le(()=>{if(r.viewport&&r.isPositioned){let i=function(){const d=a.scrollTop>0;o(d)};const a=r.viewport;return i(),a.addEventListener("scroll",i),()=>a.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?x.jsx(G0,{...e,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:a}=r;i&&a&&(i.scrollTop=i.scrollTop-a.offsetHeight)}}):null});V0.displayName=jc;var Bc="SelectScrollDownButton",K0=b.forwardRef((e,t)=>{const r=jr(Bc,e.__scopeSelect),n=wd(Bc,e.__scopeSelect),[s,o]=b.useState(!1),c=ce(t,n.onScrollButtonChange);return Le(()=>{if(r.viewport&&r.isPositioned){let i=function(){const d=a.scrollHeight-a.clientHeight,m=Math.ceil(a.scrollTop)<d;o(m)};const a=r.viewport;return i(),a.addEventListener("scroll",i),()=>a.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?x.jsx(G0,{...e,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:a}=r;i&&a&&(i.scrollTop=i.scrollTop+a.offsetHeight)}}):null});K0.displayName=Bc;var G0=b.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=jr("SelectScrollButton",r),c=b.useRef(null),i=Da(r),a=b.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return b.useEffect(()=>()=>a(),[a]),Le(()=>{var m;const d=i().find(u=>u.ref.current===document.activeElement);(m=d==null?void 0:d.ref.current)==null||m.scrollIntoView({block:"nearest"})},[i]),x.jsx(ie.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:J(s.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(n,50))}),onPointerMove:J(s.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),c.current===null&&(c.current=window.setInterval(n,50))}),onPointerLeave:J(s.onPointerLeave,()=>{a()})})}),gT="SelectSeparator",q0=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return x.jsx(ie.div,{"aria-hidden":!0,...n,ref:t})});q0.displayName=gT;var Fc="SelectArrow",_T=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Sd(r),o=Or(Fc,r),c=jr(Fc,r);return o.open&&c.position==="popper"?x.jsx(ka,{...s,...n,ref:t}):null});_T.displayName=Fc;var yT="SelectBubbleInput",ST=b.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=b.useRef(null),o=ce(n,s),c=Vu(t);return b.useEffect(()=>{const i=s.current;if(!i)return;const a=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(a,"value").set;if(c!==t&&m){const u=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(u)}},[c,t]),x.jsx(ie.select,{...r,style:{...E0,...r.style},ref:o,defaultValue:t})});ST.displayName=yT;function X0(e){return e===""||e===void 0}function Y0(e){const t=Ft(e),r=b.useRef(""),n=b.useRef(0),s=b.useCallback(c=>{const i=r.current+c;t(i),function a(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>a(""),1e3))}(i)},[t]),o=b.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function Q0(e,t,r){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let c=wT(e,Math.max(o,0));s.length===1&&(c=c.filter(d=>d!==r));const a=c.find(d=>d.textValue.toLowerCase().startsWith(s.toLowerCase()));return a!==r?a:void 0}function wT(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var J0=P0,xT=L0,bT=A0,Z0=D0,CT=O0,ey=F0,ty=$0,ET=z0,kT=U0,ry=V0,ny=K0,sy=q0;const RT=b.forwardRef(({className:e,children:t,...r},n)=>x.jsxs(J0,{ref:n,className:re("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-transparent bg-input px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground/50 data-[placeholder]:font-light focus:outline-none focus:border-ring focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,x.jsx(xT,{asChild:!0,children:x.jsx(Uu,{className:"h-4 w-4 opacity-50"})})]}));RT.displayName=J0.displayName;const iy=b.forwardRef(({className:e,...t},r)=>x.jsx(ry,{ref:r,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(Wb,{className:"h-4 w-4"})}));iy.displayName=ry.displayName;const oy=b.forwardRef(({className:e,...t},r)=>x.jsx(ny,{ref:r,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(Uu,{className:"h-4 w-4"})}));oy.displayName=ny.displayName;const PT=b.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>x.jsx(bT,{children:x.jsxs(Z0,{ref:s,className:re("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",r==="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",e),position:r,...n,children:[x.jsx(iy,{}),x.jsx(CT,{className:re("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),x.jsx(oy,{})]})}));PT.displayName=Z0.displayName;const TT=b.forwardRef(({className:e,...t},r)=>x.jsx(ey,{ref:r,className:re("px-2 py-1.5 text-sm font-semibold",e),...t}));TT.displayName=ey.displayName;const LT=b.forwardRef(({className:e,children:t,...r},n)=>x.jsxs(ty,{ref:n,className:re("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",e),...r,children:[x.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(kT,{children:x.jsx(Wu,{className:"h-4 w-4"})})}),x.jsx(ET,{children:t})]}));LT.displayName=ty.displayName;const AT=b.forwardRef(({className:e,...t},r)=>x.jsx(sy,{ref:r,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));AT.displayName=sy.displayName;var DT="Separator",jf="horizontal",MT=["horizontal","vertical"],ay=b.forwardRef((e,t)=>{const{decorative:r,orientation:n=jf,...s}=e,o=NT(n)?n:jf,i=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return x.jsx(Ue.div,{"data-orientation":o,...i,...s,ref:t})});ay.displayName=DT;function NT(e){return MT.includes(e)}var ly=ay;const IT=b.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>x.jsx(ly,{ref:s,decorative:r,orientation:t,className:re("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));IT.displayName=ly.displayName;const OT=Ju,cy=b.forwardRef(({className:e,...t},r)=>x.jsx(fi,{className:re("fixed inset-0 z-50 bg-black/80 [will-change:opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));cy.displayName=fi.displayName;const jT=zu("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out [will-change:transform,opacity] data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),BT=b.forwardRef(({side:e="right",className:t,children:r,...n},s)=>x.jsxs(OT,{children:[x.jsx(cy,{}),x.jsxs(pi,{ref:s,className:re(jT({side:e}),t),...n,children:[x.jsxs(Mg,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[x.jsx(Xv,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));BT.displayName=pi.displayName;const FT=b.forwardRef(({className:e,...t},r)=>x.jsx(_a,{ref:r,className:re("text-lg font-semibold text-foreground",e),...t}));FT.displayName=_a.displayName;const HT=b.forwardRef(({className:e,...t},r)=>x.jsx(ya,{ref:r,className:re("text-sm text-muted-foreground",e),...t}));HT.displayName=ya.displayName;var Ma="Switch",[$T]=_t(Ma),[zT,WT]=$T(Ma),uy=b.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:c,disabled:i,value:a="on",onCheckedChange:d,form:m,...u}=e,[v,y]=b.useState(null),S=ce(t,f=>y(f)),g=b.useRef(!1),p=v?m||!!v.closest("form"):!0,[h,l]=ui({prop:s,defaultProp:o??!1,onChange:d,caller:Ma});return x.jsxs(zT,{scope:r,checked:h,disabled:i,children:[x.jsx(ie.button,{type:"button",role:"switch","aria-checked":h,"aria-required":c,"data-state":py(h),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:S,onClick:J(e.onClick,f=>{l(_=>!_),p&&(g.current=f.isPropagationStopped(),g.current||f.stopPropagation())})}),p&&x.jsx(fy,{control:v,bubbles:!g.current,name:n,value:a,checked:h,required:c,disabled:i,form:m,style:{transform:"translateX(-100%)"}})]})});uy.displayName=Ma;var dy="SwitchThumb",hy=b.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=WT(dy,r);return x.jsx(ie.span,{"data-state":py(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});hy.displayName=dy;var UT="SwitchBubbleInput",fy=b.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const c=b.useRef(null),i=ce(c,o),a=Vu(r),d=Ku(t);return b.useEffect(()=>{const m=c.current;if(!m)return;const u=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&y){const S=new Event("click",{bubbles:n});y.call(m,r),m.dispatchEvent(S)}},[a,r,n]),x.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...s.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});fy.displayName=UT;function py(e){return e?"checked":"unchecked"}var my=uy,VT=hy;const KT=b.forwardRef(({className:e,...t},r)=>x.jsx(my,{ref:r,className:re("peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:x.jsx(VT,{className:re("pointer-events-none block h-3 w-3 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0")})}));KT.displayName=my.displayName;function GT(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let Hc=1;class qT{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...s}=t,o=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Hc++,c=this.toasts.find(a=>a.id===o),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),c?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...t,id:o,title:n}),{...a,...t,id:o,dismissible:i,title:n}):a):this.addToast({title:n,...s,dismissible:i,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let o=n!==void 0,c;const i=s.then(async d=>{if(c=["resolve",d],Ve.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(YT(d)&&!d.ok){o=!1;const u=typeof r.error=="function"?await r.error(`HTTP error! status: ${d.status}`):r.error,v=typeof r.description=="function"?await r.description(`HTTP error! status: ${d.status}`):r.description,S=typeof u=="object"&&!Ve.isValidElement(u)?u:{message:u};this.create({id:n,type:"error",description:v,...S})}else if(d instanceof Error){o=!1;const u=typeof r.error=="function"?await r.error(d):r.error,v=typeof r.description=="function"?await r.description(d):r.description,S=typeof u=="object"&&!Ve.isValidElement(u)?u:{message:u};this.create({id:n,type:"error",description:v,...S})}else if(r.success!==void 0){o=!1;const u=typeof r.success=="function"?await r.success(d):r.success,v=typeof r.description=="function"?await r.description(d):r.description,S=typeof u=="object"&&!Ve.isValidElement(u)?u:{message:u};this.create({id:n,type:"success",description:v,...S})}}).catch(async d=>{if(c=["reject",d],r.error!==void 0){o=!1;const m=typeof r.error=="function"?await r.error(d):r.error,u=typeof r.description=="function"?await r.description(d):r.description,y=typeof m=="object"&&!Ve.isValidElement(m)?m:{message:m};this.create({id:n,type:"error",description:u,...y})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),a=()=>new Promise((d,m)=>i.then(()=>c[0]==="reject"?m(c[1]):d(c[1])).catch(m));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,r)=>{const n=(r==null?void 0:r.id)||Hc++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ut=new qT,XT=(e,t)=>{const r=(t==null?void 0:t.id)||Hc++;return ut.addToast({title:e,...t,id:r}),r},YT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",QT=XT,JT=()=>ut.toasts,ZT=()=>ut.getActiveToasts();Object.assign(QT,{success:ut.success,info:ut.info,warning:ut.warning,error:ut.error,custom:ut.custom,message:ut.message,promise:ut.promise,dismiss:ut.dismiss,loading:ut.loading},{getHistory:JT,getToasts:ZT});GT("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");var Na="Tabs",[eL]=_t(Na,[Ra]),vy=Ra(),[tL,xd]=eL(Na),rL=b.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:o,orientation:c="horizontal",dir:i,activationMode:a="automatic",...d}=e,m=zg(i),[u,v]=ui({prop:n,onChange:s,defaultProp:o??"",caller:Na});return x.jsx(tL,{scope:r,baseId:st(),value:u,onValueChange:v,orientation:c,dir:m,activationMode:a,children:x.jsx(ie.div,{dir:m,"data-orientation":c,...d,ref:t})})});rL.displayName=Na;var gy="TabsList",_y=b.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,o=xd(gy,r),c=vy(r);return x.jsx(m_,{asChild:!0,...c,orientation:o.orientation,dir:o.dir,loop:n,children:x.jsx(ie.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});_y.displayName=gy;var yy="TabsTrigger",Sy=b.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...o}=e,c=xd(yy,r),i=vy(r),a=by(c.baseId,n),d=Cy(c.baseId,n),m=n===c.value;return x.jsx(v_,{asChild:!0,...i,focusable:!s,active:m,children:x.jsx(ie.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":d,"data-state":m?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:a,...o,ref:t,onMouseDown:J(e.onMouseDown,u=>{!s&&u.button===0&&u.ctrlKey===!1?c.onValueChange(n):u.preventDefault()}),onKeyDown:J(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&c.onValueChange(n)}),onFocus:J(e.onFocus,()=>{const u=c.activationMode!=="manual";!m&&!s&&u&&c.onValueChange(n)})})})});Sy.displayName=yy;var wy="TabsContent",xy=b.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:o,...c}=e,i=xd(wy,r),a=by(i.baseId,n),d=Cy(i.baseId,n),m=n===i.value,u=b.useRef(m);return b.useEffect(()=>{const v=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(v)},[]),x.jsx(Qe,{present:s||m,children:({present:v})=>x.jsx(ie.div,{"data-state":m?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":a,hidden:!v,id:d,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0},children:v&&o})})});xy.displayName=wy;function by(e,t){return`${e}-trigger-${t}`}function Cy(e,t){return`${e}-content-${t}`}var Ey=_y,ky=Sy,Ry=xy;const nL=b.forwardRef(({className:e,...t},r)=>x.jsx(Ey,{ref:r,className:re("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));nL.displayName=Ey.displayName;const sL=b.forwardRef(({className:e,...t},r)=>x.jsx(ky,{ref:r,className:re("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-sm",e),...t}));sL.displayName=ky.displayName;const iL=b.forwardRef(({className:e,...t},r)=>x.jsx(Ry,{ref:r,className:re("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));iL.displayName=Ry.displayName;const oL=b.forwardRef(({className:e,...t},r)=>x.jsx("textarea",{className:re("flex min-h-[60px] w-full rounded-md border border-transparent bg-input px-3 py-2 text-base placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...t}));oL.displayName="Textarea";var[Ia]=_t("Tooltip",[Nr]),bd=Nr(),aL="TooltipProvider",Bf="tooltip.open",[bA,Py]=Ia(aL),Ty="Tooltip",[CA,Si]=Ia(Ty),$c="TooltipTrigger",lL=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Si($c,r),o=Py($c,r),c=bd(r),i=b.useRef(null),a=ce(t,i,s.onTriggerChange),d=b.useRef(!1),m=b.useRef(!1),u=b.useCallback(()=>d.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),x.jsx(gi,{asChild:!0,...c,children:x.jsx(ie.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:a,onPointerMove:J(e.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),m.current=!0)}),onPointerLeave:J(e.onPointerLeave,()=>{s.onTriggerLeave(),m.current=!1}),onPointerDown:J(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:J(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:J(e.onBlur,s.onClose),onClick:J(e.onClick,s.onClose)})})});lL.displayName=$c;var Cd="TooltipPortal",[cL,uL]=Ia(Cd,{forceMount:void 0}),Ly=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:s}=e,o=Si(Cd,t);return x.jsx(cL,{scope:t,forceMount:r,children:x.jsx(Qe,{present:r||o.open,children:x.jsx(ts,{asChild:!0,container:s,children:n})})})};Ly.displayName=Cd;var qn="TooltipContent",Ay=b.forwardRef((e,t)=>{const r=uL(qn,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,c=Si(qn,e.__scopeTooltip);return x.jsx(Qe,{present:n||c.open,children:c.disableHoverableContent?x.jsx(Dy,{side:s,...o,ref:t}):x.jsx(dL,{side:s,...o,ref:t})})}),dL=b.forwardRef((e,t)=>{const r=Si(qn,e.__scopeTooltip),n=Py(qn,e.__scopeTooltip),s=b.useRef(null),o=ce(t,s),[c,i]=b.useState(null),{trigger:a,onClose:d}=r,m=s.current,{onPointerInTransitChange:u}=n,v=b.useCallback(()=>{i(null),u(!1)},[u]),y=b.useCallback((S,g)=>{const p=S.currentTarget,h={x:S.clientX,y:S.clientY},l=vL(h,p.getBoundingClientRect()),f=gL(h,l),_=_L(g.getBoundingClientRect()),E=SL([...f,..._]);i(E),u(!0)},[u]);return b.useEffect(()=>()=>v(),[v]),b.useEffect(()=>{if(a&&m){const S=p=>y(p,m),g=p=>y(p,a);return a.addEventListener("pointerleave",S),m.addEventListener("pointerleave",g),()=>{a.removeEventListener("pointerleave",S),m.removeEventListener("pointerleave",g)}}},[a,m,y,v]),b.useEffect(()=>{if(c){const S=g=>{const p=g.target,h={x:g.clientX,y:g.clientY},l=(a==null?void 0:a.contains(p))||(m==null?void 0:m.contains(p)),f=!yL(h,c);l?v():f&&(v(),d())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[a,m,c,d,v]),x.jsx(Dy,{...e,ref:o})}),[hL,fL]=Ia(Ty,{isInside:!1}),pL=UC("TooltipContent"),Dy=b.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:c,...i}=e,a=Si(qn,r),d=bd(r),{onClose:m}=a;return b.useEffect(()=>(document.addEventListener(Bf,m),()=>document.removeEventListener(Bf,m)),[m]),b.useEffect(()=>{if(a.trigger){const u=v=>{const y=v.target;y!=null&&y.contains(a.trigger)&&m()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[a.trigger,m]),x.jsx(es,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:u=>u.preventDefault(),onDismiss:m,children:x.jsxs(Ea,{"data-state":a.stateAttribute,...d,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(pL,{children:n}),x.jsx(hL,{scope:r,isInside:!0,children:x.jsx(eT,{id:a.contentId,role:"tooltip",children:s||n})})]})})});Ay.displayName=qn;var My="TooltipArrow",mL=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=bd(r);return fL(My,r).isInside?null:x.jsx(ka,{...s,...n,ref:t})});mL.displayName=My;function vL(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function gL(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function _L(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function yL(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,c=t.length-1;o<t.length;c=o++){const i=t[o],a=t[c],d=i.x,m=i.y,u=a.x,v=a.y;m>n!=v>n&&r<(u-d)*(n-m)/(v-m)+d&&(s=!s)}return s}function SL(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),wL(t)}function wL(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],c=t[t.length-2];if((o.x-c.x)*(s.y-c.y)>=(o.y-c.y)*(s.x-c.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],c=r[r.length-2];if((o.x-c.x)*(s.y-c.y)>=(o.y-c.y)*(s.x-c.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var xL=Ly,Ny=Ay;const bL=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>x.jsx(xL,{children:x.jsx(Ny,{ref:n,sideOffset:t,className:re("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",e),...r})}));bL.displayName=Ny.displayName;function CL({message:e="Loading...",className:t,fullPage:r=!1}){return x.jsxs("div",{className:re("flex flex-col items-center gap-3 text-muted-foreground",r?"fixed inset-0 z-50 justify-center bg-background":"absolute inset-0 justify-center",t),children:[x.jsx(Xb,{className:"h-8 w-8 animate-spin text-primary"}),e&&x.jsx("p",{className:"text-sm",children:e})]})}function EL(){const{setTheme:e,resolvedTheme:t}=mx();return x.jsxs(Yv,{variant:"ghost",size:"icon",className:"relative h-8 w-8",onClick:()=>e(t==="dark"?"light":"dark"),children:[x.jsx(fC,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),x.jsx(Zb,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),x.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}const kL=()=>x.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),x.jsx("path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),x.jsx("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),x.jsx("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]});function Ed(){return x.jsxs("span",{className:"logo",children:[x.jsx("span",{className:"logo-icon",children:x.jsx(kL,{})}),x.jsx("span",{className:"logo-text",children:"LaunchPod"})]})}const RL=()=>x.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("polyline",{points:"20 6 9 17 4 12"})}),PL=["Automated security scanning","GitHub-native CI/CD integration","Team collaboration built in"];function TL(){return x.jsxs("div",{className:"brand-panel auth-gradient",children:[x.jsx("div",{className:"auth-blob auth-blob--1"}),x.jsx("div",{className:"auth-blob auth-blob--2"}),x.jsx("div",{className:"auth-blob auth-blob--3"}),x.jsx(Ed,{}),x.jsxs("div",{className:"brand-content",children:[x.jsx("h1",{children:"Ship secure software, faster."}),x.jsx("ul",{className:"feature-list",children:PL.map(e=>x.jsxs("li",{children:[x.jsx(RL,{}),x.jsx("span",{children:e})]},e))})]}),x.jsx("p",{className:"brand-footer",children:"Trusted by development teams"})]})}const LL=()=>x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}),x.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),AL=()=>x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}),x.jsx("path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}),x.jsx("path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}),x.jsx("path",{d:"m2 2 20 20"})]});function DL({onSuccess:e}){const[t,r]=b.useState(""),[n,s]=b.useState(!1),[o,c]=b.useState(""),[i,a]=b.useState(!1),d=async m=>{m.preventDefault(),c(""),a(!0);try{const v=await(await fetch("/api/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t.trim()})})).json();v.success?e():c(v.error||"Invalid token")}catch{c("Connection failed")}finally{a(!1)}};return x.jsxs("div",{className:"auth-layout",children:[x.jsx(TL,{}),x.jsx("div",{className:"form-panel",children:x.jsxs("div",{className:"form-container",children:[x.jsx("div",{className:"mobile-logo",children:x.jsx(Ed,{})}),x.jsxs("div",{className:"form-header",children:[x.jsx("h2",{children:"Connect your pod"}),x.jsx("p",{children:"Enter your MCP runner token to authenticate"})]}),o&&x.jsx("div",{className:"error-box",children:o}),x.jsxs("form",{onSubmit:d,children:[x.jsxs("div",{className:"form-group",children:[x.jsx("label",{htmlFor:"token",children:"MCP Runner Token"}),x.jsxs("div",{className:"input-wrapper",children:[x.jsx("input",{id:"token",className:"input input--with-toggle",type:n?"text":"password",placeholder:"Paste your MCP runner token",required:!0,autoComplete:"off",value:t,onChange:m=>r(m.target.value)}),x.jsx("button",{type:"button",className:"toggle-visibility",onClick:()=>s(!n),tabIndex:-1,children:n?x.jsx(AL,{}):x.jsx(LL,{})})]})]}),x.jsx("button",{type:"submit",className:"btn btn--primary btn--lg",disabled:i,children:i?"Connecting...":"Connect"})]}),x.jsx("p",{className:"help-text",children:"Find your MCP runner token in the LaunchSecure dashboard under Pipeline Settings."})]})})]})}const ML=5,NL=1e3,IL=3e4;function kd({onMessage:e}){const[t,r]=b.useState("disconnected"),[n,s]=b.useState(null),o=b.useRef(null),c=b.useRef(0),i=b.useRef(null),a=b.useRef(e);a.current=e;const d=b.useCallback(m=>{const u=o.current;u&&u.readyState===WebSocket.OPEN&&u.send(JSON.stringify(m))},[]);return b.useEffect(()=>{let m=!1,u=null;function v(){if(m)return;r("connecting");const S=location.protocol==="https:"?"wss:":"ws:",g=new WebSocket(`${S}//${location.host}/terminal/ws`);o.current=g,g.onopen=()=>{if(m){g.close();return}c.current=0,r("connected"),i.current=setInterval(()=>{g.readyState===WebSocket.OPEN&&g.send(JSON.stringify({type:"ping"}))},IL)},g.onmessage=p=>{if(m)return;const h=JSON.parse(p.data);h.type==="connected"&&s(h.connectionId),a.current(h)},g.onclose=p=>{if(!m&&(y(),r("disconnected"),!p.wasClean&&c.current<ML)){const h=NL*Math.pow(2,c.current);c.current+=1,u=setTimeout(v,h)}},g.onerror=()=>{}}function y(){i.current&&(clearInterval(i.current),i.current=null)}return v(),()=>{var S;m=!0,y(),u&&clearTimeout(u),(S=o.current)==null||S.close(),o.current=null}},[]),{status:t,connectionId:n,send:d}}function OL(){return x.jsxs("header",{className:"sticky top-0 z-40 flex h-[var(--header-height)] items-center border-b bg-background/80 backdrop-blur-md px-4 shadow-sm",children:[x.jsx(Ed,{}),x.jsx("div",{className:"ml-auto flex items-center gap-2",children:x.jsx(EL,{})})]})}const qi="sidebar-nav-item active relative flex items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm bg-gradient-to-r from-sidebar-primary/20 via-transparent via-80% to-transparent font-medium text-sidebar-foreground before:absolute before:left-0 before:top-0 before:h-full before:w-[3px] before:rounded-full before:bg-sidebar-primary",_s="sidebar-nav-item relative flex w-full items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm font-normal text-sidebar-muted-foreground transition-colors duration-200 hover:text-sidebar-foreground bg-transparent border-none cursor-pointer";function jL({onLogout:e,terminalAvailable:t,activePage:r="dashboard",onNavigate:n}){return x.jsxs("aside",{className:"hidden lg:flex lg:flex-col w-[var(--sidebar-width)] sidebar-gradient",children:[x.jsx("nav",{className:"flex-1 overflow-y-auto px-3 py-4",children:x.jsxs("ul",{className:"space-y-1",children:[x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n("dashboard"),className:r==="dashboard"?qi:_s,children:[x.jsx(Gb,{className:"h-4 w-4 shrink-0"}),"Dashboard"]})}),t&&x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n("terminal"),className:r==="terminal"?qi:_s,children:[x.jsx(mC,{className:"h-4 w-4 shrink-0"}),"Terminal"]})}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n("settings"),className:r==="settings"?qi:_s,children:[x.jsx(dC,{className:"h-4 w-4 shrink-0"}),"Settings"]})}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n("repair"),className:r==="repair"?qi:_s,children:[x.jsx(yC,{className:"h-4 w-4 shrink-0"}),"Repair"]})})]})}),x.jsx("div",{className:"border-t border-sidebar-border px-3 py-3",children:x.jsxs("button",{type:"button",onClick:e,className:_s,children:[x.jsx(Qb,{className:"h-4 w-4 shrink-0"}),"Disconnect"]})})]})}function qo(e){return e.toLowerCase()}function BL(e){const t=new Map;for(const r of e){const n=t.get(r.ph);n?n.push(r):t.set(r.ph,[r])}return t}function Iy(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function FL(e){return e==="script_pod"?"LOCAL":e==="script"?"SCRIPT":"LLM"}function Rd({status:e}){return x.jsx("span",{className:`agent-status-dot agent-status-dot--${qo(e)}`})}function HL({agent:e,status:t,selected:r,dim:n,onClick:s}){const o=["pipeline-compact-item",r&&"pipeline-compact-item--selected",n&&"pipeline-compact-item--dim"].filter(Boolean).join(" ");return x.jsxs("button",{type:"button",className:o,onClick:s,children:[x.jsx(Rd,{status:t}),x.jsx("span",{className:"pipeline-compact-name",children:e.nm})]})}function Ff({agents:e,agentStatuses:t,selectedId:r,onSelect:n,nextUpIds:s}){const o=BL(e),c=Array.from(o.keys()).sort((i,a)=>i-a);return e.length===0?x.jsx("div",{className:"pipeline-empty-state",children:"None yet"}):x.jsx(x.Fragment,{children:c.map(i=>x.jsxs("div",{className:"pipeline-phase-group",children:[x.jsxs("div",{className:"pipeline-phase-label",children:["Phase ",i]}),o.get(i).map(a=>{var m;const d=t!=null&&t[a.id]?qo(((m=t[a.id])==null?void 0:m.status)??"pending"):"pending";return x.jsx(HL,{agent:a,status:d,selected:r===a.id,dim:s?!s.has(a.id):!1,onClick:()=>n(a.id)},a.id)})]},i))})}function Hf({agent:e,status:t,triggeredAt:r,completedAt:n,needsAttention:s,previews:o,onOpenTerminal:c,podProgressState:i,onResolveIntervention:a,interventions:d}){const[m,u]=b.useState(0);let v=i;if(e.tp==="script_pod"&&!v){const h=d==null?void 0:d.find(l=>l.agent_id===e.id&&l.status==="pending");h&&(v={messages:[{text:h.message,level:"info",ts:Date.now()}],templateMatch:null})}const y=e.tp==="script_pod"&&v,S=o&&o.length>0?Math.min(m,o.length-1):0,g=o==null?void 0:o[S],p=e.gr==="per_unit"&&o&&o.length>1;return x.jsxs("div",{className:`pipeline-detail-card pipeline-detail-card--${t}`,children:[x.jsxs("div",{className:"pipeline-detail-left",children:[x.jsxs("div",{className:"pipeline-detail-header",children:[x.jsx(Rd,{status:t}),x.jsx("span",{className:"pipeline-detail-name",children:e.nm}),s&&x.jsx("span",{className:"pipeline-attention-dot",title:"Terminal may need input"})]}),x.jsxs("div",{className:"pipeline-detail-meta",children:[x.jsx("span",{className:"pipeline-detail-id",children:e.id}),x.jsx("span",{className:"pipeline-detail-runner",children:FL(e.tp)})]}),x.jsxs("div",{className:"pipeline-detail-badges",children:[x.jsx("span",{className:"agent-badge agent-badge--ia",children:e.ia}),x.jsx("span",{className:"agent-badge agent-badge--gr",children:e.gr==="per_unit"?"per-unit":e.gr})]}),x.jsxs("div",{className:"pipeline-detail-info",children:[x.jsxs("span",{children:["Phase ",e.ph]}),r&&x.jsxs("span",{children:["Started: ",new Date(r).toLocaleTimeString()]}),n&&x.jsxs("span",{children:["Completed: ",new Date(n).toLocaleTimeString()]})]})]}),x.jsxs("div",{className:"pipeline-detail-right",children:[p&&x.jsx("div",{className:"pipeline-unit-tabs",children:o.map((h,l)=>x.jsx("button",{type:"button",className:`pipeline-unit-tab${l===S?" pipeline-unit-tab--active":""}`,onClick:()=>u(l),children:h.unitId||`unit-${l}`},h.sessionId))}),y?x.jsx(zL,{podState:v}):g!=null&&g.text?x.jsx("pre",{className:"pipeline-preview-text",children:g.text}):x.jsx("div",{className:"pipeline-preview-empty",children:"No output yet"}),e.tp==="script_pod"&&a&&(d==null?void 0:d.filter(h=>h.agent_id===e.id&&h.status==="pending").map(h=>{const{runText:l,skipText:f}=Oy(h);return x.jsxs("div",{className:"pipeline-intervention-actions",style:{marginTop:"8px"},children:[x.jsx("button",{type:"button",onClick:()=>a(h.id,"continue"),className:"pipeline-intervention-btn pipeline-intervention-btn--run",children:l}),x.jsx("button",{type:"button",onClick:()=>a(h.id,"skip"),className:"pipeline-intervention-btn pipeline-intervention-btn--skip",children:f})]},h.id)})),!y&&(g==null?void 0:g.sessionId)&&c&&x.jsx("button",{type:"button",className:"pipeline-open-terminal-btn",title:"Open terminal",onClick:()=>c(g.sessionId),children:x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("polyline",{points:"4 17 10 11 4 5"}),x.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})})]})]})}function Oy(e){if(e.agent_id==="workspace_setup")return{label:"Workspace Setup",runText:"Use Template",skipText:"Custom Build"};switch(e.type.toLowerCase()){case"checkpoint":return{label:"Checkpoint",runText:"Continue",skipText:"Skip"};case"error":return{label:"Error",runText:"Retry",skipText:"Skip"};case"loop_escalation":return{label:"Loop Escalation",runText:"Continue",skipText:"Stop"};default:return{label:"Review Gate",runText:"Run",skipText:"Skip"}}}function $L({intervention:e,onResolve:t}){const[r,n]=b.useState(!1),{label:s,runText:o,skipText:c}=Oy(e),i=a=>{n(!0),t(e.id,a)};return x.jsxs("div",{className:"pipeline-intervention-card",children:[x.jsx("div",{className:"pipeline-intervention-label",children:s}),x.jsx("div",{className:"pipeline-intervention-agent",children:Iy(e.agent_id)}),e.message&&x.jsx("p",{className:"pipeline-intervention-msg",children:e.message}),x.jsxs("div",{className:"pipeline-intervention-actions",children:[x.jsx("button",{type:"button",disabled:r,onClick:()=>i("continue"),className:"pipeline-intervention-btn pipeline-intervention-btn--run",children:r?"...":o}),x.jsx("button",{type:"button",disabled:r,onClick:()=>i("skip"),className:"pipeline-intervention-btn pipeline-intervention-btn--skip",children:r?"...":c})]})]})}function zL({podState:e}){const{messages:t}=e;return x.jsx("div",{className:"pod-progress-panel",children:x.jsx("div",{className:"pod-progress-log",children:t.map((r,n)=>x.jsx("div",{className:`pod-progress-entry pod-progress-entry--${r.level}`,children:r.text},n))})})}function WL({agentId:e,agentName:t,error:r}){const[n,s]=b.useState(!1);return x.jsxs("div",{className:"pipeline-detail-card pipeline-detail-card--failed",children:[x.jsxs("div",{className:"pipeline-detail-left",children:[x.jsxs("div",{className:"pipeline-detail-header",children:[x.jsx(Rd,{status:"failed"}),x.jsx("span",{className:"pipeline-detail-name",children:t??Iy(e)})]}),x.jsx("div",{className:"pipeline-detail-meta",children:x.jsx("span",{className:"pipeline-detail-id",children:e})}),x.jsx("div",{style:{marginTop:"0.5rem"},children:x.jsx("span",{className:"text-red-400 text-xs font-medium",children:"Node failed to start"})}),x.jsx("button",{type:"button",onClick:()=>s(!n),className:"inline-flex items-center gap-1 mt-2 px-2 py-1 rounded text-xs bg-zinc-700 hover:bg-zinc-600 text-zinc-200 transition-colors",children:n?"Hide Log":"Show Log"})]}),x.jsx("div",{className:"pipeline-detail-right",children:n?x.jsx("pre",{className:"pipeline-preview-text",style:{color:"var(--color-red-300, #fca5a5)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:r}):x.jsx("div",{className:"pipeline-preview-empty",children:'Click "Show Log" for details'})})]})}function UL({data:e,agentStatuses:t,interventions:r,onResolveIntervention:n,stalled:s,onPoke:o,attentionAgentIds:c,sessionPreviews:i,onOpenTerminal:a,podProgressStates:d,runStatus:m,nodeErrors:u}){const[v,y]=b.useState(null),S=T=>y(M=>M===T?null:T),g=e.nd??[],p=new Map(g.map(T=>[T.id,T])),h=[],l=[],f=[];for(const T of g){const M=t==null?void 0:t[T.id],j=M?qo(M.status):"pending";j==="completed"||j==="failed"?h.push(T):j==="in_progress"?l.push(T):f.push(T)}const _=new Set;if(f.length>0){const T=Math.min(...f.map(M=>M.ph));for(const M of f)M.ph===T&&_.add(M.id)}const E=new Set(g.filter(T=>T.tp==="script_pod").map(T=>T.id)),k=(r??[]).filter(T=>T.status==="pending"&&!E.has(T.agent_id)),C=v?p.get(v):null,w=v?t==null?void 0:t[v]:null,P=w?qo(w.status):"pending";return x.jsxs("div",{className:"pipeline-dashboard",children:[x.jsxs("div",{className:"pipeline-col pipeline-col--left",children:[x.jsx("div",{className:"pipeline-col-header",children:"Completed"}),x.jsx("div",{className:"pipeline-col-body",children:x.jsx(Ff,{agents:h,agentStatuses:t,selectedId:v,onSelect:S})})]}),x.jsxs("div",{className:"pipeline-col pipeline-col--center",children:[x.jsx("div",{className:"pipeline-col-header",children:"Active"}),x.jsxs("div",{className:"pipeline-col-body",children:[n&&k.map(T=>x.jsx($L,{intervention:T,onResolve:n},T.id)),C&&!l.some(T=>T.id===v)&&x.jsx(Hf,{agent:C,status:P,triggeredAt:w==null?void 0:w.triggered_at,completedAt:w==null?void 0:w.completed_at,needsAttention:c==null?void 0:c.has(C.id),previews:i==null?void 0:i[C.id],onOpenTerminal:a,podProgressState:d==null?void 0:d[C.id],onResolveIntervention:n,interventions:r}),l.map(T=>{const M=t==null?void 0:t[T.id];return x.jsx(Hf,{agent:T,status:"in_progress",triggeredAt:M==null?void 0:M.triggered_at,completedAt:M==null?void 0:M.completed_at,needsAttention:c==null?void 0:c.has(T.id),previews:i==null?void 0:i[T.id],onOpenTerminal:a,podProgressState:d==null?void 0:d[T.id],onResolveIntervention:n,interventions:r},T.id)}),u&&Object.entries(u).map(([T,M])=>{const j=p.get(T);return x.jsx(WL,{agentId:T,agentName:j==null?void 0:j.nm,error:M},`err-${T}`)}),!C&&l.length===0&&k.length===0&&Object.keys(u??{}).length===0&&(m==="completed"?x.jsxs("div",{className:"pipeline-empty-state pipeline-empty-state--completed",children:[x.jsx("span",{className:"agent-status-dot agent-status-dot--completed"}),x.jsx("span",{children:"Pipeline Complete"})]}):m==="paused"?x.jsxs("div",{className:"pipeline-empty-state",children:[x.jsx("span",{className:"agent-status-dot agent-status-dot--pending"}),x.jsx("span",{children:"Pipeline Paused"})]}):x.jsxs("div",{className:"pipeline-empty-state",children:[x.jsx("span",{className:"agent-status-dot agent-status-dot--in_progress"}),x.jsx("span",{children:"Waiting for next node..."})]}))]})]}),x.jsxs("div",{className:"pipeline-col pipeline-col--right",children:[x.jsx("div",{className:"pipeline-col-header",children:"Upcoming"}),x.jsx("div",{className:"pipeline-col-body",children:x.jsx(Ff,{agents:f,agentStatuses:t,selectedId:v,onSelect:S,nextUpIds:_})})]})]})}let $f=!1,Xi=null;function VL({send:e,xtermRef:t,defaultAgent:r,autoSessionId:n}){const[s,o]=b.useState(null),[c,i]=b.useState(!1),a=b.useRef(r);a.current=r;const d=b.useRef(n);d.current=n;function m(S){e({type:S==="claude"?"start_claude":S==="codex"?"start_codex":"start_agent"})}const u=b.useCallback((S,g)=>{e({type:S==="claude"?"start_claude":S==="codex"?"start_codex":"start_agent",options:g})},[e]),v=b.useCallback(()=>{e({type:"stop"})},[e]),y=b.useCallback(S=>{var g,p,h;switch(S.type){case"connected":{if($f)break;$f=!0;const l=d.current;if(l){o(l),e({type:"join_session",sessionId:l});break}Xi==null||Xi.abort();const f=new AbortController;Xi=f,fetch("/terminal/api/sessions/list",{signal:f.signal}).then(_=>_.json()).then(_=>{const E=_.sessions??[];if(E.length>0){const k=E[0];o(k.id),i(k.active),e({type:"join_session",sessionId:k.id}),!k.active&&a.current&&setTimeout(()=>m(a.current),100)}else e({type:"create_session",name:"Session 1"})}).catch(()=>{f.signal.aborted||e({type:"create_session",name:"Session 1"})});break}case"session_created":{o(S.sessionId),i(!1);const l=a.current;l&&m(l);break}case"session_joined":{if(o(S.sessionId),i(S.active),(g=t.current)==null||g.clear(),(p=S.outputBuffer)!=null&&p.length)for(const l of S.outputBuffer)(h=t.current)==null||h.write(l.replace(/\x1b\[\[?[IO]/g,""));break}case"session_left":case"session_deleted":break;case"claude_started":case"codex_started":case"agent_started":i(!0);break;case"claude_stopped":case"codex_stopped":case"agent_stopped":i(!1);break;case"exit":i(!1);break}},[e,t]);return{sessionId:s,agentRunning:c,handleMessage:y,startAgent:u,stopAgent:v}}const zf=1e4,KL=["Plan mode is active","you MUST NOT make any edits","present your plan by calling the ExitPlanMode tool","Starting plan mode"],GL=["User has approved your plan","You can now start coding","Plan mode exited","Exiting plan mode"],qL=[/## Implementation Plan:/,/### \d+\. /,/## Plan:/,/### Plan Overview/,/## Proposed Solution:/];function Wf(e){return e.replace(/\x1b\[[0-9;]*m/g,"").replace(/\x1b\[[0-9]*[A-Za-z]/g,"")}function jy(){const[e,t]=b.useState(null),[r,n]=b.useState(!1),s=b.useRef([]),o=b.useRef(!1),c=b.useCallback((m=5e4)=>{const u=s.current.join("");return Wf(u).slice(-m)},[]),i=b.useCallback(m=>{let u=null;const v=m.match(/## Implementation Plan:[\s\S]*?(?=(?:User has approved|Exit plan mode|[$>]|^[a-z]+@))/im);if(v&&(u=v[0]),!u){const y=m.match(/##[^#].*?Plan.*?:[\s\S]*?(?:###.*?[\s\S]*?){2,}(?=(?:User has approved|Exit plan mode|[$>]|^[a-z]+@))/im);y&&(u=y[0])}if(!u){const S=m.slice(-5e3).match(/(?:##|Plan:)[\s\S]*?(?:###[\s\S]*?){1,}/);S&&(u=S[0])}return u?(u=Wf(u).replace(/\r\n/g,`
|
|
270
|
+
`).replace(/\r/g,`
|
|
271
|
+
`).trim(),{content:u,timestamp:Date.now()}):null},[]),a=b.useCallback(m=>{s.current.push(m),s.current.length>zf&&(s.current=s.current.slice(-zf/2));const u=c();if(o.current||KL.some(y=>u.includes(y))&&(o.current=!0,n(!0)),o.current){const v=qL.some(S=>S.test(u)),y=u.slice(-1e4);if(v&&y.includes("###")){const S=i(u);S&&t(S)}}o.current&&GL.some(y=>u.includes(y))&&(o.current=!1,n(!1),t(null))},[c,i]),d=b.useCallback(()=>{t(null),s.current=[],o.current=!1,n(!1)},[]);return{plan:e,planModeActive:r,processOutput:a,clearPlan:d}}const By="launchpod-settings",Pl={defaultAgent:"claude"};function Fy(){try{const e=localStorage.getItem(By);return e?{...Pl,...JSON.parse(e)}:Pl}catch{return Pl}}function XL(e){localStorage.setItem(By,JSON.stringify(e));try{const t=JSON.parse(localStorage.getItem("launchpod-terminal-settings")||"{}");t.defaultAgent=e.defaultAgent,localStorage.setItem("launchpod-terminal-settings",JSON.stringify(t))}catch{}}function YL(){const[e,t]=b.useState(Fy),[r,n]=b.useState(!1),s=()=>{XL(e),n(!0),setTimeout(()=>n(!1),2e3)};return x.jsxs("div",{className:"max-w-xl mx-auto py-10 px-6",children:[x.jsx("h1",{className:"text-xl font-semibold text-foreground mb-6",children:"Settings"}),x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Default Agent"}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"Which agent to show in the start prompt when opening the terminal."}),x.jsxs("select",{value:e.defaultAgent,onChange:o=>t({...e,defaultAgent:o.target.value}),className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",children:[x.jsx("option",{value:"claude",children:"Claude"}),x.jsx("option",{value:"codex",children:"Codex"}),x.jsx("option",{value:"agent",children:"Cursor"})]})]}),x.jsx("button",{onClick:s,className:"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",children:r?"Saved":"Save Settings"})]})]})}var Hy={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(globalThis,()=>(()=>{var r={4567:function(c,i,a){var d=this&&this.__decorate||function(l,f,_,E){var k,C=arguments.length,w=C<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(l,f,_,E);else for(var P=l.length-1;P>=0;P--)(k=l[P])&&(w=(C<3?k(w):C>3?k(f,_,w):k(f,_))||w);return C>3&&w&&Object.defineProperty(f,_,w),w},m=this&&this.__param||function(l,f){return function(_,E){f(_,E,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const u=a(9042),v=a(9924),y=a(844),S=a(4725),g=a(2585),p=a(3656);let h=i.AccessibilityManager=class extends y.Disposable{constructor(l,f,_,E){super(),this._terminal=l,this._coreBrowserService=_,this._renderService=E,this._rowColumns=new WeakMap,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 k=0;k<this._terminal.rows;k++)this._rowElements[k]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[k]);if(this._topBoundaryFocusListener=k=>this._handleBoundaryFocus(k,0),this._bottomBoundaryFocusListener=k=>this._handleBoundaryFocus(k,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 v.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(k=>this._handleResize(k.rows))),this.register(this._terminal.onRender(k=>this._refreshRows(k.start,k.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(k=>this._handleChar(k))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
272
|
+
`))),this.register(this._terminal.onA11yTab(k=>this._handleTab(k))),this.register(this._terminal.onKey(k=>this._handleKey(k.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,p.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,y.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(l){for(let f=0;f<l;f++)this._handleChar(" ")}_handleChar(l){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==l&&(this._charsToAnnounce+=l):this._charsToAnnounce+=l,l===`
|
|
273
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(l){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(l)||this._charsToConsume.push(l)}_refreshRows(l,f){this._liveRegionDebouncer.refresh(l,f,this._terminal.rows)}_renderRows(l,f){const _=this._terminal.buffer,E=_.lines.length.toString();for(let k=l;k<=f;k++){const C=_.lines.get(_.ydisp+k),w=[],P=(C==null?void 0:C.translateToString(!0,void 0,void 0,w))||"",T=(_.ydisp+k+1).toString(),M=this._rowElements[k];M&&(P.length===0?(M.innerText=" ",this._rowColumns.set(M,[0,1])):(M.textContent=P,this._rowColumns.set(M,w)),M.setAttribute("aria-posinset",T),M.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(l,f){const _=l.target,E=this._rowElements[f===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(f===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==E)return;let k,C;if(f===0?(k=_,C=this._rowElements.pop(),this._rowContainer.removeChild(C)):(k=this._rowElements.shift(),C=_,this._rowContainer.removeChild(k)),k.removeEventListener("focus",this._topBoundaryFocusListener),C.removeEventListener("focus",this._bottomBoundaryFocusListener),f===0){const w=this._createAccessibilityTreeNode();this._rowElements.unshift(w),this._rowContainer.insertAdjacentElement("afterbegin",w)}else{const w=this._createAccessibilityTreeNode();this._rowElements.push(w),this._rowContainer.appendChild(w)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(f===0?-1:1),this._rowElements[f===0?1:this._rowElements.length-2].focus(),l.preventDefault(),l.stopImmediatePropagation()}_handleSelectionChange(){var P;if(this._rowElements.length===0)return;const l=document.getSelection();if(!l)return;if(l.isCollapsed)return void(this._rowContainer.contains(l.anchorNode)&&this._terminal.clearSelection());if(!l.anchorNode||!l.focusNode)return void console.error("anchorNode and/or focusNode are null");let f={node:l.anchorNode,offset:l.anchorOffset},_={node:l.focusNode,offset:l.focusOffset};if((f.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||f.node===_.node&&f.offset>_.offset)&&([f,_]=[_,f]),f.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(f={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(f.node))return;const E=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:E,offset:((P=E.textContent)==null?void 0:P.length)??0}),!this._rowContainer.contains(_.node))return;const k=({node:T,offset:M})=>{const j=T instanceof Text?T.parentNode:T;let N=parseInt(j==null?void 0:j.getAttribute("aria-posinset"),10)-1;if(isNaN(N))return console.warn("row is invalid. Race condition?"),null;const F=this._rowColumns.get(j);if(!F)return console.warn("columns is null. Race condition?"),null;let V=M<F.length?F[M]:F.slice(-1)[0]+1;return V>=this._terminal.cols&&(++N,V=0),{row:N,column:V}},C=k(f),w=k(_);if(C&&w){if(C.row>w.row||C.row===w.row&&C.column>=w.column)throw new Error("invalid range");this._terminal.select(C.column,C.row,(w.row-C.row)*this._terminal.cols-C.column+w.column)}}_handleResize(l){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let f=this._rowContainer.children.length;f<this._terminal.rows;f++)this._rowElements[f]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[f]);for(;this._rowElements.length>l;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const l=this._coreBrowserService.mainDocument.createElement("div");return l.setAttribute("role","listitem"),l.tabIndex=-1,this._refreshRowDimensions(l),l}_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 l=0;l<this._terminal.rows;l++)this._refreshRowDimensions(this._rowElements[l])}}_refreshRowDimensions(l){l.style.height=`${this._renderService.dimensions.css.cell.height}px`}};i.AccessibilityManager=h=d([m(1,g.IInstantiationService),m(2,S.ICoreBrowserService),m(3,S.IRenderService)],h)},3614:(c,i)=>{function a(v){return v.replace(/\r?\n/g,"\r")}function d(v,y){return y?"\x1B[200~"+v+"\x1B[201~":v}function m(v,y,S,g){v=d(v=a(v),S.decPrivateModes.bracketedPasteMode&&g.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(v,!0),y.value=""}function u(v,y,S){const g=S.getBoundingClientRect(),p=v.clientX-g.left-10,h=v.clientY-g.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${p}px`,y.style.top=`${h}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=a,i.bracketTextForPaste=d,i.copyHandler=function(v,y){v.clipboardData&&v.clipboardData.setData("text/plain",y.selectionText),v.preventDefault()},i.handlePasteEvent=function(v,y,S,g){v.stopPropagation(),v.clipboardData&&m(v.clipboardData.getData("text/plain"),y,S,g)},i.paste=m,i.moveTextAreaUnderMouseCursor=u,i.rightClickHandler=function(v,y,S,g,p){u(v,y,S),p&&g.rightClickSelect(v),y.value=g.selectionText,y.select()}},7239:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const d=a(1505);i.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(m,u,v){this._css.set(m,u,v)}getCss(m,u){return this._css.get(m,u)}setColor(m,u,v){this._color.set(m,u,v)}getColor(m,u){return this._color.get(m,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(a,d,m,u){a.addEventListener(d,m,u);let v=!1;return{dispose:()=>{v||(v=!0,a.removeEventListener(d,m,u))}}}},3551:function(c,i,a){var d=this&&this.__decorate||function(h,l,f,_){var E,k=arguments.length,C=k<3?l:_===null?_=Object.getOwnPropertyDescriptor(l,f):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,l,f,_);else for(var w=h.length-1;w>=0;w--)(E=h[w])&&(C=(k<3?E(C):k>3?E(l,f,C):E(l,f))||C);return k>3&&C&&Object.defineProperty(l,f,C),C},m=this&&this.__param||function(h,l){return function(f,_){l(f,_,h)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier=void 0;const u=a(3656),v=a(8460),y=a(844),S=a(2585),g=a(4725);let p=i.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(h,l,f,_,E){super(),this._element=h,this._mouseService=l,this._renderService=f,this._bufferService=_,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new v.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new v.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)(()=>{var k;this._lastMouseEvent=void 0,(k=this._activeProviderReplies)==null||k.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const l=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!l)return;this._isMouseOut=!1;const f=h.composedPath();for(let _=0;_<f.length;_++){const E=f[_];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&l.x===this._lastBufferCell.x&&l.y===this._lastBufferCell.y||(this._handleHover(l),this._lastBufferCell=l)}_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,l){var _,E;this._activeProviderReplies&&l||((_=this._activeProviderReplies)==null||_.forEach(k=>{k==null||k.forEach(C=>{C.link.dispose&&C.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=h.y);let f=!1;for(const[k,C]of this._linkProviderService.linkProviders.entries())l?(E=this._activeProviderReplies)!=null&&E.get(k)&&(f=this._checkLinkProviderResult(k,h,f)):C.provideLinks(h.y,w=>{var T,M;if(this._isMouseOut)return;const P=w==null?void 0:w.map(j=>({link:j}));(T=this._activeProviderReplies)==null||T.set(k,P),f=this._checkLinkProviderResult(k,h,f),((M=this._activeProviderReplies)==null?void 0:M.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)})}_removeIntersectingLinks(h,l){const f=new Set;for(let _=0;_<l.size;_++){const E=l.get(_);if(E)for(let k=0;k<E.length;k++){const C=E[k],w=C.link.range.start.y<h?0:C.link.range.start.x,P=C.link.range.end.y>h?this._bufferService.cols:C.link.range.end.x;for(let T=w;T<=P;T++){if(f.has(T)){E.splice(k--,1);break}f.add(T)}}}}_checkLinkProviderResult(h,l,f){var k;if(!this._activeProviderReplies)return f;const _=this._activeProviderReplies.get(h);let E=!1;for(let C=0;C<h;C++)this._activeProviderReplies.has(C)&&!this._activeProviderReplies.get(C)||(E=!0);if(!E&&_){const C=_.find(w=>this._linkAtPosition(w.link,l));C&&(f=!0,this._handleNewLink(C))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!f)for(let C=0;C<this._activeProviderReplies.size;C++){const w=(k=this._activeProviderReplies.get(C))==null?void 0:k.find(P=>this._linkAtPosition(P.link,l));if(w){f=!0,this._handleNewLink(w);break}}return f}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const l=this._positionFromMouseEvent(h,this._element,this._mouseService);l&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,l)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,l){this._currentLink&&this._lastMouseEvent&&(!h||!l||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=l)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(h.link,l)&&(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:()=>{var f,_;return(_=(f=this._currentLink)==null?void 0:f.state)==null?void 0:_.decorations.pointerCursor},set:f=>{var _;(_=this._currentLink)!=null&&_.state&&this._currentLink.state.decorations.pointerCursor!==f&&(this._currentLink.state.decorations.pointerCursor=f,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",f))}},underline:{get:()=>{var f,_;return(_=(f=this._currentLink)==null?void 0:f.state)==null?void 0:_.decorations.underline},set:f=>{var _,E,k;(_=this._currentLink)!=null&&_.state&&((k=(E=this._currentLink)==null?void 0:E.state)==null?void 0:k.decorations.underline)!==f&&(this._currentLink.state.decorations.underline=f,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,f))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(f=>{if(!this._currentLink)return;const _=f.start===0?0:f.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+f.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(_,E),this._lastMouseEvent)){const k=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);k&&this._askForLink(k,!1)}})))}_linkHover(h,l,f){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),l.hover&&l.hover(f,l.text)}_fireUnderlineEvent(h,l){const f=h.range,_=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(f.start.x-1,f.start.y-_-1,f.end.x,f.end.y-_-1,void 0);(l?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(h,l,f){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),l.leave&&l.leave(f,l.text)}_linkAtPosition(h,l){const f=h.range.start.y*this._bufferService.cols+h.range.start.x,_=h.range.end.y*this._bufferService.cols+h.range.end.x,E=l.y*this._bufferService.cols+l.x;return f<=E&&E<=_}_positionFromMouseEvent(h,l,f){const _=f.getCoords(h,l,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,l,f,_,E){return{x1:h,y1:l,x2:f,y2:_,cols:this._bufferService.cols,fg:E}}};i.Linkifier=p=d([m(1,g.IMouseService),m(2,g.IRenderService),m(3,S.IBufferService),m(4,g.ILinkProviderService)],p)},9042:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(c,i,a){var d=this&&this.__decorate||function(g,p,h,l){var f,_=arguments.length,E=_<3?p:l===null?l=Object.getOwnPropertyDescriptor(p,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,p,h,l);else for(var k=g.length-1;k>=0;k--)(f=g[k])&&(E=(_<3?f(E):_>3?f(p,h,E):f(p,h))||E);return _>3&&E&&Object.defineProperty(p,h,E),E},m=this&&this.__param||function(g,p){return function(h,l){p(h,l,g)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const u=a(511),v=a(2585);let y=i.OscLinkProvider=class{constructor(g,p,h){this._bufferService=g,this._optionsService=p,this._oscLinkService=h}provideLinks(g,p){var P;const h=this._bufferService.buffer.lines.get(g-1);if(!h)return void p(void 0);const l=[],f=this._optionsService.rawOptions.linkHandler,_=new u.CellData,E=h.getTrimmedLength();let k=-1,C=-1,w=!1;for(let T=0;T<E;T++)if(C!==-1||h.hasContent(T)){if(h.loadCell(T,_),_.hasExtendedAttrs()&&_.extended.urlId){if(C===-1){C=T,k=_.extended.urlId;continue}w=_.extended.urlId!==k}else C!==-1&&(w=!0);if(w||C!==-1&&T===E-1){const M=(P=this._oscLinkService.getLinkData(k))==null?void 0:P.uri;if(M){const j={start:{x:C+1,y:g},end:{x:T+(w||T!==E-1?0:1),y:g}};let N=!1;if(!(f!=null&&f.allowNonHttpProtocols))try{const F=new URL(M);["http:","https:"].includes(F.protocol)||(N=!0)}catch{N=!0}N||l.push({text:M,range:j,activate:(F,V)=>f?f.activate(F,V,j):S(0,V),hover:(F,V)=>{var K;return(K=f==null?void 0:f.hover)==null?void 0:K.call(f,F,V,j)},leave:(F,V)=>{var K;return(K=f==null?void 0:f.leave)==null?void 0:K.call(f,F,V,j)}})}w=!1,_.hasExtendedAttrs()&&_.extended.urlId?(C=T,k=_.extended.urlId):(C=-1,k=-1)}}p(l)}};function S(g,p){if(confirm(`Do you want to navigate to ${p}?
|
|
274
|
+
|
|
275
|
+
WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=p}else console.warn("Opening link blocked as opener could not be cleared")}}i.OscLinkProvider=y=d([m(0,v.IBufferService),m(1,v.IOptionsService),m(2,v.IOscLinkService)],y)},6193:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderDebouncer=void 0,i.RenderDebouncer=class{constructor(a,d){this._renderCallback=a,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,d,m){this._rowCount=m,a=a!==void 0?a:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.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 a=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},3236:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;const d=a(3614),m=a(3656),u=a(3551),v=a(9042),y=a(3730),S=a(1680),g=a(3107),p=a(5744),h=a(2950),l=a(1296),f=a(428),_=a(4269),E=a(5114),k=a(8934),C=a(3230),w=a(9312),P=a(4725),T=a(6731),M=a(8055),j=a(8969),N=a(8460),F=a(844),V=a(6114),K=a(8437),q=a(2584),B=a(7399),R=a(5941),L=a(9074),I=a(2585),D=a(5435),W=a(4567),H=a(779);class U extends j.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(O={}){super(O),this.browser=V,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new F.MutableDisposable),this._onCursorMove=this.register(new N.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new N.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new N.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new N.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new N.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new N.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new N.EventEmitter),this._onBlur=this.register(new N.EventEmitter),this._onA11yCharEmitter=this.register(new N.EventEmitter),this._onA11yTabEmitter=this.register(new N.EventEmitter),this._onWillOpen=this.register(new N.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(I.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(H.LinkProviderService),this._instantiationService.setService(P.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((A,z)=>this.refresh(A,z))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(A=>this._reportWindowsOptions(A))),this.register(this._inputHandler.onColor(A=>this._handleColorEvent(A))),this.register((0,N.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,N.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,N.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,N.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(A=>this._afterResize(A.cols,A.rows))),this.register((0,F.toDisposable)(()=>{var A,z;this._customKeyEventHandler=void 0,(z=(A=this.element)==null?void 0:A.parentNode)==null||z.removeChild(this.element)}))}_handleColorEvent(O){if(this._themeService)for(const A of O){let z,$="";switch(A.index){case 256:z="foreground",$="10";break;case 257:z="background",$="11";break;case 258:z="cursor",$="12";break;default:z="ansi",$="4;"+A.index}switch(A.type){case 0:const Y=M.color.toColorRGB(z==="ansi"?this._themeService.colors.ansi[A.index]:this._themeService.colors[z]);this.coreService.triggerDataEvent(`${q.C0.ESC}]${$};${(0,R.toRgbString)(Y)}${q.C1_ESCAPED.ST}`);break;case 1:if(z==="ansi")this._themeService.modifyColors(X=>X.ansi[A.index]=M.channels.toColor(...A.color));else{const X=z;this._themeService.modifyColors(ne=>ne[X]=M.channels.toColor(...A.color))}break;case 2:this._themeService.restoreColor(A.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(O){O?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(W.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(O){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var O;return(O=this.textarea)==null?void 0:O.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.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 O=this.buffer.ybase+this.buffer.y,A=this.buffer.lines.get(O);if(!A)return;const z=Math.min(this.buffer.x,this.cols-1),$=this._renderService.dimensions.css.cell.height,Y=A.getWidth(z),X=this._renderService.dimensions.css.cell.width*Y,ne=this.buffer.y*this._renderService.dimensions.css.cell.height,oe=z*this._renderService.dimensions.css.cell.width;this.textarea.style.left=oe+"px",this.textarea.style.top=ne+"px",this.textarea.style.width=X+"px",this.textarea.style.height=$+"px",this.textarea.style.lineHeight=$+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",A=>{this.hasSelection()&&(0,d.copyHandler)(A,this._selectionService)}));const O=A=>(0,d.handlePasteEvent)(A,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",O)),this.register((0,m.addDisposableDomListener)(this.element,"paste",O)),V.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",A=>{A.button===2&&(0,d.rightClickHandler)(A,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",A=>{(0,d.rightClickHandler)(A,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),V.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",A=>{A.button===1&&(0,d.moveTextAreaUnderMouseCursor)(A,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",O=>this._keyUp(O),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",O=>this._keyDown(O),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",O=>this._keyPress(O),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",O=>this._compositionHelper.compositionupdate(O))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,m.addDisposableDomListener)(this.textarea,"input",O=>this._inputEvent(O),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(O){var z;if(!O)throw new Error("Terminal requires a parent element.");if(O.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((z=this.element)==null?void 0:z.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=O.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"),O.appendChild(this.element);const A=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),A.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.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",$=>this.updateCursorStyle($))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),A.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),V.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(E.CoreBrowserService,this.textarea,O.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(P.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",$=>this._handleTextAreaFocus($))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(f.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(P.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(T.ThemeService),this._instantiationService.setService(P.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(P.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(C.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(P.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange($=>this._onRender.fire($))),this.onResize($=>this._renderService.resize($.cols,$.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(k.MouseService),this._instantiationService.setService(P.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(A);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines($=>this.scrollLines($.amount,$.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(w.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(P.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines($=>this.scrollLines($.amount,$.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw($=>this._renderService.handleSelectionChanged($.start,$.end,$.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection($=>{this.textarea.value=$,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event($=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(g.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",$=>this._selectionService.handleMouseDown($))),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(W.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",$=>this._handleScreenReaderModeOptionChange($))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(p.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",$=>{!this._overviewRulerRenderer&&$&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(p.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(l.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const O=this,A=this.element;function z(X){const ne=O._mouseService.getMouseReportCoords(X,O.screenElement);if(!ne)return!1;let oe,he;switch(X.overrideType||X.type){case"mousemove":he=32,X.buttons===void 0?(oe=3,X.button!==void 0&&(oe=X.button<3?X.button:3)):oe=1&X.buttons?0:4&X.buttons?1:2&X.buttons?2:3;break;case"mouseup":he=0,oe=X.button<3?X.button:3;break;case"mousedown":he=1,oe=X.button<3?X.button:3;break;case"wheel":if(O._customWheelEventHandler&&O._customWheelEventHandler(X)===!1||O.viewport.getLinesScrolled(X)===0)return!1;he=X.deltaY<0?0:1,oe=4;break;default:return!1}return!(he===void 0||oe===void 0||oe>4)&&O.coreMouseService.triggerMouseEvent({col:ne.col,row:ne.row,x:ne.x,y:ne.y,button:oe,action:he,ctrl:X.ctrlKey,alt:X.altKey,shift:X.shiftKey})}const $={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Y={mouseup:X=>(z(X),X.buttons||(this._document.removeEventListener("mouseup",$.mouseup),$.mousedrag&&this._document.removeEventListener("mousemove",$.mousedrag)),this.cancel(X)),wheel:X=>(z(X),this.cancel(X,!0)),mousedrag:X=>{X.buttons&&z(X)},mousemove:X=>{X.buttons||z(X)}};this.register(this.coreMouseService.onProtocolChange(X=>{X?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(X)),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&X?$.mousemove||(A.addEventListener("mousemove",Y.mousemove),$.mousemove=Y.mousemove):(A.removeEventListener("mousemove",$.mousemove),$.mousemove=null),16&X?$.wheel||(A.addEventListener("wheel",Y.wheel,{passive:!1}),$.wheel=Y.wheel):(A.removeEventListener("wheel",$.wheel),$.wheel=null),2&X?$.mouseup||($.mouseup=Y.mouseup):(this._document.removeEventListener("mouseup",$.mouseup),$.mouseup=null),4&X?$.mousedrag||($.mousedrag=Y.mousedrag):(this._document.removeEventListener("mousemove",$.mousedrag),$.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(A,"mousedown",X=>{if(X.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(X))return z(X),$.mouseup&&this._document.addEventListener("mouseup",$.mouseup),$.mousedrag&&this._document.addEventListener("mousemove",$.mousedrag),this.cancel(X)})),this.register((0,m.addDisposableDomListener)(A,"wheel",X=>{if(!$.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(X)===!1)return!1;if(!this.buffer.hasScrollback){const ne=this.viewport.getLinesScrolled(X);if(ne===0)return;const oe=q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(X.deltaY<0?"A":"B");let he="";for(let Ce=0;Ce<Math.abs(ne);Ce++)he+=oe;return this.coreService.triggerDataEvent(he,!0),this.cancel(X,!0)}return this.viewport.handleWheel(X)?this.cancel(X):void 0}},{passive:!1})),this.register((0,m.addDisposableDomListener)(A,"touchstart",X=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(X),this.cancel(X)},{passive:!0})),this.register((0,m.addDisposableDomListener)(A,"touchmove",X=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(X)?void 0:this.cancel(X)},{passive:!1}))}refresh(O,A){var z;(z=this._renderService)==null||z.refreshRows(O,A)}updateCursorStyle(O){var A;(A=this._selectionService)!=null&&A.shouldColumnSelect(O)?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(O,A,z=0){var $;z===1?(super.scrollLines(O,A,z),this.refresh(0,this.rows-1)):($=this.viewport)==null||$.scrollLines(O)}paste(O){(0,d.paste)(O,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(O){this._customKeyEventHandler=O}attachCustomWheelEventHandler(O){this._customWheelEventHandler=O}registerLinkProvider(O){return this._linkProviderService.registerLinkProvider(O)}registerCharacterJoiner(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const A=this._characterJoinerService.register(O);return this.refresh(0,this.rows-1),A}deregisterCharacterJoiner(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(O)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(O){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)}registerDecoration(O){return this._decorationService.registerDecoration(O)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(O,A,z){this._selectionService.setSelection(O,A,z)}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(){var O;(O=this._selectionService)==null||O.clearSelection()}selectAll(){var O;(O=this._selectionService)==null||O.selectAll()}selectLines(O,A){var z;(z=this._selectionService)==null||z.selectLines(O,A)}_keyDown(O){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;const A=this.browser.isMac&&this.options.macOptionIsMeta&&O.altKey;if(!A&&!this._compositionHelper.keydown(O))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;A||O.key!=="Dead"&&O.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const z=(0,B.evaluateKeyboardEvent)(O,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),z.type===3||z.type===2){const $=this.rows-1;return this.scrollLines(z.type===2?-$:$),this.cancel(O,!0)}return z.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(z.cancel&&this.cancel(O,!0),!z.key||!!(O.key&&!O.ctrlKey&&!O.altKey&&!O.metaKey&&O.key.length===1&&O.key.charCodeAt(0)>=65&&O.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(z.key!==q.C0.ETX&&z.key!==q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:z.key,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(z.key,!0),!this.optionsService.rawOptions.screenReaderMode||O.altKey||O.ctrlKey?this.cancel(O,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(O,A){const z=O.isMac&&!this.options.macOptionIsMeta&&A.altKey&&!A.ctrlKey&&!A.metaKey||O.isWindows&&A.altKey&&A.ctrlKey&&!A.metaKey||O.isWindows&&A.getModifierState("AltGraph");return A.type==="keypress"?z:z&&(!A.keyCode||A.keyCode>47)}_keyUp(O){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(A){return A.keyCode===16||A.keyCode===17||A.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O),this._keyPressHandled=!1)}_keyPress(O){let A;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)A=O.charCode;else if(O.which===null||O.which===void 0)A=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;A=O.which}return!(!A||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O)||(A=String.fromCharCode(A),this._onKey.fire({key:A,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(A,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(O){if(O.data&&O.inputType==="insertText"&&(!O.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const A=O.data;return this.coreService.triggerDataEvent(A,!0),this.cancel(O),!0}return!1}resize(O,A){O!==this.cols||A!==this.rows?super.resize(O,A):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(O,A){var z,$;(z=this._charSizeService)==null||z.measure(),($=this.viewport)==null||$.syncScrollArea(!0)}clear(){var O;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 A=1;A<this.rows;A++)this.buffer.lines.push(this.buffer.getBlankLine(K.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(O=this.viewport)==null||O.reset(),this.refresh(0,this.rows-1)}}reset(){var A,z;this.options.rows=this.rows,this.options.cols=this.cols;const O=this._customKeyEventHandler;this._setup(),super.reset(),(A=this._selectionService)==null||A.reset(),this._decorationService.reset(),(z=this.viewport)==null||z.reset(),this._customKeyEventHandler=O,this.refresh(0,this.rows-1)}clearTextureAtlas(){var O;(O=this._renderService)==null||O.clearTextureAtlas()}_reportFocus(){var O;(O=this.element)!=null&&O.classList.contains("focus")?this.coreService.triggerDataEvent(q.C0.ESC+"[I"):this.coreService.triggerDataEvent(q.C0.ESC+"[O")}_reportWindowsOptions(O){if(this._renderService)switch(O){case D.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const A=this._renderService.dimensions.css.canvas.width.toFixed(0),z=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[4;${z};${A}t`);break;case D.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const $=this._renderService.dimensions.css.cell.width.toFixed(0),Y=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[6;${Y};${$}t`)}}cancel(O,A){if(this.options.cancelEvents||A)return O.preventDefault(),O.stopPropagation(),!1}}i.Terminal=U},9924:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TimeBasedDebouncer=void 0,i.TimeBasedDebouncer=class{constructor(a,d=1e3){this._renderCallback=a,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(a,d,m){this._rowCount=m,a=a!==void 0?a:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const v=u-this._lastRefreshMs,y=this._debounceThresholdMS-v;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const a=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,d)}}},1680:function(c,i,a){var d=this&&this.__decorate||function(h,l,f,_){var E,k=arguments.length,C=k<3?l:_===null?_=Object.getOwnPropertyDescriptor(l,f):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,l,f,_);else for(var w=h.length-1;w>=0;w--)(E=h[w])&&(C=(k<3?E(C):k>3?E(l,f,C):E(l,f))||C);return k>3&&C&&Object.defineProperty(l,f,C),C},m=this&&this.__param||function(h,l){return function(f,_){l(f,_,h)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;const u=a(3656),v=a(4725),y=a(8460),S=a(844),g=a(2585);let p=i.Viewport=class extends S.Disposable{constructor(h,l,f,_,E,k,C,w){super(),this._viewportElement=h,this._scrollArea=l,this._bufferService=f,this._optionsService=_,this._charSizeService=E,this._renderService=k,this._coreBrowserService=C,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 y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(P=>this._activeBuffer=P.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(P=>this._renderDimensions=P)),this._handleThemeChange(w.colors),this.register(w.onChangeColors(P=>this._handleThemeChange(P))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.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(h){if(h)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 l=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==l&&(this._lastRecordedBufferHeight=l,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){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 l=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<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(h,l){const f=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(l<0&&this._viewportElement.scrollTop!==0||l>0&&f<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const l=this._getPixelsScrolled(h);return l!==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+l:this._smoothScrollState.target+=l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const l=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?l*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._currentRowHeight*this._bufferService.rows),l}getBufferElements(h,l){var w;let f,_="";const E=[],k=l??this._bufferService.buffer.lines.length,C=this._bufferService.buffer.lines;for(let P=h;P<k;P++){const T=C.get(P);if(!T)continue;const M=(w=C.get(P+1))==null?void 0:w.isWrapped;if(_+=T.translateToString(!M),!M||P===C.length-1){const j=document.createElement("div");j.textContent=_,E.push(j),_.length>0&&(f=j),_=""}}return{bufferElements:E,cursorElement:f}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(l/=this._currentRowHeight+0,this._wheelPartialScroll+=l,l=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._bufferService.rows),l}_applyScrollModifier(h,l){const f=this._optionsService.rawOptions.fastScrollModifier;return f==="alt"&&l.altKey||f==="ctrl"&&l.ctrlKey||f==="shift"&&l.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const l=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,l!==0&&(this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}};i.Viewport=p=d([m(2,g.IBufferService),m(3,g.IOptionsService),m(4,v.ICharSizeService),m(5,v.IRenderService),m(6,v.ICoreBrowserService),m(7,v.IThemeService)],p)},3107:function(c,i,a){var d=this&&this.__decorate||function(g,p,h,l){var f,_=arguments.length,E=_<3?p:l===null?l=Object.getOwnPropertyDescriptor(p,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,p,h,l);else for(var k=g.length-1;k>=0;k--)(f=g[k])&&(E=(_<3?f(E):_>3?f(p,h,E):f(p,h))||E);return _>3&&E&&Object.defineProperty(p,h,E),E},m=this&&this.__param||function(g,p){return function(h,l){p(h,l,g)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferDecorationRenderer=void 0;const u=a(4725),v=a(844),y=a(2585);let S=i.BufferDecorationRenderer=class extends v.Disposable{constructor(g,p,h,l,f){super(),this._screenElement=g,this._bufferService=p,this._coreBrowserService=h,this._decorationService=l,this._renderService=f,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(_=>this._removeDecoration(_))),this.register((0,v.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 g of this._decorationService.decorations)this._renderDecoration(g);this._dimensionsChanged=!1}_renderDecoration(g){this._refreshStyle(g),this._dimensionsChanged&&this._refreshXPosition(g)}_createElement(g){var l;const p=this._coreBrowserService.mainDocument.createElement("div");p.classList.add("xterm-decoration"),p.classList.toggle("xterm-decoration-top-layer",((l=g==null?void 0:g.options)==null?void 0:l.layer)==="top"),p.style.width=`${Math.round((g.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,p.style.height=(g.options.height||1)*this._renderService.dimensions.css.cell.height+"px",p.style.top=(g.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",p.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=g.options.x??0;return h&&h>this._bufferService.cols&&(p.style.display="none"),this._refreshXPosition(g,p),p}_refreshStyle(g){const p=g.marker.line-this._bufferService.buffers.active.ydisp;if(p<0||p>=this._bufferService.rows)g.element&&(g.element.style.display="none",g.onRenderEmitter.fire(g.element));else{let h=this._decorationElements.get(g);h||(h=this._createElement(g),g.element=h,this._decorationElements.set(g,h),this._container.appendChild(h),g.onDispose(()=>{this._decorationElements.delete(g),h.remove()})),h.style.top=p*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",g.onRenderEmitter.fire(h)}}_refreshXPosition(g,p=g.element){if(!p)return;const h=g.options.x??0;(g.options.anchor||"left")==="right"?p.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":p.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(g){var p;(p=this._decorationElements.get(g))==null||p.remove(),this._decorationElements.delete(g),g.dispose()}};i.BufferDecorationRenderer=S=d([m(1,y.IBufferService),m(2,u.ICoreBrowserService),m(3,y.IDecorationService),m(4,u.IRenderService)],S)},5871:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorZoneStore=void 0,i.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(a){if(a.options.overviewRulerOptions){for(const d of this._zones)if(d.color===a.options.overviewRulerOptions.color&&d.position===a.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,a.marker.line))return;if(this._lineAdjacentToZone(d,a.marker.line,a.options.overviewRulerOptions.position))return void this._addLineToZone(d,a.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=a.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=a.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=a.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=a.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:a.options.overviewRulerOptions.color,position:a.options.overviewRulerOptions.position,startBufferLine:a.marker.line,endBufferLine:a.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(a){this._linePadding=a}_lineIntersectsZone(a,d){return d>=a.startBufferLine&&d<=a.endBufferLine}_lineAdjacentToZone(a,d,m){return d>=a.startBufferLine-this._linePadding[m||"full"]&&d<=a.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(a,d){a.startBufferLine=Math.min(a.startBufferLine,d),a.endBufferLine=Math.max(a.endBufferLine,d)}}},5744:function(c,i,a){var d=this&&this.__decorate||function(f,_,E,k){var C,w=arguments.length,P=w<3?_:k===null?k=Object.getOwnPropertyDescriptor(_,E):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(f,_,E,k);else for(var T=f.length-1;T>=0;T--)(C=f[T])&&(P=(w<3?C(P):w>3?C(_,E,P):C(_,E))||P);return w>3&&P&&Object.defineProperty(_,E,P),P},m=this&&this.__param||function(f,_){return function(E,k){_(E,k,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OverviewRulerRenderer=void 0;const u=a(5871),v=a(4725),y=a(844),S=a(2585),g={full:0,left:0,center:0,right:0},p={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let l=i.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(f,_,E,k,C,w,P){var M;super(),this._viewportElement=f,this._screenElement=_,this._bufferService=E,this._decorationService=k,this._renderService=C,this._optionsService=w,this._coreBrowserService=P,this._colorZoneStore=new u.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(),(M=this._viewportElement.parentElement)==null||M.insertBefore(this._canvas,this._viewportElement);const T=this._canvas.getContext("2d");if(!T)throw new Error("Ctx cannot be null");this._ctx=T,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)(()=>{var j;(j=this._canvas)==null||j.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 f=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);p.full=this._canvas.width,p.left=f,p.center=_,p.right=f,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=p.left,h.right=p.left+p.center}_refreshDrawHeightConstants(){g.full=Math.round(2*this._coreBrowserService.dpr);const f=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(f,12),6)*this._coreBrowserService.dpr);g.left=_,g.center=_,g.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.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 _ of this._decorationService.decorations)this._colorZoneStore.addDecoration(_);this._ctx.lineWidth=1;const f=this._colorZoneStore.zones;for(const _ of f)_.position!=="full"&&this._renderColorZone(_);for(const _ of f)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(f){this._ctx.fillStyle=f.color,this._ctx.fillRect(h[f.position||"full"],Math.round((this._canvas.height-1)*(f.startBufferLine/this._bufferService.buffers.active.lines.length)-g[f.position||"full"]/2),p[f.position||"full"],Math.round((this._canvas.height-1)*((f.endBufferLine-f.startBufferLine)/this._bufferService.buffers.active.lines.length)+g[f.position||"full"]))}_queueRefresh(f,_){this._shouldUpdateDimensions=f||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};i.OverviewRulerRenderer=l=d([m(2,S.IBufferService),m(3,S.IDecorationService),m(4,v.IRenderService),m(5,S.IOptionsService),m(6,v.ICoreBrowserService)],l)},2950:function(c,i,a){var d=this&&this.__decorate||function(g,p,h,l){var f,_=arguments.length,E=_<3?p:l===null?l=Object.getOwnPropertyDescriptor(p,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,p,h,l);else for(var k=g.length-1;k>=0;k--)(f=g[k])&&(E=(_<3?f(E):_>3?f(p,h,E):f(p,h))||E);return _>3&&E&&Object.defineProperty(p,h,E),E},m=this&&this.__param||function(g,p){return function(h,l){p(h,l,g)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CompositionHelper=void 0;const u=a(4725),v=a(2585),y=a(2584);let S=i.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(g,p,h,l,f,_){this._textarea=g,this._compositionView=p,this._bufferService=h,this._optionsService=l,this._coreService=f,this._renderService=_,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(g){this._compositionView.textContent=g.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(g){if(this._isComposing||this._isSendingComposition){if(g.keyCode===229||g.keyCode===16||g.keyCode===17||g.keyCode===18)return!1;this._finalizeComposition(!1)}return g.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(g){if(this._compositionView.classList.remove("active"),this._isComposing=!1,g){const p={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,p.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(p.start,p.end):this._textarea.value.substring(p.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}},0)}else{this._isSendingComposition=!1;const p=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(p,!0)}}_handleAnyTextareaChanges(){const g=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const p=this._textarea.value,h=p.replace(g,"");this._dataAlreadySent=h,p.length>g.length?this._coreService.triggerDataEvent(h,!0):p.length<g.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):p.length===g.length&&p!==g&&this._coreService.triggerDataEvent(p,!0)}},0)}updateCompositionElements(g){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const p=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,l=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,f=p*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=f+"px",this._compositionView.style.top=l+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=f+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}g||setTimeout(()=>this.updateCompositionElements(!0),0)}}};i.CompositionHelper=S=d([m(2,v.IBufferService),m(3,v.IOptionsService),m(4,v.ICoreService),m(5,u.IRenderService)],S)},9806:(c,i)=>{function a(d,m,u){const v=u.getBoundingClientRect(),y=d.getComputedStyle(u),S=parseInt(y.getPropertyValue("padding-left")),g=parseInt(y.getPropertyValue("padding-top"));return[m.clientX-v.left-S,m.clientY-v.top-g]}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoords=i.getCoordsRelativeToElement=void 0,i.getCoordsRelativeToElement=a,i.getCoords=function(d,m,u,v,y,S,g,p,h){if(!S)return;const l=a(d,m,u);return l?(l[0]=Math.ceil((l[0]+(h?g/2:0))/g),l[1]=Math.ceil(l[1]/p),l[0]=Math.min(Math.max(l[0],1),v+(h?1:0)),l[1]=Math.min(Math.max(l[1],1),y),l):void 0}},9504:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.moveToCellSequence=void 0;const d=a(2584);function m(p,h,l,f){const _=p-u(p,l),E=h-u(h,l),k=Math.abs(_-E)-function(C,w,P){let T=0;const M=C-u(C,P),j=w-u(w,P);for(let N=0;N<Math.abs(M-j);N++){const F=v(C,w)==="A"?-1:1,V=P.buffer.lines.get(M+F*N);V!=null&&V.isWrapped&&T++}return T}(p,h,l);return g(k,S(v(p,h),f))}function u(p,h){let l=0,f=h.buffer.lines.get(p),_=f==null?void 0:f.isWrapped;for(;_&&p>=0&&p<h.rows;)l++,f=h.buffer.lines.get(--p),_=f==null?void 0:f.isWrapped;return l}function v(p,h){return p>h?"A":"B"}function y(p,h,l,f,_,E){let k=p,C=h,w="";for(;k!==l||C!==f;)k+=_?1:-1,_&&k>E.cols-1?(w+=E.buffer.translateBufferLineToString(C,!1,p,k),k=0,p=0,C++):!_&&k<0&&(w+=E.buffer.translateBufferLineToString(C,!1,0,p+1),k=E.cols-1,p=k,C--);return w+E.buffer.translateBufferLineToString(C,!1,p,k)}function S(p,h){const l=h?"O":"[";return d.C0.ESC+l+p}function g(p,h){p=Math.floor(p);let l="";for(let f=0;f<p;f++)l+=h;return l}i.moveToCellSequence=function(p,h,l,f){const _=l.buffer.x,E=l.buffer.y;if(!l.buffer.hasScrollback)return function(w,P,T,M,j,N){return m(P,M,j,N).length===0?"":g(y(w,P,w,P-u(P,j),!1,j).length,S("D",N))}(_,E,0,h,l,f)+m(E,h,l,f)+function(w,P,T,M,j,N){let F;F=m(P,M,j,N).length>0?M-u(M,j):P;const V=M,K=function(q,B,R,L,I,D){let W;return W=m(R,L,I,D).length>0?L-u(L,I):B,q<R&&W<=L||q>=R&&W<L?"C":"D"}(w,P,T,M,j,N);return g(y(w,F,T,V,K==="C",j).length,S(K,N))}(_,E,p,h,l,f);let k;if(E===h)return k=_>p?"D":"C",g(Math.abs(_-p),S(k,f));k=E>h?"D":"C";const C=Math.abs(E-h);return g(function(w,P){return P.cols-w}(E>h?p:_,l)+(C-1)*l.cols+1+((E>h?_:p)-1),S(k,f))}},1296:function(c,i,a){var d=this&&this.__decorate||function(N,F,V,K){var q,B=arguments.length,R=B<3?F:K===null?K=Object.getOwnPropertyDescriptor(F,V):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(N,F,V,K);else for(var L=N.length-1;L>=0;L--)(q=N[L])&&(R=(B<3?q(R):B>3?q(F,V,R):q(F,V))||R);return B>3&&R&&Object.defineProperty(F,V,R),R},m=this&&this.__param||function(N,F){return function(V,K){F(V,K,N)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRenderer=void 0;const u=a(3787),v=a(2550),y=a(2223),S=a(6171),g=a(6052),p=a(4725),h=a(8055),l=a(8460),f=a(844),_=a(2585),E="xterm-dom-renderer-owner-",k="xterm-rows",C="xterm-fg-",w="xterm-bg-",P="xterm-focus",T="xterm-selection";let M=1,j=i.DomRenderer=class extends f.Disposable{constructor(N,F,V,K,q,B,R,L,I,D,W,H,U){super(),this._terminal=N,this._document=F,this._element=V,this._screenElement=K,this._viewportElement=q,this._helperContainer=B,this._linkifier2=R,this._charSizeService=I,this._optionsService=D,this._bufferService=W,this._coreBrowserService=H,this._themeService=U,this._terminalClass=M++,this._rowElements=[],this._selectionRenderModel=(0,g.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new l.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(k),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(T),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(G=>this._injectCss(G))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(G=>this._handleLinkHover(G))),this.register(this._linkifier2.onHideLinkUnderline(G=>this._handleLinkLeave(G))),this.register((0,f.toDisposable)(()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new v.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 N=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*N,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*N),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/N),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/N),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 V of this._rowElements)V.style.width=`${this.dimensions.css.canvas.width}px`,V.style.height=`${this.dimensions.css.cell.height}px`,V.style.lineHeight=`${this.dimensions.css.cell.height}px`,V.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const F=`${this._terminalSelector} .${k} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=F,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(N){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let F=`${this._terminalSelector} .${k} { color: ${N.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;F+=`${this._terminalSelector} .${k} .xterm-dim { color: ${h.color.multiplyOpacity(N.foreground,.5).css};}`,F+=`${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;}`;const V=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,q=`blink_block_${this._terminalClass}`;F+=`@keyframes ${V} { 50% { border-bottom-style: hidden; }}`,F+=`@keyframes ${K} { 50% { box-shadow: none; }}`,F+=`@keyframes ${q} { 0% { background-color: ${N.cursor.css}; color: ${N.cursorAccent.css}; } 50% { background-color: inherit; color: ${N.cursor.css}; }}`,F+=`${this._terminalSelector} .${k}.${P} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${k}.${P} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${k}.${P} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-block { background-color: ${N.cursor.css}; color: ${N.cursorAccent.css};}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${N.cursor.css} !important; color: ${N.cursorAccent.css} !important;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${N.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${N.cursor.css} inset;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${N.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,F+=`${this._terminalSelector} .${T} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${T} div { position: absolute; background-color: ${N.selectionBackgroundOpaque.css};}${this._terminalSelector} .${T} div { position: absolute; background-color: ${N.selectionInactiveBackgroundOpaque.css};}`;for(const[B,R]of N.ansi.entries())F+=`${this._terminalSelector} .${C}${B} { color: ${R.css}; }${this._terminalSelector} .${C}${B}.xterm-dim { color: ${h.color.multiplyOpacity(R,.5).css}; }${this._terminalSelector} .${w}${B} { background-color: ${R.css}; }`;F+=`${this._terminalSelector} .${C}${y.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(N.background).css}; }${this._terminalSelector} .${C}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(N.background),.5).css}; }${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR} { background-color: ${N.foreground.css}; }`,this._themeStyleElement.textContent=F}_setDefaultSpacing(){const N=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${N}px`,this._rowFactory.defaultSpacing=N}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(N,F){for(let V=this._rowElements.length;V<=F;V++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>F;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(N,F){this._refreshRowElements(N,F),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(P),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(P),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(N,F,V){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(N,F,V),this.renderRows(0,this._bufferService.rows-1),!N||!F)return;this._selectionRenderModel.update(this._terminal,N,F,V);const K=this._selectionRenderModel.viewportStartRow,q=this._selectionRenderModel.viewportEndRow,B=this._selectionRenderModel.viewportCappedStartRow,R=this._selectionRenderModel.viewportCappedEndRow;if(B>=this._bufferService.rows||R<0)return;const L=this._document.createDocumentFragment();if(V){const I=N[0]>F[0];L.appendChild(this._createSelectionElement(B,I?F[0]:N[0],I?N[0]:F[0],R-B+1))}else{const I=K===B?N[0]:0,D=B===q?F[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(B,I,D));const W=R-B-1;if(L.appendChild(this._createSelectionElement(B+1,0,this._bufferService.cols,W)),B!==R){const H=q===R?F[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(R,0,H))}}this._selectionContainer.appendChild(L)}_createSelectionElement(N,F,V,K=1){const q=this._document.createElement("div"),B=F*this.dimensions.css.cell.width;let R=this.dimensions.css.cell.width*(V-F);return B+R>this.dimensions.css.canvas.width&&(R=this.dimensions.css.canvas.width-B),q.style.height=K*this.dimensions.css.cell.height+"px",q.style.top=N*this.dimensions.css.cell.height+"px",q.style.left=`${B}px`,q.style.width=`${R}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 N of this._rowElements)N.replaceChildren()}renderRows(N,F){const V=this._bufferService.buffer,K=V.ybase+V.y,q=Math.min(V.x,this._bufferService.cols-1),B=this._optionsService.rawOptions.cursorBlink,R=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let I=N;I<=F;I++){const D=I+V.ydisp,W=this._rowElements[I],H=V.lines.get(D);if(!W||!H)break;W.replaceChildren(...this._rowFactory.createRow(H,D,D===K,R,L,q,B,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(N){this._setCellUnderline(N.x1,N.x2,N.y1,N.y2,N.cols,!0)}_handleLinkLeave(N){this._setCellUnderline(N.x1,N.x2,N.y1,N.y2,N.cols,!1)}_setCellUnderline(N,F,V,K,q,B){V<0&&(N=0),K<0&&(F=0);const R=this._bufferService.rows-1;V=Math.max(Math.min(V,R),0),K=Math.max(Math.min(K,R),0),q=Math.min(q,this._bufferService.cols);const L=this._bufferService.buffer,I=L.ybase+L.y,D=Math.min(L.x,q-1),W=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,U=this._optionsService.rawOptions.cursorInactiveStyle;for(let G=V;G<=K;++G){const O=G+L.ydisp,A=this._rowElements[G],z=L.lines.get(O);if(!A||!z)break;A.replaceChildren(...this._rowFactory.createRow(z,O,O===I,H,U,D,W,this.dimensions.css.cell.width,this._widthCache,B?G===V?N:0:-1,B?(G===K?F:q)-1:-1))}}};i.DomRenderer=j=d([m(7,_.IInstantiationService),m(8,p.ICharSizeService),m(9,_.IOptionsService),m(10,_.IBufferService),m(11,p.ICoreBrowserService),m(12,p.IThemeService)],j)},3787:function(c,i,a){var d=this&&this.__decorate||function(k,C,w,P){var T,M=arguments.length,j=M<3?C:P===null?P=Object.getOwnPropertyDescriptor(C,w):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(k,C,w,P);else for(var N=k.length-1;N>=0;N--)(T=k[N])&&(j=(M<3?T(j):M>3?T(C,w,j):T(C,w))||j);return M>3&&j&&Object.defineProperty(C,w,j),j},m=this&&this.__param||function(k,C){return function(w,P){C(w,P,k)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRendererRowFactory=void 0;const u=a(2223),v=a(643),y=a(511),S=a(2585),g=a(8055),p=a(4725),h=a(4269),l=a(6171),f=a(3734);let _=i.DomRendererRowFactory=class{constructor(k,C,w,P,T,M,j){this._document=k,this._characterJoinerService=C,this._optionsService=w,this._coreBrowserService=P,this._coreService=T,this._decorationService=M,this._themeService=j,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(k,C,w){this._selectionStart=k,this._selectionEnd=C,this._columnSelectMode=w}createRow(k,C,w,P,T,M,j,N,F,V,K){const q=[],B=this._characterJoinerService.getJoinedCharacters(C),R=this._themeService.colors;let L,I=k.getNoBgTrimmedLength();w&&I<M+1&&(I=M+1);let D=0,W="",H=0,U=0,G=0,O=!1,A=0,z=!1,$=0;const Y=[],X=V!==-1&&K!==-1;for(let ne=0;ne<I;ne++){k.loadCell(ne,this._workCell);let oe=this._workCell.getWidth();if(oe===0)continue;let he=!1,Ce=ne,se=this._workCell;if(B.length>0&&ne===B[0][0]){he=!0;const ge=B.shift();se=new h.JoinedCellData(this._workCell,k.translateToString(!0,ge[0],ge[1]),ge[1]-ge[0]),Ce=ge[1]-1,oe=se.getWidth()}const Br=this._isCellInSelection(ne,C),rr=w&&ne===M,Oa=X&&ne>=V&&ne<=K;let ja=!1;this._decorationService.forEachDecorationAtCell(ne,C,void 0,ge=>{ja=!0});let wi=se.getChars()||v.WHITESPACE_CELL_CHAR;if(wi===" "&&(se.isUnderline()||se.isOverline())&&(wi=" "),$=oe*N-F.get(wi,se.isBold(),se.isItalic()),L){if(D&&(Br&&z||!Br&&!z&&se.bg===H)&&(Br&&z&&R.selectionForeground||se.fg===U)&&se.extended.ext===G&&Oa===O&&$===A&&!rr&&!he&&!ja){se.isInvisible()?W+=v.WHITESPACE_CELL_CHAR:W+=wi,D++;continue}D&&(L.textContent=W),L=this._document.createElement("span"),D=0,W=""}else L=this._document.createElement("span");if(H=se.bg,U=se.fg,G=se.extended.ext,O=Oa,A=$,z=Br,he&&M>=ne&&M<=Ce&&(M=ne),!this._coreService.isCursorHidden&&rr&&this._coreService.isCursorInitialized){if(Y.push("xterm-cursor"),this._coreBrowserService.isFocused)j&&Y.push("xterm-cursor-blink"),Y.push(P==="bar"?"xterm-cursor-bar":P==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(T)switch(T){case"outline":Y.push("xterm-cursor-outline");break;case"block":Y.push("xterm-cursor-block");break;case"bar":Y.push("xterm-cursor-bar");break;case"underline":Y.push("xterm-cursor-underline")}}if(se.isBold()&&Y.push("xterm-bold"),se.isItalic()&&Y.push("xterm-italic"),se.isDim()&&Y.push("xterm-dim"),W=se.isInvisible()?v.WHITESPACE_CELL_CHAR:se.getChars()||v.WHITESPACE_CELL_CHAR,se.isUnderline()&&(Y.push(`xterm-underline-${se.extended.underlineStyle}`),W===" "&&(W=" "),!se.isUnderlineColorDefault()))if(se.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${f.AttributeData.toColorRGB(se.getUnderlineColor()).join(",")})`;else{let ge=se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&se.isBold()&&ge<8&&(ge+=8),L.style.textDecorationColor=R.ansi[ge].css}se.isOverline()&&(Y.push("xterm-overline"),W===" "&&(W=" ")),se.isStrikethrough()&&Y.push("xterm-strikethrough"),Oa&&(L.style.textDecoration="underline");let ct=se.getFgColor(),is=se.getFgColorMode(),Lt=se.getBgColor(),os=se.getBgColorMode();const Ba=!!se.isInverse();if(Ba){const ge=ct;ct=Lt,Lt=ge;const Ky=is;is=os,os=Ky}let nr,xi,sr,as=!1;switch(this._decorationService.forEachDecorationAtCell(ne,C,void 0,ge=>{ge.options.layer!=="top"&&as||(ge.backgroundColorRGB&&(os=50331648,Lt=ge.backgroundColorRGB.rgba>>8&16777215,nr=ge.backgroundColorRGB),ge.foregroundColorRGB&&(is=50331648,ct=ge.foregroundColorRGB.rgba>>8&16777215,xi=ge.foregroundColorRGB),as=ge.options.layer==="top")}),!as&&Br&&(nr=this._coreBrowserService.isFocused?R.selectionBackgroundOpaque:R.selectionInactiveBackgroundOpaque,Lt=nr.rgba>>8&16777215,os=50331648,as=!0,R.selectionForeground&&(is=50331648,ct=R.selectionForeground.rgba>>8&16777215,xi=R.selectionForeground)),as&&Y.push("xterm-decoration-top"),os){case 16777216:case 33554432:sr=R.ansi[Lt],Y.push(`xterm-bg-${Lt}`);break;case 50331648:sr=g.channels.toColor(Lt>>16,Lt>>8&255,255&Lt),this._addStyle(L,`background-color:#${E((Lt>>>0).toString(16),"0",6)}`);break;default:Ba?(sr=R.foreground,Y.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):sr=R.background}switch(nr||se.isDim()&&(nr=g.color.multiplyOpacity(sr,.5)),is){case 16777216:case 33554432:se.isBold()&&ct<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ct+=8),this._applyMinimumContrast(L,sr,R.ansi[ct],se,nr,void 0)||Y.push(`xterm-fg-${ct}`);break;case 50331648:const ge=g.channels.toColor(ct>>16&255,ct>>8&255,255&ct);this._applyMinimumContrast(L,sr,ge,se,nr,xi)||this._addStyle(L,`color:#${E(ct.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,sr,R.foreground,se,nr,xi)||Ba&&Y.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}Y.length&&(L.className=Y.join(" "),Y.length=0),rr||he||ja?L.textContent=W:D++,$!==this.defaultSpacing&&(L.style.letterSpacing=`${$}px`),q.push(L),ne=Ce}return L&&D&&(L.textContent=W),q}_applyMinimumContrast(k,C,w,P,T,M){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,l.treatGlyphAsBackgroundColor)(P.getCode()))return!1;const j=this._getContrastCache(P);let N;if(T||M||(N=j.getColor(C.rgba,w.rgba)),N===void 0){const F=this._optionsService.rawOptions.minimumContrastRatio/(P.isDim()?2:1);N=g.color.ensureContrastRatio(T||C,M||w,F),j.setColor((T||C).rgba,(M||w).rgba,N??null)}return!!N&&(this._addStyle(k,`color:${N.css}`),!0)}_getContrastCache(k){return k.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(k,C){k.setAttribute("style",`${k.getAttribute("style")||""}${C};`)}_isCellInSelection(k,C){const w=this._selectionStart,P=this._selectionEnd;return!(!w||!P)&&(this._columnSelectMode?w[0]<=P[0]?k>=w[0]&&C>=w[1]&&k<P[0]&&C<=P[1]:k<w[0]&&C>=w[1]&&k>=P[0]&&C<=P[1]:C>w[1]&&C<P[1]||w[1]===P[1]&&C===w[1]&&k>=w[0]&&k<P[0]||w[1]<P[1]&&C===P[1]&&k<P[0]||w[1]<P[1]&&C===w[1]&&k>=w[0])}};function E(k,C,w){for(;k.length<w;)k=C+k;return k}i.DomRendererRowFactory=_=d([m(1,p.ICharacterJoinerService),m(2,S.IOptionsService),m(3,p.ICoreBrowserService),m(4,S.ICoreService),m(5,S.IDecorationService),m(6,p.IThemeService)],_)},2550:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WidthCache=void 0,i.WidthCache=class{constructor(a,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=a.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 m=a.createElement("span");m.classList.add("xterm-char-measure-element");const u=a.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const v=a.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontStyle="italic";const y=a.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[m,u,v,y],this._container.appendChild(m),this._container.appendChild(u),this._container.appendChild(v),this._container.appendChild(y),d.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(a,d,m,u){a===this._font&&d===this._fontSize&&m===this._weight&&u===this._weightBold||(this._font=a,this._fontSize=d,this._weight=m,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(a,d,m){let u=0;if(!d&&!m&&a.length===1&&(u=a.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const S=this._measure(a,0);return S>0&&(this._flat[u]=S),S}let v=a;d&&(v+="B"),m&&(v+="I");let y=this._holey.get(v);if(y===void 0){let S=0;d&&(S|=1),m&&(S|=2),y=this._measure(a,S),y>0&&this._holey.set(v,y)}return y}_measure(a,d){const m=this._measureElements[d];return m.textContent=a.repeat(32),m.offsetWidth/32}}},2223:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TEXT_BASELINE=i.DIM_OPACITY=i.INVERTED_DEFAULT_COLOR=void 0;const d=a(6114);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(c,i)=>{function a(m){return 57508<=m&&m<=57558}function d(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(i,"__esModule",{value:!0}),i.computeNextVariantOffset=i.createRenderDimensions=i.treatGlyphAsBackgroundColor=i.allowRescaling=i.isEmoji=i.isRestrictedPowerlineGlyph=i.isPowerlineGlyph=i.throwIfFalsy=void 0,i.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},i.isPowerlineGlyph=a,i.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},i.isEmoji=d,i.allowRescaling=function(m,u,v,y){return u===1&&v>Math.ceil(1.5*y)&&m!==void 0&&m>255&&!d(m)&&!a(m)&&!function(S){return 57344<=S&&S<=63743}(m)},i.treatGlyphAsBackgroundColor=function(m){return a(m)||function(u){return 9472<=u&&u<=9631}(m)},i.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}}}},i.computeNextVariantOffset=function(m,u,v=0){return(m-(2*Math.round(u)-v))%(2*Math.round(u))}},6052:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,u,v,y=!1){if(this.selectionStart=u,this.selectionEnd=v,!u||!v||u[0]===v[0]&&u[1]===v[1])return void this.clear();const S=m.buffers.active.ydisp,g=u[1]-S,p=v[1]-S,h=Math.max(g,0),l=Math.min(p,m.rows-1);h>=m.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=g,this.viewportEndRow=p,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=u[0],this.endCol=v[0])}isCellSelected(m,u,v){return!!this.hasSelection&&(v-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&v>=this.viewportCappedStartRow&&u<this.endCol&&v<=this.viewportCappedEndRow:u<this.startCol&&v>=this.viewportCappedStartRow&&u>=this.endCol&&v<=this.viewportCappedEndRow:v>this.viewportStartRow&&v<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&v===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportStartRow&&u>=this.startCol)}}i.createSelectionRenderModel=function(){return new a}},456:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionModel=void 0,i.SelectionModel=class{constructor(a){this._bufferService=a,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 a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?a%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)-1]:[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[a,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[Math.max(a,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const a=this.selectionStart,d=this.selectionEnd;return!(!a||!d)&&(a[1]>d[1]||a[1]===d[1]&&a[0]>d[0])}handleTrim(a){return this.selectionStart&&(this.selectionStart[1]-=a),this.selectionEnd&&(this.selectionEnd[1]-=a),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(c,i,a){var d=this&&this.__decorate||function(l,f,_,E){var k,C=arguments.length,w=C<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(l,f,_,E);else for(var P=l.length-1;P>=0;P--)(k=l[P])&&(w=(C<3?k(w):C>3?k(f,_,w):k(f,_))||w);return C>3&&w&&Object.defineProperty(f,_,w),w},m=this&&this.__param||function(l,f){return function(_,E){f(_,E,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharSizeService=void 0;const u=a(2585),v=a(8460),y=a(844);let S=i.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,f,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new v.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new p(l,f,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};i.CharSizeService=S=d([m(2,u.IOptionsService)],S);class g extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(f,_){f!==void 0&&f>0&&_!==void 0&&_>0&&(this._result.width=f,this._result.height=_)}}class p extends g{constructor(f,_,E){super(),this._document=f,this._parentElement=_,this._optionsService=E,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(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class h extends g{constructor(f){super(),this._optionsService=f,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const f=this._ctx.measureText("W");return this._validateAndSet(f.width,f.fontBoundingBoxAscent+f.fontBoundingBoxDescent),this._result}}},4269:function(c,i,a){var d=this&&this.__decorate||function(h,l,f,_){var E,k=arguments.length,C=k<3?l:_===null?_=Object.getOwnPropertyDescriptor(l,f):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,l,f,_);else for(var w=h.length-1;w>=0;w--)(E=h[w])&&(C=(k<3?E(C):k>3?E(l,f,C):E(l,f))||C);return k>3&&C&&Object.defineProperty(l,f,C),C},m=this&&this.__param||function(h,l){return function(f,_){l(f,_,h)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharacterJoinerService=i.JoinedCellData=void 0;const u=a(3734),v=a(643),y=a(511),S=a(2585);class g extends u.AttributeData{constructor(l,f,_){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=f,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.JoinedCellData=g;let p=i.CharacterJoinerService=class $y{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(l){const f={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(f),f.id}deregister(l){for(let f=0;f<this._characterJoiners.length;f++)if(this._characterJoiners[f].id===l)return this._characterJoiners.splice(f,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const f=this._bufferService.buffer.lines.get(l);if(!f||f.length===0)return[];const _=[],E=f.translateToString(!0);let k=0,C=0,w=0,P=f.getFg(0),T=f.getBg(0);for(let M=0;M<f.getTrimmedLength();M++)if(f.loadCell(M,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==P||this._workCell.bg!==T){if(M-k>1){const j=this._getJoinedRanges(E,w,C,f,k);for(let N=0;N<j.length;N++)_.push(j[N])}k=M,w=C,P=this._workCell.fg,T=this._workCell.bg}C+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-k>1){const M=this._getJoinedRanges(E,w,C,f,k);for(let j=0;j<M.length;j++)_.push(M[j])}return _}_getJoinedRanges(l,f,_,E,k){const C=l.substring(f,_);let w=[];try{w=this._characterJoiners[0].handler(C)}catch(P){console.error(P)}for(let P=1;P<this._characterJoiners.length;P++)try{const T=this._characterJoiners[P].handler(C);for(let M=0;M<T.length;M++)$y._mergeRanges(w,T[M])}catch(T){console.error(T)}return this._stringRangesToCellRanges(w,E,k),w}_stringRangesToCellRanges(l,f,_){let E=0,k=!1,C=0,w=l[E];if(w){for(let P=_;P<this._bufferService.cols;P++){const T=f.getWidth(P),M=f.getString(P).length||v.WHITESPACE_CELL_CHAR.length;if(T!==0){if(!k&&w[0]<=C&&(w[0]=P,k=!0),w[1]<=C){if(w[1]=P,w=l[++E],!w)break;w[0]<=C?(w[0]=P,k=!0):k=!1}C+=M}}w&&(w[1]=this._bufferService.cols)}}static _mergeRanges(l,f){let _=!1;for(let E=0;E<l.length;E++){const k=l[E];if(_){if(f[1]<=k[0])return l[E-1][1]=f[1],l;if(f[1]<=k[1])return l[E-1][1]=Math.max(f[1],k[1]),l.splice(E,1),l;l.splice(E,1),E--}else{if(f[1]<=k[0])return l.splice(E,0,f),l;if(f[1]<=k[1])return k[0]=Math.min(f[0],k[0]),l;f[0]<k[1]&&(k[0]=Math.min(f[0],k[0]),_=!0)}}return _?l[l.length-1][1]=f[1]:l.push(f),l}};i.CharacterJoinerService=p=d([m(0,S.IBufferService)],p)},5114:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreBrowserService=void 0;const d=a(844),m=a(8460),u=a(3656);class v extends d.Disposable{constructor(g,p,h){super(),this._textarea=g,this._window=p,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(l=>this._screenDprMonitor.setWindow(l))),this.register((0,m.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(g){this._window!==g&&(this._window=g,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}}i.CoreBrowserService=v;class y extends d.Disposable{constructor(g){super(),this._parentWindow=g,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)(()=>this.clearListener()))}setWindow(g){this._parentWindow=g,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)==null||g.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)}}},779:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LinkProviderService=void 0;const d=a(844);class m extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(v){return this.linkProviders.push(v),{dispose:()=>{const y=this.linkProviders.indexOf(v);y!==-1&&this.linkProviders.splice(y,1)}}}}i.LinkProviderService=m},8934:function(c,i,a){var d=this&&this.__decorate||function(S,g,p,h){var l,f=arguments.length,_=f<3?g:h===null?h=Object.getOwnPropertyDescriptor(g,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(S,g,p,h);else for(var E=S.length-1;E>=0;E--)(l=S[E])&&(_=(f<3?l(_):f>3?l(g,p,_):l(g,p))||_);return f>3&&_&&Object.defineProperty(g,p,_),_},m=this&&this.__param||function(S,g){return function(p,h){g(p,h,S)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseService=void 0;const u=a(4725),v=a(9806);let y=i.MouseService=class{constructor(S,g){this._renderService=S,this._charSizeService=g}getCoords(S,g,p,h,l){return(0,v.getCoords)(window,S,g,p,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(S,g){const p=(0,v.getCoordsRelativeToElement)(window,S,g);if(this._charSizeService.hasValidSize)return p[0]=Math.min(Math.max(p[0],0),this._renderService.dimensions.css.canvas.width-1),p[1]=Math.min(Math.max(p[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(p[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(p[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(p[0]),y:Math.floor(p[1])}}};i.MouseService=y=d([m(0,u.IRenderService),m(1,u.ICharSizeService)],y)},3230:function(c,i,a){var d=this&&this.__decorate||function(l,f,_,E){var k,C=arguments.length,w=C<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(l,f,_,E);else for(var P=l.length-1;P>=0;P--)(k=l[P])&&(w=(C<3?k(w):C>3?k(f,_,w):k(f,_))||w);return C>3&&w&&Object.defineProperty(f,_,w),w},m=this&&this.__param||function(l,f){return function(_,E){f(_,E,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.RenderService=void 0;const u=a(6193),v=a(4725),y=a(8460),S=a(844),g=a(7226),p=a(2585);let h=i.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(l,f,_,E,k,C,w,P){super(),this._rowCount=l,this._charSizeService=E,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new g.DebouncedIdleTask,this._observerDisposable=this.register(new S.MutableDisposable),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 y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((T,M)=>this._renderRows(T,M),w),this.register(this._renderDebouncer),this.register(w.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(C.onResize(()=>this._fullRefresh())),this.register(C.buffers.onBufferActivate(()=>{var T;return(T=this._renderer.value)==null?void 0:T.clear()})),this.register(_.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(k.onDecorationRegistered(()=>this._fullRefresh())),this.register(k.onDecorationRemoved(()=>this._fullRefresh())),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(C.cols,C.rows),this._fullRefresh()})),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(C.buffer.y,C.buffer.y,!0))),this.register(P.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(w.window,f),this.register(w.onWindowChange(T=>this._registerIntersectionObserver(T,f)))}_registerIntersectionObserver(l,f){if("IntersectionObserver"in l){const _=new l.IntersectionObserver(E=>this._handleIntersectionChange(E[E.length-1]),{threshold:0});_.observe(f),this._observerDisposable.value=(0,S.toDisposable)(()=>_.disconnect())}}_handleIntersectionChange(l){this._isPaused=l.isIntersecting===void 0?l.intersectionRatio===0:!l.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(l,f,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,f,this._rowCount))}_renderRows(l,f){this._renderer.value&&(l=Math.min(l,this._rowCount-1),f=Math.min(f,this._rowCount-1),this._renderer.value.renderRows(l,f),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:l,end:f}),this._onRender.fire({start:l,end:f}),this._isNextRenderRedrawOnly=!0)}resize(l,f){this._rowCount=f,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(l){this._renderer.value=l,this._renderer.value&&(this._renderer.value.onRequestRedraw(f=>this.refreshRows(f.start,f.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(l){return this._renderDebouncer.addRefreshCallback(l)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var l,f;this._renderer.value&&((f=(l=this._renderer.value).clearTextureAtlas)==null||f.call(l),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(l,f){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var _;return(_=this._renderer.value)==null?void 0:_.handleResize(l,f)}):this._renderer.value.handleResize(l,f),this._fullRefresh())}handleCharSizeChanged(){var l;(l=this._renderer.value)==null||l.handleCharSizeChanged()}handleBlur(){var l;(l=this._renderer.value)==null||l.handleBlur()}handleFocus(){var l;(l=this._renderer.value)==null||l.handleFocus()}handleSelectionChanged(l,f,_){var E;this._selectionState.start=l,this._selectionState.end=f,this._selectionState.columnSelectMode=_,(E=this._renderer.value)==null||E.handleSelectionChanged(l,f,_)}handleCursorMove(){var l;(l=this._renderer.value)==null||l.handleCursorMove()}clear(){var l;(l=this._renderer.value)==null||l.clear()}};i.RenderService=h=d([m(2,p.IOptionsService),m(3,v.ICharSizeService),m(4,p.IDecorationService),m(5,p.IBufferService),m(6,v.ICoreBrowserService),m(7,v.IThemeService)],h)},9312:function(c,i,a){var d=this&&this.__decorate||function(w,P,T,M){var j,N=arguments.length,F=N<3?P:M===null?M=Object.getOwnPropertyDescriptor(P,T):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(w,P,T,M);else for(var V=w.length-1;V>=0;V--)(j=w[V])&&(F=(N<3?j(F):N>3?j(P,T,F):j(P,T))||F);return N>3&&F&&Object.defineProperty(P,T,F),F},m=this&&this.__param||function(w,P){return function(T,M){P(T,M,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionService=void 0;const u=a(9806),v=a(9504),y=a(456),S=a(4725),g=a(8460),p=a(844),h=a(6114),l=a(4841),f=a(511),_=a(2585),E=" ",k=new RegExp(E,"g");let C=i.SelectionService=class extends p.Disposable{constructor(w,P,T,M,j,N,F,V,K){super(),this._element=w,this._screenElement=P,this._linkifier=T,this._bufferService=M,this._coreService=j,this._mouseService=N,this._optionsService=F,this._renderService=V,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new f.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new g.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new g.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=q=>this._handleMouseMove(q),this._mouseUpListener=q=>this._handleMouseUp(q),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(q=>this._handleTrim(q)),this.register(this._bufferService.buffers.onBufferActivate(q=>this._handleBufferActivate(q))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,p.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 w=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!w||!P||w[0]===P[0]&&w[1]===P[1])}get selectionText(){const w=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;if(!w||!P)return"";const T=this._bufferService.buffer,M=[];if(this._activeSelectionMode===3){if(w[0]===P[0])return"";const j=w[0]<P[0]?w[0]:P[0],N=w[0]<P[0]?P[0]:w[0];for(let F=w[1];F<=P[1];F++){const V=T.translateBufferLineToString(F,!0,j,N);M.push(V)}}else{const j=w[1]===P[1]?P[0]:void 0;M.push(T.translateBufferLineToString(w[1],!0,w[0],j));for(let N=w[1]+1;N<=P[1]-1;N++){const F=T.lines.get(N),V=T.translateBufferLineToString(N,!0);F!=null&&F.isWrapped?M[M.length-1]+=V:M.push(V)}if(w[1]!==P[1]){const N=T.lines.get(P[1]),F=T.translateBufferLineToString(P[1],!0,0,P[0]);N&&N.isWrapped?M[M.length-1]+=F:M.push(F)}}return M.map(j=>j.replace(k," ")).join(h.isWindows?`\r
|
|
276
|
+
`:`
|
|
277
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(w){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),h.isLinux&&w&&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(w){const P=this._getMouseBufferCoords(w),T=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!!(T&&M&&P)&&this._areCoordsInSelection(P,T,M)}isCellInSelection(w,P){const T=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!T||!M)&&this._areCoordsInSelection([w,P],T,M)}_areCoordsInSelection(w,P,T){return w[1]>P[1]&&w[1]<T[1]||P[1]===T[1]&&w[1]===P[1]&&w[0]>=P[0]&&w[0]<T[0]||P[1]<T[1]&&w[1]===T[1]&&w[0]<T[0]||P[1]<T[1]&&w[1]===P[1]&&w[0]>=P[0]}_selectWordAtCursor(w,P){var j,N;const T=(N=(j=this._linkifier.currentLink)==null?void 0:j.link)==null?void 0:N.range;if(T)return this._model.selectionStart=[T.start.x-1,T.start.y-1],this._model.selectionStartLength=(0,l.getRangeLength)(T,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const M=this._getMouseBufferCoords(w);return!!M&&(this._selectWordAt(M,P),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(w,P){this._model.clearSelection(),w=Math.max(w,0),P=Math.min(P,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,w],this._model.selectionEnd=[this._bufferService.cols,P],this.refresh(),this._onSelectionChange.fire()}_handleTrim(w){this._model.handleTrim(w)&&this.refresh()}_getMouseBufferCoords(w){const P=this._mouseService.getCoords(w,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(P)return P[0]--,P[1]--,P[1]+=this._bufferService.buffer.ydisp,P}_getMouseEventScrollAmount(w){let P=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,w,this._screenElement)[1];const T=this._renderService.dimensions.css.canvas.height;return P>=0&&P<=T?0:(P>T&&(P-=T),P=Math.min(Math.max(P,-50),50),P/=50,P/Math.abs(P)+Math.round(14*P))}shouldForceSelection(w){return h.isMac?w.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:w.shiftKey}handleMouseDown(w){if(this._mouseDownTimeStamp=w.timeStamp,(w.button!==2||!this.hasSelection)&&w.button===0){if(!this._enabled){if(!this.shouldForceSelection(w))return;w.stopPropagation()}w.preventDefault(),this._dragScrollAmount=0,this._enabled&&w.shiftKey?this._handleIncrementalClick(w):w.detail===1?this._handleSingleClick(w):w.detail===2?this._handleDoubleClick(w):w.detail===3&&this._handleTripleClick(w),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(w){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(w))}_handleSingleClick(w){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(w)?3:0,this._model.selectionStart=this._getMouseBufferCoords(w),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const P=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);P&&P.length!==this._model.selectionStart[0]&&P.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(w){this._selectWordAtCursor(w,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(w){const P=this._getMouseBufferCoords(w);P&&(this._activeSelectionMode=2,this._selectLineAt(P[1]))}shouldColumnSelect(w){return w.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(w){if(w.stopImmediatePropagation(),!this._model.selectionStart)return;const P=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(w),!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(w),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const T=this._bufferService.buffer;if(this._model.selectionEnd[1]<T.lines.length){const M=T.lines.get(this._model.selectionEnd[1]);M&&M.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}P&&P[0]===this._model.selectionEnd[0]&&P[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 w=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(w.ydisp+this._bufferService.rows,w.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=w.ydisp),this.refresh()}}_handleMouseUp(w){const P=w.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&P<500&&w.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const T=this._mouseService.getCoords(w,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(T&&T[0]!==void 0&&T[1]!==void 0){const M=(0,v.moveToCellSequence)(T[0]-1,T[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(M,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const w=this._model.finalSelectionStart,P=this._model.finalSelectionEnd,T=!(!w||!P||w[0]===P[0]&&w[1]===P[1]);T?w&&P&&(this._oldSelectionStart&&this._oldSelectionEnd&&w[0]===this._oldSelectionStart[0]&&w[1]===this._oldSelectionStart[1]&&P[0]===this._oldSelectionEnd[0]&&P[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(w,P,T)):this._oldHasSelection&&this._fireOnSelectionChange(w,P,T)}_fireOnSelectionChange(w,P,T){this._oldSelectionStart=w,this._oldSelectionEnd=P,this._oldHasSelection=T,this._onSelectionChange.fire()}_handleBufferActivate(w){this.clearSelection(),this._trimListener.dispose(),this._trimListener=w.activeBuffer.lines.onTrim(P=>this._handleTrim(P))}_convertViewportColToCharacterIndex(w,P){let T=P;for(let M=0;P>=M;M++){const j=w.loadCell(M,this._workCell).getChars().length;this._workCell.getWidth()===0?T--:j>1&&P!==M&&(T+=j-1)}return T}setSelection(w,P,T){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[w,P],this._model.selectionStartLength=T,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(w){this._isClickInSelection(w)||(this._selectWordAtCursor(w,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(w,P,T=!0,M=!0){if(w[0]>=this._bufferService.cols)return;const j=this._bufferService.buffer,N=j.lines.get(w[1]);if(!N)return;const F=j.translateBufferLineToString(w[1],!1);let V=this._convertViewportColToCharacterIndex(N,w[0]),K=V;const q=w[0]-V;let B=0,R=0,L=0,I=0;if(F.charAt(V)===" "){for(;V>0&&F.charAt(V-1)===" ";)V--;for(;K<F.length&&F.charAt(K+1)===" ";)K++}else{let H=w[0],U=w[0];N.getWidth(H)===0&&(B++,H--),N.getWidth(U)===2&&(R++,U++);const G=N.getString(U).length;for(G>1&&(I+=G-1,K+=G-1);H>0&&V>0&&!this._isCharWordSeparator(N.loadCell(H-1,this._workCell));){N.loadCell(H-1,this._workCell);const O=this._workCell.getChars().length;this._workCell.getWidth()===0?(B++,H--):O>1&&(L+=O-1,V-=O-1),V--,H--}for(;U<N.length&&K+1<F.length&&!this._isCharWordSeparator(N.loadCell(U+1,this._workCell));){N.loadCell(U+1,this._workCell);const O=this._workCell.getChars().length;this._workCell.getWidth()===2?(R++,U++):O>1&&(I+=O-1,K+=O-1),K++,U++}}K++;let D=V+q-B+L,W=Math.min(this._bufferService.cols,K-V+B+R-L-I);if(P||F.slice(V,K).trim()!==""){if(T&&D===0&&N.getCodePoint(0)!==32){const H=j.lines.get(w[1]-1);if(H&&N.isWrapped&&H.getCodePoint(this._bufferService.cols-1)!==32){const U=this._getWordAt([this._bufferService.cols-1,w[1]-1],!1,!0,!1);if(U){const G=this._bufferService.cols-U.start;D-=G,W+=G}}}if(M&&D+W===this._bufferService.cols&&N.getCodePoint(this._bufferService.cols-1)!==32){const H=j.lines.get(w[1]+1);if(H!=null&&H.isWrapped&&H.getCodePoint(0)!==32){const U=this._getWordAt([0,w[1]+1],!1,!1,!0);U&&(W+=U.length)}}return{start:D,length:W}}}_selectWordAt(w,P){const T=this._getWordAt(w,P);if(T){for(;T.start<0;)T.start+=this._bufferService.cols,w[1]--;this._model.selectionStart=[T.start,w[1]],this._model.selectionStartLength=T.length}}_selectToWordAt(w){const P=this._getWordAt(w,!0);if(P){let T=w[1];for(;P.start<0;)P.start+=this._bufferService.cols,T--;if(!this._model.areSelectionValuesReversed())for(;P.start+P.length>this._bufferService.cols;)P.length-=this._bufferService.cols,T++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?P.start:P.start+P.length,T]}}_isCharWordSeparator(w){return w.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(w.getChars())>=0}_selectLineAt(w){const P=this._bufferService.buffer.getWrappedRangeForLine(w),T={start:{x:0,y:P.first},end:{x:this._bufferService.cols-1,y:P.last}};this._model.selectionStart=[0,P.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,l.getRangeLength)(T,this._bufferService.cols)}};i.SelectionService=C=d([m(3,_.IBufferService),m(4,_.ICoreService),m(5,S.IMouseService),m(6,_.IOptionsService),m(7,S.IRenderService),m(8,S.ICoreBrowserService)],C)},4725:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ILinkProviderService=i.IThemeService=i.ICharacterJoinerService=i.ISelectionService=i.IRenderService=i.IMouseService=i.ICoreBrowserService=i.ICharSizeService=void 0;const d=a(8343);i.ICharSizeService=(0,d.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),i.IMouseService=(0,d.createDecorator)("MouseService"),i.IRenderService=(0,d.createDecorator)("RenderService"),i.ISelectionService=(0,d.createDecorator)("SelectionService"),i.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),i.IThemeService=(0,d.createDecorator)("ThemeService"),i.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(c,i,a){var d=this&&this.__decorate||function(C,w,P,T){var M,j=arguments.length,N=j<3?w:T===null?T=Object.getOwnPropertyDescriptor(w,P):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(C,w,P,T);else for(var F=C.length-1;F>=0;F--)(M=C[F])&&(N=(j<3?M(N):j>3?M(w,P,N):M(w,P))||N);return j>3&&N&&Object.defineProperty(w,P,N),N},m=this&&this.__param||function(C,w){return function(P,T){w(P,T,C)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const u=a(7239),v=a(8055),y=a(8460),S=a(844),g=a(2585),p=v.css.toColor("#ffffff"),h=v.css.toColor("#000000"),l=v.css.toColor("#ffffff"),f=v.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const C=[v.css.toColor("#2e3436"),v.css.toColor("#cc0000"),v.css.toColor("#4e9a06"),v.css.toColor("#c4a000"),v.css.toColor("#3465a4"),v.css.toColor("#75507b"),v.css.toColor("#06989a"),v.css.toColor("#d3d7cf"),v.css.toColor("#555753"),v.css.toColor("#ef2929"),v.css.toColor("#8ae234"),v.css.toColor("#fce94f"),v.css.toColor("#729fcf"),v.css.toColor("#ad7fa8"),v.css.toColor("#34e2e2"),v.css.toColor("#eeeeec")],w=[0,95,135,175,215,255];for(let P=0;P<216;P++){const T=w[P/36%6|0],M=w[P/6%6|0],j=w[P%6];C.push({css:v.channels.toCss(T,M,j),rgba:v.channels.toRgba(T,M,j)})}for(let P=0;P<24;P++){const T=8+10*P;C.push({css:v.channels.toCss(T,T,T),rgba:v.channels.toRgba(T,T,T)})}return C})());let E=i.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(C){super(),this._optionsService=C,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:p,background:h,cursor:l,cursorAccent:f,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:v.color.blend(h,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:v.color.blend(h,_),ansi:i.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(C={}){const w=this._colors;if(w.foreground=k(C.foreground,p),w.background=k(C.background,h),w.cursor=k(C.cursor,l),w.cursorAccent=k(C.cursorAccent,f),w.selectionBackgroundTransparent=k(C.selectionBackground,_),w.selectionBackgroundOpaque=v.color.blend(w.background,w.selectionBackgroundTransparent),w.selectionInactiveBackgroundTransparent=k(C.selectionInactiveBackground,w.selectionBackgroundTransparent),w.selectionInactiveBackgroundOpaque=v.color.blend(w.background,w.selectionInactiveBackgroundTransparent),w.selectionForeground=C.selectionForeground?k(C.selectionForeground,v.NULL_COLOR):void 0,w.selectionForeground===v.NULL_COLOR&&(w.selectionForeground=void 0),v.color.isOpaque(w.selectionBackgroundTransparent)&&(w.selectionBackgroundTransparent=v.color.opacity(w.selectionBackgroundTransparent,.3)),v.color.isOpaque(w.selectionInactiveBackgroundTransparent)&&(w.selectionInactiveBackgroundTransparent=v.color.opacity(w.selectionInactiveBackgroundTransparent,.3)),w.ansi=i.DEFAULT_ANSI_COLORS.slice(),w.ansi[0]=k(C.black,i.DEFAULT_ANSI_COLORS[0]),w.ansi[1]=k(C.red,i.DEFAULT_ANSI_COLORS[1]),w.ansi[2]=k(C.green,i.DEFAULT_ANSI_COLORS[2]),w.ansi[3]=k(C.yellow,i.DEFAULT_ANSI_COLORS[3]),w.ansi[4]=k(C.blue,i.DEFAULT_ANSI_COLORS[4]),w.ansi[5]=k(C.magenta,i.DEFAULT_ANSI_COLORS[5]),w.ansi[6]=k(C.cyan,i.DEFAULT_ANSI_COLORS[6]),w.ansi[7]=k(C.white,i.DEFAULT_ANSI_COLORS[7]),w.ansi[8]=k(C.brightBlack,i.DEFAULT_ANSI_COLORS[8]),w.ansi[9]=k(C.brightRed,i.DEFAULT_ANSI_COLORS[9]),w.ansi[10]=k(C.brightGreen,i.DEFAULT_ANSI_COLORS[10]),w.ansi[11]=k(C.brightYellow,i.DEFAULT_ANSI_COLORS[11]),w.ansi[12]=k(C.brightBlue,i.DEFAULT_ANSI_COLORS[12]),w.ansi[13]=k(C.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),w.ansi[14]=k(C.brightCyan,i.DEFAULT_ANSI_COLORS[14]),w.ansi[15]=k(C.brightWhite,i.DEFAULT_ANSI_COLORS[15]),C.extendedAnsi){const P=Math.min(w.ansi.length-16,C.extendedAnsi.length);for(let T=0;T<P;T++)w.ansi[T+16]=k(C.extendedAnsi[T],i.DEFAULT_ANSI_COLORS[T+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(C){this._restoreColor(C),this._onChangeColors.fire(this.colors)}_restoreColor(C){if(C!==void 0)switch(C){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[C]=this._restoreColors.ansi[C]}else for(let w=0;w<this._restoreColors.ansi.length;++w)this._colors.ansi[w]=this._restoreColors.ansi[w]}modifyColors(C){C(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 k(C,w){if(C!==void 0)try{return v.css.toColor(C)}catch{}return w}i.ThemeService=E=d([m(0,g.IOptionsService)],E)},6349:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;const d=a(8460),m=a(844);class u extends m.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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(y){if(this._maxLength===y)return;const S=new Array(y);for(let g=0;g<Math.min(y,this.length);g++)S[g]=this._array[this._getCyclicIndex(g)];this._array=S,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let S=this._length;S<y;S++)this._array[S]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,S){this._array[this._getCyclicIndex(y)]=S}push(y){this._array[this._getCyclicIndex(this._length)]=y,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(y,S,...g){if(S){for(let p=y;p<this._length-S;p++)this._array[this._getCyclicIndex(p)]=this._array[this._getCyclicIndex(p+S)];this._length-=S,this.onDeleteEmitter.fire({index:y,amount:S})}for(let p=this._length-1;p>=y;p--)this._array[this._getCyclicIndex(p+g.length)]=this._array[this._getCyclicIndex(p)];for(let p=0;p<g.length;p++)this._array[this._getCyclicIndex(y+p)]=g[p];if(g.length&&this.onInsertEmitter.fire({index:y,amount:g.length}),this._length+g.length>this._maxLength){const p=this._length+g.length-this._maxLength;this._startIndex+=p,this._length=this._maxLength,this.onTrimEmitter.fire(p)}else this._length+=g.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,S,g){if(!(S<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+g<0)throw new Error("Cannot shift elements in list beyond index 0");if(g>0){for(let h=S-1;h>=0;h--)this.set(y+h+g,this.get(y+h));const p=y+S+g-this._length;if(p>0)for(this._length+=p;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let p=0;p<S;p++)this.set(y+p+g,this.get(y+p))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}i.CircularList=u},1439:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function a(d,m=5){if(typeof d!="object")return d;const u=Array.isArray(d)?[]:{};for(const v in d)u[v]=m<=1?d[v]:d[v]&&a(d[v],m-1);return u}},8055:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let a=0,d=0,m=0,u=0;var v,y,S,g,p;function h(f){const _=f.toString(16);return _.length<2?"0"+_:_}function l(f,_){return f<_?(_+.05)/(f+.05):(f+.05)/(_+.05)}i.NULL_COLOR={css:"#00000000",rgba:0},function(f){f.toCss=function(_,E,k,C){return C!==void 0?`#${h(_)}${h(E)}${h(k)}${h(C)}`:`#${h(_)}${h(E)}${h(k)}`},f.toRgba=function(_,E,k,C=255){return(_<<24|E<<16|k<<8|C)>>>0},f.toColor=function(_,E,k,C){return{css:f.toCss(_,E,k,C),rgba:f.toRgba(_,E,k,C)}}}(v||(i.channels=v={})),function(f){function _(E,k){return u=Math.round(255*k),[a,d,m]=p.toChannels(E.rgba),{css:v.toCss(a,d,m,u),rgba:v.toRgba(a,d,m,u)}}f.blend=function(E,k){if(u=(255&k.rgba)/255,u===1)return{css:k.css,rgba:k.rgba};const C=k.rgba>>24&255,w=k.rgba>>16&255,P=k.rgba>>8&255,T=E.rgba>>24&255,M=E.rgba>>16&255,j=E.rgba>>8&255;return a=T+Math.round((C-T)*u),d=M+Math.round((w-M)*u),m=j+Math.round((P-j)*u),{css:v.toCss(a,d,m),rgba:v.toRgba(a,d,m)}},f.isOpaque=function(E){return(255&E.rgba)==255},f.ensureContrastRatio=function(E,k,C){const w=p.ensureContrastRatio(E.rgba,k.rgba,C);if(w)return v.toColor(w>>24&255,w>>16&255,w>>8&255)},f.opaque=function(E){const k=(255|E.rgba)>>>0;return[a,d,m]=p.toChannels(k),{css:v.toCss(a,d,m),rgba:k}},f.opacity=_,f.multiplyOpacity=function(E,k){return u=255&E.rgba,_(E,u*k/255)},f.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}}(y||(i.color=y={})),function(f){let _,E;try{const k=document.createElement("canvas");k.width=1,k.height=1;const C=k.getContext("2d",{willReadFrequently:!0});C&&(_=C,_.globalCompositeOperation="copy",E=_.createLinearGradient(0,0,1,1))}catch{}f.toColor=function(k){if(k.match(/#[\da-f]{3,8}/i))switch(k.length){case 4:return a=parseInt(k.slice(1,2).repeat(2),16),d=parseInt(k.slice(2,3).repeat(2),16),m=parseInt(k.slice(3,4).repeat(2),16),v.toColor(a,d,m);case 5:return a=parseInt(k.slice(1,2).repeat(2),16),d=parseInt(k.slice(2,3).repeat(2),16),m=parseInt(k.slice(3,4).repeat(2),16),u=parseInt(k.slice(4,5).repeat(2),16),v.toColor(a,d,m,u);case 7:return{css:k,rgba:(parseInt(k.slice(1),16)<<8|255)>>>0};case 9:return{css:k,rgba:parseInt(k.slice(1),16)>>>0}}const C=k.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(C)return a=parseInt(C[1]),d=parseInt(C[2]),m=parseInt(C[3]),u=Math.round(255*(C[5]===void 0?1:parseFloat(C[5]))),v.toColor(a,d,m,u);if(!_||!E)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=E,_.fillStyle=k,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[a,d,m,u]=_.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:v.toRgba(a,d,m,u),css:k}}}(S||(i.css=S={})),function(f){function _(E,k,C){const w=E/255,P=k/255,T=C/255;return .2126*(w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4))+.7152*(P<=.03928?P/12.92:Math.pow((P+.055)/1.055,2.4))+.0722*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))}f.relativeLuminance=function(E){return _(E>>16&255,E>>8&255,255&E)},f.relativeLuminance2=_}(g||(i.rgb=g={})),function(f){function _(k,C,w){const P=k>>24&255,T=k>>16&255,M=k>>8&255;let j=C>>24&255,N=C>>16&255,F=C>>8&255,V=l(g.relativeLuminance2(j,N,F),g.relativeLuminance2(P,T,M));for(;V<w&&(j>0||N>0||F>0);)j-=Math.max(0,Math.ceil(.1*j)),N-=Math.max(0,Math.ceil(.1*N)),F-=Math.max(0,Math.ceil(.1*F)),V=l(g.relativeLuminance2(j,N,F),g.relativeLuminance2(P,T,M));return(j<<24|N<<16|F<<8|255)>>>0}function E(k,C,w){const P=k>>24&255,T=k>>16&255,M=k>>8&255;let j=C>>24&255,N=C>>16&255,F=C>>8&255,V=l(g.relativeLuminance2(j,N,F),g.relativeLuminance2(P,T,M));for(;V<w&&(j<255||N<255||F<255);)j=Math.min(255,j+Math.ceil(.1*(255-j))),N=Math.min(255,N+Math.ceil(.1*(255-N))),F=Math.min(255,F+Math.ceil(.1*(255-F))),V=l(g.relativeLuminance2(j,N,F),g.relativeLuminance2(P,T,M));return(j<<24|N<<16|F<<8|255)>>>0}f.blend=function(k,C){if(u=(255&C)/255,u===1)return C;const w=C>>24&255,P=C>>16&255,T=C>>8&255,M=k>>24&255,j=k>>16&255,N=k>>8&255;return a=M+Math.round((w-M)*u),d=j+Math.round((P-j)*u),m=N+Math.round((T-N)*u),v.toRgba(a,d,m)},f.ensureContrastRatio=function(k,C,w){const P=g.relativeLuminance(k>>8),T=g.relativeLuminance(C>>8);if(l(P,T)<w){if(T<P){const N=_(k,C,w),F=l(P,g.relativeLuminance(N>>8));if(F<w){const V=E(k,C,w);return F>l(P,g.relativeLuminance(V>>8))?N:V}return N}const M=E(k,C,w),j=l(P,g.relativeLuminance(M>>8));if(j<w){const N=_(k,C,w);return j>l(P,g.relativeLuminance(N>>8))?M:N}return M}},f.reduceLuminance=_,f.increaseLuminance=E,f.toChannels=function(k){return[k>>24&255,k>>16&255,k>>8&255,255&k]}}(p||(i.rgba=p={})),i.toPaddedHex=h,i.contrastRatio=l},8969:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreTerminal=void 0;const d=a(844),m=a(2585),u=a(4348),v=a(7866),y=a(744),S=a(7302),g=a(6975),p=a(8460),h=a(1753),l=a(1480),f=a(7994),_=a(9282),E=a(5435),k=a(5981),C=a(2660);let w=!1;class P extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new p.EventEmitter),this._onScroll.event(M=>{var j;(j=this._onScrollApi)==null||j.fire(M.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(M){for(const j in M)this.optionsService.options[j]=M[j]}constructor(M){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new p.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new p.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new p.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new p.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new S.OptionsService(M)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(v.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(g.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(l.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(f.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(C.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new E.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,p.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,p.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,p.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,p.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(j=>{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(j=>{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 k.WriteBuffer((j,N)=>this._inputHandler.parse(j,N))),this.register((0,p.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(M,j){this._writeBuffer.write(M,j)}writeSync(M,j){this._logService.logLevel<=m.LogLevelEnum.WARN&&!w&&(this._logService.warn("writeSync is unreliable and will be removed soon."),w=!0),this._writeBuffer.writeSync(M,j)}input(M,j=!0){this.coreService.triggerDataEvent(M,j)}resize(M,j){isNaN(M)||isNaN(j)||(M=Math.max(M,y.MINIMUM_COLS),j=Math.max(j,y.MINIMUM_ROWS),this._bufferService.resize(M,j))}scroll(M,j=!1){this._bufferService.scroll(M,j)}scrollLines(M,j,N){this._bufferService.scrollLines(M,j,N)}scrollPages(M){this.scrollLines(M*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(M){const j=M-this._bufferService.buffer.ydisp;j!==0&&this.scrollLines(j)}registerEscHandler(M,j){return this._inputHandler.registerEscHandler(M,j)}registerDcsHandler(M,j){return this._inputHandler.registerDcsHandler(M,j)}registerCsiHandler(M,j){return this._inputHandler.registerCsiHandler(M,j)}registerOscHandler(M,j){return this._inputHandler.registerOscHandler(M,j)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let M=!1;const j=this.optionsService.rawOptions.windowsPty;j&&j.buildNumber!==void 0&&j.buildNumber!==void 0?M=j.backend==="conpty"&&j.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(M=!0),M?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const M=[];M.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),M.push(this.registerCsiHandler({final:"H"},()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)(()=>{for(const j of M)j.dispose()})}}}i.CoreTerminal=P},8460:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===a)return void this._listeners.splice(d,1)}}})),this._event}fire(a,d){const m=[];for(let u=0;u<this._listeners.length;u++)m.push(this._listeners[u]);for(let u=0;u<m.length;u++)m[u].call(void 0,a,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},i.forwardEvent=function(a,d){return a(m=>d.fire(m))},i.runAndSubscribe=function(a,d){return d(void 0),a(m=>d(m))}},5435:function(c,i,a){var d=this&&this.__decorate||function(B,R,L,I){var D,W=arguments.length,H=W<3?R:I===null?I=Object.getOwnPropertyDescriptor(R,L):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(B,R,L,I);else for(var U=B.length-1;U>=0;U--)(D=B[U])&&(H=(W<3?D(H):W>3?D(R,L,H):D(R,L))||H);return W>3&&H&&Object.defineProperty(R,L,H),H},m=this&&this.__param||function(B,R){return function(L,I){R(L,I,B)}};Object.defineProperty(i,"__esModule",{value:!0}),i.InputHandler=i.WindowsOptionsReportType=void 0;const u=a(2584),v=a(7116),y=a(2015),S=a(844),g=a(482),p=a(8437),h=a(8460),l=a(643),f=a(511),_=a(3734),E=a(2585),k=a(1480),C=a(6242),w=a(6351),P=a(5941),T={"(":0,")":1,"*":2,"+":3,"-":1,".":2},M=131072;function j(B,R){if(B>24)return R.setWinLines||!1;switch(B){case 1:return!!R.restoreWin;case 2:return!!R.minimizeWin;case 3:return!!R.setWinPosition;case 4:return!!R.setWinSizePixels;case 5:return!!R.raiseWin;case 6:return!!R.lowerWin;case 7:return!!R.refreshWin;case 8:return!!R.setWinSizeChars;case 9:return!!R.maximizeWin;case 10:return!!R.fullscreenWin;case 11:return!!R.getWinState;case 13:return!!R.getWinPosition;case 14:return!!R.getWinSizePixels;case 15:return!!R.getScreenSizePixels;case 16:return!!R.getCellSizePixels;case 18:return!!R.getWinSizeChars;case 19:return!!R.getScreenSizeChars;case 20:return!!R.getIconTitle;case 21:return!!R.getWinTitle;case 22:return!!R.pushTitle;case 23:return!!R.popTitle;case 24:return!!R.setWinLines}return!1}var N;(function(B){B[B.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",B[B.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(N||(i.WindowsOptionsReportType=N={}));let F=0;class V extends S.Disposable{getAttrData(){return this._curAttrData}constructor(R,L,I,D,W,H,U,G,O=new y.EscapeSequenceParser){super(),this._bufferService=R,this._charsetService=L,this._coreService=I,this._logService=D,this._optionsService=W,this._oscLinkService=H,this._coreMouseService=U,this._unicodeService=G,this._parser=O,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new g.StringToUtf32,this._utf8Decoder=new g.Utf8ToUtf32,this._workCell=new f.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=p.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=p.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.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 K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(A=>this._activeBuffer=A.activeBuffer)),this._parser.setCsiHandlerFallback((A,z)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(A),params:z.toArray()})}),this._parser.setEscHandlerFallback(A=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(A)})}),this._parser.setExecuteHandlerFallback(A=>{this._logService.debug("Unknown EXECUTE code: ",{code:A})}),this._parser.setOscHandlerFallback((A,z,$)=>{this._logService.debug("Unknown OSC code: ",{identifier:A,action:z,data:$})}),this._parser.setDcsHandlerFallback((A,z,$)=>{z==="HOOK"&&($=$.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(A),action:z,payload:$})}),this._parser.setPrintHandler((A,z,$)=>this.print(A,z,$)),this._parser.registerCsiHandler({final:"@"},A=>this.insertChars(A)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},A=>this.scrollLeft(A)),this._parser.registerCsiHandler({final:"A"},A=>this.cursorUp(A)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},A=>this.scrollRight(A)),this._parser.registerCsiHandler({final:"B"},A=>this.cursorDown(A)),this._parser.registerCsiHandler({final:"C"},A=>this.cursorForward(A)),this._parser.registerCsiHandler({final:"D"},A=>this.cursorBackward(A)),this._parser.registerCsiHandler({final:"E"},A=>this.cursorNextLine(A)),this._parser.registerCsiHandler({final:"F"},A=>this.cursorPrecedingLine(A)),this._parser.registerCsiHandler({final:"G"},A=>this.cursorCharAbsolute(A)),this._parser.registerCsiHandler({final:"H"},A=>this.cursorPosition(A)),this._parser.registerCsiHandler({final:"I"},A=>this.cursorForwardTab(A)),this._parser.registerCsiHandler({final:"J"},A=>this.eraseInDisplay(A,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},A=>this.eraseInDisplay(A,!0)),this._parser.registerCsiHandler({final:"K"},A=>this.eraseInLine(A,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},A=>this.eraseInLine(A,!0)),this._parser.registerCsiHandler({final:"L"},A=>this.insertLines(A)),this._parser.registerCsiHandler({final:"M"},A=>this.deleteLines(A)),this._parser.registerCsiHandler({final:"P"},A=>this.deleteChars(A)),this._parser.registerCsiHandler({final:"S"},A=>this.scrollUp(A)),this._parser.registerCsiHandler({final:"T"},A=>this.scrollDown(A)),this._parser.registerCsiHandler({final:"X"},A=>this.eraseChars(A)),this._parser.registerCsiHandler({final:"Z"},A=>this.cursorBackwardTab(A)),this._parser.registerCsiHandler({final:"`"},A=>this.charPosAbsolute(A)),this._parser.registerCsiHandler({final:"a"},A=>this.hPositionRelative(A)),this._parser.registerCsiHandler({final:"b"},A=>this.repeatPrecedingCharacter(A)),this._parser.registerCsiHandler({final:"c"},A=>this.sendDeviceAttributesPrimary(A)),this._parser.registerCsiHandler({prefix:">",final:"c"},A=>this.sendDeviceAttributesSecondary(A)),this._parser.registerCsiHandler({final:"d"},A=>this.linePosAbsolute(A)),this._parser.registerCsiHandler({final:"e"},A=>this.vPositionRelative(A)),this._parser.registerCsiHandler({final:"f"},A=>this.hVPosition(A)),this._parser.registerCsiHandler({final:"g"},A=>this.tabClear(A)),this._parser.registerCsiHandler({final:"h"},A=>this.setMode(A)),this._parser.registerCsiHandler({prefix:"?",final:"h"},A=>this.setModePrivate(A)),this._parser.registerCsiHandler({final:"l"},A=>this.resetMode(A)),this._parser.registerCsiHandler({prefix:"?",final:"l"},A=>this.resetModePrivate(A)),this._parser.registerCsiHandler({final:"m"},A=>this.charAttributes(A)),this._parser.registerCsiHandler({final:"n"},A=>this.deviceStatus(A)),this._parser.registerCsiHandler({prefix:"?",final:"n"},A=>this.deviceStatusPrivate(A)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},A=>this.softReset(A)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},A=>this.setCursorStyle(A)),this._parser.registerCsiHandler({final:"r"},A=>this.setScrollRegion(A)),this._parser.registerCsiHandler({final:"s"},A=>this.saveCursor(A)),this._parser.registerCsiHandler({final:"t"},A=>this.windowOptions(A)),this._parser.registerCsiHandler({final:"u"},A=>this.restoreCursor(A)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},A=>this.insertColumns(A)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},A=>this.deleteColumns(A)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},A=>this.selectProtected(A)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},A=>this.requestMode(A,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},A=>this.requestMode(A,!1)),this._parser.setExecuteHandler(u.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(u.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(u.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(u.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(u.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(u.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(u.C1.IND,()=>this.index()),this._parser.setExecuteHandler(u.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(u.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new C.OscHandler(A=>(this.setTitle(A),this.setIconName(A),!0))),this._parser.registerOscHandler(1,new C.OscHandler(A=>this.setIconName(A))),this._parser.registerOscHandler(2,new C.OscHandler(A=>this.setTitle(A))),this._parser.registerOscHandler(4,new C.OscHandler(A=>this.setOrReportIndexedColor(A))),this._parser.registerOscHandler(8,new C.OscHandler(A=>this.setHyperlink(A))),this._parser.registerOscHandler(10,new C.OscHandler(A=>this.setOrReportFgColor(A))),this._parser.registerOscHandler(11,new C.OscHandler(A=>this.setOrReportBgColor(A))),this._parser.registerOscHandler(12,new C.OscHandler(A=>this.setOrReportCursorColor(A))),this._parser.registerOscHandler(104,new C.OscHandler(A=>this.restoreIndexedColor(A))),this._parser.registerOscHandler(110,new C.OscHandler(A=>this.restoreFgColor(A))),this._parser.registerOscHandler(111,new C.OscHandler(A=>this.restoreBgColor(A))),this._parser.registerOscHandler(112,new C.OscHandler(A=>this.restoreCursorColor(A))),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 A in v.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:A},()=>this.selectCharset("("+A)),this._parser.registerEscHandler({intermediates:")",final:A},()=>this.selectCharset(")"+A)),this._parser.registerEscHandler({intermediates:"*",final:A},()=>this.selectCharset("*"+A)),this._parser.registerEscHandler({intermediates:"+",final:A},()=>this.selectCharset("+"+A)),this._parser.registerEscHandler({intermediates:"-",final:A},()=>this.selectCharset("-"+A)),this._parser.registerEscHandler({intermediates:".",final:A},()=>this.selectCharset("."+A)),this._parser.registerEscHandler({intermediates:"/",final:A},()=>this.selectCharset("/"+A));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(A=>(this._logService.error("Parsing error: ",A),A)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new w.DcsHandler((A,z)=>this.requestStatusString(A,z)))}_preserveStack(R,L,I,D){this._parseStack.paused=!0,this._parseStack.cursorStartX=R,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=I,this._parseStack.position=D}_logSlowResolvingAsync(R){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([R,new Promise((L,I)=>setTimeout(()=>I("#SLOW_TIMEOUT"),5e3))]).catch(L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(R,L){let I,D=this._activeBuffer.x,W=this._activeBuffer.y,H=0;const U=this._parseStack.paused;if(U){if(I=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(I),I;D=this._parseStack.cursorStartX,W=this._parseStack.cursorStartY,this._parseStack.paused=!1,R.length>M&&(H=this._parseStack.position+M)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof R=="string"?` "${R}"`:` "${Array.prototype.map.call(R,A=>String.fromCharCode(A)).join("")}"`),typeof R=="string"?R.split("").map(A=>A.charCodeAt(0)):R),this._parseBuffer.length<R.length&&this._parseBuffer.length<M&&(this._parseBuffer=new Uint32Array(Math.min(R.length,M))),U||this._dirtyRowTracker.clearRange(),R.length>M)for(let A=H;A<R.length;A+=M){const z=A+M<R.length?A+M:R.length,$=typeof R=="string"?this._stringDecoder.decode(R.substring(A,z),this._parseBuffer):this._utf8Decoder.decode(R.subarray(A,z),this._parseBuffer);if(I=this._parser.parse(this._parseBuffer,$))return this._preserveStack(D,W,$,A),this._logSlowResolvingAsync(I),I}else if(!U){const A=typeof R=="string"?this._stringDecoder.decode(R,this._parseBuffer):this._utf8Decoder.decode(R,this._parseBuffer);if(I=this._parser.parse(this._parseBuffer,A))return this._preserveStack(D,W,A,0),this._logSlowResolvingAsync(I),I}this._activeBuffer.x===D&&this._activeBuffer.y===W||this._onCursorMove.fire();const G=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),O=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);O<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(O,this._bufferService.rows-1),Math.min(G,this._bufferService.rows-1))}print(R,L,I){let D,W;const H=this._charsetService.charset,U=this._optionsService.rawOptions.screenReaderMode,G=this._bufferService.cols,O=this._coreService.decPrivateModes.wraparound,A=this._coreService.modes.insertMode,z=this._curAttrData;let $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&I-L>0&&$.getWidth(this._activeBuffer.x-1)===2&&$.setCellFromCodepoint(this._activeBuffer.x-1,0,1,z);let Y=this._parser.precedingJoinState;for(let X=L;X<I;++X){if(D=R[X],D<127&&H){const Ce=H[String.fromCharCode(D)];Ce&&(D=Ce.charCodeAt(0))}const ne=this._unicodeService.charProperties(D,Y);W=k.UnicodeService.extractWidth(ne);const oe=k.UnicodeService.extractShouldJoin(ne),he=oe?k.UnicodeService.extractWidth(Y):0;if(Y=ne,U&&this._onA11yChar.fire((0,g.stringFromCodePoint)(D)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+W-he>G){if(O){const Ce=$;let se=this._activeBuffer.x-he;for(this._activeBuffer.x=he,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),$=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),he>0&&$ instanceof p.BufferLine&&$.copyCellsFrom(Ce,se,0,he,!1);se<G;)Ce.setCellFromCodepoint(se++,0,1,z)}else if(this._activeBuffer.x=G-1,W===2)continue}if(oe&&this._activeBuffer.x){const Ce=$.getWidth(this._activeBuffer.x-1)?1:2;$.addCodepointToCell(this._activeBuffer.x-Ce,D,W);for(let se=W-he;--se>=0;)$.setCellFromCodepoint(this._activeBuffer.x++,0,0,z)}else if(A&&($.insertCells(this._activeBuffer.x,W-he,this._activeBuffer.getNullCell(z)),$.getWidth(G-1)===2&&$.setCellFromCodepoint(G-1,l.NULL_CELL_CODE,l.NULL_CELL_WIDTH,z)),$.setCellFromCodepoint(this._activeBuffer.x++,D,W,z),W>0)for(;--W;)$.setCellFromCodepoint(this._activeBuffer.x++,0,0,z)}this._parser.precedingJoinState=Y,this._activeBuffer.x<G&&I-L>0&&$.getWidth(this._activeBuffer.x)===0&&!$.hasContent(this._activeBuffer.x)&&$.setCellFromCodepoint(this._activeBuffer.x,0,1,z),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(R,L){return R.final!=="t"||R.prefix||R.intermediates?this._parser.registerCsiHandler(R,L):this._parser.registerCsiHandler(R,I=>!j(I.params[0],this._optionsService.rawOptions.windowOptions)||L(I))}registerDcsHandler(R,L){return this._parser.registerDcsHandler(R,new w.DcsHandler(L))}registerEscHandler(R,L){return this._parser.registerEscHandler(R,L)}registerOscHandler(R,L){return this._parser.registerOscHandler(R,new C.OscHandler(L))}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(){var R;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&&((R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&R.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const R=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-R),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(R=this._bufferService.cols-1){this._activeBuffer.x=Math.min(R,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(R,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=R,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=R,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(R,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+R,this._activeBuffer.y+L)}cursorUp(R){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,R.params[0]||1)):this._moveCursor(0,-(R.params[0]||1)),!0}cursorDown(R){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,R.params[0]||1)):this._moveCursor(0,R.params[0]||1),!0}cursorForward(R){return this._moveCursor(R.params[0]||1,0),!0}cursorBackward(R){return this._moveCursor(-(R.params[0]||1),0),!0}cursorNextLine(R){return this.cursorDown(R),this._activeBuffer.x=0,!0}cursorPrecedingLine(R){return this.cursorUp(R),this._activeBuffer.x=0,!0}cursorCharAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(R){return this._setCursor(R.length>=2?(R.params[1]||1)-1:0,(R.params[0]||1)-1),!0}charPosAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(R){return this._moveCursor(R.params[0]||1,0),!0}linePosAbsolute(R){return this._setCursor(this._activeBuffer.x,(R.params[0]||1)-1),!0}vPositionRelative(R){return this._moveCursor(0,R.params[0]||1),!0}hVPosition(R){return this.cursorPosition(R),!0}tabClear(R){const L=R.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=R.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=R.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(R){const L=R.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(R,L,I,D=!1,W=!1){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);H.replaceCells(L,I,this._activeBuffer.getNullCell(this._eraseAttrData()),W),D&&(H.isWrapped=!1)}_resetBufferLine(R,L=!1){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);I&&(I.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+R),I.isWrapped=!1)}eraseInDisplay(R,L=!1){let I;switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:for(I=this._activeBuffer.y,this._dirtyRowTracker.markDirty(I),this._eraseInBufferLine(I++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);I<this._bufferService.rows;I++)this._resetBufferLine(I,L);this._dirtyRowTracker.markDirty(I);break;case 1:for(I=this._activeBuffer.y,this._dirtyRowTracker.markDirty(I),this._eraseInBufferLine(I,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(I+1).isWrapped=!1);I--;)this._resetBufferLine(I,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(I=this._bufferService.rows,this._dirtyRowTracker.markDirty(I-1);I--;)this._resetBufferLine(I,L);this._dirtyRowTracker.markDirty(0);break;case 3:const D=this._activeBuffer.lines.length-this._bufferService.rows;D>0&&(this._activeBuffer.lines.trimStart(D),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-D,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-D,0),this._onScroll.fire(0))}return!0}eraseInLine(R,L=!1){switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(R){this._restrictCursor();let L=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const I=this._activeBuffer.ybase+this._activeBuffer.y,D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,W=this._bufferService.rows-1+this._activeBuffer.ybase-D+1;for(;L--;)this._activeBuffer.lines.splice(W-1,1),this._activeBuffer.lines.splice(I,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(R){this._restrictCursor();let L=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const I=this._activeBuffer.ybase+this._activeBuffer.y;let D;for(D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,D=this._bufferService.rows-1+this._activeBuffer.ybase-D;L--;)this._activeBuffer.lines.splice(I,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(R){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(R){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(R){let L=R.params[0]||1;for(;L--;)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(R){let L=R.params[0]||1;for(;L--;)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(p.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=R.params[0]||1;for(let I=this._activeBuffer.scrollTop;I<=this._activeBuffer.scrollBottom;++I){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);D.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=R.params[0]||1;for(let I=this._activeBuffer.scrollTop;I<=this._activeBuffer.scrollBottom;++I){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);D.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=R.params[0]||1;for(let I=this._activeBuffer.scrollTop;I<=this._activeBuffer.scrollBottom;++I){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);D.insertCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=R.params[0]||1;for(let I=this._activeBuffer.scrollTop;I<=this._activeBuffer.scrollBottom;++I){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);D.deleteCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(R){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(R.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(R){const L=this._parser.precedingJoinState;if(!L)return!0;const I=R.params[0]||1,D=k.UnicodeService.extractWidth(L),W=this._activeBuffer.x-D,H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(W),U=new Uint32Array(H.length*I);let G=0;for(let A=0;A<H.length;){const z=H.codePointAt(A)||0;U[G++]=z,A+=z>65535?2:1}let O=G;for(let A=1;A<I;++A)U.copyWithin(O,0,G),O+=G;return this.print(U,0,O),!0}sendDeviceAttributesPrimary(R){return R.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(R){return R.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(R.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(R){return(this._optionsService.rawOptions.termName+"").indexOf(R)===0}setMode(R){for(let L=0;L<R.length;L++)switch(R.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(R){for(let L=0;L<R.length;L++)switch(R.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,v.DEFAULT_CHARSET),this._charsetService.setgCharset(1,v.DEFAULT_CHARSET),this._charsetService.setgCharset(2,v.DEFAULT_CHARSET),this._charsetService.setgCharset(3,v.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(R){for(let L=0;L<R.length;L++)switch(R.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(R){for(let L=0;L<R.length;L++)switch(R.params[L]){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(),R.params[L]===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(R,L){const I=this._coreService.decPrivateModes,{activeProtocol:D,activeEncoding:W}=this._coreMouseService,H=this._coreService,{buffers:U,cols:G}=this._bufferService,{active:O,alt:A}=U,z=this._optionsService.rawOptions,$=oe=>oe?1:2,Y=R.params[0];return X=Y,ne=L?Y===2?4:Y===4?$(H.modes.insertMode):Y===12?3:Y===20?$(z.convertEol):0:Y===1?$(I.applicationCursorKeys):Y===3?z.windowOptions.setWinLines?G===80?2:G===132?1:0:0:Y===6?$(I.origin):Y===7?$(I.wraparound):Y===8?3:Y===9?$(D==="X10"):Y===12?$(z.cursorBlink):Y===25?$(!H.isCursorHidden):Y===45?$(I.reverseWraparound):Y===66?$(I.applicationKeypad):Y===67?4:Y===1e3?$(D==="VT200"):Y===1002?$(D==="DRAG"):Y===1003?$(D==="ANY"):Y===1004?$(I.sendFocus):Y===1005?4:Y===1006?$(W==="SGR"):Y===1015?4:Y===1016?$(W==="SGR_PIXELS"):Y===1048?1:Y===47||Y===1047||Y===1049?$(O===A):Y===2004?$(I.bracketedPasteMode):0,H.triggerDataEvent(`${u.C0.ESC}[${L?"":"?"}${X};${ne}$y`),!0;var X,ne}_updateAttrColor(R,L,I,D,W){return L===2?(R|=50331648,R&=-16777216,R|=_.AttributeData.fromColorRGB([I,D,W])):L===5&&(R&=-50331904,R|=33554432|255&I),R}_extractColor(R,L,I){const D=[0,0,-1,0,0,0];let W=0,H=0;do{if(D[H+W]=R.params[L+H],R.hasSubParams(L+H)){const U=R.getSubParams(L+H);let G=0;do D[1]===5&&(W=1),D[H+G+1+W]=U[G];while(++G<U.length&&G+H+1+W<D.length);break}if(D[1]===5&&H+W>=2||D[1]===2&&H+W>=5)break;D[1]&&(W=1)}while(++H+L<R.length&&H+W<D.length);for(let U=2;U<D.length;++U)D[U]===-1&&(D[U]=0);switch(D[0]){case 38:I.fg=this._updateAttrColor(I.fg,D[1],D[3],D[4],D[5]);break;case 48:I.bg=this._updateAttrColor(I.bg,D[1],D[3],D[4],D[5]);break;case 58:I.extended=I.extended.clone(),I.extended.underlineColor=this._updateAttrColor(I.extended.underlineColor,D[1],D[3],D[4],D[5])}return H}_processUnderline(R,L){L.extended=L.extended.clone(),(!~R||R>5)&&(R=1),L.extended.underlineStyle=R,L.fg|=268435456,R===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(R){R.fg=p.DEFAULT_ATTR_DATA.fg,R.bg=p.DEFAULT_ATTR_DATA.bg,R.extended=R.extended.clone(),R.extended.underlineStyle=0,R.extended.underlineColor&=-67108864,R.updateExtended()}charAttributes(R){if(R.length===1&&R.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=R.length;let I;const D=this._curAttrData;for(let W=0;W<L;W++)I=R.params[W],I>=30&&I<=37?(D.fg&=-50331904,D.fg|=16777216|I-30):I>=40&&I<=47?(D.bg&=-50331904,D.bg|=16777216|I-40):I>=90&&I<=97?(D.fg&=-50331904,D.fg|=16777224|I-90):I>=100&&I<=107?(D.bg&=-50331904,D.bg|=16777224|I-100):I===0?this._processSGR0(D):I===1?D.fg|=134217728:I===3?D.bg|=67108864:I===4?(D.fg|=268435456,this._processUnderline(R.hasSubParams(W)?R.getSubParams(W)[0]:1,D)):I===5?D.fg|=536870912:I===7?D.fg|=67108864:I===8?D.fg|=1073741824:I===9?D.fg|=2147483648:I===2?D.bg|=134217728:I===21?this._processUnderline(2,D):I===22?(D.fg&=-134217729,D.bg&=-134217729):I===23?D.bg&=-67108865:I===24?(D.fg&=-268435457,this._processUnderline(0,D)):I===25?D.fg&=-536870913:I===27?D.fg&=-67108865:I===28?D.fg&=-1073741825:I===29?D.fg&=2147483647:I===39?(D.fg&=-67108864,D.fg|=16777215&p.DEFAULT_ATTR_DATA.fg):I===49?(D.bg&=-67108864,D.bg|=16777215&p.DEFAULT_ATTR_DATA.bg):I===38||I===48||I===58?W+=this._extractColor(R,W,D):I===53?D.bg|=1073741824:I===55?D.bg&=-1073741825:I===59?(D.extended=D.extended.clone(),D.extended.underlineColor=-1,D.updateExtended()):I===100?(D.fg&=-67108864,D.fg|=16777215&p.DEFAULT_ATTR_DATA.fg,D.bg&=-67108864,D.bg|=16777215&p.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",I);return!0}deviceStatus(R){switch(R.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,I=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${L};${I}R`)}return!0}deviceStatusPrivate(R){if(R.params[0]===6){const L=this._activeBuffer.y+1,I=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${L};${I}R`)}return!0}softReset(R){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=p.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(R){const L=R.params[0]||1;switch(L){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 I=L%2==1;return this._optionsService.options.cursorBlink=I,!0}setScrollRegion(R){const L=R.params[0]||1;let I;return(R.length<2||(I=R.params[1])>this._bufferService.rows||I===0)&&(I=this._bufferService.rows),I>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=I-1,this._setCursor(0,0)),!0}windowOptions(R){if(!j(R.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=R.length>1?R.params[1]:0;switch(R.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(N.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(N.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(R){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(R){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(R){return this._windowTitle=R,this._onTitleChange.fire(R),!0}setIconName(R){return this._iconName=R,!0}setOrReportIndexedColor(R){const L=[],I=R.split(";");for(;I.length>1;){const D=I.shift(),W=I.shift();if(/^\d+$/.exec(D)){const H=parseInt(D);if(q(H))if(W==="?")L.push({type:0,index:H});else{const U=(0,P.parseColor)(W);U&&L.push({type:1,index:H,color:U})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(R){const L=R.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(R,L){this._getCurrentLinkId()&&this._finishHyperlink();const I=R.split(":");let D;const W=I.findIndex(H=>H.startsWith("id="));return W!==-1&&(D=I[W].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:D,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(R,L){const I=R.split(";");for(let D=0;D<I.length&&!(L>=this._specialColors.length);++D,++L)if(I[D]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const W=(0,P.parseColor)(I[D]);W&&this._onColor.fire([{type:1,index:this._specialColors[L],color:W}])}return!0}setOrReportFgColor(R){return this._setOrReportSpecialColor(R,0)}setOrReportBgColor(R){return this._setOrReportSpecialColor(R,1)}setOrReportCursorColor(R){return this._setOrReportSpecialColor(R,2)}restoreIndexedColor(R){if(!R)return this._onColor.fire([{type:2}]),!0;const L=[],I=R.split(";");for(let D=0;D<I.length;++D)if(/^\d+$/.exec(I[D])){const W=parseInt(I[D]);q(W)&&L.push({type:2,index:W})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(R){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(R){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(R){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,v.DEFAULT_CHARSET),!0}selectCharset(R){return R.length!==2?(this.selectDefaultCharset(),!0):(R[0]==="/"||this._charsetService.setgCharset(T[R[0]],v.CHARSETS[R[1]]||v.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 R=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,R,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=p.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=p.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(R){return this._charsetService.setgLevel(R),!0}screenAlignmentPattern(){const R=new f.CellData;R.content=4194373,R.fg=this._curAttrData.fg,R.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const I=this._activeBuffer.ybase+this._activeBuffer.y+L,D=this._activeBuffer.lines.get(I);D&&(D.fill(R),D.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(R,L){const I=this._bufferService.buffer,D=this._optionsService.rawOptions;return(W=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${W}${u.C0.ESC}\\`),!0))(R==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:R==='"p'?'P1$r61;1"p':R==="r"?`P1$r${I.scrollTop+1};${I.scrollBottom+1}r`:R==="m"?"P1$r0m":R===" q"?`P1$r${{block:2,underline:4,bar:6}[D.cursorStyle]-(D.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(R,L){this._dirtyRowTracker.markRangeDirty(R,L)}}i.InputHandler=V;let K=class{constructor(B){this._bufferService=B,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(B){B<this.start?this.start=B:B>this.end&&(this.end=B)}markRangeDirty(B,R){B>R&&(F=B,B=R,R=F),B<this.start&&(this.start=B),R>this.end&&(this.end=R)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function q(B){return 0<=B&&B<256}K=d([m(0,E.IBufferService)],K)},844:(c,i)=>{function a(d){for(const m of d)m.dispose();d.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const m=this._disposables.indexOf(d);m!==-1&&this._disposables.splice(m,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var m;this._isDisposed||d===this._value||((m=this._value)==null||m.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},i.toDisposable=function(d){return{dispose:d}},i.disposeArray=a,i.getDisposeArrayDisposable=function(d){return{dispose:()=>a(d)}}},1505:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(m,u,v){this._data[m]||(this._data[m]={}),this._data[m][u]=v}get(m,u){return this._data[m]?this._data[m][u]:void 0}clear(){this._data={}}}i.TwoKeyMap=a,i.FourKeyMap=class{constructor(){this._data=new a}set(d,m,u,v,y){this._data.get(d,m)||this._data.set(d,m,new a),this._data.get(d,m).set(u,v,y)}get(d,m,u,v){var y;return(y=this._data.get(d,m))==null?void 0:y.get(u,v)}clear(){this._data.clear()}}},6114:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.isChromeOS=i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.getSafariVersion=i.isSafari=i.isLegacyEdge=i.isFirefox=i.isNode=void 0,i.isNode=typeof process<"u"&&"title"in process;const a=i.isNode?"node":navigator.userAgent,d=i.isNode?"node":navigator.platform;i.isFirefox=a.includes("Firefox"),i.isLegacyEdge=a.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(a),i.getSafariVersion=function(){if(!i.isSafari)return 0;const m=a.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),i.isIpad=d==="iPad",i.isIphone=d==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),i.isLinux=d.indexOf("Linux")>=0,i.isChromeOS=/\bCrOS\b/.test(a)},6106:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SortedList=void 0;let a=0;i.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(a=this._search(this._getKey(d)),this._array.splice(a,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const m=this._getKey(d);if(m===void 0||(a=this._search(m),a===-1)||this._getKey(this._array[a])!==m)return!1;do if(this._array[a]===d)return this._array.splice(a,1),!0;while(++a<this._array.length&&this._getKey(this._array[a])===m);return!1}*getKeyIterator(d){if(this._array.length!==0&&(a=this._search(d),!(a<0||a>=this._array.length)&&this._getKey(this._array[a])===d))do yield this._array[a];while(++a<this._array.length&&this._getKey(this._array[a])===d)}forEachByKey(d,m){if(this._array.length!==0&&(a=this._search(d),!(a<0||a>=this._array.length)&&this._getKey(this._array[a])===d))do m(this._array[a]);while(++a<this._array.length&&this._getKey(this._array[a])===d)}values(){return[...this._array].values()}_search(d){let m=0,u=this._array.length-1;for(;u>=m;){let v=m+u>>1;const y=this._getKey(this._array[v]);if(y>d)u=v-1;else{if(!(y<d)){for(;v>0&&this._getKey(this._array[v-1])===d;)v--;return v}m=v+1}}return m}}},7226:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;const d=a(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),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(y){this._idleCallback=void 0;let S=0,g=0,p=y.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(S=Date.now(),this._tasks[this._i]()||this._i++,S=Math.max(1,Date.now()-S),g=Math.max(S,g),h=y.timeRemaining(),1.5*g>h)return p-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(p-S))}ms`),void this._start();p=h}this.clear()}}class u extends m{_requestCallback(y){return setTimeout(()=>y(this._createDeadline(16)))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const S=Date.now()+y;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}i.PriorityTaskQueue=u,i.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(v){return requestIdleCallback(v)}_cancelCallback(v){cancelIdleCallback(v)}}:u,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(v){this._queue.clear(),this._queue.enqueue(v)}flush(){this._queue.flush()}}},9282:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;const d=a(643);i.updateWindowsModeWrappedState=function(m){const u=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),v=u==null?void 0:u.get(m.cols-1),y=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);y&&v&&(y.isWrapped=v[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&v[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new a;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}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}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}i.AttributeData=a;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,v=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=v}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=d},9092:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Buffer=i.MAX_BUFFER_SIZE=void 0;const d=a(6349),m=a(7226),u=a(3734),v=a(8437),y=a(4634),S=a(511),g=a(643),p=a(4863),h=a(7116);i.MAX_BUFFER_SIZE=4294967295,i.Buffer=class{constructor(l,f,_){this._hasScrollback=l,this._optionsService=f,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=v.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,g.WHITESPACE_CELL_CHAR,g.WHITESPACE_CELL_WIDTH,g.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(l){return l?(this._nullCell.fg=l.fg,this._nullCell.bg=l.bg,this._nullCell.extended=l.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(l){return l?(this._whitespaceCell.fg=l.fg,this._whitespaceCell.bg=l.bg,this._whitespaceCell.extended=l.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(l,f){return new v.BufferLine(this._bufferService.cols,this.getNullCell(l),f)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const l=this.ybase+this.y-this.ydisp;return l>=0&&l<this._rows}_getCorrectBufferLength(l){if(!this._hasScrollback)return l;const f=l+this._optionsService.rawOptions.scrollback;return f>i.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:f}fillViewportRows(l){if(this.lines.length===0){l===void 0&&(l=v.DEFAULT_ATTR_DATA);let f=this._rows;for(;f--;)this.lines.push(this.getBlankLine(l))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(l,f){const _=this.getNullCell(v.DEFAULT_ATTR_DATA);let E=0;const k=this._getCorrectBufferLength(f);if(k>this.lines.maxLength&&(this.lines.maxLength=k),this.lines.length>0){if(this._cols<l)for(let w=0;w<this.lines.length;w++)E+=+this.lines.get(w).resize(l,_);let C=0;if(this._rows<f)for(let w=this._rows;w<f;w++)this.lines.length<f+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new v.BufferLine(l,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+C+1?(this.ybase--,C++,this.ydisp>0&&this.ydisp--):this.lines.push(new v.BufferLine(l,_)));else for(let w=this._rows;w>f;w--)this.lines.length>f+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(k<this.lines.maxLength){const w=this.lines.length-k;w>0&&(this.lines.trimStart(w),this.ybase=Math.max(this.ybase-w,0),this.ydisp=Math.max(this.ydisp-w,0),this.savedY=Math.max(this.savedY-w,0)),this.lines.maxLength=k}this.x=Math.min(this.x,l-1),this.y=Math.min(this.y,f-1),C&&(this.y+=C),this.savedX=Math.min(this.savedX,l-1),this.scrollTop=0}if(this.scrollBottom=f-1,this._isReflowEnabled&&(this._reflow(l,f),this._cols>l))for(let C=0;C<this.lines.length;C++)E+=+this.lines.get(C).resize(l,_);this._cols=l,this._rows=f,this._memoryCleanupQueue.clear(),E>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let l=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,l=!1);let f=0;for(;this._memoryCleanupPosition<this.lines.length;)if(f+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),f>100)return!0;return l}get _isReflowEnabled(){const l=this._optionsService.rawOptions.windowsPty;return l&&l.buildNumber?this._hasScrollback&&l.backend==="conpty"&&l.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(l,f){this._cols!==l&&(l>this._cols?this._reflowLarger(l,f):this._reflowSmaller(l,f))}_reflowLarger(l,f){const _=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,l,this.ybase+this.y,this.getNullCell(v.DEFAULT_ATTR_DATA));if(_.length>0){const E=(0,y.reflowLargerCreateNewLayout)(this.lines,_);(0,y.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(l,f,E.countRemoved)}}_reflowLargerAdjustViewport(l,f,_){const E=this.getNullCell(v.DEFAULT_ATTR_DATA);let k=_;for(;k-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<f&&this.lines.push(new v.BufferLine(l,E))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(l,f){const _=this.getNullCell(v.DEFAULT_ATTR_DATA),E=[];let k=0;for(let C=this.lines.length-1;C>=0;C--){let w=this.lines.get(C);if(!w||!w.isWrapped&&w.getTrimmedLength()<=l)continue;const P=[w];for(;w.isWrapped&&C>0;)w=this.lines.get(--C),P.unshift(w);const T=this.ybase+this.y;if(T>=C&&T<C+P.length)continue;const M=P[P.length-1].getTrimmedLength(),j=(0,y.reflowSmallerGetNewLineLengths)(P,this._cols,l),N=j.length-P.length;let F;F=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+N):Math.max(0,this.lines.length-this.lines.maxLength+N);const V=[];for(let I=0;I<N;I++){const D=this.getBlankLine(v.DEFAULT_ATTR_DATA,!0);V.push(D)}V.length>0&&(E.push({start:C+P.length+k,newLines:V}),k+=V.length),P.push(...V);let K=j.length-1,q=j[K];q===0&&(K--,q=j[K]);let B=P.length-N-1,R=M;for(;B>=0;){const I=Math.min(R,q);if(P[K]===void 0)break;if(P[K].copyCellsFrom(P[B],R-I,q-I,I,!0),q-=I,q===0&&(K--,q=j[K]),R-=I,R===0){B--;const D=Math.max(B,0);R=(0,y.getWrappedLineTrimmedLength)(P,D,this._cols)}}for(let I=0;I<P.length;I++)j[I]<l&&P[I].setCell(j[I],_);let L=N-F;for(;L-- >0;)this.ybase===0?this.y<f-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+k)-f&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+N,this.ybase+f-1)}if(E.length>0){const C=[],w=[];for(let K=0;K<this.lines.length;K++)w.push(this.lines.get(K));const P=this.lines.length;let T=P-1,M=0,j=E[M];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+k);let N=0;for(let K=Math.min(this.lines.maxLength-1,P+k-1);K>=0;K--)if(j&&j.start>T+N){for(let q=j.newLines.length-1;q>=0;q--)this.lines.set(K--,j.newLines[q]);K++,C.push({index:T+1,amount:j.newLines.length}),N+=j.newLines.length,j=E[++M]}else this.lines.set(K,w[T--]);let F=0;for(let K=C.length-1;K>=0;K--)C[K].index+=F,this.lines.onInsertEmitter.fire(C[K]),F+=C[K].amount;const V=Math.max(0,P+k-this.lines.maxLength);V>0&&this.lines.onTrimEmitter.fire(V)}}translateBufferLineToString(l,f,_=0,E){const k=this.lines.get(l);return k?k.translateToString(f,_,E):""}getWrappedRangeForLine(l){let f=l,_=l;for(;f>0&&this.lines.get(f).isWrapped;)f--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:f,last:_}}setupTabStops(l){for(l!=null?this.tabs[l]||(l=this.prevStop(l)):(this.tabs={},l=0);l<this._cols;l+=this._optionsService.rawOptions.tabStopWidth)this.tabs[l]=!0}prevStop(l){for(l==null&&(l=this.x);!this.tabs[--l]&&l>0;);return l>=this._cols?this._cols-1:l<0?0:l}nextStop(l){for(l==null&&(l=this.x);!this.tabs[++l]&&l<this._cols;);return l>=this._cols?this._cols-1:l<0?0:l}clearMarkers(l){this._isClearing=!0;for(let f=0;f<this.markers.length;f++)this.markers[f].line===l&&(this.markers[f].dispose(),this.markers.splice(f--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].dispose(),this.markers.splice(l--,1);this._isClearing=!1}addMarker(l){const f=new p.Marker(l);return this.markers.push(f),f.register(this.lines.onTrim(_=>{f.line-=_,f.line<0&&f.dispose()})),f.register(this.lines.onInsert(_=>{f.line>=_.index&&(f.line+=_.amount)})),f.register(this.lines.onDelete(_=>{f.line>=_.index&&f.line<_.index+_.amount&&f.dispose(),f.line>_.index&&(f.line-=_.amount)})),f.register(f.onDispose(()=>this._removeMarker(f))),f}_removeMarker(l){this._isClearing||this.markers.splice(this.markers.indexOf(l),1)}}},8437:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLine=i.DEFAULT_ATTR_DATA=void 0;const d=a(3734),m=a(511),u=a(643),v=a(482);i.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let y=0;class S{constructor(p,h,l=!1){this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*p);const f=h||m.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let _=0;_<p;++_)this.setCell(_,f);this.length=p}get(p){const h=this._data[3*p+0],l=2097151&h;return[this._data[3*p+1],2097152&h?this._combined[p]:l?(0,v.stringFromCodePoint)(l):"",h>>22,2097152&h?this._combined[p].charCodeAt(this._combined[p].length-1):l]}set(p,h){this._data[3*p+1]=h[u.CHAR_DATA_ATTR_INDEX],h[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[p]=h[1],this._data[3*p+0]=2097152|p|h[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*p+0]=h[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(p){return this._data[3*p+0]>>22}hasWidth(p){return 12582912&this._data[3*p+0]}getFg(p){return this._data[3*p+1]}getBg(p){return this._data[3*p+2]}hasContent(p){return 4194303&this._data[3*p+0]}getCodePoint(p){const h=this._data[3*p+0];return 2097152&h?this._combined[p].charCodeAt(this._combined[p].length-1):2097151&h}isCombined(p){return 2097152&this._data[3*p+0]}getString(p){const h=this._data[3*p+0];return 2097152&h?this._combined[p]:2097151&h?(0,v.stringFromCodePoint)(2097151&h):""}isProtected(p){return 536870912&this._data[3*p+2]}loadCell(p,h){return y=3*p,h.content=this._data[y+0],h.fg=this._data[y+1],h.bg=this._data[y+2],2097152&h.content&&(h.combinedData=this._combined[p]),268435456&h.bg&&(h.extended=this._extendedAttrs[p]),h}setCell(p,h){2097152&h.content&&(this._combined[p]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[p]=h.extended),this._data[3*p+0]=h.content,this._data[3*p+1]=h.fg,this._data[3*p+2]=h.bg}setCellFromCodepoint(p,h,l,f){268435456&f.bg&&(this._extendedAttrs[p]=f.extended),this._data[3*p+0]=h|l<<22,this._data[3*p+1]=f.fg,this._data[3*p+2]=f.bg}addCodepointToCell(p,h,l){let f=this._data[3*p+0];2097152&f?this._combined[p]+=(0,v.stringFromCodePoint)(h):2097151&f?(this._combined[p]=(0,v.stringFromCodePoint)(2097151&f)+(0,v.stringFromCodePoint)(h),f&=-2097152,f|=2097152):f=h|4194304,l&&(f&=-12582913,f|=l<<22),this._data[3*p+0]=f}insertCells(p,h,l){if((p%=this.length)&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p-1,0,1,l),h<this.length-p){const f=new m.CellData;for(let _=this.length-p-h-1;_>=0;--_)this.setCell(p+h+_,this.loadCell(p+_,f));for(let _=0;_<h;++_)this.setCell(p+_,l)}else for(let f=p;f<this.length;++f)this.setCell(f,l);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,l)}deleteCells(p,h,l){if(p%=this.length,h<this.length-p){const f=new m.CellData;for(let _=0;_<this.length-p-h;++_)this.setCell(p+_,this.loadCell(p+h+_,f));for(let _=this.length-h;_<this.length;++_)this.setCell(_,l)}else for(let f=p;f<this.length;++f)this.setCell(f,l);p&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p-1,0,1,l),this.getWidth(p)!==0||this.hasContent(p)||this.setCellFromCodepoint(p,0,1,l)}replaceCells(p,h,l,f=!1){if(f)for(p&&this.getWidth(p-1)===2&&!this.isProtected(p-1)&&this.setCellFromCodepoint(p-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,l);p<h&&p<this.length;)this.isProtected(p)||this.setCell(p,l),p++;else for(p&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,l);p<h&&p<this.length;)this.setCell(p++,l)}resize(p,h){if(p===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const l=3*p;if(p>this.length){if(this._data.buffer.byteLength>=4*l)this._data=new Uint32Array(this._data.buffer,0,l);else{const f=new Uint32Array(l);f.set(this._data),this._data=f}for(let f=this.length;f<p;++f)this.setCell(f,h)}else{this._data=this._data.subarray(0,l);const f=Object.keys(this._combined);for(let E=0;E<f.length;E++){const k=parseInt(f[E],10);k>=p&&delete this._combined[k]}const _=Object.keys(this._extendedAttrs);for(let E=0;E<_.length;E++){const k=parseInt(_[E],10);k>=p&&delete this._extendedAttrs[k]}}return this.length=p,4*l*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const p=new Uint32Array(this._data.length);return p.set(this._data),this._data=p,1}return 0}fill(p,h=!1){if(h)for(let l=0;l<this.length;++l)this.isProtected(l)||this.setCell(l,p);else{this._combined={},this._extendedAttrs={};for(let l=0;l<this.length;++l)this.setCell(l,p)}}copyFrom(p){this.length!==p.length?this._data=new Uint32Array(p._data):this._data.set(p._data),this.length=p.length,this._combined={};for(const h in p._combined)this._combined[h]=p._combined[h];this._extendedAttrs={};for(const h in p._extendedAttrs)this._extendedAttrs[h]=p._extendedAttrs[h];this.isWrapped=p.isWrapped}clone(){const p=new S(0);p._data=new Uint32Array(this._data),p.length=this.length;for(const h in this._combined)p._combined[h]=this._combined[h];for(const h in this._extendedAttrs)p._extendedAttrs[h]=this._extendedAttrs[h];return p.isWrapped=this.isWrapped,p}getTrimmedLength(){for(let p=this.length-1;p>=0;--p)if(4194303&this._data[3*p+0])return p+(this._data[3*p+0]>>22);return 0}getNoBgTrimmedLength(){for(let p=this.length-1;p>=0;--p)if(4194303&this._data[3*p+0]||50331648&this._data[3*p+2])return p+(this._data[3*p+0]>>22);return 0}copyCellsFrom(p,h,l,f,_){const E=p._data;if(_)for(let C=f-1;C>=0;C--){for(let w=0;w<3;w++)this._data[3*(l+C)+w]=E[3*(h+C)+w];268435456&E[3*(h+C)+2]&&(this._extendedAttrs[l+C]=p._extendedAttrs[h+C])}else for(let C=0;C<f;C++){for(let w=0;w<3;w++)this._data[3*(l+C)+w]=E[3*(h+C)+w];268435456&E[3*(h+C)+2]&&(this._extendedAttrs[l+C]=p._extendedAttrs[h+C])}const k=Object.keys(p._combined);for(let C=0;C<k.length;C++){const w=parseInt(k[C],10);w>=h&&(this._combined[w-h+l]=p._combined[w])}}translateToString(p,h,l,f){h=h??0,l=l??this.length,p&&(l=Math.min(l,this.getTrimmedLength())),f&&(f.length=0);let _="";for(;h<l;){const E=this._data[3*h+0],k=2097151&E,C=2097152&E?this._combined[h]:k?(0,v.stringFromCodePoint)(k):u.WHITESPACE_CELL_CHAR;if(_+=C,f)for(let w=0;w<C.length;++w)f.push(h);h+=E>>22||1}return f&&f.push(h),_}}i.BufferLine=S},4841:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(a,d){if(a.start.y>a.end.y)throw new Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);return d*(a.end.y-a.start.y)+(a.end.x-a.start.x+1)}},4634:(c,i)=>{function a(d,m,u){if(m===d.length-1)return d[m].getTrimmedLength();const v=!d[m].hasContent(u-1)&&d[m].getWidth(u-1)===1,y=d[m+1].getWidth(0)===2;return v&&y?u-1:u}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(d,m,u,v,y){const S=[];for(let g=0;g<d.length-1;g++){let p=g,h=d.get(++p);if(!h.isWrapped)continue;const l=[d.get(g)];for(;p<d.length&&h.isWrapped;)l.push(h),h=d.get(++p);if(v>=g&&v<p){g+=l.length-1;continue}let f=0,_=a(l,f,m),E=1,k=0;for(;E<l.length;){const w=a(l,E,m),P=w-k,T=u-_,M=Math.min(P,T);l[f].copyCellsFrom(l[E],k,_,M,!1),_+=M,_===u&&(f++,_=0),k+=M,k===w&&(E++,k=0),_===0&&f!==0&&l[f-1].getWidth(u-1)===2&&(l[f].copyCellsFrom(l[f-1],u-1,_++,1,!1),l[f-1].setCell(u-1,y))}l[f].replaceCells(_,u,y);let C=0;for(let w=l.length-1;w>0&&(w>f||l[w].getTrimmedLength()===0);w--)C++;C>0&&(S.push(g+l.length-C),S.push(C)),g+=l.length-1}return S},i.reflowLargerCreateNewLayout=function(d,m){const u=[];let v=0,y=m[v],S=0;for(let g=0;g<d.length;g++)if(y===g){const p=m[++v];d.onDeleteEmitter.fire({index:g-S,amount:p}),g+=p-1,S+=p,y=m[++v]}else u.push(g);return{layout:u,countRemoved:S}},i.reflowLargerApplyNewLayout=function(d,m){const u=[];for(let v=0;v<m.length;v++)u.push(d.get(m[v]));for(let v=0;v<u.length;v++)d.set(v,u[v]);d.length=m.length},i.reflowSmallerGetNewLineLengths=function(d,m,u){const v=[],y=d.map((h,l)=>a(d,l,m)).reduce((h,l)=>h+l);let S=0,g=0,p=0;for(;p<y;){if(y-p<u){v.push(y-p);break}S+=u;const h=a(d,g,m);S>h&&(S-=h,g++);const l=d[g].getWidth(S-1)===2;l&&S--;const f=l?u-1:u;v.push(f),p+=f}return v},i.getWrappedLineTrimmedLength=a},5295:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;const d=a(8460),m=a(844),u=a(9092);class v extends m.Disposable{constructor(S,g){super(),this._optionsService=S,this._bufferService=g,this._onBufferActivate=this.register(new d.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 u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.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(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),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(S,g){this._normal.resize(S,g),this._alt.resize(S,g),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}i.BufferSet=v},511:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;const d=a(482),m=a(643),u=a(3734);class v extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const g=new v;return g.setFromCharData(S),g}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let g=!1;if(S[m.CHAR_DATA_CHAR_INDEX].length>2)g=!0;else if(S[m.CHAR_DATA_CHAR_INDEX].length===2){const p=S[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=p&&p<=56319){const h=S[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(p-55296)+h-56320+65536|S[m.CHAR_DATA_WIDTH_INDEX]<<22:g=!0}else g=!0}else this.content=S[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[m.CHAR_DATA_WIDTH_INDEX]<<22;g&&(this.combinedData=S[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=v},643:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WHITESPACE_CELL_CODE=i.WHITESPACE_CELL_WIDTH=i.WHITESPACE_CELL_CHAR=i.NULL_CELL_CODE=i.NULL_CELL_WIDTH=i.NULL_CELL_CHAR=i.CHAR_DATA_CODE_INDEX=i.CHAR_DATA_WIDTH_INDEX=i.CHAR_DATA_CHAR_INDEX=i.CHAR_DATA_ATTR_INDEX=i.DEFAULT_EXT=i.DEFAULT_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=0,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,i.DEFAULT_EXT=0,i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.NULL_CELL_CHAR="",i.NULL_CELL_WIDTH=1,i.NULL_CELL_CODE=0,i.WHITESPACE_CELL_CHAR=" ",i.WHITESPACE_CELL_WIDTH=1,i.WHITESPACE_CELL_CODE=32},4863:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Marker=void 0;const d=a(8460),m=a(844);class u{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}i.Marker=u,u._nextId=1},7116:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CHARSET=i.CHARSETS=void 0,i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.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:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=void 0,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(c,i)=>{var a,d,m;Object.defineProperty(i,"__esModule",{value:!0}),i.C1_ESCAPED=i.C1=i.C0=void 0,function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
|
|
278
|
+
`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""}(a||(i.C0=a={})),function(u){u.PAD="",u.HOP="",u.BPH="",u.NBH="",u.IND="",u.NEL="
",u.SSA="",u.ESA="",u.HTS="",u.HTJ="",u.VTS="",u.PLD="",u.PLU="",u.RI="",u.SS2="",u.SS3="",u.DCS="",u.PU1="",u.PU2="",u.STS="",u.CCH="",u.MW="",u.SPA="",u.EPA="",u.SOS="",u.SGCI="",u.SCI="",u.CSI="",u.ST="",u.OSC="",u.PM="",u.APC=""}(d||(i.C1=d={})),function(u){u.ST=`${a.ESC}\\`}(m||(i.C1_ESCAPED=m={}))},7399:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;const d=a(2584),m={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:["'",'"']};i.evaluateKeyboardEvent=function(u,v,y,S){const g={type:0,cancel:!1,key:void 0},p=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?g.key=v?d.C0.ESC+"OA":d.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?g.key=v?d.C0.ESC+"OD":d.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?g.key=v?d.C0.ESC+"OC":d.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(g.key=v?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:g.key=u.ctrlKey?"\b":d.C0.DEL,u.altKey&&(g.key=d.C0.ESC+g.key);break;case 9:if(u.shiftKey){g.key=d.C0.ESC+"[Z";break}g.key=d.C0.HT,g.cancel=!0;break;case 13:g.key=u.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,g.cancel=!0;break;case 27:g.key=d.C0.ESC,u.altKey&&(g.key=d.C0.ESC+d.C0.ESC),g.cancel=!0;break;case 37:if(u.metaKey)break;p?(g.key=d.C0.ESC+"[1;"+(p+1)+"D",g.key===d.C0.ESC+"[1;3D"&&(g.key=d.C0.ESC+(y?"b":"[1;5D"))):g.key=v?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(u.metaKey)break;p?(g.key=d.C0.ESC+"[1;"+(p+1)+"C",g.key===d.C0.ESC+"[1;3C"&&(g.key=d.C0.ESC+(y?"f":"[1;5C"))):g.key=v?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(u.metaKey)break;p?(g.key=d.C0.ESC+"[1;"+(p+1)+"A",y||g.key!==d.C0.ESC+"[1;3A"||(g.key=d.C0.ESC+"[1;5A")):g.key=v?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(u.metaKey)break;p?(g.key=d.C0.ESC+"[1;"+(p+1)+"B",y||g.key!==d.C0.ESC+"[1;3B"||(g.key=d.C0.ESC+"[1;5B")):g.key=v?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(g.key=d.C0.ESC+"[2~");break;case 46:g.key=p?d.C0.ESC+"[3;"+(p+1)+"~":d.C0.ESC+"[3~";break;case 36:g.key=p?d.C0.ESC+"[1;"+(p+1)+"H":v?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:g.key=p?d.C0.ESC+"[1;"+(p+1)+"F":v?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:u.shiftKey?g.type=2:u.ctrlKey?g.key=d.C0.ESC+"[5;"+(p+1)+"~":g.key=d.C0.ESC+"[5~";break;case 34:u.shiftKey?g.type=3:u.ctrlKey?g.key=d.C0.ESC+"[6;"+(p+1)+"~":g.key=d.C0.ESC+"[6~";break;case 112:g.key=p?d.C0.ESC+"[1;"+(p+1)+"P":d.C0.ESC+"OP";break;case 113:g.key=p?d.C0.ESC+"[1;"+(p+1)+"Q":d.C0.ESC+"OQ";break;case 114:g.key=p?d.C0.ESC+"[1;"+(p+1)+"R":d.C0.ESC+"OR";break;case 115:g.key=p?d.C0.ESC+"[1;"+(p+1)+"S":d.C0.ESC+"OS";break;case 116:g.key=p?d.C0.ESC+"[15;"+(p+1)+"~":d.C0.ESC+"[15~";break;case 117:g.key=p?d.C0.ESC+"[17;"+(p+1)+"~":d.C0.ESC+"[17~";break;case 118:g.key=p?d.C0.ESC+"[18;"+(p+1)+"~":d.C0.ESC+"[18~";break;case 119:g.key=p?d.C0.ESC+"[19;"+(p+1)+"~":d.C0.ESC+"[19~";break;case 120:g.key=p?d.C0.ESC+"[20;"+(p+1)+"~":d.C0.ESC+"[20~";break;case 121:g.key=p?d.C0.ESC+"[21;"+(p+1)+"~":d.C0.ESC+"[21~";break;case 122:g.key=p?d.C0.ESC+"[23;"+(p+1)+"~":d.C0.ESC+"[23~";break;case 123:g.key=p?d.C0.ESC+"[24;"+(p+1)+"~":d.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(y&&!S||!u.altKey||u.metaKey)!y||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?g.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(g.key=d.C0.US),u.key==="@"&&(g.key=d.C0.NUL)):u.keyCode===65&&(g.type=1);else{const h=m[u.keyCode],l=h==null?void 0:h[u.shiftKey?1:0];if(l)g.key=d.C0.ESC+l;else if(u.keyCode>=65&&u.keyCode<=90){const f=u.ctrlKey?u.keyCode-64:u.keyCode+32;let _=String.fromCharCode(f);u.shiftKey&&(_=_.toUpperCase()),g.key=d.C0.ESC+_}else if(u.keyCode===32)g.key=d.C0.ESC+(u.ctrlKey?d.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let f=u.code.slice(3,4);u.shiftKey||(f=f.toLowerCase()),g.key=d.C0.ESC+f,g.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?g.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?g.key=d.C0.NUL:u.keyCode>=51&&u.keyCode<=55?g.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?g.key=d.C0.DEL:u.keyCode===219?g.key=d.C0.ESC:u.keyCode===220?g.key=d.C0.FS:u.keyCode===221&&(g.key=d.C0.GS)}return g}},482:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},i.utf32ToString=function(a,d=0,m=a.length){let u="";for(let v=d;v<m;++v){let y=a[v];y>65535?(y-=65536,u+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):u+=String.fromCharCode(y)}return u},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,d){const m=a.length;if(!m)return 0;let u=0,v=0;if(this._interim){const y=a.charCodeAt(v++);56320<=y&&y<=57343?d[u++]=1024*(this._interim-55296)+y-56320+65536:(d[u++]=this._interim,d[u++]=y),this._interim=0}for(let y=v;y<m;++y){const S=a.charCodeAt(y);if(55296<=S&&S<=56319){if(++y>=m)return this._interim=S,u;const g=a.charCodeAt(y);56320<=g&&g<=57343?d[u++]=1024*(S-55296)+g-56320+65536:(d[u++]=S,d[u++]=g)}else S!==65279&&(d[u++]=S)}return u}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,d){const m=a.length;if(!m)return 0;let u,v,y,S,g=0,p=0,h=0;if(this.interim[0]){let _=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let k,C=0;for(;(k=63&this.interim[++C])&&C<4;)E<<=6,E|=k;const w=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,P=w-C;for(;h<P;){if(h>=m)return 0;if(k=a[h++],(192&k)!=128){h--,_=!0;break}this.interim[C++]=k,E<<=6,E|=63&k}_||(w===2?E<128?h--:d[g++]=E:w===3?E<2048||E>=55296&&E<=57343||E===65279||(d[g++]=E):E<65536||E>1114111||(d[g++]=E)),this.interim.fill(0)}const l=m-4;let f=h;for(;f<m;){for(;!(!(f<l)||128&(u=a[f])||128&(v=a[f+1])||128&(y=a[f+2])||128&(S=a[f+3]));)d[g++]=u,d[g++]=v,d[g++]=y,d[g++]=S,f+=4;if(u=a[f++],u<128)d[g++]=u;else if((224&u)==192){if(f>=m)return this.interim[0]=u,g;if(v=a[f++],(192&v)!=128){f--;continue}if(p=(31&u)<<6|63&v,p<128){f--;continue}d[g++]=p}else if((240&u)==224){if(f>=m)return this.interim[0]=u,g;if(v=a[f++],(192&v)!=128){f--;continue}if(f>=m)return this.interim[0]=u,this.interim[1]=v,g;if(y=a[f++],(192&y)!=128){f--;continue}if(p=(15&u)<<12|(63&v)<<6|63&y,p<2048||p>=55296&&p<=57343||p===65279)continue;d[g++]=p}else if((248&u)==240){if(f>=m)return this.interim[0]=u,g;if(v=a[f++],(192&v)!=128){f--;continue}if(f>=m)return this.interim[0]=u,this.interim[1]=v,g;if(y=a[f++],(192&y)!=128){f--;continue}if(f>=m)return this.interim[0]=u,this.interim[1]=v,this.interim[2]=y,g;if(S=a[f++],(192&S)!=128){f--;continue}if(p=(7&u)<<18|(63&v)<<12|(63&y)<<6|63&S,p<65536||p>1114111)continue;d[g++]=p}}return g}}},225:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const d=a(1480),m=[[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]],u=[[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 v;i.UnicodeV6=class{constructor(){if(this.version="6",!v){v=new Uint8Array(65536),v.fill(1),v[0]=0,v.fill(0,1,32),v.fill(0,127,160),v.fill(2,4352,4448),v[9001]=2,v[9002]=2,v.fill(2,11904,42192),v[12351]=1,v.fill(2,44032,55204),v.fill(2,63744,64256),v.fill(2,65040,65050),v.fill(2,65072,65136),v.fill(2,65280,65377),v.fill(2,65504,65511);for(let y=0;y<m.length;++y)v.fill(0,m[y][0],m[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?v[y]:function(S,g){let p,h=0,l=g.length-1;if(S<g[0][0]||S>g[l][1])return!1;for(;l>=h;)if(p=h+l>>1,S>g[p][1])h=p+1;else{if(!(S<g[p][0]))return!0;l=p-1}return!1}(y,u)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,S){let g=this.wcwidth(y),p=g===0&&S!==0;if(p){const h=d.UnicodeService.extractWidth(S);h===0?p=!1:h>g&&(g=h)}return d.UnicodeService.createPropertyValue(0,g,p)}}},5981:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;const d=a(8460),m=a(844);class u extends m.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let g;for(this._isSyncWriting=!0;g=this._writeBuffer.shift();){this._action(g);const p=this._callbacks.shift();p&&p()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,S){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+=y.length,this._writeBuffer.push(y),this._callbacks.push(S),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(S)}_innerWrite(y=0,S=!0){const g=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const p=this._writeBuffer[this._bufferOffset],h=this._action(p,S);if(h){const f=_=>Date.now()-g>=12?setTimeout(()=>this._innerWrite(0,_)):this._innerWrite(g,_);return void h.catch(_=>(queueMicrotask(()=>{throw _}),Promise.resolve(!1))).then(f)}const l=this._callbacks[this._bufferOffset];if(l&&l(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-g>=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()}}i.WriteBuffer=u},5941:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.toRgbString=i.parseColor=void 0;const a=/^([\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})$/,d=/^[\da-f]+$/;function m(u,v){const y=u.toString(16),S=y.length<2?"0"+y:y;switch(v){case 4:return y[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}i.parseColor=function(u){if(!u)return;let v=u.toLowerCase();if(v.indexOf("rgb:")===0){v=v.slice(4);const y=a.exec(v);if(y){const S=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/S*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/S*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/S*255)]}}else if(v.indexOf("#")===0&&(v=v.slice(1),d.exec(v)&&[3,6,9,12].includes(v.length))){const y=v.length/3,S=[0,0,0];for(let g=0;g<3;++g){const p=parseInt(v.slice(y*g,y*g+y),16);S[g]=y===1?p<<4:y===2?p:y===3?p>>4:p>>8}return S}},i.toRgbString=function(u,v=16){const[y,S,g]=u;return`rgb:${m(y,v)}/${m(S,v)}/${m(g,v)}`}},5770:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.PAYLOAD_LIMIT=void 0,i.PAYLOAD_LIMIT=1e7},6351:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DcsHandler=i.DcsParser=void 0;const d=a(482),m=a(8742),u=a(5770),v=[];i.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=v,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=v}registerHandler(S,g){this._handlers[S]===void 0&&(this._handlers[S]=[]);const p=this._handlers[S];return p.push(g),{dispose:()=>{const h=p.indexOf(g);h!==-1&&p.splice(h,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=v,this._ident=0}hook(S,g){if(this.reset(),this._ident=S,this._active=this._handlers[S]||v,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].hook(g);else this._handlerFb(this._ident,"HOOK",g)}put(S,g,p){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(S,g,p);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(S,g,p))}unhook(S,g=!0){if(this._active.length){let p=!1,h=this._active.length-1,l=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,p=g,l=this._stack.fallThrough,this._stack.paused=!1),!l&&p===!1){for(;h>=0&&(p=this._active[h].unhook(S),p!==!0);h--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,p;h--}for(;h>=0;h--)if(p=this._active[h].unhook(!1),p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,p}else this._handlerFb(this._ident,"UNHOOK",S);this._active=v,this._ident=0}};const y=new m.Params;y.addParam(0),i.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=y,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():y,this._data="",this._hitLimit=!1}put(S,g,p){this._hitLimit||(this._data+=(0,d.utf32ToString)(S,g,p),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let g=!1;if(this._hitLimit)g=!1;else if(S&&(g=this._handler(this._data,this._params),g instanceof Promise))return g.then(p=>(this._params=y,this._data="",this._hitLimit=!1,p));return this._params=y,this._data="",this._hitLimit=!1,g}}},2015:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;const d=a(844),m=a(8742),u=a(6242),v=a(6351);class y{constructor(h){this.table=new Uint8Array(h)}setDefault(h,l){this.table.fill(h<<4|l)}add(h,l,f,_){this.table[l<<8|h]=f<<4|_}addMany(h,l,f,_){for(let E=0;E<h.length;E++)this.table[l<<8|h[E]]=f<<4|_}}i.TransitionTable=y;const S=160;i.VT500_TRANSITION_TABLE=function(){const p=new y(4095),h=Array.apply(null,Array(256)).map((C,w)=>w),l=(C,w)=>h.slice(C,w),f=l(32,127),_=l(0,24);_.push(25),_.push.apply(_,l(28,32));const E=l(0,14);let k;for(k in p.setDefault(1,0),p.addMany(f,0,2,0),E)p.addMany([24,26,153,154],k,3,0),p.addMany(l(128,144),k,3,0),p.addMany(l(144,152),k,3,0),p.add(156,k,0,0),p.add(27,k,11,1),p.add(157,k,4,8),p.addMany([152,158,159],k,0,7),p.add(155,k,11,3),p.add(144,k,11,9);return p.addMany(_,0,3,0),p.addMany(_,1,3,1),p.add(127,1,0,1),p.addMany(_,8,0,8),p.addMany(_,3,3,3),p.add(127,3,0,3),p.addMany(_,4,3,4),p.add(127,4,0,4),p.addMany(_,6,3,6),p.addMany(_,5,3,5),p.add(127,5,0,5),p.addMany(_,2,3,2),p.add(127,2,0,2),p.add(93,1,4,8),p.addMany(f,8,5,8),p.add(127,8,5,8),p.addMany([156,27,24,26,7],8,6,0),p.addMany(l(28,32),8,0,8),p.addMany([88,94,95],1,0,7),p.addMany(f,7,0,7),p.addMany(_,7,0,7),p.add(156,7,0,0),p.add(127,7,0,7),p.add(91,1,11,3),p.addMany(l(64,127),3,7,0),p.addMany(l(48,60),3,8,4),p.addMany([60,61,62,63],3,9,4),p.addMany(l(48,60),4,8,4),p.addMany(l(64,127),4,7,0),p.addMany([60,61,62,63],4,0,6),p.addMany(l(32,64),6,0,6),p.add(127,6,0,6),p.addMany(l(64,127),6,0,0),p.addMany(l(32,48),3,9,5),p.addMany(l(32,48),5,9,5),p.addMany(l(48,64),5,0,6),p.addMany(l(64,127),5,7,0),p.addMany(l(32,48),4,9,5),p.addMany(l(32,48),1,9,2),p.addMany(l(32,48),2,9,2),p.addMany(l(48,127),2,10,0),p.addMany(l(48,80),1,10,0),p.addMany(l(81,88),1,10,0),p.addMany([89,90,92],1,10,0),p.addMany(l(96,127),1,10,0),p.add(80,1,11,9),p.addMany(_,9,0,9),p.add(127,9,0,9),p.addMany(l(28,32),9,0,9),p.addMany(l(32,48),9,9,12),p.addMany(l(48,60),9,8,10),p.addMany([60,61,62,63],9,9,10),p.addMany(_,11,0,11),p.addMany(l(32,128),11,0,11),p.addMany(l(28,32),11,0,11),p.addMany(_,10,0,10),p.add(127,10,0,10),p.addMany(l(28,32),10,0,10),p.addMany(l(48,60),10,8,10),p.addMany([60,61,62,63],10,0,11),p.addMany(l(32,48),10,9,12),p.addMany(_,12,0,12),p.add(127,12,0,12),p.addMany(l(28,32),12,0,12),p.addMany(l(32,48),12,9,12),p.addMany(l(48,64),12,0,11),p.addMany(l(64,127),12,12,13),p.addMany(l(64,127),10,12,13),p.addMany(l(64,127),9,12,13),p.addMany(_,13,13,13),p.addMany(f,13,13,13),p.add(127,13,0,13),p.addMany([27,156,24,26],13,14,0),p.add(S,0,2,0),p.add(S,8,5,8),p.add(S,6,0,6),p.add(S,11,0,11),p.add(S,13,13,13),p}();class g extends d.Disposable{constructor(h=i.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(l,f,_)=>{},this._executeHandlerFb=l=>{},this._csiHandlerFb=(l,f)=>{},this._escHandlerFb=l=>{},this._errorHandlerFb=l=>l,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new v.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(h,l=[64,126]){let f=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(f=h.prefix.charCodeAt(0),f&&60>f||f>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let E=0;E<h.intermediates.length;++E){const k=h.intermediates.charCodeAt(E);if(32>k||k>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");f<<=8,f|=k}}if(h.final.length!==1)throw new Error("final must be a single byte");const _=h.final.charCodeAt(0);if(l[0]>_||_>l[1])throw new Error(`final must be in range ${l[0]} .. ${l[1]}`);return f<<=8,f|=_,f}identToString(h){const l=[];for(;h;)l.push(String.fromCharCode(255&h)),h>>=8;return l.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,l){const f=this._identifier(h,[48,126]);this._escHandlers[f]===void 0&&(this._escHandlers[f]=[]);const _=this._escHandlers[f];return _.push(l),{dispose:()=>{const E=_.indexOf(l);E!==-1&&_.splice(E,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,l){this._executeHandlers[h.charCodeAt(0)]=l}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,l){const f=this._identifier(h);this._csiHandlers[f]===void 0&&(this._csiHandlers[f]=[]);const _=this._csiHandlers[f];return _.push(l),{dispose:()=>{const E=_.indexOf(l);E!==-1&&_.splice(E,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,l){return this._dcsParser.registerHandler(this._identifier(h),l)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,l){return this._oscParser.registerHandler(h,l)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,l,f,_,E){this._parseStack.state=h,this._parseStack.handlers=l,this._parseStack.handlerPos=f,this._parseStack.transition=_,this._parseStack.chunkPos=E}parse(h,l,f){let _,E=0,k=0,C=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,C=this._parseStack.chunkPos+1;else{if(f===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const w=this._parseStack.handlers;let P=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(f===!1&&P>-1){for(;P>=0&&(_=w[P](this._params),_!==!0);P--)if(_ instanceof Promise)return this._parseStack.handlerPos=P,_}this._parseStack.handlers=[];break;case 4:if(f===!1&&P>-1){for(;P>=0&&(_=w[P](),_!==!0);P--)if(_ instanceof Promise)return this._parseStack.handlerPos=P,_}this._parseStack.handlers=[];break;case 6:if(E=h[this._parseStack.chunkPos],_=this._dcsParser.unhook(E!==24&&E!==26,f),_)return _;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=h[this._parseStack.chunkPos],_=this._oscParser.end(E!==24&&E!==26,f),_)return _;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,C=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let w=C;w<l;++w){switch(E=h[w],k=this._transitions.table[this.currentState<<8|(E<160?E:S)],k>>4){case 2:for(let N=w+1;;++N){if(N>=l||(E=h[N])<32||E>126&&E<S){this._printHandler(h,w,N),w=N-1;break}if(++N>=l||(E=h[N])<32||E>126&&E<S){this._printHandler(h,w,N),w=N-1;break}if(++N>=l||(E=h[N])<32||E>126&&E<S){this._printHandler(h,w,N),w=N-1;break}if(++N>=l||(E=h[N])<32||E>126&&E<S){this._printHandler(h,w,N),w=N-1;break}}break;case 3:this._executeHandlers[E]?this._executeHandlers[E]():this._executeHandlerFb(E),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:w,code:E,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const P=this._csiHandlers[this._collect<<8|E];let T=P?P.length-1:-1;for(;T>=0&&(_=P[T](this._params),_!==!0);T--)if(_ instanceof Promise)return this._preserveStack(3,P,T,k,w),_;T<0&&this._csiHandlerFb(this._collect<<8|E,this._params),this.precedingJoinState=0;break;case 8:do switch(E){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(E-48)}while(++w<l&&(E=h[w])>47&&E<60);w--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const M=this._escHandlers[this._collect<<8|E];let j=M?M.length-1:-1;for(;j>=0&&(_=M[j](),_!==!0);j--)if(_ instanceof Promise)return this._preserveStack(4,M,j,k,w),_;j<0&&this._escHandlerFb(this._collect<<8|E),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|E,this._params);break;case 13:for(let N=w+1;;++N)if(N>=l||(E=h[N])===24||E===26||E===27||E>127&&E<S){this._dcsParser.put(h,w,N),w=N-1;break}break;case 14:if(_=this._dcsParser.unhook(E!==24&&E!==26),_)return this._preserveStack(6,[],0,k,w),_;E===27&&(k|=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 N=w+1;;N++)if(N>=l||(E=h[N])<32||E>127&&E<S){this._oscParser.put(h,w,N),w=N-1;break}break;case 6:if(_=this._oscParser.end(E!==24&&E!==26),_)return this._preserveStack(5,[],0,k,w),_;E===27&&(k|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&k}}}i.EscapeSequenceParser=g},6242:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;const d=a(5770),m=a(482),u=[];i.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(v,y){this._handlers[v]===void 0&&(this._handlers[v]=[]);const S=this._handlers[v];return S.push(y),{dispose:()=>{const g=S.indexOf(y);g!==-1&&S.splice(g,1)}}}clearHandler(v){this._handlers[v]&&delete this._handlers[v]}setHandlerFallback(v){this._handlerFb=v}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let v=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;v>=0;--v)this._active[v].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].start();else this._handlerFb(this._id,"START")}_put(v,y,S){if(this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].put(v,y,S);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(v,y,S))}start(){this.reset(),this._state=1}put(v,y,S){if(this._state!==3){if(this._state===1)for(;y<S;){const g=v[y++];if(g===59){this._state=2,this._start();break}if(g<48||57<g)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+g-48}this._state===2&&S-y>0&&this._put(v,y,S)}}end(v,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,g=this._active.length-1,p=!1;if(this._stack.paused&&(g=this._stack.loopPosition-1,S=y,p=this._stack.fallThrough,this._stack.paused=!1),!p&&S===!1){for(;g>=0&&(S=this._active[g].end(v),S!==!0);g--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!1,S;g--}for(;g>=0;g--)if(S=this._active[g].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",v);this._active=u,this._id=-1,this._state=0}}},i.OscHandler=class{constructor(v){this._handler=v,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(v,y,S){this._hitLimit||(this._data+=(0,m.utf32ToString)(v,y,S),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(v){let y=!1;if(this._hitLimit)y=!1;else if(v&&(y=this._handler(this._data),y instanceof Promise))return y.then(S=>(this._data="",this._hitLimit=!1,S));return this._data="",this._hitLimit=!1,y}}},8742:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;const a=2147483647;class d{static fromArray(u){const v=new d;if(!u.length)return v;for(let y=Array.isArray(u[0])?1:0;y<u.length;++y){const S=u[y];if(Array.isArray(S))for(let g=0;g<S.length;++g)v.addSubParam(S[g]);else v.addParam(S)}return v}constructor(u=32,v=32){if(this.maxLength=u,this.maxSubParamsLength=v,v>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(v),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new d(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let v=0;v<this.length;++v){u.push(this.params[v]);const y=this._subParamsIdx[v]>>8,S=255&this._subParamsIdx[v];S-y>0&&u.push(Array.prototype.slice.call(this._subParams,y,S))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>a?a:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>a?a:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const v=this._subParamsIdx[u]>>8,y=255&this._subParamsIdx[u];return y-v>0?this._subParams.subarray(v,y):null}getSubParamsAll(){const u={};for(let v=0;v<this.length;++v){const y=this._subParamsIdx[v]>>8,S=255&this._subParamsIdx[v];S-y>0&&(u[v]=this._subParams.slice(y,S))}return u}addDigit(u){let v;if(this._rejectDigits||!(v=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,S=y[v-1];y[v-1]=~S?Math.min(10*S+u,a):u}}i.Params=d},5741:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AddonManager=void 0,i.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let a=this._addons.length-1;a>=0;a--)this._addons[a].instance.dispose()}loadAddon(a,d){const m={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(m),d.dispose=()=>this._wrappedAddonDispose(m),d.activate(a)}_wrappedAddonDispose(a){if(a.isDisposed)return;let d=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===a){d=m;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");a.isDisposed=!0,a.dispose.apply(a.instance),this._addons.splice(d,1)}}},8771:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;const d=a(3785),m=a(511);i.BufferApiView=class{constructor(u,v){this._buffer=u,this.type=v}init(u){return this._buffer=u,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(u){const v=this._buffer.lines.get(u);if(v)return new d.BufferLineApiView(v)}getNullCell(){return new m.CellData}}},3785:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;const d=a(511);i.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,u){if(!(m<0||m>=this._line.length))return u?(this._line.loadCell(m,u),u):this._line.loadCell(m,new d.CellData)}translateToString(m,u,v){return this._line.translateToString(m,u,v)}}},8285:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;const d=a(8771),m=a(8460),u=a(844);class v extends u.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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)}}i.BufferNamespaceApi=v},7975:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0,i.ParserApi=class{constructor(a){this._core=a}registerCsiHandler(a,d){return this._core.registerCsiHandler(a,m=>d(m.toArray()))}addCsiHandler(a,d){return this.registerCsiHandler(a,d)}registerDcsHandler(a,d){return this._core.registerDcsHandler(a,(m,u)=>d(m,u.toArray()))}addDcsHandler(a,d){return this.registerDcsHandler(a,d)}registerEscHandler(a,d){return this._core.registerEscHandler(a,d)}addEscHandler(a,d){return this.registerEscHandler(a,d)}registerOscHandler(a,d){return this._core.registerOscHandler(a,d)}addOscHandler(a,d){return this.registerOscHandler(a,d)}}},7090:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeApi=void 0,i.UnicodeApi=class{constructor(a){this._core=a}register(a){this._core.unicodeService.register(a)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(a){this._core.unicodeService.activeVersion=a}}},744:function(c,i,a){var d=this&&this.__decorate||function(p,h,l,f){var _,E=arguments.length,k=E<3?h:f===null?f=Object.getOwnPropertyDescriptor(h,l):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(p,h,l,f);else for(var C=p.length-1;C>=0;C--)(_=p[C])&&(k=(E<3?_(k):E>3?_(h,l,k):_(h,l))||k);return E>3&&k&&Object.defineProperty(h,l,k),k},m=this&&this.__param||function(p,h){return function(l,f){h(l,f,p)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferService=i.MINIMUM_ROWS=i.MINIMUM_COLS=void 0;const u=a(8460),v=a(844),y=a(5295),S=a(2585);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;let g=i.BufferService=class extends v.Disposable{get buffer(){return this.buffers.active}constructor(p){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(p.rawOptions.cols||0,i.MINIMUM_COLS),this.rows=Math.max(p.rawOptions.rows||0,i.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(p,this))}resize(p,h){this.cols=p,this.rows=h,this.buffers.resize(p,h),this._onResize.fire({cols:p,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(p,h=!1){const l=this.buffer;let f;f=this._cachedBlankLine,f&&f.length===this.cols&&f.getFg(0)===p.fg&&f.getBg(0)===p.bg||(f=l.getBlankLine(p,h),this._cachedBlankLine=f),f.isWrapped=h;const _=l.ybase+l.scrollTop,E=l.ybase+l.scrollBottom;if(l.scrollTop===0){const k=l.lines.isFull;E===l.lines.length-1?k?l.lines.recycle().copyFrom(f):l.lines.push(f.clone()):l.lines.splice(E+1,0,f.clone()),k?this.isUserScrolling&&(l.ydisp=Math.max(l.ydisp-1,0)):(l.ybase++,this.isUserScrolling||l.ydisp++)}else{const k=E-_+1;l.lines.shiftElements(_+1,k-1,-1),l.lines.set(E,f.clone())}this.isUserScrolling||(l.ydisp=l.ybase),this._onScroll.fire(l.ydisp)}scrollLines(p,h,l){const f=this.buffer;if(p<0){if(f.ydisp===0)return;this.isUserScrolling=!0}else p+f.ydisp>=f.ybase&&(this.isUserScrolling=!1);const _=f.ydisp;f.ydisp=Math.max(Math.min(f.ydisp+p,f.ybase),0),_!==f.ydisp&&(h||this._onScroll.fire(f.ydisp))}};i.BufferService=g=d([m(0,S.IOptionsService)],g)},7994:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CharsetService=void 0,i.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(a){this.glevel=a,this.charset=this._charsets[a]}setgCharset(a,d){this._charsets[a]=d,this.glevel===a&&(this.charset=d)}}},1753:function(c,i,a){var d=this&&this.__decorate||function(f,_,E,k){var C,w=arguments.length,P=w<3?_:k===null?k=Object.getOwnPropertyDescriptor(_,E):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(f,_,E,k);else for(var T=f.length-1;T>=0;T--)(C=f[T])&&(P=(w<3?C(P):w>3?C(_,E,P):C(_,E))||P);return w>3&&P&&Object.defineProperty(_,E,P),P},m=this&&this.__param||function(f,_){return function(E,k){_(E,k,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;const u=a(2585),v=a(8460),y=a(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:f=>f.button!==4&&f.action===1&&(f.ctrl=!1,f.alt=!1,f.shift=!1,!0)},VT200:{events:19,restrict:f=>f.action!==32},DRAG:{events:23,restrict:f=>f.action!==32||f.button!==3},ANY:{events:31,restrict:f=>!0}};function g(f,_){let E=(f.ctrl?16:0)|(f.shift?4:0)|(f.alt?8:0);return f.button===4?(E|=64,E|=f.action):(E|=3&f.button,4&f.button&&(E|=64),8&f.button&&(E|=128),f.action===32?E|=32:f.action!==0||_||(E|=3)),E}const p=String.fromCharCode,h={DEFAULT:f=>{const _=[g(f,!1)+32,f.col+32,f.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${p(_[0])}${p(_[1])}${p(_[2])}`},SGR:f=>{const _=f.action===0&&f.button!==4?"m":"M";return`\x1B[<${g(f,!0)};${f.col};${f.row}${_}`},SGR_PIXELS:f=>{const _=f.action===0&&f.button!==4?"m":"M";return`\x1B[<${g(f,!0)};${f.x};${f.y}${_}`}};let l=i.CoreMouseService=class extends y.Disposable{constructor(f,_){super(),this._bufferService=f,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new v.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(S))this.addProtocol(E,S[E]);for(const E of Object.keys(h))this.addEncoding(E,h[E]);this.reset()}addProtocol(f,_){this._protocols[f]=_}addEncoding(f,_){this._encodings[f]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(f){if(!this._protocols[f])throw new Error(`unknown protocol "${f}"`);this._activeProtocol=f,this._onProtocolChange.fire(this._protocols[f].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(f){if(!this._encodings[f])throw new Error(`unknown encoding "${f}"`);this._activeEncoding=f}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(f){if(f.col<0||f.col>=this._bufferService.cols||f.row<0||f.row>=this._bufferService.rows||f.button===4&&f.action===32||f.button===3&&f.action!==32||f.button!==4&&(f.action===2||f.action===3)||(f.col++,f.row++,f.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,f,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(f))return!1;const _=this._encodings[this._activeEncoding](f);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=f,!0}explainEvents(f){return{down:!!(1&f),up:!!(2&f),drag:!!(4&f),move:!!(8&f),wheel:!!(16&f)}}_equalEvents(f,_,E){if(E){if(f.x!==_.x||f.y!==_.y)return!1}else if(f.col!==_.col||f.row!==_.row)return!1;return f.button===_.button&&f.action===_.action&&f.ctrl===_.ctrl&&f.alt===_.alt&&f.shift===_.shift}};i.CoreMouseService=l=d([m(0,u.IBufferService),m(1,u.ICoreService)],l)},6975:function(c,i,a){var d=this&&this.__decorate||function(l,f,_,E){var k,C=arguments.length,w=C<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(l,f,_,E);else for(var P=l.length-1;P>=0;P--)(k=l[P])&&(w=(C<3?k(w):C>3?k(f,_,w):k(f,_))||w);return C>3&&w&&Object.defineProperty(f,_,w),w},m=this&&this.__param||function(l,f){return function(_,E){f(_,E,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;const u=a(1439),v=a(8460),y=a(844),S=a(2585),g=Object.freeze({insertMode:!1}),p=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=i.CoreService=class extends y.Disposable{constructor(l,f,_){super(),this._bufferService=l,this._logService=f,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new v.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new v.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(g),this.decPrivateModes=(0,u.clone)(p)}reset(){this.modes=(0,u.clone)(g),this.decPrivateModes=(0,u.clone)(p)}triggerDataEvent(l,f=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;f&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),f&&this._onUserInput.fire(),this._logService.debug(`sending data "${l}"`,()=>l.split("").map(E=>E.charCodeAt(0))),this._onData.fire(l)}triggerBinaryEvent(l){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${l}"`,()=>l.split("").map(f=>f.charCodeAt(0))),this._onBinary.fire(l))}};i.CoreService=h=d([m(0,S.IBufferService),m(1,S.ILogService),m(2,S.IOptionsService)],h)},9074:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DecorationService=void 0;const d=a(8055),m=a(8460),u=a(844),v=a(6106);let y=0,S=0;class g extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new v.SortedList(l=>l==null?void 0:l.marker.line),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)(()=>this.reset()))}registerDecoration(l){if(l.marker.isDisposed)return;const f=new p(l);if(f){const _=f.marker.onDispose(()=>f.dispose());f.onDispose(()=>{f&&(this._decorations.delete(f)&&this._onDecorationRemoved.fire(f),_.dispose())}),this._decorations.insert(f),this._onDecorationRegistered.fire(f)}return f}reset(){for(const l of this._decorations.values())l.dispose();this._decorations.clear()}*getDecorationsAtCell(l,f,_){let E=0,k=0;for(const C of this._decorations.getKeyIterator(f))E=C.options.x??0,k=E+(C.options.width??1),l>=E&&l<k&&(!_||(C.options.layer??"bottom")===_)&&(yield C)}forEachDecorationAtCell(l,f,_,E){this._decorations.forEachByKey(f,k=>{y=k.options.x??0,S=y+(k.options.width??1),l>=y&&l<S&&(!_||(k.options.layer??"bottom")===_)&&E(k)})}}i.DecorationService=g;class p extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(l){super(),this.options=l,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=l.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.InstantiationService=i.ServiceCollection=void 0;const d=a(2585),m=a(8343);class u{constructor(...y){this._entries=new Map;for(const[S,g]of y)this.set(S,g)}set(y,S){const g=this._entries.get(y);return this._entries.set(y,S),g}forEach(y){for(const[S,g]of this._entries.entries())y(S,g)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}i.ServiceCollection=u,i.InstantiationService=class{constructor(){this._services=new u,this._services.set(d.IInstantiationService,this)}setService(v,y){this._services.set(v,y)}getService(v){return this._services.get(v)}createInstance(v,...y){const S=(0,m.getServiceDependencies)(v).sort((h,l)=>h.index-l.index),g=[];for(const h of S){const l=this._services.get(h.id);if(!l)throw new Error(`[createInstance] ${v.name} depends on UNKNOWN service ${h.id}.`);g.push(l)}const p=S.length>0?S[0].index:y.length;if(y.length!==p)throw new Error(`[createInstance] First service dependency of ${v.name} at position ${p+1} conflicts with ${y.length} static arguments`);return new v(...y,...g)}}},7866:function(c,i,a){var d=this&&this.__decorate||function(p,h,l,f){var _,E=arguments.length,k=E<3?h:f===null?f=Object.getOwnPropertyDescriptor(h,l):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(p,h,l,f);else for(var C=p.length-1;C>=0;C--)(_=p[C])&&(k=(E<3?_(k):E>3?_(h,l,k):_(h,l))||k);return E>3&&k&&Object.defineProperty(h,l,k),k},m=this&&this.__param||function(p,h){return function(l,f){h(l,f,p)}};Object.defineProperty(i,"__esModule",{value:!0}),i.traceCall=i.setTraceLogger=i.LogService=void 0;const u=a(844),v=a(2585),y={trace:v.LogLevelEnum.TRACE,debug:v.LogLevelEnum.DEBUG,info:v.LogLevelEnum.INFO,warn:v.LogLevelEnum.WARN,error:v.LogLevelEnum.ERROR,off:v.LogLevelEnum.OFF};let S,g=i.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(p){super(),this._optionsService=p,this._logLevel=v.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),S=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(p){for(let h=0;h<p.length;h++)typeof p[h]=="function"&&(p[h]=p[h]())}_log(p,h,l){this._evalLazyOptionalParams(l),p.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...l)}trace(p,...h){var l;this._logLevel<=v.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,p,h)}debug(p,...h){var l;this._logLevel<=v.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,p,h)}info(p,...h){var l;this._logLevel<=v.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,p,h)}warn(p,...h){var l;this._logLevel<=v.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,p,h)}error(p,...h){var l;this._logLevel<=v.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,p,h)}};i.LogService=g=d([m(0,v.IOptionsService)],g),i.setTraceLogger=function(p){S=p},i.traceCall=function(p,h,l){if(typeof l.value!="function")throw new Error("not supported");const f=l.value;l.value=function(..._){if(S.logLevel!==v.LogLevelEnum.TRACE)return f.apply(this,_);S.trace(`GlyphRenderer#${f.name}(${_.map(k=>JSON.stringify(k)).join(", ")})`);const E=f.apply(this,_);return S.trace(`GlyphRenderer#${f.name} return`,E),E}}},7302:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OptionsService=i.DEFAULT_OPTIONS=void 0;const d=a(8460),m=a(844),u=a(6114);i.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:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const v=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends m.Disposable{constructor(g){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const p={...i.DEFAULT_OPTIONS};for(const h in g)if(h in p)try{const l=g[h];p[h]=this._sanitizeAndValidateOption(h,l)}catch(l){console.error(l)}this.rawOptions=p,this.options={...p},this._setupOptions(),this.register((0,m.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(g,p){return this.onOptionChange(h=>{h===g&&p(this.rawOptions[g])})}onMultipleOptionChange(g,p){return this.onOptionChange(h=>{g.indexOf(h)!==-1&&p()})}_setupOptions(){const g=h=>{if(!(h in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},p=(h,l)=>{if(!(h in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);l=this._sanitizeAndValidateOption(h,l),this.rawOptions[h]!==l&&(this.rawOptions[h]=l,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const l={get:g.bind(this,h),set:p.bind(this,h)};Object.defineProperty(this.options,h,l)}}_sanitizeAndValidateOption(g,p){switch(g){case"cursorStyle":if(p||(p=i.DEFAULT_OPTIONS[g]),!function(h){return h==="block"||h==="underline"||h==="bar"}(p))throw new Error(`"${p}" is not a valid value for ${g}`);break;case"wordSeparator":p||(p=i.DEFAULT_OPTIONS[g]);break;case"fontWeight":case"fontWeightBold":if(typeof p=="number"&&1<=p&&p<=1e3)break;p=v.includes(p)?p:i.DEFAULT_OPTIONS[g];break;case"cursorWidth":p=Math.floor(p);case"lineHeight":case"tabStopWidth":if(p<1)throw new Error(`${g} cannot be less than 1, value: ${p}`);break;case"minimumContrastRatio":p=Math.max(1,Math.min(21,Math.round(10*p)/10));break;case"scrollback":if((p=Math.min(p,4294967295))<0)throw new Error(`${g} cannot be less than 0, value: ${p}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(p<=0)throw new Error(`${g} cannot be less than or equal to 0, value: ${p}`);break;case"rows":case"cols":if(!p&&p!==0)throw new Error(`${g} must be numeric, value: ${p}`);break;case"windowsPty":p=p??{}}return p}}i.OptionsService=y},2660:function(c,i,a){var d=this&&this.__decorate||function(y,S,g,p){var h,l=arguments.length,f=l<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,g):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(y,S,g,p);else for(var _=y.length-1;_>=0;_--)(h=y[_])&&(f=(l<3?h(f):l>3?h(S,g,f):h(S,g))||f);return l>3&&f&&Object.defineProperty(S,g,f),f},m=this&&this.__param||function(y,S){return function(g,p){S(g,p,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkService=void 0;const u=a(2585);let v=i.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const S=this._bufferService.buffer;if(y.id===void 0){const _=S.addMarker(S.ybase+S.y),E={data:y,id:this._nextId++,lines:[_]};return _.onDispose(()=>this._removeMarkerFromLink(E,_)),this._dataByLinkId.set(E.id,E),E.id}const g=y,p=this._getEntryIdKey(g),h=this._entriesWithId.get(p);if(h)return this.addLineToLink(h.id,S.ybase+S.y),h.id;const l=S.addMarker(S.ybase+S.y),f={id:this._nextId++,key:this._getEntryIdKey(g),data:g,lines:[l]};return l.onDispose(()=>this._removeMarkerFromLink(f,l)),this._entriesWithId.set(f.key,f),this._dataByLinkId.set(f.id,f),f.id}addLineToLink(y,S){const g=this._dataByLinkId.get(y);if(g&&g.lines.every(p=>p.line!==S)){const p=this._bufferService.buffer.addMarker(S);g.lines.push(p),p.onDispose(()=>this._removeMarkerFromLink(g,p))}}getLinkData(y){var S;return(S=this._dataByLinkId.get(y))==null?void 0:S.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,S){const g=y.lines.indexOf(S);g!==-1&&(y.lines.splice(g,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};i.OscLinkService=v=d([m(0,u.IBufferService)],v)},8343:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const a="di$target",d="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(m){return m[d]||[]},i.createDecorator=function(m){if(i.serviceRegistry.has(m))return i.serviceRegistry.get(m);const u=function(v,y,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(g,p,h){p[a]===p?p[d].push({id:g,index:h}):(p[d]=[{id:g,index:h}],p[a]=p)})(u,v,S)};return u.toString=()=>m,i.serviceRegistry.set(m,u),u}},2585:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;const d=a(8343);var m;i.IBufferService=(0,d.createDecorator)("BufferService"),i.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),i.ICoreService=(0,d.createDecorator)("CoreService"),i.ICharsetService=(0,d.createDecorator)("CharsetService"),i.IInstantiationService=(0,d.createDecorator)("InstantiationService"),function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"}(m||(i.LogLevelEnum=m={})),i.ILogService=(0,d.createDecorator)("LogService"),i.IOptionsService=(0,d.createDecorator)("OptionsService"),i.IOscLinkService=(0,d.createDecorator)("OscLinkService"),i.IUnicodeService=(0,d.createDecorator)("UnicodeService"),i.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const d=a(8460),m=a(225);class u{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,S,g=!1){return(16777215&y)<<3|(3&S)<<1|(g?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const y=new m.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let S=0,g=0;const p=y.length;for(let h=0;h<p;++h){let l=y.charCodeAt(h);if(55296<=l&&l<=56319){if(++h>=p)return S+this.wcwidth(l);const E=y.charCodeAt(h);56320<=E&&E<=57343?l=1024*(l-55296)+E-56320+65536:S+=this.wcwidth(E)}const f=this.charProperties(l,g);let _=u.extractWidth(f);u.extractShouldJoin(f)&&(_-=u.extractWidth(g)),S+=_,g=f}return S}charProperties(y,S){return this._activeProvider.charProperties(y,S)}}i.UnicodeService=u}},n={};function s(c){var i=n[c];if(i!==void 0)return i.exports;var a=n[c]={exports:{}};return r[c].call(a.exports,a,a.exports,s),a.exports}var o={};return(()=>{var c=o;Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;const i=s(9042),a=s(3236),d=s(844),m=s(5741),u=s(8285),v=s(7975),y=s(7090),S=["cols","rows"];class g extends d.Disposable{constructor(h){super(),this._core=this.register(new a.Terminal(h)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const l=_=>this._core.options[_],f=(_,E)=>{this._checkReadonlyOptions(_),this._core.options[_]=E};for(const _ in this._core.options){const E={get:l.bind(this,_),set:f.bind(this,_)};Object.defineProperty(this._publicOptions,_,E)}}_checkReadonlyOptions(h){if(S.includes(h))throw new Error(`Option "${h}" 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 v.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.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 u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let l="none";switch(this._core.coreMouseService.activeProtocol){case"X10":l="x10";break;case"VT200":l="vt200";break;case"DRAG":l="drag";break;case"ANY":l="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:l,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const l in h)this._publicOptions[l]=h[l]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,l=!0){this._core.input(h,l)}resize(h,l){this._verifyIntegers(h,l),this._core.resize(h,l)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,l,f){this._verifyIntegers(h,l,f),this._core.select(h,l,f)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,l){this._verifyIntegers(h,l),this._core.selectLines(h,l)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,l){this._core.write(h,l)}writeln(h,l){this._core.write(h),this._core.write(`\r
|
|
279
|
+
`,l)}paste(h){this._core.paste(h)}refresh(h,l){this._verifyIntegers(h,l),this._core.refresh(h,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return i}_verifyIntegers(...h){for(const l of h)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const l of h)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}c.Terminal=g})(),o})())})(Hy);var QL=Hy.exports,zy={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(self,()=>(()=>{var r={};return(()=>{var n=r;Object.defineProperty(n,"__esModule",{value:!0}),n.FitAddon=void 0,n.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const o=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(o._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,o=s._renderService.dimensions;if(o.css.cell.width===0||o.css.cell.height===0)return;const c=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,i=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(i.getPropertyValue("height")),d=Math.max(0,parseInt(i.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),u=a-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),v=d-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-c;return{cols:Math.max(2,Math.floor(v/o.css.cell.width)),rows:Math.max(1,Math.floor(u/o.css.cell.height))}}}})(),r})())})(zy);var JL=zy.exports,Wy={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(self,()=>(()=>{var r={6:(c,i)=>{function a(m){try{const u=new URL(m),v=u.password&&u.username?`${u.protocol}//${u.username}:${u.password}@${u.host}`:u.username?`${u.protocol}//${u.username}@${u.host}`:`${u.protocol}//${u.host}`;return m.toLocaleLowerCase().startsWith(v.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.LinkComputer=i.WebLinkProvider=void 0,i.WebLinkProvider=class{constructor(m,u,v,y={}){this._terminal=m,this._regex=u,this._handler=v,this._options=y}provideLinks(m,u){const v=d.computeLink(m,this._regex,this._terminal,this._handler);u(this._addCallbacks(v))}_addCallbacks(m){return m.map(u=>(u.leave=this._options.leave,u.hover=(v,y)=>{if(this._options.hover){const{range:S}=u;this._options.hover(v,y,S)}},u))}};class d{static computeLink(u,v,y,S){const g=new RegExp(v.source,(v.flags||"")+"g"),[p,h]=d._getWindowedLineStrings(u-1,y),l=p.join("");let f;const _=[];for(;f=g.exec(l);){const E=f[0];if(!a(E))continue;const[k,C]=d._mapStrIdx(y,h,0,f.index),[w,P]=d._mapStrIdx(y,k,C,E.length);if(k===-1||C===-1||w===-1||P===-1)continue;const T={start:{x:C+1,y:k+1},end:{x:P,y:w+1}};_.push({range:T,text:E,activate:S})}return _}static _getWindowedLineStrings(u,v){let y,S=u,g=u,p=0,h="";const l=[];if(y=v.buffer.active.getLine(u)){const f=y.translateToString(!0);if(y.isWrapped&&f[0]!==" "){for(p=0;(y=v.buffer.active.getLine(--S))&&p<2048&&(h=y.translateToString(!0),p+=h.length,l.push(h),y.isWrapped&&h.indexOf(" ")===-1););l.reverse()}for(l.push(f),p=0;(y=v.buffer.active.getLine(++g))&&y.isWrapped&&p<2048&&(h=y.translateToString(!0),p+=h.length,l.push(h),h.indexOf(" ")===-1););}return[l,S]}static _mapStrIdx(u,v,y,S){const g=u.buffer.active,p=g.getNullCell();let h=y;for(;S;){const l=g.getLine(v);if(!l)return[-1,-1];for(let f=h;f<l.length;++f){l.getCell(f,p);const _=p.getChars();if(p.getWidth()&&(S-=_.length||1,f===l.length-1&&_==="")){const E=g.getLine(v+1);E&&E.isWrapped&&(E.getCell(0,p),p.getWidth()===2&&(S+=1))}if(S<0)return[v,f]}v++,h=0}return[v,h]}}i.LinkComputer=d}},n={};function s(c){var i=n[c];if(i!==void 0)return i.exports;var a=n[c]={exports:{}};return r[c](a,a.exports,s),a.exports}var o={};return(()=>{var c=o;Object.defineProperty(c,"__esModule",{value:!0}),c.WebLinksAddon=void 0;const i=s(6),a=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(m,u){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}c.WebLinksAddon=class{constructor(m=d,u={}){this._handler=m,this._options=u}activate(m){this._terminal=m;const u=this._options,v=u.urlRegex||a;this._linkProvider=this._terminal.registerLinkProvider(new i.WebLinkProvider(this._terminal,v,this._handler,u))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),o})())})(Wy);var ZL=Wy.exports;const Pd=b.forwardRef(({onData:e,onResize:t},r)=>{const n=b.useRef(null),s=b.useRef(null),o=b.useRef(null),c=b.useRef(e);c.current=e;const i=b.useRef(t);return i.current=t,b.useImperativeHandle(r,()=>({write(a){var d;(d=s.current)==null||d.write(a)},clear(){var a;(a=s.current)==null||a.clear()},fit(){var a;try{(a=o.current)==null||a.fit()}catch{}},focus(){var a;(a=s.current)==null||a.focus()}})),b.useEffect(()=>{const a=n.current;if(!a)return;const d=new QL.Terminal({fontSize:14,fontFamily:"JetBrains Mono, Fira Code, Monaco, Consolas, monospace",theme:{background:"transparent",foreground:"#f0f6fc",cursor:"#58a6ff",cursorAccent:"#0d1117",selectionBackground:"rgba(88, 166, 255, 0.3)",black:"#484f58",red:"#ff7b72",green:"#7ee787",yellow:"#ffa657",blue:"#79c0ff",magenta:"#d2a8ff",cyan:"#a5f3fc",white:"#b1bac4",brightBlack:"#6e7681",brightRed:"#ffa198",brightGreen:"#56d364",brightYellow:"#ffdf5d",brightBlue:"#79c0ff",brightMagenta:"#d2a8ff",brightCyan:"#a5f3fc",brightWhite:"#f0f6fc"},allowProposedApi:!0,scrollback:1e4,rightClickSelectsWord:!1,allowTransparency:!0,windowOptions:{}}),m=new JL.FitAddon,u=new ZL.WebLinksAddon;d.loadAddon(m),d.loadAddon(u),d.open(a);try{m.fit()}catch{}d.onData(y=>{const S=y.replace(/\x1b\[\[?[IO]/g,"");S&&c.current(S)}),d.onResize(({cols:y,rows:S})=>{var g;(g=i.current)==null||g.call(i,y,S)}),s.current=d,o.current=m;const v=new ResizeObserver(()=>{try{m.fit()}catch{}});return v.observe(a),()=>{v.disconnect(),d.dispose(),s.current=null,o.current=null}},[]),x.jsx("div",{ref:n,className:"xterm-renderer"})});Pd.displayName="XTermRenderer";const eA=[{kind:"claude",label:"Start Claude",icon:tA},{kind:"codex",label:"Start Codex",icon:rA},{kind:"agent",label:"Start Cursor",icon:nA}];function Uy({visible:e,onStart:t}){return e?x.jsxs("div",{className:"start-prompt",children:[x.jsx("p",{className:"start-prompt-heading",children:"Choose an agent to start"}),x.jsx("div",{className:"start-prompt-buttons",children:eA.map(({kind:r,label:n,icon:s})=>x.jsxs("button",{className:"start-prompt-btn",onClick:()=>t(r),children:[s(),x.jsx("span",{children:n})]},r))})]}):null}function tA(){return x.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"M12 3l1.912 5.813a2 2 0 001.275 1.275L21 12l-5.813 1.912a2 2 0 00-1.275 1.275L12 21l-1.912-5.813a2 2 0 00-1.275-1.275L3 12l5.813-1.912a2 2 0 001.275-1.275L12 3z"})})}function rA(){return x.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("polyline",{points:"4 17 10 11 4 5"}),x.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}function nA(){return x.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"M5 3l14 9-7 2-4 7L5 3z"})})}function Vy({plan:e,onAccept:t,onReject:r}){const[n,s]=b.useState(!1);return e?x.jsxs("div",{className:"plan-panel",children:[x.jsxs("div",{className:"plan-panel-header",children:[x.jsxs("button",{className:"plan-panel-toggle",onClick:()=>s(o=>!o),children:[x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:n?"rotate(-90deg)":"rotate(0deg)",transition:"transform 150ms"},children:x.jsx("polyline",{points:"6 9 12 15 18 9"})}),x.jsx("span",{children:"Plan Detected"})]}),x.jsxs("div",{className:"plan-panel-actions",children:[x.jsx("button",{className:"plan-panel-btn plan-panel-btn--accept",onClick:t,children:"Accept"}),x.jsx("button",{className:"plan-panel-btn plan-panel-btn--reject",onClick:r,children:"Reject"})]})]}),!n&&x.jsx("div",{className:"plan-panel-body",children:x.jsx("pre",{className:"plan-panel-content",children:e.content})})]}):null}function sA({open:e,onClose:t,autoSessionId:r}){const[n,s]=b.useState(!1),o=b.useRef(null),c=b.useMemo(()=>Fy().defaultAgent,[]);e&&!n&&s(!0);const{plan:i,processOutput:a,clearPlan:d}=jy(),m=b.useRef(a);m.current=a;const u=b.useRef(d);u.current=d;const v=b.useRef(null),{status:y,send:S}=kd({onMessage:b.useCallback(C=>{var w,P,T,M;switch((w=v.current)==null||w.handleMessage(C),C.type){case"output":(P=o.current)==null||P.write(C.data),m.current(C.data);break;case"error":(T=o.current)==null||T.write(`\r
|
|
280
|
+
\x1B[31mError: ${C.message}\x1B[0m\r
|
|
281
|
+
`);break;case"exit":(M=o.current)==null||M.write(`\r
|
|
282
|
+
\x1B[33mAgent exited (code ${C.code??"unknown"})\x1B[0m\r
|
|
283
|
+
`);break;case"claude_started":case"codex_started":case"agent_started":u.current();break}},[])}),g=VL({send:S,xtermRef:o,defaultAgent:c,autoSessionId:r});v.current=g,b.useEffect(()=>{if(!e)return;const C=setTimeout(()=>{var w,P;(w=o.current)==null||w.fit(),(P=o.current)==null||P.focus()},250);return()=>clearTimeout(C)},[e]);const p=b.useCallback(C=>S({type:"input",data:C}),[S]),h=b.useCallback((C,w)=>S({type:"resize",cols:C,rows:w}),[S]),l=b.useCallback(()=>{S({type:"input",data:`y
|
|
284
|
+
`}),d()},[S,d]),f=b.useCallback(()=>{S({type:"input",data:`n
|
|
285
|
+
`}),d()},[S,d]),_=!!g.sessionId&&!g.agentRunning&&y==="connected",E=b.useRef(null);b.useEffect(()=>{!r||r===E.current||y==="connected"&&(E.current=r,S({type:"join_session",sessionId:r}))},[r,y,S]);const k=y==="connected"?"bg-emerald-400":y==="connecting"?"bg-amber-400 animate-pulse":"bg-red-400";return x.jsxs(x.Fragment,{children:[e&&x.jsx("div",{className:"fixed inset-0 z-40 bg-black/40",onClick:t}),x.jsxs("div",{className:"fixed top-0 right-0 z-50 h-full w-[50vw] min-w-[400px] max-w-[80vw] bg-background border-l border-border shadow-xl flex flex-col transition-transform duration-200",style:{transform:e?"translateX(0)":"translateX(100%)",pointerEvents:e?"auto":"none"},children:[x.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-muted/50",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${k}`}),x.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Terminal"})]}),x.jsx("button",{onClick:t,className:"rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n&&x.jsxs("div",{className:"relative flex-1 min-h-0 flex flex-col",children:[x.jsx("div",{className:"flex-1 min-h-0 terminal-body-bg",children:x.jsx(Pd,{ref:o,onData:p,onResize:h})}),x.jsx(Uy,{visible:_,onStart:g.startAgent}),x.jsx(Vy,{plan:i,onAccept:l,onReject:f})]})]})]})}const iA=3e3;function oA({sessionId:e}){const t=b.useRef(null),[r,n]=b.useState(!1),s=b.useRef(!1),{plan:o,processOutput:c,clearPlan:i}=jy(),a=b.useRef(c);a.current=c;const d=b.useRef(i);d.current=i;const{status:m,send:u}=kd({onMessage:b.useCallback(h=>{var l,f,_,E,k,C;switch(h.type){case"connected":s.current||(s.current=!0,u({type:"join_session",sessionId:e}));break;case"session_joined":if(n(h.active),(l=t.current)==null||l.clear(),(f=h.outputBuffer)!=null&&f.length)for(const w of h.outputBuffer)(_=t.current)==null||_.write(w.replace(/\x1b\[\[?[IO]/g,""));break;case"output":(E=t.current)==null||E.write(h.data),a.current(h.data);break;case"error":(k=t.current)==null||k.write(`\r
|
|
286
|
+
\x1B[31mError: ${h.message}\x1B[0m\r
|
|
287
|
+
`);break;case"exit":(C=t.current)==null||C.write(`\r
|
|
288
|
+
\x1B[33mAgent exited (code ${h.code??"unknown"})\x1B[0m\r
|
|
289
|
+
`),n(!1);break;case"claude_started":case"codex_started":case"agent_started":n(!0),d.current();break;case"claude_stopped":case"codex_stopped":case"agent_stopped":n(!1);break}},[e])});b.useEffect(()=>{const h=setTimeout(()=>{var l,f;(l=t.current)==null||l.fit(),(f=t.current)==null||f.focus()},150);return()=>clearTimeout(h)},[]);const v=b.useCallback(h=>u({type:"input",data:h}),[u]),y=b.useCallback((h,l)=>u({type:"resize",cols:h,rows:l}),[u]),S=b.useCallback(h=>{u({type:h==="claude"?"start_claude":h==="codex"?"start_codex":"start_agent"})},[u]),g=!r&&m==="connected",p=m==="connected"?"bg-emerald-400":m==="connecting"?"bg-amber-400 animate-pulse":"bg-red-400";return x.jsxs("div",{className:"flex flex-col h-full",children:[x.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border bg-muted/50",children:[x.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${p}`}),x.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Terminal"})]}),x.jsxs("div",{className:"relative flex-1 min-h-0 flex flex-col",children:[x.jsx("div",{className:"flex-1 min-h-0 terminal-body-bg",children:x.jsx(Pd,{ref:t,onData:v,onResize:y})}),x.jsx(Uy,{visible:g,onStart:S}),x.jsx(Vy,{plan:o,onAccept:()=>{u({type:"input",data:`y
|
|
290
|
+
`}),i()},onReject:()=>{u({type:"input",data:`n
|
|
291
|
+
`}),i()}})]})]})}function aA(){const[e,t]=b.useState([]),[r,n]=b.useState(!0),[s,o]=b.useState(null),[c,i]=b.useState(new Set),a=b.useRef(null),d=b.useCallback(async()=>{try{const v=await(await fetch("/terminal/api/sessions/list")).json();t(v.sessions??[])}catch{}finally{n(!1)}},[]);b.useEffect(()=>(d(),a.current=setInterval(d,iA),()=>{a.current&&clearInterval(a.current)}),[d]);const m=async u=>{i(v=>new Set(v).add(u));try{await fetch(`/terminal/api/sessions/${u}`,{method:"DELETE"}),s===u&&o(null),await d()}finally{i(v=>{const y=new Set(v);return y.delete(u),y})}};return s?x.jsxs("div",{className:"flex flex-col h-full",children:[x.jsx("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-border bg-muted/30",children:x.jsxs("button",{type:"button",onClick:()=>o(null),className:"inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-sm text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:[x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("polyline",{points:"15 18 9 12 15 6"})}),"Back to sessions"]})}),x.jsx("div",{className:"flex-1 min-h-0",children:x.jsx(oA,{sessionId:s},s)})]}):x.jsxs("div",{className:"p-6 max-w-4xl mx-auto",children:[x.jsxs("div",{className:"flex items-center justify-between mb-6",children:[x.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Terminal Sessions"}),x.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.length," session",e.length!==1?"s":""]})]}),r?x.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading sessions..."}):e.length===0?x.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-8 text-center",children:x.jsx("p",{className:"text-sm text-muted-foreground",children:"No terminal sessions. Sessions are created automatically when the pipeline triggers an LLM node."})}):x.jsx("div",{className:"space-y-2",children:e.map(u=>x.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border bg-card px-4 py-3 hover:bg-muted/30 transition-colors",children:[x.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[x.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${u.active?"bg-emerald-400":"bg-zinc-400"}`}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:u.name||u.id}),x.jsxs("p",{className:"text-xs text-muted-foreground",children:[u.active?"Active":"Inactive",u.lastActivity?` · ${lA(u.lastActivity)}`:""]})]})]}),x.jsxs("div",{className:"flex items-center gap-2 shrink-0 ml-4",children:[x.jsx("button",{type:"button",onClick:()=>o(u.id),className:"rounded-md px-3 py-1.5 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",children:"Open"}),x.jsx("button",{type:"button",onClick:()=>m(u.id),disabled:c.has(u.id),className:"rounded-md px-3 py-1.5 text-xs font-medium text-destructive border border-destructive/30 hover:bg-destructive/10 transition-colors disabled:opacity-50",children:c.has(u.id)?"Closing...":"Close"})]})]},u.id))})]})}function lA(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/1e3);if(r<60)return"just now";const n=Math.floor(r/60);if(n<60)return`${n}m ago`;const s=Math.floor(n/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`}const cA={pending:"bg-zinc-500/20 text-zinc-400",in_progress:"bg-blue-500/20 text-blue-400",completed:"bg-emerald-500/20 text-emerald-400",failed:"bg-red-500/20 text-red-400",paused:"bg-amber-500/20 text-amber-400",cancelled:"bg-zinc-500/20 text-zinc-500"};function Ns({status:e}){return x.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${cA[e]??"bg-zinc-500/20 text-zinc-400"}`,children:e})}function Yi(e){if(!e)return"—";try{return new Date(e).toLocaleTimeString()}catch{return e}}function uA(){var k;const[e,t]=b.useState(null),[r,n]=b.useState({}),[s,o]=b.useState(!1),[c,i]=b.useState(null),[a,d]=b.useState(new Set),m=b.useCallback(async()=>{o(!0),i(null);try{const[C,w]=await Promise.all([fetch("/api/repair/tracker"),fetch("/api/pipeline-graph")]);if(!C.ok)throw new Error(`Tracker: HTTP ${C.status}`);const P=await C.json();if(t(P),w.ok){const T=await w.json(),M=T.data??T,j=(M==null?void 0:M.nd)??[],N={};j.forEach((F,V)=>{N[F.id]={phase:F.ph,index:V}}),n(N)}}catch(C){i(String(C))}finally{o(!1)}},[]),u=b.useCallback(async(C,w,P)=>{try{const T={agent_id:C,status:w};P&&(T.unit_id=P),await fetch("/api/repair/agent-status",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(T)}),await m()}catch(T){i(String(T))}},[m]),v=b.useCallback(async C=>{try{await fetch("/api/repair/run-status",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:C})}),await m()}catch(w){i(String(w))}},[m]),y=b.useCallback(async()=>{try{await fetch("/api/poke-orchestrator",{method:"POST"})}catch(C){i(String(C))}},[]),S=b.useCallback(async(C,w)=>{try{await fetch("/api/resolve-intervention",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:C,response:w})}),await m()}catch(P){i(String(P))}},[m]),g=b.useCallback(async()=>{if(window.confirm("FULL RESET: This will reset ALL agents to pending AND clear all output data, interventions, and loop state. Continue?"))try{await fetch("/api/repair/full-reset",{method:"POST"}),await m()}catch(C){i(String(C))}},[m]),p=b.useCallback(C=>{d(w=>{const P=new Set(w);return P.has(C)?P.delete(C):P.add(C),P})},[]);function h({agentId:C,status:w,unitId:P}){return w==="pending"?null:x.jsxs("button",{type:"button",onClick:()=>u(C,"pending",P),className:"inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs bg-zinc-700 hover:bg-zinc-600 text-zinc-200 transition-colors",title:"Reset to pending (re-run)",children:[x.jsx(aC,{className:"h-3 w-3"})," Reset"]})}const l=(k=e==null?void 0:e.run)==null?void 0:k.status,f=(e==null?void 0:e.nodes)??{},_=(e==null?void 0:e.interventions)??[],E=Object.entries(f).sort(([C],[w])=>{const P=r[C],T=r[w];return P&&T?P.phase!==T.phase?P.phase-T.phase:P.index-T.index:P&&!T?-1:!P&&T?1:C.localeCompare(w)});return x.jsxs("div",{className:"max-w-4xl mx-auto py-8 px-6 space-y-6",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"Repair"}),x.jsxs("button",{type:"button",onClick:m,disabled:s,className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-sm text-foreground hover:bg-zinc-800 transition-colors disabled:opacity-50",children:[x.jsx(iC,{className:`h-3.5 w-3.5 ${s?"animate-spin":""}`}),e?"Refresh":"Load Tracker"]})]}),c&&x.jsx("div",{className:"rounded-md bg-red-500/10 border border-red-500/30 px-4 py-3 text-sm text-red-400",children:c}),!e&&!s&&!c&&x.jsx("p",{className:"text-sm text-muted-foreground",children:'Click "Load Tracker" to fetch the current pipeline state.'}),e&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[x.jsxs("div",{className:"flex items-center justify-between mb-3",children:[x.jsx("h2",{className:"text-sm font-medium text-foreground",children:"Run Status"}),l&&x.jsx(Ns,{status:l})]}),x.jsxs("div",{className:"flex flex-wrap gap-2",children:[l!=="in_progress"&&x.jsxs("button",{type:"button",onClick:()=>v("in_progress"),className:"inline-flex items-center gap-1.5 rounded-md bg-emerald-600 hover:bg-emerald-500 px-3 py-1.5 text-xs font-medium text-white transition-colors",children:[x.jsx(nC,{className:"h-3 w-3"})," Resume"]}),l==="in_progress"&&x.jsxs("button",{type:"button",onClick:()=>v("paused"),className:"inline-flex items-center gap-1.5 rounded-md bg-amber-600 hover:bg-amber-500 px-3 py-1.5 text-xs font-medium text-white transition-colors",children:[x.jsx(tC,{className:"h-3 w-3"})," Pause"]}),x.jsxs("button",{type:"button",onClick:y,className:"inline-flex items-center gap-1.5 rounded-md bg-blue-600 hover:bg-blue-500 px-3 py-1.5 text-xs font-medium text-white transition-colors",children:[x.jsx(xC,{className:"h-3 w-3"})," Poke Orchestrator"]}),x.jsxs("button",{type:"button",onClick:g,className:"inline-flex items-center gap-1.5 rounded-md bg-red-800 hover:bg-red-700 px-3 py-1.5 text-xs font-medium text-white transition-colors",children:[x.jsx(gC,{className:"h-3 w-3"})," Full Reset"]})]})]}),x.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[x.jsxs("h2",{className:"text-sm font-medium text-foreground mb-3",children:["Agents (",Object.keys(f).length,")"]}),Object.keys(f).length===0?x.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents in tracker."}):x.jsx("div",{className:"overflow-x-auto",children:x.jsxs("table",{className:"w-full text-sm",children:[x.jsx("thead",{children:x.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Agent"}),x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Phase"}),x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Status"}),x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Triggered"}),x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Completed"}),x.jsx("th",{className:"pb-2 font-medium",children:"Actions"})]})}),x.jsx("tbody",{children:E.map(([C,w])=>{var M;const P=w.units&&Object.keys(w.units).length>0,T=a.has(C);return x.jsx(dA,{agentId:C,agent:w,phase:(M=r[C])==null?void 0:M.phase,hasUnits:!!P,isExpanded:T,onToggle:()=>p(C),actions:x.jsx(h,{agentId:C,status:w.status}),unitActions:(j,N)=>x.jsx(h,{agentId:C,status:N,unitId:j})},C)})})]})})]}),x.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[x.jsxs("h2",{className:"text-sm font-medium text-foreground mb-3",children:["Interventions (",_.length,")"]}),_.length===0?x.jsx("p",{className:"text-sm text-muted-foreground",children:"No interventions."}):x.jsx("div",{className:"overflow-x-auto",children:x.jsxs("table",{className:"w-full text-sm",children:[x.jsx("thead",{children:x.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"ID"}),x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Agent"}),x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Type"}),x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Status"}),x.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Message"}),x.jsx("th",{className:"pb-2 font-medium",children:"Actions"})]})}),x.jsx("tbody",{children:_.map(C=>x.jsxs("tr",{className:"border-b border-border/50",children:[x.jsx("td",{className:"py-2 pr-3 font-mono text-xs text-muted-foreground",title:C.id,children:C.id.length>12?C.id.slice(0,12)+"...":C.id}),x.jsx("td",{className:"py-2 pr-3 font-mono text-xs",children:C.agent_id}),x.jsx("td",{className:"py-2 pr-3",children:x.jsx(Ns,{status:C.type})}),x.jsx("td",{className:"py-2 pr-3",children:x.jsx(Ns,{status:C.status})}),x.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground max-w-[200px] truncate",title:C.message,children:C.message}),x.jsx("td",{className:"py-2",children:C.status==="pending"&&x.jsxs("div",{className:"flex gap-1.5",children:[x.jsx("button",{type:"button",onClick:()=>S(C.id,"continue"),className:"inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs bg-emerald-600 hover:bg-emerald-500 text-white transition-colors",children:"Continue"}),x.jsx("button",{type:"button",onClick:()=>S(C.id,"skip"),className:"inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs bg-zinc-700 hover:bg-zinc-600 text-zinc-200 transition-colors",children:"Skip"})]})})]},C.id))})]})})]})]})]})}function dA({agentId:e,agent:t,phase:r,hasUnits:n,isExpanded:s,onToggle:o,actions:c,unitActions:i}){return x.jsxs(x.Fragment,{children:[x.jsxs("tr",{className:"border-b border-border/50",children:[x.jsx("td",{className:"py-2 pr-3 font-mono text-xs",children:x.jsxs("div",{className:"flex items-center gap-1",children:[n&&x.jsx("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground",children:s?x.jsx(Uu,{className:"h-3.5 w-3.5"}):x.jsx(qv,{className:"h-3.5 w-3.5"})}),e]})}),x.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:r??"—"}),x.jsx("td",{className:"py-2 pr-3",children:x.jsx(Ns,{status:t.status})}),x.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Yi(t.triggered_at)}),x.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Yi(t.completed_at)}),x.jsx("td",{className:"py-2",children:c})]}),n&&s&&Object.entries(t.units).map(([a,d])=>x.jsxs("tr",{className:"border-b border-border/30 bg-zinc-900/30",children:[x.jsx("td",{className:"py-1.5 pr-3 pl-8 font-mono text-xs text-muted-foreground",children:a}),x.jsx("td",{className:"py-1.5 pr-3"}),x.jsx("td",{className:"py-1.5 pr-3",children:x.jsx(Ns,{status:d.status})}),x.jsx("td",{className:"py-1.5 pr-3 text-xs text-muted-foreground",children:Yi(d.triggered_at)}),x.jsx("td",{className:"py-1.5 pr-3 text-xs text-muted-foreground",children:Yi(d.completed_at)}),x.jsx("td",{className:"py-1.5",children:i(a,d.status)})]},`${e}-${a}`))]})}function hA({onLogout:e}){const[t,r]=b.useState(null),[n,s]=b.useState(null),[o,c]=b.useState(null),[i,a]=b.useState(!0),[d,m]=b.useState(!1),[u,v]=b.useState(!1),[y,S]=b.useState("dashboard"),[g,p]=b.useState(null),[h,l]=b.useState(!1),[f,_]=b.useState(!1),[E,k]=b.useState([]),[C,w]=b.useState(!1),[P,T]=b.useState(null),[M,j]=b.useState(new Set),[N,F]=b.useState({}),[V,K]=b.useState({}),[q,B]=b.useState({}),R=async()=>{await fetch("/api/auth",{method:"DELETE"}),e()},L=b.useCallback(H=>{switch(H.type){case"tracker_update":s(H.agents),w(!1),H.interventions&&k(H.interventions);break;case"pipeline_stalled":w(!0);break;case"pipeline_completed":T("completed");break;case"run_status_change":T(H.status);break;case"sessions_needing_attention":j(new Set(H.agentIds));break;case"session_previews":F(H.previews);break;case"workspace_setup_progress":B(U=>({...U,workspace_setup:{messages:H.messages,templateMatch:H.templateMatch}}));break;case"impl_prep_progress":B(U=>({...U,impl_prep:{messages:H.messages}}));break;case"post_impl_launch_progress":B(U=>({...U,post_impl_launch:{messages:H.messages,appUrl:H.appUrl}}));break;case"node_start_failed":K(U=>({...U,[H.agentId]:H.error}));break;case"llm_node_started":p(H.sessionId),v(!0),_(!1);break;case"llm_node_stopped":_(!0);break}},[]);kd({onMessage:L}),b.useEffect(()=>{Promise.all([fetch("/api/pipeline-graph").then(H=>H.json()),fetch("/api/pipeline-tracker").then(H=>H.json()).catch(()=>null),fetch("/api/terminal-status").then(H=>H.json()).catch(()=>({available:!1})),fetch("/api/active-llm-session").then(H=>H.json()).catch(()=>null),fetch("/terminal/api/sessions/list").then(H=>H.json()).catch(()=>({sessions:[]})),fetch("/api/node-errors").then(H=>H.json()).catch(()=>[])]).then(([H,U,G,O,A,z])=>{const $=H.error?null:H.data??H;H.error?c(H.error):r($),U!=null&&U.agents&&s(U.agents),Array.isArray(U==null?void 0:U.interventions)&&k(U.interventions),U!=null&&U.runStatus&&T(U.runStatus);const Y=G.available===!0;m(Y),Y&&(O!=null&&O.sessionId)&&(p(O.sessionId),v(!0));const X=(A==null?void 0:A.sessions)??[];if(l(X.some(ne=>ne.active)),Array.isArray(z)){const ne={};for(const oe of z)oe.agentId&&oe.error&&(ne[oe.agentId]=oe.error);Object.keys(ne).length>0&&K(ne)}}).catch(H=>c(String(H))).finally(()=>a(!1))},[]);const I=b.useCallback(()=>{w(!1),fetch("/api/poke-orchestrator",{method:"POST"}).catch(H=>console.error("Poke failed:",H))},[]),D=b.useCallback(H=>{p(H),v(!0)},[]),W=b.useCallback((H,U)=>{k(G=>G.filter(O=>O.id!==H)),fetch("/api/resolve-intervention",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:H,response:U})}).catch(G=>console.error("Failed to resolve intervention:",G))},[]);return x.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[x.jsx(OL,{}),x.jsxs("div",{className:"flex flex-1 min-h-0",children:[x.jsx(jL,{onLogout:R,terminalAvailable:d,activePage:y,onNavigate:S}),x.jsxs("main",{className:"flex-1 overflow-y-auto content-gradient",children:[y==="dashboard"&&x.jsxs("div",{className:"welcome-content",children:[x.jsx("h1",{children:"Welcome to LaunchPod"}),i?x.jsx("p",{className:"text-muted-foreground",children:"Loading pipeline graph..."}):o?x.jsx("p",{className:"text-destructive",children:o}):t?x.jsx(x.Fragment,{children:x.jsx(UL,{data:t,agentStatuses:n??void 0,interventions:E,onResolveIntervention:W,stalled:C,onPoke:I,attentionAgentIds:M,sessionPreviews:N,onOpenTerminal:D,podProgressStates:q,runStatus:P??void 0,nodeErrors:V})}):null]}),y==="terminal"&&x.jsx(aA,{}),y==="settings"&&x.jsx(YL,{}),y==="repair"&&x.jsx(uA,{})]})]}),d&&x.jsx(sA,{open:u,onClose:()=>v(!1),autoSessionId:g}),C&&x.jsx("button",{type:"button",onClick:I,className:"pipeline-poke-fab",title:"Poke orchestrator",children:x.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),x.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]})})]})}function fA(){const[e,t]=b.useState(null);return b.useEffect(()=>{fetch("/api/auth").then(r=>r.json()).then(r=>t(r.authenticated)).catch(()=>t(!1))},[]),e===null?x.jsx(CL,{fullPage:!0}):x.jsxs(dx,{children:[x.jsx(bc,{path:"/login",element:e?x.jsx(Uh,{to:"/",replace:!0}):x.jsx(DL,{onSuccess:()=>t(!0)})}),x.jsx(bc,{path:"/",element:e?x.jsx(hA,{onLogout:()=>t(!1)}):x.jsx(Uh,{to:"/login",replace:!0})})]})}Tl.createRoot(document.getElementById("root")).render(x.jsx(Ve.StrictMode,{children:x.jsx(px,{children:x.jsx(gx,{children:x.jsx(fA,{})})})}));
|