@launchsecure/launch-kit 0.0.41 → 0.0.43

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.
Files changed (79) hide show
  1. package/dist/chart-client/assets/index-DOKsFe5i.css +1 -0
  2. package/dist/chart-client/index.html +2 -2
  3. package/dist/client/assets/index-BqiDfvZi.js +294 -0
  4. package/dist/client/assets/index-Mewz-s77.css +32 -0
  5. package/dist/client/index.html +2 -2
  6. package/dist/council-client/assets/index-o_3y7Z0J.css +1 -0
  7. package/dist/council-client/index.html +2 -2
  8. package/dist/deck-client/assets/{_baseUniq-mvYvzeEJ.js → _baseUniq-C6w7kg8x.js} +1 -1
  9. package/dist/deck-client/assets/{arc-CX4ylnp2.js → arc-Cx9pT3Nn.js} +1 -1
  10. package/dist/deck-client/assets/{architectureDiagram-Q4EWVU46-BkR-5IRK.js → architectureDiagram-Q4EWVU46-BITSj3vA.js} +1 -1
  11. package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-DVNQht7c.js → blockDiagram-DXYQGD6D-BehOFuwh.js} +1 -1
  12. package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-Cbq1rlG8.js → c4Diagram-AHTNJAMY-BZTYM4na.js} +1 -1
  13. package/dist/deck-client/assets/channel-Cw2WDt9a.js +1 -0
  14. package/dist/deck-client/assets/{chunk-4BX2VUAB-D58Co4lU.js → chunk-4BX2VUAB-CCUx5CTd.js} +1 -1
  15. package/dist/deck-client/assets/{chunk-4TB4RGXK-BYvhTm3d.js → chunk-4TB4RGXK-UDZXXga6.js} +1 -1
  16. package/dist/deck-client/assets/{chunk-55IACEB6-oWukUhYg.js → chunk-55IACEB6-CfcU6PIW.js} +1 -1
  17. package/dist/deck-client/assets/{chunk-EDXVE4YY-Cm58kVnZ.js → chunk-EDXVE4YY-BK6F5Fof.js} +1 -1
  18. package/dist/deck-client/assets/{chunk-FMBD7UC4-Dg-i7kzi.js → chunk-FMBD7UC4-C-2idlFB.js} +1 -1
  19. package/dist/deck-client/assets/{chunk-OYMX7WX6-C72wigPl.js → chunk-OYMX7WX6-D6hBkYLP.js} +1 -1
  20. package/dist/deck-client/assets/{chunk-QZHKN3VN-CLgeuAKw.js → chunk-QZHKN3VN-DixNpysA.js} +1 -1
  21. package/dist/deck-client/assets/{chunk-YZCP3GAM-HDDlJ5oI.js → chunk-YZCP3GAM-Cd3pNBtQ.js} +1 -1
  22. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-JLUXVCUr.js +1 -0
  23. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-JLUXVCUr.js +1 -0
  24. package/dist/deck-client/assets/clone-H0XCnSb6.js +1 -0
  25. package/dist/deck-client/assets/{cose-bilkent-S5V4N54A-CUXQKg2M.js → cose-bilkent-S5V4N54A-OF3JWdEt.js} +1 -1
  26. package/dist/deck-client/assets/{dagre-KV5264BT-C5M-fVDc.js → dagre-KV5264BT-Bqu-qcv4.js} +1 -1
  27. package/dist/deck-client/assets/{diagram-5BDNPKRD-CcVsQ0S8.js → diagram-5BDNPKRD--0eHmUBS.js} +1 -1
  28. package/dist/deck-client/assets/{diagram-G4DWMVQ6-DJswXyep.js → diagram-G4DWMVQ6-nss6oL20.js} +1 -1
  29. package/dist/deck-client/assets/{diagram-MMDJMWI5-CGT76fm1.js → diagram-MMDJMWI5-D_gSGnLR.js} +1 -1
  30. package/dist/deck-client/assets/{diagram-TYMM5635-BBsYUNN6.js → diagram-TYMM5635-BIt-P6Pk.js} +1 -1
  31. package/dist/deck-client/assets/{erDiagram-SMLLAGMA-DKWYEHQS.js → erDiagram-SMLLAGMA-Bi-E4KQm.js} +1 -1
  32. package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-DLuDYIKT.js → flowDiagram-DWJPFMVM-DMJCvLMA.js} +1 -1
  33. package/dist/deck-client/assets/{ganttDiagram-T4ZO3ILL-B19b6Qtj.js → ganttDiagram-T4ZO3ILL-C3xgEoPD.js} +1 -1
  34. package/dist/deck-client/assets/{gitGraphDiagram-UUTBAWPF-BYLAfYVS.js → gitGraphDiagram-UUTBAWPF-CD0BEGAW.js} +1 -1
  35. package/dist/deck-client/assets/{graph-CfzQUfPh.js → graph-Dtsd9Jwe.js} +1 -1
  36. package/dist/deck-client/assets/index-C6YxyZay.css +1 -0
  37. package/dist/deck-client/assets/{index-DlwdTgE_.js → index-TFX8vtTG.js} +2 -2
  38. package/dist/deck-client/assets/{infoDiagram-42DDH7IO-Dp3mUA9c.js → infoDiagram-42DDH7IO-7IcQYqe_.js} +1 -1
  39. package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-BhrNX_jI.js → ishikawaDiagram-UXIWVN3A-DsCEbx3u.js} +1 -1
  40. package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-B5lJI492.js → journeyDiagram-VCZTEJTY-1mP2JwCk.js} +1 -1
  41. package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-D9-lmhQf.js → kanban-definition-6JOO6SKY-vT0Xrqh9.js} +1 -1
  42. package/dist/deck-client/assets/{layout-CfIe_Su8.js → layout-Cw4rS2pn.js} +1 -1
  43. package/dist/deck-client/assets/{linear-09ZFRoh_.js → linear-CzOjL-Ih.js} +1 -1
  44. package/dist/deck-client/assets/{mermaid.core-BaQyIOvj.js → mermaid.core-DYi3A-qK.js} +4 -4
  45. package/dist/deck-client/assets/{min-CYwCzYaL.js → min-DstloRoL.js} +1 -1
  46. package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-CouFxf6C.js → mindmap-definition-QFDTVHPH-D-cCX2d2.js} +1 -1
  47. package/dist/deck-client/assets/{pieDiagram-DEJITSTG-DMB1ufC0.js → pieDiagram-DEJITSTG-BqW2NTmy.js} +1 -1
  48. package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-CBiOKudN.js → quadrantDiagram-34T5L4WZ-DbJoWA8f.js} +1 -1
  49. package/dist/deck-client/assets/{requirementDiagram-MS252O5E-BMc3GJkx.js → requirementDiagram-MS252O5E-DQrUiz_d.js} +1 -1
  50. package/dist/deck-client/assets/{sankeyDiagram-XADWPNL6-CxACUncm.js → sankeyDiagram-XADWPNL6-kB7PZc3g.js} +1 -1
  51. package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-Ch-P3Mzc.js → sequenceDiagram-FGHM5R23-CpyVu1TN.js} +1 -1
  52. package/dist/deck-client/assets/{stateDiagram-FHFEXIEX-Cy8n7Yzk.js → stateDiagram-FHFEXIEX-CjqQcnty.js} +1 -1
  53. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-tfMSn8xx.js +1 -0
  54. package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-C2V4sSkm.js → timeline-definition-GMOUNBTQ-B2PAO9bk.js} +1 -1
  55. package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-YOqt4VbE.js → vennDiagram-DHZGUBPP-C0G3ItCr.js} +1 -1
  56. package/dist/deck-client/assets/{wardley-RL74JXVD-Bxo5x40D.js → wardley-RL74JXVD-B0TVaOmp.js} +1 -1
  57. package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-DW9SOqbx.js → wardleyDiagram-NUSXRM2D-B-qtbNZe.js} +1 -1
  58. package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-D-rZvZOL.js → xychartDiagram-5P7HB3ND-41kcBoBE.js} +1 -1
  59. package/dist/deck-client/index.html +2 -2
  60. package/dist/server/cli.js +484 -77
  61. package/dist/server/deck-mcp-entry.js +137 -2
  62. package/dist/server/deck-serve.js +93 -1
  63. package/dist/server/init-entry.js +47 -21
  64. package/dist/server/launch-bot-entry.js +38 -4
  65. package/dist/server/radar-docker-init-entry.js +46 -20
  66. package/dist/server/rover-entry.js +6047 -5155
  67. package/package.json +1 -1
  68. package/dist/chart-client/assets/index-Dd6IotOZ.css +0 -1
  69. package/dist/client/assets/index-BoIjawzY.js +0 -294
  70. package/dist/client/assets/index-DE0uje6k.css +0 -32
  71. package/dist/council-client/assets/index-CGYusOCK.css +0 -1
  72. package/dist/deck-client/assets/channel-B9GC-CLn.js +0 -1
  73. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-CFBvYQ9j.js +0 -1
  74. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-CFBvYQ9j.js +0 -1
  75. package/dist/deck-client/assets/clone-n-WQlAGe.js +0 -1
  76. package/dist/deck-client/assets/index-evAPhGvM.css +0 -1
  77. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-C14VKCzi.js +0 -1
  78. /package/dist/chart-client/assets/{index-CrYM1-ac.js → index-DJQYgFcp.js} +0 -0
  79. /package/dist/council-client/assets/{index-DkTFX53U.js → index-Wn06apTg.js} +0 -0
@@ -1,294 +0,0 @@
1
- function Yy(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 Kf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gf={exports:{}},Qo={},qf={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 si=Symbol.for("react.element"),Qy=Symbol.for("react.portal"),Jy=Symbol.for("react.fragment"),Zy=Symbol.for("react.strict_mode"),eS=Symbol.for("react.profiler"),tS=Symbol.for("react.provider"),rS=Symbol.for("react.context"),nS=Symbol.for("react.forward_ref"),sS=Symbol.for("react.suspense"),iS=Symbol.for("react.memo"),oS=Symbol.for("react.lazy"),Ad=Symbol.iterator;function aS(e){return e===null||typeof e!="object"?null:(e=Ad&&e[Ad]||e["@@iterator"],typeof e=="function"?e:null)}var Xf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yf=Object.assign,Qf={};function Yn(e,t,r){this.props=e,this.context=t,this.refs=Qf,this.updater=r||Xf}Yn.prototype.isReactComponent={};Yn.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")};Yn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Jf(){}Jf.prototype=Yn.prototype;function Uc(e,t,r){this.props=e,this.context=t,this.refs=Qf,this.updater=r||Xf}var Vc=Uc.prototype=new Jf;Vc.constructor=Uc;Yf(Vc,Yn.prototype);Vc.isPureReactComponent=!0;var Dd=Array.isArray,Zf=Object.prototype.hasOwnProperty,Kc={current:null},ep={key:!0,ref:!0,__self:!0,__source:!0};function tp(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)Zf.call(t,n)&&!ep.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),u=0;u<i;u++)a[u]=arguments[u+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:si,type:e,key:o,ref:c,props:s,_owner:Kc.current}}function lS(e,t){return{$$typeof:si,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Gc(e){return typeof e=="object"&&e!==null&&e.$$typeof===si}function cS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Md=/\/+/g;function Ha(e,t){return typeof e=="object"&&e!==null&&e.key!=null?cS(""+e.key):t.toString(36)}function Ji(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 si:case Qy:c=!0}}if(c)return c=e,s=s(c),e=n===""?"."+Ha(c,0):n,Dd(s)?(r="",e!=null&&(r=e.replace(Md,"$&/")+"/"),Ji(s,t,r,"",function(u){return u})):s!=null&&(Gc(s)&&(s=lS(s,r+(!s.key||c&&c.key===s.key?"":(""+s.key).replace(Md,"$&/")+"/")+e)),t.push(s)),1;if(c=0,n=n===""?".":n+":",Dd(e))for(var i=0;i<e.length;i++){o=e[i];var a=n+Ha(o,i);c+=Ji(o,t,r,a,s)}else if(a=aS(e),typeof a=="function")for(e=a.call(e),i=0;!(o=e.next()).done;)o=o.value,a=n+Ha(o,i++),c+=Ji(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 Ci(e,t,r){if(e==null)return e;var n=[],s=0;return Ji(e,n,"","",function(o){return t.call(r,o,s++)}),n}function uS(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},Zi={transition:null},dS={ReactCurrentDispatcher:ze,ReactCurrentBatchConfig:Zi,ReactCurrentOwner:Kc};function rp(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:Ci,forEach:function(e,t,r){Ci(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Ci(e,function(){t++}),t},toArray:function(e){return Ci(e,function(t){return t})||[]},only:function(e){if(!Gc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Component=Yn;le.Fragment=Jy;le.Profiler=eS;le.PureComponent=Uc;le.StrictMode=Zy;le.Suspense=sS;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dS;le.act=rp;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=Yf({},e.props),s=e.key,o=e.ref,c=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,c=Kc.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(a in t)Zf.call(t,a)&&!ep.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 u=0;u<a;u++)i[u]=arguments[u+2];n.children=i}return{$$typeof:si,type:e.type,key:s,ref:o,props:n,_owner:c}};le.createContext=function(e){return e={$$typeof:rS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:tS,_context:e},e.Consumer=e};le.createElement=tp;le.createFactory=function(e){var t=tp.bind(null,e);return t.type=e,t};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:nS,render:e}};le.isValidElement=Gc;le.lazy=function(e){return{$$typeof:oS,_payload:{_status:-1,_result:e},_init:uS}};le.memo=function(e,t){return{$$typeof:iS,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=Zi.transition;Zi.transition={};try{e()}finally{Zi.transition=t}};le.unstable_act=rp;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";qf.exports=le;var x=qf.exports;const Ve=Kf(x),Jo=Yy({__proto__:null,default:Ve},[x]);/**
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 hS=x,fS=Symbol.for("react.element"),pS=Symbol.for("react.fragment"),mS=Object.prototype.hasOwnProperty,gS=hS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vS={key:!0,ref:!0,__self:!0,__source:!0};function np(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)mS.call(t,n)&&!vS.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:fS,type:e,key:o,ref:c,props:s,_owner:gS.current}}Qo.Fragment=pS;Qo.jsx=np;Qo.jsxs=np;Gf.exports=Qo;var y=Gf.exports,Al={},sp={exports:{}},at={},ip={exports:{}},op={};/**
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,P){var L=B.length;B.push(P);e:for(;0<L;){var I=L-1>>>1,D=B[I];if(0<s(D,P))B[I]=P,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 P=B[0],L=B.pop();if(L!==P){B[0]=L;e:for(var I=0,D=B.length,W=D>>>1;I<W;){var $=2*(I+1)-1,U=B[$],G=$+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[$]=L,I=$);else if(G<D&&0>s(O,L))B[I]=O,B[G]=L,I=G;else break e}}return P}function s(B,P){var L=B.sortIndex-P.sortIndex;return L!==0?L:B.id-P.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=[],u=[],m=1,d=null,g=3,_=!1,w=!1,v=!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 P=r(u);P!==null;){if(P.callback===null)n(u);else if(P.startTime<=B)n(u),P.sortIndex=P.expirationTime,t(a,P);else break;P=r(u)}}function S(B){if(v=!1,f(B),!w)if(r(a)!==null)w=!0,K(E);else{var P=r(u);P!==null&&q(S,P.startTime-B)}}function E(B,P){w=!1,v&&(v=!1,h(b),b=-1),_=!0;var L=g;try{for(f(P),d=r(a);d!==null&&(!(d.expirationTime>P)||B&&!M());){var I=d.callback;if(typeof I=="function"){d.callback=null,g=d.priorityLevel;var D=I(d.expirationTime<=P);P=e.unstable_now(),typeof D=="function"?d.callback=D:d===r(a)&&n(a),f(P)}else n(a);d=r(a)}if(d!==null)var W=!0;else{var $=r(u);$!==null&&q(S,$.startTime-P),W=!1}return W}finally{d=null,g=L,_=!1}}var k=!1,C=null,b=-1,R=5,T=-1;function M(){return!(e.unstable_now()-T<R)}function j(){if(C!==null){var B=e.unstable_now();T=B;var P=!0;try{P=C(!0,B)}finally{P?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,P){b=p(function(){B(e.unstable_now())},P)}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(){w||_||(w=!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"):R=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return r(a)},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var P=3;break;default:P=g}var L=g;g=P;try{return B()}finally{g=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,P){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var L=g;g=B;try{return P()}finally{g=L}},e.unstable_scheduleCallback=function(B,P,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:P,priorityLevel:B,startTime:L,expirationTime:D,sortIndex:-1},L>I?(B.sortIndex=L,t(u,B),r(a)===null&&B===r(u)&&(v?(h(b),b=-1):v=!0,q(S,L-I))):(B.sortIndex=D,t(a,B),w||_||(w=!0,K(E))),B},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(B){var P=g;return function(){var L=g;g=P;try{return B.apply(this,arguments)}finally{g=L}}}})(op);ip.exports=op;var _S=ip.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 yS=x,ot=_S;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 ap=new Set,Os={};function an(e,t){Fn(e,t),Fn(e+"Capture",t)}function Fn(e,t){for(Os[e]=t,e=0;e<t.length;e++)ap.add(t[e])}var qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dl=Object.prototype.hasOwnProperty,SS=/^[: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]*$/,Nd={},Id={};function wS(e){return Dl.call(Id,e)?!0:Dl.call(Nd,e)?!1:SS.test(e)?Id[e]=!0:(Nd[e]=!0,!1)}function xS(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 bS(e,t,r,n){if(t===null||typeof t>"u"||xS(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 qc=/[\-:]([a-z])/g;function Xc(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(qc,Xc);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(qc,Xc);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(qc,Xc);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 Yc(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")&&(bS(t,r,s,n)&&(r=null),n||s===null?wS(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=yS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ei=Symbol.for("react.element"),yn=Symbol.for("react.portal"),Sn=Symbol.for("react.fragment"),Qc=Symbol.for("react.strict_mode"),Ml=Symbol.for("react.profiler"),lp=Symbol.for("react.provider"),cp=Symbol.for("react.context"),Jc=Symbol.for("react.forward_ref"),Nl=Symbol.for("react.suspense"),Il=Symbol.for("react.suspense_list"),Zc=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),up=Symbol.for("react.offscreen"),Od=Symbol.iterator;function cs(e){return e===null||typeof e!="object"?null:(e=Od&&e[Od]||e["@@iterator"],typeof e=="function"?e:null)}var Se=Object.assign,za;function Ss(e){if(za===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);za=t&&t[1]||""}return`
34
- `+za+e}var Wa=!1;function Ua(e,t){if(!e||Wa)return"";Wa=!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(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.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{Wa=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ss(e):""}function CS(e){switch(e.tag){case 5:return Ss(e.type);case 16:return Ss("Lazy");case 13:return Ss("Suspense");case 19:return Ss("SuspenseList");case 0:case 2:case 15:return e=Ua(e.type,!1),e;case 11:return e=Ua(e.type.render,!1),e;case 1:return e=Ua(e.type,!0),e;default:return""}}function Ol(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 Sn:return"Fragment";case yn:return"Portal";case Ml:return"Profiler";case Qc:return"StrictMode";case Nl:return"Suspense";case Il:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cp:return(e.displayName||"Context")+".Consumer";case lp:return(e._context.displayName||"Context")+".Provider";case Jc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zc:return t=e.displayName||null,t!==null?t:Ol(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Ol(e(t))}catch{}}return null}function ES(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 Ol(t);case 8:return t===Qc?"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 dp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kS(e){var t=dp(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 ki(e){e._valueTracker||(e._valueTracker=kS(e))}function hp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=dp(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function po(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 jl(e,t){var r=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function jd(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 fp(e,t){t=t.checked,t!=null&&Yc(e,"checked",t,!1)}function Bl(e,t){fp(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")?Fl(e,t.type,r):t.hasOwnProperty("defaultValue")&&Fl(e,t.type,Er(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bd(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 Fl(e,t,r){(t!=="number"||po(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ws=Array.isArray;function An(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 $l(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fd(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(ws(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 pp(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 $d(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function mp(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 Hl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?mp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ri,gp=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(Ri=Ri||document.createElement("div"),Ri.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ri.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function js(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ks={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},RS=["Webkit","ms","Moz","O"];Object.keys(ks).forEach(function(e){RS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ks[t]=ks[e]})});function vp(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ks.hasOwnProperty(e)&&ks[e]?(""+t).trim():t+"px"}function _p(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=vp(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var PS=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 zl(e,t){if(t){if(PS[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 Wl(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 Ul=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vl=null,Dn=null,Mn=null;function Hd(e){if(e=ai(e)){if(typeof Vl!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=na(t),Vl(e.stateNode,e.type,t))}}function yp(e){Dn?Mn?Mn.push(e):Mn=[e]:Dn=e}function Sp(){if(Dn){var e=Dn,t=Mn;if(Mn=Dn=null,Hd(e),t)for(e=0;e<t.length;e++)Hd(t[e])}}function wp(e,t){return e(t)}function xp(){}var Va=!1;function bp(e,t,r){if(Va)return e(t,r);Va=!0;try{return wp(e,t,r)}finally{Va=!1,(Dn!==null||Mn!==null)&&(xp(),Sp())}}function Bs(e,t){var r=e.stateNode;if(r===null)return null;var n=na(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 Kl=!1;if(qt)try{var us={};Object.defineProperty(us,"passive",{get:function(){Kl=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{Kl=!1}function TS(e,t,r,n,s,o,c,i,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(m){this.onError(m)}}var Rs=!1,mo=null,go=!1,Gl=null,LS={onError:function(e){Rs=!0,mo=e}};function AS(e,t,r,n,s,o,c,i,a){Rs=!1,mo=null,TS.apply(LS,arguments)}function DS(e,t,r,n,s,o,c,i,a){if(AS.apply(this,arguments),Rs){if(Rs){var u=mo;Rs=!1,mo=null}else throw Error(Q(198));go||(go=!0,Gl=u)}}function ln(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 Cp(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 zd(e){if(ln(e)!==e)throw Error(Q(188))}function MS(e){var t=e.alternate;if(!t){if(t=ln(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 zd(s),e;if(o===n)return zd(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 Ep(e){return e=MS(e),e!==null?kp(e):null}function kp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=kp(e);if(t!==null)return t;e=e.sibling}return null}var Rp=ot.unstable_scheduleCallback,Wd=ot.unstable_cancelCallback,NS=ot.unstable_shouldYield,IS=ot.unstable_requestPaint,xe=ot.unstable_now,OS=ot.unstable_getCurrentPriorityLevel,tu=ot.unstable_ImmediatePriority,Pp=ot.unstable_UserBlockingPriority,vo=ot.unstable_NormalPriority,jS=ot.unstable_LowPriority,Tp=ot.unstable_IdlePriority,Zo=null,Ot=null;function BS(e){if(Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Zo,e,void 0,(e.current.flags&128)===128)}catch{}}var Ct=Math.clz32?Math.clz32:HS,FS=Math.log,$S=Math.LN2;function HS(e){return e>>>=0,e===0?32:31-(FS(e)/$S|0)|0}var Pi=64,Ti=4194304;function xs(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 _o(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=xs(i):(o&=c,o!==0&&(n=xs(o)))}else c=r&~s,c!==0?n=xs(c):o!==0&&(n=xs(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 zS(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 WS(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]=zS(i,t)):a<=t&&(e.expiredLanes|=i),o&=~i}}function ql(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Lp(){var e=Pi;return Pi<<=1,!(Pi&4194240)&&(Pi=64),e}function Ka(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ii(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 US(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 ru(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 Ap(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Dp,nu,Mp,Np,Ip,Xl=!1,Li=[],gr=null,vr=null,_r=null,Fs=new Map,$s=new Map,dr=[],VS="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 Ud(e,t){switch(e){case"focusin":case"focusout":gr=null;break;case"dragenter":case"dragleave":vr=null;break;case"mouseover":case"mouseout":_r=null;break;case"pointerover":case"pointerout":Fs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$s.delete(t.pointerId)}}function ds(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=ai(t),t!==null&&nu(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function KS(e,t,r,n,s){switch(t){case"focusin":return gr=ds(gr,e,t,r,n,s),!0;case"dragenter":return vr=ds(vr,e,t,r,n,s),!0;case"mouseover":return _r=ds(_r,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return Fs.set(o,ds(Fs.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,$s.set(o,ds($s.get(o)||null,e,t,r,n,s)),!0}return!1}function Op(e){var t=Ur(e.target);if(t!==null){var r=ln(t);if(r!==null){if(t=r.tag,t===13){if(t=Cp(r),t!==null){e.blockedOn=t,Ip(e.priority,function(){Mp(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 eo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Yl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ul=n,r.target.dispatchEvent(n),Ul=null}else return t=ai(r),t!==null&&nu(t),e.blockedOn=r,!1;t.shift()}return!0}function Vd(e,t,r){eo(e)&&r.delete(t)}function GS(){Xl=!1,gr!==null&&eo(gr)&&(gr=null),vr!==null&&eo(vr)&&(vr=null),_r!==null&&eo(_r)&&(_r=null),Fs.forEach(Vd),$s.forEach(Vd)}function hs(e,t){e.blockedOn===t&&(e.blockedOn=null,Xl||(Xl=!0,ot.unstable_scheduleCallback(ot.unstable_NormalPriority,GS)))}function Hs(e){function t(s){return hs(s,e)}if(0<Li.length){hs(Li[0],e);for(var r=1;r<Li.length;r++){var n=Li[r];n.blockedOn===e&&(n.blockedOn=null)}}for(gr!==null&&hs(gr,e),vr!==null&&hs(vr,e),_r!==null&&hs(_r,e),Fs.forEach(t),$s.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);)Op(r),r.blockedOn===null&&dr.shift()}var Nn=er.ReactCurrentBatchConfig,yo=!0;function qS(e,t,r,n){var s=de,o=Nn.transition;Nn.transition=null;try{de=1,su(e,t,r,n)}finally{de=s,Nn.transition=o}}function XS(e,t,r,n){var s=de,o=Nn.transition;Nn.transition=null;try{de=4,su(e,t,r,n)}finally{de=s,Nn.transition=o}}function su(e,t,r,n){if(yo){var s=Yl(e,t,r,n);if(s===null)rl(e,t,n,So,r),Ud(e,n);else if(KS(s,e,t,r,n))n.stopPropagation();else if(Ud(e,n),t&4&&-1<VS.indexOf(e)){for(;s!==null;){var o=ai(s);if(o!==null&&Dp(o),o=Yl(e,t,r,n),o===null&&rl(e,t,n,So,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else rl(e,t,n,null,r)}}var So=null;function Yl(e,t,r,n){if(So=null,e=eu(n),e=Ur(e),e!==null)if(t=ln(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Cp(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 So=e,null}function jp(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(OS()){case tu:return 1;case Pp:return 4;case vo:case jS:return 16;case Tp:return 536870912;default:return 16}default:return 16}}var fr=null,iu=null,to=null;function Bp(){if(to)return to;var e,t=iu,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 to=s.slice(e,1<n?1-n:void 0)}function ro(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 Ai(){return!0}function Kd(){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)?Ai:Kd,this.isPropagationStopped=Kd,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=Ai)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ai)},persist:function(){},isPersistent:Ai}),t}var Qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ou=lt(Qn),oi=Se({},Qn,{view:0,detail:0}),YS=lt(oi),Ga,qa,fs,ea=Se({},oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:au,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!==fs&&(fs&&e.type==="mousemove"?(Ga=e.screenX-fs.screenX,qa=e.screenY-fs.screenY):qa=Ga=0,fs=e),Ga)},movementY:function(e){return"movementY"in e?e.movementY:qa}}),Gd=lt(ea),QS=Se({},ea,{dataTransfer:0}),JS=lt(QS),ZS=Se({},oi,{relatedTarget:0}),Xa=lt(ZS),ew=Se({},Qn,{animationName:0,elapsedTime:0,pseudoElement:0}),tw=lt(ew),rw=Se({},Qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nw=lt(rw),sw=Se({},Qn,{data:0}),qd=lt(sw),iw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ow={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"},aw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=aw[e])?!!t[e]:!1}function au(){return lw}var cw=Se({},oi,{key:function(e){if(e.key){var t=iw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ow[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:au,charCode:function(e){return e.type==="keypress"?ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uw=lt(cw),dw=Se({},ea,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xd=lt(dw),hw=Se({},oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:au}),fw=lt(hw),pw=Se({},Qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),mw=lt(pw),gw=Se({},ea,{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}),vw=lt(gw),_w=[9,13,27,32],lu=qt&&"CompositionEvent"in window,Ps=null;qt&&"documentMode"in document&&(Ps=document.documentMode);var yw=qt&&"TextEvent"in window&&!Ps,Fp=qt&&(!lu||Ps&&8<Ps&&11>=Ps),Yd=" ",Qd=!1;function $p(e,t){switch(e){case"keyup":return _w.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wn=!1;function Sw(e,t){switch(e){case"compositionend":return Hp(t);case"keypress":return t.which!==32?null:(Qd=!0,Yd);case"textInput":return e=t.data,e===Yd&&Qd?null:e;default:return null}}function ww(e,t){if(wn)return e==="compositionend"||!lu&&$p(e,t)?(e=Bp(),to=iu=fr=null,wn=!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 Fp&&t.locale!=="ko"?null:t.data;default:return null}}var xw={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 Jd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xw[e.type]:t==="textarea"}function zp(e,t,r,n){yp(n),t=wo(t,"onChange"),0<t.length&&(r=new ou("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ts=null,zs=null;function bw(e){Zp(e,0)}function ta(e){var t=Cn(e);if(hp(t))return e}function Cw(e,t){if(e==="change")return t}var Wp=!1;if(qt){var Ya;if(qt){var Qa="oninput"in document;if(!Qa){var Zd=document.createElement("div");Zd.setAttribute("oninput","return;"),Qa=typeof Zd.oninput=="function"}Ya=Qa}else Ya=!1;Wp=Ya&&(!document.documentMode||9<document.documentMode)}function eh(){Ts&&(Ts.detachEvent("onpropertychange",Up),zs=Ts=null)}function Up(e){if(e.propertyName==="value"&&ta(zs)){var t=[];zp(t,zs,e,eu(e)),bp(bw,t)}}function Ew(e,t,r){e==="focusin"?(eh(),Ts=t,zs=r,Ts.attachEvent("onpropertychange",Up)):e==="focusout"&&eh()}function kw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ta(zs)}function Rw(e,t){if(e==="click")return ta(t)}function Pw(e,t){if(e==="input"||e==="change")return ta(t)}function Tw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:Tw;function Ws(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(!Dl.call(t,s)||!kt(e[s],t[s]))return!1}return!0}function th(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rh(e,t){var r=th(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=th(r)}}function Vp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kp(){for(var e=window,t=po();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=po(e.document)}return t}function cu(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 Lw(e){var t=Kp(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Vp(r.ownerDocument.documentElement,r)){if(n!==null&&cu(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=rh(r,o);var c=rh(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 Aw=qt&&"documentMode"in document&&11>=document.documentMode,xn=null,Ql=null,Ls=null,Jl=!1;function nh(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Jl||xn==null||xn!==po(n)||(n=xn,"selectionStart"in n&&cu(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}),Ls&&Ws(Ls,n)||(Ls=n,n=wo(Ql,"onSelect"),0<n.length&&(t=new ou("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=xn)))}function Di(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var bn={animationend:Di("Animation","AnimationEnd"),animationiteration:Di("Animation","AnimationIteration"),animationstart:Di("Animation","AnimationStart"),transitionend:Di("Transition","TransitionEnd")},Ja={},Gp={};qt&&(Gp=document.createElement("div").style,"AnimationEvent"in window||(delete bn.animationend.animation,delete bn.animationiteration.animation,delete bn.animationstart.animation),"TransitionEvent"in window||delete bn.transitionend.transition);function ra(e){if(Ja[e])return Ja[e];if(!bn[e])return e;var t=bn[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Gp)return Ja[e]=t[r];return e}var qp=ra("animationend"),Xp=ra("animationiteration"),Yp=ra("animationstart"),Qp=ra("transitionend"),Jp=new Map,sh="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){Jp.set(e,t),an(t,[e])}for(var Za=0;Za<sh.length;Za++){var el=sh[Za],Dw=el.toLowerCase(),Mw=el[0].toUpperCase()+el.slice(1);Lr(Dw,"on"+Mw)}Lr(qp,"onAnimationEnd");Lr(Xp,"onAnimationIteration");Lr(Yp,"onAnimationStart");Lr("dblclick","onDoubleClick");Lr("focusin","onFocus");Lr("focusout","onBlur");Lr(Qp,"onTransitionEnd");Fn("onMouseEnter",["mouseout","mouseover"]);Fn("onMouseLeave",["mouseout","mouseover"]);Fn("onPointerEnter",["pointerout","pointerover"]);Fn("onPointerLeave",["pointerout","pointerover"]);an("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));an("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));an("onBeforeInput",["compositionend","keypress","textInput","paste"]);an("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));an("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));an("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bs="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(" "),Nw=new Set("cancel close invalid load scroll toggle".split(" ").concat(bs));function ih(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,DS(n,t,void 0,e),e.currentTarget=null}function Zp(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,u=i.currentTarget;if(i=i.listener,a!==o&&s.isPropagationStopped())break e;ih(s,i,u),o=a}else for(c=0;c<n.length;c++){if(i=n[c],a=i.instance,u=i.currentTarget,i=i.listener,a!==o&&s.isPropagationStopped())break e;ih(s,i,u),o=a}}}if(go)throw e=Gl,go=!1,Gl=null,e}function pe(e,t){var r=t[nc];r===void 0&&(r=t[nc]=new Set);var n=e+"__bubble";r.has(n)||(em(t,e,2,!1),r.add(n))}function tl(e,t,r){var n=0;t&&(n|=4),em(r,e,n,t)}var Mi="_reactListening"+Math.random().toString(36).slice(2);function Us(e){if(!e[Mi]){e[Mi]=!0,ap.forEach(function(r){r!=="selectionchange"&&(Nw.has(r)||tl(r,!1,e),tl(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Mi]||(t[Mi]=!0,tl("selectionchange",!1,t))}}function em(e,t,r,n){switch(jp(t)){case 1:var s=qS;break;case 4:s=XS;break;default:s=su}r=s.bind(null,t,r,e),s=void 0,!Kl||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 rl(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=Ur(i),c===null)return;if(a=c.tag,a===5||a===6){n=o=c;continue e}i=i.parentNode}}n=n.return}bp(function(){var u=o,m=eu(r),d=[];e:{var g=Jp.get(e);if(g!==void 0){var _=ou,w=e;switch(e){case"keypress":if(ro(r)===0)break e;case"keydown":case"keyup":_=uw;break;case"focusin":w="focus",_=Xa;break;case"focusout":w="blur",_=Xa;break;case"beforeblur":case"afterblur":_=Xa;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":_=Gd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=JS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=fw;break;case qp:case Xp:case Yp:_=tw;break;case Qp:_=mw;break;case"scroll":_=YS;break;case"wheel":_=vw;break;case"copy":case"cut":case"paste":_=nw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Xd}var v=(t&4)!==0,p=!v&&e==="scroll",h=v?g!==null?g+"Capture":null:g;v=[];for(var l=u,f;l!==null;){f=l;var S=f.stateNode;if(f.tag===5&&S!==null&&(f=S,h!==null&&(S=Bs(l,h),S!=null&&v.push(Vs(l,S,f)))),p)break;l=l.return}0<v.length&&(g=new _(g,w,null,r,m),d.push({event:g,listeners:v}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",g&&r!==Ul&&(w=r.relatedTarget||r.fromElement)&&(Ur(w)||w[Xt]))break e;if((_||g)&&(g=m.window===m?m:(g=m.ownerDocument)?g.defaultView||g.parentWindow:window,_?(w=r.relatedTarget||r.toElement,_=u,w=w?Ur(w):null,w!==null&&(p=ln(w),w!==p||w.tag!==5&&w.tag!==6)&&(w=null)):(_=null,w=u),_!==w)){if(v=Gd,S="onMouseLeave",h="onMouseEnter",l="mouse",(e==="pointerout"||e==="pointerover")&&(v=Xd,S="onPointerLeave",h="onPointerEnter",l="pointer"),p=_==null?g:Cn(_),f=w==null?g:Cn(w),g=new v(S,l+"leave",_,r,m),g.target=p,g.relatedTarget=f,S=null,Ur(m)===u&&(v=new v(h,l+"enter",w,r,m),v.target=f,v.relatedTarget=p,S=v),p=S,_&&w)t:{for(v=_,h=w,l=0,f=v;f;f=fn(f))l++;for(f=0,S=h;S;S=fn(S))f++;for(;0<l-f;)v=fn(v),l--;for(;0<f-l;)h=fn(h),f--;for(;l--;){if(v===h||h!==null&&v===h.alternate)break t;v=fn(v),h=fn(h)}v=null}else v=null;_!==null&&oh(d,g,_,v,!1),w!==null&&p!==null&&oh(d,p,w,v,!0)}}e:{if(g=u?Cn(u):window,_=g.nodeName&&g.nodeName.toLowerCase(),_==="select"||_==="input"&&g.type==="file")var E=Cw;else if(Jd(g))if(Wp)E=Pw;else{E=kw;var k=Ew}else(_=g.nodeName)&&_.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(E=Rw);if(E&&(E=E(e,u))){zp(d,E,r,m);break e}k&&k(e,g,u),e==="focusout"&&(k=g._wrapperState)&&k.controlled&&g.type==="number"&&Fl(g,"number",g.value)}switch(k=u?Cn(u):window,e){case"focusin":(Jd(k)||k.contentEditable==="true")&&(xn=k,Ql=u,Ls=null);break;case"focusout":Ls=Ql=xn=null;break;case"mousedown":Jl=!0;break;case"contextmenu":case"mouseup":case"dragend":Jl=!1,nh(d,r,m);break;case"selectionchange":if(Aw)break;case"keydown":case"keyup":nh(d,r,m)}var C;if(lu)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else wn?$p(e,r)&&(b="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(b="onCompositionStart");b&&(Fp&&r.locale!=="ko"&&(wn||b!=="onCompositionStart"?b==="onCompositionEnd"&&wn&&(C=Bp()):(fr=m,iu="value"in fr?fr.value:fr.textContent,wn=!0)),k=wo(u,b),0<k.length&&(b=new qd(b,e,null,r,m),d.push({event:b,listeners:k}),C?b.data=C:(C=Hp(r),C!==null&&(b.data=C)))),(C=yw?Sw(e,r):ww(e,r))&&(u=wo(u,"onBeforeInput"),0<u.length&&(m=new qd("onBeforeInput","beforeinput",null,r,m),d.push({event:m,listeners:u}),m.data=C))}Zp(d,t)})}function Vs(e,t,r){return{instance:e,listener:t,currentTarget:r}}function wo(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Bs(e,r),o!=null&&n.unshift(Vs(e,o,s)),o=Bs(e,t),o!=null&&n.push(Vs(e,o,s))),e=e.return}return n}function fn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function oh(e,t,r,n,s){for(var o=t._reactName,c=[];r!==null&&r!==n;){var i=r,a=i.alternate,u=i.stateNode;if(a!==null&&a===n)break;i.tag===5&&u!==null&&(i=u,s?(a=Bs(r,o),a!=null&&c.unshift(Vs(r,a,i))):s||(a=Bs(r,o),a!=null&&c.push(Vs(r,a,i)))),r=r.return}c.length!==0&&e.push({event:t,listeners:c})}var Iw=/\r\n?/g,Ow=/\u0000|\uFFFD/g;function ah(e){return(typeof e=="string"?e:""+e).replace(Iw,`
38
- `).replace(Ow,"")}function Ni(e,t,r){if(t=ah(t),ah(e)!==t&&r)throw Error(Q(425))}function xo(){}var Zl=null,ec=null;function tc(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 rc=typeof setTimeout=="function"?setTimeout:void 0,jw=typeof clearTimeout=="function"?clearTimeout:void 0,lh=typeof Promise=="function"?Promise:void 0,Bw=typeof queueMicrotask=="function"?queueMicrotask:typeof lh<"u"?function(e){return lh.resolve(null).then(e).catch(Fw)}:rc;function Fw(e){setTimeout(function(){throw e})}function nl(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 ch(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 Jn=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Jn,Ks="__reactProps$"+Jn,Xt="__reactContainer$"+Jn,nc="__reactEvents$"+Jn,$w="__reactListeners$"+Jn,Hw="__reactHandles$"+Jn;function Ur(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=ch(e);e!==null;){if(r=e[Mt])return r;e=ch(e)}return t}e=r,r=e.parentNode}return null}function ai(e){return e=e[Mt]||e[Xt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function na(e){return e[Ks]||null}var sc=[],En=-1;function Ar(e){return{current:e}}function me(e){0>En||(e.current=sc[En],sc[En]=null,En--)}function fe(e,t){En++,sc[En]=e.current,e.current=t}var kr={},Fe=Ar(kr),qe=Ar(!1),Yr=kr;function $n(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 bo(){me(qe),me(Fe)}function uh(e,t,r){if(Fe.current!==kr)throw Error(Q(168));fe(Fe,t),fe(qe,r)}function tm(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,ES(e)||"Unknown",s));return Se({},r,n)}function Co(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kr,Yr=Fe.current,fe(Fe,e),fe(qe,qe.current),!0}function dh(e,t,r){var n=e.stateNode;if(!n)throw Error(Q(169));r?(e=tm(e,t,Yr),n.__reactInternalMemoizedMergedChildContext=e,me(qe),me(Fe),fe(Fe,e)):me(qe),fe(qe,r)}var Ut=null,sa=!1,sl=!1;function rm(e){Ut===null?Ut=[e]:Ut.push(e)}function zw(e){sa=!0,rm(e)}function Dr(){if(!sl&&Ut!==null){sl=!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,sa=!1}catch(s){throw Ut!==null&&(Ut=Ut.slice(e+1)),Rp(tu,Dr),s}finally{de=t,sl=!1}}return null}var kn=[],Rn=0,Eo=null,ko=0,dt=[],ht=0,Qr=null,Vt=1,Kt="";function zr(e,t){kn[Rn++]=ko,kn[Rn++]=Eo,Eo=e,ko=t}function nm(e,t,r){dt[ht++]=Vt,dt[ht++]=Kt,dt[ht++]=Qr,Qr=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 uu(e){e.return!==null&&(zr(e,1),nm(e,1,0))}function du(e){for(;e===Eo;)Eo=kn[--Rn],kn[Rn]=null,ko=kn[--Rn],kn[Rn]=null;for(;e===Qr;)Qr=dt[--ht],dt[ht]=null,Kt=dt[--ht],dt[ht]=null,Vt=dt[--ht],dt[ht]=null}var nt=null,rt=null,ge=!1,bt=null;function sm(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 hh(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=Qr!==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 ic(e){return(e.mode&1)!==0&&(e.flags&128)===0}function oc(e){if(ge){var t=rt;if(t){var r=t;if(!hh(e,t)){if(ic(e))throw Error(Q(418));t=yr(r.nextSibling);var n=nt;t&&hh(e,t)?sm(n,r):(e.flags=e.flags&-4097|2,ge=!1,nt=e)}}else{if(ic(e))throw Error(Q(418));e.flags=e.flags&-4097|2,ge=!1,nt=e}}}function fh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;nt=e}function Ii(e){if(e!==nt)return!1;if(!ge)return fh(e),ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!tc(e.type,e.memoizedProps)),t&&(t=rt)){if(ic(e))throw im(),Error(Q(418));for(;t;)sm(e,t),t=yr(t.nextSibling)}if(fh(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 im(){for(var e=rt;e;)e=yr(e.nextSibling)}function Hn(){rt=nt=null,ge=!1}function hu(e){bt===null?bt=[e]:bt.push(e)}var Ww=er.ReactCurrentBatchConfig;function ps(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 Oi(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ph(e){var t=e._init;return t(e._payload)}function om(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,S){return l===null||l.tag!==6?(l=dl(f,h.mode,S),l.return=h,l):(l=s(l,f),l.return=h,l)}function a(h,l,f,S){var E=f.type;return E===Sn?m(h,l,f.props.children,S,f.key):l!==null&&(l.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===cr&&ph(E)===l.type)?(S=s(l,f.props),S.ref=ps(h,l,f),S.return=h,S):(S=co(f.type,f.key,f.props,null,h.mode,S),S.ref=ps(h,l,f),S.return=h,S)}function u(h,l,f,S){return l===null||l.tag!==4||l.stateNode.containerInfo!==f.containerInfo||l.stateNode.implementation!==f.implementation?(l=hl(f,h.mode,S),l.return=h,l):(l=s(l,f.children||[]),l.return=h,l)}function m(h,l,f,S,E){return l===null||l.tag!==7?(l=qr(f,h.mode,S,E),l.return=h,l):(l=s(l,f),l.return=h,l)}function d(h,l,f){if(typeof l=="string"&&l!==""||typeof l=="number")return l=dl(""+l,h.mode,f),l.return=h,l;if(typeof l=="object"&&l!==null){switch(l.$$typeof){case Ei:return f=co(l.type,l.key,l.props,null,h.mode,f),f.ref=ps(h,null,l),f.return=h,f;case yn:return l=hl(l,h.mode,f),l.return=h,l;case cr:var S=l._init;return d(h,S(l._payload),f)}if(ws(l)||cs(l))return l=qr(l,h.mode,f,null),l.return=h,l;Oi(h,l)}return null}function g(h,l,f,S){var E=l!==null?l.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return E!==null?null:i(h,l,""+f,S);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Ei:return f.key===E?a(h,l,f,S):null;case yn:return f.key===E?u(h,l,f,S):null;case cr:return E=f._init,g(h,l,E(f._payload),S)}if(ws(f)||cs(f))return E!==null?null:m(h,l,f,S,null);Oi(h,f)}return null}function _(h,l,f,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return h=h.get(f)||null,i(l,h,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ei:return h=h.get(S.key===null?f:S.key)||null,a(l,h,S,E);case yn:return h=h.get(S.key===null?f:S.key)||null,u(l,h,S,E);case cr:var k=S._init;return _(h,l,f,k(S._payload),E)}if(ws(S)||cs(S))return h=h.get(f)||null,m(l,h,S,E,null);Oi(l,S)}return null}function w(h,l,f,S){for(var E=null,k=null,C=l,b=l=0,R=null;C!==null&&b<f.length;b++){C.index>b?(R=C,C=null):R=C.sibling;var T=g(h,C,f[b],S);if(T===null){C===null&&(C=R);break}e&&C&&T.alternate===null&&t(h,C),l=o(T,l,b),k===null?E=T:k.sibling=T,k=T,C=R}if(b===f.length)return r(h,C),ge&&zr(h,b),E;if(C===null){for(;b<f.length;b++)C=d(h,f[b],S),C!==null&&(l=o(C,l,b),k===null?E=C:k.sibling=C,k=C);return ge&&zr(h,b),E}for(C=n(h,C);b<f.length;b++)R=_(C,h,b,f[b],S),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?b:R.key),l=o(R,l,b),k===null?E=R:k.sibling=R,k=R);return e&&C.forEach(function(M){return t(h,M)}),ge&&zr(h,b),E}function v(h,l,f,S){var E=cs(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,b=l=0,R=null,T=f.next();C!==null&&!T.done;b++,T=f.next()){C.index>b?(R=C,C=null):R=C.sibling;var M=g(h,C,T.value,S);if(M===null){C===null&&(C=R);break}e&&C&&M.alternate===null&&t(h,C),l=o(M,l,b),k===null?E=M:k.sibling=M,k=M,C=R}if(T.done)return r(h,C),ge&&zr(h,b),E;if(C===null){for(;!T.done;b++,T=f.next())T=d(h,T.value,S),T!==null&&(l=o(T,l,b),k===null?E=T:k.sibling=T,k=T);return ge&&zr(h,b),E}for(C=n(h,C);!T.done;b++,T=f.next())T=_(C,h,b,T.value,S),T!==null&&(e&&T.alternate!==null&&C.delete(T.key===null?b:T.key),l=o(T,l,b),k===null?E=T:k.sibling=T,k=T);return e&&C.forEach(function(j){return t(h,j)}),ge&&zr(h,b),E}function p(h,l,f,S){if(typeof f=="object"&&f!==null&&f.type===Sn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case Ei:e:{for(var E=f.key,k=l;k!==null;){if(k.key===E){if(E=f.type,E===Sn){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&&ph(E)===k.type){r(h,k.sibling),l=s(k,f.props),l.ref=ps(h,k,f),l.return=h,h=l;break e}r(h,k);break}else t(h,k);k=k.sibling}f.type===Sn?(l=qr(f.props.children,h.mode,S,f.key),l.return=h,h=l):(S=co(f.type,f.key,f.props,null,h.mode,S),S.ref=ps(h,l,f),S.return=h,h=S)}return c(h);case yn: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=hl(f,h.mode,S),l.return=h,h=l}return c(h);case cr:return k=f._init,p(h,l,k(f._payload),S)}if(ws(f))return w(h,l,f,S);if(cs(f))return v(h,l,f,S);Oi(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=dl(f,h.mode,S),l.return=h,h=l),c(h)):r(h,l)}return p}var zn=om(!0),am=om(!1),Ro=Ar(null),Po=null,Pn=null,fu=null;function pu(){fu=Pn=Po=null}function mu(e){var t=Ro.current;me(Ro),e._currentValue=t}function ac(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 In(e,t){Po=e,fu=Pn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(fu!==e)if(e={context:e,memoizedValue:t,next:null},Pn===null){if(Po===null)throw Error(Q(308));Pn=e,Po.dependencies={lanes:0,firstContext:e}}else Pn=Pn.next=e;return t}var Vr=null;function gu(e){Vr===null?Vr=[e]:Vr.push(e)}function lm(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,gu(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 vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cm(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,gu(n)):(t.next=s.next,s.next=t),n.interleaved=t,Yt(e,r)}function no(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,ru(e,r)}}function mh(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 To(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,u=a.next;a.next=null,c===null?o=u:c.next=u,c=a;var m=e.alternate;m!==null&&(m=m.updateQueue,i=m.lastBaseUpdate,i!==c&&(i===null?m.firstBaseUpdate=u:i.next=u,m.lastBaseUpdate=a))}if(o!==null){var d=s.baseState;c=0,m=u=a=null,i=o;do{var g=i.lane,_=i.eventTime;if((n&g)===g){m!==null&&(m=m.next={eventTime:_,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var w=e,v=i;switch(g=t,_=r,v.tag){case 1:if(w=v.payload,typeof w=="function"){d=w.call(_,d,g);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,g=typeof w=="function"?w.call(_,d,g):w,g==null)break e;d=Se({},d,g);break e;case 2:ur=!0}}i.callback!==null&&i.lane!==0&&(e.flags|=64,g=s.effects,g===null?s.effects=[i]:g.push(i))}else _={eventTime:_,lane:g,tag:i.tag,payload:i.payload,callback:i.callback,next:null},m===null?(u=m=_,a=d):m=m.next=_,c|=g;if(i=i.next,i===null){if(i=s.shared.pending,i===null)break;g=i,i=g.next,g.next=null,s.lastBaseUpdate=g,s.shared.pending=null}}while(!0);if(m===null&&(a=d),s.baseState=a,s.firstBaseUpdate=u,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);Zr|=c,e.lanes=c,e.memoizedState=d}}function gh(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 li={},jt=Ar(li),Gs=Ar(li),qs=Ar(li);function Kr(e){if(e===li)throw Error(Q(174));return e}function _u(e,t){switch(fe(qs,t),fe(Gs,e),fe(jt,li),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Hl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Hl(t,e)}me(jt),fe(jt,t)}function Wn(){me(jt),me(Gs),me(qs)}function um(e){Kr(qs.current);var t=Kr(jt.current),r=Hl(t,e.type);t!==r&&(fe(Gs,e),fe(jt,r))}function yu(e){Gs.current===e&&(me(jt),me(Gs))}var _e=Ar(0);function Lo(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 il=[];function Su(){for(var e=0;e<il.length;e++)il[e]._workInProgressVersionPrimary=null;il.length=0}var so=er.ReactCurrentDispatcher,ol=er.ReactCurrentBatchConfig,Jr=0,ye=null,Pe=null,Ae=null,Ao=!1,As=!1,Xs=0,Uw=0;function Oe(){throw Error(Q(321))}function wu(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 xu(e,t,r,n,s,o){if(Jr=o,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,so.current=e===null||e.memoizedState===null?qw:Xw,e=r(n,s),As){o=0;do{if(As=!1,Xs=0,25<=o)throw Error(Q(301));o+=1,Ae=Pe=null,t.updateQueue=null,so.current=Yw,e=r(n,s)}while(As)}if(so.current=Do,t=Pe!==null&&Pe.next!==null,Jr=0,Ae=Pe=ye=null,Ao=!1,t)throw Error(Q(300));return e}function bu(){var e=Xs!==0;return Xs=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 vt(){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 Ys(e,t){return typeof t=="function"?t(e):t}function al(e){var t=vt(),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,u=o;do{var m=u.lane;if((Jr&m)===m)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:m,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(i=a=d,c=n):a=a.next=d,ye.lanes|=m,Zr|=m}u=u.next}while(u!==null&&u!==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,Zr|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ll(e){var t=vt(),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 dm(){}function hm(e,t){var r=ye,n=vt(),s=t(),o=!kt(n.memoizedState,s);if(o&&(n.memoizedState=s,Ge=!0),n=n.queue,Cu(mm.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Ae!==null&&Ae.memoizedState.tag&1){if(r.flags|=2048,Qs(9,pm.bind(null,r,n,s,t),void 0,null),De===null)throw Error(Q(349));Jr&30||fm(r,t,s)}return s}function fm(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 pm(e,t,r,n){t.value=r,t.getSnapshot=n,gm(t)&&vm(e)}function mm(e,t,r){return r(function(){gm(t)&&vm(e)})}function gm(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!kt(e,r)}catch{return!0}}function vm(e){var t=Yt(e,1);t!==null&&Et(t,e,1,-1)}function vh(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:Ys,lastRenderedState:e},t.queue=e,e=e.dispatch=Gw.bind(null,ye,e),[t.memoizedState,e]}function Qs(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 _m(){return vt().memoizedState}function io(e,t,r,n){var s=Dt();ye.flags|=e,s.memoizedState=Qs(1|t,r,void 0,n===void 0?null:n)}function ia(e,t,r,n){var s=vt();n=n===void 0?null:n;var o=void 0;if(Pe!==null){var c=Pe.memoizedState;if(o=c.destroy,n!==null&&wu(n,c.deps)){s.memoizedState=Qs(t,r,o,n);return}}ye.flags|=e,s.memoizedState=Qs(1|t,r,o,n)}function _h(e,t){return io(8390656,8,e,t)}function Cu(e,t){return ia(2048,8,e,t)}function ym(e,t){return ia(4,2,e,t)}function Sm(e,t){return ia(4,4,e,t)}function wm(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 xm(e,t,r){return r=r!=null?r.concat([e]):null,ia(4,4,wm.bind(null,t,e),r)}function Eu(){}function bm(e,t){var r=vt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&wu(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Cm(e,t){var r=vt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&wu(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Em(e,t,r){return Jr&21?(kt(r,t)||(r=Lp(),ye.lanes|=r,Zr|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ge=!0),e.memoizedState=r)}function Vw(e,t){var r=de;de=r!==0&&4>r?r:4,e(!0);var n=ol.transition;ol.transition={};try{e(!1),t()}finally{de=r,ol.transition=n}}function km(){return vt().memoizedState}function Kw(e,t,r){var n=xr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Rm(e))Pm(t,r);else if(r=lm(e,t,r,n),r!==null){var s=He();Et(r,e,n,s),Tm(r,t,n)}}function Gw(e,t,r){var n=xr(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Rm(e))Pm(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,gu(t)):(s.next=a.next,a.next=s),t.interleaved=s;return}}catch{}finally{}r=lm(e,t,s,n),r!==null&&(s=He(),Et(r,e,n,s),Tm(r,t,n))}}function Rm(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Pm(e,t){As=Ao=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Tm(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ru(e,r)}}var Do={readContext:gt,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},qw={readContext:gt,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:_h,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,io(4194308,4,wm.bind(null,t,e),r)},useLayoutEffect:function(e,t){return io(4194308,4,e,t)},useInsertionEffect:function(e,t){return io(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=Kw.bind(null,ye,e),[n.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:vh,useDebugValue:Eu,useDeferredValue:function(e){return Dt().memoizedState=e},useTransition:function(){var e=vh(!1),t=e[0];return e=Vw.bind(null,e[1]),Dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ye,s=Dt();if(ge){if(r===void 0)throw Error(Q(407));r=r()}else{if(r=t(),De===null)throw Error(Q(349));Jr&30||fm(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,_h(mm.bind(null,n,o,e),[e]),n.flags|=2048,Qs(9,pm.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Dt(),t=De.identifierPrefix;if(ge){var r=Kt,n=Vt;r=(n&~(1<<32-Ct(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Xs++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Uw++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xw={readContext:gt,useCallback:bm,useContext:gt,useEffect:Cu,useImperativeHandle:xm,useInsertionEffect:ym,useLayoutEffect:Sm,useMemo:Cm,useReducer:al,useRef:_m,useState:function(){return al(Ys)},useDebugValue:Eu,useDeferredValue:function(e){var t=vt();return Em(t,Pe.memoizedState,e)},useTransition:function(){var e=al(Ys)[0],t=vt().memoizedState;return[e,t]},useMutableSource:dm,useSyncExternalStore:hm,useId:km,unstable_isNewReconciler:!1},Yw={readContext:gt,useCallback:bm,useContext:gt,useEffect:Cu,useImperativeHandle:xm,useInsertionEffect:ym,useLayoutEffect:Sm,useMemo:Cm,useReducer:ll,useRef:_m,useState:function(){return ll(Ys)},useDebugValue:Eu,useDeferredValue:function(e){var t=vt();return Pe===null?t.memoizedState=e:Em(t,Pe.memoizedState,e)},useTransition:function(){var e=ll(Ys)[0],t=vt().memoizedState;return[e,t]},useMutableSource:dm,useSyncExternalStore:hm,useId:km,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 lc(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 oa={isMounted:function(e){return(e=e._reactInternals)?ln(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=He(),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),no(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=He(),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),no(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=He(),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),no(t,e,n))}};function yh(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?!Ws(r,n)||!Ws(s,o):!0}function Lm(e,t,r){var n=!1,s=kr,o=t.contextType;return typeof o=="object"&&o!==null?o=gt(o):(s=Xe(t)?Yr:Fe.current,n=t.contextTypes,o=(n=n!=null)?$n(e,s):kr),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=oa,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Sh(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&&oa.enqueueReplaceState(t,t.state,null)}function cc(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},vu(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=gt(o):(o=Xe(t)?Yr:Fe.current,s.context=$n(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(lc(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&&oa.enqueueReplaceState(s,s.state,null),To(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Un(e,t){try{var r="",n=t;do r+=CS(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 cl(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function uc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Qw=typeof WeakMap=="function"?WeakMap:Map;function Am(e,t,r){r=Gt(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){No||(No=!0,Sc=n),uc(e,t)},r}function Dm(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(){uc(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){uc(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 wh(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=dx.bind(null,e,t,r),t.then(e,e))}function xh(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 bh(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 Jw=er.ReactCurrentOwner,Ge=!1;function $e(e,t,r,n){t.child=e===null?am(t,null,r,n):zn(t,e.child,r,n)}function Ch(e,t,r,n,s){r=r.render;var o=t.ref;return In(t,s),n=xu(e,t,r,n,o,s),r=bu(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Qt(e,t,s)):(ge&&r&&uu(t),t.flags|=1,$e(e,t,n,s),t.child)}function Eh(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!Mu(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,Mm(e,t,o,n,s)):(e=co(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:Ws,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 Mm(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(Ws(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 dc(e,t,r,n,s)}function Nm(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(Ln,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(Ln,et),et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,fe(Ln,et),et|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,fe(Ln,et),et|=n;return $e(e,t,s,r),t.child}function Im(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function dc(e,t,r,n,s){var o=Xe(r)?Yr:Fe.current;return o=$n(t,o),In(t,s),r=xu(e,t,r,n,o,s),n=bu(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Qt(e,t,s)):(ge&&n&&uu(t),t.flags|=1,$e(e,t,r,s),t.child)}function kh(e,t,r,n,s){if(Xe(r)){var o=!0;Co(t)}else o=!1;if(In(t,s),t.stateNode===null)oo(e,t),Lm(t,r,n),cc(t,r,n,s),n=!0;else if(e===null){var c=t.stateNode,i=t.memoizedProps;c.props=i;var a=c.context,u=r.contextType;typeof u=="object"&&u!==null?u=gt(u):(u=Xe(r)?Yr:Fe.current,u=$n(t,u));var m=r.getDerivedStateFromProps,d=typeof m=="function"||typeof c.getSnapshotBeforeUpdate=="function";d||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(i!==n||a!==u)&&Sh(t,c,n,u),ur=!1;var g=t.memoizedState;c.state=g,To(t,n,c,s),a=t.memoizedState,i!==n||g!==a||qe.current||ur?(typeof m=="function"&&(lc(t,r,m,n),a=t.memoizedState),(i=ur||yh(t,r,i,n,g,a,u))?(d||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=u,n=i):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,cm(e,t),i=t.memoizedProps,u=t.type===t.elementType?i:wt(t.type,i),c.props=u,d=t.pendingProps,g=c.context,a=r.contextType,typeof a=="object"&&a!==null?a=gt(a):(a=Xe(r)?Yr:Fe.current,a=$n(t,a));var _=r.getDerivedStateFromProps;(m=typeof _=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(i!==d||g!==a)&&Sh(t,c,n,a),ur=!1,g=t.memoizedState,c.state=g,To(t,n,c,s);var w=t.memoizedState;i!==d||g!==w||qe.current||ur?(typeof _=="function"&&(lc(t,r,_,n),w=t.memoizedState),(u=ur||yh(t,r,u,n,g,w,a)||!1)?(m||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,w,a),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,w,a)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||i===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),c.props=n,c.state=w,c.context=a,n=u):(typeof c.componentDidUpdate!="function"||i===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),n=!1)}return hc(e,t,r,n,o,s)}function hc(e,t,r,n,s,o){Im(e,t);var c=(t.flags&128)!==0;if(!n&&!c)return s&&dh(t,r,!1),Qt(e,t,o);n=t.stateNode,Jw.current=t;var i=c&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&c?(t.child=zn(t,e.child,null,o),t.child=zn(t,null,i,o)):$e(e,t,i,o),t.memoizedState=n.state,s&&dh(t,r,!0),t.child}function Om(e){var t=e.stateNode;t.pendingContext?uh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&uh(e,t.context,!1),_u(e,t.containerInfo)}function Rh(e,t,r,n,s){return Hn(),hu(s),t.flags|=256,$e(e,t,r,n),t.child}var fc={dehydrated:null,treeContext:null,retryLane:0};function pc(e){return{baseLanes:e,cachePool:null,transitions:null}}function jm(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 oc(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=ca(c,n,0,null),e=qr(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=pc(r),t.memoizedState=fc,e):ku(t,c));if(s=e.memoizedState,s!==null&&(i=s.dehydrated,i!==null))return Zw(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=qr(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?pc(r):{baseLanes:c.baseLanes|r,cachePool:null,transitions:c.transitions},o.memoizedState=c,o.childLanes=e.childLanes&~r,t.memoizedState=fc,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 ku(e,t){return t=ca({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ji(e,t,r,n){return n!==null&&hu(n),zn(t,e.child,null,r),e=ku(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zw(e,t,r,n,s,o,c){if(r)return t.flags&256?(t.flags&=-257,n=cl(Error(Q(422))),ji(e,t,c,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=ca({mode:"visible",children:n.children},s,0,null),o=qr(o,s,c,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&zn(t,e.child,null,c),t.child.memoizedState=pc(c),t.memoizedState=fc,o);if(!(t.mode&1))return ji(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=cl(o,n,void 0),ji(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 Du(),n=cl(Error(Q(421))),ji(e,t,c,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=hx.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,rt=yr(s.nextSibling),nt=t,ge=!0,bt=null,e!==null&&(dt[ht++]=Vt,dt[ht++]=Kt,dt[ht++]=Qr,Vt=e.id,Kt=e.overflow,Qr=t),t=ku(t,n.children),t.flags|=4096,t)}function Ph(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ac(e.return,t,r)}function ul(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 Bm(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if($e(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&&Ph(e,r,t);else if(e.tag===19)Ph(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&&Lo(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),ul(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&&Lo(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}ul(t,!0,r,null,o);break;case"together":ul(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oo(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),Zr|=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 ex(e,t,r){switch(t.tag){case 3:Om(t),Hn();break;case 5:um(t);break;case 1:Xe(t.type)&&Co(t);break;case 4:_u(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;fe(Ro,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?jm(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 Bm(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,Nm(e,t,r)}return Qt(e,t,r)}var Fm,mc,$m,Hm;Fm=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}};mc=function(){};$m=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Kr(jt.current);var o=null;switch(r){case"input":s=jl(e,s),n=jl(e,n),o=[];break;case"select":s=Se({},s,{value:void 0}),n=Se({},n,{value:void 0}),o=[];break;case"textarea":s=$l(e,s),n=$l(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=xo)}zl(r,n);var c;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var i=s[u];for(c in i)i.hasOwnProperty(c)&&(r||(r={}),r[c]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Os.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var a=n[u];if(i=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&a!==i&&(a!=null||i!=null))if(u==="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(u,r)),r=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,i=i?i.__html:void 0,a!=null&&i!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Os.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&pe("scroll",e),o||i===a||(o=[])):(o=o||[]).push(u,a))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Hm=function(e,t,r,n){r!==n&&(t.flags|=4)};function ms(e,t){if(!ge)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 tx(e,t,r){var n=t.pendingProps;switch(du(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)&&bo(),je(t),null;case 3:return n=t.stateNode,Wn(),me(qe),me(Fe),Su(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ii(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bt!==null&&(bc(bt),bt=null))),mc(e,t),je(t),null;case 5:yu(t);var s=Kr(qs.current);if(r=t.type,e!==null&&t.stateNode!=null)$m(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=Kr(jt.current),Ii(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Mt]=t,n[Ks]=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<bs.length;s++)pe(bs[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":jd(n,o),pe("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},pe("invalid",n);break;case"textarea":Fd(n,o),pe("invalid",n)}zl(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&&Ni(n.textContent,i,e),s=["children",i]):typeof i=="number"&&n.textContent!==""+i&&(o.suppressHydrationWarning!==!0&&Ni(n.textContent,i,e),s=["children",""+i]):Os.hasOwnProperty(c)&&i!=null&&c==="onScroll"&&pe("scroll",n)}switch(r){case"input":ki(n),Bd(n,o,!0);break;case"textarea":ki(n),$d(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=xo)}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=mp(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[Ks]=n,Fm(e,t,!1,!1),t.stateNode=e;e:{switch(c=Wl(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<bs.length;s++)pe(bs[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":jd(e,n),s=jl(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":Fd(e,n),s=$l(e,n),pe("invalid",e);break;default:s=n}zl(r,s),i=s;for(o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="style"?_p(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&gp(e,a)):o==="children"?typeof a=="string"?(r!=="textarea"||a!=="")&&js(e,a):typeof a=="number"&&js(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Os.hasOwnProperty(o)?a!=null&&o==="onScroll"&&pe("scroll",e):a!=null&&Yc(e,o,a,c))}switch(r){case"input":ki(e),Bd(e,n,!1);break;case"textarea":ki(e),$d(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?An(e,!!n.multiple,o,!1):n.defaultValue!=null&&An(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=xo)}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)Hm(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Q(166));if(r=Kr(qs.current),Kr(jt.current),Ii(t)){if(n=t.stateNode,r=t.memoizedProps,n[Mt]=t,(o=n.nodeValue!==r)&&(e=nt,e!==null))switch(e.tag){case 3:Ni(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ni(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(ge&&rt!==null&&t.mode&1&&!(t.flags&128))im(),Hn(),t.flags|=98560,o=!1;else if(o=Ii(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&&(bc(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):Du())),t.updateQueue!==null&&(t.flags|=4),je(t),null);case 4:return Wn(),mc(e,t),e===null&&Us(t.stateNode.containerInfo),je(t),null;case 10:return mu(t.type._context),je(t),null;case 17:return Xe(t.type)&&bo(),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)ms(o,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Lo(e),c!==null){for(t.flags|=128,ms(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()>Vn&&(t.flags|=128,n=!0,ms(o,!1),t.lanes=4194304)}else{if(!n)if(e=Lo(c),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ms(o,!0),o.tail===null&&o.tailMode==="hidden"&&!c.alternate&&!ge)return je(t),null}else 2*xe()-o.renderingStartTime>Vn&&r!==1073741824&&(t.flags|=128,n=!0,ms(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 Au(),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 rx(e,t){switch(du(t),t.tag){case 1:return Xe(t.type)&&bo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(),me(qe),me(Fe),Su(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return yu(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 Wn(),null;case 10:return mu(t.type._context),null;case 22:case 23:return Au(),null;case 24:return null;default:return null}}var Bi=!1,Be=!1,nx=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Tn(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 gc(e,t,r){try{r()}catch(n){we(e,t,n)}}var Th=!1;function sx(e,t){if(Zl=yo,e=Kp(),cu(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,u=0,m=0,d=e,g=null;t:for(;;){for(var _;d!==r||s!==0&&d.nodeType!==3||(i=c+s),d!==o||n!==0&&d.nodeType!==3||(a=c+n),d.nodeType===3&&(c+=d.nodeValue.length),(_=d.firstChild)!==null;)g=d,d=_;for(;;){if(d===e)break t;if(g===r&&++u===s&&(i=c),g===o&&++m===n&&(a=c),(_=d.nextSibling)!==null)break;d=g,g=d.parentNode}d=_}r=i===-1||a===-1?null:{start:i,end:a}}else r=null}r=r||{start:0,end:0}}else r=null;for(ec={focusedElem:e,selectionRange:r},yo=!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 w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,p=w.memoizedState,h=t.stateNode,l=h.getSnapshotBeforeUpdate(t.elementType===t.type?v:wt(t.type,v),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(S){we(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return w=Th,Th=!1,w}function Ds(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&&gc(t,r,o)}s=s.next}while(s!==n)}}function aa(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 vc(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 zm(e){var t=e.alternate;t!==null&&(e.alternate=null,zm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[Ks],delete t[nc],delete t[$w],delete t[Hw])),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 Wm(e){return e.tag===5||e.tag===3||e.tag===4}function Lh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wm(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 _c(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=xo));else if(n!==4&&(e=e.child,e!==null))for(_c(e,t,r),e=e.sibling;e!==null;)_c(e,t,r),e=e.sibling}function yc(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(yc(e,t,r),e=e.sibling;e!==null;)yc(e,t,r),e=e.sibling}var Me=null,xt=!1;function ir(e,t,r){for(r=r.child;r!==null;)Um(e,t,r),r=r.sibling}function Um(e,t,r){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Zo,r)}catch{}switch(r.tag){case 5:Be||Tn(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?nl(e.parentNode,r):e.nodeType===1&&nl(e,r),Hs(e)):nl(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)&&gc(r,t,c),s=s.next}while(s!==n)}ir(e,t,r);break;case 1:if(!Be&&(Tn(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 Ah(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new nx),t.forEach(function(n){var s=fx.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));Um(o,c,s),Me=null,xt=!1;var a=s.alternate;a!==null&&(a.return=null),s.return=null}catch(u){we(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Vm(t,e),t=t.sibling}function Vm(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{Ds(3,e,e.return),aa(3,e)}catch(v){we(e,e.return,v)}try{Ds(5,e,e.return)}catch(v){we(e,e.return,v)}}break;case 1:yt(t,e),At(e),n&512&&r!==null&&Tn(r,r.return);break;case 5:if(yt(t,e),At(e),n&512&&r!==null&&Tn(r,r.return),e.flags&32){var s=e.stateNode;try{js(s,"")}catch(v){we(e,e.return,v)}}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&&fp(s,o),Wl(i,c);var u=Wl(i,o);for(c=0;c<a.length;c+=2){var m=a[c],d=a[c+1];m==="style"?_p(s,d):m==="dangerouslySetInnerHTML"?gp(s,d):m==="children"?js(s,d):Yc(s,m,d,u)}switch(i){case"input":Bl(s,o);break;case"textarea":pp(s,o);break;case"select":var g=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var _=o.value;_!=null?An(s,!!o.multiple,_,!1):g!==!!o.multiple&&(o.defaultValue!=null?An(s,!!o.multiple,o.defaultValue,!0):An(s,!!o.multiple,o.multiple?[]:"",!1))}s[Ks]=o}catch(v){we(e,e.return,v)}}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(v){we(e,e.return,v)}}break;case 3:if(yt(t,e),At(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Hs(t.containerInfo)}catch(v){we(e,e.return,v)}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||(Tu=xe())),n&4&&Ah(e);break;case 22:if(m=r!==null&&r.memoizedState!==null,e.mode&1?(Be=(u=Be)||m,yt(t,e),Be=u):yt(t,e),At(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!m&&e.mode&1)for(Z=e,m=e.child;m!==null;){for(d=Z=m;Z!==null;){switch(g=Z,_=g.child,g.tag){case 0:case 11:case 14:case 15:Ds(4,g,g.return);break;case 1:Tn(g,g.return);var w=g.stateNode;if(typeof w.componentWillUnmount=="function"){n=g,r=g.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){we(n,r,v)}}break;case 5:Tn(g,g.return);break;case 22:if(g.memoizedState!==null){Mh(d);continue}}_!==null?(_.return=g,Z=_):Mh(d)}m=m.sibling}e:for(m=null,d=e;;){if(d.tag===5){if(m===null){m=d;try{s=d.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(i=d.stateNode,a=d.memoizedProps.style,c=a!=null&&a.hasOwnProperty("display")?a.display:null,i.style.display=vp("display",c))}catch(v){we(e,e.return,v)}}}else if(d.tag===6){if(m===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){we(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;m===d&&(m=null),d=d.return}m===d&&(m=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:yt(t,e),At(e),n&4&&Ah(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(Wm(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&&(js(s,""),n.flags&=-33);var o=Lh(e);yc(e,o,s);break;case 3:case 4:var c=n.stateNode.containerInfo,i=Lh(e);_c(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 ix(e,t,r){Z=e,Km(e)}function Km(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||Bi;if(!c){var i=s.alternate,a=i!==null&&i.memoizedState!==null||Be;i=Bi;var u=Be;if(Bi=c,(Be=a)&&!u)for(Z=s;Z!==null;)c=Z,a=c.child,c.tag===22&&c.memoizedState!==null?Nh(s):a!==null?(a.return=c,Z=a):Nh(s);for(;o!==null;)Z=o,Km(o),o=o.sibling;Z=s,Bi=i,Be=u}Dh(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Z=o):Dh(e)}}function Dh(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||aa(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&&gh(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}gh(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 u=t.alternate;if(u!==null){var m=u.memoizedState;if(m!==null){var d=m.dehydrated;d!==null&&Hs(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Be||t.flags&512&&vc(t)}catch(g){we(t,t.return,g)}}if(t===e){Z=null;break}if(r=t.sibling,r!==null){r.return=t.return,Z=r;break}Z=t.return}}function Mh(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 Nh(e){for(;Z!==null;){var t=Z;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{aa(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{vc(t)}catch(a){we(t,o,a)}break;case 5:var c=t.return;try{vc(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 ox=Math.ceil,Mo=er.ReactCurrentDispatcher,Ru=er.ReactCurrentOwner,pt=er.ReactCurrentBatchConfig,ue=0,De=null,Ee=null,Ne=0,et=0,Ln=Ar(0),Te=0,Js=null,Zr=0,la=0,Pu=0,Ms=null,Ke=null,Tu=0,Vn=1/0,Wt=null,No=!1,Sc=null,wr=null,Fi=!1,pr=null,Io=0,Ns=0,wc=null,ao=-1,lo=0;function He(){return ue&6?xe():ao!==-1?ao:ao=xe()}function xr(e){return e.mode&1?ue&2&&Ne!==0?Ne&-Ne:Ww.transition!==null?(lo===0&&(lo=Lp()),lo):(e=de,e!==0||(e=window.event,e=e===void 0?16:jp(e.type)),e):1}function Et(e,t,r,n){if(50<Ns)throw Ns=0,wc=null,Error(Q(185));ii(e,r,n),(!(ue&2)||e!==De)&&(e===De&&(!(ue&2)&&(la|=r),Te===4&&hr(e,Ne)),Ye(e,n),r===1&&ue===0&&!(t.mode&1)&&(Vn=xe()+500,sa&&Dr()))}function Ye(e,t){var r=e.callbackNode;WS(e,t);var n=_o(e,e===De?Ne:0);if(n===0)r!==null&&Wd(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Wd(r),t===1)e.tag===0?zw(Ih.bind(null,e)):rm(Ih.bind(null,e)),Bw(function(){!(ue&6)&&Dr()}),r=null;else{switch(Ap(n)){case 1:r=tu;break;case 4:r=Pp;break;case 16:r=vo;break;case 536870912:r=Tp;break;default:r=vo}r=eg(r,Gm.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Gm(e,t){if(ao=-1,lo=0,ue&6)throw Error(Q(327));var r=e.callbackNode;if(On()&&e.callbackNode!==r)return null;var n=_o(e,e===De?Ne:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Oo(e,n);else{t=n;var s=ue;ue|=2;var o=Xm();(De!==e||Ne!==t)&&(Wt=null,Vn=xe()+500,Gr(e,t));do try{cx();break}catch(i){qm(e,i)}while(!0);pu(),Mo.current=o,ue=s,Ee!==null?t=0:(De=null,Ne=0,t=Te)}if(t!==0){if(t===2&&(s=ql(e),s!==0&&(n=s,t=xc(e,s))),t===1)throw r=Js,Gr(e,0),hr(e,n),Ye(e,xe()),r;if(t===6)hr(e,n);else{if(s=e.current.alternate,!(n&30)&&!ax(s)&&(t=Oo(e,n),t===2&&(o=ql(e),o!==0&&(n=o,t=xc(e,o))),t===1))throw r=Js,Gr(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:Wr(e,Ke,Wt);break;case 3:if(hr(e,n),(n&130023424)===n&&(t=Tu+500-xe(),10<t)){if(_o(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){He(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=rc(Wr.bind(null,e,Ke,Wt),t);break}Wr(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*ox(n/1960))-n,10<n){e.timeoutHandle=rc(Wr.bind(null,e,Ke,Wt),n);break}Wr(e,Ke,Wt);break;case 5:Wr(e,Ke,Wt);break;default:throw Error(Q(329))}}}return Ye(e,xe()),e.callbackNode===r?Gm.bind(null,e):null}function xc(e,t){var r=Ms;return e.current.memoizedState.isDehydrated&&(Gr(e,t).flags|=256),e=Oo(e,t),e!==2&&(t=Ke,Ke=r,t!==null&&bc(t)),e}function bc(e){Ke===null?Ke=e:Ke.push.apply(Ke,e)}function ax(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&=~Pu,t&=~la,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 Ih(e){if(ue&6)throw Error(Q(327));On();var t=_o(e,0);if(!(t&1))return Ye(e,xe()),null;var r=Oo(e,t);if(e.tag!==0&&r===2){var n=ql(e);n!==0&&(t=n,r=xc(e,n))}if(r===1)throw r=Js,Gr(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,Wr(e,Ke,Wt),Ye(e,xe()),null}function Lu(e,t){var r=ue;ue|=1;try{return e(t)}finally{ue=r,ue===0&&(Vn=xe()+500,sa&&Dr())}}function en(e){pr!==null&&pr.tag===0&&!(ue&6)&&On();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 Au(){et=Ln.current,me(Ln)}function Gr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,jw(r)),Ee!==null)for(r=Ee.return;r!==null;){var n=r;switch(du(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&bo();break;case 3:Wn(),me(qe),me(Fe),Su();break;case 5:yu(n);break;case 4:Wn();break;case 13:me(_e);break;case 19:me(_e);break;case 10:mu(n.type._context);break;case 22:case 23:Au()}r=r.return}if(De=e,Ee=e=br(e.current,null),Ne=et=t,Te=0,Js=null,Pu=la=Zr=0,Ke=Ms=null,Vr!==null){for(t=0;t<Vr.length;t++)if(r=Vr[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}Vr=null}return e}function qm(e,t){do{var r=Ee;try{if(pu(),so.current=Do,Ao){for(var n=ye.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Ao=!1}if(Jr=0,Ae=Pe=ye=null,As=!1,Xs=0,Ru.current=null,r===null||r.return===null){Te=1,Js=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 u=a,m=i,d=m.tag;if(!(m.mode&1)&&(d===0||d===11||d===15)){var g=m.alternate;g?(m.updateQueue=g.updateQueue,m.memoizedState=g.memoizedState,m.lanes=g.lanes):(m.updateQueue=null,m.memoizedState=null)}var _=xh(c);if(_!==null){_.flags&=-257,bh(_,c,i,o,t),_.mode&1&&wh(o,u,t),t=_,a=u;var w=t.updateQueue;if(w===null){var v=new Set;v.add(a),t.updateQueue=v}else w.add(a);break e}else{if(!(t&1)){wh(o,u,t),Du();break e}a=Error(Q(426))}}else if(ge&&i.mode&1){var p=xh(c);if(p!==null){!(p.flags&65536)&&(p.flags|=256),bh(p,c,i,o,t),hu(Un(a,i));break e}}o=a=Un(a,i),Te!==4&&(Te=2),Ms===null?Ms=[o]:Ms.push(o),o=c;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var h=Am(o,a,t);mh(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 S=Dm(o,i,t);mh(o,S);break e}}o=o.return}while(o!==null)}Qm(r)}catch(E){t=E,Ee===r&&r!==null&&(Ee=r=r.return);continue}break}while(!0)}function Xm(){var e=Mo.current;return Mo.current=Do,e===null?Do:e}function Du(){(Te===0||Te===3||Te===2)&&(Te=4),De===null||!(Zr&268435455)&&!(la&268435455)||hr(De,Ne)}function Oo(e,t){var r=ue;ue|=2;var n=Xm();(De!==e||Ne!==t)&&(Wt=null,Gr(e,t));do try{lx();break}catch(s){qm(e,s)}while(!0);if(pu(),ue=r,Mo.current=n,Ee!==null)throw Error(Q(261));return De=null,Ne=0,Te}function lx(){for(;Ee!==null;)Ym(Ee)}function cx(){for(;Ee!==null&&!NS();)Ym(Ee)}function Ym(e){var t=Zm(e.alternate,e,et);e.memoizedProps=e.pendingProps,t===null?Qm(e):Ee=t,Ru.current=null}function Qm(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=rx(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=tx(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 Wr(e,t,r){var n=de,s=pt.transition;try{pt.transition=null,de=1,ux(e,t,r,n)}finally{pt.transition=s,de=n}return null}function ux(e,t,r,n){do On();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(US(e,o),e===De&&(Ee=De=null,Ne=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Fi||(Fi=!0,eg(vo,function(){return On(),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,Ru.current=null,sx(e,r),Vm(r,e),Lw(ec),yo=!!Zl,ec=Zl=null,e.current=r,ix(r),IS(),ue=i,de=c,pt.transition=o}else e.current=r;if(Fi&&(Fi=!1,pr=e,Io=s),o=e.pendingLanes,o===0&&(wr=null),BS(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(No)throw No=!1,e=Sc,Sc=null,e;return Io&1&&e.tag!==0&&On(),o=e.pendingLanes,o&1?e===wc?Ns++:(Ns=0,wc=e):Ns=0,Dr(),null}function On(){if(pr!==null){var e=Ap(Io),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,Io=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 u=i[a];for(Z=u;Z!==null;){var m=Z;switch(m.tag){case 0:case 11:case 15:Ds(8,m,o)}var d=m.child;if(d!==null)d.return=m,Z=d;else for(;Z!==null;){m=Z;var g=m.sibling,_=m.return;if(zm(m),m===u){Z=null;break}if(g!==null){g.return=_,Z=g;break}Z=_}}}var w=o.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var p=v.sibling;v.sibling=null,v=p}while(v!==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:Ds(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:aa(9,i)}}catch(E){we(i,i.return,E)}if(i===c){Z=null;break e}var S=i.sibling;if(S!==null){S.return=i.return,Z=S;break e}Z=i.return}}if(ue=s,Dr(),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Zo,e)}catch{}n=!0}return n}finally{de=r,pt.transition=t}}return!1}function Oh(e,t,r){t=Un(r,t),t=Am(e,t,1),e=Sr(e,t,1),t=He(),e!==null&&(ii(e,1,t),Ye(e,t))}function we(e,t,r){if(e.tag===3)Oh(e,e,r);else for(;t!==null;){if(t.tag===3){Oh(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=Un(r,e),e=Dm(t,e,1),t=Sr(t,e,1),e=He(),t!==null&&(ii(t,1,e),Ye(t,e));break}}t=t.return}}function dx(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=He(),e.pingedLanes|=e.suspendedLanes&r,De===e&&(Ne&r)===r&&(Te===4||Te===3&&(Ne&130023424)===Ne&&500>xe()-Tu?Gr(e,0):Pu|=r),Ye(e,t)}function Jm(e,t){t===0&&(e.mode&1?(t=Ti,Ti<<=1,!(Ti&130023424)&&(Ti=4194304)):t=1);var r=He();e=Yt(e,t),e!==null&&(ii(e,t,r),Ye(e,r))}function hx(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Jm(e,r)}function fx(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),Jm(e,r)}var Zm;Zm=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,ex(e,t,r);Ge=!!(e.flags&131072)}else Ge=!1,ge&&t.flags&1048576&&nm(t,ko,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;oo(e,t),e=t.pendingProps;var s=$n(t,Fe.current);In(t,r),s=xu(null,t,n,e,s,r);var o=bu();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,Co(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,vu(t),s.updater=oa,t.stateNode=s,s._reactInternals=t,cc(t,n,e,r),t=hc(null,t,n,!0,o,r)):(t.tag=0,ge&&o&&uu(t),$e(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(oo(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=mx(n),e=wt(n,e),s){case 0:t=dc(null,t,n,e,r);break e;case 1:t=kh(null,t,n,e,r);break e;case 11:t=Ch(null,t,n,e,r);break e;case 14:t=Eh(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),dc(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:wt(n,s),kh(e,t,n,s,r);case 3:e:{if(Om(t),e===null)throw Error(Q(387));n=t.pendingProps,o=t.memoizedState,s=o.element,cm(e,t),To(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=Un(Error(Q(423)),t),t=Rh(e,t,n,r,s);break e}else if(n!==s){s=Un(Error(Q(424)),t),t=Rh(e,t,n,r,s);break e}else for(rt=yr(t.stateNode.containerInfo.firstChild),nt=t,ge=!0,bt=null,r=am(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}$e(e,t,n,r)}t=t.child}return t;case 5:return um(t),e===null&&oc(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,c=s.children,tc(n,s)?c=null:o!==null&&tc(n,o)&&(t.flags|=32),Im(e,t),$e(e,t,c,r),t.child;case 6:return e===null&&oc(t),null;case 13:return jm(e,t,r);case 4:return _u(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=zn(t,null,n,r):$e(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:wt(n,s),Ch(e,t,n,s,r);case 7:return $e(e,t,t.pendingProps,r),t.child;case 8:return $e(e,t,t.pendingProps.children,r),t.child;case 12:return $e(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(Ro,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 u=o.updateQueue;if(u!==null){u=u.shared;var m=u.pending;m===null?a.next=a:(a.next=m.next,m.next=a),u.pending=a}}o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),ac(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),ac(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}$e(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,In(t,r),s=gt(s),n=n(s),t.flags|=1,$e(e,t,n,r),t.child;case 14:return n=t.type,s=wt(n,t.pendingProps),s=wt(n.type,s),Eh(e,t,n,s,r);case 15:return Mm(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:wt(n,s),oo(e,t),t.tag=1,Xe(n)?(e=!0,Co(t)):e=!1,In(t,r),Lm(t,n,s),cc(t,n,s,r),hc(null,t,n,!0,e,r);case 19:return Bm(e,t,r);case 22:return Nm(e,t,r)}throw Error(Q(156,t.tag))};function eg(e,t){return Rp(e,t)}function px(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 px(e,t,r,n)}function Mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mx(e){if(typeof e=="function")return Mu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Jc)return 11;if(e===Zc)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 co(e,t,r,n,s,o){var c=2;if(n=e,typeof e=="function")Mu(e)&&(c=1);else if(typeof e=="string")c=5;else e:switch(e){case Sn:return qr(r.children,s,o,t);case Qc:c=8,s|=8;break;case Ml:return e=ft(12,r,t,s|2),e.elementType=Ml,e.lanes=o,e;case Nl:return e=ft(13,r,t,s),e.elementType=Nl,e.lanes=o,e;case Il:return e=ft(19,r,t,s),e.elementType=Il,e.lanes=o,e;case up:return ca(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case lp:c=10;break e;case cp:c=9;break e;case Jc:c=11;break e;case Zc: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 qr(e,t,r,n){return e=ft(7,e,n,t),e.lanes=r,e}function ca(e,t,r,n){return e=ft(22,e,n,t),e.elementType=up,e.lanes=r,e.stateNode={isHidden:!1},e}function dl(e,t,r){return e=ft(6,e,null,t),e.lanes=r,e}function hl(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 gx(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=Ka(0),this.expirationTimes=Ka(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ka(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Nu(e,t,r,n,s,o,c,i,a){return e=new gx(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},vu(o),e}function vx(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yn,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function tg(e){if(!e)return kr;e=e._reactInternals;e:{if(ln(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 tm(e,r,t)}return t}function rg(e,t,r,n,s,o,c,i,a){return e=Nu(r,n,!0,e,s,o,c,i,a),e.context=tg(null),r=e.current,n=He(),s=xr(r),o=Gt(n,s),o.callback=t??null,Sr(r,o,s),e.current.lanes=s,ii(e,s,n),Ye(e,n),e}function ua(e,t,r,n){var s=t.current,o=He(),c=xr(s);return r=tg(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),no(e,s,c)),c}function jo(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 jh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Iu(e,t){jh(e,t),(e=e.alternate)&&jh(e,t)}function _x(){return null}var ng=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ou(e){this._internalRoot=e}da.prototype.render=Ou.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));ua(e,t,null,null)};da.prototype.unmount=Ou.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;en(function(){ua(null,e,null,null)}),t[Xt]=null}};function da(e){this._internalRoot=e}da.prototype.unstable_scheduleHydration=function(e){if(e){var t=Np();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&&Op(e)}};function ju(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ha(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Bh(){}function yx(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=jo(c);o.call(u)}}var c=rg(t,n,e,0,null,!1,!1,"",Bh);return e._reactRootContainer=c,e[Xt]=c.current,Us(e.nodeType===8?e.parentNode:e),en(),c}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var i=n;n=function(){var u=jo(a);i.call(u)}}var a=Nu(e,0,!1,null,null,!1,!1,"",Bh);return e._reactRootContainer=a,e[Xt]=a.current,Us(e.nodeType===8?e.parentNode:e),en(function(){ua(t,a,r,n)}),a}function fa(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=jo(c);i.call(a)}}ua(t,c,e,s)}else c=yx(r,t,e,s,n);return jo(c)}Dp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=xs(t.pendingLanes);r!==0&&(ru(t,r|1),Ye(t,xe()),!(ue&6)&&(Vn=xe()+500,Dr()))}break;case 13:en(function(){var n=Yt(e,1);if(n!==null){var s=He();Et(n,e,1,s)}}),Iu(e,1)}};nu=function(e){if(e.tag===13){var t=Yt(e,134217728);if(t!==null){var r=He();Et(t,e,134217728,r)}Iu(e,134217728)}};Mp=function(e){if(e.tag===13){var t=xr(e),r=Yt(e,t);if(r!==null){var n=He();Et(r,e,t,n)}Iu(e,t)}};Np=function(){return de};Ip=function(e,t){var r=de;try{return de=e,t()}finally{de=r}};Vl=function(e,t,r){switch(t){case"input":if(Bl(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=na(n);if(!s)throw Error(Q(90));hp(n),Bl(n,s)}}}break;case"textarea":pp(e,r);break;case"select":t=r.value,t!=null&&An(e,!!r.multiple,t,!1)}};wp=Lu;xp=en;var Sx={usingClientEntryPoint:!1,Events:[ai,Cn,na,yp,Sp,Lu]},gs={findFiberByHostInstance:Ur,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wx={bundleType:gs.bundleType,version:gs.version,rendererPackageName:gs.rendererPackageName,rendererConfig:gs.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=Ep(e),e===null?null:e.stateNode},findFiberByHostInstance:gs.findFiberByHostInstance||_x,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 $i=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$i.isDisabled&&$i.supportsFiber)try{Zo=$i.inject(wx),Ot=$i}catch{}}at.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sx;at.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ju(t))throw Error(Q(200));return vx(e,t,null,r)};at.createRoot=function(e,t){if(!ju(e))throw Error(Q(299));var r=!1,n="",s=ng;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Nu(e,1,!1,null,null,r,!1,n,s),e[Xt]=t.current,Us(e.nodeType===8?e.parentNode:e),new Ou(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=Ep(t),e=e===null?null:e.stateNode,e};at.flushSync=function(e){return en(e)};at.hydrate=function(e,t,r){if(!ha(t))throw Error(Q(200));return fa(null,e,t,!0,r)};at.hydrateRoot=function(e,t,r){if(!ju(e))throw Error(Q(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",c=ng;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(c=r.onRecoverableError)),t=rg(t,null,e,1,r??null,s,!1,o,c),e[Xt]=t.current,Us(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 da(t)};at.render=function(e,t,r){if(!ha(t))throw Error(Q(200));return fa(null,e,t,!1,r)};at.unmountComponentAtNode=function(e){if(!ha(e))throw Error(Q(40));return e._reactRootContainer?(en(function(){fa(null,null,e,!1,function(){e._reactRootContainer=null,e[Xt]=null})}),!0):!1};at.unstable_batchedUpdates=Lu;at.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!ha(r))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return fa(e,t,r,!1,n)};at.version="18.3.1-next-f1338f8080-20240426";function sg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sg)}catch(e){console.error(e)}}sg(),sp.exports=at;var Zn=sp.exports;const xx=Kf(Zn);var Fh=Zn;Al.createRoot=Fh.createRoot,Al.hydrateRoot=Fh.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 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)}var mr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(mr||(mr={}));const $h="popstate";function bx(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:c,hash:i}=n.location;return Cc("",{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:ig(s)}return Ex(t,r,null,e)}function ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Bu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Cx(){return Math.random().toString(36).substr(2,8)}function Hh(e,t){return{usr:e.state,key:e.key,idx:t}}function Cc(e,t,r,n){return r===void 0&&(r=null),Zs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?es(t):t,{state:r,key:t&&t.key||n||Cx()})}function ig(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 es(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 Ex(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,u=m();u==null&&(u=0,c.replaceState(Zs({},c.state,{idx:u}),""));function m(){return(c.state||{idx:null}).idx}function d(){i=mr.Pop;let p=m(),h=p==null?null:p-u;u=p,a&&a({action:i,location:v.location,delta:h})}function g(p,h){i=mr.Push;let l=Cc(v.location,p,h);u=m()+1;let f=Hh(l,u),S=v.createHref(l);try{c.pushState(f,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(S)}o&&a&&a({action:i,location:v.location,delta:1})}function _(p,h){i=mr.Replace;let l=Cc(v.location,p,h);u=m();let f=Hh(l,u),S=v.createHref(l);c.replaceState(f,"",S),o&&a&&a({action:i,location:v.location,delta:0})}function w(p){let h=s.location.origin!=="null"?s.location.origin:s.location.href,l=typeof p=="string"?p:ig(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 v={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($h,d),a=p,()=>{s.removeEventListener($h,d),a=null}},createHref(p){return t(s,p)},createURL:w,encodeLocation(p){let h=w(p);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:g,replace:_,go(p){return c.go(p)}};return v}var zh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(zh||(zh={}));function kx(e,t,r){return r===void 0&&(r="/"),Rx(e,t,r)}function Rx(e,t,r,n){let s=typeof t=="string"?es(t):t,o=lg(s.pathname||"/",r);if(o==null)return null;let c=og(e);Px(c);let i=null;for(let a=0;i==null&&a<c.length;++a){let u=$x(o);i=jx(c[a],u)}return i}function og(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 u=Xr([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 "'+u+'".')),og(o.children,t,m,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Ix(u,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 ag(o.path))s(o,c,a)}),t}function ag(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=ag(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 Px(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ox(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Tx=/^:[\w-]+$/,Lx=3,Ax=2,Dx=1,Mx=10,Nx=-2,Wh=e=>e==="*";function Ix(e,t){let r=e.split("/"),n=r.length;return r.some(Wh)&&(n+=Nx),t&&(n+=Ax),r.filter(s=>!Wh(s)).reduce((s,o)=>s+(Tx.test(o)?Lx:o===""?Dx:Mx),n)}function Ox(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 jx(e,t,r){let{routesMeta:n}=e,s={},o="/",c=[];for(let i=0;i<n.length;++i){let a=n[i],u=i===n.length-1,m=o==="/"?t:t.slice(o.length)||"/",d=Bx({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},m),g=a.route;if(!d)return null;Object.assign(s,d.params),c.push({params:s,pathname:Xr([o,d.pathname]),pathnameBase:Vx(Xr([o,d.pathnameBase])),route:g}),d.pathnameBase!=="/"&&(o=Xr([o,d.pathnameBase]))}return c}function Bx(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Fx(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((u,m,d)=>{let{paramName:g,isOptional:_}=m;if(g==="*"){let v=i[d]||"";c=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const w=i[d];return _&&!w?u[g]=void 0:u[g]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:c,pattern:e}}function Fx(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Bu(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 $x(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Bu(!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 lg(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 Hx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zx=e=>Hx.test(e);function Wx(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?es(e):e,o;if(r)if(zx(r))o=r;else{if(r.includes("//")){let c=r;r=r.replace(/\/\/+/g,"/"),Bu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(c+" -> "+r))}r.startsWith("/")?o=Uh(r.substring(1),"/"):o=Uh(r,t)}else o=t;return{pathname:o,search:Kx(n),hash:Gx(s)}}function Uh(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 fl(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 Ux(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function cg(e,t){let r=Ux(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function ug(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=es(e):(s=Zs({},e),ke(!s.pathname||!s.pathname.includes("?"),fl("?","pathname","search",s)),ke(!s.pathname||!s.pathname.includes("#"),fl("#","pathname","hash",s)),ke(!s.search||!s.search.includes("#"),fl("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,i;if(c==null)i=r;else{let d=t.length-1;if(!n&&c.startsWith("..")){let g=c.split("/");for(;g[0]==="..";)g.shift(),d-=1;s.pathname=g.join("/")}i=d>=0?t[d]:"/"}let a=Wx(s,i),u=c&&c!=="/"&&c.endsWith("/"),m=(o||c===".")&&r.endsWith("/");return!a.pathname.endsWith("/")&&(u||m)&&(a.pathname+="/"),a}const Xr=e=>e.join("/").replace(/\/\/+/g,"/"),Vx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Kx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Gx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function qx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const dg=["post","put","patch","delete"];new Set(dg);const Xx=["get",...dg];new Set(Xx);/**
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 ei(){return ei=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},ei.apply(this,arguments)}const Fu=x.createContext(null),Yx=x.createContext(null),ci=x.createContext(null),pa=x.createContext(null),cn=x.createContext({outlet:null,matches:[],isDataRoute:!1}),hg=x.createContext(null);function ui(){return x.useContext(pa)!=null}function $u(){return ui()||ke(!1),x.useContext(pa).location}function fg(e){x.useContext(ci).static||x.useLayoutEffect(e)}function Qx(){let{isDataRoute:e}=x.useContext(cn);return e?u1():Jx()}function Jx(){ui()||ke(!1);let e=x.useContext(Fu),{basename:t,future:r,navigator:n}=x.useContext(ci),{matches:s}=x.useContext(cn),{pathname:o}=$u(),c=JSON.stringify(cg(s,r.v7_relativeSplatPath)),i=x.useRef(!1);return fg(()=>{i.current=!0}),x.useCallback(function(u,m){if(m===void 0&&(m={}),!i.current)return;if(typeof u=="number"){n.go(u);return}let d=ug(u,JSON.parse(c),o,m.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Xr([t,d.pathname])),(m.replace?n.replace:n.push)(d,m.state,m)},[t,n,c,o,e])}function Zx(e,t){return e1(e,t)}function e1(e,t,r,n){ui()||ke(!1);let{navigator:s}=x.useContext(ci),{matches:o}=x.useContext(cn),c=o[o.length-1],i=c?c.params:{};c&&c.pathname;let a=c?c.pathnameBase:"/";c&&c.route;let u=$u(),m;if(t){var d;let p=typeof t=="string"?es(t):t;a==="/"||(d=p.pathname)!=null&&d.startsWith(a)||ke(!1),m=p}else m=u;let g=m.pathname||"/",_=g;if(a!=="/"){let p=a.replace(/^\//,"").split("/");_="/"+g.replace(/^\//,"").split("/").slice(p.length).join("/")}let w=kx(e,{pathname:_}),v=i1(w&&w.map(p=>Object.assign({},p,{params:Object.assign({},i,p.params),pathname:Xr([a,s.encodeLocation?s.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?a:Xr([a,s.encodeLocation?s.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),o,r,n);return t&&v?x.createElement(pa.Provider,{value:{location:ei({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:mr.Pop}},v):v}function t1(){let e=c1(),t=qx(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 x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),r?x.createElement("pre",{style:s},r):null,null)}const r1=x.createElement(t1,null);class n1 extends x.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?x.createElement(cn.Provider,{value:this.props.routeContext},x.createElement(hg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function s1(e){let{routeContext:t,match:r,children:n}=e,s=x.useContext(Fu);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(cn.Provider,{value:t},n)}function i1(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(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);m>=0||ke(!1),c=c.slice(0,Math.min(c.length,m+1))}let a=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let m=0;m<c.length;m++){let d=c[m];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=m),d.route.id){let{loaderData:g,errors:_}=r,w=d.route.loader&&g[d.route.id]===void 0&&(!_||_[d.route.id]===void 0);if(d.route.lazy||w){a=!0,u>=0?c=c.slice(0,u+1):c=[c[0]];break}}}return c.reduceRight((m,d,g)=>{let _,w=!1,v=null,p=null;r&&(_=i&&d.route.id?i[d.route.id]:void 0,v=d.route.errorElement||r1,a&&(u<0&&g===0?(d1("route-fallback"),w=!0,p=null):u===g&&(w=!0,p=d.route.hydrateFallbackElement||null)));let h=t.concat(c.slice(0,g+1)),l=()=>{let f;return _?f=v:w?f=p:d.route.Component?f=x.createElement(d.route.Component,null):d.route.element?f=d.route.element:f=m,x.createElement(s1,{match:d,routeContext:{outlet:m,matches:h,isDataRoute:r!=null},children:f})};return r&&(d.route.ErrorBoundary||d.route.errorElement||g===0)?x.createElement(n1,{location:r.location,revalidation:r.revalidation,component:v,error:_,children:l(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):l()},null)}var pg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pg||{}),mg=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}(mg||{});function o1(e){let t=x.useContext(Fu);return t||ke(!1),t}function a1(e){let t=x.useContext(Yx);return t||ke(!1),t}function l1(e){let t=x.useContext(cn);return t||ke(!1),t}function gg(e){let t=l1(),r=t.matches[t.matches.length-1];return r.route.id||ke(!1),r.route.id}function c1(){var e;let t=x.useContext(hg),r=a1(),n=gg();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function u1(){let{router:e}=o1(pg.UseNavigateStable),t=gg(mg.UseNavigateStable),r=x.useRef(!1);return fg(()=>{r.current=!0}),x.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ei({fromRouteId:t},o)))},[e,t])}const Vh={};function d1(e,t,r){Vh[e]||(Vh[e]=!0)}function h1(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Kh(e){let{to:t,replace:r,state:n,relative:s}=e;ui()||ke(!1);let{future:o,static:c}=x.useContext(ci),{matches:i}=x.useContext(cn),{pathname:a}=$u(),u=Qx(),m=ug(t,cg(i,o.v7_relativeSplatPath),a,s==="path"),d=JSON.stringify(m);return x.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:s}),[u,d,s,r,n]),null}function Ec(e){ke(!1)}function f1(e){let{basename:t="/",children:r=null,location:n,navigationType:s=mr.Pop,navigator:o,static:c=!1,future:i}=e;ui()&&ke(!1);let a=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:a,navigator:o,static:c,future:ei({v7_relativeSplatPath:!1},i)}),[a,i,o,c]);typeof n=="string"&&(n=es(n));let{pathname:m="/",search:d="",hash:g="",state:_=null,key:w="default"}=n,v=x.useMemo(()=>{let p=lg(m,a);return p==null?null:{location:{pathname:p,search:d,hash:g,state:_,key:w},navigationType:s}},[a,m,d,g,_,w,s]);return v==null?null:x.createElement(ci.Provider,{value:u},x.createElement(pa.Provider,{children:r,value:v}))}function p1(e){let{children:t,location:r}=e;return Zx(kc(t),r)}new Promise(()=>{});function kc(e,t){t===void 0&&(t=[]);let r=[];return x.Children.forEach(e,(n,s)=>{if(!x.isValidElement(n))return;let o=[...t,s];if(n.type===x.Fragment){r.push.apply(r,kc(n.props.children,o));return}n.type!==Ec&&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=kc(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 m1="6";try{window.__reactRouterVersion=m1}catch{}const g1="startTransition",Gh=Jo[g1];function v1(e){let{basename:t,children:r,future:n,window:s}=e,o=x.useRef();o.current==null&&(o.current=bx({window:s,v5Compat:!0}));let c=o.current,[i,a]=x.useState({action:c.action,location:c.location}),{v7_startTransition:u}=n||{},m=x.useCallback(d=>{u&&Gh?Gh(()=>a(d)):a(d)},[a,u]);return x.useLayoutEffect(()=>c.listen(m),[c,m]),x.useEffect(()=>h1(n),[n]),x.createElement(f1,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:c,future:n})}var qh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(qh||(qh={}));var Xh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xh||(Xh={}));const vg=x.createContext({theme:"system",resolvedTheme:"light",setTheme:()=>{}});function _1(){return x.useContext(vg)}function y1(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Yh(e){return e==="system"?y1():e}function S1({children:e}){const[t,r]=x.useState(()=>localStorage.getItem("launchpod-theme")||"system"),[n,s]=x.useState(()=>Yh(localStorage.getItem("launchpod-theme")||"system")),o=x.useCallback(i=>{const a=Yh(i);s(a),document.documentElement.classList.toggle("dark",a==="dark")},[]),c=x.useCallback(i=>{r(i),localStorage.setItem("launchpod-theme",i),o(i)},[o]);return x.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]),y.jsx(vg.Provider,{value:{theme:t,resolvedTheme:n,setTheme:c},children:e})}function _g(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=_g(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function yg(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=_g(e))&&(n&&(n+=" "),n+=t);return n}const w1=(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},x1=(e,t)=>({classGroupId:e,validator:t}),Sg=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Bo="-",Qh=[],b1="arbitrary..",C1=e=>{const t=k1(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return E1(c);const i=c.split(Bo),a=i[0]===""&&i.length>1?1:0;return wg(i,a,t)},getConflictingClassGroupIds:(c,i)=>{if(i){const a=n[c],u=r[c];return a?u?w1(u,a):a:u||Qh}return r[c]||Qh}}},wg=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],o=r.nextPart.get(s);if(o){const u=wg(e,t+1,o);if(u)return u}const c=r.validators;if(c===null)return;const i=t===0?e.join(Bo):e.slice(t).join(Bo),a=c.length;for(let u=0;u<a;u++){const m=c[u];if(m.validator(i))return m.classGroupId}},E1=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?b1+n:void 0})(),k1=e=>{const{theme:t,classGroups:r}=e;return R1(r,t)},R1=(e,t)=>{const r=Sg();for(const n in e){const s=e[n];Hu(s,r,n,t)}return r},Hu=(e,t,r,n)=>{const s=e.length;for(let o=0;o<s;o++){const c=e[o];P1(c,t,r,n)}},P1=(e,t,r,n)=>{if(typeof e=="string"){T1(e,t,r);return}if(typeof e=="function"){L1(e,t,r,n);return}A1(e,t,r,n)},T1=(e,t,r)=>{const n=e===""?t:xg(t,e);n.classGroupId=r},L1=(e,t,r,n)=>{if(D1(e)){Hu(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(x1(r,e))},A1=(e,t,r,n)=>{const s=Object.entries(e),o=s.length;for(let c=0;c<o;c++){const[i,a]=s[c];Hu(a,xg(t,i),r,n)}},xg=(e,t)=>{let r=e;const n=t.split(Bo),s=n.length;for(let o=0;o<s;o++){const c=n[o];let i=r.nextPart.get(c);i||(i=Sg(),r.nextPart.set(c,i)),r=i}return r},D1=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,M1=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)}}},Rc="!",Jh=":",N1=[],Zh=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),I1=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const o=[];let c=0,i=0,a=0,u;const m=s.length;for(let v=0;v<m;v++){const p=s[v];if(c===0&&i===0){if(p===Jh){o.push(s.slice(a,v)),a=v+1;continue}if(p==="/"){u=v;continue}}p==="["?c++:p==="]"?c--:p==="("?i++:p===")"&&i--}const d=o.length===0?s:s.slice(a);let g=d,_=!1;d.endsWith(Rc)?(g=d.slice(0,-1),_=!0):d.startsWith(Rc)&&(g=d.slice(1),_=!0);const w=u&&u>a?u-a:void 0;return Zh(o,_,g,w)};if(t){const s=t+Jh,o=n;n=c=>c.startsWith(s)?o(c.slice(s.length)):Zh(N1,!1,c,void 0,!0)}if(r){const s=n;n=o=>r({className:o,parseClassName:s})}return n},O1=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}},j1=e=>({cache:M1(e.cacheSize),parseClassName:I1(e),sortModifiers:O1(e),...C1(e)}),B1=/\s+/,F1=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o}=t,c=[],i=e.trim().split(B1);let a="";for(let u=i.length-1;u>=0;u-=1){const m=i[u],{isExternal:d,modifiers:g,hasImportantModifier:_,baseClassName:w,maybePostfixModifierPosition:v}=r(m);if(d){a=m+(a.length>0?" "+a:a);continue}let p=!!v,h=n(p?w.substring(0,v):w);if(!h){if(!p){a=m+(a.length>0?" "+a:a);continue}if(h=n(w),!h){a=m+(a.length>0?" "+a:a);continue}p=!1}const l=g.length===0?"":g.length===1?g[0]:o(g).join(":"),f=_?l+Rc:l,S=f+h;if(c.indexOf(S)>-1)continue;c.push(S);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},$1=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=bg(r))&&(s&&(s+=" "),s+=n);return s},bg=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=bg(e[n]))&&(r&&(r+=" "),r+=t);return r},H1=(e,...t)=>{let r,n,s,o;const c=a=>{const u=t.reduce((m,d)=>d(m),e());return r=j1(u),n=r.cache.get,s=r.cache.set,o=i,i(a)},i=a=>{const u=n(a);if(u)return u;const m=F1(a,r);return s(a,m),m};return o=c,(...a)=>o($1(...a))},z1=[],Re=e=>{const t=r=>r[e]||z1;return t.isThemeGetter=!0,t},Cg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Eg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,U1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V1=/\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$/,K1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,G1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,q1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,or=e=>W1.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),ar=e=>!!e&&Number.isInteger(Number(e)),pl=e=>e.endsWith("%")&&ae(e.slice(0,-1)),zt=e=>U1.test(e),kg=()=>!0,X1=e=>V1.test(e)&&!K1.test(e),zu=()=>!1,Y1=e=>G1.test(e),Q1=e=>q1.test(e),J1=e=>!ee(e)&&!te(e),Z1=e=>Mr(e,Tg,zu),ee=e=>Cg.test(e),Fr=e=>Mr(e,Lg,X1),ef=e=>Mr(e,ab,ae),eb=e=>Mr(e,Dg,kg),tb=e=>Mr(e,Ag,zu),tf=e=>Mr(e,Rg,zu),rb=e=>Mr(e,Pg,Q1),Hi=e=>Mr(e,Mg,Y1),te=e=>Eg.test(e),vs=e=>un(e,Lg),nb=e=>un(e,Ag),rf=e=>un(e,Rg),sb=e=>un(e,Tg),ib=e=>un(e,Pg),zi=e=>un(e,Mg,!0),ob=e=>un(e,Dg,!0),Mr=(e,t,r)=>{const n=Cg.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},un=(e,t,r=!1)=>{const n=Eg.exec(e);return n?n[1]?t(n[1]):r:!1},Rg=e=>e==="position"||e==="percentage",Pg=e=>e==="image"||e==="url",Tg=e=>e==="length"||e==="size"||e==="bg-size",Lg=e=>e==="length",ab=e=>e==="number",Ag=e=>e==="family-name",Dg=e=>e==="number"||e==="weight",Mg=e=>e==="shadow",lb=()=>{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"),u=Re("radius"),m=Re("shadow"),d=Re("inset-shadow"),g=Re("text-shadow"),_=Re("drop-shadow"),w=Re("blur"),v=Re("perspective"),p=Re("aspect"),h=Re("ease"),l=Re("animate"),f=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),te,ee],k=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],b=()=>[te,ee,a],R=()=>[or,"full","auto",...b()],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",...b()],q=()=>[or,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],B=()=>[or,"screen","full","dvw","lvw","svw","min","max","fit",...b()],P=()=>[or,"screen","full","lh","dvh","lvh","svh","min","max","fit",...b()],L=()=>[e,te,ee],I=()=>[...S(),rf,tf,{position:[te,ee]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",sb,Z1,{size:[te,ee]}],$=()=>[pl,vs,Fr],U=()=>["","none","full",u,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,pl,rf,tf],H=()=>["","none",w,te,ee],Y=()=>["none",ae,te,ee],X=()=>["none",ae,te,ee],ne=()=>[ae,te,ee],oe=()=>[or,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zt],breakpoint:[zt],color:[kg],container:[zt],"drop-shadow":[zt],ease:["in","out","in-out"],font:[J1],"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:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[ar,"auto",te,ee]}],basis:[{basis:[or,"full","auto",i,...b()]}],"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:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"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:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pbs:[{pbs:b()}],pbe:[{pbe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],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":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"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",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],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,ob,eb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pl,ee]}],"font-family":[{font:[nb,tb,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,ef]}],leading:[{leading:[o,...b()]}],"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:b()}],"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]},ib,rb]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"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,zi,Hi]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",d,zi,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",g,zi,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":S()}],"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:H()}],brightness:[{brightness:[ae,te,ee]}],contrast:[{contrast:[ae,te,ee]}],"drop-shadow":[{"drop-shadow":["","none",_,zi,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":H()}],"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":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"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:[v,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":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mbs":[{"scroll-mbs":b()}],"scroll-mbe":[{"scroll-mbe":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pbs":[{"scroll-pbs":b()}],"scroll-pbe":[{"scroll-pbe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"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,ef]}],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"]}},cb=H1(lb);function re(...e){return cb(yg(e))}function Ng(e,t=[]){let r=[];function n(o,c){const i=x.createContext(c);i.displayName=o+"Context";const a=r.length;r=[...r,c];const u=d=>{var h;const{scope:g,children:_,...w}=d,v=((h=g==null?void 0:g[e])==null?void 0:h[a])||i,p=x.useMemo(()=>w,Object.values(w));return y.jsx(v.Provider,{value:p,children:_})};u.displayName=o+"Provider";function m(d,g){var v;const _=((v=g==null?void 0:g[e])==null?void 0:v[a])||i,w=x.useContext(_);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,m]}const s=()=>{const o=r.map(c=>x.createContext(c));return function(i){const a=(i==null?void 0:i[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...i,[e]:a}}),[i,a])}};return s.scopeName=e,[n,ub(s,...t)]}function ub(...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:u})=>{const d=a(o)[`__scope${u}`];return{...i,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}function Ft(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var Le=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function nf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $t(...e){return t=>{let r=!1;const n=e.map(s=>{const o=nf(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():nf(e[s],null)}}}}function ce(...e){return x.useCallback($t(...e),e)}var db=Symbol.for("react.lazy"),Fo=Jo[" use ".trim().toString()];function hb(e){return typeof e=="object"&&e!==null&&"then"in e}function Ig(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===db&&"_payload"in e&&hb(e._payload)}function Og(e){const t=fb(e),r=x.forwardRef((n,s)=>{let{children:o,...c}=n;Ig(o)&&typeof Fo=="function"&&(o=Fo(o._payload));const i=x.Children.toArray(o),a=i.find(mb);if(a){const u=a.props.children,m=i.map(d=>d===a?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return y.jsx(t,{...c,ref:s,children:x.isValidElement(u)?x.cloneElement(u,void 0,m):null})}return y.jsx(t,{...c,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var jg=Og("Slot");function fb(e){const t=x.forwardRef((r,n)=>{let{children:s,...o}=r;if(Ig(s)&&typeof Fo=="function"&&(s=Fo(s._payload)),x.isValidElement(s)){const c=vb(s),i=gb(o,s.props);return s.type!==x.Fragment&&(i.ref=n?$t(n,c):c),x.cloneElement(s,i)}return x.Children.count(s)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pb=Symbol("radix.slottable");function mb(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pb}function gb(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 vb(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 _b=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ue=_b.reduce((e,t)=>{const r=Og(`Primitive.${t}`),n=x.forwardRef((s,o)=>{const{asChild:c,...i}=s,a=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Bg={exports:{}},Fg={};/**
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 Kn=x;function yb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sb=typeof Object.is=="function"?Object.is:yb,wb=Kn.useState,xb=Kn.useEffect,bb=Kn.useLayoutEffect,Cb=Kn.useDebugValue;function Eb(e,t){var r=t(),n=wb({inst:{value:r,getSnapshot:t}}),s=n[0].inst,o=n[1];return bb(function(){s.value=r,s.getSnapshot=t,ml(s)&&o({inst:s})},[e,r,t]),xb(function(){return ml(s)&&o({inst:s}),e(function(){ml(s)&&o({inst:s})})},[e]),Cb(r),r}function ml(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Sb(e,r)}catch{return!0}}function kb(e,t){return t()}var Rb=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?kb:Eb;Fg.useSyncExternalStore=Kn.useSyncExternalStore!==void 0?Kn.useSyncExternalStore:Rb;Bg.exports=Fg;var Pb=Bg.exports;function Tb(){return Pb.useSyncExternalStore(Lb,()=>!0,()=>!1)}function Lb(){return()=>{}}var Wu="Avatar",[Ab]=Ng(Wu),[Db,$g]=Ab(Wu),Hg=x.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[s,o]=x.useState("idle");return y.jsx(Db,{scope:r,imageLoadingStatus:s,onImageLoadingStatusChange:o,children:y.jsx(Ue.span,{...n,ref:t})})});Hg.displayName=Wu;var zg="AvatarImage",Wg=x.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:s=()=>{},...o}=e,c=$g(zg,r),i=Mb(n,o),a=Ft(u=>{s(u),c.onImageLoadingStatusChange(u)});return Le(()=>{i!=="idle"&&a(i)},[i,a]),i==="loaded"?y.jsx(Ue.img,{...o,ref:t,src:n}):null});Wg.displayName=zg;var Ug="AvatarFallback",Vg=x.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...s}=e,o=$g(Ug,r),[c,i]=x.useState(n===void 0);return x.useEffect(()=>{if(n!==void 0){const a=window.setTimeout(()=>i(!0),n);return()=>window.clearTimeout(a)}},[n]),c&&o.imageLoadingStatus!=="loaded"?y.jsx(Ue.span,{...s,ref:t}):null});Vg.displayName=Ug;function sf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Mb(e,{referrerPolicy:t,crossOrigin:r}){const n=Tb(),s=x.useRef(null),o=n?(s.current||(s.current=new window.Image),s.current):null,[c,i]=x.useState(()=>sf(o,e));return Le(()=>{i(sf(o,e))},[o,e]),Le(()=>{const a=d=>()=>{i(d)};if(!o)return;const u=a("loaded"),m=a("error");return o.addEventListener("load",u),o.addEventListener("error",m),t&&(o.referrerPolicy=t),typeof r=="string"&&(o.crossOrigin=r),()=>{o.removeEventListener("load",u),o.removeEventListener("error",m)}},[o,r,t]),c}var Kg=Hg,Gg=Wg,qg=Vg;const Nb=x.forwardRef(({className:e,...t},r)=>y.jsx(Kg,{ref:r,className:re("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Nb.displayName=Kg.displayName;const Ib=x.forwardRef(({className:e,...t},r)=>y.jsx(Gg,{ref:r,className:re("aspect-square h-full w-full",e),...t}));Ib.displayName=Gg.displayName;const Ob=x.forwardRef(({className:e,...t},r)=>y.jsx(qg,{ref:r,className:re("flex h-full w-full items-center justify-center rounded-full bg-primary/10 text-primary font-medium",e),...t}));Ob.displayName=qg.displayName;const of=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,af=yg,Uu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return af(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,c=Object.keys(s).map(u=>{const m=r==null?void 0:r[u],d=o==null?void 0:o[u];if(m===null)return null;const g=of(m)||of(d);return s[u][g]}),i=r&&Object.entries(r).reduce((u,m)=>{let[d,g]=m;return g===void 0||(u[d]=g),u},{}),a=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,m)=>{let{class:d,className:g,..._}=m;return Object.entries(_).every(w=>{let[v,p]=w;return Array.isArray(p)?p.includes({...o,...i}[v]):{...o,...i}[v]===p})?[...u,d,g]:u},[]);return af(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 Xg=(...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 jb=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 Bb=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 lf=e=>{const t=Bb(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 Fb={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 $b=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 Hb=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:c,...i},a)=>x.createElement("svg",{ref:a,...Fb,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Xg("lucide",s),...!o&&!$b(i)&&{"aria-hidden":"true"},...i},[...c.map(([u,m])=>x.createElement(u,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=x.forwardRef(({className:n,...s},o)=>x.createElement(Hb,{ref:o,iconNode:t,className:Xg(`lucide-${jb(lf(e))}`,`lucide-${e}`,n),...s}));return r.displayName=lf(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 zb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Vu=be("check",zb);/**
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 Wb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ku=be("chevron-down",Wb);/**
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 Ub=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Yg=be("chevron-right",Ub);/**
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 Vb=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Kb=be("chevron-up",Vb);/**
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 Gb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qb=be("circle",Gb);/**
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 Xb=[["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"}]],Yb=be("layout-dashboard",Xb);/**
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"}]],Jb=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 Zb=[["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"}]],eC=be("log-out",Zb);/**
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 tC=[["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"}]],rC=be("moon",tC);/**
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 nC=[["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"}]],sC=be("pause",nC);/**
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 iC=[["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"}]],oC=be("play",iC);/**
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 aC=[["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"}]],lC=be("refresh-cw",aC);/**
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 cC=[["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"}]],uC=be("rotate-ccw",cC);/**
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 dC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hC=be("search",dC);/**
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 fC=[["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"}]],pC=be("settings",fC);/**
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 mC=[["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"}]],gC=be("sun",mC);/**
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 vC=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],_C=be("terminal",vC);/**
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 yC=[["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"}]],SC=be("trash-2",yC);/**
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 wC=[["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"}]],xC=be("wrench",wC);/**
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 bC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Qg=be("x",bC);/**
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 CC=[["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"}]],EC=be("zap",CC),kC=x.forwardRef(({...e},t)=>y.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));kC.displayName="Breadcrumb";const RC=x.forwardRef(({className:e,...t},r)=>y.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}));RC.displayName="BreadcrumbList";const PC=x.forwardRef(({className:e,...t},r)=>y.jsx("li",{ref:r,className:re("inline-flex items-center gap-1.5",e),...t}));PC.displayName="BreadcrumbItem";const TC=x.forwardRef(({asChild:e,className:t,...r},n)=>{const s=e?jg:"a";return y.jsx(s,{ref:n,className:re("transition-colors hover:text-foreground",t),...r})});TC.displayName="BreadcrumbLink";const LC=x.forwardRef(({className:e,...t},r)=>y.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:re("font-normal text-foreground",e),...t}));LC.displayName="BreadcrumbPage";const AC=Uu("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"}}),Jg=x.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const c=n?jg:"button";return y.jsx(c,{className:re(AC({variant:t,size:r,className:e})),ref:o,...s})});Jg.displayName="Button";const DC=x.forwardRef(({className:e,onClick:t,...r},n)=>{const s=x.useRef(null),[o,c]=x.useState(!1);return x.useEffect(()=>{var u;const i=s.current;if(!i)return;const a=!!t||((u=i.parentElement)==null?void 0:u.tagName)==="A"||!!i.querySelector(":scope > a");c(a)},[t]),y.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})});DC.displayName="Card";const MC=x.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:re("flex flex-col space-y-1.5 p-6",e),...t}));MC.displayName="CardHeader";const NC=x.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:re("font-semibold leading-none tracking-tight",e),...t}));NC.displayName="CardTitle";const IC=x.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:re("text-sm text-muted-foreground",e),...t}));IC.displayName="CardDescription";const OC=x.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:re("p-6 pt-0",e),...t}));OC.displayName="CardContent";const jC=x.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:re("flex items-center p-6 pt-0",e),...t}));jC.displayName="CardFooter";function BC(e,t){const r=x.createContext(t),n=o=>{const{children:c,...i}=o,a=x.useMemo(()=>i,Object.values(i));return y.jsx(r.Provider,{value:a,children:c})};n.displayName=e+"Provider";function s(o){const c=x.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=x.createContext(c),a=r.length;r=[...r,c];const u=d=>{var h;const{scope:g,children:_,...w}=d,v=((h=g==null?void 0:g[e])==null?void 0:h[a])||i,p=x.useMemo(()=>w,Object.values(w));return y.jsx(v.Provider,{value:p,children:_})};u.displayName=o+"Provider";function m(d,g){var v;const _=((v=g==null?void 0:g[e])==null?void 0:v[a])||i,w=x.useContext(_);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,m]}const s=()=>{const o=r.map(c=>x.createContext(c));return function(i){const a=(i==null?void 0:i[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...i,[e]:a}}),[i,a])}};return s.scopeName=e,[n,FC(s,...t)]}function FC(...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:u})=>{const d=a(o)[`__scope${u}`];return{...i,...d}},{});return x.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 $C=Jo[" useInsertionEffect ".trim().toString()]||Le;function di({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,c]=HC({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:s;{const m=x.useRef(e!==void 0);x.useEffect(()=>{const d=m.current;d!==i&&console.warn(`${n} is changing from ${d?"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 u=x.useCallback(m=>{var d;if(i){const g=zC(m)?m(e):m;g!==e&&((d=c.current)==null||d.call(c,g))}else o(m)},[i,e,o,c]);return[a,u]}function HC({defaultProp:e,onChange:t}){const[r,n]=x.useState(e),s=x.useRef(r),o=x.useRef(t);return $C(()=>{o.current=t},[t]),x.useEffect(()=>{var c;s.current!==r&&((c=o.current)==null||c.call(o,r),s.current=r)},[r,s]),[r,n,o]}function zC(e){return typeof e=="function"}function Gu(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function qu(e){const[t,r]=x.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,u=Array.isArray(a)?a[0]:a;c=u.inlineSize,i=u.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 WC(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var Qe=e=>{const{present:t,children:r}=e,n=UC(t),s=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),o=ce(n.ref,VC(s));return typeof r=="function"||n.isPresent?x.cloneElement(s,{ref:o}):null};Qe.displayName="Presence";function UC(e){const[t,r]=x.useState(),n=x.useRef(null),s=x.useRef(e),o=x.useRef("none"),c=e?"mounted":"unmounted",[i,a]=WC(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=Wi(n.current);o.current=i==="mounted"?u:"none"},[i]),Le(()=>{const u=n.current,m=s.current;if(m!==e){const g=o.current,_=Wi(u);e?a("MOUNT"):_==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(m&&g!==_?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,a]),Le(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,d=_=>{const v=Wi(n.current).includes(CSS.escape(_.animationName));if(_.target===t&&v&&(a("ANIMATION_END"),!s.current)){const p=t.style.animationFillMode;t.style.animationFillMode="forwards",u=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=p)})}},g=_=>{_.target===t&&(o.current=Wi(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{m.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:x.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Wi(e){return(e==null?void 0:e.animationName)||"none"}function VC(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 tn(e){const t=KC(e),r=x.forwardRef((n,s)=>{const{children:o,...c}=n,i=x.Children.toArray(o),a=i.find(qC);if(a){const u=a.props.children,m=i.map(d=>d===a?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return y.jsx(t,{...c,ref:s,children:x.isValidElement(u)?x.cloneElement(u,void 0,m):null})}return y.jsx(t,{...c,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function KC(e){const t=x.forwardRef((r,n)=>{const{children:s,...o}=r;if(x.isValidElement(s)){const c=YC(s),i=XC(o,s.props);return s.type!==x.Fragment&&(i.ref=n?$t(n,c):c),x.cloneElement(s,i)}return x.Children.count(s)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zg=Symbol("radix.slottable");function GC(e){const t=({children:r})=>y.jsx(y.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Zg,t}function qC(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zg}function XC(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 YC(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=tn(`Primitive.${t}`),n=x.forwardRef((s,o)=>{const{asChild:c,...i}=s,a=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ev(e,t){e&&Zn.flushSync(()=>e.dispatchEvent(t))}var ma="Checkbox",[JC]=_t(ma),[ZC,Xu]=JC(ma);function eE(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:o,form:c,name:i,onCheckedChange:a,required:u,value:m="on",internal_do_not_use_render:d}=e,[g,_]=di({prop:r,defaultProp:s??!1,onChange:a,caller:ma}),[w,v]=x.useState(null),[p,h]=x.useState(null),l=x.useRef(!1),f=w?!!c||!!w.closest("form"):!0,S={checked:g,disabled:o,setChecked:_,control:w,setControl:v,name:i,form:c,value:m,hasConsumerStoppedPropagationRef:l,required:u,defaultChecked:Cr(s)?!1:s,isFormControl:f,bubbleInput:p,setBubbleInput:h};return y.jsx(ZC,{scope:t,...S,children:tE(d)?d(S):n})}var tv="CheckboxTrigger",rv=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:o,value:c,disabled:i,checked:a,required:u,setControl:m,setChecked:d,hasConsumerStoppedPropagationRef:g,isFormControl:_,bubbleInput:w}=Xu(tv,e),v=ce(s,m),p=x.useRef(a);return x.useEffect(()=>{const h=o==null?void 0:o.form;if(h){const l=()=>d(p.current);return h.addEventListener("reset",l),()=>h.removeEventListener("reset",l)}},[o,d]),y.jsx(ie.button,{type:"button",role:"checkbox","aria-checked":Cr(a)?"mixed":a,"aria-required":u,"data-state":av(a),"data-disabled":i?"":void 0,disabled:i,value:c,...n,ref:v,onKeyDown:J(t,h=>{h.key==="Enter"&&h.preventDefault()}),onClick:J(r,h=>{d(l=>Cr(l)?!0:!l),w&&_&&(g.current=h.isPropagationStopped(),g.current||h.stopPropagation())})})});rv.displayName=tv;var Yu=x.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:o,required:c,disabled:i,value:a,onCheckedChange:u,form:m,...d}=e;return y.jsx(eE,{__scopeCheckbox:r,checked:s,defaultChecked:o,disabled:i,required:c,onCheckedChange:u,name:n,form:m,value:a,internal_do_not_use_render:({isFormControl:g})=>y.jsxs(y.Fragment,{children:[y.jsx(rv,{...d,ref:t,__scopeCheckbox:r}),g&&y.jsx(ov,{__scopeCheckbox:r})]})})});Yu.displayName=ma;var nv="CheckboxIndicator",sv=x.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,o=Xu(nv,r);return y.jsx(Qe,{present:n||Cr(o.checked)||o.checked===!0,children:y.jsx(ie.span,{"data-state":av(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});sv.displayName=nv;var iv="CheckboxBubbleInput",ov=x.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:c,required:i,disabled:a,name:u,value:m,form:d,bubbleInput:g,setBubbleInput:_}=Xu(iv,e),w=ce(r,_),v=Gu(o),p=qu(n);x.useEffect(()=>{const l=g;if(!l)return;const f=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(f,"checked").set,k=!s.current;if(v!==o&&E){const C=new Event("click",{bubbles:k});l.indeterminate=Cr(o),E.call(l,Cr(o)?!1:o),l.dispatchEvent(C)}},[g,v,o,s]);const h=x.useRef(Cr(o)?!1:o);return y.jsx(ie.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??h.current,required:i,disabled:a,name:u,value:m,form:d,...t,tabIndex:-1,ref:w,style:{...t.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ov.displayName=iv;function tE(e){return typeof e=="function"}function Cr(e){return e==="indeterminate"}function av(e){return Cr(e)?"indeterminate":e?"checked":"unchecked"}const rE=x.forwardRef(({className:e,...t},r)=>y.jsx(Yu,{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:y.jsx(sv,{className:re("grid place-content-center text-current"),children:y.jsx(Vu,{className:"h-4 w-4"})})}));rE.displayName=Yu.displayName;var nE=Jo[" useId ".trim().toString()]||(()=>{}),sE=0;function st(e){const[t,r]=x.useState(nE());return Le(()=>{r(n=>n??String(sE++))},[e]),t?`radix-${t}`:""}var cf=1,iE=.9,oE=.8,aE=.17,gl=.1,vl=.999,lE=.9999,cE=.99,uE=/[\\\/_+.#"@\[\(\{&]/,dE=/[\\\/_+.#"@\[\(\{&]/g,hE=/[\s-]/,lv=/[\s-]/g;function Pc(e,t,r,n,s,o,c){if(o===t.length)return s===e.length?cf:cE;var i=`${s},${o}`;if(c[i]!==void 0)return c[i];for(var a=n.charAt(o),u=r.indexOf(a,s),m=0,d,g,_,w;u>=0;)d=Pc(e,t,r,n,u+1,o+1,c),d>m&&(u===s?d*=cf:uE.test(e.charAt(u-1))?(d*=oE,_=e.slice(s,u-1).match(dE),_&&s>0&&(d*=Math.pow(vl,_.length))):hE.test(e.charAt(u-1))?(d*=iE,w=e.slice(s,u-1).match(lv),w&&s>0&&(d*=Math.pow(vl,w.length))):(d*=aE,s>0&&(d*=Math.pow(vl,u-s))),e.charAt(u)!==t.charAt(o)&&(d*=lE)),(d<gl&&r.charAt(u-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(u-1)!==n.charAt(o))&&(g=Pc(e,t,r,n,u+1,o+2,c),g*gl>d&&(d=g*gl)),d>m&&(m=d),u=r.indexOf(a,u+1);return c[i]=m,m}function uf(e){return e.toLowerCase().replace(lv," ")}function fE(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Pc(e,t,uf(e),uf(t),0,0,{})}function pE(e,t=globalThis==null?void 0:globalThis.document){const r=Ft(e);x.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 mE="DismissableLayer",Tc="dismissableLayer.update",gE="dismissableLayer.pointerDownOutside",vE="dismissableLayer.focusOutside",df,cv=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ts=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:c,onDismiss:i,...a}=e,u=x.useContext(cv),[m,d]=x.useState(null),g=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=x.useState({}),w=ce(t,C=>d(C)),v=Array.from(u.layers),[p]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=v.indexOf(p),l=m?v.indexOf(m):-1,f=u.layersWithOutsidePointerEventsDisabled.size>0,S=l>=h,E=SE(C=>{const b=C.target,R=[...u.branches].some(T=>T.contains(b));!S||R||(s==null||s(C),c==null||c(C),C.defaultPrevented||i==null||i())},g),k=wE(C=>{const b=C.target;[...u.branches].some(T=>T.contains(b))||(o==null||o(C),c==null||c(C),C.defaultPrevented||i==null||i())},g);return pE(C=>{l===u.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},g),x.useEffect(()=>{if(m)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(df=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),hf(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=df)}},[m,g,r,u]),x.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),hf())},[m,u]),x.useEffect(()=>{const C=()=>_({});return document.addEventListener(Tc,C),()=>document.removeEventListener(Tc,C)},[]),y.jsx(ie.div,{...a,ref:w,style:{pointerEvents:f?S?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,k.onFocusCapture),onBlurCapture:J(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,E.onPointerDownCapture)})});ts.displayName=mE;var _E="DismissableLayerBranch",yE=x.forwardRef((e,t)=>{const r=x.useContext(cv),n=x.useRef(null),s=ce(t,n);return x.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),y.jsx(ie.div,{...e,ref:s})});yE.displayName=_E;function SE(e,t=globalThis==null?void 0:globalThis.document){const r=Ft(e),n=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const o=i=>{if(i.target&&!n.current){let a=function(){uv(gE,r,u,{discrete:!0})};const u={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 wE(e,t=globalThis==null?void 0:globalThis.document){const r=Ft(e),n=x.useRef(!1);return x.useEffect(()=>{const s=o=>{o.target&&!n.current&&uv(vE,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 hf(){const e=new CustomEvent(Tc);document.dispatchEvent(e)}function uv(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?ev(s,o):s.dispatchEvent(o)}var _l="focusScope.autoFocusOnMount",yl="focusScope.autoFocusOnUnmount",ff={bubbles:!1,cancelable:!0},xE="FocusScope",hi=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...c}=e,[i,a]=x.useState(null),u=Ft(s),m=Ft(o),d=x.useRef(null),g=ce(t,v=>a(v)),_=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let v=function(f){if(_.paused||!i)return;const S=f.target;i.contains(S)?d.current=S:lr(d.current,{select:!0})},p=function(f){if(_.paused||!i)return;const S=f.relatedTarget;S!==null&&(i.contains(S)||lr(d.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",v),document.addEventListener("focusout",p);const l=new MutationObserver(h);return i&&l.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",p),l.disconnect()}}},[n,i,_.paused]),x.useEffect(()=>{if(i){mf.add(_);const v=document.activeElement;if(!i.contains(v)){const h=new CustomEvent(_l,ff);i.addEventListener(_l,u),i.dispatchEvent(h),h.defaultPrevented||(bE(PE(dv(i)),{select:!0}),document.activeElement===v&&lr(i))}return()=>{i.removeEventListener(_l,u),setTimeout(()=>{const h=new CustomEvent(yl,ff);i.addEventListener(yl,m),i.dispatchEvent(h),h.defaultPrevented||lr(v??document.body,{select:!0}),i.removeEventListener(yl,m),mf.remove(_)},0)}}},[i,u,m,_]);const w=x.useCallback(v=>{if(!r&&!n||_.paused)return;const p=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,h=document.activeElement;if(p&&h){const l=v.currentTarget,[f,S]=CE(l);f&&S?!v.shiftKey&&h===S?(v.preventDefault(),r&&lr(f,{select:!0})):v.shiftKey&&h===f&&(v.preventDefault(),r&&lr(S,{select:!0})):h===l&&v.preventDefault()}},[r,n,_.paused]);return y.jsx(ie.div,{tabIndex:-1,...c,ref:g,onKeyDown:w})});hi.displayName=xE;function bE(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(lr(n,{select:t}),document.activeElement!==r)return}function CE(e){const t=dv(e),r=pf(t,e),n=pf(t.reverse(),e);return[r,n]}function dv(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 pf(e,t){for(const r of e)if(!EE(r,{upTo:t}))return r}function EE(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 kE(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&&kE(e)&&t&&e.select()}}var mf=RE();function RE(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=gf(e,t),e.unshift(t)},remove(t){var r;e=gf(e,t),(r=e[0])==null||r.resume()}}}function gf(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function PE(e){return e.filter(t=>t.tagName!=="A")}var TE="Portal",rs=x.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[s,o]=x.useState(!1);Le(()=>o(!0),[]);const c=r||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return c?xx.createPortal(y.jsx(ie.div,{...n,ref:t}),c):null});rs.displayName=TE;var Sl=0;function ga(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vf()),document.body.insertAdjacentElement("beforeend",e[1]??vf()),Sl++,()=>{Sl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Sl--}},[])}function vf(){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 hv(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 LE(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 uo="right-scroll-bar-position",ho="width-before-scroll-bar",AE="with-scroll-bars-hidden",DE="--removed-body-scroll-bar-size";function wl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ME(e,t){var r=x.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 NE=typeof window<"u"?x.useLayoutEffect:x.useEffect,_f=new WeakMap;function IE(e,t){var r=ME(null,function(n){return e.forEach(function(s){return wl(s,n)})});return NE(function(){var n=_f.get(r);if(n){var s=new Set(n),o=new Set(e),c=r.current;s.forEach(function(i){o.has(i)||wl(i,null)}),o.forEach(function(i){s.has(i)||wl(i,c)})}_f.set(r,e)},[e]),r}function OE(e){return e}function jE(e,t){t===void 0&&(t=OE);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)},u=function(){return Promise.resolve().then(a)};u(),r={push:function(m){c.push(m),u()},filter:function(m){return c=c.filter(m),r}}}};return s}function BE(e){e===void 0&&(e={});var t=jE(null);return t.options=Nt({async:!0,ssr:!1},e),t}var fv=function(e){var t=e.sideCar,r=hv(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 x.createElement(n,Nt({},r))};fv.isSideCarExport=!0;function FE(e,t){return e.useMedium(t),fv}var pv=BE(),xl=function(){},va=x.forwardRef(function(e,t){var r=x.useRef(null),n=x.useState({onScrollCapture:xl,onWheelCapture:xl,onTouchMoveCapture:xl}),s=n[0],o=n[1],c=e.forwardProps,i=e.children,a=e.className,u=e.removeScrollBar,m=e.enabled,d=e.shards,g=e.sideCar,_=e.noRelative,w=e.noIsolation,v=e.inert,p=e.allowPinchZoom,h=e.as,l=h===void 0?"div":h,f=e.gapMode,S=hv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,k=IE([r,t]),C=Nt(Nt({},S),s);return x.createElement(x.Fragment,null,m&&x.createElement(E,{sideCar:pv,removeScrollBar:u,shards:d,noRelative:_,noIsolation:w,inert:v,setCallbacks:o,allowPinchZoom:!!p,lockRef:r,gapMode:f}),c?x.cloneElement(x.Children.only(i),Nt(Nt({},C),{ref:k})):x.createElement(l,Nt({},C,{className:a,ref:k}),i))});va.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};va.classNames={fullWidth:ho,zeroRight:uo};var $E=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function HE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$E();return t&&e.setAttribute("nonce",t),e}function zE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function WE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var UE=function(){var e=0,t=null;return{add:function(r){e==0&&(t=HE())&&(zE(t,r),WE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},VE=function(){var e=UE();return function(t,r){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},mv=function(){var e=VE(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},KE={left:0,top:0,right:0,gap:0},bl=function(e){return parseInt(e||"",10)||0},GE=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[bl(r),bl(n),bl(s)]},qE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return KE;var t=GE(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])}},XE=mv(),jn="data-scroll-locked",YE=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(AE,` {
222
- overflow: hidden `).concat(n,`;
223
- padding-right: `).concat(i,"px ").concat(n,`;
224
- }
225
- body[`).concat(jn,`] {
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(uo,` {
239
- right: `).concat(i,"px ").concat(n,`;
240
- }
241
-
242
- .`).concat(ho,` {
243
- margin-right: `).concat(i,"px ").concat(n,`;
244
- }
245
-
246
- .`).concat(uo," .").concat(uo,` {
247
- right: 0 `).concat(n,`;
248
- }
249
-
250
- .`).concat(ho," .").concat(ho,` {
251
- margin-right: 0 `).concat(n,`;
252
- }
253
-
254
- body[`).concat(jn,`] {
255
- `).concat(DE,": ").concat(i,`px;
256
- }
257
- `)},yf=function(){var e=parseInt(document.body.getAttribute(jn)||"0",10);return isFinite(e)?e:0},QE=function(){x.useEffect(function(){return document.body.setAttribute(jn,(yf()+1).toString()),function(){var e=yf()-1;e<=0?document.body.removeAttribute(jn):document.body.setAttribute(jn,e.toString())}},[])},JE=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;QE();var o=x.useMemo(function(){return qE(s)},[s]);return x.createElement(XE,{styles:YE(o,!t,s,r?"":"!important")})},Lc=!1;if(typeof window<"u")try{var Ui=Object.defineProperty({},"passive",{get:function(){return Lc=!0,!0}});window.addEventListener("test",Ui,Ui),window.removeEventListener("test",Ui,Ui)}catch{Lc=!1}var pn=Lc?{passive:!1}:!1,ZE=function(e){return e.tagName==="TEXTAREA"},gv=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ZE(e)&&r[t]==="visible")},ek=function(e){return gv(e,"overflowY")},tk=function(e){return gv(e,"overflowX")},Sf=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=vv(e,n);if(s){var o=_v(e,n),c=o[1],i=o[2];if(c>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},rk=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},nk=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},vv=function(e,t){return e==="v"?ek(t):tk(t)},_v=function(e,t){return e==="v"?rk(t):nk(t)},sk=function(e,t){return e==="h"&&t==="rtl"?-1:1},ik=function(e,t,r,n,s){var o=sk(e,window.getComputedStyle(t).direction),c=o*n,i=r.target,a=t.contains(i),u=!1,m=c>0,d=0,g=0;do{if(!i)break;var _=_v(e,i),w=_[0],v=_[1],p=_[2],h=v-p-o*w;(w||h)&&vv(e,i)&&(d+=h,g+=w);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(d)<1||!m&&Math.abs(g)<1)&&(u=!0),u},Vi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wf=function(e){return[e.deltaX,e.deltaY]},xf=function(e){return e&&"current"in e?e.current:e},ok=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ak=function(e){return`
258
- .block-interactivity-`.concat(e,` {pointer-events: none;}
259
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
260
- `)},lk=0,mn=[];function ck(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),s=x.useState(lk++)[0],o=x.useState(mv)[0],c=x.useRef(e);x.useEffect(function(){c.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var v=LE([e.lockRef.current],(e.shards||[]).map(xf),!0).filter(Boolean);return v.forEach(function(p){return p.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(p){return p.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var i=x.useCallback(function(v,p){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!c.current.allowPinchZoom;var h=Vi(v),l=r.current,f="deltaX"in v?v.deltaX:l[0]-h[0],S="deltaY"in v?v.deltaY:l[1]-h[1],E,k=v.target,C=Math.abs(f)>Math.abs(S)?"h":"v";if("touches"in v&&C==="h"&&k.type==="range")return!1;var b=window.getSelection(),R=b&&b.anchorNode,T=R?R===k||R.contains(k):!1;if(T)return!1;var M=Sf(C,k);if(!M)return!0;if(M?E=C:(E=C==="v"?"h":"v",M=Sf(C,k)),!M)return!1;if(!n.current&&"changedTouches"in v&&(f||S)&&(n.current=E),!E)return!0;var j=n.current||E;return ik(j,p,v,j==="h"?f:S)},[]),a=x.useCallback(function(v){var p=v;if(!(!mn.length||mn[mn.length-1]!==o)){var h="deltaY"in p?wf(p):Vi(p),l=t.current.filter(function(E){return E.name===p.type&&(E.target===p.target||p.target===E.shadowParent)&&ok(E.delta,h)})[0];if(l&&l.should){p.cancelable&&p.preventDefault();return}if(!l){var f=(c.current.shards||[]).map(xf).filter(Boolean).filter(function(E){return E.contains(p.target)}),S=f.length>0?i(p,f[0]):!c.current.noIsolation;S&&p.cancelable&&p.preventDefault()}}},[]),u=x.useCallback(function(v,p,h,l){var f={name:v,delta:p,target:h,should:l,shadowParent:uk(h)};t.current.push(f),setTimeout(function(){t.current=t.current.filter(function(S){return S!==f})},1)},[]),m=x.useCallback(function(v){r.current=Vi(v),n.current=void 0},[]),d=x.useCallback(function(v){u(v.type,wf(v),v.target,i(v,e.lockRef.current))},[]),g=x.useCallback(function(v){u(v.type,Vi(v),v.target,i(v,e.lockRef.current))},[]);x.useEffect(function(){return mn.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",a,pn),document.addEventListener("touchmove",a,pn),document.addEventListener("touchstart",m,pn),function(){mn=mn.filter(function(v){return v!==o}),document.removeEventListener("wheel",a,pn),document.removeEventListener("touchmove",a,pn),document.removeEventListener("touchstart",m,pn)}},[]);var _=e.removeScrollBar,w=e.inert;return x.createElement(x.Fragment,null,w?x.createElement(o,{styles:ak(s)}):null,_?x.createElement(JE,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function uk(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dk=FE(pv,ck);var fi=x.forwardRef(function(e,t){return x.createElement(va,Nt({},e,{ref:t,sideCar:dk}))});fi.classNames=va.classNames;var hk=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gn=new WeakMap,Ki=new WeakMap,Gi={},Cl=0,yv=function(e){return e&&(e.host||yv(e.parentNode))},fk=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=yv(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})},pk=function(e,t,r,n){var s=fk(t,Array.isArray(e)?e:[e]);Gi[r]||(Gi[r]=new WeakMap);var o=Gi[r],c=[],i=new Set,a=new Set(s),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};s.forEach(u);var m=function(d){!d||a.has(d)||Array.prototype.forEach.call(d.children,function(g){if(i.has(g))m(g);else try{var _=g.getAttribute(n),w=_!==null&&_!=="false",v=(gn.get(g)||0)+1,p=(o.get(g)||0)+1;gn.set(g,v),o.set(g,p),c.push(g),v===1&&w&&Ki.set(g,!0),p===1&&g.setAttribute(r,"true"),w||g.setAttribute(n,"true")}catch(h){console.error("aria-hidden: cannot operate on ",g,h)}})};return m(t),i.clear(),Cl++,function(){c.forEach(function(d){var g=gn.get(d)-1,_=o.get(d)-1;gn.set(d,g),o.set(d,_),g||(Ki.has(d)||d.removeAttribute(n),Ki.delete(d)),_||d.removeAttribute(r)}),Cl--,Cl||(gn=new WeakMap,gn=new WeakMap,Ki=new WeakMap,Gi={})}},_a=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=hk(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),pk(n,s,r,"aria-hidden")):function(){return null}},ya="Dialog",[Sv]=_t(ya),[mk,Tt]=Sv(ya),wv=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:c=!0}=e,i=x.useRef(null),a=x.useRef(null),[u,m]=di({prop:n,defaultProp:s??!1,onChange:o,caller:ya});return y.jsx(mk,{scope:t,triggerRef:i,contentRef:a,contentId:st(),titleId:st(),descriptionId:st(),open:u,onOpenChange:m,onOpenToggle:x.useCallback(()=>m(d=>!d),[m]),modal:c,children:r})};wv.displayName=ya;var xv="DialogTrigger",gk=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt(xv,r),o=ce(t,s.triggerRef);return y.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Zu(s.open),...n,ref:o,onClick:J(e.onClick,s.onOpenToggle)})});gk.displayName=xv;var Qu="DialogPortal",[vk,bv]=Sv(Qu,{forceMount:void 0}),Cv=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=Tt(Qu,t);return y.jsx(vk,{scope:t,forceMount:r,children:x.Children.map(n,c=>y.jsx(Qe,{present:r||o.open,children:y.jsx(rs,{asChild:!0,container:s,children:c})}))})};Cv.displayName=Qu;var $o="DialogOverlay",Ev=x.forwardRef((e,t)=>{const r=bv($o,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Tt($o,e.__scopeDialog);return o.modal?y.jsx(Qe,{present:n||o.open,children:y.jsx(yk,{...s,ref:t})}):null});Ev.displayName=$o;var _k=tn("DialogOverlay.RemoveScroll"),yk=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt($o,r);return y.jsx(fi,{as:_k,allowPinchZoom:!0,shards:[s.contentRef],children:y.jsx(ie.div,{"data-state":Zu(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),rn="DialogContent",kv=x.forwardRef((e,t)=>{const r=bv(rn,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Tt(rn,e.__scopeDialog);return y.jsx(Qe,{present:n||o.open,children:o.modal?y.jsx(Sk,{...s,ref:t}):y.jsx(wk,{...s,ref:t})})});kv.displayName=rn;var Sk=x.forwardRef((e,t)=>{const r=Tt(rn,e.__scopeDialog),n=x.useRef(null),s=ce(t,r.contentRef,n);return x.useEffect(()=>{const o=n.current;if(o)return _a(o)},[]),y.jsx(Rv,{...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())})}),wk=x.forwardRef((e,t)=>{const r=Tt(rn,e.__scopeDialog),n=x.useRef(!1),s=x.useRef(!1);return y.jsx(Rv,{...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,u;(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;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Rv=x.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...c}=e,i=Tt(rn,r),a=x.useRef(null),u=ce(t,a);return ga(),y.jsxs(y.Fragment,{children:[y.jsx(hi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:y.jsx(ts,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Zu(i.open),...c,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(xk,{titleId:i.titleId}),y.jsx(Ck,{contentRef:a,descriptionId:i.descriptionId})]})]})}),Ju="DialogTitle",Pv=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt(Ju,r);return y.jsx(ie.h2,{id:s.titleId,...n,ref:t})});Pv.displayName=Ju;var Tv="DialogDescription",Lv=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt(Tv,r);return y.jsx(ie.p,{id:s.descriptionId,...n,ref:t})});Lv.displayName=Tv;var Av="DialogClose",Dv=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tt(Av,r);return y.jsx(ie.button,{type:"button",...n,ref:t,onClick:J(e.onClick,()=>s.onOpenChange(!1))})});Dv.displayName=Av;function Zu(e){return e?"open":"closed"}var Mv="DialogTitleWarning",[GA,Nv]=BC(Mv,{contentName:rn,titleName:Ju,docsSlug:"dialog"}),xk=({titleId:e})=>{const t=Nv(Mv),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 x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},bk="DialogDescriptionWarning",Ck=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nv(bk).contentName}}.`;return x.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},Ek=wv,ed=Cv,pi=Ev,mi=kv,Sa=Pv,wa=Lv,Iv=Dv,_s='[cmdk-group=""]',El='[cmdk-group-items=""]',kk='[cmdk-group-heading=""]',Ov='[cmdk-item=""]',bf=`${Ov}:not([aria-disabled="true"])`,Ac="cmdk-item-select",vn="data-value",Rk=(e,t,r)=>fE(e,t,r),jv=x.createContext(void 0),gi=()=>x.useContext(jv),Bv=x.createContext(void 0),td=()=>x.useContext(Bv),Fv=x.createContext(void 0),$v=x.forwardRef((e,t)=>{let r=_n(()=>{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=_n(()=>new Set),s=_n(()=>new Map),o=_n(()=>new Map),c=_n(()=>new Set),i=Hv(e),{label:a,children:u,value:m,onValueChange:d,filter:g,shouldFilter:_,loop:w,disablePointerSelection:v=!1,vimBindings:p=!0,...h}=e,l=st(),f=st(),S=st(),E=x.useRef(null),k=Bk();nn(()=>{if(m!==void 0){let D=m.trim();r.current.value=D,C.emit()}},[m]),nn(()=>{k(6,N)},[]);let C=x.useMemo(()=>({subscribe:D=>(c.current.add(D),()=>c.current.delete(D)),snapshot:()=>r.current,setState:(D,W,$)=>{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(S);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()}),$||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())}}),[]),b=x.useMemo(()=>({value:(D,W,$)=>{var U;W!==((U=o.current.get(D))==null?void 0:U.value)&&(o.current.set(D,{value:W,keywords:$}),r.current.filtered.items.set(D,R(W,$)),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 $=F();k(4,()=>{j(),($==null?void 0:$.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:S,labelId:f,listInnerRef:E}),[]);function R(D,W){var $,U;let G=(U=($=i.current)==null?void 0:$.filter)!=null?U:Rk;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 $=E.current;V().sort((U,G)=>{var O,A;let z=U.getAttribute("id"),H=G.getAttribute("id");return((O=D.get(H))!=null?O:0)-((A=D.get(z))!=null?A:0)}).forEach(U=>{let G=U.closest(El);G?G.appendChild(U.parentElement===G?U:U.closest(`${El} > *`)):$.appendChild(U.parentElement===$?U:U.closest(`${El} > *`))}),W.sort((U,G)=>G[1]-U[1]).forEach(U=>{var G;let O=(G=E.current)==null?void 0:G.querySelector(`${_s}[${vn}="${encodeURIComponent(U[0])}"]`);O==null||O.parentElement.appendChild(O)})}function M(){let D=V().find($=>$.getAttribute("aria-disabled")!=="true"),W=D==null?void 0:D.getAttribute(vn);C.setState("value",W||void 0)}function j(){var D,W,$,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=($=o.current.get(O))==null?void 0:$.keywords)!=null?U:[],H=R(A,z);r.current.filtered.items.set(O,H),H>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,$;let U=F();U&&(((D=U.parentElement)==null?void 0:D.firstChild)===U&&(($=(W=U.closest(_s))==null?void 0:W.querySelector(kk))==null||$.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function F(){var D;return(D=E.current)==null?void 0:D.querySelector(`${Ov}[aria-selected="true"]`)}function V(){var D;return Array.from(((D=E.current)==null?void 0:D.querySelectorAll(bf))||[])}function K(D){let W=V()[D];W&&C.setState("value",W.getAttribute(vn))}function q(D){var W;let $=F(),U=V(),G=U.findIndex(A=>A===$),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(),$=W==null?void 0:W.closest(_s),U;for(;$&&!U;)$=D>0?Ok($,_s):jk($,_s),U=$==null?void 0:$.querySelector(bf);U?C.setState("value",U.getAttribute(vn)):q(D)}let P=()=>K(V().length-1),L=D=>{D.preventDefault(),D.metaKey?P():D.altKey?B(1):q(1)},I=D=>{D.preventDefault(),D.metaKey?K(0):D.altKey?B(-1):q(-1)};return x.createElement(Ue.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:D=>{var W;(W=h.onKeyDown)==null||W.call(h,D);let $=D.nativeEvent.isComposing||D.keyCode===229;if(!(D.defaultPrevented||$))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(),P();break}case"Enter":{D.preventDefault();let U=F();if(U){let G=new Event(Ac);U.dispatchEvent(G)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:b.inputId,id:b.labelId,style:$k},a),xa(e,D=>x.createElement(Bv.Provider,{value:C},x.createElement(jv.Provider,{value:b},D))))}),Pk=x.forwardRef((e,t)=>{var r,n;let s=st(),o=x.useRef(null),c=x.useContext(Fv),i=gi(),a=Hv(e),u=(n=(r=a.current)==null?void 0:r.forceMount)!=null?n:c==null?void 0:c.forceMount;nn(()=>{if(!u)return i.item(s,c==null?void 0:c.id)},[u]);let m=zv(s,o,[e.value,e.children,o],e.keywords),d=td(),g=Rr(k=>k.value&&k.value===m.current),_=Rr(k=>u||i.filter()===!1?!0:k.search?k.filtered.items.get(s)>0:!0);x.useEffect(()=>{let k=o.current;if(!(!k||e.disabled))return k.addEventListener(Ac,w),()=>k.removeEventListener(Ac,w)},[_,e.onSelect,e.disabled]);function w(){var k,C;v(),(C=(k=a.current).onSelect)==null||C.call(k,m.current)}function v(){d.setState("value",m.current,!0)}if(!_)return null;let{disabled:p,value:h,onSelect:l,forceMount:f,keywords:S,...E}=e;return x.createElement(Ue.div,{ref:$t(o,t),...E,id:s,"cmdk-item":"",role:"option","aria-disabled":!!p,"aria-selected":!!g,"data-disabled":!!p,"data-selected":!!g,onPointerMove:p||i.getDisablePointerSelection()?void 0:v,onClick:p?void 0:w},e.children)}),Tk=x.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:s,...o}=e,c=st(),i=x.useRef(null),a=x.useRef(null),u=st(),m=gi(),d=Rr(_=>s||m.filter()===!1?!0:_.search?_.filtered.groups.has(c):!0);nn(()=>m.group(c),[]),zv(c,i,[e.value,e.heading,a]);let g=x.useMemo(()=>({id:c,forceMount:s}),[s]);return x.createElement(Ue.div,{ref:$t(i,t),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&x.createElement("div",{ref:a,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),xa(e,_=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},x.createElement(Fv.Provider,{value:g},_))))}),Lk=x.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,s=x.useRef(null),o=Rr(c=>!c.search);return!r&&!o?null:x.createElement(Ue.div,{ref:$t(s,t),...n,"cmdk-separator":"",role:"separator"})}),Ak=x.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,s=e.value!=null,o=td(),c=Rr(u=>u.search),i=Rr(u=>u.selectedItemId),a=gi();return x.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),x.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:u=>{s||o.setState("search",u.target.value),r==null||r(u.target.value)}})}),Dk=x.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...s}=e,o=x.useRef(null),c=x.useRef(null),i=Rr(u=>u.selectedItemId),a=gi();return x.useEffect(()=>{if(c.current&&o.current){let u=c.current,m=o.current,d,g=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let _=u.offsetHeight;m.style.setProperty("--cmdk-list-height",_.toFixed(1)+"px")})});return g.observe(u),()=>{cancelAnimationFrame(d),g.unobserve(u)}}},[]),x.createElement(Ue.div,{ref:$t(o,t),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":n,id:a.listId},xa(e,u=>x.createElement("div",{ref:$t(c,a.listInnerRef),"cmdk-list-sizer":""},u)))}),Mk=x.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:s,contentClassName:o,container:c,...i}=e;return x.createElement(Ek,{open:r,onOpenChange:n},x.createElement(ed,{container:c},x.createElement(pi,{"cmdk-overlay":"",className:s}),x.createElement(mi,{"aria-label":e.label,"cmdk-dialog":"",className:o},x.createElement($v,{ref:t,...i}))))}),Nk=x.forwardRef((e,t)=>Rr(r=>r.filtered.count===0)?x.createElement(Ue.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Ik=x.forwardRef((e,t)=>{let{progress:r,children:n,label:s="Loading...",...o}=e;return x.createElement(Ue.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},xa(e,c=>x.createElement("div",{"aria-hidden":!0},c)))}),Je=Object.assign($v,{List:Dk,Item:Pk,Input:Ak,Group:Tk,Separator:Lk,Dialog:Mk,Empty:Nk,Loading:Ik});function Ok(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function jk(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Hv(e){let t=x.useRef(e);return nn(()=>{t.current=e}),t}var nn=typeof window>"u"?x.useEffect:x.useLayoutEffect;function _n(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function Rr(e){let t=td(),r=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,r,r)}function zv(e,t,r,n=[]){let s=x.useRef(),o=gi();return nn(()=>{var c;let i=(()=>{var u;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(u=m.current.textContent)==null?void 0:u.trim():s.current}})(),a=n.map(u=>u.trim());o.value(e,i,a),(c=t.current)==null||c.setAttribute(vn,i),s.current=i}),s}var Bk=()=>{let[e,t]=x.useState(),r=_n(()=>new Map);return nn(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,s)=>{r.current.set(n,s),t({})}};function Fk(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function xa({asChild:e,children:t},r){return e&&x.isValidElement(t)?x.cloneElement(Fk(t),{ref:t.ref},r(t.props.children)):r(t)}var $k={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Hk=x.forwardRef(({className:e,...t},r)=>y.jsx(Je,{ref:r,className:re("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Hk.displayName=Je.displayName;const zk=x.forwardRef(({className:e,...t},r)=>y.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[y.jsx(hC,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),y.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})]}));zk.displayName=Je.Input.displayName;const Wk=x.forwardRef(({className:e,onWheel:t,...r},n)=>y.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}));Wk.displayName=Je.List.displayName;const Uk=x.forwardRef((e,t)=>y.jsx(Je.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Uk.displayName=Je.Empty.displayName;const Vk=x.forwardRef(({className:e,...t},r)=>y.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}));Vk.displayName=Je.Group.displayName;const Kk=x.forwardRef(({className:e,...t},r)=>y.jsx(Je.Separator,{ref:r,className:re("-mx-1 h-px bg-border",e),...t}));Kk.displayName=Je.Separator.displayName;const Gk=x.forwardRef(({className:e,...t},r)=>y.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}));Gk.displayName=Je.Item.displayName;const qk=["top","right","bottom","left"],Pr=Math.min,tt=Math.max,Ho=Math.round,qi=Math.floor,Bt=e=>({x:e,y:e}),Xk={left:"right",right:"left",bottom:"top",top:"bottom"};function Dc(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 ns(e){return e.split("-")[1]}function rd(e){return e==="x"?"y":"x"}function nd(e){return e==="y"?"height":"width"}function It(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function sd(e){return rd(It(e))}function Yk(e,t,r){r===void 0&&(r=!1);const n=ns(e),s=sd(e),o=nd(s);let c=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=zo(c)),[c,zo(c)]}function Qk(e){const t=zo(e);return[Mc(e),t,Mc(t)]}function Mc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Cf=["left","right"],Ef=["right","left"],Jk=["top","bottom"],Zk=["bottom","top"];function e2(e,t,r){switch(e){case"top":case"bottom":return r?t?Ef:Cf:t?Cf:Ef;case"left":case"right":return t?Jk:Zk;default:return[]}}function t2(e,t,r,n){const s=ns(e);let o=e2(Zt(e),r==="start",n);return s&&(o=o.map(c=>c+"-"+s),t&&(o=o.concat(o.map(Mc)))),o}function zo(e){const t=Zt(e);return Xk[t]+e.slice(t.length)}function r2(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wv(e){return typeof e!="number"?r2(e):{top:e,right:e,bottom:e,left:e}}function Wo(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 kf(e,t,r){let{reference:n,floating:s}=e;const o=It(t),c=sd(t),i=nd(c),a=Zt(t),u=o==="y",m=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,g=n[i]/2-s[i]/2;let _;switch(a){case"top":_={x:m,y:n.y-s.height};break;case"bottom":_={x:m,y:n.y+n.height};break;case"right":_={x:n.x+n.width,y:d};break;case"left":_={x:n.x-s.width,y:d};break;default:_={x:n.x,y:n.y}}switch(ns(t)){case"start":_[c]-=g*(r&&u?-1:1);break;case"end":_[c]+=g*(r&&u?-1:1);break}return _}async function n2(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:c,elements:i,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:d="floating",altBoundary:g=!1,padding:_=0}=Jt(t,e),w=Wv(_),p=i[g?d==="floating"?"reference":"floating":d],h=Wo(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:u,rootBoundary:m,strategy:a})),l=d==="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)),S=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=Wo(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:l,offsetParent:f,strategy:a}):l);return{top:(h.top-E.top+w.top)/S.y,bottom:(E.bottom-h.bottom+w.bottom)/S.y,left:(h.left-E.left+w.left)/S.x,right:(E.right-h.right+w.right)/S.x}}const s2=50,i2=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:c}=r,i=c.detectOverflow?c:{...c,detectOverflow:n2},a=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:d}=kf(u,n,a),g=n,_=0;const w={};for(let v=0;v<o.length;v++){const p=o[v];if(!p)continue;const{name:h,fn:l}=p,{x:f,y:S,data:E,reset:k}=await l({x:m,y:d,initialPlacement:n,placement:g,strategy:s,middlewareData:w,rects:u,platform:i,elements:{reference:e,floating:t}});m=f??m,d=S??d,w[h]={...w[h],...E},k&&_<s2&&(_++,typeof k=="object"&&(k.placement&&(g=k.placement),k.rects&&(u=k.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:m,y:d}=kf(u,g,a)),v=-1)}return{x:m,y:d,placement:g,strategy:s,middlewareData:w}},o2=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:u,padding:m=0}=Jt(e,t)||{};if(u==null)return{};const d=Wv(m),g={x:r,y:n},_=sd(s),w=nd(_),v=await c.getDimensions(u),p=_==="y",h=p?"top":"left",l=p?"bottom":"right",f=p?"clientHeight":"clientWidth",S=o.reference[w]+o.reference[_]-g[_]-o.floating[w],E=g[_]-o.reference[_],k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(u));let C=k?k[f]:0;(!C||!await(c.isElement==null?void 0:c.isElement(k)))&&(C=i.floating[f]||o.floating[w]);const b=S/2-E/2,R=C/2-v[w]/2-1,T=Pr(d[h],R),M=Pr(d[l],R),j=T,N=C-v[w]-M,F=C/2-v[w]/2+b,V=Dc(j,F,N),K=!a.arrow&&ns(s)!=null&&F!==V&&o.reference[w]/2-(F<j?T:M)-v[w]/2<0,q=K?F<j?F-j:F-N:0;return{[_]:g[_]+q,data:{[_]:V,centerOffset:F-V-q,...K&&{alignmentOffset:q}},reset:K}}}),a2=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:u}=t,{mainAxis:m=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0,...p}=Jt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const h=Zt(s),l=It(i),f=Zt(i)===i,S=await(a.isRTL==null?void 0:a.isRTL(u.floating)),E=g||(f||!v?[zo(i)]:Qk(i)),k=w!=="none";!g&&k&&E.push(...t2(i,v,w,S));const C=[i,...E],b=await a.detectOverflow(t,p),R=[];let T=((n=o.flip)==null?void 0:n.overflows)||[];if(m&&R.push(b[h]),d){const F=Yk(s,c,S);R.push(b[F[0]],b[F[1]])}if(T=[...T,{placement:s,overflows:R}],!R.every(F=>F<=0)){var M,j;const F=(((M=o.flip)==null?void 0:M.index)||0)+1,V=C[F];if(V&&(!(d==="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(_){case"bestFit":{var N;const q=(N=T.filter(B=>{if(k){const P=It(B.placement);return P===l||P==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(P=>P>0).reduce((P,L)=>P+L,0)]).sort((B,P)=>B[1]-P[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 Rf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pf(e){return qk.some(t=>e[t]>=0)}const l2=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=Rf(c,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Pf(i)}}}case"escaped":{const c=await n.detectOverflow(t,{...o,altBoundary:!0}),i=Rf(c,r.floating);return{data:{escapedOffsets:i,escaped:Pf(i)}}}default:return{}}}}},Uv=new Set(["left","top"]);async function c2(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=ns(r),a=It(r)==="y",u=Uv.has(c)?-1:1,m=o&&a?-1:1,d=Jt(t,e);let{mainAxis:g,crossAxis:_,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof w=="number"&&(_=i==="end"?w*-1:w),a?{x:_*m,y:g*u}:{x:g*u,y:_*m}}const u2=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 c2(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}}}}},d2=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}}},...u}=Jt(e,t),m={x:r,y:n},d=await o.detectOverflow(t,u),g=It(Zt(s)),_=rd(g);let w=m[_],v=m[g];if(c){const h=_==="y"?"top":"left",l=_==="y"?"bottom":"right",f=w+d[h],S=w-d[l];w=Dc(f,w,S)}if(i){const h=g==="y"?"top":"left",l=g==="y"?"bottom":"right",f=v+d[h],S=v-d[l];v=Dc(f,v,S)}const p=a.fn({...t,[_]:w,[g]:v});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[_]:c,[g]:i}}}}}},h2=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:u=!0}=Jt(e,t),m={x:r,y:n},d=It(s),g=rd(d);let _=m[g],w=m[d];const v=Jt(i,t),p=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(a){const f=g==="y"?"height":"width",S=o.reference[g]-o.floating[f]+p.mainAxis,E=o.reference[g]+o.reference[f]-p.mainAxis;_<S?_=S:_>E&&(_=E)}if(u){var h,l;const f=g==="y"?"width":"height",S=Uv.has(Zt(s)),E=o.reference[d]-o.floating[f]+(S&&((h=c.offset)==null?void 0:h[d])||0)+(S?0:p.crossAxis),k=o.reference[d]+o.reference[f]+(S?0:((l=c.offset)==null?void 0:l[d])||0)-(S?p.crossAxis:0);w<E?w=E:w>k&&(w=k)}return{[g]:_,[d]:w}}}},f2=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=()=>{},...u}=Jt(e,t),m=await c.detectOverflow(t,u),d=Zt(s),g=ns(s),_=It(s)==="y",{width:w,height:v}=o.floating;let p,h;d==="top"||d==="bottom"?(p=d,h=g===(await(c.isRTL==null?void 0:c.isRTL(i.floating))?"start":"end")?"left":"right"):(h=d,p=g==="end"?"top":"bottom");const l=v-m.top-m.bottom,f=w-m.left-m.right,S=Pr(v-m[p],l),E=Pr(w-m[h],f),k=!t.middlewareData.shift;let C=S,b=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(b=f),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=l),k&&!g){const T=tt(m.left,0),M=tt(m.right,0),j=tt(m.top,0),N=tt(m.bottom,0);_?b=w-2*(T!==0||M!==0?T+M:tt(m.left,m.right)):C=v-2*(j!==0||N!==0?j+N:tt(m.top,m.bottom))}await a({...t,availableWidth:b,availableHeight:C});const R=await c.getDimensions(i.floating);return w!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function ba(){return typeof window<"u"}function ss(e){return Vv(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ht(e){var t;return(t=(Vv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vv(e){return ba()?e instanceof Node||e instanceof it(e).Node:!1}function Rt(e){return ba()?e instanceof Element||e instanceof it(e).Element:!1}function tr(e){return ba()?e instanceof HTMLElement||e instanceof it(e).HTMLElement:!1}function Tf(e){return!ba()||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 p2(e){return/^(table|td|th)$/.test(ss(e))}function Ca(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const m2=/transform|translate|scale|rotate|perspective|filter/,g2=/paint|layout|strict|content/,$r=e=>!!e&&e!=="none";let kl;function id(e){const t=Rt(e)?Pt(e):e;return $r(t.transform)||$r(t.translate)||$r(t.scale)||$r(t.rotate)||$r(t.perspective)||!od()&&($r(t.backdropFilter)||$r(t.filter))||m2.test(t.willChange||"")||g2.test(t.contain||"")}function v2(e){let t=Tr(e);for(;tr(t)&&!Gn(t);){if(id(t))return t;if(Ca(t))return null;t=Tr(t)}return null}function od(){return kl==null&&(kl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),kl}function Gn(e){return/^(html|body|#document)$/.test(ss(e))}function Pt(e){return it(e).getComputedStyle(e)}function Ea(e){return Rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tr(e){if(ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Tf(e)&&e.host||Ht(e);return Tf(t)?t.host:t}function Kv(e){const t=Tr(e);return Gn(t)?e.ownerDocument?e.ownerDocument.body:e.body:tr(t)&&vi(t)?t:Kv(t)}function ti(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Kv(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),c=it(s);if(o){const i=Nc(c);return t.concat(c,c.visualViewport||[],vi(s)?s:[],i&&r?ti(i):[])}else return t.concat(s,ti(s,[],r))}function Nc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gv(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 ad(e){return Rt(e)?e:e.contextElement}function Bn(e){const t=ad(e);if(!tr(t))return Bt(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Gv(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 _2=Bt(0);function qv(e){const t=it(e);return!od()||!t.visualViewport?_2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function y2(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==it(e)?!1:t}function sn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=ad(e);let c=Bt(1);t&&(n?Rt(n)&&(c=Bn(n)):c=Bn(e));const i=y2(o,r,n)?qv(o):Bt(0);let a=(s.left+i.x)/c.x,u=(s.top+i.y)/c.y,m=s.width/c.x,d=s.height/c.y;if(o){const g=it(o),_=n&&Rt(n)?it(n):n;let w=g,v=Nc(w);for(;v&&n&&_!==w;){const p=Bn(v),h=v.getBoundingClientRect(),l=Pt(v),f=h.left+(v.clientLeft+parseFloat(l.paddingLeft))*p.x,S=h.top+(v.clientTop+parseFloat(l.paddingTop))*p.y;a*=p.x,u*=p.y,m*=p.x,d*=p.y,a+=f,u+=S,w=it(v),v=Nc(w)}}return Wo({width:m,height:d,x:a,y:u})}function ka(e,t){const r=Ea(e).scrollLeft;return t?t.left+r:sn(Ht(e)).left+r}function Xv(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-ka(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function S2(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",c=Ht(n),i=t?Ca(t.floating):!1;if(n===c||i&&o)return r;let a={scrollLeft:0,scrollTop:0},u=Bt(1);const m=Bt(0),d=tr(n);if((d||!d&&!o)&&((ss(n)!=="body"||vi(c))&&(a=Ea(n)),d)){const _=sn(n);u=Bn(n),m.x=_.x+n.clientLeft,m.y=_.y+n.clientTop}const g=c&&!d&&!o?Xv(c,a):Bt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-a.scrollLeft*u.x+m.x+g.x,y:r.y*u.y-a.scrollTop*u.y+m.y+g.y}}function w2(e){return Array.from(e.getClientRects())}function x2(e){const t=Ht(e),r=Ea(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+ka(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 Lf=25;function b2(e,t){const r=it(e),n=Ht(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=od();(!m||m&&t==="fixed")&&(i=s.offsetLeft,a=s.offsetTop)}const u=ka(n);if(u<=0){const m=n.ownerDocument,d=m.body,g=getComputedStyle(d),_=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(n.clientWidth-d.clientWidth-_);w<=Lf&&(o-=w)}else u<=Lf&&(o+=u);return{width:o,height:c,x:i,y:a}}function C2(e,t){const r=sn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=tr(e)?Bn(e):Bt(1),c=e.clientWidth*o.x,i=e.clientHeight*o.y,a=s*o.x,u=n*o.y;return{width:c,height:i,x:a,y:u}}function Af(e,t,r){let n;if(t==="viewport")n=b2(e,r);else if(t==="document")n=x2(Ht(e));else if(Rt(t))n=C2(t,r);else{const s=qv(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Wo(n)}function Yv(e,t){const r=Tr(e);return r===t||!Rt(r)||Gn(r)?!1:Pt(r).position==="fixed"||Yv(r,t)}function E2(e,t){const r=t.get(e);if(r)return r;let n=ti(e,[],!1).filter(i=>Rt(i)&&ss(i)!=="body"),s=null;const o=Pt(e).position==="fixed";let c=o?Tr(e):e;for(;Rt(c)&&!Gn(c);){const i=Pt(c),a=id(c);!a&&i.position==="fixed"&&(s=null),(o?!a&&!s:!a&&i.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||vi(c)&&!a&&Yv(e,c))?n=n.filter(m=>m!==c):s=i,c=Tr(c)}return t.set(e,n),n}function k2(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const c=[...r==="clippingAncestors"?Ca(t)?[]:E2(t,this._c):[].concat(r),n],i=Af(t,c[0],s);let a=i.top,u=i.right,m=i.bottom,d=i.left;for(let g=1;g<c.length;g++){const _=Af(t,c[g],s);a=tt(_.top,a),u=Pr(_.right,u),m=Pr(_.bottom,m),d=tt(_.left,d)}return{width:u-d,height:m-a,x:d,y:a}}function R2(e){const{width:t,height:r}=Gv(e);return{width:t,height:r}}function P2(e,t,r){const n=tr(t),s=Ht(t),o=r==="fixed",c=sn(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const a=Bt(0);function u(){a.x=ka(s)}if(n||!n&&!o)if((ss(t)!=="body"||vi(s))&&(i=Ea(t)),n){const _=sn(t,!0,o,t);a.x=_.x+t.clientLeft,a.y=_.y+t.clientTop}else s&&u();o&&!n&&s&&u();const m=s&&!n&&!o?Xv(s,i):Bt(0),d=c.left+i.scrollLeft-a.x-m.x,g=c.top+i.scrollTop-a.y-m.y;return{x:d,y:g,width:c.width,height:c.height}}function Rl(e){return Pt(e).position==="static"}function Df(e,t){if(!tr(e)||Pt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ht(e)===r&&(r=r.ownerDocument.body),r}function Qv(e,t){const r=it(e);if(Ca(e))return r;if(!tr(e)){let s=Tr(e);for(;s&&!Gn(s);){if(Rt(s)&&!Rl(s))return s;s=Tr(s)}return r}let n=Df(e,t);for(;n&&p2(n)&&Rl(n);)n=Df(n,t);return n&&Gn(n)&&Rl(n)&&!id(n)?r:n||v2(e)||r}const T2=async function(e){const t=this.getOffsetParent||Qv,r=this.getDimensions,n=await r(e.floating);return{reference:P2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function L2(e){return Pt(e).direction==="rtl"}const A2={convertOffsetParentRelativeRectToViewportRelativeRect:S2,getDocumentElement:Ht,getClippingRect:k2,getOffsetParent:Qv,getElementRects:T2,getClientRects:w2,getDimensions:R2,getScale:Bn,isElement:Rt,isRTL:L2};function Jv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function D2(e,t){let r=null,n;const s=Ht(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 u=e.getBoundingClientRect(),{left:m,top:d,width:g,height:_}=u;if(i||t(),!g||!_)return;const w=qi(d),v=qi(s.clientWidth-(m+g)),p=qi(s.clientHeight-(d+_)),h=qi(m),f={rootMargin:-w+"px "+-v+"px "+-p+"px "+-h+"px",threshold:tt(0,Pr(1,a))||1};let S=!0;function E(k){const C=k[0].intersectionRatio;if(C!==a){if(!S)return c();C?c(!1,C):n=setTimeout(()=>{c(!1,1e-7)},1e3)}C===1&&!Jv(u,e.getBoundingClientRect())&&c(),S=!1}try{r=new IntersectionObserver(E,{...f,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,f)}r.observe(e)}return c(!0),o}function M2(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,u=ad(e),m=s||o?[...u?ti(u):[],...t?ti(t):[]]:[];m.forEach(h=>{s&&h.addEventListener("scroll",r,{passive:!0}),o&&h.addEventListener("resize",r)});const d=u&&i?D2(u,r):null;let g=-1,_=null;c&&(_=new ResizeObserver(h=>{let[l]=h;l&&l.target===u&&_&&t&&(_.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var f;(f=_)==null||f.observe(t)})),r()}),u&&!a&&_.observe(u),t&&_.observe(t));let w,v=a?sn(e):null;a&&p();function p(){const h=sn(e);v&&!Jv(v,h)&&r(),v=h,w=requestAnimationFrame(p)}return r(),()=>{var h;m.forEach(l=>{s&&l.removeEventListener("scroll",r),o&&l.removeEventListener("resize",r)}),d==null||d(),(h=_)==null||h.disconnect(),_=null,a&&cancelAnimationFrame(w)}}const N2=u2,I2=d2,O2=a2,j2=f2,B2=l2,Mf=o2,F2=h2,$2=(e,t,r)=>{const n=new Map,s={platform:A2,...r},o={...s.platform,_c:n};return i2(e,t,{...s,platform:o})};var H2=typeof document<"u",z2=function(){},fo=H2?x.useLayoutEffect:z2;function Uo(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(!Uo(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)&&!Uo(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Zv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Nf(e,t){const r=Zv(e);return Math.round(t*r)/r}function Pl(e){const t=x.useRef(e);return fo(()=>{t.current=e}),t}function W2(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:u}=e,[m,d]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,_]=x.useState(n);Uo(g,n)||_(n);const[w,v]=x.useState(null),[p,h]=x.useState(null),l=x.useCallback(B=>{B!==k.current&&(k.current=B,v(B))},[]),f=x.useCallback(B=>{B!==C.current&&(C.current=B,h(B))},[]),S=o||w,E=c||p,k=x.useRef(null),C=x.useRef(null),b=x.useRef(m),R=a!=null,T=Pl(a),M=Pl(s),j=Pl(u),N=x.useCallback(()=>{if(!k.current||!C.current)return;const B={placement:t,strategy:r,middleware:g};M.current&&(B.platform=M.current),$2(k.current,C.current,B).then(P=>{const L={...P,isPositioned:j.current!==!1};F.current&&!Uo(b.current,L)&&(b.current=L,Zn.flushSync(()=>{d(L)}))})},[g,t,r,M,j]);fo(()=>{u===!1&&b.current.isPositioned&&(b.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);const F=x.useRef(!1);fo(()=>(F.current=!0,()=>{F.current=!1}),[]),fo(()=>{if(S&&(k.current=S),E&&(C.current=E),S&&E){if(T.current)return T.current(S,E,N);N()}},[S,E,N,T,R]);const V=x.useMemo(()=>({reference:k,floating:C,setReference:l,setFloating:f}),[l,f]),K=x.useMemo(()=>({reference:S,floating:E}),[S,E]),q=x.useMemo(()=>{const B={position:r,left:0,top:0};if(!K.floating)return B;const P=Nf(K.floating,m.x),L=Nf(K.floating,m.y);return i?{...B,transform:"translate("+P+"px, "+L+"px)",...Zv(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:L}},[r,i,K.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:N,refs:V,elements:K,floatingStyles:q}),[m,N,V,K,q])}const U2=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?Mf({element:n.current,padding:s}).fn(r):{}:n?Mf({element:n,padding:s}).fn(r):{}}}},V2=(e,t)=>{const r=N2(e);return{name:r.name,fn:r.fn,options:[e,t]}},K2=(e,t)=>{const r=I2(e);return{name:r.name,fn:r.fn,options:[e,t]}},G2=(e,t)=>({fn:F2(e).fn,options:[e,t]}),q2=(e,t)=>{const r=O2(e);return{name:r.name,fn:r.fn,options:[e,t]}},X2=(e,t)=>{const r=j2(e);return{name:r.name,fn:r.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=U2(e);return{name:r.name,fn:r.fn,options:[e,t]}};var J2="Arrow",e_=x.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return y.jsx(ie.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});e_.displayName=J2;var Z2=e_,t_="Popper",[r_,Nr]=_t(t_),[qA,n_]=r_(t_),s_="PopperAnchor",i_=x.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=n_(s_,r),c=x.useRef(null),i=ce(t,c),a=x.useRef(null);return x.useEffect(()=>{const u=a.current;a.current=(n==null?void 0:n.current)||c.current,u!==a.current&&o.onAnchorChange(a.current)}),n?null:y.jsx(ie.div,{...s,ref:i})});i_.displayName=s_;var ld="PopperContent",[eR,tR]=r_(ld),o_=x.forwardRef((e,t)=>{var O,A,z,H,Y,X;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:c=0,arrowPadding:i=0,avoidCollisions:a=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:d="partial",hideWhenDetached:g=!1,updatePositionStrategy:_="optimized",onPlaced:w,...v}=e,p=n_(ld,r),[h,l]=x.useState(null),f=ce(t,ne=>l(ne)),[S,E]=x.useState(null),k=qu(S),C=(k==null?void 0:k.width)??0,b=(k==null?void 0:k.height)??0,R=n+(o!=="center"?"-"+o:""),T=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},M=Array.isArray(u)?u:[u],j=M.length>0,N={padding:T,boundary:M.filter(nR),altBoundary:j},{refs:F,floatingStyles:V,placement:K,isPositioned:q,middlewareData:B}=W2({strategy:"fixed",placement:R,whileElementsMounted:(...ne)=>M2(...ne,{animationFrame:_==="always"}),elements:{reference:p.anchor},middleware:[V2({mainAxis:s+b,alignmentAxis:c}),a&&K2({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?G2():void 0,...N}),a&&q2({...N}),X2({...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`)}}),S&&Q2({element:S,padding:i}),sR({arrowWidth:C,arrowHeight:b}),g&&Y2({strategy:"referenceHidden",...N})]}),[P,L]=c_(K),I=Ft(w);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,$=((z=B.arrow)==null?void 0:z.centerOffset)!==0,[U,G]=x.useState();return Le(()=>{h&&G(window.getComputedStyle(h).zIndex)},[h]),y.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":[(H=B.transformOrigin)==null?void 0:H.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:y.jsx(eR,{scope:r,placedSide:P,onArrowChange:E,arrowX:D,arrowY:W,shouldHideArrow:$,children:y.jsx(ie.div,{"data-side":P,"data-align":L,...v,ref:f,style:{...v.style,animation:q?void 0:"none"}})})})});o_.displayName=ld;var a_="PopperArrow",rR={top:"bottom",right:"left",bottom:"top",left:"right"},l_=x.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=tR(a_,n),c=rR[o.placedSide];return y.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:y.jsx(Z2,{...s,ref:r,style:{...s.style,display:"block"}})})});l_.displayName=a_;function nR(e){return e!==null}var sR=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,[u,m]=c_(r),d={start:"0%",center:"50%",end:"100%"}[m],g=(((h=s.arrow)==null?void 0:h.x)??0)+i/2,_=(((l=s.arrow)==null?void 0:l.y)??0)+a/2;let w="",v="";return u==="bottom"?(w=c?d:`${g}px`,v=`${-a}px`):u==="top"?(w=c?d:`${g}px`,v=`${n.floating.height+a}px`):u==="right"?(w=`${-a}px`,v=c?d:`${_}px`):u==="left"&&(w=`${n.floating.width+a}px`,v=c?d:`${_}px`),{data:{x:w,y:v}}}});function c_(e){const[t,r="center"]=e.split("-");return[t,r]}var _i=i_,Ra=o_,Pa=l_,u_="Popover",[d_]=_t(u_,[Nr]),Ta=Nr(),[XA,Ir]=d_(u_),h_="PopoverAnchor",iR=x.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Ir(h_,r),o=Ta(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=s;return x.useEffect(()=>(c(),()=>i()),[c,i]),y.jsx(_i,{...o,...n,ref:t})});iR.displayName=h_;var f_="PopoverTrigger",oR=x.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Ir(f_,r),o=Ta(r),c=ce(t,s.triggerRef),i=y.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":__(s.open),...n,ref:c,onClick:J(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?i:y.jsx(_i,{asChild:!0,...o,children:i})});oR.displayName=f_;var cd="PopoverPortal",[aR,lR]=d_(cd,{forceMount:void 0}),p_=e=>{const{__scopePopover:t,forceMount:r,children:n,container:s}=e,o=Ir(cd,t);return y.jsx(aR,{scope:t,forceMount:r,children:y.jsx(Qe,{present:r||o.open,children:y.jsx(rs,{asChild:!0,container:s,children:n})})})};p_.displayName=cd;var qn="PopoverContent",m_=x.forwardRef((e,t)=>{const r=lR(qn,e.__scopePopover),{forceMount:n=r.forceMount,...s}=e,o=Ir(qn,e.__scopePopover);return y.jsx(Qe,{present:n||o.open,children:o.modal?y.jsx(uR,{...s,ref:t}):y.jsx(dR,{...s,ref:t})})});m_.displayName=qn;var cR=tn("PopoverContent.RemoveScroll"),uR=x.forwardRef((e,t)=>{const r=Ir(qn,e.__scopePopover),n=x.useRef(null),s=ce(t,n),o=x.useRef(!1);return x.useEffect(()=>{const c=n.current;if(c)return _a(c)},[]),y.jsx(fi,{as:cR,allowPinchZoom:!0,children:y.jsx(g_,{...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,u=i.button===2||a;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:J(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),dR=x.forwardRef((e,t)=>{const r=Ir(qn,e.__scopePopover),n=x.useRef(!1),s=x.useRef(!1);return y.jsx(g_,{...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,u;(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;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),g_=x.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:m,...d}=e,g=Ir(qn,r),_=Ta(r);return ga(),y.jsx(hi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:y.jsx(ts,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:m,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:y.jsx(Ra,{"data-state":__(g.open),role:"dialog",id:g.contentId,..._,...d,ref:t,style:{...d.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)"}})})})}),v_="PopoverClose",hR=x.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Ir(v_,r);return y.jsx(ie.button,{type:"button",...n,ref:t,onClick:J(e.onClick,()=>s.onOpenChange(!1))})});hR.displayName=v_;var fR="PopoverArrow",pR=x.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Ta(r);return y.jsx(Pa,{...s,...n,ref:t})});pR.displayName=fR;function __(e){return e?"open":"closed"}var mR=p_,y_=m_;const gR=x.forwardRef(({className:e,align:t="start",sideOffset:r=4,...n},s)=>y.jsx(mR,{children:y.jsx(y_,{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})}));gR.displayName=y_.displayName;const vR=ed,S_=x.forwardRef(({className:e,...t},r)=>y.jsx(pi,{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}));S_.displayName=pi.displayName;const _R=x.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(vR,{children:[y.jsx(S_,{}),y.jsxs(mi,{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,y.jsxs(Iv,{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:[y.jsx(Qg,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_R.displayName=mi.displayName;const yR=x.forwardRef(({className:e,...t},r)=>y.jsx(Sa,{ref:r,className:re("text-lg font-semibold leading-none tracking-tight",e),...t}));yR.displayName=Sa.displayName;const SR=x.forwardRef(({className:e,...t},r)=>y.jsx(wa,{ref:r,className:re("text-sm text-muted-foreground",e),...t}));SR.displayName=wa.displayName;function ud(e){const t=e+"CollectionProvider",[r,n]=_t(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=v=>{const{scope:p,children:h}=v,l=Ve.useRef(null),f=Ve.useRef(new Map).current;return y.jsx(s,{scope:p,itemMap:f,collectionRef:l,children:h})};c.displayName=t;const i=e+"CollectionSlot",a=tn(i),u=Ve.forwardRef((v,p)=>{const{scope:h,children:l}=v,f=o(i,h),S=ce(p,f.collectionRef);return y.jsx(a,{ref:S,children:l})});u.displayName=i;const m=e+"CollectionItemSlot",d="data-radix-collection-item",g=tn(m),_=Ve.forwardRef((v,p)=>{const{scope:h,children:l,...f}=v,S=Ve.useRef(null),E=ce(p,S),k=o(m,h);return Ve.useEffect(()=>(k.itemMap.set(S,{ref:S,...f}),()=>void k.itemMap.delete(S))),y.jsx(g,{[d]:"",ref:E,children:l})});_.displayName=m;function w(v){const p=o(e+"CollectionConsumer",v);return Ve.useCallback(()=>{const l=p.collectionRef.current;if(!l)return[];const f=Array.from(l.querySelectorAll(`[${d}]`));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:u,ItemSlot:_},w,n]}var wR=x.createContext(void 0);function w_(e){const t=x.useContext(wR);return e||t||"ltr"}var Tl="rovingFocusGroup.onEntryFocus",xR={bubbles:!1,cancelable:!0},yi="RovingFocusGroup",[Ic,x_,bR]=ud(yi),[CR,La]=_t(yi,[bR]),[ER,kR]=CR(yi),b_=x.forwardRef((e,t)=>y.jsx(Ic.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsx(Ic.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsx(RR,{...e,ref:t})})}));b_.displayName=yi;var RR=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:c,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...d}=e,g=x.useRef(null),_=ce(t,g),w=w_(o),[v,p]=di({prop:c,defaultProp:i??null,onChange:a,caller:yi}),[h,l]=x.useState(!1),f=Ft(u),S=x_(r),E=x.useRef(!1),[k,C]=x.useState(0);return x.useEffect(()=>{const b=g.current;if(b)return b.addEventListener(Tl,f),()=>b.removeEventListener(Tl,f)},[f]),y.jsx(ER,{scope:r,orientation:n,dir:w,loop:s,currentTabStopId:v,onItemFocus:x.useCallback(b=>p(b),[p]),onItemShiftTab:x.useCallback(()=>l(!0),[]),onFocusableItemAdd:x.useCallback(()=>C(b=>b+1),[]),onFocusableItemRemove:x.useCallback(()=>C(b=>b-1),[]),children:y.jsx(ie.div,{tabIndex:h||k===0?-1:0,"data-orientation":n,...d,ref:_,style:{outline:"none",...e.style},onMouseDown:J(e.onMouseDown,()=>{E.current=!0}),onFocus:J(e.onFocus,b=>{const R=!E.current;if(b.target===b.currentTarget&&R&&!h){const T=new CustomEvent(Tl,xR);if(b.currentTarget.dispatchEvent(T),!T.defaultPrevented){const M=S().filter(K=>K.focusable),j=M.find(K=>K.active),N=M.find(K=>K.id===v),V=[j,N,...M].filter(Boolean).map(K=>K.ref.current);k_(V,m)}}E.current=!1}),onBlur:J(e.onBlur,()=>l(!1))})})}),C_="RovingFocusGroupItem",E_=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:c,...i}=e,a=st(),u=o||a,m=kR(C_,r),d=m.currentTabStopId===u,g=x_(r),{onFocusableItemAdd:_,onFocusableItemRemove:w,currentTabStopId:v}=m;return x.useEffect(()=>{if(n)return _(),()=>w()},[n,_,w]),y.jsx(Ic.ItemSlot,{scope:r,id:u,focusable:n,active:s,children:y.jsx(ie.span,{tabIndex:d?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:J(e.onMouseDown,p=>{n?m.onItemFocus(u):p.preventDefault()}),onFocus:J(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:J(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){m.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const h=LR(p,m.orientation,m.dir);if(h!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let f=g().filter(S=>S.focusable).map(S=>S.ref.current);if(h==="last")f.reverse();else if(h==="prev"||h==="next"){h==="prev"&&f.reverse();const S=f.indexOf(p.currentTarget);f=m.loop?AR(f,S+1):f.slice(S+1)}setTimeout(()=>k_(f))}}),children:typeof c=="function"?c({isCurrentTabStop:d,hasTabStop:v!=null}):c})})});E_.displayName=C_;var PR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function TR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function LR(e,t,r){const n=TR(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return PR[n]}function k_(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function AR(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var R_=b_,P_=E_,Oc=["Enter"," "],DR=["ArrowDown","PageUp","Home"],T_=["ArrowUp","PageDown","End"],MR=[...DR,...T_],NR={ltr:[...Oc,"ArrowRight"],rtl:[...Oc,"ArrowLeft"]},IR={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Aa="Menu",[ri,OR,jR]=ud(Aa),[dn,L_]=_t(Aa,[jR,Nr,La]),dd=Nr(),A_=La(),[YA,hn]=dn(Aa),[QA,Si]=dn(Aa),BR="MenuAnchor",hd=x.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=dd(r);return y.jsx(_i,{...s,...n,ref:t})});hd.displayName=BR;var fd="MenuPortal",[FR,D_]=dn(fd,{forceMount:void 0}),M_=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,o=hn(fd,t);return y.jsx(FR,{scope:t,forceMount:r,children:y.jsx(Qe,{present:r||o.open,children:y.jsx(rs,{asChild:!0,container:s,children:n})})})};M_.displayName=fd;var mt="MenuContent",[$R,pd]=dn(mt),N_=x.forwardRef((e,t)=>{const r=D_(mt,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=hn(mt,e.__scopeMenu),c=Si(mt,e.__scopeMenu);return y.jsx(ri.Provider,{scope:e.__scopeMenu,children:y.jsx(Qe,{present:n||o.open,children:y.jsx(ri.Slot,{scope:e.__scopeMenu,children:c.modal?y.jsx(HR,{...s,ref:t}):y.jsx(zR,{...s,ref:t})})})})}),HR=x.forwardRef((e,t)=>{const r=hn(mt,e.__scopeMenu),n=x.useRef(null),s=ce(t,n);return x.useEffect(()=>{const o=n.current;if(o)return _a(o)},[]),y.jsx(md,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:J(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),zR=x.forwardRef((e,t)=>{const r=hn(mt,e.__scopeMenu);return y.jsx(md,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),WR=tn("MenuContent.ScrollLock"),md=x.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:c,disableOutsidePointerEvents:i,onEntryFocus:a,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:d,onInteractOutside:g,onDismiss:_,disableOutsideScroll:w,...v}=e,p=hn(mt,r),h=Si(mt,r),l=dd(r),f=A_(r),S=OR(r),[E,k]=x.useState(null),C=x.useRef(null),b=ce(t,C,p.onContentChange),R=x.useRef(0),T=x.useRef(""),M=x.useRef(0),j=x.useRef(null),N=x.useRef("right"),F=x.useRef(0),V=w?fi:x.Fragment,K=w?{as:WR,allowPinchZoom:!0}:void 0,q=P=>{var O,A;const L=T.current+P,I=S().filter(z=>!z.disabled),D=document.activeElement,W=(O=I.find(z=>z.ref.current===D))==null?void 0:O.textValue,$=I.map(z=>z.textValue),U=tP($,L,W),G=(A=I.find(z=>z.textValue===U))==null?void 0:A.ref.current;(function z(H){T.current=H,window.clearTimeout(R.current),H!==""&&(R.current=window.setTimeout(()=>z(""),1e3))})(L),G&&setTimeout(()=>G.focus())};x.useEffect(()=>()=>window.clearTimeout(R.current),[]),ga();const B=x.useCallback(P=>{var I,D;return N.current===((I=j.current)==null?void 0:I.side)&&nP(P,(D=j.current)==null?void 0:D.area)},[]);return y.jsx($R,{scope:r,searchRef:T,onItemEnter:x.useCallback(P=>{B(P)&&P.preventDefault()},[B]),onItemLeave:x.useCallback(P=>{var L;B(P)||((L=C.current)==null||L.focus(),k(null))},[B]),onTriggerLeave:x.useCallback(P=>{B(P)&&P.preventDefault()},[B]),pointerGraceTimerRef:M,onPointerGraceIntentChange:x.useCallback(P=>{j.current=P},[]),children:y.jsx(V,{...K,children:y.jsx(hi,{asChild:!0,trapped:s,onMountAutoFocus:J(o,P=>{var L;P.preventDefault(),(L=C.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:y.jsx(ts,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:d,onInteractOutside:g,onDismiss:_,children:y.jsx(R_,{asChild:!0,...f,dir:h.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:k,onEntryFocus:J(a,P=>{h.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:y.jsx(Ra,{role:"menu","aria-orientation":"vertical","data-state":Y_(p.open),"data-radix-menu-content":"",dir:h.dir,...l,...v,ref:b,style:{outline:"none",...v.style},onKeyDown:J(v.onKeyDown,P=>{const I=P.target.closest("[data-radix-menu-content]")===P.currentTarget,D=P.ctrlKey||P.altKey||P.metaKey,W=P.key.length===1;I&&(P.key==="Tab"&&P.preventDefault(),!D&&W&&q(P.key));const $=C.current;if(P.target!==$||!MR.includes(P.key))return;P.preventDefault();const G=S().filter(O=>!O.disabled).map(O=>O.ref.current);T_.includes(P.key)&&G.reverse(),ZR(G)}),onBlur:J(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(R.current),T.current="")}),onPointerMove:J(e.onPointerMove,ni(P=>{const L=P.target,I=F.current!==P.clientX;if(P.currentTarget.contains(L)&&I){const D=P.clientX>F.current?"right":"left";N.current=D,F.current=P.clientX}}))})})})})})})});N_.displayName=mt;var UR="MenuGroup",gd=x.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return y.jsx(ie.div,{role:"group",...n,ref:t})});gd.displayName=UR;var VR="MenuLabel",I_=x.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return y.jsx(ie.div,{...n,ref:t})});I_.displayName=VR;var Vo="MenuItem",If="menu.itemSelect",Da=x.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,o=x.useRef(null),c=Si(Vo,e.__scopeMenu),i=pd(Vo,e.__scopeMenu),a=ce(t,o),u=x.useRef(!1),m=()=>{const d=o.current;if(!r&&d){const g=new CustomEvent(If,{bubbles:!0,cancelable:!0});d.addEventListener(If,_=>n==null?void 0:n(_),{once:!0}),ev(d,g),g.defaultPrevented?u.current=!1:c.onClose()}};return y.jsx(O_,{...s,ref:a,disabled:r,onClick:J(e.onClick,m),onPointerDown:d=>{var g;(g=e.onPointerDown)==null||g.call(e,d),u.current=!0},onPointerUp:J(e.onPointerUp,d=>{var g;u.current||(g=d.currentTarget)==null||g.click()}),onKeyDown:J(e.onKeyDown,d=>{const g=i.searchRef.current!=="";r||g&&d.key===" "||Oc.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Da.displayName=Vo;var O_=x.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=e,c=pd(Vo,r),i=A_(r),a=x.useRef(null),u=ce(t,a),[m,d]=x.useState(!1),[g,_]=x.useState("");return x.useEffect(()=>{const w=a.current;w&&_((w.textContent??"").trim())},[o.children]),y.jsx(ri.ItemSlot,{scope:r,disabled:n,textValue:s??g,children:y.jsx(P_,{asChild:!0,...i,focusable:!n,children:y.jsx(ie.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:u,onPointerMove:J(e.onPointerMove,ni(w=>{n?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(e.onPointerLeave,ni(w=>c.onItemLeave(w))),onFocus:J(e.onFocus,()=>d(!0)),onBlur:J(e.onBlur,()=>d(!1))})})})}),KR="MenuCheckboxItem",j_=x.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return y.jsx(z_,{scope:e.__scopeMenu,checked:r,children:y.jsx(Da,{role:"menuitemcheckbox","aria-checked":Ko(r)?"mixed":r,...s,ref:t,"data-state":_d(r),onSelect:J(s.onSelect,()=>n==null?void 0:n(Ko(r)?!0:!r),{checkForDefaultPrevented:!1})})})});j_.displayName=KR;var B_="MenuRadioGroup",[GR,qR]=dn(B_,{value:void 0,onValueChange:()=>{}}),F_=x.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,o=Ft(n);return y.jsx(GR,{scope:e.__scopeMenu,value:r,onValueChange:o,children:y.jsx(gd,{...s,ref:t})})});F_.displayName=B_;var $_="MenuRadioItem",H_=x.forwardRef((e,t)=>{const{value:r,...n}=e,s=qR($_,e.__scopeMenu),o=r===s.value;return y.jsx(z_,{scope:e.__scopeMenu,checked:o,children:y.jsx(Da,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":_d(o),onSelect:J(n.onSelect,()=>{var c;return(c=s.onValueChange)==null?void 0:c.call(s,r)},{checkForDefaultPrevented:!1})})})});H_.displayName=$_;var vd="MenuItemIndicator",[z_,XR]=dn(vd,{checked:!1}),W_=x.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,o=XR(vd,r);return y.jsx(Qe,{present:n||Ko(o.checked)||o.checked===!0,children:y.jsx(ie.span,{...s,ref:t,"data-state":_d(o.checked)})})});W_.displayName=vd;var YR="MenuSeparator",U_=x.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return y.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});U_.displayName=YR;var QR="MenuArrow",V_=x.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=dd(r);return y.jsx(Pa,{...s,...n,ref:t})});V_.displayName=QR;var JR="MenuSub",[JA,K_]=dn(JR),Cs="MenuSubTrigger",G_=x.forwardRef((e,t)=>{const r=hn(Cs,e.__scopeMenu),n=Si(Cs,e.__scopeMenu),s=K_(Cs,e.__scopeMenu),o=pd(Cs,e.__scopeMenu),c=x.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:a}=o,u={__scopeMenu:e.__scopeMenu},m=x.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return x.useEffect(()=>m,[m]),x.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),a(null)}},[i,a]),y.jsx(hd,{asChild:!0,...u,children:y.jsx(O_,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":Y_(r.open),...e,ref:$t(t,s.onTriggerChange),onClick:d=>{var g;(g=e.onClick)==null||g.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:J(e.onPointerMove,ni(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(o.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:J(e.onPointerLeave,ni(d=>{var _,w;m();const g=(_=r.content)==null?void 0:_.getBoundingClientRect();if(g){const v=(w=r.content)==null?void 0:w.dataset.side,p=v==="right",h=p?-5:5,l=g[p?"left":"right"],f=g[p?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x:l,y:g.top},{x:f,y:g.top},{x:f,y:g.bottom},{x:l,y:g.bottom}],side:v}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:J(e.onKeyDown,d=>{var _;const g=o.searchRef.current!=="";e.disabled||g&&d.key===" "||NR[n.dir].includes(d.key)&&(r.onOpenChange(!0),(_=r.content)==null||_.focus(),d.preventDefault())})})})});G_.displayName=Cs;var q_="MenuSubContent",X_=x.forwardRef((e,t)=>{const r=D_(mt,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=hn(mt,e.__scopeMenu),c=Si(mt,e.__scopeMenu),i=K_(q_,e.__scopeMenu),a=x.useRef(null),u=ce(t,a);return y.jsx(ri.Provider,{scope:e.__scopeMenu,children:y.jsx(Qe,{present:n||o.open,children:y.jsx(ri.Slot,{scope:e.__scopeMenu,children:y.jsx(md,{id:i.contentId,"aria-labelledby":i.triggerId,...s,ref:u,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var d;c.isUsingKeyboardRef.current&&((d=a.current)==null||d.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 _;const d=m.currentTarget.contains(m.target),g=IR[c.dir].includes(m.key);d&&g&&(o.onOpenChange(!1),(_=i.trigger)==null||_.focus(),m.preventDefault())})})})})})});X_.displayName=q_;function Y_(e){return e?"open":"closed"}function Ko(e){return e==="indeterminate"}function _d(e){return Ko(e)?"indeterminate":e?"checked":"unchecked"}function ZR(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function eP(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function tP(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let c=eP(e,Math.max(o,0));s.length===1&&(c=c.filter(u=>u!==r));const a=c.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return a!==r?a:void 0}function rP(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],u=i.x,m=i.y,d=a.x,g=a.y;m>n!=g>n&&r<(d-u)*(n-m)/(g-m)+u&&(s=!s)}return s}function nP(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return rP(r,t)}function ni(e){return t=>t.pointerType==="mouse"?e(t):void 0}var sP=hd,iP=M_,oP=N_,aP=gd,lP=I_,cP=Da,uP=j_,dP=F_,hP=H_,fP=W_,pP=U_,mP=V_,gP=G_,vP=X_,Q_="DropdownMenu",[_P]=_t(Q_,[L_]),Ze=L_(),[ZA,J_]=_P(Q_),Z_="DropdownMenuTrigger",yP=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,o=J_(Z_,r),c=Ze(r);return y.jsx(sP,{asChild:!0,...c,children:y.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:$t(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())})})})});yP.displayName=Z_;var SP="DropdownMenuPortal",e0=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Ze(t);return y.jsx(iP,{...n,...r})};e0.displayName=SP;var t0="DropdownMenuContent",r0=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=J_(t0,r),o=Ze(r),c=x.useRef(!1);return y.jsx(oP,{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,u=a.button===0&&a.ctrlKey===!0,m=a.button===2||u;(!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)"}})});r0.displayName=t0;var wP="DropdownMenuGroup",xP=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(aP,{...s,...n,ref:t})});xP.displayName=wP;var bP="DropdownMenuLabel",n0=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(lP,{...s,...n,ref:t})});n0.displayName=bP;var CP="DropdownMenuItem",s0=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(cP,{...s,...n,ref:t})});s0.displayName=CP;var EP="DropdownMenuCheckboxItem",i0=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(uP,{...s,...n,ref:t})});i0.displayName=EP;var kP="DropdownMenuRadioGroup",RP=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(dP,{...s,...n,ref:t})});RP.displayName=kP;var PP="DropdownMenuRadioItem",o0=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(hP,{...s,...n,ref:t})});o0.displayName=PP;var TP="DropdownMenuItemIndicator",a0=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(fP,{...s,...n,ref:t})});a0.displayName=TP;var LP="DropdownMenuSeparator",l0=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(pP,{...s,...n,ref:t})});l0.displayName=LP;var AP="DropdownMenuArrow",DP=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(mP,{...s,...n,ref:t})});DP.displayName=AP;var MP="DropdownMenuSubTrigger",c0=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(gP,{...s,...n,ref:t})});c0.displayName=MP;var NP="DropdownMenuSubContent",u0=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Ze(r);return y.jsx(vP,{...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)"}})});u0.displayName=NP;var IP=e0,d0=r0,h0=n0,f0=s0,p0=i0,m0=o0,g0=a0,v0=l0,_0=c0,y0=u0;const OP=x.forwardRef(({className:e,inset:t,children:r,...n},s)=>y.jsxs(_0,{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,y.jsx(Yg,{className:"ml-auto"})]}));OP.displayName=_0.displayName;const jP=x.forwardRef(({className:e,...t},r)=>y.jsx(y0,{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}));jP.displayName=y0.displayName;const BP=x.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(IP,{children:y.jsx(d0,{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=d0.displayName;const FP=x.forwardRef(({className:e,inset:t,...r},n)=>y.jsx(f0,{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}));FP.displayName=f0.displayName;const $P=x.forwardRef(({className:e,children:t,checked:r,...n},s)=>y.jsxs(p0,{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:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(g0,{children:y.jsx(Vu,{className:"h-4 w-4"})})}),t]}));$P.displayName=p0.displayName;const HP=x.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(m0,{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:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(g0,{children:y.jsx(qb,{className:"h-2 w-2 fill-current"})})}),t]}));HP.displayName=m0.displayName;const zP=x.forwardRef(({className:e,inset:t,...r},n)=>y.jsx(h0,{ref:n,className:re("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));zP.displayName=h0.displayName;const WP=x.forwardRef(({className:e,...t},r)=>y.jsx(v0,{ref:r,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));WP.displayName=v0.displayName;const UP=x.forwardRef(({className:e,type:t,...r},n)=>y.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}));UP.displayName="Input";var VP="Label",S0=x.forwardRef((e,t)=>y.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())}}));S0.displayName=VP;var w0=S0;const KP=Uu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),GP=x.forwardRef(({className:e,...t},r)=>y.jsx(w0,{ref:r,className:re(KP(),e),...t}));GP.displayName=w0.displayName;var yd="Progress",Sd=100,[qP]=Ng(yd),[XP,YP]=qP(yd),x0=x.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:o=QP,...c}=e;(s||s===0)&&!Of(s)&&console.error(JP(`${s}`,"Progress"));const i=Of(s)?s:Sd;n!==null&&!jf(n,i)&&console.error(ZP(`${n}`,"Progress"));const a=jf(n,i)?n:null,u=Go(a)?o(a,i):void 0;return y.jsx(XP,{scope:r,value:a,max:i,children:y.jsx(Ue.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Go(a)?a:void 0,"aria-valuetext":u,role:"progressbar","data-state":E0(a,i),"data-value":a??void 0,"data-max":i,...c,ref:t})})});x0.displayName=yd;var b0="ProgressIndicator",C0=x.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,s=YP(b0,r);return y.jsx(Ue.div,{"data-state":E0(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:t})});C0.displayName=b0;function QP(e,t){return`${Math.round(e/t*100)}%`}function E0(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Go(e){return typeof e=="number"}function Of(e){return Go(e)&&!isNaN(e)&&e>0}function jf(e,t){return Go(e)&&!isNaN(e)&&e<=t&&e>=0}function JP(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Sd}\`.`}function ZP(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 ${Sd} if no \`max\` prop is set)
267
- - \`null\` or \`undefined\` if the progress is indeterminate.
268
-
269
- Defaulting to \`null\`.`}var k0=x0,eT=C0;const tT=x.forwardRef(({className:e,value:t,...r},n)=>y.jsx(k0,{ref:n,className:re("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:y.jsx(eT,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));tT.displayName=k0.displayName;function Bf(e,[t,r]){return Math.min(r,Math.max(t,e))}var R0=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"}),rT="VisuallyHidden",P0=x.forwardRef((e,t)=>y.jsx(ie.span,{...e,ref:t,style:{...R0,...e.style}}));P0.displayName=rT;var nT=P0,sT=[" ","Enter","ArrowUp","ArrowDown"],iT=[" ","Enter"],Ma="Select",[wd,Na,oT]=ud(Ma),[is]=_t(Ma,[oT,Nr]),xd=Nr(),[eD,Or]=is(Ma),[tD,aT]=is(Ma),T0="SelectTrigger",L0=x.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=xd(r),c=Or(T0,r),i=c.disabled||n,a=ce(t,c.onTriggerChange),u=Na(r),m=x.useRef("touch"),[d,g,_]=J0(v=>{const p=u().filter(f=>!f.disabled),h=p.find(f=>f.value===c.value),l=Z0(p,v,h);l!==void 0&&c.onValueChange(l.value)}),w=v=>{i||(c.onOpenChange(!0),_()),v&&(c.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return y.jsx(_i,{asChild:!0,...o,children:y.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":Q0(c.value)?"":void 0,...s,ref:a,onClick:J(s.onClick,v=>{v.currentTarget.focus(),m.current!=="mouse"&&w(v)}),onPointerDown:J(s.onPointerDown,v=>{m.current=v.pointerType;const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(w(v),v.preventDefault())}),onKeyDown:J(s.onKeyDown,v=>{const p=d.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&g(v.key),!(p&&v.key===" ")&&sT.includes(v.key)&&(w(),v.preventDefault())})})})});L0.displayName=T0;var A0="SelectValue",lT=x.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:c="",...i}=e,a=Or(A0,r),{onValueNodeHasChildrenChange:u}=a,m=o!==void 0,d=ce(t,a.onValueNodeChange);return Le(()=>{u(m)},[u,m]),y.jsx(ie.span,{...i,ref:d,style:{pointerEvents:"none"},children:Q0(a.value)?y.jsx(y.Fragment,{children:c}):o})});lT.displayName=A0;var cT="SelectIcon",D0=x.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return y.jsx(ie.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});D0.displayName=cT;var uT="SelectPortal",M0=e=>y.jsx(rs,{asChild:!0,...e});M0.displayName=uT;var on="SelectContent",N0=x.forwardRef((e,t)=>{const r=Or(on,e.__scopeSelect),[n,s]=x.useState();if(Le(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?Zn.createPortal(y.jsx(I0,{scope:e.__scopeSelect,children:y.jsx(wd.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),o):null}return y.jsx(O0,{...e,ref:t})});N0.displayName=on;var St=10,[I0,jr]=is(on),dT="SelectContentImpl",hT=tn("SelectContent.RemoveScroll"),O0=x.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:c,side:i,sideOffset:a,align:u,alignOffset:m,arrowPadding:d,collisionBoundary:g,collisionPadding:_,sticky:w,hideWhenDetached:v,avoidCollisions:p,...h}=e,l=Or(on,r),[f,S]=x.useState(null),[E,k]=x.useState(null),C=ce(t,O=>S(O)),[b,R]=x.useState(null),[T,M]=x.useState(null),j=Na(r),[N,F]=x.useState(!1),V=x.useRef(!1);x.useEffect(()=>{if(f)return _a(f)},[f]),ga();const K=x.useCallback(O=>{const[A,...z]=j().map(X=>X.ref.current),[H]=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===H&&E&&(E.scrollTop=E.scrollHeight),X==null||X.focus(),document.activeElement!==Y))return},[j,E]),q=x.useCallback(()=>K([b,f]),[K,b,f]);x.useEffect(()=>{N&&q()},[N,q]);const{onOpenChange:B,triggerPointerDownPosRef:P}=l;x.useEffect(()=>{if(f){let O={x:0,y:0};const A=H=>{var Y,X;O={x:Math.abs(Math.round(H.pageX)-(((Y=P.current)==null?void 0:Y.x)??0)),y:Math.abs(Math.round(H.pageY)-(((X=P.current)==null?void 0:X.y)??0))}},z=H=>{O.x<=10&&O.y<=10?H.preventDefault():f.contains(H.target)||B(!1),document.removeEventListener("pointermove",A),P.current=null};return P.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,P]),x.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]=J0(O=>{const A=j().filter(Y=>!Y.disabled),z=A.find(Y=>Y.ref.current===document.activeElement),H=Z0(A,O,z);H&&setTimeout(()=>H.ref.current.focus())}),D=x.useCallback((O,A,z)=>{const H=!V.current&&!z;(l.value!==void 0&&l.value===A||H)&&(R(O),H&&(V.current=!0))},[l.value]),W=x.useCallback(()=>f==null?void 0:f.focus(),[f]),$=x.useCallback((O,A,z)=>{const H=!V.current&&!z;(l.value!==void 0&&l.value===A||H)&&M(O)},[l.value]),U=n==="popper"?jc:j0,G=U===jc?{side:i,sideOffset:a,align:u,alignOffset:m,arrowPadding:d,collisionBoundary:g,collisionPadding:_,sticky:w,hideWhenDetached:v,avoidCollisions:p}:{};return y.jsx(I0,{scope:r,content:f,viewport:E,onViewportChange:k,itemRefCallback:D,selectedItem:b,onItemLeave:W,itemTextRefCallback:$,focusSelectedItem:q,selectedItemText:T,position:n,isPositioned:N,searchRef:L,children:y.jsx(fi,{as:hT,allowPinchZoom:!0,children:y.jsx(hi,{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:y.jsx(ts,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:O=>O.preventDefault(),onDismiss:()=>l.onOpenChange(!1),children:y.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 H=j().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(O.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(O.key)){const Y=O.target,X=H.indexOf(Y);H=H.slice(X+1)}setTimeout(()=>K(H)),O.preventDefault()}})})})})})})});O0.displayName=dT;var fT="SelectItemAlignedPosition",j0=x.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=Or(on,r),c=jr(on,r),[i,a]=x.useState(null),[u,m]=x.useState(null),d=ce(t,C=>m(C)),g=Na(r),_=x.useRef(!1),w=x.useRef(!0),{viewport:v,selectedItem:p,selectedItemText:h,focusSelectedItem:l}=c,f=x.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&u&&v&&p&&h){const C=o.trigger.getBoundingClientRect(),b=u.getBoundingClientRect(),R=o.valueNode.getBoundingClientRect(),T=h.getBoundingClientRect();if(o.dir!=="rtl"){const Y=T.left-b.left,X=R.left-Y,ne=C.left-X,oe=C.width+ne,he=Math.max(oe,b.width),Ce=window.innerWidth-St,se=Bf(X,[St,Math.max(St,Ce-he)]);i.style.minWidth=oe+"px",i.style.left=se+"px"}else{const Y=b.right-T.right,X=window.innerWidth-R.right-Y,ne=window.innerWidth-C.right-X,oe=C.width+ne,he=Math.max(oe,b.width),Ce=window.innerWidth-St,se=Bf(X,[St,Math.max(St,Ce-he)]);i.style.minWidth=oe+"px",i.style.right=se+"px"}const M=g(),j=window.innerHeight-St*2,N=v.scrollHeight,F=window.getComputedStyle(u),V=parseInt(F.borderTopWidth,10),K=parseInt(F.paddingTop,10),q=parseInt(F.borderBottomWidth,10),B=parseInt(F.paddingBottom,10),P=V+K+N+B+q,L=Math.min(p.offsetHeight*5,P),I=window.getComputedStyle(v),D=parseInt(I.paddingTop,10),W=parseInt(I.paddingBottom,10),$=C.top+C.height/2-St,U=j-$,G=p.offsetHeight/2,O=p.offsetTop+G,A=V+K+O,z=P-A;if(A<=$){const Y=M.length>0&&p===M[M.length-1].ref.current;i.style.bottom="0px";const X=u.clientHeight-v.offsetTop-v.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($,V+v.offsetTop+(Y?D:0)+G)+z;i.style.height=ne+"px",v.scrollTop=A-$+v.offsetTop}i.style.margin=`${St}px 0`,i.style.minHeight=L+"px",i.style.maxHeight=j+"px",n==null||n(),requestAnimationFrame(()=>_.current=!0)}},[g,o.trigger,o.valueNode,i,u,v,p,h,o.dir,n]);Le(()=>f(),[f]);const[S,E]=x.useState();Le(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const k=x.useCallback(C=>{C&&w.current===!0&&(f(),l==null||l(),w.current=!1)},[f,l]);return y.jsx(mT,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:_,onScrollButtonChange:k,children:y.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:y.jsx(ie.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});j0.displayName=fT;var pT="SelectPopperPosition",jc=x.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=St,...o}=e,c=xd(r);return y.jsx(Ra,{...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)"}})});jc.displayName=pT;var[mT,bd]=is(on,{}),Bc="SelectViewport",B0=x.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=jr(Bc,r),c=bd(Bc,r),i=ce(t,o.onViewportChange),a=x.useRef(0);return y.jsxs(y.Fragment,{children:[y.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}),y.jsx(wd.Slot,{scope:r,children:y.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,u=>{const m=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:g}=c;if(g!=null&&g.current&&d){const _=Math.abs(a.current-m.scrollTop);if(_>0){const w=window.innerHeight-St*2,v=parseFloat(d.style.minHeight),p=parseFloat(d.style.height),h=Math.max(v,p);if(h<w){const l=h+_,f=Math.min(w,l),S=l-f;d.style.height=f+"px",d.style.bottom==="0px"&&(m.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}a.current=m.scrollTop})})})]})});B0.displayName=Bc;var F0="SelectGroup",[gT,vT]=is(F0),_T=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=st();return y.jsx(gT,{scope:r,id:s,children:y.jsx(ie.div,{role:"group","aria-labelledby":s,...n,ref:t})})});_T.displayName=F0;var $0="SelectLabel",H0=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=vT($0,r);return y.jsx(ie.div,{id:s.id,...n,ref:t})});H0.displayName=$0;var qo="SelectItem",[yT,z0]=is(qo),W0=x.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...c}=e,i=Or(qo,r),a=jr(qo,r),u=i.value===n,[m,d]=x.useState(o??""),[g,_]=x.useState(!1),w=ce(t,l=>{var f;return(f=a.itemRefCallback)==null?void 0:f.call(a,l,n,s)}),v=st(),p=x.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 y.jsx(yT,{scope:r,value:n,disabled:s,textId:v,isSelected:u,onItemTextChange:x.useCallback(l=>{d(f=>f||((l==null?void 0:l.textContent)??"").trim())},[]),children:y.jsx(wd.ItemSlot,{scope:r,value:n,disabled:s,textValue:m,children:y.jsx(ie.div,{role:"option","aria-labelledby":v,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...c,ref:w,onFocus:J(c.onFocus,()=>_(!0)),onBlur:J(c.onBlur,()=>_(!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 S;((S=a.searchRef)==null?void 0:S.current)!==""&&l.key===" "||(iT.includes(l.key)&&h(),l.key===" "&&l.preventDefault())})})})})});W0.displayName=qo;var Es="SelectItemText",U0=x.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,c=Or(Es,r),i=jr(Es,r),a=z0(Es,r),u=aT(Es,r),[m,d]=x.useState(null),g=ce(t,h=>d(h),a.onItemTextChange,h=>{var l;return(l=i.itemTextRefCallback)==null?void 0:l.call(i,h,a.value,a.disabled)}),_=m==null?void 0:m.textContent,w=x.useMemo(()=>y.jsx("option",{value:a.value,disabled:a.disabled,children:_},a.value),[a.disabled,a.value,_]),{onNativeOptionAdd:v,onNativeOptionRemove:p}=u;return Le(()=>(v(w),()=>p(w)),[v,p,w]),y.jsxs(y.Fragment,{children:[y.jsx(ie.span,{id:a.textId,...o,ref:g}),a.isSelected&&c.valueNode&&!c.valueNodeHasChildren?Zn.createPortal(o.children,c.valueNode):null]})});U0.displayName=Es;var V0="SelectItemIndicator",K0=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return z0(V0,r).isSelected?y.jsx(ie.span,{"aria-hidden":!0,...n,ref:t}):null});K0.displayName=V0;var Fc="SelectScrollUpButton",G0=x.forwardRef((e,t)=>{const r=jr(Fc,e.__scopeSelect),n=bd(Fc,e.__scopeSelect),[s,o]=x.useState(!1),c=ce(t,n.onScrollButtonChange);return Le(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=a.scrollTop>0;o(u)};const a=r.viewport;return i(),a.addEventListener("scroll",i),()=>a.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?y.jsx(X0,{...e,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:a}=r;i&&a&&(i.scrollTop=i.scrollTop-a.offsetHeight)}}):null});G0.displayName=Fc;var $c="SelectScrollDownButton",q0=x.forwardRef((e,t)=>{const r=jr($c,e.__scopeSelect),n=bd($c,e.__scopeSelect),[s,o]=x.useState(!1),c=ce(t,n.onScrollButtonChange);return Le(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=a.scrollHeight-a.clientHeight,m=Math.ceil(a.scrollTop)<u;o(m)};const a=r.viewport;return i(),a.addEventListener("scroll",i),()=>a.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?y.jsx(X0,{...e,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:a}=r;i&&a&&(i.scrollTop=i.scrollTop+a.offsetHeight)}}):null});q0.displayName=$c;var X0=x.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=jr("SelectScrollButton",r),c=x.useRef(null),i=Na(r),a=x.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return x.useEffect(()=>()=>a(),[a]),Le(()=>{var m;const u=i().find(d=>d.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[i]),y.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 u;(u=o.onItemLeave)==null||u.call(o),c.current===null&&(c.current=window.setInterval(n,50))}),onPointerLeave:J(s.onPointerLeave,()=>{a()})})}),ST="SelectSeparator",Y0=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return y.jsx(ie.div,{"aria-hidden":!0,...n,ref:t})});Y0.displayName=ST;var Hc="SelectArrow",wT=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=xd(r),o=Or(Hc,r),c=jr(Hc,r);return o.open&&c.position==="popper"?y.jsx(Pa,{...s,...n,ref:t}):null});wT.displayName=Hc;var xT="SelectBubbleInput",bT=x.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=x.useRef(null),o=ce(n,s),c=Gu(t);return x.useEffect(()=>{const i=s.current;if(!i)return;const a=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(a,"value").set;if(c!==t&&m){const d=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(d)}},[c,t]),y.jsx(ie.select,{...r,style:{...R0,...r.style},ref:o,defaultValue:t})});bT.displayName=xT;function Q0(e){return e===""||e===void 0}function J0(e){const t=Ft(e),r=x.useRef(""),n=x.useRef(0),s=x.useCallback(c=>{const i=r.current+c;t(i),function a(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>a(""),1e3))}(i)},[t]),o=x.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function Z0(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let c=CT(e,Math.max(o,0));s.length===1&&(c=c.filter(u=>u!==r));const a=c.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return a!==r?a:void 0}function CT(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ey=L0,ET=D0,kT=M0,ty=N0,RT=B0,ry=H0,ny=W0,PT=U0,TT=K0,sy=G0,iy=q0,oy=Y0;const LT=x.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(ey,{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,y.jsx(ET,{asChild:!0,children:y.jsx(Ku,{className:"h-4 w-4 opacity-50"})})]}));LT.displayName=ey.displayName;const ay=x.forwardRef(({className:e,...t},r)=>y.jsx(sy,{ref:r,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(Kb,{className:"h-4 w-4"})}));ay.displayName=sy.displayName;const ly=x.forwardRef(({className:e,...t},r)=>y.jsx(iy,{ref:r,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(Ku,{className:"h-4 w-4"})}));ly.displayName=iy.displayName;const AT=x.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>y.jsx(kT,{children:y.jsxs(ty,{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:[y.jsx(ay,{}),y.jsx(RT,{className:re("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),y.jsx(ly,{})]})}));AT.displayName=ty.displayName;const DT=x.forwardRef(({className:e,...t},r)=>y.jsx(ry,{ref:r,className:re("px-2 py-1.5 text-sm font-semibold",e),...t}));DT.displayName=ry.displayName;const MT=x.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(ny,{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:[y.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(TT,{children:y.jsx(Vu,{className:"h-4 w-4"})})}),y.jsx(PT,{children:t})]}));MT.displayName=ny.displayName;const NT=x.forwardRef(({className:e,...t},r)=>y.jsx(oy,{ref:r,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));NT.displayName=oy.displayName;var IT="Separator",Ff="horizontal",OT=["horizontal","vertical"],cy=x.forwardRef((e,t)=>{const{decorative:r,orientation:n=Ff,...s}=e,o=jT(n)?n:Ff,i=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return y.jsx(Ue.div,{"data-orientation":o,...i,...s,ref:t})});cy.displayName=IT;function jT(e){return OT.includes(e)}var uy=cy;const BT=x.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>y.jsx(uy,{ref:s,decorative:r,orientation:t,className:re("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));BT.displayName=uy.displayName;const FT=ed,dy=x.forwardRef(({className:e,...t},r)=>y.jsx(pi,{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}));dy.displayName=pi.displayName;const $T=Uu("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"}}),HT=x.forwardRef(({side:e="right",className:t,children:r,...n},s)=>y.jsxs(FT,{children:[y.jsx(dy,{}),y.jsxs(mi,{ref:s,className:re($T({side:e}),t),...n,children:[y.jsxs(Iv,{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:[y.jsx(Qg,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));HT.displayName=mi.displayName;const zT=x.forwardRef(({className:e,...t},r)=>y.jsx(Sa,{ref:r,className:re("text-lg font-semibold text-foreground",e),...t}));zT.displayName=Sa.displayName;const WT=x.forwardRef(({className:e,...t},r)=>y.jsx(wa,{ref:r,className:re("text-sm text-muted-foreground",e),...t}));WT.displayName=wa.displayName;var Ia="Switch",[UT]=_t(Ia),[VT,KT]=UT(Ia),hy=x.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:c,disabled:i,value:a="on",onCheckedChange:u,form:m,...d}=e,[g,_]=x.useState(null),w=ce(t,f=>_(f)),v=x.useRef(!1),p=g?m||!!g.closest("form"):!0,[h,l]=di({prop:s,defaultProp:o??!1,onChange:u,caller:Ia});return y.jsxs(VT,{scope:r,checked:h,disabled:i,children:[y.jsx(ie.button,{type:"button",role:"switch","aria-checked":h,"aria-required":c,"data-state":gy(h),"data-disabled":i?"":void 0,disabled:i,value:a,...d,ref:w,onClick:J(e.onClick,f=>{l(S=>!S),p&&(v.current=f.isPropagationStopped(),v.current||f.stopPropagation())})}),p&&y.jsx(my,{control:g,bubbles:!v.current,name:n,value:a,checked:h,required:c,disabled:i,form:m,style:{transform:"translateX(-100%)"}})]})});hy.displayName=Ia;var fy="SwitchThumb",py=x.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=KT(fy,r);return y.jsx(ie.span,{"data-state":gy(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});py.displayName=fy;var GT="SwitchBubbleInput",my=x.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const c=x.useRef(null),i=ce(c,o),a=Gu(r),u=qu(t);return x.useEffect(()=>{const m=c.current;if(!m)return;const d=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(d,"checked").set;if(a!==r&&_){const w=new Event("click",{bubbles:n});_.call(m,r),m.dispatchEvent(w)}},[a,r,n]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});my.displayName=GT;function gy(e){return e?"checked":"unchecked"}var vy=hy,qT=py;const XT=x.forwardRef(({className:e,...t},r)=>y.jsx(vy,{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:y.jsx(qT,{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")})}));XT.displayName=vy.displayName;function YT(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 zc=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:zc++,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 u=>{if(c=["resolve",u],Ve.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(ZT(u)&&!u.ok){o=!1;const d=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,g=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,w=typeof d=="object"&&!Ve.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:g,...w})}else if(u instanceof Error){o=!1;const d=typeof r.error=="function"?await r.error(u):r.error,g=typeof r.description=="function"?await r.description(u):r.description,w=typeof d=="object"&&!Ve.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:g,...w})}else if(r.success!==void 0){o=!1;const d=typeof r.success=="function"?await r.success(u):r.success,g=typeof r.description=="function"?await r.description(u):r.description,w=typeof d=="object"&&!Ve.isValidElement(d)?d:{message:d};this.create({id:n,type:"success",description:g,...w})}}).catch(async u=>{if(c=["reject",u],r.error!==void 0){o=!1;const m=typeof r.error=="function"?await r.error(u):r.error,d=typeof r.description=="function"?await r.description(u):r.description,_=typeof m=="object"&&!Ve.isValidElement(m)?m:{message:m};this.create({id:n,type:"error",description:d,..._})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),a=()=>new Promise((u,m)=>i.then(()=>c[0]==="reject"?m(c[1]):u(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)||zc++;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,JT=(e,t)=>{const r=(t==null?void 0:t.id)||zc++;return ut.addToast({title:e,...t,id:r}),r},ZT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",eL=JT,tL=()=>ut.toasts,rL=()=>ut.getActiveToasts();Object.assign(eL,{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:tL,getToasts:rL});YT("[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 Oa="Tabs",[nL]=_t(Oa,[La]),_y=La(),[sL,Cd]=nL(Oa),iL=x.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:o,orientation:c="horizontal",dir:i,activationMode:a="automatic",...u}=e,m=w_(i),[d,g]=di({prop:n,onChange:s,defaultProp:o??"",caller:Oa});return y.jsx(sL,{scope:r,baseId:st(),value:d,onValueChange:g,orientation:c,dir:m,activationMode:a,children:y.jsx(ie.div,{dir:m,"data-orientation":c,...u,ref:t})})});iL.displayName=Oa;var yy="TabsList",Sy=x.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,o=Cd(yy,r),c=_y(r);return y.jsx(R_,{asChild:!0,...c,orientation:o.orientation,dir:o.dir,loop:n,children:y.jsx(ie.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});Sy.displayName=yy;var wy="TabsTrigger",xy=x.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...o}=e,c=Cd(wy,r),i=_y(r),a=Ey(c.baseId,n),u=ky(c.baseId,n),m=n===c.value;return y.jsx(P_,{asChild:!0,...i,focusable:!s,active:m,children:y.jsx(ie.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":u,"data-state":m?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:a,...o,ref:t,onMouseDown:J(e.onMouseDown,d=>{!s&&d.button===0&&d.ctrlKey===!1?c.onValueChange(n):d.preventDefault()}),onKeyDown:J(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&c.onValueChange(n)}),onFocus:J(e.onFocus,()=>{const d=c.activationMode!=="manual";!m&&!s&&d&&c.onValueChange(n)})})})});xy.displayName=wy;var by="TabsContent",Cy=x.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:o,...c}=e,i=Cd(by,r),a=Ey(i.baseId,n),u=ky(i.baseId,n),m=n===i.value,d=x.useRef(m);return x.useEffect(()=>{const g=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(g)},[]),y.jsx(Qe,{present:s||m,children:({present:g})=>y.jsx(ie.div,{"data-state":m?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":a,hidden:!g,id:u,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:g&&o})})});Cy.displayName=by;function Ey(e,t){return`${e}-trigger-${t}`}function ky(e,t){return`${e}-content-${t}`}var Ry=Sy,Py=xy,Ty=Cy;const oL=x.forwardRef(({className:e,...t},r)=>y.jsx(Ry,{ref:r,className:re("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));oL.displayName=Ry.displayName;const aL=x.forwardRef(({className:e,...t},r)=>y.jsx(Py,{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}));aL.displayName=Py.displayName;const lL=x.forwardRef(({className:e,...t},r)=>y.jsx(Ty,{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}));lL.displayName=Ty.displayName;const cL=x.forwardRef(({className:e,...t},r)=>y.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}));cL.displayName="Textarea";var[ja]=_t("Tooltip",[Nr]),Ed=Nr(),uL="TooltipProvider",$f="tooltip.open",[rD,Ly]=ja(uL),Ay="Tooltip",[nD,wi]=ja(Ay),Wc="TooltipTrigger",dL=x.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=wi(Wc,r),o=Ly(Wc,r),c=Ed(r),i=x.useRef(null),a=ce(t,i,s.onTriggerChange),u=x.useRef(!1),m=x.useRef(!1),d=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),y.jsx(_i,{asChild:!0,...c,children:y.jsx(ie.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:a,onPointerMove:J(e.onPointerMove,g=>{g.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(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:J(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:J(e.onBlur,s.onClose),onClick:J(e.onClick,s.onClose)})})});dL.displayName=Wc;var kd="TooltipPortal",[hL,fL]=ja(kd,{forceMount:void 0}),Dy=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:s}=e,o=wi(kd,t);return y.jsx(hL,{scope:t,forceMount:r,children:y.jsx(Qe,{present:r||o.open,children:y.jsx(rs,{asChild:!0,container:s,children:n})})})};Dy.displayName=kd;var Xn="TooltipContent",My=x.forwardRef((e,t)=>{const r=fL(Xn,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,c=wi(Xn,e.__scopeTooltip);return y.jsx(Qe,{present:n||c.open,children:c.disableHoverableContent?y.jsx(Ny,{side:s,...o,ref:t}):y.jsx(pL,{side:s,...o,ref:t})})}),pL=x.forwardRef((e,t)=>{const r=wi(Xn,e.__scopeTooltip),n=Ly(Xn,e.__scopeTooltip),s=x.useRef(null),o=ce(t,s),[c,i]=x.useState(null),{trigger:a,onClose:u}=r,m=s.current,{onPointerInTransitChange:d}=n,g=x.useCallback(()=>{i(null),d(!1)},[d]),_=x.useCallback((w,v)=>{const p=w.currentTarget,h={x:w.clientX,y:w.clientY},l=yL(h,p.getBoundingClientRect()),f=SL(h,l),S=wL(v.getBoundingClientRect()),E=bL([...f,...S]);i(E),d(!0)},[d]);return x.useEffect(()=>()=>g(),[g]),x.useEffect(()=>{if(a&&m){const w=p=>_(p,m),v=p=>_(p,a);return a.addEventListener("pointerleave",w),m.addEventListener("pointerleave",v),()=>{a.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",v)}}},[a,m,_,g]),x.useEffect(()=>{if(c){const w=v=>{const p=v.target,h={x:v.clientX,y:v.clientY},l=(a==null?void 0:a.contains(p))||(m==null?void 0:m.contains(p)),f=!xL(h,c);l?g():f&&(g(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[a,m,c,u,g]),y.jsx(Ny,{...e,ref:o})}),[mL,gL]=ja(Ay,{isInside:!1}),vL=GC("TooltipContent"),Ny=x.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:c,...i}=e,a=wi(Xn,r),u=Ed(r),{onClose:m}=a;return x.useEffect(()=>(document.addEventListener($f,m),()=>document.removeEventListener($f,m)),[m]),x.useEffect(()=>{if(a.trigger){const d=g=>{const _=g.target;_!=null&&_.contains(a.trigger)&&m()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[a.trigger,m]),y.jsx(ts,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:d=>d.preventDefault(),onDismiss:m,children:y.jsxs(Ra,{"data-state":a.stateAttribute,...u,...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:[y.jsx(vL,{children:n}),y.jsx(mL,{scope:r,isInside:!0,children:y.jsx(nT,{id:a.contentId,role:"tooltip",children:s||n})})]})})});My.displayName=Xn;var Iy="TooltipArrow",_L=x.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Ed(r);return gL(Iy,r).isInside?null:y.jsx(Pa,{...s,...n,ref:t})});_L.displayName=Iy;function yL(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 SL(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 wL(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 xL(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],u=i.x,m=i.y,d=a.x,g=a.y;m>n!=g>n&&r<(d-u)*(n-m)/(g-m)+u&&(s=!s)}return s}function bL(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),CL(t)}function CL(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 EL=Dy,Oy=My;const kL=x.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(EL,{children:y.jsx(Oy,{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})}));kL.displayName=Oy.displayName;x.createContext(!1);function RL({message:e="Loading...",className:t,fullPage:r=!1}){return y.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:[y.jsx(Jb,{className:"h-8 w-8 animate-spin text-primary"}),e&&y.jsx("p",{className:"text-sm",children:e})]})}function PL(){const{setTheme:e,resolvedTheme:t}=_1();return y.jsxs(Jg,{variant:"ghost",size:"icon",className:"relative h-8 w-8",onClick:()=>e(t==="dark"?"light":"dark"),children:[y.jsx(gC,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),y.jsx(rC,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),y.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}const TL=()=>y.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.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"}),y.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"}),y.jsx("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),y.jsx("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]});function Rd(){return y.jsxs("span",{className:"logo",children:[y.jsx("span",{className:"logo-icon",children:y.jsx(TL,{})}),y.jsx("span",{className:"logo-text",children:"LaunchPod"})]})}const LL=()=>y.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:y.jsx("polyline",{points:"20 6 9 17 4 12"})}),AL=["Automated security scanning","GitHub-native CI/CD integration","Team collaboration built in"];function DL(){return y.jsxs("div",{className:"brand-panel auth-gradient",children:[y.jsx("div",{className:"auth-blob auth-blob--1"}),y.jsx("div",{className:"auth-blob auth-blob--2"}),y.jsx("div",{className:"auth-blob auth-blob--3"}),y.jsx(Rd,{}),y.jsxs("div",{className:"brand-content",children:[y.jsx("h1",{children:"Ship secure software, faster."}),y.jsx("ul",{className:"feature-list",children:AL.map(e=>y.jsxs("li",{children:[y.jsx(LL,{}),y.jsx("span",{children:e})]},e))})]}),y.jsx("p",{className:"brand-footer",children:"Trusted by development teams"})]})}const ML=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.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"}),y.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),NL=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.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"}),y.jsx("path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}),y.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"}),y.jsx("path",{d:"m2 2 20 20"})]});function IL({onSuccess:e}){const[t,r]=x.useState(""),[n,s]=x.useState(!1),[o,c]=x.useState(""),[i,a]=x.useState(!1),u=async m=>{m.preventDefault(),c(""),a(!0);try{const g=await(await fetch("/api/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t.trim()})})).json();g.success?e():c(g.error||"Invalid token")}catch{c("Connection failed")}finally{a(!1)}};return y.jsxs("div",{className:"auth-layout",children:[y.jsx(DL,{}),y.jsx("div",{className:"form-panel",children:y.jsxs("div",{className:"form-container",children:[y.jsx("div",{className:"mobile-logo",children:y.jsx(Rd,{})}),y.jsxs("div",{className:"form-header",children:[y.jsx("h2",{children:"Connect your pod"}),y.jsx("p",{children:"Enter your MCP runner token to authenticate"})]}),o&&y.jsx("div",{className:"error-box",children:o}),y.jsxs("form",{onSubmit:u,children:[y.jsxs("div",{className:"form-group",children:[y.jsx("label",{htmlFor:"token",children:"MCP Runner Token"}),y.jsxs("div",{className:"input-wrapper",children:[y.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)}),y.jsx("button",{type:"button",className:"toggle-visibility",onClick:()=>s(!n),tabIndex:-1,children:n?y.jsx(NL,{}):y.jsx(ML,{})})]})]}),y.jsx("button",{type:"submit",className:"btn btn--primary btn--lg",disabled:i,children:i?"Connecting...":"Connect"})]}),y.jsx("p",{className:"help-text",children:"Find your MCP runner token in the LaunchSecure dashboard under Pipeline Settings."})]})})]})}const OL=5,jL=1e3,BL=3e4;function Pd({onMessage:e}){const[t,r]=x.useState("disconnected"),[n,s]=x.useState(null),o=x.useRef(null),c=x.useRef(0),i=x.useRef(null),a=x.useRef(e);a.current=e;const u=x.useCallback(m=>{const d=o.current;d&&d.readyState===WebSocket.OPEN&&d.send(JSON.stringify(m))},[]);return x.useEffect(()=>{let m=!1,d=null;function g(){if(m)return;r("connecting");const w=location.protocol==="https:"?"wss:":"ws:",v=new WebSocket(`${w}//${location.host}/terminal/ws`);o.current=v,v.onopen=()=>{if(m){v.close();return}c.current=0,r("connected"),i.current=setInterval(()=>{v.readyState===WebSocket.OPEN&&v.send(JSON.stringify({type:"ping"}))},BL)},v.onmessage=p=>{if(m)return;const h=JSON.parse(p.data);h.type==="connected"&&s(h.connectionId),a.current(h)},v.onclose=p=>{if(!m&&(_(),r("disconnected"),!p.wasClean&&c.current<OL)){const h=jL*Math.pow(2,c.current);c.current+=1,d=setTimeout(g,h)}},v.onerror=()=>{}}function _(){i.current&&(clearInterval(i.current),i.current=null)}return g(),()=>{var w;m=!0,_(),d&&clearTimeout(d),(w=o.current)==null||w.close(),o.current=null}},[]),{status:t,connectionId:n,send:u}}function FL(){return y.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:[y.jsx(Rd,{}),y.jsx("div",{className:"ml-auto flex items-center gap-2",children:y.jsx(PL,{})})]})}const Xi="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",ys="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 $L({onLogout:e,terminalAvailable:t,activePage:r="dashboard",onNavigate:n}){return y.jsxs("aside",{className:"hidden lg:flex lg:flex-col w-[var(--sidebar-width)] sidebar-gradient",children:[y.jsx("nav",{className:"flex-1 overflow-y-auto px-3 py-4",children:y.jsxs("ul",{className:"space-y-1",children:[y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n("dashboard"),className:r==="dashboard"?Xi:ys,children:[y.jsx(Yb,{className:"h-4 w-4 shrink-0"}),"Dashboard"]})}),t&&y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n("terminal"),className:r==="terminal"?Xi:ys,children:[y.jsx(_C,{className:"h-4 w-4 shrink-0"}),"Terminal"]})}),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n("settings"),className:r==="settings"?Xi:ys,children:[y.jsx(pC,{className:"h-4 w-4 shrink-0"}),"Settings"]})}),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n("repair"),className:r==="repair"?Xi:ys,children:[y.jsx(xC,{className:"h-4 w-4 shrink-0"}),"Repair"]})})]})}),y.jsx("div",{className:"border-t border-sidebar-border px-3 py-3",children:y.jsxs("button",{type:"button",onClick:e,className:ys,children:[y.jsx(eC,{className:"h-4 w-4 shrink-0"}),"Disconnect"]})})]})}function Xo(e){return e.toLowerCase()}function HL(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 jy(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function zL(e){return e==="script_pod"?"LOCAL":e==="script"?"SCRIPT":"LLM"}function Td({status:e}){return y.jsx("span",{className:`agent-status-dot agent-status-dot--${Xo(e)}`})}function WL({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 y.jsxs("button",{type:"button",className:o,onClick:s,children:[y.jsx(Td,{status:t}),y.jsx("span",{className:"pipeline-compact-name",children:e.nm})]})}function Hf({agents:e,agentStatuses:t,selectedId:r,onSelect:n,nextUpIds:s}){const o=HL(e),c=Array.from(o.keys()).sort((i,a)=>i-a);return e.length===0?y.jsx("div",{className:"pipeline-empty-state",children:"None yet"}):y.jsx(y.Fragment,{children:c.map(i=>y.jsxs("div",{className:"pipeline-phase-group",children:[y.jsxs("div",{className:"pipeline-phase-label",children:["Phase ",i]}),o.get(i).map(a=>{var m;const u=t!=null&&t[a.id]?Xo(((m=t[a.id])==null?void 0:m.status)??"pending"):"pending";return y.jsx(WL,{agent:a,status:u,selected:r===a.id,dim:s?!s.has(a.id):!1,onClick:()=>n(a.id)},a.id)})]},i))})}function zf({agent:e,status:t,triggeredAt:r,completedAt:n,needsAttention:s,previews:o,onOpenTerminal:c,podProgressState:i,onResolveIntervention:a,interventions:u}){const[m,d]=x.useState(0);let g=i;if(e.tp==="script_pod"&&!g){const h=u==null?void 0:u.find(l=>l.agent_id===e.id&&l.status==="pending");h&&(g={messages:[{text:h.message,level:"info",ts:Date.now()}],templateMatch:null})}const _=e.tp==="script_pod"&&g,w=o&&o.length>0?Math.min(m,o.length-1):0,v=o==null?void 0:o[w],p=e.gr==="per_unit"&&o&&o.length>1;return y.jsxs("div",{className:`pipeline-detail-card pipeline-detail-card--${t}`,children:[y.jsxs("div",{className:"pipeline-detail-left",children:[y.jsxs("div",{className:"pipeline-detail-header",children:[y.jsx(Td,{status:t}),y.jsx("span",{className:"pipeline-detail-name",children:e.nm}),s&&y.jsx("span",{className:"pipeline-attention-dot",title:"Terminal may need input"})]}),y.jsxs("div",{className:"pipeline-detail-meta",children:[y.jsx("span",{className:"pipeline-detail-id",children:e.id}),y.jsx("span",{className:"pipeline-detail-runner",children:zL(e.tp)})]}),y.jsxs("div",{className:"pipeline-detail-badges",children:[y.jsx("span",{className:"agent-badge agent-badge--ia",children:e.ia}),y.jsx("span",{className:"agent-badge agent-badge--gr",children:e.gr==="per_unit"?"per-unit":e.gr})]}),y.jsxs("div",{className:"pipeline-detail-info",children:[y.jsxs("span",{children:["Phase ",e.ph]}),r&&y.jsxs("span",{children:["Started: ",new Date(r).toLocaleTimeString()]}),n&&y.jsxs("span",{children:["Completed: ",new Date(n).toLocaleTimeString()]})]})]}),y.jsxs("div",{className:"pipeline-detail-right",children:[p&&y.jsx("div",{className:"pipeline-unit-tabs",children:o.map((h,l)=>y.jsx("button",{type:"button",className:`pipeline-unit-tab${l===w?" pipeline-unit-tab--active":""}`,onClick:()=>d(l),children:h.unitId||`unit-${l}`},h.sessionId))}),_?y.jsx(VL,{podState:g}):v!=null&&v.text?y.jsx("pre",{className:"pipeline-preview-text",children:v.text}):y.jsx("div",{className:"pipeline-preview-empty",children:"No output yet"}),e.tp==="script_pod"&&a&&(u==null?void 0:u.filter(h=>h.agent_id===e.id&&h.status==="pending").map(h=>{const{runText:l,skipText:f}=By(h);return y.jsxs("div",{className:"pipeline-intervention-actions",style:{marginTop:"8px"},children:[y.jsx("button",{type:"button",onClick:()=>a(h.id,"continue"),className:"pipeline-intervention-btn pipeline-intervention-btn--run",children:l}),y.jsx("button",{type:"button",onClick:()=>a(h.id,"skip"),className:"pipeline-intervention-btn pipeline-intervention-btn--skip",children:f})]},h.id)})),!_&&(v==null?void 0:v.sessionId)&&c&&y.jsx("button",{type:"button",className:"pipeline-open-terminal-btn",title:"Open terminal",onClick:()=>c(v.sessionId),children:y.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"4 17 10 11 4 5"}),y.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})})]})]})}function By(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 UL({intervention:e,onResolve:t}){const[r,n]=x.useState(!1),{label:s,runText:o,skipText:c}=By(e),i=a=>{n(!0),t(e.id,a)};return y.jsxs("div",{className:"pipeline-intervention-card",children:[y.jsx("div",{className:"pipeline-intervention-label",children:s}),y.jsx("div",{className:"pipeline-intervention-agent",children:jy(e.agent_id)}),e.message&&y.jsx("p",{className:"pipeline-intervention-msg",children:e.message}),y.jsxs("div",{className:"pipeline-intervention-actions",children:[y.jsx("button",{type:"button",disabled:r,onClick:()=>i("continue"),className:"pipeline-intervention-btn pipeline-intervention-btn--run",children:r?"...":o}),y.jsx("button",{type:"button",disabled:r,onClick:()=>i("skip"),className:"pipeline-intervention-btn pipeline-intervention-btn--skip",children:r?"...":c})]})]})}function VL({podState:e}){const{messages:t}=e;return y.jsx("div",{className:"pod-progress-panel",children:y.jsx("div",{className:"pod-progress-log",children:t.map((r,n)=>y.jsx("div",{className:`pod-progress-entry pod-progress-entry--${r.level}`,children:r.text},n))})})}function KL({agentId:e,agentName:t,error:r}){const[n,s]=x.useState(!1);return y.jsxs("div",{className:"pipeline-detail-card pipeline-detail-card--failed",children:[y.jsxs("div",{className:"pipeline-detail-left",children:[y.jsxs("div",{className:"pipeline-detail-header",children:[y.jsx(Td,{status:"failed"}),y.jsx("span",{className:"pipeline-detail-name",children:t??jy(e)})]}),y.jsx("div",{className:"pipeline-detail-meta",children:y.jsx("span",{className:"pipeline-detail-id",children:e})}),y.jsx("div",{style:{marginTop:"0.5rem"},children:y.jsx("span",{className:"text-red-400 text-xs font-medium",children:"Node failed to start"})}),y.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"})]}),y.jsx("div",{className:"pipeline-detail-right",children:n?y.jsx("pre",{className:"pipeline-preview-text",style:{color:"var(--color-red-300, #fca5a5)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:r}):y.jsx("div",{className:"pipeline-preview-empty",children:'Click "Show Log" for details'})})]})}function GL({data:e,agentStatuses:t,interventions:r,onResolveIntervention:n,stalled:s,onPoke:o,attentionAgentIds:c,sessionPreviews:i,onOpenTerminal:a,podProgressStates:u,runStatus:m,nodeErrors:d}){const[g,_]=x.useState(null),w=T=>_(M=>M===T?null:T),v=e.nd??[],p=new Map(v.map(T=>[T.id,T])),h=[],l=[],f=[];for(const T of v){const M=t==null?void 0:t[T.id],j=M?Xo(M.status):"pending";j==="completed"||j==="failed"?h.push(T):j==="in_progress"?l.push(T):f.push(T)}const S=new Set;if(f.length>0){const T=Math.min(...f.map(M=>M.ph));for(const M of f)M.ph===T&&S.add(M.id)}const E=new Set(v.filter(T=>T.tp==="script_pod").map(T=>T.id)),k=(r??[]).filter(T=>T.status==="pending"&&!E.has(T.agent_id)),C=g?p.get(g):null,b=g?t==null?void 0:t[g]:null,R=b?Xo(b.status):"pending";return y.jsxs("div",{className:"pipeline-dashboard",children:[y.jsxs("div",{className:"pipeline-col pipeline-col--left",children:[y.jsx("div",{className:"pipeline-col-header",children:"Completed"}),y.jsx("div",{className:"pipeline-col-body",children:y.jsx(Hf,{agents:h,agentStatuses:t,selectedId:g,onSelect:w})})]}),y.jsxs("div",{className:"pipeline-col pipeline-col--center",children:[y.jsx("div",{className:"pipeline-col-header",children:"Active"}),y.jsxs("div",{className:"pipeline-col-body",children:[n&&k.map(T=>y.jsx(UL,{intervention:T,onResolve:n},T.id)),C&&!l.some(T=>T.id===g)&&y.jsx(zf,{agent:C,status:R,triggeredAt:b==null?void 0:b.triggered_at,completedAt:b==null?void 0:b.completed_at,needsAttention:c==null?void 0:c.has(C.id),previews:i==null?void 0:i[C.id],onOpenTerminal:a,podProgressState:u==null?void 0:u[C.id],onResolveIntervention:n,interventions:r}),l.map(T=>{const M=t==null?void 0:t[T.id];return y.jsx(zf,{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:u==null?void 0:u[T.id],onResolveIntervention:n,interventions:r},T.id)}),d&&Object.entries(d).map(([T,M])=>{const j=p.get(T);return y.jsx(KL,{agentId:T,agentName:j==null?void 0:j.nm,error:M},`err-${T}`)}),!C&&l.length===0&&k.length===0&&Object.keys(d??{}).length===0&&(m==="completed"?y.jsxs("div",{className:"pipeline-empty-state pipeline-empty-state--completed",children:[y.jsx("span",{className:"agent-status-dot agent-status-dot--completed"}),y.jsx("span",{children:"Pipeline Complete"})]}):m==="paused"?y.jsxs("div",{className:"pipeline-empty-state",children:[y.jsx("span",{className:"agent-status-dot agent-status-dot--pending"}),y.jsx("span",{children:"Pipeline Paused"})]}):y.jsxs("div",{className:"pipeline-empty-state",children:[y.jsx("span",{className:"agent-status-dot agent-status-dot--in_progress"}),y.jsx("span",{children:"Waiting for next node..."})]}))]})]}),y.jsxs("div",{className:"pipeline-col pipeline-col--right",children:[y.jsx("div",{className:"pipeline-col-header",children:"Upcoming"}),y.jsx("div",{className:"pipeline-col-body",children:y.jsx(Hf,{agents:f,agentStatuses:t,selectedId:g,onSelect:w,nextUpIds:S})})]})]})}let Wf=!1,Yi=null;function qL({send:e,xtermRef:t,defaultAgent:r,autoSessionId:n}){const[s,o]=x.useState(null),[c,i]=x.useState(!1),a=x.useRef(r);a.current=r;const u=x.useRef(n);u.current=n;function m(w){e({type:w==="claude"?"start_claude":w==="codex"?"start_codex":"start_agent"})}const d=x.useCallback((w,v)=>{e({type:w==="claude"?"start_claude":w==="codex"?"start_codex":"start_agent",options:v})},[e]),g=x.useCallback(()=>{e({type:"stop"})},[e]),_=x.useCallback(w=>{var v,p,h;switch(w.type){case"connected":{if(Wf)break;Wf=!0;const l=u.current;if(l){o(l),e({type:"join_session",sessionId:l});break}Yi==null||Yi.abort();const f=new AbortController;Yi=f,fetch("/terminal/api/sessions/list",{signal:f.signal}).then(S=>S.json()).then(S=>{const E=S.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(w.sessionId),i(!1);const l=a.current;l&&m(l);break}case"session_joined":{if(o(w.sessionId),i(w.active),(v=t.current)==null||v.clear(),(p=w.outputBuffer)!=null&&p.length)for(const l of w.outputBuffer)(h=t.current)==null||h.write(l.replace(/\x1b\[\[?[IO]/g,""));setTimeout(()=>{var l;return(l=t.current)==null?void 0:l.fit()},0);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:_,startAgent:d,stopAgent:g}}const Uf=1e4,XL=["Plan mode is active","you MUST NOT make any edits","present your plan by calling the ExitPlanMode tool","Starting plan mode"],YL=["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 Vf(e){return e.replace(/\x1b\[[0-9;]*m/g,"").replace(/\x1b\[[0-9]*[A-Za-z]/g,"")}function Fy(){const[e,t]=x.useState(null),[r,n]=x.useState(!1),s=x.useRef([]),o=x.useRef(!1),c=x.useCallback((m=5e4)=>{const d=s.current.join("");return Vf(d).slice(-m)},[]),i=x.useCallback(m=>{let d=null;const g=m.match(/## Implementation Plan:[\s\S]*?(?=(?:User has approved|Exit plan mode|[$>]|^[a-z]+@))/im);if(g&&(d=g[0]),!d){const _=m.match(/##[^#].*?Plan.*?:[\s\S]*?(?:###.*?[\s\S]*?){2,}(?=(?:User has approved|Exit plan mode|[$>]|^[a-z]+@))/im);_&&(d=_[0])}if(!d){const w=m.slice(-5e3).match(/(?:##|Plan:)[\s\S]*?(?:###[\s\S]*?){1,}/);w&&(d=w[0])}return d?(d=Vf(d).replace(/\r\n/g,`
270
- `).replace(/\r/g,`
271
- `).trim(),{content:d,timestamp:Date.now()}):null},[]),a=x.useCallback(m=>{s.current.push(m),s.current.length>Uf&&(s.current=s.current.slice(-Uf/2));const d=c();if(o.current||XL.some(_=>d.includes(_))&&(o.current=!0,n(!0)),o.current){const g=QL.some(w=>w.test(d)),_=d.slice(-1e4);if(g&&_.includes("###")){const w=i(d);w&&t(w)}}o.current&&YL.some(_=>d.includes(_))&&(o.current=!1,n(!1),t(null))},[c,i]),u=x.useCallback(()=>{t(null),s.current=[],o.current=!1,n(!1)},[]);return{plan:e,planModeActive:r,processOutput:a,clearPlan:u}}const $y="launchpod-settings",Ll={defaultAgent:"claude"};function Hy(){try{const e=localStorage.getItem($y);return e?{...Ll,...JSON.parse(e)}:Ll}catch{return Ll}}function JL(e){localStorage.setItem($y,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 ZL(){const[e,t]=x.useState(Hy),[r,n]=x.useState(!1),s=()=>{JL(e),n(!0),setTimeout(()=>n(!1),2e3)};return y.jsxs("div",{className:"max-w-xl mx-auto py-10 px-6",children:[y.jsx("h1",{className:"text-xl font-semibold text-foreground mb-6",children:"Settings"}),y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Default Agent"}),y.jsx("p",{className:"text-xs text-muted-foreground",children:"Which agent to show in the start prompt when opening the terminal."}),y.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:[y.jsx("option",{value:"claude",children:"Claude"}),y.jsx("option",{value:"codex",children:"Codex"}),y.jsx("option",{value:"agent",children:"Cursor"})]})]}),y.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 zy={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(globalThis,()=>(()=>{var r={4567:function(c,i,a){var u=this&&this.__decorate||function(l,f,S,E){var k,C=arguments.length,b=C<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,f,S,E);else for(var R=l.length-1;R>=0;R--)(k=l[R])&&(b=(C<3?k(b):C>3?k(f,S,b):k(f,S))||b);return C>3&&b&&Object.defineProperty(f,S,b),b},m=this&&this.__param||function(l,f){return function(S,E){f(S,E,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const d=a(9042),g=a(9924),_=a(844),w=a(4725),v=a(2585),p=a(3656);let h=i.AccessibilityManager=class extends _.Disposable{constructor(l,f,S,E){super(),this._terminal=l,this._coreBrowserService=S,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 g.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,_.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+=d.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 S=this._terminal.buffer,E=S.lines.length.toString();for(let k=l;k<=f;k++){const C=S.lines.get(S.ydisp+k),b=[],R=(C==null?void 0:C.translateToString(!0,void 0,void 0,b))||"",T=(S.ydisp+k+1).toString(),M=this._rowElements[k];M&&(R.length===0?(M.innerText=" ",this._rowColumns.set(M,[0,1])):(M.textContent=R,this._rowColumns.set(M,b)),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 S=l.target,E=this._rowElements[f===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(f===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==E)return;let k,C;if(f===0?(k=S,C=this._rowElements.pop(),this._rowContainer.removeChild(C)):(k=this._rowElements.shift(),C=S,this._rowContainer.removeChild(k)),k.removeEventListener("focus",this._topBoundaryFocusListener),C.removeEventListener("focus",this._bottomBoundaryFocusListener),f===0){const b=this._createAccessibilityTreeNode();this._rowElements.unshift(b),this._rowContainer.insertAdjacentElement("afterbegin",b)}else{const b=this._createAccessibilityTreeNode();this._rowElements.push(b),this._rowContainer.appendChild(b)}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 R;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},S={node:l.focusNode,offset:l.focusOffset};if((f.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||f.node===S.node&&f.offset>S.offset)&&([f,S]=[S,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(S.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:E,offset:((R=E.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(S.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),b=k(S);if(C&&b){if(C.row>b.row||C.row===b.row&&C.column>=b.column)throw new Error("invalid range");this._terminal.select(C.column,C.row,(b.row-C.row)*this._terminal.cols-C.column+b.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=u([m(1,v.IInstantiationService),m(2,w.ICoreBrowserService),m(3,w.IRenderService)],h)},3614:(c,i)=>{function a(g){return g.replace(/\r?\n/g,"\r")}function u(g,_){return _?"\x1B[200~"+g+"\x1B[201~":g}function m(g,_,w,v){g=u(g=a(g),w.decPrivateModes.bracketedPasteMode&&v.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(g,!0),_.value=""}function d(g,_,w){const v=w.getBoundingClientRect(),p=g.clientX-v.left-10,h=g.clientY-v.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${p}px`,_.style.top=`${h}px`,_.style.zIndex="1000",_.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=u,i.copyHandler=function(g,_){g.clipboardData&&g.clipboardData.setData("text/plain",_.selectionText),g.preventDefault()},i.handlePasteEvent=function(g,_,w,v){g.stopPropagation(),g.clipboardData&&m(g.clipboardData.getData("text/plain"),_,w,v)},i.paste=m,i.moveTextAreaUnderMouseCursor=d,i.rightClickHandler=function(g,_,w,v,p){d(g,_,w),p&&v.rightClickSelect(g),_.value=v.selectionText,_.select()}},7239:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const u=a(1505);i.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(m,d,g){this._css.set(m,d,g)}getCss(m,d){return this._css.get(m,d)}setColor(m,d,g){this._color.set(m,d,g)}getColor(m,d){return this._color.get(m,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(a,u,m,d){a.addEventListener(u,m,d);let g=!1;return{dispose:()=>{g||(g=!0,a.removeEventListener(u,m,d))}}}},3551:function(c,i,a){var u=this&&this.__decorate||function(h,l,f,S){var E,k=arguments.length,C=k<3?l:S===null?S=Object.getOwnPropertyDescriptor(l,f):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,l,f,S);else for(var b=h.length-1;b>=0;b--)(E=h[b])&&(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,S){l(f,S,h)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier=void 0;const d=a(3656),g=a(8460),_=a(844),w=a(2585),v=a(4725);let p=i.Linkifier=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(h,l,f,S,E){super(),this._element=h,this._mouseService=l,this._renderService=f,this._bufferService=S,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.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,d.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,d.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,d.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 S=0;S<f.length;S++){const E=f[S];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 S,E;this._activeProviderReplies&&l||((S=this._activeProviderReplies)==null||S.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,b=>{var T,M;if(this._isMouseOut)return;const R=b==null?void 0:b.map(j=>({link:j}));(T=this._activeProviderReplies)==null||T.set(k,R),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 S=0;S<l.size;S++){const E=l.get(S);if(E)for(let k=0;k<E.length;k++){const C=E[k],b=C.link.range.start.y<h?0:C.link.range.start.x,R=C.link.range.end.y>h?this._bufferService.cols:C.link.range.end.x;for(let T=b;T<=R;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 S=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&&S){const C=S.find(b=>this._linkAtPosition(b.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 b=(k=this._activeProviderReplies.get(C))==null?void 0:k.find(R=>this._linkAtPosition(R.link,l));if(b){f=!0,this._handleNewLink(b);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,_.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,S;return(S=(f=this._currentLink)==null?void 0:f.state)==null?void 0:S.decorations.pointerCursor},set:f=>{var S;(S=this._currentLink)!=null&&S.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,S;return(S=(f=this._currentLink)==null?void 0:f.state)==null?void 0:S.decorations.underline},set:f=>{var S,E,k;(S=this._currentLink)!=null&&S.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 S=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>=S&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(S,E),this._lastMouseEvent)){const k=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);k&&this._askForLink(k,!1)}})))}_linkHover(h,l,f){var S;(S=this._currentLink)!=null&&S.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,S=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(f.start.x-1,f.start.y-S-1,f.end.x,f.end.y-S-1,void 0);(l?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(h,l,f){var S;(S=this._currentLink)!=null&&S.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,S=h.range.end.y*this._bufferService.cols+h.range.end.x,E=l.y*this._bufferService.cols+l.x;return f<=E&&E<=S}_positionFromMouseEvent(h,l,f){const S=f.getCoords(h,l,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,l,f,S,E){return{x1:h,y1:l,x2:f,y2:S,cols:this._bufferService.cols,fg:E}}};i.Linkifier=p=u([m(1,v.IMouseService),m(2,v.IRenderService),m(3,w.IBufferService),m(4,v.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 u=this&&this.__decorate||function(v,p,h,l){var f,S=arguments.length,E=S<3?p:l===null?l=Object.getOwnPropertyDescriptor(p,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,p,h,l);else for(var k=v.length-1;k>=0;k--)(f=v[k])&&(E=(S<3?f(E):S>3?f(p,h,E):f(p,h))||E);return S>3&&E&&Object.defineProperty(p,h,E),E},m=this&&this.__param||function(v,p){return function(h,l){p(h,l,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const d=a(511),g=a(2585);let _=i.OscLinkProvider=class{constructor(v,p,h){this._bufferService=v,this._optionsService=p,this._oscLinkService=h}provideLinks(v,p){var R;const h=this._bufferService.buffer.lines.get(v-1);if(!h)return void p(void 0);const l=[],f=this._optionsService.rawOptions.linkHandler,S=new d.CellData,E=h.getTrimmedLength();let k=-1,C=-1,b=!1;for(let T=0;T<E;T++)if(C!==-1||h.hasContent(T)){if(h.loadCell(T,S),S.hasExtendedAttrs()&&S.extended.urlId){if(C===-1){C=T,k=S.extended.urlId;continue}b=S.extended.urlId!==k}else C!==-1&&(b=!0);if(b||C!==-1&&T===E-1){const M=(R=this._oscLinkService.getLinkData(k))==null?void 0:R.uri;if(M){const j={start:{x:C+1,y:v},end:{x:T+(b||T!==E-1?0:1),y:v}};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):w(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)}})}b=!1,S.hasExtendedAttrs()&&S.extended.urlId?(C=T,k=S.extended.urlId):(C=-1,k=-1)}}p(l)}};function w(v,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=_=u([m(0,g.IBufferService),m(1,g.IOptionsService),m(2,g.IOscLinkService)],_)},6193:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderDebouncer=void 0,i.RenderDebouncer=class{constructor(a,u){this._renderCallback=a,this._coreBrowserService=u,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,u,m){this._rowCount=m,a=a!==void 0?a:0,u=u!==void 0?u: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,u):u,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),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,u),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 u=a(3614),m=a(3656),d=a(3551),g=a(9042),_=a(3730),w=a(1680),v=a(3107),p=a(5744),h=a(2950),l=a(1296),f=a(428),S=a(4269),E=a(5114),k=a(8934),C=a(3230),b=a(9312),R=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),P=a(5941),L=a(9074),I=a(2585),D=a(5435),W=a(4567),$=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($.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(_.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,H="";switch(A.index){case 256:z="foreground",H="10";break;case 257:z="background",H="11";break;case 258:z="cursor",H="12";break;default:z="ansi",H="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}]${H};${(0,P.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),H=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=H+"px",this.textarea.style.lineHeight=H+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",A=>{this.hasSelection()&&(0,u.copyHandler)(A,this._selectionService)}));const O=A=>(0,u.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,u.rightClickHandler)(A,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",A=>{(0,u.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,u.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",H=>this.updateCursorStyle(H))),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",g.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(R.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",H=>this._handleTextAreaFocus(H))),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(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(T.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(C.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(H=>this._onRender.fire(H))),this.onResize(H=>this._renderService.resize(H.cols,H.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(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(d.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(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(H=>this.scrollLines(H.amount,H.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(b.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(H=>this.scrollLines(H.amount,H.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(H=>this._renderService.handleSelectionChanged(H.start,H.end,H.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(H=>{this.textarea.value=H,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(H=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(v.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",H=>this._selectionService.handleMouseDown(H))),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",H=>this._handleScreenReaderModeOptionChange(H))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(p.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",H=>{!this._overviewRulerRenderer&&H&&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 H={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Y={mouseup:X=>(z(X),X.buttons||(this._document.removeEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.removeEventListener("mousemove",H.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?H.mousemove||(A.addEventListener("mousemove",Y.mousemove),H.mousemove=Y.mousemove):(A.removeEventListener("mousemove",H.mousemove),H.mousemove=null),16&X?H.wheel||(A.addEventListener("wheel",Y.wheel,{passive:!1}),H.wheel=Y.wheel):(A.removeEventListener("wheel",H.wheel),H.wheel=null),2&X?H.mouseup||(H.mouseup=Y.mouseup):(this._document.removeEventListener("mouseup",H.mouseup),H.mouseup=null),4&X?H.mousedrag||(H.mousedrag=Y.mousedrag):(this._document.removeEventListener("mousemove",H.mousedrag),H.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),H.mouseup&&this._document.addEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.addEventListener("mousemove",H.mousedrag),this.cancel(X)})),this.register((0,m.addDisposableDomListener)(A,"wheel",X=>{if(!H.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 H;z===1?(super.scrollLines(O,A,z),this.refresh(0,this.rows-1)):(H=this.viewport)==null||H.scrollLines(O)}paste(O){(0,u.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 H=this.rows-1;return this.scrollLines(z.type===2?-H:H),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,H;(z=this._charSizeService)==null||z.measure(),(H=this.viewport)==null||H.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 H=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};${H}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,u=1e3){this._renderCallback=a,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(a,u,m){this._rowCount=m,a=a!==void 0?a:0,u=u!==void 0?u: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,u):u;const d=Date.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=d-this._lastRefreshMs,_=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},_)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const a=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,u)}}},1680:function(c,i,a){var u=this&&this.__decorate||function(h,l,f,S){var E,k=arguments.length,C=k<3?l:S===null?S=Object.getOwnPropertyDescriptor(l,f):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,l,f,S);else for(var b=h.length-1;b>=0;b--)(E=h[b])&&(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,S){l(f,S,h)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;const d=a(3656),g=a(4725),_=a(8460),w=a(844),v=a(2585);let p=i.Viewport=class extends w.Disposable{constructor(h,l,f,S,E,k,C,b){super(),this._viewportElement=h,this._scrollArea=l,this._bufferService=f,this._optionsService=S,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 _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(R=>this._activeBuffer=R.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(R=>this._renderDimensions=R)),this._handleThemeChange(b.colors),this.register(b.onChangeColors(R=>this._handleThemeChange(R))),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 b;let f,S="";const E=[],k=l??this._bufferService.buffer.lines.length,C=this._bufferService.buffer.lines;for(let R=h;R<k;R++){const T=C.get(R);if(!T)continue;const M=(b=C.get(R+1))==null?void 0:b.isWrapped;if(S+=T.translateToString(!M),!M||R===C.length-1){const j=document.createElement("div");j.textContent=S,E.push(j),S.length>0&&(f=j),S=""}}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=u([m(2,v.IBufferService),m(3,v.IOptionsService),m(4,g.ICharSizeService),m(5,g.IRenderService),m(6,g.ICoreBrowserService),m(7,g.IThemeService)],p)},3107:function(c,i,a){var u=this&&this.__decorate||function(v,p,h,l){var f,S=arguments.length,E=S<3?p:l===null?l=Object.getOwnPropertyDescriptor(p,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,p,h,l);else for(var k=v.length-1;k>=0;k--)(f=v[k])&&(E=(S<3?f(E):S>3?f(p,h,E):f(p,h))||E);return S>3&&E&&Object.defineProperty(p,h,E),E},m=this&&this.__param||function(v,p){return function(h,l){p(h,l,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferDecorationRenderer=void 0;const d=a(4725),g=a(844),_=a(2585);let w=i.BufferDecorationRenderer=class extends g.Disposable{constructor(v,p,h,l,f){super(),this._screenElement=v,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(S=>this._removeDecoration(S))),this.register((0,g.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 v of this._decorationService.decorations)this._renderDecoration(v);this._dimensionsChanged=!1}_renderDecoration(v){this._refreshStyle(v),this._dimensionsChanged&&this._refreshXPosition(v)}_createElement(v){var l;const p=this._coreBrowserService.mainDocument.createElement("div");p.classList.add("xterm-decoration"),p.classList.toggle("xterm-decoration-top-layer",((l=v==null?void 0:v.options)==null?void 0:l.layer)==="top"),p.style.width=`${Math.round((v.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,p.style.height=(v.options.height||1)*this._renderService.dimensions.css.cell.height+"px",p.style.top=(v.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=v.options.x??0;return h&&h>this._bufferService.cols&&(p.style.display="none"),this._refreshXPosition(v,p),p}_refreshStyle(v){const p=v.marker.line-this._bufferService.buffers.active.ydisp;if(p<0||p>=this._bufferService.rows)v.element&&(v.element.style.display="none",v.onRenderEmitter.fire(v.element));else{let h=this._decorationElements.get(v);h||(h=this._createElement(v),v.element=h,this._decorationElements.set(v,h),this._container.appendChild(h),v.onDispose(()=>{this._decorationElements.delete(v),h.remove()})),h.style.top=p*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",v.onRenderEmitter.fire(h)}}_refreshXPosition(v,p=v.element){if(!p)return;const h=v.options.x??0;(v.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(v){var p;(p=this._decorationElements.get(v))==null||p.remove(),this._decorationElements.delete(v),v.dispose()}};i.BufferDecorationRenderer=w=u([m(1,_.IBufferService),m(2,d.ICoreBrowserService),m(3,_.IDecorationService),m(4,d.IRenderService)],w)},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 u of this._zones)if(u.color===a.options.overviewRulerOptions.color&&u.position===a.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,a.marker.line))return;if(this._lineAdjacentToZone(u,a.marker.line,a.options.overviewRulerOptions.position))return void this._addLineToZone(u,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,u){return u>=a.startBufferLine&&u<=a.endBufferLine}_lineAdjacentToZone(a,u,m){return u>=a.startBufferLine-this._linePadding[m||"full"]&&u<=a.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(a,u){a.startBufferLine=Math.min(a.startBufferLine,u),a.endBufferLine=Math.max(a.endBufferLine,u)}}},5744:function(c,i,a){var u=this&&this.__decorate||function(f,S,E,k){var C,b=arguments.length,R=b<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,E):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(f,S,E,k);else for(var T=f.length-1;T>=0;T--)(C=f[T])&&(R=(b<3?C(R):b>3?C(S,E,R):C(S,E))||R);return b>3&&R&&Object.defineProperty(S,E,R),R},m=this&&this.__param||function(f,S){return function(E,k){S(E,k,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OverviewRulerRenderer=void 0;const d=a(5871),g=a(4725),_=a(844),w=a(2585),v={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 _.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(f,S,E,k,C,b,R){var M;super(),this._viewportElement=f,this._screenElement=S,this._bufferService=E,this._decorationService=k,this._renderService=C,this._optionsService=b,this._coreBrowserService=R,this._colorZoneStore=new d.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,_.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),S=Math.ceil(this._canvas.width/3);p.full=this._canvas.width,p.left=f,p.center=S,p.right=f,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=p.left,h.right=p.left+p.center}_refreshDrawHeightConstants(){v.full=Math.round(2*this._coreBrowserService.dpr);const f=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(f,12),6)*this._coreBrowserService.dpr);v.left=S,v.center=S,v.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.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 S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const f=this._colorZoneStore.zones;for(const S of f)S.position!=="full"&&this._renderColorZone(S);for(const S of f)S.position==="full"&&this._renderColorZone(S);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)-v[f.position||"full"]/2),p[f.position||"full"],Math.round((this._canvas.height-1)*((f.endBufferLine-f.startBufferLine)/this._bufferService.buffers.active.lines.length)+v[f.position||"full"]))}_queueRefresh(f,S){this._shouldUpdateDimensions=f||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};i.OverviewRulerRenderer=l=u([m(2,w.IBufferService),m(3,w.IDecorationService),m(4,g.IRenderService),m(5,w.IOptionsService),m(6,g.ICoreBrowserService)],l)},2950:function(c,i,a){var u=this&&this.__decorate||function(v,p,h,l){var f,S=arguments.length,E=S<3?p:l===null?l=Object.getOwnPropertyDescriptor(p,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,p,h,l);else for(var k=v.length-1;k>=0;k--)(f=v[k])&&(E=(S<3?f(E):S>3?f(p,h,E):f(p,h))||E);return S>3&&E&&Object.defineProperty(p,h,E),E},m=this&&this.__param||function(v,p){return function(h,l){p(h,l,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CompositionHelper=void 0;const d=a(4725),g=a(2585),_=a(2584);let w=i.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(v,p,h,l,f,S){this._textarea=v,this._compositionView=p,this._bufferService=h,this._optionsService=l,this._coreService=f,this._renderService=S,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(v){this._compositionView.textContent=v.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(v){if(this._isComposing||this._isSendingComposition){if(v.keyCode===229||v.keyCode===16||v.keyCode===17||v.keyCode===18)return!1;this._finalizeComposition(!1)}return v.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(v){if(this._compositionView.classList.remove("active"),this._isComposing=!1,v){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 v=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const p=this._textarea.value,h=p.replace(v,"");this._dataAlreadySent=h,p.length>v.length?this._coreService.triggerDataEvent(h,!0):p.length<v.length?this._coreService.triggerDataEvent(`${_.C0.DEL}`,!0):p.length===v.length&&p!==v&&this._coreService.triggerDataEvent(p,!0)}},0)}updateCompositionElements(v){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 S=this._compositionView.getBoundingClientRect();this._textarea.style.left=f+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(S.width,1)+"px",this._textarea.style.height=Math.max(S.height,1)+"px",this._textarea.style.lineHeight=S.height+"px"}v||setTimeout(()=>this.updateCompositionElements(!0),0)}}};i.CompositionHelper=w=u([m(2,g.IBufferService),m(3,g.IOptionsService),m(4,g.ICoreService),m(5,d.IRenderService)],w)},9806:(c,i)=>{function a(u,m,d){const g=d.getBoundingClientRect(),_=u.getComputedStyle(d),w=parseInt(_.getPropertyValue("padding-left")),v=parseInt(_.getPropertyValue("padding-top"));return[m.clientX-g.left-w,m.clientY-g.top-v]}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoords=i.getCoordsRelativeToElement=void 0,i.getCoordsRelativeToElement=a,i.getCoords=function(u,m,d,g,_,w,v,p,h){if(!w)return;const l=a(u,m,d);return l?(l[0]=Math.ceil((l[0]+(h?v/2:0))/v),l[1]=Math.ceil(l[1]/p),l[0]=Math.min(Math.max(l[0],1),g+(h?1:0)),l[1]=Math.min(Math.max(l[1],1),_),l):void 0}},9504:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.moveToCellSequence=void 0;const u=a(2584);function m(p,h,l,f){const S=p-d(p,l),E=h-d(h,l),k=Math.abs(S-E)-function(C,b,R){let T=0;const M=C-d(C,R),j=b-d(b,R);for(let N=0;N<Math.abs(M-j);N++){const F=g(C,b)==="A"?-1:1,V=R.buffer.lines.get(M+F*N);V!=null&&V.isWrapped&&T++}return T}(p,h,l);return v(k,w(g(p,h),f))}function d(p,h){let l=0,f=h.buffer.lines.get(p),S=f==null?void 0:f.isWrapped;for(;S&&p>=0&&p<h.rows;)l++,f=h.buffer.lines.get(--p),S=f==null?void 0:f.isWrapped;return l}function g(p,h){return p>h?"A":"B"}function _(p,h,l,f,S,E){let k=p,C=h,b="";for(;k!==l||C!==f;)k+=S?1:-1,S&&k>E.cols-1?(b+=E.buffer.translateBufferLineToString(C,!1,p,k),k=0,p=0,C++):!S&&k<0&&(b+=E.buffer.translateBufferLineToString(C,!1,0,p+1),k=E.cols-1,p=k,C--);return b+E.buffer.translateBufferLineToString(C,!1,p,k)}function w(p,h){const l=h?"O":"[";return u.C0.ESC+l+p}function v(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 S=l.buffer.x,E=l.buffer.y;if(!l.buffer.hasScrollback)return function(b,R,T,M,j,N){return m(R,M,j,N).length===0?"":v(_(b,R,b,R-d(R,j),!1,j).length,w("D",N))}(S,E,0,h,l,f)+m(E,h,l,f)+function(b,R,T,M,j,N){let F;F=m(R,M,j,N).length>0?M-d(M,j):R;const V=M,K=function(q,B,P,L,I,D){let W;return W=m(P,L,I,D).length>0?L-d(L,I):B,q<P&&W<=L||q>=P&&W<L?"C":"D"}(b,R,T,M,j,N);return v(_(b,F,T,V,K==="C",j).length,w(K,N))}(S,E,p,h,l,f);let k;if(E===h)return k=S>p?"D":"C",v(Math.abs(S-p),w(k,f));k=E>h?"D":"C";const C=Math.abs(E-h);return v(function(b,R){return R.cols-b}(E>h?p:S,l)+(C-1)*l.cols+1+((E>h?S:p)-1),w(k,f))}},1296:function(c,i,a){var u=this&&this.__decorate||function(N,F,V,K){var q,B=arguments.length,P=B<3?F:K===null?K=Object.getOwnPropertyDescriptor(F,V):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(N,F,V,K);else for(var L=N.length-1;L>=0;L--)(q=N[L])&&(P=(B<3?q(P):B>3?q(F,V,P):q(F,V))||P);return B>3&&P&&Object.defineProperty(F,V,P),P},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 d=a(3787),g=a(2550),_=a(2223),w=a(6171),v=a(6052),p=a(4725),h=a(8055),l=a(8460),f=a(844),S=a(2585),E="xterm-dom-renderer-owner-",k="xterm-rows",C="xterm-fg-",b="xterm-bg-",R="xterm-focus",T="xterm-selection";let M=1,j=i.DomRenderer=class extends f.Disposable{constructor(N,F,V,K,q,B,P,L,I,D,W,$,U){super(),this._terminal=N,this._document=F,this._element=V,this._screenElement=K,this._viewportElement=q,this._helperContainer=B,this._linkifier2=P,this._charSizeService=I,this._optionsService=D,this._bufferService=W,this._coreBrowserService=$,this._themeService=U,this._terminalClass=M++,this._rowElements=[],this._selectionRenderModel=(0,v.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,w.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(d.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 g.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}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${k}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${k}.${R} .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,P]of N.ansi.entries())F+=`${this._terminalSelector} .${C}${B} { color: ${P.css}; }${this._terminalSelector} .${C}${B}.xterm-dim { color: ${h.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${b}${B} { background-color: ${P.css}; }`;F+=`${this._terminalSelector} .${C}${_.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(N.background).css}; }${this._terminalSelector} .${C}${_.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(N.background),.5).css}; }${this._terminalSelector} .${b}${_.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(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),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,P=this._selectionRenderModel.viewportCappedEndRow;if(B>=this._bufferService.rows||P<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],P-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=P-B-1;if(L.appendChild(this._createSelectionElement(B+1,0,this._bufferService.cols,W)),B!==P){const $=q===P?F[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(P,0,$))}}this._selectionContainer.appendChild(L)}_createSelectionElement(N,F,V,K=1){const q=this._document.createElement("div"),B=F*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(V-F);return B+P>this.dimensions.css.canvas.width&&(P=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=`${P}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,P=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],$=V.lines.get(D);if(!W||!$)break;W.replaceChildren(...this._rowFactory.createRow($,D,D===K,P,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 P=this._bufferService.rows-1;V=Math.max(Math.min(V,P),0),K=Math.max(Math.min(K,P),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,$=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,$,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=u([m(7,S.IInstantiationService),m(8,p.ICharSizeService),m(9,S.IOptionsService),m(10,S.IBufferService),m(11,p.ICoreBrowserService),m(12,p.IThemeService)],j)},3787:function(c,i,a){var u=this&&this.__decorate||function(k,C,b,R){var T,M=arguments.length,j=M<3?C:R===null?R=Object.getOwnPropertyDescriptor(C,b):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(k,C,b,R);else for(var N=k.length-1;N>=0;N--)(T=k[N])&&(j=(M<3?T(j):M>3?T(C,b,j):T(C,b))||j);return M>3&&j&&Object.defineProperty(C,b,j),j},m=this&&this.__param||function(k,C){return function(b,R){C(b,R,k)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRendererRowFactory=void 0;const d=a(2223),g=a(643),_=a(511),w=a(2585),v=a(8055),p=a(4725),h=a(4269),l=a(6171),f=a(3734);let S=i.DomRendererRowFactory=class{constructor(k,C,b,R,T,M,j){this._document=k,this._characterJoinerService=C,this._optionsService=b,this._coreBrowserService=R,this._coreService=T,this._decorationService=M,this._themeService=j,this._workCell=new _.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(k,C,b){this._selectionStart=k,this._selectionEnd=C,this._columnSelectMode=b}createRow(k,C,b,R,T,M,j,N,F,V,K){const q=[],B=this._characterJoinerService.getJoinedCharacters(C),P=this._themeService.colors;let L,I=k.getNoBgTrimmedLength();b&&I<M+1&&(I=M+1);let D=0,W="",$=0,U=0,G=0,O=!1,A=0,z=!1,H=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 ve=B.shift();se=new h.JoinedCellData(this._workCell,k.translateToString(!0,ve[0],ve[1]),ve[1]-ve[0]),Ce=ve[1]-1,oe=se.getWidth()}const Br=this._isCellInSelection(ne,C),rr=b&&ne===M,Ba=X&&ne>=V&&ne<=K;let Fa=!1;this._decorationService.forEachDecorationAtCell(ne,C,void 0,ve=>{Fa=!0});let xi=se.getChars()||g.WHITESPACE_CELL_CHAR;if(xi===" "&&(se.isUnderline()||se.isOverline())&&(xi=" "),H=oe*N-F.get(xi,se.isBold(),se.isItalic()),L){if(D&&(Br&&z||!Br&&!z&&se.bg===$)&&(Br&&z&&P.selectionForeground||se.fg===U)&&se.extended.ext===G&&Ba===O&&H===A&&!rr&&!he&&!Fa){se.isInvisible()?W+=g.WHITESPACE_CELL_CHAR:W+=xi,D++;continue}D&&(L.textContent=W),L=this._document.createElement("span"),D=0,W=""}else L=this._document.createElement("span");if($=se.bg,U=se.fg,G=se.extended.ext,O=Ba,A=H,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(R==="bar"?"xterm-cursor-bar":R==="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()?g.WHITESPACE_CELL_CHAR:se.getChars()||g.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 ve=se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&se.isBold()&&ve<8&&(ve+=8),L.style.textDecorationColor=P.ansi[ve].css}se.isOverline()&&(Y.push("xterm-overline"),W===" "&&(W=" ")),se.isStrikethrough()&&Y.push("xterm-strikethrough"),Ba&&(L.style.textDecoration="underline");let ct=se.getFgColor(),os=se.getFgColorMode(),Lt=se.getBgColor(),as=se.getBgColorMode();const $a=!!se.isInverse();if($a){const ve=ct;ct=Lt,Lt=ve;const Xy=os;os=as,as=Xy}let nr,bi,sr,ls=!1;switch(this._decorationService.forEachDecorationAtCell(ne,C,void 0,ve=>{ve.options.layer!=="top"&&ls||(ve.backgroundColorRGB&&(as=50331648,Lt=ve.backgroundColorRGB.rgba>>8&16777215,nr=ve.backgroundColorRGB),ve.foregroundColorRGB&&(os=50331648,ct=ve.foregroundColorRGB.rgba>>8&16777215,bi=ve.foregroundColorRGB),ls=ve.options.layer==="top")}),!ls&&Br&&(nr=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,Lt=nr.rgba>>8&16777215,as=50331648,ls=!0,P.selectionForeground&&(os=50331648,ct=P.selectionForeground.rgba>>8&16777215,bi=P.selectionForeground)),ls&&Y.push("xterm-decoration-top"),as){case 16777216:case 33554432:sr=P.ansi[Lt],Y.push(`xterm-bg-${Lt}`);break;case 50331648:sr=v.channels.toColor(Lt>>16,Lt>>8&255,255&Lt),this._addStyle(L,`background-color:#${E((Lt>>>0).toString(16),"0",6)}`);break;default:$a?(sr=P.foreground,Y.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):sr=P.background}switch(nr||se.isDim()&&(nr=v.color.multiplyOpacity(sr,.5)),os){case 16777216:case 33554432:se.isBold()&&ct<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ct+=8),this._applyMinimumContrast(L,sr,P.ansi[ct],se,nr,void 0)||Y.push(`xterm-fg-${ct}`);break;case 50331648:const ve=v.channels.toColor(ct>>16&255,ct>>8&255,255&ct);this._applyMinimumContrast(L,sr,ve,se,nr,bi)||this._addStyle(L,`color:#${E(ct.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,sr,P.foreground,se,nr,bi)||$a&&Y.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}Y.length&&(L.className=Y.join(" "),Y.length=0),rr||he||Fa?L.textContent=W:D++,H!==this.defaultSpacing&&(L.style.letterSpacing=`${H}px`),q.push(L),ne=Ce}return L&&D&&(L.textContent=W),q}_applyMinimumContrast(k,C,b,R,T,M){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,l.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const j=this._getContrastCache(R);let N;if(T||M||(N=j.getColor(C.rgba,b.rgba)),N===void 0){const F=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);N=v.color.ensureContrastRatio(T||C,M||b,F),j.setColor((T||C).rgba,(M||b).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 b=this._selectionStart,R=this._selectionEnd;return!(!b||!R)&&(this._columnSelectMode?b[0]<=R[0]?k>=b[0]&&C>=b[1]&&k<R[0]&&C<=R[1]:k<b[0]&&C>=b[1]&&k>=R[0]&&C<=R[1]:C>b[1]&&C<R[1]||b[1]===R[1]&&C===b[1]&&k>=b[0]&&k<R[0]||b[1]<R[1]&&C===R[1]&&k<R[0]||b[1]<R[1]&&C===b[1]&&k>=b[0])}};function E(k,C,b){for(;k.length<b;)k=C+k;return k}i.DomRendererRowFactory=S=u([m(1,p.ICharacterJoinerService),m(2,w.IOptionsService),m(3,p.ICoreBrowserService),m(4,w.ICoreService),m(5,w.IDecorationService),m(6,p.IThemeService)],S)},2550:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WidthCache=void 0,i.WidthCache=class{constructor(a,u){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 d=a.createElement("span");d.classList.add("xterm-char-measure-element"),d.style.fontWeight="bold";const g=a.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const _=a.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold",_.style.fontStyle="italic",this._measureElements=[m,d,g,_],this._container.appendChild(m),this._container.appendChild(d),this._container.appendChild(g),this._container.appendChild(_),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(a,u,m,d){a===this._font&&u===this._fontSize&&m===this._weight&&d===this._weightBold||(this._font=a,this._fontSize=u,this._weight=m,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(a,u,m){let d=0;if(!u&&!m&&a.length===1&&(d=a.charCodeAt(0))<256){if(this._flat[d]!==-9999)return this._flat[d];const w=this._measure(a,0);return w>0&&(this._flat[d]=w),w}let g=a;u&&(g+="B"),m&&(g+="I");let _=this._holey.get(g);if(_===void 0){let w=0;u&&(w|=1),m&&(w|=2),_=this._measure(a,w),_>0&&this._holey.set(g,_)}return _}_measure(a,u){const m=this._measureElements[u];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 u=a(6114);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(c,i)=>{function a(m){return 57508<=m&&m<=57558}function u(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=u,i.allowRescaling=function(m,d,g,_){return d===1&&g>Math.ceil(1.5*_)&&m!==void 0&&m>255&&!u(m)&&!a(m)&&!function(w){return 57344<=w&&w<=63743}(m)},i.treatGlyphAsBackgroundColor=function(m){return a(m)||function(d){return 9472<=d&&d<=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,d,g=0){return(m-(2*Math.round(d)-g))%(2*Math.round(d))}},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,d,g,_=!1){if(this.selectionStart=d,this.selectionEnd=g,!d||!g||d[0]===g[0]&&d[1]===g[1])return void this.clear();const w=m.buffers.active.ydisp,v=d[1]-w,p=g[1]-w,h=Math.max(v,0),l=Math.min(p,m.rows-1);h>=m.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=_,this.viewportStartRow=v,this.viewportEndRow=p,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=d[0],this.endCol=g[0])}isCellSelected(m,d,g){return!!this.hasSelection&&(g-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?d>=this.startCol&&g>=this.viewportCappedStartRow&&d<this.endCol&&g<=this.viewportCappedEndRow:d<this.startCol&&g>=this.viewportCappedStartRow&&d>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&d>=this.startCol&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&d>=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,u=this.selectionEnd;return!(!a||!u)&&(a[1]>u[1]||a[1]===u[1]&&a[0]>u[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 u=this&&this.__decorate||function(l,f,S,E){var k,C=arguments.length,b=C<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,f,S,E);else for(var R=l.length-1;R>=0;R--)(k=l[R])&&(b=(C<3?k(b):C>3?k(f,S,b):k(f,S))||b);return C>3&&b&&Object.defineProperty(f,S,b),b},m=this&&this.__param||function(l,f){return function(S,E){f(S,E,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharSizeService=void 0;const d=a(2585),g=a(8460),_=a(844);let w=i.CharSizeService=class extends _.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,f,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.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=w=u([m(2,d.IOptionsService)],w);class v extends _.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(f,S){f!==void 0&&f>0&&S!==void 0&&S>0&&(this._result.width=f,this._result.height=S)}}class p extends v{constructor(f,S,E){super(),this._document=f,this._parentElement=S,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 v{constructor(f){super(),this._optionsService=f,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))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 u=this&&this.__decorate||function(h,l,f,S){var E,k=arguments.length,C=k<3?l:S===null?S=Object.getOwnPropertyDescriptor(l,f):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,l,f,S);else for(var b=h.length-1;b>=0;b--)(E=h[b])&&(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,S){l(f,S,h)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharacterJoinerService=i.JoinedCellData=void 0;const d=a(3734),g=a(643),_=a(511),w=a(2585);class v extends d.AttributeData{constructor(l,f,S){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=f,this._width=S}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=v;let p=i.CharacterJoinerService=class Wy{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new _.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 S=[],E=f.translateToString(!0);let k=0,C=0,b=0,R=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!==R||this._workCell.bg!==T){if(M-k>1){const j=this._getJoinedRanges(E,b,C,f,k);for(let N=0;N<j.length;N++)S.push(j[N])}k=M,b=C,R=this._workCell.fg,T=this._workCell.bg}C+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-k>1){const M=this._getJoinedRanges(E,b,C,f,k);for(let j=0;j<M.length;j++)S.push(M[j])}return S}_getJoinedRanges(l,f,S,E,k){const C=l.substring(f,S);let b=[];try{b=this._characterJoiners[0].handler(C)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const T=this._characterJoiners[R].handler(C);for(let M=0;M<T.length;M++)Wy._mergeRanges(b,T[M])}catch(T){console.error(T)}return this._stringRangesToCellRanges(b,E,k),b}_stringRangesToCellRanges(l,f,S){let E=0,k=!1,C=0,b=l[E];if(b){for(let R=S;R<this._bufferService.cols;R++){const T=f.getWidth(R),M=f.getString(R).length||g.WHITESPACE_CELL_CHAR.length;if(T!==0){if(!k&&b[0]<=C&&(b[0]=R,k=!0),b[1]<=C){if(b[1]=R,b=l[++E],!b)break;b[0]<=C?(b[0]=R,k=!0):k=!1}C+=M}}b&&(b[1]=this._bufferService.cols)}}static _mergeRanges(l,f){let S=!1;for(let E=0;E<l.length;E++){const k=l[E];if(S){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]),S=!0)}}return S?l[l.length-1][1]=f[1]:l.push(f),l}};i.CharacterJoinerService=p=u([m(0,w.IBufferService)],p)},5114:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreBrowserService=void 0;const u=a(844),m=a(8460),d=a(3656);class g extends u.Disposable{constructor(v,p,h){super(),this._textarea=v,this._window=p,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new _(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(v){this._window!==v&&(this._window=v,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=g;class _ extends u.Disposable{constructor(v){super(),this._parentWindow=v,this._windowResizeListener=this.register(new u.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,u.toDisposable)(()=>this.clearListener()))}setWindow(v){this._parentWindow=v,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,d.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)==null||v.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 u=a(844);class m extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const _=this.linkProviders.indexOf(g);_!==-1&&this.linkProviders.splice(_,1)}}}}i.LinkProviderService=m},8934:function(c,i,a){var u=this&&this.__decorate||function(w,v,p,h){var l,f=arguments.length,S=f<3?v:h===null?h=Object.getOwnPropertyDescriptor(v,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(w,v,p,h);else for(var E=w.length-1;E>=0;E--)(l=w[E])&&(S=(f<3?l(S):f>3?l(v,p,S):l(v,p))||S);return f>3&&S&&Object.defineProperty(v,p,S),S},m=this&&this.__param||function(w,v){return function(p,h){v(p,h,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseService=void 0;const d=a(4725),g=a(9806);let _=i.MouseService=class{constructor(w,v){this._renderService=w,this._charSizeService=v}getCoords(w,v,p,h,l){return(0,g.getCoords)(window,w,v,p,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(w,v){const p=(0,g.getCoordsRelativeToElement)(window,w,v);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=_=u([m(0,d.IRenderService),m(1,d.ICharSizeService)],_)},3230:function(c,i,a){var u=this&&this.__decorate||function(l,f,S,E){var k,C=arguments.length,b=C<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,f,S,E);else for(var R=l.length-1;R>=0;R--)(k=l[R])&&(b=(C<3?k(b):C>3?k(f,S,b):k(f,S))||b);return C>3&&b&&Object.defineProperty(f,S,b),b},m=this&&this.__param||function(l,f){return function(S,E){f(S,E,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.RenderService=void 0;const d=a(6193),g=a(4725),_=a(8460),w=a(844),v=a(7226),p=a(2585);let h=i.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(l,f,S,E,k,C,b,R){super(),this._rowCount=l,this._charSizeService=E,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new v.DebouncedIdleTask,this._observerDisposable=this.register(new w.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 _.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new _.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new _.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new _.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new d.RenderDebouncer((T,M)=>this._renderRows(T,M),b),this.register(this._renderDebouncer),this.register(b.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(S.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(k.onDecorationRegistered(()=>this._fullRefresh())),this.register(k.onDecorationRemoved(()=>this._fullRefresh())),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(C.cols,C.rows),this._fullRefresh()})),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(C.buffer.y,C.buffer.y,!0))),this.register(R.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(b.window,f),this.register(b.onWindowChange(T=>this._registerIntersectionObserver(T,f)))}_registerIntersectionObserver(l,f){if("IntersectionObserver"in l){const S=new l.IntersectionObserver(E=>this._handleIntersectionChange(E[E.length-1]),{threshold:0});S.observe(f),this._observerDisposable.value=(0,w.toDisposable)(()=>S.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,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(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 S;return(S=this._renderer.value)==null?void 0:S.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,S){var E;this._selectionState.start=l,this._selectionState.end=f,this._selectionState.columnSelectMode=S,(E=this._renderer.value)==null||E.handleSelectionChanged(l,f,S)}handleCursorMove(){var l;(l=this._renderer.value)==null||l.handleCursorMove()}clear(){var l;(l=this._renderer.value)==null||l.clear()}};i.RenderService=h=u([m(2,p.IOptionsService),m(3,g.ICharSizeService),m(4,p.IDecorationService),m(5,p.IBufferService),m(6,g.ICoreBrowserService),m(7,g.IThemeService)],h)},9312:function(c,i,a){var u=this&&this.__decorate||function(b,R,T,M){var j,N=arguments.length,F=N<3?R:M===null?M=Object.getOwnPropertyDescriptor(R,T):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(b,R,T,M);else for(var V=b.length-1;V>=0;V--)(j=b[V])&&(F=(N<3?j(F):N>3?j(R,T,F):j(R,T))||F);return N>3&&F&&Object.defineProperty(R,T,F),F},m=this&&this.__param||function(b,R){return function(T,M){R(T,M,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionService=void 0;const d=a(9806),g=a(9504),_=a(456),w=a(4725),v=a(8460),p=a(844),h=a(6114),l=a(4841),f=a(511),S=a(2585),E=" ",k=new RegExp(E,"g");let C=i.SelectionService=class extends p.Disposable{constructor(b,R,T,M,j,N,F,V,K){super(),this._element=b,this._screenElement=R,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 v.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new v.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new v.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new v.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 _.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 b=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!b||!R||b[0]===R[0]&&b[1]===R[1])}get selectionText(){const b=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!b||!R)return"";const T=this._bufferService.buffer,M=[];if(this._activeSelectionMode===3){if(b[0]===R[0])return"";const j=b[0]<R[0]?b[0]:R[0],N=b[0]<R[0]?R[0]:b[0];for(let F=b[1];F<=R[1];F++){const V=T.translateBufferLineToString(F,!0,j,N);M.push(V)}}else{const j=b[1]===R[1]?R[0]:void 0;M.push(T.translateBufferLineToString(b[1],!0,b[0],j));for(let N=b[1]+1;N<=R[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(b[1]!==R[1]){const N=T.lines.get(R[1]),F=T.translateBufferLineToString(R[1],!0,0,R[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(b){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),h.isLinux&&b&&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(b){const R=this._getMouseBufferCoords(b),T=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!!(T&&M&&R)&&this._areCoordsInSelection(R,T,M)}isCellInSelection(b,R){const T=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!T||!M)&&this._areCoordsInSelection([b,R],T,M)}_areCoordsInSelection(b,R,T){return b[1]>R[1]&&b[1]<T[1]||R[1]===T[1]&&b[1]===R[1]&&b[0]>=R[0]&&b[0]<T[0]||R[1]<T[1]&&b[1]===T[1]&&b[0]<T[0]||R[1]<T[1]&&b[1]===R[1]&&b[0]>=R[0]}_selectWordAtCursor(b,R){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(b);return!!M&&(this._selectWordAt(M,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(b,R){this._model.clearSelection(),b=Math.max(b,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,b],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(b){this._model.handleTrim(b)&&this.refresh()}_getMouseBufferCoords(b){const R=this._mouseService.getCoords(b,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(b){let R=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,b,this._screenElement)[1];const T=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=T?0:(R>T&&(R-=T),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(b){return h.isMac?b.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:b.shiftKey}handleMouseDown(b){if(this._mouseDownTimeStamp=b.timeStamp,(b.button!==2||!this.hasSelection)&&b.button===0){if(!this._enabled){if(!this.shouldForceSelection(b))return;b.stopPropagation()}b.preventDefault(),this._dragScrollAmount=0,this._enabled&&b.shiftKey?this._handleIncrementalClick(b):b.detail===1?this._handleSingleClick(b):b.detail===2?this._handleDoubleClick(b):b.detail===3&&this._handleTripleClick(b),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(b){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(b))}_handleSingleClick(b){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(b)?3:0,this._model.selectionStart=this._getMouseBufferCoords(b),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(b){this._selectWordAtCursor(b,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(b){const R=this._getMouseBufferCoords(b);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(b){return b.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(b){if(b.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(b),!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(b),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]++}R&&R[0]===this._model.selectionEnd[0]&&R[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 b=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(b.ydisp+this._bufferService.rows,b.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=b.ydisp),this.refresh()}}_handleMouseUp(b){const R=b.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&b.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const T=this._mouseService.getCoords(b,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(T&&T[0]!==void 0&&T[1]!==void 0){const M=(0,g.moveToCellSequence)(T[0]-1,T[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(M,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const b=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,T=!(!b||!R||b[0]===R[0]&&b[1]===R[1]);T?b&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&b[0]===this._oldSelectionStart[0]&&b[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(b,R,T)):this._oldHasSelection&&this._fireOnSelectionChange(b,R,T)}_fireOnSelectionChange(b,R,T){this._oldSelectionStart=b,this._oldSelectionEnd=R,this._oldHasSelection=T,this._onSelectionChange.fire()}_handleBufferActivate(b){this.clearSelection(),this._trimListener.dispose(),this._trimListener=b.activeBuffer.lines.onTrim(R=>this._handleTrim(R))}_convertViewportColToCharacterIndex(b,R){let T=R;for(let M=0;R>=M;M++){const j=b.loadCell(M,this._workCell).getChars().length;this._workCell.getWidth()===0?T--:j>1&&R!==M&&(T+=j-1)}return T}setSelection(b,R,T){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[b,R],this._model.selectionStartLength=T,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(b){this._isClickInSelection(b)||(this._selectWordAtCursor(b,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(b,R,T=!0,M=!0){if(b[0]>=this._bufferService.cols)return;const j=this._bufferService.buffer,N=j.lines.get(b[1]);if(!N)return;const F=j.translateBufferLineToString(b[1],!1);let V=this._convertViewportColToCharacterIndex(N,b[0]),K=V;const q=b[0]-V;let B=0,P=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 $=b[0],U=b[0];N.getWidth($)===0&&(B++,$--),N.getWidth(U)===2&&(P++,U++);const G=N.getString(U).length;for(G>1&&(I+=G-1,K+=G-1);$>0&&V>0&&!this._isCharWordSeparator(N.loadCell($-1,this._workCell));){N.loadCell($-1,this._workCell);const O=this._workCell.getChars().length;this._workCell.getWidth()===0?(B++,$--):O>1&&(L+=O-1,V-=O-1),V--,$--}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?(P++,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+P-L-I);if(R||F.slice(V,K).trim()!==""){if(T&&D===0&&N.getCodePoint(0)!==32){const $=j.lines.get(b[1]-1);if($&&N.isWrapped&&$.getCodePoint(this._bufferService.cols-1)!==32){const U=this._getWordAt([this._bufferService.cols-1,b[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 $=j.lines.get(b[1]+1);if($!=null&&$.isWrapped&&$.getCodePoint(0)!==32){const U=this._getWordAt([0,b[1]+1],!1,!1,!0);U&&(W+=U.length)}}return{start:D,length:W}}}_selectWordAt(b,R){const T=this._getWordAt(b,R);if(T){for(;T.start<0;)T.start+=this._bufferService.cols,b[1]--;this._model.selectionStart=[T.start,b[1]],this._model.selectionStartLength=T.length}}_selectToWordAt(b){const R=this._getWordAt(b,!0);if(R){let T=b[1];for(;R.start<0;)R.start+=this._bufferService.cols,T--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,T++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,T]}}_isCharWordSeparator(b){return b.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(b.getChars())>=0}_selectLineAt(b){const R=this._bufferService.buffer.getWrappedRangeForLine(b),T={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,l.getRangeLength)(T,this._bufferService.cols)}};i.SelectionService=C=u([m(3,S.IBufferService),m(4,S.ICoreService),m(5,w.IMouseService),m(6,S.IOptionsService),m(7,w.IRenderService),m(8,w.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 u=a(8343);i.ICharSizeService=(0,u.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),i.IMouseService=(0,u.createDecorator)("MouseService"),i.IRenderService=(0,u.createDecorator)("RenderService"),i.ISelectionService=(0,u.createDecorator)("SelectionService"),i.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),i.IThemeService=(0,u.createDecorator)("ThemeService"),i.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(c,i,a){var u=this&&this.__decorate||function(C,b,R,T){var M,j=arguments.length,N=j<3?b:T===null?T=Object.getOwnPropertyDescriptor(b,R):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(C,b,R,T);else for(var F=C.length-1;F>=0;F--)(M=C[F])&&(N=(j<3?M(N):j>3?M(b,R,N):M(b,R))||N);return j>3&&N&&Object.defineProperty(b,R,N),N},m=this&&this.__param||function(C,b){return function(R,T){b(R,T,C)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const d=a(7239),g=a(8055),_=a(8460),w=a(844),v=a(2585),p=g.css.toColor("#ffffff"),h=g.css.toColor("#000000"),l=g.css.toColor("#ffffff"),f=g.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const C=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],b=[0,95,135,175,215,255];for(let R=0;R<216;R++){const T=b[R/36%6|0],M=b[R/6%6|0],j=b[R%6];C.push({css:g.channels.toCss(T,M,j),rgba:g.channels.toRgba(T,M,j)})}for(let R=0;R<24;R++){const T=8+10*R;C.push({css:g.channels.toCss(T,T,T),rgba:g.channels.toRgba(T,T,T)})}return C})());let E=i.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(C){super(),this._optionsService=C,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new _.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:p,background:h,cursor:l,cursorAccent:f,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:g.color.blend(h,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:g.color.blend(h,S),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 b=this._colors;if(b.foreground=k(C.foreground,p),b.background=k(C.background,h),b.cursor=k(C.cursor,l),b.cursorAccent=k(C.cursorAccent,f),b.selectionBackgroundTransparent=k(C.selectionBackground,S),b.selectionBackgroundOpaque=g.color.blend(b.background,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundTransparent=k(C.selectionInactiveBackground,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundOpaque=g.color.blend(b.background,b.selectionInactiveBackgroundTransparent),b.selectionForeground=C.selectionForeground?k(C.selectionForeground,g.NULL_COLOR):void 0,b.selectionForeground===g.NULL_COLOR&&(b.selectionForeground=void 0),g.color.isOpaque(b.selectionBackgroundTransparent)&&(b.selectionBackgroundTransparent=g.color.opacity(b.selectionBackgroundTransparent,.3)),g.color.isOpaque(b.selectionInactiveBackgroundTransparent)&&(b.selectionInactiveBackgroundTransparent=g.color.opacity(b.selectionInactiveBackgroundTransparent,.3)),b.ansi=i.DEFAULT_ANSI_COLORS.slice(),b.ansi[0]=k(C.black,i.DEFAULT_ANSI_COLORS[0]),b.ansi[1]=k(C.red,i.DEFAULT_ANSI_COLORS[1]),b.ansi[2]=k(C.green,i.DEFAULT_ANSI_COLORS[2]),b.ansi[3]=k(C.yellow,i.DEFAULT_ANSI_COLORS[3]),b.ansi[4]=k(C.blue,i.DEFAULT_ANSI_COLORS[4]),b.ansi[5]=k(C.magenta,i.DEFAULT_ANSI_COLORS[5]),b.ansi[6]=k(C.cyan,i.DEFAULT_ANSI_COLORS[6]),b.ansi[7]=k(C.white,i.DEFAULT_ANSI_COLORS[7]),b.ansi[8]=k(C.brightBlack,i.DEFAULT_ANSI_COLORS[8]),b.ansi[9]=k(C.brightRed,i.DEFAULT_ANSI_COLORS[9]),b.ansi[10]=k(C.brightGreen,i.DEFAULT_ANSI_COLORS[10]),b.ansi[11]=k(C.brightYellow,i.DEFAULT_ANSI_COLORS[11]),b.ansi[12]=k(C.brightBlue,i.DEFAULT_ANSI_COLORS[12]),b.ansi[13]=k(C.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),b.ansi[14]=k(C.brightCyan,i.DEFAULT_ANSI_COLORS[14]),b.ansi[15]=k(C.brightWhite,i.DEFAULT_ANSI_COLORS[15]),C.extendedAnsi){const R=Math.min(b.ansi.length-16,C.extendedAnsi.length);for(let T=0;T<R;T++)b.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 b=0;b<this._restoreColors.ansi.length;++b)this._colors.ansi[b]=this._restoreColors.ansi[b]}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,b){if(C!==void 0)try{return g.css.toColor(C)}catch{}return b}i.ThemeService=E=u([m(0,v.IOptionsService)],E)},6349:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;const u=a(8460),m=a(844);class d extends m.Disposable{constructor(_){super(),this._maxLength=_,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(_){if(this._maxLength===_)return;const w=new Array(_);for(let v=0;v<Math.min(_,this.length);v++)w[v]=this._array[this._getCyclicIndex(v)];this._array=w,this._maxLength=_,this._startIndex=0}get length(){return this._length}set length(_){if(_>this._length)for(let w=this._length;w<_;w++)this._array[w]=void 0;this._length=_}get(_){return this._array[this._getCyclicIndex(_)]}set(_,w){this._array[this._getCyclicIndex(_)]=w}push(_){this._array[this._getCyclicIndex(this._length)]=_,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(_,w,...v){if(w){for(let p=_;p<this._length-w;p++)this._array[this._getCyclicIndex(p)]=this._array[this._getCyclicIndex(p+w)];this._length-=w,this.onDeleteEmitter.fire({index:_,amount:w})}for(let p=this._length-1;p>=_;p--)this._array[this._getCyclicIndex(p+v.length)]=this._array[this._getCyclicIndex(p)];for(let p=0;p<v.length;p++)this._array[this._getCyclicIndex(_+p)]=v[p];if(v.length&&this.onInsertEmitter.fire({index:_,amount:v.length}),this._length+v.length>this._maxLength){const p=this._length+v.length-this._maxLength;this._startIndex+=p,this._length=this._maxLength,this.onTrimEmitter.fire(p)}else this._length+=v.length}trimStart(_){_>this._length&&(_=this._length),this._startIndex+=_,this._length-=_,this.onTrimEmitter.fire(_)}shiftElements(_,w,v){if(!(w<=0)){if(_<0||_>=this._length)throw new Error("start argument out of range");if(_+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(let h=w-1;h>=0;h--)this.set(_+h+v,this.get(_+h));const p=_+w+v-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<w;p++)this.set(_+p+v,this.get(_+p))}}_getCyclicIndex(_){return(this._startIndex+_)%this._maxLength}}i.CircularList=d},1439:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function a(u,m=5){if(typeof u!="object")return u;const d=Array.isArray(u)?[]:{};for(const g in u)d[g]=m<=1?u[g]:u[g]&&a(u[g],m-1);return d}},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,u=0,m=0,d=0;var g,_,w,v,p;function h(f){const S=f.toString(16);return S.length<2?"0"+S:S}function l(f,S){return f<S?(S+.05)/(f+.05):(f+.05)/(S+.05)}i.NULL_COLOR={css:"#00000000",rgba:0},function(f){f.toCss=function(S,E,k,C){return C!==void 0?`#${h(S)}${h(E)}${h(k)}${h(C)}`:`#${h(S)}${h(E)}${h(k)}`},f.toRgba=function(S,E,k,C=255){return(S<<24|E<<16|k<<8|C)>>>0},f.toColor=function(S,E,k,C){return{css:f.toCss(S,E,k,C),rgba:f.toRgba(S,E,k,C)}}}(g||(i.channels=g={})),function(f){function S(E,k){return d=Math.round(255*k),[a,u,m]=p.toChannels(E.rgba),{css:g.toCss(a,u,m,d),rgba:g.toRgba(a,u,m,d)}}f.blend=function(E,k){if(d=(255&k.rgba)/255,d===1)return{css:k.css,rgba:k.rgba};const C=k.rgba>>24&255,b=k.rgba>>16&255,R=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)*d),u=M+Math.round((b-M)*d),m=j+Math.round((R-j)*d),{css:g.toCss(a,u,m),rgba:g.toRgba(a,u,m)}},f.isOpaque=function(E){return(255&E.rgba)==255},f.ensureContrastRatio=function(E,k,C){const b=p.ensureContrastRatio(E.rgba,k.rgba,C);if(b)return g.toColor(b>>24&255,b>>16&255,b>>8&255)},f.opaque=function(E){const k=(255|E.rgba)>>>0;return[a,u,m]=p.toChannels(k),{css:g.toCss(a,u,m),rgba:k}},f.opacity=S,f.multiplyOpacity=function(E,k){return d=255&E.rgba,S(E,d*k/255)},f.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}}(_||(i.color=_={})),function(f){let S,E;try{const k=document.createElement("canvas");k.width=1,k.height=1;const C=k.getContext("2d",{willReadFrequently:!0});C&&(S=C,S.globalCompositeOperation="copy",E=S.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),u=parseInt(k.slice(2,3).repeat(2),16),m=parseInt(k.slice(3,4).repeat(2),16),g.toColor(a,u,m);case 5:return a=parseInt(k.slice(1,2).repeat(2),16),u=parseInt(k.slice(2,3).repeat(2),16),m=parseInt(k.slice(3,4).repeat(2),16),d=parseInt(k.slice(4,5).repeat(2),16),g.toColor(a,u,m,d);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]),u=parseInt(C[2]),m=parseInt(C[3]),d=Math.round(255*(C[5]===void 0?1:parseFloat(C[5]))),g.toColor(a,u,m,d);if(!S||!E)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=E,S.fillStyle=k,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[a,u,m,d]=S.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(a,u,m,d),css:k}}}(w||(i.css=w={})),function(f){function S(E,k,C){const b=E/255,R=k/255,T=C/255;return .2126*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))}f.relativeLuminance=function(E){return S(E>>16&255,E>>8&255,255&E)},f.relativeLuminance2=S}(v||(i.rgb=v={})),function(f){function S(k,C,b){const R=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(v.relativeLuminance2(j,N,F),v.relativeLuminance2(R,T,M));for(;V<b&&(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(v.relativeLuminance2(j,N,F),v.relativeLuminance2(R,T,M));return(j<<24|N<<16|F<<8|255)>>>0}function E(k,C,b){const R=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(v.relativeLuminance2(j,N,F),v.relativeLuminance2(R,T,M));for(;V<b&&(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(v.relativeLuminance2(j,N,F),v.relativeLuminance2(R,T,M));return(j<<24|N<<16|F<<8|255)>>>0}f.blend=function(k,C){if(d=(255&C)/255,d===1)return C;const b=C>>24&255,R=C>>16&255,T=C>>8&255,M=k>>24&255,j=k>>16&255,N=k>>8&255;return a=M+Math.round((b-M)*d),u=j+Math.round((R-j)*d),m=N+Math.round((T-N)*d),g.toRgba(a,u,m)},f.ensureContrastRatio=function(k,C,b){const R=v.relativeLuminance(k>>8),T=v.relativeLuminance(C>>8);if(l(R,T)<b){if(T<R){const N=S(k,C,b),F=l(R,v.relativeLuminance(N>>8));if(F<b){const V=E(k,C,b);return F>l(R,v.relativeLuminance(V>>8))?N:V}return N}const M=E(k,C,b),j=l(R,v.relativeLuminance(M>>8));if(j<b){const N=S(k,C,b);return j>l(R,v.relativeLuminance(N>>8))?M:N}return M}},f.reduceLuminance=S,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 u=a(844),m=a(2585),d=a(4348),g=a(7866),_=a(744),w=a(7302),v=a(6975),p=a(8460),h=a(1753),l=a(1480),f=a(7994),S=a(9282),E=a(5435),k=a(5981),C=a(2660);let b=!1;class R extends u.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 u.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 d.InstantiationService,this.optionsService=this.register(new w.OptionsService(M)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(_.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(v.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&&!b&&(this._logService.warn("writeSync is unreliable and will be removed soon."),b=!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,_.MINIMUM_COLS),j=Math.max(j,_.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(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),M.push(this.registerCsiHandler({final:"H"},()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)(()=>{for(const j of M)j.dispose()})}}}i.CoreTerminal=R},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 u=0;u<this._listeners.length;u++)if(this._listeners[u]===a)return void this._listeners.splice(u,1)}}})),this._event}fire(a,u){const m=[];for(let d=0;d<this._listeners.length;d++)m.push(this._listeners[d]);for(let d=0;d<m.length;d++)m[d].call(void 0,a,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},i.forwardEvent=function(a,u){return a(m=>u.fire(m))},i.runAndSubscribe=function(a,u){return u(void 0),a(m=>u(m))}},5435:function(c,i,a){var u=this&&this.__decorate||function(B,P,L,I){var D,W=arguments.length,$=W<3?P:I===null?I=Object.getOwnPropertyDescriptor(P,L):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(B,P,L,I);else for(var U=B.length-1;U>=0;U--)(D=B[U])&&($=(W<3?D($):W>3?D(P,L,$):D(P,L))||$);return W>3&&$&&Object.defineProperty(P,L,$),$},m=this&&this.__param||function(B,P){return function(L,I){P(L,I,B)}};Object.defineProperty(i,"__esModule",{value:!0}),i.InputHandler=i.WindowsOptionsReportType=void 0;const d=a(2584),g=a(7116),_=a(2015),w=a(844),v=a(482),p=a(8437),h=a(8460),l=a(643),f=a(511),S=a(3734),E=a(2585),k=a(1480),C=a(6242),b=a(6351),R=a(5941),T={"(":0,")":1,"*":2,"+":3,"-":1,".":2},M=131072;function j(B,P){if(B>24)return P.setWinLines||!1;switch(B){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.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 w.Disposable{getAttrData(){return this._curAttrData}constructor(P,L,I,D,W,$,U,G,O=new _.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=L,this._coreService=I,this._logService=D,this._optionsService=W,this._oscLinkService=$,this._coreMouseService=U,this._unicodeService=G,this._parser=O,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new v.StringToUtf32,this._utf8Decoder=new v.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,H)=>{this._logService.debug("Unknown OSC code: ",{identifier:A,action:z,data:H})}),this._parser.setDcsHandlerFallback((A,z,H)=>{z==="HOOK"&&(H=H.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(A),action:z,payload:H})}),this._parser.setPrintHandler((A,z,H)=>this.print(A,z,H)),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(d.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(d.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(d.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(d.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(d.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(d.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(d.C1.IND,()=>this.index()),this._parser.setExecuteHandler(d.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(d.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 g.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 b.DcsHandler((A,z)=>this.requestStatusString(A,z)))}_preserveStack(P,L,I,D){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=I,this._parseStack.position=D}_logSlowResolvingAsync(P){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([P,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(P,L){let I,D=this._activeBuffer.x,W=this._activeBuffer.y,$=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,P.length>M&&($=this._parseStack.position+M)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,A=>String.fromCharCode(A)).join("")}"`),typeof P=="string"?P.split("").map(A=>A.charCodeAt(0)):P),this._parseBuffer.length<P.length&&this._parseBuffer.length<M&&(this._parseBuffer=new Uint32Array(Math.min(P.length,M))),U||this._dirtyRowTracker.clearRange(),P.length>M)for(let A=$;A<P.length;A+=M){const z=A+M<P.length?A+M:P.length,H=typeof P=="string"?this._stringDecoder.decode(P.substring(A,z),this._parseBuffer):this._utf8Decoder.decode(P.subarray(A,z),this._parseBuffer);if(I=this._parser.parse(this._parseBuffer,H))return this._preserveStack(D,W,H,A),this._logSlowResolvingAsync(I),I}else if(!U){const A=typeof P=="string"?this._stringDecoder.decode(P,this._parseBuffer):this._utf8Decoder.decode(P,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(P,L,I){let D,W;const $=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 H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&I-L>0&&H.getWidth(this._activeBuffer.x-1)===2&&H.setCellFromCodepoint(this._activeBuffer.x-1,0,1,z);let Y=this._parser.precedingJoinState;for(let X=L;X<I;++X){if(D=P[X],D<127&&$){const Ce=$[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,v.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=H;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),H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),he>0&&H instanceof p.BufferLine&&H.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=H.getWidth(this._activeBuffer.x-1)?1:2;H.addCodepointToCell(this._activeBuffer.x-Ce,D,W);for(let se=W-he;--se>=0;)H.setCellFromCodepoint(this._activeBuffer.x++,0,0,z)}else if(A&&(H.insertCells(this._activeBuffer.x,W-he,this._activeBuffer.getNullCell(z)),H.getWidth(G-1)===2&&H.setCellFromCodepoint(G-1,l.NULL_CELL_CODE,l.NULL_CELL_WIDTH,z)),H.setCellFromCodepoint(this._activeBuffer.x++,D,W,z),W>0)for(;--W;)H.setCellFromCodepoint(this._activeBuffer.x++,0,0,z)}this._parser.precedingJoinState=Y,this._activeBuffer.x<G&&I-L>0&&H.getWidth(this._activeBuffer.x)===0&&!H.hasContent(this._activeBuffer.x)&&H.setCellFromCodepoint(this._activeBuffer.x,0,1,z),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,L){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,L):this._parser.registerCsiHandler(P,I=>!j(I.params[0],this._optionsService.rawOptions.windowOptions)||L(I))}registerDcsHandler(P,L){return this._parser.registerDcsHandler(P,new b.DcsHandler(L))}registerEscHandler(P,L){return this._parser.registerEscHandler(P,L)}registerOscHandler(P,L){return this._parser.registerOscHandler(P,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 P;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&&((P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&P.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 P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,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(P,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=P,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+L)}cursorUp(P){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){const L=P.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const L=P.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,L,I,D=!1,W=!1){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);$.replaceCells(L,I,this._activeBuffer.getNullCell(this._eraseAttrData()),W),D&&($.isWrapped=!1)}_resetBufferLine(P,L=!1){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);I&&(I.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),I.isWrapped=!1)}eraseInDisplay(P,L=!1){let I;switch(this._restrictCursor(this._bufferService.cols),P.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(P,L=!1){switch(this._restrictCursor(this._bufferService.cols),P.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(P){this._restrictCursor();let L=P.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(P){this._restrictCursor();let L=P.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(P){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(P){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(P){let L=P.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(P){let L=P.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(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=P.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(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=P.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(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=P.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(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=P.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(P){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(P.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(P){const L=this._parser.precedingJoinState;if(!L)return!0;const I=P.params[0]||1,D=k.UnicodeService.extractWidth(L),W=this._activeBuffer.x-D,$=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(W),U=new Uint32Array($.length*I);let G=0;for(let A=0;A<$.length;){const z=$.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(P){return P.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let L=0;L<P.length;L++)switch(P.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(P){for(let L=0;L<P.length;L++)switch(P.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.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(P){for(let L=0;L<P.length;L++)switch(P.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(P){for(let L=0;L<P.length;L++)switch(P.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(),P.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(P,L){const I=this._coreService.decPrivateModes,{activeProtocol:D,activeEncoding:W}=this._coreMouseService,$=this._coreService,{buffers:U,cols:G}=this._bufferService,{active:O,alt:A}=U,z=this._optionsService.rawOptions,H=oe=>oe?1:2,Y=P.params[0];return X=Y,ne=L?Y===2?4:Y===4?H($.modes.insertMode):Y===12?3:Y===20?H(z.convertEol):0:Y===1?H(I.applicationCursorKeys):Y===3?z.windowOptions.setWinLines?G===80?2:G===132?1:0:0:Y===6?H(I.origin):Y===7?H(I.wraparound):Y===8?3:Y===9?H(D==="X10"):Y===12?H(z.cursorBlink):Y===25?H(!$.isCursorHidden):Y===45?H(I.reverseWraparound):Y===66?H(I.applicationKeypad):Y===67?4:Y===1e3?H(D==="VT200"):Y===1002?H(D==="DRAG"):Y===1003?H(D==="ANY"):Y===1004?H(I.sendFocus):Y===1005?4:Y===1006?H(W==="SGR"):Y===1015?4:Y===1016?H(W==="SGR_PIXELS"):Y===1048?1:Y===47||Y===1047||Y===1049?H(O===A):Y===2004?H(I.bracketedPasteMode):0,$.triggerDataEvent(`${d.C0.ESC}[${L?"":"?"}${X};${ne}$y`),!0;var X,ne}_updateAttrColor(P,L,I,D,W){return L===2?(P|=50331648,P&=-16777216,P|=S.AttributeData.fromColorRGB([I,D,W])):L===5&&(P&=-50331904,P|=33554432|255&I),P}_extractColor(P,L,I){const D=[0,0,-1,0,0,0];let W=0,$=0;do{if(D[$+W]=P.params[L+$],P.hasSubParams(L+$)){const U=P.getSubParams(L+$);let G=0;do D[1]===5&&(W=1),D[$+G+1+W]=U[G];while(++G<U.length&&G+$+1+W<D.length);break}if(D[1]===5&&$+W>=2||D[1]===2&&$+W>=5)break;D[1]&&(W=1)}while(++$+L<P.length&&$+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 $}_processUnderline(P,L){L.extended=L.extended.clone(),(!~P||P>5)&&(P=1),L.extended.underlineStyle=P,L.fg|=268435456,P===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(P){P.fg=p.DEFAULT_ATTR_DATA.fg,P.bg=p.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=P.length;let I;const D=this._curAttrData;for(let W=0;W<L;W++)I=P.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(P.hasSubParams(W)?P.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(P,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(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,I=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${L};${I}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const L=this._activeBuffer.y+1,I=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${L};${I}R`)}return!0}softReset(P){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(P){const L=P.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(P){const L=P.params[0]||1;let I;return(P.length<2||(I=P.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(P){if(!j(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=P.length>1?P.params[1]:0;switch(P.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(`${d.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(P){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(P){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(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){const L=[],I=P.split(";");for(;I.length>1;){const D=I.shift(),W=I.shift();if(/^\d+$/.exec(D)){const $=parseInt(D);if(q($))if(W==="?")L.push({type:0,index:$});else{const U=(0,R.parseColor)(W);U&&L.push({type:1,index:$,color:U})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(P){const L=P.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(P,L){this._getCurrentLinkId()&&this._finishHyperlink();const I=P.split(":");let D;const W=I.findIndex($=>$.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(P,L){const I=P.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,R.parseColor)(I[D]);W&&this._onColor.fire([{type:1,index:this._specialColors[L],color:W}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;const L=[],I=P.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(P){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(P){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(P){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,g.DEFAULT_CHARSET),!0}selectCharset(P){return P.length!==2?(this.selectDefaultCharset(),!0):(P[0]==="/"||this._charsetService.setgCharset(T[P[0]],g.CHARSETS[P[1]]||g.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 P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,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(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){const P=new f.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.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(P),D.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(P,L){const I=this._bufferService.buffer,D=this._optionsService.rawOptions;return(W=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${W}${d.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${I.scrollTop+1};${I.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[D.cursorStyle]-(D.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,L){this._dirtyRowTracker.markRangeDirty(P,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,P){B>P&&(F=B,B=P,P=F),B<this.start&&(this.start=B),P>this.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function q(B){return 0<=B&&B<256}K=u([m(0,E.IBufferService)],K)},844:(c,i)=>{function a(u){for(const m of u)m.dispose();u.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 u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const m=this._disposables.indexOf(u);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(u){var m;this._isDisposed||u===this._value||((m=this._value)==null||m.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},i.toDisposable=function(u){return{dispose:u}},i.disposeArray=a,i.getDisposeArrayDisposable=function(u){return{dispose:()=>a(u)}}},1505:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(m,d,g){this._data[m]||(this._data[m]={}),this._data[m][d]=g}get(m,d){return this._data[m]?this._data[m][d]:void 0}clear(){this._data={}}}i.TwoKeyMap=a,i.FourKeyMap=class{constructor(){this._data=new a}set(u,m,d,g,_){this._data.get(u,m)||this._data.set(u,m,new a),this._data.get(u,m).set(d,g,_)}get(u,m,d,g){var _;return(_=this._data.get(u,m))==null?void 0:_.get(d,g)}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,u=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(u),i.isIpad=u==="iPad",i.isIphone=u==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),i.isLinux=u.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(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(a=this._search(this._getKey(u)),this._array.splice(a,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const m=this._getKey(u);if(m===void 0||(a=this._search(m),a===-1)||this._getKey(this._array[a])!==m)return!1;do if(this._array[a]===u)return this._array.splice(a,1),!0;while(++a<this._array.length&&this._getKey(this._array[a])===m);return!1}*getKeyIterator(u){if(this._array.length!==0&&(a=this._search(u),!(a<0||a>=this._array.length)&&this._getKey(this._array[a])===u))do yield this._array[a];while(++a<this._array.length&&this._getKey(this._array[a])===u)}forEachByKey(u,m){if(this._array.length!==0&&(a=this._search(u),!(a<0||a>=this._array.length)&&this._getKey(this._array[a])===u))do m(this._array[a]);while(++a<this._array.length&&this._getKey(this._array[a])===u)}values(){return[...this._array].values()}_search(u){let m=0,d=this._array.length-1;for(;d>=m;){let g=m+d>>1;const _=this._getKey(this._array[g]);if(_>u)d=g-1;else{if(!(_<u)){for(;g>0&&this._getKey(this._array[g-1])===u;)g--;return g}m=g+1}}return m}}},7226:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;const u=a(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(_){this._tasks.push(_),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(_){this._idleCallback=void 0;let w=0,v=0,p=_.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),v=Math.max(w,v),h=_.timeRemaining(),1.5*v>h)return p-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(p-w))}ms`),void this._start();p=h}this.clear()}}class d extends m{_requestCallback(_){return setTimeout(()=>_(this._createDeadline(16)))}_cancelCallback(_){clearTimeout(_)}_createDeadline(_){const w=Date.now()+_;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}i.PriorityTaskQueue=d,i.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:d,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;const u=a(643);i.updateWindowsModeWrappedState=function(m){const d=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),g=d==null?void 0:d.get(m.cols-1),_=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);_&&g&&(_.isWrapped=g[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&g[u.CHAR_DATA_CODE_INDEX]!==u.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 u}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new a;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}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 u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}get underlineVariantOffset(){const d=(3758096384&this._ext)>>29;return d<0?4294967288^d:d}set underlineVariantOffset(d){this._ext&=536870911,this._ext|=d<<29&3758096384}constructor(d=0,g=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=g}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=u},9092:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Buffer=i.MAX_BUFFER_SIZE=void 0;const u=a(6349),m=a(7226),d=a(3734),g=a(8437),_=a(4634),w=a(511),v=a(643),p=a(4863),h=a(7116);i.MAX_BUFFER_SIZE=4294967295,i.Buffer=class{constructor(l,f,S){this._hasScrollback=l,this._optionsService=f,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.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 u.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 d.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 d.ExtendedAttrs),this._whitespaceCell}getBlankLine(l,f){return new g.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=g.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 u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(l,f){const S=this.getNullCell(g.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 b=0;b<this.lines.length;b++)E+=+this.lines.get(b).resize(l,S);let C=0;if(this._rows<f)for(let b=this._rows;b<f;b++)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 g.BufferLine(l,S)):this.ybase>0&&this.lines.length<=this.ybase+this.y+C+1?(this.ybase--,C++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(l,S)));else for(let b=this._rows;b>f;b--)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 b=this.lines.length-k;b>0&&(this.lines.trimStart(b),this.ybase=Math.max(this.ybase-b,0),this.ydisp=Math.max(this.ydisp-b,0),this.savedY=Math.max(this.savedY-b,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,S);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 S=(0,_.reflowLargerGetLinesToRemove)(this.lines,this._cols,l,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(S.length>0){const E=(0,_.reflowLargerCreateNewLayout)(this.lines,S);(0,_.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(l,f,E.countRemoved)}}_reflowLargerAdjustViewport(l,f,S){const E=this.getNullCell(g.DEFAULT_ATTR_DATA);let k=S;for(;k-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<f&&this.lines.push(new g.BufferLine(l,E))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-S,0)}_reflowSmaller(l,f){const S=this.getNullCell(g.DEFAULT_ATTR_DATA),E=[];let k=0;for(let C=this.lines.length-1;C>=0;C--){let b=this.lines.get(C);if(!b||!b.isWrapped&&b.getTrimmedLength()<=l)continue;const R=[b];for(;b.isWrapped&&C>0;)b=this.lines.get(--C),R.unshift(b);const T=this.ybase+this.y;if(T>=C&&T<C+R.length)continue;const M=R[R.length-1].getTrimmedLength(),j=(0,_.reflowSmallerGetNewLineLengths)(R,this._cols,l),N=j.length-R.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(g.DEFAULT_ATTR_DATA,!0);V.push(D)}V.length>0&&(E.push({start:C+R.length+k,newLines:V}),k+=V.length),R.push(...V);let K=j.length-1,q=j[K];q===0&&(K--,q=j[K]);let B=R.length-N-1,P=M;for(;B>=0;){const I=Math.min(P,q);if(R[K]===void 0)break;if(R[K].copyCellsFrom(R[B],P-I,q-I,I,!0),q-=I,q===0&&(K--,q=j[K]),P-=I,P===0){B--;const D=Math.max(B,0);P=(0,_.getWrappedLineTrimmedLength)(R,D,this._cols)}}for(let I=0;I<R.length;I++)j[I]<l&&R[I].setCell(j[I],S);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=[],b=[];for(let K=0;K<this.lines.length;K++)b.push(this.lines.get(K));const R=this.lines.length;let T=R-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,R+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,b[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,R+k-this.lines.maxLength);V>0&&this.lines.onTrimEmitter.fire(V)}}translateBufferLineToString(l,f,S=0,E){const k=this.lines.get(l);return k?k.translateToString(f,S,E):""}getWrappedRangeForLine(l){let f=l,S=l;for(;f>0&&this.lines.get(f).isWrapped;)f--;for(;S+1<this.lines.length&&this.lines.get(S+1).isWrapped;)S++;return{first:f,last:S}}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(S=>{f.line-=S,f.line<0&&f.dispose()})),f.register(this.lines.onInsert(S=>{f.line>=S.index&&(f.line+=S.amount)})),f.register(this.lines.onDelete(S=>{f.line>=S.index&&f.line<S.index+S.amount&&f.dispose(),f.line>S.index&&(f.line-=S.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 u=a(3734),m=a(511),d=a(643),g=a(482);i.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let _=0;class w{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,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let S=0;S<p;++S)this.setCell(S,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,g.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[d.CHAR_DATA_ATTR_INDEX],h[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[p]=h[1],this._data[3*p+0]=2097152|p|h[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*p+0]=h[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[d.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,g.stringFromCodePoint)(2097151&h):""}isProtected(p){return 536870912&this._data[3*p+2]}loadCell(p,h){return _=3*p,h.content=this._data[_+0],h.fg=this._data[_+1],h.bg=this._data[_+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,g.stringFromCodePoint)(h):2097151&f?(this._combined[p]=(0,g.stringFromCodePoint)(2097151&f)+(0,g.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 S=this.length-p-h-1;S>=0;--S)this.setCell(p+h+S,this.loadCell(p+S,f));for(let S=0;S<h;++S)this.setCell(p+S,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 S=0;S<this.length-p-h;++S)this.setCell(p+S,this.loadCell(p+h+S,f));for(let S=this.length-h;S<this.length;++S)this.setCell(S,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 S=Object.keys(this._extendedAttrs);for(let E=0;E<S.length;E++){const k=parseInt(S[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 w(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,S){const E=p._data;if(S)for(let C=f-1;C>=0;C--){for(let b=0;b<3;b++)this._data[3*(l+C)+b]=E[3*(h+C)+b];268435456&E[3*(h+C)+2]&&(this._extendedAttrs[l+C]=p._extendedAttrs[h+C])}else for(let C=0;C<f;C++){for(let b=0;b<3;b++)this._data[3*(l+C)+b]=E[3*(h+C)+b];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 b=parseInt(k[C],10);b>=h&&(this._combined[b-h+l]=p._combined[b])}}translateToString(p,h,l,f){h=h??0,l=l??this.length,p&&(l=Math.min(l,this.getTrimmedLength())),f&&(f.length=0);let S="";for(;h<l;){const E=this._data[3*h+0],k=2097151&E,C=2097152&E?this._combined[h]:k?(0,g.stringFromCodePoint)(k):d.WHITESPACE_CELL_CHAR;if(S+=C,f)for(let b=0;b<C.length;++b)f.push(h);h+=E>>22||1}return f&&f.push(h),S}}i.BufferLine=w},4841:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(a,u){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 u*(a.end.y-a.start.y)+(a.end.x-a.start.x+1)}},4634:(c,i)=>{function a(u,m,d){if(m===u.length-1)return u[m].getTrimmedLength();const g=!u[m].hasContent(d-1)&&u[m].getWidth(d-1)===1,_=u[m+1].getWidth(0)===2;return g&&_?d-1:d}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(u,m,d,g,_){const w=[];for(let v=0;v<u.length-1;v++){let p=v,h=u.get(++p);if(!h.isWrapped)continue;const l=[u.get(v)];for(;p<u.length&&h.isWrapped;)l.push(h),h=u.get(++p);if(g>=v&&g<p){v+=l.length-1;continue}let f=0,S=a(l,f,m),E=1,k=0;for(;E<l.length;){const b=a(l,E,m),R=b-k,T=d-S,M=Math.min(R,T);l[f].copyCellsFrom(l[E],k,S,M,!1),S+=M,S===d&&(f++,S=0),k+=M,k===b&&(E++,k=0),S===0&&f!==0&&l[f-1].getWidth(d-1)===2&&(l[f].copyCellsFrom(l[f-1],d-1,S++,1,!1),l[f-1].setCell(d-1,_))}l[f].replaceCells(S,d,_);let C=0;for(let b=l.length-1;b>0&&(b>f||l[b].getTrimmedLength()===0);b--)C++;C>0&&(w.push(v+l.length-C),w.push(C)),v+=l.length-1}return w},i.reflowLargerCreateNewLayout=function(u,m){const d=[];let g=0,_=m[g],w=0;for(let v=0;v<u.length;v++)if(_===v){const p=m[++g];u.onDeleteEmitter.fire({index:v-w,amount:p}),v+=p-1,w+=p,_=m[++g]}else d.push(v);return{layout:d,countRemoved:w}},i.reflowLargerApplyNewLayout=function(u,m){const d=[];for(let g=0;g<m.length;g++)d.push(u.get(m[g]));for(let g=0;g<d.length;g++)u.set(g,d[g]);u.length=m.length},i.reflowSmallerGetNewLineLengths=function(u,m,d){const g=[],_=u.map((h,l)=>a(u,l,m)).reduce((h,l)=>h+l);let w=0,v=0,p=0;for(;p<_;){if(_-p<d){g.push(_-p);break}w+=d;const h=a(u,v,m);w>h&&(w-=h,v++);const l=u[v].getWidth(w-1)===2;l&&w--;const f=l?d-1:d;g.push(f),p+=f}return g},i.getWrappedLineTrimmedLength=a},5295:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;const u=a(8460),m=a(844),d=a(9092);class g extends m.Disposable{constructor(w,v){super(),this._optionsService=w,this._bufferService=v,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.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(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),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(w,v){this._normal.resize(w,v),this._alt.resize(w,v),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}i.BufferSet=g},511:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;const u=a(482),m=a(643),d=a(3734);class g extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const v=new g;return v.setFromCharData(w),v}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(w[m.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(w[m.CHAR_DATA_CHAR_INDEX].length===2){const p=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=p&&p<=56319){const h=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(p-55296)+h-56320+65536|w[m.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[m.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=w[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=g},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 u=a(8460),m=a(844);class d{get id(){return this._id}constructor(_){this.line=_,this.isDisposed=!1,this._disposables=[],this._id=d._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(_){return this._disposables.push(_),_}}i.Marker=d,d._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,u,m;Object.defineProperty(i,"__esModule",{value:!0}),i.C1_ESCAPED=i.C1=i.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
278
- `,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(a||(i.C0=a={})),function(d){d.PAD="€",d.HOP="",d.BPH="‚",d.NBH="ƒ",d.IND="„",d.NEL="…",d.SSA="†",d.ESA="‡",d.HTS="ˆ",d.HTJ="‰",d.VTS="Š",d.PLD="‹",d.PLU="Œ",d.RI="",d.SS2="Ž",d.SS3="",d.DCS="",d.PU1="‘",d.PU2="’",d.STS="“",d.CCH="”",d.MW="•",d.SPA="–",d.EPA="—",d.SOS="˜",d.SGCI="™",d.SCI="š",d.CSI="›",d.ST="œ",d.OSC="",d.PM="ž",d.APC="Ÿ"}(u||(i.C1=u={})),function(d){d.ST=`${a.ESC}\\`}(m||(i.C1_ESCAPED=m={}))},7399:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;const u=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(d,g,_,w){const v={type:0,cancel:!1,key:void 0},p=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?v.key=g?u.C0.ESC+"OA":u.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?v.key=g?u.C0.ESC+"OD":u.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?v.key=g?u.C0.ESC+"OC":u.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(v.key=g?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:v.key=d.ctrlKey?"\b":u.C0.DEL,d.altKey&&(v.key=u.C0.ESC+v.key);break;case 9:if(d.shiftKey){v.key=u.C0.ESC+"[Z";break}v.key=u.C0.HT,v.cancel=!0;break;case 13:v.key=d.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,v.cancel=!0;break;case 27:v.key=u.C0.ESC,d.altKey&&(v.key=u.C0.ESC+u.C0.ESC),v.cancel=!0;break;case 37:if(d.metaKey)break;p?(v.key=u.C0.ESC+"[1;"+(p+1)+"D",v.key===u.C0.ESC+"[1;3D"&&(v.key=u.C0.ESC+(_?"b":"[1;5D"))):v.key=g?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(d.metaKey)break;p?(v.key=u.C0.ESC+"[1;"+(p+1)+"C",v.key===u.C0.ESC+"[1;3C"&&(v.key=u.C0.ESC+(_?"f":"[1;5C"))):v.key=g?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(d.metaKey)break;p?(v.key=u.C0.ESC+"[1;"+(p+1)+"A",_||v.key!==u.C0.ESC+"[1;3A"||(v.key=u.C0.ESC+"[1;5A")):v.key=g?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(d.metaKey)break;p?(v.key=u.C0.ESC+"[1;"+(p+1)+"B",_||v.key!==u.C0.ESC+"[1;3B"||(v.key=u.C0.ESC+"[1;5B")):v.key=g?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(v.key=u.C0.ESC+"[2~");break;case 46:v.key=p?u.C0.ESC+"[3;"+(p+1)+"~":u.C0.ESC+"[3~";break;case 36:v.key=p?u.C0.ESC+"[1;"+(p+1)+"H":g?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:v.key=p?u.C0.ESC+"[1;"+(p+1)+"F":g?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:d.shiftKey?v.type=2:d.ctrlKey?v.key=u.C0.ESC+"[5;"+(p+1)+"~":v.key=u.C0.ESC+"[5~";break;case 34:d.shiftKey?v.type=3:d.ctrlKey?v.key=u.C0.ESC+"[6;"+(p+1)+"~":v.key=u.C0.ESC+"[6~";break;case 112:v.key=p?u.C0.ESC+"[1;"+(p+1)+"P":u.C0.ESC+"OP";break;case 113:v.key=p?u.C0.ESC+"[1;"+(p+1)+"Q":u.C0.ESC+"OQ";break;case 114:v.key=p?u.C0.ESC+"[1;"+(p+1)+"R":u.C0.ESC+"OR";break;case 115:v.key=p?u.C0.ESC+"[1;"+(p+1)+"S":u.C0.ESC+"OS";break;case 116:v.key=p?u.C0.ESC+"[15;"+(p+1)+"~":u.C0.ESC+"[15~";break;case 117:v.key=p?u.C0.ESC+"[17;"+(p+1)+"~":u.C0.ESC+"[17~";break;case 118:v.key=p?u.C0.ESC+"[18;"+(p+1)+"~":u.C0.ESC+"[18~";break;case 119:v.key=p?u.C0.ESC+"[19;"+(p+1)+"~":u.C0.ESC+"[19~";break;case 120:v.key=p?u.C0.ESC+"[20;"+(p+1)+"~":u.C0.ESC+"[20~";break;case 121:v.key=p?u.C0.ESC+"[21;"+(p+1)+"~":u.C0.ESC+"[21~";break;case 122:v.key=p?u.C0.ESC+"[23;"+(p+1)+"~":u.C0.ESC+"[23~";break;case 123:v.key=p?u.C0.ESC+"[24;"+(p+1)+"~":u.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(_&&!w||!d.altKey||d.metaKey)!_||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?v.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(v.key=u.C0.US),d.key==="@"&&(v.key=u.C0.NUL)):d.keyCode===65&&(v.type=1);else{const h=m[d.keyCode],l=h==null?void 0:h[d.shiftKey?1:0];if(l)v.key=u.C0.ESC+l;else if(d.keyCode>=65&&d.keyCode<=90){const f=d.ctrlKey?d.keyCode-64:d.keyCode+32;let S=String.fromCharCode(f);d.shiftKey&&(S=S.toUpperCase()),v.key=u.C0.ESC+S}else if(d.keyCode===32)v.key=u.C0.ESC+(d.ctrlKey?u.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let f=d.code.slice(3,4);d.shiftKey||(f=f.toLowerCase()),v.key=u.C0.ESC+f,v.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?v.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?v.key=u.C0.NUL:d.keyCode>=51&&d.keyCode<=55?v.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?v.key=u.C0.DEL:d.keyCode===219?v.key=u.C0.ESC:d.keyCode===220?v.key=u.C0.FS:d.keyCode===221&&(v.key=u.C0.GS)}return v}},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,u=0,m=a.length){let d="";for(let g=u;g<m;++g){let _=a[g];_>65535?(_-=65536,d+=String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):d+=String.fromCharCode(_)}return d},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,u){const m=a.length;if(!m)return 0;let d=0,g=0;if(this._interim){const _=a.charCodeAt(g++);56320<=_&&_<=57343?u[d++]=1024*(this._interim-55296)+_-56320+65536:(u[d++]=this._interim,u[d++]=_),this._interim=0}for(let _=g;_<m;++_){const w=a.charCodeAt(_);if(55296<=w&&w<=56319){if(++_>=m)return this._interim=w,d;const v=a.charCodeAt(_);56320<=v&&v<=57343?u[d++]=1024*(w-55296)+v-56320+65536:(u[d++]=w,u[d++]=v)}else w!==65279&&(u[d++]=w)}return d}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,u){const m=a.length;if(!m)return 0;let d,g,_,w,v=0,p=0,h=0;if(this.interim[0]){let S=!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 b=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=b-C;for(;h<R;){if(h>=m)return 0;if(k=a[h++],(192&k)!=128){h--,S=!0;break}this.interim[C++]=k,E<<=6,E|=63&k}S||(b===2?E<128?h--:u[v++]=E:b===3?E<2048||E>=55296&&E<=57343||E===65279||(u[v++]=E):E<65536||E>1114111||(u[v++]=E)),this.interim.fill(0)}const l=m-4;let f=h;for(;f<m;){for(;!(!(f<l)||128&(d=a[f])||128&(g=a[f+1])||128&(_=a[f+2])||128&(w=a[f+3]));)u[v++]=d,u[v++]=g,u[v++]=_,u[v++]=w,f+=4;if(d=a[f++],d<128)u[v++]=d;else if((224&d)==192){if(f>=m)return this.interim[0]=d,v;if(g=a[f++],(192&g)!=128){f--;continue}if(p=(31&d)<<6|63&g,p<128){f--;continue}u[v++]=p}else if((240&d)==224){if(f>=m)return this.interim[0]=d,v;if(g=a[f++],(192&g)!=128){f--;continue}if(f>=m)return this.interim[0]=d,this.interim[1]=g,v;if(_=a[f++],(192&_)!=128){f--;continue}if(p=(15&d)<<12|(63&g)<<6|63&_,p<2048||p>=55296&&p<=57343||p===65279)continue;u[v++]=p}else if((248&d)==240){if(f>=m)return this.interim[0]=d,v;if(g=a[f++],(192&g)!=128){f--;continue}if(f>=m)return this.interim[0]=d,this.interim[1]=g,v;if(_=a[f++],(192&_)!=128){f--;continue}if(f>=m)return this.interim[0]=d,this.interim[1]=g,this.interim[2]=_,v;if(w=a[f++],(192&w)!=128){f--;continue}if(p=(7&d)<<18|(63&g)<<12|(63&_)<<6|63&w,p<65536||p>1114111)continue;u[v++]=p}}return v}}},225:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const u=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]],d=[[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 g;i.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let _=0;_<m.length;++_)g.fill(0,m[_][0],m[_][1]+1)}}wcwidth(_){return _<32?0:_<127?1:_<65536?g[_]:function(w,v){let p,h=0,l=v.length-1;if(w<v[0][0]||w>v[l][1])return!1;for(;l>=h;)if(p=h+l>>1,w>v[p][1])h=p+1;else{if(!(w<v[p][0]))return!0;l=p-1}return!1}(_,d)?0:_>=131072&&_<=196605||_>=196608&&_<=262141?2:1}charProperties(_,w){let v=this.wcwidth(_),p=v===0&&w!==0;if(p){const h=u.UnicodeService.extractWidth(w);h===0?p=!1:h>v&&(v=h)}return u.UnicodeService.createPropertyValue(0,v,p)}}},5981:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;const u=a(8460),m=a(844);class d extends m.Disposable{constructor(_){super(),this._action=_,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(_,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let v;for(this._isSyncWriting=!0;v=this._writeBuffer.shift();){this._action(v);const p=this._callbacks.shift();p&&p()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(_,w){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+=_.length,this._writeBuffer.push(_),this._callbacks.push(w),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(w)}_innerWrite(_=0,w=!0){const v=_||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const p=this._writeBuffer[this._bufferOffset],h=this._action(p,w);if(h){const f=S=>Date.now()-v>=12?setTimeout(()=>this._innerWrite(0,S)):this._innerWrite(v,S);return void h.catch(S=>(queueMicrotask(()=>{throw S}),Promise.resolve(!1))).then(f)}const l=this._callbacks[this._bufferOffset];if(l&&l(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-v>=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=d},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})$/,u=/^[\da-f]+$/;function m(d,g){const _=d.toString(16),w=_.length<2?"0"+_:_;switch(g){case 4:return _[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}i.parseColor=function(d){if(!d)return;let g=d.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const _=a.exec(g);if(_){const w=_[1]?15:_[4]?255:_[7]?4095:65535;return[Math.round(parseInt(_[1]||_[4]||_[7]||_[10],16)/w*255),Math.round(parseInt(_[2]||_[5]||_[8]||_[11],16)/w*255),Math.round(parseInt(_[3]||_[6]||_[9]||_[12],16)/w*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),u.exec(g)&&[3,6,9,12].includes(g.length))){const _=g.length/3,w=[0,0,0];for(let v=0;v<3;++v){const p=parseInt(g.slice(_*v,_*v+_),16);w[v]=_===1?p<<4:_===2?p:_===3?p>>4:p>>8}return w}},i.toRgbString=function(d,g=16){const[_,w,v]=d;return`rgb:${m(_,g)}/${m(w,g)}/${m(v,g)}`}},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 u=a(482),m=a(8742),d=a(5770),g=[];i.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(w,v){this._handlers[w]===void 0&&(this._handlers[w]=[]);const p=this._handlers[w];return p.push(v),{dispose:()=>{const h=p.indexOf(v);h!==-1&&p.splice(h,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(w,v){if(this.reset(),this._ident=w,this._active=this._handlers[w]||g,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].hook(v);else this._handlerFb(this._ident,"HOOK",v)}put(w,v,p){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(w,v,p);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(w,v,p))}unhook(w,v=!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=v,l=this._stack.fallThrough,this._stack.paused=!1),!l&&p===!1){for(;h>=0&&(p=this._active[h].unhook(w),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",w);this._active=g,this._ident=0}};const _=new m.Params;_.addParam(0),i.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=_,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():_,this._data="",this._hitLimit=!1}put(w,v,p){this._hitLimit||(this._data+=(0,u.utf32ToString)(w,v,p),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let v=!1;if(this._hitLimit)v=!1;else if(w&&(v=this._handler(this._data,this._params),v instanceof Promise))return v.then(p=>(this._params=_,this._data="",this._hitLimit=!1,p));return this._params=_,this._data="",this._hitLimit=!1,v}}},2015:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;const u=a(844),m=a(8742),d=a(6242),g=a(6351);class _{constructor(h){this.table=new Uint8Array(h)}setDefault(h,l){this.table.fill(h<<4|l)}add(h,l,f,S){this.table[l<<8|h]=f<<4|S}addMany(h,l,f,S){for(let E=0;E<h.length;E++)this.table[l<<8|h[E]]=f<<4|S}}i.TransitionTable=_;const w=160;i.VT500_TRANSITION_TABLE=function(){const p=new _(4095),h=Array.apply(null,Array(256)).map((C,b)=>b),l=(C,b)=>h.slice(C,b),f=l(32,127),S=l(0,24);S.push(25),S.push.apply(S,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(S,0,3,0),p.addMany(S,1,3,1),p.add(127,1,0,1),p.addMany(S,8,0,8),p.addMany(S,3,3,3),p.add(127,3,0,3),p.addMany(S,4,3,4),p.add(127,4,0,4),p.addMany(S,6,3,6),p.addMany(S,5,3,5),p.add(127,5,0,5),p.addMany(S,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(S,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(S,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(S,11,0,11),p.addMany(l(32,128),11,0,11),p.addMany(l(28,32),11,0,11),p.addMany(S,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(S,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(S,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(w,0,2,0),p.add(w,8,5,8),p.add(w,6,0,6),p.add(w,11,0,11),p.add(w,13,13,13),p}();class v extends u.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,S)=>{},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,u.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new d.OscParser),this._dcsParser=this.register(new g.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 S=h.final.charCodeAt(0);if(l[0]>S||S>l[1])throw new Error(`final must be in range ${l[0]} .. ${l[1]}`);return f<<=8,f|=S,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 S=this._escHandlers[f];return S.push(l),{dispose:()=>{const E=S.indexOf(l);E!==-1&&S.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 S=this._csiHandlers[f];return S.push(l),{dispose:()=>{const E=S.indexOf(l);E!==-1&&S.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,S,E){this._parseStack.state=h,this._parseStack.handlers=l,this._parseStack.handlerPos=f,this._parseStack.transition=S,this._parseStack.chunkPos=E}parse(h,l,f){let S,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 b=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(f===!1&&R>-1){for(;R>=0&&(S=b[R](this._params),S!==!0);R--)if(S instanceof Promise)return this._parseStack.handlerPos=R,S}this._parseStack.handlers=[];break;case 4:if(f===!1&&R>-1){for(;R>=0&&(S=b[R](),S!==!0);R--)if(S instanceof Promise)return this._parseStack.handlerPos=R,S}this._parseStack.handlers=[];break;case 6:if(E=h[this._parseStack.chunkPos],S=this._dcsParser.unhook(E!==24&&E!==26,f),S)return S;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],S=this._oscParser.end(E!==24&&E!==26,f),S)return S;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 b=C;b<l;++b){switch(E=h[b],k=this._transitions.table[this.currentState<<8|(E<160?E:w)],k>>4){case 2:for(let N=b+1;;++N){if(N>=l||(E=h[N])<32||E>126&&E<w){this._printHandler(h,b,N),b=N-1;break}if(++N>=l||(E=h[N])<32||E>126&&E<w){this._printHandler(h,b,N),b=N-1;break}if(++N>=l||(E=h[N])<32||E>126&&E<w){this._printHandler(h,b,N),b=N-1;break}if(++N>=l||(E=h[N])<32||E>126&&E<w){this._printHandler(h,b,N),b=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:b,code:E,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|E];let T=R?R.length-1:-1;for(;T>=0&&(S=R[T](this._params),S!==!0);T--)if(S instanceof Promise)return this._preserveStack(3,R,T,k,b),S;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(++b<l&&(E=h[b])>47&&E<60);b--;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&&(S=M[j](),S!==!0);j--)if(S instanceof Promise)return this._preserveStack(4,M,j,k,b),S;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=b+1;;++N)if(N>=l||(E=h[N])===24||E===26||E===27||E>127&&E<w){this._dcsParser.put(h,b,N),b=N-1;break}break;case 14:if(S=this._dcsParser.unhook(E!==24&&E!==26),S)return this._preserveStack(6,[],0,k,b),S;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=b+1;;N++)if(N>=l||(E=h[N])<32||E>127&&E<w){this._oscParser.put(h,b,N),b=N-1;break}break;case 6:if(S=this._oscParser.end(E!==24&&E!==26),S)return this._preserveStack(5,[],0,k,b),S;E===27&&(k|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&k}}}i.EscapeSequenceParser=v},6242:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;const u=a(5770),m=a(482),d=[];i.OscParser=class{constructor(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,_){this._handlers[g]===void 0&&(this._handlers[g]=[]);const w=this._handlers[g];return w.push(_),{dispose:()=>{const v=w.indexOf(_);v!==-1&&w.splice(v,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,_,w){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(g,_,w);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(g,_,w))}start(){this.reset(),this._state=1}put(g,_,w){if(this._state!==3){if(this._state===1)for(;_<w;){const v=g[_++];if(v===59){this._state=2,this._start();break}if(v<48||57<v)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+v-48}this._state===2&&w-_>0&&this._put(g,_,w)}}end(g,_=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,v=this._active.length-1,p=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,w=_,p=this._stack.fallThrough,this._stack.paused=!1),!p&&w===!1){for(;v>=0&&(w=this._active[v].end(g),w!==!0);v--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,w;v--}for(;v>=0;v--)if(w=this._active[v].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",g);this._active=d,this._id=-1,this._state=0}}},i.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,_,w){this._hitLimit||(this._data+=(0,m.utf32ToString)(g,_,w),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let _=!1;if(this._hitLimit)_=!1;else if(g&&(_=this._handler(this._data),_ instanceof Promise))return _.then(w=>(this._data="",this._hitLimit=!1,w));return this._data="",this._hitLimit=!1,_}}},8742:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;const a=2147483647;class u{static fromArray(d){const g=new u;if(!d.length)return g;for(let _=Array.isArray(d[0])?1:0;_<d.length;++_){const w=d[_];if(Array.isArray(w))for(let v=0;v<w.length;++v)g.addSubParam(w[v]);else g.addParam(w)}return g}constructor(d=32,g=32){if(this.maxLength=d,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const d=new u(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let g=0;g<this.length;++g){d.push(this.params[g]);const _=this._subParamsIdx[g]>>8,w=255&this._subParamsIdx[g];w-_>0&&d.push(Array.prototype.slice.call(this._subParams,_,w))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>a?a:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>a?a:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const g=this._subParamsIdx[d]>>8,_=255&this._subParamsIdx[d];return _-g>0?this._subParams.subarray(g,_):null}getSubParamsAll(){const d={};for(let g=0;g<this.length;++g){const _=this._subParamsIdx[g]>>8,w=255&this._subParamsIdx[g];w-_>0&&(d[g]=this._subParams.slice(_,w))}return d}addDigit(d){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const _=this._digitIsSub?this._subParams:this.params,w=_[g-1];_[g-1]=~w?Math.min(10*w+d,a):d}}i.Params=u},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,u){const m={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(m),u.dispose=()=>this._wrappedAddonDispose(m),u.activate(a)}_wrappedAddonDispose(a){if(a.isDisposed)return;let u=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===a){u=m;break}if(u===-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(u,1)}}},8771:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;const u=a(3785),m=a(511);i.BufferApiView=class{constructor(d,g){this._buffer=d,this.type=g}init(d){return this._buffer=d,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(d){const g=this._buffer.lines.get(d);if(g)return new u.BufferLineApiView(g)}getNullCell(){return new m.CellData}}},3785:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;const u=a(511);i.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,d){if(!(m<0||m>=this._line.length))return d?(this._line.loadCell(m,d),d):this._line.loadCell(m,new u.CellData)}translateToString(m,d,g){return this._line.translateToString(m,d,g)}}},8285:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;const u=a(8771),m=a(8460),d=a(844);class g extends d.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}i.BufferNamespaceApi=g},7975:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0,i.ParserApi=class{constructor(a){this._core=a}registerCsiHandler(a,u){return this._core.registerCsiHandler(a,m=>u(m.toArray()))}addCsiHandler(a,u){return this.registerCsiHandler(a,u)}registerDcsHandler(a,u){return this._core.registerDcsHandler(a,(m,d)=>u(m,d.toArray()))}addDcsHandler(a,u){return this.registerDcsHandler(a,u)}registerEscHandler(a,u){return this._core.registerEscHandler(a,u)}addEscHandler(a,u){return this.registerEscHandler(a,u)}registerOscHandler(a,u){return this._core.registerOscHandler(a,u)}addOscHandler(a,u){return this.registerOscHandler(a,u)}}},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 u=this&&this.__decorate||function(p,h,l,f){var S,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--)(S=p[C])&&(k=(E<3?S(k):E>3?S(h,l,k):S(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 d=a(8460),g=a(844),_=a(5295),w=a(2585);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;let v=i.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(p){super(),this.isUserScrolling=!1,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new d.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 _.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 S=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-S+1;l.lines.shiftElements(S+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 S=f.ydisp;f.ydisp=Math.max(Math.min(f.ydisp+p,f.ybase),0),S!==f.ydisp&&(h||this._onScroll.fire(f.ydisp))}};i.BufferService=v=u([m(0,w.IOptionsService)],v)},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,u){this._charsets[a]=u,this.glevel===a&&(this.charset=u)}}},1753:function(c,i,a){var u=this&&this.__decorate||function(f,S,E,k){var C,b=arguments.length,R=b<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,E):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(f,S,E,k);else for(var T=f.length-1;T>=0;T--)(C=f[T])&&(R=(b<3?C(R):b>3?C(S,E,R):C(S,E))||R);return b>3&&R&&Object.defineProperty(S,E,R),R},m=this&&this.__param||function(f,S){return function(E,k){S(E,k,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;const d=a(2585),g=a(8460),_=a(844),w={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 v(f,S){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||S||(E|=3)),E}const p=String.fromCharCode,h={DEFAULT:f=>{const S=[v(f,!1)+32,f.col+32,f.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${p(S[0])}${p(S[1])}${p(S[2])}`},SGR:f=>{const S=f.action===0&&f.button!==4?"m":"M";return`\x1B[<${v(f,!0)};${f.col};${f.row}${S}`},SGR_PIXELS:f=>{const S=f.action===0&&f.button!==4?"m":"M";return`\x1B[<${v(f,!0)};${f.x};${f.y}${S}`}};let l=i.CoreMouseService=class extends _.Disposable{constructor(f,S){super(),this._bufferService=f,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(w))this.addProtocol(E,w[E]);for(const E of Object.keys(h))this.addEncoding(E,h[E]);this.reset()}addProtocol(f,S){this._protocols[f]=S}addEncoding(f,S){this._encodings[f]=S}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 S=this._encodings[this._activeEncoding](f);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!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,S,E){if(E){if(f.x!==S.x||f.y!==S.y)return!1}else if(f.col!==S.col||f.row!==S.row)return!1;return f.button===S.button&&f.action===S.action&&f.ctrl===S.ctrl&&f.alt===S.alt&&f.shift===S.shift}};i.CoreMouseService=l=u([m(0,d.IBufferService),m(1,d.ICoreService)],l)},6975:function(c,i,a){var u=this&&this.__decorate||function(l,f,S,E){var k,C=arguments.length,b=C<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,f,S,E);else for(var R=l.length-1;R>=0;R--)(k=l[R])&&(b=(C<3?k(b):C>3?k(f,S,b):k(f,S))||b);return C>3&&b&&Object.defineProperty(f,S,b),b},m=this&&this.__param||function(l,f){return function(S,E){f(S,E,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;const d=a(1439),g=a(8460),_=a(844),w=a(2585),v=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 _.Disposable{constructor(l,f,S){super(),this._bufferService=l,this._logService=f,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,d.clone)(v),this.decPrivateModes=(0,d.clone)(p)}reset(){this.modes=(0,d.clone)(v),this.decPrivateModes=(0,d.clone)(p)}triggerDataEvent(l,f=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;f&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.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=u([m(0,w.IBufferService),m(1,w.ILogService),m(2,w.IOptionsService)],h)},9074:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DecorationService=void 0;const u=a(8055),m=a(8460),d=a(844),g=a(6106);let _=0,w=0;class v extends d.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.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,d.toDisposable)(()=>this.reset()))}registerDecoration(l){if(l.marker.isDisposed)return;const f=new p(l);if(f){const S=f.marker.onDispose(()=>f.dispose());f.onDispose(()=>{f&&(this._decorations.delete(f)&&this._onDecorationRemoved.fire(f),S.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,S){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&&(!S||(C.options.layer??"bottom")===S)&&(yield C)}forEachDecorationAtCell(l,f,S,E){this._decorations.forEachByKey(f,k=>{_=k.options.x??0,w=_+(k.options.width??1),l>=_&&l<w&&(!S||(k.options.layer??"bottom")===S)&&E(k)})}}i.DecorationService=v;class p extends d.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=u.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=u.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(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 u=a(2585),m=a(8343);class d{constructor(..._){this._entries=new Map;for(const[w,v]of _)this.set(w,v)}set(_,w){const v=this._entries.get(_);return this._entries.set(_,w),v}forEach(_){for(const[w,v]of this._entries.entries())_(w,v)}has(_){return this._entries.has(_)}get(_){return this._entries.get(_)}}i.ServiceCollection=d,i.InstantiationService=class{constructor(){this._services=new d,this._services.set(u.IInstantiationService,this)}setService(g,_){this._services.set(g,_)}getService(g){return this._services.get(g)}createInstance(g,..._){const w=(0,m.getServiceDependencies)(g).sort((h,l)=>h.index-l.index),v=[];for(const h of w){const l=this._services.get(h.id);if(!l)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${h.id}.`);v.push(l)}const p=w.length>0?w[0].index:_.length;if(_.length!==p)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${p+1} conflicts with ${_.length} static arguments`);return new g(..._,...v)}}},7866:function(c,i,a){var u=this&&this.__decorate||function(p,h,l,f){var S,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--)(S=p[C])&&(k=(E<3?S(k):E>3?S(h,l,k):S(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 d=a(844),g=a(2585),_={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let w,v=i.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(p){super(),this._optionsService=p,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),w=this}_updateLogLevel(){this._logLevel=_[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<=g.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<=g.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<=g.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<=g.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<=g.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=v=u([m(0,g.IOptionsService)],v),i.setTraceLogger=function(p){w=p},i.traceCall=function(p,h,l){if(typeof l.value!="function")throw new Error("not supported");const f=l.value;l.value=function(...S){if(w.logLevel!==g.LogLevelEnum.TRACE)return f.apply(this,S);w.trace(`GlyphRenderer#${f.name}(${S.map(k=>JSON.stringify(k)).join(", ")})`);const E=f.apply(this,S);return w.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 u=a(8460),m=a(844),d=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:d.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class _ extends m.Disposable{constructor(v){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const p={...i.DEFAULT_OPTIONS};for(const h in v)if(h in p)try{const l=v[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(v,p){return this.onOptionChange(h=>{h===v&&p(this.rawOptions[v])})}onMultipleOptionChange(v,p){return this.onOptionChange(h=>{v.indexOf(h)!==-1&&p()})}_setupOptions(){const v=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:v.bind(this,h),set:p.bind(this,h)};Object.defineProperty(this.options,h,l)}}_sanitizeAndValidateOption(v,p){switch(v){case"cursorStyle":if(p||(p=i.DEFAULT_OPTIONS[v]),!function(h){return h==="block"||h==="underline"||h==="bar"}(p))throw new Error(`"${p}" is not a valid value for ${v}`);break;case"wordSeparator":p||(p=i.DEFAULT_OPTIONS[v]);break;case"fontWeight":case"fontWeightBold":if(typeof p=="number"&&1<=p&&p<=1e3)break;p=g.includes(p)?p:i.DEFAULT_OPTIONS[v];break;case"cursorWidth":p=Math.floor(p);case"lineHeight":case"tabStopWidth":if(p<1)throw new Error(`${v} 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(`${v} cannot be less than 0, value: ${p}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(p<=0)throw new Error(`${v} cannot be less than or equal to 0, value: ${p}`);break;case"rows":case"cols":if(!p&&p!==0)throw new Error(`${v} must be numeric, value: ${p}`);break;case"windowsPty":p=p??{}}return p}}i.OptionsService=_},2660:function(c,i,a){var u=this&&this.__decorate||function(_,w,v,p){var h,l=arguments.length,f=l<3?w:p===null?p=Object.getOwnPropertyDescriptor(w,v):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(_,w,v,p);else for(var S=_.length-1;S>=0;S--)(h=_[S])&&(f=(l<3?h(f):l>3?h(w,v,f):h(w,v))||f);return l>3&&f&&Object.defineProperty(w,v,f),f},m=this&&this.__param||function(_,w){return function(v,p){w(v,p,_)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkService=void 0;const d=a(2585);let g=i.OscLinkService=class{constructor(_){this._bufferService=_,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(_){const w=this._bufferService.buffer;if(_.id===void 0){const S=w.addMarker(w.ybase+w.y),E={data:_,id:this._nextId++,lines:[S]};return S.onDispose(()=>this._removeMarkerFromLink(E,S)),this._dataByLinkId.set(E.id,E),E.id}const v=_,p=this._getEntryIdKey(v),h=this._entriesWithId.get(p);if(h)return this.addLineToLink(h.id,w.ybase+w.y),h.id;const l=w.addMarker(w.ybase+w.y),f={id:this._nextId++,key:this._getEntryIdKey(v),data:v,lines:[l]};return l.onDispose(()=>this._removeMarkerFromLink(f,l)),this._entriesWithId.set(f.key,f),this._dataByLinkId.set(f.id,f),f.id}addLineToLink(_,w){const v=this._dataByLinkId.get(_);if(v&&v.lines.every(p=>p.line!==w)){const p=this._bufferService.buffer.addMarker(w);v.lines.push(p),p.onDispose(()=>this._removeMarkerFromLink(v,p))}}getLinkData(_){var w;return(w=this._dataByLinkId.get(_))==null?void 0:w.data}_getEntryIdKey(_){return`${_.id};;${_.uri}`}_removeMarkerFromLink(_,w){const v=_.lines.indexOf(w);v!==-1&&(_.lines.splice(v,1),_.lines.length===0&&(_.data.id!==void 0&&this._entriesWithId.delete(_.key),this._dataByLinkId.delete(_.id)))}};i.OscLinkService=g=u([m(0,d.IBufferService)],g)},8343:(c,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const a="di$target",u="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(m){return m[u]||[]},i.createDecorator=function(m){if(i.serviceRegistry.has(m))return i.serviceRegistry.get(m);const d=function(g,_,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,p,h){p[a]===p?p[u].push({id:v,index:h}):(p[u]=[{id:v,index:h}],p[a]=p)})(d,g,w)};return d.toString=()=>m,i.serviceRegistry.set(m,d),d}},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 u=a(8343);var m;i.IBufferService=(0,u.createDecorator)("BufferService"),i.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),i.ICoreService=(0,u.createDecorator)("CoreService"),i.ICharsetService=(0,u.createDecorator)("CharsetService"),i.IInstantiationService=(0,u.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(m||(i.LogLevelEnum=m={})),i.ILogService=(0,u.createDecorator)("LogService"),i.IOptionsService=(0,u.createDecorator)("OptionsService"),i.IOscLinkService=(0,u.createDecorator)("OscLinkService"),i.IUnicodeService=(0,u.createDecorator)("UnicodeService"),i.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(c,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const u=a(8460),m=a(225);class d{static extractShouldJoin(_){return(1&_)!=0}static extractWidth(_){return _>>1&3}static extractCharKind(_){return _>>3}static createPropertyValue(_,w,v=!1){return(16777215&_)<<3|(3&w)<<1|(v?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const _=new m.UnicodeV6;this.register(_),this._active=_.version,this._activeProvider=_}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(_){if(!this._providers[_])throw new Error(`unknown Unicode version "${_}"`);this._active=_,this._activeProvider=this._providers[_],this._onChange.fire(_)}register(_){this._providers[_.version]=_}wcwidth(_){return this._activeProvider.wcwidth(_)}getStringCellWidth(_){let w=0,v=0;const p=_.length;for(let h=0;h<p;++h){let l=_.charCodeAt(h);if(55296<=l&&l<=56319){if(++h>=p)return w+this.wcwidth(l);const E=_.charCodeAt(h);56320<=E&&E<=57343?l=1024*(l-55296)+E-56320+65536:w+=this.wcwidth(E)}const f=this.charProperties(l,v);let S=d.extractWidth(f);d.extractShouldJoin(f)&&(S-=d.extractWidth(v)),w+=S,v=f}return w}charProperties(_,w){return this._activeProvider.charProperties(_,w)}}i.UnicodeService=d}},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),u=s(844),m=s(5741),d=s(8285),g=s(7975),_=s(7090),w=["cols","rows"];class v extends u.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=S=>this._core.options[S],f=(S,E)=>{this._checkReadonlyOptions(S),this._core.options[S]=E};for(const S in this._core.options){const E={get:l.bind(this,S),set:f.bind(this,S)};Object.defineProperty(this._publicOptions,S,E)}}_checkReadonlyOptions(h){if(w.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 g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new _.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 d.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=v})(),o})())})(zy);var eA=zy.exports,Uy={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")),u=Math.max(0,parseInt(i.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),d=a-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),g=u-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-c;return{cols:Math.max(2,Math.floor(g/o.css.cell.width)),rows:Math.max(1,Math.floor(d/o.css.cell.height))}}}})(),r})())})(Uy);var tA=Uy.exports,Vy={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(self,()=>(()=>{var r={6:(c,i)=>{function a(m){try{const d=new URL(m),g=d.password&&d.username?`${d.protocol}//${d.username}:${d.password}@${d.host}`:d.username?`${d.protocol}//${d.username}@${d.host}`:`${d.protocol}//${d.host}`;return m.toLocaleLowerCase().startsWith(g.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.LinkComputer=i.WebLinkProvider=void 0,i.WebLinkProvider=class{constructor(m,d,g,_={}){this._terminal=m,this._regex=d,this._handler=g,this._options=_}provideLinks(m,d){const g=u.computeLink(m,this._regex,this._terminal,this._handler);d(this._addCallbacks(g))}_addCallbacks(m){return m.map(d=>(d.leave=this._options.leave,d.hover=(g,_)=>{if(this._options.hover){const{range:w}=d;this._options.hover(g,_,w)}},d))}};class u{static computeLink(d,g,_,w){const v=new RegExp(g.source,(g.flags||"")+"g"),[p,h]=u._getWindowedLineStrings(d-1,_),l=p.join("");let f;const S=[];for(;f=v.exec(l);){const E=f[0];if(!a(E))continue;const[k,C]=u._mapStrIdx(_,h,0,f.index),[b,R]=u._mapStrIdx(_,k,C,E.length);if(k===-1||C===-1||b===-1||R===-1)continue;const T={start:{x:C+1,y:k+1},end:{x:R,y:b+1}};S.push({range:T,text:E,activate:w})}return S}static _getWindowedLineStrings(d,g){let _,w=d,v=d,p=0,h="";const l=[];if(_=g.buffer.active.getLine(d)){const f=_.translateToString(!0);if(_.isWrapped&&f[0]!==" "){for(p=0;(_=g.buffer.active.getLine(--w))&&p<2048&&(h=_.translateToString(!0),p+=h.length,l.push(h),_.isWrapped&&h.indexOf(" ")===-1););l.reverse()}for(l.push(f),p=0;(_=g.buffer.active.getLine(++v))&&_.isWrapped&&p<2048&&(h=_.translateToString(!0),p+=h.length,l.push(h),h.indexOf(" ")===-1););}return[l,w]}static _mapStrIdx(d,g,_,w){const v=d.buffer.active,p=v.getNullCell();let h=_;for(;w;){const l=v.getLine(g);if(!l)return[-1,-1];for(let f=h;f<l.length;++f){l.getCell(f,p);const S=p.getChars();if(p.getWidth()&&(w-=S.length||1,f===l.length-1&&S==="")){const E=v.getLine(g+1);E&&E.isWrapped&&(E.getCell(0,p),p.getWidth()===2&&(w+=1))}if(w<0)return[g,f]}g++,h=0}return[g,h]}}i.LinkComputer=u}},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 u(m,d){const g=window.open();if(g){try{g.opener=null}catch{}g.location.href=d}else console.warn("Opening link blocked as opener could not be cleared")}c.WebLinksAddon=class{constructor(m=u,d={}){this._handler=m,this._options=d}activate(m){this._terminal=m;const d=this._options,g=d.urlRegex||a;this._linkProvider=this._terminal.registerLinkProvider(new i.WebLinkProvider(this._terminal,g,this._handler,d))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),o})())})(Vy);var rA=Vy.exports;const Ld=x.forwardRef(({onData:e,onResize:t},r)=>{const n=x.useRef(null),s=x.useRef(null),o=x.useRef(null),c=x.useRef(e);c.current=e;const i=x.useRef(t);return i.current=t,x.useImperativeHandle(r,()=>({write(a){var u;(u=s.current)==null||u.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()}})),x.useEffect(()=>{const a=n.current;if(!a)return;const u=new eA.Terminal({fontSize:14,fontFamily:'ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", 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 tA.FitAddon,d=new rA.WebLinksAddon;u.loadAddon(m),u.loadAddon(d),u.open(a);try{m.fit()}catch{}u.onData(_=>{const w=_.replace(/\x1b\[\[?[IO]/g,"");w&&c.current(w)}),u.onResize(({cols:_,rows:w})=>{var v;(v=i.current)==null||v.call(i,_,w)}),s.current=u,o.current=m;const g=new ResizeObserver(()=>{try{m.fit()}catch{}});return g.observe(a),()=>{g.disconnect(),u.dispose(),s.current=null,o.current=null}},[]),y.jsx("div",{ref:n,className:"xterm-renderer"})});Ld.displayName="XTermRenderer";const nA=[{kind:"claude",label:"Start Claude",icon:sA},{kind:"codex",label:"Start Codex",icon:iA},{kind:"agent",label:"Start Cursor",icon:oA}];function Ky({visible:e,onStart:t}){return e?y.jsxs("div",{className:"start-prompt",children:[y.jsx("p",{className:"start-prompt-heading",children:"Choose an agent to start"}),y.jsx("div",{className:"start-prompt-buttons",children:nA.map(({kind:r,label:n,icon:s})=>y.jsxs("button",{className:"start-prompt-btn",onClick:()=>t(r),children:[s(),y.jsx("span",{children:n})]},r))})]}):null}function sA(){return y.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:y.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 iA(){return y.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"4 17 10 11 4 5"}),y.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}function oA(){return y.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:y.jsx("path",{d:"M5 3l14 9-7 2-4 7L5 3z"})})}function Gy({plan:e,onAccept:t,onReject:r}){const[n,s]=x.useState(!1);return e?y.jsxs("div",{className:"plan-panel",children:[y.jsxs("div",{className:"plan-panel-header",children:[y.jsxs("button",{className:"plan-panel-toggle",onClick:()=>s(o=>!o),children:[y.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:y.jsx("polyline",{points:"6 9 12 15 18 9"})}),y.jsx("span",{children:"Plan Detected"})]}),y.jsxs("div",{className:"plan-panel-actions",children:[y.jsx("button",{className:"plan-panel-btn plan-panel-btn--accept",onClick:t,children:"Accept"}),y.jsx("button",{className:"plan-panel-btn plan-panel-btn--reject",onClick:r,children:"Reject"})]})]}),!n&&y.jsx("div",{className:"plan-panel-body",children:y.jsx("pre",{className:"plan-panel-content",children:e.content})})]}):null}function qy({open:e,onClose:t,autoSessionId:r}){const[n,s]=x.useState(!1),o=x.useRef(null),c=x.useMemo(()=>Hy().defaultAgent,[]);e&&!n&&s(!0);const{plan:i,processOutput:a,clearPlan:u}=Fy(),m=x.useRef(a);m.current=a;const d=x.useRef(u);d.current=u;const g=x.useRef(null),{status:_,send:w}=Pd({onMessage:x.useCallback(C=>{var b,R,T,M;switch((b=g.current)==null||b.handleMessage(C),C.type){case"output":(R=o.current)==null||R.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":d.current();break}},[])}),v=qL({send:w,xtermRef:o,defaultAgent:c,autoSessionId:r});g.current=v,x.useEffect(()=>{if(!e)return;const C=setTimeout(()=>{var b,R;(b=o.current)==null||b.fit(),(R=o.current)==null||R.focus()},250);return()=>clearTimeout(C)},[e]);const p=x.useCallback(C=>w({type:"input",data:C}),[w]),h=x.useCallback((C,b)=>w({type:"resize",cols:C,rows:b}),[w]),l=x.useCallback(()=>{w({type:"input",data:`y
284
- `}),u()},[w,u]),f=x.useCallback(()=>{w({type:"input",data:`n
285
- `}),u()},[w,u]),S=!!v.sessionId&&!v.agentRunning&&_==="connected",E=x.useRef(null);x.useEffect(()=>{!r||r===E.current||_==="connected"&&(E.current=r,w({type:"join_session",sessionId:r}))},[r,_,w]);const k=_==="connected"?"bg-emerald-400":_==="connecting"?"bg-amber-400 animate-pulse":"bg-red-400";return y.jsxs(y.Fragment,{children:[e&&y.jsx("div",{className:"fixed inset-0 z-40 bg-black/40",onClick:t}),y.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:[y.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-muted/50",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${k}`}),y.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Terminal"})]}),y.jsx("button",{onClick:t,className:"rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[y.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n&&y.jsxs("div",{className:"relative flex-1 min-h-0 flex flex-col",children:[y.jsx("div",{className:"flex-1 min-h-0 terminal-body-bg",children:y.jsx(Ld,{ref:o,onData:p,onResize:h})}),y.jsx(Ky,{visible:S,onStart:v.startAgent}),y.jsx(Gy,{plan:i,onAccept:l,onReject:f})]})]})]})}const aA=3e3;function lA({sessionId:e}){const t=x.useRef(null),[r,n]=x.useState(!1),s=x.useRef(!1),{plan:o,processOutput:c,clearPlan:i}=Fy(),a=x.useRef(c);a.current=c;const u=x.useRef(i);u.current=i;const{status:m,send:d}=Pd({onMessage:x.useCallback(h=>{var l,f,S,E,k,C;switch(h.type){case"connected":s.current||(s.current=!0,d({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 b of h.outputBuffer)(S=t.current)==null||S.write(b.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),u.current();break;case"claude_stopped":case"codex_stopped":case"agent_stopped":n(!1);break}},[e])});x.useEffect(()=>{const h=setTimeout(()=>{var l,f;(l=t.current)==null||l.fit(),(f=t.current)==null||f.focus()},150);return()=>clearTimeout(h)},[]);const g=x.useCallback(h=>d({type:"input",data:h}),[d]),_=x.useCallback((h,l)=>d({type:"resize",cols:h,rows:l}),[d]),w=x.useCallback(h=>{d({type:h==="claude"?"start_claude":h==="codex"?"start_codex":"start_agent"})},[d]),v=!r&&m==="connected",p=m==="connected"?"bg-emerald-400":m==="connecting"?"bg-amber-400 animate-pulse":"bg-red-400";return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border bg-muted/50",children:[y.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${p}`}),y.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Terminal"})]}),y.jsxs("div",{className:"relative flex-1 min-h-0 flex flex-col",children:[y.jsx("div",{className:"flex-1 min-h-0 terminal-body-bg",children:y.jsx(Ld,{ref:t,onData:g,onResize:_})}),y.jsx(Ky,{visible:v,onStart:w}),y.jsx(Gy,{plan:o,onAccept:()=>{d({type:"input",data:`y
290
- `}),i()},onReject:()=>{d({type:"input",data:`n
291
- `}),i()}})]})]})}function cA(){const[e,t]=x.useState([]),[r,n]=x.useState(!0),[s,o]=x.useState(null),[c,i]=x.useState(new Set),a=x.useRef(null),u=x.useCallback(async()=>{try{const g=await(await fetch("/terminal/api/sessions/list")).json();t(g.sessions??[])}catch{}finally{n(!1)}},[]);x.useEffect(()=>(u(),a.current=setInterval(u,aA),()=>{a.current&&clearInterval(a.current)}),[u]);const m=async d=>{i(g=>new Set(g).add(d));try{await fetch(`/terminal/api/sessions/${d}`,{method:"DELETE"}),s===d&&o(null),await u()}finally{i(g=>{const _=new Set(g);return _.delete(d),_})}};return s?y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsx("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-border bg-muted/30",children:y.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:[y.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:y.jsx("polyline",{points:"15 18 9 12 15 6"})}),"Back to sessions"]})}),y.jsx("div",{className:"flex-1 min-h-0",children:y.jsx(lA,{sessionId:s},s)})]}):y.jsxs("div",{className:"p-6 max-w-4xl mx-auto",children:[y.jsxs("div",{className:"flex items-center justify-between mb-6",children:[y.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Terminal Sessions"}),y.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.length," session",e.length!==1?"s":""]})]}),r?y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading sessions..."}):e.length===0?y.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-8 text-center",children:y.jsx("p",{className:"text-sm text-muted-foreground",children:"No terminal sessions. Sessions are created automatically when the pipeline triggers an LLM node."})}):y.jsx("div",{className:"space-y-2",children:e.map(d=>y.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:[y.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[y.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${d.active?"bg-emerald-400":"bg-zinc-400"}`}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:d.name||d.id}),y.jsxs("p",{className:"text-xs text-muted-foreground",children:[d.active?"Active":"Inactive",d.lastActivity?` · ${uA(d.lastActivity)}`:""]})]})]}),y.jsxs("div",{className:"flex items-center gap-2 shrink-0 ml-4",children:[y.jsx("button",{type:"button",onClick:()=>o(d.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"}),y.jsx("button",{type:"button",onClick:()=>m(d.id),disabled:c.has(d.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(d.id)?"Closing...":"Close"})]})]},d.id))})]})}function uA(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 dA={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 Is({status:e}){return y.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${dA[e]??"bg-zinc-500/20 text-zinc-400"}`,children:e})}function Qi(e){if(!e)return"—";try{return new Date(e).toLocaleTimeString()}catch{return e}}function hA(){var k;const[e,t]=x.useState(null),[r,n]=x.useState({}),[s,o]=x.useState(!1),[c,i]=x.useState(null),[a,u]=x.useState(new Set),m=x.useCallback(async()=>{o(!0),i(null);try{const[C,b]=await Promise.all([fetch("/api/repair/tracker"),fetch("/api/pipeline-graph")]);if(!C.ok)throw new Error(`Tracker: HTTP ${C.status}`);const R=await C.json();if(t(R),b.ok){const T=await b.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)}},[]),d=x.useCallback(async(C,b,R)=>{try{const T={agent_id:C,status:b};R&&(T.unit_id=R),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]),g=x.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(b){i(String(b))}},[m]),_=x.useCallback(async()=>{try{await fetch("/api/poke-orchestrator",{method:"POST"})}catch(C){i(String(C))}},[]),w=x.useCallback(async(C,b)=>{try{await fetch("/api/resolve-intervention",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:C,response:b})}),await m()}catch(R){i(String(R))}},[m]),v=x.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=x.useCallback(C=>{u(b=>{const R=new Set(b);return R.has(C)?R.delete(C):R.add(C),R})},[]);function h({agentId:C,status:b,unitId:R}){return b==="pending"?null:y.jsxs("button",{type:"button",onClick:()=>d(C,"pending",R),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:[y.jsx(uC,{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)??{},S=(e==null?void 0:e.interventions)??[],E=Object.entries(f).sort(([C],[b])=>{const R=r[C],T=r[b];return R&&T?R.phase!==T.phase?R.phase-T.phase:R.index-T.index:R&&!T?-1:!R&&T?1:C.localeCompare(b)});return y.jsxs("div",{className:"max-w-4xl mx-auto py-8 px-6 space-y-6",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"Repair"}),y.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:[y.jsx(lC,{className:`h-3.5 w-3.5 ${s?"animate-spin":""}`}),e?"Refresh":"Load Tracker"]})]}),c&&y.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&&y.jsx("p",{className:"text-sm text-muted-foreground",children:'Click "Load Tracker" to fetch the current pipeline state.'}),e&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[y.jsx("h2",{className:"text-sm font-medium text-foreground",children:"Run Status"}),l&&y.jsx(Is,{status:l})]}),y.jsxs("div",{className:"flex flex-wrap gap-2",children:[l!=="in_progress"&&y.jsxs("button",{type:"button",onClick:()=>g("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:[y.jsx(oC,{className:"h-3 w-3"})," Resume"]}),l==="in_progress"&&y.jsxs("button",{type:"button",onClick:()=>g("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:[y.jsx(sC,{className:"h-3 w-3"})," Pause"]}),y.jsxs("button",{type:"button",onClick:_,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:[y.jsx(EC,{className:"h-3 w-3"})," Poke Orchestrator"]}),y.jsxs("button",{type:"button",onClick:v,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:[y.jsx(SC,{className:"h-3 w-3"})," Full Reset"]})]})]}),y.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[y.jsxs("h2",{className:"text-sm font-medium text-foreground mb-3",children:["Agents (",Object.keys(f).length,")"]}),Object.keys(f).length===0?y.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents in tracker."}):y.jsx("div",{className:"overflow-x-auto",children:y.jsxs("table",{className:"w-full text-sm",children:[y.jsx("thead",{children:y.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Agent"}),y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Phase"}),y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Status"}),y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Triggered"}),y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Completed"}),y.jsx("th",{className:"pb-2 font-medium",children:"Actions"})]})}),y.jsx("tbody",{children:E.map(([C,b])=>{var M;const R=b.units&&Object.keys(b.units).length>0,T=a.has(C);return y.jsx(fA,{agentId:C,agent:b,phase:(M=r[C])==null?void 0:M.phase,hasUnits:!!R,isExpanded:T,onToggle:()=>p(C),actions:y.jsx(h,{agentId:C,status:b.status}),unitActions:(j,N)=>y.jsx(h,{agentId:C,status:N,unitId:j})},C)})})]})})]}),y.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[y.jsxs("h2",{className:"text-sm font-medium text-foreground mb-3",children:["Interventions (",S.length,")"]}),S.length===0?y.jsx("p",{className:"text-sm text-muted-foreground",children:"No interventions."}):y.jsx("div",{className:"overflow-x-auto",children:y.jsxs("table",{className:"w-full text-sm",children:[y.jsx("thead",{children:y.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"ID"}),y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Agent"}),y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Type"}),y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Status"}),y.jsx("th",{className:"pb-2 pr-3 font-medium",children:"Message"}),y.jsx("th",{className:"pb-2 font-medium",children:"Actions"})]})}),y.jsx("tbody",{children:S.map(C=>y.jsxs("tr",{className:"border-b border-border/50",children:[y.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}),y.jsx("td",{className:"py-2 pr-3 font-mono text-xs",children:C.agent_id}),y.jsx("td",{className:"py-2 pr-3",children:y.jsx(Is,{status:C.type})}),y.jsx("td",{className:"py-2 pr-3",children:y.jsx(Is,{status:C.status})}),y.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground max-w-[200px] truncate",title:C.message,children:C.message}),y.jsx("td",{className:"py-2",children:C.status==="pending"&&y.jsxs("div",{className:"flex gap-1.5",children:[y.jsx("button",{type:"button",onClick:()=>w(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"}),y.jsx("button",{type:"button",onClick:()=>w(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 fA({agentId:e,agent:t,phase:r,hasUnits:n,isExpanded:s,onToggle:o,actions:c,unitActions:i}){return y.jsxs(y.Fragment,{children:[y.jsxs("tr",{className:"border-b border-border/50",children:[y.jsx("td",{className:"py-2 pr-3 font-mono text-xs",children:y.jsxs("div",{className:"flex items-center gap-1",children:[n&&y.jsx("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground",children:s?y.jsx(Ku,{className:"h-3.5 w-3.5"}):y.jsx(Yg,{className:"h-3.5 w-3.5"})}),e]})}),y.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:r??"—"}),y.jsx("td",{className:"py-2 pr-3",children:y.jsx(Is,{status:t.status})}),y.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Qi(t.triggered_at)}),y.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Qi(t.completed_at)}),y.jsx("td",{className:"py-2",children:c})]}),n&&s&&Object.entries(t.units).map(([a,u])=>y.jsxs("tr",{className:"border-b border-border/30 bg-zinc-900/30",children:[y.jsx("td",{className:"py-1.5 pr-3 pl-8 font-mono text-xs text-muted-foreground",children:a}),y.jsx("td",{className:"py-1.5 pr-3"}),y.jsx("td",{className:"py-1.5 pr-3",children:y.jsx(Is,{status:u.status})}),y.jsx("td",{className:"py-1.5 pr-3 text-xs text-muted-foreground",children:Qi(u.triggered_at)}),y.jsx("td",{className:"py-1.5 pr-3 text-xs text-muted-foreground",children:Qi(u.completed_at)}),y.jsx("td",{className:"py-1.5",children:i(a,u.status)})]},`${e}-${a}`))]})}function pA({onLogout:e}){const[t,r]=x.useState(null),[n,s]=x.useState(null),[o,c]=x.useState(null),[i,a]=x.useState(!0),[u,m]=x.useState(!1),[d,g]=x.useState(!1),[_,w]=x.useState("dashboard"),[v,p]=x.useState(null),[h,l]=x.useState(!1),[f,S]=x.useState(!1),[E,k]=x.useState([]),[C,b]=x.useState(!1),[R,T]=x.useState(null),[M,j]=x.useState(new Set),[N,F]=x.useState({}),[V,K]=x.useState({}),[q,B]=x.useState({}),P=async()=>{await fetch("/api/auth",{method:"DELETE"}),e()},L=x.useCallback($=>{switch($.type){case"tracker_update":s($.agents),b(!1),$.interventions&&k($.interventions);break;case"pipeline_stalled":b(!0);break;case"pipeline_completed":T("completed");break;case"run_status_change":T($.status);break;case"sessions_needing_attention":j(new Set($.agentIds));break;case"session_previews":F($.previews);break;case"workspace_setup_progress":B(U=>({...U,workspace_setup:{messages:$.messages,templateMatch:$.templateMatch}}));break;case"impl_prep_progress":B(U=>({...U,impl_prep:{messages:$.messages}}));break;case"post_impl_launch_progress":B(U=>({...U,post_impl_launch:{messages:$.messages,appUrl:$.appUrl}}));break;case"node_start_failed":K(U=>({...U,[$.agentId]:$.error}));break;case"llm_node_started":p($.sessionId),g(!0),S(!1);break;case"llm_node_stopped":S(!0);break}},[]);Pd({onMessage:L}),x.useEffect(()=>{Promise.all([fetch("/api/pipeline-graph").then($=>$.json()),fetch("/api/pipeline-tracker").then($=>$.json()).catch(()=>null),fetch("/api/terminal-status").then($=>$.json()).catch(()=>({available:!1})),fetch("/api/active-llm-session").then($=>$.json()).catch(()=>null),fetch("/terminal/api/sessions/list").then($=>$.json()).catch(()=>({sessions:[]})),fetch("/api/node-errors").then($=>$.json()).catch(()=>[])]).then(([$,U,G,O,A,z])=>{const H=$.error?null:$.data??$;$.error?c($.error):r(H),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),g(!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($=>c(String($))).finally(()=>a(!1))},[]);const I=x.useCallback(()=>{b(!1),fetch("/api/poke-orchestrator",{method:"POST"}).catch($=>console.error("Poke failed:",$))},[]),D=x.useCallback($=>{p($),g(!0)},[]),W=x.useCallback(($,U)=>{k(G=>G.filter(O=>O.id!==$)),fetch("/api/resolve-intervention",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:$,response:U})}).catch(G=>console.error("Failed to resolve intervention:",G))},[]);return y.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[y.jsx(FL,{}),y.jsxs("div",{className:"flex flex-1 min-h-0",children:[y.jsx($L,{onLogout:P,terminalAvailable:u,activePage:_,onNavigate:w}),y.jsxs("main",{className:"flex-1 overflow-y-auto content-gradient",children:[_==="dashboard"&&y.jsxs("div",{className:"welcome-content",children:[y.jsx("h1",{children:"Welcome to LaunchPod"}),i?y.jsx("p",{className:"text-muted-foreground",children:"Loading pipeline graph..."}):o?y.jsx("p",{className:"text-destructive",children:o}):t?y.jsx(y.Fragment,{children:y.jsx(GL,{data:t,agentStatuses:n??void 0,interventions:E,onResolveIntervention:W,stalled:C,onPoke:I,attentionAgentIds:M,sessionPreviews:N,onOpenTerminal:D,podProgressStates:q,runStatus:R??void 0,nodeErrors:V})}):null]}),_==="terminal"&&y.jsx(cA,{}),_==="settings"&&y.jsx(ZL,{}),_==="repair"&&y.jsx(hA,{})]})]}),u&&y.jsx(qy,{open:d,onClose:()=>g(!1),autoSessionId:v}),C&&y.jsx("button",{type:"button",onClick:I,className:"pipeline-poke-fab",title:"Poke orchestrator",children:y.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),y.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]})})]})}const mA={queued:"bg-zinc-500/15 text-zinc-300",analyzing:"bg-amber-500/15 text-amber-400 animate-pulse",analyzed:"bg-emerald-500/15 text-emerald-400",failed:"bg-red-500/15 text-red-400",handled:"bg-blue-500/15 text-blue-300",dismissed:"bg-zinc-500/15 text-zinc-500 opacity-60"};function gA(e){switch((e??"").toLowerCase()){case"bug":return"bg-red-500/15 text-red-400";case"idea":return"bg-sky-500/15 text-sky-400";case"cosmetic":return"bg-violet-500/15 text-violet-400";case"praise":return"bg-emerald-500/15 text-emerald-400";default:return"bg-zinc-500/15 text-zinc-400"}}function vA(e){const t=new Date(e).getTime(),r=Math.max(0,Math.floor((Date.now()-t)/1e3));return r<60?`${r}s ago`:r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:`${Math.floor(r/86400)}d ago`}function _A({ping:e,selected:t,relatedCount:r,onSelect:n,onHandle:s,onDismiss:o,onRestart:c,onResume:i}){var _;const{context:a}=e,u=e.state==="handled"||e.state==="dismissed",m=e.state==="failed",d=!!e.analysisSessionId&&(e.state==="failed"||e.state==="analyzed"),g=((_=a==null?void 0:a.body)==null?void 0:_.trim())||e.title;return y.jsxs("button",{type:"button",onClick:n,className:["w-full text-left rounded-lg border bg-card px-4 py-3 transition-colors",t?"border-primary ring-1 ring-primary/40":"border-border hover:border-zinc-600",u?"opacity-70":""].join(" "),children:[y.jsxs("div",{className:"flex items-start justify-between gap-3",children:[y.jsx("p",{className:"text-sm leading-snug line-clamp-2 min-w-0 flex-1",children:g}),y.jsx("span",{className:`shrink-0 inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium ${mA[e.state]}`,children:e.state})]}),y.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-[11px]",children:[(a==null?void 0:a.severity)&&y.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded ${gA(a.severity)}`,children:a.severity}),(a==null?void 0:a.componentName)&&y.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-zinc-700/40 text-zinc-300 font-mono",children:a.componentName}),(a==null?void 0:a.route)&&y.jsx("span",{className:"text-zinc-500 truncate max-w-[180px]",title:a.route,children:a.route}),r>0&&y.jsxs("span",{className:"text-zinc-500",children:["· ",r," related"]}),y.jsx("span",{className:"text-zinc-600 ml-auto",children:vA(e.receivedAt)})]}),e.analysisSummary&&y.jsx("p",{className:"mt-2 text-[11px] text-zinc-400 line-clamp-2",children:e.analysisSummary}),e.state==="failed"&&e.analysisError&&y.jsxs("p",{className:"mt-2 text-[11px] text-red-400 line-clamp-2",children:["⚠ ",e.analysisError]}),!u&&y.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[d&&y.jsx("span",{role:"button",tabIndex:0,onClick:w=>{w.stopPropagation(),i()},onKeyDown:w=>{w.key==="Enter"&&(w.stopPropagation(),i())},className:"text-[11px] text-violet-400 hover:text-violet-300 cursor-pointer",title:"Re-attach via claude --resume — keeps conversation history",children:"resume"}),m&&y.jsx("span",{role:"button",tabIndex:0,onClick:w=>{w.stopPropagation(),c()},onKeyDown:w=>{w.key==="Enter"&&(w.stopPropagation(),c())},className:"text-[11px] text-emerald-400 hover:text-emerald-300 cursor-pointer",title:"Discard old session and spawn a fresh analyzer",children:"restart"}),y.jsx("span",{role:"button",tabIndex:0,onClick:w=>{w.stopPropagation(),s()},onKeyDown:w=>{w.key==="Enter"&&(w.stopPropagation(),s())},className:"text-[11px] text-zinc-400 hover:text-zinc-200 cursor-pointer",children:"mark handled"}),y.jsx("span",{role:"button",tabIndex:0,onClick:w=>{w.stopPropagation(),o()},onKeyDown:w=>{w.key==="Enter"&&(w.stopPropagation(),o())},className:"text-[11px] text-zinc-500 hover:text-red-400 cursor-pointer",children:"dismiss"})]})]})}function yA({pings:e,selectedId:t,onSelect:r,onHandle:n,onDismiss:s,onRestart:o,onResume:c,emptyState:i}){const a=x.useMemo(()=>{const u=new Map;for(const m of e)u.set(m.threadId,(u.get(m.threadId)??0)+1);return u},[e]);return e.length===0?y.jsx("div",{className:"text-sm text-muted-foreground p-6",children:i}):y.jsx("ul",{className:"space-y-2 p-3 overflow-y-auto",children:e.map(u=>y.jsx("li",{children:y.jsx(_A,{ping:u,selected:u.id===t,relatedCount:(a.get(u.threadId)??1)-1,onSelect:()=>r(u.id),onHandle:()=>n(u.id),onDismiss:()=>s(u.id),onRestart:()=>o(u.id),onResume:()=>c(u.id)})},u.id))})}const SA=2e3;function wA(e){const[t,r]=x.useState([]),[n,s]=x.useState("connecting"),[o,c]=x.useState(null),[i,a]=x.useState(!1),[u,m]=x.useState(null),[d,g]=x.useState(!1),_=x.useRef(new Set);return x.useEffect(()=>{if(_.current=new Set,r([]),c(null),m(null),g(!1),!e){s("connecting");return}s("connecting");const w=new EventSource(`/api/radar/transcript/${encodeURIComponent(e)}`);return w.addEventListener("hello",()=>s("waiting")),w.addEventListener("waiting",()=>s("waiting")),w.addEventListener("end",()=>s("ended")),w.addEventListener("error",v=>{try{if(v.data){const p=JSON.parse(v.data);p.message&&c(p.message)}}catch{}s("error")}),w.addEventListener("event",v=>{try{const p=JSON.parse(v.data);if(_.current.has(p.uuid))return;_.current.add(p.uuid),r(h=>[...h,p]),s("streaming")}catch(p){c(p instanceof Error?p.message:String(p))}}),w.addEventListener("meta",v=>{try{const p=JSON.parse(v.data);p.kind==="permission-mode"&&typeof p.mode=="string"?m(p.mode):p.kind==="pty-active"&&typeof p.active=="boolean"&&g(p.active)}catch{}}),()=>{w.close()}},[e]),x.useEffect(()=>{if(a(!1),t.length===0)return;const w=t[t.length-1];if(w.role!=="assistant"||w.blocks.length===0)return;const v=w.blocks[w.blocks.length-1];if(v.type!=="text"&&v.type!=="thinking")return;const p=setTimeout(()=>a(!0),SA);return()=>clearTimeout(p)},[t]),{events:t,status:n,error:o,awaitingInput:i,permissionMode:u,ptyActive:d}}function xA({sessionId:e,canReply:t,drawerOpen:r}){const{events:n,status:s,error:o,awaitingInput:c,permissionMode:i,ptyActive:a}=wA(e),u=x.useMemo(()=>IA(n,i),[n,i]),m=n.length>0,d=!!(t&&!r),g=!!(a&&t),_=x.useRef(null),w=x.useRef(!0),[v,p]=x.useState(!0),h=x.useCallback(()=>{const C=_.current;return C?C.scrollTop+C.clientHeight>=C.scrollHeight-60:!0},[]),l=x.useCallback(()=>{const C=h();w.current=C,p(C)},[h]),f=x.useCallback(()=>{const C=_.current;C&&(C.scrollTop=C.scrollHeight,w.current=!0,p(!0))},[]);x.useEffect(()=>{if(!w.current)return;const C=_.current;if(!C)return;const b=requestAnimationFrame(()=>{C.scrollTop=C.scrollHeight});return()=>cancelAnimationFrame(b)},[n]);const S=x.useMemo(()=>{const C=new Map;for(const b of n)for(const R of b.blocks)R.type==="tool_use"&&C.set(R.id,R.name);return C},[n]),E=x.useMemo(()=>{const C=new Map;for(const b of n)for(const R of b.blocks)R.type==="tool_result"&&R.toolUseId&&C.set(R.toolUseId,{content:R.content,isError:R.isError});return C},[n]);if(!e)return y.jsx("div",{className:"h-full flex items-center justify-center text-sm text-muted-foreground",children:"Select a ping to view its analysis."});const k=[];for(const C of n)C.blocks.forEach((b,R)=>{k.push({ev:C,block:b,key:`${C.uuid}:${R}`})});return y.jsxs("div",{className:"h-full flex flex-col min-h-0",children:[y.jsxs("div",{className:"px-4 py-2 border-b border-border flex items-center gap-3 text-xs text-muted-foreground shrink-0",children:[y.jsx(bA,{status:s}),c&&t&&y.jsx("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-emerald-500/15 text-emerald-400 animate-pulse",children:"waiting for you"}),o&&y.jsx("span",{className:"text-red-400",children:o}),y.jsxs("span",{className:"ml-auto font-mono",children:[n.length," message",n.length===1?"":"s"]})]}),g&&y.jsxs("div",{className:"border-b border-amber-500/30 bg-amber-500/10 px-4 py-2 text-xs text-amber-300 shrink-0 flex items-center gap-2",children:[y.jsx("span",{className:"animate-pulse",children:"●"}),y.jsxs("span",{children:["Claude is rendering something in the terminal that hasn't been written to the transcript yet (usually an",y.jsx("span",{className:"font-mono",children:" AskUserQuestion"})," dialog).",y.jsx("span",{className:"ml-1 text-amber-200",children:"Use Show Terminal to see and answer."})]})]}),y.jsxs("div",{className:"flex-1 min-h-0 relative",children:[y.jsxs("div",{ref:_,onScroll:l,className:"absolute inset-0 overflow-y-auto overflow-x-hidden px-4 py-3 space-y-2",children:[k.length===0&&s==="waiting"&&y.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"Session starting · waiting for first message…"}),k.map(({ev:C,block:b,key:R})=>y.jsx(CA,{ev:C,block:b,toolNameById:S,toolResultById:E},R))]}),!v&&y.jsxs("button",{type:"button",onClick:f,className:"absolute bottom-3 right-4 z-10 px-3 py-1.5 text-xs font-medium rounded-full bg-emerald-500/25 text-emerald-200 hover:bg-emerald-500/40 backdrop-blur shadow-lg transition-colors flex items-center gap-1",children:[y.jsx("span",{children:"↓"}),y.jsx("span",{children:"Jump to bottom"})]})]}),m&&y.jsx(jA,{meta:u,drawerOpen:r}),d&&y.jsx($A,{sessionId:e,disabled:!!r,awaitingInput:c})]})}function bA({status:e}){const t={connecting:"connecting…",waiting:"waiting",streaming:"streaming",ended:"ended",error:"error"}[e],r={connecting:"bg-zinc-500/15 text-zinc-300",waiting:"bg-amber-500/15 text-amber-400",streaming:"bg-emerald-500/15 text-emerald-400",ended:"bg-blue-500/15 text-blue-300",error:"bg-red-500/15 text-red-400"};return y.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full font-medium ${r[e]}`,children:t})}function CA({ev:e,block:t,toolNameById:r,toolResultById:n}){const s=e.isSidechain?"ml-6 border-l-2 border-violet-500/40 pl-3":"";switch(t.type){case"text":return e.role==="user"?y.jsx(Hr,{tone:"user",sidechain:s,children:y.jsx(EA,{text:t.text})}):y.jsx(Hr,{tone:"assistant",sidechain:s,children:y.jsx(kA,{text:t.text})});case"thinking":return y.jsx(Hr,{tone:"thinking",sidechain:s,children:y.jsx(RA,{text:t.text})});case"tool_use":return t.name==="AskUserQuestion"?y.jsx(Hr,{tone:"ask",sidechain:s,children:y.jsx(DA,{input:t.input,result:n.get(t.id)})}):y.jsx(Hr,{tone:"tool",sidechain:s,children:y.jsx(PA,{name:t.name,input:t.input})});case"tool_result":return y.jsx(Hr,{tone:"tool",sidechain:s,children:y.jsx(TA,{content:t.content,isError:t.isError,parentName:r.get(t.toolUseId)})});case"image":return y.jsx(Hr,{tone:"user",sidechain:s,children:y.jsx("img",{src:`data:${t.mediaType};base64,${t.dataBase64}`,alt:"attachment",className:"max-w-full rounded border border-border"})})}}function Hr({tone:e,sidechain:t,children:r}){const n={user:"border-emerald-500/30 bg-emerald-500/5",assistant:"border-border bg-zinc-500/5",thinking:"border-zinc-700/40 bg-zinc-500/5",tool:"border-amber-500/30 bg-amber-500/5",ask:"border-violet-500/40 bg-violet-500/5"}[e];return y.jsx("div",{className:`rounded border ${n} ${t}`,children:r})}function EA({text:e}){return y.jsxs("div",{className:"px-3 py-2",children:[y.jsx("div",{className:"text-[10px] uppercase tracking-wide text-emerald-400/70 mb-1",children:"User"}),y.jsx("div",{className:"text-sm whitespace-pre-wrap break-words",children:e})]})}function kA({text:e}){return y.jsxs("div",{className:"px-3 py-2",children:[y.jsx("div",{className:"text-[10px] uppercase tracking-wide text-zinc-400 mb-1",children:"Claude"}),y.jsx("div",{className:"text-sm whitespace-pre-wrap break-words",children:e})]})}function RA({text:e}){const[t,r]=x.useState(!1),n=e.split(`
292
- `).length;return y.jsxs("div",{className:"px-3 py-2",children:[y.jsxs("button",{type:"button",onClick:()=>r(s=>!s),className:"text-[10px] uppercase tracking-wide text-zinc-500 hover:text-zinc-300 flex items-center gap-1",children:[y.jsx("span",{children:t?"▾":"▸"}),y.jsxs("span",{children:["Thinking · ",n," line",n===1?"":"s"]})]}),t&&y.jsx("div",{className:"text-xs whitespace-pre-wrap break-words text-zinc-400 italic mt-2 font-mono",children:e})]})}function PA({name:e,input:t}){const[r,n]=x.useState(!1),s=LA(e,t),o=x.useMemo(()=>Yo(t),[t]);return y.jsxs("div",{className:"px-3 py-2",children:[y.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full text-left flex items-baseline gap-2 min-w-0",children:[y.jsx("span",{className:"text-[10px] uppercase tracking-wide text-amber-400/80 shrink-0",children:r?"▾":"▸"}),y.jsx("span",{className:"text-sm font-medium text-amber-300 font-mono shrink-0",children:e}),y.jsx("span",{className:"text-xs text-zinc-400 font-mono truncate flex-1 min-w-0",children:s})]}),r&&y.jsx("pre",{className:"mt-2 text-xs text-zinc-300 font-mono whitespace-pre-wrap break-words bg-black/30 rounded p-2 max-h-96 overflow-y-auto",children:o})]})}function TA({content:e,isError:t,parentName:r}){const[n,s]=x.useState(!1),o=typeof e=="string"?e:Yo(e),c=o.split(`
293
- `).slice(0,1).join("").trim(),i=o.split(`
294
- `).length,a=c.length>140?c.slice(0,140)+"…":c;return y.jsxs("div",{className:"px-3 py-2",children:[y.jsxs("button",{type:"button",onClick:()=>s(u=>!u),className:"w-full text-left flex items-baseline gap-2 min-w-0",children:[y.jsx("span",{className:"text-[10px] uppercase tracking-wide text-amber-400/80 shrink-0",children:n?"▾":"▸"}),y.jsxs("span",{className:`text-[10px] uppercase tracking-wide font-mono shrink-0 ${t?"text-red-400":"text-zinc-500"}`,children:["↳ ",r??"result",t?" · error":""," · ",i," line",i===1?"":"s"]}),y.jsx("span",{className:"text-xs text-zinc-400 font-mono truncate flex-1 min-w-0",children:a})]}),n&&y.jsx("pre",{className:"mt-2 text-xs text-zinc-300 font-mono whitespace-pre-wrap break-words bg-black/30 rounded p-2 max-h-96 overflow-y-auto",children:o})]})}function LA(e,t){if(!t||typeof t!="object")return"";const r=t;if(typeof r.command=="string")return r.command;if(typeof r.file_path=="string")return r.file_path;if(typeof r.path=="string")return r.path;if(typeof r.pattern=="string")return r.pattern;if(typeof r.query=="string")return r.query;if(typeof r.url=="string")return r.url;if(typeof r.description=="string")return r.description;for(const n of Object.values(r))if(typeof n=="string")return n;return`(${e})`}function Yo(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function AA(e){if(!e||typeof e!="object")return!1;const t=e.questions;return Array.isArray(t)&&t.every(r=>r&&typeof r=="object"&&typeof r.question=="string"&&Array.isArray(r.options))}function DA({input:e,result:t}){if(!AA(e))return y.jsxs("div",{className:"px-3 py-2",children:[y.jsx("div",{className:"text-[10px] uppercase tracking-wide text-violet-300/80 mb-1",children:"AskUserQuestion"}),y.jsx("pre",{className:"text-xs text-zinc-300 font-mono whitespace-pre-wrap break-words bg-black/30 rounded p-2 max-h-80 overflow-y-auto",children:Yo(e)})]});const r=!!t,n=t?typeof t.content=="string"?t.content:Yo(t.content):null;return y.jsxs("div",{className:"px-3 py-2 space-y-3",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-[10px] uppercase tracking-wide text-violet-300/80",children:"AskUserQuestion"}),r&&y.jsx("span",{className:`text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded ${t!=null&&t.isError?"bg-amber-500/15 text-amber-300":"bg-emerald-500/15 text-emerald-300"}`,children:t!=null&&t.isError?"rejected":"answered"})]}),e.questions.map((s,o)=>y.jsx(MA,{q:s,answered:r,resultText:n},o)),r&&n&&y.jsxs("details",{className:"text-xs",children:[y.jsx("summary",{className:"cursor-pointer text-violet-300/80 hover:text-violet-200",children:"▸ user response"}),y.jsx("pre",{className:"mt-2 text-xs text-zinc-300 font-mono whitespace-pre-wrap break-words bg-black/30 rounded p-2 max-h-80 overflow-y-auto",children:n})]}),!r&&y.jsx("div",{className:"text-[11px] text-violet-300/70 border-t border-violet-500/20 pt-2",children:"Read-only preview · use Show Terminal to answer."})]})}function MA({q:e,answered:t,resultText:r}){return y.jsxs("div",{className:"space-y-1.5",children:[y.jsxs("div",{className:"text-sm font-medium text-zinc-100",children:[e.header&&y.jsx("span",{className:"text-[10px] uppercase tracking-wide text-violet-300/70 mr-2",children:e.header}),e.question]}),y.jsx("div",{className:"space-y-1",children:e.options.map((n,s)=>{const o=!!r&&NA(n.label,r);return y.jsxs("label",{className:`flex items-start gap-2 rounded px-2 py-1.5 text-sm cursor-default ${t?"":"opacity-70"} ${o?"bg-violet-500/15 ring-1 ring-violet-400/40":""}`,children:[y.jsx("input",{type:e.multiSelect?"checkbox":"radio",name:`q${e.question.slice(0,24)}`,checked:o,readOnly:!0,disabled:!0,className:"mt-1 accent-violet-400"}),y.jsxs("span",{className:"min-w-0",children:[y.jsx("span",{className:"text-zinc-100",children:n.label}),n.description&&y.jsx("span",{className:"block text-xs text-zinc-400 mt-0.5",children:n.description})]})]},s)})})]})}function NA(e,t){return e?t.includes(`"${e}"`)||t.includes(`= ${e}`)||t.includes(`: ${e}`):!1}function IA(e,t){var c;let r=null,n=null,s=null,o=null;for(let i=e.length-1;i>=0;i--){const a=e[i];if(!r&&a.cwd&&(r=a.cwd.split("/").filter(Boolean).pop()??a.cwd),!n&&a.gitBranch&&(n=a.gitBranch),!s&&((c=a.usage)!=null&&c.model)&&(s=a.usage.model),o===null&&a.usage){const u=(a.usage.inputTokens??0)+(a.usage.cacheReadTokens??0)+(a.usage.cacheCreationTokens??0),m=OA(a.usage.model);u>0&&m>0&&(o=Math.min(100,Math.round(u/m*100)))}if(r&&n&&s&&o!==null)break}return{cwdLabel:r,gitBranch:n,model:s,contextPct:o,permissionMode:t}}function OA(e){return e&&/\[1m\]/i.test(e)?1e6:2e5}function jA({meta:e,drawerOpen:t}){const r=[];return e.cwdLabel&&r.push({label:"cwd",value:e.cwdLabel}),e.gitBranch&&r.push({label:"git",value:`⌥ ${e.gitBranch}`}),e.contextPct!==null&&r.push({label:"ctx",value:`~${e.contextPct}%`}),e.permissionMode&&r.push({label:"perm",value:BA(e.permissionMode)}),e.model&&r.push({label:"model",value:FA(e.model)}),r.length===0?null:y.jsx("div",{className:`border-t border-border px-4 py-1.5 shrink-0 text-[11px] font-mono text-muted-foreground flex items-center gap-3 overflow-hidden ${t?"opacity-50":""}`,children:r.map((n,s)=>y.jsxs("span",{className:"truncate min-w-0",children:[y.jsxs("span",{className:"text-zinc-500",children:[n.label,":"]})," ",y.jsx("span",{className:"text-zinc-300",children:n.value})]},s))})}function BA(e){switch(e){case"bypassPermissions":return"bypass";case"acceptEdits":return"accept-edits";case"plan":return"plan";case"default":return"default";default:return e}}function FA(e){const t=e.match(/(?:claude-)?(opus|sonnet|haiku)-(\d+-\d+)(?:-\d+)?(\[1m\])?/i);return t?`${t[1].toLowerCase()}-${t[2]}${t[3]??""}`:e}function $A({sessionId:e,disabled:t,awaitingInput:r}){const[n,s]=x.useState(""),[o,c]=x.useState(!1),[i,a]=x.useState(null),[u,m]=x.useState(0),d=x.useRef(null);x.useEffect(()=>{if(u<=0)return;const h=setTimeout(()=>m(l=>Math.max(0,l-1)),1e3);return()=>clearTimeout(h)},[u]),x.useEffect(()=>{r&&!n&&d.current&&document.activeElement!==d.current&&d.current.focus()},[r,n]),x.useEffect(()=>{const h=d.current;h&&(h.style.height="auto",h.style.height=Math.min(160,h.scrollHeight)+"px")},[n]);const g=async()=>{const h=n.trim();if(!(!e||!h||o)){c(!0),a(null);try{const l=await fetch(`/api/radar/input/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:h})}),f=l.headers.get("content-type")??"";if(!f.includes("application/json"))throw new Error(`endpoint not found on server (got ${l.status} ${f||"no content-type"}). restart radar to load the new bundle.`);const S=await l.json().catch(()=>null);if(!l.ok||(S==null?void 0:S.ok)!==!0)throw new Error((S==null?void 0:S.error)??`HTTP ${l.status}`);s("")}catch(l){a(l instanceof Error?l.message:String(l))}finally{c(!1)}}},_=t||!e,w=!_&&!r,v=_||o||u>0,p=async()=>{if(!(!e||v)){m(5),a(null);try{const h=await fetch(`/api/radar/interrupt/${encodeURIComponent(e)}`,{method:"POST"}),l=h.headers.get("content-type")??"";if(!l.includes("application/json"))throw new Error(`endpoint not found on server (got ${h.status} ${l||"no content-type"}). restart radar to load the new bundle.`);const f=await h.json().catch(()=>null);if(!h.ok||(f==null?void 0:f.ok)!==!0)throw new Error((f==null?void 0:f.error)??`HTTP ${h.status}`)}catch(h){a(h instanceof Error?h.message:String(h))}}};return y.jsxs("div",{className:"border-t border-border bg-background/40 px-3 py-2 shrink-0 flex flex-col gap-1",children:[y.jsxs("div",{className:"flex items-end gap-2",children:[y.jsx("textarea",{ref:d,value:n,onChange:h=>s(h.target.value),onKeyDown:h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),g())},placeholder:_?t?"Terminal is open — close it to use the textbox":"No active session":r?"Reply to Claude…":"Type ahead — Claude will pick it up after the current turn",disabled:_||o,rows:1,className:"flex-1 min-w-0 resize-none rounded border border-border bg-background px-3 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-emerald-500/50 disabled:opacity-50"}),w&&y.jsx("button",{type:"button",onClick:()=>void p(),disabled:v,title:u>0?`wait ${u}s before another stop`:"Send Ctrl+C to interrupt Claude",className:"px-3 py-1.5 text-xs font-medium rounded bg-amber-500/20 text-amber-300 hover:bg-amber-500/35 disabled:opacity-40 disabled:hover:bg-amber-500/20 transition-colors shrink-0",children:u>0?`stop · ${u}s`:"Stop"}),y.jsx("button",{type:"button",onClick:()=>void g(),disabled:_||o||!n.trim(),className:"px-4 py-1.5 text-xs font-medium rounded bg-emerald-500/25 text-emerald-200 hover:bg-emerald-500/40 disabled:opacity-40 disabled:hover:bg-emerald-500/25 transition-colors shrink-0",children:o?"sending…":"Send"})]}),i&&y.jsxs("span",{className:"text-[11px] text-red-400",children:["send failed: ",i]})]})}const HA=2e3;function zA(){const[e,t]=x.useState("starting"),[r,n]=x.useState([]),[s,o]=x.useState(!1),c=x.useRef(null),i=x.useRef(!1);x.useEffect(()=>{i.current=!1;const _=()=>{const w=window.location.protocol==="https:"?"wss:":"ws:",v=new WebSocket(`${w}//${window.location.host}/api/radar/stream`);c.current=v,v.onopen=()=>o(!0),v.onmessage=p=>{let h;try{h=JSON.parse(typeof p.data=="string"?p.data:"")}catch{return}h.type==="snapshot"?(t(h.status),n(h.pings)):h.type==="ping"?n(l=>l.some(f=>f.id===h.ping.id)?l:[h.ping,...l]):h.type==="ping_state"?n(l=>{const f=l.findIndex(E=>E.id===h.ping.id);if(f===-1)return[h.ping,...l];const S=l.slice();return S[f]=h.ping,S}):h.type==="status"&&t(h.status)},v.onclose=()=>{o(!1),!i.current&&setTimeout(_,HA)},v.onerror=()=>{try{v.close()}catch{}}};return _(),()=>{var w;i.current=!0;try{(w=c.current)==null||w.close()}catch{}}},[]);const a=x.useCallback(async(_,w)=>{await fetch(`/api/radar/ping/${encodeURIComponent(_)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:w})})},[]),u=x.useCallback(_=>a(_,"handled"),[a]),m=x.useCallback(_=>a(_,"dismissed"),[a]),d=x.useCallback(_=>a(_,"restart"),[a]),g=x.useCallback(_=>a(_,"resume"),[a]);return{status:e,pings:r,connected:s,markHandled:u,dismiss:m,restart:d,resume:g}}function WA(e){switch(e){case"starting":return{text:"starting…",tone:"wait"};case"tunneling":return{text:"opening tunnel…",tone:"wait"};case"registering":return{text:"registering…",tone:"wait"};case"pending":return{text:"pending approval",tone:"wait"};case"live":return{text:"listening",tone:"live"};case"deactivated":return{text:"deactivated",tone:"stop"};case"error":return{text:"error",tone:"err"}}}const UA={wait:"bg-amber-500/15 text-amber-400",live:"bg-emerald-500/15 text-emerald-400",stop:"bg-zinc-500/20 text-zinc-300",err:"bg-red-500/15 text-red-400"};function VA(){const{status:e,pings:t,connected:r,markHandled:n,dismiss:s,restart:o,resume:c}=zA(),[i,a]=x.useState(null),[u,m]=x.useState(!1),[d,g]=x.useState(!1),_=WA(e);x.useEffect(()=>{i&&!t.some(l=>l.id===i)&&a(null)},[i,t]),x.useEffect(()=>{m(!1),g(!1)},[i]);const w=i?t.find(l=>l.id===i)??null:null,v=(w==null?void 0:w.analysisSessionId)??null,p=()=>{g(!0),m(!0)},h=e==="live"?"No pings yet. Waiting…":e==="pending"?"Webhook pending approval. Approve it in LaunchSecure to start receiving pings.":e==="deactivated"?"Webhook deactivated. Restart LaunchPod to register again.":"Starting up…";return y.jsxs("div",{className:"h-screen flex flex-col bg-background text-foreground",children:[y.jsxs("header",{className:"border-b border-border px-6 py-3 flex items-center justify-between shrink-0",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("h1",{className:"text-lg font-semibold",children:"Radar"}),y.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${UA[_.tone]}`,children:_.text}),!r&&y.jsx("span",{className:"text-xs text-muted-foreground",children:"reconnecting…"})]}),y.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.length," ping",t.length===1?"":"s"]})]}),y.jsxs("div",{className:"flex-1 grid grid-cols-[minmax(320px,28rem)_minmax(0,1fr)] min-h-0",children:[y.jsx("aside",{className:"border-r border-border min-h-0 overflow-hidden flex flex-col",children:y.jsx(yA,{pings:t,selectedId:i,onSelect:a,onHandle:l=>{n(l)},onDismiss:l=>{s(l)},onRestart:l=>{o(l)},onResume:l=>{c(l)},emptyState:h})}),y.jsx("main",{className:"min-h-0 relative flex flex-col",children:w?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"border-b border-border px-3 py-1.5 flex items-center justify-end gap-1 shrink-0 bg-background/50 min-h-[34px]",children:w.state==="analyzing"&&y.jsx("button",{type:"button",onClick:p,className:"px-3 py-1 text-xs font-medium rounded-full transition-colors bg-zinc-500/15 text-zinc-300 hover:bg-zinc-500/25",children:"Show Terminal"})}),y.jsx("div",{className:"flex-1 min-h-0",children:y.jsx(xA,{sessionId:v,canReply:w.state==="analyzing",drawerOpen:u})})]}):y.jsx("div",{className:"h-full flex items-center justify-center text-sm text-muted-foreground",children:"Select a ping to view its analysis."})})]}),w&&d&&y.jsx(qy,{open:u,onClose:()=>m(!1),autoSessionId:v},w.id)]})}function KA(){const[e,t]=x.useState(null);return x.useEffect(()=>{fetch("/api/auth").then(r=>r.json()).then(r=>t({authenticated:r.authenticated??!1,mode:r.mode==="radar"?"radar":"pipeline"})).catch(()=>t({authenticated:!1,mode:"pipeline"}))},[]),e===null?y.jsx(RL,{fullPage:!0}):e.mode==="radar"?y.jsx(VA,{}):y.jsxs(p1,{children:[y.jsx(Ec,{path:"/login",element:e.authenticated?y.jsx(Kh,{to:"/",replace:!0}):y.jsx(IL,{onSuccess:()=>t({...e,authenticated:!0})})}),y.jsx(Ec,{path:"/",element:e.authenticated?y.jsx(pA,{onLogout:()=>t({...e,authenticated:!1})}):y.jsx(Kh,{to:"/login",replace:!0})})]})}Al.createRoot(document.getElementById("root")).render(y.jsx(Ve.StrictMode,{children:y.jsx(v1,{children:y.jsx(S1,{children:y.jsx(KA,{})})})}));