@vibe80/vibe80 0.2.1 → 0.2.2

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 (55) hide show
  1. package/README.md +93 -4
  2. package/bin/vibe80.js +1728 -16
  3. package/client/dist/assets/{DiffPanel-Luk1GrAd.js → DiffPanel-BUJhQj_Q.js} +1 -1
  4. package/client/dist/assets/{ExplorerPanel-CGVmxql1.js → ExplorerPanel-DugEeaO2.js} +1 -1
  5. package/client/dist/assets/{LogsPanel-D8Z8Zam8.js → LogsPanel-BQrGxMu_.js} +1 -1
  6. package/client/dist/assets/{SettingsPanel-H2q2eoDf.js → SettingsPanel-Ci2BdIYO.js} +1 -1
  7. package/client/dist/assets/{TerminalPanel-kEz-cjes.js → TerminalPanel-C-T3t-6T.js} +1 -1
  8. package/client/dist/assets/index-cFi4LM0j.js +711 -0
  9. package/client/dist/assets/index-qNyFxUjK.css +32 -0
  10. package/client/dist/icon_square-512x512.png +0 -0
  11. package/client/dist/icon_square.svg +58 -0
  12. package/client/dist/index.html +3 -2
  13. package/client/dist/sw.js +1 -1
  14. package/client/index.html +1 -0
  15. package/client/public/icon_square-512x512.png +0 -0
  16. package/client/public/icon_square.svg +58 -0
  17. package/client/src/App.jsx +204 -2
  18. package/client/src/assets/vibe80_dark.png +0 -0
  19. package/client/src/assets/vibe80_light.png +0 -0
  20. package/client/src/components/Chat/ChatMessages.jsx +1 -1
  21. package/client/src/components/SessionGate/SessionGate.jsx +282 -90
  22. package/client/src/components/WorktreeTabs.css +11 -0
  23. package/client/src/components/WorktreeTabs.jsx +77 -47
  24. package/client/src/hooks/useChatSocket.js +8 -7
  25. package/client/src/hooks/useRepoBranchesModels.js +12 -6
  26. package/client/src/hooks/useWorktreeCloseConfirm.js +19 -7
  27. package/client/src/hooks/useWorktrees.js +3 -1
  28. package/client/src/index.css +26 -3
  29. package/client/src/locales/en.json +12 -1
  30. package/client/src/locales/fr.json +12 -1
  31. package/docs/api/openapi.json +1 -1
  32. package/package.json +2 -1
  33. package/server/scripts/rotate-workspace-secret.js +1 -1
  34. package/server/src/claudeClient.js +3 -3
  35. package/server/src/codexClient.js +3 -3
  36. package/server/src/config.js +6 -6
  37. package/server/src/index.js +14 -12
  38. package/server/src/middleware/auth.js +7 -7
  39. package/server/src/middleware/debug.js +36 -4
  40. package/server/src/providerLogger.js +2 -2
  41. package/server/src/routes/sessions.js +133 -21
  42. package/server/src/routes/workspaces.js +1 -1
  43. package/server/src/runAs.js +14 -14
  44. package/server/src/services/auth.js +3 -3
  45. package/server/src/services/session.js +182 -14
  46. package/server/src/services/workspace.js +86 -42
  47. package/server/src/storage/index.js +2 -2
  48. package/server/src/storage/redis.js +38 -36
  49. package/server/src/storage/sqlite.js +13 -13
  50. package/server/src/worktreeManager.js +87 -19
  51. package/server/tests/integration/routes/workspaces-routes.test.js +8 -8
  52. package/server/tests/setup/env.js +5 -5
  53. package/server/tests/unit/services/auth.test.js +3 -3
  54. package/client/dist/assets/index-BDQQz6SJ.css +0 -32
  55. package/client/dist/assets/index-knjescVH.js +0 -711
@@ -1,711 +0,0 @@
1
- function cE(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var Kl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q1={exports:{}},Pc={},Y1={exports:{}},ze={};/**
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 ra=Symbol.for("react.element"),uE=Symbol.for("react.portal"),fE=Symbol.for("react.fragment"),hE=Symbol.for("react.strict_mode"),dE=Symbol.for("react.profiler"),pE=Symbol.for("react.provider"),mE=Symbol.for("react.context"),gE=Symbol.for("react.forward_ref"),vE=Symbol.for("react.suspense"),_E=Symbol.for("react.memo"),yE=Symbol.for("react.lazy"),mg=Symbol.iterator;function wE(e){return e===null||typeof e!="object"?null:(e=mg&&e[mg]||e["@@iterator"],typeof e=="function"?e:null)}var J1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X1=Object.assign,Q1={};function bs(e,t,r){this.props=e,this.context=t,this.refs=Q1,this.updater=r||J1}bs.prototype.isReactComponent={};bs.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")};bs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Z1(){}Z1.prototype=bs.prototype;function Pd(e,t,r){this.props=e,this.context=t,this.refs=Q1,this.updater=r||J1}var Td=Pd.prototype=new Z1;Td.constructor=Pd;X1(Td,bs.prototype);Td.isPureReactComponent=!0;var gg=Array.isArray,e0=Object.prototype.hasOwnProperty,Dd={current:null},t0={key:!0,ref:!0,__self:!0,__source:!0};function r0(e,t,r){var n,i={},s=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)e0.call(t,n)&&!t0.hasOwnProperty(n)&&(i[n]=t[n]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var l=Array(o),c=0;c<o;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return{$$typeof:ra,type:e,key:s,ref:a,props:i,_owner:Dd.current}}function bE(e,t){return{$$typeof:ra,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Id(e){return typeof e=="object"&&e!==null&&e.$$typeof===ra}function SE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var vg=/\/+/g;function Fu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?SE(""+e.key):t.toString(36)}function Sl(e,t,r,n,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ra:case uE:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+Fu(a,0):n,gg(i)?(r="",e!=null&&(r=e.replace(vg,"$&/")+"/"),Sl(i,t,r,"",function(c){return c})):i!=null&&(Id(i)&&(i=bE(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(vg,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",gg(e))for(var o=0;o<e.length;o++){s=e[o];var l=n+Fu(s,o);a+=Sl(s,t,r,l,i)}else if(l=wE(e),typeof l=="function")for(e=l.call(e),o=0;!(s=e.next()).done;)s=s.value,l=n+Fu(s,o++),a+=Sl(s,t,r,l,i);else if(s==="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 a}function Fa(e,t,r){if(e==null)return e;var n=[],i=0;return Sl(e,n,"","",function(s){return t.call(r,s,i++)}),n}function CE(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 zt={current:null},Cl={transition:null},kE={ReactCurrentDispatcher:zt,ReactCurrentBatchConfig:Cl,ReactCurrentOwner:Dd};function n0(){throw Error("act(...) is not supported in production builds of React.")}ze.Children={map:Fa,forEach:function(e,t,r){Fa(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Fa(e,function(){t++}),t},toArray:function(e){return Fa(e,function(t){return t})||[]},only:function(e){if(!Id(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ze.Component=bs;ze.Fragment=fE;ze.Profiler=dE;ze.PureComponent=Pd;ze.StrictMode=hE;ze.Suspense=vE;ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kE;ze.act=n0;ze.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=X1({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=Dd.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)e0.call(t,l)&&!t0.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){o=Array(l);for(var c=0;c<l;c++)o[c]=arguments[c+2];n.children=o}return{$$typeof:ra,type:e.type,key:i,ref:s,props:n,_owner:a}};ze.createContext=function(e){return e={$$typeof:mE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pE,_context:e},e.Consumer=e};ze.createElement=r0;ze.createFactory=function(e){var t=r0.bind(null,e);return t.type=e,t};ze.createRef=function(){return{current:null}};ze.forwardRef=function(e){return{$$typeof:gE,render:e}};ze.isValidElement=Id;ze.lazy=function(e){return{$$typeof:yE,_payload:{_status:-1,_result:e},_init:CE}};ze.memo=function(e,t){return{$$typeof:_E,type:e,compare:t===void 0?null:t}};ze.startTransition=function(e){var t=Cl.transition;Cl.transition={};try{e()}finally{Cl.transition=t}};ze.unstable_act=n0;ze.useCallback=function(e,t){return zt.current.useCallback(e,t)};ze.useContext=function(e){return zt.current.useContext(e)};ze.useDebugValue=function(){};ze.useDeferredValue=function(e){return zt.current.useDeferredValue(e)};ze.useEffect=function(e,t){return zt.current.useEffect(e,t)};ze.useId=function(){return zt.current.useId()};ze.useImperativeHandle=function(e,t,r){return zt.current.useImperativeHandle(e,t,r)};ze.useInsertionEffect=function(e,t){return zt.current.useInsertionEffect(e,t)};ze.useLayoutEffect=function(e,t){return zt.current.useLayoutEffect(e,t)};ze.useMemo=function(e,t){return zt.current.useMemo(e,t)};ze.useReducer=function(e,t,r){return zt.current.useReducer(e,t,r)};ze.useRef=function(e){return zt.current.useRef(e)};ze.useState=function(e){return zt.current.useState(e)};ze.useSyncExternalStore=function(e,t,r){return zt.current.useSyncExternalStore(e,t,r)};ze.useTransition=function(){return zt.current.useTransition()};ze.version="18.3.1";Y1.exports=ze;var x=Y1.exports;const Tc=Lc(x),Nd=cE({__proto__:null,default:Tc},[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 xE=x,EE=Symbol.for("react.element"),AE=Symbol.for("react.fragment"),LE=Object.prototype.hasOwnProperty,PE=xE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TE={key:!0,ref:!0,__self:!0,__source:!0};function i0(e,t,r){var n,i={},s=null,a=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)LE.call(t,n)&&!TE.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:EE,type:e,key:s,ref:a,props:i,_owner:PE.current}}Pc.Fragment=AE;Pc.jsx=i0;Pc.jsxs=i0;q1.exports=Pc;var E=q1.exports,s0={exports:{}},or={},o0={exports:{}},a0={};/**
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(H,I){var L=H.length;H.push(I);e:for(;0<L;){var B=L-1>>>1,D=H[B];if(0<i(D,I))H[B]=I,H[L]=D,L=B;else break e}}function r(H){return H.length===0?null:H[0]}function n(H){if(H.length===0)return null;var I=H[0],L=H.pop();if(L!==I){H[0]=L;e:for(var B=0,D=H.length,T=D>>>1;B<T;){var $=2*(B+1)-1,Y=H[$],W=$+1,j=H[W];if(0>i(Y,L))W<D&&0>i(j,Y)?(H[B]=j,H[W]=L,B=W):(H[B]=Y,H[$]=L,B=$);else if(W<D&&0>i(j,L))H[B]=j,H[W]=L,B=W;else break e}}return I}function i(H,I){var L=H.sortIndex-I.sortIndex;return L!==0?L:H.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],c=[],h=1,u=null,m=3,v=!1,w=!1,_=!1,g=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(H){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=H)n(c),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(c)}}function y(H){if(_=!1,p(H),!w)if(r(l)!==null)w=!0,q(S);else{var I=r(c);I!==null&&Q(y,I.startTime-H)}}function S(H,I){w=!1,_&&(_=!1,d(C),C=-1),v=!0;var L=m;try{for(p(I),u=r(l);u!==null&&(!(u.expirationTime>I)||H&&!O());){var B=u.callback;if(typeof B=="function"){u.callback=null,m=u.priorityLevel;var D=B(u.expirationTime<=I);I=e.unstable_now(),typeof D=="function"?u.callback=D:u===r(l)&&n(l),p(I)}else n(l);u=r(l)}if(u!==null)var T=!0;else{var $=r(c);$!==null&&Q(y,$.startTime-I),T=!1}return T}finally{u=null,m=L,v=!1}}var b=!1,k=null,C=-1,A=5,P=-1;function O(){return!(e.unstable_now()-P<A)}function R(){if(k!==null){var H=e.unstable_now();P=H;var I=!0;try{I=k(!0,H)}finally{I?M():(b=!1,k=null)}}else b=!1}var M;if(typeof f=="function")M=function(){f(R)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,U=z.port2;z.port1.onmessage=R,M=function(){U.postMessage(null)}}else M=function(){g(R,0)};function q(H){k=H,b||(b=!0,M())}function Q(H,I){C=g(function(){H(e.unstable_now())},I)}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(H){H.callback=null},e.unstable_continueExecution=function(){w||v||(w=!0,q(S))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(H){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var L=m;m=I;try{return H()}finally{m=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,I){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var L=m;m=H;try{return I()}finally{m=L}},e.unstable_scheduleCallback=function(H,I,L){var B=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?B+L:B):L=B,H){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,H={id:h++,callback:I,priorityLevel:H,startTime:L,expirationTime:D,sortIndex:-1},L>B?(H.sortIndex=L,t(c,H),r(l)===null&&H===r(c)&&(_?(d(C),C=-1):_=!0,Q(y,L-B))):(H.sortIndex=D,t(l,H),w||v||(w=!0,q(S))),H},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(H){var I=m;return function(){var L=m;m=I;try{return H.apply(this,arguments)}finally{m=L}}}})(a0);o0.exports=a0;var DE=o0.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 IE=x,sr=DE;function de(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 l0=new Set,Lo={};function _i(e,t){us(e,t),us(e+"Capture",t)}function us(e,t){for(Lo[e]=t,e=0;e<t.length;e++)l0.add(t[e])}var en=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jf=Object.prototype.hasOwnProperty,NE=/^[: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]*$/,_g={},yg={};function RE(e){return Jf.call(yg,e)?!0:Jf.call(_g,e)?!1:NE.test(e)?yg[e]=!0:(_g[e]=!0,!1)}function OE(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 ME(e,t,r,n){if(t===null||typeof t>"u"||OE(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 $t(e,t,r,n,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var Pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pt[e]=new $t(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pt[t]=new $t(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pt[e]=new $t(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pt[e]=new $t(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){Pt[e]=new $t(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pt[e]=new $t(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pt[e]=new $t(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pt[e]=new $t(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pt[e]=new $t(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rd=/[\-:]([a-z])/g;function Od(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(Rd,Od);Pt[t]=new $t(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(Rd,Od);Pt[t]=new $t(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(Rd,Od);Pt[t]=new $t(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pt[e]=new $t(e,1,!1,e.toLowerCase(),null,!1,!1)});Pt.xlinkHref=new $t("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pt[e]=new $t(e,1,!1,e.toLowerCase(),null,!0,!0)});function Md(e,t,r,n){var i=Pt.hasOwnProperty(t)?Pt[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ME(t,r,i,n)&&(r=null),n||i===null?RE(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var ln=IE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,za=Symbol.for("react.element"),Ui=Symbol.for("react.portal"),Hi=Symbol.for("react.fragment"),jd=Symbol.for("react.strict_mode"),Xf=Symbol.for("react.profiler"),c0=Symbol.for("react.provider"),u0=Symbol.for("react.context"),Bd=Symbol.for("react.forward_ref"),Qf=Symbol.for("react.suspense"),Zf=Symbol.for("react.suspense_list"),Fd=Symbol.for("react.memo"),wn=Symbol.for("react.lazy"),f0=Symbol.for("react.offscreen"),wg=Symbol.iterator;function Ks(e){return e===null||typeof e!="object"?null:(e=wg&&e[wg]||e["@@iterator"],typeof e=="function"?e:null)}var ut=Object.assign,zu;function oo(e){if(zu===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);zu=t&&t[1]||""}return`
34
- `+zu+e}var $u=!1;function Uu(e,t){if(!e||$u)return"";$u=!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(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
- `),s=n.stack.split(`
36
- `),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var l=`
37
- `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=o);break}}}finally{$u=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?oo(e):""}function jE(e){switch(e.tag){case 5:return oo(e.type);case 16:return oo("Lazy");case 13:return oo("Suspense");case 19:return oo("SuspenseList");case 0:case 2:case 15:return e=Uu(e.type,!1),e;case 11:return e=Uu(e.type.render,!1),e;case 1:return e=Uu(e.type,!0),e;default:return""}}function eh(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 Hi:return"Fragment";case Ui:return"Portal";case Xf:return"Profiler";case jd:return"StrictMode";case Qf:return"Suspense";case Zf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case u0:return(e.displayName||"Context")+".Consumer";case c0:return(e._context.displayName||"Context")+".Provider";case Bd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fd:return t=e.displayName||null,t!==null?t:eh(e.type)||"Memo";case wn:t=e._payload,e=e._init;try{return eh(e(t))}catch{}}return null}function BE(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 eh(t);case 8:return t===jd?"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 jn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function h0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function FE(e){var t=h0(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 i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $a(e){e._valueTracker||(e._valueTracker=FE(e))}function d0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=h0(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Gl(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 th(e,t){var r=t.checked;return ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function bg(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=jn(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 p0(e,t){t=t.checked,t!=null&&Md(e,"checked",t,!1)}function rh(e,t){p0(e,t);var r=jn(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")?nh(e,t.type,r):t.hasOwnProperty("defaultValue")&&nh(e,t.type,jn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sg(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 nh(e,t,r){(t!=="number"||Gl(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ao=Array.isArray;function ts(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+jn(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ih(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(de(91));return ut({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Cg(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(de(92));if(ao(r)){if(1<r.length)throw Error(de(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:jn(r)}}function m0(e,t){var r=jn(t.value),n=jn(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 kg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function g0(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 sh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?g0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ua,v0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ua=Ua||document.createElement("div"),Ua.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ua.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Po(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ho={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},zE=["Webkit","ms","Moz","O"];Object.keys(ho).forEach(function(e){zE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ho[t]=ho[e]})});function _0(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ho.hasOwnProperty(e)&&ho[e]?(""+t).trim():t+"px"}function y0(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=_0(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var $E=ut({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 oh(e,t){if(t){if($E[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(de(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(de(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(de(61))}if(t.style!=null&&typeof t.style!="object")throw Error(de(62))}}function ah(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 lh=null;function zd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ch=null,rs=null,ns=null;function xg(e){if(e=sa(e)){if(typeof ch!="function")throw Error(de(280));var t=e.stateNode;t&&(t=Oc(t),ch(e.stateNode,e.type,t))}}function w0(e){rs?ns?ns.push(e):ns=[e]:rs=e}function b0(){if(rs){var e=rs,t=ns;if(ns=rs=null,xg(e),t)for(e=0;e<t.length;e++)xg(t[e])}}function S0(e,t){return e(t)}function C0(){}var Hu=!1;function k0(e,t,r){if(Hu)return e(t,r);Hu=!0;try{return S0(e,t,r)}finally{Hu=!1,(rs!==null||ns!==null)&&(C0(),b0())}}function To(e,t){var r=e.stateNode;if(r===null)return null;var n=Oc(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(de(231,t,typeof r));return r}var uh=!1;if(en)try{var Gs={};Object.defineProperty(Gs,"passive",{get:function(){uh=!0}}),window.addEventListener("test",Gs,Gs),window.removeEventListener("test",Gs,Gs)}catch{uh=!1}function UE(e,t,r,n,i,s,a,o,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(h){this.onError(h)}}var po=!1,ql=null,Yl=!1,fh=null,HE={onError:function(e){po=!0,ql=e}};function WE(e,t,r,n,i,s,a,o,l){po=!1,ql=null,UE.apply(HE,arguments)}function VE(e,t,r,n,i,s,a,o,l){if(WE.apply(this,arguments),po){if(po){var c=ql;po=!1,ql=null}else throw Error(de(198));Yl||(Yl=!0,fh=c)}}function yi(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 x0(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 Eg(e){if(yi(e)!==e)throw Error(de(188))}function KE(e){var t=e.alternate;if(!t){if(t=yi(e),t===null)throw Error(de(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return Eg(i),e;if(s===n)return Eg(i),t;s=s.sibling}throw Error(de(188))}if(r.return!==n.return)r=i,n=s;else{for(var a=!1,o=i.child;o;){if(o===r){a=!0,r=i,n=s;break}if(o===n){a=!0,n=i,r=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===r){a=!0,r=s,n=i;break}if(o===n){a=!0,n=s,r=i;break}o=o.sibling}if(!a)throw Error(de(189))}}if(r.alternate!==n)throw Error(de(190))}if(r.tag!==3)throw Error(de(188));return r.stateNode.current===r?e:t}function E0(e){return e=KE(e),e!==null?A0(e):null}function A0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=A0(e);if(t!==null)return t;e=e.sibling}return null}var L0=sr.unstable_scheduleCallback,Ag=sr.unstable_cancelCallback,GE=sr.unstable_shouldYield,qE=sr.unstable_requestPaint,dt=sr.unstable_now,YE=sr.unstable_getCurrentPriorityLevel,$d=sr.unstable_ImmediatePriority,P0=sr.unstable_UserBlockingPriority,Jl=sr.unstable_NormalPriority,JE=sr.unstable_LowPriority,T0=sr.unstable_IdlePriority,Dc=null,Fr=null;function XE(e){if(Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(Dc,e,void 0,(e.current.flags&128)===128)}catch{}}var xr=Math.clz32?Math.clz32:e3,QE=Math.log,ZE=Math.LN2;function e3(e){return e>>>=0,e===0?32:31-(QE(e)/ZE|0)|0}var Ha=64,Wa=4194304;function lo(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 Xl(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var o=a&~i;o!==0?n=lo(o):(s&=a,s!==0&&(n=lo(s)))}else a=r&~i,a!==0?n=lo(a):s!==0&&(n=lo(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&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-xr(t),i=1<<r,n|=e[r],t&=~i;return n}function t3(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 r3(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-xr(s),o=1<<a,l=i[a];l===-1?(!(o&r)||o&n)&&(i[a]=t3(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}}function hh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function D0(){var e=Ha;return Ha<<=1,!(Ha&4194240)&&(Ha=64),e}function Wu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function na(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xr(t),e[t]=r}function n3(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 i=31-xr(r),s=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~s}}function Ud(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-xr(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Qe=0;function I0(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var N0,Hd,R0,O0,M0,dh=!1,Va=[],En=null,An=null,Ln=null,Do=new Map,Io=new Map,Sn=[],i3="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 Lg(e,t){switch(e){case"focusin":case"focusout":En=null;break;case"dragenter":case"dragleave":An=null;break;case"mouseover":case"mouseout":Ln=null;break;case"pointerover":case"pointerout":Do.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Io.delete(t.pointerId)}}function qs(e,t,r,n,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},t!==null&&(t=sa(t),t!==null&&Hd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function s3(e,t,r,n,i){switch(t){case"focusin":return En=qs(En,e,t,r,n,i),!0;case"dragenter":return An=qs(An,e,t,r,n,i),!0;case"mouseover":return Ln=qs(Ln,e,t,r,n,i),!0;case"pointerover":var s=i.pointerId;return Do.set(s,qs(Do.get(s)||null,e,t,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,Io.set(s,qs(Io.get(s)||null,e,t,r,n,i)),!0}return!1}function j0(e){var t=ti(e.target);if(t!==null){var r=yi(t);if(r!==null){if(t=r.tag,t===13){if(t=x0(r),t!==null){e.blockedOn=t,M0(e.priority,function(){R0(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 kl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=ph(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);lh=n,r.target.dispatchEvent(n),lh=null}else return t=sa(r),t!==null&&Hd(t),e.blockedOn=r,!1;t.shift()}return!0}function Pg(e,t,r){kl(e)&&r.delete(t)}function o3(){dh=!1,En!==null&&kl(En)&&(En=null),An!==null&&kl(An)&&(An=null),Ln!==null&&kl(Ln)&&(Ln=null),Do.forEach(Pg),Io.forEach(Pg)}function Ys(e,t){e.blockedOn===t&&(e.blockedOn=null,dh||(dh=!0,sr.unstable_scheduleCallback(sr.unstable_NormalPriority,o3)))}function No(e){function t(i){return Ys(i,e)}if(0<Va.length){Ys(Va[0],e);for(var r=1;r<Va.length;r++){var n=Va[r];n.blockedOn===e&&(n.blockedOn=null)}}for(En!==null&&Ys(En,e),An!==null&&Ys(An,e),Ln!==null&&Ys(Ln,e),Do.forEach(t),Io.forEach(t),r=0;r<Sn.length;r++)n=Sn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Sn.length&&(r=Sn[0],r.blockedOn===null);)j0(r),r.blockedOn===null&&Sn.shift()}var is=ln.ReactCurrentBatchConfig,Ql=!0;function a3(e,t,r,n){var i=Qe,s=is.transition;is.transition=null;try{Qe=1,Wd(e,t,r,n)}finally{Qe=i,is.transition=s}}function l3(e,t,r,n){var i=Qe,s=is.transition;is.transition=null;try{Qe=4,Wd(e,t,r,n)}finally{Qe=i,is.transition=s}}function Wd(e,t,r,n){if(Ql){var i=ph(e,t,r,n);if(i===null)ef(e,t,n,Zl,r),Lg(e,n);else if(s3(i,e,t,r,n))n.stopPropagation();else if(Lg(e,n),t&4&&-1<i3.indexOf(e)){for(;i!==null;){var s=sa(i);if(s!==null&&N0(s),s=ph(e,t,r,n),s===null&&ef(e,t,n,Zl,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else ef(e,t,n,null,r)}}var Zl=null;function ph(e,t,r,n){if(Zl=null,e=zd(n),e=ti(e),e!==null)if(t=yi(e),t===null)e=null;else if(r=t.tag,r===13){if(e=x0(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 Zl=e,null}function B0(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(YE()){case $d:return 1;case P0:return 4;case Jl:case JE:return 16;case T0:return 536870912;default:return 16}default:return 16}}var kn=null,Vd=null,xl=null;function F0(){if(xl)return xl;var e,t=Vd,r=t.length,n,i="value"in kn?kn.value:kn.textContent,s=i.length;for(e=0;e<r&&t[e]===i[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===i[s-n];n++);return xl=i.slice(e,1<n?1-n:void 0)}function El(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 Ka(){return!0}function Tg(){return!1}function ar(e){function t(r,n,i,s,a){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ka:Tg,this.isPropagationStopped=Tg,this}return ut(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=Ka)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ka)},persist:function(){},isPersistent:Ka}),t}var Ss={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kd=ar(Ss),ia=ut({},Ss,{view:0,detail:0}),c3=ar(ia),Vu,Ku,Js,Ic=ut({},ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gd,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!==Js&&(Js&&e.type==="mousemove"?(Vu=e.screenX-Js.screenX,Ku=e.screenY-Js.screenY):Ku=Vu=0,Js=e),Vu)},movementY:function(e){return"movementY"in e?e.movementY:Ku}}),Dg=ar(Ic),u3=ut({},Ic,{dataTransfer:0}),f3=ar(u3),h3=ut({},ia,{relatedTarget:0}),Gu=ar(h3),d3=ut({},Ss,{animationName:0,elapsedTime:0,pseudoElement:0}),p3=ar(d3),m3=ut({},Ss,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g3=ar(m3),v3=ut({},Ss,{data:0}),Ig=ar(v3),_3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},y3={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"},w3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function b3(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=w3[e])?!!t[e]:!1}function Gd(){return b3}var S3=ut({},ia,{key:function(e){if(e.key){var t=_3[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=El(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?y3[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gd,charCode:function(e){return e.type==="keypress"?El(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?El(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),C3=ar(S3),k3=ut({},Ic,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ng=ar(k3),x3=ut({},ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gd}),E3=ar(x3),A3=ut({},Ss,{propertyName:0,elapsedTime:0,pseudoElement:0}),L3=ar(A3),P3=ut({},Ic,{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}),T3=ar(P3),D3=[9,13,27,32],qd=en&&"CompositionEvent"in window,mo=null;en&&"documentMode"in document&&(mo=document.documentMode);var I3=en&&"TextEvent"in window&&!mo,z0=en&&(!qd||mo&&8<mo&&11>=mo),Rg=" ",Og=!1;function $0(e,t){switch(e){case"keyup":return D3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function U0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wi=!1;function N3(e,t){switch(e){case"compositionend":return U0(t);case"keypress":return t.which!==32?null:(Og=!0,Rg);case"textInput":return e=t.data,e===Rg&&Og?null:e;default:return null}}function R3(e,t){if(Wi)return e==="compositionend"||!qd&&$0(e,t)?(e=F0(),xl=Vd=kn=null,Wi=!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 z0&&t.locale!=="ko"?null:t.data;default:return null}}var O3={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 Mg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!O3[e.type]:t==="textarea"}function H0(e,t,r,n){w0(n),t=ec(t,"onChange"),0<t.length&&(r=new Kd("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var go=null,Ro=null;function M3(e){ey(e,0)}function Nc(e){var t=Gi(e);if(d0(t))return e}function j3(e,t){if(e==="change")return t}var W0=!1;if(en){var qu;if(en){var Yu="oninput"in document;if(!Yu){var jg=document.createElement("div");jg.setAttribute("oninput","return;"),Yu=typeof jg.oninput=="function"}qu=Yu}else qu=!1;W0=qu&&(!document.documentMode||9<document.documentMode)}function Bg(){go&&(go.detachEvent("onpropertychange",V0),Ro=go=null)}function V0(e){if(e.propertyName==="value"&&Nc(Ro)){var t=[];H0(t,Ro,e,zd(e)),k0(M3,t)}}function B3(e,t,r){e==="focusin"?(Bg(),go=t,Ro=r,go.attachEvent("onpropertychange",V0)):e==="focusout"&&Bg()}function F3(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nc(Ro)}function z3(e,t){if(e==="click")return Nc(t)}function $3(e,t){if(e==="input"||e==="change")return Nc(t)}function U3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lr=typeof Object.is=="function"?Object.is:U3;function Oo(e,t){if(Lr(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 i=r[n];if(!Jf.call(t,i)||!Lr(e[i],t[i]))return!1}return!0}function Fg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zg(e,t){var r=Fg(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=Fg(r)}}function K0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?K0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function G0(){for(var e=window,t=Gl();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Gl(e.document)}return t}function Yd(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 H3(e){var t=G0(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&K0(r.ownerDocument.documentElement,r)){if(n!==null&&Yd(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 i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=zg(r,s);var a=zg(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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 W3=en&&"documentMode"in document&&11>=document.documentMode,Vi=null,mh=null,vo=null,gh=!1;function $g(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;gh||Vi==null||Vi!==Gl(n)||(n=Vi,"selectionStart"in n&&Yd(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}),vo&&Oo(vo,n)||(vo=n,n=ec(mh,"onSelect"),0<n.length&&(t=new Kd("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Vi)))}function Ga(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ki={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionend:Ga("Transition","TransitionEnd")},Ju={},q0={};en&&(q0=document.createElement("div").style,"AnimationEvent"in window||(delete Ki.animationend.animation,delete Ki.animationiteration.animation,delete Ki.animationstart.animation),"TransitionEvent"in window||delete Ki.transitionend.transition);function Rc(e){if(Ju[e])return Ju[e];if(!Ki[e])return e;var t=Ki[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in q0)return Ju[e]=t[r];return e}var Y0=Rc("animationend"),J0=Rc("animationiteration"),X0=Rc("animationstart"),Q0=Rc("transitionend"),Z0=new Map,Ug="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 Wn(e,t){Z0.set(e,t),_i(t,[e])}for(var Xu=0;Xu<Ug.length;Xu++){var Qu=Ug[Xu],V3=Qu.toLowerCase(),K3=Qu[0].toUpperCase()+Qu.slice(1);Wn(V3,"on"+K3)}Wn(Y0,"onAnimationEnd");Wn(J0,"onAnimationIteration");Wn(X0,"onAnimationStart");Wn("dblclick","onDoubleClick");Wn("focusin","onFocus");Wn("focusout","onBlur");Wn(Q0,"onTransitionEnd");us("onMouseEnter",["mouseout","mouseover"]);us("onMouseLeave",["mouseout","mouseover"]);us("onPointerEnter",["pointerout","pointerover"]);us("onPointerLeave",["pointerout","pointerover"]);_i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));_i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));_i("onBeforeInput",["compositionend","keypress","textInput","paste"]);_i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));_i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));_i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var co="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(" "),G3=new Set("cancel close invalid load scroll toggle".split(" ").concat(co));function Hg(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,VE(n,t,void 0,e),e.currentTarget=null}function ey(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var a=n.length-1;0<=a;a--){var o=n[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;Hg(i,o,c),s=l}else for(a=0;a<n.length;a++){if(o=n[a],l=o.instance,c=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;Hg(i,o,c),s=l}}}if(Yl)throw e=fh,Yl=!1,fh=null,e}function nt(e,t){var r=t[bh];r===void 0&&(r=t[bh]=new Set);var n=e+"__bubble";r.has(n)||(ty(t,e,2,!1),r.add(n))}function Zu(e,t,r){var n=0;t&&(n|=4),ty(r,e,n,t)}var qa="_reactListening"+Math.random().toString(36).slice(2);function Mo(e){if(!e[qa]){e[qa]=!0,l0.forEach(function(r){r!=="selectionchange"&&(G3.has(r)||Zu(r,!1,e),Zu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qa]||(t[qa]=!0,Zu("selectionchange",!1,t))}}function ty(e,t,r,n){switch(B0(t)){case 1:var i=a3;break;case 4:i=l3;break;default:i=Wd}r=i.bind(null,t,r,e),i=void 0,!uh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function ef(e,t,r,n,i){var s=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var o=n.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;o!==null;){if(a=ti(o),a===null)return;if(l=a.tag,l===5||l===6){n=s=a;continue e}o=o.parentNode}}n=n.return}k0(function(){var c=s,h=zd(r),u=[];e:{var m=Z0.get(e);if(m!==void 0){var v=Kd,w=e;switch(e){case"keypress":if(El(r)===0)break e;case"keydown":case"keyup":v=C3;break;case"focusin":w="focus",v=Gu;break;case"focusout":w="blur",v=Gu;break;case"beforeblur":case"afterblur":v=Gu;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":v=Dg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=f3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=E3;break;case Y0:case J0:case X0:v=p3;break;case Q0:v=L3;break;case"scroll":v=c3;break;case"wheel":v=T3;break;case"copy":case"cut":case"paste":v=g3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Ng}var _=(t&4)!==0,g=!_&&e==="scroll",d=_?m!==null?m+"Capture":null:m;_=[];for(var f=c,p;f!==null;){p=f;var y=p.stateNode;if(p.tag===5&&y!==null&&(p=y,d!==null&&(y=To(f,d),y!=null&&_.push(jo(f,y,p)))),g)break;f=f.return}0<_.length&&(m=new v(m,w,null,r,h),u.push({event:m,listeners:_}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&r!==lh&&(w=r.relatedTarget||r.fromElement)&&(ti(w)||w[tn]))break e;if((v||m)&&(m=h.window===h?h:(m=h.ownerDocument)?m.defaultView||m.parentWindow:window,v?(w=r.relatedTarget||r.toElement,v=c,w=w?ti(w):null,w!==null&&(g=yi(w),w!==g||w.tag!==5&&w.tag!==6)&&(w=null)):(v=null,w=c),v!==w)){if(_=Dg,y="onMouseLeave",d="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(_=Ng,y="onPointerLeave",d="onPointerEnter",f="pointer"),g=v==null?m:Gi(v),p=w==null?m:Gi(w),m=new _(y,f+"leave",v,r,h),m.target=g,m.relatedTarget=p,y=null,ti(h)===c&&(_=new _(d,f+"enter",w,r,h),_.target=p,_.relatedTarget=g,y=_),g=y,v&&w)t:{for(_=v,d=w,f=0,p=_;p;p=Li(p))f++;for(p=0,y=d;y;y=Li(y))p++;for(;0<f-p;)_=Li(_),f--;for(;0<p-f;)d=Li(d),p--;for(;f--;){if(_===d||d!==null&&_===d.alternate)break t;_=Li(_),d=Li(d)}_=null}else _=null;v!==null&&Wg(u,m,v,_,!1),w!==null&&g!==null&&Wg(u,g,w,_,!0)}}e:{if(m=c?Gi(c):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var S=j3;else if(Mg(m))if(W0)S=$3;else{S=F3;var b=B3}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(S=z3);if(S&&(S=S(e,c))){H0(u,S,r,h);break e}b&&b(e,m,c),e==="focusout"&&(b=m._wrapperState)&&b.controlled&&m.type==="number"&&nh(m,"number",m.value)}switch(b=c?Gi(c):window,e){case"focusin":(Mg(b)||b.contentEditable==="true")&&(Vi=b,mh=c,vo=null);break;case"focusout":vo=mh=Vi=null;break;case"mousedown":gh=!0;break;case"contextmenu":case"mouseup":case"dragend":gh=!1,$g(u,r,h);break;case"selectionchange":if(W3)break;case"keydown":case"keyup":$g(u,r,h)}var k;if(qd)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Wi?$0(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(z0&&r.locale!=="ko"&&(Wi||C!=="onCompositionStart"?C==="onCompositionEnd"&&Wi&&(k=F0()):(kn=h,Vd="value"in kn?kn.value:kn.textContent,Wi=!0)),b=ec(c,C),0<b.length&&(C=new Ig(C,e,null,r,h),u.push({event:C,listeners:b}),k?C.data=k:(k=U0(r),k!==null&&(C.data=k)))),(k=I3?N3(e,r):R3(e,r))&&(c=ec(c,"onBeforeInput"),0<c.length&&(h=new Ig("onBeforeInput","beforeinput",null,r,h),u.push({event:h,listeners:c}),h.data=k))}ey(u,t)})}function jo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ec(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=To(e,r),s!=null&&n.unshift(jo(e,s,i)),s=To(e,t),s!=null&&n.push(jo(e,s,i))),e=e.return}return n}function Li(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Wg(e,t,r,n,i){for(var s=t._reactName,a=[];r!==null&&r!==n;){var o=r,l=o.alternate,c=o.stateNode;if(l!==null&&l===n)break;o.tag===5&&c!==null&&(o=c,i?(l=To(r,s),l!=null&&a.unshift(jo(r,l,o))):i||(l=To(r,s),l!=null&&a.push(jo(r,l,o)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var q3=/\r\n?/g,Y3=/\u0000|\uFFFD/g;function Vg(e){return(typeof e=="string"?e:""+e).replace(q3,`
38
- `).replace(Y3,"")}function Ya(e,t,r){if(t=Vg(t),Vg(e)!==t&&r)throw Error(de(425))}function tc(){}var vh=null,_h=null;function yh(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 wh=typeof setTimeout=="function"?setTimeout:void 0,J3=typeof clearTimeout=="function"?clearTimeout:void 0,Kg=typeof Promise=="function"?Promise:void 0,X3=typeof queueMicrotask=="function"?queueMicrotask:typeof Kg<"u"?function(e){return Kg.resolve(null).then(e).catch(Q3)}:wh;function Q3(e){setTimeout(function(){throw e})}function tf(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),No(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);No(t)}function Pn(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 Gg(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 Cs=Math.random().toString(36).slice(2),Mr="__reactFiber$"+Cs,Bo="__reactProps$"+Cs,tn="__reactContainer$"+Cs,bh="__reactEvents$"+Cs,Z3="__reactListeners$"+Cs,e4="__reactHandles$"+Cs;function ti(e){var t=e[Mr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[tn]||r[Mr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Gg(e);e!==null;){if(r=e[Mr])return r;e=Gg(e)}return t}e=r,r=e.parentNode}return null}function sa(e){return e=e[Mr]||e[tn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(de(33))}function Oc(e){return e[Bo]||null}var Sh=[],qi=-1;function Vn(e){return{current:e}}function st(e){0>qi||(e.current=Sh[qi],Sh[qi]=null,qi--)}function rt(e,t){qi++,Sh[qi]=e.current,e.current=t}var Bn={},Ot=Vn(Bn),Gt=Vn(!1),li=Bn;function fs(e,t){var r=e.type.contextTypes;if(!r)return Bn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function qt(e){return e=e.childContextTypes,e!=null}function rc(){st(Gt),st(Ot)}function qg(e,t,r){if(Ot.current!==Bn)throw Error(de(168));rt(Ot,t),rt(Gt,r)}function ry(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(de(108,BE(e)||"Unknown",i));return ut({},r,n)}function nc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bn,li=Ot.current,rt(Ot,e),rt(Gt,Gt.current),!0}function Yg(e,t,r){var n=e.stateNode;if(!n)throw Error(de(169));r?(e=ry(e,t,li),n.__reactInternalMemoizedMergedChildContext=e,st(Gt),st(Ot),rt(Ot,e)):st(Gt),rt(Gt,r)}var Yr=null,Mc=!1,rf=!1;function ny(e){Yr===null?Yr=[e]:Yr.push(e)}function t4(e){Mc=!0,ny(e)}function Kn(){if(!rf&&Yr!==null){rf=!0;var e=0,t=Qe;try{var r=Yr;for(Qe=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Yr=null,Mc=!1}catch(i){throw Yr!==null&&(Yr=Yr.slice(e+1)),L0($d,Kn),i}finally{Qe=t,rf=!1}}return null}var Yi=[],Ji=0,ic=null,sc=0,fr=[],hr=0,ci=null,Jr=1,Xr="";function Xn(e,t){Yi[Ji++]=sc,Yi[Ji++]=ic,ic=e,sc=t}function iy(e,t,r){fr[hr++]=Jr,fr[hr++]=Xr,fr[hr++]=ci,ci=e;var n=Jr;e=Xr;var i=32-xr(n)-1;n&=~(1<<i),r+=1;var s=32-xr(t)+i;if(30<s){var a=i-i%5;s=(n&(1<<a)-1).toString(32),n>>=a,i-=a,Jr=1<<32-xr(t)+i|r<<i|n,Xr=s+e}else Jr=1<<s|r<<i|n,Xr=e}function Jd(e){e.return!==null&&(Xn(e,1),iy(e,1,0))}function Xd(e){for(;e===ic;)ic=Yi[--Ji],Yi[Ji]=null,sc=Yi[--Ji],Yi[Ji]=null;for(;e===ci;)ci=fr[--hr],fr[hr]=null,Xr=fr[--hr],fr[hr]=null,Jr=fr[--hr],fr[hr]=null}var nr=null,tr=null,at=!1,Cr=null;function sy(e,t){var r=pr(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 Jg(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,nr=e,tr=Pn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,nr=e,tr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=ci!==null?{id:Jr,overflow:Xr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=pr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,nr=e,tr=null,!0):!1;default:return!1}}function Ch(e){return(e.mode&1)!==0&&(e.flags&128)===0}function kh(e){if(at){var t=tr;if(t){var r=t;if(!Jg(e,t)){if(Ch(e))throw Error(de(418));t=Pn(r.nextSibling);var n=nr;t&&Jg(e,t)?sy(n,r):(e.flags=e.flags&-4097|2,at=!1,nr=e)}}else{if(Ch(e))throw Error(de(418));e.flags=e.flags&-4097|2,at=!1,nr=e}}}function Xg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;nr=e}function Ja(e){if(e!==nr)return!1;if(!at)return Xg(e),at=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yh(e.type,e.memoizedProps)),t&&(t=tr)){if(Ch(e))throw oy(),Error(de(418));for(;t;)sy(e,t),t=Pn(t.nextSibling)}if(Xg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(de(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){tr=Pn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}tr=null}}else tr=nr?Pn(e.stateNode.nextSibling):null;return!0}function oy(){for(var e=tr;e;)e=Pn(e.nextSibling)}function hs(){tr=nr=null,at=!1}function Qd(e){Cr===null?Cr=[e]:Cr.push(e)}var r4=ln.ReactCurrentBatchConfig;function Xs(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(de(309));var n=r.stateNode}if(!n)throw Error(de(147,e));var i=n,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var o=i.refs;a===null?delete o[s]:o[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(de(284));if(!r._owner)throw Error(de(290,e))}return e}function Xa(e,t){throw e=Object.prototype.toString.call(t),Error(de(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qg(e){var t=e._init;return t(e._payload)}function ay(e){function t(d,f){if(e){var p=d.deletions;p===null?(d.deletions=[f],d.flags|=16):p.push(f)}}function r(d,f){if(!e)return null;for(;f!==null;)t(d,f),f=f.sibling;return null}function n(d,f){for(d=new Map;f!==null;)f.key!==null?d.set(f.key,f):d.set(f.index,f),f=f.sibling;return d}function i(d,f){return d=Nn(d,f),d.index=0,d.sibling=null,d}function s(d,f,p){return d.index=p,e?(p=d.alternate,p!==null?(p=p.index,p<f?(d.flags|=2,f):p):(d.flags|=2,f)):(d.flags|=1048576,f)}function a(d){return e&&d.alternate===null&&(d.flags|=2),d}function o(d,f,p,y){return f===null||f.tag!==6?(f=uf(p,d.mode,y),f.return=d,f):(f=i(f,p),f.return=d,f)}function l(d,f,p,y){var S=p.type;return S===Hi?h(d,f,p.props.children,y,p.key):f!==null&&(f.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===wn&&Qg(S)===f.type)?(y=i(f,p.props),y.ref=Xs(d,f,p),y.return=d,y):(y=Nl(p.type,p.key,p.props,null,d.mode,y),y.ref=Xs(d,f,p),y.return=d,y)}function c(d,f,p,y){return f===null||f.tag!==4||f.stateNode.containerInfo!==p.containerInfo||f.stateNode.implementation!==p.implementation?(f=ff(p,d.mode,y),f.return=d,f):(f=i(f,p.children||[]),f.return=d,f)}function h(d,f,p,y,S){return f===null||f.tag!==7?(f=ai(p,d.mode,y,S),f.return=d,f):(f=i(f,p),f.return=d,f)}function u(d,f,p){if(typeof f=="string"&&f!==""||typeof f=="number")return f=uf(""+f,d.mode,p),f.return=d,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case za:return p=Nl(f.type,f.key,f.props,null,d.mode,p),p.ref=Xs(d,null,f),p.return=d,p;case Ui:return f=ff(f,d.mode,p),f.return=d,f;case wn:var y=f._init;return u(d,y(f._payload),p)}if(ao(f)||Ks(f))return f=ai(f,d.mode,p,null),f.return=d,f;Xa(d,f)}return null}function m(d,f,p,y){var S=f!==null?f.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return S!==null?null:o(d,f,""+p,y);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case za:return p.key===S?l(d,f,p,y):null;case Ui:return p.key===S?c(d,f,p,y):null;case wn:return S=p._init,m(d,f,S(p._payload),y)}if(ao(p)||Ks(p))return S!==null?null:h(d,f,p,y,null);Xa(d,p)}return null}function v(d,f,p,y,S){if(typeof y=="string"&&y!==""||typeof y=="number")return d=d.get(p)||null,o(f,d,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case za:return d=d.get(y.key===null?p:y.key)||null,l(f,d,y,S);case Ui:return d=d.get(y.key===null?p:y.key)||null,c(f,d,y,S);case wn:var b=y._init;return v(d,f,p,b(y._payload),S)}if(ao(y)||Ks(y))return d=d.get(p)||null,h(f,d,y,S,null);Xa(f,y)}return null}function w(d,f,p,y){for(var S=null,b=null,k=f,C=f=0,A=null;k!==null&&C<p.length;C++){k.index>C?(A=k,k=null):A=k.sibling;var P=m(d,k,p[C],y);if(P===null){k===null&&(k=A);break}e&&k&&P.alternate===null&&t(d,k),f=s(P,f,C),b===null?S=P:b.sibling=P,b=P,k=A}if(C===p.length)return r(d,k),at&&Xn(d,C),S;if(k===null){for(;C<p.length;C++)k=u(d,p[C],y),k!==null&&(f=s(k,f,C),b===null?S=k:b.sibling=k,b=k);return at&&Xn(d,C),S}for(k=n(d,k);C<p.length;C++)A=v(k,d,C,p[C],y),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?C:A.key),f=s(A,f,C),b===null?S=A:b.sibling=A,b=A);return e&&k.forEach(function(O){return t(d,O)}),at&&Xn(d,C),S}function _(d,f,p,y){var S=Ks(p);if(typeof S!="function")throw Error(de(150));if(p=S.call(p),p==null)throw Error(de(151));for(var b=S=null,k=f,C=f=0,A=null,P=p.next();k!==null&&!P.done;C++,P=p.next()){k.index>C?(A=k,k=null):A=k.sibling;var O=m(d,k,P.value,y);if(O===null){k===null&&(k=A);break}e&&k&&O.alternate===null&&t(d,k),f=s(O,f,C),b===null?S=O:b.sibling=O,b=O,k=A}if(P.done)return r(d,k),at&&Xn(d,C),S;if(k===null){for(;!P.done;C++,P=p.next())P=u(d,P.value,y),P!==null&&(f=s(P,f,C),b===null?S=P:b.sibling=P,b=P);return at&&Xn(d,C),S}for(k=n(d,k);!P.done;C++,P=p.next())P=v(k,d,C,P.value,y),P!==null&&(e&&P.alternate!==null&&k.delete(P.key===null?C:P.key),f=s(P,f,C),b===null?S=P:b.sibling=P,b=P);return e&&k.forEach(function(R){return t(d,R)}),at&&Xn(d,C),S}function g(d,f,p,y){if(typeof p=="object"&&p!==null&&p.type===Hi&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case za:e:{for(var S=p.key,b=f;b!==null;){if(b.key===S){if(S=p.type,S===Hi){if(b.tag===7){r(d,b.sibling),f=i(b,p.props.children),f.return=d,d=f;break e}}else if(b.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===wn&&Qg(S)===b.type){r(d,b.sibling),f=i(b,p.props),f.ref=Xs(d,b,p),f.return=d,d=f;break e}r(d,b);break}else t(d,b);b=b.sibling}p.type===Hi?(f=ai(p.props.children,d.mode,y,p.key),f.return=d,d=f):(y=Nl(p.type,p.key,p.props,null,d.mode,y),y.ref=Xs(d,f,p),y.return=d,d=y)}return a(d);case Ui:e:{for(b=p.key;f!==null;){if(f.key===b)if(f.tag===4&&f.stateNode.containerInfo===p.containerInfo&&f.stateNode.implementation===p.implementation){r(d,f.sibling),f=i(f,p.children||[]),f.return=d,d=f;break e}else{r(d,f);break}else t(d,f);f=f.sibling}f=ff(p,d.mode,y),f.return=d,d=f}return a(d);case wn:return b=p._init,g(d,f,b(p._payload),y)}if(ao(p))return w(d,f,p,y);if(Ks(p))return _(d,f,p,y);Xa(d,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,f!==null&&f.tag===6?(r(d,f.sibling),f=i(f,p),f.return=d,d=f):(r(d,f),f=uf(p,d.mode,y),f.return=d,d=f),a(d)):r(d,f)}return g}var ds=ay(!0),ly=ay(!1),oc=Vn(null),ac=null,Xi=null,Zd=null;function ep(){Zd=Xi=ac=null}function tp(e){var t=oc.current;st(oc),e._currentValue=t}function xh(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 ss(e,t){ac=e,Zd=Xi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Kt=!0),e.firstContext=null)}function gr(e){var t=e._currentValue;if(Zd!==e)if(e={context:e,memoizedValue:t,next:null},Xi===null){if(ac===null)throw Error(de(308));Xi=e,ac.dependencies={lanes:0,firstContext:e}}else Xi=Xi.next=e;return t}var ri=null;function rp(e){ri===null?ri=[e]:ri.push(e)}function cy(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,rp(t)):(r.next=i.next,i.next=r),t.interleaved=r,rn(e,n)}function rn(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 bn=!1;function np(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function uy(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 Qr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Tn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ve&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,rn(e,r)}return i=n.interleaved,i===null?(t.next=t,rp(n)):(t.next=i.next,i.next=t),n.interleaved=t,rn(e,r)}function Al(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,Ud(e,r)}}function Zg(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 lc(e,t,r,n){var i=e.updateQueue;bn=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,c=l.next;l.next=null,a===null?s=c:a.next=c,a=l;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==a&&(o===null?h.firstBaseUpdate=c:o.next=c,h.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;a=0,h=c=l=null,o=s;do{var m=o.lane,v=o.eventTime;if((n&m)===m){h!==null&&(h=h.next={eventTime:v,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var w=e,_=o;switch(m=t,v=r,_.tag){case 1:if(w=_.payload,typeof w=="function"){u=w.call(v,u,m);break e}u=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=_.payload,m=typeof w=="function"?w.call(v,u,m):w,m==null)break e;u=ut({},u,m);break e;case 2:bn=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[o]:m.push(o))}else v={eventTime:v,lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(c=h=v,l=u):h=h.next=v,a|=m;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;m=o,o=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(h===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);fi|=a,e.lanes=a,e.memoizedState=u}}function ev(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(de(191,i));i.call(n)}}}var oa={},zr=Vn(oa),Fo=Vn(oa),zo=Vn(oa);function ni(e){if(e===oa)throw Error(de(174));return e}function ip(e,t){switch(rt(zo,t),rt(Fo,e),rt(zr,oa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sh(t,e)}st(zr),rt(zr,t)}function ps(){st(zr),st(Fo),st(zo)}function fy(e){ni(zo.current);var t=ni(zr.current),r=sh(t,e.type);t!==r&&(rt(Fo,e),rt(zr,r))}function sp(e){Fo.current===e&&(st(zr),st(Fo))}var lt=Vn(0);function cc(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 nf=[];function op(){for(var e=0;e<nf.length;e++)nf[e]._workInProgressVersionPrimary=null;nf.length=0}var Ll=ln.ReactCurrentDispatcher,sf=ln.ReactCurrentBatchConfig,ui=0,ct=null,wt=null,Ct=null,uc=!1,_o=!1,$o=0,n4=0;function Dt(){throw Error(de(321))}function ap(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Lr(e[r],t[r]))return!1;return!0}function lp(e,t,r,n,i,s){if(ui=s,ct=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ll.current=e===null||e.memoizedState===null?a4:l4,e=r(n,i),_o){s=0;do{if(_o=!1,$o=0,25<=s)throw Error(de(301));s+=1,Ct=wt=null,t.updateQueue=null,Ll.current=c4,e=r(n,i)}while(_o)}if(Ll.current=fc,t=wt!==null&&wt.next!==null,ui=0,Ct=wt=ct=null,uc=!1,t)throw Error(de(300));return e}function cp(){var e=$o!==0;return $o=0,e}function Rr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?ct.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function vr(){if(wt===null){var e=ct.alternate;e=e!==null?e.memoizedState:null}else e=wt.next;var t=Ct===null?ct.memoizedState:Ct.next;if(t!==null)Ct=t,wt=e;else{if(e===null)throw Error(de(310));wt=e,e={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},Ct===null?ct.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Uo(e,t){return typeof t=="function"?t(e):t}function of(e){var t=vr(),r=t.queue;if(r===null)throw Error(de(311));r.lastRenderedReducer=e;var n=wt,i=n.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}n.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,n=n.baseState;var o=a=null,l=null,c=s;do{var h=c.lane;if((ui&h)===h)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var u={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(o=l=u,a=n):l=l.next=u,ct.lanes|=h,fi|=h}c=c.next}while(c!==null&&c!==s);l===null?a=n:l.next=o,Lr(n,t.memoizedState)||(Kt=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do s=i.lane,ct.lanes|=s,fi|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function af(e){var t=vr(),r=t.queue;if(r===null)throw Error(de(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,s=t.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);Lr(s,t.memoizedState)||(Kt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),r.lastRenderedState=s}return[s,n]}function hy(){}function dy(e,t){var r=ct,n=vr(),i=t(),s=!Lr(n.memoizedState,i);if(s&&(n.memoizedState=i,Kt=!0),n=n.queue,up(gy.bind(null,r,n,e),[e]),n.getSnapshot!==t||s||Ct!==null&&Ct.memoizedState.tag&1){if(r.flags|=2048,Ho(9,my.bind(null,r,n,i,t),void 0,null),kt===null)throw Error(de(349));ui&30||py(r,t,i)}return i}function py(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ct.updateQueue,t===null?(t={lastEffect:null,stores:null},ct.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function my(e,t,r,n){t.value=r,t.getSnapshot=n,vy(t)&&_y(e)}function gy(e,t,r){return r(function(){vy(t)&&_y(e)})}function vy(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Lr(e,r)}catch{return!0}}function _y(e){var t=rn(e,1);t!==null&&Er(t,e,1,-1)}function tv(e){var t=Rr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:e},t.queue=e,e=e.dispatch=o4.bind(null,ct,e),[t.memoizedState,e]}function Ho(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ct.updateQueue,t===null?(t={lastEffect:null,stores:null},ct.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 yy(){return vr().memoizedState}function Pl(e,t,r,n){var i=Rr();ct.flags|=e,i.memoizedState=Ho(1|t,r,void 0,n===void 0?null:n)}function jc(e,t,r,n){var i=vr();n=n===void 0?null:n;var s=void 0;if(wt!==null){var a=wt.memoizedState;if(s=a.destroy,n!==null&&ap(n,a.deps)){i.memoizedState=Ho(t,r,s,n);return}}ct.flags|=e,i.memoizedState=Ho(1|t,r,s,n)}function rv(e,t){return Pl(8390656,8,e,t)}function up(e,t){return jc(2048,8,e,t)}function wy(e,t){return jc(4,2,e,t)}function by(e,t){return jc(4,4,e,t)}function Sy(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 Cy(e,t,r){return r=r!=null?r.concat([e]):null,jc(4,4,Sy.bind(null,t,e),r)}function fp(){}function ky(e,t){var r=vr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&ap(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function xy(e,t){var r=vr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&ap(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Ey(e,t,r){return ui&21?(Lr(r,t)||(r=D0(),ct.lanes|=r,fi|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Kt=!0),e.memoizedState=r)}function i4(e,t){var r=Qe;Qe=r!==0&&4>r?r:4,e(!0);var n=sf.transition;sf.transition={};try{e(!1),t()}finally{Qe=r,sf.transition=n}}function Ay(){return vr().memoizedState}function s4(e,t,r){var n=In(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Ly(e))Py(t,r);else if(r=cy(e,t,r,n),r!==null){var i=Ft();Er(r,e,n,i),Ty(r,t,n)}}function o4(e,t,r){var n=In(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Ly(e))Py(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,r);if(i.hasEagerState=!0,i.eagerState=o,Lr(o,a)){var l=t.interleaved;l===null?(i.next=i,rp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=cy(e,t,i,n),r!==null&&(i=Ft(),Er(r,e,n,i),Ty(r,t,n))}}function Ly(e){var t=e.alternate;return e===ct||t!==null&&t===ct}function Py(e,t){_o=uc=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ty(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Ud(e,r)}}var fc={readContext:gr,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useInsertionEffect:Dt,useLayoutEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useMutableSource:Dt,useSyncExternalStore:Dt,useId:Dt,unstable_isNewReconciler:!1},a4={readContext:gr,useCallback:function(e,t){return Rr().memoizedState=[e,t===void 0?null:t],e},useContext:gr,useEffect:rv,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Pl(4194308,4,Sy.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Pl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Pl(4,2,e,t)},useMemo:function(e,t){var r=Rr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Rr();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=s4.bind(null,ct,e),[n.memoizedState,e]},useRef:function(e){var t=Rr();return e={current:e},t.memoizedState=e},useState:tv,useDebugValue:fp,useDeferredValue:function(e){return Rr().memoizedState=e},useTransition:function(){var e=tv(!1),t=e[0];return e=i4.bind(null,e[1]),Rr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ct,i=Rr();if(at){if(r===void 0)throw Error(de(407));r=r()}else{if(r=t(),kt===null)throw Error(de(349));ui&30||py(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,rv(gy.bind(null,n,s,e),[e]),n.flags|=2048,Ho(9,my.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=Rr(),t=kt.identifierPrefix;if(at){var r=Xr,n=Jr;r=(n&~(1<<32-xr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=$o++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=n4++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},l4={readContext:gr,useCallback:ky,useContext:gr,useEffect:up,useImperativeHandle:Cy,useInsertionEffect:wy,useLayoutEffect:by,useMemo:xy,useReducer:of,useRef:yy,useState:function(){return of(Uo)},useDebugValue:fp,useDeferredValue:function(e){var t=vr();return Ey(t,wt.memoizedState,e)},useTransition:function(){var e=of(Uo)[0],t=vr().memoizedState;return[e,t]},useMutableSource:hy,useSyncExternalStore:dy,useId:Ay,unstable_isNewReconciler:!1},c4={readContext:gr,useCallback:ky,useContext:gr,useEffect:up,useImperativeHandle:Cy,useInsertionEffect:wy,useLayoutEffect:by,useMemo:xy,useReducer:af,useRef:yy,useState:function(){return af(Uo)},useDebugValue:fp,useDeferredValue:function(e){var t=vr();return wt===null?t.memoizedState=e:Ey(t,wt.memoizedState,e)},useTransition:function(){var e=af(Uo)[0],t=vr().memoizedState;return[e,t]},useMutableSource:hy,useSyncExternalStore:dy,useId:Ay,unstable_isNewReconciler:!1};function br(e,t){if(e&&e.defaultProps){t=ut({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Eh(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ut({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Bc={isMounted:function(e){return(e=e._reactInternals)?yi(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ft(),i=In(e),s=Qr(n,i);s.payload=t,r!=null&&(s.callback=r),t=Tn(e,s,i),t!==null&&(Er(t,e,i,n),Al(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ft(),i=In(e),s=Qr(n,i);s.tag=1,s.payload=t,r!=null&&(s.callback=r),t=Tn(e,s,i),t!==null&&(Er(t,e,i,n),Al(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ft(),n=In(e),i=Qr(r,n);i.tag=2,t!=null&&(i.callback=t),t=Tn(e,i,n),t!==null&&(Er(t,e,n,r),Al(t,e,n))}};function nv(e,t,r,n,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,a):t.prototype&&t.prototype.isPureReactComponent?!Oo(r,n)||!Oo(i,s):!0}function Dy(e,t,r){var n=!1,i=Bn,s=t.contextType;return typeof s=="object"&&s!==null?s=gr(s):(i=qt(t)?li:Ot.current,n=t.contextTypes,s=(n=n!=null)?fs(e,i):Bn),t=new t(r,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Bc,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function iv(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&&Bc.enqueueReplaceState(t,t.state,null)}function Ah(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},np(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=gr(s):(s=qt(t)?li:Ot.current,i.context=fs(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Eh(e,t,s,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Bc.enqueueReplaceState(i,i.state,null),lc(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ms(e,t){try{var r="",n=t;do r+=jE(n),n=n.return;while(n);var i=r}catch(s){i=`
39
- Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function lf(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Lh(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var u4=typeof WeakMap=="function"?WeakMap:Map;function Iy(e,t,r){r=Qr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){dc||(dc=!0,Bh=n),Lh(e,t)},r}function Ny(e,t,r){r=Qr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Lh(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Lh(e,t),typeof n!="function"&&(Dn===null?Dn=new Set([this]):Dn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function sv(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new u4;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=k4.bind(null,e,t,r),t.then(e,e))}function ov(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 av(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=Qr(-1,1),t.tag=2,Tn(r,t,1))),r.lanes|=1),e)}var f4=ln.ReactCurrentOwner,Kt=!1;function jt(e,t,r,n){t.child=e===null?ly(t,null,r,n):ds(t,e.child,r,n)}function lv(e,t,r,n,i){r=r.render;var s=t.ref;return ss(t,i),n=lp(e,t,r,n,s,i),r=cp(),e!==null&&!Kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nn(e,t,i)):(at&&r&&Jd(t),t.flags|=1,jt(e,t,n,i),t.child)}function cv(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!yp(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,Ry(e,t,s,n,i)):(e=Nl(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:Oo,r(a,n)&&e.ref===t.ref)return nn(e,t,i)}return t.flags|=1,e=Nn(s,n),e.ref=t.ref,e.return=t,t.child=e}function Ry(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(Oo(s,n)&&e.ref===t.ref)if(Kt=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&(Kt=!0);else return t.lanes=e.lanes,nn(e,t,i)}return Ph(e,t,r,n,i)}function Oy(e,t,r){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},rt(Zi,er),er|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,rt(Zi,er),er|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,rt(Zi,er),er|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,rt(Zi,er),er|=n;return jt(e,t,i,r),t.child}function My(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ph(e,t,r,n,i){var s=qt(r)?li:Ot.current;return s=fs(t,s),ss(t,i),r=lp(e,t,r,n,s,i),n=cp(),e!==null&&!Kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nn(e,t,i)):(at&&n&&Jd(t),t.flags|=1,jt(e,t,r,i),t.child)}function uv(e,t,r,n,i){if(qt(r)){var s=!0;nc(t)}else s=!1;if(ss(t,i),t.stateNode===null)Tl(e,t),Dy(t,r,n),Ah(t,r,n,i),n=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,c=r.contextType;typeof c=="object"&&c!==null?c=gr(c):(c=qt(r)?li:Ot.current,c=fs(t,c));var h=r.getDerivedStateFromProps,u=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";u||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||l!==c)&&iv(t,a,n,c),bn=!1;var m=t.memoizedState;a.state=m,lc(t,n,a,i),l=t.memoizedState,o!==n||m!==l||Gt.current||bn?(typeof h=="function"&&(Eh(t,r,h,n),l=t.memoizedState),(o=bn||nv(t,r,o,n,m,l,c))?(u||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,uy(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:br(t.type,o),a.props=c,u=t.pendingProps,m=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=gr(l):(l=qt(r)?li:Ot.current,l=fs(t,l));var v=r.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==u||m!==l)&&iv(t,a,n,l),bn=!1,m=t.memoizedState,a.state=m,lc(t,n,a,i);var w=t.memoizedState;o!==u||m!==w||Gt.current||bn?(typeof v=="function"&&(Eh(t,r,v,n),w=t.memoizedState),(c=bn||nv(t,r,c,n,m,w,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,w,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,w,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),a.props=n,a.state=w,a.context=l,n=c):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return Th(e,t,r,n,s,i)}function Th(e,t,r,n,i,s){My(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return i&&Yg(t,r,!1),nn(e,t,s);n=t.stateNode,f4.current=t;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=ds(t,e.child,null,s),t.child=ds(t,null,o,s)):jt(e,t,o,s),t.memoizedState=n.state,i&&Yg(t,r,!0),t.child}function jy(e){var t=e.stateNode;t.pendingContext?qg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&qg(e,t.context,!1),ip(e,t.containerInfo)}function fv(e,t,r,n,i){return hs(),Qd(i),t.flags|=256,jt(e,t,r,n),t.child}var Dh={dehydrated:null,treeContext:null,retryLane:0};function Ih(e){return{baseLanes:e,cachePool:null,transitions:null}}function By(e,t,r){var n=t.pendingProps,i=lt.current,s=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),rt(lt,i&1),e===null)return kh(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):(a=n.children,e=n.fallback,s?(n=t.mode,s=t.child,a={mode:"hidden",children:a},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=$c(a,n,0,null),e=ai(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ih(r),t.memoizedState=Dh,e):hp(t,a));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return h4(e,t,a,n,o,i,r);if(s){s=n.fallback,a=t.mode,i=e.child,o=i.sibling;var l={mode:"hidden",children:n.children};return!(a&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Nn(i,l),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=Nn(o,s):(s=ai(s,a,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,n=s,s=t.child,a=e.child.memoizedState,a=a===null?Ih(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,t.memoizedState=Dh,n}return s=e.child,e=s.sibling,n=Nn(s,{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 hp(e,t){return t=$c({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qa(e,t,r,n){return n!==null&&Qd(n),ds(t,e.child,null,r),e=hp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function h4(e,t,r,n,i,s,a){if(r)return t.flags&256?(t.flags&=-257,n=lf(Error(de(422))),Qa(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=$c({mode:"visible",children:n.children},i,0,null),s=ai(s,i,a,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&ds(t,e.child,null,a),t.child.memoizedState=Ih(a),t.memoizedState=Dh,s);if(!(t.mode&1))return Qa(e,t,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,s=Error(de(419)),n=lf(s,n,void 0),Qa(e,t,a,n)}if(o=(a&e.childLanes)!==0,Kt||o){if(n=kt,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,rn(e,i),Er(n,e,i,-1))}return _p(),n=lf(Error(de(421))),Qa(e,t,a,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=x4.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,tr=Pn(i.nextSibling),nr=t,at=!0,Cr=null,e!==null&&(fr[hr++]=Jr,fr[hr++]=Xr,fr[hr++]=ci,Jr=e.id,Xr=e.overflow,ci=t),t=hp(t,n.children),t.flags|=4096,t)}function hv(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),xh(e.return,t,r)}function cf(e,t,r,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function Fy(e,t,r){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(jt(e,t,n.children,r),n=lt.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&&hv(e,r,t);else if(e.tag===19)hv(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(rt(lt,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&cc(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),cf(t,!1,i,r,s);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&cc(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}cf(t,!0,r,null,s);break;case"together":cf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Tl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function nn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),fi|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(de(153));if(t.child!==null){for(e=t.child,r=Nn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Nn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function d4(e,t,r){switch(t.tag){case 3:jy(t),hs();break;case 5:fy(t);break;case 1:qt(t.type)&&nc(t);break;case 4:ip(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;rt(oc,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(rt(lt,lt.current&1),t.flags|=128,null):r&t.child.childLanes?By(e,t,r):(rt(lt,lt.current&1),e=nn(e,t,r),e!==null?e.sibling:null);rt(lt,lt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Fy(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),rt(lt,lt.current),n)break;return null;case 22:case 23:return t.lanes=0,Oy(e,t,r)}return nn(e,t,r)}var zy,Nh,$y,Uy;zy=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}};Nh=function(){};$y=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,ni(zr.current);var s=null;switch(r){case"input":i=th(e,i),n=th(e,n),s=[];break;case"select":i=ut({},i,{value:void 0}),n=ut({},n,{value:void 0}),s=[];break;case"textarea":i=ih(e,i),n=ih(e,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=tc)}oh(r,n);var a;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var o=i[c];for(a in o)o.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Lo.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(o=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==o&&(l!=null||o!=null))if(c==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(s||(s=[]),s.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Lo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&nt("scroll",e),s||o===l||(s=[])):(s=s||[]).push(c,l))}r&&(s=s||[]).push("style",r);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Uy=function(e,t,r,n){r!==n&&(t.flags|=4)};function Qs(e,t){if(!at)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 It(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function p4(e,t,r){var n=t.pendingProps;switch(Xd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(t),null;case 1:return qt(t.type)&&rc(),It(t),null;case 3:return n=t.stateNode,ps(),st(Gt),st(Ot),op(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ja(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Cr!==null&&($h(Cr),Cr=null))),Nh(e,t),It(t),null;case 5:sp(t);var i=ni(zo.current);if(r=t.type,e!==null&&t.stateNode!=null)$y(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(de(166));return It(t),null}if(e=ni(zr.current),Ja(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[Mr]=t,n[Bo]=s,e=(t.mode&1)!==0,r){case"dialog":nt("cancel",n),nt("close",n);break;case"iframe":case"object":case"embed":nt("load",n);break;case"video":case"audio":for(i=0;i<co.length;i++)nt(co[i],n);break;case"source":nt("error",n);break;case"img":case"image":case"link":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"input":bg(n,s),nt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},nt("invalid",n);break;case"textarea":Cg(n,s),nt("invalid",n)}oh(r,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];a==="children"?typeof o=="string"?n.textContent!==o&&(s.suppressHydrationWarning!==!0&&Ya(n.textContent,o,e),i=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&Ya(n.textContent,o,e),i=["children",""+o]):Lo.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&nt("scroll",n)}switch(r){case"input":$a(n),Sg(n,s,!0);break;case"textarea":$a(n),kg(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=tc)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=g0(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Mr]=t,e[Bo]=n,zy(e,t,!1,!1),t.stateNode=e;e:{switch(a=ah(r,n),r){case"dialog":nt("cancel",e),nt("close",e),i=n;break;case"iframe":case"object":case"embed":nt("load",e),i=n;break;case"video":case"audio":for(i=0;i<co.length;i++)nt(co[i],e);i=n;break;case"source":nt("error",e),i=n;break;case"img":case"image":case"link":nt("error",e),nt("load",e),i=n;break;case"details":nt("toggle",e),i=n;break;case"input":bg(e,n),i=th(e,n),nt("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=ut({},n,{value:void 0}),nt("invalid",e);break;case"textarea":Cg(e,n),i=ih(e,n),nt("invalid",e);break;default:i=n}oh(r,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="style"?y0(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&v0(e,l)):s==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Po(e,l):typeof l=="number"&&Po(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Lo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&nt("scroll",e):l!=null&&Md(e,s,l,a))}switch(r){case"input":$a(e),Sg(e,n,!1);break;case"textarea":$a(e),kg(e);break;case"option":n.value!=null&&e.setAttribute("value",""+jn(n.value));break;case"select":e.multiple=!!n.multiple,s=n.value,s!=null?ts(e,!!n.multiple,s,!1):n.defaultValue!=null&&ts(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=tc)}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 It(t),null;case 6:if(e&&t.stateNode!=null)Uy(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(de(166));if(r=ni(zo.current),ni(zr.current),Ja(t)){if(n=t.stateNode,r=t.memoizedProps,n[Mr]=t,(s=n.nodeValue!==r)&&(e=nr,e!==null))switch(e.tag){case 3:Ya(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ya(n.nodeValue,r,(e.mode&1)!==0)}s&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Mr]=t,t.stateNode=n}return It(t),null;case 13:if(st(lt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(at&&tr!==null&&t.mode&1&&!(t.flags&128))oy(),hs(),t.flags|=98560,s=!1;else if(s=Ja(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(de(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(de(317));s[Mr]=t}else hs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;It(t),s=!1}else Cr!==null&&($h(Cr),Cr=null),s=!0;if(!s)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||lt.current&1?bt===0&&(bt=3):_p())),t.updateQueue!==null&&(t.flags|=4),It(t),null);case 4:return ps(),Nh(e,t),e===null&&Mo(t.stateNode.containerInfo),It(t),null;case 10:return tp(t.type._context),It(t),null;case 17:return qt(t.type)&&rc(),It(t),null;case 19:if(st(lt),s=t.memoizedState,s===null)return It(t),null;if(n=(t.flags&128)!==0,a=s.rendering,a===null)if(n)Qs(s,!1);else{if(bt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=cc(e),a!==null){for(t.flags|=128,Qs(s,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)s=r,e=n,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return rt(lt,lt.current&1|2),t.child}e=e.sibling}s.tail!==null&&dt()>gs&&(t.flags|=128,n=!0,Qs(s,!1),t.lanes=4194304)}else{if(!n)if(e=cc(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Qs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!at)return It(t),null}else 2*dt()-s.renderingStartTime>gs&&r!==1073741824&&(t.flags|=128,n=!0,Qs(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(r=s.last,r!==null?r.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=dt(),t.sibling=null,r=lt.current,rt(lt,n?r&1|2:r&1),t):(It(t),null);case 22:case 23:return vp(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?er&1073741824&&(It(t),t.subtreeFlags&6&&(t.flags|=8192)):It(t),null;case 24:return null;case 25:return null}throw Error(de(156,t.tag))}function m4(e,t){switch(Xd(t),t.tag){case 1:return qt(t.type)&&rc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ps(),st(Gt),st(Ot),op(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sp(t),null;case 13:if(st(lt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(de(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return st(lt),null;case 4:return ps(),null;case 10:return tp(t.type._context),null;case 22:case 23:return vp(),null;case 24:return null;default:return null}}var Za=!1,Nt=!1,g4=typeof WeakSet=="function"?WeakSet:Set,be=null;function Qi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ht(e,t,n)}else r.current=null}function Rh(e,t,r){try{r()}catch(n){ht(e,t,n)}}var dv=!1;function v4(e,t){if(vh=Ql,e=G0(),Yd(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 i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,o=-1,l=-1,c=0,h=0,u=e,m=null;t:for(;;){for(var v;u!==r||i!==0&&u.nodeType!==3||(o=a+i),u!==s||n!==0&&u.nodeType!==3||(l=a+n),u.nodeType===3&&(a+=u.nodeValue.length),(v=u.firstChild)!==null;)m=u,u=v;for(;;){if(u===e)break t;if(m===r&&++c===i&&(o=a),m===s&&++h===n&&(l=a),(v=u.nextSibling)!==null)break;u=m,m=u.parentNode}u=v}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(_h={focusedElem:e,selectionRange:r},Ql=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;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 _=w.memoizedProps,g=w.memoizedState,d=t.stateNode,f=d.getSnapshotBeforeUpdate(t.elementType===t.type?_:br(t.type,_),g);d.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(de(163))}}catch(y){ht(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,be=e;break}be=t.return}return w=dv,dv=!1,w}function yo(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Rh(t,r,s)}i=i.next}while(i!==n)}}function Fc(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 Oh(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 Hy(e){var t=e.alternate;t!==null&&(e.alternate=null,Hy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mr],delete t[Bo],delete t[bh],delete t[Z3],delete t[e4])),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 Wy(e){return e.tag===5||e.tag===3||e.tag===4}function pv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wy(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 Mh(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=tc));else if(n!==4&&(e=e.child,e!==null))for(Mh(e,t,r),e=e.sibling;e!==null;)Mh(e,t,r),e=e.sibling}function jh(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(jh(e,t,r),e=e.sibling;e!==null;)jh(e,t,r),e=e.sibling}var At=null,Sr=!1;function gn(e,t,r){for(r=r.child;r!==null;)Vy(e,t,r),r=r.sibling}function Vy(e,t,r){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(Dc,r)}catch{}switch(r.tag){case 5:Nt||Qi(r,t);case 6:var n=At,i=Sr;At=null,gn(e,t,r),At=n,Sr=i,At!==null&&(Sr?(e=At,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):At.removeChild(r.stateNode));break;case 18:At!==null&&(Sr?(e=At,r=r.stateNode,e.nodeType===8?tf(e.parentNode,r):e.nodeType===1&&tf(e,r),No(e)):tf(At,r.stateNode));break;case 4:n=At,i=Sr,At=r.stateNode.containerInfo,Sr=!0,gn(e,t,r),At=n,Sr=i;break;case 0:case 11:case 14:case 15:if(!Nt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Rh(r,t,a),i=i.next}while(i!==n)}gn(e,t,r);break;case 1:if(!Nt&&(Qi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){ht(r,t,o)}gn(e,t,r);break;case 21:gn(e,t,r);break;case 22:r.mode&1?(Nt=(n=Nt)||r.memoizedState!==null,gn(e,t,r),Nt=n):gn(e,t,r);break;default:gn(e,t,r)}}function mv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new g4),t.forEach(function(n){var i=E4.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function wr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var s=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:At=o.stateNode,Sr=!1;break e;case 3:At=o.stateNode.containerInfo,Sr=!0;break e;case 4:At=o.stateNode.containerInfo,Sr=!0;break e}o=o.return}if(At===null)throw Error(de(160));Vy(s,a,i),At=null,Sr=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ht(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ky(t,e),t=t.sibling}function Ky(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wr(t,e),Nr(e),n&4){try{yo(3,e,e.return),Fc(3,e)}catch(_){ht(e,e.return,_)}try{yo(5,e,e.return)}catch(_){ht(e,e.return,_)}}break;case 1:wr(t,e),Nr(e),n&512&&r!==null&&Qi(r,r.return);break;case 5:if(wr(t,e),Nr(e),n&512&&r!==null&&Qi(r,r.return),e.flags&32){var i=e.stateNode;try{Po(i,"")}catch(_){ht(e,e.return,_)}}if(n&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=r!==null?r.memoizedProps:s,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&p0(i,s),ah(o,a);var c=ah(o,s);for(a=0;a<l.length;a+=2){var h=l[a],u=l[a+1];h==="style"?y0(i,u):h==="dangerouslySetInnerHTML"?v0(i,u):h==="children"?Po(i,u):Md(i,h,u,c)}switch(o){case"input":rh(i,s);break;case"textarea":m0(i,s);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var v=s.value;v!=null?ts(i,!!s.multiple,v,!1):m!==!!s.multiple&&(s.defaultValue!=null?ts(i,!!s.multiple,s.defaultValue,!0):ts(i,!!s.multiple,s.multiple?[]:"",!1))}i[Bo]=s}catch(_){ht(e,e.return,_)}}break;case 6:if(wr(t,e),Nr(e),n&4){if(e.stateNode===null)throw Error(de(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(_){ht(e,e.return,_)}}break;case 3:if(wr(t,e),Nr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{No(t.containerInfo)}catch(_){ht(e,e.return,_)}break;case 4:wr(t,e),Nr(e);break;case 13:wr(t,e),Nr(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(mp=dt())),n&4&&mv(e);break;case 22:if(h=r!==null&&r.memoizedState!==null,e.mode&1?(Nt=(c=Nt)||h,wr(t,e),Nt=c):wr(t,e),Nr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(be=e,h=e.child;h!==null;){for(u=be=h;be!==null;){switch(m=be,v=m.child,m.tag){case 0:case 11:case 14:case 15:yo(4,m,m.return);break;case 1:Qi(m,m.return);var w=m.stateNode;if(typeof w.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(_){ht(n,r,_)}}break;case 5:Qi(m,m.return);break;case 22:if(m.memoizedState!==null){vv(u);continue}}v!==null?(v.return=m,be=v):vv(u)}h=h.sibling}e:for(h=null,u=e;;){if(u.tag===5){if(h===null){h=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=u.stateNode,l=u.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=_0("display",a))}catch(_){ht(e,e.return,_)}}}else if(u.tag===6){if(h===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(_){ht(e,e.return,_)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:wr(t,e),Nr(e),n&4&&mv(e);break;case 21:break;default:wr(t,e),Nr(e)}}function Nr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Wy(r)){var n=r;break e}r=r.return}throw Error(de(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Po(i,""),n.flags&=-33);var s=pv(e);jh(e,s,i);break;case 3:case 4:var a=n.stateNode.containerInfo,o=pv(e);Mh(e,o,a);break;default:throw Error(de(161))}}catch(l){ht(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _4(e,t,r){be=e,Gy(e)}function Gy(e,t,r){for(var n=(e.mode&1)!==0;be!==null;){var i=be,s=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||Za;if(!a){var o=i.alternate,l=o!==null&&o.memoizedState!==null||Nt;o=Za;var c=Nt;if(Za=a,(Nt=l)&&!c)for(be=i;be!==null;)a=be,l=a.child,a.tag===22&&a.memoizedState!==null?_v(i):l!==null?(l.return=a,be=l):_v(i);for(;s!==null;)be=s,Gy(s),s=s.sibling;be=i,Za=o,Nt=c}gv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,be=s):gv(e)}}function gv(e){for(;be!==null;){var t=be;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Nt||Fc(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Nt)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:br(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ev(t,s,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}ev(t,a,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var u=h.dehydrated;u!==null&&No(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(de(163))}Nt||t.flags&512&&Oh(t)}catch(m){ht(t,t.return,m)}}if(t===e){be=null;break}if(r=t.sibling,r!==null){r.return=t.return,be=r;break}be=t.return}}function vv(e){for(;be!==null;){var t=be;if(t===e){be=null;break}var r=t.sibling;if(r!==null){r.return=t.return,be=r;break}be=t.return}}function _v(e){for(;be!==null;){var t=be;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Fc(4,t)}catch(l){ht(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){ht(t,i,l)}}var s=t.return;try{Oh(t)}catch(l){ht(t,s,l)}break;case 5:var a=t.return;try{Oh(t)}catch(l){ht(t,a,l)}}}catch(l){ht(t,t.return,l)}if(t===e){be=null;break}var o=t.sibling;if(o!==null){o.return=t.return,be=o;break}be=t.return}}var y4=Math.ceil,hc=ln.ReactCurrentDispatcher,dp=ln.ReactCurrentOwner,mr=ln.ReactCurrentBatchConfig,Ve=0,kt=null,_t=null,Lt=0,er=0,Zi=Vn(0),bt=0,Wo=null,fi=0,zc=0,pp=0,wo=null,Vt=null,mp=0,gs=1/0,qr=null,dc=!1,Bh=null,Dn=null,el=!1,xn=null,pc=0,bo=0,Fh=null,Dl=-1,Il=0;function Ft(){return Ve&6?dt():Dl!==-1?Dl:Dl=dt()}function In(e){return e.mode&1?Ve&2&&Lt!==0?Lt&-Lt:r4.transition!==null?(Il===0&&(Il=D0()),Il):(e=Qe,e!==0||(e=window.event,e=e===void 0?16:B0(e.type)),e):1}function Er(e,t,r,n){if(50<bo)throw bo=0,Fh=null,Error(de(185));na(e,r,n),(!(Ve&2)||e!==kt)&&(e===kt&&(!(Ve&2)&&(zc|=r),bt===4&&Cn(e,Lt)),Yt(e,n),r===1&&Ve===0&&!(t.mode&1)&&(gs=dt()+500,Mc&&Kn()))}function Yt(e,t){var r=e.callbackNode;r3(e,t);var n=Xl(e,e===kt?Lt:0);if(n===0)r!==null&&Ag(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Ag(r),t===1)e.tag===0?t4(yv.bind(null,e)):ny(yv.bind(null,e)),X3(function(){!(Ve&6)&&Kn()}),r=null;else{switch(I0(n)){case 1:r=$d;break;case 4:r=P0;break;case 16:r=Jl;break;case 536870912:r=T0;break;default:r=Jl}r=tw(r,qy.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function qy(e,t){if(Dl=-1,Il=0,Ve&6)throw Error(de(327));var r=e.callbackNode;if(os()&&e.callbackNode!==r)return null;var n=Xl(e,e===kt?Lt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=mc(e,n);else{t=n;var i=Ve;Ve|=2;var s=Jy();(kt!==e||Lt!==t)&&(qr=null,gs=dt()+500,oi(e,t));do try{S4();break}catch(o){Yy(e,o)}while(!0);ep(),hc.current=s,Ve=i,_t!==null?t=0:(kt=null,Lt=0,t=bt)}if(t!==0){if(t===2&&(i=hh(e),i!==0&&(n=i,t=zh(e,i))),t===1)throw r=Wo,oi(e,0),Cn(e,n),Yt(e,dt()),r;if(t===6)Cn(e,n);else{if(i=e.current.alternate,!(n&30)&&!w4(i)&&(t=mc(e,n),t===2&&(s=hh(e),s!==0&&(n=s,t=zh(e,s))),t===1))throw r=Wo,oi(e,0),Cn(e,n),Yt(e,dt()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(de(345));case 2:Qn(e,Vt,qr);break;case 3:if(Cn(e,n),(n&130023424)===n&&(t=mp+500-dt(),10<t)){if(Xl(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Ft(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=wh(Qn.bind(null,e,Vt,qr),t);break}Qn(e,Vt,qr);break;case 4:if(Cn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var a=31-xr(n);s=1<<a,a=t[a],a>i&&(i=a),n&=~s}if(n=i,n=dt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*y4(n/1960))-n,10<n){e.timeoutHandle=wh(Qn.bind(null,e,Vt,qr),n);break}Qn(e,Vt,qr);break;case 5:Qn(e,Vt,qr);break;default:throw Error(de(329))}}}return Yt(e,dt()),e.callbackNode===r?qy.bind(null,e):null}function zh(e,t){var r=wo;return e.current.memoizedState.isDehydrated&&(oi(e,t).flags|=256),e=mc(e,t),e!==2&&(t=Vt,Vt=r,t!==null&&$h(t)),e}function $h(e){Vt===null?Vt=e:Vt.push.apply(Vt,e)}function w4(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 i=r[n],s=i.getSnapshot;i=i.value;try{if(!Lr(s(),i))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 Cn(e,t){for(t&=~pp,t&=~zc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-xr(t),n=1<<r;e[r]=-1,t&=~n}}function yv(e){if(Ve&6)throw Error(de(327));os();var t=Xl(e,0);if(!(t&1))return Yt(e,dt()),null;var r=mc(e,t);if(e.tag!==0&&r===2){var n=hh(e);n!==0&&(t=n,r=zh(e,n))}if(r===1)throw r=Wo,oi(e,0),Cn(e,t),Yt(e,dt()),r;if(r===6)throw Error(de(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qn(e,Vt,qr),Yt(e,dt()),null}function gp(e,t){var r=Ve;Ve|=1;try{return e(t)}finally{Ve=r,Ve===0&&(gs=dt()+500,Mc&&Kn())}}function hi(e){xn!==null&&xn.tag===0&&!(Ve&6)&&os();var t=Ve;Ve|=1;var r=mr.transition,n=Qe;try{if(mr.transition=null,Qe=1,e)return e()}finally{Qe=n,mr.transition=r,Ve=t,!(Ve&6)&&Kn()}}function vp(){er=Zi.current,st(Zi)}function oi(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,J3(r)),_t!==null)for(r=_t.return;r!==null;){var n=r;switch(Xd(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&rc();break;case 3:ps(),st(Gt),st(Ot),op();break;case 5:sp(n);break;case 4:ps();break;case 13:st(lt);break;case 19:st(lt);break;case 10:tp(n.type._context);break;case 22:case 23:vp()}r=r.return}if(kt=e,_t=e=Nn(e.current,null),Lt=er=t,bt=0,Wo=null,pp=zc=fi=0,Vt=wo=null,ri!==null){for(t=0;t<ri.length;t++)if(r=ri[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,s=r.pending;if(s!==null){var a=s.next;s.next=i,n.next=a}r.pending=n}ri=null}return e}function Yy(e,t){do{var r=_t;try{if(ep(),Ll.current=fc,uc){for(var n=ct.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}uc=!1}if(ui=0,Ct=wt=ct=null,_o=!1,$o=0,dp.current=null,r===null||r.return===null){bt=1,Wo=t,_t=null;break}e:{var s=e,a=r.return,o=r,l=t;if(t=Lt,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,h=o,u=h.tag;if(!(h.mode&1)&&(u===0||u===11||u===15)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var v=ov(a);if(v!==null){v.flags&=-257,av(v,a,o,s,t),v.mode&1&&sv(s,c,t),t=v,l=c;var w=t.updateQueue;if(w===null){var _=new Set;_.add(l),t.updateQueue=_}else w.add(l);break e}else{if(!(t&1)){sv(s,c,t),_p();break e}l=Error(de(426))}}else if(at&&o.mode&1){var g=ov(a);if(g!==null){!(g.flags&65536)&&(g.flags|=256),av(g,a,o,s,t),Qd(ms(l,o));break e}}s=l=ms(l,o),bt!==4&&(bt=2),wo===null?wo=[s]:wo.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var d=Iy(s,l,t);Zg(s,d);break e;case 1:o=l;var f=s.type,p=s.stateNode;if(!(s.flags&128)&&(typeof f.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Dn===null||!Dn.has(p)))){s.flags|=65536,t&=-t,s.lanes|=t;var y=Ny(s,o,t);Zg(s,y);break e}}s=s.return}while(s!==null)}Qy(r)}catch(S){t=S,_t===r&&r!==null&&(_t=r=r.return);continue}break}while(!0)}function Jy(){var e=hc.current;return hc.current=fc,e===null?fc:e}function _p(){(bt===0||bt===3||bt===2)&&(bt=4),kt===null||!(fi&268435455)&&!(zc&268435455)||Cn(kt,Lt)}function mc(e,t){var r=Ve;Ve|=2;var n=Jy();(kt!==e||Lt!==t)&&(qr=null,oi(e,t));do try{b4();break}catch(i){Yy(e,i)}while(!0);if(ep(),Ve=r,hc.current=n,_t!==null)throw Error(de(261));return kt=null,Lt=0,bt}function b4(){for(;_t!==null;)Xy(_t)}function S4(){for(;_t!==null&&!GE();)Xy(_t)}function Xy(e){var t=ew(e.alternate,e,er);e.memoizedProps=e.pendingProps,t===null?Qy(e):_t=t,dp.current=null}function Qy(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=m4(r,t),r!==null){r.flags&=32767,_t=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{bt=6,_t=null;return}}else if(r=p4(r,t,er),r!==null){_t=r;return}if(t=t.sibling,t!==null){_t=t;return}_t=t=e}while(t!==null);bt===0&&(bt=5)}function Qn(e,t,r){var n=Qe,i=mr.transition;try{mr.transition=null,Qe=1,C4(e,t,r,n)}finally{mr.transition=i,Qe=n}return null}function C4(e,t,r,n){do os();while(xn!==null);if(Ve&6)throw Error(de(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(de(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(n3(e,s),e===kt&&(_t=kt=null,Lt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||el||(el=!0,tw(Jl,function(){return os(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=mr.transition,mr.transition=null;var a=Qe;Qe=1;var o=Ve;Ve|=4,dp.current=null,v4(e,r),Ky(r,e),H3(_h),Ql=!!vh,_h=vh=null,e.current=r,_4(r),qE(),Ve=o,Qe=a,mr.transition=s}else e.current=r;if(el&&(el=!1,xn=e,pc=i),s=e.pendingLanes,s===0&&(Dn=null),XE(r.stateNode),Yt(e,dt()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(dc)throw dc=!1,e=Bh,Bh=null,e;return pc&1&&e.tag!==0&&os(),s=e.pendingLanes,s&1?e===Fh?bo++:(bo=0,Fh=e):bo=0,Kn(),null}function os(){if(xn!==null){var e=I0(pc),t=mr.transition,r=Qe;try{if(mr.transition=null,Qe=16>e?16:e,xn===null)var n=!1;else{if(e=xn,xn=null,pc=0,Ve&6)throw Error(de(331));var i=Ve;for(Ve|=4,be=e.current;be!==null;){var s=be,a=s.child;if(be.flags&16){var o=s.deletions;if(o!==null){for(var l=0;l<o.length;l++){var c=o[l];for(be=c;be!==null;){var h=be;switch(h.tag){case 0:case 11:case 15:yo(8,h,s)}var u=h.child;if(u!==null)u.return=h,be=u;else for(;be!==null;){h=be;var m=h.sibling,v=h.return;if(Hy(h),h===c){be=null;break}if(m!==null){m.return=v,be=m;break}be=v}}}var w=s.alternate;if(w!==null){var _=w.child;if(_!==null){w.child=null;do{var g=_.sibling;_.sibling=null,_=g}while(_!==null)}}be=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,be=a;else e:for(;be!==null;){if(s=be,s.flags&2048)switch(s.tag){case 0:case 11:case 15:yo(9,s,s.return)}var d=s.sibling;if(d!==null){d.return=s.return,be=d;break e}be=s.return}}var f=e.current;for(be=f;be!==null;){a=be;var p=a.child;if(a.subtreeFlags&2064&&p!==null)p.return=a,be=p;else e:for(a=f;be!==null;){if(o=be,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Fc(9,o)}}catch(S){ht(o,o.return,S)}if(o===a){be=null;break e}var y=o.sibling;if(y!==null){y.return=o.return,be=y;break e}be=o.return}}if(Ve=i,Kn(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(Dc,e)}catch{}n=!0}return n}finally{Qe=r,mr.transition=t}}return!1}function wv(e,t,r){t=ms(r,t),t=Iy(e,t,1),e=Tn(e,t,1),t=Ft(),e!==null&&(na(e,1,t),Yt(e,t))}function ht(e,t,r){if(e.tag===3)wv(e,e,r);else for(;t!==null;){if(t.tag===3){wv(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Dn===null||!Dn.has(n))){e=ms(r,e),e=Ny(t,e,1),t=Tn(t,e,1),e=Ft(),t!==null&&(na(t,1,e),Yt(t,e));break}}t=t.return}}function k4(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ft(),e.pingedLanes|=e.suspendedLanes&r,kt===e&&(Lt&r)===r&&(bt===4||bt===3&&(Lt&130023424)===Lt&&500>dt()-mp?oi(e,0):pp|=r),Yt(e,t)}function Zy(e,t){t===0&&(e.mode&1?(t=Wa,Wa<<=1,!(Wa&130023424)&&(Wa=4194304)):t=1);var r=Ft();e=rn(e,t),e!==null&&(na(e,t,r),Yt(e,r))}function x4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Zy(e,r)}function E4(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(de(314))}n!==null&&n.delete(t),Zy(e,r)}var ew;ew=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Gt.current)Kt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Kt=!1,d4(e,t,r);Kt=!!(e.flags&131072)}else Kt=!1,at&&t.flags&1048576&&iy(t,sc,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Tl(e,t),e=t.pendingProps;var i=fs(t,Ot.current);ss(t,r),i=lp(null,t,n,e,i,r);var s=cp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qt(n)?(s=!0,nc(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,np(t),i.updater=Bc,t.stateNode=i,i._reactInternals=t,Ah(t,n,e,r),t=Th(null,t,n,!0,s,r)):(t.tag=0,at&&s&&Jd(t),jt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Tl(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=L4(n),e=br(n,e),i){case 0:t=Ph(null,t,n,e,r);break e;case 1:t=uv(null,t,n,e,r);break e;case 11:t=lv(null,t,n,e,r);break e;case 14:t=cv(null,t,n,br(n.type,e),r);break e}throw Error(de(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:br(n,i),Ph(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:br(n,i),uv(e,t,n,i,r);case 3:e:{if(jy(t),e===null)throw Error(de(387));n=t.pendingProps,s=t.memoizedState,i=s.element,uy(e,t),lc(t,n,null,r);var a=t.memoizedState;if(n=a.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=ms(Error(de(423)),t),t=fv(e,t,n,r,i);break e}else if(n!==i){i=ms(Error(de(424)),t),t=fv(e,t,n,r,i);break e}else for(tr=Pn(t.stateNode.containerInfo.firstChild),nr=t,at=!0,Cr=null,r=ly(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(hs(),n===i){t=nn(e,t,r);break e}jt(e,t,n,r)}t=t.child}return t;case 5:return fy(t),e===null&&kh(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,yh(n,i)?a=null:s!==null&&yh(n,s)&&(t.flags|=32),My(e,t),jt(e,t,a,r),t.child;case 6:return e===null&&kh(t),null;case 13:return By(e,t,r);case 4:return ip(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ds(t,null,n,r):jt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:br(n,i),lv(e,t,n,i,r);case 7:return jt(e,t,t.pendingProps,r),t.child;case 8:return jt(e,t,t.pendingProps.children,r),t.child;case 12:return jt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,rt(oc,n._currentValue),n._currentValue=a,s!==null)if(Lr(s.value,a)){if(s.children===i.children&&!Gt.current){t=nn(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Qr(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?l.next=l:(l.next=h.next,h.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),xh(s.return,r,t),o.lanes|=r;break}l=l.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(de(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),xh(a,r,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}jt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,ss(t,r),i=gr(i),n=n(i),t.flags|=1,jt(e,t,n,r),t.child;case 14:return n=t.type,i=br(n,t.pendingProps),i=br(n.type,i),cv(e,t,n,i,r);case 15:return Ry(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:br(n,i),Tl(e,t),t.tag=1,qt(n)?(e=!0,nc(t)):e=!1,ss(t,r),Dy(t,n,i),Ah(t,n,i,r),Th(null,t,n,!0,e,r);case 19:return Fy(e,t,r);case 22:return Oy(e,t,r)}throw Error(de(156,t.tag))};function tw(e,t){return L0(e,t)}function A4(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 pr(e,t,r,n){return new A4(e,t,r,n)}function yp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function L4(e){if(typeof e=="function")return yp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bd)return 11;if(e===Fd)return 14}return 2}function Nn(e,t){var r=e.alternate;return r===null?(r=pr(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 Nl(e,t,r,n,i,s){var a=2;if(n=e,typeof e=="function")yp(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Hi:return ai(r.children,i,s,t);case jd:a=8,i|=8;break;case Xf:return e=pr(12,r,t,i|2),e.elementType=Xf,e.lanes=s,e;case Qf:return e=pr(13,r,t,i),e.elementType=Qf,e.lanes=s,e;case Zf:return e=pr(19,r,t,i),e.elementType=Zf,e.lanes=s,e;case f0:return $c(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c0:a=10;break e;case u0:a=9;break e;case Bd:a=11;break e;case Fd:a=14;break e;case wn:a=16,n=null;break e}throw Error(de(130,e==null?e:typeof e,""))}return t=pr(a,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function ai(e,t,r,n){return e=pr(7,e,n,t),e.lanes=r,e}function $c(e,t,r,n){return e=pr(22,e,n,t),e.elementType=f0,e.lanes=r,e.stateNode={isHidden:!1},e}function uf(e,t,r){return e=pr(6,e,null,t),e.lanes=r,e}function ff(e,t,r){return t=pr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function P4(e,t,r,n,i){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=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function wp(e,t,r,n,i,s,a,o,l){return e=new P4(e,t,r,o,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=pr(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},np(s),e}function T4(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ui,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function rw(e){if(!e)return Bn;e=e._reactInternals;e:{if(yi(e)!==e||e.tag!==1)throw Error(de(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(qt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(de(171))}if(e.tag===1){var r=e.type;if(qt(r))return ry(e,r,t)}return t}function nw(e,t,r,n,i,s,a,o,l){return e=wp(r,n,!0,e,i,s,a,o,l),e.context=rw(null),r=e.current,n=Ft(),i=In(r),s=Qr(n,i),s.callback=t??null,Tn(r,s,i),e.current.lanes=i,na(e,i,n),Yt(e,n),e}function Uc(e,t,r,n){var i=t.current,s=Ft(),a=In(i);return r=rw(r),t.context===null?t.context=r:t.pendingContext=r,t=Qr(s,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Tn(i,t,a),e!==null&&(Er(e,i,a,s),Al(e,i,a)),a}function gc(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 bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function bp(e,t){bv(e,t),(e=e.alternate)&&bv(e,t)}function D4(){return null}var iw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Sp(e){this._internalRoot=e}Hc.prototype.render=Sp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(de(409));Uc(e,t,null,null)};Hc.prototype.unmount=Sp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hi(function(){Uc(null,e,null,null)}),t[tn]=null}};function Hc(e){this._internalRoot=e}Hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=O0();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Sn.length&&t!==0&&t<Sn[r].priority;r++);Sn.splice(r,0,e),r===0&&j0(e)}};function Cp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Sv(){}function I4(e,t,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var c=gc(a);s.call(c)}}var a=nw(t,n,e,0,null,!1,!1,"",Sv);return e._reactRootContainer=a,e[tn]=a.current,Mo(e.nodeType===8?e.parentNode:e),hi(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var o=n;n=function(){var c=gc(l);o.call(c)}}var l=wp(e,0,!1,null,null,!1,!1,"",Sv);return e._reactRootContainer=l,e[tn]=l.current,Mo(e.nodeType===8?e.parentNode:e),hi(function(){Uc(t,l,r,n)}),l}function Vc(e,t,r,n,i){var s=r._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var o=i;i=function(){var l=gc(a);o.call(l)}}Uc(t,a,e,i)}else a=I4(r,t,e,i,n);return gc(a)}N0=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=lo(t.pendingLanes);r!==0&&(Ud(t,r|1),Yt(t,dt()),!(Ve&6)&&(gs=dt()+500,Kn()))}break;case 13:hi(function(){var n=rn(e,1);if(n!==null){var i=Ft();Er(n,e,1,i)}}),bp(e,1)}};Hd=function(e){if(e.tag===13){var t=rn(e,134217728);if(t!==null){var r=Ft();Er(t,e,134217728,r)}bp(e,134217728)}};R0=function(e){if(e.tag===13){var t=In(e),r=rn(e,t);if(r!==null){var n=Ft();Er(r,e,t,n)}bp(e,t)}};O0=function(){return Qe};M0=function(e,t){var r=Qe;try{return Qe=e,t()}finally{Qe=r}};ch=function(e,t,r){switch(t){case"input":if(rh(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 i=Oc(n);if(!i)throw Error(de(90));d0(n),rh(n,i)}}}break;case"textarea":m0(e,r);break;case"select":t=r.value,t!=null&&ts(e,!!r.multiple,t,!1)}};S0=gp;C0=hi;var N4={usingClientEntryPoint:!1,Events:[sa,Gi,Oc,w0,b0,gp]},Zs={findFiberByHostInstance:ti,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},R4={bundleType:Zs.bundleType,version:Zs.version,rendererPackageName:Zs.rendererPackageName,rendererConfig:Zs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ln.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=E0(e),e===null?null:e.stateNode},findFiberByHostInstance:Zs.findFiberByHostInstance||D4,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 tl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tl.isDisabled&&tl.supportsFiber)try{Dc=tl.inject(R4),Fr=tl}catch{}}or.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N4;or.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cp(t))throw Error(de(200));return T4(e,t,null,r)};or.createRoot=function(e,t){if(!Cp(e))throw Error(de(299));var r=!1,n="",i=iw;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=wp(e,1,!1,null,null,r,!1,n,i),e[tn]=t.current,Mo(e.nodeType===8?e.parentNode:e),new Sp(t)};or.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(de(188)):(e=Object.keys(e).join(","),Error(de(268,e)));return e=E0(t),e=e===null?null:e.stateNode,e};or.flushSync=function(e){return hi(e)};or.hydrate=function(e,t,r){if(!Wc(t))throw Error(de(200));return Vc(null,e,t,!0,r)};or.hydrateRoot=function(e,t,r){if(!Cp(e))throw Error(de(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",a=iw;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=nw(t,null,e,1,r??null,i,!1,s,a),e[tn]=t.current,Mo(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Hc(t)};or.render=function(e,t,r){if(!Wc(t))throw Error(de(200));return Vc(null,e,t,!1,r)};or.unmountComponentAtNode=function(e){if(!Wc(e))throw Error(de(40));return e._reactRootContainer?(hi(function(){Vc(null,null,e,!1,function(){e._reactRootContainer=null,e[tn]=null})}),!0):!1};or.unstable_batchedUpdates=gp;or.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Wc(r))throw Error(de(200));if(e==null||e._reactInternals===void 0)throw Error(de(38));return Vc(e,t,r,!1,n)};or.version="18.3.1-next-f1338f8080-20240426";function sw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sw)}catch(e){console.error(e)}}sw(),s0.exports=or;var kp=s0.exports;const O4=Lc(kp);var ow,Cv=kp;ow=Cv.createRoot,Cv.hydrateRoot;const M4="modulepreload",j4=function(e){return"/"+e},kv={},wi=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=j4(l),l in kv)return;kv[l]=!0;const c=l.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${h}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":M4,c||(u.as="script"),u.crossOrigin="",u.href=l,o&&u.setAttribute("nonce",o),document.head.appendChild(u),c)return new Promise((m,v)=>{u.addEventListener("load",m),u.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})};function B4(e={}){const{immediate:t=!1,onNeedRefresh:r,onOfflineReady:n,onRegistered:i,onRegisteredSW:s,onRegisterError:a}=e;let o,l;const c=async(u=!0)=>{await l};async function h(){if("serviceWorker"in navigator){if(o=await wi(async()=>{const{Workbox:u}=await import("./workbox-window.prod.es5-vqzQaGvo.js");return{Workbox:u}},[]).then(({Workbox:u})=>new u("/sw.js",{scope:"/",type:"classic"})).catch(u=>{a==null||a(u)}),!o)return;o.addEventListener("activated",u=>{(u.isUpdate||u.isExternal)&&window.location.reload()}),o.addEventListener("installed",u=>{u.isUpdate||n==null||n()}),o.register({immediate:t}).then(u=>{s?s("/sw.js",u):i==null||i(u)}).catch(u=>{a==null||a(u)})}}return l=h(),c}function xv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xv(Object(r),!0).forEach(function(n){Uh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uh(e,t,r){return(t=function(n){var i=function(s,a){if(typeof s!="object"||s===null)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var l=o.call(s,a);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(s)}(n,"string");return typeof i=="symbol"?i:String(i)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vs(e,t){if(e==null)return{};var r,n,i=function(a,o){if(a==null)return{};var l,c,h={},u=Object.keys(a);for(c=0;c<u.length;c++)l=u[c],o.indexOf(l)>=0||(h[l]=a[l]);return h}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Pr(e,t){return z4(e)||function(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,a,o,l,c=[],h=!0,u=!1;try{if(o=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;h=!1}else for(;!(h=(s=o.call(i)).done)&&(c.push(s.value),c.length!==n);h=!0);}catch(m){u=!0,a=m}finally{try{if(!h&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(u)throw a}}return c}}(e,t)||xp(e,t)||U4()}function F4(e){return function(t){if(Array.isArray(t))return Hh(t)}(e)||$4(e)||xp(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
41
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function z4(e){if(Array.isArray(e))return e}function $4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xp(e,t){if(e){if(typeof e=="string")return Hh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hh(e,t):void 0}}function Hh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function U4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
42
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H4(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=xp(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
43
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{a||r.return==null||r.return()}finally{if(o)throw s}}}}var rl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aa(e,t){return e(t={exports:{}},t.exports),t.exports}var rr=aa(function(e){/*!
44
- Copyright (c) 2018 Jed Watson.
45
- Licensed under the MIT License (MIT), see
46
- http://jedwatson.github.io/classnames
47
- */(function(){var t={}.hasOwnProperty;function r(){for(var n=[],i=0;i<arguments.length;i++){var s=arguments[i];if(s){var a=typeof s;if(a==="string"||a==="number")n.push(s);else if(Array.isArray(s)){if(s.length){var o=r.apply(null,s);o&&n.push(o)}}else if(a==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){n.push(s.toString());continue}for(var l in s)t.call(s,l)&&s[l]&&n.push(l)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}),Ht={hunkClassName:"",lineClassName:"",gutterClassName:"",codeClassName:"",monotonous:!1,gutterType:"default",viewType:"split",widgets:{},hideGutter:!1,selectedChanges:[],generateAnchorID:function(){},generateLineClassName:function(){},renderGutter:function(e){var t=e.renderDefault;return(0,e.wrapInAnchor)(t())},codeEvents:{},gutterEvents:{}},aw=x.createContext(Ht),W4=aw.Provider,V4=function(){return x.useContext(aw)},K4=aa(function(e,t){(function(r){function n(s){var a=s.slice(11),o=null,l=null;switch(a.indexOf('"')){case-1:o=(u=a.split(" "))[0].slice(2),l=u[1].slice(2);break;case 0:var c=a.indexOf('"',2);o=a.slice(3,c);var h=a.indexOf('"',c+1);l=h<0?a.slice(c+4):a.slice(h+3,-1);break;default:var u;o=(u=a.split(" "))[0].slice(2),l=u[1].slice(3,-1)}return{oldPath:o,newPath:l}}var i={parse:function(s){for(var a,o,l,c,h,u=[],m=2,v=s.split(`
48
- `),w=v.length,_=0;_<w;){var g=v[_];if(g.indexOf("diff --git")===0){a={hunks:[],oldEndingNewLine:!0,newEndingNewLine:!0,oldPath:(h=n(g)).oldPath,newPath:h.newPath},u.push(a);var d,f=null;e:for(;d=v[++_];){var p=d.indexOf(" "),y=p>-1?d.slice(0,p):y;switch(y){case"diff":_--;break e;case"deleted":case"new":var S=d.slice(p+1);S.indexOf("file mode")===0&&(a[y==="new"?"newMode":"oldMode"]=S.slice(10));break;case"similarity":a.similarity=parseInt(d.split(" ")[2],10);break;case"index":var b=d.slice(p+1).split(" "),k=b[0].split("..");a.oldRevision=k[0],a.newRevision=k[1],b[1]&&(a.oldMode=a.newMode=b[1]);break;case"copy":case"rename":var C=d.slice(p+1);C.indexOf("from")===0?a.oldPath=C.slice(5):a.newPath=C.slice(3),f=y;break;case"---":var A=d.slice(p+1),P=v[++_].slice(4);A==="/dev/null"?(P=P.slice(2),f="add"):P==="/dev/null"?(A=A.slice(2),f="delete"):(f="modify",A=A.slice(2),P=P.slice(2)),A&&(a.oldPath=A),P&&(a.newPath=P),m=5;break e}}a.type=f||"modify"}else if(g.indexOf("Binary")===0)a.isBinary=!0,a.type=g.indexOf("/dev/null and")>=0?"add":g.indexOf("and /dev/null")>=0?"delete":"modify",m=2,a=null;else if(m===5)if(g.indexOf("@@")===0){var O=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(g);o={content:g,oldStart:O[1]-0,newStart:O[4]-0,oldLines:O[3]-0||1,newLines:O[6]-0||1,changes:[]},a.hunks.push(o),l=o.oldStart,c=o.newStart}else{var R=g.slice(0,1),M={content:g.slice(1)};switch(R){case"+":M.type="insert",M.isInsert=!0,M.lineNumber=c,c++;break;case"-":M.type="delete",M.isDelete=!0,M.lineNumber=l,l++;break;case" ":M.type="normal",M.isNormal=!0,M.oldLineNumber=l,M.newLineNumber=c,l++,c++;break;case"\\":var z=o.changes[o.changes.length-1];z.isDelete||(a.newEndingNewLine=!1),z.isInsert||(a.oldEndingNewLine=!1)}M.type&&o.changes.push(M)}_++}return u}};e.exports=i})()});function la(e){return e.type==="insert"}function Rn(e){return e.type==="delete"}function Vo(e){return e.type==="normal"}function G4(e,t){var r=t.nearbySequences==="zip"?function(n){var i=n.reduce(function(s,a,o){var l=Pr(s,3),c=l[0],h=l[1],u=l[2];return h?la(a)&&u>=0?(c.splice(u+1,0,a),[c,a,u+2]):(c.push(a),[c,a,Rn(a)&&Rn(h)?u:o]):(c.push(a),[c,a,Rn(a)?o:-1])},[[],null,-1]);return Pr(i,1)[0]}(e.changes):e.changes;return pt(pt({},e),{},{isPlain:!1,changes:r})}function q4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=function(n){if(n.startsWith("diff --git"))return n;var i=n.indexOf(`
49
- `),s=n.indexOf(`
50
- `,i+1),a=n.slice(0,i),o=n.slice(i+1,s),l=a.split(" ").slice(1,-3).join(" "),c=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(l," b/").concat(c),"index 1111111..2222222 100644","--- a/".concat(l),"+++ b/".concat(c),n.slice(s+1)].join(`
51
- `)}(e.trimStart());return K4.parse(r).map(function(n){return function(i,s){var a=i.hunks.map(function(o){return G4(o,s)});return pt(pt({},i),{},{hunks:a})}(n,t)})}function Y4(e){return e[0]}function J4(e){return e[e.length-1]}function Wh(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function Ko(e){return e==="old"?function(t){return la(t)?-1:Vo(t)?t.oldLineNumber:t.lineNumber}:function(t){return Rn(t)?-1:Vo(t)?t.newLineNumber:t.lineNumber}}function lw(e,t){return function(r,n){var i=r[e],s=i+r[t];return n>=i&&n<s}}function X4(e,t){return function(r,n,i){var s=r[e]+r[t],a=n[e];return i>=s&&i<a}}function cw(e){var t=Ko(e),r=function(n){var i=Pr(Wh(n),2),s=lw(i[0],i[1]);return function(a,o){return a.find(function(l){return s(l,o)})}}(e);return function(n,i){var s=r(n,i);if(s)return s.changes.find(function(a){return t(a)===i})}}function Ep(e){var t=e==="old"?"new":"old",r=Pr(Wh(e),2),n=r[0],i=r[1],s=Pr(Wh(t),2),a=s[0],o=s[1],l=Ko(e),c=Ko(t),h=lw(n,i),u=X4(n,i);return function(m,v){var w=Y4(m);if(v<w[n]){var _=w[n]-v;return w[a]-_}var g=J4(m);if(g[n]+g[i]<=v){var d=v-g[n]-g[i];return g[a]+g[o]+d}for(var f=0;f<m.length;f++){var p=m[f],y=m[f+1];if(h(p,v)){var S=p.changes.findIndex(function(O){return l(O)===v}),b=p.changes[S];if(Vo(b))return c(b);var k=Rn(b)?S+1:S-1,C=p.changes[k];if(!C)return-1;var A=la(b)?"delete":"insert";return C.type===A?c(C):-1}if(u(p,y,v)){var P=v-p[n]-p[i];return p[a]+p[o]+P}}throw new Error("Unexpected line position ".concat(v))}}var Q4=function(){this.__data__=[],this.size=0},uw=function(e,t){return e===t||e!=e&&t!=t},Kc=function(e,t){for(var r=e.length;r--;)if(uw(e[r][0],t))return r;return-1},Z4=Array.prototype.splice,eA=function(e){var t=this.__data__,r=Kc(t,e);return!(r<0)&&(r==t.length-1?t.pop():Z4.call(t,r,1),--this.size,!0)},tA=function(e){var t=this.__data__,r=Kc(t,e);return r<0?void 0:t[r][1]},rA=function(e){return Kc(this.__data__,e)>-1},nA=function(e,t){var r=this.__data__,n=Kc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Oi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Oi.prototype.clear=Q4,Oi.prototype.delete=eA,Oi.prototype.get=tA,Oi.prototype.has=rA,Oi.prototype.set=nA;var Gc=Oi,iA=function(){this.__data__=new Gc,this.size=0},sA=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},oA=function(e){return this.__data__.get(e)},aA=function(e){return this.__data__.has(e)},fw=typeof rl=="object"&&rl&&rl.Object===Object&&rl,lA=typeof self=="object"&&self&&self.Object===Object&&self,cn=fw||lA||Function("return this")(),$r=cn.Symbol,hw=Object.prototype,cA=hw.hasOwnProperty,uA=hw.toString,eo=$r?$r.toStringTag:void 0,fA=function(e){var t=cA.call(e,eo),r=e[eo];try{e[eo]=void 0;var n=!0}catch{}var i=uA.call(e);return n&&(t?e[eo]=r:delete e[eo]),i},hA=Object.prototype.toString,dA=function(e){return hA.call(e)},Ev=$r?$r.toStringTag:void 0,ks=function(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Ev&&Ev in Object(e)?fA(e):dA(e)},Ap=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},dw=function(e){if(!Ap(e))return!1;var t=ks(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},hf=cn["__core-js_shared__"],Av=function(){var e=/[^.]+$/.exec(hf&&hf.keys&&hf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pA=function(e){return!!Av&&Av in e},mA=Function.prototype.toString,bi=function(e){if(e!=null){try{return mA.call(e)}catch{}try{return e+""}catch{}}return""},gA=/^\[object .+?Constructor\]$/,vA=Function.prototype,_A=Object.prototype,yA=vA.toString,wA=_A.hasOwnProperty,bA=RegExp("^"+yA.call(wA).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),SA=function(e){return!(!Ap(e)||pA(e))&&(dw(e)?bA:gA).test(bi(e))},CA=function(e,t){return e==null?void 0:e[t]},Si=function(e,t){var r=CA(e,t);return SA(r)?r:void 0},Go=Si(cn,"Map"),qo=Si(Object,"create"),kA=function(){this.__data__=qo?qo(null):{},this.size=0},xA=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},EA=Object.prototype.hasOwnProperty,AA=function(e){var t=this.__data__;if(qo){var r=t[e];return r==="__lodash_hash_undefined__"?void 0:r}return EA.call(t,e)?t[e]:void 0},LA=Object.prototype.hasOwnProperty,PA=function(e){var t=this.__data__;return qo?t[e]!==void 0:LA.call(t,e)},TA=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qo&&t===void 0?"__lodash_hash_undefined__":t,this};function Mi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mi.prototype.clear=kA,Mi.prototype.delete=xA,Mi.prototype.get=AA,Mi.prototype.has=PA,Mi.prototype.set=TA;var Lv=Mi,DA=function(){this.size=0,this.__data__={hash:new Lv,map:new(Go||Gc),string:new Lv}},IA=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null},qc=function(e,t){var r=e.__data__;return IA(t)?r[typeof t=="string"?"string":"hash"]:r.map},NA=function(e){var t=qc(this,e).delete(e);return this.size-=t?1:0,t},RA=function(e){return qc(this,e).get(e)},OA=function(e){return qc(this,e).has(e)},MA=function(e,t){var r=qc(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function ji(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ji.prototype.clear=DA,ji.prototype.delete=NA,ji.prototype.get=RA,ji.prototype.has=OA,ji.prototype.set=MA;var Yc=ji,jA=function(e,t){var r=this.__data__;if(r instanceof Gc){var n=r.__data__;if(!Go||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yc(n)}return r.set(e,t),this.size=r.size,this};function Bi(e){var t=this.__data__=new Gc(e);this.size=t.size}Bi.prototype.clear=iA,Bi.prototype.delete=sA,Bi.prototype.get=oA,Bi.prototype.has=aA,Bi.prototype.set=jA;var Rl=Bi,BA=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},FA=function(e){return this.__data__.has(e)};function Ol(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Yc;++t<r;)this.add(e[t])}Ol.prototype.add=Ol.prototype.push=BA,Ol.prototype.has=FA;var zA=Ol,$A=function(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},UA=function(e,t){return e.has(t)},pw=function(e,t,r,n,i,s){var a=1&r,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),h=s.get(t);if(c&&h)return c==t&&h==e;var u=-1,m=!0,v=2&r?new zA:void 0;for(s.set(e,t),s.set(t,e);++u<o;){var w=e[u],_=t[u];if(n)var g=a?n(_,w,u,t,e,s):n(w,_,u,e,t,s);if(g!==void 0){if(g)continue;m=!1;break}if(v){if(!$A(t,function(d,f){if(!UA(v,f)&&(w===d||i(w,d,r,n,s)))return v.push(f)})){m=!1;break}}else if(w!==_&&!i(w,_,r,n,s)){m=!1;break}}return s.delete(e),s.delete(t),m},Pv=cn.Uint8Array,HA=function(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r},WA=function(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r},Tv=$r?$r.prototype:void 0,df=Tv?Tv.valueOf:void 0,VA=function(e,t,r,n,i,s,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new Pv(e),new Pv(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return uw(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=HA;case"[object Set]":var l=1&n;if(o||(o=WA),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var h=pw(o(e),o(t),n,i,s,a);return a.delete(e),h;case"[object Symbol]":if(df)return df.call(e)==df.call(t)}return!1},KA=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e},sn=Array.isArray,GA=function(e,t,r){var n=t(e);return sn(e)?n:KA(n,r(e))},qA=function(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s},YA=function(){return[]},JA=Object.prototype.propertyIsEnumerable,Dv=Object.getOwnPropertySymbols,XA=Dv?function(e){return e==null?[]:(e=Object(e),qA(Dv(e),function(t){return JA.call(e,t)}))}:YA,QA=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n},_s=function(e){return e!=null&&typeof e=="object"},Iv=function(e){return _s(e)&&ks(e)=="[object Arguments]"},mw=Object.prototype,ZA=mw.hasOwnProperty,e5=mw.propertyIsEnumerable,gw=Iv(function(){return arguments}())?Iv:function(e){return _s(e)&&ZA.call(e,"callee")&&!e5.call(e,"callee")},t5=function(){return!1},Vh=aa(function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,i=n&&n.exports===r?cn.Buffer:void 0,s=(i?i.isBuffer:void 0)||t5;e.exports=s}),r5=/^(?:0|[1-9]\d*)$/,vw=function(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&(r=="number"||r!="symbol"&&r5.test(e))&&e>-1&&e%1==0&&e<t},Lp=function(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=9007199254740991},it={};it["[object Float32Array]"]=it["[object Float64Array]"]=it["[object Int8Array]"]=it["[object Int16Array]"]=it["[object Int32Array]"]=it["[object Uint8Array]"]=it["[object Uint8ClampedArray]"]=it["[object Uint16Array]"]=it["[object Uint32Array]"]=!0,it["[object Arguments]"]=it["[object Array]"]=it["[object ArrayBuffer]"]=it["[object Boolean]"]=it["[object DataView]"]=it["[object Date]"]=it["[object Error]"]=it["[object Function]"]=it["[object Map]"]=it["[object Number]"]=it["[object Object]"]=it["[object RegExp]"]=it["[object Set]"]=it["[object String]"]=it["[object WeakMap]"]=!1;var n5=function(e){return _s(e)&&Lp(e.length)&&!!it[ks(e)]},i5=function(e){return function(t){return e(t)}},Nv=aa(function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,i=n&&n.exports===r&&fw.process,s=function(){try{var a=n&&n.require&&n.require("util").types;return a||i&&i.binding&&i.binding("util")}catch{}}();e.exports=s}),Rv=Nv&&Nv.isTypedArray,_w=Rv?i5(Rv):n5,s5=Object.prototype.hasOwnProperty,o5=function(e,t){var r=sn(e),n=!r&&gw(e),i=!r&&!n&&Vh(e),s=!r&&!n&&!i&&_w(e),a=r||n||i||s,o=a?QA(e.length,String):[],l=o.length;for(var c in e)!s5.call(e,c)||a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||vw(c,l))||o.push(c);return o},a5=Object.prototype,l5=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||a5)},c5=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),u5=Object.prototype.hasOwnProperty,f5=function(e){if(!l5(e))return c5(e);var t=[];for(var r in Object(e))u5.call(e,r)&&r!="constructor"&&t.push(r);return t},h5=function(e){return e!=null&&Lp(e.length)&&!dw(e)},Pp=function(e){return h5(e)?o5(e):f5(e)},Ov=function(e){return GA(e,Pp,XA)},d5=Object.prototype.hasOwnProperty,p5=function(e,t,r,n,i,s){var a=1&r,o=Ov(e),l=o.length;if(l!=Ov(t).length&&!a)return!1;for(var c=l;c--;){var h=o[c];if(!(a?h in t:d5.call(t,h)))return!1}var u=s.get(e),m=s.get(t);if(u&&m)return u==t&&m==e;var v=!0;s.set(e,t),s.set(t,e);for(var w=a;++c<l;){var _=e[h=o[c]],g=t[h];if(n)var d=a?n(g,_,h,t,e,s):n(_,g,h,e,t,s);if(!(d===void 0?_===g||i(_,g,r,n,s):d)){v=!1;break}w||(w=h=="constructor")}if(v&&!w){var f=e.constructor,p=t.constructor;f==p||!("constructor"in e)||!("constructor"in t)||typeof f=="function"&&f instanceof f&&typeof p=="function"&&p instanceof p||(v=!1)}return s.delete(e),s.delete(t),v},Kh=Si(cn,"DataView"),Gh=Si(cn,"Promise"),qh=Si(cn,"Set"),Yh=Si(cn,"WeakMap"),m5=bi(Kh),g5=bi(Go),v5=bi(Gh),_5=bi(qh),y5=bi(Yh),Zn=ks;(Kh&&Zn(new Kh(new ArrayBuffer(1)))!="[object DataView]"||Go&&Zn(new Go)!="[object Map]"||Gh&&Zn(Gh.resolve())!="[object Promise]"||qh&&Zn(new qh)!="[object Set]"||Yh&&Zn(new Yh)!="[object WeakMap]")&&(Zn=function(e){var t=ks(e),r=t=="[object Object]"?e.constructor:void 0,n=r?bi(r):"";if(n)switch(n){case m5:return"[object DataView]";case g5:return"[object Map]";case v5:return"[object Promise]";case _5:return"[object Set]";case y5:return"[object WeakMap]"}return t});var Mv=Zn,nl="[object Object]",jv=Object.prototype.hasOwnProperty,w5=function(e,t,r,n,i,s){var a=sn(e),o=sn(t),l=a?"[object Array]":Mv(e),c=o?"[object Array]":Mv(t),h=(l=l=="[object Arguments]"?nl:l)==nl,u=(c=c=="[object Arguments]"?nl:c)==nl,m=l==c;if(m&&Vh(e)){if(!Vh(t))return!1;a=!0,h=!1}if(m&&!h)return s||(s=new Rl),a||_w(e)?pw(e,t,r,n,i,s):VA(e,t,l,r,n,i,s);if(!(1&r)){var v=h&&jv.call(e,"__wrapped__"),w=u&&jv.call(t,"__wrapped__");if(v||w){var _=v?e.value():e,g=w?t.value():t;return s||(s=new Rl),i(_,g,r,n,s)}}return!!m&&(s||(s=new Rl),p5(e,t,r,n,i,s))},yw=function e(t,r,n,i,s){return t===r||(t==null||r==null||!_s(t)&&!_s(r)?t!=t&&r!=r:w5(t,r,n,i,e,s))},b5=function(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){var o=(a=r[i])[0],l=e[o],c=a[1];if(a[2]){if(l===void 0&&!(o in e))return!1}else{var h=new Rl,u;if(!(u===void 0?yw(c,l,3,n,h):u))return!1}}return!0},ww=function(e){return e==e&&!Ap(e)},S5=function(e){for(var t=Pp(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ww(i)]}return t},bw=function(e,t){return function(r){return r!=null&&r[e]===t&&(t!==void 0||e in Object(r))}},C5=function(e){var t=S5(e);return t.length==1&&t[0][2]?bw(t[0][0],t[0][1]):function(r){return r===e||b5(r,e,t)}},Tp=function(e){return typeof e=="symbol"||_s(e)&&ks(e)=="[object Symbol]"},k5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,x5=/^\w*$/,Dp=function(e,t){if(sn(e))return!1;var r=typeof e;return!(r!="number"&&r!="symbol"&&r!="boolean"&&e!=null&&!Tp(e))||x5.test(e)||!k5.test(e)||t!=null&&e in Object(t)};function Ip(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(Ip.Cache||Yc),r}Ip.Cache=Yc;var E5=Ip,A5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,L5=/\\(\\)?/g,P5=function(e){var t=E5(e,function(n){return r.size===500&&r.clear(),n}),r=t.cache;return t}(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(A5,function(r,n,i,s){t.push(i?s.replace(L5,"$1"):n||r)}),t}),T5=function(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i},Bv=$r?$r.prototype:void 0,Fv=Bv?Bv.toString:void 0,D5=function e(t){if(typeof t=="string")return t;if(sn(t))return T5(t,e)+"";if(Tp(t))return Fv?Fv.call(t):"";var r=t+"";return r=="0"&&1/t==-1/0?"-0":r},I5=function(e){return e==null?"":D5(e)},Sw=function(e,t){return sn(e)?e:Dp(e,t)?[e]:P5(I5(e))},Jc=function(e){if(typeof e=="string"||Tp(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},Cw=function(e,t){for(var r=0,n=(t=Sw(t,e)).length;e!=null&&r<n;)e=e[Jc(t[r++])];return r&&r==n?e:void 0},N5=function(e,t,r){var n=e==null?void 0:Cw(e,t);return n===void 0?r:n},R5=function(e,t){return e!=null&&t in Object(e)},O5=function(e,t,r){for(var n=-1,i=(t=Sw(t,e)).length,s=!1;++n<i;){var a=Jc(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:!!(i=e==null?0:e.length)&&Lp(i)&&vw(a,i)&&(sn(e)||gw(e))},M5=function(e,t){return e!=null&&O5(e,t,R5)},j5=function(e,t){return Dp(e)&&ww(t)?bw(Jc(e),t):function(r){var n=N5(r,e);return n===void 0&&n===t?M5(r,e):yw(t,n,3)}},B5=function(e){return e},F5=function(e){return function(t){return t==null?void 0:t[e]}},z5=function(e){return function(t){return Cw(t,e)}},$5=function(e){return Dp(e)?F5(Jc(e)):z5(e)},U5=function(e){return typeof e=="function"?e:e==null?B5:typeof e=="object"?sn(e)?j5(e[0],e[1]):C5(e):$5(e)};function On(e){if(!e)throw new Error("change is not provided");if(Vo(e))return"N".concat(e.oldLineNumber);var t=la(e)?"I":"D";return"".concat(t).concat(e.lineNumber)}Ep("old");var Np=Ko("old"),Rp=Ko("new");cw("old");cw("new");Ep("new");Ep("old");var zv=function(){try{var e=Si(Object,"defineProperty");return e({},"",{}),e}catch{}}(),H5=function(e,t,r){t=="__proto__"&&zv?zv(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},W5=function(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var l=a[++i];if(r(s[l],l,s)===!1)break}return t}},V5=W5(),K5=function(e,t){return e&&V5(e,t,Pp)},kw=function(e,t){var r={};return t=U5(t),K5(e,function(n,i,s){H5(r,i,t(n,i,s))}),r},G5=["changeKey","text","tokens","renderToken"],$v=function e(t,r){var n=t.type,i=t.value,s=t.markType,a=t.properties,o=t.className,l=t.children,c=function(u){return E.jsx("span",{className:u,children:i||l&&l.map(e)},r)};switch(n){case"text":return i;case"mark":return c("diff-code-mark diff-code-mark-".concat(s));case"edit":return c("diff-code-edit");default:var h=a&&a.className;return c(rr(o||h))}};function q5(e){if(!Array.isArray(e))return!0;if(e.length>1)return!1;if(e.length===1){var t=Pr(e,1)[0];return t.type==="text"&&!t.value}return!0}function Y5(e){var t=e.changeKey,r=e.text,n=e.tokens,i=e.renderToken,s=vs(e,G5),a=i?function(o,l){return i(o,$v,l)}:$v;return E.jsx("td",pt(pt({},s),{},{"data-change-key":t,children:n?q5(n)?" ":n.map(a):r||" "}))}var xw=x.memo(Y5);function Ew(e,t){return function(){var r=t==="old"?Np(e):Rp(e);return r===-1?void 0:r}}function Aw(e,t){return function(r){return e&&r?E.jsx("a",{href:t?"#"+t:void 0,children:r}):r}}function vc(e,t){return t?function(r){e(),t(r)}:e}function Uv(e,t,r,n){return x.useMemo(function(){var i=kw(e,function(s){return function(a){return s&&s(t,a)}});return i.onMouseEnter=vc(r,i.onMouseEnter),i.onMouseLeave=vc(n,i.onMouseLeave),i},[e,r,n,t])}function Hv(e,t,r,n,i,s,a,o,l){var c={change:t,side:n,inHoverState:o,renderDefault:Ew(t,n),wrapInAnchor:Aw(i,s)};return E.jsx("td",pt(pt({className:e},a),{},{"data-change-key":r,children:l(c)}))}function J5(e){var t,r,n,i=e.change,s=e.selected,a=e.tokens,o=e.className,l=e.generateLineClassName,c=e.gutterClassName,h=e.codeClassName,u=e.gutterEvents,m=e.codeEvents,v=e.hideGutter,w=e.gutterAnchor,_=e.generateAnchorID,g=e.renderToken,d=e.renderGutter,f=i.type,p=i.content,y=On(i),S=(t=Pr(x.useState(!1),2),r=t[0],n=t[1],[r,x.useCallback(function(){return n(!0)},[]),x.useCallback(function(){return n(!1)},[])]),b=Pr(S,3),k=b[0],C=b[1],A=b[2],P=x.useMemo(function(){return{change:i}},[i]),O=Uv(u,P,C,A),R=Uv(m,P,C,A),M=_(i),z=l({changes:[i],defaultGenerate:function(){return o}}),U=rr("diff-gutter","diff-gutter-".concat(f),c,{"diff-gutter-selected":s}),q=rr("diff-code","diff-code-".concat(f),h,{"diff-code-selected":s});return E.jsxs("tr",{id:M,className:rr("diff-line",z),children:[!v&&Hv(U,i,y,"old",w,M,O,k,d),!v&&Hv(U,i,y,"new",w,M,O,k,d),E.jsx(xw,pt({className:q,changeKey:y,text:p,tokens:a,renderToken:g},R))]})}var X5=x.memo(J5);function Q5(e){var t=e.hideGutter,r=e.element;return E.jsx("tr",{className:"diff-widget",children:E.jsx("td",{colSpan:t?1:3,className:"diff-widget-content",children:r})})}var Z5=["hideGutter","selectedChanges","tokens","lineClassName"],eL=["hunk","widgets","className"];function tL(e){var t=e.hunk,r=e.widgets,n=e.className,i=vs(e,eL),s=function(a,o){return a.reduce(function(l,c){var h=On(c);l.push(["change",h,c]);var u=o[h];return u&&l.push(["widget",h,u]),l},[])}(t.changes,r);return E.jsx("tbody",{className:rr("diff-hunk",n),children:s.map(function(a){return function(o,l){var c=Pr(o,3),h=c[0],u=c[1],m=c[2],v=l.hideGutter,w=l.selectedChanges,_=l.tokens,g=l.lineClassName,d=vs(l,Z5);if(h==="change"){var f=Rn(m)?"old":"new",p=Rn(m)?Np(m):Rp(m),y=_?_[f][p-1]:null;return E.jsx(X5,pt({className:g,change:m,hideGutter:v,selected:w.includes(u),tokens:y},d),"change".concat(u))}return h==="widget"?E.jsx(Q5,{hideGutter:v,element:m},"widget".concat(u)):null}(a,i)})})}var Lw=0;function il(e,t,r,n){var i=x.useCallback(function(){return t(e)},[e,t]),s=x.useCallback(function(){return t("")},[t]);return x.useMemo(function(){var a=kw(n,function(o){return function(l){return o&&o({side:e,change:r},l)}});return a.onMouseEnter=vc(i,a.onMouseEnter),a.onMouseLeave=vc(s,a.onMouseLeave),a},[r,n,i,e,s])}function pf(e){var t=e.change,r=e.side,n=e.selected,i=e.tokens,s=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,l=e.codeEvents,c=e.anchorID,h=e.gutterAnchor,u=e.gutterAnchorTarget,m=e.hideGutter,v=e.hover,w=e.renderToken,_=e.renderGutter;if(!t){var g=rr("diff-gutter","diff-gutter-omit",s),d=rr("diff-code","diff-code-omit",a);return[!m&&E.jsx("td",{className:g},"gutter"),E.jsx("td",{className:d},"code")]}var f=t.type,p=t.content,y=On(t),S=r===Lw?"old":"new",b=pt({id:c||void 0,className:rr("diff-gutter","diff-gutter-".concat(f),Uh({"diff-gutter-selected":n},"diff-line-hover-"+S,v),s),children:_({change:t,side:S,inHoverState:v,renderDefault:Ew(t,S),wrapInAnchor:Aw(h,u)})},o),k=rr("diff-code","diff-code-".concat(f),Uh({"diff-code-selected":n},"diff-line-hover-"+S,v),a);return[!m&&E.jsx("td",pt(pt({},b),{},{"data-change-key":y}),"gutter"),E.jsx(xw,pt({className:k,changeKey:y,text:p,tokens:i,renderToken:w},l),"code")]}function rL(e){var t=e.className,r=e.oldChange,n=e.newChange,i=e.oldSelected,s=e.newSelected,a=e.oldTokens,o=e.newTokens,l=e.monotonous,c=e.gutterClassName,h=e.codeClassName,u=e.gutterEvents,m=e.codeEvents,v=e.hideGutter,w=e.generateAnchorID,_=e.generateLineClassName,g=e.gutterAnchor,d=e.renderToken,f=e.renderGutter,p=Pr(x.useState(""),2),y=p[0],S=p[1],b=il("old",S,r,u),k=il("new",S,n,u),C=il("old",S,r,m),A=il("new",S,n,m),P=r&&w(r),O=n&&w(n),R=_({changes:[r,n],defaultGenerate:function(){return t}}),M={monotonous:l,hideGutter:v,gutterClassName:c,codeClassName:h,gutterEvents:u,codeEvents:m,renderToken:d,renderGutter:f},z=pt(pt({},M),{},{change:r,side:Lw,selected:i,tokens:a,gutterEvents:b,codeEvents:C,anchorID:P,gutterAnchor:g,gutterAnchorTarget:P,hover:y==="old"}),U=pt(pt({},M),{},{change:n,side:1,selected:s,tokens:o,gutterEvents:k,codeEvents:A,anchorID:r===n?null:O,gutterAnchor:g,gutterAnchorTarget:r===n?P:O,hover:y==="new"});if(l)return E.jsx("tr",{className:rr("diff-line",R),children:pf(r?z:U)});var q=function(Q,H){return Q&&!H?"diff-line-old-only":!Q&&H?"diff-line-new-only":Q===H?"diff-line-normal":"diff-line-compare"}(r,n);return E.jsxs("tr",{className:rr("diff-line",q,R),children:[pf(z),pf(U)]})}var nL=x.memo(rL);function iL(e){var t=e.hideGutter,r=e.oldElement,n=e.newElement;return e.monotonous?E.jsx("tr",{className:"diff-widget",children:E.jsx("td",{colSpan:t?1:2,className:"diff-widget-content",children:r||n})}):r===n?E.jsx("tr",{className:"diff-widget",children:E.jsx("td",{colSpan:t?2:4,className:"diff-widget-content",children:r})}):E.jsxs("tr",{className:"diff-widget",children:[E.jsx("td",{colSpan:t?1:2,className:"diff-widget-content",children:r}),E.jsx("td",{colSpan:t?1:2,className:"diff-widget-content",children:n})]})}var sL=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],oL=["hunk","widgets","className"];function sl(e,t){return(e?On(e):"00")+(t?On(t):"00")}function aL(e){var t=e.hunk,r=e.widgets,n=e.className,i=vs(e,oL),s=function(a,o){for(var l=function(d){if(!d)return null;var f=On(d);return o[f]||null},c=[],h=0;h<a.length;h++){var u=a[h];if(Vo(u))c.push(["change",sl(u,u),u,u]);else if(Rn(u)){var m=a[h+1];m&&la(m)?(h+=1,c.push(["change",sl(u,m),u,m])):c.push(["change",sl(u,null),u,null])}else c.push(["change",sl(null,u),null,u]);var v=c[c.length-1],w=l(v[2]),_=l(v[3]);if(w||_){var g=v[1];c.push(["widget",g,w,_])}}return c}(t.changes,r);return E.jsx("tbody",{className:rr("diff-hunk",n),children:s.map(function(a){return function(o,l){var c=Pr(o,4),h=c[0],u=c[1],m=c[2],v=c[3],w=l.selectedChanges,_=l.monotonous,g=l.hideGutter,d=l.tokens,f=l.lineClassName,p=vs(l,sL);if(h==="change"){var y=!!m&&w.includes(On(m)),S=!!v&&w.includes(On(v)),b=m&&d?d.old[Np(m)-1]:null,k=v&&d?d.new[Rp(v)-1]:null;return E.jsx(nL,pt({className:f,oldChange:m,newChange:v,monotonous:_,hideGutter:g,oldSelected:y,newSelected:S,oldTokens:b,newTokens:k},p),"change".concat(u))}return h==="widget"?E.jsx(iL,{monotonous:_,hideGutter:g,oldElement:m,newElement:v},"widget".concat(u)):null}(a,i)})})}var lL=["gutterType","hunkClassName"];function cL(e){var t=e.hunk,r=V4(),n=r.gutterType,i=r.hunkClassName,s=vs(r,lL),a=n==="none",o=n==="anchor",l=s.viewType==="unified"?tL:aL;return E.jsx(l,pt(pt({},s),{},{hunk:t,hideGutter:a,gutterAnchor:o,className:i}))}function uL(){}function Wv(e,t){var r=t?"auto":"none";e instanceof HTMLElement&&e.style.userSelect!==r&&(e.style.userSelect=r)}function fL(e){return e.map(function(t){return E.jsx(cL,{hunk:t},function(r){return"-".concat(r.oldStart,",").concat(r.oldLines," +").concat(r.newStart,",").concat(r.newLines)}(t))})}function hL(e){var t=e.diffType,r=e.hunks,n=e.optimizeSelection,i=e.className,s=e.hunkClassName,a=s===void 0?Ht.hunkClassName:s,o=e.lineClassName,l=o===void 0?Ht.lineClassName:o,c=e.generateLineClassName,h=c===void 0?Ht.generateLineClassName:c,u=e.gutterClassName,m=u===void 0?Ht.gutterClassName:u,v=e.codeClassName,w=v===void 0?Ht.codeClassName:v,_=e.gutterType,g=_===void 0?Ht.gutterType:_,d=e.viewType,f=d===void 0?Ht.viewType:d,p=e.gutterEvents,y=p===void 0?Ht.gutterEvents:p,S=e.codeEvents,b=S===void 0?Ht.codeEvents:S,k=e.generateAnchorID,C=k===void 0?Ht.generateAnchorID:k,A=e.selectedChanges,P=A===void 0?Ht.selectedChanges:A,O=e.widgets,R=O===void 0?Ht.widgets:O,M=e.renderGutter,z=M===void 0?Ht.renderGutter:M,U=e.tokens,q=e.renderToken,Q=e.children,H=Q===void 0?fL:Q,I=x.useRef(null),L=x.useCallback(function(W){var j=W.target;if(W.button===0){var N=function(ve,le){for(var Se=ve;Se&&Se!==document.documentElement&&!Se.classList.contains(le);)Se=Se.parentElement;return Se===document.documentElement?null:Se}(j,"diff-code");if(N&&N.parentElement){var G=window.getSelection();G&&G.removeAllRanges();var V=F4(N.parentElement.children).indexOf(N);if(V===1||V===3){var X,ne=H4(I.current?I.current.querySelectorAll(".diff-line"):[]);try{for(ne.s();!(X=ne.n()).done;){var ue=X.value.children;Wv(ue[1],V===1),Wv(ue[3],V===3)}}catch(ve){ne.e(ve)}finally{ne.f()}}}}},[]),B=g==="none",D=t==="add"||t==="delete",T=f==="split"&&!D&&n?L:uL,$=x.useMemo(function(){return E.jsxs("colgroup",f==="unified"?{children:[!B&&E.jsx("col",{className:"diff-gutter-col"}),!B&&E.jsx("col",{className:"diff-gutter-col"}),E.jsx("col",{})]}:D?{children:[!B&&E.jsx("col",{className:"diff-gutter-col"}),E.jsx("col",{})]}:{children:[!B&&E.jsx("col",{className:"diff-gutter-col"}),E.jsx("col",{}),!B&&E.jsx("col",{className:"diff-gutter-col"}),E.jsx("col",{})]})},[f,D,B]),Y=x.useMemo(function(){return{hunkClassName:a,lineClassName:l,generateLineClassName:h,gutterClassName:m,codeClassName:w,monotonous:D,hideGutter:B,viewType:f,gutterType:g,codeEvents:b,gutterEvents:y,generateAnchorID:C,selectedChanges:P,widgets:R,renderGutter:z,tokens:U,renderToken:q}},[w,b,C,m,y,g,B,a,l,h,D,z,q,P,U,f,R]);return E.jsx(W4,{value:Y,children:E.jsxs("table",{ref:I,className:rr("diff","diff-".concat(f),i),onMouseDown:T,children:[$,H(r)]})})}var Nz=x.memo(hL);$r&&$r.isConcatSpreadable;var Op=aa(function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};t.Diff=function(r,n){return[r,n]},t.prototype.diff_main=function(r,n,i,s){s===void 0&&(s=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+1e3*this.Diff_Timeout);var a=s;if(r==null||n==null)throw new Error("Null input. (diff_main)");if(r==n)return r?[new t.Diff(0,r)]:[];i===void 0&&(i=!0);var o=i,l=this.diff_commonPrefix(r,n),c=r.substring(0,l);r=r.substring(l),n=n.substring(l),l=this.diff_commonSuffix(r,n);var h=r.substring(r.length-l);r=r.substring(0,r.length-l),n=n.substring(0,n.length-l);var u=this.diff_compute_(r,n,o,a);return c&&u.unshift(new t.Diff(0,c)),h&&u.push(new t.Diff(0,h)),this.diff_cleanupMerge(u),u},t.prototype.diff_compute_=function(r,n,i,s){var a;if(!r)return[new t.Diff(1,n)];if(!n)return[new t.Diff(-1,r)];var o=r.length>n.length?r:n,l=r.length>n.length?n:r,c=o.indexOf(l);if(c!=-1)return a=[new t.Diff(1,o.substring(0,c)),new t.Diff(0,l),new t.Diff(1,o.substring(c+l.length))],r.length>n.length&&(a[0][0]=a[2][0]=-1),a;if(l.length==1)return[new t.Diff(-1,r),new t.Diff(1,n)];var h=this.diff_halfMatch_(r,n);if(h){var u=h[0],m=h[1],v=h[2],w=h[3],_=h[4],g=this.diff_main(u,v,i,s),d=this.diff_main(m,w,i,s);return g.concat([new t.Diff(0,_)],d)}return i&&r.length>100&&n.length>100?this.diff_lineMode_(r,n,s):this.diff_bisect_(r,n,s)},t.prototype.diff_lineMode_=function(r,n,i){var s=this.diff_linesToChars_(r,n);r=s.chars1,n=s.chars2;var a=s.lineArray,o=this.diff_main(r,n,!1,i);this.diff_charsToLines_(o,a),this.diff_cleanupSemantic(o),o.push(new t.Diff(0,""));for(var l=0,c=0,h=0,u="",m="";l<o.length;){switch(o[l][0]){case 1:h++,m+=o[l][1];break;case-1:c++,u+=o[l][1];break;case 0:if(c>=1&&h>=1){o.splice(l-c-h,c+h),l=l-c-h;for(var v=this.diff_main(u,m,!1,i),w=v.length-1;w>=0;w--)o.splice(l,0,v[w]);l+=v.length}h=0,c=0,u="",m=""}l++}return o.pop(),o},t.prototype.diff_bisect_=function(r,n,i){for(var s=r.length,a=n.length,o=Math.ceil((s+a)/2),l=o,c=2*o,h=new Array(c),u=new Array(c),m=0;m<c;m++)h[m]=-1,u[m]=-1;h[l+1]=0,u[l+1]=0;for(var v=s-a,w=v%2!=0,_=0,g=0,d=0,f=0,p=0;p<o&&!(new Date().getTime()>i);p++){for(var y=-p+_;y<=p-g;y+=2){for(var S=l+y,b=(O=y==-p||y!=p&&h[S-1]<h[S+1]?h[S+1]:h[S-1]+1)-y;O<s&&b<a&&r.charAt(O)==n.charAt(b);)O++,b++;if(h[S]=O,O>s)g+=2;else if(b>a)_+=2;else if(w&&(A=l+v-y)>=0&&A<c&&u[A]!=-1&&O>=(C=s-u[A]))return this.diff_bisectSplit_(r,n,O,b,i)}for(var k=-p+d;k<=p-f;k+=2){for(var C,A=l+k,P=(C=k==-p||k!=p&&u[A-1]<u[A+1]?u[A+1]:u[A-1]+1)-k;C<s&&P<a&&r.charAt(s-C-1)==n.charAt(a-P-1);)C++,P++;if(u[A]=C,C>s)f+=2;else if(P>a)d+=2;else if(!w&&(S=l+v-k)>=0&&S<c&&h[S]!=-1){var O;if(b=l+(O=h[S])-S,O>=(C=s-C))return this.diff_bisectSplit_(r,n,O,b,i)}}}return[new t.Diff(-1,r),new t.Diff(1,n)]},t.prototype.diff_bisectSplit_=function(r,n,i,s,a){var o=r.substring(0,i),l=n.substring(0,s),c=r.substring(i),h=n.substring(s),u=this.diff_main(o,l,!1,a),m=this.diff_main(c,h,!1,a);return u.concat(m)},t.prototype.diff_linesToChars_=function(r,n){var i=[],s={};function a(c){for(var h="",u=0,m=-1,v=i.length;m<c.length-1;){(m=c.indexOf(`
52
- `,u))==-1&&(m=c.length-1);var w=c.substring(u,m+1);(s.hasOwnProperty?s.hasOwnProperty(w):s[w]!==void 0)?h+=String.fromCharCode(s[w]):(v==o&&(w=c.substring(u),m=c.length),h+=String.fromCharCode(v),s[w]=v,i[v++]=w),u=m+1}return h}i[0]="";var o=4e4,l=a(r);return o=65535,{chars1:l,chars2:a(n),lineArray:i}},t.prototype.diff_charsToLines_=function(r,n){for(var i=0;i<r.length;i++){for(var s=r[i][1],a=[],o=0;o<s.length;o++)a[o]=n[s.charCodeAt(o)];r[i][1]=a.join("")}},t.prototype.diff_commonPrefix=function(r,n){if(!r||!n||r.charAt(0)!=n.charAt(0))return 0;for(var i=0,s=Math.min(r.length,n.length),a=s,o=0;i<a;)r.substring(o,a)==n.substring(o,a)?o=i=a:s=a,a=Math.floor((s-i)/2+i);return a},t.prototype.diff_commonSuffix=function(r,n){if(!r||!n||r.charAt(r.length-1)!=n.charAt(n.length-1))return 0;for(var i=0,s=Math.min(r.length,n.length),a=s,o=0;i<a;)r.substring(r.length-a,r.length-o)==n.substring(n.length-a,n.length-o)?o=i=a:s=a,a=Math.floor((s-i)/2+i);return a},t.prototype.diff_commonOverlap_=function(r,n){var i=r.length,s=n.length;if(i==0||s==0)return 0;i>s?r=r.substring(i-s):i<s&&(n=n.substring(0,i));var a=Math.min(i,s);if(r==n)return a;for(var o=0,l=1;;){var c=r.substring(a-l),h=n.indexOf(c);if(h==-1)return o;l+=h,h!=0&&r.substring(a-l)!=n.substring(0,l)||(o=l,l++)}},t.prototype.diff_halfMatch_=function(r,n){if(this.Diff_Timeout<=0)return null;var i=r.length>n.length?r:n,s=r.length>n.length?n:r;if(i.length<4||2*s.length<i.length)return null;var a=this;function o(_,g,d){for(var f,p,y,S,b=_.substring(d,d+Math.floor(_.length/4)),k=-1,C="";(k=g.indexOf(b,k+1))!=-1;){var A=a.diff_commonPrefix(_.substring(d),g.substring(k)),P=a.diff_commonSuffix(_.substring(0,d),g.substring(0,k));C.length<P+A&&(C=g.substring(k-P,k)+g.substring(k,k+A),f=_.substring(0,d-P),p=_.substring(d+A),y=g.substring(0,k-P),S=g.substring(k+A))}return 2*C.length>=_.length?[f,p,y,S,C]:null}var l,c,h,u,m,v=o(i,s,Math.ceil(i.length/4)),w=o(i,s,Math.ceil(i.length/2));return v||w?(l=w?v&&v[4].length>w[4].length?v:w:v,r.length>n.length?(c=l[0],h=l[1],u=l[2],m=l[3]):(u=l[0],m=l[1],c=l[2],h=l[3]),[c,h,u,m,l[4]]):null},t.prototype.diff_cleanupSemantic=function(r){for(var n=!1,i=[],s=0,a=null,o=0,l=0,c=0,h=0,u=0;o<r.length;)r[o][0]==0?(i[s++]=o,l=h,c=u,h=0,u=0,a=r[o][1]):(r[o][0]==1?h+=r[o][1].length:u+=r[o][1].length,a&&a.length<=Math.max(l,c)&&a.length<=Math.max(h,u)&&(r.splice(i[s-1],0,new t.Diff(-1,a)),r[i[s-1]+1][0]=1,s--,o=--s>0?i[s-1]:-1,l=0,c=0,h=0,u=0,a=null,n=!0)),o++;for(n&&this.diff_cleanupMerge(r),this.diff_cleanupSemanticLossless(r),o=1;o<r.length;){if(r[o-1][0]==-1&&r[o][0]==1){var m=r[o-1][1],v=r[o][1],w=this.diff_commonOverlap_(m,v),_=this.diff_commonOverlap_(v,m);w>=_?(w>=m.length/2||w>=v.length/2)&&(r.splice(o,0,new t.Diff(0,v.substring(0,w))),r[o-1][1]=m.substring(0,m.length-w),r[o+1][1]=v.substring(w),o++):(_>=m.length/2||_>=v.length/2)&&(r.splice(o,0,new t.Diff(0,m.substring(0,_))),r[o-1][0]=1,r[o-1][1]=v.substring(0,v.length-_),r[o+1][0]=-1,r[o+1][1]=m.substring(_),o++),o++}o++}},t.prototype.diff_cleanupSemanticLossless=function(r){function n(_,g){if(!_||!g)return 6;var d=_.charAt(_.length-1),f=g.charAt(0),p=d.match(t.nonAlphaNumericRegex_),y=f.match(t.nonAlphaNumericRegex_),S=p&&d.match(t.whitespaceRegex_),b=y&&f.match(t.whitespaceRegex_),k=S&&d.match(t.linebreakRegex_),C=b&&f.match(t.linebreakRegex_),A=k&&_.match(t.blanklineEndRegex_),P=C&&g.match(t.blanklineStartRegex_);return A||P?5:k||C?4:p&&!S&&b?3:S||b?2:p||y?1:0}for(var i=1;i<r.length-1;){if(r[i-1][0]==0&&r[i+1][0]==0){var s=r[i-1][1],a=r[i][1],o=r[i+1][1],l=this.diff_commonSuffix(s,a);if(l){var c=a.substring(a.length-l);s=s.substring(0,s.length-l),a=c+a.substring(0,a.length-l),o=c+o}for(var h=s,u=a,m=o,v=n(s,a)+n(a,o);a.charAt(0)===o.charAt(0);){s+=a.charAt(0),a=a.substring(1)+o.charAt(0),o=o.substring(1);var w=n(s,a)+n(a,o);w>=v&&(v=w,h=s,u=a,m=o)}r[i-1][1]!=h&&(h?r[i-1][1]=h:(r.splice(i-1,1),i--),r[i][1]=u,m?r[i+1][1]=m:(r.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(r){for(var n=!1,i=[],s=0,a=null,o=0,l=!1,c=!1,h=!1,u=!1;o<r.length;)r[o][0]==0?(r[o][1].length<this.Diff_EditCost&&(h||u)?(i[s++]=o,l=h,c=u,a=r[o][1]):(s=0,a=null),h=u=!1):(r[o][0]==-1?u=!0:h=!0,a&&(l&&c&&h&&u||a.length<this.Diff_EditCost/2&&l+c+h+u==3)&&(r.splice(i[s-1],0,new t.Diff(-1,a)),r[i[s-1]+1][0]=1,s--,a=null,l&&c?(h=u=!0,s=0):(o=--s>0?i[s-1]:-1,h=u=!1),n=!0)),o++;n&&this.diff_cleanupMerge(r)},t.prototype.diff_cleanupMerge=function(r){r.push(new t.Diff(0,""));for(var n,i=0,s=0,a=0,o="",l="";i<r.length;)switch(r[i][0]){case 1:a++,l+=r[i][1],i++;break;case-1:s++,o+=r[i][1],i++;break;case 0:s+a>1?(s!==0&&a!==0&&((n=this.diff_commonPrefix(l,o))!==0&&(i-s-a>0&&r[i-s-a-1][0]==0?r[i-s-a-1][1]+=l.substring(0,n):(r.splice(0,0,new t.Diff(0,l.substring(0,n))),i++),l=l.substring(n),o=o.substring(n)),(n=this.diff_commonSuffix(l,o))!==0&&(r[i][1]=l.substring(l.length-n)+r[i][1],l=l.substring(0,l.length-n),o=o.substring(0,o.length-n))),i-=s+a,r.splice(i,s+a),o.length&&(r.splice(i,0,new t.Diff(-1,o)),i++),l.length&&(r.splice(i,0,new t.Diff(1,l)),i++),i++):i!==0&&r[i-1][0]==0?(r[i-1][1]+=r[i][1],r.splice(i,1)):i++,a=0,s=0,o="",l=""}r[r.length-1][1]===""&&r.pop();var c=!1;for(i=1;i<r.length-1;)r[i-1][0]==0&&r[i+1][0]==0&&(r[i][1].substring(r[i][1].length-r[i-1][1].length)==r[i-1][1]?(r[i][1]=r[i-1][1]+r[i][1].substring(0,r[i][1].length-r[i-1][1].length),r[i+1][1]=r[i-1][1]+r[i+1][1],r.splice(i-1,1),c=!0):r[i][1].substring(0,r[i+1][1].length)==r[i+1][1]&&(r[i-1][1]+=r[i+1][1],r[i][1]=r[i][1].substring(r[i+1][1].length)+r[i+1][1],r.splice(i+1,1),c=!0)),i++;c&&this.diff_cleanupMerge(r)},t.prototype.diff_xIndex=function(r,n){var i,s=0,a=0,o=0,l=0;for(i=0;i<r.length&&(r[i][0]!==1&&(s+=r[i][1].length),r[i][0]!==-1&&(a+=r[i][1].length),!(s>n));i++)o=s,l=a;return r.length!=i&&r[i][0]===-1?l:l+(n-o)},t.prototype.diff_prettyHtml=function(r){for(var n=[],i=/&/g,s=/</g,a=/>/g,o=/\n/g,l=0;l<r.length;l++){var c=r[l][0],h=r[l][1].replace(i,"&amp;").replace(s,"&lt;").replace(a,"&gt;").replace(o,"&para;<br>");switch(c){case 1:n[l]='<ins style="background:#e6ffe6;">'+h+"</ins>";break;case-1:n[l]='<del style="background:#ffe6e6;">'+h+"</del>";break;case 0:n[l]="<span>"+h+"</span>"}}return n.join("")},t.prototype.diff_text1=function(r){for(var n=[],i=0;i<r.length;i++)r[i][0]!==1&&(n[i]=r[i][1]);return n.join("")},t.prototype.diff_text2=function(r){for(var n=[],i=0;i<r.length;i++)r[i][0]!==-1&&(n[i]=r[i][1]);return n.join("")},t.prototype.diff_levenshtein=function(r){for(var n=0,i=0,s=0,a=0;a<r.length;a++){var o=r[a][0],l=r[a][1];switch(o){case 1:i+=l.length;break;case-1:s+=l.length;break;case 0:n+=Math.max(i,s),i=0,s=0}}return n+=Math.max(i,s)},t.prototype.diff_toDelta=function(r){for(var n=[],i=0;i<r.length;i++)switch(r[i][0]){case 1:n[i]="+"+encodeURI(r[i][1]);break;case-1:n[i]="-"+r[i][1].length;break;case 0:n[i]="="+r[i][1].length}return n.join(" ").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(r,n){for(var i=[],s=0,a=0,o=n.split(/\t/g),l=0;l<o.length;l++){var c=o[l].substring(1);switch(o[l].charAt(0)){case"+":try{i[s++]=new t.Diff(1,decodeURI(c))}catch{throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var h=parseInt(c,10);if(isNaN(h)||h<0)throw new Error("Invalid number in diff_fromDelta: "+c);var u=r.substring(a,a+=h);o[l].charAt(0)=="="?i[s++]=new t.Diff(0,u):i[s++]=new t.Diff(-1,u);break;default:if(o[l])throw new Error("Invalid diff operation in diff_fromDelta: "+o[l])}}if(a!=r.length)throw new Error("Delta length ("+a+") does not equal source text length ("+r.length+").");return i},t.prototype.match_main=function(r,n,i){if(r==null||n==null||i==null)throw new Error("Null input. (match_main)");return i=Math.max(0,Math.min(i,r.length)),r==n?0:r.length?r.substring(i,i+n.length)==n?i:this.match_bitap_(r,n,i):-1},t.prototype.match_bitap_=function(r,n,i){if(n.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var s=this.match_alphabet_(n),a=this;function o(b,k){var C=b/n.length,A=Math.abs(i-k);return a.Match_Distance?C+A/a.Match_Distance:A?1:C}var l=this.Match_Threshold,c=r.indexOf(n,i);c!=-1&&(l=Math.min(o(0,c),l),(c=r.lastIndexOf(n,i+n.length))!=-1&&(l=Math.min(o(0,c),l)));var h,u,m=1<<n.length-1;c=-1;for(var v,w=n.length+r.length,_=0;_<n.length;_++){for(h=0,u=w;h<u;)o(_,i+u)<=l?h=u:w=u,u=Math.floor((w-h)/2+h);w=u;var g=Math.max(1,i-u+1),d=Math.min(i+u,r.length)+n.length,f=Array(d+2);f[d+1]=(1<<_)-1;for(var p=d;p>=g;p--){var y=s[r.charAt(p-1)];if(f[p]=_===0?(f[p+1]<<1|1)&y:(f[p+1]<<1|1)&y|(v[p+1]|v[p])<<1|1|v[p+1],f[p]&m){var S=o(_,p-1);if(S<=l){if(l=S,!((c=p-1)>i))break;g=Math.max(1,2*i-c)}}}if(o(_+1,i)>l)break;v=f}return c},t.prototype.match_alphabet_=function(r){for(var n={},i=0;i<r.length;i++)n[r.charAt(i)]=0;for(i=0;i<r.length;i++)n[r.charAt(i)]|=1<<r.length-i-1;return n},t.prototype.patch_addContext_=function(r,n){if(n.length!=0){if(r.start2===null)throw Error("patch not initialized");for(var i=n.substring(r.start2,r.start2+r.length1),s=0;n.indexOf(i)!=n.lastIndexOf(i)&&i.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)s+=this.Patch_Margin,i=n.substring(r.start2-s,r.start2+r.length1+s);s+=this.Patch_Margin;var a=n.substring(r.start2-s,r.start2);a&&r.diffs.unshift(new t.Diff(0,a));var o=n.substring(r.start2+r.length1,r.start2+r.length1+s);o&&r.diffs.push(new t.Diff(0,o)),r.start1-=a.length,r.start2-=a.length,r.length1+=a.length+o.length,r.length2+=a.length+o.length}},t.prototype.patch_make=function(r,n,i){var s,a;if(typeof r=="string"&&typeof n=="string"&&i===void 0)s=r,(a=this.diff_main(s,n,!0)).length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(r&&typeof r=="object"&&n===void 0&&i===void 0)a=r,s=this.diff_text1(a);else if(typeof r=="string"&&n&&typeof n=="object"&&i===void 0)s=r,a=n;else{if(typeof r!="string"||typeof n!="string"||!i||typeof i!="object")throw new Error("Unknown call format to patch_make.");s=r,a=i}if(a.length===0)return[];for(var o=[],l=new t.patch_obj,c=0,h=0,u=0,m=s,v=s,w=0;w<a.length;w++){var _=a[w][0],g=a[w][1];switch(c||_===0||(l.start1=h,l.start2=u),_){case 1:l.diffs[c++]=a[w],l.length2+=g.length,v=v.substring(0,u)+g+v.substring(u);break;case-1:l.length1+=g.length,l.diffs[c++]=a[w],v=v.substring(0,u)+v.substring(u+g.length);break;case 0:g.length<=2*this.Patch_Margin&&c&&a.length!=w+1?(l.diffs[c++]=a[w],l.length1+=g.length,l.length2+=g.length):g.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,m),o.push(l),l=new t.patch_obj,c=0,m=v,h=u)}_!==1&&(h+=g.length),_!==-1&&(u+=g.length)}return c&&(this.patch_addContext_(l,m),o.push(l)),o},t.prototype.patch_deepCopy=function(r){for(var n=[],i=0;i<r.length;i++){var s=r[i],a=new t.patch_obj;a.diffs=[];for(var o=0;o<s.diffs.length;o++)a.diffs[o]=new t.Diff(s.diffs[o][0],s.diffs[o][1]);a.start1=s.start1,a.start2=s.start2,a.length1=s.length1,a.length2=s.length2,n[i]=a}return n},t.prototype.patch_apply=function(r,n){if(r.length==0)return[n,[]];r=this.patch_deepCopy(r);var i=this.patch_addPadding(r);n=i+n+i,this.patch_splitMax(r);for(var s=0,a=[],o=0;o<r.length;o++){var l,c,h=r[o].start2+s,u=this.diff_text1(r[o].diffs),m=-1;if(u.length>this.Match_MaxBits?(l=this.match_main(n,u.substring(0,this.Match_MaxBits),h))!=-1&&((m=this.match_main(n,u.substring(u.length-this.Match_MaxBits),h+u.length-this.Match_MaxBits))==-1||l>=m)&&(l=-1):l=this.match_main(n,u,h),l==-1)a[o]=!1,s-=r[o].length2-r[o].length1;else if(a[o]=!0,s=l-h,u==(c=m==-1?n.substring(l,l+u.length):n.substring(l,m+this.Match_MaxBits)))n=n.substring(0,l)+this.diff_text2(r[o].diffs)+n.substring(l+u.length);else{var v=this.diff_main(u,c,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(v)/u.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(v);for(var w,_=0,g=0;g<r[o].diffs.length;g++){var d=r[o].diffs[g];d[0]!==0&&(w=this.diff_xIndex(v,_)),d[0]===1?n=n.substring(0,l+w)+d[1]+n.substring(l+w):d[0]===-1&&(n=n.substring(0,l+w)+n.substring(l+this.diff_xIndex(v,_+d[1].length))),d[0]!==-1&&(_+=d[1].length)}}}}return[n=n.substring(i.length,n.length-i.length),a]},t.prototype.patch_addPadding=function(r){for(var n=this.Patch_Margin,i="",s=1;s<=n;s++)i+=String.fromCharCode(s);for(s=0;s<r.length;s++)r[s].start1+=n,r[s].start2+=n;var a=r[0],o=a.diffs;if(o.length==0||o[0][0]!=0)o.unshift(new t.Diff(0,i)),a.start1-=n,a.start2-=n,a.length1+=n,a.length2+=n;else if(n>o[0][1].length){var l=n-o[0][1].length;o[0][1]=i.substring(o[0][1].length)+o[0][1],a.start1-=l,a.start2-=l,a.length1+=l,a.length2+=l}return(o=(a=r[r.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new t.Diff(0,i)),a.length1+=n,a.length2+=n):n>o[o.length-1][1].length&&(l=n-o[o.length-1][1].length,o[o.length-1][1]+=i.substring(0,l),a.length1+=l,a.length2+=l),i},t.prototype.patch_splitMax=function(r){for(var n=this.Match_MaxBits,i=0;i<r.length;i++)if(!(r[i].length1<=n)){var s=r[i];r.splice(i--,1);for(var a=s.start1,o=s.start2,l="";s.diffs.length!==0;){var c=new t.patch_obj,h=!0;for(c.start1=a-l.length,c.start2=o-l.length,l!==""&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));s.diffs.length!==0&&c.length1<n-this.Patch_Margin;){var u=s.diffs[0][0],m=s.diffs[0][1];u===1?(c.length2+=m.length,o+=m.length,c.diffs.push(s.diffs.shift()),h=!1):u===-1&&c.diffs.length==1&&c.diffs[0][0]==0&&m.length>2*n?(c.length1+=m.length,a+=m.length,h=!1,c.diffs.push(new t.Diff(u,m)),s.diffs.shift()):(m=m.substring(0,n-c.length1-this.Patch_Margin),c.length1+=m.length,a+=m.length,u===0?(c.length2+=m.length,o+=m.length):h=!1,c.diffs.push(new t.Diff(u,m)),m==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(m.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var v=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);v!==""&&(c.length1+=v.length,c.length2+=v.length,c.diffs.length!==0&&c.diffs[c.diffs.length-1][0]===0?c.diffs[c.diffs.length-1][1]+=v:c.diffs.push(new t.Diff(0,v))),h||r.splice(++i,0,c)}}},t.prototype.patch_toText=function(r){for(var n=[],i=0;i<r.length;i++)n[i]=r[i];return n.join("")},t.prototype.patch_fromText=function(r){var n=[];if(!r)return n;for(var i=r.split(`
53
- `),s=0,a=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<i.length;){var o=i[s].match(a);if(!o)throw new Error("Invalid patch string: "+i[s]);var l=new t.patch_obj;for(n.push(l),l.start1=parseInt(o[1],10),o[2]===""?(l.start1--,l.length1=1):o[2]=="0"?l.length1=0:(l.start1--,l.length1=parseInt(o[2],10)),l.start2=parseInt(o[3],10),o[4]===""?(l.start2--,l.length2=1):o[4]=="0"?l.length2=0:(l.start2--,l.length2=parseInt(o[4],10)),s++;s<i.length;){var c=i[s].charAt(0);try{var h=decodeURI(i[s].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+h)}if(c=="-")l.diffs.push(new t.Diff(-1,h));else if(c=="+")l.diffs.push(new t.Diff(1,h));else if(c==" ")l.diffs.push(new t.Diff(0,h));else{if(c=="@")break;if(c!=="")throw new Error('Invalid patch mode "'+c+'" in: '+h)}s++}}return n},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var r,n=["@@ -"+(this.length1===0?this.start1+",0":this.length1==1?this.start1+1:this.start1+1+","+this.length1)+" +"+(this.length2===0?this.start2+",0":this.length2==1?this.start2+1:this.start2+1+","+this.length2)+` @@
54
- `],i=0;i<this.diffs.length;i++){switch(this.diffs[i][0]){case 1:r="+";break;case-1:r="-";break;case 0:r=" "}n[i+1]=r+encodeURI(this.diffs[i][1])+`
55
- `}return n.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=-1,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0});Op.DIFF_EQUAL;Op.DIFF_DELETE;Op.DIFF_INSERT;/*!
56
- * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
57
- * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
58
- * Copyright 2025 Fonticons, Inc.
59
- */function Jh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function dL(e){if(Array.isArray(e))return e}function pL(e){if(Array.isArray(e))return Jh(e)}function mL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Pw(n.key),n)}}function vL(e,t,r){return t&&gL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ml(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Mp(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
60
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{a||r.return==null||r.return()}finally{if(o)throw s}}}}function Oe(e,t,r){return(t=Pw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _L(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(h){c=!0,i=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function wL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
61
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
62
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vv(Object(r),!0).forEach(function(n){Oe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xc(e,t){return dL(e)||yL(e,t)||Mp(e,t)||wL()}function Tr(e){return pL(e)||_L(e)||Mp(e)||bL()}function SL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pw(e){var t=SL(e,"string");return typeof t=="symbol"?t:t+""}function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function Mp(e,t){if(e){if(typeof e=="string")return Jh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jh(e,t):void 0}}var Kv=function(){},jp={},Tw={},Dw=null,Iw={mark:Kv,measure:Kv};try{typeof window<"u"&&(jp=window),typeof document<"u"&&(Tw=document),typeof MutationObserver<"u"&&(Dw=MutationObserver),typeof performance<"u"&&(Iw=performance)}catch{}var CL=jp.navigator||{},Gv=CL.userAgent,qv=Gv===void 0?"":Gv,Fn=jp,ot=Tw,Yv=Dw,ol=Iw;Fn.document;var un=!!ot.documentElement&&!!ot.head&&typeof ot.addEventListener=="function"&&typeof ot.createElement=="function",Nw=~qv.indexOf("MSIE")||~qv.indexOf("Trident/"),mf,kL=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,xL=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i,Rw={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},EL={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Ow=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],Tt="classic",ca="duotone",Mw="sharp",jw="sharp-duotone",Bw="chisel",Fw="etch",zw="jelly",$w="jelly-duo",Uw="jelly-fill",Hw="notdog",Ww="notdog-duo",Vw="slab",Kw="slab-press",Gw="thumbprint",qw="utility",Yw="utility-duo",Jw="utility-fill",Xw="whiteboard",AL="Classic",LL="Duotone",PL="Sharp",TL="Sharp Duotone",DL="Chisel",IL="Etch",NL="Jelly",RL="Jelly Duo",OL="Jelly Fill",ML="Notdog",jL="Notdog Duo",BL="Slab",FL="Slab Press",zL="Thumbprint",$L="Utility",UL="Utility Duo",HL="Utility Fill",WL="Whiteboard",Qw=[Tt,ca,Mw,jw,Bw,Fw,zw,$w,Uw,Hw,Ww,Vw,Kw,Gw,qw,Yw,Jw,Xw];mf={},Oe(Oe(Oe(Oe(Oe(Oe(Oe(Oe(Oe(Oe(mf,Tt,AL),ca,LL),Mw,PL),jw,TL),Bw,DL),Fw,IL),zw,NL),$w,RL),Uw,OL),Hw,ML),Oe(Oe(Oe(Oe(Oe(Oe(Oe(Oe(mf,Ww,jL),Vw,BL),Kw,FL),Gw,zL),qw,$L),Yw,UL),Jw,HL),Xw,WL);var VL={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}},KL={"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}},GL=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),qL={chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}},Zw=["fak","fa-kit","fakd","fa-kit-duotone"],Jv={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},YL=["kit"],JL="kit",XL="kit-duotone",QL="Kit",ZL="Kit Duotone";Oe(Oe({},JL,QL),XL,ZL);var eP={kit:{"fa-kit":"fak"}},tP={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},rP={kit:{fak:"fa-kit"}},Xv={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},gf,al={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},nP=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],iP="classic",sP="duotone",oP="sharp",aP="sharp-duotone",lP="chisel",cP="etch",uP="jelly",fP="jelly-duo",hP="jelly-fill",dP="notdog",pP="notdog-duo",mP="slab",gP="slab-press",vP="thumbprint",_P="utility",yP="utility-duo",wP="utility-fill",bP="whiteboard",SP="Classic",CP="Duotone",kP="Sharp",xP="Sharp Duotone",EP="Chisel",AP="Etch",LP="Jelly",PP="Jelly Duo",TP="Jelly Fill",DP="Notdog",IP="Notdog Duo",NP="Slab",RP="Slab Press",OP="Thumbprint",MP="Utility",jP="Utility Duo",BP="Utility Fill",FP="Whiteboard";gf={},Oe(Oe(Oe(Oe(Oe(Oe(Oe(Oe(Oe(Oe(gf,iP,SP),sP,CP),oP,kP),aP,xP),lP,EP),cP,AP),uP,LP),fP,PP),hP,TP),dP,DP),Oe(Oe(Oe(Oe(Oe(Oe(Oe(Oe(gf,pP,IP),mP,NP),gP,RP),vP,OP),_P,MP),yP,jP),wP,BP),bP,FP);var zP="kit",$P="kit-duotone",UP="Kit",HP="Kit Duotone";Oe(Oe({},zP,UP),$P,HP);var WP={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}},VP={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]},Xh={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},KP=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],eb=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(nP,KP),GP=["solid","regular","light","thin","duotone","brands","semibold"],tb=[1,2,3,4,5,6,7,8,9,10],qP=tb.concat([11,12,13,14,15,16,17,18,19,20]),YP=["aw","fw","pull-left","pull-right"],JP=[].concat(Tr(Object.keys(VP)),GP,YP,["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",al.GROUP,al.SWAP_OPACITY,al.PRIMARY,al.SECONDARY]).concat(tb.map(function(e){return"".concat(e,"x")})).concat(qP.map(function(e){return"w-".concat(e)})),XP={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},on="___FONT_AWESOME___",Qh=16,rb="fa",nb="svg-inline--fa",di="data-fa-i2svg",Zh="data-fa-pseudo-element",QP="data-fa-pseudo-element-pending",Bp="data-prefix",Fp="data-icon",Qv="fontawesome-i2svg",ZP="async",eT=["HTML","HEAD","STYLE","SCRIPT"],ib=["::before","::after",":before",":after"],sb=function(){try{return!0}catch{return!1}}();function ua(e){return new Proxy(e,{get:function(r,n){return n in r?r[n]:r[Tt]}})}var ob=me({},Rw);ob[Tt]=me(me(me(me({},{"fa-duotone":"duotone"}),Rw[Tt]),Jv.kit),Jv["kit-duotone"]);var tT=ua(ob),ed=me({},qL);ed[Tt]=me(me(me(me({},{duotone:"fad"}),ed[Tt]),Xv.kit),Xv["kit-duotone"]);var Zv=ua(ed),td=me({},Xh);td[Tt]=me(me({},td[Tt]),rP.kit);var zp=ua(td),rd=me({},WP);rd[Tt]=me(me({},rd[Tt]),eP.kit);ua(rd);var rT=kL,ab="fa-layers-text",nT=xL,iT=me({},VL);ua(iT);var sT=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],vf=EL,oT=[].concat(Tr(YL),Tr(JP)),So=Fn.FontAwesomeConfig||{};function aT(e){var t=ot.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function lT(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(ot&&typeof ot.querySelector=="function"){var cT=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];cT.forEach(function(e){var t=Xc(e,2),r=t[0],n=t[1],i=lT(aT(r));i!=null&&(So[n]=i)})}var lb={styleDefault:"solid",familyDefault:Tt,cssPrefix:rb,replacementClass:nb,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};So.familyPrefix&&(So.cssPrefix=So.familyPrefix);var ys=me(me({},lb),So);ys.autoReplaceSvg||(ys.observeMutations=!1);var Le={};Object.keys(lb).forEach(function(e){Object.defineProperty(Le,e,{enumerable:!0,set:function(r){ys[e]=r,Co.forEach(function(n){return n(Le)})},get:function(){return ys[e]}})});Object.defineProperty(Le,"familyPrefix",{enumerable:!0,set:function(t){ys.cssPrefix=t,Co.forEach(function(r){return r(Le)})},get:function(){return ys.cssPrefix}});Fn.FontAwesomeConfig=Le;var Co=[];function uT(e){return Co.push(e),function(){Co.splice(Co.indexOf(e),1)}}var Pi=Qh,Br={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function fT(e){if(!(!e||!un)){var t=ot.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var r=ot.head.childNodes,n=null,i=r.length-1;i>-1;i--){var s=r[i],a=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(n=s)}return ot.head.insertBefore(t,n),e}}var hT="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function e_(){for(var e=12,t="";e-- >0;)t+=hT[Math.random()*62|0];return t}function xs(e){for(var t=[],r=(e||[]).length>>>0;r--;)t[r]=e[r];return t}function $p(e){return e.classList?xs(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function cb(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function dT(e){return Object.keys(e||{}).reduce(function(t,r){return t+"".concat(r,'="').concat(cb(e[r]),'" ')},"").trim()}function Qc(e){return Object.keys(e||{}).reduce(function(t,r){return t+"".concat(r,": ").concat(e[r].trim(),";")},"")}function Up(e){return e.size!==Br.size||e.x!==Br.x||e.y!==Br.y||e.rotate!==Br.rotate||e.flipX||e.flipY}function pT(e){var t=e.transform,r=e.containerWidth,n=e.iconWidth,i={transform:"translate(".concat(r/2," 256)")},s="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),o="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(s," ").concat(a," ").concat(o)},c={transform:"translate(".concat(n/2*-1," -256)")};return{outer:i,inner:l,path:c}}function mT(e){var t=e.transform,r=e.width,n=r===void 0?Qh:r,i=e.height,s=i===void 0?Qh:i,a="";return Nw?a+="translate(".concat(t.x/Pi-n/2,"em, ").concat(t.y/Pi-s/2,"em) "):a+="translate(calc(-50% + ".concat(t.x/Pi,"em), calc(-50% + ").concat(t.y/Pi,"em)) "),a+="scale(".concat(t.size/Pi*(t.flipX?-1:1),", ").concat(t.size/Pi*(t.flipY?-1:1),") "),a+="rotate(".concat(t.rotate,"deg) "),a}var gT=`:root, :host {
63
- --fa-font-solid: normal 900 1em/1 "Font Awesome 7 Free";
64
- --fa-font-regular: normal 400 1em/1 "Font Awesome 7 Free";
65
- --fa-font-light: normal 300 1em/1 "Font Awesome 7 Pro";
66
- --fa-font-thin: normal 100 1em/1 "Font Awesome 7 Pro";
67
- --fa-font-duotone: normal 900 1em/1 "Font Awesome 7 Duotone";
68
- --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 7 Duotone";
69
- --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 7 Duotone";
70
- --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 7 Duotone";
71
- --fa-font-brands: normal 400 1em/1 "Font Awesome 7 Brands";
72
- --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 7 Sharp";
73
- --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 7 Sharp";
74
- --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 7 Sharp";
75
- --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 7 Sharp";
76
- --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 7 Sharp Duotone";
77
- --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 7 Sharp Duotone";
78
- --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 7 Sharp Duotone";
79
- --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 7 Sharp Duotone";
80
- --fa-font-slab-regular: normal 400 1em/1 "Font Awesome 7 Slab";
81
- --fa-font-slab-press-regular: normal 400 1em/1 "Font Awesome 7 Slab Press";
82
- --fa-font-whiteboard-semibold: normal 600 1em/1 "Font Awesome 7 Whiteboard";
83
- --fa-font-thumbprint-light: normal 300 1em/1 "Font Awesome 7 Thumbprint";
84
- --fa-font-notdog-solid: normal 900 1em/1 "Font Awesome 7 Notdog";
85
- --fa-font-notdog-duo-solid: normal 900 1em/1 "Font Awesome 7 Notdog Duo";
86
- --fa-font-etch-solid: normal 900 1em/1 "Font Awesome 7 Etch";
87
- --fa-font-jelly-regular: normal 400 1em/1 "Font Awesome 7 Jelly";
88
- --fa-font-jelly-fill-regular: normal 400 1em/1 "Font Awesome 7 Jelly Fill";
89
- --fa-font-jelly-duo-regular: normal 400 1em/1 "Font Awesome 7 Jelly Duo";
90
- --fa-font-chisel-regular: normal 400 1em/1 "Font Awesome 7 Chisel";
91
- --fa-font-utility-semibold: normal 600 1em/1 "Font Awesome 7 Utility";
92
- --fa-font-utility-duo-semibold: normal 600 1em/1 "Font Awesome 7 Utility Duo";
93
- --fa-font-utility-fill-semibold: normal 600 1em/1 "Font Awesome 7 Utility Fill";
94
- }
95
-
96
- .svg-inline--fa {
97
- box-sizing: content-box;
98
- display: var(--fa-display, inline-block);
99
- height: 1em;
100
- overflow: visible;
101
- vertical-align: -0.125em;
102
- width: var(--fa-width, 1.25em);
103
- }
104
- .svg-inline--fa.fa-2xs {
105
- vertical-align: 0.1em;
106
- }
107
- .svg-inline--fa.fa-xs {
108
- vertical-align: 0em;
109
- }
110
- .svg-inline--fa.fa-sm {
111
- vertical-align: -0.0714285714em;
112
- }
113
- .svg-inline--fa.fa-lg {
114
- vertical-align: -0.2em;
115
- }
116
- .svg-inline--fa.fa-xl {
117
- vertical-align: -0.25em;
118
- }
119
- .svg-inline--fa.fa-2xl {
120
- vertical-align: -0.3125em;
121
- }
122
- .svg-inline--fa.fa-pull-left,
123
- .svg-inline--fa .fa-pull-start {
124
- float: inline-start;
125
- margin-inline-end: var(--fa-pull-margin, 0.3em);
126
- }
127
- .svg-inline--fa.fa-pull-right,
128
- .svg-inline--fa .fa-pull-end {
129
- float: inline-end;
130
- margin-inline-start: var(--fa-pull-margin, 0.3em);
131
- }
132
- .svg-inline--fa.fa-li {
133
- width: var(--fa-li-width, 2em);
134
- inset-inline-start: calc(-1 * var(--fa-li-width, 2em));
135
- inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */
136
- }
137
-
138
- .fa-layers-counter, .fa-layers-text {
139
- display: inline-block;
140
- position: absolute;
141
- text-align: center;
142
- }
143
-
144
- .fa-layers {
145
- display: inline-block;
146
- height: 1em;
147
- position: relative;
148
- text-align: center;
149
- vertical-align: -0.125em;
150
- width: var(--fa-width, 1.25em);
151
- }
152
- .fa-layers .svg-inline--fa {
153
- inset: 0;
154
- margin: auto;
155
- position: absolute;
156
- transform-origin: center center;
157
- }
158
-
159
- .fa-layers-text {
160
- left: 50%;
161
- top: 50%;
162
- transform: translate(-50%, -50%);
163
- transform-origin: center center;
164
- }
165
-
166
- .fa-layers-counter {
167
- background-color: var(--fa-counter-background-color, #ff253a);
168
- border-radius: var(--fa-counter-border-radius, 1em);
169
- box-sizing: border-box;
170
- color: var(--fa-inverse, #fff);
171
- line-height: var(--fa-counter-line-height, 1);
172
- max-width: var(--fa-counter-max-width, 5em);
173
- min-width: var(--fa-counter-min-width, 1.5em);
174
- overflow: hidden;
175
- padding: var(--fa-counter-padding, 0.25em 0.5em);
176
- right: var(--fa-right, 0);
177
- text-overflow: ellipsis;
178
- top: var(--fa-top, 0);
179
- transform: scale(var(--fa-counter-scale, 0.25));
180
- transform-origin: top right;
181
- }
182
-
183
- .fa-layers-bottom-right {
184
- bottom: var(--fa-bottom, 0);
185
- right: var(--fa-right, 0);
186
- top: auto;
187
- transform: scale(var(--fa-layers-scale, 0.25));
188
- transform-origin: bottom right;
189
- }
190
-
191
- .fa-layers-bottom-left {
192
- bottom: var(--fa-bottom, 0);
193
- left: var(--fa-left, 0);
194
- right: auto;
195
- top: auto;
196
- transform: scale(var(--fa-layers-scale, 0.25));
197
- transform-origin: bottom left;
198
- }
199
-
200
- .fa-layers-top-right {
201
- top: var(--fa-top, 0);
202
- right: var(--fa-right, 0);
203
- transform: scale(var(--fa-layers-scale, 0.25));
204
- transform-origin: top right;
205
- }
206
-
207
- .fa-layers-top-left {
208
- left: var(--fa-left, 0);
209
- right: auto;
210
- top: var(--fa-top, 0);
211
- transform: scale(var(--fa-layers-scale, 0.25));
212
- transform-origin: top left;
213
- }
214
-
215
- .fa-1x {
216
- font-size: 1em;
217
- }
218
-
219
- .fa-2x {
220
- font-size: 2em;
221
- }
222
-
223
- .fa-3x {
224
- font-size: 3em;
225
- }
226
-
227
- .fa-4x {
228
- font-size: 4em;
229
- }
230
-
231
- .fa-5x {
232
- font-size: 5em;
233
- }
234
-
235
- .fa-6x {
236
- font-size: 6em;
237
- }
238
-
239
- .fa-7x {
240
- font-size: 7em;
241
- }
242
-
243
- .fa-8x {
244
- font-size: 8em;
245
- }
246
-
247
- .fa-9x {
248
- font-size: 9em;
249
- }
250
-
251
- .fa-10x {
252
- font-size: 10em;
253
- }
254
-
255
- .fa-2xs {
256
- font-size: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that's relative to the scale's 16px base */
257
- line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it's parent */
258
- vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
259
- }
260
-
261
- .fa-xs {
262
- font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that's relative to the scale's 16px base */
263
- line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it's parent */
264
- vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
265
- }
266
-
267
- .fa-sm {
268
- font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that's relative to the scale's 16px base */
269
- line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it's parent */
270
- vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
271
- }
272
-
273
- .fa-lg {
274
- font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that's relative to the scale's 16px base */
275
- line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it's parent */
276
- vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
277
- }
278
-
279
- .fa-xl {
280
- font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that's relative to the scale's 16px base */
281
- line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it's parent */
282
- vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
283
- }
284
-
285
- .fa-2xl {
286
- font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that's relative to the scale's 16px base */
287
- line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it's parent */
288
- vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
289
- }
290
-
291
- .fa-width-auto {
292
- --fa-width: auto;
293
- }
294
-
295
- .fa-fw,
296
- .fa-width-fixed {
297
- --fa-width: 1.25em;
298
- }
299
-
300
- .fa-ul {
301
- list-style-type: none;
302
- margin-inline-start: var(--fa-li-margin, 2.5em);
303
- padding-inline-start: 0;
304
- }
305
- .fa-ul > li {
306
- position: relative;
307
- }
308
-
309
- .fa-li {
310
- inset-inline-start: calc(-1 * var(--fa-li-width, 2em));
311
- position: absolute;
312
- text-align: center;
313
- width: var(--fa-li-width, 2em);
314
- line-height: inherit;
315
- }
316
-
317
- /* Heads Up: Bordered Icons will not be supported in the future!
318
- - This feature will be deprecated in the next major release of Font Awesome (v8)!
319
- - You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.
320
- */
321
- /* Notes:
322
- * --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)
323
- * --@{v.$css-prefix}-border-padding =
324
- ** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it's vertical alignment)
325
- ** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)
326
- */
327
- .fa-border {
328
- border-color: var(--fa-border-color, #eee);
329
- border-radius: var(--fa-border-radius, 0.1em);
330
- border-style: var(--fa-border-style, solid);
331
- border-width: var(--fa-border-width, 0.0625em);
332
- box-sizing: var(--fa-border-box-sizing, content-box);
333
- padding: var(--fa-border-padding, 0.1875em 0.25em);
334
- }
335
-
336
- .fa-pull-left,
337
- .fa-pull-start {
338
- float: inline-start;
339
- margin-inline-end: var(--fa-pull-margin, 0.3em);
340
- }
341
-
342
- .fa-pull-right,
343
- .fa-pull-end {
344
- float: inline-end;
345
- margin-inline-start: var(--fa-pull-margin, 0.3em);
346
- }
347
-
348
- .fa-beat {
349
- animation-name: fa-beat;
350
- animation-delay: var(--fa-animation-delay, 0s);
351
- animation-direction: var(--fa-animation-direction, normal);
352
- animation-duration: var(--fa-animation-duration, 1s);
353
- animation-iteration-count: var(--fa-animation-iteration-count, infinite);
354
- animation-timing-function: var(--fa-animation-timing, ease-in-out);
355
- }
356
-
357
- .fa-bounce {
358
- animation-name: fa-bounce;
359
- animation-delay: var(--fa-animation-delay, 0s);
360
- animation-direction: var(--fa-animation-direction, normal);
361
- animation-duration: var(--fa-animation-duration, 1s);
362
- animation-iteration-count: var(--fa-animation-iteration-count, infinite);
363
- animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
364
- }
365
-
366
- .fa-fade {
367
- animation-name: fa-fade;
368
- animation-delay: var(--fa-animation-delay, 0s);
369
- animation-direction: var(--fa-animation-direction, normal);
370
- animation-duration: var(--fa-animation-duration, 1s);
371
- animation-iteration-count: var(--fa-animation-iteration-count, infinite);
372
- animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
373
- }
374
-
375
- .fa-beat-fade {
376
- animation-name: fa-beat-fade;
377
- animation-delay: var(--fa-animation-delay, 0s);
378
- animation-direction: var(--fa-animation-direction, normal);
379
- animation-duration: var(--fa-animation-duration, 1s);
380
- animation-iteration-count: var(--fa-animation-iteration-count, infinite);
381
- animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
382
- }
383
-
384
- .fa-flip {
385
- animation-name: fa-flip;
386
- animation-delay: var(--fa-animation-delay, 0s);
387
- animation-direction: var(--fa-animation-direction, normal);
388
- animation-duration: var(--fa-animation-duration, 1s);
389
- animation-iteration-count: var(--fa-animation-iteration-count, infinite);
390
- animation-timing-function: var(--fa-animation-timing, ease-in-out);
391
- }
392
-
393
- .fa-shake {
394
- animation-name: fa-shake;
395
- animation-delay: var(--fa-animation-delay, 0s);
396
- animation-direction: var(--fa-animation-direction, normal);
397
- animation-duration: var(--fa-animation-duration, 1s);
398
- animation-iteration-count: var(--fa-animation-iteration-count, infinite);
399
- animation-timing-function: var(--fa-animation-timing, linear);
400
- }
401
-
402
- .fa-spin {
403
- animation-name: fa-spin;
404
- animation-delay: var(--fa-animation-delay, 0s);
405
- animation-direction: var(--fa-animation-direction, normal);
406
- animation-duration: var(--fa-animation-duration, 2s);
407
- animation-iteration-count: var(--fa-animation-iteration-count, infinite);
408
- animation-timing-function: var(--fa-animation-timing, linear);
409
- }
410
-
411
- .fa-spin-reverse {
412
- --fa-animation-direction: reverse;
413
- }
414
-
415
- .fa-pulse,
416
- .fa-spin-pulse {
417
- animation-name: fa-spin;
418
- animation-direction: var(--fa-animation-direction, normal);
419
- animation-duration: var(--fa-animation-duration, 1s);
420
- animation-iteration-count: var(--fa-animation-iteration-count, infinite);
421
- animation-timing-function: var(--fa-animation-timing, steps(8));
422
- }
423
-
424
- @media (prefers-reduced-motion: reduce) {
425
- .fa-beat,
426
- .fa-bounce,
427
- .fa-fade,
428
- .fa-beat-fade,
429
- .fa-flip,
430
- .fa-pulse,
431
- .fa-shake,
432
- .fa-spin,
433
- .fa-spin-pulse {
434
- animation: none !important;
435
- transition: none !important;
436
- }
437
- }
438
- @keyframes fa-beat {
439
- 0%, 90% {
440
- transform: scale(1);
441
- }
442
- 45% {
443
- transform: scale(var(--fa-beat-scale, 1.25));
444
- }
445
- }
446
- @keyframes fa-bounce {
447
- 0% {
448
- transform: scale(1, 1) translateY(0);
449
- }
450
- 10% {
451
- transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
452
- }
453
- 30% {
454
- transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
455
- }
456
- 50% {
457
- transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
458
- }
459
- 57% {
460
- transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
461
- }
462
- 64% {
463
- transform: scale(1, 1) translateY(0);
464
- }
465
- 100% {
466
- transform: scale(1, 1) translateY(0);
467
- }
468
- }
469
- @keyframes fa-fade {
470
- 50% {
471
- opacity: var(--fa-fade-opacity, 0.4);
472
- }
473
- }
474
- @keyframes fa-beat-fade {
475
- 0%, 100% {
476
- opacity: var(--fa-beat-fade-opacity, 0.4);
477
- transform: scale(1);
478
- }
479
- 50% {
480
- opacity: 1;
481
- transform: scale(var(--fa-beat-fade-scale, 1.125));
482
- }
483
- }
484
- @keyframes fa-flip {
485
- 50% {
486
- transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
487
- }
488
- }
489
- @keyframes fa-shake {
490
- 0% {
491
- transform: rotate(-15deg);
492
- }
493
- 4% {
494
- transform: rotate(15deg);
495
- }
496
- 8%, 24% {
497
- transform: rotate(-18deg);
498
- }
499
- 12%, 28% {
500
- transform: rotate(18deg);
501
- }
502
- 16% {
503
- transform: rotate(-22deg);
504
- }
505
- 20% {
506
- transform: rotate(22deg);
507
- }
508
- 32% {
509
- transform: rotate(-12deg);
510
- }
511
- 36% {
512
- transform: rotate(12deg);
513
- }
514
- 40%, 100% {
515
- transform: rotate(0deg);
516
- }
517
- }
518
- @keyframes fa-spin {
519
- 0% {
520
- transform: rotate(0deg);
521
- }
522
- 100% {
523
- transform: rotate(360deg);
524
- }
525
- }
526
- .fa-rotate-90 {
527
- transform: rotate(90deg);
528
- }
529
-
530
- .fa-rotate-180 {
531
- transform: rotate(180deg);
532
- }
533
-
534
- .fa-rotate-270 {
535
- transform: rotate(270deg);
536
- }
537
-
538
- .fa-flip-horizontal {
539
- transform: scale(-1, 1);
540
- }
541
-
542
- .fa-flip-vertical {
543
- transform: scale(1, -1);
544
- }
545
-
546
- .fa-flip-both,
547
- .fa-flip-horizontal.fa-flip-vertical {
548
- transform: scale(-1, -1);
549
- }
550
-
551
- .fa-rotate-by {
552
- transform: rotate(var(--fa-rotate-angle, 0));
553
- }
554
-
555
- .svg-inline--fa .fa-primary {
556
- fill: var(--fa-primary-color, currentColor);
557
- opacity: var(--fa-primary-opacity, 1);
558
- }
559
-
560
- .svg-inline--fa .fa-secondary {
561
- fill: var(--fa-secondary-color, currentColor);
562
- opacity: var(--fa-secondary-opacity, 0.4);
563
- }
564
-
565
- .svg-inline--fa.fa-swap-opacity .fa-primary {
566
- opacity: var(--fa-secondary-opacity, 0.4);
567
- }
568
-
569
- .svg-inline--fa.fa-swap-opacity .fa-secondary {
570
- opacity: var(--fa-primary-opacity, 1);
571
- }
572
-
573
- .svg-inline--fa mask .fa-primary,
574
- .svg-inline--fa mask .fa-secondary {
575
- fill: black;
576
- }
577
-
578
- .svg-inline--fa.fa-inverse {
579
- fill: var(--fa-inverse, #fff);
580
- }
581
-
582
- .fa-stack {
583
- display: inline-block;
584
- height: 2em;
585
- line-height: 2em;
586
- position: relative;
587
- vertical-align: middle;
588
- width: 2.5em;
589
- }
590
-
591
- .fa-inverse {
592
- color: var(--fa-inverse, #fff);
593
- }
594
-
595
- .svg-inline--fa.fa-stack-1x {
596
- --fa-width: 1.25em;
597
- height: 1em;
598
- width: var(--fa-width);
599
- }
600
- .svg-inline--fa.fa-stack-2x {
601
- --fa-width: 2.5em;
602
- height: 2em;
603
- width: var(--fa-width);
604
- }
605
-
606
- .fa-stack-1x,
607
- .fa-stack-2x {
608
- inset: 0;
609
- margin: auto;
610
- position: absolute;
611
- z-index: var(--fa-stack-z-index, auto);
612
- }`;function ub(){var e=rb,t=nb,r=Le.cssPrefix,n=Le.replacementClass,i=gT;if(r!==e||n!==t){var s=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),o=new RegExp("\\.".concat(t),"g");i=i.replace(s,".".concat(r,"-")).replace(a,"--".concat(r,"-")).replace(o,".".concat(n))}return i}var t_=!1;function _f(){Le.autoAddCss&&!t_&&(fT(ub()),t_=!0)}var vT={mixout:function(){return{dom:{css:ub,insertCss:_f}}},hooks:function(){return{beforeDOMElementCreation:function(){_f()},beforeI2svg:function(){_f()}}}},an=Fn||{};an[on]||(an[on]={});an[on].styles||(an[on].styles={});an[on].hooks||(an[on].hooks={});an[on].shims||(an[on].shims=[]);var kr=an[on],fb=[],hb=function(){ot.removeEventListener("DOMContentLoaded",hb),yc=1,fb.map(function(t){return t()})},yc=!1;un&&(yc=(ot.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(ot.readyState),yc||ot.addEventListener("DOMContentLoaded",hb));function _T(e){un&&(yc?setTimeout(e,0):fb.push(e))}function fa(e){var t=e.tag,r=e.attributes,n=r===void 0?{}:r,i=e.children,s=i===void 0?[]:i;return typeof e=="string"?cb(e):"<".concat(t," ").concat(dT(n),">").concat(s.map(fa).join(""),"</").concat(t,">")}function r_(e,t,r){if(e&&e[t]&&e[t][r])return{prefix:t,iconName:r,icon:e[t][r]}}var yf=function(t,r,n,i){var s=Object.keys(t),a=s.length,o=r,l,c,h;for(n===void 0?(l=1,h=t[s[0]]):(l=0,h=n);l<a;l++)c=s[l],h=o(h,t[c],c,t);return h};function db(e){return Tr(e).length!==1?null:e.codePointAt(0).toString(16)}function n_(e){return Object.keys(e).reduce(function(t,r){var n=e[r],i=!!n.icon;return i?t[n.iconName]=n.icon:t[r]=n,t},{})}function nd(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.skipHooks,i=n===void 0?!1:n,s=n_(t);typeof kr.hooks.addPack=="function"&&!i?kr.hooks.addPack(e,n_(t)):kr.styles[e]=me(me({},kr.styles[e]||{}),s),e==="fas"&&nd("fa",t)}var Yo=kr.styles,yT=kr.shims,pb=Object.keys(zp),wT=pb.reduce(function(e,t){return e[t]=Object.keys(zp[t]),e},{}),Hp=null,mb={},gb={},vb={},_b={},yb={};function bT(e){return~oT.indexOf(e)}function ST(e,t){var r=t.split("-"),n=r[0],i=r.slice(1).join("-");return n===e&&i!==""&&!bT(i)?i:null}var wb=function(){var t=function(s){return yf(Yo,function(a,o,l){return a[l]=yf(o,s,{}),a},{})};mb=t(function(i,s,a){if(s[3]&&(i[s[3]]=a),s[2]){var o=s[2].filter(function(l){return typeof l=="number"});o.forEach(function(l){i[l.toString(16)]=a})}return i}),gb=t(function(i,s,a){if(i[a]=a,s[2]){var o=s[2].filter(function(l){return typeof l=="string"});o.forEach(function(l){i[l]=a})}return i}),yb=t(function(i,s,a){var o=s[2];return i[a]=a,o.forEach(function(l){i[l]=a}),i});var r="far"in Yo||Le.autoFetchSvg,n=yf(yT,function(i,s){var a=s[0],o=s[1],l=s[2];return o==="far"&&!r&&(o="fas"),typeof a=="string"&&(i.names[a]={prefix:o,iconName:l}),typeof a=="number"&&(i.unicodes[a.toString(16)]={prefix:o,iconName:l}),i},{names:{},unicodes:{}});vb=n.names,_b=n.unicodes,Hp=Zc(Le.styleDefault,{family:Le.familyDefault})};uT(function(e){Hp=Zc(e.styleDefault,{family:Le.familyDefault})});wb();function Wp(e,t){return(mb[e]||{})[t]}function CT(e,t){return(gb[e]||{})[t]}function ii(e,t){return(yb[e]||{})[t]}function bb(e){return vb[e]||{prefix:null,iconName:null}}function kT(e){var t=_b[e],r=Wp("fas",e);return t||(r?{prefix:"fas",iconName:r}:null)||{prefix:null,iconName:null}}function zn(){return Hp}var Sb=function(){return{prefix:null,iconName:null,rest:[]}};function xT(e){var t=Tt,r=pb.reduce(function(n,i){return n[i]="".concat(Le.cssPrefix,"-").concat(i),n},{});return Qw.forEach(function(n){(e.includes(r[n])||e.some(function(i){return wT[n].includes(i)}))&&(t=n)}),t}function Zc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.family,n=r===void 0?Tt:r,i=tT[n][e];if(n===ca&&!e)return"fad";var s=Zv[n][e]||Zv[n][i],a=e in kr.styles?e:null,o=s||a||null;return o}function ET(e){var t=[],r=null;return e.forEach(function(n){var i=ST(Le.cssPrefix,n);i?r=i:n&&t.push(n)}),{iconName:r,rest:t}}function i_(e){return e.sort().filter(function(t,r,n){return n.indexOf(t)===r})}var s_=eb.concat(Zw);function eu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.skipLookups,n=r===void 0?!1:r,i=null,s=i_(e.filter(function(v){return s_.includes(v)})),a=i_(e.filter(function(v){return!s_.includes(v)})),o=s.filter(function(v){return i=v,!Ow.includes(v)}),l=Xc(o,1),c=l[0],h=c===void 0?null:c,u=xT(s),m=me(me({},ET(a)),{},{prefix:Zc(h,{family:u})});return me(me(me({},m),TT({values:e,family:u,styles:Yo,config:Le,canonical:m,givenPrefix:i})),AT(n,i,m))}function AT(e,t,r){var n=r.prefix,i=r.iconName;if(e||!n||!i)return{prefix:n,iconName:i};var s=t==="fa"?bb(i):{},a=ii(n,i);return i=s.iconName||a||i,n=s.prefix||n,n==="far"&&!Yo.far&&Yo.fas&&!Le.autoFetchSvg&&(n="fas"),{prefix:n,iconName:i}}var LT=Qw.filter(function(e){return e!==Tt||e!==ca}),PT=Object.keys(Xh).filter(function(e){return e!==Tt}).map(function(e){return Object.keys(Xh[e])}).flat();function TT(e){var t=e.values,r=e.family,n=e.canonical,i=e.givenPrefix,s=i===void 0?"":i,a=e.styles,o=a===void 0?{}:a,l=e.config,c=l===void 0?{}:l,h=r===ca,u=t.includes("fa-duotone")||t.includes("fad"),m=c.familyDefault==="duotone",v=n.prefix==="fad"||n.prefix==="fa-duotone";if(!h&&(u||m||v)&&(n.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(n.prefix="fab"),!n.prefix&&LT.includes(r)){var w=Object.keys(o).find(function(g){return PT.includes(g)});if(w||c.autoFetchSvg){var _=GL.get(r).defaultShortPrefixId;n.prefix=_,n.iconName=ii(n.prefix,n.iconName)||n.iconName}}return(n.prefix==="fa"||s==="fa")&&(n.prefix=zn()||"fas"),n}var DT=function(){function e(){mL(this,e),this.definitions={}}return vL(e,[{key:"add",value:function(){for(var r=this,n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var a=i.reduce(this._pullDefinitions,{});Object.keys(a).forEach(function(o){r.definitions[o]=me(me({},r.definitions[o]||{}),a[o]),nd(o,a[o]);var l=zp[Tt][o];l&&nd(l,a[o]),wb()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(r,n){var i=n.prefix&&n.iconName&&n.icon?{0:n}:n;return Object.keys(i).map(function(s){var a=i[s],o=a.prefix,l=a.iconName,c=a.icon,h=c[2];r[o]||(r[o]={}),h.length>0&&h.forEach(function(u){typeof u=="string"&&(r[o][u]=c)}),r[o][l]=c}),r}}])}(),o_=[],es={},as={},IT=Object.keys(as);function NT(e,t){var r=t.mixoutsTo;return o_=e,es={},Object.keys(as).forEach(function(n){IT.indexOf(n)===-1&&delete as[n]}),o_.forEach(function(n){var i=n.mixout?n.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(r[a]=i[a]),_c(i[a])==="object"&&Object.keys(i[a]).forEach(function(o){r[a]||(r[a]={}),r[a][o]=i[a][o]})}),n.hooks){var s=n.hooks();Object.keys(s).forEach(function(a){es[a]||(es[a]=[]),es[a].push(s[a])})}n.provides&&n.provides(as)}),r}function id(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];var s=es[e]||[];return s.forEach(function(a){t=a.apply(null,[t].concat(n))}),t}function pi(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=es[e]||[];i.forEach(function(s){s.apply(null,r)})}function $n(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return as[e]?as[e].apply(null,t):void 0}function sd(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,r=e.prefix||zn();if(t)return t=ii(r,t)||t,r_(Cb.definitions,r,t)||r_(kr.styles,r,t)}var Cb=new DT,RT=function(){Le.autoReplaceSvg=!1,Le.observeMutations=!1,pi("noAuto")},OT={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return un?(pi("beforeI2svg",t),$n("pseudoElements2svg",t),$n("i2svg",t)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.autoReplaceSvgRoot;Le.autoReplaceSvg===!1&&(Le.autoReplaceSvg=!0),Le.observeMutations=!0,_T(function(){jT({autoReplaceSvgRoot:r}),pi("watch",t)})}},MT={icon:function(t){if(t===null)return null;if(_c(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:ii(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var r=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],n=Zc(t[0]);return{prefix:n,iconName:ii(n,r)||r}}if(typeof t=="string"&&(t.indexOf("".concat(Le.cssPrefix,"-"))>-1||t.match(rT))){var i=eu(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||zn(),iconName:ii(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var s=zn();return{prefix:s,iconName:ii(s,t)||t}}}},lr={noAuto:RT,config:Le,dom:OT,parse:MT,library:Cb,findIconDefinition:sd,toHtml:fa},jT=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.autoReplaceSvgRoot,n=r===void 0?ot:r;(Object.keys(kr.styles).length>0||Le.autoFetchSvg)&&un&&Le.autoReplaceSvg&&lr.dom.i2svg({node:n})};function tu(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(n){return fa(n)})}}),Object.defineProperty(e,"node",{get:function(){if(un){var n=ot.createElement("div");return n.innerHTML=e.html,n.children}}}),e}function BT(e){var t=e.children,r=e.main,n=e.mask,i=e.attributes,s=e.styles,a=e.transform;if(Up(a)&&r.found&&!n.found){var o=r.width,l=r.height,c={x:o/l/2,y:.5};i.style=Qc(me(me({},s),{},{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function FT(e){var t=e.prefix,r=e.iconName,n=e.children,i=e.attributes,s=e.symbol,a=s===!0?"".concat(t,"-").concat(Le.cssPrefix,"-").concat(r):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:me(me({},i),{},{id:a}),children:n}]}]}function zT(e){var t=["aria-label","aria-labelledby","title","role"];return t.some(function(r){return r in e})}function Vp(e){var t=e.icons,r=t.main,n=t.mask,i=e.prefix,s=e.iconName,a=e.transform,o=e.symbol,l=e.maskId,c=e.extra,h=e.watchable,u=h===void 0?!1:h,m=n.found?n:r,v=m.width,w=m.height,_=[Le.replacementClass,s?"".concat(Le.cssPrefix,"-").concat(s):""].filter(function(S){return c.classes.indexOf(S)===-1}).filter(function(S){return S!==""||!!S}).concat(c.classes).join(" "),g={children:[],attributes:me(me({},c.attributes),{},{"data-prefix":i,"data-icon":s,class:_,role:c.attributes.role||"img",viewBox:"0 0 ".concat(v," ").concat(w)})};!zT(c.attributes)&&!c.attributes["aria-hidden"]&&(g.attributes["aria-hidden"]="true"),u&&(g.attributes[di]="");var d=me(me({},g),{},{prefix:i,iconName:s,main:r,mask:n,maskId:l,transform:a,symbol:o,styles:me({},c.styles)}),f=n.found&&r.found?$n("generateAbstractMask",d)||{children:[],attributes:{}}:$n("generateAbstractIcon",d)||{children:[],attributes:{}},p=f.children,y=f.attributes;return d.children=p,d.attributes=y,o?FT(d):BT(d)}function a_(e){var t=e.content,r=e.width,n=e.height,i=e.transform,s=e.extra,a=e.watchable,o=a===void 0?!1:a,l=me(me({},s.attributes),{},{class:s.classes.join(" ")});o&&(l[di]="");var c=me({},s.styles);Up(i)&&(c.transform=mT({transform:i,width:r,height:n}),c["-webkit-transform"]=c.transform);var h=Qc(c);h.length>0&&(l.style=h);var u=[];return u.push({tag:"span",attributes:l,children:[t]}),u}function $T(e){var t=e.content,r=e.extra,n=me(me({},r.attributes),{},{class:r.classes.join(" ")}),i=Qc(r.styles);i.length>0&&(n.style=i);var s=[];return s.push({tag:"span",attributes:n,children:[t]}),s}var wf=kr.styles;function od(e){var t=e[0],r=e[1],n=e.slice(4),i=Xc(n,1),s=i[0],a=null;return Array.isArray(s)?a={tag:"g",attributes:{class:"".concat(Le.cssPrefix,"-").concat(vf.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Le.cssPrefix,"-").concat(vf.SECONDARY),fill:"currentColor",d:s[0]}},{tag:"path",attributes:{class:"".concat(Le.cssPrefix,"-").concat(vf.PRIMARY),fill:"currentColor",d:s[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:s}},{found:!0,width:t,height:r,icon:a}}var UT={found:!1,width:512,height:512};function HT(e,t){!sb&&!Le.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function ad(e,t){var r=t;return t==="fa"&&Le.styleDefault!==null&&(t=zn()),new Promise(function(n,i){if(r==="fa"){var s=bb(e)||{};e=s.iconName||e,t=s.prefix||t}if(e&&t&&wf[t]&&wf[t][e]){var a=wf[t][e];return n(od(a))}HT(e,t),n(me(me({},UT),{},{icon:Le.showMissingIcons&&e?$n("missingIconAbstract")||{}:{}}))})}var l_=function(){},ld=Le.measurePerformance&&ol&&ol.mark&&ol.measure?ol:{mark:l_,measure:l_},uo='FA "7.1.0"',WT=function(t){return ld.mark("".concat(uo," ").concat(t," begins")),function(){return kb(t)}},kb=function(t){ld.mark("".concat(uo," ").concat(t," ends")),ld.measure("".concat(uo," ").concat(t),"".concat(uo," ").concat(t," begins"),"".concat(uo," ").concat(t," ends"))},Kp={begin:WT,end:kb},jl=function(){};function c_(e){var t=e.getAttribute?e.getAttribute(di):null;return typeof t=="string"}function VT(e){var t=e.getAttribute?e.getAttribute(Bp):null,r=e.getAttribute?e.getAttribute(Fp):null;return t&&r}function KT(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Le.replacementClass)}function GT(){if(Le.autoReplaceSvg===!0)return Bl.replace;var e=Bl[Le.autoReplaceSvg];return e||Bl.replace}function qT(e){return ot.createElementNS("http://www.w3.org/2000/svg",e)}function YT(e){return ot.createElement(e)}function xb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.ceFn,n=r===void 0?e.tag==="svg"?qT:YT:r;if(typeof e=="string")return ot.createTextNode(e);var i=n(e.tag);Object.keys(e.attributes||[]).forEach(function(a){i.setAttribute(a,e.attributes[a])});var s=e.children||[];return s.forEach(function(a){i.appendChild(xb(a,{ceFn:n}))}),i}function JT(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var Bl={replace:function(t){var r=t[0];if(r.parentNode)if(t[1].forEach(function(i){r.parentNode.insertBefore(xb(i),r)}),r.getAttribute(di)===null&&Le.keepOriginalSource){var n=ot.createComment(JT(r));r.parentNode.replaceChild(n,r)}else r.remove()},nest:function(t){var r=t[0],n=t[1];if(~$p(r).indexOf(Le.replacementClass))return Bl.replace(t);var i=new RegExp("".concat(Le.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var s=n[0].attributes.class.split(" ").reduce(function(o,l){return l===Le.replacementClass||l.match(i)?o.toSvg.push(l):o.toNode.push(l),o},{toNode:[],toSvg:[]});n[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?r.removeAttribute("class"):r.setAttribute("class",s.toNode.join(" "))}var a=n.map(function(o){return fa(o)}).join(`
613
- `);r.setAttribute(di,""),r.innerHTML=a}};function u_(e){e()}function Eb(e,t){var r=typeof t=="function"?t:jl;if(e.length===0)r();else{var n=u_;Le.mutateApproach===ZP&&(n=Fn.requestAnimationFrame||u_),n(function(){var i=GT(),s=Kp.begin("mutate");e.map(i),s(),r()})}}var Gp=!1;function Ab(){Gp=!0}function cd(){Gp=!1}var wc=null;function f_(e){if(Yv&&Le.observeMutations){var t=e.treeCallback,r=t===void 0?jl:t,n=e.nodeCallback,i=n===void 0?jl:n,s=e.pseudoElementsCallback,a=s===void 0?jl:s,o=e.observeMutationsRoot,l=o===void 0?ot:o;wc=new Yv(function(c){if(!Gp){var h=zn();xs(c).forEach(function(u){if(u.type==="childList"&&u.addedNodes.length>0&&!c_(u.addedNodes[0])&&(Le.searchPseudoElements&&a(u.target),r(u.target)),u.type==="attributes"&&u.target.parentNode&&Le.searchPseudoElements&&a([u.target],!0),u.type==="attributes"&&c_(u.target)&&~sT.indexOf(u.attributeName))if(u.attributeName==="class"&&VT(u.target)){var m=eu($p(u.target)),v=m.prefix,w=m.iconName;u.target.setAttribute(Bp,v||h),w&&u.target.setAttribute(Fp,w)}else KT(u.target)&&i(u.target)})}}),un&&wc.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function XT(){wc&&wc.disconnect()}function QT(e){var t=e.getAttribute("style"),r=[];return t&&(r=t.split(";").reduce(function(n,i){var s=i.split(":"),a=s[0],o=s.slice(1);return a&&o.length>0&&(n[a]=o.join(":").trim()),n},{})),r}function ZT(e){var t=e.getAttribute("data-prefix"),r=e.getAttribute("data-icon"),n=e.innerText!==void 0?e.innerText.trim():"",i=eu($p(e));return i.prefix||(i.prefix=zn()),t&&r&&(i.prefix=t,i.iconName=r),i.iconName&&i.prefix||(i.prefix&&n.length>0&&(i.iconName=CT(i.prefix,e.innerText)||Wp(i.prefix,db(e.innerText))),!i.iconName&&Le.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function eD(e){var t=xs(e.attributes).reduce(function(r,n){return r.name!=="class"&&r.name!=="style"&&(r[n.name]=n.value),r},{});return t}function tD(){return{iconName:null,prefix:null,transform:Br,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function h_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},r=ZT(e),n=r.iconName,i=r.prefix,s=r.rest,a=eD(e),o=id("parseNodeAttributes",{},e),l=t.styleParser?QT(e):[];return me({iconName:n,prefix:i,transform:Br,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:s,styles:l,attributes:a}},o)}var rD=kr.styles;function Lb(e){var t=Le.autoReplaceSvg==="nest"?h_(e,{styleParser:!1}):h_(e);return~t.extra.classes.indexOf(ab)?$n("generateLayersText",e,t):$n("generateSvgReplacementMutation",e,t)}function nD(){return[].concat(Tr(Zw),Tr(eb))}function d_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!un)return Promise.resolve();var r=ot.documentElement.classList,n=function(u){return r.add("".concat(Qv,"-").concat(u))},i=function(u){return r.remove("".concat(Qv,"-").concat(u))},s=Le.autoFetchSvg?nD():Ow.concat(Object.keys(rD));s.includes("fa")||s.push("fa");var a=[".".concat(ab,":not([").concat(di,"])")].concat(s.map(function(h){return".".concat(h,":not([").concat(di,"])")})).join(", ");if(a.length===0)return Promise.resolve();var o=[];try{o=xs(e.querySelectorAll(a))}catch{}if(o.length>0)n("pending"),i("complete");else return Promise.resolve();var l=Kp.begin("onTree"),c=o.reduce(function(h,u){try{var m=Lb(u);m&&h.push(m)}catch(v){sb||v.name==="MissingIcon"&&console.error(v)}return h},[]);return new Promise(function(h,u){Promise.all(c).then(function(m){Eb(m,function(){n("active"),n("complete"),i("pending"),typeof t=="function"&&t(),l(),h()})}).catch(function(m){l(),u(m)})})}function iD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Lb(e).then(function(r){r&&Eb([r],t)})}function sD(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=(t||{}).icon?t:sd(t||{}),i=r.mask;return i&&(i=(i||{}).icon?i:sd(i||{})),e(n,me(me({},r),{},{mask:i}))}}var oD=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.transform,i=n===void 0?Br:n,s=r.symbol,a=s===void 0?!1:s,o=r.mask,l=o===void 0?null:o,c=r.maskId,h=c===void 0?null:c,u=r.classes,m=u===void 0?[]:u,v=r.attributes,w=v===void 0?{}:v,_=r.styles,g=_===void 0?{}:_;if(t){var d=t.prefix,f=t.iconName,p=t.icon;return tu(me({type:"icon"},t),function(){return pi("beforeDOMElementCreation",{iconDefinition:t,params:r}),Vp({icons:{main:od(p),mask:l?od(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:f,transform:me(me({},Br),i),symbol:a,maskId:h,extra:{attributes:w,styles:g,classes:m}})})}},aD={mixout:function(){return{icon:sD(oD)}},hooks:function(){return{mutationObserverCallbacks:function(r){return r.treeCallback=d_,r.nodeCallback=iD,r}}},provides:function(t){t.i2svg=function(r){var n=r.node,i=n===void 0?ot:n,s=r.callback,a=s===void 0?function(){}:s;return d_(i,a)},t.generateSvgReplacementMutation=function(r,n){var i=n.iconName,s=n.prefix,a=n.transform,o=n.symbol,l=n.mask,c=n.maskId,h=n.extra;return new Promise(function(u,m){Promise.all([ad(i,s),l.iconName?ad(l.iconName,l.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(v){var w=Xc(v,2),_=w[0],g=w[1];u([r,Vp({icons:{main:_,mask:g},prefix:s,iconName:i,transform:a,symbol:o,maskId:c,extra:h,watchable:!0})])}).catch(m)})},t.generateAbstractIcon=function(r){var n=r.children,i=r.attributes,s=r.main,a=r.transform,o=r.styles,l=Qc(o);l.length>0&&(i.style=l);var c;return Up(a)&&(c=$n("generateAbstractTransformGrouping",{main:s,transform:a,containerWidth:s.width,iconWidth:s.width})),n.push(c||s.icon),{children:n,attributes:i}}}},lD={mixout:function(){return{layer:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.classes,s=i===void 0?[]:i;return tu({type:"layer"},function(){pi("beforeDOMElementCreation",{assembler:r,params:n});var a=[];return r(function(o){Array.isArray(o)?o.map(function(l){a=a.concat(l.abstract)}):a=a.concat(o.abstract)}),[{tag:"span",attributes:{class:["".concat(Le.cssPrefix,"-layers")].concat(Tr(s)).join(" ")},children:a}]})}}}},cD={mixout:function(){return{counter:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};n.title;var i=n.classes,s=i===void 0?[]:i,a=n.attributes,o=a===void 0?{}:a,l=n.styles,c=l===void 0?{}:l;return tu({type:"counter",content:r},function(){return pi("beforeDOMElementCreation",{content:r,params:n}),$T({content:r.toString(),extra:{attributes:o,styles:c,classes:["".concat(Le.cssPrefix,"-layers-counter")].concat(Tr(s))}})})}}}},uD={mixout:function(){return{text:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.transform,s=i===void 0?Br:i,a=n.classes,o=a===void 0?[]:a,l=n.attributes,c=l===void 0?{}:l,h=n.styles,u=h===void 0?{}:h;return tu({type:"text",content:r},function(){return pi("beforeDOMElementCreation",{content:r,params:n}),a_({content:r,transform:me(me({},Br),s),extra:{attributes:c,styles:u,classes:["".concat(Le.cssPrefix,"-layers-text")].concat(Tr(o))}})})}}},provides:function(t){t.generateLayersText=function(r,n){var i=n.transform,s=n.extra,a=null,o=null;if(Nw){var l=parseInt(getComputedStyle(r).fontSize,10),c=r.getBoundingClientRect();a=c.width/l,o=c.height/l}return Promise.resolve([r,a_({content:r.innerHTML,width:a,height:o,transform:i,extra:s,watchable:!0})])}}},Pb=new RegExp('"',"ug"),p_=[1105920,1112319],m_=me(me(me(me({},{FontAwesome:{normal:"fas",400:"fas"}}),KL),XP),tP),ud=Object.keys(m_).reduce(function(e,t){return e[t.toLowerCase()]=m_[t],e},{}),fD=Object.keys(ud).reduce(function(e,t){var r=ud[t];return e[t]=r[900]||Tr(Object.entries(r))[0][1],e},{});function hD(e){var t=e.replace(Pb,"");return db(Tr(t)[0]||"")}function dD(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),r=e.getPropertyValue("content"),n=r.replace(Pb,""),i=n.codePointAt(0),s=i>=p_[0]&&i<=p_[1],a=n.length===2?n[0]===n[1]:!1;return s||a||t}function pD(e,t){var r=e.replace(/^['"]|['"]$/g,"").toLowerCase(),n=parseInt(t),i=isNaN(n)?"normal":n;return(ud[r]||{})[i]||fD[r]}function g_(e,t){var r="".concat(QP).concat(t.replace(":","-"));return new Promise(function(n,i){if(e.getAttribute(r)!==null)return n();var s=xs(e.children),a=s.filter(function(b){return b.getAttribute(Zh)===t})[0],o=Fn.getComputedStyle(e,t),l=o.getPropertyValue("font-family"),c=l.match(nT),h=o.getPropertyValue("font-weight"),u=o.getPropertyValue("content");if(a&&!c)return e.removeChild(a),n();if(c&&u!=="none"&&u!==""){var m=o.getPropertyValue("content"),v=pD(l,h),w=hD(m),_=c[0].startsWith("FontAwesome"),g=dD(o),d=Wp(v,w),f=d;if(_){var p=kT(w);p.iconName&&p.prefix&&(d=p.iconName,v=p.prefix)}if(d&&!g&&(!a||a.getAttribute(Bp)!==v||a.getAttribute(Fp)!==f)){e.setAttribute(r,f),a&&e.removeChild(a);var y=tD(),S=y.extra;S.attributes[Zh]=t,ad(d,v).then(function(b){var k=Vp(me(me({},y),{},{icons:{main:b,mask:Sb()},prefix:v,iconName:f,extra:S,watchable:!0})),C=ot.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(C,e.firstChild):e.appendChild(C),C.outerHTML=k.map(function(A){return fa(A)}).join(`
614
- `),e.removeAttribute(r),n()}).catch(i)}else n()}else n()})}function mD(e){return Promise.all([g_(e,"::before"),g_(e,"::after")])}function gD(e){return e.parentNode!==document.head&&!~eT.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Zh)&&(!e.parentNode||e.parentNode.tagName!=="svg")}var vD=function(t){return!!t&&ib.some(function(r){return t.includes(r)})},_D=function(t){if(!t)return[];var r=new Set,n=t.split(/,(?![^()]*\))/).map(function(l){return l.trim()});n=n.flatMap(function(l){return l.includes("(")?l:l.split(",").map(function(c){return c.trim()})});var i=Ml(n),s;try{for(i.s();!(s=i.n()).done;){var a=s.value;if(vD(a)){var o=ib.reduce(function(l,c){return l.replace(c,"")},a);o!==""&&o!=="*"&&r.add(o)}}}catch(l){i.e(l)}finally{i.f()}return r};function v_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(un){var r;if(t)r=e;else if(Le.searchPseudoElementsFullScan)r=e.querySelectorAll("*");else{var n=new Set,i=Ml(document.styleSheets),s;try{for(i.s();!(s=i.n()).done;){var a=s.value;try{var o=Ml(a.cssRules),l;try{for(o.s();!(l=o.n()).done;){var c=l.value,h=_D(c.selectorText),u=Ml(h),m;try{for(u.s();!(m=u.n()).done;){var v=m.value;n.add(v)}}catch(_){u.e(_)}finally{u.f()}}}catch(_){o.e(_)}finally{o.f()}}catch(_){Le.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(a.href," (").concat(_.message,`)
615
- If it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`))}}}catch(_){i.e(_)}finally{i.f()}if(!n.size)return;var w=Array.from(n).join(", ");try{r=e.querySelectorAll(w)}catch{}}return new Promise(function(_,g){var d=xs(r).filter(gD).map(mD),f=Kp.begin("searchPseudoElements");Ab(),Promise.all(d).then(function(){f(),cd(),_()}).catch(function(){f(),cd(),g()})})}}var yD={hooks:function(){return{mutationObserverCallbacks:function(r){return r.pseudoElementsCallback=v_,r}}},provides:function(t){t.pseudoElements2svg=function(r){var n=r.node,i=n===void 0?ot:n;Le.searchPseudoElements&&v_(i)}}},__=!1,wD={mixout:function(){return{dom:{unwatch:function(){Ab(),__=!0}}}},hooks:function(){return{bootstrap:function(){f_(id("mutationObserverCallbacks",{}))},noAuto:function(){XT()},watch:function(r){var n=r.observeMutationsRoot;__?cd():f_(id("mutationObserverCallbacks",{observeMutationsRoot:n}))}}}},y_=function(t){var r={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(n,i){var s=i.toLowerCase().split("-"),a=s[0],o=s.slice(1).join("-");if(a&&o==="h")return n.flipX=!0,n;if(a&&o==="v")return n.flipY=!0,n;if(o=parseFloat(o),isNaN(o))return n;switch(a){case"grow":n.size=n.size+o;break;case"shrink":n.size=n.size-o;break;case"left":n.x=n.x-o;break;case"right":n.x=n.x+o;break;case"up":n.y=n.y-o;break;case"down":n.y=n.y+o;break;case"rotate":n.rotate=n.rotate+o;break}return n},r)},bD={mixout:function(){return{parse:{transform:function(r){return y_(r)}}}},hooks:function(){return{parseNodeAttributes:function(r,n){var i=n.getAttribute("data-fa-transform");return i&&(r.transform=y_(i)),r}}},provides:function(t){t.generateAbstractTransformGrouping=function(r){var n=r.main,i=r.transform,s=r.containerWidth,a=r.iconWidth,o={transform:"translate(".concat(s/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),h="rotate(".concat(i.rotate," 0 0)"),u={transform:"".concat(l," ").concat(c," ").concat(h)},m={transform:"translate(".concat(a/2*-1," -256)")},v={outer:o,inner:u,path:m};return{tag:"g",attributes:me({},v.outer),children:[{tag:"g",attributes:me({},v.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:me(me({},n.icon.attributes),v.path)}]}]}}}},bf={x:0,y:0,width:"100%",height:"100%"};function w_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function SD(e){return e.tag==="g"?e.children:[e]}var CD={hooks:function(){return{parseNodeAttributes:function(r,n){var i=n.getAttribute("data-fa-mask"),s=i?eu(i.split(" ").map(function(a){return a.trim()})):Sb();return s.prefix||(s.prefix=zn()),r.mask=s,r.maskId=n.getAttribute("data-fa-mask-id"),r}}},provides:function(t){t.generateAbstractMask=function(r){var n=r.children,i=r.attributes,s=r.main,a=r.mask,o=r.maskId,l=r.transform,c=s.width,h=s.icon,u=a.width,m=a.icon,v=pT({transform:l,containerWidth:u,iconWidth:c}),w={tag:"rect",attributes:me(me({},bf),{},{fill:"white"})},_=h.children?{children:h.children.map(w_)}:{},g={tag:"g",attributes:me({},v.inner),children:[w_(me({tag:h.tag,attributes:me(me({},h.attributes),v.path)},_))]},d={tag:"g",attributes:me({},v.outer),children:[g]},f="mask-".concat(o||e_()),p="clip-".concat(o||e_()),y={tag:"mask",attributes:me(me({},bf),{},{id:f,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[w,d]},S={tag:"defs",children:[{tag:"clipPath",attributes:{id:p},children:SD(m)},y]};return n.push(S,{tag:"rect",attributes:me({fill:"currentColor","clip-path":"url(#".concat(p,")"),mask:"url(#".concat(f,")")},bf)}),{children:n,attributes:i}}}},kD={provides:function(t){var r=!1;Fn.matchMedia&&(r=Fn.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var n=[],i={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};n.push({tag:"path",attributes:me(me({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=me(me({},s),{},{attributeName:"opacity"}),o={tag:"circle",attributes:me(me({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return r||o.children.push({tag:"animate",attributes:me(me({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:me(me({},a),{},{values:"1;0;1;1;0;1;"})}),n.push(o),n.push({tag:"path",attributes:me(me({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:r?[]:[{tag:"animate",attributes:me(me({},a),{},{values:"1;0;0;0;0;1;"})}]}),r||n.push({tag:"path",attributes:me(me({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:me(me({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},xD={hooks:function(){return{parseNodeAttributes:function(r,n){var i=n.getAttribute("data-fa-symbol"),s=i===null?!1:i===""?!0:i;return r.symbol=s,r}}}},ED=[vT,aD,lD,cD,uD,yD,wD,bD,CD,kD,xD];NT(ED,{mixoutsTo:lr});lr.noAuto;var Jo=lr.config;lr.library;lr.dom;var Tb=lr.parse;lr.findIconDefinition;lr.toHtml;var AD=lr.icon;lr.layer;lr.text;lr.counter;function LD(e){return e=e-0,e===e}function Db(e){return LD(e)?e:(e=e.replace(/[_-]+(.)?/g,(t,r)=>r?r.toUpperCase():""),e.charAt(0).toLowerCase()+e.slice(1))}function PD(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Ti=new Map,TD=1e3;function DD(e){if(Ti.has(e))return Ti.get(e);const t={};let r=0;const n=e.length;for(;r<n;){const i=e.indexOf(";",r),s=i===-1?n:i,a=e.slice(r,s).trim();if(a){const o=a.indexOf(":");if(o>0){const l=a.slice(0,o).trim(),c=a.slice(o+1).trim();if(l&&c){const h=Db(l);t[h.startsWith("webkit")?PD(h):h]=c}}}r=s+1}if(Ti.size===TD){const i=Ti.keys().next().value;i&&Ti.delete(i)}return Ti.set(e,t),t}function Ib(e,t,r={}){if(typeof t=="string")return t;const n=(t.children||[]).map(h=>Ib(e,h)),i=t.attributes||{},s={};for(const[h,u]of Object.entries(i))switch(!0){case h==="class":{s.className=u;break}case h==="style":{s.style=DD(String(u));break}case h.startsWith("aria-"):case h.startsWith("data-"):{s[h.toLowerCase()]=u;break}default:s[Db(h)]=u}const{style:a,role:o,"aria-label":l,...c}=r;return a&&(s.style=s.style?{...s.style,...a}:a),o&&(s.role=o),l&&(s["aria-label"]=l,s["aria-hidden"]="false"),e(t.tag,{...c,...s},...n)}var ID=Ib.bind(null,Tc.createElement),b_=(e,t)=>{const r=x.useId();return e||(t?r:void 0)},ND=class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t=typeof process<"u"&&!1}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}},RD="searchPseudoElementsFullScan"in Jo?"7.0.0":"6.0.0",OD=Number.parseInt(RD)>=7,ko="fa",Kr={beat:"fa-beat",fade:"fa-fade",beatFade:"fa-beat-fade",bounce:"fa-bounce",shake:"fa-shake",spin:"fa-spin",spinPulse:"fa-spin-pulse",spinReverse:"fa-spin-reverse",pulse:"fa-pulse"},MD={left:"fa-pull-left",right:"fa-pull-right"},jD={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},BD={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Gr={border:"fa-border",fixedWidth:"fa-fw",flip:"fa-flip",flipHorizontal:"fa-flip-horizontal",flipVertical:"fa-flip-vertical",inverse:"fa-inverse",rotateBy:"fa-rotate-by",swapOpacity:"fa-swap-opacity",widthAuto:"fa-width-auto"};function FD(e){const t=Jo.cssPrefix||Jo.familyPrefix||ko;return t===ko?e:e.replace(new RegExp(String.raw`(?<=^|\s)${ko}-`,"g"),`${t}-`)}function zD(e){const{beat:t,fade:r,beatFade:n,bounce:i,shake:s,spin:a,spinPulse:o,spinReverse:l,pulse:c,fixedWidth:h,inverse:u,border:m,flip:v,size:w,rotation:_,pull:g,swapOpacity:d,rotateBy:f,widthAuto:p,className:y}=e,S=[];return y&&S.push(...y.split(" ")),t&&S.push(Kr.beat),r&&S.push(Kr.fade),n&&S.push(Kr.beatFade),i&&S.push(Kr.bounce),s&&S.push(Kr.shake),a&&S.push(Kr.spin),l&&S.push(Kr.spinReverse),o&&S.push(Kr.spinPulse),c&&S.push(Kr.pulse),h&&S.push(Gr.fixedWidth),u&&S.push(Gr.inverse),m&&S.push(Gr.border),v===!0&&S.push(Gr.flip),(v==="horizontal"||v==="both")&&S.push(Gr.flipHorizontal),(v==="vertical"||v==="both")&&S.push(Gr.flipVertical),w!=null&&S.push(BD[w]),_!=null&&_!==0&&S.push(jD[_]),g!=null&&S.push(MD[g]),d&&S.push(Gr.swapOpacity),OD?(f&&S.push(Gr.rotateBy),p&&S.push(Gr.widthAuto),(Jo.cssPrefix||Jo.familyPrefix||ko)===ko?S:S.map(FD)):S}var $D=e=>typeof e=="object"&&"icon"in e&&!!e.icon;function S_(e){if(e)return $D(e)?e:Tb.icon(e)}function UD(e){return Object.keys(e)}var C_=new ND("FontAwesomeIcon"),Nb={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},HD=new Set(Object.keys(Nb)),Be=Tc.forwardRef((e,t)=>{const r={...Nb,...e},{icon:n,mask:i,symbol:s,title:a,titleId:o,maskId:l,transform:c}=r,h=b_(l,!!i),u=b_(o,!!a),m=S_(n);if(!m)return C_.error("Icon lookup is undefined",n),null;const v=zD(r),w=typeof c=="string"?Tb.transform(c):c,_=S_(i),g=AD(m,{...v.length>0&&{classes:v},...w&&{transform:w},..._&&{mask:_},symbol:s,title:a,titleId:u,maskId:h});if(!g)return C_.error("Could not find icon",m),null;const{abstract:d}=g,f={ref:t};for(const p of UD(r))HD.has(p)||(f[p]=r[p]);return ID(d[0],f)});Be.displayName="FontAwesomeIcon";/*!
616
- * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
617
- * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
618
- * Copyright 2025 Fonticons, Inc.
619
- */var Rz={prefix:"fas",iconName:"file-circle-plus",icon:[576,512,[58606],"e494","M96 0C60.7 0 32 28.7 32 64l0 384c0 35.3 28.7 64 64 64l180 0c-22.7-31.5-36-70.2-36-112 0-100.6 77.4-183.2 176-191.3l0-38.1c0-17-6.7-33.3-18.7-45.3L290.7 18.7C278.7 6.7 262.5 0 245.5 0L96 0zM357.5 176L264 176c-13.3 0-24-10.7-24-24L240 58.5 357.5 176zM432 544a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm16-208l0 48 48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 0-48c0-8.8 7.2-16 16-16s16 7.2 16 16z"]},WD={prefix:"fas",iconName:"code-branch",icon:[448,512,[],"f126","M80 104a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm80-24c0 32.8-19.7 61-48 73.3l0 70.7 176 0c26.5 0 48-21.5 48-48l0-22.7c-28.3-12.3-48-40.5-48-73.3 0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3l0 22.7c0 61.9-50.1 112-112 112l-176 0 0 70.7c28.3 12.3 48 40.5 48 73.3 0 44.2-35.8 80-80 80S0 476.2 0 432c0-32.8 19.7-61 48-73.3l0-205.3C19.7 141 0 112.8 0 80 0 35.8 35.8 0 80 0s80 35.8 80 80zm232 0a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM80 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"]},VD={prefix:"fas",iconName:"key",icon:[512,512,[128273],"f084","M336 352c97.2 0 176-78.8 176-176S433.2 0 336 0 160 78.8 160 176c0 18.7 2.9 36.8 8.3 53.7L7 391c-4.5 4.5-7 10.6-7 17l0 80c0 13.3 10.7 24 24 24l80 0c13.3 0 24-10.7 24-24l0-40 40 0c13.3 0 24-10.7 24-24l0-40 40 0c6.4 0 12.5-2.5 17-7l33.3-33.3c16.9 5.4 35 8.3 53.7 8.3zM376 96a40 40 0 1 1 0 80 40 40 0 1 1 0-80z"]},KD={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8-79.3 23.6-137.1 97.1-137.1 184.1 0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256 512 397.4 397.4 512 256 512S0 397.4 0 256c0-116 77.1-213.9 182.9-245.4 16.9-5 34.8 4.6 39.8 21.5z"]},Oz={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L368 46.1 465.9 144 490.3 119.6c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L432 177.9 334.1 80 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"]},GD={prefix:"fas",iconName:"circle-half-stroke",icon:[512,512,[9680,"adjust"],"f042","M448 256c0-106-86-192-192-192l0 384c106 0 192-86 192-192zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},qD={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},YD={prefix:"fas",iconName:"broom",icon:[576,512,[129529],"f51a","M566.6 54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192-34.7-34.7c-4.2-4.2-10-6.6-16-6.6-12.5 0-22.6 10.1-22.6 22.6l0 29.1 108.3 108.3 29.1 0c12.5 0 22.6-10.1 22.6-22.6 0-6-2.4-11.8-6.6-16l-34.7-34.7 192-192zM341.1 353.4L222.6 234.9c-42.7-3.7-85.2 11.7-115.8 42.3l-8 8c-22.3 22.3-34.8 52.5-34.8 84 0 6.8 7.1 11.2 13.2 8.2l51.1-25.5c5-2.5 9.5 4.1 5.4 7.9L7.3 473.4C2.7 477.6 0 483.6 0 489.9 0 502.1 9.9 512 22.1 512l173.3 0c38.8 0 75.9-15.4 103.4-42.8 30.6-30.6 45.9-73.1 42.3-115.8z"]},JD={prefix:"fas",iconName:"code",icon:[576,512,[],"f121","M360.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm64.6 136.1c-12.5 12.5-12.5 32.8 0 45.3l73.4 73.4-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0zm-274.7 0c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 150.6 182.6c12.5-12.5 12.5-32.8 0-45.3z"]},XD={prefix:"fas",iconName:"terminal",icon:[512,512,[],"f120","M9.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L146.7 256 9.4 118.6zM224 384l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]},k_={prefix:"fas",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},Rb={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M195.1 9.5C198.1-5.3 211.2-16 226.4-16l59.8 0c15.2 0 28.3 10.7 31.3 25.5L332 79.5c14.1 6 27.3 13.7 39.3 22.8l67.8-22.5c14.4-4.8 30.2 1.2 37.8 14.4l29.9 51.8c7.6 13.2 4.9 29.8-6.5 39.9L447 233.3c.9 7.4 1.3 15 1.3 22.7s-.5 15.3-1.3 22.7l53.4 47.5c11.4 10.1 14 26.8 6.5 39.9l-29.9 51.8c-7.6 13.1-23.4 19.2-37.8 14.4l-67.8-22.5c-12.1 9.1-25.3 16.7-39.3 22.8l-14.4 69.9c-3.1 14.9-16.2 25.5-31.3 25.5l-59.8 0c-15.2 0-28.3-10.7-31.3-25.5l-14.4-69.9c-14.1-6-27.2-13.7-39.3-22.8L73.5 432.3c-14.4 4.8-30.2-1.2-37.8-14.4L5.8 366.1c-7.6-13.2-4.9-29.8 6.5-39.9l53.4-47.5c-.9-7.4-1.3-15-1.3-22.7s.5-15.3 1.3-22.7L12.3 185.8c-11.4-10.1-14-26.8-6.5-39.9L35.7 94.1c7.6-13.2 23.4-19.2 37.8-14.4l67.8 22.5c12.1-9.1 25.3-16.7 39.3-22.8L195.1 9.5zM256.3 336a80 80 0 1 0 -.6-160 80 80 0 1 0 .6 160z"]},Ob={prefix:"fas",iconName:"right-from-bracket",icon:[512,512,["sign-out-alt"],"f2f5","M505 273c9.4-9.4 9.4-24.6 0-33.9L361 95c-6.9-6.9-17.2-8.9-26.2-5.2S320 102.3 320 112l0 80-112 0c-26.5 0-48 21.5-48 48l0 32c0 26.5 21.5 48 48 48l112 0 0 80c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2L505 273zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"]},QD={prefix:"fas",iconName:"paperclip",icon:[512,512,[128206],"f0c6","M224.6 12.8c56.2-56.2 147.4-56.2 203.6 0s56.2 147.4 0 203.6l-164 164c-34.4 34.4-90.1 34.4-124.5 0s-34.4-90.1 0-124.5L292.5 103.3c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L185 301.3c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l164-164c31.2-31.2 31.2-81.9 0-113.1s-81.9-31.2-113.1 0l-164 164c-53.1 53.1-53.1 139.2 0 192.3s139.2 53.1 192.3 0L428.3 284.3c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L343.4 459.6c-78.1 78.1-204.7 78.1-282.8 0s-78.1-204.7 0-282.8l164-164z"]},Mz={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M136.7 5.9C141.1-7.2 153.3-16 167.1-16l113.9 0c13.8 0 26 8.8 30.4 21.9L320 32 416 32c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 8.7-26.1zM32 144l384 0 0 304c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-304zm88 64c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24z"]},fd={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},x_={prefix:"fas",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M224 248a120 120 0 1 0 0-240 120 120 0 1 0 0 240zm-29.7 56C95.8 304 16 383.8 16 482.3 16 498.7 29.3 512 45.7 512l356.6 0c16.4 0 29.7-13.3 29.7-29.7 0-98.5-79.8-178.3-178.3-178.3l-59.4 0z"]},si={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},E_={prefix:"fas",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M0 64C0 28.7 28.7 0 64 0L213.5 0c17 0 33.3 6.7 45.3 18.7L365.3 125.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm208-5.5l0 93.5c0 13.3 10.7 24 24 24L325.5 176 208 58.5zM120 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]},ZD={prefix:"fas",iconName:"comments",icon:[576,512,[128490,61670],"f086","M384 144c0 97.2-86 176-192 176-26.7 0-52.1-5-75.2-14L35.2 349.2c-9.3 4.9-20.7 3.2-28.2-4.2s-9.2-18.9-4.2-28.2l35.6-67.2C14.3 220.2 0 183.6 0 144 0 46.8 86-32 192-32S384 46.8 384 144zm0 368c-94.1 0-172.4-62.1-188.8-144 120-1.5 224.3-86.9 235.8-202.7 83.3 19.2 145 88.3 145 170.7 0 39.6-14.3 76.2-38.4 105.6l35.6 67.2c4.9 9.3 3.2 20.7-4.2 28.2s-18.9 9.2-28.2 4.2L459.2 498c-23.1 9-48.5 14-75.2 14z"]},e6={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},t6={prefix:"fas",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M256 480c141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240c0 54.3 19.2 104.3 51.6 144.5L2.8 476.8c-4.8 9-3.3 20 3.6 27.5s17.8 9.8 27.1 5.8l118.4-50.7C183.7 472.6 218.9 480 256 480zM128 208a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},r6={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 0c14.7 0 28.2 8.1 35.2 21l216 400c6.7 12.4 6.4 27.4-.8 39.5S486.1 480 472 480L40 480c-14.1 0-27.2-7.4-34.4-19.5s-7.5-27.1-.8-39.5l216-400c7-12.9 20.5-21 35.2-21zm0 352a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.5 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},jz={prefix:"fas",iconName:"folder-plus",icon:[512,512,[],"f65e","M512 384c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l138.7 0c13.8 0 27.3 4.5 38.4 12.8l38.4 28.8c5.5 4.2 12.3 6.4 19.2 6.4L448 80c35.3 0 64 28.7 64 64l0 240zM256 160c-13.3 0-24 10.7-24 24l0 48-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0 0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48 48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-48c0-13.3-10.7-24-24-24z"]},n6={prefix:"fas",iconName:"tower-broadcast",icon:[576,512,["broadcast-tower"],"f519","M87.9 11.5c-11.3-6.9-26.1-3.2-33 8.1-24.8 41-39 89.1-39 140.4s14.2 99.4 39 140.4c6.9 11.3 21.6 15 33 8.1s15-21.6 8.1-33C75.7 241.9 64 202.3 64 160S75.7 78.1 96.1 44.4c6.9-11.3 3.2-26.1-8.1-33zm400.1 0c-11.3 6.9-15 21.6-8.1 33 20.4 33.7 32.1 73.3 32.1 115.6s-11.7 81.9-32.1 115.6c-6.9 11.3-3.2 26.1 8.1 33s26.1 3.2 33-8.1c24.8-41 39-89.1 39-140.4S545.8 60.6 521 19.6c-6.9-11.3-21.6-15-33-8.1zM320 215.4c19.1-11.1 32-31.7 32-55.4 0-35.3-28.7-64-64-64s-64 28.7-64 64c0 23.7 12.9 44.4 32 55.4L256 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-264.6zM180.2 91c7.2-11.2 3.9-26-7.2-33.2s-26-3.9-33.2 7.2c-17.6 27.4-27.8 60-27.8 95s10.2 67.6 27.8 95c7.2 11.2 22 14.4 33.2 7.2s14.4-22 7.2-33.2c-12.8-19.9-20.2-43.6-20.2-69s7.4-49.1 20.2-69zM436.2 65c-7.2-11.2-22-14.4-33.2-7.2s-14.4 22-7.2 33.2c12.8 19.9 20.2 43.6 20.2 69s-7.4 49.1-20.2 69c-7.2 11.2-3.9 26 7.2 33.2s26 3.9 33.2-7.2c17.6-27.4 27.8-60 27.8-95s-10.2-67.6-27.8-95z"]},Bz={prefix:"fas",iconName:"arrow-left",icon:[512,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288 480 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-370.7 0 105.4-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},bc={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 160-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0 0-160z"]},hd={prefix:"fas",iconName:"copy",icon:[448,512,[],"f0c5","M192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-200.6c0-17.4-7.1-34.1-19.7-46.2L370.6 17.8C358.7 6.4 342.8 0 326.3 0L192 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-64 0 0 16-192 0 0-256 16 0 0-64-16 0z"]},Fz={prefix:"fas",iconName:"arrows-rotate",icon:[512,512,[128472,"refresh","sync"],"f021","M65.9 228.5c13.3-93 93.4-164.5 190.1-164.5 53 0 101 21.5 135.8 56.2 .2 .2 .4 .4 .6 .6l7.6 7.2-47.9 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 53.4-11.3-10.7C390.5 28.6 326.5 0 256 0 127 0 20.3 95.4 2.6 219.5 .1 237 12.2 253.2 29.7 255.7s33.7-9.7 36.2-27.1zm443.5 64c2.5-17.5-9.7-33.7-27.1-36.2s-33.7 9.7-36.2 27.1c-13.3 93-93.4 164.5-190.1 164.5-53 0-101-21.5-135.8-56.2-.2-.2-.4-.4-.6-.6l-7.6-7.2 47.9 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 320c-8.5 0-16.7 3.4-22.7 9.5S-.1 343.7 0 352.3l1 127c.1 17.7 14.6 31.9 32.3 31.7S65.2 496.4 65 478.7l-.4-51.5 10.7 10.1c46.3 46.1 110.2 74.7 180.7 74.7 129 0 235.7-95.4 253.4-219.5z"]},i6={prefix:"fas",iconName:"folder-tree",icon:[576,512,[],"f802","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 392c0 30.9 25.1 56 56 56l184 0 0-48-184 0c-4.4 0-8-3.6-8-8l0-232 192 0 0-48-192 0 0-88zM336 224l192 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-82.7 0c-8.5 0-16.6-3.4-22.6-9.4l-8.6-8.6c-9-9-21.2-14.1-33.9-14.1L336 0c-26.5 0-48 21.5-48 48l0 128c0 26.5 21.5 48 48 48zm0 288l192 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-82.7 0c-8.5 0-16.6-3.4-22.6-9.4l-8.6-8.6c-9-9-21.2-14.1-33.9-14.1L336 288c-26.5 0-48 21.5-48 48l0 128c0 26.5 21.5 48 48 48z"]},s6={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M64 160l64 0 0-64-64 0 0 64zM0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 416l64 0 0-64-64 0 0 64zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zM320 96l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zM288 352a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm96 32c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm32-96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm-32 32a32 32 0 1 1 -64 0 32 32 0 1 1 64 0z"]},o6={prefix:"fas",iconName:"code-compare",icon:[512,512,[],"e13a","M198.8 1.8c9-3.7 19.3-1.7 26.2 5.2l56 56c9.4 9.4 9.4 24.6 0 33.9l-56 56c-6.9 6.9-17.2 8.9-26.2 5.2S184 145.7 184 136l0-24-24 0c-17.7 0-32 14.3-32 32l0 214.7c28.3 12.3 48 40.5 48 73.3 0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3L64 144c0-53 43-96 96-96l24 0 0-24c0-9.7 5.8-18.5 14.8-22.2zM392 80a24 24 0 1 0 48 0 24 24 0 1 0 -48 0zm-8 73.3c-28.3-12.3-48-40.5-48-73.3 0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3L448 368c0 53-43 96-96 96l-24 0 0 24c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-56-56c-9.4-9.4-9.4-24.6 0-33.9l56-56c6.9-6.9 17.2-8.9 26.2-5.2S328 366.3 328 376l0 24 24 0c17.7 0 32-14.3 32-32l0-214.7zM72 432a24 24 0 1 0 48 0 24 24 0 1 0 -48 0z"]},a6={prefix:"fas",iconName:"dice",icon:[512,512,[127922],"f522","M141.4 2.3C103-8 63.5 14.8 53.3 53.2L2.5 242.7C-7.8 281.1 15 320.6 53.4 330.9l189.5 50.8c38.4 10.3 77.9-12.5 88.2-50.9l50.8-189.5c10.3-38.4-12.5-77.9-50.9-88.2L141.4 2.3zm23 205.7a32 32 0 1 1 55.4-32 32 32 0 1 1 -55.4 32zM79.2 220.3a32 32 0 1 1 32 55.4 32 32 0 1 1 -32-55.4zm185 96.4a32 32 0 1 1 -32-55.4 32 32 0 1 1 32 55.4zm9-208.4a32 32 0 1 1 32 55.4 32 32 0 1 1 -32-55.4zm-121 14.4a32 32 0 1 1 -32-55.4 32 32 0 1 1 32 55.4zM418 192L377.4 343.2c-17.2 64-83 102-147 84.9l-38.3-10.3 0 30.2c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64L418 192z"]};function l6(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const c6=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u6=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,f6={};function A_(e,t){return(f6.jsx?u6:c6).test(e)}const h6=/[ \t\n\f\r]/g;function d6(e){return typeof e=="object"?e.type==="text"?L_(e.value):!1:L_(e)}function L_(e){return e.replace(h6,"")===""}class ha{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}ha.prototype.normal={};ha.prototype.property={};ha.prototype.space=void 0;function Mb(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new ha(r,n,t)}function dd(e){return e.toLowerCase()}class Jt{constructor(t,r){this.attribute=r,this.property=t}}Jt.prototype.attribute="";Jt.prototype.booleanish=!1;Jt.prototype.boolean=!1;Jt.prototype.commaOrSpaceSeparated=!1;Jt.prototype.commaSeparated=!1;Jt.prototype.defined=!1;Jt.prototype.mustUseProperty=!1;Jt.prototype.number=!1;Jt.prototype.overloadedBoolean=!1;Jt.prototype.property="";Jt.prototype.spaceSeparated=!1;Jt.prototype.space=void 0;let p6=0;const Re=Ci(),vt=Ci(),pd=Ci(),pe=Ci(),tt=Ci(),ls=Ci(),Zt=Ci();function Ci(){return 2**++p6}const md=Object.freeze(Object.defineProperty({__proto__:null,boolean:Re,booleanish:vt,commaOrSpaceSeparated:Zt,commaSeparated:ls,number:pe,overloadedBoolean:pd,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),Sf=Object.keys(md);class qp extends Jt{constructor(t,r,n,i){let s=-1;if(super(t,r),P_(this,"space",i),typeof n=="number")for(;++s<Sf.length;){const a=Sf[s];P_(this,Sf[s],(n&md[a])===md[a])}}}qp.prototype.defined=!0;function P_(e,t,r){r&&(e[t]=r)}function Es(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const s=new qp(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),t[n]=s,r[dd(n)]=n,r[dd(s.attribute)]=n}return new ha(t,r,e.space)}const jb=Es({properties:{ariaActiveDescendant:null,ariaAtomic:vt,ariaAutoComplete:null,ariaBusy:vt,ariaChecked:vt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:tt,ariaCurrent:null,ariaDescribedBy:tt,ariaDetails:null,ariaDisabled:vt,ariaDropEffect:tt,ariaErrorMessage:null,ariaExpanded:vt,ariaFlowTo:tt,ariaGrabbed:vt,ariaHasPopup:null,ariaHidden:vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tt,ariaLevel:pe,ariaLive:null,ariaModal:vt,ariaMultiLine:vt,ariaMultiSelectable:vt,ariaOrientation:null,ariaOwns:tt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:vt,ariaReadOnly:vt,ariaRelevant:null,ariaRequired:vt,ariaRoleDescription:tt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:vt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Bb(e,t){return t in e?e[t]:t}function Fb(e,t){return Bb(e,t.toLowerCase())}const m6=Es({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ls,acceptCharset:tt,accessKey:tt,action:null,allow:null,allowFullScreen:Re,allowPaymentRequest:Re,allowUserMedia:Re,alt:null,as:null,async:Re,autoCapitalize:null,autoComplete:tt,autoFocus:Re,autoPlay:Re,blocking:tt,capture:null,charSet:null,checked:Re,cite:null,className:tt,cols:pe,colSpan:null,content:null,contentEditable:vt,controls:Re,controlsList:tt,coords:pe|ls,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Re,defer:Re,dir:null,dirName:null,disabled:Re,download:pd,draggable:vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Re,formTarget:null,headers:tt,height:pe,hidden:pd,high:pe,href:null,hrefLang:null,htmlFor:tt,httpEquiv:tt,id:null,imageSizes:null,imageSrcSet:null,inert:Re,inputMode:null,integrity:null,is:null,isMap:Re,itemId:null,itemProp:tt,itemRef:tt,itemScope:Re,itemType:tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Re,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:Re,muted:Re,name:null,nonce:null,noModule:Re,noValidate:Re,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Re,optimum:pe,pattern:null,ping:tt,placeholder:null,playsInline:Re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Re,referrerPolicy:null,rel:tt,required:Re,reversed:Re,rows:pe,rowSpan:pe,sandbox:tt,scope:null,scoped:Re,seamless:Re,selected:Re,shadowRootClonable:Re,shadowRootDelegatesFocus:Re,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:Re,useMap:null,value:vt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Re,declare:Re,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:Re,noHref:Re,noShade:Re,noWrap:Re,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:vt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Re,disableRemotePlayback:Re,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:Fb}),g6=Es({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Zt,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:tt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:Re,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ls,g2:ls,glyphName:ls,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Zt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zt,rev:Zt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zt,requiredFeatures:Zt,requiredFonts:Zt,requiredFormats:Zt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Zt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zt,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Bb}),zb=Es({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),$b=Es({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Fb}),Ub=Es({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),v6={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},_6=/[A-Z]/g,T_=/-[a-z]/g,y6=/^data[-\w.:]+$/i;function w6(e,t){const r=dd(t);let n=t,i=Jt;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&y6.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(T_,S6);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!T_.test(s)){let a=s.replace(_6,b6);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=qp}return new i(n,t)}function b6(e){return"-"+e.toLowerCase()}function S6(e){return e.charAt(1).toUpperCase()}const C6=Mb([jb,m6,zb,$b,Ub],"html"),Yp=Mb([jb,g6,zb,$b,Ub],"svg");function k6(e){return e.join(" ").trim()}var Jp={},D_=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,x6=/\n/g,E6=/^\s*/,A6=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,L6=/^:\s*/,P6=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,T6=/^[;\s]*/,D6=/^\s+|\s+$/g,I6=`
620
- `,I_="/",N_="*",ei="",N6="comment",R6="declaration";function O6(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(w){var _=w.match(x6);_&&(r+=_.length);var g=w.lastIndexOf(I6);n=~g?w.length-g:n+w.length}function s(){var w={line:r,column:n};return function(_){return _.position=new a(w),c(),_}}function a(w){this.start=w,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function o(w){var _=new Error(t.source+":"+r+":"+n+": "+w);if(_.reason=w,_.filename=t.source,_.line=r,_.column=n,_.source=e,!t.silent)throw _}function l(w){var _=w.exec(e);if(_){var g=_[0];return i(g),e=e.slice(g.length),_}}function c(){l(E6)}function h(w){var _;for(w=w||[];_=u();)_!==!1&&w.push(_);return w}function u(){var w=s();if(!(I_!=e.charAt(0)||N_!=e.charAt(1))){for(var _=2;ei!=e.charAt(_)&&(N_!=e.charAt(_)||I_!=e.charAt(_+1));)++_;if(_+=2,ei===e.charAt(_-1))return o("End of comment missing");var g=e.slice(2,_-2);return n+=2,i(g),e=e.slice(_),n+=2,w({type:N6,comment:g})}}function m(){var w=s(),_=l(A6);if(_){if(u(),!l(L6))return o("property missing ':'");var g=l(P6),d=w({type:R6,property:R_(_[0].replace(D_,ei)),value:g?R_(g[0].replace(D_,ei)):ei});return l(T6),d}}function v(){var w=[];h(w);for(var _;_=m();)_!==!1&&(w.push(_),h(w));return w}return c(),v()}function R_(e){return e?e.replace(D6,ei):ei}var M6=O6,j6=Kl&&Kl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jp,"__esModule",{value:!0});Jp.default=F6;const B6=j6(M6);function F6(e,t){let r=null;if(!e||typeof e!="string")return r;const n=(0,B6.default)(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(r=r||{},r[a]=o)}),r}var ru={};Object.defineProperty(ru,"__esModule",{value:!0});ru.camelCase=void 0;var z6=/^--[a-zA-Z0-9_-]+$/,$6=/-([a-z])/g,U6=/^[^-]+$/,H6=/^-(webkit|moz|ms|o|khtml)-/,W6=/^-(ms)-/,V6=function(e){return!e||U6.test(e)||z6.test(e)},K6=function(e,t){return t.toUpperCase()},O_=function(e,t){return"".concat(t,"-")},G6=function(e,t){return t===void 0&&(t={}),V6(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(W6,O_):e=e.replace(H6,O_),e.replace($6,K6))};ru.camelCase=G6;var q6=Kl&&Kl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Y6=q6(Jp),J6=ru;function gd(e,t){var r={};return!e||typeof e!="string"||(0,Y6.default)(e,function(n,i){n&&i&&(r[(0,J6.camelCase)(n,t)]=i)}),r}gd.default=gd;var X6=gd;const Q6=Lc(X6),Hb=Wb("end"),Xp=Wb("start");function Wb(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Z6(e){const t=Xp(e),r=Hb(e);if(t&&r)return{start:t,end:r}}function xo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?M_(e.position):"start"in e||"end"in e?M_(e):"line"in e||"column"in e?vd(e):""}function vd(e){return j_(e&&e.line)+":"+j_(e&&e.column)}function M_(e){return vd(e&&e.start)+"-"+vd(e&&e.end)}function j_(e){return e&&typeof e=="number"?e:1}class Mt extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",s={},a=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?s.ruleId=n:(s.source=n.slice(0,l),s.ruleId=n.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=xo(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Mt.prototype.file="";Mt.prototype.name="";Mt.prototype.reason="";Mt.prototype.message="";Mt.prototype.stack="";Mt.prototype.column=void 0;Mt.prototype.line=void 0;Mt.prototype.ancestors=void 0;Mt.prototype.cause=void 0;Mt.prototype.fatal=void 0;Mt.prototype.place=void 0;Mt.prototype.ruleId=void 0;Mt.prototype.source=void 0;const Qp={}.hasOwnProperty,eI=new Map,tI=/[A-Z]/g,rI=new Set(["table","tbody","thead","tfoot","tr"]),nI=new Set(["td","th"]),Vb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function iI(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=hI(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=fI(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Yp:C6,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Kb(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Kb(e,t,r){if(t.type==="element")return sI(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return oI(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return lI(e,t,r);if(t.type==="mdxjsEsm")return aI(e,t);if(t.type==="root")return cI(e,t,r);if(t.type==="text")return uI(e,t)}function sI(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=Yp,e.schema=i),e.ancestors.push(t);const s=qb(e,t.tagName,!1),a=dI(e,t);let o=em(e,t);return rI.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!d6(l):!0})),Gb(e,a,s,t),Zp(a,o),e.ancestors.pop(),e.schema=n,e.create(t,s,a,r)}function oI(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Xo(e,t.position)}function aI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xo(e,t.position)}function lI(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=Yp,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:qb(e,t.name,!0),a=pI(e,t),o=em(e,t);return Gb(e,a,s,t),Zp(a,o),e.ancestors.pop(),e.schema=n,e.create(t,s,a,r)}function cI(e,t,r){const n={};return Zp(n,em(e,t)),e.create(t,e.Fragment,n,r)}function uI(e,t){return t.value}function Gb(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Zp(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function fI(e,t,r){return n;function n(i,s,a,o){const c=Array.isArray(a.children)?r:t;return o?c(s,a,o):c(s,a)}}function hI(e,t){return r;function r(n,i,s,a){const o=Array.isArray(s.children),l=Xp(n);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function dI(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&Qp.call(t.properties,i)){const s=mI(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&nI.has(t.tagName)?n=o:r[a]=o}}if(n){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function pI(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const s=n.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else Xo(e,t.position);else{const i=n.name;let s;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const o=n.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else Xo(e,t.position);else s=n.value===null?!0:n.value;r[i]=s}return r}function em(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:eI;for(;++n<t.children.length;){const s=t.children[n];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const o=Kb(e,s,a);o!==void 0&&r.push(o)}return r}function mI(e,t,r){const n=w6(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?l6(r):k6(r)),n.property==="style"){let i=typeof r=="object"?r:gI(e,String(r));return e.stylePropertyNameCase==="css"&&(i=vI(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?v6[n.property]||n.property:n.attribute,r]}}function gI(e,t){try{return Q6(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new Mt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Vb+"#cannot-parse-style-attribute",i}}function qb(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=A_(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}n=a}else n=A_(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return Qp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);Xo(e)}function Xo(e,t){const r=new Mt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Vb+"#cannot-handle-mdx-estrees-without-createevaluater",r}function vI(e){const t={};let r;for(r in e)Qp.call(e,r)&&(t[_I(r)]=e[r]);return t}function _I(e){let t=e.replace(tI,yI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function yI(e){return"-"+e.toLowerCase()}const Cf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},wI={};function tm(e,t){const r=wI,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Yb(e,n,i)}function Yb(e,t,r){if(bI(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return B_(e.children,t,r)}return Array.isArray(e)?B_(e,t,r):""}function B_(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=Yb(e[i],t,r);return n.join("")}function bI(e){return!!(e&&typeof e=="object")}const F_=document.createElement("i");function rm(e){const t="&"+e+";";F_.innerHTML=t;const r=F_.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function ir(e,t,r,n){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);s<n.length;)a=n.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function dr(e,t){return e.length>0?(ir(e,e.length,0,t),e):t}const z_={}.hasOwnProperty;function Jb(e){const t={};let r=-1;for(;++r<e.length;)SI(t,e[r]);return t}function SI(e,t){let r;for(r in t){const i=(z_.call(e,r)?e[r]:void 0)||(e[r]={}),s=t[r];let a;if(s)for(a in s){z_.call(i,a)||(i[a]=[]);const o=s[a];CI(i[a],Array.isArray(o)?o:o?[o]:[])}}}function CI(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);ir(e,0,0,n)}function Xb(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Ar(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Bt=Gn(/[A-Za-z]/),Rt=Gn(/[\dA-Za-z]/),kI=Gn(/[#-'*+\--9=?A-Z^-~]/);function Sc(e){return e!==null&&(e<32||e===127)}const _d=Gn(/\d/),xI=Gn(/[\dA-Fa-f]/),EI=Gn(/[!-/:-@[-`{-~]/);function Pe(e){return e!==null&&e<-2}function et(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const nu=Gn(new RegExp("\\p{P}|\\p{S}","u")),mi=Gn(/\s/);function Gn(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function As(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const s=e.charCodeAt(r);let a="";if(s===37&&Rt(e.charCodeAt(r+1))&&Rt(e.charCodeAt(r+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(r+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+i+1,a=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function He(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Fe(l)?(e.enter(r),o(l)):t(l)}function o(l){return Fe(l)&&s++<i?(e.consume(l),o):(e.exit(r),t(l))}}const AI={tokenize:LI};function LI(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),He(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Pe(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const PI={tokenize:TI},$_={tokenize:DI};function TI(e){const t=this,r=[];let n=0,i,s,a;return o;function o(p){if(n<r.length){const y=r[n];return t.containerState=y[1],e.attempt(y[0].continuation,l,c)(p)}return c(p)}function l(p){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&f();const y=t.events.length;let S=y,b;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){b=t.events[S][1].end;break}d(n);let k=y;for(;k<t.events.length;)t.events[k][1].end={...b},k++;return ir(t.events,S+1,0,t.events.slice(y)),t.events.length=k,c(p)}return o(p)}function c(p){if(n===r.length){if(!i)return m(p);if(i.currentConstruct&&i.currentConstruct.concrete)return w(p);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($_,h,u)(p)}function h(p){return i&&f(),d(n),m(p)}function u(p){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,w(p)}function m(p){return t.containerState={},e.attempt($_,v,w)(p)}function v(p){return n++,r.push([t.currentConstruct,t.containerState]),m(p)}function w(p){if(p===null){i&&f(),d(0),e.consume(p);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),_(p)}function _(p){if(p===null){g(e.exit("chunkFlow"),!0),d(0),e.consume(p);return}return Pe(p)?(e.consume(p),g(e.exit("chunkFlow")),n=0,t.interrupt=void 0,o):(e.consume(p),_)}function g(p,y){const S=t.sliceStream(p);if(y&&S.push(null),p.previous=s,s&&(s.next=p),s=p,i.defineSkip(p.start),i.write(S),t.parser.lazy[p.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<a&&(!i.events[b][1].end||i.events[b][1].end.offset>a))return;const k=t.events.length;let C=k,A,P;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(A){P=t.events[C][1].end;break}A=!0}for(d(n),b=k;b<t.events.length;)t.events[b][1].end={...P},b++;ir(t.events,C+1,0,t.events.slice(k)),t.events.length=b}}function d(p){let y=r.length;for(;y-- >p;){const S=r[y];t.containerState=S[1],S[0].exit.call(t,e)}r.length=p}function f(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function DI(e,t,r){return He(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ws(e){if(e===null||et(e)||mi(e))return 1;if(nu(e))return 2}function iu(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!n.includes(s)&&(t=s(t,r),n.push(s))}return t}const yd={name:"attention",resolveAll:II,tokenize:NI};function II(e,t){let r=-1,n,i,s,a,o,l,c,h;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const u={...e[n][1].end},m={...e[r][1].start};U_(u,-l),U_(m,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:m},s={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[r][1].start={...o.end},c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=dr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=dr(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=dr(c,iu(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),c=dr(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(h=2,c=dr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])):h=0,ir(e,n-1,r-n+3,c),r=n+c.length-h-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function NI(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=ws(n);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const c=e.exit("attentionSequence"),h=ws(l),u=!h||h===2&&i||r.includes(l),m=!i||i===2&&h||r.includes(n);return c._open=!!(s===42?u:u&&(i||!m)),c._close=!!(s===42?m:m&&(h||!u)),t(l)}}function U_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const RI={name:"autolink",tokenize:OI};function OI(e,t,r){let n=0;return i;function i(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(v){return Bt(v)?(e.consume(v),a):v===64?r(v):c(v)}function a(v){return v===43||v===45||v===46||Rt(v)?(n=1,o(v)):c(v)}function o(v){return v===58?(e.consume(v),n=0,l):(v===43||v===45||v===46||Rt(v))&&n++<32?(e.consume(v),o):(n=0,c(v))}function l(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Sc(v)?r(v):(e.consume(v),l)}function c(v){return v===64?(e.consume(v),h):kI(v)?(e.consume(v),c):r(v)}function h(v){return Rt(v)?u(v):r(v)}function u(v){return v===46?(e.consume(v),n=0,h):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):m(v)}function m(v){if((v===45||Rt(v))&&n++<63){const w=v===45?m:u;return e.consume(v),w}return r(v)}}const da={partial:!0,tokenize:MI};function MI(e,t,r){return n;function n(s){return Fe(s)?He(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||Pe(s)?t(s):r(s)}}const Qb={continuation:{tokenize:BI},exit:FI,name:"blockQuote",tokenize:jI};function jI(e,t,r){const n=this;return i;function i(a){if(a===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return r(a)}function s(a){return Fe(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function BI(e,t,r){const n=this;return i;function i(a){return Fe(a)?He(e,s,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Qb,t,r)(a)}}function FI(e){e.exit("blockQuote")}const Zb={name:"characterEscape",tokenize:zI};function zI(e,t,r){return n;function n(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return EI(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(s)}}const eS={name:"characterReference",tokenize:$I};function $I(e,t,r){const n=this;let i=0,s,a;return o;function o(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=Rt,h(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=xI,h):(e.enter("characterReferenceValue"),s=7,a=_d,h(u))}function h(u){if(u===59&&i){const m=e.exit("characterReferenceValue");return a===Rt&&!rm(n.sliceSerialize(m))?r(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(u)&&i++<s?(e.consume(u),h):r(u)}}const H_={partial:!0,tokenize:HI},W_={concrete:!0,name:"codeFenced",tokenize:UI};function UI(e,t,r){const n=this,i={partial:!0,tokenize:S};let s=0,a=0,o;return l;function l(b){return c(b)}function c(b){const k=n.events[n.events.length-1];return s=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,o=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(b)}function h(b){return b===o?(a++,e.consume(b),h):a<3?r(b):(e.exit("codeFencedFenceSequence"),Fe(b)?He(e,u,"whitespace")(b):u(b))}function u(b){return b===null||Pe(b)?(e.exit("codeFencedFence"),n.interrupt?t(b):e.check(H_,_,y)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||Pe(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(b)):Fe(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),He(e,v,"whitespace")(b)):b===96&&b===o?r(b):(e.consume(b),m)}function v(b){return b===null||Pe(b)?u(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(b))}function w(b){return b===null||Pe(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(b)):b===96&&b===o?r(b):(e.consume(b),w)}function _(b){return e.attempt(i,y,g)(b)}function g(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),d}function d(b){return s>0&&Fe(b)?He(e,f,"linePrefix",s+1)(b):f(b)}function f(b){return b===null||Pe(b)?e.check(H_,_,y)(b):(e.enter("codeFlowValue"),p(b))}function p(b){return b===null||Pe(b)?(e.exit("codeFlowValue"),f(b)):(e.consume(b),p)}function y(b){return e.exit("codeFenced"),t(b)}function S(b,k,C){let A=0;return P;function P(U){return b.enter("lineEnding"),b.consume(U),b.exit("lineEnding"),O}function O(U){return b.enter("codeFencedFence"),Fe(U)?He(b,R,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):R(U)}function R(U){return U===o?(b.enter("codeFencedFenceSequence"),M(U)):C(U)}function M(U){return U===o?(A++,b.consume(U),M):A>=a?(b.exit("codeFencedFenceSequence"),Fe(U)?He(b,z,"whitespace")(U):z(U)):C(U)}function z(U){return U===null||Pe(U)?(b.exit("codeFencedFence"),k(U)):C(U)}}}function HI(e,t,r){const n=this;return i;function i(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}const kf={name:"codeIndented",tokenize:VI},WI={partial:!0,tokenize:KI};function VI(e,t,r){const n=this;return i;function i(c){return e.enter("codeIndented"),He(e,s,"linePrefix",5)(c)}function s(c){const h=n.events[n.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(c):r(c)}function a(c){return c===null?l(c):Pe(c)?e.attempt(WI,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||Pe(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function KI(e,t,r){const n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):Pe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):He(e,s,"linePrefix",5)(a)}function s(a){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):Pe(a)?i(a):r(a)}}const GI={name:"codeText",previous:YI,resolve:qI,tokenize:JI};function qI(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function YI(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function JI(e,t,r){let n=0,i,s;return a;function a(u){return e.enter("codeText"),e.enter("codeTextSequence"),o(u)}function o(u){return u===96?(e.consume(u),n++,o):(e.exit("codeTextSequence"),l(u))}function l(u){return u===null?r(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),l):u===96?(s=e.enter("codeTextSequence"),i=0,h(u)):Pe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||Pe(u)?(e.exit("codeTextData"),l(u)):(e.consume(u),c)}function h(u){return u===96?(e.consume(u),i++,h):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(s.type="codeTextData",c(u))}}class XI{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&to(this.left,n),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),to(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),to(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);to(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);to(this.left,r.reverse())}}}function to(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function tS(e){const t={};let r=-1,n,i,s,a,o,l,c;const h=new XI(e);for(;++r<h.length;){for(;r in t;)r=t[r];if(n=h.get(r),r&&n[1].type==="chunkFlow"&&h.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,QI(h,r)),r=t[r],c=!0);else if(n[1]._container){for(s=r,i=void 0;s--;)if(a=h.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(n[1].end={...h.get(i)[1].start},o=h.slice(i,r),o.unshift(n),h.splice(i,r-i+1,o))}}return ir(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function QI(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const s=[];let a=r._tokenizer;a||(a=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],c={};let h,u,m=-1,v=r,w=0,_=0;const g=[_];for(;v;){for(;e.get(++i)[1]!==v;);s.push(i),v._tokenizer||(h=n.sliceStream(v),v.next||h.push(null),u&&a.defineSkip(v.start),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=v,v=v.next}for(v=r;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(_=m+1,g.push(_),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(a.events=[],v?(v._tokenizer=void 0,v.previous=void 0):g.pop(),m=g.length;m--;){const d=o.slice(g[m],g[m+1]),f=s.pop();l.push([f,f+d.length-1]),e.splice(f,2,d)}for(l.reverse(),m=-1;++m<l.length;)c[w+l[m][0]]=w+l[m][1],w+=l[m][1]-l[m][0]-1;return c}const ZI={resolve:tN,tokenize:rN},eN={partial:!0,tokenize:nN};function tN(e){return tS(e),e}function rN(e,t){let r;return n;function n(o){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):Pe(o)?e.check(eN,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function nN(e,t,r){const n=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),He(e,s,"linePrefix")}function s(a){if(a===null||Pe(a))return r(a);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function rS(e,t,r,n,i,s,a,o,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return u;function u(d){return d===60?(e.enter(n),e.enter(i),e.enter(s),e.consume(d),e.exit(s),m):d===null||d===32||d===41||Sc(d)?r(d):(e.enter(n),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),_(d))}function m(d){return d===62?(e.enter(s),e.consume(d),e.exit(s),e.exit(i),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),v(d))}function v(d){return d===62?(e.exit("chunkString"),e.exit(o),m(d)):d===null||d===60||Pe(d)?r(d):(e.consume(d),d===92?w:v)}function w(d){return d===60||d===62||d===92?(e.consume(d),v):v(d)}function _(d){return!h&&(d===null||d===41||et(d))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(n),t(d)):h<c&&d===40?(e.consume(d),h++,_):d===41?(e.consume(d),h--,_):d===null||d===32||d===40||Sc(d)?r(d):(e.consume(d),d===92?g:_)}function g(d){return d===40||d===41||d===92?(e.consume(d),_):_(d)}}function nS(e,t,r,n,i,s){const a=this;let o=0,l;return c;function c(v){return e.enter(n),e.enter(i),e.consume(v),e.exit(i),e.enter(s),h}function h(v){return o>999||v===null||v===91||v===93&&!l||v===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?r(v):v===93?(e.exit(s),e.enter(i),e.consume(v),e.exit(i),e.exit(n),t):Pe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),u(v))}function u(v){return v===null||v===91||v===93||Pe(v)||o++>999?(e.exit("chunkString"),h(v)):(e.consume(v),l||(l=!Fe(v)),v===92?m:u)}function m(v){return v===91||v===92||v===93?(e.consume(v),o++,u):u(v)}}function iS(e,t,r,n,i,s){let a;return o;function o(m){return m===34||m===39||m===40?(e.enter(n),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,l):r(m)}function l(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(n),t):(e.enter(s),c(m))}function c(m){return m===a?(e.exit(s),l(a)):m===null?r(m):Pe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),He(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===a||m===null||Pe(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?u:h)}function u(m){return m===a||m===92?(e.consume(m),h):h(m)}}function Eo(e,t){let r;return n;function n(i){return Pe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Fe(i)?He(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const iN={name:"definition",tokenize:oN},sN={partial:!0,tokenize:aN};function oN(e,t,r){const n=this;let i;return s;function s(v){return e.enter("definition"),a(v)}function a(v){return nS.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function o(v){return i=Ar(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),l):r(v)}function l(v){return et(v)?Eo(e,c)(v):c(v)}function c(v){return rS(e,h,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(sN,u,u)(v)}function u(v){return Fe(v)?He(e,m,"whitespace")(v):m(v)}function m(v){return v===null||Pe(v)?(e.exit("definition"),n.parser.defined.push(i),t(v)):r(v)}}function aN(e,t,r){return n;function n(o){return et(o)?Eo(e,i)(o):r(o)}function i(o){return iS(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Fe(o)?He(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Pe(o)?t(o):r(o)}}const lN={name:"hardBreakEscape",tokenize:cN};function cN(e,t,r){return n;function n(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Pe(s)?(e.exit("hardBreakEscape"),t(s)):r(s)}}const uN={name:"headingAtx",resolve:fN,tokenize:hN};function fN(e,t){let r=e.length-2,n=3,i,s;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},s={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},ir(e,n,r-n+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function hN(e,t,r){let n=0;return i;function i(h){return e.enter("atxHeading"),s(h)}function s(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&n++<6?(e.consume(h),a):h===null||et(h)?(e.exit("atxHeadingSequence"),o(h)):r(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),l(h)):h===null||Pe(h)?(e.exit("atxHeading"),t(h)):Fe(h)?He(e,o,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function l(h){return h===35?(e.consume(h),l):(e.exit("atxHeadingSequence"),o(h))}function c(h){return h===null||h===35||et(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),c)}}const dN=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],V_=["pre","script","style","textarea"],pN={concrete:!0,name:"htmlFlow",resolveTo:vN,tokenize:_N},mN={partial:!0,tokenize:wN},gN={partial:!0,tokenize:yN};function vN(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _N(e,t,r){const n=this;let i,s,a,o,l;return c;function c(T){return h(T)}function h(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),u}function u(T){return T===33?(e.consume(T),m):T===47?(e.consume(T),s=!0,_):T===63?(e.consume(T),i=3,n.interrupt?t:L):Bt(T)?(e.consume(T),a=String.fromCharCode(T),g):r(T)}function m(T){return T===45?(e.consume(T),i=2,v):T===91?(e.consume(T),i=5,o=0,w):Bt(T)?(e.consume(T),i=4,n.interrupt?t:L):r(T)}function v(T){return T===45?(e.consume(T),n.interrupt?t:L):r(T)}function w(T){const $="CDATA[";return T===$.charCodeAt(o++)?(e.consume(T),o===$.length?n.interrupt?t:R:w):r(T)}function _(T){return Bt(T)?(e.consume(T),a=String.fromCharCode(T),g):r(T)}function g(T){if(T===null||T===47||T===62||et(T)){const $=T===47,Y=a.toLowerCase();return!$&&!s&&V_.includes(Y)?(i=1,n.interrupt?t(T):R(T)):dN.includes(a.toLowerCase())?(i=6,$?(e.consume(T),d):n.interrupt?t(T):R(T)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(T):s?f(T):p(T))}return T===45||Rt(T)?(e.consume(T),a+=String.fromCharCode(T),g):r(T)}function d(T){return T===62?(e.consume(T),n.interrupt?t:R):r(T)}function f(T){return Fe(T)?(e.consume(T),f):P(T)}function p(T){return T===47?(e.consume(T),P):T===58||T===95||Bt(T)?(e.consume(T),y):Fe(T)?(e.consume(T),p):P(T)}function y(T){return T===45||T===46||T===58||T===95||Rt(T)?(e.consume(T),y):S(T)}function S(T){return T===61?(e.consume(T),b):Fe(T)?(e.consume(T),S):p(T)}function b(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),l=T,k):Fe(T)?(e.consume(T),b):C(T)}function k(T){return T===l?(e.consume(T),l=null,A):T===null||Pe(T)?r(T):(e.consume(T),k)}function C(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||et(T)?S(T):(e.consume(T),C)}function A(T){return T===47||T===62||Fe(T)?p(T):r(T)}function P(T){return T===62?(e.consume(T),O):r(T)}function O(T){return T===null||Pe(T)?R(T):Fe(T)?(e.consume(T),O):r(T)}function R(T){return T===45&&i===2?(e.consume(T),q):T===60&&i===1?(e.consume(T),Q):T===62&&i===4?(e.consume(T),B):T===63&&i===3?(e.consume(T),L):T===93&&i===5?(e.consume(T),I):Pe(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(mN,D,M)(T)):T===null||Pe(T)?(e.exit("htmlFlowData"),M(T)):(e.consume(T),R)}function M(T){return e.check(gN,z,D)(T)}function z(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),U}function U(T){return T===null||Pe(T)?M(T):(e.enter("htmlFlowData"),R(T))}function q(T){return T===45?(e.consume(T),L):R(T)}function Q(T){return T===47?(e.consume(T),a="",H):R(T)}function H(T){if(T===62){const $=a.toLowerCase();return V_.includes($)?(e.consume(T),B):R(T)}return Bt(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),H):R(T)}function I(T){return T===93?(e.consume(T),L):R(T)}function L(T){return T===62?(e.consume(T),B):T===45&&i===2?(e.consume(T),L):R(T)}function B(T){return T===null||Pe(T)?(e.exit("htmlFlowData"),D(T)):(e.consume(T),B)}function D(T){return e.exit("htmlFlow"),t(T)}}function yN(e,t,r){const n=this;return i;function i(a){return Pe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):r(a)}function s(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function wN(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(da,t,r)}}const bN={name:"htmlText",tokenize:SN};function SN(e,t,r){const n=this;let i,s,a;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),c):L===47?(e.consume(L),S):L===63?(e.consume(L),p):Bt(L)?(e.consume(L),C):r(L)}function c(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),s=0,w):Bt(L)?(e.consume(L),f):r(L)}function h(L){return L===45?(e.consume(L),v):r(L)}function u(L){return L===null?r(L):L===45?(e.consume(L),m):Pe(L)?(a=u,Q(L)):(e.consume(L),u)}function m(L){return L===45?(e.consume(L),v):u(L)}function v(L){return L===62?q(L):L===45?m(L):u(L)}function w(L){const B="CDATA[";return L===B.charCodeAt(s++)?(e.consume(L),s===B.length?_:w):r(L)}function _(L){return L===null?r(L):L===93?(e.consume(L),g):Pe(L)?(a=_,Q(L)):(e.consume(L),_)}function g(L){return L===93?(e.consume(L),d):_(L)}function d(L){return L===62?q(L):L===93?(e.consume(L),d):_(L)}function f(L){return L===null||L===62?q(L):Pe(L)?(a=f,Q(L)):(e.consume(L),f)}function p(L){return L===null?r(L):L===63?(e.consume(L),y):Pe(L)?(a=p,Q(L)):(e.consume(L),p)}function y(L){return L===62?q(L):p(L)}function S(L){return Bt(L)?(e.consume(L),b):r(L)}function b(L){return L===45||Rt(L)?(e.consume(L),b):k(L)}function k(L){return Pe(L)?(a=k,Q(L)):Fe(L)?(e.consume(L),k):q(L)}function C(L){return L===45||Rt(L)?(e.consume(L),C):L===47||L===62||et(L)?A(L):r(L)}function A(L){return L===47?(e.consume(L),q):L===58||L===95||Bt(L)?(e.consume(L),P):Pe(L)?(a=A,Q(L)):Fe(L)?(e.consume(L),A):q(L)}function P(L){return L===45||L===46||L===58||L===95||Rt(L)?(e.consume(L),P):O(L)}function O(L){return L===61?(e.consume(L),R):Pe(L)?(a=O,Q(L)):Fe(L)?(e.consume(L),O):A(L)}function R(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),i=L,M):Pe(L)?(a=R,Q(L)):Fe(L)?(e.consume(L),R):(e.consume(L),z)}function M(L){return L===i?(e.consume(L),i=void 0,U):L===null?r(L):Pe(L)?(a=M,Q(L)):(e.consume(L),M)}function z(L){return L===null||L===34||L===39||L===60||L===61||L===96?r(L):L===47||L===62||et(L)?A(L):(e.consume(L),z)}function U(L){return L===47||L===62||et(L)?A(L):r(L)}function q(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):r(L)}function Q(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),H}function H(L){return Fe(L)?He(e,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):I(L)}function I(L){return e.enter("htmlTextData"),a(L)}}const nm={name:"labelEnd",resolveAll:EN,resolveTo:AN,tokenize:LN},CN={tokenize:PN},kN={tokenize:TN},xN={tokenize:DN};function EN(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&ir(e,0,e.length,r),e}function AN(e,t){let r=e.length,n=0,i,s,a,o;for(;r--;)if(i=e[r][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=r);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[s+n+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=dr(o,e.slice(s+1,s+n+3)),o=dr(o,[["enter",h,t]]),o=dr(o,iu(t.parser.constructs.insideSpan.null,e.slice(s+n+4,a-3),t)),o=dr(o,[["exit",h,t],e[a-2],e[a-1],["exit",c,t]]),o=dr(o,e.slice(a+1)),o=dr(o,[["exit",l,t]]),ir(e,s,e.length,o),e}function LN(e,t,r){const n=this;let i=n.events.length,s,a;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){s=n.events[i][1];break}return o;function o(m){return s?s._inactive?u(m):(a=n.parser.defined.includes(Ar(n.sliceSerialize({start:s.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):r(m)}function l(m){return m===40?e.attempt(CN,h,a?h:u)(m):m===91?e.attempt(kN,h,a?c:u)(m):a?h(m):u(m)}function c(m){return e.attempt(xN,h,u)(m)}function h(m){return t(m)}function u(m){return s._balanced=!0,r(m)}}function PN(e,t,r){return n;function n(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return et(u)?Eo(e,s)(u):s(u)}function s(u){return u===41?h(u):rS(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return et(u)?Eo(e,l)(u):h(u)}function o(u){return r(u)}function l(u){return u===34||u===39||u===40?iS(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):h(u)}function c(u){return et(u)?Eo(e,h)(u):h(u)}function h(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):r(u)}}function TN(e,t,r){const n=this;return i;function i(o){return nS.call(n,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return n.parser.defined.includes(Ar(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function a(o){return r(o)}}function DN(e,t,r){return n;function n(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):r(s)}}const IN={name:"labelStartImage",resolveAll:nm.resolveAll,tokenize:NN};function NN(e,t,r){const n=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):r(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const RN={name:"labelStartLink",resolveAll:nm.resolveAll,tokenize:ON};function ON(e,t,r){const n=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}const xf={name:"lineEnding",tokenize:MN};function MN(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),He(e,t,"linePrefix")}}const Fl={name:"thematicBreak",tokenize:jN};function jN(e,t,r){let n=0,i;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):n>=3&&(c===null||Pe(c))?(e.exit("thematicBreak"),t(c)):r(c)}function l(c){return c===i?(e.consume(c),n++,l):(e.exit("thematicBreakSequence"),Fe(c)?He(e,o,"whitespace")(c):o(c))}}const Wt={continuation:{tokenize:$N},exit:HN,name:"list",tokenize:zN},BN={partial:!0,tokenize:WN},FN={partial:!0,tokenize:UN};function zN(e,t,r){const n=this,i=n.events[n.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(v){const w=n.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!n.containerState.marker||v===n.containerState.marker:_d(v)){if(n.containerState.type||(n.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Fl,r,c)(v):c(v);if(!n.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(v)}return r(v)}function l(v){return _d(v)&&++a<10?(e.consume(v),l):(!n.interrupt||a<2)&&(n.containerState.marker?v===n.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),c(v)):r(v)}function c(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||v,e.check(da,n.interrupt?r:h,e.attempt(BN,m,u))}function h(v){return n.containerState.initialBlankLine=!0,s++,m(v)}function u(v){return Fe(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),m):r(v)}function m(v){return n.containerState.size=s+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function $N(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(da,i,s);function i(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,He(e,t,"listItemIndent",n.containerState.size+1)(o)}function s(o){return n.containerState.furtherBlankLines||!Fe(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(FN,t,a)(o))}function a(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,He(e,e.attempt(Wt,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function UN(e,t,r){const n=this;return He(e,i,"listItemIndent",n.containerState.size+1);function i(s){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(s):r(s)}}function HN(e){e.exit(this.containerState.type)}function WN(e,t,r){const n=this;return He(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=n.events[n.events.length-1];return!Fe(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):r(s)}}const K_={name:"setextUnderline",resolveTo:VN,tokenize:KN};function VN(e,t){let r=e.length,n,i,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[n][1],t]),e[n][1].end={...e[s][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function KN(e,t,r){const n=this;let i;return s;function s(c){let h=n.events.length,u;for(;h--;)if(n.events[h][1].type!=="lineEnding"&&n.events[h][1].type!=="linePrefix"&&n.events[h][1].type!=="content"){u=n.events[h][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||u)?(e.enter("setextHeadingLine"),i=c,a(c)):r(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),Fe(c)?He(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Pe(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}const GN={tokenize:qN};function qN(e){const t=this,r=e.attempt(da,n,e.attempt(this.parser.constructs.flowInitial,i,He(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ZI,i)),"linePrefix")));return r;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const YN={resolveAll:oS()},JN=sS("string"),XN=sS("text");function sS(e){return{resolveAll:oS(e==="text"?QN:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],s=r.attempt(i,a,o);return a;function a(h){return c(h)?s(h):o(h)}function o(h){if(h===null){r.consume(h);return}return r.enter("data"),r.consume(h),l}function l(h){return c(h)?(r.exit("data"),s(h)):(r.consume(h),l)}function c(h){if(h===null)return!0;const u=i[h];let m=-1;if(u)for(;++m<u.length;){const v=u[m];if(!v.previous||v.previous.call(n,n.previous))return!0}return!1}}}function oS(e){return t;function t(r,n){let i=-1,s;for(;++i<=r.length;)s===void 0?r[i]&&r[i][1].type==="data"&&(s=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==s+2&&(r[s][1].end=r[i-1][1].end,r.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(r,n):r}}function QN(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let s=i.length,a=-1,o=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(c===-2)l=!0,o++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(o=0),o){const c={type:r===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:n.start._bufferIndex+a,_index:n.start._index+s,line:n.end.line,column:n.end.column-o,offset:n.end.offset-o},end:{...n.end}};n.end={...c.start},n.start.offset===n.end.offset?Object.assign(n,c):(e.splice(r,0,["enter",c,t],["exit",c,t]),r+=2)}r++}return e}const ZN={42:Wt,43:Wt,45:Wt,48:Wt,49:Wt,50:Wt,51:Wt,52:Wt,53:Wt,54:Wt,55:Wt,56:Wt,57:Wt,62:Qb},eR={91:iN},tR={[-2]:kf,[-1]:kf,32:kf},rR={35:uN,42:Fl,45:[K_,Fl],60:pN,61:K_,95:Fl,96:W_,126:W_},nR={38:eS,92:Zb},iR={[-5]:xf,[-4]:xf,[-3]:xf,33:IN,38:eS,42:yd,60:[RI,bN],91:RN,92:[lN,Zb],93:nm,95:yd,96:GI},sR={null:[yd,YN]},oR={null:[42,95]},aR={null:[]},lR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:oR,contentInitial:eR,disable:aR,document:ZN,flow:rR,flowInitial:tR,insideSpan:sR,string:nR,text:iR},Symbol.toStringTag,{value:"Module"}));function cR(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:k(S),check:k(b),consume:f,enter:p,exit:y,interrupt:k(b,{interrupt:!0})},c={code:null,containerState:{},defineSkip:_,events:[],now:w,parser:e,previous:null,sliceSerialize:m,sliceStream:v,write:u};let h=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function u(O){return a=dr(a,O),g(),a[a.length-1]!==null?[]:(C(t,0),c.events=iu(s,c.events,c),c.events)}function m(O,R){return fR(v(O),R)}function v(O){return uR(a,O)}function w(){const{_bufferIndex:O,_index:R,line:M,column:z,offset:U}=n;return{_bufferIndex:O,_index:R,line:M,column:z,offset:U}}function _(O){i[O.line]=O.column,P()}function g(){let O;for(;n._index<a.length;){const R=a[n._index];if(typeof R=="string")for(O=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===O&&n._bufferIndex<R.length;)d(R.charCodeAt(n._bufferIndex));else d(R)}}function d(O){h=h(O)}function f(O){Pe(O)?(n.line++,n.column=1,n.offset+=O===-3?2:1,P()):O!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=O}function p(O,R){const M=R||{};return M.type=O,M.start=w(),c.events.push(["enter",M,c]),o.push(M),M}function y(O){const R=o.pop();return R.end=w(),c.events.push(["exit",R,c]),R}function S(O,R){C(O,R.from)}function b(O,R){R.restore()}function k(O,R){return M;function M(z,U,q){let Q,H,I,L;return Array.isArray(z)?D(z):"tokenize"in z?D([z]):B(z);function B(W){return j;function j(N){const G=N!==null&&W[N],V=N!==null&&W.null,X=[...Array.isArray(G)?G:G?[G]:[],...Array.isArray(V)?V:V?[V]:[]];return D(X)(N)}}function D(W){return Q=W,H=0,W.length===0?q:T(W[H])}function T(W){return j;function j(N){return L=A(),I=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?Y():W.tokenize.call(R?Object.assign(Object.create(c),R):c,l,$,Y)(N)}}function $(W){return O(I,L),U}function Y(W){return L.restore(),++H<Q.length?T(Q[H]):q}}}function C(O,R){O.resolveAll&&!s.includes(O)&&s.push(O),O.resolve&&ir(c.events,R,c.events.length-R,O.resolve(c.events.slice(R),c)),O.resolveTo&&(c.events=O.resolveTo(c.events,c))}function A(){const O=w(),R=c.previous,M=c.currentConstruct,z=c.events.length,U=Array.from(o);return{from:z,restore:q};function q(){n=O,c.previous=R,c.currentConstruct=M,c.events.length=z,o=U,P()}}function P(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function uR(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(r===i)a=[e[r].slice(n,s)];else{if(a=e.slice(r,i),n>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(n):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function fR(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const s=e[r];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
621
- `;break}case-3:{a=`\r
622
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,n.push(a)}return n.join("")}function hR(e){const n={constructs:Jb([lR,...(e||{}).extensions||[]]),content:i(AI),defined:[],document:i(PI),flow:i(GN),lazy:{},string:i(JN),text:i(XN)};return n;function i(s){return a;function a(o){return cR(n,s,o)}}}function dR(e){for(;!tS(e););return e}const G_=/[\0\t\n\r]/g;function pR(){let e=1,t="",r=!0,n;return i;function i(s,a,o){const l=[];let c,h,u,m,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),u=0,t="",r&&(s.charCodeAt(0)===65279&&u++,r=void 0);u<s.length;){if(G_.lastIndex=u,c=G_.exec(s),m=c&&c.index!==void 0?c.index:s.length,v=s.charCodeAt(m),!c){t=s.slice(u);break}if(v===10&&u===m&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),u<m&&(l.push(s.slice(u,m)),e+=m-u),v){case 0:{l.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,l.push(-2);e++<h;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}u=m+1}return o&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}const mR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gR(e){return e.replace(mR,vR)}function vR(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),s=i===120||i===88;return Xb(r.slice(s?2:1),s?16:10)}return rm(r)||e}const aS={}.hasOwnProperty;function _R(e,t,r){return typeof t!="string"&&(r=t,t=void 0),yR(r)(dR(hR(r).document().write(pR()(e,t,!0))))}function yR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ne),autolinkProtocol:A,autolinkEmail:A,atxHeading:s(le),blockQuote:s(V),characterEscape:A,characterReference:A,codeFenced:s(X),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(X,a),codeText:s(ne,a),codeTextData:A,data:A,codeFlowValue:A,definition:s(ue),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ve),hardBreakEscape:s(Se),hardBreakTrailing:s(Se),htmlFlow:s(ye,a),htmlFlowData:A,htmlText:s(ye,a),htmlTextData:A,image:s(Me),label:a,link:s(Ne),listItem:s(Ke),listItemValue:m,listOrdered:s(Ue,u),listUnordered:s(Ue),paragraph:s(Ye),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(le),strong:s(Ee),thematicBreak:s(Ce)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:G,autolinkProtocol:N,blockQuote:l(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:W,characterReference:j,codeFenced:l(g),codeFencedFence:_,codeFencedFenceInfo:v,codeFencedFenceMeta:w,codeFlowValue:P,codeIndented:l(d),codeText:l(U),codeTextData:P,data:P,definition:l(),definitionDestinationString:y,definitionLabelString:f,definitionTitleString:p,emphasis:l(),hardBreakEscape:l(R),hardBreakTrailing:l(R),htmlFlow:l(M),htmlFlowData:P,htmlText:l(z),htmlTextData:P,image:l(Q),label:I,labelText:H,lineEnding:O,link:l(q),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:$,resourceDestinationString:L,resourceTitleString:B,resource:D,setextHeading:l(C),setextHeadingLineSequence:k,setextHeadingText:b,strong:l(),thematicBreak:l()}};lS(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(Z){let se={type:"root",children:[]};const we={stack:[se],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:h,data:r},F=[];let _e=-1;for(;++_e<Z.length;)if(Z[_e][1].type==="listOrdered"||Z[_e][1].type==="listUnordered")if(Z[_e][0]==="enter")F.push(_e);else{const De=F.pop();_e=i(Z,De,_e)}for(_e=-1;++_e<Z.length;){const De=t[Z[_e][0]];aS.call(De,Z[_e][1].type)&&De[Z[_e][1].type].call(Object.assign({sliceSerialize:Z[_e][2].sliceSerialize},we),Z[_e][1])}if(we.tokenStack.length>0){const De=we.tokenStack[we.tokenStack.length-1];(De[1]||q_).call(we,void 0,De[0])}for(se.position={start:vn(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:vn(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)se=t.transforms[_e](se)||se;return se}function i(Z,se,we){let F=se-1,_e=-1,De=!1,ee,Ae,Ie,St;for(;++F<=we;){const ce=Z[F];switch(ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ce[0]==="enter"?_e++:_e--,St=void 0;break}case"lineEndingBlank":{ce[0]==="enter"&&(ee&&!St&&!_e&&!Ie&&(Ie=F),St=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:St=void 0}if(!_e&&ce[0]==="enter"&&ce[1].type==="listItemPrefix"||_e===-1&&ce[0]==="exit"&&(ce[1].type==="listUnordered"||ce[1].type==="listOrdered")){if(ee){let he=F;for(Ae=void 0;he--;){const J=Z[he];if(J[1].type==="lineEnding"||J[1].type==="lineEndingBlank"){if(J[0]==="exit")continue;Ae&&(Z[Ae][1].type="lineEndingBlank",De=!0),J[1].type="lineEnding",Ae=he}else if(!(J[1].type==="linePrefix"||J[1].type==="blockQuotePrefix"||J[1].type==="blockQuotePrefixWhitespace"||J[1].type==="blockQuoteMarker"||J[1].type==="listItemIndent"))break}Ie&&(!Ae||Ie<Ae)&&(ee._spread=!0),ee.end=Object.assign({},Ae?Z[Ae][1].start:ce[1].end),Z.splice(Ae||F,0,["exit",ee,ce[2]]),F++,we++}if(ce[1].type==="listItemPrefix"){const he={type:"listItem",_spread:!1,start:Object.assign({},ce[1].start),end:void 0};ee=he,Z.splice(F,0,["enter",he,ce[2]]),F++,we++,Ie=void 0,St=!0}}}return Z[se][1]._spread=De,we}function s(Z,se){return we;function we(F){o.call(this,Z(F),F),se&&se.call(this,F)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(Z,se,we){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([se,we||void 0]),Z.position={start:vn(se.start),end:void 0}}function l(Z){return se;function se(we){Z&&Z.call(this,we),c.call(this,we)}}function c(Z,se){const we=this.stack.pop(),F=this.tokenStack.pop();if(F)F[0].type!==Z.type&&(se?se.call(this,Z,F[0]):(F[1]||q_).call(this,Z,F[0]));else throw new Error("Cannot close `"+Z.type+"` ("+xo({start:Z.start,end:Z.end})+"): it’s not open");we.position.end=vn(Z.end)}function h(){return tm(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function m(Z){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function v(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.lang=Z}function w(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.meta=Z}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function d(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.value=Z.replace(/(\r?\n|\r)$/g,"")}function f(Z){const se=this.resume(),we=this.stack[this.stack.length-1];we.label=se,we.identifier=Ar(this.sliceSerialize(Z)).toLowerCase()}function p(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.title=Z}function y(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.url=Z}function S(Z){const se=this.stack[this.stack.length-1];if(!se.depth){const we=this.sliceSerialize(Z).length;se.depth=we}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function k(Z){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function A(Z){const we=this.stack[this.stack.length-1].children;let F=we[we.length-1];(!F||F.type!=="text")&&(F=je(),F.position={start:vn(Z.start),end:void 0},we.push(F)),this.stack.push(F)}function P(Z){const se=this.stack.pop();se.value+=this.sliceSerialize(Z),se.position.end=vn(Z.end)}function O(Z){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=se.children[se.children.length-1];we.position.end=vn(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(A.call(this,Z),P.call(this,Z))}function R(){this.data.atHardBreak=!0}function M(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.value=Z}function z(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.value=Z}function U(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.value=Z}function q(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=se,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function Q(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=se,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function H(Z){const se=this.sliceSerialize(Z),we=this.stack[this.stack.length-2];we.label=gR(se),we.identifier=Ar(se).toLowerCase()}function I(){const Z=this.stack[this.stack.length-1],se=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const F=Z.children;we.children=F}else we.alt=se}function L(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.url=Z}function B(){const Z=this.resume(),se=this.stack[this.stack.length-1];se.title=Z}function D(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function $(Z){const se=this.resume(),we=this.stack[this.stack.length-1];we.label=se,we.identifier=Ar(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Y(Z){this.data.characterReferenceType=Z.type}function W(Z){const se=this.sliceSerialize(Z),we=this.data.characterReferenceType;let F;we?(F=Xb(se,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):F=rm(se);const _e=this.stack[this.stack.length-1];_e.value+=F}function j(Z){const se=this.stack.pop();se.position.end=vn(Z.end)}function N(Z){P.call(this,Z);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(Z)}function G(Z){P.call(this,Z);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(Z)}function V(){return{type:"blockquote",children:[]}}function X(){return{type:"code",lang:null,meta:null,value:""}}function ne(){return{type:"inlineCode",value:""}}function ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function le(){return{type:"heading",depth:0,children:[]}}function Se(){return{type:"break"}}function ye(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function Ne(){return{type:"link",title:null,url:"",children:[]}}function Ue(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Ke(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Ye(){return{type:"paragraph",children:[]}}function Ee(){return{type:"strong",children:[]}}function je(){return{type:"text",value:""}}function Ce(){return{type:"thematicBreak"}}}function vn(e){return{line:e.line,column:e.column,offset:e.offset}}function lS(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?lS(e,n):wR(e,n)}}function wR(e,t){let r;for(r in t)if(aS.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function q_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xo({start:t.start,end:t.end})+") is still open")}function bR(e){const t=this;t.parser=r;function r(n){return _R(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function SR(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function CR(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
623
- `}]}function kR(e,t){const r=t.value?t.value+`
624
- `:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function xR(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ER(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function AR(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=As(n.toLowerCase()),s=e.footnoteOrder.indexOf(n);let a,o=e.footnoteCounts.get(n);o===void 0?(o=0,e.footnoteOrder.push(n),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(n,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function LR(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function PR(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function cS(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=n:i.push({type:"text",value:n}),i}function TR(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return cS(e,t);const i={src:As(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function DR(e,t){const r={src:As(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function IR(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function NR(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return cS(e,t);const i={href:As(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function RR(e,t){const r={href:As(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OR(e,t,r){const n=e.all(t),i=r?MR(r):uS(t),s={},a=[];if(typeof t.checked=="boolean"){const h=n[0];let u;h&&h.type==="element"&&h.tagName==="p"?u=h:(u={type:"element",tagName:"p",properties:{},children:[]},n.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<n.length;){const h=n[o];(i||o!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
625
- `}),h.type==="element"&&h.tagName==="p"&&!i?a.push(...h.children):a.push(h)}const l=n[n.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
626
- `});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function MR(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=uS(r[n])}return t}function uS(e){const t=e.spread;return t??e.children.length>1}function jR(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const a=n[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,s),e.applyData(t,s)}function BR(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FR(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function zR(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $R(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],a),i.push(a)}if(r.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=Xp(t.children[1]),l=Hb(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function UR(e,t,r){const n=r?r.children:void 0,s=(n?n.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,o=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const u=t.children[l],m={},v=a?a[l]:void 0;v&&(m.align=v);let w={type:"element",tagName:s,properties:m,children:[]};u&&(w.children=e.all(u),e.patch(u,w),w=e.applyData(u,w)),c.push(w)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function HR(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Y_=9,J_=32;function WR(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const s=[];for(;n;)s.push(X_(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return s.push(X_(t.slice(i),i>0,!1)),s.join("")}function X_(e,t,r){let n=0,i=e.length;if(t){let s=e.codePointAt(n);for(;s===Y_||s===J_;)n++,s=e.codePointAt(n)}if(r){let s=e.codePointAt(i-1);for(;s===Y_||s===J_;)i--,s=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function VR(e,t){const r={type:"text",value:WR(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function KR(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const GR={blockquote:SR,break:CR,code:kR,delete:xR,emphasis:ER,footnoteReference:AR,heading:LR,html:PR,imageReference:TR,image:DR,inlineCode:IR,linkReference:NR,link:RR,listItem:OR,list:jR,paragraph:BR,root:FR,strong:zR,table:$R,tableCell:HR,tableRow:UR,text:VR,thematicBreak:KR,toml:ll,yaml:ll,definition:ll,footnoteDefinition:ll};function ll(){}const fS=-1,su=0,Ao=1,Cc=2,im=3,sm=4,om=5,am=6,hS=7,dS=8,Q_=typeof self=="object"?self:globalThis,qR=(e,t)=>{const r=(i,s)=>(e.set(s,i),i),n=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case su:case fS:return r(a,i);case Ao:{const o=r([],i);for(const l of a)o.push(n(l));return o}case Cc:{const o=r({},i);for(const[l,c]of a)o[n(l)]=n(c);return o}case im:return r(new Date(a),i);case sm:{const{source:o,flags:l}=a;return r(new RegExp(o,l),i)}case om:{const o=r(new Map,i);for(const[l,c]of a)o.set(n(l),n(c));return o}case am:{const o=r(new Set,i);for(const l of a)o.add(n(l));return o}case hS:{const{name:o,message:l}=a;return r(new Q_[o](l),i)}case dS:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return r(new DataView(o),a)}}return r(new Q_[s](a),i)};return n},Z_=e=>qR(new Map,e)(0),Di="",{toString:YR}={},{keys:JR}=Object,ro=e=>{const t=typeof e;if(t!=="object"||!e)return[su,t];const r=YR.call(e).slice(8,-1);switch(r){case"Array":return[Ao,Di];case"Object":return[Cc,Di];case"Date":return[im,Di];case"RegExp":return[sm,Di];case"Map":return[om,Di];case"Set":return[am,Di];case"DataView":return[Ao,r]}return r.includes("Array")?[Ao,r]:r.includes("Error")?[hS,r]:[Cc,r]},cl=([e,t])=>e===su&&(t==="function"||t==="symbol"),XR=(e,t,r,n)=>{const i=(a,o)=>{const l=n.push(a)-1;return r.set(o,l),l},s=a=>{if(r.has(a))return r.get(a);let[o,l]=ro(a);switch(o){case su:{let h=a;switch(l){case"bigint":o=dS,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);h=null;break;case"undefined":return i([fS],a)}return i([o,h],a)}case Ao:{if(l){let m=a;return l==="DataView"?m=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(m=new Uint8Array(a)),i([l,[...m]],a)}const h=[],u=i([o,h],a);for(const m of a)h.push(s(m));return u}case Cc:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const h=[],u=i([o,h],a);for(const m of JR(a))(e||!cl(ro(a[m])))&&h.push([s(m),s(a[m])]);return u}case im:return i([o,a.toISOString()],a);case sm:{const{source:h,flags:u}=a;return i([o,{source:h,flags:u}],a)}case om:{const h=[],u=i([o,h],a);for(const[m,v]of a)(e||!(cl(ro(m))||cl(ro(v))))&&h.push([s(m),s(v)]);return u}case am:{const h=[],u=i([o,h],a);for(const m of a)(e||!cl(ro(m)))&&h.push(s(m));return u}}const{message:c}=a;return i([o,{name:l,message:c}],a)};return s},e1=(e,{json:t,lossy:r}={})=>{const n=[];return XR(!(t||r),!!t,new Map,n)(e),n},kc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Z_(e1(e,t)):structuredClone(e):(e,t)=>Z_(e1(e,t));function QR(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function ZR(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function eO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||QR,n=e.options.footnoteBackLabel||ZR,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const h=e.all(c),u=String(c.identifier).toUpperCase(),m=As(u.toLowerCase());let v=0;const w=[],_=e.footnoteCounts.get(u);for(;_!==void 0&&++v<=_;){w.length>0&&w.push({type:"text",value:" "});let f=typeof r=="string"?r:r(l,v);typeof f=="string"&&(f={type:"text",value:f}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,v),className:["data-footnote-backref"]},children:Array.isArray(f)?f:[f]})}const g=h[h.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const f=g.children[g.children.length-1];f&&f.type==="text"?f.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...w)}else h.push(...w);const d={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(h,!0)};e.patch(c,d),o.push(d)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...kc(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
627
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
628
- `}]}}const ou=function(e){if(e==null)return iO;if(typeof e=="function")return au(e);if(typeof e=="object")return Array.isArray(e)?tO(e):rO(e);if(typeof e=="string")return nO(e);throw new Error("Expected function, string, or object as test")};function tO(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=ou(e[r]);return au(n);function n(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function rO(e){const t=e;return au(r);function r(n){const i=n;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function nO(e){return au(t);function t(r){return r&&r.type===e}}function au(e){return t;function t(r,n,i){return!!(sO(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function iO(){return!0}function sO(e){return e!==null&&typeof e=="object"&&"type"in e}const pS=[],oO=!0,wd=!1,aO="skip";function mS(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const s=ou(i),a=n?-1:1;o(e,void 0,[])();function o(l,c,h){const u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){const v=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(l.type+(v?"<"+v+">":""))+")"})}return m;function m(){let v=pS,w,_,g;if((!t||s(l,c,h[h.length-1]||void 0))&&(v=lO(r(l,h)),v[0]===wd))return v;if("children"in l&&l.children){const d=l;if(d.children&&v[0]!==aO)for(_=(n?d.children.length:-1)+a,g=h.concat(d);_>-1&&_<d.children.length;){const f=d.children[_];if(w=o(f,_,g)(),w[0]===wd)return w;_=typeof w[1]=="number"?w[1]:_+a}}return v}}}function lO(e){return Array.isArray(e)?e:typeof e=="number"?[oO,e]:e==null?pS:[e]}function lm(e,t,r,n){let i,s,a;typeof t=="function"&&typeof r!="function"?(s=void 0,a=t,i=r):(s=t,a=r,i=n),mS(e,s,o,i);function o(l,c){const h=c[c.length-1],u=h?h.children.indexOf(l):void 0;return a(l,u,h)}}const bd={}.hasOwnProperty,cO={};function uO(e,t){const r=t||cO,n=new Map,i=new Map,s=new Map,a={...GR,...r.handlers},o={all:c,applyData:hO,definitionById:n,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:r,patch:fO,wrap:pO};return lm(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const u=h.type==="definition"?n:i,m=String(h.identifier).toUpperCase();u.has(m)||u.set(m,h)}}),o;function l(h,u){const m=h.type,v=o.handlers[m];if(bd.call(o.handlers,m)&&v)return v(o,h,u);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in h){const{children:_,...g}=h,d=kc(g);return d.children=o.all(h),d}return kc(h)}return(o.options.unknownHandler||dO)(o,h,u)}function c(h){const u=[];if("children"in h){const m=h.children;let v=-1;for(;++v<m.length;){const w=o.one(m[v],h);if(w){if(v&&m[v-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=t1(w.value)),!Array.isArray(w)&&w.type==="element")){const _=w.children[0];_&&_.type==="text"&&(_.value=t1(_.value))}Array.isArray(w)?u.push(...w):u.push(w)}}}return u}}function fO(e,t){e.position&&(t.position=Z6(e))}function hO(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const a="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:a}}r.type==="element"&&s&&Object.assign(r.properties,kc(s)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function dO(e,t){const r=t.data||{},n="value"in t&&!(bd.call(r,"hProperties")||bd.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pO(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
629
- `});++n<e.length;)n&&r.push({type:"text",value:`
630
- `}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
631
- `}),r}function t1(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function r1(e,t){const r=uO(e,t),n=r.one(e,void 0),i=eO(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
632
- `},i),s}function mO(e,t){return e&&"run"in e?async function(r,n){const i=r1(r,{file:n,...t});await e.run(i,n)}:function(r,n){return r1(r,{file:n,...e||t})}}function n1(e){if(e)throw e}var zl=Object.prototype.hasOwnProperty,gS=Object.prototype.toString,i1=Object.defineProperty,s1=Object.getOwnPropertyDescriptor,o1=function(t){return typeof Array.isArray=="function"?Array.isArray(t):gS.call(t)==="[object Array]"},a1=function(t){if(!t||gS.call(t)!=="[object Object]")return!1;var r=zl.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&zl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||zl.call(t,i)},l1=function(t,r){i1&&r.name==="__proto__"?i1(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},c1=function(t,r){if(r==="__proto__")if(zl.call(t,r)){if(s1)return s1(t,r).value}else return;return t[r]},gO=function e(){var t,r,n,i,s,a,o=arguments[0],l=1,c=arguments.length,h=!1;for(typeof o=="boolean"&&(h=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});l<c;++l)if(t=arguments[l],t!=null)for(r in t)n=c1(o,r),i=c1(t,r),o!==i&&(h&&i&&(a1(i)||(s=o1(i)))?(s?(s=!1,a=n&&o1(n)?n:[]):a=n&&a1(n)?n:{},l1(o,{name:r,newValue:e(h,a,i)})):typeof i<"u"&&l1(o,{name:r,newValue:i}));return o};const Ef=Lc(gO);function Sd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function vO(){const e=[],t={run:r,use:n};return t;function r(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...c){const h=e[++s];let u=-1;if(l){a(l);return}for(;++u<i.length;)(c[u]===null||c[u]===void 0)&&(c[u]=i[u]);i=c,h?_O(h,o)(...c):a(null,...c)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function _O(e,t){let r;return n;function n(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(c){const h=c;if(o&&r)throw h;return i(h)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){r||(r=!0,t(a,...o))}function s(a){i(null,a)}}const Or={basename:yO,dirname:wO,extname:bO,join:SO,sep:"/"};function yO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pa(e);let r=0,n=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){r=i+1;break}}else n<0&&(s=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){r=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(n=i):(o=-1,n=a));return r===n?n=a:n<0&&(n=e.length),e.slice(r,n)}function wO(e){if(pa(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function bO(e){pa(e);let t=e.length,r=-1,n=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){n=t+1;break}continue}r<0&&(a=!0,r=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||r<0||s===0||s===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function SO(...e){let t=-1,r;for(;++t<e.length;)pa(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":CO(r)}function CO(e){pa(e);const t=e.codePointAt(0)===47;let r=kO(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function kO(e,t){let r="",n=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=a,s=0;continue}}else if(r.length>0){r="",n=0,i=a,s=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),n=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return r}function pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xO={cwd:EO};function EO(){return"/"}function Cd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function AO(e){if(typeof e=="string")e=new URL(e);else if(!Cd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return LO(e)}function LO(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Af=["history","path","basename","stem","extname","dirname"];class vS{constructor(t){let r;t?Cd(t)?r={path:t}:typeof t=="string"||PO(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":xO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Af.length;){const s=Af[n];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let i;for(i in r)Af.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Or.basename(this.path):void 0}set basename(t){Pf(t,"basename"),Lf(t,"basename"),this.path=Or.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Or.dirname(this.path):void 0}set dirname(t){u1(this.basename,"dirname"),this.path=Or.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Or.extname(this.path):void 0}set extname(t){if(Lf(t,"extname"),u1(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Or.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Cd(t)&&(t=AO(t)),Pf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Or.basename(this.path,this.extname):void 0}set stem(t){Pf(t,"stem"),Lf(t,"stem"),this.path=Or.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new Mt(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Lf(e,t){if(e&&e.includes(Or.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Or.sep+"`")}function Pf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function u1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function PO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const TO=function(e){const n=this.constructor.prototype,i=n[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,n),s},DO={}.hasOwnProperty;class cm extends TO{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=vO()}copy(){const t=new cm;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Ef(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(If("data",this.frozen),this.namespace[t]=r,this):DO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(If("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=ul(t),n=this.parser||this.Parser;return Tf("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Tf("process",this.parser||this.Parser),Df("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(s,a){const o=ul(t),l=n.parse(o);n.run(l,o,function(h,u,m){if(h||!u||!m)return c(h);const v=u,w=n.stringify(v,m);RO(w)?m.value=w:m.result=w,c(h,m)});function c(h,u){h||!u?a(h):s?s(u):r(void 0,u)}}}processSync(t){let r=!1,n;return this.freeze(),Tf("processSync",this.parser||this.Parser),Df("processSync",this.compiler||this.Compiler),this.process(t,i),h1("processSync","process",r),n;function i(s,a){r=!0,n1(s),n=a}}run(t,r,n){f1(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?s(void 0,n):new Promise(s);function s(a,o){const l=ul(r);i.run(t,l,c);function c(h,u,m){const v=u||t;h?o(h):a?a(v):n(void 0,v,m)}}}runSync(t,r){let n=!1,i;return this.run(t,r,s),h1("runSync","run",n),i;function s(a,o){n1(a),i=o,n=!0}}stringify(t,r){this.freeze();const n=ul(r),i=this.compiler||this.Compiler;return Df("stringify",i),f1(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(If("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...u]=c;l(h,u)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(i.settings=Ef(!0,i.settings,c.settings))}function o(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const u=c[h];s(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,h){let u=-1,m=-1;for(;++u<n.length;)if(n[u][0]===c){m=u;break}if(m===-1)n.push([c,...h]);else if(h.length>0){let[v,...w]=h;const _=n[m][1];Sd(_)&&Sd(v)&&(v=Ef(!0,_,v)),n[m]=[c,v,...w]}}}}const IO=new cm().freeze();function Tf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Df(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function If(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function f1(e){if(!Sd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function h1(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ul(e){return NO(e)?e:new vS(e)}function NO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RO(e){return typeof e=="string"||OO(e)}function OO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",d1=[],p1={allowDangerousHtml:!0},jO=/^(https?|ircs?|mailto|xmpp)$/i,BO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function fl(e){const t=FO(e),r=zO(e);return $O(t.runSync(t.parse(r),r),e)}function FO(e){const t=e.rehypePlugins||d1,r=e.remarkPlugins||d1,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...p1}:p1;return IO().use(bR).use(r).use(mO,n).use(t)}function zO(e){const t=e.children||"",r=new vS;return typeof t=="string"&&(r.value=t),r}function $O(e,t){const r=t.allowedElements,n=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||UO;for(const h of BO)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+MO+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),lm(e,c),iI(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(h,u,m){if(h.type==="raw"&&m&&typeof u=="number")return a?m.children.splice(u,1):m.children[u]={type:"text",value:h.value},u;if(h.type==="element"){let v;for(v in Cf)if(Object.hasOwn(Cf,v)&&Object.hasOwn(h.properties,v)){const w=h.properties[v],_=Cf[v];(_===null||_.includes(h.tagName))&&(h.properties[v]=l(String(w||""),v,h))}}if(h.type==="element"){let v=r?!r.includes(h.tagName):s?s.includes(h.tagName):!1;if(!v&&n&&typeof u=="number"&&(v=!n(h,u,m)),v&&m&&typeof u=="number")return o&&h.children?m.children.splice(u,1,...h.children):m.children.splice(u,1),u}}}function UO(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||r!==-1&&t>r||n!==-1&&t>n||jO.test(e.slice(0,t))?e:""}function m1(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function HO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function WO(e,t,r){const i=ou((r||{}).ignore||[]),s=VO(t);let a=-1;for(;++a<s.length;)mS(e,"text",o);function o(c,h){let u=-1,m;for(;++u<h.length;){const v=h[u],w=m?m.children:void 0;if(i(v,w?w.indexOf(v):void 0,m))return;m=v}if(m)return l(c,h)}function l(c,h){const u=h[h.length-1],m=s[a][0],v=s[a][1];let w=0;const g=u.children.indexOf(c);let d=!1,f=[];m.lastIndex=0;let p=m.exec(c.value);for(;p;){const y=p.index,S={index:p.index,input:p.input,stack:[...h,c]};let b=v(...p,S);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?m.lastIndex=y+1:(w!==y&&f.push({type:"text",value:c.value.slice(w,y)}),Array.isArray(b)?f.push(...b):b&&f.push(b),w=y+p[0].length,d=!0),!m.global)break;p=m.exec(c.value)}return d?(w<c.value.length&&f.push({type:"text",value:c.value.slice(w)}),u.children.splice(g,1,...f)):f=[c],g+f.length}}function VO(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([KO(i[0]),GO(i[1])])}return t}function KO(e){return typeof e=="string"?new RegExp(HO(e),"g"):e}function GO(e){return typeof e=="function"?e:function(){return e}}const Nf="phrasing",Rf=["autolink","link","image","label"];function qO(){return{transforms:[tM],enter:{literalAutolink:JO,literalAutolinkEmail:Of,literalAutolinkHttp:Of,literalAutolinkWww:Of},exit:{literalAutolink:eM,literalAutolinkEmail:ZO,literalAutolinkHttp:XO,literalAutolinkWww:QO}}}function YO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Nf,notInConstruct:Rf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Nf,notInConstruct:Rf},{character:":",before:"[ps]",after:"\\/",inConstruct:Nf,notInConstruct:Rf}]}}function JO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Of(e){this.config.enter.autolinkProtocol.call(this,e)}function XO(e){this.config.exit.autolinkProtocol.call(this,e)}function QO(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function ZO(e){this.config.exit.autolinkEmail.call(this,e)}function eM(e){this.exit(e)}function tM(e){WO(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),nM]],{ignore:["link","linkReference"]})}function rM(e,t,r,n,i){let s="";if(!_S(i)||(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!iM(r)))return!1;const a=sM(r+n);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function nM(e,t,r,n){return!_S(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function iM(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function sM(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=m1(e,"(");let s=m1(e,")");for(;n!==-1&&i>s;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),s++;return[e,r]}function _S(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||mi(r)||nu(r))&&(!t||r!==47)}yS.peek=pM;function oM(){this.buffer()}function aM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lM(){this.buffer()}function cM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function uM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ar(this.sliceSerialize(e)).toLowerCase(),r.label=t}function fM(e){this.exit(e)}function hM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ar(this.sliceSerialize(e)).toLowerCase(),r.label=t}function dM(e){this.exit(e)}function pM(){return"["}function yS(e,t,r,n){const i=r.createTracker(n);let s=i.move("[^");const a=r.enter("footnoteReference"),o=r.enter("reference");return s+=i.move(r.safe(r.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function mM(){return{enter:{gfmFootnoteCallString:oM,gfmFootnoteCall:aM,gfmFootnoteDefinitionLabelString:lM,gfmFootnoteDefinition:cM},exit:{gfmFootnoteCallString:uM,gfmFootnoteCall:fM,gfmFootnoteDefinitionLabelString:hM,gfmFootnoteDefinition:dM}}}function gM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:yS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const c=s.enter("footnoteDefinition"),h=s.enter("label");return l+=o.move(s.safe(s.associationId(n),{before:l,after:"]"})),h(),l+=o.move("]:"),n.children&&n.children.length>0&&(o.shift(4),l+=o.move((t?`
633
- `:" ")+s.indentLines(s.containerFlow(n,o.current()),t?wS:vM))),c(),l}}function vM(e,t,r){return t===0?e:wS(e,t,r)}function wS(e,t,r){return(r?"":" ")+e}const _M=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];bS.peek=CM;function yM(){return{canContainEols:["delete"],enter:{strikethrough:bM},exit:{strikethrough:SM}}}function wM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_M}],handlers:{delete:bS}}}function bM(e){this.enter({type:"delete",children:[]},e)}function SM(e){this.exit(e)}function bS(e,t,r,n){const i=r.createTracker(n),s=r.enter("strikethrough");let a=i.move("~~");return a+=r.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function CM(){return"~"}function kM(e){return e.length}function xM(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||kM,s=[],a=[],o=[],l=[];let c=0,h=-1;for(;++h<e.length;){const _=[],g=[];let d=-1;for(e[h].length>c&&(c=e[h].length);++d<e[h].length;){const f=EM(e[h][d]);if(r.alignDelimiters!==!1){const p=i(f);g[d]=p,(l[d]===void 0||p>l[d])&&(l[d]=p)}_.push(f)}a[h]=_,o[h]=g}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<c;)s[u]=g1(n[u]);else{const _=g1(n);for(;++u<c;)s[u]=_}u=-1;const m=[],v=[];for(;++u<c;){const _=s[u];let g="",d="";_===99?(g=":",d=":"):_===108?g=":":_===114&&(d=":");let f=r.alignDelimiters===!1?1:Math.max(1,l[u]-g.length-d.length);const p=g+"-".repeat(f)+d;r.alignDelimiters!==!1&&(f=g.length+f+d.length,f>l[u]&&(l[u]=f),v[u]=f),m[u]=p}a.splice(1,0,m),o.splice(1,0,v),h=-1;const w=[];for(;++h<a.length;){const _=a[h],g=o[h];u=-1;const d=[];for(;++u<c;){const f=_[u]||"";let p="",y="";if(r.alignDelimiters!==!1){const S=l[u]-(g[u]||0),b=s[u];b===114?p=" ".repeat(S):b===99?S%2?(p=" ".repeat(S/2+.5),y=" ".repeat(S/2-.5)):(p=" ".repeat(S/2),y=p):y=" ".repeat(S)}r.delimiterStart!==!1&&!u&&d.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&f==="")&&(r.delimiterStart!==!1||u)&&d.push(" "),r.alignDelimiters!==!1&&d.push(p),d.push(f),r.alignDelimiters!==!1&&d.push(y),r.padding!==!1&&d.push(" "),(r.delimiterEnd!==!1||u!==c-1)&&d.push("|")}w.push(r.delimiterEnd===!1?d.join("").replace(/ +$/,""):d.join(""))}return w.join(`
634
- `)}function EM(e){return e==null?"":String(e)}function g1(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function AM(e,t,r,n){const i=r.enter("blockquote"),s=r.createTracker(n);s.move("> "),s.shift(2);const a=r.indentLines(r.containerFlow(e,s.current()),LM);return i(),a}function LM(e,t,r){return">"+(r?"":" ")+e}function PM(e,t){return v1(e,t.inConstruct,!0)&&!v1(e,t.notInConstruct,!1)}function v1(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function _1(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
635
- `&&PM(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
636
- `}function TM(e,t){const r=String(e);let n=r.indexOf(t),i=n,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++s>a&&(a=s):s=1,i=n+t.length,n=r.indexOf(t,i);return a}function DM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function IM(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function NM(e,t,r,n){const i=IM(r),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(DM(e,r)){const u=r.enter("codeIndented"),m=r.indentLines(s,RM);return u(),m}const o=r.createTracker(n),l=i.repeat(Math.max(TM(s,i)+1,3)),c=r.enter("codeFenced");let h=o.move(l);if(e.lang){const u=r.enter(`codeFencedLang${a}`);h+=o.move(r.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),u()}if(e.lang&&e.meta){const u=r.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(r.safe(e.meta,{before:h,after:`
637
- `,encode:["`"],...o.current()})),u()}return h+=o.move(`
638
- `),s&&(h+=o.move(s+`
639
- `)),h+=o.move(l),c(),h}function RM(e,t,r){return(r?"":" ")+e}function um(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function OM(e,t,r,n){const i=um(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("definition");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("[");return c+=l.move(r.safe(r.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":`
640
- `,...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(r.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),a(),c}function MM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Qo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xc(e,t,r){const n=ws(e),i=ws(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}SS.peek=jM;function SS(e,t,r,n){const i=MM(r),s=r.enter("emphasis"),a=r.createTracker(n),o=a.move(i);let l=a.move(r.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),h=xc(n.before.charCodeAt(n.before.length-1),c,i);h.inside&&(l=Qo(c)+l.slice(1));const u=l.charCodeAt(l.length-1),m=xc(n.after.charCodeAt(0),u,i);m.inside&&(l=l.slice(0,-1)+Qo(u));const v=a.move(i);return s(),r.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+l+v}function jM(e,t,r){return r.options.emphasis||"*"}function BM(e,t){let r=!1;return lm(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,wd}),!!((!e.depth||e.depth<3)&&tm(e)&&(t.options.setext||r))}function FM(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(n);if(BM(e,r)){const h=r.enter("headingSetext"),u=r.enter("phrasing"),m=r.containerPhrasing(e,{...s.current(),before:`
641
- `,after:`
642
- `});return u(),h(),m+`
643
- `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
644
- `))+1))}const a="#".repeat(i),o=r.enter("headingAtx"),l=r.enter("phrasing");s.move(a+" ");let c=r.containerPhrasing(e,{before:"# ",after:`
645
- `,...s.current()});return/^[\t ]/.test(c)&&(c=Qo(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,r.options.closeAtx&&(c+=" "+a),l(),o(),c}CS.peek=zM;function CS(e){return e.value||""}function zM(){return"<"}kS.peek=$M;function kS(e,t,r,n){const i=um(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("image");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("![");return c+=l.move(r.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(r.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),c+=l.move(")"),a(),c}function $M(){return"!"}xS.peek=UM;function xS(e,t,r,n){const i=e.referenceType,s=r.enter("imageReference");let a=r.enter("label");const o=r.createTracker(n);let l=o.move("![");const c=r.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const h=r.stack;r.stack=[],a=r.enter("reference");const u=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=h,s(),i==="full"||!c||c!==u?l+=o.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function UM(){return"!"}ES.peek=HM;function ES(e,t,r){let n=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++s<r.unsafe.length;){const a=r.unsafe[s],o=r.compilePattern(a);let l;if(a.atBreak)for(;l=o.exec(n);){let c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return i+n+i}function HM(){return"`"}function AS(e,t){const r=tm(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}LS.peek=WM;function LS(e,t,r,n){const i=um(r),s=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n);let o,l;if(AS(e,r)){const h=r.stack;r.stack=[],o=r.enter("autolink");let u=a.move("<");return u+=a.move(r.containerPhrasing(e,{before:u,after:">",...a.current()})),u+=a.move(">"),o(),r.stack=h,u}o=r.enter("link"),l=r.enter("label");let c=a.move("[");return c+=a.move(r.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(r.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=r.enter("destinationRaw"),c+=a.move(r.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=r.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(r.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),o(),c}function WM(e,t,r){return AS(e,r)?"<":"["}PS.peek=VM;function PS(e,t,r,n){const i=e.referenceType,s=r.enter("linkReference");let a=r.enter("label");const o=r.createTracker(n);let l=o.move("[");const c=r.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const h=r.stack;r.stack=[],a=r.enter("reference");const u=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=h,s(),i==="full"||!c||c!==u?l+=o.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function VM(){return"["}function fm(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function KM(e){const t=fm(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function GM(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function TS(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function qM(e,t,r,n){const i=r.enter("list"),s=r.bulletCurrent;let a=e.ordered?GM(r):fm(r);const o=e.ordered?a==="."?")":".":KM(r);let l=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),TS(r)===a&&h){let u=-1;for(;++u<e.children.length;){const m=e.children[u];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),r.bulletCurrent=a;const c=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=s,i(),c}function YM(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function JM(e,t,r,n){const i=YM(r);let s=r.bulletCurrent||fm(r);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=r.createTracker(n);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,o.current()),h);return l(),c;function h(u,m,v){return m?(v?"":" ".repeat(a))+u:(v?s:s+" ".repeat(a-s.length))+u}}function XM(e,t,r,n){const i=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(e,n);return s(),i(),a}const QM=ou(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ZM(e,t,r,n){return(e.children.some(function(a){return QM(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function e8(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}DS.peek=t8;function DS(e,t,r,n){const i=e8(r),s=r.enter("strong"),a=r.createTracker(n),o=a.move(i+i);let l=a.move(r.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),h=xc(n.before.charCodeAt(n.before.length-1),c,i);h.inside&&(l=Qo(c)+l.slice(1));const u=l.charCodeAt(l.length-1),m=xc(n.after.charCodeAt(0),u,i);m.inside&&(l=l.slice(0,-1)+Qo(u));const v=a.move(i+i);return s(),r.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+l+v}function t8(e,t,r){return r.options.strong||"*"}function r8(e,t,r,n){return r.safe(e.value,n)}function n8(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function i8(e,t,r){const n=(TS(r)+(r.options.ruleSpaces?" ":"")).repeat(n8(r));return r.options.ruleSpaces?n.slice(0,-1):n}const IS={blockquote:AM,break:_1,code:NM,definition:OM,emphasis:SS,hardBreak:_1,heading:FM,html:CS,image:kS,imageReference:xS,inlineCode:ES,link:LS,linkReference:PS,list:qM,listItem:JM,paragraph:XM,root:ZM,strong:DS,text:r8,thematicBreak:i8};function s8(){return{enter:{table:o8,tableData:y1,tableHeader:y1,tableRow:l8},exit:{codeText:c8,table:a8,tableData:Mf,tableHeader:Mf,tableRow:Mf}}}function o8(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function a8(e){this.exit(e),this.data.inTable=void 0}function l8(e){this.enter({type:"tableRow",children:[]},e)}function Mf(e){this.exit(e)}function y1(e){this.enter({type:"tableCell",children:[]},e)}function c8(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,u8));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function u8(e,t){return t==="|"?t:e}function f8(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
646
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:l,tableRow:o}};function a(v,w,_,g){return c(h(v,_,g),v.align)}function o(v,w,_,g){const d=u(v,_,g),f=c([d]);return f.slice(0,f.indexOf(`
647
- `))}function l(v,w,_,g){const d=_.enter("tableCell"),f=_.enter("phrasing"),p=_.containerPhrasing(v,{...g,before:s,after:s});return f(),d(),p}function c(v,w){return xM(v,{align:w,alignDelimiters:n,padding:r,stringLength:i})}function h(v,w,_){const g=v.children;let d=-1;const f=[],p=w.enter("table");for(;++d<g.length;)f[d]=u(g[d],w,_);return p(),f}function u(v,w,_){const g=v.children;let d=-1;const f=[],p=w.enter("tableRow");for(;++d<g.length;)f[d]=l(g[d],v,w,_);return p(),f}function m(v,w,_){let g=IS.inlineCode(v,w,_);return _.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function h8(){return{exit:{taskListCheckValueChecked:w1,taskListCheckValueUnchecked:w1,paragraph:p8}}}function d8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:m8}}}function w1(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function p8(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function m8(e,t,r,n){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=r.createTracker(n);s&&o.move(a);let l=IS.listItem(e,t,r,{...n,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(h){return h+a}}function g8(){return[qO(),mM(),yM(),s8(),h8()]}function v8(e){return{extensions:[YO(),gM(e),wM(),f8(e),d8()]}}const _8={tokenize:k8,partial:!0},NS={tokenize:x8,partial:!0},RS={tokenize:E8,partial:!0},OS={tokenize:A8,partial:!0},y8={tokenize:L8,partial:!0},MS={name:"wwwAutolink",tokenize:S8,previous:BS},jS={name:"protocolAutolink",tokenize:C8,previous:FS},fn={name:"emailAutolink",tokenize:b8,previous:zS},Ur={};function w8(){return{text:Ur}}let Jn=48;for(;Jn<123;)Ur[Jn]=fn,Jn++,Jn===58?Jn=65:Jn===91&&(Jn=97);Ur[43]=fn;Ur[45]=fn;Ur[46]=fn;Ur[95]=fn;Ur[72]=[fn,jS];Ur[104]=[fn,jS];Ur[87]=[fn,MS];Ur[119]=[fn,MS];function b8(e,t,r){const n=this;let i,s;return a;function a(u){return!kd(u)||!zS.call(n,n.previous)||hm(n.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(u))}function o(u){return kd(u)?(e.consume(u),o):u===64?(e.consume(u),l):r(u)}function l(u){return u===46?e.check(y8,h,c)(u):u===45||u===95||Rt(u)?(s=!0,e.consume(u),l):h(u)}function c(u){return e.consume(u),i=!0,l}function h(u){return s&&i&&Bt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):r(u)}}function S8(e,t,r){const n=this;return i;function i(a){return a!==87&&a!==119||!BS.call(n,n.previous)||hm(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_8,e.attempt(NS,e.attempt(RS,s),r),r)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function C8(e,t,r){const n=this;let i="",s=!1;return a;function a(u){return(u===72||u===104)&&FS.call(n,n.previous)&&!hm(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),o):r(u)}function o(u){if(Bt(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),o;if(u===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(u),l}return r(u)}function l(u){return u===47?(e.consume(u),s?c:(s=!0,l)):r(u)}function c(u){return u===null||Sc(u)||et(u)||mi(u)||nu(u)?r(u):e.attempt(NS,e.attempt(RS,h),r)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function k8(e,t,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),i):a===46&&n===3?(e.consume(a),s):r(a)}function s(a){return a===null?r(a):t(a)}}function x8(e,t,r){let n,i,s;return a;function a(c){return c===46||c===95?e.check(OS,l,o)(c):c===null||et(c)||mi(c)||c!==45&&nu(c)?l(c):(s=!0,e.consume(c),a)}function o(c){return c===95?n=!0:(i=n,n=void 0),e.consume(c),a}function l(c){return i||n||!s?r(c):t(c)}}function E8(e,t){let r=0,n=0;return i;function i(a){return a===40?(r++,e.consume(a),i):a===41&&n<r?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(OS,t,s)(a):a===null||et(a)||mi(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&n++,e.consume(a),i}}function A8(e,t,r){return n;function n(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),n):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||et(o)||mi(o)?t(o):r(o)}function i(o){return o===null||o===40||o===91||et(o)||mi(o)?t(o):n(o)}function s(o){return Bt(o)?a(o):r(o)}function a(o){return o===59?(e.consume(o),n):Bt(o)?(e.consume(o),a):r(o)}}function L8(e,t,r){return n;function n(s){return e.consume(s),i}function i(s){return Rt(s)?r(s):t(s)}}function BS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||et(e)}function FS(e){return!Bt(e)}function zS(e){return!(e===47||kd(e))}function kd(e){return e===43||e===45||e===46||e===95||Rt(e)}function hm(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const P8={tokenize:j8,partial:!0};function T8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:R8,continuation:{tokenize:O8},exit:M8}},text:{91:{name:"gfmFootnoteCall",tokenize:N8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:D8,resolveTo:I8}}}}function D8(e,t,r){const n=this;let i=n.events.length;const s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return r(l);const c=Ar(n.sliceSerialize({start:a.end,end:n.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function I8(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...o),e}function N8(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s=0,a;return o;function o(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?r(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(s>999||u===93&&!a||u===null||u===91||et(u))return r(u);if(u===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Ar(n.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(u)}return et(u)||(a=!0),s++,e.consume(u),u===92?h:c}function h(u){return u===91||u===92||u===93?(e.consume(u),s++,c):c(u)}}function R8(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):r(w)}function h(w){if(a>999||w===93&&!o||w===null||w===91||et(w))return r(w);if(w===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return s=Ar(n.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return et(w)||(o=!0),a++,e.consume(w),w===92?u:h}function u(w){return w===91||w===92||w===93?(e.consume(w),a++,h):h(w)}function m(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),i.includes(s)||i.push(s),He(e,v,"gfmFootnoteDefinitionWhitespace")):r(w)}function v(w){return t(w)}}function O8(e,t,r){return e.check(da,t,e.attempt(P8,t,r))}function M8(e){e.exit("gfmFootnoteDefinition")}function j8(e,t,r){const n=this;return He(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):r(s)}}function B8(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:s,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},u={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},m=[["enter",h,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",u,o]],v=o.parser.constructs.insideSpan.null;v&&ir(m,m.length,0,iu(v,a.slice(c+1,l),o)),ir(m,m.length,0,[["exit",u,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",h,o]]),ir(a,c-1,l-c+3,m),l=c+m.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const c=this.previous,h=this.events;let u=0;return m;function m(w){return c===126&&h[h.length-1][1].type!=="characterEscape"?l(w):(a.enter("strikethroughSequenceTemporary"),v(w))}function v(w){const _=ws(c);if(w===126)return u>1?l(w):(a.consume(w),u++,v);if(u<2&&!r)return l(w);const g=a.exit("strikethroughSequenceTemporary"),d=ws(w);return g._open=!d||d===2&&!!_,g._close=!_||_===2&&!!d,o(w)}}}class F8{constructor(){this.map=[]}add(t,r,n){z8(this,t,r,n)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(const s of i)t.push(s);i=n.pop()}this.map.length=0}}function z8(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function $8(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=n.length-1;n[s]=n[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function U8(){return{flow:{null:{name:"table",tokenize:H8,resolveAll:W8}}}}function H8(e,t,r){const n=this;let i=0,s=0,a;return o;function o(P){let O=n.events.length-1;for(;O>-1;){const z=n.events[O][1].type;if(z==="lineEnding"||z==="linePrefix")O--;else break}const R=O>-1?n.events[O][1].type:null,M=R==="tableHead"||R==="tableRow"?b:l;return M===b&&n.parser.lazy[n.now().line]?r(P):M(P)}function l(P){return e.enter("tableHead"),e.enter("tableRow"),c(P)}function c(P){return P===124||(a=!0,s+=1),h(P)}function h(P){return P===null?r(P):Pe(P)?s>1?(s=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),v):r(P):Fe(P)?He(e,h,"whitespace")(P):(s+=1,a&&(a=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),u(P)))}function u(P){return P===null||P===124||et(P)?(e.exit("data"),h(P)):(e.consume(P),P===92?m:u)}function m(P){return P===92||P===124?(e.consume(P),u):u(P)}function v(P){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(P):(e.enter("tableDelimiterRow"),a=!1,Fe(P)?He(e,w,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):w(P))}function w(P){return P===45||P===58?g(P):P===124?(a=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),_):S(P)}function _(P){return Fe(P)?He(e,g,"whitespace")(P):g(P)}function g(P){return P===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),d):P===45?(s+=1,d(P)):P===null||Pe(P)?y(P):S(P)}function d(P){return P===45?(e.enter("tableDelimiterFiller"),f(P)):S(P)}function f(P){return P===45?(e.consume(P),f):P===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),p):(e.exit("tableDelimiterFiller"),p(P))}function p(P){return Fe(P)?He(e,y,"whitespace")(P):y(P)}function y(P){return P===124?w(P):P===null||Pe(P)?!a||i!==s?S(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):S(P)}function S(P){return r(P)}function b(P){return e.enter("tableRow"),k(P)}function k(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),k):P===null||Pe(P)?(e.exit("tableRow"),t(P)):Fe(P)?He(e,k,"whitespace")(P):(e.enter("data"),C(P))}function C(P){return P===null||P===124||et(P)?(e.exit("data"),k(P)):(e.consume(P),P===92?A:C)}function A(P){return P===92||P===124?(e.consume(P),C):C(P)}}function W8(e,t){let r=-1,n=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,h,u;const m=new F8;for(;++r<e.length;){const v=e[r],w=v[1];v[0]==="enter"?w.type==="tableHead"?(o=!1,l!==0&&(b1(m,t,l,c,h),h=void 0,l=0),c={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},m.add(r,0,[["enter",c,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(n=!0,u=void 0,s=[0,0,0,0],a=[0,r+1,0,0],o&&(o=!1,h={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},m.add(r,0,[["enter",h,t]])),i=w.type==="tableDelimiterRow"?2:h?3:1):i&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],u=hl(m,t,s,i,void 0,u),s=[0,0,0,0]),a[2]=r)):w.type==="tableCellDivider"&&(n?n=!1:(s[1]!==0&&(a[0]=a[1],u=hl(m,t,s,i,void 0,u)),s=a,a=[s[1],r,0,0])):w.type==="tableHead"?(o=!0,l=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=r,s[1]!==0?(a[0]=a[1],u=hl(m,t,s,i,r,u)):a[1]!==0&&(u=hl(m,t,a,i,r,u)),i=0):i&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(a[3]=r)}for(l!==0&&b1(m,t,l,c,h),m.consume(t.events),r=-1;++r<t.events.length;){const v=t.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=$8(t.events,r))}return e}function hl(e,t,r,n,i,s){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(s.end=Object.assign({},Fi(t.events,r[0])),e.add(r[0],0,[["exit",s,t]]));const l=Fi(t.events,r[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",s,t]]),r[2]!==0){const c=Fi(t.events,r[2]),h=Fi(t.events,r[3]),u={type:o,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(r[2],0,[["enter",u,t]]),n!==2){const m=t.events[r[2]],v=t.events[r[3]];if(m[1].end=Object.assign({},v[1].end),m[1].type="chunkText",m[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,_=r[3]-r[2]-1;e.add(w,_,[])}}e.add(r[3]+1,0,[["exit",u,t]])}return i!==void 0&&(s.end=Object.assign({},Fi(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function b1(e,t,r,n,i){const s=[],a=Fi(t.events,r);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),n.end=Object.assign({},a),s.push(["exit",n,t]),e.add(r+1,0,s)}function Fi(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const V8={name:"tasklistCheck",tokenize:G8};function K8(){return{text:{91:V8}}}function G8(e,t,r){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return et(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):r(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(l)}function o(l){return Pe(l)?t(l):Fe(l)?e.check({tokenize:q8},t,r)(l):r(l)}}function q8(e,t,r){return He(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function Y8(e){return Jb([w8(),T8(),B8(e),U8(),K8()])}const J8={};function dl(e){const t=this,r=e||J8,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Y8(r)),s.push(g8()),a.push(v8(r))}const X8=e=>{const t=String(e||"").split(/\r?\n/),r=[];let n=!1;for(let i=0;i<t.length;i+=1){const s=t[i],a=s.trim();if(a.startsWith("```")){n=!n;continue}if(n||!a)continue;const o=/^[:\-\s|]+$/.test(a)&&a.includes("|");a.startsWith("|")&&a.endsWith("|")||o||r.push({lineIndex:i,lineText:s})}return r};function Q8({t:e,activePane:t,listRef:r,showChatInfoPanel:n,repoTitle:i,activeBranchLabel:s,shortSha:a,activeCommit:o,showProviderMeta:l,activeProviderLabel:c,activeModelLabel:h,showInternetAccess:u,showGitCredentialsShared:m,activeTaskLabel:v,currentMessages:w,chatHistoryWindow:_,activeChatKey:g,setShowOlderMessagesByTab:d,showChatCommands:f,showToolResults:p,commandPanelOpen:y,setCommandPanelOpen:S,toolResultPanelOpen:b,setToolResultPanelOpen:k,renderMessageAttachments:C,currentProcessing:A,currentInteractionBlocked:P,currentActivity:O,extractVibe80Blocks:R,handleChoiceClick:M,choiceSelections:z,openVibe80Form:U,copyTextToClipboard:q,openFileInExplorer:Q,setInput:H,inputRef:I,markBacklogItemDone:L,setBacklogMessagePage:B,activeWorktreeId:D,BACKLOG_PAGE_SIZE:T,MAX_USER_DISPLAY_LENGTH:$,getTruncatedText:Y,annotationMode:W,scopedAnnotations:j,setAnnotationDraft:N,removeAnnotation:G,addOrFocusAnnotation:V}){return E.jsxs("main",{className:`chat ${t==="chat"?"":"is-hidden"}`,children:[E.jsx("div",{className:"chat-scroll",ref:r,children:E.jsx("div",{className:`chat-scroll-inner ${n?"has-meta":""}`,children:E.jsxs("div",{className:`chat-history-grid ${n?"has-meta":""} ${W?"has-annotations":""}`,children:[n&&E.jsx("div",{className:"chat-meta-rail",children:E.jsxs("div",{className:"chat-meta-card",children:[E.jsxs("div",{className:"chat-meta-section chat-meta-repo",children:[E.jsx("div",{className:"chat-meta-repo-title",children:E.jsx("span",{className:"chat-meta-repo-name",children:i})}),E.jsxs("div",{className:"chat-meta-repo-branch-line",children:[E.jsx("span",{className:"chat-meta-repo-icon","aria-hidden":"true",children:E.jsx(Be,{icon:WD})}),E.jsx("span",{className:"chat-meta-repo-branch",children:s})]}),E.jsxs("div",{className:"chat-meta-repo-commit",children:[E.jsx("span",{className:"chat-meta-hash",children:a}),E.jsx("span",{className:"chat-meta-message",children:(o==null?void 0:o.message)||""})]})]}),l&&E.jsxs("div",{className:"chat-meta-section chat-meta-provider",children:[E.jsx("span",{className:"chat-meta-provider-icon","aria-hidden":"true",children:E.jsx(Be,{icon:a6})}),E.jsx("span",{className:"chat-meta-provider-label",children:c}),E.jsx("span",{className:"chat-meta-provider-sep",children:"•"}),E.jsx("span",{className:"chat-meta-provider-model",children:h})]}),(u||m||v)&&E.jsxs("div",{className:"chat-meta-section chat-meta-permissions",children:[u&&E.jsxs("div",{className:"chat-meta-permission",children:[E.jsx("span",{className:"chat-meta-permission-icon is-internet","aria-hidden":"true",children:E.jsx(Be,{icon:n6})}),E.jsx("span",{children:e("Internet access enabled")})]}),m&&E.jsxs("div",{className:"chat-meta-permission",children:[E.jsx("span",{className:"chat-meta-permission-icon is-credentials","aria-hidden":"true",children:E.jsx(Be,{icon:VD})}),E.jsx("span",{children:e("Git credentials shared")})]}),v&&E.jsxs("span",{className:"chat-meta-task",children:[E.jsx("span",{className:"chat-meta-task-loader","aria-hidden":"true"}),E.jsx(fl,{className:"chat-meta-task-text",remarkPlugins:[dl],components:{p:({children:X})=>E.jsx("span",{children:X})},children:v})]})]})]})}),E.jsxs("div",{className:"chat-history",children:[w.length===0&&E.jsx("div",{className:"empty",children:E.jsx("p",{children:e("Send a message to start a session.")})}),_.hiddenCount>0&&E.jsx("button",{type:"button",className:"chat-history-reveal",onClick:()=>d(X=>({...X,[g]:!0})),children:e("View previous messages ({{count}})",{count:_.hiddenCount})}),_.visibleMessages.map(X=>{var ue,ve;if((X==null?void 0:X.groupType)==="commandExecution")return E.jsx("div",{className:"bubble command-execution",children:X.items.map(le=>{const Se=e("Command: {{command}}",{command:le.command||e("Command")}),ye=le.status!=="completed",Me=le.isExpandable||!!le.output,Ne=E.jsxs(E.Fragment,{children:[ye&&E.jsxs("span",{className:"loader command-execution-loader",title:e("Execution in progress"),children:[E.jsx("span",{className:"dot"}),E.jsx("span",{className:"dot"}),E.jsx("span",{className:"dot"})]}),E.jsx("span",{className:"command-execution-title",children:Se})]});return E.jsx("div",{children:Me?E.jsxs("details",{className:"command-execution-panel",open:!!y[le.id],onToggle:Ue=>{const Ke=Ue.currentTarget.open;S(Ye=>({...Ye,[le.id]:Ke}))},children:[E.jsx("summary",{className:"command-execution-summary",children:Ne}),E.jsx("pre",{className:"command-execution-output",children:le.output||""})]}):E.jsx("div",{className:"command-execution-summary is-static",children:Ne})},le.id)})},X.id);if((X==null?void 0:X.groupType)==="toolResult")return E.jsx("div",{className:"bubble command-execution",children:X.items.map(le=>{var Z,se,we,F,_e,De;const Se=(le==null?void 0:le.type)==="action_result",ye=((Z=le==null?void 0:le.action)==null?void 0:Z.request)||"",Me=((se=le==null?void 0:le.action)==null?void 0:se.arg)||"",Ne=`${ye}${Me?` ${Me}`:""}`.trim(),Ue=Se?e("User command : {{command}}",{command:Ne||e("Command")}):e("Tool: {{tool}}",{tool:((we=le.toolResult)==null?void 0:we.name)||((F=le.toolResult)==null?void 0:F.tool)||"Tool"}),Ke=Se?((_e=le==null?void 0:le.action)==null?void 0:_e.output)||le.text||"":((De=le.toolResult)==null?void 0:De.output)||le.text||"",Ye=!!Ke,Ee=E.jsxs("span",{className:"command-execution-title",children:[E.jsx("span",{className:"command-execution-tool-icon","aria-hidden":"true",children:E.jsx(Be,{icon:JD})}),E.jsx("span",{children:Ue})]}),je=`tool-${le.id}`,Ce=Se?b[je]!==!1:!!b[je];return E.jsx("div",{children:Ye?E.jsxs("details",{className:"command-execution-panel",open:Ce,onToggle:ee=>{const Ae=ee.currentTarget.open;k(Ie=>({...Ie,[je]:Ae}))},children:[E.jsx("summary",{className:"command-execution-summary",children:Ee}),E.jsx("pre",{className:"command-execution-output",children:Ke})]}):E.jsx("div",{className:"command-execution-summary is-static",children:Ee})},le.id)})},X.id);if((X==null?void 0:X.type)==="backlog_view"){const Se=(Array.isArray((ue=X.backlog)==null?void 0:ue.items)?X.backlog.items:[]).filter(Ee=>!(Ee!=null&&Ee.done)),ye=Math.max(1,Math.ceil(Se.length/T)),Me=Number.isFinite((ve=X.backlog)==null?void 0:ve.page)?X.backlog.page:0,Ne=Math.min(Math.max(0,Me),ye-1),Ue=Ne*T,Ke=Se.slice(Ue,Ue+T),Ye=D&&D!=="main"?D:"main";return E.jsx("div",{className:"bubble backlog",children:E.jsxs("details",{className:"command-execution-panel backlog-panel",open:!0,children:[E.jsx("summary",{className:"command-execution-summary",children:E.jsx("span",{className:"command-execution-title",children:e("Backlog")})}),E.jsxs("div",{className:"backlog-view",children:[Ke.length===0?E.jsx("div",{className:"backlog-empty",children:e("No pending tasks at the moment.")}):E.jsx("div",{className:"backlog-list",children:Ke.map(Ee=>E.jsxs("div",{className:"backlog-row",children:[E.jsx("input",{type:"checkbox",className:"backlog-checkbox",onChange:()=>L(Ee.id)}),E.jsx("button",{type:"button",className:"backlog-text",title:Ee.text,onClick:()=>{var je;H(Ee.text||""),(je=I.current)==null||je.focus()},children:Ee.text})]},Ee.id))}),ye>1?E.jsxs("div",{className:"backlog-pagination",children:[E.jsx("button",{type:"button",className:"backlog-page-button",disabled:Ne===0,onClick:()=>B(Ye,X.id,Math.max(0,Ne-1)),children:e("Previous")}),E.jsxs("span",{className:"backlog-page-status",children:[Ne+1," / ",ye]}),E.jsx("button",{type:"button",className:"backlog-page-button",disabled:Ne>=ye-1,onClick:()=>B(Ye,X.id,Math.min(ye-1,Ne+1)),children:e("Next")})]}):null]})]})},X.id)}if(X.role==="user"&&(X.text||"").length>$){const le=Y(X.text,$);return E.jsxs("div",{className:`bubble ${X.role}`,children:[E.jsx("div",{className:"plain-text",children:le}),C(X.attachments)]},X.id)}return E.jsx("div",{className:`bubble ${X.role}`,children:(()=>{const le=X.text||"",Se=le.startsWith("⚠️"),ye=le.replace(/^⚠️\s*/,""),{cleanedText:Me,blocks:Ne,filerefs:Ue}=R(Se?ye:le,e),Ke=W&&X.role==="assistant",Ye=E.jsx(fl,{remarkPlugins:[dl],components:{a:({node:Ee,...je})=>E.jsx("a",{...je,target:"_blank",rel:"noopener noreferrer"}),code:({node:Ee,inline:je,className:Ce,children:Z,...se})=>{const F=(Array.isArray(Z)?Z.join(""):String(Z)).replace(/\n$/,"");if(!je)return E.jsx("code",{className:Ce,...se,children:Z});const _e=F.trim(),De=!!_e&&!_e.startsWith("/")&&!_e.startsWith("~")&&!/^[a-zA-Z]+:\/\//.test(_e)&&!_e.includes("\\")&&!_e.includes(" ")&&(_e.startsWith("./")||_e.startsWith("../")||_e.includes("/")||/^[\w.-]+$/.test(_e));return E.jsxs("span",{className:`inline-code${De?" inline-code--link":""}`,children:[De?E.jsx("button",{type:"button",className:"inline-code-link",onClick:ee=>{var Ae;ee.preventDefault(),ee.stopPropagation(),H(`/open ${_e}`),(Ae=I.current)==null||Ae.focus()},children:E.jsx("code",{className:Ce,...se,children:F})}):E.jsx("code",{className:Ce,...se,children:F}),E.jsx("button",{type:"button",className:"code-copy","aria-label":e("Copy code"),title:e("Copy"),onClick:ee=>{ee.preventDefault(),ee.stopPropagation(),q(F)},children:E.jsx(Be,{icon:hd})})]})}},children:Me});return E.jsxs(E.Fragment,{children:[Ke?E.jsx("div",{className:"annotation-line-source-list",children:X8(Me).map(Ee=>E.jsxs("div",{className:"annotation-line-source-row",children:[E.jsx("div",{className:"annotation-line-source-text",children:E.jsx(fl,{remarkPlugins:[dl],components:{p:({children:je})=>E.jsx("span",{children:je}),a:({node:je,...Ce})=>E.jsx("a",{...Ce,target:"_blank",rel:"noopener noreferrer"})},children:Ee.lineText})}),E.jsx("button",{type:"button",className:"annotation-line-source-button","aria-label":e("Annotate line"),title:e("Annotate line"),onClick:()=>V({messageId:X.id,lineIndex:Ee.lineIndex,lineText:Ee.lineText}),children:E.jsx(Be,{icon:t6})})]},`${X.id}-${Ee.lineIndex}`))}):Se?E.jsxs("div",{className:"warning-message",children:[E.jsx("span",{className:"warning-icon","aria-hidden":"true",children:E.jsx(Be,{icon:r6})}),E.jsx("div",{className:"warning-body",children:Ye})]}):Ye,Ue.length?E.jsx("ul",{className:"fileref-list",children:Ue.map(Ee=>E.jsx("li",{className:"fileref-item",children:E.jsx("button",{type:"button",className:"fileref-link",onClick:je=>{je.preventDefault(),je.stopPropagation(),Q(Ee)},children:Ee})},`${X.id}-fileref-${Ee}`))}):null,Ne.map((Ee,je)=>{const Ce=`${X.id}-${je}`;if(Ee.type==="form")return E.jsx("div",{className:"vibe80-form",children:E.jsx("button",{type:"button",className:"vibe80-form-button",onClick:()=>U(Ee,Ce),children:Ee.question||e("Open form")})},Ce);const Z=z[Ce],se=Ee.choices.map((_e,De)=>({choice:_e,choiceIndex:De})),we=Z===void 0?se:[se.find(({choiceIndex:_e})=>_e===Z),...se.filter(({choiceIndex:_e})=>_e!==Z)].filter(Boolean),F=Ee.type==="yesno";return E.jsxs("div",{className:`choices ${F?"is-inline":""}`,children:[Ee.question&&E.jsx("div",{className:"choices-question",children:Ee.question}),E.jsx("div",{className:`choices-list ${Z!==void 0?"is-selected":""} ${F?"is-inline":""}`,children:we.map(({choice:_e,choiceIndex:De})=>{const ee=Z===De;return E.jsx("button",{type:"button",onClick:()=>M(_e,Ce,De),disabled:P,className:`choice-button ${ee?"is-selected":Z!==void 0?"is-muted":""}`,children:E.jsx(fl,{remarkPlugins:[dl],components:{p:({node:Ae,...Ie})=>E.jsx("span",{...Ie}),a:({node:Ae,...Ie})=>E.jsx("a",{...Ie,target:"_blank",rel:"noopener noreferrer"})},children:_e})},`${Ce}-${De}`)})})]},Ce)}),C(X.attachments)]})})()},X.id)})]}),W?E.jsx("div",{className:"chat-annotation-rail",children:E.jsxs("div",{className:"chat-annotation-card",children:[E.jsx("div",{className:"chat-annotation-title",children:e("Annotations")}),E.jsx("div",{className:"chat-annotation-subtitle",children:e("Only sent with the next message.")}),j.length===0?E.jsx("div",{className:"chat-annotation-empty",children:e("No annotations yet.")}):E.jsx("div",{className:"chat-annotation-list",children:j.map(X=>E.jsxs("div",{className:"chat-annotation-item",children:[E.jsxs("div",{className:"chat-annotation-quote",children:["> ",X.lineText]}),E.jsx("textarea",{className:"chat-annotation-input",value:X.annotationText,placeholder:e("Write annotation..."),rows:3,onChange:ne=>N(X.annotationKey,ne.target.value)}),E.jsx("button",{type:"button",className:"chat-annotation-remove",onClick:()=>G(X.annotationKey),children:e("Delete")})]},X.annotationKey))})]})}):null]})})}),A&&E.jsx("div",{className:"bubble assistant typing",children:E.jsxs("div",{className:"typing-indicator",children:[E.jsxs("div",{className:"loader",title:O||e("Processing..."),children:[E.jsx("span",{className:"dot"}),E.jsx("span",{className:"dot"}),E.jsx("span",{className:"dot"})]}),E.jsx("span",{className:"typing-text",children:O||e("Processing...")})]})})]})}var S1=1,Z8=.9,ej=.8,tj=.17,jf=.1,Bf=.999,rj=.9999,nj=.99,ij=/[\\\/_+.#"@\[\(\{&]/,sj=/[\\\/_+.#"@\[\(\{&]/g,oj=/[\s-]/,$S=/[\s-]/g;function xd(e,t,r,n,i,s,a){if(s===t.length)return i===e.length?S1:nj;var o=`${i},${s}`;if(a[o]!==void 0)return a[o];for(var l=n.charAt(s),c=r.indexOf(l,i),h=0,u,m,v,w;c>=0;)u=xd(e,t,r,n,c+1,s+1,a),u>h&&(c===i?u*=S1:ij.test(e.charAt(c-1))?(u*=ej,v=e.slice(i,c-1).match(sj),v&&i>0&&(u*=Math.pow(Bf,v.length))):oj.test(e.charAt(c-1))?(u*=Z8,w=e.slice(i,c-1).match($S),w&&i>0&&(u*=Math.pow(Bf,w.length))):(u*=tj,i>0&&(u*=Math.pow(Bf,c-i))),e.charAt(c)!==t.charAt(s)&&(u*=rj)),(u<jf&&r.charAt(c-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(c-1)!==n.charAt(s))&&(m=xd(e,t,r,n,c+1,s+2,a),m*jf>u&&(u=m*jf)),u>h&&(h=u),c=r.indexOf(l,c+1);return a[o]=h,h}function C1(e){return e.toLowerCase().replace($S," ")}function aj(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,xd(e,t,C1(e),C1(t),0,0,{})}function Mn(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function k1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Un(...e){return t=>{let r=!1;const n=e.map(i=>{const s=k1(i,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let i=0;i<n.length;i++){const s=n[i];typeof s=="function"?s():k1(e[i],null)}}}}function ki(...e){return x.useCallback(Un(...e),e)}function lj(e,t){const r=x.createContext(t),n=s=>{const{children:a,...o}=s,l=x.useMemo(()=>o,Object.values(o));return E.jsx(r.Provider,{value:l,children:a})};n.displayName=e+"Provider";function i(s){const a=x.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,i]}function cj(e,t=[]){let r=[];function n(s,a){const o=x.createContext(a),l=r.length;r=[...r,a];const c=u=>{var d;const{scope:m,children:v,...w}=u,_=((d=m==null?void 0:m[e])==null?void 0:d[l])||o,g=x.useMemo(()=>w,Object.values(w));return E.jsx(_.Provider,{value:g,children:v})};c.displayName=s+"Provider";function h(u,m){var _;const v=((_=m==null?void 0:m[e])==null?void 0:_[l])||o,w=x.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[c,h]}const i=()=>{const s=r.map(a=>x.createContext(a));return function(o){const l=(o==null?void 0:o[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[n,uj(i,...t)]}function uj(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=n.reduce((o,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...o,...u}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var Zo=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},fj=Nd[" useId ".trim().toString()]||(()=>{}),hj=0;function Zr(e){const[t,r]=x.useState(fj());return Zo(()=>{r(n=>n??String(hj++))},[e]),t?`radix-${t}`:""}var dj=Nd[" useInsertionEffect ".trim().toString()]||Zo;function pj({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,s,a]=mj({defaultProp:t,onChange:r}),o=e!==void 0,l=o?e:i;{const h=x.useRef(e!==void 0);x.useEffect(()=>{const u=h.current;u!==o&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=o},[o,n])}const c=x.useCallback(h=>{var u;if(o){const m=gj(h)?h(e):h;m!==e&&((u=a.current)==null||u.call(a,m))}else s(h)},[o,e,s,a]);return[l,c]}function mj({defaultProp:e,onChange:t}){const[r,n]=x.useState(e),i=x.useRef(r),s=x.useRef(t);return dj(()=>{s.current=t},[t]),x.useEffect(()=>{var a;i.current!==r&&((a=s.current)==null||a.call(s,r),i.current=r)},[r,i]),[r,n,s]}function gj(e){return typeof e=="function"}function ma(e){const t=vj(e),r=x.forwardRef((n,i)=>{const{children:s,...a}=n,o=x.Children.toArray(s),l=o.find(yj);if(l){const c=l.props.children,h=o.map(u=>u===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:u);return E.jsx(t,{...a,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,h):null})}return E.jsx(t,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function vj(e){const t=x.forwardRef((r,n)=>{const{children:i,...s}=r;if(x.isValidElement(i)){const a=bj(i),o=wj(s,i.props);return i.type!==x.Fragment&&(o.ref=n?Un(n,a):a),x.cloneElement(i,o)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _j=Symbol("radix.slottable");function yj(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_j}function wj(e,t){const r={...t};for(const n in t){const i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function bj(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],US=Sj.reduce((e,t)=>{const r=ma(`Primitive.${t}`),n=x.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Cj(e,t){e&&kp.flushSync(()=>e.dispatchEvent(t))}function ea(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)},[])}function kj(e,t=globalThis==null?void 0:globalThis.document){const r=ea(e);x.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var xj="DismissableLayer",Ed="dismissableLayer.update",Ej="dismissableLayer.pointerDownOutside",Aj="dismissableLayer.focusOutside",x1,HS=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),WS=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,c=x.useContext(HS),[h,u]=x.useState(null),m=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=x.useState({}),w=ki(t,k=>u(k)),_=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),d=_.indexOf(g),f=h?_.indexOf(h):-1,p=c.layersWithOutsidePointerEventsDisabled.size>0,y=f>=d,S=Tj(k=>{const C=k.target,A=[...c.branches].some(P=>P.contains(C));!y||A||(i==null||i(k),a==null||a(k),k.defaultPrevented||o==null||o())},m),b=Dj(k=>{const C=k.target;[...c.branches].some(P=>P.contains(C))||(s==null||s(k),a==null||a(k),k.defaultPrevented||o==null||o())},m);return kj(k=>{f===c.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&o&&(k.preventDefault(),o()))},m),x.useEffect(()=>{if(h)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(x1=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),E1(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=x1)}},[h,m,r,c]),x.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),E1())},[h,c]),x.useEffect(()=>{const k=()=>v({});return document.addEventListener(Ed,k),()=>document.removeEventListener(Ed,k)},[]),E.jsx(US.div,{...l,ref:w,style:{pointerEvents:p?y?"auto":"none":void 0,...e.style},onFocusCapture:Mn(e.onFocusCapture,b.onFocusCapture),onBlurCapture:Mn(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:Mn(e.onPointerDownCapture,S.onPointerDownCapture)})});WS.displayName=xj;var Lj="DismissableLayerBranch",Pj=x.forwardRef((e,t)=>{const r=x.useContext(HS),n=x.useRef(null),i=ki(t,n);return x.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),E.jsx(US.div,{...e,ref:i})});Pj.displayName=Lj;function Tj(e,t=globalThis==null?void 0:globalThis.document){const r=ea(e),n=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=o=>{if(o.target&&!n.current){let l=function(){VS(Ej,r,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Dj(e,t=globalThis==null?void 0:globalThis.document){const r=ea(e),n=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!n.current&&VS(Aj,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function E1(){const e=new CustomEvent(Ed);document.dispatchEvent(e)}function VS(e,t,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?Cj(i,s):i.dispatchEvent(s)}var Ij=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Nj=Ij.reduce((e,t)=>{const r=ma(`Primitive.${t}`),n=x.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ff="focusScope.autoFocusOnMount",zf="focusScope.autoFocusOnUnmount",A1={bubbles:!1,cancelable:!0},Rj="FocusScope",KS=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[o,l]=x.useState(null),c=ea(i),h=ea(s),u=x.useRef(null),m=ki(t,_=>l(_)),v=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let _=function(p){if(v.paused||!o)return;const y=p.target;o.contains(y)?u.current=y:yn(u.current,{select:!0})},g=function(p){if(v.paused||!o)return;const y=p.relatedTarget;y!==null&&(o.contains(y)||yn(u.current,{select:!0}))},d=function(p){if(document.activeElement===document.body)for(const S of p)S.removedNodes.length>0&&yn(o)};document.addEventListener("focusin",_),document.addEventListener("focusout",g);const f=new MutationObserver(d);return o&&f.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",g),f.disconnect()}}},[n,o,v.paused]),x.useEffect(()=>{if(o){P1.add(v);const _=document.activeElement;if(!o.contains(_)){const d=new CustomEvent(Ff,A1);o.addEventListener(Ff,c),o.dispatchEvent(d),d.defaultPrevented||(Oj(zj(GS(o)),{select:!0}),document.activeElement===_&&yn(o))}return()=>{o.removeEventListener(Ff,c),setTimeout(()=>{const d=new CustomEvent(zf,A1);o.addEventListener(zf,h),o.dispatchEvent(d),d.defaultPrevented||yn(_??document.body,{select:!0}),o.removeEventListener(zf,h),P1.remove(v)},0)}}},[o,c,h,v]);const w=x.useCallback(_=>{if(!r&&!n||v.paused)return;const g=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,d=document.activeElement;if(g&&d){const f=_.currentTarget,[p,y]=Mj(f);p&&y?!_.shiftKey&&d===y?(_.preventDefault(),r&&yn(p,{select:!0})):_.shiftKey&&d===p&&(_.preventDefault(),r&&yn(y,{select:!0})):d===f&&_.preventDefault()}},[r,n,v.paused]);return E.jsx(Nj.div,{tabIndex:-1,...a,ref:m,onKeyDown:w})});KS.displayName=Rj;function Oj(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(yn(n,{select:t}),document.activeElement!==r)return}function Mj(e){const t=GS(e),r=L1(t,e),n=L1(t.reverse(),e);return[r,n]}function GS(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function L1(e,t){for(const r of e)if(!jj(r,{upTo:t}))return r}function jj(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 Bj(e){return e instanceof HTMLInputElement&&"select"in e}function yn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Bj(e)&&t&&e.select()}}var P1=Fj();function Fj(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=T1(e,t),e.unshift(t)},remove(t){var r;e=T1(e,t),(r=e[0])==null||r.resume()}}}function T1(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function zj(e){return e.filter(t=>t.tagName!=="A")}var $j=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Uj=$j.reduce((e,t)=>{const r=ma(`Primitive.${t}`),n=x.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Hj="Portal",qS=x.forwardRef((e,t)=>{var o;const{container:r,...n}=e,[i,s]=x.useState(!1);Zo(()=>s(!0),[]);const a=r||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?O4.createPortal(E.jsx(Uj.div,{...n,ref:t}),a):null});qS.displayName=Hj;function Wj(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var lu=e=>{const{present:t,children:r}=e,n=Vj(t),i=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),s=ki(n.ref,Kj(i));return typeof r=="function"||n.isPresent?x.cloneElement(i,{ref:s}):null};lu.displayName="Presence";function Vj(e){const[t,r]=x.useState(),n=x.useRef(null),i=x.useRef(e),s=x.useRef("none"),a=e?"mounted":"unmounted",[o,l]=Wj(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=pl(n.current);s.current=o==="mounted"?c:"none"},[o]),Zo(()=>{const c=n.current,h=i.current;if(h!==e){const m=s.current,v=pl(c);e?l("MOUNT"):v==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Zo(()=>{if(t){let c;const h=t.ownerDocument.defaultView??window,u=v=>{const _=pl(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&_&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=pl(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{h.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:x.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function pl(e){return(e==null?void 0:e.animationName)||"none"}function Kj(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Gj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ga=Gj.reduce((e,t)=>{const r=ma(`Primitive.${t}`),n=x.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),$f=0;function qj(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??D1()),document.body.insertAdjacentElement("beforeend",e[1]??D1()),$f++,()=>{$f===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),$f--}},[])}function D1(){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 jr=function(){return jr=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},jr.apply(this,arguments)};function YS(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Yj(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var $l="right-scroll-bar-position",Ul="width-before-scroll-bar",Jj="with-scroll-bars-hidden",Xj="--removed-body-scroll-bar-size";function Uf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qj(e,t){var r=x.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var Zj=typeof window<"u"?x.useLayoutEffect:x.useEffect,I1=new WeakMap;function e7(e,t){var r=Qj(null,function(n){return e.forEach(function(i){return Uf(i,n)})});return Zj(function(){var n=I1.get(r);if(n){var i=new Set(n),s=new Set(e),a=r.current;i.forEach(function(o){s.has(o)||Uf(o,null)}),s.forEach(function(o){i.has(o)||Uf(o,a)})}I1.set(r,e)},[e]),r}function t7(e){return e}function r7(e,t){t===void 0&&(t=t7);var r=[],n=!1,i={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(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(o){return o!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(o){return s(o)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var o=r;r=[],o.forEach(s),a=r}var l=function(){var h=a;a=[],h.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(h){a.push(h),c()},filter:function(h){return a=a.filter(h),r}}}};return i}function n7(e){e===void 0&&(e={});var t=r7(null);return t.options=jr({async:!0,ssr:!1},e),t}var JS=function(e){var t=e.sideCar,r=YS(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,jr({},r))};JS.isSideCarExport=!0;function i7(e,t){return e.useMedium(t),JS}var XS=n7(),Hf=function(){},cu=x.forwardRef(function(e,t){var r=x.useRef(null),n=x.useState({onScrollCapture:Hf,onWheelCapture:Hf,onTouchMoveCapture:Hf}),i=n[0],s=n[1],a=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,h=e.enabled,u=e.shards,m=e.sideCar,v=e.noRelative,w=e.noIsolation,_=e.inert,g=e.allowPinchZoom,d=e.as,f=d===void 0?"div":d,p=e.gapMode,y=YS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,b=e7([r,t]),k=jr(jr({},y),i);return x.createElement(x.Fragment,null,h&&x.createElement(S,{sideCar:XS,removeScrollBar:c,shards:u,noRelative:v,noIsolation:w,inert:_,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:p}),a?x.cloneElement(x.Children.only(o),jr(jr({},k),{ref:b})):x.createElement(f,jr({},k,{className:l,ref:b}),o))});cu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};cu.classNames={fullWidth:Ul,zeroRight:$l};var s7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function o7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=s7();return t&&e.setAttribute("nonce",t),e}function a7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function l7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var c7=function(){var e=0,t=null;return{add:function(r){e==0&&(t=o7())&&(a7(t,r),l7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},u7=function(){var e=c7();return function(t,r){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},QS=function(){var e=u7(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},f7={left:0,top:0,right:0,gap:0},Wf=function(e){return parseInt(e||"",10)||0},h7=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Wf(r),Wf(n),Wf(i)]},d7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return f7;var t=h7(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])}},p7=QS(),cs="data-scroll-locked",m7=function(e,t,r,n){var i=e.left,s=e.top,a=e.right,o=e.gap;return r===void 0&&(r="margin"),`
648
- .`.concat(Jj,` {
649
- overflow: hidden `).concat(n,`;
650
- padding-right: `).concat(o,"px ").concat(n,`;
651
- }
652
- body[`).concat(cs,`] {
653
- overflow: hidden `).concat(n,`;
654
- overscroll-behavior: contain;
655
- `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
656
- padding-left: `.concat(i,`px;
657
- padding-top: `).concat(s,`px;
658
- padding-right: `).concat(a,`px;
659
- margin-left:0;
660
- margin-top:0;
661
- margin-right: `).concat(o,"px ").concat(n,`;
662
- `),r==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";")].filter(Boolean).join(""),`
663
- }
664
-
665
- .`).concat($l,` {
666
- right: `).concat(o,"px ").concat(n,`;
667
- }
668
-
669
- .`).concat(Ul,` {
670
- margin-right: `).concat(o,"px ").concat(n,`;
671
- }
672
-
673
- .`).concat($l," .").concat($l,` {
674
- right: 0 `).concat(n,`;
675
- }
676
-
677
- .`).concat(Ul," .").concat(Ul,` {
678
- margin-right: 0 `).concat(n,`;
679
- }
680
-
681
- body[`).concat(cs,`] {
682
- `).concat(Xj,": ").concat(o,`px;
683
- }
684
- `)},N1=function(){var e=parseInt(document.body.getAttribute(cs)||"0",10);return isFinite(e)?e:0},g7=function(){x.useEffect(function(){return document.body.setAttribute(cs,(N1()+1).toString()),function(){var e=N1()-1;e<=0?document.body.removeAttribute(cs):document.body.setAttribute(cs,e.toString())}},[])},v7=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;g7();var s=x.useMemo(function(){return d7(i)},[i]);return x.createElement(p7,{styles:m7(s,!t,i,r?"":"!important")})},Ad=!1;if(typeof window<"u")try{var ml=Object.defineProperty({},"passive",{get:function(){return Ad=!0,!0}});window.addEventListener("test",ml,ml),window.removeEventListener("test",ml,ml)}catch{Ad=!1}var Ii=Ad?{passive:!1}:!1,_7=function(e){return e.tagName==="TEXTAREA"},ZS=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!_7(e)&&r[t]==="visible")},y7=function(e){return ZS(e,"overflowY")},w7=function(e){return ZS(e,"overflowX")},R1=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=eC(e,n);if(i){var s=tC(e,n),a=s[1],o=s[2];if(a>o)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},b7=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},S7=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},eC=function(e,t){return e==="v"?y7(t):w7(t)},tC=function(e,t){return e==="v"?b7(t):S7(t)},C7=function(e,t){return e==="h"&&t==="rtl"?-1:1},k7=function(e,t,r,n,i){var s=C7(e,window.getComputedStyle(t).direction),a=s*n,o=r.target,l=t.contains(o),c=!1,h=a>0,u=0,m=0;do{if(!o)break;var v=tC(e,o),w=v[0],_=v[1],g=v[2],d=_-g-s*w;(w||d)&&eC(e,o)&&(u+=d,m+=w);var f=o.parentNode;o=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(h&&Math.abs(u)<1||!h&&Math.abs(m)<1)&&(c=!0),c},gl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},O1=function(e){return[e.deltaX,e.deltaY]},M1=function(e){return e&&"current"in e?e.current:e},x7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},E7=function(e){return`
685
- .block-interactivity-`.concat(e,` {pointer-events: none;}
686
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
687
- `)},A7=0,Ni=[];function L7(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),i=x.useState(A7++)[0],s=x.useState(QS)[0],a=x.useRef(e);x.useEffect(function(){a.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var _=Yj([e.lockRef.current],(e.shards||[]).map(M1),!0).filter(Boolean);return _.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=x.useCallback(function(_,g){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!a.current.allowPinchZoom;var d=gl(_),f=r.current,p="deltaX"in _?_.deltaX:f[0]-d[0],y="deltaY"in _?_.deltaY:f[1]-d[1],S,b=_.target,k=Math.abs(p)>Math.abs(y)?"h":"v";if("touches"in _&&k==="h"&&b.type==="range")return!1;var C=window.getSelection(),A=C&&C.anchorNode,P=A?A===b||A.contains(b):!1;if(P)return!1;var O=R1(k,b);if(!O)return!0;if(O?S=k:(S=k==="v"?"h":"v",O=R1(k,b)),!O)return!1;if(!n.current&&"changedTouches"in _&&(p||y)&&(n.current=S),!S)return!0;var R=n.current||S;return k7(R,g,_,R==="h"?p:y)},[]),l=x.useCallback(function(_){var g=_;if(!(!Ni.length||Ni[Ni.length-1]!==s)){var d="deltaY"in g?O1(g):gl(g),f=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&x7(S.delta,d)})[0];if(f&&f.should){g.cancelable&&g.preventDefault();return}if(!f){var p=(a.current.shards||[]).map(M1).filter(Boolean).filter(function(S){return S.contains(g.target)}),y=p.length>0?o(g,p[0]):!a.current.noIsolation;y&&g.cancelable&&g.preventDefault()}}},[]),c=x.useCallback(function(_,g,d,f){var p={name:_,delta:g,target:d,should:f,shadowParent:P7(d)};t.current.push(p),setTimeout(function(){t.current=t.current.filter(function(y){return y!==p})},1)},[]),h=x.useCallback(function(_){r.current=gl(_),n.current=void 0},[]),u=x.useCallback(function(_){c(_.type,O1(_),_.target,o(_,e.lockRef.current))},[]),m=x.useCallback(function(_){c(_.type,gl(_),_.target,o(_,e.lockRef.current))},[]);x.useEffect(function(){return Ni.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ii),document.addEventListener("touchmove",l,Ii),document.addEventListener("touchstart",h,Ii),function(){Ni=Ni.filter(function(_){return _!==s}),document.removeEventListener("wheel",l,Ii),document.removeEventListener("touchmove",l,Ii),document.removeEventListener("touchstart",h,Ii)}},[]);var v=e.removeScrollBar,w=e.inert;return x.createElement(x.Fragment,null,w?x.createElement(s,{styles:E7(i)}):null,v?x.createElement(v7,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function P7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const T7=i7(XS,L7);var rC=x.forwardRef(function(e,t){return x.createElement(cu,jr({},e,{ref:t,sideCar:T7}))});rC.classNames=cu.classNames;var D7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ri=new WeakMap,vl=new WeakMap,_l={},Vf=0,nC=function(e){return e&&(e.host||nC(e.parentNode))},I7=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=nC(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})},N7=function(e,t,r,n){var i=I7(t,Array.isArray(e)?e:[e]);_l[r]||(_l[r]=new WeakMap);var s=_l[r],a=[],o=new Set,l=new Set(i),c=function(u){!u||o.has(u)||(o.add(u),c(u.parentNode))};i.forEach(c);var h=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(m){if(o.has(m))h(m);else try{var v=m.getAttribute(n),w=v!==null&&v!=="false",_=(Ri.get(m)||0)+1,g=(s.get(m)||0)+1;Ri.set(m,_),s.set(m,g),a.push(m),_===1&&w&&vl.set(m,!0),g===1&&m.setAttribute(r,"true"),w||m.setAttribute(n,"true")}catch(d){console.error("aria-hidden: cannot operate on ",m,d)}})};return h(t),o.clear(),Vf++,function(){a.forEach(function(u){var m=Ri.get(u)-1,v=s.get(u)-1;Ri.set(u,m),s.set(u,v),m||(vl.has(u)||u.removeAttribute(n),vl.delete(u)),v||u.removeAttribute(r)}),Vf--,Vf||(Ri=new WeakMap,Ri=new WeakMap,vl=new WeakMap,_l={})}},R7=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=D7(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),N7(n,i,r,"aria-hidden")):function(){return null}},uu="Dialog",[iC]=cj(uu),[O7,Dr]=iC(uu),sC=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,o=x.useRef(null),l=x.useRef(null),[c,h]=pj({prop:n,defaultProp:i??!1,onChange:s,caller:uu});return E.jsx(O7,{scope:t,triggerRef:o,contentRef:l,contentId:Zr(),titleId:Zr(),descriptionId:Zr(),open:c,onOpenChange:h,onOpenToggle:x.useCallback(()=>h(u=>!u),[h]),modal:a,children:r})};sC.displayName=uu;var oC="DialogTrigger",M7=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Dr(oC,r),s=ki(t,i.triggerRef);return E.jsx(ga.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":mm(i.open),...n,ref:s,onClick:Mn(e.onClick,i.onOpenToggle)})});M7.displayName=oC;var dm="DialogPortal",[j7,aC]=iC(dm,{forceMount:void 0}),lC=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,s=Dr(dm,t);return E.jsx(j7,{scope:t,forceMount:r,children:x.Children.map(n,a=>E.jsx(lu,{present:r||s.open,children:E.jsx(qS,{asChild:!0,container:i,children:a})}))})};lC.displayName=dm;var Ec="DialogOverlay",cC=x.forwardRef((e,t)=>{const r=aC(Ec,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Dr(Ec,e.__scopeDialog);return s.modal?E.jsx(lu,{present:n||s.open,children:E.jsx(F7,{...i,ref:t})}):null});cC.displayName=Ec;var B7=ma("DialogOverlay.RemoveScroll"),F7=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Dr(Ec,r);return E.jsx(rC,{as:B7,allowPinchZoom:!0,shards:[i.contentRef],children:E.jsx(ga.div,{"data-state":mm(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),gi="DialogContent",uC=x.forwardRef((e,t)=>{const r=aC(gi,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Dr(gi,e.__scopeDialog);return E.jsx(lu,{present:n||s.open,children:s.modal?E.jsx(z7,{...i,ref:t}):E.jsx($7,{...i,ref:t})})});uC.displayName=gi;var z7=x.forwardRef((e,t)=>{const r=Dr(gi,e.__scopeDialog),n=x.useRef(null),i=ki(t,r.contentRef,n);return x.useEffect(()=>{const s=n.current;if(s)return R7(s)},[]),E.jsx(fC,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Mn(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Mn(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:Mn(e.onFocusOutside,s=>s.preventDefault())})}),$7=x.forwardRef((e,t)=>{const r=Dr(gi,e.__scopeDialog),n=x.useRef(!1),i=x.useRef(!1);return E.jsx(fC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(n.current||(o=r.triggerRef.current)==null||o.focus(),s.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((c=r.triggerRef.current)==null?void 0:c.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),fC=x.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,o=Dr(gi,r),l=x.useRef(null),c=ki(t,l);return qj(),E.jsxs(E.Fragment,{children:[E.jsx(KS,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s,children:E.jsx(WS,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":mm(o.open),...a,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(V7,{titleId:o.titleId}),E.jsx(G7,{contentRef:l,descriptionId:o.descriptionId})]})]})}),pm="DialogTitle",U7=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Dr(pm,r);return E.jsx(ga.h2,{id:i.titleId,...n,ref:t})});U7.displayName=pm;var hC="DialogDescription",H7=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Dr(hC,r);return E.jsx(ga.p,{id:i.descriptionId,...n,ref:t})});H7.displayName=hC;var dC="DialogClose",W7=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Dr(dC,r);return E.jsx(ga.button,{type:"button",...n,ref:t,onClick:Mn(e.onClick,()=>i.onOpenChange(!1))})});W7.displayName=dC;function mm(e){return e?"open":"closed"}var pC="DialogTitleWarning",[zz,mC]=lj(pC,{contentName:gi,titleName:pm,docsSlug:"dialog"}),V7=({titleId:e})=>{const t=mC(pC),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
688
-
689
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
690
-
691
- 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},K7="DialogDescriptionWarning",G7=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mC(K7).contentName}}.`;return x.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},q7=sC,Y7=lC,J7=cC,X7=uC,Q7=Symbol.for("react.lazy"),Ac=Nd[" use ".trim().toString()];function Z7(e){return typeof e=="object"&&e!==null&&"then"in e}function gC(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Q7&&"_payload"in e&&Z7(e._payload)}function eB(e){const t=tB(e),r=x.forwardRef((n,i)=>{let{children:s,...a}=n;gC(s)&&typeof Ac=="function"&&(s=Ac(s._payload));const o=x.Children.toArray(s),l=o.find(nB);if(l){const c=l.props.children,h=o.map(u=>u===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:u);return E.jsx(t,{...a,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,h):null})}return E.jsx(t,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function tB(e){const t=x.forwardRef((r,n)=>{let{children:i,...s}=r;if(gC(i)&&typeof Ac=="function"&&(i=Ac(i._payload)),x.isValidElement(i)){const a=sB(i),o=iB(s,i.props);return i.type!==x.Fragment&&(o.ref=n?Un(n,a):a),x.cloneElement(i,o)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rB=Symbol("radix.slottable");function nB(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rB}function iB(e,t){const r={...t};for(const n in t){const i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function sB(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var oB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qn=oB.reduce((e,t)=>{const r=eB(`Primitive.${t}`),n=x.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),no='[cmdk-group=""]',Kf='[cmdk-group-items=""]',aB='[cmdk-group-heading=""]',vC='[cmdk-item=""]',j1=`${vC}:not([aria-disabled="true"])`,Ld="cmdk-item-select",zi="data-value",lB=(e,t,r)=>aj(e,t,r),_C=x.createContext(void 0),va=()=>x.useContext(_C),yC=x.createContext(void 0),gm=()=>x.useContext(yC),wC=x.createContext(void 0),bC=x.forwardRef((e,t)=>{let r=$i(()=>{var D,T;return{search:"",value:(T=(D=e.value)!=null?D:e.defaultValue)!=null?T:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=$i(()=>new Set),i=$i(()=>new Map),s=$i(()=>new Map),a=$i(()=>new Set),o=kC(e),{label:l,children:c,value:h,onValueChange:u,filter:m,shouldFilter:v,loop:w,disablePointerSelection:_=!1,vimBindings:g=!0,...d}=e,f=Zr(),p=Zr(),y=Zr(),S=x.useRef(null),b=_B();vi(()=>{if(h!==void 0){let D=h.trim();r.current.value=D,k.emit()}},[h]),vi(()=>{b(6,M)},[]);let k=x.useMemo(()=>({subscribe:D=>(a.current.add(D),()=>a.current.delete(D)),snapshot:()=>r.current,setState:(D,T,$)=>{var Y,W,j,N;if(!Object.is(r.current[D],T)){if(r.current[D]=T,D==="search")R(),P(),b(1,O);else if(D==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let G=document.getElementById(y);G?G.focus():(Y=document.getElementById(f))==null||Y.focus()}if(b(7,()=>{var G;r.current.selectedItemId=(G=z())==null?void 0:G.id,k.emit()}),$||b(5,M),((W=o.current)==null?void 0:W.value)!==void 0){let G=T??"";(N=(j=o.current).onValueChange)==null||N.call(j,G);return}}k.emit()}},emit:()=>{a.current.forEach(D=>D())}}),[]),C=x.useMemo(()=>({value:(D,T,$)=>{var Y;T!==((Y=s.current.get(D))==null?void 0:Y.value)&&(s.current.set(D,{value:T,keywords:$}),r.current.filtered.items.set(D,A(T,$)),b(2,()=>{P(),k.emit()}))},item:(D,T)=>(n.current.add(D),T&&(i.current.has(T)?i.current.get(T).add(D):i.current.set(T,new Set([D]))),b(3,()=>{R(),P(),r.current.value||O(),k.emit()}),()=>{s.current.delete(D),n.current.delete(D),r.current.filtered.items.delete(D);let $=z();b(4,()=>{R(),($==null?void 0:$.getAttribute("id"))===D&&O(),k.emit()})}),group:D=>(i.current.has(D)||i.current.set(D,new Set),()=>{s.current.delete(D),i.current.delete(D)}),filter:()=>o.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:f,inputId:y,labelId:p,listInnerRef:S}),[]);function A(D,T){var $,Y;let W=(Y=($=o.current)==null?void 0:$.filter)!=null?Y:lB;return D?W(D,r.current.search,T):0}function P(){if(!r.current.search||o.current.shouldFilter===!1)return;let D=r.current.filtered.items,T=[];r.current.filtered.groups.forEach(Y=>{let W=i.current.get(Y),j=0;W.forEach(N=>{let G=D.get(N);j=Math.max(G,j)}),T.push([Y,j])});let $=S.current;U().sort((Y,W)=>{var j,N;let G=Y.getAttribute("id"),V=W.getAttribute("id");return((j=D.get(V))!=null?j:0)-((N=D.get(G))!=null?N:0)}).forEach(Y=>{let W=Y.closest(Kf);W?W.appendChild(Y.parentElement===W?Y:Y.closest(`${Kf} > *`)):$.appendChild(Y.parentElement===$?Y:Y.closest(`${Kf} > *`))}),T.sort((Y,W)=>W[1]-Y[1]).forEach(Y=>{var W;let j=(W=S.current)==null?void 0:W.querySelector(`${no}[${zi}="${encodeURIComponent(Y[0])}"]`);j==null||j.parentElement.appendChild(j)})}function O(){let D=U().find($=>$.getAttribute("aria-disabled")!=="true"),T=D==null?void 0:D.getAttribute(zi);k.setState("value",T||void 0)}function R(){var D,T,$,Y;if(!r.current.search||o.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let W=0;for(let j of n.current){let N=(T=(D=s.current.get(j))==null?void 0:D.value)!=null?T:"",G=(Y=($=s.current.get(j))==null?void 0:$.keywords)!=null?Y:[],V=A(N,G);r.current.filtered.items.set(j,V),V>0&&W++}for(let[j,N]of i.current)for(let G of N)if(r.current.filtered.items.get(G)>0){r.current.filtered.groups.add(j);break}r.current.filtered.count=W}function M(){var D,T,$;let Y=z();Y&&(((D=Y.parentElement)==null?void 0:D.firstChild)===Y&&(($=(T=Y.closest(no))==null?void 0:T.querySelector(aB))==null||$.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function z(){var D;return(D=S.current)==null?void 0:D.querySelector(`${vC}[aria-selected="true"]`)}function U(){var D;return Array.from(((D=S.current)==null?void 0:D.querySelectorAll(j1))||[])}function q(D){let T=U()[D];T&&k.setState("value",T.getAttribute(zi))}function Q(D){var T;let $=z(),Y=U(),W=Y.findIndex(N=>N===$),j=Y[W+D];(T=o.current)!=null&&T.loop&&(j=W+D<0?Y[Y.length-1]:W+D===Y.length?Y[0]:Y[W+D]),j&&k.setState("value",j.getAttribute(zi))}function H(D){let T=z(),$=T==null?void 0:T.closest(no),Y;for(;$&&!Y;)$=D>0?gB($,no):vB($,no),Y=$==null?void 0:$.querySelector(j1);Y?k.setState("value",Y.getAttribute(zi)):Q(D)}let I=()=>q(U().length-1),L=D=>{D.preventDefault(),D.metaKey?I():D.altKey?H(1):Q(1)},B=D=>{D.preventDefault(),D.metaKey?q(0):D.altKey?H(-1):Q(-1)};return x.createElement(qn.div,{ref:t,tabIndex:-1,...d,"cmdk-root":"",onKeyDown:D=>{var T;(T=d.onKeyDown)==null||T.call(d,D);let $=D.nativeEvent.isComposing||D.keyCode===229;if(!(D.defaultPrevented||$))switch(D.key){case"n":case"j":{g&&D.ctrlKey&&L(D);break}case"ArrowDown":{L(D);break}case"p":case"k":{g&&D.ctrlKey&&B(D);break}case"ArrowUp":{B(D);break}case"Home":{D.preventDefault(),q(0);break}case"End":{D.preventDefault(),I();break}case"Enter":{D.preventDefault();let Y=z();if(Y){let W=new Event(Ld);Y.dispatchEvent(W)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:wB},l),fu(e,D=>x.createElement(yC.Provider,{value:k},x.createElement(_C.Provider,{value:C},D))))}),SC=x.forwardRef((e,t)=>{var r,n;let i=Zr(),s=x.useRef(null),a=x.useContext(wC),o=va(),l=kC(e),c=(n=(r=l.current)==null?void 0:r.forceMount)!=null?n:a==null?void 0:a.forceMount;vi(()=>{if(!c)return o.item(i,a==null?void 0:a.id)},[c]);let h=xC(i,s,[e.value,e.children,s],e.keywords),u=gm(),m=Hn(b=>b.value&&b.value===h.current),v=Hn(b=>c||o.filter()===!1?!0:b.search?b.filtered.items.get(i)>0:!0);x.useEffect(()=>{let b=s.current;if(!(!b||e.disabled))return b.addEventListener(Ld,w),()=>b.removeEventListener(Ld,w)},[v,e.onSelect,e.disabled]);function w(){var b,k;_(),(k=(b=l.current).onSelect)==null||k.call(b,h.current)}function _(){u.setState("value",h.current,!0)}if(!v)return null;let{disabled:g,value:d,onSelect:f,forceMount:p,keywords:y,...S}=e;return x.createElement(qn.div,{ref:Un(s,t),...S,id:i,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!m,"data-disabled":!!g,"data-selected":!!m,onPointerMove:g||o.getDisablePointerSelection()?void 0:_,onClick:g?void 0:w},e.children)}),cB=x.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...s}=e,a=Zr(),o=x.useRef(null),l=x.useRef(null),c=Zr(),h=va(),u=Hn(v=>i||h.filter()===!1?!0:v.search?v.filtered.groups.has(a):!0);vi(()=>h.group(a),[]),xC(a,o,[e.value,e.heading,l]);let m=x.useMemo(()=>({id:a,forceMount:i}),[i]);return x.createElement(qn.div,{ref:Un(o,t),...s,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},r&&x.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),fu(e,v=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},x.createElement(wC.Provider,{value:m},v))))}),uB=x.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=x.useRef(null),s=Hn(a=>!a.search);return!r&&!s?null:x.createElement(qn.div,{ref:Un(i,t),...n,"cmdk-separator":"",role:"separator"})}),fB=x.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,s=gm(),a=Hn(c=>c.search),o=Hn(c=>c.selectedItemId),l=va();return x.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),x.createElement(qn.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":o,id:l.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||s.setState("search",c.target.value),r==null||r(c.target.value)}})}),CC=x.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,s=x.useRef(null),a=x.useRef(null),o=Hn(c=>c.selectedItemId),l=va();return x.useEffect(()=>{if(a.current&&s.current){let c=a.current,h=s.current,u,m=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let v=c.offsetHeight;h.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return m.observe(c),()=>{cancelAnimationFrame(u),m.unobserve(c)}}},[]),x.createElement(qn.div,{ref:Un(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":n,id:l.listId},fu(e,c=>x.createElement("div",{ref:Un(a,l.listInnerRef),"cmdk-list-sizer":""},c)))}),hB=x.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:s,container:a,...o}=e;return x.createElement(q7,{open:r,onOpenChange:n},x.createElement(Y7,{container:a},x.createElement(J7,{"cmdk-overlay":"",className:i}),x.createElement(X7,{"aria-label":e.label,"cmdk-dialog":"",className:s},x.createElement(bC,{ref:t,...o}))))}),dB=x.forwardRef((e,t)=>Hn(r=>r.filtered.count===0)?x.createElement(qn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),pB=x.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...s}=e;return x.createElement(qn.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},fu(e,a=>x.createElement("div",{"aria-hidden":!0},a)))}),mB=Object.assign(bC,{List:CC,Item:SC,Input:fB,Group:cB,Separator:uB,Dialog:hB,Empty:dB,Loading:pB});function gB(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function vB(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function kC(e){let t=x.useRef(e);return vi(()=>{t.current=e}),t}var vi=typeof window>"u"?x.useEffect:x.useLayoutEffect;function $i(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function Hn(e){let t=gm(),r=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,r,r)}function xC(e,t,r,n=[]){let i=x.useRef(),s=va();return vi(()=>{var a;let o=(()=>{var c;for(let h of r){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(c=h.current.textContent)==null?void 0:c.trim():i.current}})(),l=n.map(c=>c.trim());s.value(e,o,l),(a=t.current)==null||a.setAttribute(zi,o),i.current=o}),i}var _B=()=>{let[e,t]=x.useState(),r=$i(()=>new Map);return vi(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function yB(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function fu({asChild:e,children:t},r){return e&&x.isValidElement(t)?x.cloneElement(yB(t),{ref:t.ref},r(t.props.children)):r(t)}var wB={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function bB({t:e,activePane:t,isDraggingAttachments:r,onSubmit:n,onDragEnterComposer:i,onDragOverComposer:s,onDragLeaveComposer:a,onDropAttachments:o,composerRef:l,draftAttachments:c,getAttachmentExtension:h,formatAttachmentSize:u,removeDraftAttachment:m,commandMenuOpen:v,filteredCommands:w,setInput:_,setCommandMenuOpen:g,setCommandQuery:d,inputRef:f,commandSelection:p,triggerAttachmentPicker:y,attachmentSession:S,attachmentsLoading:b,isMobileLayout:k,uploadInputRef:C,onUploadAttachments:A,input:P,handleInputChange:O,handleComposerKeyDown:R,onPasteAttachments:M,canInterrupt:z,interruptTurn:U,connected:q,modelSelectorVisible:Q,modelOptions:H,selectedModel:I,modelLoading:L,modelDisabled:B,modelError:D,onModelChange:T,isCodexReady:$,interactionBlocked:Y,attachmentsError:W}){return t!=="chat"?null:E.jsx("form",{className:`composer composer--sticky ${r?"is-dragging":""}`,onSubmit:n,onDragEnter:i,onDragOver:s,onDragLeave:a,onDrop:o,ref:l,children:E.jsxs("div",{className:"composer-inner",children:[c.length?E.jsx("div",{className:"composer-attachments","aria-label":e("Selected attachments"),children:c.map(j=>{const N=(j==null?void 0:j.name)||(j==null?void 0:j.path)||"",G=(j==null?void 0:j.path)||(j==null?void 0:j.name)||N,V=h(j,e),X=j!=null&&j.lineCount||j!=null&&j.lines?e("{{count}} lines",{count:j.lineCount||j.lines}):u(j==null?void 0:j.size,e);return E.jsxs("div",{className:"attachment-card",children:[E.jsxs("div",{className:"attachment-card-body",children:[E.jsx("div",{className:"attachment-card-title",children:N}),X?E.jsx("div",{className:"attachment-card-meta",children:X}):null]}),E.jsxs("div",{className:"attachment-card-footer",children:[E.jsx("span",{className:"attachment-card-type",children:V}),E.jsx("button",{type:"button",className:"attachment-card-remove","aria-label":e("Remove {{label}}",{label:N}),onClick:()=>m((j==null?void 0:j.path)||(j==null?void 0:j.name)),children:E.jsx(Be,{icon:si})})]})]},G)})}):null,v&&E.jsx("div",{className:"composer-command-menu",children:E.jsx(mB,{className:"command-menu",shouldFilter:!1,children:E.jsx(CC,{children:w.length?w.map(j=>E.jsxs(SC,{onSelect:()=>{var N;_(j.insert),g(!1),d(""),(N=f.current)==null||N.focus()},className:`command-item${j.id===p?" is-selected":""}`,children:[E.jsx("span",{className:"command-item-label",children:j.label}),E.jsx("span",{className:"command-item-desc",children:j.description})]},j.id)):E.jsx("div",{className:"command-empty",children:e("No commands found.")})})})}),E.jsxs("div",{className:"composer-main",children:[E.jsxs("button",{type:"button",className:"icon-button composer-attach-button","aria-label":e("Add attachment"),onClick:y,disabled:!S||b,children:["+",k?E.jsx("span",{className:"attachment-badge",children:c.length}):null]}),E.jsx("input",{ref:C,type:"file",multiple:!0,onChange:A,disabled:!S||b,className:"visually-hidden"}),E.jsx("textarea",{className:"composer-input",value:P,onChange:O,onKeyDown:R,onPaste:M,placeholder:e("Write your message…"),rows:1,ref:f}),Q?E.jsxs("select",{className:"composer-model-select",value:I||"",onChange:j=>T==null?void 0:T(j.target.value),disabled:B,"aria-label":e("Model"),title:D||e("Model"),children:[L?E.jsx("option",{value:"",children:e("Loading...")}):null,E.jsx("option",{value:"",children:e("Default model")}),(Array.isArray(H)?H:[]).map(j=>E.jsx("option",{value:j.model||"",children:j.displayName||j.model||""},j.id||j.model))]}):null,z?E.jsx("button",{type:"button",className:"primary stop-button",onClick:U,"aria-label":e("Stop"),title:e("Stop"),children:E.jsx("span",{className:"stop-icon",children:"⏹"})}):E.jsx("button",{type:"submit",className:"primary send-button",disabled:!q||!P.trim()||!$||Y,"aria-label":e("Send"),title:e("Send"),children:E.jsx("span",{className:"send-icon",children:"➤"})})]}),W&&E.jsx("div",{className:"attachments-error composer-attachments-error",children:W})]})})}function SB({t:e,activePane:t,handleViewSelect:r,handleDiffSelect:n,terminalEnabled:i,hasMessages:s,handleClearChat:a}){return t==="settings"?null:E.jsxs("div",{className:"chat-toolbar",role:"toolbar","aria-label":e("Chat tools"),children:[E.jsxs("div",{className:"chat-toolbar-group",children:[E.jsxs("button",{type:"button",className:`chat-toolbar-button ${t==="chat"?"is-active":""}`,onClick:()=>r("chat"),"aria-pressed":t==="chat","aria-label":e("Messages"),title:e("Messages"),children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon",children:E.jsx(Be,{icon:ZD})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Messages")})]}),E.jsxs("button",{type:"button",className:`chat-toolbar-button ${t==="diff"?"is-active":""}`,onClick:n,"aria-pressed":t==="diff","aria-label":e("Diff"),title:e("Diff"),children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon",children:E.jsx(Be,{icon:o6})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Diff")})]}),E.jsxs("button",{type:"button",className:`chat-toolbar-button ${t==="explorer"?"is-active":""}`,onClick:()=>r("explorer"),"aria-pressed":t==="explorer","aria-label":e("Explorer"),title:e("Explorer"),children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon",children:E.jsx(Be,{icon:i6})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Explorer")})]}),E.jsxs("button",{type:"button",className:`chat-toolbar-button ${t==="terminal"?"is-active":""}`,onClick:()=>r("terminal"),"aria-pressed":t==="terminal","aria-label":e("Terminal"),title:e("Terminal"),disabled:!i,children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon",children:E.jsx(Be,{icon:XD})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Terminal")})]})]}),E.jsx("div",{className:"chat-toolbar-divider"}),E.jsx("div",{className:"chat-toolbar-group",children:E.jsxs("button",{type:"button",className:"chat-toolbar-button is-danger",onClick:()=>a(),"aria-label":e("Clear"),title:e("Clear"),disabled:!s,children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon","aria-hidden":"true",children:E.jsx(Be,{icon:YD})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Clear")})]})})]})}function CB({t:e,input:t,setInput:r,inputRef:n,handleSendMessageRef:i,attachmentSession:s,apiFetch:a,normalizeAttachments:o,setDraftAttachments:l,draftAttachments:c,setAttachmentsLoading:h,setAttachmentsError:u,showToast:m,uploadInputRef:v,attachmentsLoading:w,conversationRef:_,composerRef:g,isMobileLayout:d}){const[f,p]=x.useState(!1),[y,S]=x.useState(""),[b,k]=x.useState(null),[C,A]=x.useState(!1),P=x.useRef(0),O=x.useMemo(()=>[{id:"todo",label:"/todo",description:e("Add to backlog"),insert:"/todo "},{id:"backlog",label:"/backlog",description:e("Show backlog"),insert:"/backlog"},{id:"open",label:"/open",description:e("Open path"),insert:"/open "},{id:"run",label:"/run",description:e("Run shell command"),insert:"/run "},{id:"screenshot",label:"/screenshot",description:e("Capture screenshot"),insert:"/screenshot"},{id:"git",label:"/git",description:e("Run git command"),insert:"/git "},{id:"diff",label:"/diff",description:e("Open diff view"),insert:"/diff"},{id:"annotation",label:"/annotation",description:e("Toggle annotation mode (EXPERIMENTAL)"),insert:"/annotation on"}],[e]),R=x.useMemo(()=>{const W=y.trim().toLowerCase();return W?O.filter(j=>j.label.toLowerCase().includes(W)):O},[O,y]);x.useEffect(()=>{if(!f){k(null);return}if(!R.length){k(null);return}k(W=>R.some(j=>j.id===W)?W:R[0].id)},[f,R]);const M=x.useCallback(W=>{const{value:j}=W.target;r(j),j.startsWith("/")&&!j.includes(" ")?(p(!0),S(j.slice(1))):(p(!1),S("")),n.current&&(n.current.style.height="auto",n.current.style.height=`${n.current.scrollHeight}px`)},[n,r]),z=x.useCallback(W=>{var j,N;if(f){if(W.key==="Escape"){W.preventDefault(),p(!1);return}if(W.key==="ArrowDown"){if(W.preventDefault(),!R.length)return;const G=R.findIndex(X=>X.id===b),V=G===-1||G===R.length-1?0:G+1;k(R[V].id);return}if(W.key==="ArrowUp"){if(W.preventDefault(),!R.length)return;const G=R.findIndex(X=>X.id===b),V=G<=0?R.length-1:G-1;k(R[V].id);return}if(W.key==="Enter"&&!W.shiftKey&&b){W.preventDefault();const G=R.find(V=>V.id===b);G&&(r(G.insert),p(!1),S(""),(j=n.current)==null||j.focus());return}}W.isComposing||W.key==="Enter"&&!W.shiftKey&&(W.preventDefault(),(N=i.current)==null||N.call(i))},[f,R,b,i,n,r]);x.useEffect(()=>{n.current&&(n.current.style.height="auto",n.current.style.height=`${n.current.scrollHeight}px`)},[t,d,n]),x.useEffect(()=>{if(!_.current||!g.current)return;const W=()=>{if(!_.current||!g.current)return;const N=g.current.getBoundingClientRect(),G=d?12:16;_.current.style.setProperty("--composer-space",`${Math.ceil(N.height+G)}px`)};W();let j;return typeof ResizeObserver<"u"&&(j=new ResizeObserver(W),j.observe(g.current)),window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W),j&&j.disconnect()}},[d,c.length,_,g]);const U=x.useCallback(async W=>{if(!(!W.length||!(s!=null&&s.sessionId)))try{h(!0),u("");const j=new FormData;W.forEach(X=>j.append("files",X));const N=await a(`/api/v1/sessions/${encodeURIComponent(s.sessionId)}/attachments/upload`,{method:"POST",body:j});if(!N.ok)throw new Error("Upload failed.");const G=await N.json(),V=o(G.files||[]);l(X=>[...X,...V])}catch(j){u(j.message||e("Unable to upload attachments."))}finally{h(!1)}},[a,s==null?void 0:s.sessionId,o,u,h,l,e]),q=x.useCallback(async()=>{var W;if(!(s!=null&&s.sessionId)){m(e("Session not found."),"error");return}if(!((W=navigator.mediaDevices)!=null&&W.getDisplayMedia)){m(e("Screenshot failed."),"error");return}try{const j=await navigator.mediaDevices.getDisplayMedia({video:{cursor:"never"},audio:!1}),N=document.createElement("video");N.srcObject=j,await new Promise(ve=>{N.onloadedmetadata=()=>ve()}),await N.play();const G=document.createElement("canvas");G.width=N.videoWidth||1,G.height=N.videoHeight||1;const V=G.getContext("2d");if(!V)throw new Error("Canvas unavailable");V.drawImage(N,0,0,G.width,G.height),j.getTracks().forEach(ve=>ve.stop());const X=await new Promise((ve,le)=>{G.toBlob(Se=>Se?ve(Se):le(new Error("Blob failed")),"image/png")}),ne=`screenshot-${Date.now()}.png`,ue=new File([X],ne,{type:"image/png"});await U([ue]),m(e("Screenshot captured."))}catch(j){m((j==null?void 0:j.message)||e("Screenshot failed."),"error")}},[s==null?void 0:s.sessionId,m,e,U]),Q=x.useCallback(async W=>{const j=Array.from(W.target.files||[]);await U(j),W.target.value=""},[U]),H=x.useCallback(async W=>{var G;if(!(s!=null&&s.sessionId))return;const N=Array.from(((G=W.clipboardData)==null?void 0:G.items)||[]).filter(V=>V.kind==="file").map(V=>V.getAsFile()).filter(Boolean);N.length&&(W.preventDefault(),await U(N))},[s==null?void 0:s.sessionId,U]),I=x.useCallback(W=>{var j,N;s!=null&&s.sessionId&&(N=(j=W.dataTransfer)==null?void 0:j.types)!=null&&N.includes("Files")&&W.preventDefault()},[s==null?void 0:s.sessionId]),L=x.useCallback(W=>{var j,N;s!=null&&s.sessionId&&(N=(j=W.dataTransfer)==null?void 0:j.types)!=null&&N.includes("Files")&&(W.preventDefault(),P.current+=1,A(!0))},[s==null?void 0:s.sessionId]),B=x.useCallback(W=>{var j,N;s!=null&&s.sessionId&&(N=(j=W.dataTransfer)==null?void 0:j.types)!=null&&N.includes("Files")&&(W.preventDefault(),P.current=Math.max(0,P.current-1),P.current===0&&A(!1))},[s==null?void 0:s.sessionId]),D=x.useCallback(async W=>{var N;if(!(s!=null&&s.sessionId))return;W.preventDefault(),W.stopPropagation(),P.current=0,A(!1);const j=Array.from(((N=W.dataTransfer)==null?void 0:N.files)||[]);j.length&&await U(j)},[s==null?void 0:s.sessionId,U]),T=x.useCallback(W=>{W&&l(j=>j.filter(N=>((N==null?void 0:N.path)||(N==null?void 0:N.name))!==W))},[l]),$=x.useCallback(()=>{!s||w||requestAnimationFrame(()=>{var W;(W=v.current)==null||W.click()})},[s,w,v]),Y=x.useCallback(W=>{var j;W.preventDefault(),(j=i.current)==null||j.call(i)},[i]);return{commandMenuOpen:f,setCommandMenuOpen:p,commandQuery:y,setCommandQuery:S,commandSelection:b,filteredCommands:R,isDraggingAttachments:C,handleInputChange:M,handleComposerKeyDown:z,onSubmit:Y,onUploadAttachments:Q,onPasteAttachments:H,onDragOverComposer:I,onDragEnterComposer:L,onDragLeaveComposer:B,onDropAttachments:D,removeDraftAttachment:T,triggerAttachmentPicker:$,captureScreenshot:q}}function kB({attachmentSessionId:e,workspaceToken:t,socketRef:r,reconnectTimerRef:n,reconnectAttemptRef:i,closingRef:s,pingIntervalRef:a,lastPongRef:o,messageIndex:l,commandIndex:c,rpcLogsEnabledRef:h,mergeAndApplyMessages:u,requestMessageSync:m,requestWorktreesList:v,requestWorktreeMessages:w,applyWorktreesList:_,resyncSession:g,t:d,setStatus:f,setConnected:p,setAppServerReady:y,setHasMainWorktreeStatus:S,setMessages:b,setProcessing:k,setActivity:C,setCurrentTurnId:A,setMainTaskLabel:P,setModelLoading:O,setModelError:R,setModels:M,setProviderModelState:z,setSelectedModel:U,setSelectedReasoningEffort:q,setRepoDiff:Q,setRpcLogs:H,setWorktrees:I,setPaneByTab:L,setLogFilterByTab:B,setActiveWorktreeId:D,activeWorktreeIdRef:T,extractVibe80Task:$,extractFirstLine:Y,getItemActivityLabel:W,maybeNotify:j,normalizeAttachments:N,loadRepoLastCommit:G,loadBranches:V,loadWorktreeLastCommit:X,openAiLoginRequest:ne,setOpenAiLoginRequest:ue,connected:ve}){x.useEffect(()=>{if(!e||!t)return;let le=!0,Se=null;const ye=()=>{n.current&&(clearTimeout(n.current),n.current=null)},Me=()=>{a.current&&(clearInterval(a.current),a.current=null)},Ne=()=>{Se&&(clearInterval(Se),Se=null)},Ue=()=>{Me(),o.current=Date.now(),a.current=setInterval(()=>{const Ce=r.current;if(!Ce||Ce.readyState!==WebSocket.OPEN)return;if(document.hidden){o.current=Date.now();return}if(Date.now()-o.current>15e3){Ce.close();return}Ce.send(JSON.stringify({type:"ping"}))},1e4)},Ke=()=>{Ne();const Ce=()=>{const Z=r.current;if(!Z||Z.readyState!==WebSocket.OPEN)return;const se=(T==null?void 0:T.current)||"main";Z.send(JSON.stringify({type:"wake_up",worktreeId:se}))};Ce(),Se=setInterval(Ce,60*1e3)},Ye=()=>{if(!le)return;const Ce=Math.min(i.current+1,6);i.current=Ce;const we=Math.min(500*2**(Ce-1),1e4),F=Math.floor(Math.random()*250);ye(),n.current=setTimeout(()=>{Ee()},we+F)},Ee=()=>{if(!le)return;f(d("Connecting..."));const Ce=new WebSocket(`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/ws?session=${encodeURIComponent(e)}`);r.current=Ce;let Z=!1;const se=()=>r.current===Ce;Ce.addEventListener("open",()=>{se()&&Ce.send(JSON.stringify({type:"auth",token:t}))}),Ce.addEventListener("close",()=>{se()&&(p(!1),f(d("Disconnected")),y(!1),Me(),Ne(),s.current||Ye())}),Ce.addEventListener("error",()=>{se()&&Ce.close()}),Ce.addEventListener("message",we=>{var St,ce,he;if(!se())return;let F;try{F=JSON.parse(we.data)}catch{return}const _e=typeof F.worktreeId=="string"?F.worktreeId:"",De=_e.length>0,ee=_e==="main",Ae=De&&!ee,Ie=ee||!De;if(Ie&&(F.type==="assistant_delta"||F.type==="command_execution_delta"||F.type==="command_execution_completed"||F.type==="item_started")&&(k(J=>J||!0),C(d("Processing..."))),F.type==="auth_ok"){if(!Z){Z=!0,i.current=0,ye(),p(!0),f(d("Connected")),Ue(),Ke(),g(),m(),v();const J=r.current;if(J&&J.readyState===WebSocket.OPEN){const K=(T==null?void 0:T.current)||"main";J.send(JSON.stringify({type:"wake_up",worktreeId:K}))}}return}if(Z){if(F.type==="pong"&&(o.current=Date.now()),F.type==="status"&&(f(F.message),F.provider==="codex"&&y(!1)),F.type==="ready"&&(f(d("Ready")),y(!0)),F.type==="provider_status"&&F.provider==="codex"&&y(F.status==="ready"),Ie&&F.type==="assistant_delta"){if(typeof F.delta!="string")return;b(J=>{const K=[...J],te=K.findIndex(ae=>(ae==null?void 0:ae.id)===F.itemId);if(te===-1)return K.push({id:F.itemId,role:"assistant",text:F.delta}),K;const ie={...K[te]};return ie.text+=F.delta,K[te]=ie,K})}if(Ie&&F.type==="assistant_message"){if(typeof F.text!="string")return;const J=$(F.text);J&&P(J),j({id:F.itemId,text:F.text}),b(K=>{const te=[...K],ie=te.findIndex(ae=>(ae==null?void 0:ae.id)===F.itemId);return ie===-1?(te.push({id:F.itemId,role:"assistant",text:F.text}),te):(te[ie]={...te[ie],text:F.text},te)})}if(Ie&&F.type==="action_request"){if(!F.id)return;b(J=>{const K=[...J];return K.findIndex(ie=>(ie==null?void 0:ie.id)===F.id)===-1&&K.push({id:F.id,role:"user",type:"action_request",text:F.text||`/${F.request||"run"} ${F.arg||""}`.trim(),action:{request:F.request,arg:F.arg}}),K})}if(Ie&&F.type==="action_result"){if(!F.id)return;b(J=>{const K=[...J],te=K.findIndex(ae=>(ae==null?void 0:ae.id)===F.id),ie={id:F.id,role:"assistant",type:"action_result",text:F.text||"",action:{request:F.request,arg:F.arg,status:F.status,output:F.output}};return te===-1?K.push(ie):K[te]={...K[te],...ie},K}),(F.request==="run"||F.request==="git")&&(G(),typeof V=="function"&&V())}if(Ie&&F.type==="backlog_view"){if(!F.id)return;b(J=>{const K=[...J];return K.findIndex(ie=>(ie==null?void 0:ie.id)===F.id)===-1&&K.push({id:F.id,role:"assistant",type:"backlog_view",text:F.text||"Backlog",backlog:{items:Array.isArray(F.items)?F.items:[],page:Number.isFinite(F.page)?F.page:0}}),K})}if(Ie&&F.type==="command_execution_delta"){if(typeof F.delta!="string")return;b(J=>{const K=[...J],te=c.get(F.itemId);if(te===void 0){const ae={id:F.itemId,role:"commandExecution",command:d("Command"),output:F.delta,isExpandable:!0,status:"running"};return c.set(F.itemId,K.length),K.push(ae),K}const ie={...K[te]};return ie.output=`${ie.output||""}${F.delta}`,ie.isExpandable=!0,K[te]=ie,K})}if(Ie&&F.type==="command_execution_completed"){const J=F.item,K=F.itemId||(J==null?void 0:J.id);if(!K)return;b(te=>{var Ge;const ie=[...te],ae=c.get(K),oe=((Ge=J==null?void 0:J.commandActions)==null?void 0:Ge.command)||(J==null?void 0:J.command)||d("Command");if(ae===void 0){const We={id:K,role:"commandExecution",command:oe,output:(J==null?void 0:J.aggregatedOutput)||"",isExpandable:!0,status:"completed"};return c.set(K,ie.length),ie.push(We),ie}const ge={...ie[ae]};return ge.command=oe,ge.output=(J==null?void 0:J.aggregatedOutput)||ge.output||"",ge.isExpandable=!0,ge.status="completed",ie[ae]=ge,ie})}if(Ie&&F.type==="turn_error"&&(f(d("Error: {{message}}",{message:F.message})),A(null),P("")),Ie&&F.type==="agent_reasoning"){const J=Y(F.text);J&&P(J)}if(Ie&&F.type==="error"&&(f(F.message||d("Unexpected error")),O(!1),R(F.message||d("Unexpected error"))),Ae&&F.type==="error"&&I(J=>{const K=new Map(J),te=K.get(_e);return te?(K.set(_e,{...te,modelLoading:!1,modelError:F.message||d("Unexpected error")}),K):J}),Ie&&F.type==="turn_started"&&A(F.turnId||null),Ie&&F.type==="turn_completed"){const J=((St=F==null?void 0:F.turn)==null?void 0:St.error)||(F==null?void 0:F.error)||null;if((J==null?void 0:J.codexErrorInfo)==="usageLimitExceeded"){const te=`usage-limit-${F.turnId||((ce=F.turn)==null?void 0:ce.id)||Date.now()}`,ie=(typeof J=="string"?J:J==null?void 0:J.message)||d("Usage limit reached. Please try again later.");b(ae=>ae.some(oe=>oe.id===te)?ae:[...ae,{id:te,role:"assistant",text:`⚠️ ${ie}`}])}A(null),P(""),G()}if(Ie&&F.type==="repo_diff"&&Q({status:F.status||"",diff:F.diff||""}),Ie&&F.type==="model_list"){const J=Array.isArray(F.models)?F.models:[];M(J),F.provider&&z(te=>({...te,[F.provider]:{models:J,loading:!1,error:""}}));const K=J.find(te=>te.isDefault);K!=null&&K.model&&U(K.model),K!=null&&K.defaultReasoningEffort&&q(K.defaultReasoningEffort),O(!1),R("")}if(Ae&&F.type==="model_list"){const J=Array.isArray(F.models)?F.models:[];I(K=>{const te=new Map(K),ie=te.get(_e);if(!ie)return K;const ae=J.find(ge=>ge.isDefault),oe=ie.model||(ae==null?void 0:ae.model)||null;return te.set(_e,{...ie,models:J,model:oe,modelLoading:!1,modelError:""}),te})}if(Ie&&F.type==="model_set"&&(U(F.model||""),F.reasoningEffort!==void 0&&q(F.reasoningEffort||""),O(!1),R("")),Ae&&F.type==="model_set"&&I(J=>{const K=new Map(J),te=K.get(_e);return te?(K.set(_e,{...te,model:F.model||null,reasoningEffort:F.reasoningEffort??te.reasoningEffort??null,modelLoading:!1,modelError:""}),K):J}),Ie&&F.type==="rpc_log"){if(!h.current)return;F.entry&&H(J=>[...J,F.entry])}if(Ie&&F.type==="session_sync"){if(!(F!=null&&F.session))return;const J=F.session;b((J.messages||[]).map((K,te)=>({...K,id:(K==null?void 0:K.id)||`history-${te}`,attachments:N((K==null?void 0:K.attachments)||[]),toolResult:K==null?void 0:K.toolResult}))),Q(J.repoDiff||{status:"",diff:""}),J.provider&&z(K=>({...K,[J.provider]:{models:J.models||[],loading:!1,error:""}}))}if(Ie&&F.type==="worktrees_list"&&_(F.worktrees||[]),Ie&&F.type==="worktree_messages_sync"){if(F.worktreeId==="main"){u(F.messages||[]);return}I(J=>{const K=new Map(J),te=K.get(F.worktreeId);if(te){const ie=(F.messages||[]).map((ge,Ge)=>({...ge,id:(ge==null?void 0:ge.id)||`history-${Ge}`,attachments:N((ge==null?void 0:ge.attachments)||[]),toolResult:ge==null?void 0:ge.toolResult})),ae=new Set(te.messages.map(ge=>ge==null?void 0:ge.id).filter(Boolean)),oe=[...te.messages];ie.forEach(ge=>{ge!=null&&ge.id&&ae.has(ge.id)||(ge!=null&&ge.id&&ae.add(ge.id),oe.push(ge))}),K.set(F.worktreeId,{...te,messages:oe,status:F.status??te.status})}return K})}if(F.type==="worktree_diff"&&I(J=>{const K=new Map(J),te=K.get(F.worktreeId);return te&&K.set(F.worktreeId,{...te,diff:{status:F.status,diff:F.diff}}),K}),Ae&&(F.type==="assistant_delta"||F.type==="assistant_message"||F.type==="action_request"||F.type==="action_result"||F.type==="backlog_view"||F.type==="command_execution_delta"||F.type==="command_execution_completed"||F.type==="turn_started"||F.type==="turn_completed"||F.type==="turn_error")){const J=F.worktreeId;if((F.type==="assistant_delta"||F.type==="command_execution_delta"||F.type==="command_execution_completed"||F.type==="item_started")&&I(K=>{const te=new Map(K),ie=te.get(J);return ie&&ie.status==="ready"&&te.set(J,{...ie,status:"processing"}),te}),F.type==="turn_started"&&I(K=>{const te=new Map(K),ie=te.get(J);return ie&&te.set(J,{...ie,currentTurnId:F.turnId,activity:d("Processing...")}),te}),F.type==="action_request"){if(!F.id)return;I(K=>{const te=new Map(K),ie=te.get(J);return ie&&te.set(J,{...ie,messages:[...ie.messages,{id:F.id,role:"user",type:"action_request",text:F.text||`/${F.request||"run"} ${F.arg||""}`.trim(),action:{request:F.request,arg:F.arg}}]}),te})}if(F.type==="action_result"){if(!F.id)return;I(K=>{const te=new Map(K),ie=te.get(J)||{id:J,name:J,branchName:"",provider:"codex",status:"processing",messages:[],models:[],modelLoading:!1,modelError:"",activity:"",currentTurnId:null};return ie.messages.some(ae=>(ae==null?void 0:ae.id)===F.id)?K:(te.set(J,{...ie,messages:[...ie.messages,{id:F.id,role:"assistant",type:"action_result",text:F.text||"",action:{request:F.request,arg:F.arg,status:F.status,output:F.output}}]}),te)}),(F.request==="run"||F.request==="git")&&(X(J),typeof V=="function"&&J==="main"&&V())}if(F.type==="backlog_view"){if(!F.id)return;I(K=>{const te=new Map(K),ie=te.get(J);return ie&&te.set(J,{...ie,messages:[...ie.messages,{id:F.id,role:"assistant",type:"backlog_view",text:F.text||"Backlog",backlog:{items:Array.isArray(F.items)?F.items:[],page:Number.isFinite(F.page)?F.page:0}}]}),te})}if((F.type==="turn_completed"||F.type==="turn_error")&&I(K=>{const te=new Map(K),ie=te.get(J);return ie&&te.set(J,{...ie,currentTurnId:null,activity:"",taskLabel:""}),te}),F.type==="turn_completed"){const K=((he=F==null?void 0:F.turn)==null?void 0:he.error)||(F==null?void 0:F.error)||null;if((K==null?void 0:K.codexErrorInfo)==="usageLimitExceeded"){const ie=`usage-limit-${F.turnId||Date.now()}`,ae=(typeof K=="string"?K:K==null?void 0:K.message)||d("Usage limit reached. Please try again later.");I(oe=>{const ge=new Map(oe),Ge=ge.get(J);return!Ge||Ge.messages.some(We=>We.id===ie)?oe:(ge.set(J,{...Ge,messages:[...Ge.messages,{id:ie,role:"assistant",text:`⚠️ ${ae}`}]}),ge)})}X(J)}if((F.type==="assistant_delta"||F.type==="assistant_message")&&(I(K=>{const te=new Map(K),ie=te.get(J);if(!ie)return K;const ae=[...ie.messages],oe=ae.findIndex(ge=>ge.id===F.itemId);return F.type==="assistant_delta"?oe===-1?ae.push({id:F.itemId,role:"assistant",text:F.delta||""}):ae[oe]={...ae[oe],text:(ae[oe].text||"")+(F.delta||"")}:oe===-1?ae.push({id:F.itemId,role:"assistant",text:F.text||""}):ae[oe]={...ae[oe],text:F.text||""},te.set(J,{...ie,messages:ae}),te}),F.type==="assistant_message"&&typeof F.text=="string")){const K=$(F.text);K&&I(te=>{const ie=new Map(te),ae=ie.get(J);return ae?(ie.set(J,{...ae,taskLabel:K}),ie):te})}(F.type==="command_execution_delta"||F.type==="command_execution_completed")&&I(K=>{var Ge,We;const te=new Map(K),ie=te.get(J);if(!ie)return K;const ae=[...ie.messages],oe=F.itemId||((Ge=F.item)==null?void 0:Ge.id),ge=ae.findIndex(Je=>Je.id===oe);if(F.type==="command_execution_delta")ge===-1?ae.push({id:oe,role:"commandExecution",command:d("Command"),output:F.delta||"",status:"running",isExpandable:!0}):ae[ge]={...ae[ge],output:(ae[ge].output||"")+(F.delta||"")};else{const Je=F.item,xt=((We=Je==null?void 0:Je.commandActions)==null?void 0:We.command)||(Je==null?void 0:Je.command)||d("Command");ge===-1?ae.push({id:oe,role:"commandExecution",command:xt,output:(Je==null?void 0:Je.aggregatedOutput)||"",status:"completed",isExpandable:!0}):ae[ge]={...ae[ge],command:xt,output:(Je==null?void 0:Je.aggregatedOutput)||ae[ge].output||"",status:"completed"}}return te.set(J,{...ie,messages:ae}),te})}if(F.type==="agent_reasoning"&&Ae){const J=Y(F.text);J&&I(K=>{const te=new Map(K),ie=te.get(F.worktreeId);return ie?(te.set(F.worktreeId,{...ie,taskLabel:J}),te):K})}if(F.type==="item_started"&&Ae){const J=W(F.item);if(!J)return;const K=F.worktreeId;I(te=>{const ie=new Map(te),ae=ie.get(K);return ae&&ie.set(K,{...ae,activity:J}),ie})}if(F.type==="worktree_created"&&(I(J=>{const K=new Map(J);return K.set(F.worktreeId,{id:F.worktreeId,name:F.name,branchName:F.branchName,provider:F.provider,model:F.model||null,reasoningEffort:F.reasoningEffort||null,internetAccess:!!F.internetAccess,denyGitCredentialsAccess:typeof F.denyGitCredentialsAccess=="boolean"?F.denyGitCredentialsAccess:!0,status:F.status||"creating",color:F.color,models:[],modelLoading:!1,modelError:"",messages:[],activity:"",currentTurnId:null}),K}),L(J=>({...J,[F.worktreeId]:J[F.worktreeId]||"chat"})),B(J=>({...J,[F.worktreeId]:J[F.worktreeId]||"all"})),D(F.worktreeId)),F.type==="worktree_ready"&&I(J=>{const K=new Map(J),te=K.get(F.worktreeId);return te&&K.set(F.worktreeId,{...te,status:"ready"}),K}),F.type==="worktree_status"){if(F.worktreeId==="main"){if(!F.status)return;S==null||S(!0);const J=F.status;k(J==="processing"),C(J==="processing"?d("Processing..."):""),J!=="processing"&&P("");return}if(!F.status)return;I(J=>{const K=new Map(J),te=K.get(F.worktreeId);return te&&K.set(F.worktreeId,{...te,status:F.status,error:F.error||null,...F.status==="processing"?{}:{activity:"",taskLabel:"",currentTurnId:null}}),K})}F.type==="worktree_removed"&&(I(J=>{const K=new Map(J);return K.delete(F.worktreeId),K}),L(J=>{const K={...J};return delete K[F.worktreeId],K}),B(J=>{const K={...J};return delete K[F.worktreeId],K}),T.current===F.worktreeId&&D("main")),F.type==="worktree_renamed"&&I(J=>{const K=new Map(J),te=K.get(F.worktreeId);return te&&K.set(F.worktreeId,{...te,name:F.name}),K})}})};Ee();const je=()=>{if(document.hidden||!le)return;o.current=Date.now();const Ce=r.current;if(Ce&&Ce.readyState===WebSocket.OPEN){Ce.send(JSON.stringify({type:"ping"})),g(),m();const Z=(T==null?void 0:T.current)||"main";Ce.send(JSON.stringify({type:"wake_up",worktreeId:Z}))}else ye(),i.current=0,Ee()};return document.addEventListener("visibilitychange",je),()=>{le=!1,s.current=!0,ye(),Me(),document.removeEventListener("visibilitychange",je),r.current&&r.current.close(),Ne(),s.current=!1}},[e,t,l,c,u,m,v,w,_,g,d]),x.useEffect(()=>{if(!e||!ne||!ve)return;const le=r.current;!le||le.readyState!==WebSocket.OPEN||(le.send(JSON.stringify({type:"account_login_start",provider:"codex",params:ne})),ue(null))},[e,ve,ne,ue,r])}const Hl="workspaceToken",Wl="workspaceRefreshToken",Vl="workspaceId",xB="workspace-auth",io="workspaceRefreshLock",EB=15e3,AB=5e3,B1=1500,LB="mono_auth_token",Gf=()=>{try{return localStorage.getItem(Hl)||""}catch{return""}},F1=()=>{try{return localStorage.getItem(Wl)||""}catch{return""}},z1=()=>{try{return localStorage.getItem(Vl)||""}catch{return""}},PB=()=>{const e=String(window.location.hash||"");if(!e||!e.startsWith("#"))return"";const t=e.slice(1);return(new URLSearchParams(t).get("mono_auth")||"").trim()},TB=()=>({codex:{enabled:!1,authType:"api_key",authValue:"",previousAuthType:"api_key"},claude:{enabled:!1,authType:"api_key",authValue:"",previousAuthType:"api_key"}}),DB=()=>({codex:!1,claude:!1}),$1=()=>({codex:"",claude:""});function IB({t:e,encodeBase64:t,copyTextToClipboard:r,extractRepoName:n,setSessionMode:i,showToast:s,getProviderAuthType:a}){const[o,l]=x.useState(1),[c,h]=x.useState("existing"),[u,m]=x.useState(z1()),[v,w]=x.useState(""),[_,g]=x.useState(Gf()),[d,f]=x.useState(F1()),[p,y]=x.useState(z1()),[S,b]=x.useState(null),[k,C]=x.useState(""),[A,P]=x.useState(!1),[O,R]=x.useState([]),[M,z]=x.useState(!1),[U,q]=x.useState(""),[Q,H]=x.useState(null),[I,L]=x.useState({id:!1,secret:!1}),[B,D]=x.useState(!1),[T,$]=x.useState(1),[Y,W]=x.useState(DB),[j,N]=x.useState($1),[G,V]=x.useState(TB),[X,ne]=x.useState(null),ue=x.useRef(`tab-${Math.random().toString(36).slice(2)}-${Date.now()}`),ve=x.useRef(_),le=x.useRef(d),Se=x.useRef(null),ye=x.useRef(null),Me=x.useRef([]),Ne=x.useRef({id:null,secret:null}),Ue=x.useCallback(({token:ce="",refreshToken:he=""}={})=>{typeof ce=="string"&&(ve.current=ce,g(ce)),typeof he=="string"&&(le.current=he,f(he))},[]),Ke=x.useCallback(ce=>{Me.current.splice(0).forEach(J=>{try{J(ce||null)}catch{}})},[]),Ye=x.useCallback((ce=AB)=>new Promise(he=>{const J=setTimeout(()=>{const te=Me.current.indexOf(K);te>=0&&Me.current.splice(te,1),he(null)},ce),K=te=>{clearTimeout(J),he(te||null)};Me.current.push(K)}),[]),Ee=x.useCallback((ce,he={})=>{const J=ye.current;if(J)try{J.postMessage({type:ce,sourceTabId:ue.current,...he})}catch{}},[]),je=x.useCallback(()=>{const ce=Gf(),he=F1();return{token:ce||ve.current||"",refreshToken:he||le.current||""}},[]),Ce=x.useCallback(()=>{const ce=Date.now(),he={owner:ue.current,expiresAt:ce+EB};try{const J=localStorage.getItem(io);if(J){const ie=JSON.parse(J);if(ie&&typeof ie.expiresAt=="number"&&ie.expiresAt>ce&&ie.owner!==ue.current)return!1}localStorage.setItem(io,JSON.stringify(he));const K=localStorage.getItem(io);if(!K)return!1;const te=JSON.parse(K);return(te==null?void 0:te.owner)===ue.current}catch{return!0}},[]),Z=x.useCallback(()=>{try{const ce=localStorage.getItem(io);if(!ce)return;const he=JSON.parse(ce);(he==null?void 0:he.owner)===ue.current&&localStorage.removeItem(io)}catch{}},[]),se=x.useCallback(()=>{Ue({token:"",refreshToken:""}),y(""),m(""),w(""),b(null),C(""),h("existing"),R([]),q(""),z(!1),l(1),D(!1),i&&i("new"),Ee("workspace_left",{}),Ke(null)},[Ue,Ee,Ke,i]),we=x.useCallback(async()=>{const ce=le.current||je().refreshToken;if(!ce)return null;if(Se.current)return Se.current;const he=(async()=>{let J=!1;try{if(J=Ce(),!J){const Ge=await Ye();if(Ge)return Ge;const We=je();if(We.token&&We.token!==ve.current)return Ue({token:We.token,refreshToken:We.refreshToken||le.current}),We.token;if(J=Ce(),!J)return null}Ee("refresh_started",{at:Date.now()});const te=je().refreshToken||ce;if(!te)return null;const ie=await fetch("/api/v1/workspaces/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:te})});if(!ie.ok){const Ge=await Ye(B1);if(Ge)return Ge;const We=je();return We.token&&We.token!==ve.current?(Ue({token:We.token,refreshToken:We.refreshToken||le.current}),We.token):null}const ae=await ie.json(),oe=(ae==null?void 0:ae.workspaceToken)||"",ge=(ae==null?void 0:ae.refreshToken)||"";return oe&&ge?(Ue({token:oe,refreshToken:ge}),Ee("refresh_succeeded",{at:Date.now(),workspaceToken:oe,refreshToken:ge}),Ke(oe),oe):null}catch{const K=await Ye(B1);return K||null}finally{J&&Z(),Se.current=null}})();return Se.current=he,he},[Ce,Ue,Ee,je,Ke,Z,Ye]);x.useEffect(()=>{ve.current=_},[_]),x.useEffect(()=>{le.current=d},[d]),x.useEffect(()=>{if(typeof BroadcastChannel!="function")return;const ce=new BroadcastChannel(xB);ye.current=ce;const he=J=>{const K=J==null?void 0:J.data;!K||K.sourceTabId===ue.current||(K.type==="refresh_succeeded"?(Ue({token:K.workspaceToken||"",refreshToken:K.refreshToken||""}),Ke(K.workspaceToken||null)):K.type==="workspace_left"&&(Ue({token:"",refreshToken:""}),y("")))};return ce.addEventListener("message",he),()=>{ce.removeEventListener("message",he),ce.close(),ye.current=null}},[Ue,Ke]),x.useEffect(()=>{const ce=he=>{if(!(!he||!he.key)){if(he.key===Hl){const J=he.newValue||"";ve.current=J,g(J),J&&Ke(J);return}if(he.key===Wl){const J=he.newValue||"";le.current=J,f(J);return}he.key===Vl&&y(he.newValue||"")}};return window.addEventListener("storage",ce),()=>{window.removeEventListener("storage",ce)}},[Ke]);const F=x.useCallback(async(ce,he={})=>{const J=new Headers(he.headers||{}),K=ve.current||_;K&&J.set("Authorization",`Bearer ${K}`);const te=await fetch(ce,{...he,headers:J});if(te.status!==401)return te;const ie=await we();if(!ie){const oe=ve.current||Gf();if(oe&&oe!==K){const ge=new Headers(he.headers||{});return ge.set("Authorization",`Bearer ${oe}`),fetch(ce,{...he,headers:ge})}return se(),te}const ae=new Headers(he.headers||{});return ae.set("Authorization",`Bearer ${ie}`),fetch(ce,{...he,headers:ae})},[_,we,se]);x.useEffect(()=>{let ce=!1;return(async()=>{try{const J=await fetch("/api/v1/health");if(!J.ok)return;const K=await J.json();!ce&&(K!=null&&K.deploymentMode)&&ne(K.deploymentMode)}catch{}})(),()=>{ce=!0}},[]),x.useEffect(()=>{const ce=PB();if(!ce)return;let he=!1;return(async()=>{try{const K=await fetch("/api/v1/workspaces/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantType:LB,monoAuthToken:ce})});if(!K.ok){const ie=await K.json().catch(()=>null),ae=(ie==null?void 0:ie.error)||e("Automatic mono-user authentication failed.");he||C(ae);return}const te=await K.json();if(!(te!=null&&te.workspaceToken))return;he||(g(te.workspaceToken||""),f(te.refreshToken||""),y("default"),m("default"),l(4),C(""))}catch{he||C(e("Automatic mono-user authentication failed."))}finally{const K=new URL(window.location.href);K.hash.includes("mono_auth=")&&(K.hash="",window.history.replaceState({},"",K))}})(),()=>{he=!0}},[_,e,y,m,f,l,g,C]),x.useEffect(()=>{try{_?localStorage.setItem(Hl,_):localStorage.removeItem(Hl)}catch{}},[_]),x.useEffect(()=>{try{d?localStorage.setItem(Wl,d):localStorage.removeItem(Wl)}catch{}},[d]),x.useEffect(()=>{try{p?localStorage.setItem(Vl,p):localStorage.removeItem(Vl)}catch{}},[p]),x.useEffect(()=>{if(!_){l(1);return}l(ce=>ce>=3?ce:4)},[_]);const _e=x.useCallback(async()=>{if(_){z(!0),q("");try{const ce=await F("/api/v1/sessions");if(!ce.ok){const K=await ce.json().catch(()=>null);throw new Error((K==null?void 0:K.error)||e("Unable to load sessions."))}const he=await ce.json(),J=Array.isArray(he==null?void 0:he.sessions)?he.sessions:[];R(J)}catch(ce){q(ce.message||e("Unable to load sessions."))}finally{z(!1)}}},[F,_,se,e]);x.useEffect(()=>{!_||o!==4||_e()},[o,_,_e]);const De=x.useCallback(async()=>{const ce=(p||u||"").trim();if(ce){P(!0),C("");try{const he=await F(`/api/v1/workspaces/${encodeURIComponent(ce)}`);if(!he.ok){const te=await he.json().catch(()=>null);throw new Error((te==null?void 0:te.error)||e("Unable to load providers."))}const J=await he.json(),K=(J==null?void 0:J.providers)||{};V(te=>{var ie,ae,oe,ge,Ge,We,Je,xt,xi,Xe;return{codex:{...te.codex,enabled:!!((ie=K==null?void 0:K.codex)!=null&&ie.enabled),authType:((oe=(ae=K==null?void 0:K.codex)==null?void 0:ae.auth)==null?void 0:oe.type)||"api_key",previousAuthType:((Ge=(ge=K==null?void 0:K.codex)==null?void 0:ge.auth)==null?void 0:Ge.type)||"api_key",authValue:""},claude:{...te.claude,enabled:!!((We=K==null?void 0:K.claude)!=null&&We.enabled),authType:((xt=(Je=K==null?void 0:K.claude)==null?void 0:Je.auth)==null?void 0:xt.type)||"api_key",previousAuthType:((Xe=(xi=K==null?void 0:K.claude)==null?void 0:xi.auth)==null?void 0:Xe.type)||"api_key",authValue:""}}}),W(te=>{var ie,ae;return{...te,codex:!!((ie=K==null?void 0:K.codex)!=null&&ie.enabled),claude:!!((ae=K==null?void 0:K.claude)!=null&&ae.enabled)}}),N($1())}catch(he){C(he.message||e("Unable to load providers."))}finally{P(!1)}}},[F,se,e,p,u]),ee=async ce=>{ce.preventDefault(),C(""),P(!0);try{if(c==="existing"){const he=u.trim(),J=v.trim();if(!he||!J)throw new Error(e("Workspace ID and secret are required."));const K=await F("/api/v1/workspaces/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceId:he,workspaceSecret:J})});if(!K.ok){const ie=await K.json().catch(()=>null);throw new Error((ie==null?void 0:ie.error)||e("Authentication failed."))}const te=await K.json();g(te.workspaceToken||""),f(te.refreshToken||""),y(he),l(4);return}D(!1),$(1),l(2)}catch(he){C(he.message||e("Workspace configuration failed."))}finally{P(!1)}},Ae=async ce=>{ce.preventDefault(),C(""),P(!0);try{const he={};if(["codex","claude"].forEach(ae=>{const oe=G[ae];if(!(oe!=null&&oe.enabled)){he[ae]={enabled:!1};return}const ge=(oe.authValue||"").trim(),Ge=a(ae,oe)||"api_key";if(B&&oe.previousAuthType&&Ge!==oe.previousAuthType&&!ge)throw new Error(e("Key required for {{provider}}.",{provider:ae}));if(!B&&!ge)throw new Error(e("Key required for {{provider}}.",{provider:ae}));if(ge){const We=Ge==="auth_json_b64"&&t?t(ge):ge;he[ae]={enabled:!0,auth:{type:Ge,value:We}}}else he[ae]={enabled:!0,auth:{type:Ge}}}),Object.keys(he).length===0)throw new Error(e("Select at least one provider."));if(B){const ae=(p||u||"").trim();if(!ae)throw new Error(e("Workspace ID required."));const oe=await F(`/api/v1/workspaces/${encodeURIComponent(ae)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providers:he})});if(!oe.ok){const ge=await oe.json().catch(()=>null);throw new Error((ge==null?void 0:ge.error)||e("Workspace update failed."))}await oe.json().catch(()=>null),D(!1),l(4),s==null||s(e("AI providers updated."),"success");return}const J=await F("/api/v1/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providers:he})});if(!J.ok){const ae=await J.json().catch(()=>null);throw new Error((ae==null?void 0:ae.error)||e("Workspace creation failed."))}const K=await J.json();b(K),y(K.workspaceId),m(K.workspaceId);const te=await F("/api/v1/workspaces/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceId:K.workspaceId,workspaceSecret:K.workspaceSecret})});if(!te.ok){const ae=await te.json().catch(()=>null);throw new Error((ae==null?void 0:ae.error)||e("Authentication failed."))}const ie=await te.json();g(ie.workspaceToken||""),f(ie.refreshToken||""),l(3)}catch(he){C(he.message||e("Workspace configuration failed."))}finally{P(!1)}},Ie=x.useCallback((ce,he)=>{if(!he)return;r&&r(he),L(K=>({...K,[ce]:!0}));const J=Ne.current;J[ce]&&clearTimeout(J[ce]),J[ce]=setTimeout(()=>{L(K=>({...K,[ce]:!1})),J[ce]=null},2e3)},[]);return x.useEffect(()=>()=>{Object.values(Ne.current||{}).forEach(ce=>{ce&&clearTimeout(ce)})},[]),{apiFetch:F,deploymentMode:X,handleDeleteSession:async ce=>{const he=ce==null?void 0:ce.sessionId;if(!he)return;const J=n==null?void 0:n((ce==null?void 0:ce.repoUrl)||""),K=(ce==null?void 0:ce.name)||J||he;if(window.confirm(e('Supprimer la session "{{title}}" ? Cette action est irreversible.',{title:K})))try{H(he),q("");const ie=await F(`/api/v1/sessions/${encodeURIComponent(he)}`,{method:"DELETE"});if(!ie.ok){let ae="";try{const ge=await ie.json();typeof(ge==null?void 0:ge.error)=="string"&&(ae=ge.error)}catch{}const oe=ae?`: ${ae}`:"";throw new Error(e("Unable to delete the session{{suffix}}.",{suffix:oe}))}await _e(),s==null||s(e('Session "{{title}}" supprimee.',{title:K}),"success")}catch(ie){q(ie.message||e("Unable to delete the session."))}finally{H(null)}},handleLeaveWorkspace:se,handleWorkspaceCopy:Ie,handleWorkspaceProvidersSubmit:Ae,handleWorkspaceSubmit:ee,loadWorkspaceProviders:De,loadWorkspaceSessions:_e,providersBackStep:T,refreshWorkspaceToken:we,setProvidersBackStep:$,setWorkspaceAuthExpanded:W,setWorkspaceAuthFiles:N,setWorkspaceError:C,setWorkspaceId:y,setWorkspaceIdInput:m,setWorkspaceMode:h,setWorkspaceProviders:V,setWorkspaceProvidersEditing:D,setWorkspaceRefreshToken:f,setWorkspaceSecretInput:w,setWorkspaceStep:l,setWorkspaceToken:g,workspaceAuthExpanded:Y,workspaceAuthFiles:j,workspaceBusy:A,workspaceCopied:I,workspaceCreated:S,workspaceError:k,workspaceId:p,workspaceIdInput:u,workspaceMode:c,workspaceProviders:G,workspaceProvidersEditing:B,workspaceSecretInput:v,workspaceSessionDeletingId:Q,workspaceSessions:O,workspaceSessionsError:U,workspaceSessionsLoading:M,workspaceStep:o,workspaceToken:_}}function NB({apiFetch:e,attachmentSessionId:t,availableProviders:r,llmProvider:n,messagesRef:i,normalizeAttachments:s,applyMessages:a,socketRef:o,setPaneByTab:l,setLogFilterByTab:c,showToast:h,t:u}){const[m,v]=x.useState(new Map),w=x.useRef(new Map),[_,g]=x.useState("main"),d=x.useRef("main");x.useEffect(()=>{w.current=m},[m]),x.useEffect(()=>{d.current=_},[_]);const f=x.useCallback(R=>{var M;if(!Array.isArray(R))return null;for(let z=R.length-1;z>=0;z-=1)if((M=R[z])!=null&&M.id)return R[z].id;return null},[]),p=x.useCallback(async()=>{if(t)try{const R=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/main/messages`);if(!R.ok)return;const M=await R.json().catch(()=>({}));if(Array.isArray(M==null?void 0:M.messages)){const z=M.messages.map((U,q)=>({...U,id:(U==null?void 0:U.id)||`history-${q}`,attachments:s((U==null?void 0:U.attachments)||[]),toolResult:U==null?void 0:U.toolResult}));a(z)}}catch{}},[t,e,a,s]),y=x.useCallback(async R=>{if(!(!t||!R)){if(R==="main"){await p();return}try{const M=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}`);if(!M.ok)return;const z=await M.json().catch(()=>({})),U=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}/messages`);if(!U.ok)return;const q=await U.json().catch(()=>({}));if(!Array.isArray(q==null?void 0:q.messages))return;const Q=q.messages.map((H,I)=>({...H,id:(H==null?void 0:H.id)||`history-${I}`,attachments:s((H==null?void 0:H.attachments)||[]),toolResult:H==null?void 0:H.toolResult}));v(H=>{const I=new Map(H),L=I.get(R);return L&&I.set(R,{...L,messages:Q,status:z.status||L.status}),I})}catch{}}},[t,e,p,s]),S=x.useCallback(R=>{var q;const M=o==null?void 0:o.current;if(!M||M.readyState!==WebSocket.OPEN||!R)return;const z=w.current,U=f(R==="main"?i.current:(q=z.get(R))==null?void 0:q.messages);M.send(JSON.stringify({type:"worktree_messages_sync",worktreeId:R,lastSeenMessageId:U}))},[f,i,o]),b=x.useCallback(R=>{if(!Array.isArray(R))return;const M=new Map;R.forEach(z=>{M.set(z.id,{...z,status:(z==null?void 0:z.status)||"processing",messages:[],models:[],modelLoading:!1,modelError:"",activity:"",currentTurnId:null})}),v(M),l(z=>{const U={...z};return R.forEach(q=>{U[q.id]||(U[q.id]="chat")}),U}),c(z=>{const U={...z};return R.forEach(q=>{U[q.id]||(U[q.id]="all")}),U}),d.current!=="main"&&!R.some(z=>z.id===d.current)&&g("main")},[c,l]),k=x.useCallback(async()=>{if(t)try{const R=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees`);if(!R.ok)return;const M=await R.json();b(M==null?void 0:M.worktrees)}catch{}},[t,e,b]),C=x.useCallback(R=>{if(!R)return;g(R);const M=o==null?void 0:o.current;M&&M.readyState===WebSocket.OPEN&&M.send(JSON.stringify({type:"wake_up",worktreeId:R})),y(R)},[y,o]),A=x.useCallback(async({context:R,name:M,provider:z,sourceWorktree:U,startingBranch:q,model:Q,reasoningEffort:H,internetAccess:I,denyGitCredentialsAccess:L})=>{if(!t){h==null||h(u("Session not found."),"error");return}try{const B=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:R==="fork"?"fork":"new",provider:R==="new"?r.includes(z)?z:n:void 0,sourceWorktree:R==="fork"?U||null:void 0,name:M||null,startingBranch:q||null,model:R==="new"?Q||null:void 0,reasoningEffort:R==="new"?H??null:void 0,internetAccess:!!I,denyGitCredentialsAccess:!!L})});if(!B.ok){const T=await B.json().catch(()=>null);throw new Error((T==null?void 0:T.error)||u("Failed to create parallel request."))}const D=await B.json();v(T=>{const $=new Map(T);return $.set(D.worktreeId,{id:D.worktreeId,name:D.name,branchName:D.branchName,provider:D.provider,model:D.model||null,reasoningEffort:D.reasoningEffort||null,context:D.context||"new",sourceWorktreeId:D.sourceWorktreeId||null,internetAccess:!!D.internetAccess,denyGitCredentialsAccess:!!D.denyGitCredentialsAccess,status:D.status||"creating",color:D.color,messages:[],activity:"",currentTurnId:null}),$}),l(T=>({...T,[D.worktreeId]:T[D.worktreeId]||"chat"})),c(T=>({...T,[D.worktreeId]:T[D.worktreeId]||"all"})),g(D.worktreeId),k()}catch(B){h==null||h(B.message||u("Failed to create parallel request."),"error")}},[e,t,r,n,k,c,l,h,u]),P=x.useCallback(async R=>{if(t)try{(await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}`,{method:"DELETE"})).ok||console.error("Failed to close worktree")}catch(M){console.error("Error closing worktree:",M)}},[t,e]),O=x.useCallback(async(R,M)=>{if(t)try{(await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:M})})).ok||console.error("Failed to rename worktree")}catch(z){console.error("Error renaming worktree:",z)}},[t,e]);return{activeWorktreeId:_,activeWorktreeIdRef:d,applyWorktreesList:b,closeWorktree:P,createWorktree:A,handleSelectWorktree:C,loadMainWorktreeSnapshot:p,loadWorktreeSnapshot:y,requestWorktreeMessages:S,requestWorktreesList:k,renameWorktreeHandler:O,setActiveWorktreeId:g,setWorktrees:v,worktrees:m}}var EC={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(globalThis,()=>(()=>{var r={4567:function(a,o,l){var c=this&&this.__decorate||function(f,p,y,S){var b,k=arguments.length,C=k<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,y,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(k<3?b(C):k>3?b(p,y,C):b(p,y))||C);return k>3&&C&&Object.defineProperty(p,y,C),C},h=this&&this.__param||function(f,p){return function(y,S){p(y,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const u=l(9042),m=l(9924),v=l(844),w=l(4725),_=l(2585),g=l(3656);let d=o.AccessibilityManager=class extends v.Disposable{constructor(f,p,y,S){super(),this._terminal=f,this._coreBrowserService=y,this._renderService=S,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 b=0;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);if(this._topBoundaryFocusListener=b=>this._handleBoundaryFocus(b,0),this._bottomBoundaryFocusListener=b=>this._handleBoundaryFocus(b,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 m.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(b=>this._handleResize(b.rows))),this.register(this._terminal.onRender(b=>this._refreshRows(b.start,b.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(b=>this._handleChar(b))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
692
- `))),this.register(this._terminal.onA11yTab(b=>this._handleTab(b))),this.register(this._terminal.onKey(b=>this._handleKey(b.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,g.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,v.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(f){for(let p=0;p<f;p++)this._handleChar(" ")}_handleChar(f){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==f&&(this._charsToAnnounce+=f):this._charsToAnnounce+=f,f===`
693
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(f){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(f)||this._charsToConsume.push(f)}_refreshRows(f,p){this._liveRegionDebouncer.refresh(f,p,this._terminal.rows)}_renderRows(f,p){const y=this._terminal.buffer,S=y.lines.length.toString();for(let b=f;b<=p;b++){const k=y.lines.get(y.ydisp+b),C=[],A=(k==null?void 0:k.translateToString(!0,void 0,void 0,C))||"",P=(y.ydisp+b+1).toString(),O=this._rowElements[b];O&&(A.length===0?(O.innerText=" ",this._rowColumns.set(O,[0,1])):(O.textContent=A,this._rowColumns.set(O,C)),O.setAttribute("aria-posinset",P),O.setAttribute("aria-setsize",S))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(f,p){const y=f.target,S=this._rowElements[p===0?1:this._rowElements.length-2];if(y.getAttribute("aria-posinset")===(p===0?"1":`${this._terminal.buffer.lines.length}`)||f.relatedTarget!==S)return;let b,k;if(p===0?(b=y,k=this._rowElements.pop(),this._rowContainer.removeChild(k)):(b=this._rowElements.shift(),k=y,this._rowContainer.removeChild(b)),b.removeEventListener("focus",this._topBoundaryFocusListener),k.removeEventListener("focus",this._bottomBoundaryFocusListener),p===0){const C=this._createAccessibilityTreeNode();this._rowElements.unshift(C),this._rowContainer.insertAdjacentElement("afterbegin",C)}else{const C=this._createAccessibilityTreeNode();this._rowElements.push(C),this._rowContainer.appendChild(C)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(p===0?-1:1),this._rowElements[p===0?1:this._rowElements.length-2].focus(),f.preventDefault(),f.stopImmediatePropagation()}_handleSelectionChange(){var A;if(this._rowElements.length===0)return;const f=document.getSelection();if(!f)return;if(f.isCollapsed)return void(this._rowContainer.contains(f.anchorNode)&&this._terminal.clearSelection());if(!f.anchorNode||!f.focusNode)return void console.error("anchorNode and/or focusNode are null");let p={node:f.anchorNode,offset:f.anchorOffset},y={node:f.focusNode,offset:f.focusOffset};if((p.node.compareDocumentPosition(y.node)&Node.DOCUMENT_POSITION_PRECEDING||p.node===y.node&&p.offset>y.offset)&&([p,y]=[y,p]),p.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(p={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(p.node))return;const S=this._rowElements.slice(-1)[0];if(y.node.compareDocumentPosition(S)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(y={node:S,offset:((A=S.textContent)==null?void 0:A.length)??0}),!this._rowContainer.contains(y.node))return;const b=({node:P,offset:O})=>{const R=P instanceof Text?P.parentNode:P;let M=parseInt(R==null?void 0:R.getAttribute("aria-posinset"),10)-1;if(isNaN(M))return console.warn("row is invalid. Race condition?"),null;const z=this._rowColumns.get(R);if(!z)return console.warn("columns is null. Race condition?"),null;let U=O<z.length?z[O]:z.slice(-1)[0]+1;return U>=this._terminal.cols&&(++M,U=0),{row:M,column:U}},k=b(p),C=b(y);if(k&&C){if(k.row>C.row||k.row===C.row&&k.column>=C.column)throw new Error("invalid range");this._terminal.select(k.column,k.row,(C.row-k.row)*this._terminal.cols-k.column+C.column)}}_handleResize(f){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let p=this._rowContainer.children.length;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);for(;this._rowElements.length>f;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const f=this._coreBrowserService.mainDocument.createElement("div");return f.setAttribute("role","listitem"),f.tabIndex=-1,this._refreshRowDimensions(f),f}_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 f=0;f<this._terminal.rows;f++)this._refreshRowDimensions(this._rowElements[f])}}_refreshRowDimensions(f){f.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=d=c([h(1,_.IInstantiationService),h(2,w.ICoreBrowserService),h(3,w.IRenderService)],d)},3614:(a,o)=>{function l(m){return m.replace(/\r?\n/g,"\r")}function c(m,v){return v?"\x1B[200~"+m+"\x1B[201~":m}function h(m,v,w,_){m=c(m=l(m),w.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(m,!0),v.value=""}function u(m,v,w){const _=w.getBoundingClientRect(),g=m.clientX-_.left-10,d=m.clientY-_.top-10;v.style.width="20px",v.style.height="20px",v.style.left=`${g}px`,v.style.top=`${d}px`,v.style.zIndex="1000",v.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=l,o.bracketTextForPaste=c,o.copyHandler=function(m,v){m.clipboardData&&m.clipboardData.setData("text/plain",v.selectionText),m.preventDefault()},o.handlePasteEvent=function(m,v,w,_){m.stopPropagation(),m.clipboardData&&h(m.clipboardData.getData("text/plain"),v,w,_)},o.paste=h,o.moveTextAreaUnderMouseCursor=u,o.rightClickHandler=function(m,v,w,_,g){u(m,v,w),g&&_.rightClickSelect(m),v.value=_.selectionText,v.select()}},7239:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const c=l(1505);o.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(h,u,m){this._css.set(h,u,m)}getCss(h,u){return this._css.get(h,u)}setColor(h,u,m){this._color.set(h,u,m)}getColor(h,u){return this._color.get(h,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(l,c,h,u){l.addEventListener(c,h,u);let m=!1;return{dispose:()=>{m||(m=!0,l.removeEventListener(c,h,u))}}}},3551:function(a,o,l){var c=this&&this.__decorate||function(d,f,p,y){var S,b=arguments.length,k=b<3?f:y===null?y=Object.getOwnPropertyDescriptor(f,p):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(d,f,p,y);else for(var C=d.length-1;C>=0;C--)(S=d[C])&&(k=(b<3?S(k):b>3?S(f,p,k):S(f,p))||k);return b>3&&k&&Object.defineProperty(f,p,k),k},h=this&&this.__param||function(d,f){return function(p,y){f(p,y,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const u=l(3656),m=l(8460),v=l(844),w=l(2585),_=l(4725);let g=o.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(d,f,p,y,S){super(),this._element=d,this._mouseService=f,this._renderService=p,this._bufferService=y,this._linkProviderService=S,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.toDisposable)(()=>{var b;this._lastMouseEvent=void 0,(b=this._activeProviderReplies)==null||b.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(d){this._lastMouseEvent=d;const f=this._positionFromMouseEvent(d,this._element,this._mouseService);if(!f)return;this._isMouseOut=!1;const p=d.composedPath();for(let y=0;y<p.length;y++){const S=p[y];if(S.classList.contains("xterm"))break;if(S.classList.contains("xterm-hover"))return}this._lastBufferCell&&f.x===this._lastBufferCell.x&&f.y===this._lastBufferCell.y||(this._handleHover(f),this._lastBufferCell=f)}_handleHover(d){if(this._activeLine!==d.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(d,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,d)||(this._clearCurrentLink(),this._askForLink(d,!0))}_askForLink(d,f){var y,S;this._activeProviderReplies&&f||((y=this._activeProviderReplies)==null||y.forEach(b=>{b==null||b.forEach(k=>{k.link.dispose&&k.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=d.y);let p=!1;for(const[b,k]of this._linkProviderService.linkProviders.entries())f?(S=this._activeProviderReplies)!=null&&S.get(b)&&(p=this._checkLinkProviderResult(b,d,p)):k.provideLinks(d.y,C=>{var P,O;if(this._isMouseOut)return;const A=C==null?void 0:C.map(R=>({link:R}));(P=this._activeProviderReplies)==null||P.set(b,A),p=this._checkLinkProviderResult(b,d,p),((O=this._activeProviderReplies)==null?void 0:O.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(d.y,this._activeProviderReplies)})}_removeIntersectingLinks(d,f){const p=new Set;for(let y=0;y<f.size;y++){const S=f.get(y);if(S)for(let b=0;b<S.length;b++){const k=S[b],C=k.link.range.start.y<d?0:k.link.range.start.x,A=k.link.range.end.y>d?this._bufferService.cols:k.link.range.end.x;for(let P=C;P<=A;P++){if(p.has(P)){S.splice(b--,1);break}p.add(P)}}}}_checkLinkProviderResult(d,f,p){var b;if(!this._activeProviderReplies)return p;const y=this._activeProviderReplies.get(d);let S=!1;for(let k=0;k<d;k++)this._activeProviderReplies.has(k)&&!this._activeProviderReplies.get(k)||(S=!0);if(!S&&y){const k=y.find(C=>this._linkAtPosition(C.link,f));k&&(p=!0,this._handleNewLink(k))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!p)for(let k=0;k<this._activeProviderReplies.size;k++){const C=(b=this._activeProviderReplies.get(k))==null?void 0:b.find(A=>this._linkAtPosition(A.link,f));if(C){p=!0,this._handleNewLink(C);break}}return p}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(d){if(!this._currentLink)return;const f=this._positionFromMouseEvent(d,this._element,this._mouseService);f&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,f)&&this._currentLink.link.activate(d,this._currentLink.link.text)}_clearCurrentLink(d,f){this._currentLink&&this._lastMouseEvent&&(!d||!f||this._currentLink.link.range.start.y>=d&&this._currentLink.link.range.end.y<=f)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,v.disposeArray)(this._linkCacheDisposables))}_handleNewLink(d){if(!this._lastMouseEvent)return;const f=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);f&&this._linkAtPosition(d.link,f)&&(this._currentLink=d,this._currentLink.state={decorations:{underline:d.link.decorations===void 0||d.link.decorations.underline,pointerCursor:d.link.decorations===void 0||d.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,d.link,this._lastMouseEvent),d.link.decorations={},Object.defineProperties(d.link.decorations,{pointerCursor:{get:()=>{var p,y;return(y=(p=this._currentLink)==null?void 0:p.state)==null?void 0:y.decorations.pointerCursor},set:p=>{var y;(y=this._currentLink)!=null&&y.state&&this._currentLink.state.decorations.pointerCursor!==p&&(this._currentLink.state.decorations.pointerCursor=p,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",p))}},underline:{get:()=>{var p,y;return(y=(p=this._currentLink)==null?void 0:p.state)==null?void 0:y.decorations.underline},set:p=>{var y,S,b;(y=this._currentLink)!=null&&y.state&&((b=(S=this._currentLink)==null?void 0:S.state)==null?void 0:b.decorations.underline)!==p&&(this._currentLink.state.decorations.underline=p,this._currentLink.state.isHovered&&this._fireUnderlineEvent(d.link,p))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(p=>{if(!this._currentLink)return;const y=p.start===0?0:p.start+1+this._bufferService.buffer.ydisp,S=this._bufferService.buffer.ydisp+1+p.end;if(this._currentLink.link.range.start.y>=y&&this._currentLink.link.range.end.y<=S&&(this._clearCurrentLink(y,S),this._lastMouseEvent)){const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._askForLink(b,!1)}})))}_linkHover(d,f,p){var y;(y=this._currentLink)!=null&&y.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!0),this._currentLink.state.decorations.pointerCursor&&d.classList.add("xterm-cursor-pointer")),f.hover&&f.hover(p,f.text)}_fireUnderlineEvent(d,f){const p=d.range,y=this._bufferService.buffer.ydisp,S=this._createLinkUnderlineEvent(p.start.x-1,p.start.y-y-1,p.end.x,p.end.y-y-1,void 0);(f?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(S)}_linkLeave(d,f,p){var y;(y=this._currentLink)!=null&&y.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!1),this._currentLink.state.decorations.pointerCursor&&d.classList.remove("xterm-cursor-pointer")),f.leave&&f.leave(p,f.text)}_linkAtPosition(d,f){const p=d.range.start.y*this._bufferService.cols+d.range.start.x,y=d.range.end.y*this._bufferService.cols+d.range.end.x,S=f.y*this._bufferService.cols+f.x;return p<=S&&S<=y}_positionFromMouseEvent(d,f,p){const y=p.getCoords(d,f,this._bufferService.cols,this._bufferService.rows);if(y)return{x:y[0],y:y[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(d,f,p,y,S){return{x1:d,y1:f,x2:p,y2:y,cols:this._bufferService.cols,fg:S}}};o.Linkifier=g=c([h(1,_.IMouseService),h(2,_.IRenderService),h(3,w.IBufferService),h(4,_.ILinkProviderService)],g)},9042:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,o,l){var c=this&&this.__decorate||function(_,g,d,f){var p,y=arguments.length,S=y<3?g:f===null?f=Object.getOwnPropertyDescriptor(g,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(_,g,d,f);else for(var b=_.length-1;b>=0;b--)(p=_[b])&&(S=(y<3?p(S):y>3?p(g,d,S):p(g,d))||S);return y>3&&S&&Object.defineProperty(g,d,S),S},h=this&&this.__param||function(_,g){return function(d,f){g(d,f,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const u=l(511),m=l(2585);let v=o.OscLinkProvider=class{constructor(_,g,d){this._bufferService=_,this._optionsService=g,this._oscLinkService=d}provideLinks(_,g){var A;const d=this._bufferService.buffer.lines.get(_-1);if(!d)return void g(void 0);const f=[],p=this._optionsService.rawOptions.linkHandler,y=new u.CellData,S=d.getTrimmedLength();let b=-1,k=-1,C=!1;for(let P=0;P<S;P++)if(k!==-1||d.hasContent(P)){if(d.loadCell(P,y),y.hasExtendedAttrs()&&y.extended.urlId){if(k===-1){k=P,b=y.extended.urlId;continue}C=y.extended.urlId!==b}else k!==-1&&(C=!0);if(C||k!==-1&&P===S-1){const O=(A=this._oscLinkService.getLinkData(b))==null?void 0:A.uri;if(O){const R={start:{x:k+1,y:_},end:{x:P+(C||P!==S-1?0:1),y:_}};let M=!1;if(!(p!=null&&p.allowNonHttpProtocols))try{const z=new URL(O);["http:","https:"].includes(z.protocol)||(M=!0)}catch{M=!0}M||f.push({text:O,range:R,activate:(z,U)=>p?p.activate(z,U,R):w(0,U),hover:(z,U)=>{var q;return(q=p==null?void 0:p.hover)==null?void 0:q.call(p,z,U,R)},leave:(z,U)=>{var q;return(q=p==null?void 0:p.leave)==null?void 0:q.call(p,z,U,R)}})}C=!1,y.hasExtendedAttrs()&&y.extended.urlId?(k=P,b=y.extended.urlId):(k=-1,b=-1)}}g(f)}};function w(_,g){if(confirm(`Do you want to navigate to ${g}?
694
-
695
- WARNING: This link could potentially be dangerous`)){const d=window.open();if(d){try{d.opener=null}catch{}d.location.href=g}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=v=c([h(0,m.IBufferService),h(1,m.IOptionsService),h(2,m.IOscLinkService)],v)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(l,c){this._renderCallback=l,this._coreBrowserService=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(l){return this._refreshCallbacks.push(l),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(l,c,h){this._rowCount=h,l=l!==void 0?l:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,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 l=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const l of this._refreshCallbacks)l(0);this._refreshCallbacks=[]}}},3236:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const c=l(3614),h=l(3656),u=l(3551),m=l(9042),v=l(3730),w=l(1680),_=l(3107),g=l(5744),d=l(2950),f=l(1296),p=l(428),y=l(4269),S=l(5114),b=l(8934),k=l(3230),C=l(9312),A=l(4725),P=l(6731),O=l(8055),R=l(8969),M=l(8460),z=l(844),U=l(6114),q=l(8437),Q=l(2584),H=l(7399),I=l(5941),L=l(9074),B=l(2585),D=l(5435),T=l(4567),$=l(779);class Y extends R.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(j={}){super(j),this.browser=U,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new z.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance($.LinkProviderService),this._instantiationService.setService(A.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(v.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((N,G)=>this.refresh(N,G))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(N=>this._reportWindowsOptions(N))),this.register(this._inputHandler.onColor(N=>this._handleColorEvent(N))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(N=>this._afterResize(N.cols,N.rows))),this.register((0,z.toDisposable)(()=>{var N,G;this._customKeyEventHandler=void 0,(G=(N=this.element)==null?void 0:N.parentNode)==null||G.removeChild(this.element)}))}_handleColorEvent(j){if(this._themeService)for(const N of j){let G,V="";switch(N.index){case 256:G="foreground",V="10";break;case 257:G="background",V="11";break;case 258:G="cursor",V="12";break;default:G="ansi",V="4;"+N.index}switch(N.type){case 0:const X=O.color.toColorRGB(G==="ansi"?this._themeService.colors.ansi[N.index]:this._themeService.colors[G]);this.coreService.triggerDataEvent(`${Q.C0.ESC}]${V};${(0,I.toRgbString)(X)}${Q.C1_ESCAPED.ST}`);break;case 1:if(G==="ansi")this._themeService.modifyColors(ne=>ne.ansi[N.index]=O.channels.toColor(...N.color));else{const ne=G;this._themeService.modifyColors(ue=>ue[ne]=O.channels.toColor(...N.color))}break;case 2:this._themeService.restoreColor(N.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(j){j?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(T.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(j){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Q.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var j;return(j=this.textarea)==null?void 0:j.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 j=this.buffer.ybase+this.buffer.y,N=this.buffer.lines.get(j);if(!N)return;const G=Math.min(this.buffer.x,this.cols-1),V=this._renderService.dimensions.css.cell.height,X=N.getWidth(G),ne=this._renderService.dimensions.css.cell.width*X,ue=this.buffer.y*this._renderService.dimensions.css.cell.height,ve=G*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ve+"px",this.textarea.style.top=ue+"px",this.textarea.style.width=ne+"px",this.textarea.style.height=V+"px",this.textarea.style.lineHeight=V+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",N=>{this.hasSelection()&&(0,c.copyHandler)(N,this._selectionService)}));const j=N=>(0,c.handlePasteEvent)(N,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",j)),this.register((0,h.addDisposableDomListener)(this.element,"paste",j)),U.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",N=>{N.button===2&&(0,c.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",N=>{(0,c.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),U.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",N=>{N.button===1&&(0,c.moveTextAreaUnderMouseCursor)(N,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",j=>this._keyUp(j),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",j=>this._keyDown(j),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",j=>this._keyPress(j),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",j=>this._compositionHelper.compositionupdate(j))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,h.addDisposableDomListener)(this.textarea,"input",j=>this._inputEvent(j),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(j){var G;if(!j)throw new Error("Terminal requires a parent element.");if(j.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((G=this.element)==null?void 0:G.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=j.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"),j.appendChild(this.element);const N=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),N.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,h.addDisposableDomListener)(this.screenElement,"mousemove",V=>this.updateCursorStyle(V))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),N.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),U.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(S.CoreBrowserService,this.textarea,j.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(A.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",V=>this._handleTextAreaFocus(V))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(p.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(A.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(P.ThemeService),this._instantiationService.setService(A.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(y.CharacterJoinerService),this._instantiationService.setService(A.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(A.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(V=>this._onRender.fire(V))),this.onResize(V=>this._renderService.resize(V.cols,V.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(b.MouseService),this._instantiationService.setService(A.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(N);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(V=>this.scrollLines(V.amount,V.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(C.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(A.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(V=>this.scrollLines(V.amount,V.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(V=>this._renderService.handleSelectionChanged(V.start,V.end,V.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(V=>{this.textarea.value=V,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(V=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(_.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",V=>this._selectionService.handleMouseDown(V))),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(T.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",V=>this._handleScreenReaderModeOptionChange(V))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(g.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",V=>{!this._overviewRulerRenderer&&V&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(g.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(f.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const j=this,N=this.element;function G(ne){const ue=j._mouseService.getMouseReportCoords(ne,j.screenElement);if(!ue)return!1;let ve,le;switch(ne.overrideType||ne.type){case"mousemove":le=32,ne.buttons===void 0?(ve=3,ne.button!==void 0&&(ve=ne.button<3?ne.button:3)):ve=1&ne.buttons?0:4&ne.buttons?1:2&ne.buttons?2:3;break;case"mouseup":le=0,ve=ne.button<3?ne.button:3;break;case"mousedown":le=1,ve=ne.button<3?ne.button:3;break;case"wheel":if(j._customWheelEventHandler&&j._customWheelEventHandler(ne)===!1||j.viewport.getLinesScrolled(ne)===0)return!1;le=ne.deltaY<0?0:1,ve=4;break;default:return!1}return!(le===void 0||ve===void 0||ve>4)&&j.coreMouseService.triggerMouseEvent({col:ue.col,row:ue.row,x:ue.x,y:ue.y,button:ve,action:le,ctrl:ne.ctrlKey,alt:ne.altKey,shift:ne.shiftKey})}const V={mouseup:null,wheel:null,mousedrag:null,mousemove:null},X={mouseup:ne=>(G(ne),ne.buttons||(this._document.removeEventListener("mouseup",V.mouseup),V.mousedrag&&this._document.removeEventListener("mousemove",V.mousedrag)),this.cancel(ne)),wheel:ne=>(G(ne),this.cancel(ne,!0)),mousedrag:ne=>{ne.buttons&&G(ne)},mousemove:ne=>{ne.buttons||G(ne)}};this.register(this.coreMouseService.onProtocolChange(ne=>{ne?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ne)),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&ne?V.mousemove||(N.addEventListener("mousemove",X.mousemove),V.mousemove=X.mousemove):(N.removeEventListener("mousemove",V.mousemove),V.mousemove=null),16&ne?V.wheel||(N.addEventListener("wheel",X.wheel,{passive:!1}),V.wheel=X.wheel):(N.removeEventListener("wheel",V.wheel),V.wheel=null),2&ne?V.mouseup||(V.mouseup=X.mouseup):(this._document.removeEventListener("mouseup",V.mouseup),V.mouseup=null),4&ne?V.mousedrag||(V.mousedrag=X.mousedrag):(this._document.removeEventListener("mousemove",V.mousedrag),V.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(N,"mousedown",ne=>{if(ne.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ne))return G(ne),V.mouseup&&this._document.addEventListener("mouseup",V.mouseup),V.mousedrag&&this._document.addEventListener("mousemove",V.mousedrag),this.cancel(ne)})),this.register((0,h.addDisposableDomListener)(N,"wheel",ne=>{if(!V.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ne)===!1)return!1;if(!this.buffer.hasScrollback){const ue=this.viewport.getLinesScrolled(ne);if(ue===0)return;const ve=Q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ne.deltaY<0?"A":"B");let le="";for(let Se=0;Se<Math.abs(ue);Se++)le+=ve;return this.coreService.triggerDataEvent(le,!0),this.cancel(ne,!0)}return this.viewport.handleWheel(ne)?this.cancel(ne):void 0}},{passive:!1})),this.register((0,h.addDisposableDomListener)(N,"touchstart",ne=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ne),this.cancel(ne)},{passive:!0})),this.register((0,h.addDisposableDomListener)(N,"touchmove",ne=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ne)?void 0:this.cancel(ne)},{passive:!1}))}refresh(j,N){var G;(G=this._renderService)==null||G.refreshRows(j,N)}updateCursorStyle(j){var N;(N=this._selectionService)!=null&&N.shouldColumnSelect(j)?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(j,N,G=0){var V;G===1?(super.scrollLines(j,N,G),this.refresh(0,this.rows-1)):(V=this.viewport)==null||V.scrollLines(j)}paste(j){(0,c.paste)(j,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(j){this._customKeyEventHandler=j}attachCustomWheelEventHandler(j){this._customWheelEventHandler=j}registerLinkProvider(j){return this._linkProviderService.registerLinkProvider(j)}registerCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const N=this._characterJoinerService.register(j);return this.refresh(0,this.rows-1),N}deregisterCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(j)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(j){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+j)}registerDecoration(j){return this._decorationService.registerDecoration(j)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(j,N,G){this._selectionService.setSelection(j,N,G)}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 j;(j=this._selectionService)==null||j.clearSelection()}selectAll(){var j;(j=this._selectionService)==null||j.selectAll()}selectLines(j,N){var G;(G=this._selectionService)==null||G.selectLines(j,N)}_keyDown(j){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;const N=this.browser.isMac&&this.options.macOptionIsMeta&&j.altKey;if(!N&&!this._compositionHelper.keydown(j))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;N||j.key!=="Dead"&&j.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const G=(0,H.evaluateKeyboardEvent)(j,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(j),G.type===3||G.type===2){const V=this.rows-1;return this.scrollLines(G.type===2?-V:V),this.cancel(j,!0)}return G.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,j)||(G.cancel&&this.cancel(j,!0),!G.key||!!(j.key&&!j.ctrlKey&&!j.altKey&&!j.metaKey&&j.key.length===1&&j.key.charCodeAt(0)>=65&&j.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(G.key!==Q.C0.ETX&&G.key!==Q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:G.key,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(G.key,!0),!this.optionsService.rawOptions.screenReaderMode||j.altKey||j.ctrlKey?this.cancel(j,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(j,N){const G=j.isMac&&!this.options.macOptionIsMeta&&N.altKey&&!N.ctrlKey&&!N.metaKey||j.isWindows&&N.altKey&&N.ctrlKey&&!N.metaKey||j.isWindows&&N.getModifierState("AltGraph");return N.type==="keypress"?G:G&&(!N.keyCode||N.keyCode>47)}_keyUp(j){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1||(function(N){return N.keyCode===16||N.keyCode===17||N.keyCode===18}(j)||this.focus(),this.updateCursorStyle(j),this._keyPressHandled=!1)}_keyPress(j){let N;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;if(this.cancel(j),j.charCode)N=j.charCode;else if(j.which===null||j.which===void 0)N=j.keyCode;else{if(j.which===0||j.charCode===0)return!1;N=j.which}return!(!N||(j.altKey||j.ctrlKey||j.metaKey)&&!this._isThirdLevelShift(this.browser,j)||(N=String.fromCharCode(N),this._onKey.fire({key:N,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(N,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(j){if(j.data&&j.inputType==="insertText"&&(!j.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const N=j.data;return this.coreService.triggerDataEvent(N,!0),this.cancel(j),!0}return!1}resize(j,N){j!==this.cols||N!==this.rows?super.resize(j,N):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(j,N){var G,V;(G=this._charSizeService)==null||G.measure(),(V=this.viewport)==null||V.syncScrollArea(!0)}clear(){var j;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 N=1;N<this.rows;N++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(j=this.viewport)==null||j.reset(),this.refresh(0,this.rows-1)}}reset(){var N,G;this.options.rows=this.rows,this.options.cols=this.cols;const j=this._customKeyEventHandler;this._setup(),super.reset(),(N=this._selectionService)==null||N.reset(),this._decorationService.reset(),(G=this.viewport)==null||G.reset(),this._customKeyEventHandler=j,this.refresh(0,this.rows-1)}clearTextureAtlas(){var j;(j=this._renderService)==null||j.clearTextureAtlas()}_reportFocus(){var j;(j=this.element)!=null&&j.classList.contains("focus")?this.coreService.triggerDataEvent(Q.C0.ESC+"[I"):this.coreService.triggerDataEvent(Q.C0.ESC+"[O")}_reportWindowsOptions(j){if(this._renderService)switch(j){case D.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const N=this._renderService.dimensions.css.canvas.width.toFixed(0),G=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Q.C0.ESC}[4;${G};${N}t`);break;case D.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const V=this._renderService.dimensions.css.cell.width.toFixed(0),X=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Q.C0.ESC}[6;${X};${V}t`)}}cancel(j,N){if(this.options.cancelEvents||N)return j.preventDefault(),j.stopPropagation(),!1}}o.Terminal=Y},9924:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(l,c=1e3){this._renderCallback=l,this._debounceThresholdMS=c,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(l,c,h){this._rowCount=h,l=l!==void 0?l:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=u-this._lastRefreshMs,v=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},v)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const l=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,c)}}},1680:function(a,o,l){var c=this&&this.__decorate||function(d,f,p,y){var S,b=arguments.length,k=b<3?f:y===null?y=Object.getOwnPropertyDescriptor(f,p):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(d,f,p,y);else for(var C=d.length-1;C>=0;C--)(S=d[C])&&(k=(b<3?S(k):b>3?S(f,p,k):S(f,p))||k);return b>3&&k&&Object.defineProperty(f,p,k),k},h=this&&this.__param||function(d,f){return function(p,y){f(p,y,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const u=l(3656),m=l(4725),v=l(8460),w=l(844),_=l(2585);let g=o.Viewport=class extends w.Disposable{constructor(d,f,p,y,S,b,k,C){super(),this._viewportElement=d,this._scrollArea=f,this._bufferService=p,this._optionsService=y,this._charSizeService=S,this._renderService=b,this._coreBrowserService=k,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 v.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(A=>this._activeBuffer=A.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(A=>this._renderDimensions=A)),this._handleThemeChange(C.colors),this.register(C.onChangeColors(A=>this._handleThemeChange(A))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(d){this._viewportElement.style.backgroundColor=d.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(d){if(d)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 f=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==f&&(this._lastRecordedBufferHeight=f,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const d=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==d&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=d),this._refreshAnimationFrame=null}syncScrollArea(d=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(d);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(d)}_handleScroll(d){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 f=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:f,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const d=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(d*(this._smoothScrollState.target-this._smoothScrollState.origin)),d<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(d,f){const p=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(f<0&&this._viewportElement.scrollTop!==0||f>0&&p<this._lastRecordedBufferHeight)||(d.cancelable&&d.preventDefault(),!1)}handleWheel(d){const f=this._getPixelsScrolled(d);return f!==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+f:this._smoothScrollState.target+=f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=f,this._bubbleScroll(d,f))}scrollLines(d){if(d!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const f=d*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:d,suppressScrollEvent:!1})}_getPixelsScrolled(d){if(d.deltaY===0||d.shiftKey)return 0;let f=this._applyScrollModifier(d.deltaY,d);return d.deltaMode===WheelEvent.DOM_DELTA_LINE?f*=this._currentRowHeight:d.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._currentRowHeight*this._bufferService.rows),f}getBufferElements(d,f){var C;let p,y="";const S=[],b=f??this._bufferService.buffer.lines.length,k=this._bufferService.buffer.lines;for(let A=d;A<b;A++){const P=k.get(A);if(!P)continue;const O=(C=k.get(A+1))==null?void 0:C.isWrapped;if(y+=P.translateToString(!O),!O||A===k.length-1){const R=document.createElement("div");R.textContent=y,S.push(R),y.length>0&&(p=R),y=""}}return{bufferElements:S,cursorElement:p}}getLinesScrolled(d){if(d.deltaY===0||d.shiftKey)return 0;let f=this._applyScrollModifier(d.deltaY,d);return d.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(f/=this._currentRowHeight+0,this._wheelPartialScroll+=f,f=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):d.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._bufferService.rows),f}_applyScrollModifier(d,f){const p=this._optionsService.rawOptions.fastScrollModifier;return p==="alt"&&f.altKey||p==="ctrl"&&f.ctrlKey||p==="shift"&&f.shiftKey?d*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:d*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(d){this._lastTouchY=d.touches[0].pageY}handleTouchMove(d){const f=this._lastTouchY-d.touches[0].pageY;return this._lastTouchY=d.touches[0].pageY,f!==0&&(this._viewportElement.scrollTop+=f,this._bubbleScroll(d,f))}};o.Viewport=g=c([h(2,_.IBufferService),h(3,_.IOptionsService),h(4,m.ICharSizeService),h(5,m.IRenderService),h(6,m.ICoreBrowserService),h(7,m.IThemeService)],g)},3107:function(a,o,l){var c=this&&this.__decorate||function(_,g,d,f){var p,y=arguments.length,S=y<3?g:f===null?f=Object.getOwnPropertyDescriptor(g,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(_,g,d,f);else for(var b=_.length-1;b>=0;b--)(p=_[b])&&(S=(y<3?p(S):y>3?p(g,d,S):p(g,d))||S);return y>3&&S&&Object.defineProperty(g,d,S),S},h=this&&this.__param||function(_,g){return function(d,f){g(d,f,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const u=l(4725),m=l(844),v=l(2585);let w=o.BufferDecorationRenderer=class extends m.Disposable{constructor(_,g,d,f,p){super(),this._screenElement=_,this._bufferService=g,this._coreBrowserService=d,this._decorationService=f,this._renderService=p,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(y=>this._removeDecoration(y))),this.register((0,m.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 _ of this._decorationService.decorations)this._renderDecoration(_);this._dimensionsChanged=!1}_renderDecoration(_){this._refreshStyle(_),this._dimensionsChanged&&this._refreshXPosition(_)}_createElement(_){var f;const g=this._coreBrowserService.mainDocument.createElement("div");g.classList.add("xterm-decoration"),g.classList.toggle("xterm-decoration-top-layer",((f=_==null?void 0:_.options)==null?void 0:f.layer)==="top"),g.style.width=`${Math.round((_.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,g.style.height=(_.options.height||1)*this._renderService.dimensions.css.cell.height+"px",g.style.top=(_.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",g.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const d=_.options.x??0;return d&&d>this._bufferService.cols&&(g.style.display="none"),this._refreshXPosition(_,g),g}_refreshStyle(_){const g=_.marker.line-this._bufferService.buffers.active.ydisp;if(g<0||g>=this._bufferService.rows)_.element&&(_.element.style.display="none",_.onRenderEmitter.fire(_.element));else{let d=this._decorationElements.get(_);d||(d=this._createElement(_),_.element=d,this._decorationElements.set(_,d),this._container.appendChild(d),_.onDispose(()=>{this._decorationElements.delete(_),d.remove()})),d.style.top=g*this._renderService.dimensions.css.cell.height+"px",d.style.display=this._altBufferIsActive?"none":"block",_.onRenderEmitter.fire(d)}}_refreshXPosition(_,g=_.element){if(!g)return;const d=_.options.x??0;(_.options.anchor||"left")==="right"?g.style.right=d?d*this._renderService.dimensions.css.cell.width+"px":"":g.style.left=d?d*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(_){var g;(g=this._decorationElements.get(_))==null||g.remove(),this._decorationElements.delete(_),_.dispose()}};o.BufferDecorationRenderer=w=c([h(1,v.IBufferService),h(2,u.ICoreBrowserService),h(3,v.IDecorationService),h(4,u.IRenderService)],w)},5871:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(l){if(l.options.overviewRulerOptions){for(const c of this._zones)if(c.color===l.options.overviewRulerOptions.color&&c.position===l.options.overviewRulerOptions.position){if(this._lineIntersectsZone(c,l.marker.line))return;if(this._lineAdjacentToZone(c,l.marker.line,l.options.overviewRulerOptions.position))return void this._addLineToZone(c,l.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=l.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=l.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=l.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=l.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:l.options.overviewRulerOptions.color,position:l.options.overviewRulerOptions.position,startBufferLine:l.marker.line,endBufferLine:l.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(l){this._linePadding=l}_lineIntersectsZone(l,c){return c>=l.startBufferLine&&c<=l.endBufferLine}_lineAdjacentToZone(l,c,h){return c>=l.startBufferLine-this._linePadding[h||"full"]&&c<=l.endBufferLine+this._linePadding[h||"full"]}_addLineToZone(l,c){l.startBufferLine=Math.min(l.startBufferLine,c),l.endBufferLine=Math.max(l.endBufferLine,c)}}},5744:function(a,o,l){var c=this&&this.__decorate||function(p,y,S,b){var k,C=arguments.length,A=C<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,y,S,b);else for(var P=p.length-1;P>=0;P--)(k=p[P])&&(A=(C<3?k(A):C>3?k(y,S,A):k(y,S))||A);return C>3&&A&&Object.defineProperty(y,S,A),A},h=this&&this.__param||function(p,y){return function(S,b){y(S,b,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const u=l(5871),m=l(4725),v=l(844),w=l(2585),_={full:0,left:0,center:0,right:0},g={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0};let f=o.OverviewRulerRenderer=class extends v.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(p,y,S,b,k,C,A){var O;super(),this._viewportElement=p,this._screenElement=y,this._bufferService=S,this._decorationService=b,this._renderService=k,this._optionsService=C,this._coreBrowserService=A,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(O=this._viewportElement.parentElement)==null||O.insertBefore(this._canvas,this._viewportElement);const P=this._canvas.getContext("2d");if(!P)throw new Error("Ctx cannot be null");this._ctx=P,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,v.toDisposable)(()=>{var R;(R=this._canvas)==null||R.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 p=Math.floor(this._canvas.width/3),y=Math.ceil(this._canvas.width/3);g.full=this._canvas.width,g.left=p,g.center=y,g.right=p,this._refreshDrawHeightConstants(),d.full=0,d.left=0,d.center=g.left,d.right=g.left+g.center}_refreshDrawHeightConstants(){_.full=Math.round(2*this._coreBrowserService.dpr);const p=this._canvas.height/this._bufferService.buffer.lines.length,y=Math.round(Math.max(Math.min(p,12),6)*this._coreBrowserService.dpr);_.left=y,_.center=y,_.right=y}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.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 y of this._decorationService.decorations)this._colorZoneStore.addDecoration(y);this._ctx.lineWidth=1;const p=this._colorZoneStore.zones;for(const y of p)y.position!=="full"&&this._renderColorZone(y);for(const y of p)y.position==="full"&&this._renderColorZone(y);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(p){this._ctx.fillStyle=p.color,this._ctx.fillRect(d[p.position||"full"],Math.round((this._canvas.height-1)*(p.startBufferLine/this._bufferService.buffers.active.lines.length)-_[p.position||"full"]/2),g[p.position||"full"],Math.round((this._canvas.height-1)*((p.endBufferLine-p.startBufferLine)/this._bufferService.buffers.active.lines.length)+_[p.position||"full"]))}_queueRefresh(p,y){this._shouldUpdateDimensions=p||this._shouldUpdateDimensions,this._shouldUpdateAnchor=y||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};o.OverviewRulerRenderer=f=c([h(2,w.IBufferService),h(3,w.IDecorationService),h(4,m.IRenderService),h(5,w.IOptionsService),h(6,m.ICoreBrowserService)],f)},2950:function(a,o,l){var c=this&&this.__decorate||function(_,g,d,f){var p,y=arguments.length,S=y<3?g:f===null?f=Object.getOwnPropertyDescriptor(g,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(_,g,d,f);else for(var b=_.length-1;b>=0;b--)(p=_[b])&&(S=(y<3?p(S):y>3?p(g,d,S):p(g,d))||S);return y>3&&S&&Object.defineProperty(g,d,S),S},h=this&&this.__param||function(_,g){return function(d,f){g(d,f,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const u=l(4725),m=l(2585),v=l(2584);let w=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(_,g,d,f,p,y){this._textarea=_,this._compositionView=g,this._bufferService=d,this._optionsService=f,this._coreService=p,this._renderService=y,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(_){this._compositionView.textContent=_.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(_){if(this._isComposing||this._isSendingComposition){if(_.keyCode===229||_.keyCode===16||_.keyCode===17||_.keyCode===18)return!1;this._finalizeComposition(!1)}return _.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(_){if(this._compositionView.classList.remove("active"),this._isComposing=!1,_){const g={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let d;this._isSendingComposition=!1,g.start+=this._dataAlreadySent.length,d=this._isComposing?this._textarea.value.substring(g.start,g.end):this._textarea.value.substring(g.start),d.length>0&&this._coreService.triggerDataEvent(d,!0)}},0)}else{this._isSendingComposition=!1;const g=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(g,!0)}}_handleAnyTextareaChanges(){const _=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const g=this._textarea.value,d=g.replace(_,"");this._dataAlreadySent=d,g.length>_.length?this._coreService.triggerDataEvent(d,!0):g.length<_.length?this._coreService.triggerDataEvent(`${v.C0.DEL}`,!0):g.length===_.length&&g!==_&&this._coreService.triggerDataEvent(g,!0)}},0)}updateCompositionElements(_){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const g=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),d=this._renderService.dimensions.css.cell.height,f=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,p=g*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=p+"px",this._compositionView.style.top=f+"px",this._compositionView.style.height=d+"px",this._compositionView.style.lineHeight=d+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const y=this._compositionView.getBoundingClientRect();this._textarea.style.left=p+"px",this._textarea.style.top=f+"px",this._textarea.style.width=Math.max(y.width,1)+"px",this._textarea.style.height=Math.max(y.height,1)+"px",this._textarea.style.lineHeight=y.height+"px"}_||setTimeout(()=>this.updateCompositionElements(!0),0)}}};o.CompositionHelper=w=c([h(2,m.IBufferService),h(3,m.IOptionsService),h(4,m.ICoreService),h(5,u.IRenderService)],w)},9806:(a,o)=>{function l(c,h,u){const m=u.getBoundingClientRect(),v=c.getComputedStyle(u),w=parseInt(v.getPropertyValue("padding-left")),_=parseInt(v.getPropertyValue("padding-top"));return[h.clientX-m.left-w,h.clientY-m.top-_]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=l,o.getCoords=function(c,h,u,m,v,w,_,g,d){if(!w)return;const f=l(c,h,u);return f?(f[0]=Math.ceil((f[0]+(d?_/2:0))/_),f[1]=Math.ceil(f[1]/g),f[0]=Math.min(Math.max(f[0],1),m+(d?1:0)),f[1]=Math.min(Math.max(f[1],1),v),f):void 0}},9504:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const c=l(2584);function h(g,d,f,p){const y=g-u(g,f),S=d-u(d,f),b=Math.abs(y-S)-function(k,C,A){let P=0;const O=k-u(k,A),R=C-u(C,A);for(let M=0;M<Math.abs(O-R);M++){const z=m(k,C)==="A"?-1:1,U=A.buffer.lines.get(O+z*M);U!=null&&U.isWrapped&&P++}return P}(g,d,f);return _(b,w(m(g,d),p))}function u(g,d){let f=0,p=d.buffer.lines.get(g),y=p==null?void 0:p.isWrapped;for(;y&&g>=0&&g<d.rows;)f++,p=d.buffer.lines.get(--g),y=p==null?void 0:p.isWrapped;return f}function m(g,d){return g>d?"A":"B"}function v(g,d,f,p,y,S){let b=g,k=d,C="";for(;b!==f||k!==p;)b+=y?1:-1,y&&b>S.cols-1?(C+=S.buffer.translateBufferLineToString(k,!1,g,b),b=0,g=0,k++):!y&&b<0&&(C+=S.buffer.translateBufferLineToString(k,!1,0,g+1),b=S.cols-1,g=b,k--);return C+S.buffer.translateBufferLineToString(k,!1,g,b)}function w(g,d){const f=d?"O":"[";return c.C0.ESC+f+g}function _(g,d){g=Math.floor(g);let f="";for(let p=0;p<g;p++)f+=d;return f}o.moveToCellSequence=function(g,d,f,p){const y=f.buffer.x,S=f.buffer.y;if(!f.buffer.hasScrollback)return function(C,A,P,O,R,M){return h(A,O,R,M).length===0?"":_(v(C,A,C,A-u(A,R),!1,R).length,w("D",M))}(y,S,0,d,f,p)+h(S,d,f,p)+function(C,A,P,O,R,M){let z;z=h(A,O,R,M).length>0?O-u(O,R):A;const U=O,q=function(Q,H,I,L,B,D){let T;return T=h(I,L,B,D).length>0?L-u(L,B):H,Q<I&&T<=L||Q>=I&&T<L?"C":"D"}(C,A,P,O,R,M);return _(v(C,z,P,U,q==="C",R).length,w(q,M))}(y,S,g,d,f,p);let b;if(S===d)return b=y>g?"D":"C",_(Math.abs(y-g),w(b,p));b=S>d?"D":"C";const k=Math.abs(S-d);return _(function(C,A){return A.cols-C}(S>d?g:y,f)+(k-1)*f.cols+1+((S>d?y:g)-1),w(b,p))}},1296:function(a,o,l){var c=this&&this.__decorate||function(M,z,U,q){var Q,H=arguments.length,I=H<3?z:q===null?q=Object.getOwnPropertyDescriptor(z,U):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(M,z,U,q);else for(var L=M.length-1;L>=0;L--)(Q=M[L])&&(I=(H<3?Q(I):H>3?Q(z,U,I):Q(z,U))||I);return H>3&&I&&Object.defineProperty(z,U,I),I},h=this&&this.__param||function(M,z){return function(U,q){z(U,q,M)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const u=l(3787),m=l(2550),v=l(2223),w=l(6171),_=l(6052),g=l(4725),d=l(8055),f=l(8460),p=l(844),y=l(2585),S="xterm-dom-renderer-owner-",b="xterm-rows",k="xterm-fg-",C="xterm-bg-",A="xterm-focus",P="xterm-selection";let O=1,R=o.DomRenderer=class extends p.Disposable{constructor(M,z,U,q,Q,H,I,L,B,D,T,$,Y){super(),this._terminal=M,this._document=z,this._element=U,this._screenElement=q,this._viewportElement=Q,this._helperContainer=H,this._linkifier2=I,this._charSizeService=B,this._optionsService=D,this._bufferService=T,this._coreBrowserService=$,this._themeService=Y,this._terminalClass=O++,this._rowElements=[],this._selectionRenderModel=(0,_.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new f.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(b),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(P),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(W=>this._injectCss(W))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(S+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(W=>this._handleLinkHover(W))),this.register(this._linkifier2.onHideLinkUnderline(W=>this._handleLinkLeave(W))),this.register((0,p.toDisposable)(()=>{this._element.classList.remove(S+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new m.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 M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),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/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),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 U of this._rowElements)U.style.width=`${this.dimensions.css.canvas.width}px`,U.style.height=`${this.dimensions.css.cell.height}px`,U.style.lineHeight=`${this.dimensions.css.cell.height}px`,U.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const z=`${this._terminalSelector} .${b} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=z,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(M){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let z=`${this._terminalSelector} .${b} { color: ${M.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;z+=`${this._terminalSelector} .${b} .xterm-dim { color: ${d.color.multiplyOpacity(M.foreground,.5).css};}`,z+=`${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 U=`blink_underline_${this._terminalClass}`,q=`blink_bar_${this._terminalClass}`,Q=`blink_block_${this._terminalClass}`;z+=`@keyframes ${U} { 50% { border-bottom-style: hidden; }}`,z+=`@keyframes ${q} { 50% { box-shadow: none; }}`,z+=`@keyframes ${Q} { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,z+=`${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${M.cursor.css} !important; color: ${M.cursorAccent.css} !important;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,z+=`${this._terminalSelector} .${P} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${P} div { position: absolute; background-color: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${P} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[H,I]of M.ansi.entries())z+=`${this._terminalSelector} .${k}${H} { color: ${I.css}; }${this._terminalSelector} .${k}${H}.xterm-dim { color: ${d.color.multiplyOpacity(I,.5).css}; }${this._terminalSelector} .${C}${H} { background-color: ${I.css}; }`;z+=`${this._terminalSelector} .${k}${v.INVERTED_DEFAULT_COLOR} { color: ${d.color.opaque(M.background).css}; }${this._terminalSelector} .${k}${v.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${d.color.multiplyOpacity(d.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${C}${v.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=z}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,z){for(let U=this._rowElements.length;U<=z;U++){const q=this._document.createElement("div");this._rowContainer.appendChild(q),this._rowElements.push(q)}for(;this._rowElements.length>z;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,z){this._refreshRowElements(M,z),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(A),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(A),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(M,z,U){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,z,U),this.renderRows(0,this._bufferService.rows-1),!M||!z)return;this._selectionRenderModel.update(this._terminal,M,z,U);const q=this._selectionRenderModel.viewportStartRow,Q=this._selectionRenderModel.viewportEndRow,H=this._selectionRenderModel.viewportCappedStartRow,I=this._selectionRenderModel.viewportCappedEndRow;if(H>=this._bufferService.rows||I<0)return;const L=this._document.createDocumentFragment();if(U){const B=M[0]>z[0];L.appendChild(this._createSelectionElement(H,B?z[0]:M[0],B?M[0]:z[0],I-H+1))}else{const B=q===H?M[0]:0,D=H===Q?z[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(H,B,D));const T=I-H-1;if(L.appendChild(this._createSelectionElement(H+1,0,this._bufferService.cols,T)),H!==I){const $=Q===I?z[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(I,0,$))}}this._selectionContainer.appendChild(L)}_createSelectionElement(M,z,U,q=1){const Q=this._document.createElement("div"),H=z*this.dimensions.css.cell.width;let I=this.dimensions.css.cell.width*(U-z);return H+I>this.dimensions.css.canvas.width&&(I=this.dimensions.css.canvas.width-H),Q.style.height=q*this.dimensions.css.cell.height+"px",Q.style.top=M*this.dimensions.css.cell.height+"px",Q.style.left=`${H}px`,Q.style.width=`${I}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 M of this._rowElements)M.replaceChildren()}renderRows(M,z){const U=this._bufferService.buffer,q=U.ybase+U.y,Q=Math.min(U.x,this._bufferService.cols-1),H=this._optionsService.rawOptions.cursorBlink,I=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=M;B<=z;B++){const D=B+U.ydisp,T=this._rowElements[B],$=U.lines.get(D);if(!T||!$)break;T.replaceChildren(...this._rowFactory.createRow($,D,D===q,I,L,Q,H,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${S}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,z,U,q,Q,H){U<0&&(M=0),q<0&&(z=0);const I=this._bufferService.rows-1;U=Math.max(Math.min(U,I),0),q=Math.max(Math.min(q,I),0),Q=Math.min(Q,this._bufferService.cols);const L=this._bufferService.buffer,B=L.ybase+L.y,D=Math.min(L.x,Q-1),T=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,Y=this._optionsService.rawOptions.cursorInactiveStyle;for(let W=U;W<=q;++W){const j=W+L.ydisp,N=this._rowElements[W],G=L.lines.get(j);if(!N||!G)break;N.replaceChildren(...this._rowFactory.createRow(G,j,j===B,$,Y,D,T,this.dimensions.css.cell.width,this._widthCache,H?W===U?M:0:-1,H?(W===q?z:Q)-1:-1))}}};o.DomRenderer=R=c([h(7,y.IInstantiationService),h(8,g.ICharSizeService),h(9,y.IOptionsService),h(10,y.IBufferService),h(11,g.ICoreBrowserService),h(12,g.IThemeService)],R)},3787:function(a,o,l){var c=this&&this.__decorate||function(b,k,C,A){var P,O=arguments.length,R=O<3?k:A===null?A=Object.getOwnPropertyDescriptor(k,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(b,k,C,A);else for(var M=b.length-1;M>=0;M--)(P=b[M])&&(R=(O<3?P(R):O>3?P(k,C,R):P(k,C))||R);return O>3&&R&&Object.defineProperty(k,C,R),R},h=this&&this.__param||function(b,k){return function(C,A){k(C,A,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const u=l(2223),m=l(643),v=l(511),w=l(2585),_=l(8055),g=l(4725),d=l(4269),f=l(6171),p=l(3734);let y=o.DomRendererRowFactory=class{constructor(b,k,C,A,P,O,R){this._document=b,this._characterJoinerService=k,this._optionsService=C,this._coreBrowserService=A,this._coreService=P,this._decorationService=O,this._themeService=R,this._workCell=new v.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,k,C){this._selectionStart=b,this._selectionEnd=k,this._columnSelectMode=C}createRow(b,k,C,A,P,O,R,M,z,U,q){const Q=[],H=this._characterJoinerService.getJoinedCharacters(k),I=this._themeService.colors;let L,B=b.getNoBgTrimmedLength();C&&B<O+1&&(B=O+1);let D=0,T="",$=0,Y=0,W=0,j=!1,N=0,G=!1,V=0;const X=[],ne=U!==-1&&q!==-1;for(let ue=0;ue<B;ue++){b.loadCell(ue,this._workCell);let ve=this._workCell.getWidth();if(ve===0)continue;let le=!1,Se=ue,ye=this._workCell;if(H.length>0&&ue===H[0][0]){le=!0;const ee=H.shift();ye=new d.JoinedCellData(this._workCell,b.translateToString(!0,ee[0],ee[1]),ee[1]-ee[0]),Se=ee[1]-1,ve=ye.getWidth()}const Me=this._isCellInSelection(ue,k),Ne=C&&ue===O,Ue=ne&&ue>=U&&ue<=q;let Ke=!1;this._decorationService.forEachDecorationAtCell(ue,k,void 0,ee=>{Ke=!0});let Ye=ye.getChars()||m.WHITESPACE_CELL_CHAR;if(Ye===" "&&(ye.isUnderline()||ye.isOverline())&&(Ye=" "),V=ve*M-z.get(Ye,ye.isBold(),ye.isItalic()),L){if(D&&(Me&&G||!Me&&!G&&ye.bg===$)&&(Me&&G&&I.selectionForeground||ye.fg===Y)&&ye.extended.ext===W&&Ue===j&&V===N&&!Ne&&!le&&!Ke){ye.isInvisible()?T+=m.WHITESPACE_CELL_CHAR:T+=Ye,D++;continue}D&&(L.textContent=T),L=this._document.createElement("span"),D=0,T=""}else L=this._document.createElement("span");if($=ye.bg,Y=ye.fg,W=ye.extended.ext,j=Ue,N=V,G=Me,le&&O>=ue&&O<=Se&&(O=ue),!this._coreService.isCursorHidden&&Ne&&this._coreService.isCursorInitialized){if(X.push("xterm-cursor"),this._coreBrowserService.isFocused)R&&X.push("xterm-cursor-blink"),X.push(A==="bar"?"xterm-cursor-bar":A==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(P)switch(P){case"outline":X.push("xterm-cursor-outline");break;case"block":X.push("xterm-cursor-block");break;case"bar":X.push("xterm-cursor-bar");break;case"underline":X.push("xterm-cursor-underline")}}if(ye.isBold()&&X.push("xterm-bold"),ye.isItalic()&&X.push("xterm-italic"),ye.isDim()&&X.push("xterm-dim"),T=ye.isInvisible()?m.WHITESPACE_CELL_CHAR:ye.getChars()||m.WHITESPACE_CELL_CHAR,ye.isUnderline()&&(X.push(`xterm-underline-${ye.extended.underlineStyle}`),T===" "&&(T=" "),!ye.isUnderlineColorDefault()))if(ye.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${p.AttributeData.toColorRGB(ye.getUnderlineColor()).join(",")})`;else{let ee=ye.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ye.isBold()&&ee<8&&(ee+=8),L.style.textDecorationColor=I.ansi[ee].css}ye.isOverline()&&(X.push("xterm-overline"),T===" "&&(T=" ")),ye.isStrikethrough()&&X.push("xterm-strikethrough"),Ue&&(L.style.textDecoration="underline");let Ee=ye.getFgColor(),je=ye.getFgColorMode(),Ce=ye.getBgColor(),Z=ye.getBgColorMode();const se=!!ye.isInverse();if(se){const ee=Ee;Ee=Ce,Ce=ee;const Ae=je;je=Z,Z=Ae}let we,F,_e,De=!1;switch(this._decorationService.forEachDecorationAtCell(ue,k,void 0,ee=>{ee.options.layer!=="top"&&De||(ee.backgroundColorRGB&&(Z=50331648,Ce=ee.backgroundColorRGB.rgba>>8&16777215,we=ee.backgroundColorRGB),ee.foregroundColorRGB&&(je=50331648,Ee=ee.foregroundColorRGB.rgba>>8&16777215,F=ee.foregroundColorRGB),De=ee.options.layer==="top")}),!De&&Me&&(we=this._coreBrowserService.isFocused?I.selectionBackgroundOpaque:I.selectionInactiveBackgroundOpaque,Ce=we.rgba>>8&16777215,Z=50331648,De=!0,I.selectionForeground&&(je=50331648,Ee=I.selectionForeground.rgba>>8&16777215,F=I.selectionForeground)),De&&X.push("xterm-decoration-top"),Z){case 16777216:case 33554432:_e=I.ansi[Ce],X.push(`xterm-bg-${Ce}`);break;case 50331648:_e=_.channels.toColor(Ce>>16,Ce>>8&255,255&Ce),this._addStyle(L,`background-color:#${S((Ce>>>0).toString(16),"0",6)}`);break;default:se?(_e=I.foreground,X.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):_e=I.background}switch(we||ye.isDim()&&(we=_.color.multiplyOpacity(_e,.5)),je){case 16777216:case 33554432:ye.isBold()&&Ee<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ee+=8),this._applyMinimumContrast(L,_e,I.ansi[Ee],ye,we,void 0)||X.push(`xterm-fg-${Ee}`);break;case 50331648:const ee=_.channels.toColor(Ee>>16&255,Ee>>8&255,255&Ee);this._applyMinimumContrast(L,_e,ee,ye,we,F)||this._addStyle(L,`color:#${S(Ee.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,_e,I.foreground,ye,we,F)||se&&X.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}X.length&&(L.className=X.join(" "),X.length=0),Ne||le||Ke?L.textContent=T:D++,V!==this.defaultSpacing&&(L.style.letterSpacing=`${V}px`),Q.push(L),ue=Se}return L&&D&&(L.textContent=T),Q}_applyMinimumContrast(b,k,C,A,P,O){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,f.treatGlyphAsBackgroundColor)(A.getCode()))return!1;const R=this._getContrastCache(A);let M;if(P||O||(M=R.getColor(k.rgba,C.rgba)),M===void 0){const z=this._optionsService.rawOptions.minimumContrastRatio/(A.isDim()?2:1);M=_.color.ensureContrastRatio(P||k,O||C,z),R.setColor((P||k).rgba,(O||C).rgba,M??null)}return!!M&&(this._addStyle(b,`color:${M.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,k){b.setAttribute("style",`${b.getAttribute("style")||""}${k};`)}_isCellInSelection(b,k){const C=this._selectionStart,A=this._selectionEnd;return!(!C||!A)&&(this._columnSelectMode?C[0]<=A[0]?b>=C[0]&&k>=C[1]&&b<A[0]&&k<=A[1]:b<C[0]&&k>=C[1]&&b>=A[0]&&k<=A[1]:k>C[1]&&k<A[1]||C[1]===A[1]&&k===C[1]&&b>=C[0]&&b<A[0]||C[1]<A[1]&&k===A[1]&&b<A[0]||C[1]<A[1]&&k===C[1]&&b>=C[0])}};function S(b,k,C){for(;b.length<C;)b=k+b;return b}o.DomRendererRowFactory=y=c([h(1,g.ICharacterJoinerService),h(2,w.IOptionsService),h(3,g.ICoreBrowserService),h(4,w.ICoreService),h(5,w.IDecorationService),h(6,g.IThemeService)],y)},2550:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(l,c){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=l.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 h=l.createElement("span");h.classList.add("xterm-char-measure-element");const u=l.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const m=l.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const v=l.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontWeight="bold",v.style.fontStyle="italic",this._measureElements=[h,u,m,v],this._container.appendChild(h),this._container.appendChild(u),this._container.appendChild(m),this._container.appendChild(v),c.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(l,c,h,u){l===this._font&&c===this._fontSize&&h===this._weight&&u===this._weightBold||(this._font=l,this._fontSize=c,this._weight=h,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(l,c,h){let u=0;if(!c&&!h&&l.length===1&&(u=l.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const w=this._measure(l,0);return w>0&&(this._flat[u]=w),w}let m=l;c&&(m+="B"),h&&(m+="I");let v=this._holey.get(m);if(v===void 0){let w=0;c&&(w|=1),h&&(w|=2),v=this._measure(l,w),v>0&&this._holey.set(m,v)}return v}_measure(l,c){const h=this._measureElements[c];return h.textContent=l.repeat(32),h.offsetWidth/32}}},2223:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const c=l(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function l(h){return 57508<=h&&h<=57558}function c(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=l,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=c,o.allowRescaling=function(h,u,m,v){return u===1&&m>Math.ceil(1.5*v)&&h!==void 0&&h>255&&!c(h)&&!l(h)&&!function(w){return 57344<=w&&w<=63743}(h)},o.treatGlyphAsBackgroundColor=function(h){return l(h)||function(u){return 9472<=u&&u<=9631}(h)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(h,u,m=0){return(h-(2*Math.round(u)-m))%(2*Math.round(u))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class l{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(h,u,m,v=!1){if(this.selectionStart=u,this.selectionEnd=m,!u||!m||u[0]===m[0]&&u[1]===m[1])return void this.clear();const w=h.buffers.active.ydisp,_=u[1]-w,g=m[1]-w,d=Math.max(_,0),f=Math.min(g,h.rows-1);d>=h.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=v,this.viewportStartRow=_,this.viewportEndRow=g,this.viewportCappedStartRow=d,this.viewportCappedEndRow=f,this.startCol=u[0],this.endCol=m[0])}isCellSelected(h,u,m){return!!this.hasSelection&&(m-=h.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&m>=this.viewportCappedStartRow&&u<this.endCol&&m<=this.viewportCappedEndRow:u<this.startCol&&m>=this.viewportCappedStartRow&&u>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol)}}o.createSelectionRenderModel=function(){return new l}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(l){this._bufferService=l,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 l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[Math.max(l,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const l=this.selectionStart,c=this.selectionEnd;return!(!l||!c)&&(l[1]>c[1]||l[1]===c[1]&&l[0]>c[0])}handleTrim(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,l){var c=this&&this.__decorate||function(f,p,y,S){var b,k=arguments.length,C=k<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,y,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(k<3?b(C):k>3?b(p,y,C):b(p,y))||C);return k>3&&C&&Object.defineProperty(p,y,C),C},h=this&&this.__param||function(f,p){return function(y,S){p(y,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const u=l(2585),m=l(8460),v=l(844);let w=o.CharSizeService=class extends v.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(f,p,y){super(),this._optionsService=y,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new d(this._optionsService))}catch{this._measureStrategy=this.register(new g(f,p,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const f=this._measureStrategy.measure();f.width===this.width&&f.height===this.height||(this.width=f.width,this.height=f.height,this._onCharSizeChange.fire())}};o.CharSizeService=w=c([h(2,u.IOptionsService)],w);class _ extends v.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(p,y){p!==void 0&&p>0&&y!==void 0&&y>0&&(this._result.width=p,this._result.height=y)}}class g extends _{constructor(p,y,S){super(),this._document=p,this._parentElement=y,this._optionsService=S,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 d extends _{constructor(p){super(),this._optionsService=p,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const y=this._ctx.measureText("W");if(!("width"in y&&"fontBoundingBoxAscent"in y&&"fontBoundingBoxDescent"in y))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const p=this._ctx.measureText("W");return this._validateAndSet(p.width,p.fontBoundingBoxAscent+p.fontBoundingBoxDescent),this._result}}},4269:function(a,o,l){var c=this&&this.__decorate||function(d,f,p,y){var S,b=arguments.length,k=b<3?f:y===null?y=Object.getOwnPropertyDescriptor(f,p):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(d,f,p,y);else for(var C=d.length-1;C>=0;C--)(S=d[C])&&(k=(b<3?S(k):b>3?S(f,p,k):S(f,p))||k);return b>3&&k&&Object.defineProperty(f,p,k),k},h=this&&this.__param||function(d,f){return function(p,y){f(p,y,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const u=l(3734),m=l(643),v=l(511),w=l(2585);class _ extends u.AttributeData{constructor(f,p,y){super(),this.content=0,this.combinedData="",this.fg=f.fg,this.bg=f.bg,this.combinedData=p,this._width=y}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(f){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=_;let g=o.CharacterJoinerService=class AC{constructor(f){this._bufferService=f,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new v.CellData}register(f){const p={id:this._nextCharacterJoinerId++,handler:f};return this._characterJoiners.push(p),p.id}deregister(f){for(let p=0;p<this._characterJoiners.length;p++)if(this._characterJoiners[p].id===f)return this._characterJoiners.splice(p,1),!0;return!1}getJoinedCharacters(f){if(this._characterJoiners.length===0)return[];const p=this._bufferService.buffer.lines.get(f);if(!p||p.length===0)return[];const y=[],S=p.translateToString(!0);let b=0,k=0,C=0,A=p.getFg(0),P=p.getBg(0);for(let O=0;O<p.getTrimmedLength();O++)if(p.loadCell(O,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==A||this._workCell.bg!==P){if(O-b>1){const R=this._getJoinedRanges(S,C,k,p,b);for(let M=0;M<R.length;M++)y.push(R[M])}b=O,C=k,A=this._workCell.fg,P=this._workCell.bg}k+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const O=this._getJoinedRanges(S,C,k,p,b);for(let R=0;R<O.length;R++)y.push(O[R])}return y}_getJoinedRanges(f,p,y,S,b){const k=f.substring(p,y);let C=[];try{C=this._characterJoiners[0].handler(k)}catch(A){console.error(A)}for(let A=1;A<this._characterJoiners.length;A++)try{const P=this._characterJoiners[A].handler(k);for(let O=0;O<P.length;O++)AC._mergeRanges(C,P[O])}catch(P){console.error(P)}return this._stringRangesToCellRanges(C,S,b),C}_stringRangesToCellRanges(f,p,y){let S=0,b=!1,k=0,C=f[S];if(C){for(let A=y;A<this._bufferService.cols;A++){const P=p.getWidth(A),O=p.getString(A).length||m.WHITESPACE_CELL_CHAR.length;if(P!==0){if(!b&&C[0]<=k&&(C[0]=A,b=!0),C[1]<=k){if(C[1]=A,C=f[++S],!C)break;C[0]<=k?(C[0]=A,b=!0):b=!1}k+=O}}C&&(C[1]=this._bufferService.cols)}}static _mergeRanges(f,p){let y=!1;for(let S=0;S<f.length;S++){const b=f[S];if(y){if(p[1]<=b[0])return f[S-1][1]=p[1],f;if(p[1]<=b[1])return f[S-1][1]=Math.max(p[1],b[1]),f.splice(S,1),f;f.splice(S,1),S--}else{if(p[1]<=b[0])return f.splice(S,0,p),f;if(p[1]<=b[1])return b[0]=Math.min(p[0],b[0]),f;p[0]<b[1]&&(b[0]=Math.min(p[0],b[0]),y=!0)}}return y?f[f.length-1][1]=p[1]:f.push(p),f}};o.CharacterJoinerService=g=c([h(0,w.IBufferService)],g)},5114:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const c=l(844),h=l(8460),u=l(3656);class m extends c.Disposable{constructor(_,g,d){super(),this._textarea=_,this._window=g,this.mainDocument=d,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new v(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(f=>this._screenDprMonitor.setWindow(f))),this.register((0,h.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(_){this._window!==_&&(this._window=_,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}o.CoreBrowserService=m;class v extends c.Disposable{constructor(_){super(),this._parentWindow=_,this._windowResizeListener=this.register(new c.MutableDisposable),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,c.toDisposable)(()=>this.clearListener()))}setWindow(_){this._parentWindow=_,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)==null||_.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:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const c=l(844);class h extends c.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,c.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const v=this.linkProviders.indexOf(m);v!==-1&&this.linkProviders.splice(v,1)}}}}o.LinkProviderService=h},8934:function(a,o,l){var c=this&&this.__decorate||function(w,_,g,d){var f,p=arguments.length,y=p<3?_:d===null?d=Object.getOwnPropertyDescriptor(_,g):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(w,_,g,d);else for(var S=w.length-1;S>=0;S--)(f=w[S])&&(y=(p<3?f(y):p>3?f(_,g,y):f(_,g))||y);return p>3&&y&&Object.defineProperty(_,g,y),y},h=this&&this.__param||function(w,_){return function(g,d){_(g,d,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const u=l(4725),m=l(9806);let v=o.MouseService=class{constructor(w,_){this._renderService=w,this._charSizeService=_}getCoords(w,_,g,d,f){return(0,m.getCoords)(window,w,_,g,d,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,f)}getMouseReportCoords(w,_){const g=(0,m.getCoordsRelativeToElement)(window,w,_);if(this._charSizeService.hasValidSize)return g[0]=Math.min(Math.max(g[0],0),this._renderService.dimensions.css.canvas.width-1),g[1]=Math.min(Math.max(g[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(g[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(g[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(g[0]),y:Math.floor(g[1])}}};o.MouseService=v=c([h(0,u.IRenderService),h(1,u.ICharSizeService)],v)},3230:function(a,o,l){var c=this&&this.__decorate||function(f,p,y,S){var b,k=arguments.length,C=k<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,y,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(k<3?b(C):k>3?b(p,y,C):b(p,y))||C);return k>3&&C&&Object.defineProperty(p,y,C),C},h=this&&this.__param||function(f,p){return function(y,S){p(y,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const u=l(6193),m=l(4725),v=l(8460),w=l(844),_=l(7226),g=l(2585);let d=o.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(f,p,y,S,b,k,C,A){super(),this._rowCount=f,this._charSizeService=S,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new _.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 v.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new v.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new v.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new v.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((P,O)=>this._renderRows(P,O),C),this.register(this._renderDebouncer),this.register(C.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(k.onResize(()=>this._fullRefresh())),this.register(k.buffers.onBufferActivate(()=>{var P;return(P=this._renderer.value)==null?void 0:P.clear()})),this.register(y.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(b.onDecorationRegistered(()=>this._fullRefresh())),this.register(b.onDecorationRemoved(()=>this._fullRefresh())),this.register(y.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(k.cols,k.rows),this._fullRefresh()})),this.register(y.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(k.buffer.y,k.buffer.y,!0))),this.register(A.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(C.window,p),this.register(C.onWindowChange(P=>this._registerIntersectionObserver(P,p)))}_registerIntersectionObserver(f,p){if("IntersectionObserver"in f){const y=new f.IntersectionObserver(S=>this._handleIntersectionChange(S[S.length-1]),{threshold:0});y.observe(p),this._observerDisposable.value=(0,w.toDisposable)(()=>y.disconnect())}}_handleIntersectionChange(f){this._isPaused=f.isIntersecting===void 0?f.intersectionRatio===0:!f.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(f,p,y=!1){this._isPaused?this._needsFullRefresh=!0:(y||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(f,p,this._rowCount))}_renderRows(f,p){this._renderer.value&&(f=Math.min(f,this._rowCount-1),p=Math.min(p,this._rowCount-1),this._renderer.value.renderRows(f,p),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:f,end:p}),this._onRender.fire({start:f,end:p}),this._isNextRenderRedrawOnly=!0)}resize(f,p){this._rowCount=p,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(f){this._renderer.value=f,this._renderer.value&&(this._renderer.value.onRequestRedraw(p=>this.refreshRows(p.start,p.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(f){return this._renderDebouncer.addRefreshCallback(f)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var f,p;this._renderer.value&&((p=(f=this._renderer.value).clearTextureAtlas)==null||p.call(f),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(f,p){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var y;return(y=this._renderer.value)==null?void 0:y.handleResize(f,p)}):this._renderer.value.handleResize(f,p),this._fullRefresh())}handleCharSizeChanged(){var f;(f=this._renderer.value)==null||f.handleCharSizeChanged()}handleBlur(){var f;(f=this._renderer.value)==null||f.handleBlur()}handleFocus(){var f;(f=this._renderer.value)==null||f.handleFocus()}handleSelectionChanged(f,p,y){var S;this._selectionState.start=f,this._selectionState.end=p,this._selectionState.columnSelectMode=y,(S=this._renderer.value)==null||S.handleSelectionChanged(f,p,y)}handleCursorMove(){var f;(f=this._renderer.value)==null||f.handleCursorMove()}clear(){var f;(f=this._renderer.value)==null||f.clear()}};o.RenderService=d=c([h(2,g.IOptionsService),h(3,m.ICharSizeService),h(4,g.IDecorationService),h(5,g.IBufferService),h(6,m.ICoreBrowserService),h(7,m.IThemeService)],d)},9312:function(a,o,l){var c=this&&this.__decorate||function(C,A,P,O){var R,M=arguments.length,z=M<3?A:O===null?O=Object.getOwnPropertyDescriptor(A,P):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(C,A,P,O);else for(var U=C.length-1;U>=0;U--)(R=C[U])&&(z=(M<3?R(z):M>3?R(A,P,z):R(A,P))||z);return M>3&&z&&Object.defineProperty(A,P,z),z},h=this&&this.__param||function(C,A){return function(P,O){A(P,O,C)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const u=l(9806),m=l(9504),v=l(456),w=l(4725),_=l(8460),g=l(844),d=l(6114),f=l(4841),p=l(511),y=l(2585),S=" ",b=new RegExp(S,"g");let k=o.SelectionService=class extends g.Disposable{constructor(C,A,P,O,R,M,z,U,q){super(),this._element=C,this._screenElement=A,this._linkifier=P,this._bufferService=O,this._coreService=R,this._mouseService=M,this._optionsService=z,this._renderService=U,this._coreBrowserService=q,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new p.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new _.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new _.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new _.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new _.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 v.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,g.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 C=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!C||!A||C[0]===A[0]&&C[1]===A[1])}get selectionText(){const C=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;if(!C||!A)return"";const P=this._bufferService.buffer,O=[];if(this._activeSelectionMode===3){if(C[0]===A[0])return"";const R=C[0]<A[0]?C[0]:A[0],M=C[0]<A[0]?A[0]:C[0];for(let z=C[1];z<=A[1];z++){const U=P.translateBufferLineToString(z,!0,R,M);O.push(U)}}else{const R=C[1]===A[1]?A[0]:void 0;O.push(P.translateBufferLineToString(C[1],!0,C[0],R));for(let M=C[1]+1;M<=A[1]-1;M++){const z=P.lines.get(M),U=P.translateBufferLineToString(M,!0);z!=null&&z.isWrapped?O[O.length-1]+=U:O.push(U)}if(C[1]!==A[1]){const M=P.lines.get(A[1]),z=P.translateBufferLineToString(A[1],!0,0,A[0]);M&&M.isWrapped?O[O.length-1]+=z:O.push(z)}}return O.map(R=>R.replace(b," ")).join(d.isWindows?`\r
696
- `:`
697
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(C){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),d.isLinux&&C&&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(C){const A=this._getMouseBufferCoords(C),P=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!!(P&&O&&A)&&this._areCoordsInSelection(A,P,O)}isCellInSelection(C,A){const P=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!(!P||!O)&&this._areCoordsInSelection([C,A],P,O)}_areCoordsInSelection(C,A,P){return C[1]>A[1]&&C[1]<P[1]||A[1]===P[1]&&C[1]===A[1]&&C[0]>=A[0]&&C[0]<P[0]||A[1]<P[1]&&C[1]===P[1]&&C[0]<P[0]||A[1]<P[1]&&C[1]===A[1]&&C[0]>=A[0]}_selectWordAtCursor(C,A){var R,M;const P=(M=(R=this._linkifier.currentLink)==null?void 0:R.link)==null?void 0:M.range;if(P)return this._model.selectionStart=[P.start.x-1,P.start.y-1],this._model.selectionStartLength=(0,f.getRangeLength)(P,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const O=this._getMouseBufferCoords(C);return!!O&&(this._selectWordAt(O,A),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(C,A){this._model.clearSelection(),C=Math.max(C,0),A=Math.min(A,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,C],this._model.selectionEnd=[this._bufferService.cols,A],this.refresh(),this._onSelectionChange.fire()}_handleTrim(C){this._model.handleTrim(C)&&this.refresh()}_getMouseBufferCoords(C){const A=this._mouseService.getCoords(C,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(A)return A[0]--,A[1]--,A[1]+=this._bufferService.buffer.ydisp,A}_getMouseEventScrollAmount(C){let A=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,C,this._screenElement)[1];const P=this._renderService.dimensions.css.canvas.height;return A>=0&&A<=P?0:(A>P&&(A-=P),A=Math.min(Math.max(A,-50),50),A/=50,A/Math.abs(A)+Math.round(14*A))}shouldForceSelection(C){return d.isMac?C.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:C.shiftKey}handleMouseDown(C){if(this._mouseDownTimeStamp=C.timeStamp,(C.button!==2||!this.hasSelection)&&C.button===0){if(!this._enabled){if(!this.shouldForceSelection(C))return;C.stopPropagation()}C.preventDefault(),this._dragScrollAmount=0,this._enabled&&C.shiftKey?this._handleIncrementalClick(C):C.detail===1?this._handleSingleClick(C):C.detail===2?this._handleDoubleClick(C):C.detail===3&&this._handleTripleClick(C),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(C){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(C))}_handleSingleClick(C){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(C)?3:0,this._model.selectionStart=this._getMouseBufferCoords(C),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const A=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);A&&A.length!==this._model.selectionStart[0]&&A.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(C){this._selectWordAtCursor(C,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(C){const A=this._getMouseBufferCoords(C);A&&(this._activeSelectionMode=2,this._selectLineAt(A[1]))}shouldColumnSelect(C){return C.altKey&&!(d.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(C){if(C.stopImmediatePropagation(),!this._model.selectionStart)return;const A=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(C),!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(C),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const P=this._bufferService.buffer;if(this._model.selectionEnd[1]<P.lines.length){const O=P.lines.get(this._model.selectionEnd[1]);O&&O.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}A&&A[0]===this._model.selectionEnd[0]&&A[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 C=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(C.ydisp+this._bufferService.rows,C.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=C.ydisp),this.refresh()}}_handleMouseUp(C){const A=C.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&A<500&&C.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const P=this._mouseService.getCoords(C,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(P&&P[0]!==void 0&&P[1]!==void 0){const O=(0,m.moveToCellSequence)(P[0]-1,P[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(O,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const C=this._model.finalSelectionStart,A=this._model.finalSelectionEnd,P=!(!C||!A||C[0]===A[0]&&C[1]===A[1]);P?C&&A&&(this._oldSelectionStart&&this._oldSelectionEnd&&C[0]===this._oldSelectionStart[0]&&C[1]===this._oldSelectionStart[1]&&A[0]===this._oldSelectionEnd[0]&&A[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(C,A,P)):this._oldHasSelection&&this._fireOnSelectionChange(C,A,P)}_fireOnSelectionChange(C,A,P){this._oldSelectionStart=C,this._oldSelectionEnd=A,this._oldHasSelection=P,this._onSelectionChange.fire()}_handleBufferActivate(C){this.clearSelection(),this._trimListener.dispose(),this._trimListener=C.activeBuffer.lines.onTrim(A=>this._handleTrim(A))}_convertViewportColToCharacterIndex(C,A){let P=A;for(let O=0;A>=O;O++){const R=C.loadCell(O,this._workCell).getChars().length;this._workCell.getWidth()===0?P--:R>1&&A!==O&&(P+=R-1)}return P}setSelection(C,A,P){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[C,A],this._model.selectionStartLength=P,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(C){this._isClickInSelection(C)||(this._selectWordAtCursor(C,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(C,A,P=!0,O=!0){if(C[0]>=this._bufferService.cols)return;const R=this._bufferService.buffer,M=R.lines.get(C[1]);if(!M)return;const z=R.translateBufferLineToString(C[1],!1);let U=this._convertViewportColToCharacterIndex(M,C[0]),q=U;const Q=C[0]-U;let H=0,I=0,L=0,B=0;if(z.charAt(U)===" "){for(;U>0&&z.charAt(U-1)===" ";)U--;for(;q<z.length&&z.charAt(q+1)===" ";)q++}else{let $=C[0],Y=C[0];M.getWidth($)===0&&(H++,$--),M.getWidth(Y)===2&&(I++,Y++);const W=M.getString(Y).length;for(W>1&&(B+=W-1,q+=W-1);$>0&&U>0&&!this._isCharWordSeparator(M.loadCell($-1,this._workCell));){M.loadCell($-1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===0?(H++,$--):j>1&&(L+=j-1,U-=j-1),U--,$--}for(;Y<M.length&&q+1<z.length&&!this._isCharWordSeparator(M.loadCell(Y+1,this._workCell));){M.loadCell(Y+1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===2?(I++,Y++):j>1&&(B+=j-1,q+=j-1),q++,Y++}}q++;let D=U+Q-H+L,T=Math.min(this._bufferService.cols,q-U+H+I-L-B);if(A||z.slice(U,q).trim()!==""){if(P&&D===0&&M.getCodePoint(0)!==32){const $=R.lines.get(C[1]-1);if($&&M.isWrapped&&$.getCodePoint(this._bufferService.cols-1)!==32){const Y=this._getWordAt([this._bufferService.cols-1,C[1]-1],!1,!0,!1);if(Y){const W=this._bufferService.cols-Y.start;D-=W,T+=W}}}if(O&&D+T===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){const $=R.lines.get(C[1]+1);if($!=null&&$.isWrapped&&$.getCodePoint(0)!==32){const Y=this._getWordAt([0,C[1]+1],!1,!1,!0);Y&&(T+=Y.length)}}return{start:D,length:T}}}_selectWordAt(C,A){const P=this._getWordAt(C,A);if(P){for(;P.start<0;)P.start+=this._bufferService.cols,C[1]--;this._model.selectionStart=[P.start,C[1]],this._model.selectionStartLength=P.length}}_selectToWordAt(C){const A=this._getWordAt(C,!0);if(A){let P=C[1];for(;A.start<0;)A.start+=this._bufferService.cols,P--;if(!this._model.areSelectionValuesReversed())for(;A.start+A.length>this._bufferService.cols;)A.length-=this._bufferService.cols,P++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?A.start:A.start+A.length,P]}}_isCharWordSeparator(C){return C.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(C.getChars())>=0}_selectLineAt(C){const A=this._bufferService.buffer.getWrappedRangeForLine(C),P={start:{x:0,y:A.first},end:{x:this._bufferService.cols-1,y:A.last}};this._model.selectionStart=[0,A.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,f.getRangeLength)(P,this._bufferService.cols)}};o.SelectionService=k=c([h(3,y.IBufferService),h(4,y.ICoreService),h(5,w.IMouseService),h(6,y.IOptionsService),h(7,w.IRenderService),h(8,w.ICoreBrowserService)],k)},4725:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const c=l(8343);o.ICharSizeService=(0,c.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),o.IMouseService=(0,c.createDecorator)("MouseService"),o.IRenderService=(0,c.createDecorator)("RenderService"),o.ISelectionService=(0,c.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,c.createDecorator)("ThemeService"),o.ILinkProviderService=(0,c.createDecorator)("LinkProviderService")},6731:function(a,o,l){var c=this&&this.__decorate||function(k,C,A,P){var O,R=arguments.length,M=R<3?C:P===null?P=Object.getOwnPropertyDescriptor(C,A):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(k,C,A,P);else for(var z=k.length-1;z>=0;z--)(O=k[z])&&(M=(R<3?O(M):R>3?O(C,A,M):O(C,A))||M);return R>3&&M&&Object.defineProperty(C,A,M),M},h=this&&this.__param||function(k,C){return function(A,P){C(A,P,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const u=l(7239),m=l(8055),v=l(8460),w=l(844),_=l(2585),g=m.css.toColor("#ffffff"),d=m.css.toColor("#000000"),f=m.css.toColor("#ffffff"),p=m.css.toColor("#000000"),y={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const k=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],C=[0,95,135,175,215,255];for(let A=0;A<216;A++){const P=C[A/36%6|0],O=C[A/6%6|0],R=C[A%6];k.push({css:m.channels.toCss(P,O,R),rgba:m.channels.toRgba(P,O,R)})}for(let A=0;A<24;A++){const P=8+10*A;k.push({css:m.channels.toCss(P,P,P),rgba:m.channels.toRgba(P,P,P)})}return k})());let S=o.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(k){super(),this._optionsService=k,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new v.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:g,background:d,cursor:f,cursorAccent:p,selectionForeground:void 0,selectionBackgroundTransparent:y,selectionBackgroundOpaque:m.color.blend(d,y),selectionInactiveBackgroundTransparent:y,selectionInactiveBackgroundOpaque:m.color.blend(d,y),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(k={}){const C=this._colors;if(C.foreground=b(k.foreground,g),C.background=b(k.background,d),C.cursor=b(k.cursor,f),C.cursorAccent=b(k.cursorAccent,p),C.selectionBackgroundTransparent=b(k.selectionBackground,y),C.selectionBackgroundOpaque=m.color.blend(C.background,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundTransparent=b(k.selectionInactiveBackground,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundOpaque=m.color.blend(C.background,C.selectionInactiveBackgroundTransparent),C.selectionForeground=k.selectionForeground?b(k.selectionForeground,m.NULL_COLOR):void 0,C.selectionForeground===m.NULL_COLOR&&(C.selectionForeground=void 0),m.color.isOpaque(C.selectionBackgroundTransparent)&&(C.selectionBackgroundTransparent=m.color.opacity(C.selectionBackgroundTransparent,.3)),m.color.isOpaque(C.selectionInactiveBackgroundTransparent)&&(C.selectionInactiveBackgroundTransparent=m.color.opacity(C.selectionInactiveBackgroundTransparent,.3)),C.ansi=o.DEFAULT_ANSI_COLORS.slice(),C.ansi[0]=b(k.black,o.DEFAULT_ANSI_COLORS[0]),C.ansi[1]=b(k.red,o.DEFAULT_ANSI_COLORS[1]),C.ansi[2]=b(k.green,o.DEFAULT_ANSI_COLORS[2]),C.ansi[3]=b(k.yellow,o.DEFAULT_ANSI_COLORS[3]),C.ansi[4]=b(k.blue,o.DEFAULT_ANSI_COLORS[4]),C.ansi[5]=b(k.magenta,o.DEFAULT_ANSI_COLORS[5]),C.ansi[6]=b(k.cyan,o.DEFAULT_ANSI_COLORS[6]),C.ansi[7]=b(k.white,o.DEFAULT_ANSI_COLORS[7]),C.ansi[8]=b(k.brightBlack,o.DEFAULT_ANSI_COLORS[8]),C.ansi[9]=b(k.brightRed,o.DEFAULT_ANSI_COLORS[9]),C.ansi[10]=b(k.brightGreen,o.DEFAULT_ANSI_COLORS[10]),C.ansi[11]=b(k.brightYellow,o.DEFAULT_ANSI_COLORS[11]),C.ansi[12]=b(k.brightBlue,o.DEFAULT_ANSI_COLORS[12]),C.ansi[13]=b(k.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),C.ansi[14]=b(k.brightCyan,o.DEFAULT_ANSI_COLORS[14]),C.ansi[15]=b(k.brightWhite,o.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const A=Math.min(C.ansi.length-16,k.extendedAnsi.length);for(let P=0;P<A;P++)C.ansi[P+16]=b(k.extendedAnsi[P],o.DEFAULT_ANSI_COLORS[P+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(k){this._restoreColor(k),this._onChangeColors.fire(this.colors)}_restoreColor(k){if(k!==void 0)switch(k){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[k]=this._restoreColors.ansi[k]}else for(let C=0;C<this._restoreColors.ansi.length;++C)this._colors.ansi[C]=this._restoreColors.ansi[C]}modifyColors(k){k(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 b(k,C){if(k!==void 0)try{return m.css.toColor(k)}catch{}return C}o.ThemeService=S=c([h(0,_.IOptionsService)],S)},6349:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const c=l(8460),h=l(844);class u extends h.Disposable{constructor(v){super(),this._maxLength=v,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.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(v){if(this._maxLength===v)return;const w=new Array(v);for(let _=0;_<Math.min(v,this.length);_++)w[_]=this._array[this._getCyclicIndex(_)];this._array=w,this._maxLength=v,this._startIndex=0}get length(){return this._length}set length(v){if(v>this._length)for(let w=this._length;w<v;w++)this._array[w]=void 0;this._length=v}get(v){return this._array[this._getCyclicIndex(v)]}set(v,w){this._array[this._getCyclicIndex(v)]=w}push(v){this._array[this._getCyclicIndex(this._length)]=v,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(v,w,..._){if(w){for(let g=v;g<this._length-w;g++)this._array[this._getCyclicIndex(g)]=this._array[this._getCyclicIndex(g+w)];this._length-=w,this.onDeleteEmitter.fire({index:v,amount:w})}for(let g=this._length-1;g>=v;g--)this._array[this._getCyclicIndex(g+_.length)]=this._array[this._getCyclicIndex(g)];for(let g=0;g<_.length;g++)this._array[this._getCyclicIndex(v+g)]=_[g];if(_.length&&this.onInsertEmitter.fire({index:v,amount:_.length}),this._length+_.length>this._maxLength){const g=this._length+_.length-this._maxLength;this._startIndex+=g,this._length=this._maxLength,this.onTrimEmitter.fire(g)}else this._length+=_.length}trimStart(v){v>this._length&&(v=this._length),this._startIndex+=v,this._length-=v,this.onTrimEmitter.fire(v)}shiftElements(v,w,_){if(!(w<=0)){if(v<0||v>=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(_>0){for(let d=w-1;d>=0;d--)this.set(v+d+_,this.get(v+d));const g=v+w+_-this._length;if(g>0)for(this._length+=g;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let g=0;g<w;g++)this.set(v+g+_,this.get(v+g))}}_getCyclicIndex(v){return(this._startIndex+v)%this._maxLength}}o.CircularList=u},1439:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function l(c,h=5){if(typeof c!="object")return c;const u=Array.isArray(c)?[]:{};for(const m in c)u[m]=h<=1?c[m]:c[m]&&l(c[m],h-1);return u}},8055:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let l=0,c=0,h=0,u=0;var m,v,w,_,g;function d(p){const y=p.toString(16);return y.length<2?"0"+y:y}function f(p,y){return p<y?(y+.05)/(p+.05):(p+.05)/(y+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},function(p){p.toCss=function(y,S,b,k){return k!==void 0?`#${d(y)}${d(S)}${d(b)}${d(k)}`:`#${d(y)}${d(S)}${d(b)}`},p.toRgba=function(y,S,b,k=255){return(y<<24|S<<16|b<<8|k)>>>0},p.toColor=function(y,S,b,k){return{css:p.toCss(y,S,b,k),rgba:p.toRgba(y,S,b,k)}}}(m||(o.channels=m={})),function(p){function y(S,b){return u=Math.round(255*b),[l,c,h]=g.toChannels(S.rgba),{css:m.toCss(l,c,h,u),rgba:m.toRgba(l,c,h,u)}}p.blend=function(S,b){if(u=(255&b.rgba)/255,u===1)return{css:b.css,rgba:b.rgba};const k=b.rgba>>24&255,C=b.rgba>>16&255,A=b.rgba>>8&255,P=S.rgba>>24&255,O=S.rgba>>16&255,R=S.rgba>>8&255;return l=P+Math.round((k-P)*u),c=O+Math.round((C-O)*u),h=R+Math.round((A-R)*u),{css:m.toCss(l,c,h),rgba:m.toRgba(l,c,h)}},p.isOpaque=function(S){return(255&S.rgba)==255},p.ensureContrastRatio=function(S,b,k){const C=g.ensureContrastRatio(S.rgba,b.rgba,k);if(C)return m.toColor(C>>24&255,C>>16&255,C>>8&255)},p.opaque=function(S){const b=(255|S.rgba)>>>0;return[l,c,h]=g.toChannels(b),{css:m.toCss(l,c,h),rgba:b}},p.opacity=y,p.multiplyOpacity=function(S,b){return u=255&S.rgba,y(S,u*b/255)},p.toColorRGB=function(S){return[S.rgba>>24&255,S.rgba>>16&255,S.rgba>>8&255]}}(v||(o.color=v={})),function(p){let y,S;try{const b=document.createElement("canvas");b.width=1,b.height=1;const k=b.getContext("2d",{willReadFrequently:!0});k&&(y=k,y.globalCompositeOperation="copy",S=y.createLinearGradient(0,0,1,1))}catch{}p.toColor=function(b){if(b.match(/#[\da-f]{3,8}/i))switch(b.length){case 4:return l=parseInt(b.slice(1,2).repeat(2),16),c=parseInt(b.slice(2,3).repeat(2),16),h=parseInt(b.slice(3,4).repeat(2),16),m.toColor(l,c,h);case 5:return l=parseInt(b.slice(1,2).repeat(2),16),c=parseInt(b.slice(2,3).repeat(2),16),h=parseInt(b.slice(3,4).repeat(2),16),u=parseInt(b.slice(4,5).repeat(2),16),m.toColor(l,c,h,u);case 7:return{css:b,rgba:(parseInt(b.slice(1),16)<<8|255)>>>0};case 9:return{css:b,rgba:parseInt(b.slice(1),16)>>>0}}const k=b.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(k)return l=parseInt(k[1]),c=parseInt(k[2]),h=parseInt(k[3]),u=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),m.toColor(l,c,h,u);if(!y||!S)throw new Error("css.toColor: Unsupported css format");if(y.fillStyle=S,y.fillStyle=b,typeof y.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(y.fillRect(0,0,1,1),[l,c,h,u]=y.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(l,c,h,u),css:b}}}(w||(o.css=w={})),function(p){function y(S,b,k){const C=S/255,A=b/255,P=k/255;return .2126*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.7152*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.0722*(P<=.03928?P/12.92:Math.pow((P+.055)/1.055,2.4))}p.relativeLuminance=function(S){return y(S>>16&255,S>>8&255,255&S)},p.relativeLuminance2=y}(_||(o.rgb=_={})),function(p){function y(b,k,C){const A=b>>24&255,P=b>>16&255,O=b>>8&255;let R=k>>24&255,M=k>>16&255,z=k>>8&255,U=f(_.relativeLuminance2(R,M,z),_.relativeLuminance2(A,P,O));for(;U<C&&(R>0||M>0||z>0);)R-=Math.max(0,Math.ceil(.1*R)),M-=Math.max(0,Math.ceil(.1*M)),z-=Math.max(0,Math.ceil(.1*z)),U=f(_.relativeLuminance2(R,M,z),_.relativeLuminance2(A,P,O));return(R<<24|M<<16|z<<8|255)>>>0}function S(b,k,C){const A=b>>24&255,P=b>>16&255,O=b>>8&255;let R=k>>24&255,M=k>>16&255,z=k>>8&255,U=f(_.relativeLuminance2(R,M,z),_.relativeLuminance2(A,P,O));for(;U<C&&(R<255||M<255||z<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),M=Math.min(255,M+Math.ceil(.1*(255-M))),z=Math.min(255,z+Math.ceil(.1*(255-z))),U=f(_.relativeLuminance2(R,M,z),_.relativeLuminance2(A,P,O));return(R<<24|M<<16|z<<8|255)>>>0}p.blend=function(b,k){if(u=(255&k)/255,u===1)return k;const C=k>>24&255,A=k>>16&255,P=k>>8&255,O=b>>24&255,R=b>>16&255,M=b>>8&255;return l=O+Math.round((C-O)*u),c=R+Math.round((A-R)*u),h=M+Math.round((P-M)*u),m.toRgba(l,c,h)},p.ensureContrastRatio=function(b,k,C){const A=_.relativeLuminance(b>>8),P=_.relativeLuminance(k>>8);if(f(A,P)<C){if(P<A){const M=y(b,k,C),z=f(A,_.relativeLuminance(M>>8));if(z<C){const U=S(b,k,C);return z>f(A,_.relativeLuminance(U>>8))?M:U}return M}const O=S(b,k,C),R=f(A,_.relativeLuminance(O>>8));if(R<C){const M=y(b,k,C);return R>f(A,_.relativeLuminance(M>>8))?O:M}return O}},p.reduceLuminance=y,p.increaseLuminance=S,p.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]}}(g||(o.rgba=g={})),o.toPaddedHex=d,o.contrastRatio=f},8969:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const c=l(844),h=l(2585),u=l(4348),m=l(7866),v=l(744),w=l(7302),_=l(6975),g=l(8460),d=l(1753),f=l(1480),p=l(7994),y=l(9282),S=l(5435),b=l(5981),k=l(2660);let C=!1;class A extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new g.EventEmitter),this._onScroll.event(O=>{var R;(R=this._onScrollApi)==null||R.fire(O.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(O){for(const R in O)this.optionsService.options[R]=O[R]}constructor(O){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new g.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new g.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new g.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new g.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new w.OptionsService(O)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(v.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(_.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(d.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(f.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(p.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(k.OscLinkService),this._instantiationService.setService(h.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new S.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,g.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,g.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,g.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,g.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(R=>{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(R=>{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 b.WriteBuffer((R,M)=>this._inputHandler.parse(R,M))),this.register((0,g.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(O,R){this._writeBuffer.write(O,R)}writeSync(O,R){this._logService.logLevel<=h.LogLevelEnum.WARN&&!C&&(this._logService.warn("writeSync is unreliable and will be removed soon."),C=!0),this._writeBuffer.writeSync(O,R)}input(O,R=!0){this.coreService.triggerDataEvent(O,R)}resize(O,R){isNaN(O)||isNaN(R)||(O=Math.max(O,v.MINIMUM_COLS),R=Math.max(R,v.MINIMUM_ROWS),this._bufferService.resize(O,R))}scroll(O,R=!1){this._bufferService.scroll(O,R)}scrollLines(O,R,M){this._bufferService.scrollLines(O,R,M)}scrollPages(O){this.scrollLines(O*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(O){const R=O-this._bufferService.buffer.ydisp;R!==0&&this.scrollLines(R)}registerEscHandler(O,R){return this._inputHandler.registerEscHandler(O,R)}registerDcsHandler(O,R){return this._inputHandler.registerDcsHandler(O,R)}registerCsiHandler(O,R){return this._inputHandler.registerCsiHandler(O,R)}registerOscHandler(O,R){return this._inputHandler.registerOscHandler(O,R)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let O=!1;const R=this.optionsService.rawOptions.windowsPty;R&&R.buildNumber!==void 0&&R.buildNumber!==void 0?O=R.backend==="conpty"&&R.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(O=!0),O?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const O=[];O.push(this.onLineFeed(y.updateWindowsModeWrappedState.bind(null,this._bufferService))),O.push(this.registerCsiHandler({final:"H"},()=>((0,y.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(const R of O)R.dispose()})}}}o.CoreTerminal=A},8460:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===l)return void this._listeners.splice(c,1)}}})),this._event}fire(l,c){const h=[];for(let u=0;u<this._listeners.length;u++)h.push(this._listeners[u]);for(let u=0;u<h.length;u++)h[u].call(void 0,l,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(l,c){return l(h=>c.fire(h))},o.runAndSubscribe=function(l,c){return c(void 0),l(h=>c(h))}},5435:function(a,o,l){var c=this&&this.__decorate||function(H,I,L,B){var D,T=arguments.length,$=T<3?I:B===null?B=Object.getOwnPropertyDescriptor(I,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(H,I,L,B);else for(var Y=H.length-1;Y>=0;Y--)(D=H[Y])&&($=(T<3?D($):T>3?D(I,L,$):D(I,L))||$);return T>3&&$&&Object.defineProperty(I,L,$),$},h=this&&this.__param||function(H,I){return function(L,B){I(L,B,H)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const u=l(2584),m=l(7116),v=l(2015),w=l(844),_=l(482),g=l(8437),d=l(8460),f=l(643),p=l(511),y=l(3734),S=l(2585),b=l(1480),k=l(6242),C=l(6351),A=l(5941),P={"(":0,")":1,"*":2,"+":3,"-":1,".":2},O=131072;function R(H,I){if(H>24)return I.setWinLines||!1;switch(H){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var M;(function(H){H[H.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",H[H.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(o.WindowsOptionsReportType=M={}));let z=0;class U extends w.Disposable{getAttrData(){return this._curAttrData}constructor(I,L,B,D,T,$,Y,W,j=new v.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=L,this._coreService=B,this._logService=D,this._optionsService=T,this._oscLinkService=$,this._coreMouseService=Y,this._unicodeService=W,this._parser=j,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new _.StringToUtf32,this._utf8Decoder=new _.Utf8ToUtf32,this._workCell=new p.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=g.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=g.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new d.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new d.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new d.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new d.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new d.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new d.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new d.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new d.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new d.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new d.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new d.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new d.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(N=>this._activeBuffer=N.activeBuffer)),this._parser.setCsiHandlerFallback((N,G)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(N),params:G.toArray()})}),this._parser.setEscHandlerFallback(N=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(N)})}),this._parser.setExecuteHandlerFallback(N=>{this._logService.debug("Unknown EXECUTE code: ",{code:N})}),this._parser.setOscHandlerFallback((N,G,V)=>{this._logService.debug("Unknown OSC code: ",{identifier:N,action:G,data:V})}),this._parser.setDcsHandlerFallback((N,G,V)=>{G==="HOOK"&&(V=V.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(N),action:G,payload:V})}),this._parser.setPrintHandler((N,G,V)=>this.print(N,G,V)),this._parser.registerCsiHandler({final:"@"},N=>this.insertChars(N)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},N=>this.scrollLeft(N)),this._parser.registerCsiHandler({final:"A"},N=>this.cursorUp(N)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},N=>this.scrollRight(N)),this._parser.registerCsiHandler({final:"B"},N=>this.cursorDown(N)),this._parser.registerCsiHandler({final:"C"},N=>this.cursorForward(N)),this._parser.registerCsiHandler({final:"D"},N=>this.cursorBackward(N)),this._parser.registerCsiHandler({final:"E"},N=>this.cursorNextLine(N)),this._parser.registerCsiHandler({final:"F"},N=>this.cursorPrecedingLine(N)),this._parser.registerCsiHandler({final:"G"},N=>this.cursorCharAbsolute(N)),this._parser.registerCsiHandler({final:"H"},N=>this.cursorPosition(N)),this._parser.registerCsiHandler({final:"I"},N=>this.cursorForwardTab(N)),this._parser.registerCsiHandler({final:"J"},N=>this.eraseInDisplay(N,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},N=>this.eraseInDisplay(N,!0)),this._parser.registerCsiHandler({final:"K"},N=>this.eraseInLine(N,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},N=>this.eraseInLine(N,!0)),this._parser.registerCsiHandler({final:"L"},N=>this.insertLines(N)),this._parser.registerCsiHandler({final:"M"},N=>this.deleteLines(N)),this._parser.registerCsiHandler({final:"P"},N=>this.deleteChars(N)),this._parser.registerCsiHandler({final:"S"},N=>this.scrollUp(N)),this._parser.registerCsiHandler({final:"T"},N=>this.scrollDown(N)),this._parser.registerCsiHandler({final:"X"},N=>this.eraseChars(N)),this._parser.registerCsiHandler({final:"Z"},N=>this.cursorBackwardTab(N)),this._parser.registerCsiHandler({final:"`"},N=>this.charPosAbsolute(N)),this._parser.registerCsiHandler({final:"a"},N=>this.hPositionRelative(N)),this._parser.registerCsiHandler({final:"b"},N=>this.repeatPrecedingCharacter(N)),this._parser.registerCsiHandler({final:"c"},N=>this.sendDeviceAttributesPrimary(N)),this._parser.registerCsiHandler({prefix:">",final:"c"},N=>this.sendDeviceAttributesSecondary(N)),this._parser.registerCsiHandler({final:"d"},N=>this.linePosAbsolute(N)),this._parser.registerCsiHandler({final:"e"},N=>this.vPositionRelative(N)),this._parser.registerCsiHandler({final:"f"},N=>this.hVPosition(N)),this._parser.registerCsiHandler({final:"g"},N=>this.tabClear(N)),this._parser.registerCsiHandler({final:"h"},N=>this.setMode(N)),this._parser.registerCsiHandler({prefix:"?",final:"h"},N=>this.setModePrivate(N)),this._parser.registerCsiHandler({final:"l"},N=>this.resetMode(N)),this._parser.registerCsiHandler({prefix:"?",final:"l"},N=>this.resetModePrivate(N)),this._parser.registerCsiHandler({final:"m"},N=>this.charAttributes(N)),this._parser.registerCsiHandler({final:"n"},N=>this.deviceStatus(N)),this._parser.registerCsiHandler({prefix:"?",final:"n"},N=>this.deviceStatusPrivate(N)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},N=>this.softReset(N)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},N=>this.setCursorStyle(N)),this._parser.registerCsiHandler({final:"r"},N=>this.setScrollRegion(N)),this._parser.registerCsiHandler({final:"s"},N=>this.saveCursor(N)),this._parser.registerCsiHandler({final:"t"},N=>this.windowOptions(N)),this._parser.registerCsiHandler({final:"u"},N=>this.restoreCursor(N)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},N=>this.insertColumns(N)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},N=>this.deleteColumns(N)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},N=>this.selectProtected(N)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},N=>this.requestMode(N,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},N=>this.requestMode(N,!1)),this._parser.setExecuteHandler(u.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(u.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(u.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(u.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(u.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(u.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(u.C1.IND,()=>this.index()),this._parser.setExecuteHandler(u.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(u.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new k.OscHandler(N=>(this.setTitle(N),this.setIconName(N),!0))),this._parser.registerOscHandler(1,new k.OscHandler(N=>this.setIconName(N))),this._parser.registerOscHandler(2,new k.OscHandler(N=>this.setTitle(N))),this._parser.registerOscHandler(4,new k.OscHandler(N=>this.setOrReportIndexedColor(N))),this._parser.registerOscHandler(8,new k.OscHandler(N=>this.setHyperlink(N))),this._parser.registerOscHandler(10,new k.OscHandler(N=>this.setOrReportFgColor(N))),this._parser.registerOscHandler(11,new k.OscHandler(N=>this.setOrReportBgColor(N))),this._parser.registerOscHandler(12,new k.OscHandler(N=>this.setOrReportCursorColor(N))),this._parser.registerOscHandler(104,new k.OscHandler(N=>this.restoreIndexedColor(N))),this._parser.registerOscHandler(110,new k.OscHandler(N=>this.restoreFgColor(N))),this._parser.registerOscHandler(111,new k.OscHandler(N=>this.restoreBgColor(N))),this._parser.registerOscHandler(112,new k.OscHandler(N=>this.restoreCursorColor(N))),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 N in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:N},()=>this.selectCharset("("+N)),this._parser.registerEscHandler({intermediates:")",final:N},()=>this.selectCharset(")"+N)),this._parser.registerEscHandler({intermediates:"*",final:N},()=>this.selectCharset("*"+N)),this._parser.registerEscHandler({intermediates:"+",final:N},()=>this.selectCharset("+"+N)),this._parser.registerEscHandler({intermediates:"-",final:N},()=>this.selectCharset("-"+N)),this._parser.registerEscHandler({intermediates:".",final:N},()=>this.selectCharset("."+N)),this._parser.registerEscHandler({intermediates:"/",final:N},()=>this.selectCharset("/"+N));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(N=>(this._logService.error("Parsing error: ",N),N)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new C.DcsHandler((N,G)=>this.requestStatusString(N,G)))}_preserveStack(I,L,B,D){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=B,this._parseStack.position=D}_logSlowResolvingAsync(I){this._logService.logLevel<=S.LogLevelEnum.WARN&&Promise.race([I,new Promise((L,B)=>setTimeout(()=>B("#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(I,L){let B,D=this._activeBuffer.x,T=this._activeBuffer.y,$=0;const Y=this._parseStack.paused;if(Y){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(B),B;D=this._parseStack.cursorStartX,T=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>O&&($=this._parseStack.position+O)}if(this._logService.logLevel<=S.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,N=>String.fromCharCode(N)).join("")}"`),typeof I=="string"?I.split("").map(N=>N.charCodeAt(0)):I),this._parseBuffer.length<I.length&&this._parseBuffer.length<O&&(this._parseBuffer=new Uint32Array(Math.min(I.length,O))),Y||this._dirtyRowTracker.clearRange(),I.length>O)for(let N=$;N<I.length;N+=O){const G=N+O<I.length?N+O:I.length,V=typeof I=="string"?this._stringDecoder.decode(I.substring(N,G),this._parseBuffer):this._utf8Decoder.decode(I.subarray(N,G),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,V))return this._preserveStack(D,T,V,N),this._logSlowResolvingAsync(B),B}else if(!Y){const N=typeof I=="string"?this._stringDecoder.decode(I,this._parseBuffer):this._utf8Decoder.decode(I,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,N))return this._preserveStack(D,T,N,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===D&&this._activeBuffer.y===T||this._onCursorMove.fire();const W=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),j=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);j<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(j,this._bufferService.rows-1),Math.min(W,this._bufferService.rows-1))}print(I,L,B){let D,T;const $=this._charsetService.charset,Y=this._optionsService.rawOptions.screenReaderMode,W=this._bufferService.cols,j=this._coreService.decPrivateModes.wraparound,N=this._coreService.modes.insertMode,G=this._curAttrData;let V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-L>0&&V.getWidth(this._activeBuffer.x-1)===2&&V.setCellFromCodepoint(this._activeBuffer.x-1,0,1,G);let X=this._parser.precedingJoinState;for(let ne=L;ne<B;++ne){if(D=I[ne],D<127&&$){const Se=$[String.fromCharCode(D)];Se&&(D=Se.charCodeAt(0))}const ue=this._unicodeService.charProperties(D,X);T=b.UnicodeService.extractWidth(ue);const ve=b.UnicodeService.extractShouldJoin(ue),le=ve?b.UnicodeService.extractWidth(X):0;if(X=ue,Y&&this._onA11yChar.fire((0,_.stringFromCodePoint)(D)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+T-le>W){if(j){const Se=V;let ye=this._activeBuffer.x-le;for(this._activeBuffer.x=le,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),V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),le>0&&V instanceof g.BufferLine&&V.copyCellsFrom(Se,ye,0,le,!1);ye<W;)Se.setCellFromCodepoint(ye++,0,1,G)}else if(this._activeBuffer.x=W-1,T===2)continue}if(ve&&this._activeBuffer.x){const Se=V.getWidth(this._activeBuffer.x-1)?1:2;V.addCodepointToCell(this._activeBuffer.x-Se,D,T);for(let ye=T-le;--ye>=0;)V.setCellFromCodepoint(this._activeBuffer.x++,0,0,G)}else if(N&&(V.insertCells(this._activeBuffer.x,T-le,this._activeBuffer.getNullCell(G)),V.getWidth(W-1)===2&&V.setCellFromCodepoint(W-1,f.NULL_CELL_CODE,f.NULL_CELL_WIDTH,G)),V.setCellFromCodepoint(this._activeBuffer.x++,D,T,G),T>0)for(;--T;)V.setCellFromCodepoint(this._activeBuffer.x++,0,0,G)}this._parser.precedingJoinState=X,this._activeBuffer.x<W&&B-L>0&&V.getWidth(this._activeBuffer.x)===0&&!V.hasContent(this._activeBuffer.x)&&V.setCellFromCodepoint(this._activeBuffer.x,0,1,G),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,L){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,L):this._parser.registerCsiHandler(I,B=>!R(B.params[0],this._optionsService.rawOptions.windowOptions)||L(B))}registerDcsHandler(I,L){return this._parser.registerDcsHandler(I,new C.DcsHandler(L))}registerEscHandler(I,L){return this._parser.registerEscHandler(I,L)}registerOscHandler(I,L){return this._parser.registerOscHandler(I,new k.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 I;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&&((I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&I.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 I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,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(I,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=I,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+L)}cursorUp(I){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const L=I.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const L=I.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,L,B,D=!1,T=!1){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);$.replaceCells(L,B,this._activeBuffer.getNullCell(this._eraseAttrData()),T),D&&($.isWrapped=!1)}_resetBufferLine(I,L=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),B.isWrapped=!1)}eraseInDisplay(I,L=!1){let B;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);B<this._bufferService.rows;B++)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,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(I,L=!1){switch(this._restrictCursor(this._bufferService.cols),I.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(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,T=this._bufferService.rows-1+this._activeBuffer.ybase-D+1;for(;L--;)this._activeBuffer.lines.splice(T-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=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(B,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(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(I){let L=I.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(I){let L=I.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(g.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);D.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);D.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);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(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);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(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(I.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(I){const L=this._parser.precedingJoinState;if(!L)return!0;const B=I.params[0]||1,D=b.UnicodeService.extractWidth(L),T=this._activeBuffer.x-D,$=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(T),Y=new Uint32Array($.length*B);let W=0;for(let N=0;N<$.length;){const G=$.codePointAt(N)||0;Y[W++]=G,N+=G>65535?2:1}let j=W;for(let N=1;N<B;++N)Y.copyWithin(j,0,W),j+=W;return this.print(Y,0,j),!0}sendDeviceAttributesPrimary(I){return I.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(I){return I.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.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(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(I){for(let L=0;L<I.length;L++)switch(I.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(),I.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(I,L){const B=this._coreService.decPrivateModes,{activeProtocol:D,activeEncoding:T}=this._coreMouseService,$=this._coreService,{buffers:Y,cols:W}=this._bufferService,{active:j,alt:N}=Y,G=this._optionsService.rawOptions,V=ve=>ve?1:2,X=I.params[0];return ne=X,ue=L?X===2?4:X===4?V($.modes.insertMode):X===12?3:X===20?V(G.convertEol):0:X===1?V(B.applicationCursorKeys):X===3?G.windowOptions.setWinLines?W===80?2:W===132?1:0:0:X===6?V(B.origin):X===7?V(B.wraparound):X===8?3:X===9?V(D==="X10"):X===12?V(G.cursorBlink):X===25?V(!$.isCursorHidden):X===45?V(B.reverseWraparound):X===66?V(B.applicationKeypad):X===67?4:X===1e3?V(D==="VT200"):X===1002?V(D==="DRAG"):X===1003?V(D==="ANY"):X===1004?V(B.sendFocus):X===1005?4:X===1006?V(T==="SGR"):X===1015?4:X===1016?V(T==="SGR_PIXELS"):X===1048?1:X===47||X===1047||X===1049?V(j===N):X===2004?V(B.bracketedPasteMode):0,$.triggerDataEvent(`${u.C0.ESC}[${L?"":"?"}${ne};${ue}$y`),!0;var ne,ue}_updateAttrColor(I,L,B,D,T){return L===2?(I|=50331648,I&=-16777216,I|=y.AttributeData.fromColorRGB([B,D,T])):L===5&&(I&=-50331904,I|=33554432|255&B),I}_extractColor(I,L,B){const D=[0,0,-1,0,0,0];let T=0,$=0;do{if(D[$+T]=I.params[L+$],I.hasSubParams(L+$)){const Y=I.getSubParams(L+$);let W=0;do D[1]===5&&(T=1),D[$+W+1+T]=Y[W];while(++W<Y.length&&W+$+1+T<D.length);break}if(D[1]===5&&$+T>=2||D[1]===2&&$+T>=5)break;D[1]&&(T=1)}while(++$+L<I.length&&$+T<D.length);for(let Y=2;Y<D.length;++Y)D[Y]===-1&&(D[Y]=0);switch(D[0]){case 38:B.fg=this._updateAttrColor(B.fg,D[1],D[3],D[4],D[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,D[1],D[3],D[4],D[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,D[1],D[3],D[4],D[5])}return $}_processUnderline(I,L){L.extended=L.extended.clone(),(!~I||I>5)&&(I=1),L.extended.underlineStyle=I,L.fg|=268435456,I===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(I){I.fg=g.DEFAULT_ATTR_DATA.fg,I.bg=g.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=I.length;let B;const D=this._curAttrData;for(let T=0;T<L;T++)B=I.params[T],B>=30&&B<=37?(D.fg&=-50331904,D.fg|=16777216|B-30):B>=40&&B<=47?(D.bg&=-50331904,D.bg|=16777216|B-40):B>=90&&B<=97?(D.fg&=-50331904,D.fg|=16777224|B-90):B>=100&&B<=107?(D.bg&=-50331904,D.bg|=16777224|B-100):B===0?this._processSGR0(D):B===1?D.fg|=134217728:B===3?D.bg|=67108864:B===4?(D.fg|=268435456,this._processUnderline(I.hasSubParams(T)?I.getSubParams(T)[0]:1,D)):B===5?D.fg|=536870912:B===7?D.fg|=67108864:B===8?D.fg|=1073741824:B===9?D.fg|=2147483648:B===2?D.bg|=134217728:B===21?this._processUnderline(2,D):B===22?(D.fg&=-134217729,D.bg&=-134217729):B===23?D.bg&=-67108865:B===24?(D.fg&=-268435457,this._processUnderline(0,D)):B===25?D.fg&=-536870913:B===27?D.fg&=-67108865:B===28?D.fg&=-1073741825:B===29?D.fg&=2147483647:B===39?(D.fg&=-67108864,D.fg|=16777215&g.DEFAULT_ATTR_DATA.fg):B===49?(D.bg&=-67108864,D.bg|=16777215&g.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?T+=this._extractColor(I,T,D):B===53?D.bg|=1073741824:B===55?D.bg&=-1073741825:B===59?(D.extended=D.extended.clone(),D.extended.underlineColor=-1,D.updateExtended()):B===100?(D.fg&=-67108864,D.fg|=16777215&g.DEFAULT_ATTR_DATA.fg,D.bg&=-67108864,D.bg|=16777215&g.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${L};${B}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${L};${B}R`)}return!0}softReset(I){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=g.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(I){const L=I.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 B=L%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(I){const L=I.params[0]||1;let B;return(I.length<2||(B=I.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(I){if(!R(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(I){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(I){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(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const L=[],B=I.split(";");for(;B.length>1;){const D=B.shift(),T=B.shift();if(/^\d+$/.exec(D)){const $=parseInt(D);if(Q($))if(T==="?")L.push({type:0,index:$});else{const Y=(0,A.parseColor)(T);Y&&L.push({type:1,index:$,color:Y})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(I){const L=I.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(I,L){this._getCurrentLinkId()&&this._finishHyperlink();const B=I.split(":");let D;const T=B.findIndex($=>$.startsWith("id="));return T!==-1&&(D=B[T].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(I,L){const B=I.split(";");for(let D=0;D<B.length&&!(L>=this._specialColors.length);++D,++L)if(B[D]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const T=(0,A.parseColor)(B[D]);T&&this._onColor.fire([{type:1,index:this._specialColors[L],color:T}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const L=[],B=I.split(";");for(let D=0;D<B.length;++D)if(/^\d+$/.exec(B[D])){const T=parseInt(B[D]);Q(T)&&L.push({type:2,index:T})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){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,m.DEFAULT_CHARSET),!0}selectCharset(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(P[I[0]],m.CHARSETS[I[1]]||m.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 I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,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=g.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=g.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new p.CellData;I.content=4194373,I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const B=this._activeBuffer.ybase+this._activeBuffer.y+L,D=this._activeBuffer.lines.get(B);D&&(D.fill(I),D.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(I,L){const B=this._bufferService.buffer,D=this._optionsService.rawOptions;return(T=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${T}${u.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[D.cursorStyle]-(D.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,L){this._dirtyRowTracker.markRangeDirty(I,L)}}o.InputHandler=U;let q=class{constructor(H){this._bufferService=H,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(H){H<this.start?this.start=H:H>this.end&&(this.end=H)}markRangeDirty(H,I){H>I&&(z=H,H=I,I=z),H<this.start&&(this.start=H),I>this.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Q(H){return 0<=H&&H<256}q=c([h(0,S.IBufferService)],q)},844:(a,o)=>{function l(c){for(const h of c)h.dispose();c.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const h=this._disposables.indexOf(c);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var h;this._isDisposed||c===this._value||((h=this._value)==null||h.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)==null||c.dispose(),this._value=void 0}},o.toDisposable=function(c){return{dispose:c}},o.disposeArray=l,o.getDisposeArrayDisposable=function(c){return{dispose:()=>l(c)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(h,u,m){this._data[h]||(this._data[h]={}),this._data[h][u]=m}get(h,u){return this._data[h]?this._data[h][u]:void 0}clear(){this._data={}}}o.TwoKeyMap=l,o.FourKeyMap=class{constructor(){this._data=new l}set(c,h,u,m,v){this._data.get(c,h)||this._data.set(c,h,new l),this._data.get(c,h).set(u,m,v)}get(c,h,u,m){var v;return(v=this._data.get(c,h))==null?void 0:v.get(u,m)}clear(){this._data.clear()}}},6114:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const l=o.isNode?"node":navigator.userAgent,c=o.isNode?"node":navigator.platform;o.isFirefox=l.includes("Firefox"),o.isLegacyEdge=l.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(l),o.getSafariVersion=function(){if(!o.isSafari)return 0;const h=l.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),o.isIpad=c==="iPad",o.isIphone=c==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),o.isLinux=c.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(l)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let l=0;o.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(l=this._search(this._getKey(c)),this._array.splice(l,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;const h=this._getKey(c);if(h===void 0||(l=this._search(h),l===-1)||this._getKey(this._array[l])!==h)return!1;do if(this._array[l]===c)return this._array.splice(l,1),!0;while(++l<this._array.length&&this._getKey(this._array[l])===h);return!1}*getKeyIterator(c){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do yield this._array[l];while(++l<this._array.length&&this._getKey(this._array[l])===c)}forEachByKey(c,h){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do h(this._array[l]);while(++l<this._array.length&&this._getKey(this._array[l])===c)}values(){return[...this._array].values()}_search(c){let h=0,u=this._array.length-1;for(;u>=h;){let m=h+u>>1;const v=this._getKey(this._array[m]);if(v>c)u=m-1;else{if(!(v<c)){for(;m>0&&this._getKey(this._array[m-1])===c;)m--;return m}h=m+1}}return h}}},7226:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const c=l(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(v){this._tasks.push(v),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(v){this._idleCallback=void 0;let w=0,_=0,g=v.timeRemaining(),d=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),_=Math.max(w,_),d=v.timeRemaining(),1.5*_>d)return g-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(g-w))}ms`),void this._start();g=d}this.clear()}}class u extends h{_requestCallback(v){return setTimeout(()=>v(this._createDeadline(16)))}_cancelCallback(v){clearTimeout(v)}_createDeadline(v){const w=Date.now()+v;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}o.PriorityTaskQueue=u,o.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends h{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:u,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const c=l(643);o.updateWindowsModeWrappedState=function(h){const u=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),m=u==null?void 0:u.get(h.cols-1),v=h.buffer.lines.get(h.buffer.ybase+h.buffer.y);v&&m&&(v.isWrapped=m[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&m[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new l;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=l;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,m=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=m}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=c},9092:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const c=l(6349),h=l(7226),u=l(3734),m=l(8437),v=l(4634),w=l(511),_=l(643),g=l(4863),d=l(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(f,p,y){this._hasScrollback=f,this._optionsService=p,this._bufferService=y,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=d.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,_.WHITESPACE_CELL_CHAR,_.WHITESPACE_CELL_WIDTH,_.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new h.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(f){return f?(this._nullCell.fg=f.fg,this._nullCell.bg=f.bg,this._nullCell.extended=f.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(f){return f?(this._whitespaceCell.fg=f.fg,this._whitespaceCell.bg=f.bg,this._whitespaceCell.extended=f.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(f,p){return new m.BufferLine(this._bufferService.cols,this.getNullCell(f),p)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const f=this.ybase+this.y-this.ydisp;return f>=0&&f<this._rows}_getCorrectBufferLength(f){if(!this._hasScrollback)return f;const p=f+this._optionsService.rawOptions.scrollback;return p>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:p}fillViewportRows(f){if(this.lines.length===0){f===void 0&&(f=m.DEFAULT_ATTR_DATA);let p=this._rows;for(;p--;)this.lines.push(this.getBlankLine(f))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(f,p){const y=this.getNullCell(m.DEFAULT_ATTR_DATA);let S=0;const b=this._getCorrectBufferLength(p);if(b>this.lines.maxLength&&(this.lines.maxLength=b),this.lines.length>0){if(this._cols<f)for(let C=0;C<this.lines.length;C++)S+=+this.lines.get(C).resize(f,y);let k=0;if(this._rows<p)for(let C=this._rows;C<p;C++)this.lines.length<p+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new m.BufferLine(f,y)):this.ybase>0&&this.lines.length<=this.ybase+this.y+k+1?(this.ybase--,k++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(f,y)));else for(let C=this._rows;C>p;C--)this.lines.length>p+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(b<this.lines.maxLength){const C=this.lines.length-b;C>0&&(this.lines.trimStart(C),this.ybase=Math.max(this.ybase-C,0),this.ydisp=Math.max(this.ydisp-C,0),this.savedY=Math.max(this.savedY-C,0)),this.lines.maxLength=b}this.x=Math.min(this.x,f-1),this.y=Math.min(this.y,p-1),k&&(this.y+=k),this.savedX=Math.min(this.savedX,f-1),this.scrollTop=0}if(this.scrollBottom=p-1,this._isReflowEnabled&&(this._reflow(f,p),this._cols>f))for(let k=0;k<this.lines.length;k++)S+=+this.lines.get(k).resize(f,y);this._cols=f,this._rows=p,this._memoryCleanupQueue.clear(),S>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let f=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,f=!1);let p=0;for(;this._memoryCleanupPosition<this.lines.length;)if(p+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),p>100)return!0;return f}get _isReflowEnabled(){const f=this._optionsService.rawOptions.windowsPty;return f&&f.buildNumber?this._hasScrollback&&f.backend==="conpty"&&f.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(f,p){this._cols!==f&&(f>this._cols?this._reflowLarger(f,p):this._reflowSmaller(f,p))}_reflowLarger(f,p){const y=(0,v.reflowLargerGetLinesToRemove)(this.lines,this._cols,f,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(y.length>0){const S=(0,v.reflowLargerCreateNewLayout)(this.lines,y);(0,v.reflowLargerApplyNewLayout)(this.lines,S.layout),this._reflowLargerAdjustViewport(f,p,S.countRemoved)}}_reflowLargerAdjustViewport(f,p,y){const S=this.getNullCell(m.DEFAULT_ATTR_DATA);let b=y;for(;b-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<p&&this.lines.push(new m.BufferLine(f,S))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-y,0)}_reflowSmaller(f,p){const y=this.getNullCell(m.DEFAULT_ATTR_DATA),S=[];let b=0;for(let k=this.lines.length-1;k>=0;k--){let C=this.lines.get(k);if(!C||!C.isWrapped&&C.getTrimmedLength()<=f)continue;const A=[C];for(;C.isWrapped&&k>0;)C=this.lines.get(--k),A.unshift(C);const P=this.ybase+this.y;if(P>=k&&P<k+A.length)continue;const O=A[A.length-1].getTrimmedLength(),R=(0,v.reflowSmallerGetNewLineLengths)(A,this._cols,f),M=R.length-A.length;let z;z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const U=[];for(let B=0;B<M;B++){const D=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);U.push(D)}U.length>0&&(S.push({start:k+A.length+b,newLines:U}),b+=U.length),A.push(...U);let q=R.length-1,Q=R[q];Q===0&&(q--,Q=R[q]);let H=A.length-M-1,I=O;for(;H>=0;){const B=Math.min(I,Q);if(A[q]===void 0)break;if(A[q].copyCellsFrom(A[H],I-B,Q-B,B,!0),Q-=B,Q===0&&(q--,Q=R[q]),I-=B,I===0){H--;const D=Math.max(H,0);I=(0,v.getWrappedLineTrimmedLength)(A,D,this._cols)}}for(let B=0;B<A.length;B++)R[B]<f&&A[B].setCell(R[B],y);let L=M-z;for(;L-- >0;)this.ybase===0?this.y<p-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+b)-p&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+p-1)}if(S.length>0){const k=[],C=[];for(let q=0;q<this.lines.length;q++)C.push(this.lines.get(q));const A=this.lines.length;let P=A-1,O=0,R=S[O];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let M=0;for(let q=Math.min(this.lines.maxLength-1,A+b-1);q>=0;q--)if(R&&R.start>P+M){for(let Q=R.newLines.length-1;Q>=0;Q--)this.lines.set(q--,R.newLines[Q]);q++,k.push({index:P+1,amount:R.newLines.length}),M+=R.newLines.length,R=S[++O]}else this.lines.set(q,C[P--]);let z=0;for(let q=k.length-1;q>=0;q--)k[q].index+=z,this.lines.onInsertEmitter.fire(k[q]),z+=k[q].amount;const U=Math.max(0,A+b-this.lines.maxLength);U>0&&this.lines.onTrimEmitter.fire(U)}}translateBufferLineToString(f,p,y=0,S){const b=this.lines.get(f);return b?b.translateToString(p,y,S):""}getWrappedRangeForLine(f){let p=f,y=f;for(;p>0&&this.lines.get(p).isWrapped;)p--;for(;y+1<this.lines.length&&this.lines.get(y+1).isWrapped;)y++;return{first:p,last:y}}setupTabStops(f){for(f!=null?this.tabs[f]||(f=this.prevStop(f)):(this.tabs={},f=0);f<this._cols;f+=this._optionsService.rawOptions.tabStopWidth)this.tabs[f]=!0}prevStop(f){for(f==null&&(f=this.x);!this.tabs[--f]&&f>0;);return f>=this._cols?this._cols-1:f<0?0:f}nextStop(f){for(f==null&&(f=this.x);!this.tabs[++f]&&f<this._cols;);return f>=this._cols?this._cols-1:f<0?0:f}clearMarkers(f){this._isClearing=!0;for(let p=0;p<this.markers.length;p++)this.markers[p].line===f&&(this.markers[p].dispose(),this.markers.splice(p--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let f=0;f<this.markers.length;f++)this.markers[f].dispose(),this.markers.splice(f--,1);this._isClearing=!1}addMarker(f){const p=new g.Marker(f);return this.markers.push(p),p.register(this.lines.onTrim(y=>{p.line-=y,p.line<0&&p.dispose()})),p.register(this.lines.onInsert(y=>{p.line>=y.index&&(p.line+=y.amount)})),p.register(this.lines.onDelete(y=>{p.line>=y.index&&p.line<y.index+y.amount&&p.dispose(),p.line>y.index&&(p.line-=y.amount)})),p.register(p.onDispose(()=>this._removeMarker(p))),p}_removeMarker(f){this._isClearing||this.markers.splice(this.markers.indexOf(f),1)}}},8437:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const c=l(3734),h=l(511),u=l(643),m=l(482);o.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let v=0;class w{constructor(g,d,f=!1){this.isWrapped=f,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*g);const p=d||h.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let y=0;y<g;++y)this.setCell(y,p);this.length=g}get(g){const d=this._data[3*g+0],f=2097151&d;return[this._data[3*g+1],2097152&d?this._combined[g]:f?(0,m.stringFromCodePoint)(f):"",d>>22,2097152&d?this._combined[g].charCodeAt(this._combined[g].length-1):f]}set(g,d){this._data[3*g+1]=d[u.CHAR_DATA_ATTR_INDEX],d[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[g]=d[1],this._data[3*g+0]=2097152|g|d[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*g+0]=d[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|d[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(g){return this._data[3*g+0]>>22}hasWidth(g){return 12582912&this._data[3*g+0]}getFg(g){return this._data[3*g+1]}getBg(g){return this._data[3*g+2]}hasContent(g){return 4194303&this._data[3*g+0]}getCodePoint(g){const d=this._data[3*g+0];return 2097152&d?this._combined[g].charCodeAt(this._combined[g].length-1):2097151&d}isCombined(g){return 2097152&this._data[3*g+0]}getString(g){const d=this._data[3*g+0];return 2097152&d?this._combined[g]:2097151&d?(0,m.stringFromCodePoint)(2097151&d):""}isProtected(g){return 536870912&this._data[3*g+2]}loadCell(g,d){return v=3*g,d.content=this._data[v+0],d.fg=this._data[v+1],d.bg=this._data[v+2],2097152&d.content&&(d.combinedData=this._combined[g]),268435456&d.bg&&(d.extended=this._extendedAttrs[g]),d}setCell(g,d){2097152&d.content&&(this._combined[g]=d.combinedData),268435456&d.bg&&(this._extendedAttrs[g]=d.extended),this._data[3*g+0]=d.content,this._data[3*g+1]=d.fg,this._data[3*g+2]=d.bg}setCellFromCodepoint(g,d,f,p){268435456&p.bg&&(this._extendedAttrs[g]=p.extended),this._data[3*g+0]=d|f<<22,this._data[3*g+1]=p.fg,this._data[3*g+2]=p.bg}addCodepointToCell(g,d,f){let p=this._data[3*g+0];2097152&p?this._combined[g]+=(0,m.stringFromCodePoint)(d):2097151&p?(this._combined[g]=(0,m.stringFromCodePoint)(2097151&p)+(0,m.stringFromCodePoint)(d),p&=-2097152,p|=2097152):p=d|4194304,f&&(p&=-12582913,p|=f<<22),this._data[3*g+0]=p}insertCells(g,d,f){if((g%=this.length)&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,f),d<this.length-g){const p=new h.CellData;for(let y=this.length-g-d-1;y>=0;--y)this.setCell(g+d+y,this.loadCell(g+y,p));for(let y=0;y<d;++y)this.setCell(g+y,f)}else for(let p=g;p<this.length;++p)this.setCell(p,f);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,f)}deleteCells(g,d,f){if(g%=this.length,d<this.length-g){const p=new h.CellData;for(let y=0;y<this.length-g-d;++y)this.setCell(g+y,this.loadCell(g+d+y,p));for(let y=this.length-d;y<this.length;++y)this.setCell(y,f)}else for(let p=g;p<this.length;++p)this.setCell(p,f);g&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,f),this.getWidth(g)!==0||this.hasContent(g)||this.setCellFromCodepoint(g,0,1,f)}replaceCells(g,d,f,p=!1){if(p)for(g&&this.getWidth(g-1)===2&&!this.isProtected(g-1)&&this.setCellFromCodepoint(g-1,0,1,f),d<this.length&&this.getWidth(d-1)===2&&!this.isProtected(d)&&this.setCellFromCodepoint(d,0,1,f);g<d&&g<this.length;)this.isProtected(g)||this.setCell(g,f),g++;else for(g&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,f),d<this.length&&this.getWidth(d-1)===2&&this.setCellFromCodepoint(d,0,1,f);g<d&&g<this.length;)this.setCell(g++,f)}resize(g,d){if(g===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const f=3*g;if(g>this.length){if(this._data.buffer.byteLength>=4*f)this._data=new Uint32Array(this._data.buffer,0,f);else{const p=new Uint32Array(f);p.set(this._data),this._data=p}for(let p=this.length;p<g;++p)this.setCell(p,d)}else{this._data=this._data.subarray(0,f);const p=Object.keys(this._combined);for(let S=0;S<p.length;S++){const b=parseInt(p[S],10);b>=g&&delete this._combined[b]}const y=Object.keys(this._extendedAttrs);for(let S=0;S<y.length;S++){const b=parseInt(y[S],10);b>=g&&delete this._extendedAttrs[b]}}return this.length=g,4*f*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const g=new Uint32Array(this._data.length);return g.set(this._data),this._data=g,1}return 0}fill(g,d=!1){if(d)for(let f=0;f<this.length;++f)this.isProtected(f)||this.setCell(f,g);else{this._combined={},this._extendedAttrs={};for(let f=0;f<this.length;++f)this.setCell(f,g)}}copyFrom(g){this.length!==g.length?this._data=new Uint32Array(g._data):this._data.set(g._data),this.length=g.length,this._combined={};for(const d in g._combined)this._combined[d]=g._combined[d];this._extendedAttrs={};for(const d in g._extendedAttrs)this._extendedAttrs[d]=g._extendedAttrs[d];this.isWrapped=g.isWrapped}clone(){const g=new w(0);g._data=new Uint32Array(this._data),g.length=this.length;for(const d in this._combined)g._combined[d]=this._combined[d];for(const d in this._extendedAttrs)g._extendedAttrs[d]=this._extendedAttrs[d];return g.isWrapped=this.isWrapped,g}getTrimmedLength(){for(let g=this.length-1;g>=0;--g)if(4194303&this._data[3*g+0])return g+(this._data[3*g+0]>>22);return 0}getNoBgTrimmedLength(){for(let g=this.length-1;g>=0;--g)if(4194303&this._data[3*g+0]||50331648&this._data[3*g+2])return g+(this._data[3*g+0]>>22);return 0}copyCellsFrom(g,d,f,p,y){const S=g._data;if(y)for(let k=p-1;k>=0;k--){for(let C=0;C<3;C++)this._data[3*(f+k)+C]=S[3*(d+k)+C];268435456&S[3*(d+k)+2]&&(this._extendedAttrs[f+k]=g._extendedAttrs[d+k])}else for(let k=0;k<p;k++){for(let C=0;C<3;C++)this._data[3*(f+k)+C]=S[3*(d+k)+C];268435456&S[3*(d+k)+2]&&(this._extendedAttrs[f+k]=g._extendedAttrs[d+k])}const b=Object.keys(g._combined);for(let k=0;k<b.length;k++){const C=parseInt(b[k],10);C>=d&&(this._combined[C-d+f]=g._combined[C])}}translateToString(g,d,f,p){d=d??0,f=f??this.length,g&&(f=Math.min(f,this.getTrimmedLength())),p&&(p.length=0);let y="";for(;d<f;){const S=this._data[3*d+0],b=2097151&S,k=2097152&S?this._combined[d]:b?(0,m.stringFromCodePoint)(b):u.WHITESPACE_CELL_CHAR;if(y+=k,p)for(let C=0;C<k.length;++C)p.push(d);d+=S>>22||1}return p&&p.push(d),y}}o.BufferLine=w},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(l,c){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return c*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(a,o)=>{function l(c,h,u){if(h===c.length-1)return c[h].getTrimmedLength();const m=!c[h].hasContent(u-1)&&c[h].getWidth(u-1)===1,v=c[h+1].getWidth(0)===2;return m&&v?u-1:u}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(c,h,u,m,v){const w=[];for(let _=0;_<c.length-1;_++){let g=_,d=c.get(++g);if(!d.isWrapped)continue;const f=[c.get(_)];for(;g<c.length&&d.isWrapped;)f.push(d),d=c.get(++g);if(m>=_&&m<g){_+=f.length-1;continue}let p=0,y=l(f,p,h),S=1,b=0;for(;S<f.length;){const C=l(f,S,h),A=C-b,P=u-y,O=Math.min(A,P);f[p].copyCellsFrom(f[S],b,y,O,!1),y+=O,y===u&&(p++,y=0),b+=O,b===C&&(S++,b=0),y===0&&p!==0&&f[p-1].getWidth(u-1)===2&&(f[p].copyCellsFrom(f[p-1],u-1,y++,1,!1),f[p-1].setCell(u-1,v))}f[p].replaceCells(y,u,v);let k=0;for(let C=f.length-1;C>0&&(C>p||f[C].getTrimmedLength()===0);C--)k++;k>0&&(w.push(_+f.length-k),w.push(k)),_+=f.length-1}return w},o.reflowLargerCreateNewLayout=function(c,h){const u=[];let m=0,v=h[m],w=0;for(let _=0;_<c.length;_++)if(v===_){const g=h[++m];c.onDeleteEmitter.fire({index:_-w,amount:g}),_+=g-1,w+=g,v=h[++m]}else u.push(_);return{layout:u,countRemoved:w}},o.reflowLargerApplyNewLayout=function(c,h){const u=[];for(let m=0;m<h.length;m++)u.push(c.get(h[m]));for(let m=0;m<u.length;m++)c.set(m,u[m]);c.length=h.length},o.reflowSmallerGetNewLineLengths=function(c,h,u){const m=[],v=c.map((d,f)=>l(c,f,h)).reduce((d,f)=>d+f);let w=0,_=0,g=0;for(;g<v;){if(v-g<u){m.push(v-g);break}w+=u;const d=l(c,_,h);w>d&&(w-=d,_++);const f=c[_].getWidth(w-1)===2;f&&w--;const p=f?u-1:u;m.push(p),g+=p}return m},o.getWrappedLineTrimmedLength=l},5295:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const c=l(8460),h=l(844),u=l(9092);class m extends h.Disposable{constructor(w,_){super(),this._optionsService=w,this._bufferService=_,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(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,_){this._normal.resize(w,_),this._alt.resize(w,_),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}o.BufferSet=m},511:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const c=l(482),h=l(643),u=l(3734);class m extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const _=new m;return _.setFromCharData(w),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(w[h.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(w[h.CHAR_DATA_CHAR_INDEX].length===2){const g=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=g&&g<=56319){const d=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=d&&d<=57343?this.content=1024*(g-55296)+d-56320+65536|w[h.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[h.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=w[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[h.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=m},643:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const c=l(8460),h=l(844);class u{get id(){return this._id}constructor(v){this.line=v,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,h.disposeArray)(this._disposables),this._disposables.length=0)}register(v){return this._disposables.push(v),v}}o.Marker=u,u._nextId=1},7116:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,o)=>{var l,c,h;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
698
- `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""}(l||(o.C0=l={})),function(u){u.PAD="€",u.HOP="",u.BPH="‚",u.NBH="ƒ",u.IND="„",u.NEL="…",u.SSA="†",u.ESA="‡",u.HTS="ˆ",u.HTJ="‰",u.VTS="Š",u.PLD="‹",u.PLU="Œ",u.RI="",u.SS2="Ž",u.SS3="",u.DCS="",u.PU1="‘",u.PU2="’",u.STS="“",u.CCH="”",u.MW="•",u.SPA="–",u.EPA="—",u.SOS="˜",u.SGCI="™",u.SCI="š",u.CSI="›",u.ST="œ",u.OSC="",u.PM="ž",u.APC="Ÿ"}(c||(o.C1=c={})),function(u){u.ST=`${l.ESC}\\`}(h||(o.C1_ESCAPED=h={}))},7399:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const c=l(2584),h={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(u,m,v,w){const _={type:0,cancel:!1,key:void 0},g=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?_.key=m?c.C0.ESC+"OA":c.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?_.key=m?c.C0.ESC+"OD":c.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?_.key=m?c.C0.ESC+"OC":c.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(_.key=m?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:_.key=u.ctrlKey?"\b":c.C0.DEL,u.altKey&&(_.key=c.C0.ESC+_.key);break;case 9:if(u.shiftKey){_.key=c.C0.ESC+"[Z";break}_.key=c.C0.HT,_.cancel=!0;break;case 13:_.key=u.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,_.cancel=!0;break;case 27:_.key=c.C0.ESC,u.altKey&&(_.key=c.C0.ESC+c.C0.ESC),_.cancel=!0;break;case 37:if(u.metaKey)break;g?(_.key=c.C0.ESC+"[1;"+(g+1)+"D",_.key===c.C0.ESC+"[1;3D"&&(_.key=c.C0.ESC+(v?"b":"[1;5D"))):_.key=m?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(u.metaKey)break;g?(_.key=c.C0.ESC+"[1;"+(g+1)+"C",_.key===c.C0.ESC+"[1;3C"&&(_.key=c.C0.ESC+(v?"f":"[1;5C"))):_.key=m?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(u.metaKey)break;g?(_.key=c.C0.ESC+"[1;"+(g+1)+"A",v||_.key!==c.C0.ESC+"[1;3A"||(_.key=c.C0.ESC+"[1;5A")):_.key=m?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(u.metaKey)break;g?(_.key=c.C0.ESC+"[1;"+(g+1)+"B",v||_.key!==c.C0.ESC+"[1;3B"||(_.key=c.C0.ESC+"[1;5B")):_.key=m?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(_.key=c.C0.ESC+"[2~");break;case 46:_.key=g?c.C0.ESC+"[3;"+(g+1)+"~":c.C0.ESC+"[3~";break;case 36:_.key=g?c.C0.ESC+"[1;"+(g+1)+"H":m?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:_.key=g?c.C0.ESC+"[1;"+(g+1)+"F":m?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:u.shiftKey?_.type=2:u.ctrlKey?_.key=c.C0.ESC+"[5;"+(g+1)+"~":_.key=c.C0.ESC+"[5~";break;case 34:u.shiftKey?_.type=3:u.ctrlKey?_.key=c.C0.ESC+"[6;"+(g+1)+"~":_.key=c.C0.ESC+"[6~";break;case 112:_.key=g?c.C0.ESC+"[1;"+(g+1)+"P":c.C0.ESC+"OP";break;case 113:_.key=g?c.C0.ESC+"[1;"+(g+1)+"Q":c.C0.ESC+"OQ";break;case 114:_.key=g?c.C0.ESC+"[1;"+(g+1)+"R":c.C0.ESC+"OR";break;case 115:_.key=g?c.C0.ESC+"[1;"+(g+1)+"S":c.C0.ESC+"OS";break;case 116:_.key=g?c.C0.ESC+"[15;"+(g+1)+"~":c.C0.ESC+"[15~";break;case 117:_.key=g?c.C0.ESC+"[17;"+(g+1)+"~":c.C0.ESC+"[17~";break;case 118:_.key=g?c.C0.ESC+"[18;"+(g+1)+"~":c.C0.ESC+"[18~";break;case 119:_.key=g?c.C0.ESC+"[19;"+(g+1)+"~":c.C0.ESC+"[19~";break;case 120:_.key=g?c.C0.ESC+"[20;"+(g+1)+"~":c.C0.ESC+"[20~";break;case 121:_.key=g?c.C0.ESC+"[21;"+(g+1)+"~":c.C0.ESC+"[21~";break;case 122:_.key=g?c.C0.ESC+"[23;"+(g+1)+"~":c.C0.ESC+"[23~";break;case 123:_.key=g?c.C0.ESC+"[24;"+(g+1)+"~":c.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(v&&!w||!u.altKey||u.metaKey)!v||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?_.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(_.key=c.C0.US),u.key==="@"&&(_.key=c.C0.NUL)):u.keyCode===65&&(_.type=1);else{const d=h[u.keyCode],f=d==null?void 0:d[u.shiftKey?1:0];if(f)_.key=c.C0.ESC+f;else if(u.keyCode>=65&&u.keyCode<=90){const p=u.ctrlKey?u.keyCode-64:u.keyCode+32;let y=String.fromCharCode(p);u.shiftKey&&(y=y.toUpperCase()),_.key=c.C0.ESC+y}else if(u.keyCode===32)_.key=c.C0.ESC+(u.ctrlKey?c.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let p=u.code.slice(3,4);u.shiftKey||(p=p.toLowerCase()),_.key=c.C0.ESC+p,_.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?_.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?_.key=c.C0.NUL:u.keyCode>=51&&u.keyCode<=55?_.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?_.key=c.C0.DEL:u.keyCode===219?_.key=c.C0.ESC:u.keyCode===220?_.key=c.C0.FS:u.keyCode===221&&(_.key=c.C0.GS)}return _}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,c=0,h=l.length){let u="";for(let m=c;m<h;++m){let v=l[m];v>65535?(v-=65536,u+=String.fromCharCode(55296+(v>>10))+String.fromCharCode(v%1024+56320)):u+=String.fromCharCode(v)}return u},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,c){const h=l.length;if(!h)return 0;let u=0,m=0;if(this._interim){const v=l.charCodeAt(m++);56320<=v&&v<=57343?c[u++]=1024*(this._interim-55296)+v-56320+65536:(c[u++]=this._interim,c[u++]=v),this._interim=0}for(let v=m;v<h;++v){const w=l.charCodeAt(v);if(55296<=w&&w<=56319){if(++v>=h)return this._interim=w,u;const _=l.charCodeAt(v);56320<=_&&_<=57343?c[u++]=1024*(w-55296)+_-56320+65536:(c[u++]=w,c[u++]=_)}else w!==65279&&(c[u++]=w)}return u}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,c){const h=l.length;if(!h)return 0;let u,m,v,w,_=0,g=0,d=0;if(this.interim[0]){let y=!1,S=this.interim[0];S&=(224&S)==192?31:(240&S)==224?15:7;let b,k=0;for(;(b=63&this.interim[++k])&&k<4;)S<<=6,S|=b;const C=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,A=C-k;for(;d<A;){if(d>=h)return 0;if(b=l[d++],(192&b)!=128){d--,y=!0;break}this.interim[k++]=b,S<<=6,S|=63&b}y||(C===2?S<128?d--:c[_++]=S:C===3?S<2048||S>=55296&&S<=57343||S===65279||(c[_++]=S):S<65536||S>1114111||(c[_++]=S)),this.interim.fill(0)}const f=h-4;let p=d;for(;p<h;){for(;!(!(p<f)||128&(u=l[p])||128&(m=l[p+1])||128&(v=l[p+2])||128&(w=l[p+3]));)c[_++]=u,c[_++]=m,c[_++]=v,c[_++]=w,p+=4;if(u=l[p++],u<128)c[_++]=u;else if((224&u)==192){if(p>=h)return this.interim[0]=u,_;if(m=l[p++],(192&m)!=128){p--;continue}if(g=(31&u)<<6|63&m,g<128){p--;continue}c[_++]=g}else if((240&u)==224){if(p>=h)return this.interim[0]=u,_;if(m=l[p++],(192&m)!=128){p--;continue}if(p>=h)return this.interim[0]=u,this.interim[1]=m,_;if(v=l[p++],(192&v)!=128){p--;continue}if(g=(15&u)<<12|(63&m)<<6|63&v,g<2048||g>=55296&&g<=57343||g===65279)continue;c[_++]=g}else if((248&u)==240){if(p>=h)return this.interim[0]=u,_;if(m=l[p++],(192&m)!=128){p--;continue}if(p>=h)return this.interim[0]=u,this.interim[1]=m,_;if(v=l[p++],(192&v)!=128){p--;continue}if(p>=h)return this.interim[0]=u,this.interim[1]=m,this.interim[2]=v,_;if(w=l[p++],(192&w)!=128){p--;continue}if(g=(7&u)<<18|(63&m)<<12|(63&v)<<6|63&w,g<65536||g>1114111)continue;c[_++]=g}}return _}}},225:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const c=l(1480),h=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let m;o.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let v=0;v<h.length;++v)m.fill(0,h[v][0],h[v][1]+1)}}wcwidth(v){return v<32?0:v<127?1:v<65536?m[v]:function(w,_){let g,d=0,f=_.length-1;if(w<_[0][0]||w>_[f][1])return!1;for(;f>=d;)if(g=d+f>>1,w>_[g][1])d=g+1;else{if(!(w<_[g][0]))return!0;f=g-1}return!1}(v,u)?0:v>=131072&&v<=196605||v>=196608&&v<=262141?2:1}charProperties(v,w){let _=this.wcwidth(v),g=_===0&&w!==0;if(g){const d=c.UnicodeService.extractWidth(w);d===0?g=!1:d>_&&(_=d)}return c.UnicodeService.createPropertyValue(0,_,g)}}},5981:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const c=l(8460),h=l(844);class u extends h.Disposable{constructor(v){super(),this._action=v,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(v,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=v.length,this._writeBuffer.push(v),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let _;for(this._isSyncWriting=!0;_=this._writeBuffer.shift();){this._action(_);const g=this._callbacks.shift();g&&g()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(v,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+=v.length,this._writeBuffer.push(v),this._callbacks.push(w),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=v.length,this._writeBuffer.push(v),this._callbacks.push(w)}_innerWrite(v=0,w=!0){const _=v||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const g=this._writeBuffer[this._bufferOffset],d=this._action(g,w);if(d){const p=y=>Date.now()-_>=12?setTimeout(()=>this._innerWrite(0,y)):this._innerWrite(_,y);return void d.catch(y=>(queueMicrotask(()=>{throw y}),Promise.resolve(!1))).then(p)}const f=this._callbacks[this._bufferOffset];if(f&&f(),this._bufferOffset++,this._pendingData-=g.length,Date.now()-_>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=u},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const l=/^([\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})$/,c=/^[\da-f]+$/;function h(u,m){const v=u.toString(16),w=v.length<2?"0"+v:v;switch(m){case 4:return v[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}o.parseColor=function(u){if(!u)return;let m=u.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const v=l.exec(m);if(v){const w=v[1]?15:v[4]?255:v[7]?4095:65535;return[Math.round(parseInt(v[1]||v[4]||v[7]||v[10],16)/w*255),Math.round(parseInt(v[2]||v[5]||v[8]||v[11],16)/w*255),Math.round(parseInt(v[3]||v[6]||v[9]||v[12],16)/w*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),c.exec(m)&&[3,6,9,12].includes(m.length))){const v=m.length/3,w=[0,0,0];for(let _=0;_<3;++_){const g=parseInt(m.slice(v*_,v*_+v),16);w[_]=v===1?g<<4:v===2?g:v===3?g>>4:g>>8}return w}},o.toRgbString=function(u,m=16){const[v,w,_]=u;return`rgb:${h(v,m)}/${h(w,m)}/${h(_,m)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const c=l(482),h=l(8742),u=l(5770),m=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(w,_){this._handlers[w]===void 0&&(this._handlers[w]=[]);const g=this._handlers[w];return g.push(_),{dispose:()=>{const d=g.indexOf(_);d!==-1&&g.splice(d,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=m,this._ident=0}hook(w,_){if(this.reset(),this._ident=w,this._active=this._handlers[w]||m,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].hook(_);else this._handlerFb(this._ident,"HOOK",_)}put(w,_,g){if(this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].put(w,_,g);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(w,_,g))}unhook(w,_=!0){if(this._active.length){let g=!1,d=this._active.length-1,f=!1;if(this._stack.paused&&(d=this._stack.loopPosition-1,g=_,f=this._stack.fallThrough,this._stack.paused=!1),!f&&g===!1){for(;d>=0&&(g=this._active[d].unhook(w),g!==!0);d--)if(g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!1,g;d--}for(;d>=0;d--)if(g=this._active[d].unhook(!1),g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!0,g}else this._handlerFb(this._ident,"UNHOOK",w);this._active=m,this._ident=0}};const v=new h.Params;v.addParam(0),o.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=v,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():v,this._data="",this._hitLimit=!1}put(w,_,g){this._hitLimit||(this._data+=(0,c.utf32ToString)(w,_,g),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let _=!1;if(this._hitLimit)_=!1;else if(w&&(_=this._handler(this._data,this._params),_ instanceof Promise))return _.then(g=>(this._params=v,this._data="",this._hitLimit=!1,g));return this._params=v,this._data="",this._hitLimit=!1,_}}},2015:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const c=l(844),h=l(8742),u=l(6242),m=l(6351);class v{constructor(d){this.table=new Uint8Array(d)}setDefault(d,f){this.table.fill(d<<4|f)}add(d,f,p,y){this.table[f<<8|d]=p<<4|y}addMany(d,f,p,y){for(let S=0;S<d.length;S++)this.table[f<<8|d[S]]=p<<4|y}}o.TransitionTable=v;const w=160;o.VT500_TRANSITION_TABLE=function(){const g=new v(4095),d=Array.apply(null,Array(256)).map((k,C)=>C),f=(k,C)=>d.slice(k,C),p=f(32,127),y=f(0,24);y.push(25),y.push.apply(y,f(28,32));const S=f(0,14);let b;for(b in g.setDefault(1,0),g.addMany(p,0,2,0),S)g.addMany([24,26,153,154],b,3,0),g.addMany(f(128,144),b,3,0),g.addMany(f(144,152),b,3,0),g.add(156,b,0,0),g.add(27,b,11,1),g.add(157,b,4,8),g.addMany([152,158,159],b,0,7),g.add(155,b,11,3),g.add(144,b,11,9);return g.addMany(y,0,3,0),g.addMany(y,1,3,1),g.add(127,1,0,1),g.addMany(y,8,0,8),g.addMany(y,3,3,3),g.add(127,3,0,3),g.addMany(y,4,3,4),g.add(127,4,0,4),g.addMany(y,6,3,6),g.addMany(y,5,3,5),g.add(127,5,0,5),g.addMany(y,2,3,2),g.add(127,2,0,2),g.add(93,1,4,8),g.addMany(p,8,5,8),g.add(127,8,5,8),g.addMany([156,27,24,26,7],8,6,0),g.addMany(f(28,32),8,0,8),g.addMany([88,94,95],1,0,7),g.addMany(p,7,0,7),g.addMany(y,7,0,7),g.add(156,7,0,0),g.add(127,7,0,7),g.add(91,1,11,3),g.addMany(f(64,127),3,7,0),g.addMany(f(48,60),3,8,4),g.addMany([60,61,62,63],3,9,4),g.addMany(f(48,60),4,8,4),g.addMany(f(64,127),4,7,0),g.addMany([60,61,62,63],4,0,6),g.addMany(f(32,64),6,0,6),g.add(127,6,0,6),g.addMany(f(64,127),6,0,0),g.addMany(f(32,48),3,9,5),g.addMany(f(32,48),5,9,5),g.addMany(f(48,64),5,0,6),g.addMany(f(64,127),5,7,0),g.addMany(f(32,48),4,9,5),g.addMany(f(32,48),1,9,2),g.addMany(f(32,48),2,9,2),g.addMany(f(48,127),2,10,0),g.addMany(f(48,80),1,10,0),g.addMany(f(81,88),1,10,0),g.addMany([89,90,92],1,10,0),g.addMany(f(96,127),1,10,0),g.add(80,1,11,9),g.addMany(y,9,0,9),g.add(127,9,0,9),g.addMany(f(28,32),9,0,9),g.addMany(f(32,48),9,9,12),g.addMany(f(48,60),9,8,10),g.addMany([60,61,62,63],9,9,10),g.addMany(y,11,0,11),g.addMany(f(32,128),11,0,11),g.addMany(f(28,32),11,0,11),g.addMany(y,10,0,10),g.add(127,10,0,10),g.addMany(f(28,32),10,0,10),g.addMany(f(48,60),10,8,10),g.addMany([60,61,62,63],10,0,11),g.addMany(f(32,48),10,9,12),g.addMany(y,12,0,12),g.add(127,12,0,12),g.addMany(f(28,32),12,0,12),g.addMany(f(32,48),12,9,12),g.addMany(f(48,64),12,0,11),g.addMany(f(64,127),12,12,13),g.addMany(f(64,127),10,12,13),g.addMany(f(64,127),9,12,13),g.addMany(y,13,13,13),g.addMany(p,13,13,13),g.add(127,13,0,13),g.addMany([27,156,24,26],13,14,0),g.add(w,0,2,0),g.add(w,8,5,8),g.add(w,6,0,6),g.add(w,11,0,11),g.add(w,13,13,13),g}();class _ extends c.Disposable{constructor(d=o.VT500_TRANSITION_TABLE){super(),this._transitions=d,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new h.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(f,p,y)=>{},this._executeHandlerFb=f=>{},this._csiHandlerFb=(f,p)=>{},this._escHandlerFb=f=>{},this._errorHandlerFb=f=>f,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(d,f=[64,126]){let p=0;if(d.prefix){if(d.prefix.length>1)throw new Error("only one byte as prefix supported");if(p=d.prefix.charCodeAt(0),p&&60>p||p>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(d.intermediates){if(d.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let S=0;S<d.intermediates.length;++S){const b=d.intermediates.charCodeAt(S);if(32>b||b>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");p<<=8,p|=b}}if(d.final.length!==1)throw new Error("final must be a single byte");const y=d.final.charCodeAt(0);if(f[0]>y||y>f[1])throw new Error(`final must be in range ${f[0]} .. ${f[1]}`);return p<<=8,p|=y,p}identToString(d){const f=[];for(;d;)f.push(String.fromCharCode(255&d)),d>>=8;return f.reverse().join("")}setPrintHandler(d){this._printHandler=d}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(d,f){const p=this._identifier(d,[48,126]);this._escHandlers[p]===void 0&&(this._escHandlers[p]=[]);const y=this._escHandlers[p];return y.push(f),{dispose:()=>{const S=y.indexOf(f);S!==-1&&y.splice(S,1)}}}clearEscHandler(d){this._escHandlers[this._identifier(d,[48,126])]&&delete this._escHandlers[this._identifier(d,[48,126])]}setEscHandlerFallback(d){this._escHandlerFb=d}setExecuteHandler(d,f){this._executeHandlers[d.charCodeAt(0)]=f}clearExecuteHandler(d){this._executeHandlers[d.charCodeAt(0)]&&delete this._executeHandlers[d.charCodeAt(0)]}setExecuteHandlerFallback(d){this._executeHandlerFb=d}registerCsiHandler(d,f){const p=this._identifier(d);this._csiHandlers[p]===void 0&&(this._csiHandlers[p]=[]);const y=this._csiHandlers[p];return y.push(f),{dispose:()=>{const S=y.indexOf(f);S!==-1&&y.splice(S,1)}}}clearCsiHandler(d){this._csiHandlers[this._identifier(d)]&&delete this._csiHandlers[this._identifier(d)]}setCsiHandlerFallback(d){this._csiHandlerFb=d}registerDcsHandler(d,f){return this._dcsParser.registerHandler(this._identifier(d),f)}clearDcsHandler(d){this._dcsParser.clearHandler(this._identifier(d))}setDcsHandlerFallback(d){this._dcsParser.setHandlerFallback(d)}registerOscHandler(d,f){return this._oscParser.registerHandler(d,f)}clearOscHandler(d){this._oscParser.clearHandler(d)}setOscHandlerFallback(d){this._oscParser.setHandlerFallback(d)}setErrorHandler(d){this._errorHandler=d}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(d,f,p,y,S){this._parseStack.state=d,this._parseStack.handlers=f,this._parseStack.handlerPos=p,this._parseStack.transition=y,this._parseStack.chunkPos=S}parse(d,f,p){let y,S=0,b=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(p===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const C=this._parseStack.handlers;let A=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(p===!1&&A>-1){for(;A>=0&&(y=C[A](this._params),y!==!0);A--)if(y instanceof Promise)return this._parseStack.handlerPos=A,y}this._parseStack.handlers=[];break;case 4:if(p===!1&&A>-1){for(;A>=0&&(y=C[A](),y!==!0);A--)if(y instanceof Promise)return this._parseStack.handlerPos=A,y}this._parseStack.handlers=[];break;case 6:if(S=d[this._parseStack.chunkPos],y=this._dcsParser.unhook(S!==24&&S!==26,p),y)return y;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(S=d[this._parseStack.chunkPos],y=this._oscParser.end(S!==24&&S!==26,p),y)return y;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,k=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let C=k;C<f;++C){switch(S=d[C],b=this._transitions.table[this.currentState<<8|(S<160?S:w)],b>>4){case 2:for(let M=C+1;;++M){if(M>=f||(S=d[M])<32||S>126&&S<w){this._printHandler(d,C,M),C=M-1;break}if(++M>=f||(S=d[M])<32||S>126&&S<w){this._printHandler(d,C,M),C=M-1;break}if(++M>=f||(S=d[M])<32||S>126&&S<w){this._printHandler(d,C,M),C=M-1;break}if(++M>=f||(S=d[M])<32||S>126&&S<w){this._printHandler(d,C,M),C=M-1;break}}break;case 3:this._executeHandlers[S]?this._executeHandlers[S]():this._executeHandlerFb(S),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:C,code:S,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const A=this._csiHandlers[this._collect<<8|S];let P=A?A.length-1:-1;for(;P>=0&&(y=A[P](this._params),y!==!0);P--)if(y instanceof Promise)return this._preserveStack(3,A,P,b,C),y;P<0&&this._csiHandlerFb(this._collect<<8|S,this._params),this.precedingJoinState=0;break;case 8:do switch(S){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(S-48)}while(++C<f&&(S=d[C])>47&&S<60);C--;break;case 9:this._collect<<=8,this._collect|=S;break;case 10:const O=this._escHandlers[this._collect<<8|S];let R=O?O.length-1:-1;for(;R>=0&&(y=O[R](),y!==!0);R--)if(y instanceof Promise)return this._preserveStack(4,O,R,b,C),y;R<0&&this._escHandlerFb(this._collect<<8|S),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|S,this._params);break;case 13:for(let M=C+1;;++M)if(M>=f||(S=d[M])===24||S===26||S===27||S>127&&S<w){this._dcsParser.put(d,C,M),C=M-1;break}break;case 14:if(y=this._dcsParser.unhook(S!==24&&S!==26),y)return this._preserveStack(6,[],0,b,C),y;S===27&&(b|=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 M=C+1;;M++)if(M>=f||(S=d[M])<32||S>127&&S<w){this._oscParser.put(d,C,M),C=M-1;break}break;case 6:if(y=this._oscParser.end(S!==24&&S!==26),y)return this._preserveStack(5,[],0,b,C),y;S===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&b}}}o.EscapeSequenceParser=_},6242:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const c=l(5770),h=l(482),u=[];o.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,v){this._handlers[m]===void 0&&(this._handlers[m]=[]);const w=this._handlers[m];return w.push(v),{dispose:()=>{const _=w.indexOf(v);_!==-1&&w.splice(_,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,v,w){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(m,v,w);else this._handlerFb(this._id,"PUT",(0,h.utf32ToString)(m,v,w))}start(){this.reset(),this._state=1}put(m,v,w){if(this._state!==3){if(this._state===1)for(;v<w;){const _=m[v++];if(_===59){this._state=2,this._start();break}if(_<48||57<_)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+_-48}this._state===2&&w-v>0&&this._put(m,v,w)}}end(m,v=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,_=this._active.length-1,g=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,w=v,g=this._stack.fallThrough,this._stack.paused=!1),!g&&w===!1){for(;_>=0&&(w=this._active[_].end(m),w!==!0);_--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,w;_--}for(;_>=0;_--)if(w=this._active[_].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",m);this._active=u,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,v,w){this._hitLimit||(this._data+=(0,h.utf32ToString)(m,v,w),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let v=!1;if(this._hitLimit)v=!1;else if(m&&(v=this._handler(this._data),v instanceof Promise))return v.then(w=>(this._data="",this._hitLimit=!1,w));return this._data="",this._hitLimit=!1,v}}},8742:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const l=2147483647;class c{static fromArray(u){const m=new c;if(!u.length)return m;for(let v=Array.isArray(u[0])?1:0;v<u.length;++v){const w=u[v];if(Array.isArray(w))for(let _=0;_<w.length;++_)m.addSubParam(w[_]);else m.addParam(w)}return m}constructor(u=32,m=32){if(this.maxLength=u,this.maxSubParamsLength=m,m>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new c(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let m=0;m<this.length;++m){u.push(this.params[m]);const v=this._subParamsIdx[m]>>8,w=255&this._subParamsIdx[m];w-v>0&&u.push(Array.prototype.slice.call(this._subParams,v,w))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>l?l:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>l?l:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const m=this._subParamsIdx[u]>>8,v=255&this._subParamsIdx[u];return v-m>0?this._subParams.subarray(m,v):null}getSubParamsAll(){const u={};for(let m=0;m<this.length;++m){const v=this._subParamsIdx[m]>>8,w=255&this._subParamsIdx[m];w-v>0&&(u[m]=this._subParams.slice(v,w))}return u}addDigit(u){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const v=this._digitIsSub?this._subParams:this.params,w=v[m-1];v[m-1]=~w?Math.min(10*w+u,l):u}}o.Params=c},5741:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,c){const h={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(h),c.dispose=()=>this._wrappedAddonDispose(h),c.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let c=-1;for(let h=0;h<this._addons.length;h++)if(this._addons[h]===l){c=h;break}if(c===-1)throw new Error("Could not dispose an addon that has not been loaded");l.isDisposed=!0,l.dispose.apply(l.instance),this._addons.splice(c,1)}}},8771:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const c=l(3785),h=l(511);o.BufferApiView=class{constructor(u,m){this._buffer=u,this.type=m}init(u){return this._buffer=u,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(u){const m=this._buffer.lines.get(u);if(m)return new c.BufferLineApiView(m)}getNullCell(){return new h.CellData}}},3785:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const c=l(511);o.BufferLineApiView=class{constructor(h){this._line=h}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(h,u){if(!(h<0||h>=this._line.length))return u?(this._line.loadCell(h,u),u):this._line.loadCell(h,new c.CellData)}translateToString(h,u,m){return this._line.translateToString(h,u,m)}}},8285:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const c=l(8771),h=l(8460),u=l(844);class m extends u.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new h.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=m},7975:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,c){return this._core.registerCsiHandler(l,h=>c(h.toArray()))}addCsiHandler(l,c){return this.registerCsiHandler(l,c)}registerDcsHandler(l,c){return this._core.registerDcsHandler(l,(h,u)=>c(h,u.toArray()))}addDcsHandler(l,c){return this.registerDcsHandler(l,c)}registerEscHandler(l,c){return this._core.registerEscHandler(l,c)}addEscHandler(l,c){return this.registerEscHandler(l,c)}registerOscHandler(l,c){return this._core.registerOscHandler(l,c)}addOscHandler(l,c){return this.registerOscHandler(l,c)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(a,o,l){var c=this&&this.__decorate||function(g,d,f,p){var y,S=arguments.length,b=S<3?d:p===null?p=Object.getOwnPropertyDescriptor(d,f):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,d,f,p);else for(var k=g.length-1;k>=0;k--)(y=g[k])&&(b=(S<3?y(b):S>3?y(d,f,b):y(d,f))||b);return S>3&&b&&Object.defineProperty(d,f,b),b},h=this&&this.__param||function(g,d){return function(f,p){d(f,p,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const u=l(8460),m=l(844),v=l(5295),w=l(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let _=o.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(g){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(g.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(g.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new v.BufferSet(g,this))}resize(g,d){this.cols=g,this.rows=d,this.buffers.resize(g,d),this._onResize.fire({cols:g,rows:d})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(g,d=!1){const f=this.buffer;let p;p=this._cachedBlankLine,p&&p.length===this.cols&&p.getFg(0)===g.fg&&p.getBg(0)===g.bg||(p=f.getBlankLine(g,d),this._cachedBlankLine=p),p.isWrapped=d;const y=f.ybase+f.scrollTop,S=f.ybase+f.scrollBottom;if(f.scrollTop===0){const b=f.lines.isFull;S===f.lines.length-1?b?f.lines.recycle().copyFrom(p):f.lines.push(p.clone()):f.lines.splice(S+1,0,p.clone()),b?this.isUserScrolling&&(f.ydisp=Math.max(f.ydisp-1,0)):(f.ybase++,this.isUserScrolling||f.ydisp++)}else{const b=S-y+1;f.lines.shiftElements(y+1,b-1,-1),f.lines.set(S,p.clone())}this.isUserScrolling||(f.ydisp=f.ybase),this._onScroll.fire(f.ydisp)}scrollLines(g,d,f){const p=this.buffer;if(g<0){if(p.ydisp===0)return;this.isUserScrolling=!0}else g+p.ydisp>=p.ybase&&(this.isUserScrolling=!1);const y=p.ydisp;p.ydisp=Math.max(Math.min(p.ydisp+g,p.ybase),0),y!==p.ydisp&&(d||this._onScroll.fire(p.ydisp))}};o.BufferService=_=c([h(0,w.IOptionsService)],_)},7994:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,c){this._charsets[l]=c,this.glevel===l&&(this.charset=c)}}},1753:function(a,o,l){var c=this&&this.__decorate||function(p,y,S,b){var k,C=arguments.length,A=C<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,y,S,b);else for(var P=p.length-1;P>=0;P--)(k=p[P])&&(A=(C<3?k(A):C>3?k(y,S,A):k(y,S))||A);return C>3&&A&&Object.defineProperty(y,S,A),A},h=this&&this.__param||function(p,y){return function(S,b){y(S,b,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const u=l(2585),m=l(8460),v=l(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:p=>p.button!==4&&p.action===1&&(p.ctrl=!1,p.alt=!1,p.shift=!1,!0)},VT200:{events:19,restrict:p=>p.action!==32},DRAG:{events:23,restrict:p=>p.action!==32||p.button!==3},ANY:{events:31,restrict:p=>!0}};function _(p,y){let S=(p.ctrl?16:0)|(p.shift?4:0)|(p.alt?8:0);return p.button===4?(S|=64,S|=p.action):(S|=3&p.button,4&p.button&&(S|=64),8&p.button&&(S|=128),p.action===32?S|=32:p.action!==0||y||(S|=3)),S}const g=String.fromCharCode,d={DEFAULT:p=>{const y=[_(p,!1)+32,p.col+32,p.row+32];return y[0]>255||y[1]>255||y[2]>255?"":`\x1B[M${g(y[0])}${g(y[1])}${g(y[2])}`},SGR:p=>{const y=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${_(p,!0)};${p.col};${p.row}${y}`},SGR_PIXELS:p=>{const y=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${_(p,!0)};${p.x};${p.y}${y}`}};let f=o.CoreMouseService=class extends v.Disposable{constructor(p,y){super(),this._bufferService=p,this._coreService=y,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const S of Object.keys(w))this.addProtocol(S,w[S]);for(const S of Object.keys(d))this.addEncoding(S,d[S]);this.reset()}addProtocol(p,y){this._protocols[p]=y}addEncoding(p,y){this._encodings[p]=y}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(p){if(!this._protocols[p])throw new Error(`unknown protocol "${p}"`);this._activeProtocol=p,this._onProtocolChange.fire(this._protocols[p].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(p){if(!this._encodings[p])throw new Error(`unknown encoding "${p}"`);this._activeEncoding=p}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(p){if(p.col<0||p.col>=this._bufferService.cols||p.row<0||p.row>=this._bufferService.rows||p.button===4&&p.action===32||p.button===3&&p.action!==32||p.button!==4&&(p.action===2||p.action===3)||(p.col++,p.row++,p.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,p,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(p))return!1;const y=this._encodings[this._activeEncoding](p);return y&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(y):this._coreService.triggerDataEvent(y,!0)),this._lastEvent=p,!0}explainEvents(p){return{down:!!(1&p),up:!!(2&p),drag:!!(4&p),move:!!(8&p),wheel:!!(16&p)}}_equalEvents(p,y,S){if(S){if(p.x!==y.x||p.y!==y.y)return!1}else if(p.col!==y.col||p.row!==y.row)return!1;return p.button===y.button&&p.action===y.action&&p.ctrl===y.ctrl&&p.alt===y.alt&&p.shift===y.shift}};o.CoreMouseService=f=c([h(0,u.IBufferService),h(1,u.ICoreService)],f)},6975:function(a,o,l){var c=this&&this.__decorate||function(f,p,y,S){var b,k=arguments.length,C=k<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,y,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(k<3?b(C):k>3?b(p,y,C):b(p,y))||C);return k>3&&C&&Object.defineProperty(p,y,C),C},h=this&&this.__param||function(f,p){return function(y,S){p(y,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const u=l(1439),m=l(8460),v=l(844),w=l(2585),_=Object.freeze({insertMode:!1}),g=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let d=o.CoreService=class extends v.Disposable{constructor(f,p,y){super(),this._bufferService=f,this._logService=p,this._optionsService=y,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(g)}reset(){this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(g)}triggerDataEvent(f,p=!1){if(this._optionsService.rawOptions.disableStdin)return;const y=this._bufferService.buffer;p&&this._optionsService.rawOptions.scrollOnUserInput&&y.ybase!==y.ydisp&&this._onRequestScrollToBottom.fire(),p&&this._onUserInput.fire(),this._logService.debug(`sending data "${f}"`,()=>f.split("").map(S=>S.charCodeAt(0))),this._onData.fire(f)}triggerBinaryEvent(f){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${f}"`,()=>f.split("").map(p=>p.charCodeAt(0))),this._onBinary.fire(f))}};o.CoreService=d=c([h(0,w.IBufferService),h(1,w.ILogService),h(2,w.IOptionsService)],d)},9074:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const c=l(8055),h=l(8460),u=l(844),m=l(6106);let v=0,w=0;class _ extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList(f=>f==null?void 0:f.marker.line),this._onDecorationRegistered=this.register(new h.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new h.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)(()=>this.reset()))}registerDecoration(f){if(f.marker.isDisposed)return;const p=new g(f);if(p){const y=p.marker.onDispose(()=>p.dispose());p.onDispose(()=>{p&&(this._decorations.delete(p)&&this._onDecorationRemoved.fire(p),y.dispose())}),this._decorations.insert(p),this._onDecorationRegistered.fire(p)}return p}reset(){for(const f of this._decorations.values())f.dispose();this._decorations.clear()}*getDecorationsAtCell(f,p,y){let S=0,b=0;for(const k of this._decorations.getKeyIterator(p))S=k.options.x??0,b=S+(k.options.width??1),f>=S&&f<b&&(!y||(k.options.layer??"bottom")===y)&&(yield k)}forEachDecorationAtCell(f,p,y,S){this._decorations.forEachByKey(p,b=>{v=b.options.x??0,w=v+(b.options.width??1),f>=v&&f<w&&(!y||(b.options.layer??"bottom")===y)&&S(b)})}}o.DecorationService=_;class g extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=c.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=c.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(f){super(),this.options=f,this.onRenderEmitter=this.register(new h.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=f.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const c=l(2585),h=l(8343);class u{constructor(...v){this._entries=new Map;for(const[w,_]of v)this.set(w,_)}set(v,w){const _=this._entries.get(v);return this._entries.set(v,w),_}forEach(v){for(const[w,_]of this._entries.entries())v(w,_)}has(v){return this._entries.has(v)}get(v){return this._entries.get(v)}}o.ServiceCollection=u,o.InstantiationService=class{constructor(){this._services=new u,this._services.set(c.IInstantiationService,this)}setService(m,v){this._services.set(m,v)}getService(m){return this._services.get(m)}createInstance(m,...v){const w=(0,h.getServiceDependencies)(m).sort((d,f)=>d.index-f.index),_=[];for(const d of w){const f=this._services.get(d.id);if(!f)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${d.id}.`);_.push(f)}const g=w.length>0?w[0].index:v.length;if(v.length!==g)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${g+1} conflicts with ${v.length} static arguments`);return new m(...v,..._)}}},7866:function(a,o,l){var c=this&&this.__decorate||function(g,d,f,p){var y,S=arguments.length,b=S<3?d:p===null?p=Object.getOwnPropertyDescriptor(d,f):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,d,f,p);else for(var k=g.length-1;k>=0;k--)(y=g[k])&&(b=(S<3?y(b):S>3?y(d,f,b):y(d,f))||b);return S>3&&b&&Object.defineProperty(d,f,b),b},h=this&&this.__param||function(g,d){return function(f,p){d(f,p,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const u=l(844),m=l(2585),v={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let w,_=o.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(g){super(),this._optionsService=g,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),w=this}_updateLogLevel(){this._logLevel=v[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(g){for(let d=0;d<g.length;d++)typeof g[d]=="function"&&(g[d]=g[d]())}_log(g,d,f){this._evalLazyOptionalParams(f),g.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+d,...f)}trace(g,...d){var f;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.trace.bind(this._optionsService.options.logger))??console.log,g,d)}debug(g,...d){var f;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.debug.bind(this._optionsService.options.logger))??console.log,g,d)}info(g,...d){var f;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.info.bind(this._optionsService.options.logger))??console.info,g,d)}warn(g,...d){var f;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.warn.bind(this._optionsService.options.logger))??console.warn,g,d)}error(g,...d){var f;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,g,d)}};o.LogService=_=c([h(0,m.IOptionsService)],_),o.setTraceLogger=function(g){w=g},o.traceCall=function(g,d,f){if(typeof f.value!="function")throw new Error("not supported");const p=f.value;f.value=function(...y){if(w.logLevel!==m.LogLevelEnum.TRACE)return p.apply(this,y);w.trace(`GlyphRenderer#${p.name}(${y.map(b=>JSON.stringify(b)).join(", ")})`);const S=p.apply(this,y);return w.trace(`GlyphRenderer#${p.name} return`,S),S}}},7302:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const c=l(8460),h=l(844),u=l(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class v extends h.Disposable{constructor(_){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;const g={...o.DEFAULT_OPTIONS};for(const d in _)if(d in g)try{const f=_[d];g[d]=this._sanitizeAndValidateOption(d,f)}catch(f){console.error(f)}this.rawOptions=g,this.options={...g},this._setupOptions(),this.register((0,h.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(_,g){return this.onOptionChange(d=>{d===_&&g(this.rawOptions[_])})}onMultipleOptionChange(_,g){return this.onOptionChange(d=>{_.indexOf(d)!==-1&&g()})}_setupOptions(){const _=d=>{if(!(d in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${d}"`);return this.rawOptions[d]},g=(d,f)=>{if(!(d in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${d}"`);f=this._sanitizeAndValidateOption(d,f),this.rawOptions[d]!==f&&(this.rawOptions[d]=f,this._onOptionChange.fire(d))};for(const d in this.rawOptions){const f={get:_.bind(this,d),set:g.bind(this,d)};Object.defineProperty(this.options,d,f)}}_sanitizeAndValidateOption(_,g){switch(_){case"cursorStyle":if(g||(g=o.DEFAULT_OPTIONS[_]),!function(d){return d==="block"||d==="underline"||d==="bar"}(g))throw new Error(`"${g}" is not a valid value for ${_}`);break;case"wordSeparator":g||(g=o.DEFAULT_OPTIONS[_]);break;case"fontWeight":case"fontWeightBold":if(typeof g=="number"&&1<=g&&g<=1e3)break;g=m.includes(g)?g:o.DEFAULT_OPTIONS[_];break;case"cursorWidth":g=Math.floor(g);case"lineHeight":case"tabStopWidth":if(g<1)throw new Error(`${_} cannot be less than 1, value: ${g}`);break;case"minimumContrastRatio":g=Math.max(1,Math.min(21,Math.round(10*g)/10));break;case"scrollback":if((g=Math.min(g,4294967295))<0)throw new Error(`${_} cannot be less than 0, value: ${g}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(g<=0)throw new Error(`${_} cannot be less than or equal to 0, value: ${g}`);break;case"rows":case"cols":if(!g&&g!==0)throw new Error(`${_} must be numeric, value: ${g}`);break;case"windowsPty":g=g??{}}return g}}o.OptionsService=v},2660:function(a,o,l){var c=this&&this.__decorate||function(v,w,_,g){var d,f=arguments.length,p=f<3?w:g===null?g=Object.getOwnPropertyDescriptor(w,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(v,w,_,g);else for(var y=v.length-1;y>=0;y--)(d=v[y])&&(p=(f<3?d(p):f>3?d(w,_,p):d(w,_))||p);return f>3&&p&&Object.defineProperty(w,_,p),p},h=this&&this.__param||function(v,w){return function(_,g){w(_,g,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const u=l(2585);let m=o.OscLinkService=class{constructor(v){this._bufferService=v,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(v){const w=this._bufferService.buffer;if(v.id===void 0){const y=w.addMarker(w.ybase+w.y),S={data:v,id:this._nextId++,lines:[y]};return y.onDispose(()=>this._removeMarkerFromLink(S,y)),this._dataByLinkId.set(S.id,S),S.id}const _=v,g=this._getEntryIdKey(_),d=this._entriesWithId.get(g);if(d)return this.addLineToLink(d.id,w.ybase+w.y),d.id;const f=w.addMarker(w.ybase+w.y),p={id:this._nextId++,key:this._getEntryIdKey(_),data:_,lines:[f]};return f.onDispose(()=>this._removeMarkerFromLink(p,f)),this._entriesWithId.set(p.key,p),this._dataByLinkId.set(p.id,p),p.id}addLineToLink(v,w){const _=this._dataByLinkId.get(v);if(_&&_.lines.every(g=>g.line!==w)){const g=this._bufferService.buffer.addMarker(w);_.lines.push(g),g.onDispose(()=>this._removeMarkerFromLink(_,g))}}getLinkData(v){var w;return(w=this._dataByLinkId.get(v))==null?void 0:w.data}_getEntryIdKey(v){return`${v.id};;${v.uri}`}_removeMarkerFromLink(v,w){const _=v.lines.indexOf(w);_!==-1&&(v.lines.splice(_,1),v.lines.length===0&&(v.data.id!==void 0&&this._entriesWithId.delete(v.key),this._dataByLinkId.delete(v.id)))}};o.OscLinkService=m=c([h(0,u.IBufferService)],m)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const l="di$target",c="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(h){return h[c]||[]},o.createDecorator=function(h){if(o.serviceRegistry.has(h))return o.serviceRegistry.get(h);const u=function(m,v,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,g,d){g[l]===g?g[c].push({id:_,index:d}):(g[c]=[{id:_,index:d}],g[l]=g)})(u,m,w)};return u.toString=()=>h,o.serviceRegistry.set(h,u),u}},2585:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const c=l(8343);var h;o.IBufferService=(0,c.createDecorator)("BufferService"),o.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),o.ICoreService=(0,c.createDecorator)("CoreService"),o.ICharsetService=(0,c.createDecorator)("CharsetService"),o.IInstantiationService=(0,c.createDecorator)("InstantiationService"),function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"}(h||(o.LogLevelEnum=h={})),o.ILogService=(0,c.createDecorator)("LogService"),o.IOptionsService=(0,c.createDecorator)("OptionsService"),o.IOscLinkService=(0,c.createDecorator)("OscLinkService"),o.IUnicodeService=(0,c.createDecorator)("UnicodeService"),o.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const c=l(8460),h=l(225);class u{static extractShouldJoin(v){return(1&v)!=0}static extractWidth(v){return v>>1&3}static extractCharKind(v){return v>>3}static createPropertyValue(v,w,_=!1){return(16777215&v)<<3|(3&w)<<1|(_?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const v=new h.UnicodeV6;this.register(v),this._active=v.version,this._activeProvider=v}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(v){if(!this._providers[v])throw new Error(`unknown Unicode version "${v}"`);this._active=v,this._activeProvider=this._providers[v],this._onChange.fire(v)}register(v){this._providers[v.version]=v}wcwidth(v){return this._activeProvider.wcwidth(v)}getStringCellWidth(v){let w=0,_=0;const g=v.length;for(let d=0;d<g;++d){let f=v.charCodeAt(d);if(55296<=f&&f<=56319){if(++d>=g)return w+this.wcwidth(f);const S=v.charCodeAt(d);56320<=S&&S<=57343?f=1024*(f-55296)+S-56320+65536:w+=this.wcwidth(S)}const p=this.charProperties(f,_);let y=u.extractWidth(p);u.extractShouldJoin(p)&&(y-=u.extractWidth(_)),w+=y,_=p}return w}charProperties(v,w){return this._activeProvider.charProperties(v,w)}}o.UnicodeService=u}},n={};function i(a){var o=n[a];if(o!==void 0)return o.exports;var l=n[a]={exports:{}};return r[a].call(l.exports,l,l.exports,i),l.exports}var s={};return(()=>{var a=s;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=i(9042),l=i(3236),c=i(844),h=i(5741),u=i(8285),m=i(7975),v=i(7090),w=["cols","rows"];class _ extends c.Disposable{constructor(d){super(),this._core=this.register(new l.Terminal(d)),this._addonManager=this.register(new h.AddonManager),this._publicOptions={...this._core.options};const f=y=>this._core.options[y],p=(y,S)=>{this._checkReadonlyOptions(y),this._core.options[y]=S};for(const y in this._core.options){const S={get:f.bind(this,y),set:p.bind(this,y)};Object.defineProperty(this._publicOptions,y,S)}}_checkReadonlyOptions(d){if(w.includes(d))throw new Error(`Option "${d}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new v.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const d=this._core.coreService.decPrivateModes;let f="none";switch(this._core.coreMouseService.activeProtocol){case"X10":f="x10";break;case"VT200":f="vt200";break;case"DRAG":f="drag";break;case"ANY":f="any"}return{applicationCursorKeysMode:d.applicationCursorKeys,applicationKeypadMode:d.applicationKeypad,bracketedPasteMode:d.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:f,originMode:d.origin,reverseWraparoundMode:d.reverseWraparound,sendFocusMode:d.sendFocus,wraparoundMode:d.wraparound}}get options(){return this._publicOptions}set options(d){for(const f in d)this._publicOptions[f]=d[f]}blur(){this._core.blur()}focus(){this._core.focus()}input(d,f=!0){this._core.input(d,f)}resize(d,f){this._verifyIntegers(d,f),this._core.resize(d,f)}open(d){this._core.open(d)}attachCustomKeyEventHandler(d){this._core.attachCustomKeyEventHandler(d)}attachCustomWheelEventHandler(d){this._core.attachCustomWheelEventHandler(d)}registerLinkProvider(d){return this._core.registerLinkProvider(d)}registerCharacterJoiner(d){return this._checkProposedApi(),this._core.registerCharacterJoiner(d)}deregisterCharacterJoiner(d){this._checkProposedApi(),this._core.deregisterCharacterJoiner(d)}registerMarker(d=0){return this._verifyIntegers(d),this._core.registerMarker(d)}registerDecoration(d){return this._checkProposedApi(),this._verifyPositiveIntegers(d.x??0,d.width??0,d.height??0),this._core.registerDecoration(d)}hasSelection(){return this._core.hasSelection()}select(d,f,p){this._verifyIntegers(d,f,p),this._core.select(d,f,p)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(d,f){this._verifyIntegers(d,f),this._core.selectLines(d,f)}dispose(){super.dispose()}scrollLines(d){this._verifyIntegers(d),this._core.scrollLines(d)}scrollPages(d){this._verifyIntegers(d),this._core.scrollPages(d)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(d){this._verifyIntegers(d),this._core.scrollToLine(d)}clear(){this._core.clear()}write(d,f){this._core.write(d,f)}writeln(d,f){this._core.write(d),this._core.write(`\r
699
- `,f)}paste(d){this._core.paste(d)}refresh(d,f){this._verifyIntegers(d,f),this._core.refresh(d,f)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(d){this._addonManager.loadAddon(this,d)}static get strings(){return o}_verifyIntegers(...d){for(const f of d)if(f===1/0||isNaN(f)||f%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...d){for(const f of d)if(f&&(f===1/0||isNaN(f)||f%1!=0||f<0))throw new Error("This API only accepts positive integers")}}a.Terminal=_})(),s})())})(EC);var RB=EC.exports,LC={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(i){this._terminal=i}dispose(){}fit(){const i=this.proposeDimensions();if(!i||!this._terminal||isNaN(i.cols)||isNaN(i.rows))return;const s=this._terminal._core;this._terminal.rows===i.rows&&this._terminal.cols===i.cols||(s._renderService.clear(),this._terminal.resize(i.cols,i.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const i=this._terminal._core,s=i._renderService.dimensions;if(s.css.cell.width===0||s.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:i.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(o.getPropertyValue("height")),c=Math.max(0,parseInt(o.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),u=l-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),m=c-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(m/s.css.cell.width)),rows:Math.max(1,Math.floor(u/s.css.cell.height))}}}})(),r})())})(LC);var OB=LC.exports;const MB=(e,t)=>{const r=new URLSearchParams;return e&&r.set("session",e),t&&r.set("worktreeId",t),`/terminal-ws?${r.toString()}`};function jB({activePane:e,activeWorktreeId:t,attachmentSessionId:r,terminalEnabled:n,terminalContainerRef:i,terminalDisposableRef:s,terminalFitRef:a,terminalRef:o,terminalSessionRef:l,terminalSocketRef:c,terminalWorktreeRef:h,themeMode:u,workspaceToken:m}){const v=x.useCallback(()=>{if(!n||!m)return;const w=r;if(!w)return;const _=t&&t!=="main"?t:null;if(c.current&&c.current.readyState<=WebSocket.OPEN&&l.current===w&&h.current===_)return;c.current&&c.current.close();const g=o.current;g&&g.reset();const d=new WebSocket(MB(w,_));c.current=d,l.current=w,h.current=_;let f=!1;d.addEventListener("open",()=>{d.send(JSON.stringify({type:"auth",token:m}))}),d.addEventListener("message",p=>{let y=null;try{y=JSON.parse(p.data)}catch{return}if(!(y!=null&&y.type))return;if(y.type==="auth_ok"){if(f)return;f=!0;const b=o.current,k=a.current;b&&k&&(k.fit(),d.send(JSON.stringify({type:"init",cols:b.cols,rows:b.rows})));return}if(!f)return;const S=o.current;if(S){if(y.type==="output"&&typeof y.data=="string"){S.write(y.data);return}y.type==="exit"&&S.write(`\r
700
- [terminal exited ${y.code}]\r
701
- `)}}),d.addEventListener("close",()=>{const p=o.current;p&&p.write(`\r
702
- [terminal disconnected]\r
703
- `)})},[t,r,n,a,o,l,c,h,m]);x.useEffect(()=>{if(!n||e!=="terminal"||!i.current||o.current)return;const w=u==="dark",_=new RB.Terminal({fontFamily:'"Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontSize:13,cursorBlink:!0,theme:{background:w?"#0f1110":"#fbf6ee",foreground:w?"#e6edf3":"#2a2418",cursor:w?"#e6edf3":"#2a2418",selection:w?"rgba(255, 255, 255, 0.2)":"rgba(20, 19, 17, 0.15)"}});typeof _.setOption!="function"&&(_.setOption=(d,f)=>{if(d&&typeof d=="object"){_.options=d;return}_.options={[d]:f}});const g=new OB.FitAddon;_.loadAddon(g),_.open(i.current),g.fit(),_.focus(),o.current=_,a.current=g,s.current=_.onData(d=>{const f=c.current;f&&f.readyState===WebSocket.OPEN&&f.send(JSON.stringify({type:"input",data:d}))})},[e,i,s,n,a,o,c,u]),x.useEffect(()=>{const w=o.current;if(!w)return;const _=u==="dark"?{background:"#15120d",foreground:"#f2e9dc",cursor:"#f2e9dc"}:{background:"#fbf6ee",foreground:"#2a2418",cursor:"#2a2418"};typeof w.setOption=="function"?w.setOption("theme",_):w.options={theme:_}},[o,u]),x.useEffect(()=>()=>{s.current&&(s.current.dispose(),s.current=null),o.current&&(o.current.dispose(),o.current=null),a.current=null},[s,a,o]),x.useEffect(()=>{if(e==="terminal"&&n){if(o.current){const w=u==="dark";o.current.setOption("theme",{background:w?"#0f1110":"#fbf6ee",foreground:w?"#e6edf3":"#2a2418",cursor:w?"#e6edf3":"#2a2418",selection:w?"rgba(255, 255, 255, 0.2)":"rgba(20, 19, 17, 0.15)"})}a.current&&requestAnimationFrame(()=>{const w=a.current,_=o.current;if(!w||!_)return;w.fit(),_.focus();const g=c.current;g&&g.readyState===WebSocket.OPEN&&g.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))}),v()}},[e,v,n,a,o,c,u]),x.useEffect(()=>{const w=()=>{const _=o.current,g=a.current,d=c.current;!_||!g||(g.fit(),d&&d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows})))};return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[a,o,c]),x.useEffect(()=>{!r&&c.current&&(c.current.close(),c.current=null,l.current=null,h.current=null)},[r,l,c,h]),x.useEffect(()=>{n||(c.current&&(c.current.close(),c.current=null),l.current=null,h.current=null,s.current&&(s.current.dispose(),s.current=null),o.current&&(o.current.dispose(),o.current=null),a.current=null)},[s,n,a,o,l,c,h])}function BB({notificationsEnabled:e,t}){const r=x.useRef(null),n=x.useRef(null),i=e,s=x.useCallback(async()=>{if(!("Notification"in window))return"unsupported";if(Notification.permission==="default")try{return await Notification.requestPermission()}catch{return Notification.permission}return Notification.permission},[]),a=x.useCallback(()=>{const h=window.AudioContext||window.webkitAudioContext;if(!h)return;let u=n.current;u||(u=new h,n.current=u),u.state==="suspended"&&u.resume().catch(()=>{})},[]),o=x.useCallback(()=>{if(!i)return;const h=window.AudioContext||window.webkitAudioContext;if(!h)return;let u=n.current;u||(u=new h,n.current=u),u.state==="suspended"&&u.resume().catch(()=>{});const m=u.createOscillator(),v=u.createGain();m.type="sine",m.frequency.value=740,v.gain.value=1e-4,v.gain.exponentialRampToValueAtTime(.12,u.currentTime+.01),v.gain.exponentialRampToValueAtTime(1e-4,u.currentTime+.25),m.connect(v).connect(u.destination),m.start(),m.stop(u.currentTime+.26)},[i]),l=x.useCallback(h=>{if(!h)return"";let u=String(h);const m=u.match(/<!--\s*vibe80:/i);return typeof(m==null?void 0:m.index)=="number"&&(u=u.slice(0,m.index)),u=u.replace(/```([\s\S]*?)```/g,"$1"),u=u.replace(/`([^`]+)`/g,"$1"),u=u.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"$1"),u=u.replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1"),u=u.replace(/^\s{0,3}#{1,6}\s+/gm,""),u=u.replace(/^\s{0,3}>\s?/gm,""),u=u.replace(/^\s{0,3}[-*+]\s+/gm,""),u=u.replace(/^\s{0,3}\d+\.\s+/gm,""),u=u.replace(/[*_~]{1,3}/g,""),u=u.replace(/\s+/g," ").trim(),u},[]),c=x.useCallback(h=>{if(!e||!("Notification"in window)||Notification.permission!=="granted"||!(h!=null&&h.id)||r.current===h.id||!document.hidden)return;r.current=h.id;const u=l(h.text||"").slice(0,180);try{new Notification(t("New message"),{body:u})}catch{}o()},[e,o,l,t]);return x.useEffect(()=>{e&&(s(),a())},[s,a,e]),{ensureNotificationPermission:s,maybeNotify:c,lastNotifiedIdRef:r}}const FB=100,zB=e=>{var i;const t=String(e||"").trim();if(!t)return null;const r=t.slice(0,2);let n=t.slice(3).trim();if(!r||!n)return null;if((r.startsWith("R")||r.startsWith("C"))&&n.includes(" -> ")&&(n=((i=n.split(" -> ").pop())==null?void 0:i.trim())||n),n.startsWith('"')&&n.endsWith('"'))try{n=JSON.parse(n)}catch{}return{code:r,path:n}};function $B({apiFetch:e,attachmentSessionId:t,currentBranch:r,activeWorktreeId:n,parseDiff:i,setWorktrees:s,worktrees:a,t:o}){const[l,c]=x.useState({status:"",diff:""}),[h,u]=x.useState(null),[m,v]=x.useState([]),[w,_]=x.useState(!1),[g,d]=x.useState(new Map),f=x.useMemo(()=>{if(n&&n!=="main"){const R=a.get(n);return(R==null?void 0:R.diff)||{status:"",diff:""}}return l},[n,a,l]),p=x.useMemo(()=>{if(!f.diff)return[];try{return i(f.diff)}catch{return[]}},[f.diff,i]),y=x.useMemo(()=>(f.status||"").split(/\r?\n/).map(R=>R.trim()).filter(Boolean),[f.status]),S=x.useMemo(()=>y.map(zB).filter(Boolean),[y]),b=x.useMemo(()=>{const R=new Set,M=[];return S.forEach(z=>{if(z.code!=="??")return;const U=String(z.path||"").trim().replace(/\\/g,"/");!U||R.has(U)||(R.add(U),M.push(U))}),M},[S]),k=x.useMemo(()=>y.length>0||!!(f.diff||"").trim(),[y.length,f.diff]);x.useEffect(()=>{if(!t){v([]),_(!1);return}if(!b.length){v([]),_(!1);return}let R=!1;const M=n&&n!=="main"?n:"main";return(async()=>{_(!0);const U=[...b],q=new Set,Q=[];for(;U.length>0&&Q.length<FB&&!R;){const H=String(U.shift()||"").trim();if(!H||q.has(H))continue;if(q.add(H),!H.endsWith("/"))try{const L=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}/file?path=${encodeURIComponent(H)}`);if(L.ok){const B=await L.json().catch(()=>({}));Q.push({path:H,binary:!!(B!=null&&B.binary),content:(B==null?void 0:B.content)||"",truncated:!!(B!=null&&B.truncated),error:!1});continue}}catch{}try{const L=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}/browse?path=${encodeURIComponent(H)}`);if(!L.ok){Q.push({path:H,binary:!1,content:"",truncated:!1,error:!0});continue}const B=await L.json().catch(()=>({}));(Array.isArray(B==null?void 0:B.entries)?B.entries:[]).forEach(T=>{T!=null&&T.path&&U.push(T.path)})}catch{Q.push({path:H,binary:!1,content:"",truncated:!1,error:!0})}}R||(v(Q),_(!1))})(),()=>{R=!0}},[n,e,t,b]);const C=x.useCallback(async()=>{if(t)try{const R=await e(`/api/v1/sessions/${encodeURIComponent(t)}/last-commit`),M=await R.json().catch(()=>({}));if(!R.ok)throw new Error(M.error||o("Unable to load the latest commit."));const z=M.commit||{};u({branch:M.branch||"",sha:z.sha||"",message:z.message||""})}catch{u(null)}},[t,e,o]),A=x.useCallback(async R=>{if(!(!t||!R))try{const M=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}/commits?limit=1`),z=await M.json().catch(()=>({}));if(!M.ok)throw new Error(z.error||o("Unable to load the commit."));const U=Array.isArray(z.commits)?z.commits[0]:null;if(!(U!=null&&U.sha))return;d(q=>{const Q=new Map(q);return Q.set(R,{sha:U.sha,message:U.message||""}),Q})}catch{}},[t,e,o]),P=x.useCallback(async R=>{if(!(!t||!R))try{const M=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}/diff`);if(!M.ok)return;const z=await M.json();if(!z)return;s(U=>{const q=new Map(U),Q=q.get(R);return Q&&q.set(R,{...Q,diff:{status:z.status||"",diff:z.diff||""}}),q})}catch{}},[t,e,s]),O=x.useCallback(async()=>{if(t)try{const R=await e(`/api/v1/sessions/${encodeURIComponent(t)}/diff`);if(!R.ok)return;const M=await R.json();if(!M)return;c({status:M.status||"",diff:M.diff||""})}catch{}},[t,e]);return x.useEffect(()=>{if(!t){u(null),d(new Map);return}C()},[t,C]),x.useEffect(()=>{t&&C()},[t,r,C]),{currentDiff:f,diffFiles:p,diffStatusLines:y,hasCurrentChanges:k,untrackedFilePanels:m,untrackedLoading:w,loadRepoLastCommit:C,loadWorktreeLastCommit:A,repoDiff:l,repoLastCommit:h,requestRepoDiff:O,requestWorktreeDiff:P,setRepoDiff:c,setRepoLastCommit:u,setWorktreeLastCommitById:d,worktreeLastCommitById:g}}function UB({attachmentSessionId:e,workspaceToken:t,normalizeAttachments:r,isImageAttachment:n,getAttachmentName:i,attachmentIcon:s,t:a}){const[o,l]=x.useState([]),[c,h]=x.useState(!1),[u,m]=x.useState(""),[v,w]=x.useState(null),_=x.useCallback(d=>{if(!e)return"";const f=new URL(`/api/v1/sessions/${encodeURIComponent(e)}/attachments/file`,window.location.origin);return t&&f.searchParams.set("token",t),d!=null&&d.path?f.searchParams.set("path",d.path):d!=null&&d.name&&f.searchParams.set("name",d.name),f.toString()},[e,t]),g=x.useCallback((d=[])=>{const f=r(d);return f.length?E.jsx("div",{className:"bubble-attachments",children:f.map(p=>{const y=i(p),S=_(p),b=(p==null?void 0:p.path)||(p==null?void 0:p.name)||y;return n(p)?E.jsxs("button",{type:"button",className:"attachment-card attachment-card--image",onClick:()=>S?w({url:S,name:y}):null,disabled:!S,children:[S?E.jsx("img",{src:S,alt:y||a("Attached image"),className:"attachment-thumb",loading:"lazy"}):E.jsx("div",{className:"attachment-thumb attachment-thumb--empty"}),E.jsx("span",{className:"attachment-name",children:y})]},b):S?E.jsxs("a",{className:"attachment-card",href:S,target:"_blank",rel:"noopener noreferrer",children:[E.jsx("span",{className:"attachment-icon","aria-hidden":"true",children:s}),E.jsx("span",{className:"attachment-name",children:y})]},b):E.jsxs("div",{className:"attachment-card",children:[E.jsx("span",{className:"attachment-icon","aria-hidden":"true",children:s}),E.jsx("span",{className:"attachment-name",children:y})]},b)})}):null},[i,_,n,r,a]);return x.useEffect(()=>{e||l([])},[e]),{attachmentPreview:v,attachmentsError:u,attachmentsLoading:c,draftAttachments:o,getAttachmentUrl:_,renderMessageAttachments:g,setAttachmentPreview:w,setAttachmentsError:m,setAttachmentsLoading:h,setDraftAttachments:l}}const U1=e=>{if(e==null||e==="")return null;const t=new Date(e);return Number.isFinite(t.getTime())?t.toISOString():null},H1=e=>!e||typeof e!="object"?e:{...e,createdAt:U1(e.createdAt),doneAt:U1(e.doneAt)};function HB({attachmentSessionId:e,apiFetch:t,normalizeAttachments:r,sendMessage:n,setInput:i,setMessages:s,setWorktrees:a,setDraftAttachments:o,input:l,draftAttachments:c,inputRef:h,showToast:u,t:m}){const[v,w]=x.useState([]),_=x.useMemo(()=>e?`backlog:${e}`:null,[e]);x.useEffect(()=>{if(_)try{const k=JSON.parse(localStorage.getItem(_)||"[]");w(Array.isArray(k)?k.map(H1).filter(Boolean):[])}catch{w([])}},[_]),x.useEffect(()=>{_&&localStorage.setItem(_,JSON.stringify(v))},[v,_]);const g=x.useCallback(k=>{s(C=>C.map(A=>{var R;if((A==null?void 0:A.type)!=="backlog_view")return A;const P=Array.isArray((R=A.backlog)==null?void 0:R.items)?A.backlog.items:[],O=k(P);return O===P?A:{...A,backlog:{...A.backlog||{},items:O}}})),a(C=>{const A=new Map(C);return A.forEach((P,O)=>{if(!Array.isArray(P==null?void 0:P.messages))return;let R=!1;const M=P.messages.map(z=>{var Q;if((z==null?void 0:z.type)!=="backlog_view")return z;const U=Array.isArray((Q=z.backlog)==null?void 0:Q.items)?z.backlog.items:[],q=k(U);return q===U?z:(R=!0,{...z,backlog:{...z.backlog||{},items:q}})});R&&A.set(O,{...P,messages:M})}),A})},[s,a]),d=x.useCallback((k,C,A)=>{if(k&&k!=="main"){a(P=>{const O=new Map(P),R=O.get(k);if(!R)return P;const M=R.messages.map(z=>(z==null?void 0:z.id)===C&&z.type==="backlog_view"?{...z,backlog:{...z.backlog||{},page:A}}:z);return O.set(k,{...R,messages:M}),O});return}s(P=>P.map(O=>(O==null?void 0:O.id)===C&&O.type==="backlog_view"?{...O,backlog:{...O.backlog||{},page:A}}:O))},[s,a]),f=x.useCallback(async k=>{if(!e){u==null||u(m("Session not found."),"error");return}try{const C=await t(`/api/v1/sessions/${encodeURIComponent(e)}/backlog-items/${encodeURIComponent(k)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({done:!0})});if(!C.ok){const O=await C.json().catch(()=>({}));throw new Error((O==null?void 0:O.error)||m("Unable to update backlog."))}const A=await C.json().catch(()=>({})),P=H1(A==null?void 0:A.item);g(O=>O.map(R=>(R==null?void 0:R.id)===k?{...R,...P,done:!0}:R))}catch(C){u==null||u(C.message||m("Unable to update backlog."),"error")}},[t,e,u,m,g]),p=x.useCallback(()=>{const k=l.trim();if(!k)return;const C={id:`backlog-${Date.now()}-${Math.random().toString(16).slice(2,8)}`,text:k,createdAt:new Date().toISOString(),attachments:c};w(A=>[C,...A]),i("")},[c,l,i]),y=x.useCallback(k=>{w(C=>C.filter(A=>A.id!==k))},[]),S=x.useCallback(k=>{var C;i(k.text||""),o(r(k.attachments||[])),(C=h==null?void 0:h.current)==null||C.focus()},[h,r,o,i]),b=x.useCallback(k=>{n(k.text||"",k.attachments||[]),y(k.id)},[y,n]);return{addToBacklog:p,backlog:v,markBacklogItemDone:f,removeFromBacklog:y,editBacklogItem:S,launchBacklogItem:b,setBacklog:w,setBacklogMessagePage:d,updateBacklogMessages:g}}function WB({activeProvider:e,activeWorktreeId:t,addToBacklog:r,apiFetch:n,attachmentSessionId:i,captureScreenshot:s,connected:a,handleSendMessageRef:o,handleViewSelect:l,input:c,isWorktreeStopped:h,isCodexReady:u,isInWorktree:m,openPathInExplorer:v,requestRepoDiff:w,requestWorktreeDiff:_,sendMessage:g,sendWorktreeMessage:d,buildAnnotatedMessage:f,clearScopedAnnotations:p,setAnnotationMode:y,setCommandMenuOpen:S,setDraftAttachments:b,setInput:k,setMessages:C,setWorktrees:A,socketRef:P,t:O,showToast:R}){const M=x.useCallback((z,U)=>{const q=(z??c).trim();if(!q)return;const Q=q.match(/^\/annotation\s+(on|off)\s*$/i);if(Q){const I=Q[1].toLowerCase()==="on";y(I),R(O(I?"Annotation mode enabled.":"Annotation mode disabled."),"info"),k(""),b([]),S(!1);return}if(q.startsWith("/annotation")){R(O("Usage: /annotation on|off"),"info");return}if(h){R(O("Worktree is stopped. Wake it up before sending a message."),"info");return}if(e==="codex"&&!u){R(O("Codex is starting. Please wait."),"info");return}if(q==="/diff"||q.startsWith("/diff ")){l("diff"),t&&t!=="main"?_(t):w(),k(""),b([]),S(!1);return}if(q.startsWith("/backlog")){if(!i){R(O("Session not found."),"error");return}(async()=>{try{const I=await n(`/api/v1/sessions/${encodeURIComponent(i)}/backlog-items`);if(!I.ok){const $=await I.json().catch(()=>null);throw new Error(($==null?void 0:$.error)||O("Unable to load backlog."))}const L=await I.json().catch(()=>({})),B=Array.isArray(L==null?void 0:L.items)?L.items:[],T={id:`backlog-${Date.now()}-${Math.random().toString(16).slice(2,8)}`,role:"assistant",type:"backlog_view",text:"Backlog",backlog:{items:B,page:0}};m&&t?A($=>{const Y=new Map($),W=Y.get(t);return W&&Y.set(t,{...W,messages:[...W.messages||[],T]}),Y}):C($=>[...$,T])}catch(I){R(I.message||O("Unable to load backlog."),"error")}})(),k(""),b([]),S(!1);return}if(q.startsWith("/open")){const I=q.replace(/^\/open\s*/i,"").trim();if(!I){R(O("Path required."),"error");return}v(I).then(()=>{k(""),b([]),S(!1)}).catch(()=>null);return}if(q.startsWith("/todo")){const I=q.replace(/^\/todo\s*/i,"").trim();if(!I){R(O("Todo text required."),"error");return}if(!i){R(O("Session not found."),"error");return}(async()=>{try{const L=await n(`/api/v1/sessions/${encodeURIComponent(i)}/backlog-items`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:I})});if(!L.ok){const B=await L.json().catch(()=>null);throw new Error((B==null?void 0:B.error)||O("Unable to update backlog."))}R(O("Added to backlog."))}catch(L){R(L.message||O("Unable to update backlog."),"error")}})(),k(""),b([]),S(!1);return}if(q.startsWith("/run")){const I=q.replace(/^\/run\s*/i,"").trim();if(!I){R(O("Command required."),"error");return}if(!P.current||!a){R(O("Disconnected"),"error");return}const L=m&&t?t:null;P.current.send(JSON.stringify({type:"action_request",request:"run",arg:I,worktreeId:L||void 0})),k(""),b([]),S(!1);return}if(q.startsWith("/screenshot")){s().then(()=>{k(""),S(!1)}).catch(()=>null);return}if(q.startsWith("/git")){const I=q.replace(/^\/git\s*/i,"").trim();if(!I){R(O("Git command required."),"error");return}if(!P.current||!a){R(O("Disconnected"),"error");return}const L=m&&t?t:null;P.current.send(JSON.stringify({type:"action_request",request:"git",arg:I,worktreeId:L||void 0})),k(""),b([]),S(!1);return}const H=f?f(q):q;m&&t?d(t,q,U,H):g(q,U,H),p==null||p()},[e,t,n,i,f,s,p,a,l,c,h,u,m,v,w,_,g,d,y,S,b,k,R,P,O]);return x.useEffect(()=>{o.current=M},[M,o]),{handleSendMessage:M}}function VB({apiFetch:e,attachmentSessionId:t,llmProvider:r,loadRepoLastCommit:n,processing:i,setBranchMenuOpen:s,socketRef:a,t:o}){const[l,c]=x.useState([]),[h,u]=x.useState(""),[m,v]=x.useState(""),[w,_]=x.useState(!1),[g,d]=x.useState(""),[f,p]=x.useState({}),[y,S]=x.useState([]),[b,k]=x.useState(""),[C,A]=x.useState(""),[P,O]=x.useState(!1),[R,M]=x.useState(""),z=x.useRef(""),U=x.useCallback(async()=>{if(t){O(!0),M("");try{const B=await e(`/api/v1/sessions/${encodeURIComponent(t)}/branches`),D=await B.json().catch(()=>({}));if(!B.ok)throw new Error(D.error||o("Unable to load branches."));S(Array.isArray(D.branches)?D.branches:[]),k(D.current||""),!z.current&&D.current&&(z.current=D.current,A(D.current))}catch(B){M(B.message||o("Unable to load branches."))}finally{O(!1)}}},[t,e,o]),q=x.useCallback(async B=>{if(!(!t||!B)){p(D=>({...D,[B]:{...(D==null?void 0:D[B])||{},loading:!0,error:""}}));try{const D=await e(`/api/v1/sessions/${encodeURIComponent(t)}/models?provider=${encodeURIComponent(B)}`),T=await D.json().catch(()=>({}));if(!D.ok)throw new Error(T.error||o("Unable to load models."));p($=>({...$,[B]:{models:Array.isArray(T.models)?T.models:[],loading:!1,error:""}}))}catch(D){p(T=>({...T,[B]:{...(T==null?void 0:T[B])||{},loading:!1,error:D.message||o("Unable to load models.")}}))}}},[t,e,o]);x.useEffect(()=>{if(!t){S([]),k(""),A(""),M(""),z.current="",p({});return}z.current="",A(""),p({}),U()},[t,U]),x.useEffect(()=>{t&&(n==null||n())},[t,b,n]);const Q=x.useCallback(()=>{!a.current||r!=="codex"||(_(!0),d(""),a.current.send(JSON.stringify({type:"model_list"})))},[r,a]),H=x.useCallback(B=>{const D=B.target.value;u(D),a.current&&(_(!0),d(""),a.current.send(JSON.stringify({type:"model_set",model:D,reasoningEffort:m||null})))},[m,a]),I=x.useCallback(B=>{const D=B.target.value;v(D),a.current&&(_(!0),d(""),a.current.send(JSON.stringify({type:"model_set",model:h||null,reasoningEffort:D||null})))},[h,a]),L=x.useCallback(async B=>{!t||i||(M(o("Branch switching is no longer supported.")),s&&s(!1))},[t,i,s,o]);return{branches:y,branchError:R,branchLoading:P,currentBranch:b,defaultBranch:C,handleBranchSelect:L,handleModelChange:H,handleReasoningEffortChange:I,loadBranches:U,loadProviderModels:q,modelError:g,modelLoading:w,models:l,providerModelState:f,requestModelList:Q,selectedModel:h,selectedReasoningEffort:m,setBranches:S,setCurrentBranch:k,setDefaultBranch:A,setModelError:d,setModelLoading:_,setModels:c,setProviderModelState:p,setSelectedModel:u,setSelectedReasoningEffort:v}}const KB=()=>new URLSearchParams(window.location.search).get("session");function GB({t:e,apiFetch:t,workspaceToken:r,handleLeaveWorkspace:n,repoUrl:i,setRepoUrl:s,repoInput:a,sessionNameInput:o,repoAuth:l,setRepoAuth:c,authMode:h,sshKeyInput:u,httpUsername:m,httpPassword:v,sessionMode:w,sessionRequested:_,setSessionRequested:g,defaultInternetAccess:d,defaultDenyGitCredentialsAccess:f,attachmentSession:p,setAttachmentSession:y,setAttachmentsLoading:S,setAttachmentsError:b,setWorkspaceToken:k,setWorkspaceMode:C,setWorkspaceError:A,setOpenAiLoginPending:P,setOpenAiLoginRequest:O}){x.useEffect(()=>{const z=KB();if(!z||!r||p!=null&&p.sessionId)return;(async()=>{try{g(!0),b("");const q=await t(`/api/v1/sessions/${encodeURIComponent(z)}`);if(!q.ok)throw new Error(e("Session not found."));const Q=await q.json();y(Q)}catch(q){b(q.message||e("Unable to resume the session.")),g(!1)}})()},[r,p==null?void 0:p.sessionId,t,n,y,b,g,e]),x.useEffect(()=>{if(!i||p!=null&&p.sessionId||w!=="new")return;(async()=>{try{S(!0),b("");const U={repoUrl:i,defaultInternetAccess:d,defaultDenyGitCredentialsAccess:f},q=o.trim();q&&(U.name=q),l&&(U.auth=l);const Q=await t("/api/v1/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(U)});if(!Q.ok){let I="",L="";try{const T=await Q.json();typeof(T==null?void 0:T.error)=="string"?I=T.error:typeof(T==null?void 0:T.message)=="string"?I=T.message:typeof T=="string"&&(I=T),typeof(T==null?void 0:T.error_type)=="string"&&(L=T.error_type)}catch{try{I=await Q.text()}catch{I=""}}if(Q.status===401&&(L==="WORKSPACE_TOKEN_INVALID"||typeof I=="string"&&I.toLowerCase().includes("invalid workspace token"))){k(""),C("existing"),A(e("Invalid workspace token. Please sign in again.")),b("");return}const D=I?`: ${I}`:"";throw Q.status===401||Q.status===403?new Error(e("Git authentication failed{{suffix}}.",{suffix:D})):Q.status===404?new Error(e("Git repository not found{{suffix}}.",{suffix:D})):new Error(e("Impossible de creer la session de pieces jointes (HTTP {{status}}{{statusText}}){{suffix}}.",{status:Q.status,statusText:Q.statusText?` ${Q.statusText}`:"",suffix:D}))}const H=await Q.json();y(H)}catch(U){b(U.message||e("Unable to create the attachment session.")),P(!1),O(null)}finally{S(!1),g(!1)}})()},[i,l,p==null?void 0:p.sessionId,t,w,d,f,o,y,b,S,P,O,g,A,C,k,e]),x.useEffect(()=>{if(!(p!=null&&p.sessionId))return;const z=new URL(window.location.href);z.searchParams.set("session",p.sessionId),window.history.replaceState({},"",z)},[p==null?void 0:p.sessionId]);const R=x.useCallback(async z=>{if(z)try{g(!0),b("");const U=await t(`/api/v1/sessions/${encodeURIComponent(z)}`);if(!U.ok)throw new Error(e("Session not found."));const q=await U.json();y(q)}catch(U){b(U.message||e("Unable to resume the session.")),g(!1)}},[t,y,b,g,e]),M=x.useCallback(z=>{z.preventDefault();const U=!!(p!=null&&p.sessionId),q=a.trim();if(!U&&!q){b("URL de depot git requise pour demarrer.");return}let Q=null;if(!U){if(h==="ssh"){const H=u.trim();if(!H){b("Cle SSH privee requise pour demarrer.");return}Q={type:"ssh",privateKey:H}}if(h==="http"){const H=m.trim();if(!H||!v){b(e("Username and password required."));return}Q={type:"http",username:H,password:v}}}b(""),U||(g(!0),c(Q),s(q))},[p==null?void 0:p.sessionId,h,v,m,a,b,c,s,g,u,e]);return{handleResumeSession:R,onRepoSubmit:M}}function qB({t:e,apiFetch:t,attachmentSessionId:r}){const[n,i]=x.useState(!1),[s,a]=x.useState(""),[o,l]=x.useState(null),[c,h]=x.useState(!1),[u,m]=x.useState(""),[v,w]=x.useState(null),_=(f,p)=>JSON.stringify({type:"vibe80_handoff",handoffToken:f,baseUrl:window.location.origin,expiresAt:p}),g=x.useCallback(async()=>{if(r){h(!0),m("");try{const f=await t("/api/v1/sessions/handoff",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:r})});if(!f.ok){const A=await f.json().catch(()=>({}));throw new Error((A==null?void 0:A.error)||e("Unable to generate the QR code."))}const p=await f.json(),y=p==null?void 0:p.handoffToken;if(!y)throw new Error(e("Invalid resume token."));const S=(p==null?void 0:p.expiresAt)??null,b=_(y,S),{default:k}=await wi(async()=>{const{default:A}=await import("./browser-e3WgtMs-.js").then(P=>P.b);return{default:A}},[]),C=await k.toDataURL(b,{width:260,margin:1});a(C),l(S),i(!0)}catch(f){m((f==null?void 0:f.message)||e("Error during generation."))}finally{h(!1)}}},[r,t,e]),d=x.useCallback(()=>{i(!1),m(""),a(""),l(null),w(null)},[]);return x.useEffect(()=>{if(!n||!o){w(null);return}const f=typeof o=="number"?o:new Date(o).getTime();if(!Number.isFinite(f)){w(null);return}const p=()=>{const S=f-Date.now(),b=Math.max(0,Math.ceil(S/1e3));w(b)};p();const y=setInterval(p,1e3);return()=>clearInterval(y)},[n,o]),{handoffOpen:n,handoffQrDataUrl:s,handoffExpiresAt:o,handoffLoading:c,handoffError:u,handoffRemaining:v,requestHandoffQr:g,closeHandoffQr:d}}function YB({t:e,apiFetch:t,attachmentSessionId:r}){const[n,i]=x.useState(""),[s,a]=x.useState(""),[o,l]=x.useState({name:"",email:""}),[c,h]=x.useState({name:"",email:""}),[u,m]=x.useState(!1),[v,w]=x.useState(!1),[_,g]=x.useState(""),[d,f]=x.useState(""),p=x.useCallback(async()=>{var S,b,k,C;if(r){m(!0),g(""),f("");try{const A=await t(`/api/v1/sessions/${encodeURIComponent(r)}/git-identity`);if(!A.ok)throw new Error(e("Unable to load Git identity."));const P=await A.json(),O=((S=P==null?void 0:P.global)==null?void 0:S.name)||"",R=((b=P==null?void 0:P.global)==null?void 0:b.email)||"",M=((k=P==null?void 0:P.repo)==null?void 0:k.name)||"",z=((C=P==null?void 0:P.repo)==null?void 0:C.email)||"";l({name:O,email:R}),h({name:M,email:z}),i(M||O),a(z||R)}catch(A){g((A==null?void 0:A.message)||e("Error during loading."))}finally{m(!1)}}},[r,t,e]),y=x.useCallback(async()=>{var k,C;if(!r)return;const S=n.trim(),b=s.trim();if(!S||!b){g(e("Name and email required."));return}w(!0),g(""),f("");try{const A=await t(`/api/v1/sessions/${encodeURIComponent(r)}/git-identity`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:S,email:b})});if(!A.ok){const M=await A.json().catch(()=>({}));throw new Error((M==null?void 0:M.error)||e("Update failed."))}const P=await A.json().catch(()=>({})),O=((k=P==null?void 0:P.repo)==null?void 0:k.name)||S,R=((C=P==null?void 0:P.repo)==null?void 0:C.email)||b;h({name:O,email:R}),f(e("Repository Git identity updated."))}catch(A){g((A==null?void 0:A.message)||e("Update failed."))}finally{w(!1)}},[r,t,s,n,e]);return x.useEffect(()=>{r&&p()},[r,p]),{gitIdentityName:n,gitIdentityEmail:s,gitIdentityGlobal:o,gitIdentityRepo:c,gitIdentityLoading:u,gitIdentitySaving:v,gitIdentityError:_,gitIdentityMessage:d,setGitIdentityName:i,setGitIdentityEmail:a,loadGitIdentity:p,handleSaveGitIdentity:y}}function JB({t:e,choicesKey:t,input:r,setInput:n,handleSendMessageRef:i,draftAttachments:s,setDraftAttachments:a}){const[o,l]=x.useState({}),[c,h]=x.useState(null),[u,m]=x.useState({});x.useEffect(()=>{if(!t){l({});return}try{const p=JSON.parse(localStorage.getItem(t)||"{}");l(p&&typeof p=="object"&&!Array.isArray(p)?p:{})}catch{l({})}},[t]),x.useEffect(()=>{t&&localStorage.setItem(t,JSON.stringify(o))},[o,t]);const v=x.useCallback((p,y)=>{var b;if(!((b=p==null?void 0:p.fields)!=null&&b.length))return;const S={};p.fields.forEach(k=>{var C;k.type==="checkbox"?S[k.id]=!!k.defaultChecked:k.type==="radio"||k.type==="select"?S[k.id]=((C=k.choices)==null?void 0:C[0])||"":S[k.id]=k.defaultValue||""}),h({...p,key:y}),m(S)},[]),w=x.useCallback(()=>{h(null),m({})},[]),_=x.useCallback((p,y)=>{m(S=>({...S,[p]:y}))},[]),g=x.useCallback(p=>{var b;const y=r,S=s;(b=i.current)==null||b.call(i,p,[]),n(y),a(S)},[s,i,r,a,n]),d=x.useCallback(p=>{if(p==null||p.preventDefault(),!c)return;const y=c.fields.map(S=>{let b=u[S.id];return S.type==="checkbox"&&(b=b?"1":"0"),b==null&&(b=""),`${S.id}=${b}`});g(y.join(`
704
- `)),w()},[c,u,w,g]),f=x.useCallback((p,y,S)=>{var b;l(k=>({...k,[y]:S})),n(p),(b=i.current)==null||b.call(i,p)},[i,n]);return{choiceSelections:o,setChoiceSelections:l,activeForm:c,activeFormValues:u,openVibe80Form:v,closeVibe80Form:w,updateActiveFormValue:_,submitActiveForm:d,handleChoiceClick:f,setActiveForm:h,setActiveFormValues:m}}function XB({authMode:e,llmProvider:t,selectedProviders:r,openAiAuthMode:n,showChatCommands:i,showToolResults:s,notificationsEnabled:a,themeMode:o,repoHistory:l,debugMode:c,setLlmProvider:h,setOpenAiLoginError:u,setClaudeLoginError:m,AUTH_MODE_KEY:v,LLM_PROVIDER_KEY:w,LLM_PROVIDERS_KEY:_,OPENAI_AUTH_MODE_KEY:g,CHAT_COMMANDS_VISIBLE_KEY:d,TOOL_RESULTS_VISIBLE_KEY:f,NOTIFICATIONS_ENABLED_KEY:p,THEME_MODE_KEY:y,REPO_HISTORY_KEY:S,DEBUG_MODE_KEY:b}){x.useEffect(()=>{try{localStorage.setItem(v,e)}catch{}},[v,e]),x.useEffect(()=>{try{localStorage.setItem(w,t)}catch{}},[w,t]),x.useEffect(()=>{try{localStorage.setItem(_,JSON.stringify(r))}catch{}},[_,r]),x.useEffect(()=>{u(""),m("")},[t,m,u]),x.useEffect(()=>{if(r.includes(t))return;const k=r[0]||"codex";k!==t&&h(k)},[r,t,h]),x.useEffect(()=>{try{localStorage.setItem(g,n)}catch{}},[g,n]),x.useEffect(()=>{try{localStorage.setItem(d,i?"true":"false")}catch{}},[d,i]),x.useEffect(()=>{try{localStorage.setItem(f,s?"true":"false")}catch{}},[f,s]),x.useEffect(()=>{try{localStorage.setItem(p,a?"true":"false")}catch{}},[p,a]),x.useEffect(()=>{try{localStorage.setItem(y,o)}catch{}},[y,o]),x.useEffect(()=>{try{localStorage.setItem(S,JSON.stringify(l))}catch{}},[S,l]),x.useEffect(()=>{try{localStorage.setItem(b,c?"true":"false")}catch{}},[b,c])}function QB({themeMode:e,setSideOpen:t}){const[r,n]=x.useState(()=>window.matchMedia("(max-width: 1024px)").matches);return x.useEffect(()=>{const i=window.matchMedia("(max-width: 1024px)"),s=()=>n(i.matches);return s(),i.addEventListener?(i.addEventListener("change",s),()=>i.removeEventListener("change",s)):(i.addListener(s),()=>i.removeListener(s))},[]),x.useEffect(()=>{document.documentElement.dataset.theme=e},[e]),x.useEffect(()=>{r&&t(!1)},[r,t]),{isMobileLayout:r}}function ZB({rpcLogs:e,activeWorktreeId:t,locale:r,logFilterByTab:n,setLogFilterByTab:i}){const s=n[t]||"all",a=x.useCallback(h=>{const u=t||"main";i(m=>({...m,[u]:h}))},[t]),o=x.useMemo(()=>t&&t!=="main"?(e||[]).filter(h=>(h==null?void 0:h.worktreeId)===t):(e||[]).filter(h=>!(h!=null&&h.worktreeId)),[e,t]),l=x.useMemo(()=>o.map(h=>({...h,timeLabel:h!=null&&h.timestamp?new Date(h.timestamp).toLocaleTimeString(r):""})),[o,r]),c=x.useMemo(()=>s==="stdin"?l.filter(h=>h.direction==="stdin"):s==="stdout"?l.filter(h=>h.direction==="stdout"):l,[l,s]);return{logFilterByTab:n,setLogFilterByTab:i,logFilter:s,setLogFilter:a,scopedRpcLogs:o,formattedRpcLogs:l,filteredRpcLogs:c}}function e9(){const[e,t]=x.useState(!1),r=x.useRef(null);return x.useEffect(()=>{if(!e)return;const n=i=>{var a;const s=i.target;(a=r.current)!=null&&a.contains(s)||t(!1)};return document.addEventListener("pointerdown",n),()=>document.removeEventListener("pointerdown",n)},[e]),{toolbarExportOpen:e,setToolbarExportOpen:t,toolbarExportRef:r}}function t9(){const[e,t]=x.useState({}),[r,n]=x.useState({});return{commandPanelOpen:e,setCommandPanelOpen:t,toolResultPanelOpen:r,setToolResultPanelOpen:n}}function r9({activePane:e,activeWorktreeId:t,debugMode:r,rpcLogsEnabled:n,terminalEnabled:i,setPaneByTab:s,setToolbarExportOpen:a,lastPaneByTabRef:o}){const l=x.useCallback(u=>{if((!r||!n)&&u==="logs"||!i&&u==="terminal")return;const m=t||"main";s(v=>({...v,[m]:u})),a(!1)},[t,r,n,s,a,i]),c=x.useCallback(()=>{if(e!=="settings"){const u=t||"main";o.current.set(u,e)}l("settings")},[e,t,l,o]),h=x.useCallback(()=>{const u=t||"main",m=o.current.get(u);l(m&&m!=="settings"?m:"chat")},[t,l,o]);return x.useEffect(()=>{(!r||!n)&&e==="logs"&&l("chat")},[e,r,l,n]),x.useEffect(()=>{!i&&e==="terminal"&&l("chat")},[e,l,i]),{handleViewSelect:l,handleOpenSettings:c,handleSettingsBack:h}}function n9({setAttachmentSession:e,setRepoUrl:t,setRepoInput:r,setRepoAuth:n,setSessionRequested:i,setAttachmentsError:s,setAttachmentsLoading:a,setMessages:o,setRepoDiff:l,setRpcLogs:c,setRpcLogsEnabled:h,setRepoLastCommit:u,setWorktreeLastCommitById:m,setCurrentTurnId:v,setActivity:w,setDefaultDenyGitCredentialsAccess:_}){return{handleLeaveSession:x.useCallback(()=>{e(null),t(""),r(""),n(null),i(!1),s(""),a(!1),o([]),l({status:"",diff:""}),c([]),h(!0),u(null),m(new Map),v(null),w(""),typeof _=="function"&&_(!1);const d=new URL(window.location.href);d.searchParams.delete("session"),window.history.replaceState({},"",d)},[w,e,s,a,v,o,n,l,r,u,t,c,h,i,_,m])}}function i9({activeWorktreeId:e,isInWorktree:t,currentTurnIdForActive:r,socketRef:n,setWorktrees:i,setActivity:s}){return{interruptTurn:x.useCallback(()=>{if(!r||!n.current)return;const o={type:"turn_interrupt",turnId:r,worktreeId:t&&e?e:void 0};if(n.current.send(JSON.stringify(o)),t&&e){i(l=>{const c=new Map(l),h=c.get(e);return h&&c.set(e,{...h,activity:"Interruption..."}),c});return}s("Interruption...")},[e,r,t,s,i,n])}}function s9({activeWorktreeId:e,handleViewSelect:t,requestWorktreeDiff:r,requestRepoDiff:n}){return{handleDiffSelect:x.useCallback(()=>{t("diff"),e&&e!=="main"?r(e):n()},[e,t,n,r])}}function o9({activeChatKey:e,displayedGroupedMessages:t,CHAT_COLLAPSE_THRESHOLD:r,CHAT_COLLAPSE_VISIBLE:n}){const[i,s]=x.useState({}),a=!!i[e],o=x.useMemo(()=>{const l=t.length;if(!(!a&&l>r))return{visibleMessages:t,hiddenCount:0,isCollapsed:!1};const h=t.slice(Math.max(0,l-n));return{visibleMessages:h,hiddenCount:Math.max(0,l-h.length),isCollapsed:!0}},[t,a,r,n]);return{showOlderMessagesByTab:i,setShowOlderMessagesByTab:s,showOlderMessages:a,collapsedMessages:o}}function a9({attachmentSessionId:e,apiFetch:t,llmProvider:r,setLlmProvider:n,setSelectedProviders:i,setOpenAiReady:s,setClaudeReady:a,setRepoDiff:o,setRpcLogsEnabled:l,setRpcLogs:c,setTerminalEnabled:h,loadMainWorktreeSnapshot:u}){return{resyncSession:x.useCallback(async()=>{if(e)try{const v=await t(`/api/v1/sessions/${encodeURIComponent(e)}`);if(!v.ok)return;const w=await v.json();if(w!=null&&w.defaultProvider&&w.defaultProvider!==r&&n(w.defaultProvider),Array.isArray(w==null?void 0:w.providers)&&w.providers.length){const _=w.providers.filter(g=>g==="codex"||g==="claude");_.length&&(i(_),s(_.includes("codex")),a(_.includes("claude")))}w!=null&&w.repoDiff&&o(w.repoDiff),typeof(w==null?void 0:w.rpcLogsEnabled)=="boolean"&&(l(w.rpcLogsEnabled),w.rpcLogsEnabled||c([])),Array.isArray(w==null?void 0:w.rpcLogs)&&(w==null?void 0:w.rpcLogsEnabled)!==!1&&c(w.rpcLogs),typeof(w==null?void 0:w.terminalEnabled)=="boolean"&&h(w.terminalEnabled),u()}catch{}},[e,t,r,u,a,n,s,o,c,l,i,h])}}function l9({socketRef:e,messagesRef:t}){return{requestMessageSync:x.useCallback(()=>{const n=e.current;if(!n||n.readyState!==WebSocket.OPEN)return;const i=(()=>{var s;if(!Array.isArray(t.current))return null;for(let a=t.current.length-1;a>=0;a-=1)if((s=t.current[a])!=null&&s.id)return t.current[a].id;return null})();n.send(JSON.stringify({type:"worktree_messages_sync",worktreeId:"main",lastSeenMessageId:i}))},[t,e])}}function c9({normalizeAttachments:e,messageIndex:t,commandIndex:r,messagesRef:n,setMessages:i,setCommandPanelOpen:s,setToolResultPanelOpen:a}){const o=x.useCallback((c=[])=>{const h=c.map((u,m)=>({...u,id:u.id||`history-${m}`,role:u.role,text:u.text,toolResult:u.toolResult,attachments:e(u.attachments||[])}));t.clear(),r.clear(),h.forEach((u,m)=>{u.role==="assistant"&&t.set(u.id,m)}),i(h),s({}),a({})},[r,t,e,s,i,a]),l=x.useCallback((c=[])=>{if(!Array.isArray(c)||c.length===0)return;const h=Array.isArray(n.current)?n.current:[],u=new Set(h.map(v=>v==null?void 0:v.id).filter(Boolean)),m=[...h];for(const v of c){const w=v==null?void 0:v.id;w&&u.has(w)||(w&&u.add(w),m.push(v))}o(m)},[o,n]);return{applyMessages:o,mergeAndApplyMessages:l}}function u9({closeConfirm:e,setCloseConfirm:t,setActiveWorktreeId:r,activeWorktreeIdRef:n,closeWorktree:i}){const s=x.useCallback(l=>{!l||l==="main"||t({worktreeId:l})},[t]),a=x.useCallback(()=>{t(null)},[t]),o=x.useCallback(async()=>{e!=null&&e.worktreeId&&(n.current===e.worktreeId&&r("main"),await i(e.worktreeId),t(null))},[n,e,i,r,t]);return{openCloseConfirm:s,closeCloseConfirm:a,handleConfirmDelete:o}}function f9({activeWorktreeId:e,setRpcLogs:t}){return{handleClearRpcLogs:x.useCallback(()=>{t(n=>e&&e!=="main"?n.filter(i=>(i==null?void 0:i.worktreeId)!==e):n.filter(i=>!!(i!=null&&i.worktreeId)))},[e,t])}}const h9=e=>{const r=String(e||"").replace(/\\/g,"/").split("/").filter(Boolean);return r.length?r[r.length-1]:""},so=e=>{const r=String(e||"").replace(/\\/g,"/").split("/").filter(Boolean);return r.length<=1?"":r.slice(0,-1).join("/")},qf=(e,t)=>e?`${e}/${t}`:t,yl=(e,t,r)=>!e||typeof e!="string"?e:e===t?r:e.startsWith(`${t}/`)?`${r}${e.slice(t.length)}`:e;function d9({attachmentSessionId:e,apiFetch:t,t:r,setExplorerByTab:n,explorerDefaultState:i,explorerRef:s,activeWorktreeId:a,handleViewSelect:o,showToast:l,requestExplorerTreeRef:c,requestExplorerStatusRef:h,loadExplorerFileRef:u}){const m=x.useCallback((D,T)=>{n($=>{const Y=$[D]||i;return{...$,[D]:{...i,...Y,...T}}})},[i,n]),v=x.useCallback((D,T)=>{if(!Array.isArray(D))return null;for(const $ of D){if(($==null?void 0:$.path)===T)return $;if(($==null?void 0:$.type)==="dir"&&Array.isArray($.children)){const Y=v($.children,T);if(Y)return Y}}return null},[]),w=x.useCallback((D,T,$)=>{if(!Array.isArray(D))return D;let Y=!1;const W=D.map(j=>{if(!j)return j;if(j.path===T)return Y=!0,{...j,children:$};if(j.type==="dir"&&j.children!=null){const N=w(j.children,T,$);if(N!==j.children)return Y=!0,{...j,children:N}}return j});return Y?W:D},[]),_=x.useCallback((D,T,$)=>{n(Y=>{const W=Y[D]||i,j=Array.isArray(W.tree)?W.tree:[],N=w(j,T,$);return N===j?Y:{...Y,[D]:{...i,...W,tree:N}}})},[i,n,w]),g=x.useCallback(async(D,T)=>{if(!e||!D)return[];const $=await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/browse${T?`?path=${encodeURIComponent(T)}`:""}`);if(!$.ok)throw new Error("Failed to load directory");const Y=await $.json().catch(()=>({})),j=(Array.isArray(Y==null?void 0:Y.entries)?Y.entries:[]).map(N=>({...N,children:(N==null?void 0:N.type)==="dir"?(N==null?void 0:N.children)??null:void 0}));return T?_(D,T,j):m(D,{tree:j,loading:!1,error:"",treeTruncated:!1,treeTotal:j.length}),j},[e,t,_,m]),d=x.useCallback(D=>D?D.trim().replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"").replace(/\/+/g,"/"):"",[]),f=x.useCallback((D,T)=>{if(!T)return;const $=T.split("/").filter(Boolean),Y=[];let W="";$.forEach(j=>{W=W?`${W}/${j}`:j,Y.push(W)}),m(D,{expandedPaths:Y})},[m]),p=x.useCallback((D,T,$)=>{!D||!T||m(D,{selectedPath:T,selectedType:$||null})},[m]),y=x.useCallback(async(D,T=!1)=>{var Y;if(!e||!D)return;const $=s.current[D];if(!(!T&&($!=null&&$.tree)&&!($!=null&&$.error))&&!($!=null&&$.loading)){m(D,{loading:!0,error:""});try{if(await g(D,""),T){const W=Array.isArray((Y=s.current[D])==null?void 0:Y.expandedPaths)?s.current[D].expandedPaths:[],j=Array.from(new Set(W.filter(N=>typeof N=="string"&&N.length>0)));for(const N of j)await g(D,N)}}catch{m(D,{loading:!1,error:r("Unable to load the explorer.")})}}},[e,s,m,g,r]),S=x.useCallback(async(D,T=!1)=>{if(!e||!D)return;const $=s.current[D];if(!(!T&&($!=null&&$.statusLoaded)&&!($!=null&&$.statusError))&&!($!=null&&$.statusLoading)){m(D,{statusLoading:!0,statusError:""});try{const Y=await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/status`);if(!Y.ok)throw new Error("Failed to load status");const W=await Y.json(),j=Array.isArray(W==null?void 0:W.entries)?W.entries:[],N={};j.forEach(G=>{!(G!=null&&G.path)||!(G!=null&&G.type)||(N[G.path]=G.type)}),m(D,{statusByPath:N,statusLoading:!1,statusError:"",statusLoaded:!0})}catch{m(D,{statusLoading:!1,statusError:r("Unable to load Git status."),statusLoaded:!1})}}},[e,s,m,t,r]),b=x.useCallback(async(D,T,$=!1)=>{var N;if(!e||!D||!T)return;const Y=s.current[D]||i,W=Array.isArray(Y.openTabPaths)?Y.openTabPaths:[],j=(N=Y.filesByPath)==null?void 0:N[T];if(n(G=>{var le;const V=G[D]||i,X=Array.isArray(V.openTabPaths)?V.openTabPaths:[],ne=X.includes(T)?X:[...X,T],ue=((le=V.filesByPath)==null?void 0:le[T])||{},ve=$||ue.content==null;return{...G,[D]:{...i,...V,openTabPaths:ne,activeFilePath:T,selectedPath:T,selectedType:"file",editMode:!0,filesByPath:{...V.filesByPath||{},[T]:{...ue,path:T,loading:ve,error:"",saveError:"",saving:!1,binary:ve?!1:!!ue.binary}}}}}),!(!$&&W.includes(T)&&(j==null?void 0:j.content)!=null))try{const G=await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file?path=${encodeURIComponent(T)}`);if(!G.ok)throw new Error("Failed to load file");const V=await G.json(),X=(V==null?void 0:V.content)||"";n(ne=>{var le;const ue=ne[D]||i,ve=((le=ue.filesByPath)==null?void 0:le[T])||{};return{...ne,[D]:{...i,...ue,filesByPath:{...ue.filesByPath||{},[T]:{...ve,path:T,content:X,draftContent:X,loading:!1,error:"",truncated:!!(V!=null&&V.truncated),binary:!!(V!=null&&V.binary),isDirty:!1}}}}})}catch{n(G=>{var ne;const V=G[D]||i,X=((ne=V.filesByPath)==null?void 0:ne[T])||{};return{...G,[D]:{...i,...V,filesByPath:{...V.filesByPath||{},[T]:{...X,path:T,loading:!1,error:r("Unable to load the file.")}}}}})}},[e,i,s,n,r,t]),k=x.useCallback(D=>{var $;if(!D)return;const T=a||"main";o("explorer"),y(T),S(T),($=u.current)==null||$.call(u,T,D)},[a,o,y,S,u]),C=x.useCallback(async D=>{var G,V,X,ne,ue,ve;const T=a||"main";if(!e){l(r("Session not found."),"error");return}const $=d(D);if(!$){l(r("Path required."),"error");return}let Y=(G=s.current[T])==null?void 0:G.tree;if(!Array.isArray(Y)||Y.length===0)try{await g(T,""),Y=(V=s.current[T])==null?void 0:V.tree}catch{l(r("Unable to load directory."),"error");return}const W=$.split("/").filter(Boolean);let j="",N=null;for(const le of W){const Se=j?`${j}/${le}`:le;if(N=v(Y,Se),!N){l(r("Path not found."),"error");return}if(N.type==="dir"&&N.children===null)try{if(await g(T,N.path),Y=(X=s.current[T])==null?void 0:X.tree,N=v(Y,Se),!N){l(r("Path not found."),"error");return}}catch{l(r("Unable to load directory."),"error");return}j=Se}if(!N){l(r("Path not found."),"error");return}o("explorer"),(ne=c.current)==null||ne.call(c,T),(ue=h.current)==null||ue.call(h,T),p(T,N.path,N.type),N.type==="dir"?f(T,N.path):(ve=u.current)==null||ve.call(u,T,N.path)},[a,e,o,c,h,d,g,v,u,p,f,s,l,r]),A=x.useCallback((D,T)=>{if(!D||!T)return;const $=s.current[D]||i,W=!new Set($.expandedPaths||[]).has(T);n(j=>{const N=j[D]||i,G=new Set(N.expandedPaths||[]);return G.has(T)?G.delete(T):G.add(T),{...j,[D]:{...i,...N,expandedPaths:Array.from(G)}}}),W&&g(D,T).catch(()=>{m(D,{error:r("Unable to load the explorer.")})})},[s,i,n,g,m,r]),P=x.useCallback((D,T,$)=>{var W,j,N,G;if(!D)return;const Y=T||((j=(W=s.current)==null?void 0:W[D])==null?void 0:j.activeFilePath)||((G=(N=s.current)==null?void 0:N[D])==null?void 0:G.selectedPath);Y&&n(V=>{var ve;const X=V[D]||i,ne=(ve=X.filesByPath)==null?void 0:ve[Y];if(!ne)return V;const ue=$??"";return{...V,[D]:{...i,...X,filesByPath:{...X.filesByPath||{},[Y]:{...ne,draftContent:ue,isDirty:ue!==(ne.content||""),saveError:""}}}}})},[s,i,n]),O=x.useCallback(async(D,T)=>{var j,N;if(!e||!D)return;const $=(j=s.current)==null?void 0:j[D],Y=T||($==null?void 0:$.activeFilePath)||($==null?void 0:$.selectedPath),W=Y?(N=$==null?void 0:$.filesByPath)==null?void 0:N[Y]:null;if(!(!Y||!W||W.binary)){n(G=>{var ne;const V=G[D]||i,X=(ne=V.filesByPath)==null?void 0:ne[Y];return X?{...G,[D]:{...i,...V,filesByPath:{...V.filesByPath||{},[Y]:{...X,saving:!0,saveError:""}}}}:G});try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:Y,content:W.draftContent||""})})).ok)throw new Error("Failed to save file");n(V=>{var ue;const X=V[D]||i,ne=(ue=X.filesByPath)==null?void 0:ue[Y];return ne?{...V,[D]:{...i,...X,filesByPath:{...X.filesByPath||{},[Y]:{...ne,content:ne.draftContent||"",saving:!1,saveError:"",isDirty:!1}}}}:V}),S(D,!0)}catch{n(G=>{var ne;const V=G[D]||i,X=(ne=V.filesByPath)==null?void 0:ne[Y];return X?{...G,[D]:{...i,...V,filesByPath:{...V.filesByPath||{},[Y]:{...X,saving:!1,saveError:r("Unable to save the file.")}}}}:G})}}},[e,s,i,n,S,t,r]),R=x.useCallback((D,T)=>{!D||!T||m(D,{activeFilePath:T,selectedPath:T,selectedType:"file"})},[m]),M=x.useCallback((D,T)=>{var j,N;if(!D||!T)return;const $=((j=s.current)==null?void 0:j[D])||i;if(!(Array.isArray($.openTabPaths)?$.openTabPaths:[]).includes(T))return;const W=(N=$.filesByPath)==null?void 0:N[T];W!=null&&W.isDirty&&!window.confirm(r("You have unsaved changes. Continue without saving?"))||n(G=>{const V=G[D]||i,X=Array.isArray(V.openTabPaths)?V.openTabPaths:[],ne=X.indexOf(T);if(ne<0)return G;const ue=X.filter(Se=>Se!==T),ve={...V.filesByPath||{}};delete ve[T];let le=V.activeFilePath||null;return le===T&&(le=ue[ne-1]||ue[ne]||ue[ue.length-1]||null),{...G,[D]:{...i,...V,openTabPaths:ue,filesByPath:ve,activeFilePath:le,selectedPath:le,selectedType:le?"file":null,editMode:!!le}}})},[s,i,n,r]),z=x.useCallback(D=>{var Y;if(!D)return!1;const $=(((Y=s.current)==null?void 0:Y[D])||i).selectedPath;return $?(m(D,{renamingPath:$,renameDraft:h9($)}),!0):!1},[s,i,m]),U=x.useCallback(D=>{D&&m(D,{renamingPath:null,renameDraft:""})},[m]),q=x.useCallback((D,T)=>{D&&m(D,{renameDraft:T??""})},[m]),Q=x.useCallback(async D=>{var j;if(!e||!D)return!1;const T=((j=s.current)==null?void 0:j[D])||i,$=T.renamingPath,Y=(T.renameDraft||"").trim();if(!$||!Y)return U(D),!1;if(Y.includes("/"))return l(r("Path required."),"error"),!1;const W=qf(so($),Y);if(!W||W===$)return U(D),!1;try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fromPath:$,toPath:W})})).ok)throw new Error("Failed to rename path");return n(G=>{const V=G[D]||i,X=Array.from(new Set((V.openTabPaths||[]).map(ue=>yl(ue,$,W)))),ne={};return Object.entries(V.filesByPath||{}).forEach(([ue,ve])=>{ne[yl(ue,$,W)]=ve}),{...G,[D]:{...i,...V,openTabPaths:X,filesByPath:ne,activeFilePath:yl(V.activeFilePath,$,W),selectedPath:yl(V.selectedPath,$,W),renamingPath:null,renameDraft:""}}}),await y(D,!0),await S(D,!0),l(r("Renamed."),"success"),!0}catch{return l(r("Unable to rename."),"error"),!1}},[e,s,i,n,t,y,S,U,l,r]),H=x.useCallback(async(D,T)=>{var V;if(!e||!D)return!1;const $=d(T||"");if(!$)return l(r("Path required."),"error"),!1;const Y=((V=s.current)==null?void 0:V[D])||i,W=Y.selectedPath||"",j=Y.selectedType||null,N=j==="dir"?W:j==="file"?so(W):"",G=qf(N,$);try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:G,content:""})})).ok)throw new Error("Failed to create file");return await y(D,!0),await S(D,!0),await b(D,G,!0),l(r("File created."),"success"),!0}catch{return l(r("Unable to create file."),"error"),!1}},[e,s,i,d,y,S,b,t,l,r]),I=x.useCallback(async(D,T)=>{var V;if(!e||!D)return!1;const $=d(T||"");if(!$)return l(r("Path required."),"error"),!1;const Y=((V=s.current)==null?void 0:V[D])||i,W=Y.selectedPath||"",j=Y.selectedType||null,N=j==="dir"?W:j==="file"?so(W):"",G=qf(N,$);try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:G})})).ok)throw new Error("Failed to create folder");return await y(D,!0),await S(D,!0),l(r("Folder created."),"success"),!0}catch{return l(r("Unable to create folder."),"error"),!1}},[e,d,s,i,t,y,S,l,r]),L=x.useCallback(async D=>{var W;if(!e||!D)return!1;const $=(((W=s.current)==null?void 0:W[D])||i).selectedPath||"";if(!$||!window.confirm(r('Delete "{{path}}"? This action is irreversible.',{path:$})))return!1;m(D,{deletingPath:$});try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:$})})).ok)throw new Error("Failed to delete path");return n(N=>{const G=N[D]||i,V=(G.openTabPaths||[]).filter(ue=>ue!==$&&!ue.startsWith(`${$}/`)),X={};Object.entries(G.filesByPath||{}).forEach(([ue,ve])=>{ue===$||ue.startsWith(`${$}/`)||(X[ue]=ve)});const ne=G.activeFilePath===$||String(G.activeFilePath||"").startsWith(`${$}/`)?V[V.length-1]||null:G.activeFilePath;return{...N,[D]:{...i,...G,openTabPaths:V,filesByPath:X,activeFilePath:ne,selectedPath:so($)||ne,selectedType:so($)?"dir":ne?"file":null,renamingPath:null,renameDraft:"",deletingPath:null}}}),await y(D,!0),await S(D,!0),l(r("Deleted."),"success"),!0}catch{return m(D,{deletingPath:null}),l(r("Unable to delete."),"error"),!1}},[e,s,i,n,m,y,S,t,l,r]),B=x.useCallback((D,T)=>{D&&m(D,{editMode:T})},[m]);return x.useEffect(()=>{c.current=y},[y,c]),x.useEffect(()=>{h.current=S},[S,h]),x.useEffect(()=>{u.current=b},[b,u]),{updateExplorerState:m,selectExplorerNode:p,openPathInExplorer:C,requestExplorerTree:y,requestExplorerStatus:S,loadExplorerFile:b,openFileInExplorer:k,setActiveExplorerFile:R,closeExplorerFile:M,toggleExplorerDir:A,toggleExplorerEditMode:B,updateExplorerDraft:P,saveExplorerFile:O,startExplorerRename:z,cancelExplorerRename:U,updateExplorerRenameDraft:q,submitExplorerRename:Q,createExplorerFile:H,createExplorerFolder:I,deleteExplorerSelection:L}}function p9({attachmentSessionId:e,socketRef:t,availableProviders:r,llmProvider:n,providerSwitching:i,processing:s,setProviderSwitching:a,setStatus:o,setSelectedProviders:l,setLlmProvider:c,t:h}){const u=x.useCallback(v=>{!t.current||t.current.readyState!==WebSocket.OPEN||r.includes(v)&&(v===n||i||s||(a(!0),o(h("Switching to {{provider}}...",{provider:v})),t.current.send(JSON.stringify({type:"switch_provider",provider:v}))))},[r,n,s,i,a,o,t,h]),m=x.useCallback(v=>{e||l(w=>{const _=w.includes(v),g=_?w.filter(d=>d!==v):[...w,v];if(!_)c(v);else if(v===n){const d=g[0]||v;d!==n&&c(d)}return g})},[e,n,c,l]);return{handleProviderSwitch:u,toggleProviderSelection:m}}function m9({currentMessages:e,attachmentRepoUrl:t,repoUrl:r,isInWorktree:n,activeWorktree:i,t:s,normalizeAttachments:a,downloadTextFile:o,formatExportName:l,extractRepoName:c,setToolbarExportOpen:h}){return{handleExportChat:x.useCallback(m=>{h(!1);const v=Array.isArray(e)?e:[];if(!v.length)return;h(!1);const w=c(t||r||""),_=n&&i?`${i.name||s("Worktree")} (${i.branchName||i.id})`:s("Main");if(m==="markdown"){const d=[`# ${s("Chat history")}`,"",`${s("Export")}: ${new Date().toISOString()}`,`${s("Tab")}: ${_}`,""];v.forEach(p=>{var b,k,C;if(p.role==="commandExecution"){d.push(`## ${s("Command")}`),d.push(`\`${p.command||s("Command")}\``),p.output&&(d.push("```"),d.push(p.output),d.push("```")),d.push("");return}if(p.role==="tool_result"){const A=((b=p.toolResult)==null?void 0:b.name)||((k=p.toolResult)==null?void 0:k.tool)||s("Tool"),P=((C=p.toolResult)==null?void 0:C.output)||p.text||"";d.push(`## ${s("Tool result")}`),d.push(`\`${A}\``),P&&(d.push("```"),d.push(P),d.push("```")),d.push("");return}const y=p.role==="user"?s("Username"):s("Assistant");d.push(`## ${y}`),d.push(p.text||"");const S=a(p.attachments||[]).map(A=>(A==null?void 0:A.name)||(A==null?void 0:A.path)).filter(Boolean);S.length&&d.push(`${s("Attachments")}: ${S.join(", ")}`),d.push("")});const f=d.join(`
705
- `).trim()+`
706
- `;o(l(w,"md"),f,"text/markdown");return}const g={exportedAt:new Date().toISOString(),repoUrl:t||r||"",tab:{type:n?"worktree":"main",worktreeId:(i==null?void 0:i.id)||null,worktreeName:(i==null?void 0:i.name)||null,branchName:(i==null?void 0:i.branchName)||null},messages:v.map(d=>d.role==="commandExecution"?{id:d.id,role:d.role,command:d.command||"",output:d.output||"",status:d.status||""}:d.role==="tool_result"?{id:d.id,role:d.role,text:d.text||"",toolResult:d.toolResult||null}:{id:d.id,role:d.role,text:d.text||"",attachments:a(d.attachments||[])})};o(l(w,"json"),JSON.stringify(g,null,2),"application/json")},[i,t,e,o,c,l,n,a,r,h,s])}}function g9({input:e,setInput:t,setMessages:r,setDraftAttachments:n,socketRef:i,connected:s,normalizeAttachments:a,draftAttachments:o,setWorktrees:l,setProcessing:c,setActivity:h,processingLabel:u,handleSendMessageRef:m,ensureNotificationPermission:v}){const w=x.useCallback((d,f,p)=>{const y=(d??e).trim();if(!y||!i.current||!s)return;const S=(p??y).trim();if(!S)return;v==null||v();const b=a(f??o),k=b.map(P=>P==null?void 0:P.path).filter(Boolean),C=k.length>0?`;; attachments: ${JSON.stringify(k)}`:"",A=`${S}${C}`;r(P=>[...P,{id:`user-${Date.now()}`,role:"user",text:y,attachments:b}]),c==null||c(!0),h==null||h(u||"Processing..."),i.current.send(JSON.stringify({type:"worktree_send_message",worktreeId:"main",text:A,displayText:y,attachments:b})),t(""),n([])},[s,o,e,a,n,t,r,i]),_=x.useCallback(d=>{m.current&&m.current(d,[])},[m]),g=x.useCallback((d,f,p,y)=>{const S=(f??e).trim();if(!S||!i.current||!s||!d)return;const b=(y??S).trim();if(!b)return;const k=a(p??o),C=k.map(O=>O==null?void 0:O.path).filter(Boolean),A=C.length>0?`;; attachments: ${JSON.stringify(C)}`:"",P=`${b}${A}`;l(O=>{const R=new Map(O);if(d==="main")return R;const M=R.get(d);if(M){const z=[...M.messages,{id:`user-${Date.now()}`,role:"user",text:S,attachments:k}];R.set(d,{...M,messages:z,status:"processing"})}return R}),d==="main"&&(c==null||c(!0),h==null||h(u||"Processing...")),i.current.send(JSON.stringify({type:"worktree_send_message",worktreeId:d,text:P,displayText:S,attachments:k})),t(""),n([])},[s,o,e,a,n,t,l,i]);return{sendMessage:w,sendCommitMessage:_,sendWorktreeMessage:g}}function v9({activeWorktreeId:e,setToolbarExportOpen:t,setWorktrees:r,lastNotifiedIdRef:n,attachmentSessionId:i,apiFetch:s,setMessages:a,messageIndex:o,commandIndex:l,setChoiceSelections:c,choicesKey:h,setCommandPanelOpen:u,setToolResultPanelOpen:m,llmProvider:v}){return{handleClearChat:x.useCallback(async()=>{if(t(!1),e!=="main"){if(r(_=>{const g=new Map(_),d=g.get(e);return d&&g.set(e,{...d,messages:[]}),g}),n.current=null,i)try{await s(`/api/v1/sessions/${encodeURIComponent(i)}/clear`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({worktreeId:e})})}catch{}return}if(a([]),o.clear(),l.clear(),c({}),h&&localStorage.removeItem(h),u({}),m({}),n.current=null,i)try{await s(`/api/v1/sessions/${encodeURIComponent(i)}/clear`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:v})})}catch{}},[e,s,i,h,l,v,o,c,u,a,m,t,r,n])}}const _9="Rename",y9="Stopped",w9="Annotations",b9={"Provider cannot be disabled: active sessions use it.":"Provider cannot be disabled: active sessions use it.","New file":"New file",Rename:_9,"File path":"File path","e.g. src/new-file.ts":"e.g. src/new-file.ts","Unable to rename.":"Unable to rename.","Unable to create file.":"Unable to create file.","Unable to delete.":"Unable to delete.","Renamed.":"Renamed.","File created.":"File created.","New folder":"New folder","Folder path":"Folder path","e.g. src/new-folder":"e.g. src/new-folder","Folder created.":"Folder created.","Unable to create folder.":"Unable to create folder.","Deleted.":"Deleted.",'Delete "{{path}}"? This action is irreversible.':'Delete "{{path}}"? This action is irreversible.',Stopped:y9,"New worktree":"New worktree","Worktree is stopped. Wake it up before sending a message.":"Worktree is stopped. Wake it up before sending a message.","Claude Code does not natively support forked sessions with directory changes. This feature is experimental.":"Claude Code does not natively support forked sessions with directory changes. This feature is experimental.","binary data":"binary data","Loading untracked files...":"Loading untracked files...","Unable to load file.":"Unable to load file.","User command : {{command}}":"User command : {{command}}","Toggle annotation mode":"Toggle annotation mode","Toggle annotation mode (EXPERIMENTAL)":"Toggle annotation mode (EXPERIMENTAL)","Annotation mode enabled.":"Annotation mode enabled.","Annotation mode disabled.":"Annotation mode disabled.","Usage: /annotation on|off":"Usage: /annotation on|off","Annotate line":"Annotate line",Annotations:w9,"Only sent with the next message.":"Only sent with the next message.","No annotations yet.":"No annotations yet.","Write annotation...":"Write annotation..."},S9="Tout",C9="api_key",k9="Assistant",x9="Pièces jointes",E9="auth_json_b64",A9="Revenir",L9="Backlog",P9="Annuler",T9="Claude",D9="Clear",I9="Cloner",N9="Fermer",R9="Codex",O9="Commande",M9="Commit",j9="Termine",B9="Connecte",F9="Continuer",z9="Copier",$9="Créer",U9="Creation",H9="Supprimer",W9="Diff",V9="Deconnecte",K9="Éditer",G9="Anglais",q9="Explorateur",Y9="Exporter",J9="FILE",X9="Formulaire",Q9="Français",Z9="Langue",eF="Lancer",tF="Logs",rF="Main",nF="Markdown",iF="Messages",sF="Modele",oF="Non",aF="Suivant",lF="Aucune",cF="Notifications",uF="Aperçu",fF="Precedent",hF="Provider",dF="Pret",pF="Reasoning",mF="Rafraichir",gF="Renommer",vF="Arrete",_F="Regenerer",yF="Reprendre",wF="Sauver",bF="Secret",SF="Envoyer",CF="Session",kF="Paramètres",xF="setup_token",EF="Stdin",AF="stdin",LF="Stdout",PF="stdout",TF="Stop",DF="Onglet",IF="Terminal",NF="Tool",RF="Annotations",OF="Utilisateur",MF="workspaceSecret",jF="Worktree",BF="Oui",FF={"-----BEGIN OPENSSH PRIVATE KEY-----":"-----BEGIN OPENSSH PRIVATE KEY-----","Access an existing space with your credentials":"Accedez a un espace existant avec vos identifiants","Add to backlog":"Ajouter au backlog","Add attachment":"Ajouter une pièce jointe","AI providers":"Providers IA","AI providers (required)":"Providers IA (obligatoire)","AI providers updated.":"Providers IA mis a jour.",All:S9,"All changes will be lost. What would you like to do?":"Toutes les modifications seront perdues. Que souhaitez-vous faire ?","Allow default internet access for this session.":"Autoriser l'accès internet par defaut pour cette session.","Allow sharing the Git folder for the main branch by default.":"Autoriser le partage du dossier Git pour la branche principale par defaut.",api_key:C9,"Applying changes...":"Application de modifications...",Assistant:k9,"Attached image":"Image jointe","Added to backlog.":"Ajouté au backlog.",Attachments:x9,"Auth {{provider}}":"Auth {{provider}}",auth_json_b64:E9,"Authentication failed.":"Echec de l'authentification.",Back:A9,"Back to previous view":"Revenir à la vue précédente",Backlog:L9,"Show backlog":"Afficher le backlog","Binary file not displayed.":"Fichier binaire non affiche.",Cancel:P9,"Chat history":"Historique du chat","Chat tools":"Outils du chat",Claude:T9,Clear:D9,Clone:I9,"Clone a repository to start a new session":"Cloner un depot pour demarrer une nouvelle session","Start a session":"Démarrer une session","Click here to learn more.":"Cliquez ici pour en savoir plus.","Cloning repository...":"Clonage du depot...",Close:N9,"Close panel":"Fermer le panneau","Close the worktree?":"Fermer le worktree ?",Codex:R9,"Codex (OpenAI)":"Codex (OpenAI)",Command:O9,"Command required.":"Commande requise.","Capture screenshot":"Capturer une capture d'ecran","Screenshot failed.":"Echec de la capture d'ecran.","Screenshot captured.":"Capture d'ecran ajoutee.","Git command required.":"Commande git requise.","Command: {{command}}":"Commande: {{command}}",Commit:M9,"Commit & Push":"Commit & Push",Completed:j9,"Configure AI providers":"Configurer les providers IA","Configure AI providers for this workspace.":"Configurez les providers IA pour ce workspace.","Configure the workspace":"Configurer le workspace",Connected:B9,"Connecting...":"Connexion...",Continue:F9,"Continue on mobile":"Continuer sur mobile",Copy:z9,"Copy code":"Copier le code","Copy workspace ID":"Copier le workspace ID","Copy workspace secret":"Copier le workspace secret",Create:$9,"Create a new space for you or your team":"Creez un nouvel espace pour vous ou votre equipe","Create a workspace":"Creer un workspace",Creating:U9,"Dark mode":"Mode sombre","Debug mode":"Mode débug","Default model":"Modele par defaut","Default reasoning":"Reasoning par defaut",Delete:H9,'Delete session "{{title}}"? This action is irreversible.':'Supprimer la session "{{title}}" ? Cette action est irreversible.',"Delete worktree":"Supprimer le worktree","Deleting...":"Suppression...",Diff:W9,Disconnected:V9,"e.g. refactor-auth":"ex: refactor-auth",Edit:K9,"Enable access to logs and Markdown/JSON export.":"Active l'accès aux logs et à l'export Markdown/JSON.","Enable the dark theme for the interface.":"Active le thème sombre pour l'interface.",English:G9,Error:"Erreur","Error during generation.":"Erreur lors de la generation.","Error during loading.":"Erreur lors du chargement.","Error: {{message}}":"Erreur: {{message}}","Execution in progress":"Execution en cours","Existing sessions":"Sessions existantes","Expires in {{seconds}}s":"Expire dans {{seconds}}s",Explorer:q9,Export:Y9,FILE:J9,"File truncated for display.":"Fichier tronque pour l'affichage.",Form:X9,French:Q9,"Full name":"Nom complet","Generating QR code...":"Generation du QR code...","Generating response...":"Generation de reponse...","Git authentication failed{{suffix}}.":"Echec d'authentification Git{{suffix}}.","Git identity for this repository":"Identité Git pour ce dépôt","Git repository not found{{suffix}}.":"Depot Git introuvable{{suffix}}.","git@gitea.devops:my-org/my-repo.git":"git@gitea.devops:mon-org/mon-repo.git","Global values: {{name}} / {{email}}.":"Valeurs globales: {{name}} / {{email}}.","In progress":"En cours","Internet access":"Internet access","Internet access enabled":"Accès internet activé","Invalid resume token.":"Token de reprise invalide.","Invalid workspace token. Please sign in again.":"Token workspace invalide. Merci de vous reconnecter.","Join a workspace":"Rejoindre un workspace",JSON:"JSON","JSON credentials":"JSON credentials","JSON-RPC":"JSON-RPC","Key or token":"Cle ou token","Key required for {{provider}}.":"Cle requise pour {{provider}}.",Language:Z9,"Last activity: {{date}}":"Derniere activite: {{date}}",Launch:eF,"Leave session":"Quitter la session","Leave workspace":"Quitter le workspace","List truncated after {{count}} entries.":"Liste tronquee apres {{count}} entrees.","Loading sessions...":"Chargement des sessions...","Loading...":"Chargement...",Logs:tF,Main:rF,Markdown:nF,"Merge into {{branch}}":"Merge vers {{branch}}",Messages:iF,Model:sF,"Name (optional)":"Nom (optionnel)","Name and email required.":"Nom et email requis.","New message":"Nouveau message","New file":"Nouveau fichier","New folder":"Nouveau dossier","New worktree":"Nouveau worktree","New session":"Nouvelle session",No:oF,"No changes detected.":"Aucun changement detecte.","No file found.":"Aucun fichier trouve.","No file selected":"Aucun fichier selectionne","binary data":"données binaires","Loading untracked files...":"Chargement des fichiers non suivis...","Unable to load file.":"Impossible de charger le fichier.","Claude Code does not natively support forked sessions with directory changes. This feature is experimental.":"Claude Code ne supporte pas nativement les sessions forkées avec changement de répertoire, cette feature est expérimentale.","No logs yet.":"Aucun log pour le moment.","No options":"Aucune option","No options.":"Aucune option.","No pending tasks at the moment.":"Aucune tâche en attente pour le moment.","No repository-specific values.":"Aucune valeur spécifique au dépôt.","No sessions available.":"Aucune session disponible.","No commands found.":"Aucune commande trouvée.",Next:aF,"No tasks":"Aucune tâche",None:lF,"Not set":"Non défini",Notifications:cF,"Open form":"Ouvrir le formulaire","Open path":"Ouvrir un chemin","Open settings":"Ouvrir les paramètres","Open diff view":"Ouvrir la vue diff","Run shell command":"Executer une commande shell","Run git command":"Executer une commande git","OpenAI authentication failed.":"Echec de l'authentification OpenAI.","Password or PAT":"Mot de passe ou PAT","Path required.":"Le chemin est requis.","Path not found.":"Chemin introuvable.",Preview:uF,"Private SSH key (not recommended)":"Cle SSH privee (non recommande)",Previous:fF,"Processing...":"Traitement en cours...","Provide user.name and user.email for repository commits.":"Renseignez user.name et user.email pour les commits du dépôt.",Provider:hF,"QR code":"QR code","QR code expired":"QR code expire","QR code unavailable.":"QR code indisponible.",Ready:dF,Reasoning:pF,"Reasoning...":"Raisonnement...",Refresh:mF,Rename:gF,"Renamed.":"Renomme.",Stopped:vF,Regenerate:_F,"Remove {{label}}":"Retirer {{label}}","Repository authentication (optional)":"Authentification depot (optionnelle)","Repository diff":"Diff du repository","Repository Git identity updated.":"Identité Git du dépôt mise à jour.","Repository values: {{name}} / {{email}}.":"Valeurs du dépôt: {{name}} / {{email}}.",Resume:yF,"Resume an already configured worktree":"Reprendre un worktree deja configure","Resume an existing session":"Reprendre une session existante","Resume on mobile":"Reprendre sur mobile",Save:wF,"Saving...":"Sauvegarde...","Scan this QR code in the Android app to resume the current session.":"Scannez ce QR code dans l'application Android pour reprendre la session en cours.",Secret:bF,"Select a branch":"Selectionner une branche","Select a file in the tree.":"Selectionnez un fichier dans l'arborescence.","File path":"Chemin du fichier","Folder path":"Chemin du dossier","e.g. src/new-file.ts":"ex: src/nouveau-fichier.ts","e.g. src/new-folder":"ex: src/nouveau-dossier","Select a language":"Selectionner une langue","Select a valid remote branch.":"Selectionnez une branche distante valide.","Select an existing workspace or create a new one.":"Selectionnez un workspace existant ou creez-en un nouveau.","Select at least one provider.":"Selectionnez au moins un provider.","Selected attachments":"Pièces sélectionnées",Send:SF,"Send 'Commit & Push' in chat":"Envoyer 'Commit & Push' dans le chat","Send 'Commit' in chat":"Envoyer 'Commit' dans le chat","Send a message to start a session.":"Envoyez un message pour demarrer une session.",Session:CF,'Session "{{title}}" deleted.':'Session "{{title}}" supprimee.',"Session name (optional)":"Nom de la session (optionnel)","Session not found.":"Session introuvable.",Settings:kF,setup_token:xF,"Deny git credentials access":"Refuser l'accès aux identifiants Git","Provider cannot be disabled: active sessions use it.":"Impossible de désactiver ce provider : des sessions l'utilisent.","Show a notification and sound when a new message arrives.":"Affiche une notification et un son quand un nouveau message arrive.","Show commands in chat":"Afficher les commandes dans le chat","Show executed command blocks in the conversation.":"Affiche les blocs de commandes exécutées dans la conversation.","Show tool results in chat":"Afficher les tool results dans le chat","Show tool_result blocks in the conversation.":"Affiche les blocs tool_result dans la conversation.","Source branch":"Branche source","Start a session to open the terminal.":"Demarrez une session pour ouvrir le terminal.",Stdin:EF,stdin:AF,Stdout:LF,stdout:PF,Stop:TF,"Switching to {{provider}}...":"Basculement vers {{provider}}...",Tab:DF,Terminal:IF,"The key is stored in ~/.ssh for cloning.":"La cle est stockee dans ~/.ssh pour le clonage.","The password can be replaced by a PAT.":"Le mot de passe peut etre remplace par un PAT.","These settings are stored in your browser.":"Ces réglages sont stockés dans votre navigateur.","Vibe80 can run Codex or Claude Code. To continue, provide your Anthropic and/or OpenAI credentials. If you use pay-as-you-go billing, supply an API key.":"Vibe80 peut piloter Codex ou Claude Code. Pour continuer, fournissez vos identifiants Anthropic et/ou OpenAI. Si vous utilisez une facturation a l'usage, fournissez une API key.","For subscription plans, use auth.json from the Codex CLI login (ChatGPT) or a long-lived token from `claude setup-token` (Claude).":"Pour les abonnements, utilisez auth.json apres login Codex en CLI (ChatGPT) ou un token longue duree via `claude setup-token` (Claude).","Vibe80 opens Git-based work sessions. Even in a secure environment, we recommend short-lived and revocable PATs or keys.":"Vibe80 ouvre des sessions de travail basees sur des depots Git. Meme dans un environnement securise, nous recommandons des jetons PAT/cles ephemeres et revocables.","Vibe80 strictly controls access to resources (Git credentials and internet) using sandboxing. ":"Vibe80 controle strictement l'acces aux ressources (identifiants Git et internet) via le sandboxing. ","A workspace is an isolated, secured environment accessible only with credentials. It lets you reuse AI credentials for all future sessions.":"Un workspace est un espace isole et securise, accessible uniquement avec des identifiants. Il permet de reutiliser vos identifiants IA pour toutes vos futures sessions.","You can create multiple workspaces to separate teams, projects, or security boundaries.":"Vous pouvez creer plusieurs workspaces pour separer equipes, projets ou perimetres de securite.",Tool:NF,"Tool result":"Tool result","Tool: {{tool}}":"Outil: {{tool}}","User command : {{command}}":"Commande utilisateur : {{command}}","Toggle annotation mode":"Activer le mode annotation","Toggle annotation mode (EXPERIMENTAL)":"Activer le mode annotation (EXPERIMENTAL)","Annotation mode enabled.":"Mode annotation activé.","Annotation mode disabled.":"Mode annotation désactivé.","Usage: /annotation on|off":"Usage : /annotation on|off","Annotate line":"Annoter la ligne",Annotations:RF,"Only sent with the next message.":"Envoyées uniquement avec le prochain message.","No annotations yet.":"Pas encore d'annotations.","Write annotation...":"Écrire une annotation...","Todo text required.":"Texte de la todo requis.","Unable to change branch.":"Impossible de changer de branche.","Unable to create the attachment session (HTTP {{status}}{{statusText}}){{suffix}}.":"Impossible de creer la session de pieces jointes (HTTP {{status}}{{statusText}}){{suffix}}.","Unable to create the attachment session.":"Impossible de creer la session de pieces jointes.","Unable to delete the session.":"Impossible de supprimer la session.","Unable to delete the session{{suffix}}.":"Impossible de supprimer la session{{suffix}}.","Unable to generate the QR code.":"Impossible de generer le QR code.","Unable to load branches.":"Impossible de charger les branches.","Unable to load Git identity.":"Impossible de charger l'identité Git.","Unable to load Git status.":"Impossible de charger le statut Git.","Unable to load models.":"Impossible de charger les modeles.","Unable to load sessions.":"Impossible de charger les sessions.","Unable to load the commit.":"Impossible de charger le commit.","Unable to load the explorer.":"Impossible de charger l'explorateur.","Unable to load the file.":"Impossible de charger le fichier.","Unable to load tree.":"Impossible de charger l'arborescence.","Unable to load the latest commit.":"Impossible de charger le dernier commit.","Unable to resume the session.":"Impossible de reprendre la session.","Unable to rename.":"Impossible de renommer.","Unable to delete.":"Impossible de supprimer.","Unable to save the file.":"Impossible d'enregistrer le fichier.","Unable to create file.":"Impossible de creer le fichier.","Unable to create folder.":"Impossible de creer le dossier.","Unable to upload attachments.":"Impossible d'uploader les pieces jointes.","Unable to update backlog.":"Impossible de mettre à jour le backlog.","Unexpected error":"Erreur inattendue","Update failed.":"Echec de la mise à jour.","Usage limit reached. Please try again later.":"Limite d'usage atteinte. Merci de reessayer plus tard.","User settings":"Paramètres utilisateur","user.email":"user.email","user.name":"user.name",Username:OF,"Username + password":"Identifiant + mot de passe","Username and password required.":"Identifiant et mot de passe requis.","Validating...":"Validation...","View previous messages ({{count}})":"Voir les messages precedents ({{count}})","Workspace configuration failed.":"Echec de la configuration du workspace.","Workspace created":"Workspace cree","Workspace created hint":"Votre workspace a ete cree avec succes. Gardez ces identifiants scrupuleusement pour un futur acces.","Workspace creation failed.":"Echec de creation du workspace.","Workspace ID":"Workspace ID","Workspace ID and secret are required.":"Workspace ID et secret requis.","Workspace ID required.":"Workspace ID requis.","Workspace Secret":"Workspace Secret","Workspace update failed.":"Echec de mise a jour du workspace.","workspaceId (e.g. w...)":"workspaceId (ex: w...)",workspaceSecret:MF,Worktree:jF,"Worktree diff":"Diff du worktree","Worktree is stopped. Wake it up before sending a message.":"Le worktree est arrete. Relancez-le avant d'envoyer un message.","File created.":"Fichier cree.","Folder created.":"Dossier cree.","Deleted.":"Supprime.",'Delete "{{path}}"? This action is irreversible.':'Supprimer "{{path}}" ? Cette action est irreversible.',"Write your message…":"Écris ton message…",Yes:BF,"You have unsaved changes. Continue without saving?":"Vous avez des modifications non sauvegardees. Continuer sans sauvegarder ?","your.email@example.com":"ton.email@exemple.com","{{count}} attachment(s)":"{{count}} pièce(s) jointe(s)","{{count}} B":"{{count}} o","{{count}} files modified":"{{count}} fichiers modifies","{{count}} item(s)":"{{count}} élément(s)","{{count}} KB":"{{count}} Ko","{{count}} lines":"{{count}} lignes","{{count}} MB":"{{count}} Mo"},PC="uiLanguage",zF={en:b9||{},fr:FF||{}},$F=()=>{try{const e=localStorage.getItem(PC);if(e==="fr"||e==="en")return e}catch{}return"en"},UF=(e,t)=>t?e.replace(/\{\{(\w+)\}\}/g,(r,n)=>Object.prototype.hasOwnProperty.call(t,n)?String(t[n]):r):e,TC=(e,t,r)=>{const i=(zF[e]||{})[t]||t;return UF(i,r)},DC=x.createContext({language:"en",setLanguage:()=>{},t:(e,t)=>TC("en",e,t),locale:"en-US"}),HF=({children:e})=>{const[t,r]=x.useState($F);x.useEffect(()=>{try{localStorage.setItem(PC,t)}catch{}},[t]);const n=t==="fr"?"fr-FR":"en-US",i=x.useCallback((a,o)=>TC(t,a,o),[t]),s=x.useMemo(()=>({language:t,setLanguage:r,t:i,locale:n}),[t,i,n]);return E.jsx(DC.Provider,{value:s,children:e})},IC=()=>x.useContext(DC),W1={creating:KD,ready:k_,processing:GD,stopped:k_,completed:fd,error:si},V1={creating:"#9ca3af",ready:"#10b981",processing:"#f59e0b",stopped:"#ef4444",completed:"#3b82f6",error:"#ef4444"};function WF({worktrees:e,activeWorktreeId:t,onSelect:r,onCreate:n,onClose:i,onRename:s,provider:a,providers:o,branches:l,defaultBranch:c,branchLoading:h,branchError:u,defaultInternetAccess:m,defaultDenyGitCredentialsAccess:v,deploymentMode:w,onRefreshBranches:_,providerModelState:g,onRequestProviderModels:d,disabled:f,isMobile:p}){var _e,De;const{t:y}=IC(),[S,b]=x.useState(!1),[k,C]=x.useState(null),[A,P]=x.useState(""),[O,R]=x.useState(""),[M,z]=x.useState(""),U=x.useMemo(()=>Array.isArray(o)&&o.length?o:[a||"codex"],[o,a]),[q,Q]=x.useState(U[0]),[H,I]=x.useState("new"),[L,B]=x.useState("main"),[D,T]=x.useState(""),[$,Y]=x.useState(""),[W,j]=x.useState(!!m),[N,G]=x.useState(typeof v=="boolean"?v:!0),V=x.useMemo(()=>({creating:y("Creating"),ready:y("Ready"),processing:y("In progress"),stopped:y("Stopped"),completed:y("Completed"),error:y("Error")}),[y]),X=x.useRef(null),ne=x.useRef(null);x.useEffect(()=>{k&&X.current&&(X.current.focus(),X.current.select())},[k]),x.useEffect(()=>{S&&ne.current&&ne.current.focus()},[S]),x.useEffect(()=>{if(S&&(j(!!m),G(typeof v=="boolean"?v:!0),M||z(c||""),!(l!=null&&l.length)&&_&&!h&&_(),H==="new"&&d)){const ee=(g==null?void 0:g[q])||{};!ee.loading&&!(ee.models||[]).length&&d(q)}},[S,M,c,l,m,v,_,h,H,q,d]),x.useEffect(()=>{U.includes(q)||Q(U[0])},[U,q]),x.useEffect(()=>{if(H==="new"&&d){const ee=(g==null?void 0:g[q])||{};!ee.loading&&!(ee.models||[]).length&&d(q)}H==="new"&&(T(""),Y(""))},[H,q,d]);const ue=(g==null?void 0:g[q])||{},ve=Array.isArray(ue.models)?ue.models:[],le=x.useMemo(()=>Array.isArray(l)?l.map(ee=>ee.trim()).filter(Boolean):[],[l]),Se=(M||c||"").trim(),ye=!!Se&&le.includes(Se),Me=x.useMemo(()=>ve.find(ee=>ee.isDefault)||null,[ve]),Ne=x.useMemo(()=>ve.find(ee=>ee.model===D)||null,[ve,D]),Ue=H==="new"&&q==="codex"&&(((_e=Ne==null?void 0:Ne.supportedReasoningEfforts)==null?void 0:_e.length)||0)>0;x.useEffect(()=>{H==="new"&&(!D&&(Me!=null&&Me.model)&&T(Me.model),q==="codex"&&!$&&(Me!=null&&Me.defaultReasoningEffort)&&Y(Me.defaultReasoningEffort),q!=="codex"&&$&&Y(""))},[H,q,D,$,Me]),x.useEffect(()=>{var Ae;if(H!=="new"||q!=="codex"){$&&Y("");return}if(!((Ae=Ne==null?void 0:Ne.supportedReasoningEfforts)!=null&&Ae.length)){$&&Y("");return}!Ne.supportedReasoningEfforts.some(Ie=>Ie.reasoningEffort===$)&&$&&Y("")},[H,q,Ne,$]);const Ke=()=>{n&&n({context:H,name:O.trim()||null,provider:q,sourceWorktree:H==="fork"?L:null,startingBranch:Se||null,model:H==="new"&&D||null,reasoningEffort:H==="new"&&$||null,internetAccess:W,denyGitCredentialsAccess:N}),R(""),I("new"),Q(U[0]),B("main"),z(c||""),T(""),Y(""),j(!!m),G(typeof v=="boolean"?v:!0),b(!1)},Ye=ee=>{C(ee.id),P(ee.name)},Ee=()=>{k&&A.trim()&&s&&s(k,A.trim()),C(null),P("")},je=ee=>{ee.key==="Enter"?Ee():ee.key==="Escape"&&(C(null),P(""))},Ce=ee=>{ee.key==="Enter"?Ke():ee.key==="Escape"&&b(!1)},Z=(Array.isArray(e)?e:Array.from(((De=e==null?void 0:e.values)==null?void 0:De.call(e))||[])).slice().sort((ee,Ae)=>{if((ee==null?void 0:ee.id)==="main"&&(Ae==null?void 0:Ae.id)!=="main")return-1;if((Ae==null?void 0:Ae.id)==="main"&&(ee==null?void 0:ee.id)!=="main")return 1;const Ie=ee!=null&&ee.createdAt?new Date(ee.createdAt).getTime():0,St=Ae!=null&&Ae.createdAt?new Date(Ae.createdAt).getTime():0;return Ie-St}),se=Z.map(ee=>({id:ee.id,label:ee.id==="main"?"main":ee.name||ee.branchName||ee.id,provider:ee.provider||ee.id==="main"&&a||null})),we=se.find(ee=>ee.id===L),F=H==="fork"&&(we==null?void 0:we.provider)==="claude";return x.useEffect(()=>{var Ae;if(!se.length)return;if(!se.some(Ie=>Ie.id===L)){const Ie=((Ae=se.find(St=>St.id==="main"))==null?void 0:Ae.id)||se[0].id;B(Ie)}},[L,se]),E.jsxs("div",{className:"worktree-tabs-container",children:[E.jsx("div",{className:"worktree-tabs",children:p?E.jsxs("div",{className:"worktree-tabs-select",children:[E.jsx("select",{className:"worktree-select",value:t,onChange:ee=>!f&&(r==null?void 0:r(ee.target.value)),"aria-label":y("Select a branch"),disabled:f,children:Z.map(ee=>E.jsx("option",{value:ee.id,children:ee.name},ee.id))}),E.jsx("button",{className:"worktree-tab-add",onClick:()=>b(!0),disabled:f||Z.length>=10,title:y("New worktree"),"aria-label":y("New worktree"),children:E.jsx(Be,{icon:bc})})]}):E.jsxs(E.Fragment,{children:[Z.map(ee=>E.jsxs("div",{className:`worktree-tab ${t===ee.id?"active":""}`,onClick:()=>!f&&(r==null?void 0:r(ee.id)),style:{"--tab-accent":ee.color||"#3b82f6"},children:[E.jsx("span",{className:`worktree-status ${ee.status==="processing"?"pulse":""}`,style:{color:V1[ee.status]||V1.ready},title:V[ee.status]||ee.status,children:E.jsx(Be,{icon:W1[ee.status]||W1.ready})}),k===ee.id&&ee.id!=="main"?E.jsx("input",{ref:X,className:"worktree-tab-edit",value:A,onChange:Ae=>P(Ae.target.value),onBlur:Ee,onKeyDown:je,onClick:Ae=>Ae.stopPropagation()}):E.jsx("span",{className:"worktree-tab-name",onDoubleClick:Ae=>{Ae.stopPropagation(),ee.id!=="main"&&Ye(ee)},title:ee.id==="main"?ee.name:`${ee.name||ee.branchName} (${ee.branchName||"main"})`,children:ee.id==="main"?ee.name:ee.name||ee.branchName}),ee.id!=="main"&&E.jsx("button",{className:"worktree-tab-close",onClick:Ae=>{Ae.stopPropagation(),i==null||i(ee.id)},title:y("Close"),children:E.jsx(Be,{icon:si})})]},ee.id)),E.jsx("button",{className:"worktree-tab-add",onClick:()=>b(!0),disabled:f||Z.length>=10,title:y("New worktree"),children:E.jsx(Be,{icon:bc})})]})}),S&&E.jsx("div",{className:"worktree-create-dialog-overlay",onClick:()=>b(!1),children:E.jsxs("div",{className:"worktree-create-dialog",onClick:ee=>ee.stopPropagation(),children:[E.jsx("h3",{children:y("New worktree")}),E.jsxs("div",{className:"worktree-create-grid",children:[E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:y("Name (optional)")}),E.jsx("input",{ref:ne,type:"text",placeholder:y("e.g. refactor-auth"),value:O,onChange:ee=>R(ee.target.value),onKeyDown:Ce})]}),E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:y("Source branch")}),E.jsx("input",{type:"text",list:"worktree-branch-options",placeholder:c||"main",value:M,onChange:ee=>z(ee.target.value),onKeyDown:Ce}),E.jsx("datalist",{id:"worktree-branch-options",children:le.map(ee=>E.jsx("option",{value:ee},ee))}),!ye&&E.jsx("div",{className:"worktree-field-error",children:y("Select a valid remote branch.")}),u&&E.jsx("div",{className:"worktree-field-error",children:u})]}),E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:y("Context")}),E.jsxs("select",{value:H,onChange:ee=>I(ee.target.value==="fork"?"fork":"new"),children:[E.jsx("option",{value:"new",children:y("New")}),E.jsx("option",{value:"fork",children:y("Fork")})]})]}),H==="new"?E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:y("Provider")}),E.jsxs("select",{value:q,onChange:ee=>Q(ee.target.value),disabled:U.length<=1,children:[U.includes("codex")&&E.jsx("option",{value:"codex",children:y("Codex (OpenAI)")}),U.includes("claude")&&E.jsx("option",{value:"claude",children:y("Claude")})]})]}):E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:y("Source worktree")}),E.jsx("select",{value:L,onChange:ee=>B(ee.target.value||"main"),children:se.map(ee=>E.jsx("option",{value:ee.id,children:ee.label},ee.id))})]}),F&&E.jsx("div",{className:"worktree-create-field is-full",children:E.jsx("div",{className:"worktree-warning-bubble",children:y("Claude Code does not natively support forked sessions with directory changes. This feature is experimental.")})}),H==="new"&&(q==="codex"||q==="claude")&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:`worktree-create-field ${Ue?"":"is-full"}`,children:[E.jsx("label",{children:y("Model")}),E.jsxs("select",{value:D,onChange:ee=>T(ee.target.value),disabled:ue.loading||ve.length===0,children:[E.jsx("option",{value:"",children:y("Default model")}),ve.map(ee=>E.jsx("option",{value:ee.model,children:ee.displayName||ee.model},ee.id))]}),ue.error&&E.jsx("div",{className:"worktree-field-error",children:ue.error})]}),Ue&&E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:y("Reasoning")}),E.jsxs("select",{value:$,onChange:ee=>Y(ee.target.value),disabled:ue.loading||!Ne,children:[E.jsx("option",{value:"",children:y("Default reasoning")}),((Ne==null?void 0:Ne.supportedReasoningEfforts)||[]).map(ee=>E.jsx("option",{value:ee.reasoningEffort,children:ee.reasoningEffort},ee.reasoningEffort))]})]})]}),E.jsx("div",{className:"worktree-create-field worktree-toggle-field",children:E.jsxs("label",{className:"worktree-toggle",children:[E.jsx("input",{type:"checkbox",checked:W,onChange:ee=>{const Ae=ee.target.checked;j(Ae),Ae||G(!1)}}),E.jsx("span",{children:y("Internet access")})]})}),W&&w!=="mono_user"&&E.jsx("div",{className:"worktree-create-field worktree-toggle-field",children:E.jsxs("label",{className:"worktree-toggle",children:[E.jsx("input",{type:"checkbox",checked:N,onChange:ee=>G(ee.target.checked)}),E.jsx("span",{children:y("Deny git credentials access")})]})})]}),E.jsxs("div",{className:"worktree-create-actions",children:[E.jsx("button",{className:"worktree-btn-cancel",onClick:()=>b(!1),children:y("Cancel")}),E.jsx("button",{className:"worktree-btn-create",onClick:Ke,disabled:!ye||H==="fork"&&!L,children:y("Create")})]})]})})]})}function VF({t:e,brandLogo:t,allTabs:r,activeWorktreeId:n,handleSelectWorktree:i,createWorktree:s,openCloseConfirm:a,renameWorktreeHandler:o,llmProvider:l,availableProviders:c,branches:h,defaultBranch:u,currentBranch:m,branchLoading:v,branchError:w,defaultInternetAccess:_,defaultDenyGitCredentialsAccess:g,deploymentMode:d,loadBranches:f,providerModelState:p,loadProviderModels:y,connected:S,isMobileLayout:b,requestHandoffQr:k,attachmentSession:C,handoffLoading:A,handleOpenSettings:P,handleLeaveSession:O}){return E.jsxs("header",{className:"header",children:[E.jsxs("div",{className:"topbar-left",children:[E.jsx("div",{className:"topbar-spacer"}),E.jsx("div",{className:"topbar-brand",children:E.jsx("img",{className:"brand-logo",src:t,alt:"vibe80"})}),E.jsx("div",{className:"topbar-tabs",children:E.jsx(WF,{worktrees:r,activeWorktreeId:n,onSelect:i,onCreate:s,onClose:a,onRename:o,provider:l,providers:c.length?c:[l],branches:h,defaultBranch:u||m,branchLoading:v,branchError:w,defaultInternetAccess:_,defaultDenyGitCredentialsAccess:g,deploymentMode:d,onRefreshBranches:f,providerModelState:p,onRequestProviderModels:y,disabled:!S,isMobile:b})})]}),E.jsxs("div",{className:"topbar-right",children:[E.jsx("button",{type:"button",className:"icon-button","aria-label":e("Resume on mobile"),title:e("Resume on mobile"),onClick:k,disabled:!(C!=null&&C.sessionId)||A,children:E.jsx(Be,{icon:s6})}),E.jsx("button",{type:"button",className:"icon-button","aria-label":e("Open settings"),onClick:P,children:E.jsx(Be,{icon:Rb})}),E.jsx("button",{type:"button",className:"icon-button","aria-label":e("Leave session"),onClick:O,children:E.jsx(Be,{icon:Ob})})]})]})}function KF({t:e,brandLogo:t,showStep1:r,showStep2:n,showStep3:i,showStep4:s,showMonoLoginRequired:a,headerHint:o,workspaceMode:l,setWorkspaceMode:c,formDisabled:h,handleWorkspaceSubmit:u,workspaceIdInput:m,setWorkspaceIdInput:v,workspaceSecretInput:w,setWorkspaceSecretInput:_,workspaceError:g,handleWorkspaceProvidersSubmit:d,workspaceProvider:f,workspaceAuthExpanded:p,setWorkspaceAuthExpanded:y,setWorkspaceProviders:S,providerAuthOptions:b,getProviderAuthType:k,workspaceAuthFiles:C,setWorkspaceAuthFiles:A,sessionMode:P,setSessionMode:O,setSessionRequested:R,setAttachmentsError:M,loadWorkspaceSessions:z,deploymentMode:U,handleLeaveWorkspace:q,workspaceSessionsLoading:Q,workspaceSessions:H,workspaceSessionsError:I,workspaceSessionDeletingId:L,handleResumeSession:B,handleDeleteSession:D,locale:T,extractRepoName:$,getTruncatedText:Y,isCloning:W,repoDisplay:j,onRepoSubmit:N,sessionNameInput:G,setSessionNameInput:V,repoInput:X,setRepoInput:ne,repoHistory:ue,authMode:ve,setAuthMode:le,sshKeyInput:Se,setSshKeyInput:ye,httpUsername:Me,setHttpUsername:Ne,httpPassword:Ue,setHttpPassword:Ke,defaultInternetAccess:Ye,setDefaultInternetAccess:Ee,defaultDenyGitCredentialsAccess:je,setDefaultDenyGitCredentialsAccess:Ce,attachmentsError:Z,sessionRequested:se,workspaceBusy:we,workspaceProvidersEditing:F,providersBackStep:_e,setWorkspaceStep:De,setWorkspaceProvidersEditing:ee,setWorkspaceError:Ae,setProvidersBackStep:Ie,loadWorkspaceProviders:St,workspaceCreated:ce,workspaceId:he,workspaceCopied:J,handleWorkspaceCopy:K,infoContent:te,toast:ie}){var ae;return E.jsxs("div",{className:"session-gate session-fullscreen",children:[E.jsxs("div",{className:"session-layout session-layout--fullscreen",children:[E.jsxs("div",{className:"session-shell",children:[E.jsxs("div",{className:"session-header",children:[E.jsx("img",{className:"brand-logo",src:t,alt:"vibe80"}),E.jsx("h1",{children:e(a?"Login required":s?"Start a session":i?"Workspace created":n?"Configure AI providers":"Configure the workspace")}),o?E.jsx("p",{className:"session-hint",children:o}):null]}),E.jsxs("div",{className:"session-body",children:[r&&E.jsxs(E.Fragment,{children:[E.jsxs("form",{id:"workspace-form",className:"session-form",onSubmit:u,children:[E.jsxs("div",{className:"session-workspace-options",children:[E.jsxs("button",{type:"button",className:`session-workspace-option ${l==="existing"?"is-selected":""}`,onClick:()=>c("existing"),disabled:h,"aria-pressed":l==="existing",children:[E.jsx("span",{className:"session-workspace-icon is-join","aria-hidden":"true",children:E.jsx(Be,{icon:x_})}),E.jsxs("span",{className:"session-workspace-option-text",children:[E.jsx("span",{className:"session-workspace-option-title",children:e("Join a workspace")}),E.jsx("span",{className:"session-workspace-option-subtitle",children:e("Access an existing space with your credentials")})]})]}),E.jsxs("button",{type:"button",className:`session-workspace-option ${l==="new"?"is-selected":""}`,onClick:()=>c("new"),disabled:h,"aria-pressed":l==="new",children:[E.jsx("span",{className:"session-workspace-icon is-create","aria-hidden":"true",children:E.jsx(Be,{icon:bc})}),E.jsxs("span",{className:"session-workspace-option-text",children:[E.jsx("span",{className:"session-workspace-option-title",children:e("Create a workspace")}),E.jsx("span",{className:"session-workspace-option-subtitle",children:e("Create a new space for you or your team")})]})]})]}),E.jsx("div",{className:`session-panel ${l==="existing"?"is-visible":"is-hidden"}`,"aria-hidden":l!=="existing",children:E.jsxs("div",{className:"session-workspace-form",children:[E.jsxs("div",{className:"session-workspace-form-labels",children:[E.jsx("span",{children:e("Workspace ID")}),E.jsx("span",{children:e("Secret")})]}),E.jsxs("div",{className:"session-workspace-form-grid",children:[E.jsx("input",{type:"text",placeholder:e("workspaceId (e.g. w...)"),value:m,onChange:oe=>v(oe.target.value),disabled:h,spellCheck:!1}),E.jsx("input",{type:"password",placeholder:e("workspaceSecret"),value:w,onChange:oe=>_(oe.target.value),disabled:h,autoComplete:"off"})]})]})})]}),g&&E.jsx("div",{className:"attachments-error",children:g})]}),n&&E.jsxs(E.Fragment,{children:[E.jsx("form",{id:"providers-form",className:"session-form",onSubmit:d,children:E.jsx("div",{className:"session-auth-options session-auth-accordion",children:["codex","claude"].map(oe=>{const ge=f(oe),Ge=e(oe==="codex"?"Codex":"Claude"),We=!!p[oe],Je=!!ge.enabled,xt=F&&Array.isArray(H)&&H.some(Xe=>(Array.isArray(Xe.providers)&&Xe.providers.length?Xe.providers:Xe.activeProvider?[Xe.activeProvider]:[]).includes(oe)),xi=h||xt&&Je;return E.jsxs("div",{className:"session-auth-card",children:[E.jsx("div",{className:"session-auth-header",children:E.jsxs("label",{className:"session-auth-option",children:[E.jsx("input",{type:"checkbox",checked:Je,onChange:()=>{if(xt&&Je)return;const Xe=!Je;y(Et=>({...Et,[oe]:Xe})),S(Et=>({...Et,[oe]:{...Et[oe],enabled:Xe}}))},disabled:xi,title:xt&&Je?e("Provider cannot be disabled: active sessions use it."):void 0}),Ge]})}),Je&&We?E.jsxs("div",{className:"session-auth-grid",children:[E.jsx("select",{value:k(oe,ge),onChange:Xe=>S(Et=>({...Et,[oe]:{...Et[oe],authType:Xe.target.value,authValue:""}})),disabled:h,children:(b[oe]||[]).map(Xe=>E.jsx("option",{value:Xe,children:e(Xe)},Xe))}),k(oe,ge)==="auth_json_b64"?E.jsxs("div",{className:"session-auth-file",children:[E.jsx("input",{type:"file",accept:"application/json,.json",onChange:async Xe=>{var Ls;const Et=(Ls=Xe.target.files)==null?void 0:Ls[0];if(!Et)return;const Hr=await Et.text();S(_r=>({..._r,[oe]:{..._r[oe],authValue:Hr}})),A(_r=>({..._r,[oe]:Et.name})),Xe.target.value=""},disabled:h}),C[oe]?E.jsx("span",{className:"session-auth-file-name",children:C[oe]}):null]}):E.jsx("input",{type:"password",placeholder:e("Key or token"),value:ge.authValue,onChange:Xe=>S(Et=>({...Et,[oe]:{...Et[oe],authValue:Xe.target.value}})),disabled:h,autoComplete:"off"})]}):null]},oe)})})}),g&&E.jsx("div",{className:"attachments-error",children:g})]}),i&&E.jsx(E.Fragment,{children:E.jsxs("div",{className:"workspace-created-card",children:[E.jsxs("div",{className:"workspace-created-row",children:[E.jsx("span",{className:"workspace-created-label",children:e("Workspace ID")}),E.jsx("span",{className:"workspace-created-value",children:(ce==null?void 0:ce.workspaceId)||he}),E.jsx("button",{type:"button",className:"workspace-created-copy",onClick:()=>K("id",(ce==null?void 0:ce.workspaceId)||he||""),"aria-label":e("Copy workspace ID"),children:E.jsx(Be,{icon:J.id?fd:hd})})]}),E.jsxs("div",{className:"workspace-created-row",children:[E.jsx("span",{className:"workspace-created-label",children:e("Workspace Secret")}),E.jsx("span",{className:"workspace-created-value",children:(ce==null?void 0:ce.workspaceSecret)||""}),E.jsx("button",{type:"button",className:"workspace-created-copy",onClick:()=>K("secret",(ce==null?void 0:ce.workspaceSecret)||""),"aria-label":e("Copy workspace secret"),children:E.jsx(Be,{icon:J.secret?fd:hd})})]})]})}),s&&E.jsxs("div",{className:"session-step",children:[E.jsxs("div",{className:"session-workspace-toggle",children:[E.jsxs("button",{type:"button",className:`session-workspace-option is-compact ${P==="new"?"is-selected":""}`,onClick:()=>{O("new"),R(!1),M("")},disabled:h,"aria-pressed":P==="new",children:[E.jsx("span",{className:"session-workspace-icon is-create","aria-hidden":"true",children:E.jsx(Be,{icon:bc})}),E.jsx("span",{className:"session-workspace-option-title",children:e("New session")})]}),E.jsxs("button",{type:"button",className:`session-workspace-option is-compact ${P==="existing"?"is-selected":""}`,onClick:()=>{O("existing"),R(!1),M(""),z()},disabled:h,"aria-pressed":P==="existing",children:[E.jsx("span",{className:"session-workspace-icon is-join","aria-hidden":"true",children:E.jsx(Be,{icon:x_})}),E.jsx("span",{className:"session-workspace-option-title",children:e("Resume an existing session")})]}),U!=="mono_user"&&E.jsxs("button",{type:"button",className:"session-workspace-option is-compact",onClick:q,children:[E.jsx("span",{className:"session-workspace-icon is-leave","aria-hidden":"true",children:E.jsx(Be,{icon:Ob})}),E.jsx("span",{className:"session-workspace-option-title",children:e("Leave workspace")})]})]}),E.jsx("div",{className:`session-panel ${P==="existing"?"is-visible":"is-hidden"}`,"aria-hidden":P!=="existing",children:E.jsxs("div",{className:"session-auth",children:[E.jsx("div",{className:"session-auth-title",children:e("Existing sessions")}),Q?E.jsx("div",{className:"session-auth-hint",children:e("Loading sessions...")}):H.length===0?E.jsx("div",{className:"session-auth-hint",children:e("No sessions available.")}):E.jsx("ul",{className:"session-list",children:H.map(oe=>{const ge=$(oe.repoUrl),Ge=oe.name||ge||oe.sessionId,We=oe.repoUrl?Y(oe.repoUrl,72):oe.sessionId,Je=oe.lastActivityAt?new Date(oe.lastActivityAt).toLocaleString(T):oe.createdAt?new Date(oe.createdAt).toLocaleString(T):"",xt=L===oe.sessionId;return E.jsxs("li",{className:"session-item",children:[E.jsxs("div",{className:"session-item-meta",children:[E.jsx("div",{className:"session-item-title",children:Ge}),E.jsx("div",{className:"session-item-sub",children:We}),Je&&E.jsx("div",{className:"session-item-sub",children:e("Last activity: {{date}}",{date:Je})})]}),E.jsxs("div",{className:"session-item-actions",children:[E.jsx("button",{type:"button",className:"session-list-button",onClick:()=>B(oe.sessionId),disabled:h||xt,children:e("Resume")}),E.jsx("button",{type:"button",className:"session-list-button is-danger",onClick:()=>D(oe),disabled:h||xt,children:e(xt?"Deleting...":"Delete")})]})]},oe.sessionId)})}),I&&E.jsx("div",{className:"attachments-error",children:I})]})}),E.jsx("div",{className:`session-panel ${P==="new"?"is-visible":"is-hidden"}`,"aria-hidden":P!=="new",children:W?E.jsxs("div",{className:"session-hint",children:[e("Cloning repository..."),j&&E.jsx("div",{className:"session-meta",children:j})]}):E.jsxs("form",{id:"repo-form",className:"session-form session-form--compact",onSubmit:N,children:[E.jsxs("div",{className:"session-form-row is-compact-grid",children:[E.jsx("input",{type:"text",placeholder:e("Session name (optional)"),value:G,onChange:oe=>V(oe.target.value),disabled:h}),E.jsxs("div",{className:"session-repo-field",children:[E.jsx("input",{type:"text",placeholder:e("git@gitea.devops:my-org/my-repo.git"),value:X,onChange:oe=>{ne(oe.target.value)},disabled:h,required:!0,list:ue.length>0?"repo-history":void 0}),ue.length>0&&E.jsx("datalist",{id:"repo-history",children:ue.map(oe=>E.jsx("option",{value:oe,children:Y(oe,72)},oe))})]})]}),E.jsxs("div",{className:"session-auth",children:[E.jsx("div",{className:"session-auth-title",children:e("Repository authentication (optional)")}),E.jsx("div",{className:"session-auth-options",children:E.jsxs("select",{value:ve,onChange:oe=>le(oe.target.value),disabled:h,children:[E.jsx("option",{value:"none",children:e("None")}),E.jsx("option",{value:"ssh",children:e("Private SSH key (not recommended)")}),E.jsx("option",{value:"http",children:e("Username + password")})]})}),ve==="ssh"&&E.jsx(E.Fragment,{children:E.jsx("textarea",{className:"session-auth-textarea",placeholder:e("-----BEGIN OPENSSH PRIVATE KEY-----"),value:Se,onChange:oe=>ye(oe.target.value),disabled:h,rows:6,spellCheck:!1})}),ve==="http"&&E.jsx(E.Fragment,{children:E.jsxs("div",{className:"session-auth-grid",children:[E.jsx("input",{type:"text",placeholder:e("Username"),value:Me,onChange:oe=>Ne(oe.target.value),disabled:h,autoComplete:"username"}),E.jsx("input",{type:"password",placeholder:e("Password or PAT"),value:Ue,onChange:oe=>Ke(oe.target.value),disabled:h,autoComplete:"current-password"})]})})]}),E.jsxs("div",{className:"session-auth session-auth-compact",children:[E.jsx("div",{className:"session-auth-title",children:e("Permissions")}),E.jsxs("div",{className:"session-auth-options session-auth-options--compact",children:[E.jsxs("label",{className:"session-auth-option",children:[E.jsx("input",{type:"checkbox",checked:Ye,onChange:oe=>{const ge=oe.target.checked;Ee(ge),ge||Ce(!1)},disabled:h}),e("Internet access")]}),Ye&&U!=="mono_user"&&E.jsxs("label",{className:"session-auth-option",children:[E.jsx("input",{type:"checkbox",checked:je,onChange:oe=>Ce(oe.target.checked),disabled:h}),e("Deny git credentials access")]})]})]})]})}),Z&&E.jsx("div",{className:"attachments-error",children:Z})]}),a&&E.jsxs("div",{className:"session-step",children:[E.jsxs("div",{className:"session-auth",children:[E.jsx("div",{className:"session-auth-title",children:e("Login required")}),E.jsx("div",{className:"session-auth-hint",children:e("Please use the console generated URL to login")})]}),g&&E.jsx("div",{className:"attachments-error",children:g})]})]}),E.jsx("div",{className:"session-footer",children:a?null:r?E.jsx("button",{type:"submit",form:"workspace-form",className:"session-button primary",disabled:h,children:e(we?"Validating...":"Continue")}):n?E.jsxs(E.Fragment,{children:[E.jsx("button",{type:"button",className:"session-button secondary",onClick:()=>{if(_e===4){ee(!1),De(4);return}De(1)},disabled:h,children:e("Back")}),E.jsx("button",{type:"submit",form:"providers-form",className:"session-button primary",disabled:h,children:e(we?"Validating...":F?"Save":"Continue")})]}):i?E.jsx("button",{type:"button",className:"session-button primary",onClick:()=>De(4),disabled:h,children:e("Continue")}):s?P==="existing"?E.jsx("button",{type:"button",className:"session-button secondary session-footer-full",disabled:h,onClick:()=>{ee(!0),Ae(""),Ie(4),St(),z(),De(2)},children:e("AI providers")}):E.jsxs(E.Fragment,{children:[E.jsx("button",{type:"button",className:"session-button secondary",disabled:h,onClick:()=>{ee(!0),Ae(""),Ie(4),St(),z(),De(2)},children:e("AI providers")}),E.jsx("button",{type:"submit",form:"repo-form",className:"session-button primary",disabled:h,children:e(se?"Loading...":"Clone")})]}):null})]}),E.jsx("aside",{className:"session-info",children:E.jsxs("div",{className:"session-info-card",children:[E.jsxs("div",{className:"session-info-title",children:[E.jsx("span",{className:"session-info-icon","aria-hidden":"true",children:"ℹ️"}),te.title]}),(ae=te.paragraphs)==null?void 0:ae.map(oe=>E.jsx("p",{children:oe},oe)),te.setupLink?E.jsx("p",{children:E.jsx("a",{className:"session-info-link",href:"https://vibe80.io/docs/workspace-session-setup",target:"_blank",rel:"noreferrer",children:e("Click here to learn more.")})}):null,te.securityLink?E.jsxs("p",{children:[e("Vibe80 strictly controls access to resources (Git credentials and internet) using sandboxing. "),E.jsx("a",{className:"session-info-link",href:"https://vibe80.io/docs/sandboxing",target:"_blank",rel:"noreferrer",children:e("Click here to learn more.")})]}):null]})})]}),ie&&E.jsx("div",{className:"toast-container",children:E.jsx("div",{className:`toast is-${ie.type||"success"}`,children:ie.message})})]})}const GF="/assets/vibe80_dark-D7OVPKcU.svg",qF="/assets/vibe80_light-BJK37ybI.svg",YF=x.lazy(()=>wi(()=>import("./ExplorerPanel-CGVmxql1.js"),[])),JF=x.lazy(()=>wi(()=>import("./DiffPanel-Luk1GrAd.js"),[])),XF=x.lazy(()=>wi(()=>import("./TerminalPanel-kEz-cjes.js"),[])),QF=x.lazy(()=>wi(()=>import("./SettingsPanel-H2q2eoDf.js"),[])),ZF=x.lazy(()=>wi(()=>import("./LogsPanel-D8Z8Zam8.js"),[])),ez=()=>new URLSearchParams(window.location.search).get("session"),tz=()=>new URLSearchParams(window.location.search).get("repository"),Yf=()=>{if(ez())return"";const t=tz();return(t?t.trim():"")||""},rz=e=>{if(!e)return"";try{const t=new TextEncoder().encode(e);let r="";return t.forEach(n=>{r+=String.fromCharCode(n)}),btoa(r)}catch{return btoa(e)}},NC={codex:["api_key","auth_json_b64"],claude:["api_key","setup_token"]},K1=(e,t)=>{const r=NC[e]||[];return r.length?r.includes(t==null?void 0:t.authType)?t.authType:r[0]:(t==null?void 0:t.authType)||"api_key"},RC=e=>{const t=e==null?void 0:e.trim();return t?t.startsWith("{")&&t.endsWith("}")?t.slice(1,-1).trim():t:""},nz=e=>e?e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean).map(t=>{const r=t.split("::"),[n,i,s,...a]=r,o=(n||"").trim().toLowerCase(),l=(i||"").trim(),c=(s||"").trim();if(!o||!l||!c)return null;if(o==="radio"||o==="select"){const h=a.map(u=>u.trim()).filter(Boolean);return{type:o,id:l,label:c,choices:h}}if(o==="checkbox"){const u=a.join("::").trim()==="1";return{type:o,id:l,label:c,defaultChecked:u}}if(o==="input"||o==="textarea"){const h=a.join("::").trim();return{type:o,id:l,label:c,defaultValue:h}}return null}).filter(Boolean):[],iz=(e,t=r=>r)=>{const r=/<!--\s*vibe80:(choices|form)\s*([^>]*)-->([\s\S]*?)<!--\s*\/vibe80:\1\s*-->|<!--\s*vibe80:yesno\s*([^>]*)-->/g,n=/<!--\s*vibe80:fileref\s+([^>]+?)\s*-->/g,i=/<!--\s*vibe80:task\s*[^>]*-->/g,s=[],a=[],o=String(e||"").replace(n,(u,m)=>{const v=String(m||"").trim();return v&&a.push(v),""}).replace(i,"");let l="",c=0,h;for(;(h=r.exec(o))!==null;){l+=o.slice(c,h.index),c=h.index+h[0].length;const u=h[1],m=RC(h[2]||h[4]),v=h[3]||"";if(!u){s.push({type:"yesno",question:m,choices:[t("Yes"),t("No")]});continue}if(u==="choices"){const _=v.split(/\r?\n/).map(g=>g.trim()).filter(Boolean);_.length&&s.push({type:"choices",question:m,choices:_});continue}const w=nz(v);w.length&&s.push({type:"form",question:m,fields:w})}return s.length?(l+=o.slice(c),{cleanedText:l.trim(),blocks:s,filerefs:a}):{cleanedText:o,blocks:[],filerefs:a}},sz=e=>{const t=/<!--\s*vibe80:task\s*([^>]*)-->/g,r=String(e||"");let n="",i;for(;(i=t.exec(r))!==null;){const s=RC(i[1]);s&&(n=s)}return n},oz=e=>{const t=String(e||"");return t?t.split(/\r?\n/)[0].trim():""},G1=async e=>{var r;if(!e)return;if((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)try{await navigator.clipboard.writeText(e);return}catch{}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},az=1024,lz=5,cz=140,uz=60,OC="repoHistory",MC="authMode",jC="openAiAuthMode",BC="llmProvider",FC="llmProviders",zC="chatCommandsVisible",$C="toolResultsVisible",UC="notificationsEnabled",HC="themeMode",WC="debugMode",fz=10,hz=new Set(["png","jpg","jpeg","gif","webp","bmp","svg","avif"]),wl=(e,t)=>e?e.length<=t?e:`${e.slice(0,t)}…`:"",ta=e=>{if(!e)return"";if(typeof e=="string"){const t=e.split("/");return t[t.length-1]||e}if(e.name)return e.name;if(e.path){const t=e.path.split("/");return t[t.length-1]||e.path}return""},dz=(e,t=r=>r)=>{const r=ta(e);if(!r||!r.includes("."))return t("FILE");const n=r.split(".").pop();return n?n.toUpperCase():t("FILE")},pz=(e,t=r=>r)=>{if(!Number.isFinite(e))return"";if(e<1024)return t("{{count}} B",{count:e});const r=e/1024;if(r<1024)return t("{{count}} KB",{count:Math.round(r)});const n=r/1024;return t("{{count}} MB",{count:n.toFixed(1)})},_n=e=>Array.isArray(e)?e.map(t=>{if(!t)return null;if(typeof t=="string")return{name:ta(t),path:t};if(typeof t=="object"){const r=t.name||ta(t.path);return{...t,name:r}}return null}).filter(Boolean):[],mz=e=>{var n;const t=ta(e);if(!t||!t.includes("."))return!1;const r=(n=t.split(".").pop())==null?void 0:n.toLowerCase();return hz.has(r)},gz=()=>{try{const e=localStorage.getItem(OC);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string").map(r=>r.trim()).filter(Boolean):[]}catch{return[]}},vz=()=>{try{const e=localStorage.getItem(MC);if(e==="ssh"||e==="http"||e==="none")return e}catch{}return"none"},_z=()=>{try{const e=localStorage.getItem(jC);if(e==="apiKey"||e==="authFile")return e}catch{}return"apiKey"},yz=()=>{try{const e=localStorage.getItem(zC);if(e==="true"||e==="false")return e==="true"}catch{}return!0},wz=()=>{try{const e=localStorage.getItem($C);if(e==="true"||e==="false")return e==="true"}catch{}return!1},bz=()=>{try{const e=localStorage.getItem(UC);if(e==="true"||e==="false")return e==="true"}catch{}return!0},Sz=()=>{try{const e=localStorage.getItem(HC);if(e==="light"||e==="dark")return e}catch{}return"light"},Cz=()=>{try{const e=localStorage.getItem(WC);if(e==="true"||e==="false")return e==="true"}catch{}return!1},fo=()=>{try{const e=localStorage.getItem(BC);if(e==="codex"||e==="claude")return e}catch{}return"codex"},kz=()=>{try{const e=localStorage.getItem(FC);if(!e)return[fo()];const t=JSON.parse(e);if(!Array.isArray(t))return[fo()];const r=t.filter(n=>n==="codex"||n==="claude");return r.length?r:[fo()]}catch{}return[fo()]},xz=(e,t)=>{const r=t.trim();if(!r)return e;const n=[r,...e.filter(i=>i!==r)].slice(0,fz);return n.length===e.length&&n.every((i,s)=>i===e[s])?e:n},Ez=(e,t,r)=>{const n=new Blob([t],{type:r}),i=URL.createObjectURL(n),s=document.createElement("a");s.href=i,s.download=e,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(i)},Az=(e,t)=>{const r=e||"chat",n=new Date().toISOString().replace(/[:.]/g,"-");return`${r}-${n}.${t}`},bl=e=>{if(!e)return"";const n=e.trim().replace(/\/+$/,"").split(/[?#]/)[0].match(/([^/:]+)$/);return n?n[1]:""},Lz=e=>{if(!e)return"plaintext";if((e.split("/").pop()||"").toLowerCase()==="dockerfile")return"dockerfile";const r=e.toLowerCase().match(/\.([a-z0-9]+)$/);switch(r?r[1]:""){case"js":case"cjs":case"mjs":return"javascript";case"jsx":return"javascript";case"ts":return"typescript";case"tsx":return"typescript";case"json":return"json";case"md":case"markdown":return"markdown";case"css":return"css";case"scss":return"scss";case"less":return"less";case"html":case"htm":return"html";case"yml":case"yaml":return"yaml";case"sh":case"bash":case"zsh":return"shell";case"py":return"python";case"go":return"go";case"java":return"java";case"c":return"c";case"cc":case"cpp":case"cxx":case"hpp":case"h":return"cpp";case"rs":return"rust";case"rb":return"ruby";case"php":return"php";case"sql":return"sql";case"toml":return"toml";case"xml":return"xml";case"dockerfile":return"dockerfile";default:return"plaintext"}},Pz=(e,t=r=>r)=>e==="codex"?t("Codex"):e==="claude"?t("Claude"):e||"";function Tz(){const{t:e,language:t,setLanguage:r,locale:n}=IC(),[i,s]=x.useState([]),[a,o]=x.useState(""),[l,c]=x.useState(()=>e("Connecting...")),[h,u]=x.useState(!1),[m,v]=x.useState(!1),[w,_]=x.useState(""),[g,d]=x.useState(!1),[f,p]=x.useState(null),[y,S]=x.useState(Yf),[b,k]=x.useState(Yf),[C,A]=x.useState(""),[P,O]=x.useState(null),[R,M]=x.useState(vz),[z,U]=x.useState(""),[q,Q]=x.useState(""),[H,I]=x.useState(""),[L,B]=x.useState("new"),[D,T]=x.useState(!1),[$,Y]=x.useState({}),[W,j]=x.useState(!0),[N,G]=x.useState(!1),[V,X]=x.useState(null),[ne,ue]=x.useState(fo),[ve,le]=x.useState(kz),[Se,ye]=x.useState(!1),[Me,Ne]=x.useState(_z),[Ue,Ke]=x.useState(null),[Ye,Ee]=x.useState(""),[je,Ce]=x.useState(""),[Z,se]=x.useState(!1),[we,F]=x.useState(null),[_e,De]=x.useState(!1),[ee,Ae]=x.useState(null),[Ie,St]=x.useState(""),[ce,he]=x.useState(!1),[J,K]=x.useState(!1),[te,ie]=x.useState(!1),[ae,oe]=x.useState(()=>!!Yf()),[ge,Ge]=x.useState(yz),[We,Je]=x.useState(wz),[xt,xi]=x.useState(bz),[Xe,Et]=x.useState(Sz),Hr=x.useRef(null),Ls=x.useRef(null),_r=x.useCallback((re,fe="success")=>{X({message:re,type:fe}),Hr.current&&clearTimeout(Hr.current),Hr.current=setTimeout(()=>{X(null),Hr.current=null},3e3)},[]);x.useEffect(()=>()=>{Hr.current&&(clearTimeout(Hr.current),Hr.current=null)},[]);const[VC,Ps]=x.useState({main:"chat"}),_a=x.useRef(null),ya=x.useRef(null),KC=x.useRef(null),GC=x.useRef(null),vm=x.useMemo(()=>({tree:null,loading:!1,error:"",treeTruncated:!1,treeTotal:0,openTabPaths:[],activeFilePath:null,filesByPath:{},selectedPath:null,selectedType:null,renamingPath:null,renameDraft:"",deletingPath:null,fileContent:"",draftContent:"",fileLoading:!1,fileSaving:!1,fileError:"",fileSaveError:"",fileTruncated:!1,fileBinary:!1,editMode:!1,isDirty:!1,statusByPath:{},statusLoading:!1,statusError:"",statusLoaded:!1,expandedPaths:[]}),[]),[hu,du]=x.useState({}),[qC,wa]=x.useState(null),[YC,Ts]=x.useState([]),[pu,mu]=x.useState(!0),[JC,Ds]=x.useState({main:"all"}),[_m,ym]=x.useState(!1),[wm,gu]=x.useState(null),[ba,bm]=x.useState(!0),Sm=x.useRef({}),[XC,vu]=x.useState(""),QC=x.useRef(new Map),ZC=re=>{var fe;if(!(re!=null&&re.type))return"";if(re.type==="commandExecution"){const xe=((fe=re.commandActions)==null?void 0:fe.command)||re.command||e("Command");return e("Command: {{command}}",{command:xe})}return re.type==="fileChange"?e("Applying changes..."):re.type==="mcpToolCall"?e("Tool: {{tool}}",{tool:re.tool}):re.type==="reasoning"?e("Reasoning..."):re.type==="agentMessage"?e("Generating response..."):""},{commandPanelOpen:ek,setCommandPanelOpen:Is,toolResultPanelOpen:tk,setToolResultPanelOpen:Ns}=t9(),[Cm,rk]=x.useState(()=>gz()),[km,Dz]=x.useState(()=>Cz()),cr=x.useRef(null),xm=x.useRef(!0),Sa=x.useRef(null),Ca=x.useRef(null),Em=x.useRef(null),{setToolbarExportOpen:_u}=e9(),Am=x.useRef(null),Lm=x.useRef(null),Pm=x.useRef(null),nk=x.useRef(null),ik=x.useRef(null),sk=x.useRef(null),ok=x.useRef(null),ak=x.useRef(null),lk=x.useRef(null),ck=x.useRef(null),uk=x.useRef(0),fk=x.useRef(!1),hk=x.useRef(null),dk=x.useRef(0),ka=x.useRef([]),{apiFetch:Xt,deploymentMode:yu,handleDeleteSession:pk,handleLeaveWorkspace:Tm,handleWorkspaceCopy:mk,handleWorkspaceProvidersSubmit:gk,handleWorkspaceSubmit:vk,loadWorkspaceProviders:_k,loadWorkspaceSessions:yk,providersBackStep:wk,setProvidersBackStep:bk,setWorkspaceAuthExpanded:Sk,setWorkspaceAuthFiles:Ck,setWorkspaceError:Dm,setWorkspaceIdInput:kk,setWorkspaceMode:Im,setWorkspaceProviders:xk,setWorkspaceProvidersEditing:Ek,setWorkspaceSecretInput:Ak,setWorkspaceStep:Lk,setWorkspaceToken:Pk,workspaceAuthExpanded:Tk,workspaceAuthFiles:Dk,workspaceBusy:Nm,workspaceCopied:Ik,workspaceCreated:Nk,workspaceError:Rk,workspaceId:Ok,workspaceIdInput:Mk,workspaceMode:jk,workspaceProviders:Bk,workspaceProvidersEditing:Fk,workspaceSecretInput:zk,workspaceSessionDeletingId:$k,workspaceSessions:Uk,workspaceSessionsError:Hk,workspaceSessionsLoading:Wk,workspaceStep:xa,workspaceToken:Wr}=IB({t:e,encodeBase64:rz,copyTextToClipboard:G1,extractRepoName:bl,setSessionMode:B,showToast:_r,getProviderAuthType:K1}),{handoffOpen:Vk,handoffQrDataUrl:Rm,handoffLoading:wu,handoffError:Om,handoffRemaining:bu,requestHandoffQr:Mm,closeHandoffQr:jm}=qB({t:e,apiFetch:Xt,attachmentSessionId:f==null?void 0:f.sessionId}),{gitIdentityName:Kk,gitIdentityEmail:Gk,gitIdentityGlobal:qk,gitIdentityRepo:Yk,gitIdentityLoading:Jk,gitIdentitySaving:Xk,gitIdentityError:Qk,gitIdentityMessage:Zk,setGitIdentityName:e2,setGitIdentityEmail:t2,handleSaveGitIdentity:r2}=YB({t:e,apiFetch:Xt,attachmentSessionId:f==null?void 0:f.sessionId}),Ei=x.useMemo(()=>new Map,[]),Rs=x.useMemo(()=>new Map,[]),Os=x.useMemo(()=>bl(f==null?void 0:f.repoUrl),[f==null?void 0:f.repoUrl]),Bm=Xe==="dark"?GF:qF,Fm=x.useMemo(()=>{const re=[];return _e&&re.push("codex"),J&&re.push("claude"),re},[_e,J]),Ms=x.useMemo(()=>ve.filter(re=>Fm.includes(re)),[ve,Fm]);x.useEffect(()=>{ka.current=i},[i]),x.useEffect(()=>{Sm.current=hu},[hu]),x.useEffect(()=>{xm.current=pu},[pu]);const{attachmentPreview:js,attachmentsError:zm,attachmentsLoading:$m,draftAttachments:Bs,renderMessageAttachments:n2,setAttachmentPreview:Um,setAttachmentsError:Ea,setAttachmentsLoading:Su,setDraftAttachments:Fs}=UB({attachmentSessionId:f==null?void 0:f.sessionId,workspaceToken:Wr,normalizeAttachments:_n,isImageAttachment:mz,getAttachmentName:ta,attachmentIcon:E.jsx(Be,{icon:QD}),t:e}),Hm=x.useMemo(()=>f!=null&&f.sessionId?`choices:${f.sessionId}`:null,[f==null?void 0:f.sessionId,Xt]),{choiceSelections:i2,setChoiceSelections:s2,activeForm:Aa,activeFormValues:Wm,openVibe80Form:o2,closeVibe80Form:Cu,updateActiveFormValue:zs,submitActiveForm:a2,handleChoiceClick:l2}=JB({choicesKey:Hm,input:a,setInput:o,handleSendMessageRef:_a,draftAttachments:Bs,setDraftAttachments:Fs});XB({authMode:R,llmProvider:ne,selectedProviders:ve,openAiAuthMode:Me,showChatCommands:ge,showToolResults:We,notificationsEnabled:xt,themeMode:Xe,repoHistory:Cm,debugMode:km,setLlmProvider:ue,setOpenAiLoginError:Ce,setClaudeLoginError:St,AUTH_MODE_KEY:MC,LLM_PROVIDER_KEY:BC,LLM_PROVIDERS_KEY:FC,OPENAI_AUTH_MODE_KEY:jC,CHAT_COMMANDS_VISIBLE_KEY:zC,TOOL_RESULTS_VISIBLE_KEY:$C,NOTIFICATIONS_ENABLED_KEY:UC,THEME_MODE_KEY:HC,REPO_HISTORY_KEY:OC,DEBUG_MODE_KEY:WC}),x.useMemo(()=>{const re=[];return(i||[]).forEach(fe=>{if((fe==null?void 0:fe.role)==="commandExecution"){const xe=re[re.length-1];(xe==null?void 0:xe.groupType)==="commandExecution"?xe.items.push(fe):re.push({groupType:"commandExecution",id:`command-group-${fe.id}`,items:[fe]});return}re.push(fe)}),re},[i]);const{isMobileLayout:hn}=QB({themeMode:Xe,setSideOpen:ym}),{applyMessages:c2,mergeAndApplyMessages:u2}=c9({normalizeAttachments:_n,messageIndex:Ei,commandIndex:Rs,messagesRef:ka,setMessages:s,setCommandPanelOpen:Is,setToolResultPanelOpen:Ns}),{activeWorktreeId:qe,activeWorktreeIdRef:Vm,applyWorktreesList:f2,closeWorktree:h2,createWorktree:d2,handleSelectWorktree:p2,loadMainWorktreeSnapshot:ku,requestWorktreeMessages:m2,requestWorktreesList:g2,renameWorktreeHandler:v2,setActiveWorktreeId:La,setWorktrees:Qt,worktrees:Pa}=NB({apiFetch:Xt,attachmentSessionId:f==null?void 0:f.sessionId,availableProviders:Ms,llmProvider:ne,messagesRef:ka,normalizeAttachments:_n,applyMessages:c2,socketRef:cr,setPaneByTab:Ps,setLogFilterByTab:Ds,showToast:_r,t:e}),{logFilter:_2,setLogFilter:y2,scopedRpcLogs:w2,filteredRpcLogs:b2}=ZB({rpcLogs:YC,activeWorktreeId:qe,locale:n,logFilterByTab:JC,setLogFilterByTab:Ds}),{ensureNotificationPermission:S2,maybeNotify:C2,lastNotifiedIdRef:k2}=BB({notificationsEnabled:xt,t:e}),Ta=x.useRef(()=>{}),x2=x.useCallback((...re)=>{var fe;return(fe=Ta.current)==null?void 0:fe.call(Ta,...re)},[]),{branches:E2,branchError:A2,branchLoading:L2,currentBranch:Ai,defaultBranch:P2,loadBranches:Km,loadProviderModels:T2,modelError:D2,modelLoading:I2,models:Gm,providerModelState:N2,selectedModel:R2,selectedReasoningEffort:qm,setModelError:$s,setModelLoading:Us,setModels:O2,setProviderModelState:M2,setSelectedModel:xu,setSelectedReasoningEffort:j2}=VB({apiFetch:Xt,attachmentSessionId:f==null?void 0:f.sessionId,llmProvider:ne,loadRepoLastCommit:x2,processing:h,socketRef:cr,t:e}),{currentDiff:B2,diffFiles:F2,diffStatusLines:z2,hasCurrentChanges:$2,untrackedFilePanels:U2,untrackedLoading:H2,loadRepoLastCommit:Hs,loadWorktreeLastCommit:Eu,repoLastCommit:Da,requestRepoDiff:Ia,requestWorktreeDiff:Na,setRepoDiff:Ra,setRepoLastCommit:Au,setWorktreeLastCommitById:Lu,worktreeLastCommitById:Pu}=$B({apiFetch:Xt,attachmentSessionId:f==null?void 0:f.sessionId,currentBranch:Ai,activeWorktreeId:qe,parseDiff:q4,setWorktrees:Qt,worktrees:Pa,t:e});x.useEffect(()=>{Ta.current=Hs},[Hs]);const Ze=qe&&qe!=="main",ke=Ze?Pa.get(qe):null,Vr=Ze?ke==null?void 0:ke.provider:ne,Ym=Ze?ke==null?void 0:ke.model:R2,ur=qe||"main",mt=x.useMemo(()=>{const re=f==null?void 0:f.sessionId;return re?`${re}::${ur}`:null},[f==null?void 0:f.sessionId,ur]),Tu=x.useMemo(()=>{if(!mt)return[];const re=$[mt]||{};return Object.values(re).sort((fe,xe)=>fe.messageId!==xe.messageId?String(fe.messageId||"").localeCompare(String(xe.messageId||"")):(fe.lineIndex||0)-(xe.lineIndex||0))},[mt,$]),W2=x.useCallback((re,fe)=>{!mt||!re||Y(xe=>{const Te=xe[mt];return!Te||!Te[re]?xe:{...xe,[mt]:{...Te,[re]:{...Te[re],annotationText:fe}}}})},[mt]),V2=x.useCallback(re=>{!mt||!re||Y(fe=>{const xe=fe[mt];if(!xe||!xe[re])return fe;const Te={...xe};if(delete Te[re],Object.keys(Te).length===0){const $e={...fe};return delete $e[mt],$e}return{...fe,[mt]:Te}})},[mt]),K2=x.useCallback(({messageId:re,lineIndex:fe,lineText:xe})=>{if(!mt||!re)return;const Te=`${re}:${fe}`;Y($e=>{const ft=$e[mt]||{},yr=ft[Te];return{...$e,[mt]:{...ft,[Te]:{annotationKey:Te,messageId:re,lineIndex:fe,lineText:xe||"",annotationText:(yr==null?void 0:yr.annotationText)||""}}}})},[mt]),G2=x.useCallback(()=>{mt&&Y(re=>{if(!re[mt])return re;const fe={...re};return delete fe[mt],fe})},[mt]),q2=x.useCallback(re=>{const fe=String(re||"").trim();if(!fe)return"";const xe=Tu.filter($e=>{var ft;return(ft=$e==null?void 0:$e.annotationText)==null?void 0:ft.trim()}).map($e=>({lineText:$e.lineText||"",annotationText:$e.annotationText.trim()}));return xe.length===0?fe:`${xe.map($e=>`> ${$e.lineText}
707
- ${$e.annotationText}`).join(`
708
-
709
- `)}
710
-
711
- ${fe}`},[Tu]),Jm=Ze?Array.isArray(ke==null?void 0:ke.models)?ke.models:[]:Array.isArray(Gm)?Gm:[],Xm=Ze?!!(ke!=null&&ke.modelLoading):!!I2,Y2=Ze?(ke==null?void 0:ke.modelError)||"":D2,Yn=Ze&&!ke?[]:ke?ke.messages:i,J2=Array.isArray(Yn)&&Yn.length>0,yt=VC[qe]||"chat",Qm=hu[qe]||vm,{handleResumeSession:X2,onRepoSubmit:Q2}=GB({t:e,apiFetch:Xt,workspaceToken:Wr,handleLeaveWorkspace:Tm,repoUrl:y,setRepoUrl:S,repoInput:b,sessionNameInput:C,repoAuth:P,setRepoAuth:O,authMode:R,sshKeyInput:z,httpUsername:q,httpPassword:H,sessionMode:L,sessionRequested:ae,setSessionRequested:oe,defaultInternetAccess:W,defaultDenyGitCredentialsAccess:N,attachmentSession:f,setAttachmentSession:p,setAttachmentsLoading:Su,setAttachmentsError:Ea,setWorkspaceToken:Pk,setWorkspaceMode:Im,setWorkspaceError:Dm,setOpenAiLoginPending:se,setOpenAiLoginRequest:F}),Du=Qm.statusByPath||{},Z2=x.useMemo(()=>{const re={},fe=(xe,Te)=>{if(!xe)return;const $e=re[xe];if($e!=="untracked"){if(Te==="untracked"){re[xe]="untracked";return}$e||(re[xe]=Te)}};return Object.entries(Du).forEach(([xe,Te])=>{if(!xe)return;const $e=xe.split("/").filter(Boolean);if(!($e.length<=1))for(let ft=0;ft<$e.length-1;ft+=1){const yr=$e.slice(0,ft+1).join("/");fe(yr,Te)}}),re},[Du]),{resyncSession:ex}=a9({attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:Xt,llmProvider:ne,setLlmProvider:ue,setSelectedProviders:le,setOpenAiReady:De,setClaudeReady:K,setRepoDiff:Ra,setRpcLogsEnabled:mu,setRpcLogs:Ts,setTerminalEnabled:bm,loadMainWorktreeSnapshot:ku}),{requestMessageSync:tx}=l9({socketRef:cr,messagesRef:ka});kB({attachmentSessionId:f==null?void 0:f.sessionId,workspaceToken:Wr,socketRef:cr,reconnectTimerRef:ck,reconnectAttemptRef:uk,closingRef:fk,pingIntervalRef:hk,lastPongRef:dk,messageIndex:Ei,commandIndex:Rs,rpcLogsEnabledRef:xm,mergeAndApplyMessages:u2,requestMessageSync:tx,requestWorktreesList:g2,requestWorktreeMessages:m2,applyWorktreesList:f2,resyncSession:ex,t:e,setStatus:c,setConnected:d,setAppServerReady:ie,setHasMainWorktreeStatus:v,setMessages:s,setProcessing:u,setActivity:_,setCurrentTurnId:wa,setMainTaskLabel:vu,setModelLoading:Us,setModelError:$s,setModels:O2,setProviderModelState:M2,setSelectedModel:xu,setSelectedReasoningEffort:j2,setRepoDiff:Ra,setRpcLogs:Ts,setWorktrees:Qt,setPaneByTab:Ps,setLogFilterByTab:Ds,setActiveWorktreeId:La,activeWorktreeIdRef:Vm,extractVibe80Task:sz,extractFirstLine:oz,getItemActivityLabel:ZC,maybeNotify:C2,normalizeAttachments:_n,loadRepoLastCommit:Hs,loadBranches:Km,loadWorktreeLastCommit:Eu,openAiLoginRequest:we,setOpenAiLoginRequest:F,connected:g});const Zm=x.useCallback((re="main")=>{const fe=cr.current;!fe||fe.readyState!==WebSocket.OPEN||(re==="main"?(Us(!0),$s("")):Qt(xe=>{const Te=new Map(xe),$e=Te.get(re);return $e?(Te.set(re,{...$e,modelLoading:!0,modelError:""}),Te):xe}),fe.send(JSON.stringify({type:"model_list",worktreeId:re})))},[$s,Us,Qt,cr]),rx=x.useCallback(re=>{const fe=cr.current;if(!fe||fe.readyState!==WebSocket.OPEN)return;const xe=re||null;ur==="main"?(xu(xe||""),Us(!0),$s("")):Qt(Te=>{const $e=new Map(Te),ft=$e.get(ur);return ft?($e.set(ur,{...ft,model:xe,modelLoading:!0,modelError:""}),$e):Te}),fe.send(JSON.stringify({type:"model_set",worktreeId:ur,model:xe,reasoningEffort:ur==="main"?qm||null:(ke==null?void 0:ke.reasoningEffort)??null}))},[ur,ke==null?void 0:ke.reasoningEffort,qm,$s,Us,xu,Qt,cr]);jB({activePane:yt,activeWorktreeId:qe,attachmentSessionId:f==null?void 0:f.sessionId,terminalEnabled:ba,terminalContainerRef:Pm,terminalDisposableRef:sk,terminalFitRef:ik,terminalRef:nk,terminalSessionRef:ak,terminalSocketRef:ok,terminalWorktreeRef:lk,themeMode:Xe,workspaceToken:Wr}),x.useEffect(()=>{typeof(f==null?void 0:f.terminalEnabled)=="boolean"&&bm(f.terminalEnabled)},[f==null?void 0:f.terminalEnabled]),x.useEffect(()=>{ie(!1)},[f==null?void 0:f.sessionId]),x.useEffect(()=>{!g||!(f!=null&&f.sessionId)||Vr!=="codex"&&Vr!=="claude"||Ze&&(ke==null?void 0:ke.status)!=="ready"||!Ze&&Vr==="codex"&&!te||Zm(ur)},[ur,ke==null?void 0:ke.status,Vr,te,f==null?void 0:f.sessionId,g,Ze,Zm]),x.useEffect(()=>{if(!(f!=null&&f.sessionId))return;ku(),Ra(f.repoDiff||{status:"",diff:""});const re=typeof f.rpcLogsEnabled=="boolean"?f.rpcLogsEnabled:!0;mu(re),Ts(re?f.rpcLogs||[]:[]),c(e("Connecting...")),d(!1),v(!1)},[f==null?void 0:f.sessionId,ku,Ei,e]),x.useEffect(()=>{if(f!=null&&f.sessionId){const re=(f==null?void 0:f.name)||Os||e("Session");document.title=`vibe80 - ${re}`}else document.title="vibe80"},[f==null?void 0:f.sessionId,f==null?void 0:f.name,Os,e]),x.useEffect(()=>{typeof(f==null?void 0:f.defaultInternetAccess)=="boolean"&&j(f.defaultInternetAccess)},[f==null?void 0:f.defaultInternetAccess]),x.useEffect(()=>{typeof(f==null?void 0:f.defaultDenyGitCredentialsAccess)=="boolean"&&G(f.defaultDenyGitCredentialsAccess)},[f==null?void 0:f.defaultDenyGitCredentialsAccess]),x.useEffect(()=>{if(!(f!=null&&f.defaultProvider)&&!(f!=null&&f.providers))return;const re=Array.isArray(f.providers)?f.providers.filter(fe=>fe==="codex"||fe==="claude"):[];re.length?(le(re),De(re.includes("codex")),K(re.includes("claude"))):f.defaultProvider&&(le([f.defaultProvider]),De(f.defaultProvider==="codex"),K(f.defaultProvider==="claude")),f.defaultProvider&&f.defaultProvider!==ne&&ue(f.defaultProvider)},[f==null?void 0:f.defaultProvider,f==null?void 0:f.providers]),x.useEffect(()=>{f!=null&&f.repoUrl&&rk(re=>xz(re,f.repoUrl))},[f==null?void 0:f.repoUrl]),p9({attachmentSessionId:f==null?void 0:f.sessionId,socketRef:cr,availableProviders:Ms,llmProvider:ne,providerSwitching:Se,processing:h,setProviderSwitching:ye,setStatus:c,setSelectedProviders:le,setLlmProvider:ue,t:e});const{commandMenuOpen:nx,setCommandMenuOpen:eg,setCommandQuery:ix,commandSelection:sx,filteredCommands:ox,isDraggingAttachments:ax,handleInputChange:lx,handleComposerKeyDown:cx,onSubmit:ux,onUploadAttachments:fx,onPasteAttachments:hx,onDragOverComposer:dx,onDragEnterComposer:px,onDragLeaveComposer:mx,onDropAttachments:gx,removeDraftAttachment:vx,triggerAttachmentPicker:_x,captureScreenshot:yx}=CB({t:e,input:a,setInput:o,inputRef:Ca,handleSendMessageRef:_a,attachmentSession:f,apiFetch:Xt,normalizeAttachments:_n,setDraftAttachments:Fs,draftAttachments:Bs,setAttachmentsLoading:Su,setAttachmentsError:Ea,showToast:_r,uploadInputRef:Em,attachmentsLoading:$m,conversationRef:Am,composerRef:Lm,isMobileLayout:hn}),{sendMessage:tg,sendCommitMessage:wx,sendWorktreeMessage:bx}=g9({input:a,setInput:o,setMessages:s,setDraftAttachments:Fs,socketRef:cr,connected:g,normalizeAttachments:_n,draftAttachments:Bs,setWorktrees:Qt,setProcessing:u,setActivity:_,processingLabel:e("Processing..."),handleSendMessageRef:_a,ensureNotificationPermission:S2}),{openCloseConfirm:Sx,closeCloseConfirm:Iu,handleConfirmDelete:Cx}=u9({closeConfirm:wm,setCloseConfirm:gu,setActiveWorktreeId:La,activeWorktreeIdRef:Vm,closeWorktree:h2});x.useEffect(()=>{Sa.current&&(Sa.current.scrollTop=Sa.current.scrollHeight)},[Yn,h,qe]);const kx=x.useMemo(()=>{const re={id:"main",name:Ai||"Main",branchName:Ai||"main",provider:ne,status:h?"processing":g?m?"ready":"processing":"creating",color:"#6b7280",messages:i},fe=Array.from(Pa.values());return[re,...fe]},[Ai,ne,h,g,m,i,Pa]),xx=x.useMemo(()=>{const re=[];return(Yn||[]).forEach(fe=>{if((fe==null?void 0:fe.role)==="commandExecution"){if(!ge)return;const xe=re[re.length-1];(xe==null?void 0:xe.groupType)==="commandExecution"?xe.items.push(fe):re.push({groupType:"commandExecution",id:`command-group-${fe.id}`,items:[fe]});return}if((fe==null?void 0:fe.role)==="tool_result"){if(!We)return;const xe=re[re.length-1];(xe==null?void 0:xe.groupType)==="toolResult"?xe.items.push(fe):re.push({groupType:"toolResult",id:`tool-result-group-${fe.id}`,items:[fe]});return}if((fe==null?void 0:fe.type)==="action_result"){const xe=re[re.length-1];(xe==null?void 0:xe.groupType)==="toolResult"?xe.items.push(fe):re.push({groupType:"toolResult",id:`tool-result-group-${fe.id}`,items:[fe]});return}re.push(fe)}),re},[Yn,ge,We]),{setShowOlderMessagesByTab:Nu,collapsedMessages:Ex}=o9({activeChatKey:ur,displayedGroupedMessages:xx,CHAT_COLLAPSE_THRESHOLD:cz,CHAT_COLLAPSE_VISIBLE:uz});x.useEffect(()=>{const re=(f==null?void 0:f.sessionId)||null;Ls.current!==re&&(Ls.current=re,s([]),Ei.clear(),Rs.clear(),Qt(new Map),La("main"),Ps({main:"chat"}),Ds({main:"all"}),du({}),Nu({}),Is({}),Ns({}),Au(null),Lu(new Map),wa(null),vu(""),_(""),gu(null),Y({}))},[f==null?void 0:f.sessionId,Rs,Ei,La,_,gu,Is,wa,du,Ds,vu,s,Y,Ps,Au,Nu,Ns,Lu,Qt]);const dn=Ze?Pu.get(qe):Da,rg=Ze?(ke==null?void 0:ke.branchName)||(ke==null?void 0:ke.name)||"":Ai||(Da==null?void 0:Da.branch)||"",ng=typeof(dn==null?void 0:dn.sha)=="string"?dn.sha.slice(0,7):"",Ax=Ze?!!(ke!=null&&ke.internetAccess):!!W,Lx=Ze?(ke==null?void 0:ke.denyGitCredentialsAccess)===!1:N===!1,ig=Pz(Vr,e),sg=Ym||e("Default model"),Px=!!(ig&&sg),Tx=Os||e("Repository"),Dx=!hn&&yt==="chat"&&!!(rg&&ng&&(dn!=null&&dn.message)),Ix=(ke==null?void 0:ke.status)==="processing",og=(ke==null?void 0:ke.status)==="stopped",Ws=Ze?Ix:h,Vs=Ws||Ze&&og,Nx=Ze?(ke==null?void 0:ke.activity)||"":w,Rx=Ws?Ze?ke==null?void 0:ke.taskLabel:XC:"",ag=Ze?ke==null?void 0:ke.currentTurnId:qC,Ox=Ws&&!!ag,lg=Vr!=="codex"?!0:Ze?(ke==null?void 0:ke.status)==="ready":te,Mx=Vr==="codex"||Vr==="claude",jx=!g||Vs||Xm||!Jm.length,Bx=Ym||"",{handleViewSelect:Oa,handleOpenSettings:cg,handleSettingsBack:Fx}=r9({activePane:yt,activeWorktreeId:qe,debugMode:km,rpcLogsEnabled:pu,terminalEnabled:ba,setPaneByTab:Ps,setToolbarExportOpen:_u,lastPaneByTabRef:QC}),{addToBacklog:zx,backlog:Ma,editBacklogItem:$x,launchBacklogItem:Ux,markBacklogItemDone:Hx,removeFromBacklog:Wx,setBacklogMessagePage:Vx}=HB({attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:Xt,normalizeAttachments:_n,sendMessage:tg,setInput:o,setMessages:s,setWorktrees:Qt,setDraftAttachments:Fs,input:a,draftAttachments:Bs,inputRef:Ca,showToast:_r,t:e}),{interruptTurn:Kx}=i9({activeWorktreeId:qe,isInWorktree:Ze,currentTurnIdForActive:ag,socketRef:cr,setWorktrees:Qt,setActivity:_}),{handleLeaveSession:Ru}=n9({setAttachmentSession:p,setRepoUrl:S,setRepoInput:k,setRepoAuth:O,setSessionRequested:oe,setAttachmentsError:Ea,setAttachmentsLoading:Su,setMessages:s,setRepoDiff:Ra,setRpcLogs:Ts,setRpcLogsEnabled:mu,setRepoLastCommit:Au,setWorktreeLastCommitById:Lu,setCurrentTurnId:wa,setActivity:_,setDefaultDenyGitCredentialsAccess:G});x.useEffect(()=>{!Wr&&(f!=null&&f.sessionId)&&Ru()},[Wr,f==null?void 0:f.sessionId,Ru]);const{handleDiffSelect:Gx}=s9({activeWorktreeId:qe,handleViewSelect:Oa,requestWorktreeDiff:Na,requestRepoDiff:Ia}),{openPathInExplorer:qx,requestExplorerTree:Ou,requestExplorerStatus:Mu,openFileInExplorer:Yx,setActiveExplorerFile:Jx,closeExplorerFile:Xx,selectExplorerNode:ug,toggleExplorerDir:Qx,updateExplorerDraft:Zx,saveExplorerFile:eE,startExplorerRename:tE,cancelExplorerRename:fg,updateExplorerRenameDraft:hg,submitExplorerRename:ja,createExplorerFile:rE,createExplorerFolder:nE,deleteExplorerSelection:iE}=d9({attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:Xt,t:e,setExplorerByTab:du,explorerDefaultState:vm,explorerRef:Sm,activeWorktreeId:qe,handleViewSelect:Oa,showToast:_r,requestExplorerTreeRef:KC,requestExplorerStatusRef:GC,loadExplorerFileRef:ya});WB({activeProvider:Vr,activeWorktreeId:qe,addToBacklog:zx,apiFetch:Xt,attachmentSessionId:f==null?void 0:f.sessionId,captureScreenshot:yx,connected:g,handleSendMessageRef:_a,handleViewSelect:Oa,input:a,isWorktreeStopped:og,isCodexReady:lg,isInWorktree:Ze,openPathInExplorer:qx,requestRepoDiff:Ia,requestWorktreeDiff:Na,sendMessage:tg,sendWorktreeMessage:bx,buildAnnotatedMessage:q2,clearScopedAnnotations:G2,setAnnotationMode:T,setCommandMenuOpen:eg,setDraftAttachments:Fs,setInput:o,setMessages:s,setWorktrees:Qt,socketRef:cr,showToast:_r,t:e});const{handleClearRpcLogs:sE}=f9({activeWorktreeId:qe,setRpcLogs:Ts});x.useEffect(()=>{yt==="diff"&&(qe&&qe!=="main"?Na(qe):Ia())},[yt,qe,Ia,Na]),x.useEffect(()=>{if(yt!=="explorer")return;const re=qe||"main";Ou(re,!0),Mu(re,!0)},[yt,qe,Ou,Mu]),x.useEffect(()=>{if(!(!(f!=null&&f.sessionId)||hn||yt!=="chat")){if(Ze&&qe){Pu.has(qe)||Eu(qe);return}Hs()}},[f==null?void 0:f.sessionId,hn,yt,Ze,qe,Pu,Eu,Hs]),m9({currentMessages:Yn,attachmentRepoUrl:f==null?void 0:f.repoUrl,repoUrl:y,isInWorktree:Ze,activeWorktree:ke,t:e,normalizeAttachments:_n,downloadTextFile:Ez,formatExportName:Az,extractRepoName:bl,setToolbarExportOpen:_u});const{handleClearChat:oE}=v9({activeWorktreeId:qe,setToolbarExportOpen:_u,setWorktrees:Qt,lastNotifiedIdRef:k2,attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:Xt,setMessages:s,messageIndex:Ei,commandIndex:Rs,setChoiceSelections:s2,choicesKey:Hm,setCommandPanelOpen:Is,setToolResultPanelOpen:Ns,llmProvider:ne});if(f!=null&&f.sessionId,Ms.length>1&&Ms.find(re=>re!==ne),!(f!=null&&f.sessionId)){const fe=L==="new"&&ae&&!!y,xe=wl(y,72),Te=Nm||ae,$e=Ba=>Bk[Ba]||{},ft=yu==="mono_user"&&!Wr,yr=!ft&&xa===1,pn=!ft&&xa===2,mn=xa===3&&Wr,gt=xa===4&&Wr,ju=ft?e("Please use the console generated URL to login"):pn?e("Configure AI providers for this workspace."):mn?e("Workspace created hint"):null,Bu=ft?{title:e("Login required"),paragraphs:[e("Please use the console generated URL to login")]}:pn?{title:e("Configure AI providers"),paragraphs:[e("Vibe80 can run Codex or Claude Code. To continue, provide your Anthropic and/or OpenAI credentials. If you use pay-as-you-go billing, supply an API key."),e("For subscription plans, use auth.json from the Codex CLI login (ChatGPT) or a long-lived token from `claude setup-token` (Claude).")],setupLink:!0}:mn?{title:e("Workspace credentials"),paragraphs:[e("Please keep your workspace credentials (Workspace ID and Workspace Secret) for future access. We do not have a user identification mechanism; your Workspace ID is your only identifier.")]}:gt?{title:e("Start a session"),paragraphs:[e("Vibe80 opens Git-based work sessions. Even in a secure environment, we recommend short-lived and revocable PATs or keys.")],securityLink:!0}:{title:e("Configure the workspace"),paragraphs:[e("A workspace is an isolated, secured environment accessible only with credentials. It lets you reuse AI credentials for all future sessions."),e("You can create multiple workspaces to separate teams, projects, or security boundaries.")]};return E.jsx(KF,{t:e,brandLogo:Bm,showStep1:yr,showStep2:pn,showStep3:mn,showStep4:gt,showMonoLoginRequired:ft,headerHint:ju,workspaceMode:jk,setWorkspaceMode:Im,formDisabled:Te,handleWorkspaceSubmit:vk,workspaceIdInput:Mk,setWorkspaceIdInput:kk,workspaceSecretInput:zk,setWorkspaceSecretInput:Ak,workspaceError:Rk,handleWorkspaceProvidersSubmit:gk,workspaceProvider:$e,workspaceAuthExpanded:Tk,setWorkspaceAuthExpanded:Sk,setWorkspaceProviders:xk,providerAuthOptions:NC,getProviderAuthType:K1,workspaceAuthFiles:Dk,setWorkspaceAuthFiles:Ck,sessionMode:L,setSessionMode:B,setSessionRequested:oe,setAttachmentsError:Ea,loadWorkspaceSessions:yk,deploymentMode:yu,handleLeaveWorkspace:Tm,workspaceSessionsLoading:Wk,workspaceSessions:Uk,workspaceSessionsError:Hk,workspaceSessionDeletingId:$k,handleResumeSession:X2,handleDeleteSession:pk,locale:n,extractRepoName:bl,getTruncatedText:wl,isCloning:fe,repoDisplay:xe,onRepoSubmit:Q2,sessionNameInput:C,setSessionNameInput:A,repoInput:b,setRepoInput:k,repoHistory:Cm,authMode:R,setAuthMode:M,sshKeyInput:z,setSshKeyInput:U,httpUsername:q,setHttpUsername:Q,httpPassword:H,setHttpPassword:I,defaultInternetAccess:W,setDefaultInternetAccess:j,defaultDenyGitCredentialsAccess:N,setDefaultDenyGitCredentialsAccess:G,attachmentsError:zm,sessionRequested:ae,workspaceBusy:Nm,workspaceProvidersEditing:Fk,providersBackStep:wk,setWorkspaceStep:Lk,setWorkspaceProvidersEditing:Ek,setWorkspaceError:Dm,setProvidersBackStep:bk,loadWorkspaceProviders:_k,workspaceCreated:Nk,workspaceId:Ok,workspaceCopied:Ik,handleWorkspaceCopy:mk,infoContent:Bu,toast:V})}const dg=(re,fe,xe,Te,$e,ft,yr,pn,mn)=>!Array.isArray(re)||re.length===0?null:E.jsx("ul",{className:"explorer-tree-list",children:re.map(gt=>{if(gt.type==="dir"){const Ut=xe.has(gt.path),aE=Te===gt.path&&$e==="dir",lE=ft===gt.path,pg=(mn==null?void 0:mn[gt.path])||"";return E.jsxs("li",{className:`explorer-tree-item is-dir ${aE?"is-selected":""} ${pg?`is-${pg}`:""}`,children:[E.jsxs("div",{className:"explorer-tree-entry",children:[E.jsx("button",{type:"button",className:"explorer-tree-caret-button",onClick:Ir=>{Ir.stopPropagation(),Qx(fe,gt.path)},children:E.jsx("span",{className:"explorer-tree-caret","aria-hidden":"true",children:E.jsx(Be,{icon:Ut?e6:qD})})}),lE?E.jsx("div",{className:"explorer-tree-toggle is-renaming",children:E.jsx("input",{className:"explorer-tree-rename-input",value:yr||"",autoFocus:!0,onClick:Ir=>Ir.stopPropagation(),onChange:Ir=>hg(fe,Ir.target.value),onBlur:()=>{ja(fe)},onKeyDown:Ir=>{Ir.key==="Enter"?(Ir.preventDefault(),ja(fe)):Ir.key==="Escape"&&(Ir.preventDefault(),fg(fe))}})}):E.jsx("button",{type:"button",className:"explorer-tree-toggle",onClick:()=>ug(fe,gt.path,"dir"),children:E.jsx("span",{className:"explorer-tree-name",children:gt.name})})]}),Ut?dg(gt.children||[],fe,xe,Te,$e,ft,yr,pn,mn):null]},gt.path)}const ju=Te===gt.path&&$e==="file",Bu=ft===gt.path,Ba=(pn==null?void 0:pn[gt.path])||"";return E.jsx("li",{className:`explorer-tree-item is-file ${ju?"is-selected":""} ${Ba?`is-${Ba}`:""}`,children:Bu?E.jsxs("div",{className:"explorer-tree-file is-renaming",children:[E.jsx("span",{className:"explorer-tree-icon","aria-hidden":"true",children:E.jsx(Be,{icon:E_})}),E.jsx("input",{className:"explorer-tree-rename-input",value:yr||"",autoFocus:!0,onClick:Ut=>Ut.stopPropagation(),onChange:Ut=>hg(fe,Ut.target.value),onBlur:()=>{ja(fe)},onKeyDown:Ut=>{Ut.key==="Enter"?(Ut.preventDefault(),ja(fe)):Ut.key==="Escape"&&(Ut.preventDefault(),fg(fe))}})]}):E.jsxs("button",{type:"button",className:"explorer-tree-file",onClick:()=>{var Ut;ug(fe,gt.path,"file"),(Ut=ya.current)==null||Ut.call(ya,fe,gt.path)},children:[E.jsx("span",{className:"explorer-tree-icon","aria-hidden":"true",children:E.jsx(Be,{icon:E_})}),E.jsx("span",{className:"explorer-tree-name",children:gt.name})]})},gt.path)})});return E.jsxs("div",{className:"app",children:[E.jsx(VF,{t:e,brandLogo:Bm,allTabs:kx,activeWorktreeId:qe,handleSelectWorktree:p2,createWorktree:d2,openCloseConfirm:Sx,renameWorktreeHandler:v2,llmProvider:ne,availableProviders:Ms,branches:E2,defaultBranch:P2,currentBranch:Ai,branchLoading:L2,branchError:A2,defaultInternetAccess:W,defaultDenyGitCredentialsAccess:N,deploymentMode:yu,loadBranches:Km,providerModelState:N2,loadProviderModels:T2,connected:g,isMobileLayout:hn,requestHandoffQr:Mm,attachmentSession:f,handoffLoading:wu,handleOpenSettings:cg,handleLeaveSession:Ru}),E.jsxs("div",{className:`layout ${_m?"is-side-open":"is-side-collapsed"} ${hn?"is-mobile":""}`,children:[hn&&_m?E.jsx("button",{type:"button",className:"side-backdrop","aria-label":e("Close panel"),onClick:()=>ym(!1)}):null,E.jsxs("aside",{className:"side",children:[E.jsx("div",{className:"side-body",children:E.jsxs("section",{className:"backlog",children:[E.jsxs("div",{className:"panel-header",children:[E.jsx("div",{className:"panel-title",children:e("Backlog")}),E.jsx("div",{className:"panel-subtitle",children:Ma.length===0?e("No tasks"):e("{{count}} item(s)",{count:Ma.length})})]}),Ma.length===0?E.jsx("div",{className:"backlog-empty",children:e("No pending tasks at the moment.")}):E.jsx("ul",{className:"backlog-list",children:Ma.map(re=>{var fe;return E.jsxs("li",{className:"backlog-item",children:[E.jsx("div",{className:"backlog-text",children:wl(re.text,180)}),E.jsxs("div",{className:"backlog-actions",children:[E.jsx("button",{type:"button",className:"ghost",onClick:()=>$x(re),children:e("Edit")}),E.jsx("button",{type:"button",onClick:()=>Ux(re),disabled:!g,children:e("Launch")}),E.jsx("button",{type:"button",className:"ghost",onClick:()=>Wx(re.id),children:e("Delete")})]}),(fe=re.attachments)!=null&&fe.length?E.jsx("div",{className:"backlog-meta",children:e("{{count}} attachment(s)",{count:re.attachments.length})}):null]},re.id)})})]})}),E.jsx("div",{className:"side-footer",children:E.jsxs("button",{type:"button",className:`side-footer-button ${yt==="settings"?"is-active":""}`,onClick:cg,"aria-pressed":yt==="settings",children:[E.jsx("span",{className:"side-footer-icon","aria-hidden":"true",children:E.jsx(Be,{icon:Rb})}),e("Settings")]})})]}),E.jsxs("section",{className:"conversation is-chat-narrow",ref:Am,children:[E.jsxs("div",{className:"pane-stack",children:[E.jsx(SB,{t:e,activePane:yt,handleViewSelect:Oa,handleDiffSelect:Gx,terminalEnabled:ba,hasMessages:J2,handleClearChat:oE}),E.jsx(Q8,{t:e,activePane:yt,listRef:Sa,showChatInfoPanel:Dx,repoTitle:Tx,activeBranchLabel:rg,shortSha:ng,activeCommit:dn,showProviderMeta:Px,activeProviderLabel:ig,activeModelLabel:sg,showInternetAccess:Ax,showGitCredentialsShared:Lx,activeTaskLabel:Rx,currentMessages:Yn,chatHistoryWindow:Ex,activeChatKey:ur,setShowOlderMessagesByTab:Nu,showChatCommands:ge,showToolResults:We,commandPanelOpen:ek,setCommandPanelOpen:Is,toolResultPanelOpen:tk,setToolResultPanelOpen:Ns,renderMessageAttachments:n2,currentProcessing:Ws,currentInteractionBlocked:Vs,currentActivity:Nx,extractVibe80Blocks:iz,handleChoiceClick:l2,choiceSelections:i2,openVibe80Form:o2,copyTextToClipboard:G1,openFileInExplorer:Yx,setInput:o,inputRef:Ca,markBacklogItemDone:Hx,setBacklogMessagePage:Vx,activeWorktreeId:qe,BACKLOG_PAGE_SIZE:lz,MAX_USER_DISPLAY_LENGTH:az,getTruncatedText:wl,annotationMode:D,scopedAnnotations:Tu,setAnnotationDraft:W2,removeAnnotation:V2,addOrFocusAnnotation:K2}),E.jsx(x.Suspense,{fallback:null,children:E.jsx(JF,{t:e,activePane:yt,isInWorktree:Ze,diffStatusLines:z2,connected:g,currentProcessing:Ws,hasCurrentChanges:$2,sendCommitMessage:wx,diffFiles:F2,currentDiff:B2,untrackedFilePanels:U2,untrackedLoading:H2})}),E.jsx(x.Suspense,{fallback:null,children:E.jsx(YF,{t:e,activePane:yt,repoName:Os,activeWorktree:ke,isInWorktree:Ze,activeWorktreeId:qe,attachmentSession:f,requestExplorerTree:Ou,requestExplorerStatus:Mu,activeExplorer:Qm,renderExplorerNodes:dg,explorerStatusByPath:Du,explorerDirStatus:Z2,saveExplorerFile:eE,updateExplorerDraft:Zx,setActiveExplorerFile:Jx,closeExplorerFile:Xx,startExplorerRename:tE,createExplorerFile:rE,createExplorerFolder:nE,deleteExplorerSelection:iE,getLanguageForPath:Lz,themeMode:Xe})}),E.jsx(x.Suspense,{fallback:null,children:E.jsx(XF,{t:e,terminalEnabled:ba,activePane:yt,repoName:Os,activeWorktree:ke,isInWorktree:Ze,terminalContainerRef:Pm,attachmentSession:f})}),E.jsx(x.Suspense,{fallback:null,children:E.jsx(ZF,{t:e,activePane:yt,filteredRpcLogs:b2,logFilter:_2,setLogFilter:y2,scopedRpcLogs:w2,handleClearRpcLogs:sE})}),E.jsx(x.Suspense,{fallback:null,children:E.jsx(QF,{t:e,activePane:yt,handleSettingsBack:Fx,language:t,setLanguage:r,showChatCommands:ge,setShowChatCommands:Ge,showToolResults:We,setShowToolResults:Je,notificationsEnabled:xt,setNotificationsEnabled:xi,themeMode:Xe,setThemeMode:Et,gitIdentityName:Kk,setGitIdentityName:e2,gitIdentityEmail:Gk,setGitIdentityEmail:t2,gitIdentityGlobal:qk,gitIdentityRepo:Yk,gitIdentityLoading:Jk,gitIdentitySaving:Xk,gitIdentityError:Qk,gitIdentityMessage:Zk,handleSaveGitIdentity:r2,attachmentSession:f})})]}),E.jsx(bB,{t:e,activePane:yt,isDraggingAttachments:ax,onSubmit:ux,onDragEnterComposer:px,onDragOverComposer:dx,onDragLeaveComposer:mx,onDropAttachments:gx,composerRef:Lm,draftAttachments:Bs,getAttachmentExtension:dz,formatAttachmentSize:pz,removeDraftAttachment:vx,commandMenuOpen:nx,filteredCommands:ox,setInput:o,setCommandMenuOpen:eg,setCommandQuery:ix,inputRef:Ca,commandSelection:sx,triggerAttachmentPicker:_x,attachmentSession:f,attachmentsLoading:$m,isMobileLayout:hn,uploadInputRef:Em,onUploadAttachments:fx,input:a,handleInputChange:lx,handleComposerKeyDown:cx,onPasteAttachments:hx,canInterrupt:Ox,interruptTurn:Kx,connected:g,modelSelectorVisible:Mx,modelOptions:Jm,selectedModel:Bx,modelLoading:Xm,modelDisabled:jx,modelError:Y2,onModelChange:rx,isCodexReady:lg,interactionBlocked:Vs,attachmentsError:zm})]})]}),Aa?E.jsx("div",{className:"vibe80-form-overlay",role:"dialog","aria-modal":"true",onClick:Cu,children:E.jsxs("div",{className:"vibe80-form-dialog",onClick:re=>re.stopPropagation(),children:[E.jsxs("div",{className:"vibe80-form-header",children:[E.jsx("div",{className:"vibe80-form-title",children:Aa.question||e("Form")}),E.jsx("button",{type:"button",className:"vibe80-form-close","aria-label":e("Close"),onClick:Cu,children:E.jsx(Be,{icon:si})})]}),E.jsxs("form",{className:"vibe80-form-body",onSubmit:re=>{if(Vs){re.preventDefault();return}a2(re)},children:[Aa.fields.map(re=>{const fe=`vibe80-${Aa.key}-${re.id}`,xe=Wm[re.id]??"";return re.type==="checkbox"?E.jsx("div",{className:"vibe80-form-field",children:E.jsxs("label",{className:"vibe80-form-checkbox",children:[E.jsx("input",{type:"checkbox",checked:!!Wm[re.id],onChange:Te=>zs(re.id,Te.target.checked)}),E.jsx("span",{children:re.label})]})},re.id):re.type==="textarea"?E.jsxs("div",{className:"vibe80-form-field",children:[E.jsx("label",{className:"vibe80-form-label",htmlFor:fe,children:re.label}),E.jsx("textarea",{id:fe,className:"vibe80-form-input",rows:4,value:xe,onChange:Te=>zs(re.id,Te.target.value)})]},re.id):re.type==="radio"?E.jsxs("div",{className:"vibe80-form-field",children:[E.jsx("div",{className:"vibe80-form-label",children:re.label}),E.jsx("div",{className:"vibe80-form-options",children:(re.choices||[]).length?re.choices.map(Te=>E.jsxs("label",{className:"vibe80-form-option",children:[E.jsx("input",{type:"radio",name:fe,value:Te,checked:xe===Te,onChange:()=>zs(re.id,Te)}),E.jsx("span",{children:Te})]},`${re.id}-${Te}`)):E.jsx("div",{className:"vibe80-form-empty",children:e("No options.")})})]},re.id):re.type==="select"?E.jsxs("div",{className:"vibe80-form-field",children:[E.jsx("label",{className:"vibe80-form-label",htmlFor:fe,children:re.label}),E.jsx("select",{id:fe,className:"vibe80-form-input vibe80-form-select",value:xe,onChange:Te=>zs(re.id,Te.target.value),children:(re.choices||[]).length?re.choices.map(Te=>E.jsx("option",{value:Te,children:Te},`${re.id}-${Te}`)):E.jsx("option",{value:"",children:e("No options")})})]},re.id):E.jsxs("div",{className:"vibe80-form-field",children:[E.jsx("label",{className:"vibe80-form-label",htmlFor:fe,children:re.label}),E.jsx("input",{id:fe,className:"vibe80-form-input",type:"text",value:xe,onChange:Te=>zs(re.id,Te.target.value)})]},re.id)}),E.jsxs("div",{className:"vibe80-form-actions",children:[E.jsx("button",{type:"button",className:"vibe80-form-cancel",onClick:Cu,children:e("Cancel")}),E.jsx("button",{type:"submit",className:"vibe80-form-submit",disabled:Vs,children:e("Send")})]})]})]})}):null,Vk?E.jsx("div",{className:"handoff-modal-overlay",role:"dialog","aria-modal":"true",onClick:jm,children:E.jsxs("div",{className:"handoff-modal",onClick:re=>re.stopPropagation(),children:[E.jsxs("div",{className:"handoff-modal-header",children:[E.jsx("div",{className:"handoff-modal-title",children:e("Continue on mobile")}),E.jsx("button",{type:"button",className:"handoff-modal-close","aria-label":e("Close"),onClick:jm,children:E.jsx(Be,{icon:si})})]}),E.jsxs("div",{className:"handoff-modal-body",children:[E.jsx("p",{className:"handoff-modal-text",children:e("Scan this QR code in the Android app to resume the current session.")}),Om?E.jsx("div",{className:"handoff-modal-error",children:Om}):null,Rm?E.jsx("div",{className:"handoff-modal-qr",children:E.jsx("img",{src:Rm,alt:e("QR code")})}):E.jsx("div",{className:"handoff-modal-placeholder",children:e(wu?"Generating QR code...":"QR code unavailable.")}),typeof bu=="number"?E.jsx("div",{className:"handoff-modal-meta",children:bu>0?e("Expires in {{seconds}}s",{seconds:bu}):e("QR code expired")}):null,E.jsx("div",{className:"handoff-modal-actions",children:E.jsx("button",{type:"button",className:"session-button",onClick:Mm,disabled:wu,children:e("Regenerate")})})]})]})}):null,wm?E.jsx("div",{className:"worktree-close-confirm-overlay",role:"dialog","aria-modal":"true",onClick:Iu,children:E.jsxs("div",{className:"worktree-close-confirm-dialog",onClick:re=>re.stopPropagation(),children:[E.jsxs("div",{className:"worktree-close-confirm-header",children:[E.jsx("div",{className:"worktree-close-confirm-title",children:e("Close the worktree?")}),E.jsx("button",{type:"button",className:"worktree-close-confirm-close","aria-label":e("Close"),onClick:Iu,children:E.jsx(Be,{icon:si})})]}),E.jsx("div",{className:"worktree-close-confirm-body",children:e("All changes will be lost. What would you like to do?")}),E.jsxs("div",{className:"worktree-close-confirm-actions",children:[E.jsx("button",{type:"button",className:"worktree-close-confirm-cancel",onClick:Iu,children:e("Cancel")}),E.jsx("button",{type:"button",className:"worktree-close-confirm-delete",onClick:Cx,children:e("Delete worktree")})]})]})}):null,js?E.jsxs("div",{className:"attachment-modal",role:"dialog","aria-modal":"true",onClick:()=>Um(null),children:[E.jsx("button",{type:"button",className:"attachment-modal-close","aria-label":e("Close"),onClick:()=>Um(null),children:E.jsx(Be,{icon:si})}),E.jsxs("div",{className:"attachment-modal-body",onClick:re=>re.stopPropagation(),children:[E.jsx("img",{src:js.url,alt:js.name||e("Preview")}),js.name?E.jsx("div",{className:"attachment-modal-name",children:js.name}):null]})]}):null]})}B4({immediate:!0});ow(document.getElementById("root")).render(E.jsx(Tc.StrictMode,{children:E.jsx(HF,{children:E.jsx(Tz,{})})}));export{Be as F,cL as H,Tc as W,jz as a,Oz as b,Mz as c,Fz as d,Bz as e,Rz as f,Nz as i,E as j,x as r};