@monotykamary/localterm 1.13.1 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,116 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=o(((e,t)=>{t.exports=p()})),h=o((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=o((e=>{var t=m(),n=f(),r=g();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,h=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],ee=-1;function B(e){return{current:e}}function V(e){0>ee||(e.current=z[ee],z[ee]=null,ee--)}function H(e,t){ee++,z[ee]=e.current,e.current=t}var U=B(null),te=B(null),W=B(null),ne=B(null);function G(e,t){switch(H(W,t),H(te,e),H(U,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}V(U),H(U,e)}function re(){V(U),V(te),V(W)}function ie(e){e.memoizedState!==null&&H(ne,e);var t=U.current,n=qd(t,e.type);t!==n&&(H(te,e),H(U,n))}function ae(e){te.current===e&&(V(U),V(te)),ne.current===e&&(V(ne),tp._currentValue=R)}var oe,se;function ce(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``,se=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+oe+e+se}var le=!1;function ue(e,t){if(!e||le)return``;le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{le=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ce(n):``}function de(e,t){switch(e.tag){case 26:case 27:case 5:return ce(e.type);case 16:return ce(`Lazy`);case 13:return e.child!==t&&t!==null?ce(`Suspense Fallback`):ce(`Suspense`);case 19:return ce(`SuspenseList`);case 0:case 15:return ue(e.type,!1);case 11:return ue(e.type.render,!1);case 1:return ue(e.type,!0);case 31:return ce(`Activity`);default:return``}}function fe(e){try{var t=``,n=null;do t+=de(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var pe=Object.prototype.hasOwnProperty,me=t.unstable_scheduleCallback,he=t.unstable_cancelCallback,ge=t.unstable_shouldYield,_e=t.unstable_requestPaint,ve=t.unstable_now,ye=t.unstable_getCurrentPriorityLevel,be=t.unstable_ImmediatePriority,xe=t.unstable_UserBlockingPriority,Se=t.unstable_NormalPriority,Ce=t.unstable_LowPriority,we=t.unstable_IdlePriority,Te=t.log,Ee=t.unstable_setDisableYieldValue,De=null,Oe=null;function ke(e){if(typeof Te==`function`&&Ee(e),Oe&&typeof Oe.setStrictMode==`function`)try{Oe.setStrictMode(De,e)}catch{}}var Ae=Math.clz32?Math.clz32:Ne,je=Math.log,Me=Math.LN2;function Ne(e){return e>>>=0,e===0?32:31-(je(e)/Me|0)|0}var Pe=256,Fe=262144,Ie=4194304;function Le(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Re(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Le(n))):i=Le(o):i=Le(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Le(n))):i=Le(o)):i=Le(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Be(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ve(){var e=Ie;return Ie<<=1,!(Ie&62914560)&&(Ie=4194304),e}function He(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ue(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function We(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ae(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ge(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ge(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ae(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ke(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ae(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function qe(e,t){var n=t&-t;return n=n&42?1:Je(n),(n&(e.suspendedLanes|t))===0?n:0}function Je(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ye(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Xe(){var e=L.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function Ze(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var Qe=Math.random().toString(36).slice(2),$e=`__reactFiber$`+Qe,et=`__reactProps$`+Qe,tt=`__reactContainer$`+Qe,nt=`__reactEvents$`+Qe,rt=`__reactListeners$`+Qe,it=`__reactHandles$`+Qe,at=`__reactResources$`+Qe,ot=`__reactMarker$`+Qe;function st(e){delete e[$e],delete e[et],delete e[nt],delete e[rt],delete e[it]}function ct(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tt]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gf(e);e!==null;){if(n=e[$e])return n;e=gf(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[$e]||e[tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function dt(e){var t=e[at];return t||=e[at]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[ot]=!0}var pt=new Set,mt={};function ht(e,t){gt(e,t),gt(e+`Capture`,t)}function gt(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var _t=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),vt={},yt={};function bt(e){return pe.call(yt,e)?!0:pe.call(vt,e)?!1:_t.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function xt(e,t,n){if(bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function St(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ct(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dt(e){if(!e._valueTracker){var t=Tt(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Tt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+wt(t)):e.value!==``+wt(t)&&(e.value=``+wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,wt(n)):Pt(e,o,wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+wt(s):e.removeAttribute(`name`)}function Nt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Dt(e);return}n=n==null?``:``+wt(n),t=t==null?n:``+wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Dt(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function It(e,t,n){if(t!=null&&(t=``+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+wt(n)}function Lt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Bt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Vt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Bt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Bt(e,o,t[o])}function Ht(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ut=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Wt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gt(e){return Wt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Kt(){}var qt=null;function Jt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yt=null,Xt=null;function Zt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[et]||null;if(!a)throw Error(i(90));Mt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ot(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Qt=!1;function $t(e,t,n){if(Qt)return e(t,n);Qt=!0;try{return e(t)}finally{if(Qt=!1,(Yt!==null||Xt!==null)&&(Su(),Yt&&(t=Yt,e=Xt,Xt=Yt=null,Zt(t),e)))for(t=0;t<e.length;t++)Zt(e[t])}}function en(e,t){var n=e.stateNode;if(n===null)return null;var r=n[et]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,`passive`,{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,sn=null;function cn(){if(sn)return sn;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return sn=i.slice(e,1<r?1-r:void 0)}function ln(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 un(){return!0}function dn(){return!1}function fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?un:dn,this.isPropagationStopped=dn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mn=fn(pn),hn=p({},pn,{view:0,detail:0}),gn=fn(hn),_n,vn,yn,bn=p({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jn,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!==yn&&(yn&&e.type===`mousemove`?(_n=e.screenX-yn.screenX,vn=e.screenY-yn.screenY):vn=_n=0,yn=e),_n)},movementY:function(e){return`movementY`in e?e.movementY:vn}}),xn=fn(bn),Sn=fn(p({},bn,{dataTransfer:0})),Cn=fn(p({},hn,{relatedTarget:0})),wn=fn(p({},pn,{animationName:0,elapsedTime:0,pseudoElement:0})),Tn=fn(p({},pn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),En=fn(p({},pn,{data:0})),Dn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},On={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`},kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kn[e])?!!t[e]:!1}function jn(){return An}var Mn=fn(p({},hn,{key:function(e){if(e.key){var t=Dn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?On[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jn,charCode:function(e){return e.type===`keypress`?ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Nn=fn(p({},bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=fn(p({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jn})),Fn=fn(p({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=fn(p({},bn,{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})),Ln=fn(p({},pn,{newState:0,oldState:0})),Rn=[9,13,27,32],zn=tn&&`CompositionEvent`in window,Bn=null;tn&&`documentMode`in document&&(Bn=document.documentMode);var Vn=tn&&`TextEvent`in window&&!Bn,Hn=tn&&(!zn||Bn&&8<Bn&&11>=Bn),Un=` `,Wn=!1;function Gn(e,t){switch(e){case`keyup`:return Rn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Kn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var qn=!1;function Jn(e,t){switch(e){case`compositionend`:return Kn(t);case`keypress`:return t.which===32?(Wn=!0,Un):null;case`textInput`:return e=t.data,e===Un&&Wn?null:e;default:return null}}function Yn(e,t){if(qn)return e===`compositionend`||!zn&&Gn(e,t)?(e=cn(),sn=on=an=null,qn=!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 Hn&&t.locale!==`ko`?null:t.data;default:return null}}var Xn={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 Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Xn[e.type]:t===`textarea`}function Qn(e,t,n,r){Yt?Xt?Xt.push(r):Xt=[r]:Yt=r,t=Ad(t,`onChange`),0<t.length&&(n=new mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var $n=null,er=null;function tr(e){Sd(e,0)}function nr(e){if(Ot(ut(e)))return e}function rr(e,t){if(e===`change`)return t}var ir=!1;if(tn){var ar;if(tn){var or=`oninput`in document;if(!or){var sr=document.createElement(`div`);sr.setAttribute(`oninput`,`return;`),or=typeof sr.oninput==`function`}ar=or}else ar=!1;ir=ar&&(!document.documentMode||9<document.documentMode)}function cr(){$n&&($n.detachEvent(`onpropertychange`,lr),er=$n=null)}function lr(e){if(e.propertyName===`value`&&nr(er)){var t=[];Qn(t,er,e,Jt(e)),$t(tr,t)}}function ur(e,t,n){e===`focusin`?(cr(),$n=t,er=n,$n.attachEvent(`onpropertychange`,lr)):e===`focusout`&&cr()}function dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return nr(er)}function fr(e,t){if(e===`click`)return nr(t)}function pr(e,t){if(e===`input`||e===`change`)return nr(t)}function K(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var mr=typeof Object.is==`function`?Object.is:K;function hr(e,t){if(mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!pe.call(t,i)||!mr(e[i],t[i]))return!1}return!0}function gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _r(e,t){var n=gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=gr(n)}}function vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=kt(e.document)}return t}function br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var xr=tn&&`documentMode`in document&&11>=document.documentMode,Sr=null,Cr=null,wr=null,Tr=!1;function Er(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tr||Sr==null||Sr!==kt(r)||(r=Sr,`selectionStart`in r&&br(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wr&&hr(wr,r)||(wr=r,r=Ad(Cr,`onSelect`),0<r.length&&(t=new mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Sr)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Or={animationend:Dr(`Animation`,`AnimationEnd`),animationiteration:Dr(`Animation`,`AnimationIteration`),animationstart:Dr(`Animation`,`AnimationStart`),transitionrun:Dr(`Transition`,`TransitionRun`),transitionstart:Dr(`Transition`,`TransitionStart`),transitioncancel:Dr(`Transition`,`TransitionCancel`),transitionend:Dr(`Transition`,`TransitionEnd`)},kr={},Ar={};tn&&(Ar=document.createElement(`div`).style,`AnimationEvent`in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),`TransitionEvent`in window||delete Or.transitionend.transition);function jr(e){if(kr[e])return kr[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ar)return kr[e]=t[n];return e}var Mr=jr(`animationend`),Nr=jr(`animationiteration`),Pr=jr(`animationstart`),Fr=jr(`transitionrun`),Ir=jr(`transitionstart`),Lr=jr(`transitioncancel`),Rr=jr(`transitionend`),zr=new Map,Br=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Br.push(`scrollEnd`);function Vr(e,t){zr.set(e,t),ht(t,[e])}var Hr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ur=[],Wr=0,Gr=0;function Kr(){for(var e=Wr,t=Gr=Wr=0;t<e;){var n=Ur[t];Ur[t++]=null;var r=Ur[t];Ur[t++]=null;var i=Ur[t];Ur[t++]=null;var a=Ur[t];if(Ur[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Xr(n,i,a)}}function qr(e,t,n,r){Ur[Wr++]=e,Ur[Wr++]=t,Ur[Wr++]=n,Ur[Wr++]=r,Gr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Jr(e,t,n,r){return qr(e,t,n,r),Zr(e)}function Yr(e,t){return qr(e,null,null,t),Zr(e)}function Xr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ae(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Zr(e){if(50<pu)throw pu=0,mu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qr={};function $r(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(e,t,n,r){return new $r(e,t,n,r)}function ti(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ni(e,t){var n=e.alternate;return n===null?(n=ei(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ri(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ii(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ti(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,U.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ei(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ai(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ei(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ei(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ei(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ai(e,t,n,r){return e=ei(7,e,r,t),e.lanes=n,e}function oi(e,t,n){return e=ei(6,e,null,t),e.lanes=n,e}function si(e){var t=ei(18,null,null,0);return t.stateNode=e,t}function ci(e,t,n){return t=ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=new WeakMap;function ui(e,t){if(typeof e==`object`&&e){var n=li.get(e);return n===void 0?(t={value:e,source:t,stack:fe(t)},li.set(e,t),t):n}return{value:e,source:t,stack:fe(t)}}var di=[],fi=0,pi=null,mi=0,hi=[],gi=0,_i=null,vi=1,yi=``;function bi(e,t){di[fi++]=mi,di[fi++]=pi,pi=e,mi=t}function xi(e,t,n){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,_i=e;var r=vi;e=yi;var i=32-Ae(r)-1;r&=~(1<<i),n+=1;var a=32-Ae(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vi=1<<32-Ae(t)+i|n<<i|r,yi=a+e}else vi=1<<a|n<<i|r,yi=e}function Si(e){e.return!==null&&(bi(e,1),xi(e,1,0))}function Ci(e){for(;e===pi;)pi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null;for(;e===_i;)_i=hi[--gi],hi[gi]=null,yi=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null}function wi(e,t){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,vi=t.id,yi=t.overflow,_i=e}var Ti=null,Ei=null,Di=!1,Oi=null,ki=!1,Ai=Error(i(519));function ji(e){throw Li(ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ai}function Mi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[$e]=e,t[et]=r,n){case`dialog`:Cd(`cancel`,t),Cd(`close`,t);break;case`iframe`:case`object`:case`embed`:Cd(`load`,t);break;case`video`:case`audio`:for(n=0;n<bd.length;n++)Cd(bd[n],t);break;case`source`:Cd(`error`,t);break;case`img`:case`image`:case`link`:Cd(`error`,t),Cd(`load`,t);break;case`details`:Cd(`toggle`,t);break;case`input`:Cd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Cd(`invalid`,t);break;case`textarea`:Cd(`invalid`,t),Lt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Id(t.textContent,n)?(r.popover!=null&&(Cd(`beforetoggle`,t),Cd(`toggle`,t)),r.onScroll!=null&&Cd(`scroll`,t),r.onScrollEnd!=null&&Cd(`scrollend`,t),r.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||ji(e,!0)}function Ni(e){for(Ti=e.return;Ti;)switch(Ti.tag){case 5:case 31:case 13:ki=!1;return;case 27:case 3:ki=!0;return;default:Ti=Ti.return}}function Pi(e){if(e!==Ti)return!1;if(!Di)return Ni(e),Di=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Jd(e.type,e.memoizedProps)),n=!n),n&&Ei&&ji(e),Ni(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=hf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=hf(e)}else t===27?(t=Ei,nf(e.type)?(e=mf,mf=null,Ei=e):Ei=t):Ei=Ti?pf(e.stateNode.nextSibling):null;return!0}function Fi(){Ei=Ti=null,Di=!1}function Ii(){var e=Oi;return e!==null&&($l===null?$l=e:$l.push.apply($l,e),Oi=null),e}function Li(e){Oi===null?Oi=[e]:Oi.push(e)}var Ri=B(null),zi=null,Bi=null;function Vi(e,t,n){H(Ri,t._currentValue),t._currentValue=n}function Hi(e){e._currentValue=Ri.current,V(Ri)}function Ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Wi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ui(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ui(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Gi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ne.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}a=a.return}e!==null&&Wi(t,e,n,r),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){zi=e,Bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ji(e){return Xi(zi,e)}function Yi(e,t){return zi===null&&qi(e),Xi(e,t)}function Xi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Bi===null){if(e===null)throw Error(i(308));Bi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Bi=Bi.next=t;return n}var Zi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Qi=t.unstable_scheduleCallback,$i=t.unstable_NormalPriority,ea={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ta(){return{controller:new Zi,data:new Map,refCount:0}}function na(e){e.refCount--,e.refCount===0&&Qi($i,function(){e.controller.abort()})}var ra=null,ia=0,aa=0,oa=null;function sa(e,t){if(ra===null){var n=ra=[];ia=0,aa=md(),oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ia++,t.then(q,q),t}function q(){if(--ia===0&&ra!==null){oa!==null&&(oa.status=`fulfilled`);var e=ra;ra=null,aa=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ca(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var la=I.S;I.S=function(e,t){nu=ve(),typeof t==`object`&&t&&typeof t.then==`function`&&sa(e,t),la!==null&&la(e,t)};var ua=B(null);function da(){var e=ua.current;return e===null?Ll.pooledCache:e}function fa(e,t){t===null?H(ua,ua.current):H(ua,t.pool)}function pa(){var e=da();return e===null?null:{parent:ea._currentValue,pool:e}}var ma=Error(i(460)),ha=Error(i(474)),ga=Error(i(542)),_a={then:function(){}};function va(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e;default:if(typeof t.status==`string`)t.then(Kt,Kt);else{if(e=Ll,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e}throw xa=t,ma}}function ba(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(xa=e,ma):e}}var xa=null;function Sa(){if(xa===null)throw Error(i(459));var e=xa;return xa=null,e}function Ca(e){if(e===ma||e===ga)throw Error(i(483))}var wa=null,Ta=0;function Ea(e){var t=Ta;return Ta+=1,wa===null&&(wa=[]),ya(wa,e,t)}function Da(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Oa(e,t){throw t.$$typeof===h?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ka(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ni(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=oi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&ba(i)===t.type)?(t=a(t,n.props),Da(t,n),t.return=e,t):(t=ii(n.type,n.key,n.props,null,e.mode,r),Da(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ai(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ii(t.type,t.key,t.props,null,e.mode,n),Da(n,t),n.return=e,n;case v:return t=ci(t,e.mode,n),t.return=e,t;case O:return t=ba(t),f(e,t,n)}if(F(t)||M(t))return t=ai(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ea(t),n);if(t.$$typeof===C)return f(e,Yi(e,t),n);Oa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ba(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ea(n),r);if(n.$$typeof===C)return p(e,t,Yi(e,n),r);Oa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ba(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ea(r),i);if(r.$$typeof===C)return m(e,t,n,Yi(t,r),i);Oa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Di&&bi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Di&&bi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Di&&bi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Di&&bi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Di&&bi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Di&&bi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ba(l)===r.type){n(e,r.sibling),c=a(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ai(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ii(o.type,o.key,o.props,null,e.mode,c),Da(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ci(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ba(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ea(o),c);if(o.$$typeof===C)return b(e,r,Yi(e,o),c);Oa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=b(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Il&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Zr(e),Xr(e,null,n),t}return qr(e,r,t,n),Zr(e)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=oa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(zl&f)===f:(r&f)===f){f!==0&&f===aa&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ma=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ql|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ha(n[e],t)}var Wa=B(null),Ga=B(0);function Ka(e,t){e=Gl,H(Ga,e),H(Wa,t),Gl=e|t.baseLanes}function qa(){H(Ga,Gl),H(Wa,Wa.current)}function Ja(){Gl=Ga.current,V(Wa),V(Ga)}var Ya=B(null),Xa=null;function Za(e){var t=e.alternate;H(no,no.current&1),H(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){H(no,no.current),H(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(H(no,no.current),H(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){H(no,no.current),H(Ya,Ya.current)}function to(e){V(Ya),Xa===e&&(Xa=null),V(no)}var no=B(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uf(n)||df(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)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 io=0,ao=null,oo=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(i(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return io=a,ao=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Ps:Fs,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){I.H=Ns;var t=oo!==null&&oo.next!==null;if(io=0,so=oo=ao=null,co=!1,po=0,mo=null,t)throw Error(i(300));e===null||Qs||(e=e.dependencies,e!==null&&Ki(e)&&(Qs=!0))}function bo(e,t,n,r){ao=e;var a=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=a)throw Error(i(301));if(a+=1,so=oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=Is,o=t(n,r)}while(lo);return o}function xo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(oo===null?null:oo.memoizedState)!==e&&(ao.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}io=0,so=oo=ao=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?ao.memoizedState=so=e:so=so.next=e,so}function Eo(){if(oo===null){var e=ao.alternate;e=e===null?null:e.memoizedState}else e=oo.next;var t=so===null?ao.memoizedState:so.next;if(t!==null)so=t,oo=e;else{if(e===null)throw ao.alternate===null?Error(i(467)):Error(i(310));oo=e,e={memoizedState:oo.memoizedState,baseState:oo.baseState,baseQueue:oo.baseQueue,queue:oo.queue,next:null},so===null?ao.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=ya(mo,e,t),t=ao,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Ps:Fs),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===C)return Ji(e)}throw Error(i(438,String(e)))}function Ao(e){var t=null,n=ao.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ao.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Do(),ao.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),oo,e)}function No(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(io&f)===f:(zl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===aa&&(d=!0);else if((io&p)===p){u=u.next,p===aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,ao.lanes|=p,ql|=p;f=u.action,uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,ao.lanes|=f,ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!mr(o,e.memoizedState)&&(Qs=!0,d&&(n=oa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Po(e){var t=Eo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);mr(o,t.memoizedState)||(Qs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=ao,a=Eo(),o=Di;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!mr((oo||a).memoizedState,n);if(s&&(a.memoizedState=n,Qs=!0),a=a.queue,as(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,es(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||io&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ao.updateQueue,t===null?(t=Do(),ao.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mr(e,n)}catch{return!0}}function Bo(e){var t=Yr(e,2);t!==null&&_u(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){ke(!0);try{n()}finally{ke(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,oo,typeof r==`function`?r:jo)}function Uo(e,t,n,r,a){if(As(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,J(t,o)):(o.next=n.next,t.pending=n.next=o)}}function J(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Wo(e,t,s)}catch(n){Ko(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Wo(e,t,a)}catch(n){Ko(e,t,n)}}function Wo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Go(e,t,n)},function(n){return Ko(e,t,n)}):Go(e,t,n)}function Go(e,t,n){t.status=`fulfilled`,t.value=n,qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,J(e,n)))}function Ko(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,qo(t),t=t.next;while(t!==r)}e.action=null}function qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Jo(e,t){return t}function Yo(e,t){if(Di){var n=Ll.formState;if(n!==null){a:{var r=ao;if(Di){if(Ei){b:{for(var i=Ei,a=ki;i.nodeType!==8;){if(!a){i=null;break b}if(i=pf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ei=pf(i.nextSibling),r=i.data===`F!`;break a}}ji(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:t},n.queue=r,n=Ds.bind(null,ao,r),r.dispatch=n,r=Vo(!1),a=ks.bind(null,ao,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,ao,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Xo(e){return Zo(Eo(),oo,e)}function Zo(e,t,n){if(t=No(e,t,Jo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ma?ga:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ao.flags|=2048,es(9,{destroy:void 0},Qo.bind(null,i,n),null)),[r,a,e]}function Qo(e,t){e.action=t}function $o(e){var t=Eo(),n=oo;if(n!==null)return Zo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function es(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ao.updateQueue,t===null&&(t=Do(),ao.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ts(){return Eo().memoizedState}function ns(e,t,n,r){var i=To();ao.flags|=e,i.memoizedState=es(1|t,{destroy:void 0},n,r===void 0?null:r)}function rs(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;oo!==null&&r!==null&&_o(r,oo.memoizedState.deps)?i.memoizedState=es(t,a,n,r):(ao.flags|=e,i.memoizedState=es(1|t,a,n,r))}function is(e,t){ns(8390656,8,e,t)}function as(e,t){rs(2048,8,e,t)}function os(e){ao.flags|=4;var t=ao.updateQueue;if(t===null)t=Do(),ao.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ss(e){var t=Eo().memoizedState;return os({ref:t,nextImpl:e}),function(){if(Il&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function cs(e,t){return rs(4,2,e,t)}function ls(e,t){return rs(4,4,e,t)}function us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ds(e,t,n){n=n==null?null:n.concat([e]),rs(4,4,us.bind(null,t,e),n)}function fs(){}function ps(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ms(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r}function hs(e,t,n){return n===void 0||io&1073741824&&!(zl&261930)?e.memoizedState=t:(e.memoizedState=n,e=gu(),ao.lanes|=e,ql|=e,n)}function gs(e,t,n,r){return mr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(zl&261930)?(Qs=!0,e.memoizedState=n):(e=gu(),ao.lanes|=e,ql|=e,t):(e=hs(e,n,r),mr(e,t)||(Qs=!0),e)}function _s(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,ks(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Os(e,t,ca(c,r),hu(e)):Os(e,t,r,hu(e))}catch(n){Os(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=bs(e).queue;_s(e,a,t,R,n===null?vs:function(){return xs(e),n(r)})}function bs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},hu())}function Ss(){return Ji(tp)}function Cs(){return Eo().memoizedState}function ws(){return Eo().memoizedState}function Ts(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(_u(r,t,n),La(r,t,n)),t={cache:ta()},e.payload=t;return}t=t.return}}function Es(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},As(e)?js(t,n):(n=Jr(e,t,n,r),n!==null&&(_u(n,e,r),Ms(n,t,r)))}function Ds(e,t,n){Os(e,t,n,hu())}function Os(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))js(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,mr(s,o))return qr(e,t,i,0),Ll===null&&Kr(),!1}catch{}if(n=Jr(e,t,i,r),n!==null)return _u(n,e,r),Ms(n,t,r),!0}return!1}function ks(e,t,n,r){if(r={lane:2,revertLane:md(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(i(479))}else t=Jr(e,n,r,2),t!==null&&_u(t,e,2)}function As(e){var t=e.alternate;return e===ao||t!==null&&t===ao}function js(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ms(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}var Ns={readContext:Ji,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ns.useEffectEvent=go;var Ps={readContext:Ji,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:Ji,useEffect:is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ns(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){ke(!0);try{n(t)}finally{ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Es.bind(null,ao,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Ds.bind(null,ao,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=_s.bind(null,ao,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ao,a=To();if(Di){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));zl&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Ro.bind(null,r,o,e),[e]),r.flags|=2048,es(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Ll.identifierPrefix;if(Di){var n=yi,r=vi;n=(r&~(1<<32-Ae(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ss,useFormState:Yo,useActionState:Yo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ks.bind(null,ao,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=Ts.bind(null,ao)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(Il&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Fs={readContext:Ji,use:ko,useCallback:ps,useContext:Ji,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:Mo,useRef:ts,useState:function(){return Mo(jo)},useDebugValue:fs,useDeferredValue:function(e,t){return gs(Eo(),oo.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:Cs,useHostTransitionStatus:Ss,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){return Ho(Eo(),oo,e,t)},useMemoCache:Ao,useCacheRefresh:ws};Fs.useEffectEvent=ss;var Is={readContext:Ji,use:ko,useCallback:ps,useContext:Ji,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:Po,useRef:ts,useState:function(){return Po(jo)},useDebugValue:fs,useDeferredValue:function(e,t){var n=Eo();return oo===null?hs(n,e,t):gs(n,oo.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:Cs,useHostTransitionStatus:Ss,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){var n=Eo();return oo===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,oo,e,t)},useMemoCache:Ao,useCacheRefresh:ws};Is.useEffectEvent=ss;function Ls(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hu(),r=Fa(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(_u(t,e,n),La(t,e,n))}};function zs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!hr(n,r)||!hr(i,a):!0}function Bs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Rs.enqueueReplaceState(t,t.state,null)}function Vs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Hs(e){Hr(e)}function Us(e){console.error(e)}function Ws(e){Hr(e)}function Gs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ks(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){return n=Fa(n),n.tag=3,n.payload={element:null},n.callback=function(){Gs(e,t)},n}function Js(e){return e=Fa(e),e.tag=3,e}function Ys(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ks(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ks(t,n,r),typeof i!=`function`&&(au===null?au=new Set([this]):au.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Xs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Gi(t,n,a,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?ku():n.alternate===null&&Kl===0&&(Kl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ju(e,r,a)),!1;case 22:return n.flags|=65536,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ju(e,r,a)),!1}throw Error(i(435,n.tag))}return Ju(e,r,a),ku(),!1}if(Di)return t=Ya.current,t===null?(r!==Ai&&(t=Error(i(423),{cause:r}),Li(ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ui(r,n),a=qs(e.stateNode,r,a),Ra(e,a),Kl!==4&&(Kl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ai&&(e=Error(i(422),{cause:r}),Li(ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ui(o,n),Ql===null?Ql=[o]:Ql.push(o),Kl!==4&&(Kl=2),t===null)return!0;r=ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=qs(n.stateNode,r,e),Ra(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(au===null||!au.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Js(a),Ys(a,e,n,r),Ra(n,a),!1}n=n.return}while(n!==null);return!1}var Zs=Error(i(461)),Qs=!1;function $s(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function ec(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return qi(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!Qs?(Co(e,t,i),wc(e,t,i)):(Di&&s&&Si(t),t.flags|=1,$s(e,t,r,i),t.child)}function tc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ti(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nc(e,t,a,r,i)):(e=ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Tc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?hr:n,n(o,r)&&e.ref===t.ref)return wc(e,t,i)}return t.flags|=1,e=ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(hr(a,r)&&e.ref===t.ref)if(Qs=!1,t.pendingProps=r=a,Tc(e,i))e.flags&131072&&(Qs=!0);else return t.lanes=e.lanes,wc(e,t,i)}return uc(e,t,n,r,i)}function rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ac(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,ac(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),qa(),eo(t)):(fa(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return $s(e,t,i,n),t.child}function ic(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ac(e,t,n,r,i){var a=da();return a=a===null?null:{parent:ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),qa(),$a(t),e!==null&&Gi(e,t,r,!0),t.childLanes=i,null}function oc(e,t){return t=yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sc(e,t,n){return Aa(t,e.child,null,n),e=oc(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function cc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Di){if(r.mode===`hidden`)return e=oc(t,r),t.lanes=536870912,ic(null,e);if(Qa(t),(e=Ei)?(e=lf(e,ki),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return t.lanes=536870912,null}return oc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),a)if(t.flags&256)t.flags&=-257,t=sc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Qs||Gi(e,t,n,!1),a=(n&e.childLanes)!==0,Qs||a){if(r=Ll,r!==null&&(s=qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Yr(e,s),_u(r,e,s),Zs;ku(),t=sc(e,t,n)}else e=o.treeContext,Ei=pf(s.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=oc(t,r),t.flags|=4096;return t}return e=ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function uc(e,t,n,r,i){return qi(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!Qs?(Co(e,t,i),wc(e,t,i)):(Di&&r&&Si(t),t.flags|=1,$s(e,t,n,i),t.child)}function dc(e,t,n,r,i,a){return qi(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!Qs?(Co(e,t,a),wc(e,t,a)):(Di&&r&&Si(t),t.flags|=1,$s(e,t,n,a),t.child)}function fc(e,t,n,r,i){if(qi(t),t.stateNode===null){var a=Qr,o=n.contextType;typeof o==`object`&&o&&(a=Ji(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Rs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?Ji(o):Qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ls(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Rs.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Vs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Qr,typeof u==`object`&&u&&(o=Ji(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Bs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Ls(t,n,d,r),l=t.memoizedState),(c=Ma||zs(t,n,c,r,f,l,o))?(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=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Pa(e,t),o=t.memoizedProps,u=Vs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Qr,typeof l==`object`&&l&&(c=Ji(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Bs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof s==`function`&&(Ls(t,n,s,r),p=t.memoizedState),(u=Ma||zs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,lc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):$s(e,t,n,i),t.memoizedState=a.state,e=t.child):e=wc(e,t,i),e}function pc(e,t,n,r){return Fi(),t.flags|=256,$s(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:pa()}}function gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Xl),e}function _c(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(no.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Di){if(a?Za(t):eo(t),(e=Ei)?(e=lf(e,ki),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return df(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(eo(t),a=t.mode,c=yc({mode:`hidden`,children:c},a),r=ai(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(null,r)):(Za(t),vc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=bc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,a=t.mode,r=yc({mode:`visible`,children:r.children},a),c=ai(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,t=ic(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(t),df(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Li({value:r,source:null,stack:null}),t=bc(e,t,n)}else if(Qs||Gi(e,t,n,!1),s=(n&e.childLanes)!==0,Qs||s){if(s=Ll,s!==null&&(r=qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Yr(e,r),_u(s,e,r),Zs;uf(c)||ku(),t=bc(e,t,n)}else uf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ei=pf(c.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=vc(t,r.children),t.flags|=4096);return t}return a?(eo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ni(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ai(c,a,n,null),c.flags|=2):c=ni(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ic(null,r),r=t.child,c=e.child.memoizedState,c===null?c=hc(n):(a=c.cachePool,a===null?a=pa():(l=ea._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=ni(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function vc(e,t){return t=yc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function yc(e,t){return e=ei(22,e,null,t),e.lanes=0,e}function bc(e,t,n){return Aa(t,e.child,null,n),e=vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ui(e.return,t,n)}function Sc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,H(no,o),$s(e,t,r,n),r=Di?mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xc(e,n,t);else if(e.tag===19)xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sc(t,!0,n,null,a,r);break;case`together`:Sc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function wc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Gi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Tc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ki(e))):!0}function Ec(e,t,n){switch(t.tag){case 3:G(t,t.stateNode.containerInfo),Vi(t,ea,e.memoizedState.cache),Fi();break;case 27:case 5:ie(t);break;case 4:G(t,t.stateNode.containerInfo);break;case 10:Vi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=wc(e,t,n),e===null?null:e.sibling):_c(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Gi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),H(no,no.current),r)break;return null;case 22:return t.lanes=0,rc(e,t,n,t.pendingProps);case 24:Vi(t,ea,e.memoizedState.cache)}return wc(e,t,n)}function Dc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qs=!0;else{if(!Tc(e,n)&&!(t.flags&128))return Qs=!1,Ec(e,t,n);Qs=!!(e.flags&131072)}else Qs=!1,Di&&t.flags&1048576&&xi(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e==`function`)ti(e)?(r=Vs(e,r),t.tag=1,t=fc(null,t,e,r,n)):(t.tag=0,t=uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ec(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=tc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Vs(r,t.pendingProps),fc(e,t,r,a,n);case 3:a:{if(G(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Pa(e,t),Va(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Vi(t,ea,r),r!==o.cache&&Wi(t,[ea],n,!0),Ba(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=pc(e,t,r,n);break a}else if(r!==a){a=ui(Error(i(424)),t),Li(a),t=pc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ei=pf(e.firstChild),Ti=t,Di=!0,Oi=null,ki=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fi(),r===a){t=wc(e,t,n);break a}$s(e,t,r,n)}t=t.child}return t;case 26:return lc(e,t),e===null?(n=Nf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Di||(n=t.type,e=t.pendingProps,r=Gd(W.current).createElement(n),r[$e]=t,r[et]=e,zd(r,n,e),ft(r),t.stateNode=r):t.memoizedState=Nf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Di&&(r=t.stateNode=_f(t.type,t.pendingProps,W.current),Ti=t,ki=!0,a=Ei,nf(t.type)?(mf=a,Ei=pf(r.firstChild)):Ei=a),$s(e,t,t.pendingProps.children,n),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Di&&((a=r=Ei)&&(r=sf(r,t.type,t.pendingProps,ki),r===null?a=!1:(t.stateNode=r,Ti=t,Ei=pf(r.firstChild),ki=!1,a=!0)),a||ji(t)),ie(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Jd(a,o)?r=null:s!==null&&Jd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=vo(e,t,xo,null,null,n),tp._currentValue=a),lc(e,t),$s(e,t,r,n),t.child;case 6:return e===null&&Di&&((e=n=Ei)&&(n=cf(n,t.pendingProps,ki),n===null?e=!1:(t.stateNode=n,Ti=t,Ei=null,e=!0)),e||ji(t)),null;case 13:return _c(e,t,n);case 4:return G(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):$s(e,t,r,n),t.child;case 11:return ec(e,t,t.type,t.pendingProps,n);case 7:return $s(e,t,t.pendingProps,n),t.child;case 8:return $s(e,t,t.pendingProps.children,n),t.child;case 12:return $s(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Vi(t,t.type,r.value),$s(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,qi(t),a=Ji(a),r=r(a),t.flags|=1,$s(e,t,r,n),t.child;case 14:return tc(e,t,t.type,t.pendingProps,n);case 15:return nc(e,t,t.type,t.pendingProps,n);case 19:return Cc(e,t,n);case 31:return cc(e,t,n);case 22:return rc(e,t,n,t.pendingProps);case 24:return qi(t),r=Ji(ea),e===null?(a=da(),a===null&&(a=Ll,o=ta(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Na(t),Vi(t,ea,a)):((e.lanes&n)!==0&&(Pa(e,t),Va(t,null,null,n),Ba()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Vi(t,ea,r),r!==a.cache&&Wi(t,[ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Vi(t,ea,r))),$s(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Oc(e){e.flags|=4}function kc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Eu())e.flags|=8192;else throw xa=_a,ha}else e.flags&=-16777217}function Ac(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t))if(Eu())e.flags|=8192;else throw xa=_a,ha}function jc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ve(),e.lanes|=t,Zl|=t)}function Mc(e,t){if(!Di)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pc(e,t,n){var r=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nc(t),null;case 1:return Nc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hi(ea),re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pi(t)?Oc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ii())),Nc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Oc(t),o===null?(Nc(t),kc(t,a,null,r,n)):(Nc(t),Ac(t,o))):o?o===e.memoizedState?(Nc(t),t.flags&=-16777217):(Oc(t),Nc(t),Ac(t,o)):(e=e.memoizedProps,e!==r&&Oc(t),Nc(t),kc(t,a,e,r,n)),null;case 27:if(ae(t),n=W.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}e=U.current,Pi(t)?Mi(t,e):(e=_f(a,r,n),t.stateNode=e,Oc(t))}return Nc(t),null;case 5:if(ae(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}if(o=U.current,Pi(t))Mi(t,o);else{var s=Gd(W.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[$e]=t,o[et]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(zd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Oc(t)}}return Nc(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=W.current,Pi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ti,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[$e]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||ji(t,!0)}else e=Gd(e).createTextNode(r),e[$e]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Pi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[$e]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(i(558))}return Nc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Pi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[$e]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),a=!1}else a=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(to(t),t):(to(t),null)}return to(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),jc(t,t.updateQueue),Nc(t),null);case 4:return re(),e===null&&Ed(t.stateNode.containerInfo),Nc(t),null;case 10:return Hi(t.type),Nc(t),null;case 19:if(V(no),r=t.memoizedState,r===null)return Nc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Mc(r,!1);else{if(Kl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Mc(r,!1),e=o.updateQueue,t.updateQueue=e,jc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ri(n,e),n=n.sibling;return H(no,no.current&1|2),Di&&bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ve()>ru&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,jc(t,e),Mc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Di)return Nc(t),null}else 2*ve()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Nc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ve(),e.sibling=null,n=no.current,H(no,a?n&1|2:n&1),Di&&bi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Nc(t),t.subtreeFlags&6&&(t.flags|=8192)):Nc(t),n=t.updateQueue,n!==null&&jc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&V(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Hi(ea),Nc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Fc(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hi(ea),re(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ae(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(no),null;case 4:return re(),null;case 10:return Hi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&V(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hi(ea),null;case 25:return null;default:return null}}function Ic(e,t){switch(Ci(t),t.tag){case 3:Hi(ea),re();break;case 26:case 27:case 5:ae(t);break;case 4:re();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:V(no);break;case 10:Hi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&V(ua);break;case 24:Hi(ea)}}function Lc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){qu(t,t.return,e)}}function Rc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){qu(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){qu(e,e.return,t)}}}function Bc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){qu(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){qu(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){qu(e,t,n)}else n.current=null}function Uc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){qu(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[et]=t}catch(t){qu(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nf(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&nf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[$e]=e,t[et]=n}catch(t){qu(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Ud=up,e=yr(e),br(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Wd={focusedElem:e,selectionRange:n},up=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Vs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)of(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:of(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,el=e;break}el=t.return}}function nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:_l(e,n),r&4&&Lc(5,n);break;case 1:if(_l(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){qu(n,n.return,e)}else{var i=Vs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){qu(n,n.return,e)}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(_l(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ua(e,t)}catch(e){qu(n,n.return,e)}}break;case 27:t===null&&r&4&&Yc(n);case 26:case 5:_l(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:_l(e,n);break;case 31:_l(e,n),r&4&&cl(e,n);break;case 13:_l(e,n),r&4&&ll(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Zu.bind(null,n),ff(e,n))));break;case 22:if(r=n.memoizedState!==null||Xc,!r){t=t!==null&&t.memoizedState!==null||Zc,i=Xc;var a=Zc;Xc=r,(Zc=t)&&!a?yl(e,n,(n.subtreeFlags&8772)!=0):_l(e,n),Xc=i,Zc=a}break;case 30:break;default:_l(e,n)}}function rl(e){var t=e.alternate;t!==null&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&st(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var il=null,al=!1;function ol(e,t,n){for(n=n.child;n!==null;)sl(e,t,n),n=n.sibling}function sl(e,t,n){if(Oe&&typeof Oe.onCommitFiberUnmount==`function`)try{Oe.onCommitFiberUnmount(De,n)}catch{}switch(n.tag){case 26:Zc||Hc(n,t),ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zc||Hc(n,t);var r=il,i=al;nf(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),vf(n.stateNode),il=r,al=i;break;case 5:Zc||Hc(n,t);case 6:if(r=il,i=al,il=null,ol(e,t,n),il=r,al=i,il!==null)if(al)try{(il.nodeType===9?il.body:il.nodeName===`HTML`?il.ownerDocument.body:il).removeChild(n.stateNode)}catch(e){qu(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){qu(n,t,e)}break;case 18:il!==null&&(al?(e=il,rf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):rf(il,n.stateNode));break;case 4:r=il,i=al,il=n.stateNode.containerInfo,al=!0,ol(e,t,n),il=r,al=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Zc||Rc(4,n,t),ol(e,t,n);break;case 1:Zc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),ol(e,t,n);break;case 21:ol(e,t,n);break;case 22:Zc=(r=Zc)||n.memoizedState!==null,ol(e,t,n),Zc=r;break;default:ol(e,t,n)}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){qu(t,t.return,e)}}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){qu(t,t.return,e)}}function ul(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $c),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $c),t;default:throw Error(i(435,e.tag))}}function dl(e,t){var n=ul(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Qu.bind(null,e,t);t.then(r,r)}})}function fl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(nf(c.type)){il=c.stateNode,al=!1;break a}break;case 5:il=c.stateNode,al=!1;break a;case 3:case 4:il=c.stateNode.containerInfo,al=!0;break a}c=c.return}if(il===null)throw Error(i(160));sl(o,s,a),il=null,al=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ml(t,e),t=t.sibling}var pl=null;function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),hl(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&64&&Xc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=pl;if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ot]||o[$e]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),zd(o,r,n),o[$e]=e,ft(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Wf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[$e]=e,ft(o),r=o}e.stateNode=r}else Gf(a,e.type,e.stateNode);else e.stateNode=zf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(a,e.type,e.stateNode):zf(a,r,e.memoizedProps))}break;case 27:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),e.flags&32){a=e.stateNode;try{Rt(a,``)}catch(t){qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Wc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Qc=!0);break;case 6:if(fl(t,e),hl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){qu(e,e.return,t)}}break;case 3:if(Uf=null,a=pl,pl=xf(t.containerInfo),fl(t,e),pl=a,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){qu(e,e.return,t)}Qc&&(Qc=!1,gl(e));break;case 4:r=pl,pl=xf(e.stateNode.containerInfo),fl(t,e),hl(e),pl=r;break;case 12:fl(t,e),hl(e);break;case 31:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),hl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(tu=ve()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Xc,d=Zc;if(Xc=u||a,Zc=d||l,fl(t,e),Zc=d,Xc=u,hl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Xc||Zc||vl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?af(m,!0):af(l.stateNode,!1)}catch(e){qu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,dl(e,n))));break;case 19:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),hl(e)}}function hl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Jc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Rt(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nl(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),vl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),vl(t);break;case 27:vf(t.stateNode);case 26:case 5:Hc(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function yl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:yl(i,a,n),Lc(4,a);break;case 1:if(yl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ha(c[i],s)}catch(e){qu(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Yc(a);case 26:case 5:yl(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:yl(i,a,n);break;case 31:yl(i,a,n),n&&o&4&&cl(i,a);break;case 13:yl(i,a,n),n&&o&4&&ll(i,a);break;case 22:a.memoizedState===null&&yl(i,a,n),Vc(a,a.return);break;case 30:break;default:yl(i,a,n)}t=t.sibling}}function bl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&na(n))}function xl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e))}function Sl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cl(e,t,n,r),t=t.sibling}function Cl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:Sl(e,t,n,r);break;case 3:Sl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e)));break;case 12:if(i&2048){Sl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){qu(t,t.return,e)}}else Sl(e,t,n,r);break;case 31:Sl(e,t,n,r);break;case 13:Sl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Sl(e,t,n,r):(a._visibility|=2,wl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Sl(e,t,n,r):Tl(e,t),i&2048&&bl(o,t);break;case 24:Sl(e,t,n,r),i&2048&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function wl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:wl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,wl(a,o,s,c,i)):u._visibility&2?wl(a,o,s,c,i):Tl(a,o),i&&l&2048&&bl(o.alternate,o);break;case 24:wl(a,o,s,c,i),i&&l&2048&&xl(o.alternate,o);break;default:wl(a,o,s,c,i)}t=t.sibling}}function Tl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Tl(n,r),i&2048&&bl(r.alternate,r);break;case 24:Tl(n,r),i&2048&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var El=8192;function Dl(e,t,n){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Ol(e,t,n),e=e.sibling}function Ol(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&El&&e.memoizedState!==null&&Jf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=xf(e.stateNode.containerInfo),Dl(e,t,n),pl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,Dl(e,t,n),El=r):Dl(e,t,n));break;default:Dl(e,t,n)}}function kl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jl(e),e=e.sibling}function jl(e){switch(e.tag){case 0:case 11:case 15:Al(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Al(e);break;case 12:Al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):Al(e);break;default:Al(e)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),Ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function Nl(e,t){for(;el!==null;){var n=el;switch(n.tag){case 0:case 11:case 15:Rc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,el=r;else a:for(n=e;el!==null;){r=el;var i=r.sibling,a=r.return;if(rl(r),r===n){el=null;break a}if(i!==null){i.return=a,el=i;break a}el=a}}}var Pl={getCacheForType:function(e){var t=Ji(ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ji(ea).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Il=0,Ll=null,Rl=null,zl=0,Bl=0,Vl=null,Hl=!1,Ul=!1,Wl=!1,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=null,$l=null,eu=!1,tu=0,nu=0,ru=1/0,iu=null,au=null,ou=0,su=null,cu=null,lu=0,uu=0,du=null,fu=null,pu=0,mu=null;function hu(){return Il&2&&zl!==0?zl&-zl:I.T===null?Xe():md()}function gu(){if(Xl===0)if(!(zl&536870912)||Di){var e=Fe;Fe<<=1,!(Fe&3932160)&&(Fe=262144),Xl=e}else Xl=536870912;return e=Ya.current,e!==null&&(e.flags|=32),Xl}function _u(e,t,n){(e===Ll&&(Bl===2||Bl===9)||e.cancelPendingCommit!==null)&&(wu(e,0),xu(e,zl,Xl,!1)),Ue(e,n),(!(Il&2)||e!==Ll)&&(e===Ll&&(!(Il&2)&&(Jl|=n),Kl===4&&xu(e,zl,Xl,!1)),od(e))}function vu(e,t,n){if(Il&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ze(e,t),a=r?Mu(e,t):Au(e,t,!0),o=r;do{if(a===0){Ul&&!r&&xu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!bu(n)){a=Au(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Ql;var l=c.current.memoizedState.isDehydrated;if(l&&(wu(c,s).flags|=256),s=Au(c,s,!1),s!==2){if(Wl&&!l){c.errorRecoveryDisabledLanes|=o,Jl|=o,a=4;break a}o=$l,$l=a,o!==null&&($l===null?$l=o:$l.push.apply($l,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){wu(e,0),xu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:xu(r,t,Xl,!Hl);break a;case 2:$l=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=tu+300-ve(),10<a)){if(xu(r,t,Xl,!Hl),Re(r,0,!0)!==0)break a;lu=t,r.timeoutHandle=Zd(yu.bind(null,r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,`Throttled`,-0,0),a);break a}yu(r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,null,-0,0)}}break}while(1);od(e)}function yu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},Ol(t,a,d);var m=(a&62914560)===a?tu-ve():(a&4194048)===a?nu-ve():0;if(m=Xf(d,m),m!==null){lu=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),xu(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function bu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 xu(e,t,n,r){t&=~Yl,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ae(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ge(e,n,t)}function Su(){return Il&6?!0:(sd(0,!1),!1)}function Cu(){if(Rl!==null){if(Bl===0)var e=Rl.return;else e=Rl,Bi=zi=null,wo(e),wa=null,Ta=0,e=Rl;for(;e!==null;)Ic(e.alternate,e),e=e.return;Rl=null}}function wu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lu=0,Cu(),Ll=e,Rl=n=ni(e.current,null),zl=t,Bl=0,Vl=null,Hl=!1,Ul=ze(e,t),Wl=!1,Zl=Xl=Yl=Jl=ql=Kl=0,$l=Ql=null,eu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ae(r),a=1<<i;t|=e[i],r&=~a}return Gl=t,Kr(),n}function Tu(e,t){ao=null,I.H=Ns,t===ma||t===ga?(t=Sa(),Bl=3):t===ha?(t=Sa(),Bl=4):Bl=t===Zs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Vl=t,Rl===null&&(Kl=1,Gs(e,ui(t,e.current)))}function Eu(){var e=Ya.current;return e===null?!0:(zl&4194048)===zl?Xa===null:(zl&62914560)===zl||zl&536870912?e===Xa:!1}function Du(){var e=I.H;return I.H=Ns,e===null?Ns:e}function Ou(){var e=I.A;return I.A=Pl,e}function ku(){Kl=4,Hl||(zl&4194048)!==zl&&Ya.current!==null||(Ul=!0),!(ql&134217727)&&!(Jl&134217727)||Ll===null||xu(Ll,zl,Xl,!1)}function Au(e,t,n){var r=Il;Il|=2;var i=Du(),a=Ou();(Ll!==e||zl!==t)&&(iu=null,wu(e,t)),t=!1;var o=Kl;a:do try{if(Bl!==0&&Rl!==null){var s=Rl,c=Vl;switch(Bl){case 8:Cu(),o=6;break a;case 3:case 2:case 9:case 6:Ya.current===null&&(t=!0);var l=Bl;if(Bl=0,Vl=null,Iu(e,s,c,l),n&&Ul){o=0;break a}break;default:l=Bl,Bl=0,Vl=null,Iu(e,s,c,l)}}ju(),o=Kl;break}catch(t){Tu(e,t)}while(1);return t&&e.shellSuspendCounter++,Bi=zi=null,Il=r,I.H=i,I.A=a,Rl===null&&(Ll=null,zl=0,Kr()),o}function ju(){for(;Rl!==null;)Pu(Rl)}function Mu(e,t){var n=Il;Il|=2;var r=Du(),a=Ou();Ll!==e||zl!==t?(iu=null,ru=ve()+500,wu(e,t)):Ul=ze(e,t);a:do try{if(Bl!==0&&Rl!==null){t=Rl;var o=Vl;b:switch(Bl){case 1:Bl=0,Vl=null,Iu(e,t,o,1);break;case 2:case 9:if(va(o)){Bl=0,Vl=null,Fu(t);break}t=function(){Bl!==2&&Bl!==9||Ll!==e||(Bl=7),od(e)},o.then(t,t);break a;case 3:Bl=7;break a;case 4:Bl=5;break a;case 7:va(o)?(Bl=0,Vl=null,Fu(t)):(Bl=0,Vl=null,Iu(e,t,o,7));break;case 5:var s=null;switch(Rl.tag){case 26:s=Rl.memoizedState;case 5:case 27:var c=Rl;if(s?qf(s):c.stateNode.complete){Bl=0,Vl=null;var l=c.sibling;if(l!==null)Rl=l;else{var u=c.return;u===null?Rl=null:(Rl=u,Lu(u))}break b}}Bl=0,Vl=null,Iu(e,t,o,5);break;case 6:Bl=0,Vl=null,Iu(e,t,o,6);break;case 8:Cu(),Kl=6;break a;default:throw Error(i(462))}}Nu();break}catch(t){Tu(e,t)}while(1);return Bi=zi=null,I.H=r,I.A=a,Il=n,Rl===null?(Ll=null,zl=0,Kr(),Kl):0}function Nu(){for(;Rl!==null&&!ge();)Pu(Rl)}function Pu(e){var t=Dc(e.alternate,e,Gl);e.memoizedProps=e.pendingProps,t===null?Lu(e):Rl=t}function Fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=dc(n,t,t.pendingProps,t.type,void 0,zl);break;case 11:t=dc(n,t,t.pendingProps,t.type.render,t.ref,zl);break;case 5:wo(t);default:Ic(n,t),t=Rl=ri(t,Gl),t=Dc(n,t,Gl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):Rl=t}function Iu(e,t,n,r){Bi=zi=null,wo(t),wa=null,Ta=0;var i=t.return;try{if(Xs(e,i,t,n,zl)){Kl=1,Gs(e,ui(n,e.current)),Rl=null;return}}catch(t){if(i!==null)throw Rl=i,t;Kl=1,Gs(e,ui(n,e.current)),Rl=null;return}t.flags&32768?(Di||r===1?e=!0:Ul||zl&536870912?e=!1:(Hl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Hl);return}e=t.return;var n=Pc(t.alternate,t,Gl);if(n!==null){Rl=n;return}if(t=t.sibling,t!==null){Rl=t;return}Rl=t=e}while(t!==null);Kl===0&&(Kl=5)}function Ru(e,t){do{var n=Fc(e.alternate,e);if(n!==null){n.flags&=32767,Rl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Rl=e;return}Rl=e=n}while(e!==null);Kl=6,Rl=null}function zu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Wu();while(ou!==0);if(Il&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Gr,We(e,n,o,s,c,l),e===Ll&&(Rl=Ll=null,zl=0),cu=t,su=e,lu=n,uu=o,du=a,fu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,$u(Se,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=Il,Il|=4;try{tl(e,t,n)}finally{Il=s,L.p=a,I.T=r}}ou=1,Bu(),Vu(),Hu()}}function Bu(){if(ou===1){ou=0;var e=su,t=cu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Il;Il|=4;try{ml(t,e);var a=Wd,o=yr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&vr(s.ownerDocument.documentElement,s)){if(c!==null&&br(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=_r(s,h),v=_r(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}up=!!Ud,Wd=Ud=null}finally{Il=i,L.p=r,I.T=n}}e.current=t,ou=2}}function Vu(){if(ou===2){ou=0;var e=su,t=cu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Il;Il|=4;try{nl(e,t.alternate,t)}finally{Il=i,L.p=r,I.T=n}}ou=3}}function Hu(){if(ou===4||ou===3){ou=0,_e();var e=su,t=cu,n=lu,r=fu;t.subtreeFlags&10256||t.flags&10256?ou=5:(ou=0,cu=su=null,Uu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(au=null),Ye(n),t=t.stateNode,Oe&&typeof Oe.onCommitFiberRoot==`function`)try{Oe.onCommitFiberRoot(De,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{I.T=t,L.p=i}}lu&3&&Wu(),od(e),i=e.pendingLanes,n&261930&&i&42?e===mu?pu++:(pu=0,mu=e):pu=0,sd(0,!1)}}function Uu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,na(t)))}function Wu(){return Bu(),Vu(),Hu(),Gu()}function Gu(){if(ou!==5)return!1;var e=su,t=uu;uu=0;var n=Ye(lu),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Il&6)throw Error(i(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,sd(0,!1),Oe&&typeof Oe.onPostCommitFiberRoot==`function`)try{Oe.onPostCommitFiberRoot(De,o)}catch{}return!0}finally{L.p=a,I.T=r,Uu(e,t)}}function Ku(e,t,n){t=ui(n,t),t=qs(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ue(e,2),od(e))}function qu(e,t,n){if(e.tag===3)Ku(e,e,n);else for(;t!==null;){if(t.tag===3){Ku(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=ui(n,e),n=Js(2),r=Ia(t,n,2),r!==null&&(Ys(n,r,t,e),Ue(r,2),od(r));break}}t=t.return}}function Ju(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Yu.bind(null,e,t,n),t.then(e,e))}function Yu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(zl&n)===n&&(Kl===4||Kl===3&&(zl&62914560)===zl&&300>ve()-tu?!(Il&2)&&wu(e,0):Yl|=n,Zl===zl&&(Zl=0)),od(e)}function Xu(e,t){t===0&&(t=Ve()),e=Yr(e,t),e!==null&&(Ue(e,t),od(e))}function Zu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xu(e,n)}function Qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Xu(e,n)}function $u(e,t){return me(e,t)}var ed=null,td=null,nd=!1,rd=!1,id=!1,ad=0;function od(e){e!==td&&e.next===null&&(td===null?ed=td=e:td=td.next=e),rd=!0,nd||(nd=!0,pd())}function sd(e,t){if(!id&&rd){id=!0;do for(var n=!1,r=ed;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ae(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,fd(r,a))}else a=zl,a=Re(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ze(r,a)||(n=!0,fd(r,a));r=r.next}while(n);id=!1}}function cd(){ld()}function ld(){rd=nd=!1;var e=0;ad!==0&&Xd()&&(e=ad);for(var t=ve(),n=null,r=ed;r!==null;){var i=r.next,a=ud(r,t);a===0?(r.next=null,n===null?ed=i:n.next=i,i===null&&(td=n)):(n=r,(e!==0||a&3)&&(rd=!0)),r=i}ou!==0&&ou!==5||sd(e,!1),ad!==0&&(ad=0)}function ud(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ae(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Be(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=zl,n=Re(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Bl===2||Bl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&he(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&he(r),Ye(n)){case 2:case 8:n=xe;break;case 32:n=Se;break;case 268435456:n=we;break;default:n=Se}return r=dd.bind(null,e),n=me(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&he(r),e.callbackPriority=2,e.callbackNode=null,2}function dd(e,t){if(ou!==0&&ou!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Wu()&&e.callbackNode!==n)return null;var r=zl;return r=Re(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(vu(e,r,t),ud(e,ve()),e.callbackNode!=null&&e.callbackNode===n?dd.bind(null,e):null)}function fd(e,t){if(Wu())return null;vu(e,t,!0)}function pd(){ef(function(){Il&6?me(be,cd):ld()})}function md(){if(ad===0){var e=aa;e===0&&(e=Pe,Pe<<=1,!(Pe&261888)&&(Pe=256)),ad=e}return ad}function hd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Gt(``+e)}function gd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function _d(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=hd((i[et]||null).action),o=r.submitter;o&&(t=(t=o[et]||null)?hd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ad!==0){var e=o?gd(i,o):new FormData(i);ys(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?gd(i,o):new FormData(i),ys(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var vd=0;vd<Br.length;vd++){var yd=Br[vd];Vr(yd.toLowerCase(),`on`+(yd[0].toUpperCase()+yd.slice(1)))}Vr(Mr,`onAnimationEnd`),Vr(Nr,`onAnimationIteration`),Vr(Pr,`onAnimationStart`),Vr(`dblclick`,`onDoubleClick`),Vr(`focusin`,`onFocus`),Vr(`focusout`,`onBlur`),Vr(Fr,`onTransitionRun`),Vr(Ir,`onTransitionStart`),Vr(Lr,`onTransitionCancel`),Vr(Rr,`onTransitionEnd`),gt(`onMouseEnter`,[`mouseout`,`mouseover`]),gt(`onMouseLeave`,[`mouseout`,`mouseover`]),gt(`onPointerEnter`,[`pointerout`,`pointerover`]),gt(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var bd=`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(` `),xd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(bd));function Sd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}}}}function Cd(e,t){var n=t[nt];n===void 0&&(n=t[nt]=new Set);var r=e+`__bubble`;n.has(r)||(Dd(t,e,2,!1),n.add(r))}function wd(e,t,n){var r=0;t&&(r|=4),Dd(n,e,r,t)}var Td=`_reactListening`+Math.random().toString(36).slice(2);function Ed(e){if(!e[Td]){e[Td]=!0,pt.forEach(function(t){t!==`selectionchange`&&(xd.has(t)||wd(t,!1,e),wd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Td]||(t[Td]=!0,wd(`selectionchange`,!1,t))}}function Dd(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!nn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Od(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}$t(function(){var r=a,i=Jt(n),s=[];a:{var c=zr.get(e);if(c!==void 0){var l=mn,u=e;switch(e){case`keypress`:if(ln(n)===0)break a;case`keydown`:case`keyup`:l=Mn;break;case`focusin`:u=`focus`,l=Cn;break;case`focusout`:u=`blur`,l=Cn;break;case`beforeblur`:case`afterblur`:l=Cn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Sn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Pn;break;case Mr:case Nr:case Pr:l=wn;break;case Rr:l=Fn;break;case`scroll`:case`scrollend`:l=gn;break;case`wheel`:l=In;break;case`copy`:case`cut`:case`paste`:l=Tn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Nn;break;case`toggle`:case`beforetoggle`:l=Ln}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=en(m,p),g!=null&&d.push(kd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==qt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[tt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=xn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Nn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ut(l),h=u==null?c:ut(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=jd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Md(s,c,l,d,!1),u!==null&&f!==null&&Md(s,f,u,d,!0)}}a:{if(c=r?ut(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=rr;else if(Zn(c))if(ir)v=pr;else{v=dr;var y=ur}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ht(r.elementType)&&(v=rr):v=fr;if(v&&=v(e,r)){Qn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Pt(c,`number`,c.value)}switch(y=r?ut(r):window,e){case`focusin`:(Zn(y)||y.contentEditable===`true`)&&(Sr=y,Cr=r,wr=null);break;case`focusout`:wr=Cr=Sr=null;break;case`mousedown`:Tr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Tr=!1,Er(s,n,i);break;case`selectionchange`:if(xr)break;case`keydown`:case`keyup`:Er(s,n,i)}var b;if(zn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else qn?Gn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Hn&&n.locale!==`ko`&&(qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&qn&&(b=cn()):(an=i,on=`value`in an?an.value:an.textContent,qn=!0)),y=Ad(r,x),0<y.length&&(x=new En(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Kn(n),b!==null&&(x.data=b)))),(b=Vn?Jn(e,n):Yn(e,n))&&(x=Ad(r,`onBeforeInput`),0<x.length&&(y=new En(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),_d(s,e,r,n,i)}Sd(s,t)})}function kd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ad(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=en(e,n),i!=null&&r.unshift(kd(e,i,a)),i=en(e,t),i!=null&&r.push(kd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function jd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Md(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=en(n,a),l!=null&&o.unshift(kd(n,l,c))):i||(l=en(n,a),l!=null&&o.push(kd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Nd=/\r\n?/g,Pd=/\u0000|\uFFFD/g;function Fd(e){return(typeof e==`string`?e:``+e).replace(Nd,`
9
+ `).replace(Pd,``)}function Id(e,t){return t=Fd(t),Fd(e)===t}function Ld(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Ld(e,t,`name`,a.name,a,null),Ld(e,t,`formEncType`,a.formEncType,a,null),Ld(e,t,`formMethod`,a.formMethod,a,null),Ld(e,t,`formTarget`,a.formTarget,a,null)):(Ld(e,t,`encType`,a.encType,a,null),Ld(e,t,`method`,a.method,a,null),Ld(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&Cd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Cd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Cd(`beforetoggle`,e),Cd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ut.get(n)||n,xt(e,n,r))}}function Rd(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&Cd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Cd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[et]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function zd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Cd(`error`,e),Cd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ld(e,t,o,s,n,null)}}a&&Ld(e,t,`srcSet`,n.srcSet,n,null),r&&Ld(e,t,`src`,n.src,n,null);return;case`input`:Cd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Ld(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Cd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Ld(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in Cd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Ld(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Ld(e,t,l,r,n,null)}return;case`dialog`:Cd(`beforetoggle`,e),Cd(`toggle`,e),Cd(`cancel`,e),Cd(`close`,e);break;case`iframe`:case`object`:Cd(`load`,e);break;case`video`:case`audio`:for(r=0;r<bd.length;r++)Cd(bd[r],e);break;case`image`:Cd(`error`,e),Cd(`load`,e);break;case`details`:Cd(`toggle`,e);break;case`embed`:case`source`:case`link`:Cd(`error`,e),Cd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ld(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Rd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ld(e,t,c,r,n,null))}function Bd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Ld(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Ld(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Ld(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ld(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Ld(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Ld(e,t,s,a,r,o)}It(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Ld(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ld(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Ld(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Ld(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Rd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Rd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ld(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Ld(e,t,f,p,r,m)}function Vd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Hd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Vd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Vd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Ud=null,Wd=null;function Gd(e){return e.nodeType===9?e:e.ownerDocument}function Kd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Jd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yd=null;function Xd(){var e=window.event;return e&&e.type===`popstate`?e===Yd?!1:(Yd=e,!0):(Yd=null,!1)}var Zd=typeof setTimeout==`function`?setTimeout:void 0,Qd=typeof clearTimeout==`function`?clearTimeout:void 0,$d=typeof Promise==`function`?Promise:void 0,ef=typeof queueMicrotask==`function`?queueMicrotask:$d===void 0?Zd:function(e){return $d.resolve(null).then(e).catch(tf)};function tf(e){setTimeout(function(){throw e})}function nf(e){return e===`head`}function rf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vf(e.ownerDocument.body);n=i}while(n);Ip(t)}function af(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function of(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:of(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=pf(e.nextSibling),e===null)break}return null}function cf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pf(e.nextSibling),e===null))return null;return e}function lf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pf(e.nextSibling),e===null))return null;return e}function uf(e){return e.data===`$?`||e.data===`$~`}function df(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function ff(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function pf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var mf=null;function hf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function _f(e,t,n){switch(t=Gd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var yf=new Map,bf=new Set;function xf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sf=L.d;L.d={f:Cf,r:wf,D:Df,C:Of,L:kf,m:Af,X:jf,S:Y,M:Mf};function Cf(){var e=Sf.f(),t=Su();return e||t}function wf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?xs(t):Sf.r(e)}var Tf=typeof document>`u`?null:document;function Ef(e,t,n){var r=Tf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bf.has(i)||(bf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Df(e){Sf.D(e),Ef(`dns-prefetch`,e,null)}function Of(e,t){Sf.C(e,t),Ef(`preconnect`,e,t)}function kf(e,t,n){Sf.L(e,t,n);var r=Tf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Pf(e);break;case`script`:a=X(e)}yf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),yf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Ff(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),zd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Af(e,t){Sf.m(e,t);var n=Tf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=X(e)}if(!yf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),yf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),ft(r),n.head.appendChild(r)}}}function Y(e,t,n){Sf.S(e,t,n);var r=Tf;if(r&&e){var i=dt(r).hoistableStyles,a=Pf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Ff(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=yf.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);ft(c),zd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jf(e,t){Sf.X(e,t);var n=Tf;if(n&&e){var r=dt(n).hoistableScripts,i=X(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0},t),(t=yf.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t){Sf.M(e,t);var n=Tf;if(n&&e){var r=dt(n).hoistableScripts,i=X(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=yf.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t,n,r){var a=(a=W.current)?xf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Pf(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pf(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Ff(e)))&&!o._p&&(s.instance=o,s.state.loading=5),yf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},yf.set(e,n),o||Lf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=X(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pf(e){return`href="`+jt(e)+`"`}function Ff(e){return`link[rel="stylesheet"][`+e+`]`}function If(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Lf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),zd(t,`link`,n),ft(t),e.head.appendChild(t))}function X(e){return`[src="`+jt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),zd(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pf(n.href);var o=e.querySelector(Ff(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=If(n),(a=yf.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=X(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,ft(a),a):(r=n,(a=yf.get(o))&&(r=p({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),zd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ot]||a[$e]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pf(r.href),a=t.querySelector(Ff(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=If(r),(i=yf.get(i))&&Vf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Hd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:C,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ei(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function ip(e){return e?(e=Qr,e):Qr}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(_u(n,e,t),La(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=Yr(e,67108864);t!==null&&_u(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=hu();t=Je(t);var n=Yr(e,t);n!==null&&_u(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,pp(e,t,n,r)}finally{L.p=a,I.T=i}}function fp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,pp(e,t,n,r)}finally{L.p=a,I.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Od(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Le(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ae(o);s.entanglements[1]|=c,o&=~c}od(a),!(Il&6)&&(ru=ve()+500,sd(0,!1))}}break;case 31:case 13:s=Yr(a,2),s!==null&&_u(s,a,2),Su(),sp(a,2)}if(a=mp(r),a===null&&Od(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Od(e,t,r,null,n)}}function mp(e){return e=Jt(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ye()){case be:return 2;case xe:return 8;case Se:case Ce:return 32;case we:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[et]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,hu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),Su(),t[tt]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.5`)throw Error(i(527,Bp,`19.2.5`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{De=Hp.inject(Vp),Oe=Hp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Hs,s=Us,c=Ws;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,o,s,c,Lp),e[tt]=t.current,Ed(e),new Rp(t)}})),v=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=u(),b=c(f(),1),x=v(),S=class{constructor(e=new w,t=new C){this._base64=e,this._provider=t}activate(e){this._terminal=e,this._disposable=e.parser.registerOscHandler(52,e=>this._setOrReportClipboard(e))}dispose(){return this._disposable?.dispose()}_readText(e,t){let n=this._base64.encodeText(t);this._terminal?.input(`\x1B]52;${e};${n}\x07`,!1)}_setOrReportClipboard(e){let t=e.split(`;`);if(t.length<2)return!0;let n=t[0],r=t[1];if(r===`?`){let e=this._provider.readText(n);return e instanceof Promise?e.then(e=>(this._readText(n,e),!0)):(this._readText(n,e),!0)}let i=``;try{i=this._base64.decodeText(r)}catch{}let a=this._provider.writeText(n,i);return a instanceof Promise?a.then(()=>!0):!0}},C=class{readText(e){return navigator.clipboard.readText()}writeText(e,t){return navigator.clipboard.writeText(t)}},w=class{encodeText(e){let t=new TextEncoder().encode(e);if(t.toBase64!==void 0)return t.toBase64();let n=``;for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}decodeText(e){if(Uint8Array.fromBase64!==void 0){try{return new TextDecoder().decode(Uint8Array.fromBase64(e))}catch{}return``}try{let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return new TextDecoder().decode(n)}catch{}return``}};function T(e){return e?.ownerDocument?.defaultView?e.ownerDocument.defaultView:window}function E(e){return T(e).getComputedStyle(e,null)}var D=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows)||this._terminal.resize(e.cols,e.rows)}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal.dimensions;if(!e||e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollbar?.showScrollbar??!0,n=this._terminal.options.scrollback===0||!t?0:this._terminal.options.scrollbar?.width??14,r=E(this._terminal.element.parentElement),i=Math.max(0,parseInt(r.getPropertyValue(`height`),10)||0),a=Math.max(0,parseInt(r.getPropertyValue(`width`),10)||0),o=E(this._terminal.element),s={top:parseInt(o.getPropertyValue(`padding-top`),10)||0,bottom:parseInt(o.getPropertyValue(`padding-bottom`),10)||0,right:parseInt(o.getPropertyValue(`padding-right`),10)||0,left:parseInt(o.getPropertyValue(`padding-left`),10)||0},c=s.top+s.bottom,l=s.right+s.left,u=i-c,d=a-l-n;return{cols:Math.max(2,Math.floor(d/e.css.cell.width)),rows:Math.max(1,Math.floor(u/e.css.cell.height))}}},O=Object.create,k=Object.defineProperty,A=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,M=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty,P=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),F=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of j(t))!N.call(e,i)&&i!==n&&k(e,i,{get:()=>t[i],enumerable:!(r=A(t,i))||r.enumerable});return e},I=(e,t,n)=>(n=e==null?{}:O(M(e)),F(t||!e||!e.__esModule?k(n,`default`,{value:e,enumerable:!0}):n,e)),L=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DEFAULT_FOREGROUND=e.DEFAULT_BACKGROUND=e.PALETTE_ANSI_256=e.PALETTE_VT340_GREY=e.PALETTE_VT340_COLOR=e.normalizeHLS=e.normalizeRGB=e.nearestColorIndex=e.fromRGBA8888=e.toRGBA8888=e.alpha=e.blue=e.green=e.red=e.BIG_ENDIAN=void 0,e.BIG_ENDIAN=new Uint8Array(new Uint32Array([4278190080]).buffer)[0]===255,e.BIG_ENDIAN&&console.warn(`BE platform detected. This version of node-sixel works only on LE properly.`);function t(e){return e&255}e.red=t;function n(e){return e>>>8&255}e.green=n;function r(e){return e>>>16&255}e.blue=r;function i(e){return e>>>24&255}e.alpha=i;function a(e,t,n,r=255){return((r&255)<<24|(n&255)<<16|(t&255)<<8|e&255)>>>0}e.toRGBA8888=a;function o(e){return[e&255,e>>8&255,e>>16&255,e>>>24]}e.fromRGBA8888=o;function s(e,i){let a=t(e),o=n(e),s=r(e),c=2**53-1,l=-1;for(let e=0;e<i.length;++e){let t=a-i[e][0],n=o-i[e][1],r=s-i[e][2],u=t*t+n*n+r*r;if(!u)return e;u<c&&(c=u,l=e)}return l}e.nearestColorIndex=s;function c(e,t,n){return Math.max(e,Math.min(n,t))}function l(e,t,n){return n<0&&(n+=1),n>1&&--n,n*6<1?t+(e-t)*6*n:n*2<1?e:n*3<2?t+(e-t)*(4-n*6):t}function u(e,t,n){if(!n){let e=Math.round(t*255);return a(e,e,e)}let r=t<.5?t*(1+n):t+n-t*n,i=2*t-r;return a(c(0,255,Math.round(l(r,i,e+1/3)*255)),c(0,255,Math.round(l(r,i,e)*255)),c(0,255,Math.round(l(r,i,e-1/3)*255)))}function d(e,t,n){return(4278190080|Math.round(n/100*255)<<16|Math.round(t/100*255)<<8|Math.round(e/100*255))>>>0}e.normalizeRGB=d;function f(e,t,n){return u((e+240%360)/360,t/100,n/100)}e.normalizeHLS=f,e.PALETTE_VT340_COLOR=new Uint32Array([d(0,0,0),d(20,20,80),d(80,13,13),d(20,80,20),d(80,20,80),d(20,80,80),d(80,80,20),d(53,53,53),d(26,26,26),d(33,33,60),d(60,26,26),d(33,60,33),d(60,33,60),d(33,60,60),d(60,60,33),d(80,80,80)]),e.PALETTE_VT340_GREY=new Uint32Array([d(0,0,0),d(13,13,13),d(26,26,26),d(40,40,40),d(6,6,6),d(20,20,20),d(33,33,33),d(46,46,46),d(0,0,0),d(13,13,13),d(26,26,26),d(40,40,40),d(6,6,6),d(20,20,20),d(33,33,33),d(46,46,46)]),e.PALETTE_ANSI_256=(()=>{let e=[a(0,0,0),a(205,0,0),a(0,205,0),a(205,205,0),a(0,0,238),a(205,0,205),a(0,250,205),a(229,229,229),a(127,127,127),a(255,0,0),a(0,255,0),a(255,255,0),a(92,92,255),a(255,0,255),a(0,255,255),a(255,255,255)],t=[0,95,135,175,215,255];for(let n=0;n<6;++n)for(let r=0;r<6;++r)for(let i=0;i<6;++i)e.push(a(t[n],t[r],t[i]));for(let t=8;t<=238;t+=10)e.push(a(t,t,t));return new Uint32Array(e)})(),e.DEFAULT_BACKGROUND=a(0,0,0,255),e.DEFAULT_FOREGROUND=a(255,255,255,255)}),R=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.InWasm=n;var t=e=>{if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);if(typeof Buffer<`u`)return Buffer.from(e,`base64`);let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<n.length;++e)n[e]=t.charCodeAt(e);return n};function n(e){if(e.d){let{t:n,s:r,d:i}=e,a,o,s=WebAssembly;return n===0?r?e=>new s.Instance(o||=new s.Module(a||=t(i)),e):e=>o?s.instantiate(o,e):s.instantiate(a||=t(i),e).then(e=>(o=e.module)&&e.instance):n===1?r?()=>o||=new s.Module(a||=t(i)):()=>o?Promise.resolve(o):s.compile(a||=t(i)).then(e=>o=e):r?()=>a||=t(i):()=>Promise.resolve(a||=t(i))}if(typeof _wasmCtx>`u`)throw Error(`must run "inwasm"`);_wasmCtx.add(e)}}),z=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=(0,R().InWasm)({s:1,t:0,d:`AGFzbQEAAAABBQFgAAF/Ag8BA2VudgZtZW1vcnkCAAEDAwIAAAcNAgNkZWMAAANlbmQAAQqLBgKZBAEKf0GIKCgCAEGgKGohAUGEKCgCACIDQaAoaiEAQYAoKAIAQQFrQXxxIgRBoChqIQUgBEEQayADSgRAIARBkChqIQMDQCABIABBA2otAABBAnQoAoAgIABBAmotAABBAnQoAoAYIABBAWotAABBAnQoAoAQIAAtAABBAnQoAoAIcnJyIgY2AgAgAUEDaiAAQQdqLQAAQQJ0KAKAICAAQQZqLQAAQQJ0KAKAGCAAQQVqLQAAQQJ0KAKAECAAQQRqLQAAQQJ0KAKACHJyciIHNgIAIAFBBmogAEELai0AAEECdCgCgCAgAEEKai0AAEECdCgCgBggAEEJai0AAEECdCgCgBAgAEEIai0AAEECdCgCgAhycnIiCDYCACABQQlqIABBD2otAABBAnQoAoAgIABBDmotAABBAnQoAoAYIABBDWotAABBAnQoAoAQIABBDGotAABBAnQoAoAIcnJyIgk2AgAgAiAGciAHciAIciAJciECIAFBDGohASAAQRBqIgAgA0kNAAsLIAAgBUkEQANAIAEgAEEDai0AAEECdCgCgCAgAEECai0AAEECdCgCgBggAEEBai0AAEECdCgCgBAgAC0AAEECdCgCgAhycnIiAzYCACACIANyIQIgAUEDaiEBIABBBGoiACAFSQ0ACwtBfyEAIAJB////B00Ef0GEKCAENgIAQYgoIAFBoChrNgIAQQAFQX8LC+0BAQR/AkBBgCgoAgAiAUGEKCgCACIAa0EFTgRAQX8hAxAADQFBgCgoAgAhAUGEKCgCACEAC0F/IQMgASAAayIBQQJIDQAgAC0AoShBAnQoAoAQIAAtAKAoQQJ0KAKACHIhAgJ/IAFBBEYEQEEDQQQgAC0AoyhBPUYbIAAtAKIoQT1GayEBC0EBIAFBA0kNABogAC0AoihBAnQoAoAYIAJyIQJBAiABQQRHDQAaIAAtAKMoQQJ0KAKAICACciECQQMLIQEgAkH///8HSw0AQQAhA0GIKCgCACIAIAI2AKAoQYgoIAAgAWo2AgALIAML`}),n=new Uint8Array(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``).map(e=>e.charCodeAt(0))),r=new Uint32Array(1024);r.fill(4278190080);for(let e=0;e<n.length;++e)r[n[e]]=e<<2;for(let e=0;e<n.length;++e)r[256+n[e]]=e>>4|(e<<4&255)<<8;for(let e=0;e<n.length;++e)r[512+n[e]]=e>>2<<8|(e<<6&255)<<16;for(let e=0;e<n.length;++e)r[768+n[e]]=e<<16;var i=new Uint8Array;e.default=class{constructor(e,t,n){if(this._inst=null,this._ended=!0,this._bytes=0,this.keepSize=e??1048576,this.maxBytes=t??4294901760,this._bytes=n??32768,this._bytes>this.maxBytes||this.maxBytes>4294901760)throw Error(`invalid byte settings`)}get data8(){return this._inst?this._d.subarray(0,this._m32[1282]):i}release(){this._inst&&(this._bytes>this.keepSize?this._inst=this._m32=this._d=this._mem=null:(this._m32[1280]=0,this._m32[1281]=0,this._m32[1282]=0))}init(e,n){if(this.maxBytes=e??this.maxBytes,this._bytes=n??Math.min(this._bytes,this.maxBytes),this._bytes>this.maxBytes||this.maxBytes>4294901760)throw Error(`invalid byte settings`);let i=this._m32,a=this._bytes+5152;this._inst?this._mem.buffer.byteLength<a&&(this._mem.grow(Math.ceil((a-this._mem.buffer.byteLength)/65536)),i=new Uint32Array(this._mem.buffer,0),this._d=new Uint8Array(this._mem.buffer,5152)):(this._mem=new WebAssembly.Memory({initial:Math.ceil(a/65536)}),this._inst=t({env:{memory:this._mem}}),i=new Uint32Array(this._mem.buffer,0),i.set(r,256),this._d=new Uint8Array(this._mem.buffer,5152)),i[1280]=0,i[1281]=0,i[1282]=0,this._m32=i,this._ended=!1}_realloc(e){let t=this._m32[1280]+e;if(this._bytes<t){if(t>this.maxBytes)return-3;let e=this._bytes;for(;(e*=2)<t;);if(e=Math.min(e,this.maxBytes),e<t)return-3;if(e+5152>this._mem.buffer.byteLength){let t=Math.ceil((e+5152-this._mem.buffer.byteLength)/65536);this._mem.grow(t),this._m32=new Uint32Array(this._mem.buffer,0),this._d=new Uint8Array(this._mem.buffer,5152)}this._bytes=e}return 0}put(e){if(!this._inst||this._ended)return-2;if(this._realloc(e.length))return-3;let t=this._m32;return this._d.set(e,t[1280]),t[1280]+=e.length,t[1280]-t[1281]>=131072?this._inst.exports.dec():0}end(){return this._ended=!0,this._inst?this._inst.exports.end():-2}get loadedBytes(){return this._inst?this._m32[1280]:0}get freeBytes(){return this._inst?this.maxBytes-this._m32[1280]:0}}}),ee=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=(0,R().InWasm)({s:1,t:0,d:`AGFzbQEAAAABCgJgAABgA39/fwACDwEDZW52Bm1lbW9yeQIAAQMDAgABBwcBA2RlYwABCAEACu4EAgwAQQBBAEGAAvwLAAveBAEJf0EAQQBBgAL8CwAgAUEXTgRAIAAgAWpBCGshCkGACCEBIAJBAnRBgAhqIQsgAEEOaiEDQf8BIQZBACECA0AgA0EBaiEHIAMtAAAiCEE/cSEAAkACQCAIQcABcSIJRQRAIABBAnQiAC0AAyEGIAAtAAIhBCAALQABIQUgAC0AACECIAchAwwBCwJAIAhB/QFLDQAgCUHAAUcNACAFQQVsIAJBA2xqIARBB2xqIAZBC2xqQT9xQQJ0IgMgBDoAAiADIAU6AAEgAyACOgAAIANBA2ogBjoAAANAIAEgAjoAACABQQNqIAY6AAAgAUECaiAEOgAAIAFBAWogBToAACABQQRqIQEgAEUEQCAHIQMMBAsgAEEBayEAIAEgC0kNAAsgByEDDAILAn8CQAJAAkAgCEH+AWsOAgABAgsgAy0AAyEEIAMtAAIhBSADLQABIQIgA0EEagwCCyADKAIBIgJBGHYhBiACQRB2IQQgAkEIdiEFIANBBWoMAQsgCUGAAUcEQCAHIAlBwABHDQEaIAQgCEEDcWpBAmshBCACIABBBHZqQQJrIQIgBSAIQQJ2QQNxakECayEFIAcMAQsgBCAAQShrIgkgAy0AASIHQQ9xamohBCACIAdBBHYgCWpqIQIgACAFakEgayEFIANBAmoLIQMgBUEFbCACQQNsaiAEQQdsaiAGQQtsakE/cUECdCIAIAQ6AAIgACAFOgABIAAgAjoAACAAQQNqIAY6AAALIAEgBjoAAyABIAQ6AAIgASAFOgABIAEgAjoAACABQQRqIQELIAMgCkkNAAsLCw==`});e.default=class{constructor(e){this.keepSize=e,this.width=0,this.height=0}decode(e){this.width=e[4]<<24|e[5]<<16|e[6]<<8|e[7],this.height=e[8]<<24|e[9]<<16|e[10]<<8|e[11];let n=this.width*this.height,r=n*4,i=e.length,a=Math.max(r,i)+(Math.min(r,i)>>1)+4096;this._inst?this._mem.buffer.byteLength<a&&(this._mem.grow(Math.ceil((a-this._mem.buffer.byteLength)/65536)),this._d=null):(this._mem=new WebAssembly.Memory({initial:Math.ceil(a/65536)}),this._inst=t({env:{memory:this._mem}})),this._d||=new Uint8Array(this._mem.buffer);let o=this._mem.buffer.byteLength-i&-256;return this._d.set(e,o),this._inst.exports.dec(o,i,n),this._d.subarray(1024,1024+r)}release(){this._inst&&this._mem.buffer.byteLength>this.keepSize&&(this._inst=this._d=this._mem=null)}}}),B=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LIMITS=void 0,e.LIMITS={CHUNK_SIZE:16384,PALETTE_SIZE:4096,MAX_WIDTH:16384,BYTES:`AGFzbQEAAAABJAdgAAF/YAJ/fwBgA39/fwF/YAF/AX9gAABgBH9/f38AYAF/AAIlAgNlbnYLaGFuZGxlX2JhbmQAAwNlbnYLbW9kZV9wYXJzZWQAAwMTEgQAAAAAAQQBAQUBAAACAgAGAwQFAXABBwcFBAEBBwcGCAF/AUGAihoLB9wBDgZtZW1vcnkCABFnZXRfc3RhdGVfYWRkcmVzcwADEWdldF9jaHVua19hZGRyZXNzAAQOZ2V0X3AwX2FkZHJlc3MABRNnZXRfcGFsZXR0ZV9hZGRyZXNzAAYEaW5pdAALBmRlY29kZQAMDWN1cnJlbnRfd2lkdGgADQ5jdXJyZW50X2hlaWdodAAOGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtfaW5pdGlhbGl6ZQACCXN0YWNrU2F2ZQARDHN0YWNrUmVzdG9yZQASCnN0YWNrQWxsb2MAEwkMAQBBAQsGCgcJDxACDAEBCq5UEgMAAQsFAEGgCAsGAEGQiQELBgBBsIkCCwUAQZAJC+okAQh/QeQIKAIAIQVB4AgoAgAhA0HoCCgCACEIIAFBkIkBaiIJQf8BOgAAIAAgAUgEQCAAQZCJAWohBgNAIAMhBCAGQQFqIQECQCAGLQAAQf8AcSIDQTBrQQlLBEAgASEGDAELQewIKAIAQQJ0QewIaiICKAIAIQADQCACIAMgAEEKbGpBMGsiADYCACABLQAAIQMgAUEBaiIGIQEgA0H/AHEiA0Ewa0EKSQ0ACwsCQAJAAkACQAJAAkACQAJ/AkACQCADQT9rIgBBP00EQCAERQ0BIARBIUYEQAJAQfAIKAIAIgFBASABGyIHIAhqIgFB1AgoAgAiA0gNACADQf//AEoNAANAIANBAnQiAkGgiQJqIgRBoAgpAwA3AwAgAkGoiQJqQaAIKQMANwMAIAJBsIkCakGgCCkDADcDACACQbiJAmpBoAgpAwA3AwAgAkHAiQJqQaAIKQMANwMAIAJByIkCakGgCCkDADcDACACQdCJAmpBoAgpAwA3AwAgAkHYiQJqQaAIKQMANwMAIAJB4IkCakGgCCkDADcDACACQeiJAmpBoAgpAwA3AwAgAkHwiQJqQaAIKQMANwMAIAJB+IkCakGgCCkDADcDACACQYCKAmpBoAgpAwA3AwAgAkGIigJqQaAIKQMANwMAIAJBkIoCakGgCCkDADcDACACQZiKAmpBoAgpAwA3AwAgAkGgigJqQaAIKQMANwMAIAJBqIoCakGgCCkDADcDACACQbCKAmpBoAgpAwA3AwAgAkG4igJqQaAIKQMANwMAIAJBwIoCakGgCCkDADcDACACQciKAmpBoAgpAwA3AwAgAkHQigJqQaAIKQMANwMAIAJB2IoCakGgCCkDADcDACACQeCKAmpBoAgpAwA3AwAgAkHoigJqQaAIKQMANwMAIAJB8IoCakGgCCkDADcDACACQfiKAmpBoAgpAwA3AwAgAkGAiwJqQaAIKQMANwMAIAJBiIsCakGgCCkDADcDACACQZCLAmpBoAgpAwA3AwAgAkGYiwJqQaAIKQMANwMAIAJBoIsCakGgCCkDADcDACACQaiLAmpBoAgpAwA3AwAgAkGwiwJqQaAIKQMANwMAIAJBuIsCakGgCCkDADcDACACQcCLAmpBoAgpAwA3AwAgAkHIiwJqQaAIKQMANwMAIAJB0IsCakGgCCkDADcDACACQdiLAmpBoAgpAwA3AwAgAkHgiwJqQaAIKQMANwMAIAJB6IsCakGgCCkDADcDACACQfCLAmpBoAgpAwA3AwAgAkH4iwJqQaAIKQMANwMAIAJBgIwCakGgCCkDADcDACACQYiMAmpBoAgpAwA3AwAgAkGQjAJqQaAIKQMANwMAIAJBmIwCakGgCCkDADcDACACQaCMAmpBoAgpAwA3AwAgAkGojAJqQaAIKQMANwMAIAJBsIwCakGgCCkDADcDACACQbiMAmpBoAgpAwA3AwAgAkHAjAJqQaAIKQMANwMAIAJByIwCakGgCCkDADcDACACQdCMAmpBoAgpAwA3AwAgAkHYjAJqQaAIKQMANwMAIAJB4IwCakGgCCkDADcDACACQeiMAmpBoAgpAwA3AwAgAkHwjAJqQaAIKQMANwMAIAJB+IwCakGgCCkDADcDACACQYCNAmpBoAgpAwA3AwAgAkGIjQJqQaAIKQMANwMAIAJBkI0CakGgCCkDADcDACACQZiNAmpBoAgpAwA3AwAgAkGwiQZqIARBgAT8CgAAQdQIKAIAQQJ0QcCJCmogBEGABPwKAABB1AgoAgBBAnRB0IkOaiAEQYAE/AoAAEHUCCgCAEECdEHgiRJqIARBgAT8CgAAQdQIKAIAQQJ0QfCJFmogBEGABPwKAABB1AhB1AgoAgAiAkGAAWoiAzYCACABIANIDQEgAkGA/wBIDQALCwJAIABFDQAgCEH//wBLDQBBgIABIAhrIAcgAUH//wBLGyECAkAgAEEBcUUNACACRQ0AIAhBAnRBoIkCaiEDIAIhBCACQQdxIgcEQANAIAMgBTYCACADQQRqIQMgBEEBayEEIAdBAWsiBw0ACwsgAkEBa0EHSQ0AA0AgAyAFNgIcIAMgBTYCGCADIAU2AhQgAyAFNgIQIAMgBTYCDCADIAU2AgggAyAFNgIEIAMgBTYCACADQSBqIQMgBEEIayIEDQALCwJAIABBAnFFDQAgAkUNACAIQQJ0QbCJBmohAyACIQQgAkEHcSIHBEADQCADIAU2AgAgA0EEaiEDIARBAWshBCAHQQFrIgcNAAsLIAJBAWtBB0kNAANAIAMgBTYCHCADIAU2AhggAyAFNgIUIAMgBTYCECADIAU2AgwgAyAFNgIIIAMgBTYCBCADIAU2AgAgA0EgaiEDIARBCGsiBA0ACwsCQCAAQQRxRQ0AIAJFDQAgCEECdEHAiQpqIQMgAiEEIAJBB3EiBwRAA0AgAyAFNgIAIANBBGohAyAEQQFrIQQgB0EBayIHDQALCyACQQFrQQdJDQADQCADIAU2AhwgAyAFNgIYIAMgBTYCFCADIAU2AhAgAyAFNgIMIAMgBTYCCCADIAU2AgQgAyAFNgIAIANBIGohAyAEQQhrIgQNAAsLAkAgAEEIcUUNACACRQ0AIAhBAnRB0IkOaiEDIAIhBCACQQdxIgcEQANAIAMgBTYCACADQQRqIQMgBEEBayEEIAdBAWsiBw0ACwsgAkEBa0EHSQ0AA0AgAyAFNgIcIAMgBTYCGCADIAU2AhQgAyAFNgIQIAMgBTYCDCADIAU2AgggAyAFNgIEIAMgBTYCACADQSBqIQMgBEEIayIEDQALCwJAIABBEHFFDQAgAkUNACAIQQJ0QeCJEmohAyACIQQgAkEHcSIHBEADQCADIAU2AgAgA0EEaiEDIARBAWshBCAHQQFrIgcNAAsLIAJBAWtBB0kNAANAIAMgBTYCHCADIAU2AhggAyAFNgIUIAMgBTYCECADIAU2AgwgAyAFNgIIIAMgBTYCBCADIAU2AgAgA0EgaiEDIARBCGsiBA0ACwsgAEEgcUUNACACRQ0AIAJBAWshByAIQQJ0QfCJFmohAyACQQdxIgQEQANAIAMgBTYCACADQQRqIQMgAkEBayECIARBAWsiBA0ACwsgB0EHSQ0AA0AgAyAFNgIcIAMgBTYCGCADIAU2AhQgAyAFNgIQIAMgBTYCDCADIAU2AgggAyAFNgIEIAMgBTYCACADQSBqIQMgAkEIayICDQALC0HcCEHcCCgCACAAcjYCACAGQQFqIgIgBi0AAEH/AHEiA0E/ayIAQT9LDQQaDAMLAkBB7AgoAgAiBEEBRgRAQfAIKAIAIgNBzAgoAgAiAUkNASADIAFwIQMMAQtB+AgoAgAhAkH0CCgCACEBAkACQCAEQQVHDQAgAUEBRw0AIAJB6QJODQQMAQsgAkHkAEoNA0H8CCgCAEHkAEoNA0GACSgCAEHkAEoNAwsCQCABRQ0AIAFBAkoNACACQfwIKAIAQYAJKAIAIAFBAnRBiAhqKAIAEQIAIQFB8AgoAgAiA0HMCCgCACICTwR/IAMgAnAFIAMLQQJ0QZAJaiABNgIAC0HwCCgCACIDQcwIKAIAIgFJDQAgAyABcCEDCyADQQJ0QZAJaigCACEFDAELIANB/QBxQSFHBEAgCCEBIAYhAgwECyAEQSNHDQQCQEHsCCgCACICQQFGBEBB8AgoAgAiAUHMCCgCACIASQ0BIAEgAHAhAQwBC0H4CCgCACEBQfQIKAIAIQACQAJAIAJBBUcNACAAQQFHDQAgAUHpAkgNAQwHCyABQeQASg0GQfwIKAIAQeQASg0GQYAJKAIAQeQASg0GCwJAIABFDQAgAEECSg0AIAFB/AgoAgBBgAkoAgAgAEECdEGICGooAgARAgAhAEHwCCgCACIBQcwIKAIAIgJPBH8gASACcAUgAQtBAnRBkAlqIAA2AgALQfAIKAIAIgFBzAgoAgAiAEkNACABIABwIQELIAFBAnRBkAlqKAIAIQUMBAsgCCEBIAYhAgtB1AgoAgAhBgNAAkAgASAGSA0AIAZB//8ASg0AIAZBAnQiBEGgiQJqIgZBoAgpAwA3AwAgBEGoiQJqQaAIKQMANwMAIARBsIkCakGgCCkDADcDACAEQbiJAmpBoAgpAwA3AwAgBEHAiQJqQaAIKQMANwMAIARByIkCakGgCCkDADcDACAEQdCJAmpBoAgpAwA3AwAgBEHYiQJqQaAIKQMANwMAIARB4IkCakGgCCkDADcDACAEQeiJAmpBoAgpAwA3AwAgBEHwiQJqQaAIKQMANwMAIARB+IkCakGgCCkDADcDACAEQYCKAmpBoAgpAwA3AwAgBEGIigJqQaAIKQMANwMAIARBkIoCakGgCCkDADcDACAEQZiKAmpBoAgpAwA3AwAgBEGgigJqQaAIKQMANwMAIARBqIoCakGgCCkDADcDACAEQbCKAmpBoAgpAwA3AwAgBEG4igJqQaAIKQMANwMAIARBwIoCakGgCCkDADcDACAEQciKAmpBoAgpAwA3AwAgBEHQigJqQaAIKQMANwMAIARB2IoCakGgCCkDADcDACAEQeCKAmpBoAgpAwA3AwAgBEHoigJqQaAIKQMANwMAIARB8IoCakGgCCkDADcDACAEQfiKAmpBoAgpAwA3AwAgBEGAiwJqQaAIKQMANwMAIARBiIsCakGgCCkDADcDACAEQZCLAmpBoAgpAwA3AwAgBEGYiwJqQaAIKQMANwMAIARBoIsCakGgCCkDADcDACAEQaiLAmpBoAgpAwA3AwAgBEGwiwJqQaAIKQMANwMAIARBuIsCakGgCCkDADcDACAEQcCLAmpBoAgpAwA3AwAgBEHIiwJqQaAIKQMANwMAIARB0IsCakGgCCkDADcDACAEQdiLAmpBoAgpAwA3AwAgBEHgiwJqQaAIKQMANwMAIARB6IsCakGgCCkDADcDACAEQfCLAmpBoAgpAwA3AwAgBEH4iwJqQaAIKQMANwMAIARBgIwCakGgCCkDADcDACAEQYiMAmpBoAgpAwA3AwAgBEGQjAJqQaAIKQMANwMAIARBmIwCakGgCCkDADcDACAEQaCMAmpBoAgpAwA3AwAgBEGojAJqQaAIKQMANwMAIARBsIwCakGgCCkDADcDACAEQbiMAmpBoAgpAwA3AwAgBEHAjAJqQaAIKQMANwMAIARByIwCakGgCCkDADcDACAEQdCMAmpBoAgpAwA3AwAgBEHYjAJqQaAIKQMANwMAIARB4IwCakGgCCkDADcDACAEQeiMAmpBoAgpAwA3AwAgBEHwjAJqQaAIKQMANwMAIARB+IwCakGgCCkDADcDACAEQYCNAmpBoAgpAwA3AwAgBEGIjQJqQaAIKQMANwMAIARBkI0CakGgCCkDADcDACAEQZiNAmpBoAgpAwA3AwAgBEGwiQZqIAZBgAT8CgAAQdQIKAIAQQJ0QcCJCmogBkGABPwKAABB1AgoAgBBAnRB0IkOaiAGQYAE/AoAAEHUCCgCAEECdEHgiRJqIAZBgAT8CgAAQdQIKAIAQQJ0QfCJFmogBkGABPwKAABB1AhB1AgoAgBBgAFqIgY2AgALIAFB//8ATQRAIABBAXEgAWxBAnRBoIkCaiAFNgIAIABBAXZBAXEgAWxBAnRBsIkGaiAFNgIAIABBAnZBAXEgAWxBAnRBwIkKaiAFNgIAIABBA3ZBAXEgAWxBAnRB0IkOaiAFNgIAIABBBHZBAXEgAWxBAnRB4IkSaiAFNgIAIABBBXYgAWxBAnRB8IkWaiAFNgIAQdQIKAIAIQYLIAFBAWohAUHcCEHcCCgCACAAcjYCACACLQAAIQAgAkEBaiIEIQIgAEH/AHEiA0E/ayIAQcAASQ0ACyAECyECQQAhBCACIQYgASEIIANB/QBxQSFGDQELIANBJGsOCgEDAwMDAwMDAwIDC0HsCEIBNwIADAQLQdgIIAFB2AgoAgAiACAAIAFIGyIAQYCAASAAQYCAAUgbNgIADAILQegIIAFB2AgoAgAiACAAIAFIGyIAQYCAASAAQYCAAUgbIgA2AgBB2AggADYCACAAQQRrEAAEQEHoCEEENgIAQdgIQQQ2AgBB0AhBATYCAA8LEAgMAQsCQCADQTtHDQBB7AgoAgAiAEEHSg0AQewIIABBAWo2AgAgAEECdEHwCGpBADYCAAsgAiEGIAQhAyABIQgMAQtBBCEIIAIhBiAEIQMLIAYgCUkNAAsLQeQIIAU2AgBB4AggAzYCAEHoCCAINgIAC9ELAgF+CH9B2AhCBDcDAEGojQJBoAgpAwAiADcDAEGgjQIgADcDAEGYjQIgADcDAEGQjQIgADcDAEGIjQIgADcDAEGAjQIgADcDAEH4jAIgADcDAEHwjAIgADcDAEHojAIgADcDAEHgjAIgADcDAEHYjAIgADcDAEHQjAIgADcDAEHIjAIgADcDAEHAjAIgADcDAEG4jAIgADcDAEGwjAIgADcDAEGojAIgADcDAEGgjAIgADcDAEGYjAIgADcDAEGQjAIgADcDAEGIjAIgADcDAEGAjAIgADcDAEH4iwIgADcDAEHwiwIgADcDAEHoiwIgADcDAEHgiwIgADcDAEHYiwIgADcDAEHQiwIgADcDAEHIiwIgADcDAEHAiwIgADcDAEG4iwIgADcDAEGwiwIgADcDAEGoiwIgADcDAEGgiwIgADcDAEGYiwIgADcDAEGQiwIgADcDAEGIiwIgADcDAEGAiwIgADcDAEH4igIgADcDAEHwigIgADcDAEHoigIgADcDAEHgigIgADcDAEHYigIgADcDAEHQigIgADcDAEHIigIgADcDAEHAigIgADcDAEG4igIgADcDAEGwigIgADcDAEGoigIgADcDAEGgigIgADcDAEGYigIgADcDAEGQigIgADcDAEGIigIgADcDAEGAigIgADcDAEH4iQIgADcDAEHwiQIgADcDAEHoiQIgADcDAEHgiQIgADcDAEHYiQIgADcDAEHQiQIgADcDAEHIiQIgADcDAEHAiQIgADcDAEG4iQIgADcDAEGwiQIgADcDAEGoCCgCACIEQf8AakGAAW0hCAJAIARBgQFIDQBBASEBIAhBAiAIQQJKG0EBayICQQFxIQMgBEGBAk4EQCACQX5xIQIDQCABQQl0IgdBEHJBoIkCakGwiQJBgAT8CgAAIAdBsI0CakGwiQJBgAT8CgAAIAFBAmohASACQQJrIgINAAsLIANFDQAgAUEJdEEQckGgiQJqQbCJAkGABPwKAAALAkAgBEEBSA0AIAhBASAIQQFKGyIDQQFxIQUCQCADQQFrIgdFBEBBACEBDAELIANB/v///wdxIQJBACEBA0AgAUEJdCIGQRByQbCJBmpBsIkCQYAE/AoAACAGQZAEckGwiQZqQbCJAkGABPwKAAAgAUECaiEBIAJBAmsiAg0ACwsgBQRAIAFBCXRBEHJBsIkGakGwiQJBgAT8CgAACyAEQQFIDQAgA0EBcSEFIAcEfyADQf7///8HcSECQQAhAQNAIAFBCXQiBkEQckHAiQpqQbCJAkGABPwKAAAgBkGQBHJBwIkKakGwiQJBgAT8CgAAIAFBAmohASACQQJrIgINAAsgAUEHdEEEcgVBBAshASAFBEAgAUECdEHAiQpqQbCJAkGABPwKAAALIARBAUgNACADQQFxIQUgBwR/IANB/v///wdxIQJBACEBA0AgAUEJdCIGQRByQdCJDmpBsIkCQYAE/AoAACAGQZAEckHQiQ5qQbCJAkGABPwKAAAgAUECaiEBIAJBAmsiAg0ACyABQQd0QQRyBUEECyEBIAUEQCABQQJ0QdCJDmpBsIkCQYAE/AoAAAsgBEEBSA0AIANBAXEhBSAHBH8gA0H+////B3EhAkEAIQEDQCABQQl0IgZBEHJB4IkSakGwiQJBgAT8CgAAIAZBkARyQeCJEmpBsIkCQYAE/AoAACABQQJqIQEgAkECayICDQALIAFBB3RBBHIFQQQLIQEgBQRAIAFBAnRB4IkSakGwiQJBgAT8CgAACyAEQQFIDQAgA0EBcSEEIAcEfyADQf7///8HcSECQQAhAQNAIAFBCXQiA0EQckHwiRZqQbCJAkGABPwKAAAgA0GQBHJB8IkWakGwiQJBgAT8CgAAIAFBAmohASACQQJrIgINAAsgAUEHdEEEcgVBBAshASAERQ0AIAFBAnRB8IkWakGwiQJBgAT8CgAAC0HUCCAIQQd0QQRyNgIAC58TAgh/AX5B5AgoAgAhA0HgCCgCACECQegIKAIAIQcgAUGQiQFqIglB/wE6AAAgACABSARAIABBkIkBaiEIA0AgAiEEIAhBAWohAQJAIAgtAABB/wBxIgJBMGtBCUsEQCABIQgMAQtB7AgoAgBBAnRB7AhqIgUoAgAhAANAIAUgAiAAQQpsakEwayIANgIAIAEtAAAhAiABQQFqIgghASACQf8AcSICQTBrQQpJDQALCwJAAkACQAJAAkACQAJ/AkAgAkE/ayIAQT9NBEAgBEUNASAEQSFGBEBB8AgoAgAiAUEBIAEbIgQgB2ohAQJAIABFDQAgB0H//wBLDQBBgIABIAdrIAQgAUH//wBLGyEFAkAgAEEBcUUNACAHQQJ0QaCJAmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEECcUUNACAHQQJ0QbCJBmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEEEcUUNACAHQQJ0QcCJCmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEEIcUUNACAHQQJ0QdCJDmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEEQcUUNACAHQQJ0QeCJEmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLIABBIHFFDQAgBUEBayEEIAdBAnRB8IkWaiEAIAVBB3EiAgRAA0AgACADNgIAIABBBGohACAFQQFrIQUgAkEBayICDQALCyAEQQdJDQADQCAAIAM2AhwgACADNgIYIAAgAzYCFCAAIAM2AhAgACADNgIMIAAgAzYCCCAAIAM2AgQgACADNgIAIABBIGohACAFQQhrIgUNAAsLIAhBAWoiBSAILQAAQf8AcSICQT9rIgBBP00NAxoMBAsCQEHsCCgCACIFQQFGBEBB8AgoAgAiAUHMCCgCACIESQ0BIAEgBHAhAQwBC0H4CCgCACEEQfQIKAIAIQECQAJAIAVBBUcNACABQQFHDQAgBEHpAk4NBAwBCyAEQeQASg0DQfwIKAIAQeQASg0DQYAJKAIAQeQASg0DCwJAIAFFDQAgAUECSg0AIARB/AgoAgBBgAkoAgAgAUECdEGICGooAgARAgAhBEHwCCgCACIBQcwIKAIAIgVPBH8gASAFcAUgAQtBAnRBkAlqIAQ2AgALQfAIKAIAIgFBzAgoAgAiBEkNACABIARwIQELIAFBAnRBkAlqKAIAIQMMAQsgAkH9AHFBIUcEQCAHIQEgAiEADAQLIARBI0cNBAJAQewIKAIAIgRBAUYEQEHwCCgCACIBQcwIKAIAIgBJDQEgASAAcCEBDAELQfgIKAIAIQFB9AgoAgAhAAJAAkAgBEEFRw0AIABBAUcNACABQekCSA0BDAcLIAFB5ABKDQZB/AgoAgBB5ABKDQZBgAkoAgBB5ABKDQYLAkAgAEUNACAAQQJKDQAgAUH8CCgCAEGACSgCACAAQQJ0QYgIaigCABECACEAQfAIKAIAIgFBzAgoAgAiBE8EfyABIARwBSABC0ECdEGQCWogADYCAAtB8AgoAgAiAUHMCCgCACIASQ0AIAEgAHAhAQsgAUECdEGQCWooAgAhAwwECyAHIQEgCAshBQNAIAFB//8ATQRAIABBAXEgAWxBAnRBoIkCaiADNgIAIABBAXZBAXEgAWxBAnRBsIkGaiADNgIAIABBAnZBAXEgAWxBAnRBwIkKaiADNgIAIABBA3ZBAXEgAWxBAnRB0IkOaiADNgIAIABBBHZBAXEgAWxBAnRB4IkSaiADNgIAIABBBXYgAWxBAnRB8IkWaiADNgIACyABQQFqIQEgBS0AACEAIAVBAWoiBCEFIABB/wBxIgJBP2siAEHAAEkNAAsgBCEFC0EAIQQgBSEIIAEhByACIQAgAkH9AHFBIUYNAQtBBCEHIAQhAiAAQSRrDgoDAgICAgICAgIBAgtB7AhCATcCAAwCC0GoCCgCAEEEaxAABEBB0AhBATYCAA8LAkBBqAgoAgAiBkEFSA0AQaAIKQMAIQogBkEDa0EBdiIBQQdxIQJBACEAIAFBAWtBB08EQCABQfj///8HcSEFA0AgAEEDdCIBQbCJAmogCjcDACABQQhyQbCJAmogCjcDACABQRByQbCJAmogCjcDACABQRhyQbCJAmogCjcDACABQSByQbCJAmogCjcDACABQShyQbCJAmogCjcDACABQTByQbCJAmogCjcDACABQThyQbCJAmogCjcDACAAQQhqIQAgBUEIayIFDQALCyACRQ0AA0AgAEEDdEGwiQJqIAo3AwAgAEEBaiEAIAJBAWsiAg0ACwtBwIkGQbCJAiAGQQJ0IgD8CgAAQdCJCkGwiQIgAPwKAABB4IkOQbCJAiAA/AoAAEHwiRJBsIkCIAD8CgAAQYCKFkGwiQIgAPwKAAAgBCECDAELAkAgAEE7Rw0AQewIKAIAIgBBB0oNAEHsCCAAQQFqNgIAIABBAnRB8AhqQQA2AgALIAEhBwsgCCAJSQ0ACwtB5AggAzYCAEHgCCACNgIAQegIIAc2AgAL4gcCBX8BfgJAQdAIAn8CQAJAIAAgAU4NACABQZCJAWohBiAAQZCJAWohBQNAIAUtAAAiA0H/AHEhAgJAAkACQAJAAkACQAJAQeAIKAIAIgRBIkcEQCAEDQcgAkEiRgRAQewIQgE3AgBB4AhBIjYCAAwICyACQT9rQcAASQ0GIANBIWsiAkEMTQ0BDAULAkAgAkEwayIEQQlNBEBB7AgoAgBBAnRB7AhqIgIgBCACKAIAQQpsajYCAAwBC0HsCCgCACEEIAJBO0YEQCAEQQdKDQFB7AggBEEBajYCACAEQQJ0QfAIakEANgIADAELIARBBEYEQEHECEECNgIAQbAIQfAIKQMANwMAQbgIQfgIKAIAIgI2AgBBvAhB/AgoAgAiBDYCAEHICEECQQFBwAgoAgAiAxs2AgBBrAggBEEAIAMbNgIAQagIIAJBgIABIAJBgIABSBtBBGpBACADGzYCAEHgCEEANgIADAoLIAJBP2tBwABJDQQLIANBIWsiAkEMTQ0BDAILQQEgAnRBjSBxRQ0DDAQLQQEgAnRBjSBxDQELIANBoQFrIgJBDEsNA0EBIAJ0QY0gcUUNAwtBxAhCgYCAgBA3AgBBsAhB8AgoAgBBAEHsCCgCACICQQBKGzYCAEG0CEH0CCgCAEEAIAJBAUobNgIAQbgIQfgIKAIAQQAgAkECShs2AgBB4AhBADYCAEG8CEEANgIADAQLIANBoQFrIgJBDEsNAUEBIAJ0QY0gcUUNAQtBxAhCgYCAgBA3AgBBsAhCADcDAEG4CEIANwMADAMLIAVBAWoiBSAGSQ0ACwsCQEHICCgCAA4DAwEAAQsCQEGoCCgCACIFQQVIDQBBoAgpAwAhByAFQQNrQQF2IgNBB3EhBEEAIQIgA0EBa0EHTwRAIANB+P///wdxIQYDQCACQQN0IgNBsIkCaiAHNwMAIANBCHJBsIkCaiAHNwMAIANBEHJBsIkCaiAHNwMAIANBGHJBsIkCaiAHNwMAIANBIHJBsIkCaiAHNwMAIANBKHJBsIkCaiAHNwMAIANBMHJBsIkCaiAHNwMAIANBOHJBsIkCaiAHNwMAIAJBCGohAiAGQQhrIgYNAAsLIARFDQADQCACQQN0QbCJAmogBzcDACACQQFqIQIgBEEBayIEDQALC0HAiQZBsIkCIAVBAnQiA/wKAABB0IkKQbCJAiAD/AoAAEHgiQ5BsIkCIAP8CgAAQfCJEkGwiQIgA/wKAABBgIoWQbCJAiAD/AoAAEECDAELEAhByAgoAgALEAEiAjYCACACDQAgACABQcgIKAIAQQJ0QYAIaigCABEBAAsLdABB6AhBBDYCAEHkCCAANgIAQewIQgE3AgBBxAhCADcCAEHACCADNgIAQdwIQgA3AgBBqAhCADcDAEGwCEIANwMAQbgIQgA3AwBBzAggAkGAICACQYAgSRs2AgBBoAggAa1CgYCAgBB+NwMAQdAIQQA2AgALIwBB0AgoAgBFBEAgACABQcgIKAIAQQJ0QYAIaigCABEBAAsLWgECfwJAAkACQEHICCgCAEEBaw4CAAECC0HYCEHoCCgCACIAQdgIKAIAIgEgACABShsiAEGAgAEgAEGAgAFIGyIANgIAIABBBGsPC0GoCCgCAEEEayEACyAAC0IBAX8Cf0EGQdwIKAIAIgBBIHENABpBBSAAQRBxDQAaQQQgAEEIcQ0AGkEDIABBBHENABpBAiAAQQFxIABBAnEbCwu9BQEFfQJ/IAJFBEAgAUH/AWxBMmpB5ABtIgBBCHQgAHIgAEEQdHIMAQsgArJDAADIQpUhBiAAQfABarJDAAC0Q5UhBQJ9IAGyQwAAyEKVIgNDAAAAP10EQCADIAZDAACAP5KUDAELIAYgA0MAAIA/IAaTlJILIQcgAyADkiEGAkAgBUOrqqo+kiIEQwAAAABdBEAgBEMAAIA/kiEEDAELIARDAACAP15FDQAgBEMAAIC/kiEECyAGIAeTIQMgBUMAAAAAXSEAAn8CfSADIAcgA5NDAADAQJQgBJSSIARDq6oqPl0NABogByAEQwAAAD9dDQAaIAMgBEOrqio/XUUNABogAyAHIAOTIARDAADAwJRDAACAQJKUkgtDAAB/Q5RDAAAAP5IiBkMAAIBPXSAGQwAAAABgcQRAIAapDAELQQALIQECQCAABEAgBUMAAIA/kiEEDAELIAUiBEMAAIA/XkUNACAFQwAAgL+SIQQLIAVDq6qqvpIiBUMAAAAAXSECAn8CfSADIAcgA5NDAADAQJQgBJSSIARDq6oqPl0NABogByAEQwAAAD9dDQAaIAMgBEOrqio/XUUNABogAyAHIAOTIARDAADAwJRDAACAQJKUkgtDAAB/Q5RDAAAAP5IiBkMAAIBPXSAGQwAAAABgcQRAIAapDAELQQALIQACQCACBEAgBUMAAIA/kiEFDAELIAVDAACAP15FDQAgBUMAAIC/kiEFCwJAIAVDq6oqPl0EQCADIAcgA5NDAADAQJQgBZSSIQcMAQsgBUMAAAA/XQ0AIAVDq6oqP11FBEAgAyEHDAELIAMgByADkyAFQwAAwMCUQwAAgECSlJIhBwsgAEEIdAJ/IAdDAAB/Q5RDAAAAP5IiBkMAAIBPXSAGQwAAAABgcQRAIAapDAELQQALQRB0ciABcgtBgICAeHILNwAgAEH/AWxBMmpB5ABtIAFB/wFsQTJqQeQAbUEIdHIgAkH/AWxBMmpB5ABtQRB0ckGAgIB4cgsEACMACwYAIAAkAAsQACMAIABrQXBxIgAkACAACwsYAQBBgAgLEQEAAAACAAAAAwAAAAQAAAAF`}}),V=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.decodeAsync=e.decode=e.Decoder=e.DecoderAsync=void 0;var t=L(),n=B();function r(e){if(typeof Buffer<`u`)return Buffer.from(e,`base64`);let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<n.length;++e)n[e]=t.charCodeAt(e);return n}var i=r(n.LIMITS.BYTES),a,o=new Uint32Array,s=class{constructor(){this.bandHandler=e=>1,this.modeHandler=e=>1}handle_band(e){return this.bandHandler(e)}mode_parsed(e){return this.modeHandler(e)}},c={memoryLimit:2048*65536,sixelColor:t.DEFAULT_FOREGROUND,fillColor:t.DEFAULT_BACKGROUND,palette:t.PALETTE_VT340_COLOR,paletteLimit:n.LIMITS.PALETTE_SIZE,truncate:!0};function l(e){let t=new s,n={env:{handle_band:t.handle_band.bind(t),mode_parsed:t.mode_parsed.bind(t)}};return WebAssembly.instantiate(a||i,n).then(n=>(a||=n.module,new u(e,n.instance||n,t)))}e.DecoderAsync=l;var u=class{constructor(e,r,s){if(this._PIXEL_OFFSET=n.LIMITS.MAX_WIDTH+4,this._canvas=o,this._bandWidths=[],this._maxWidth=0,this._minWidth=n.LIMITS.MAX_WIDTH,this._lastOffset=0,this._currentHeight=0,this._opts=Object.assign({},c,e),this._opts.paletteLimit>n.LIMITS.PALETTE_SIZE)throw Error(`DecoderOptions.paletteLimit must not exceed ${n.LIMITS.PALETTE_SIZE}`);if(r)s.bandHandler=this._handle_band.bind(this),s.modeHandler=this._initCanvas.bind(this);else{let e=a||=new WebAssembly.Module(i);r=new WebAssembly.Instance(e,{env:{handle_band:this._handle_band.bind(this),mode_parsed:this._initCanvas.bind(this)}})}this._instance=r,this._wasm=this._instance.exports,this._chunk=new Uint8Array(this._wasm.memory.buffer,this._wasm.get_chunk_address(),n.LIMITS.CHUNK_SIZE),this._states=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_state_address(),12),this._palette=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_palette_address(),n.LIMITS.PALETTE_SIZE),this._palette.set(this._opts.palette),this._pSrc=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_p0_address()),this._wasm.init(t.DEFAULT_FOREGROUND,0,this._opts.paletteLimit,0)}get _fillColor(){return this._states[0]}get _truncate(){return this._states[8]}get _rasterWidth(){return this._states[6]}get _rasterHeight(){return this._states[7]}get _width(){return this._states[2]?this._states[2]-4:0}get _height(){return this._states[3]}get _level(){return this._states[9]}get _mode(){return this._states[10]}get _paletteLimit(){return this._states[11]}_initCanvas(e){if(e===2){let e=this.width*this.height;if(e>this._canvas.length){if(this._opts.memoryLimit&&e*4>this._opts.memoryLimit)throw this.release(),Error(`image exceeds memory limit`);this._canvas=new Uint32Array(e)}this._maxWidth=this._width}else if(e===1)if(this._level===2){let e=Math.min(this._rasterWidth,n.LIMITS.MAX_WIDTH)*this._rasterHeight;if(e>this._canvas.length){if(this._opts.memoryLimit&&e*4>this._opts.memoryLimit)throw this.release(),Error(`image exceeds memory limit`);this._canvas=new Uint32Array(e)}}else this._canvas.length<65536&&(this._canvas=new Uint32Array(65536));return 0}_realloc(e,t){let n=e+t;if(n>this._canvas.length){if(this._opts.memoryLimit&&n*4>this._opts.memoryLimit)throw this.release(),Error(`image exceeds memory limit`);let e=new Uint32Array(Math.ceil(n/65536)*65536);e.set(this._canvas),this._canvas=e}}_handle_band(e){let t=this._PIXEL_OFFSET,n=this._lastOffset;if(this._mode===2){let r=this.height-this._currentHeight,i=0;for(;i<6&&r>0;)this._canvas.set(this._pSrc.subarray(t*i,t*i+e),n+e*i),i++,r--;this._lastOffset+=e*i,this._currentHeight+=i}else if(this._mode===1){this._realloc(n,e*6),this._maxWidth=Math.max(this._maxWidth,e),this._minWidth=Math.min(this._minWidth,e);for(let r=0;r<6;++r)this._canvas.set(this._pSrc.subarray(t*r,t*r+e),n+e*r);this._bandWidths.push(e),this._lastOffset+=e*6,this._currentHeight+=6}return 0}get width(){return this._mode===1?Math.max(this._maxWidth,this._wasm.current_width()):this._width}get height(){return this._mode===1?this._wasm.current_width()?this._bandWidths.length*6+this._wasm.current_height():this._bandWidths.length*6:this._height}get palette(){return this._palette.subarray(0,this._paletteLimit)}get memoryUsage(){return this._canvas.byteLength+this._wasm.memory.buffer.byteLength+8*this._bandWidths.length}get properties(){return{width:this.width,height:this.height,mode:this._mode,level:this._level,truncate:!!this._truncate,paletteLimit:this._paletteLimit,fillColor:this._fillColor,memUsage:this.memoryUsage,rasterAttributes:{numerator:this._states[4],denominator:this._states[5],width:this._rasterWidth,height:this._rasterHeight}}}init(e=this._opts.fillColor,t=this._opts.palette,r=this._opts.paletteLimit,i=this._opts.truncate){this._wasm.init(this._opts.sixelColor,e,r,+!!i),t&&this._palette.set(t.subarray(0,n.LIMITS.PALETTE_SIZE)),this._bandWidths.length=0,this._maxWidth=0,this._minWidth=n.LIMITS.MAX_WIDTH,this._lastOffset=0,this._currentHeight=0}decode(e,t=0,r=e.length){let i=t;for(;i<r;){let t=Math.min(r-i,n.LIMITS.CHUNK_SIZE);this._chunk.set(e.subarray(i,i+=t)),this._wasm.decode(0,t)}}decodeString(e,t=0,r=e.length){let i=t;for(;i<r;){let t=Math.min(r-i,n.LIMITS.CHUNK_SIZE);for(let n=0,r=i;n<t;++n,++r)this._chunk[n]=e.charCodeAt(r);i+=t,this._wasm.decode(0,t)}}get data32(){if(this._mode===0||!this.width||!this.height)return o;let e=this._wasm.current_width();if(this._mode===2){let t=this.height-this._currentHeight;if(t>0){let n=this._PIXEL_OFFSET,r=this._lastOffset,i=0;for(;i<6&&t>0;)this._canvas.set(this._pSrc.subarray(n*i,n*i+e),r+e*i),i++,t--;t&&this._canvas.fill(this._fillColor,r+e*i)}return this._canvas.subarray(0,this.width*this.height)}if(this._mode===1){if(this._minWidth===this._maxWidth){let t=!1;if(e)if(e!==this._minWidth)t=!0;else{let t=this._PIXEL_OFFSET,n=this._lastOffset;this._realloc(n,e*6);for(let r=0;r<6;++r)this._canvas.set(this._pSrc.subarray(t*r,t*r+e),n+e*r)}if(!t)return this._canvas.subarray(0,this.width*this.height)}let t=new Uint32Array(this.width*this.height);t.fill(this._fillColor);let n=0,r=0;for(let e=0;e<this._bandWidths.length;++e){let i=this._bandWidths[e];for(let e=0;e<6;++e)t.set(this._canvas.subarray(r,r+=i),n),n+=this.width}if(e){let r=this._PIXEL_OFFSET,i=this._wasm.current_height();for(let a=0;a<i;++a)t.set(this._pSrc.subarray(r*a,r*a+e),n+this.width*a)}return t}return o}get data8(){return new Uint8ClampedArray(this.data32.buffer,0,this.width*this.height*4)}release(){this._canvas=o,this._bandWidths.length=0,this._maxWidth=0,this._minWidth=n.LIMITS.MAX_WIDTH,this._wasm.init(t.DEFAULT_FOREGROUND,0,this._opts.paletteLimit,0)}};e.Decoder=u;function d(e,t){let n=new u(t);return n.init(),typeof e==`string`?n.decodeString(e):n.decode(e),{width:n.width,height:n.height,data32:n.data32,data8:n.data8}}e.decode=d;async function f(e,t){let n=await l(t);return n.init(),typeof e==`string`?n.decodeString(e):n.decode(e),{width:n.width,height:n.height,data32:n.data32,data8:n.data8}}e.decodeAsync=f});function H(e){return{dispose:e}}var U=class{constructor(){this._disposables=new Set,this._isDisposed=!1}get isDisposed(){return this._isDisposed}add(e){return this._isDisposed?e.dispose():this._disposables.add(e),e}dispose(){if(!this._isDisposed){this._isDisposed=!0;for(let e of this._disposables)e.dispose();this._disposables.clear()}}clear(){for(let e of this._disposables)e.dispose();this._disposables.clear()}},te=class{constructor(){this._store=new U}dispose(){this._store.dispose()}_register(e){return this._store.add(e)}};te.None=Object.freeze({dispose(){}});var W=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},ne=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||=(e,t,n)=>{if(this._disposed)return H(()=>{});let r={fn:e,thisArgs:t};this._listeners.push(r);let i=H(()=>{let e=this._listeners.indexOf(r);e!==-1&&this._listeners.splice(e,1)});return n&&(Array.isArray(n)?n.push(i):n.add(i)),i},this._event}fire(e){if(!this._disposed)switch(this._listeners.length){case 0:return;case 1:{let{fn:t,thisArgs:n}=this._listeners[0];t.call(n,e);return}default:{let t=this._listeners.slice();for(let{fn:n,thisArgs:r}of t)n.call(r,e)}}}dispose(){this._disposed||(this._disposed=!0,this._listeners.length=0)}},G;(e=>{function t(e,t){return e(e=>t.fire(e))}e.forward=t;function n(e,t){return(n,r,i)=>e(e=>n.call(r,t(e)),void 0,i)}e.map=n;function r(...e){return(t,n,r)=>{let i=new U;for(let r of e)i.add(r(e=>t.call(n,e)));return r&&(Array.isArray(r)?r.push(i):r.add(i)),i}}e.any=r;function i(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=i})(G||={});var re=I(L()),ie=class e extends te{constructor(e){super(),this._terminal=e,this._layers=new Map,this._optionsRefresh=this._register(new W),this._oldOpen=this._terminal._core.open,this._terminal._core.open=e=>{this._oldOpen?.call(this._terminal._core,e),this._open()},this._terminal._core.screenElement&&this._open(),this._optionsRefresh.value=this._terminal._core.optionsService.onOptionChange(e=>{e===`fontSize`&&(this.rescaleCanvas(),this._renderService?.refreshRows(0,this._terminal.rows))}),this._register(H(()=>{this.removeLayerFromDom(),this.removeLayerFromDom(`bottom`),this._terminal._core&&this._oldOpen&&(this._terminal._core.open=this._oldOpen,this._oldOpen=void 0),this._renderService&&this._oldSetRenderer&&(this._renderService.setRenderer=this._oldSetRenderer,this._oldSetRenderer=void 0),this._renderService=void 0,this._layers.clear(),this._placeholderBitmap?.close(),this._placeholderBitmap=void 0,this._placeholder=void 0}))}get canvas(){return this._layers.get(`top`)?.canvas}static createCanvas(e,t,n){let r=(e??document).createElement(`canvas`);return r.width=t|0,r.height=n|0,r}static createImageData(e,t,n,r){if(typeof ImageData!=`function`){let i=e.createImageData(t,n);return r&&i.data.set(new Uint8ClampedArray(r,0,t*n*4)),i}return r?new ImageData(new Uint8ClampedArray(r,0,t*n*4),t,n):new ImageData(t,n)}static createImageBitmap(e){return typeof createImageBitmap==`function`?createImageBitmap(e):Promise.resolve(void 0)}showPlaceholder(e){e?!this._placeholder&&this.cellSize.height!==-1&&this._createPlaceHolder(Math.max(this.cellSize.height+1,24)):(this._placeholderBitmap?.close(),this._placeholderBitmap=void 0,this._placeholder=void 0),this._renderService?.refreshRows(0,this._terminal.rows)}get dimensions(){return this._terminal.dimensions}get cellSize(){return{width:this.dimensions?.css.cell.width||-1,height:this.dimensions?.css.cell.height||-1}}clearLines(e,t,n){let r=e*(this.dimensions?.css.cell.height||0),i=this.dimensions?.css.canvas.width||0,a=(t+1-e)*(this.dimensions?.css.cell.height||0);(!n||n===`top`)&&this._layers.get(`top`)?.clearRect(0,r,i,a),(!n||n===`bottom`)&&this._layers.get(`bottom`)?.clearRect(0,r,i,a)}clearAll(e){if(!e||e===`top`){let e=this._layers.get(`top`);e?.clearRect(0,0,e.canvas.width,e.canvas.height)}if(!e||e===`bottom`){let e=this._layers.get(`bottom`);e?.clearRect(0,0,e.canvas.width,e.canvas.height)}}draw(e,t,n,r,i=1){let a=this._layers.get(e.layer);if(!a)return;let{width:o,height:s}=this.cellSize;if(o===-1||s===-1)return;this._rescaleImage(e,o,s);let c=e.actual,l=Math.ceil(c.width/o),u=t%l*o,d=Math.floor(t/l)*s,f=n*o,p=r*s,m=i*o+u>c.width?c.width-u:i*o,h=d+s>c.height?c.height-d:s;a.drawImage(c,Math.floor(u),Math.floor(d),Math.ceil(m),Math.ceil(h),Math.floor(f),Math.floor(p),Math.ceil(m),Math.ceil(h))}extractTile(t,n){let{width:r,height:i}=this.cellSize;if(r===-1||i===-1)return;this._rescaleImage(t,r,i);let a=t.actual,o=Math.ceil(a.width/r),s=n%o*r,c=Math.floor(n/o)*i,l=r+s>a.width?a.width-s:r,u=c+i>a.height?a.height-c:i,d=e.createCanvas(this.document,l,u),f=d.getContext(`2d`);if(f)return f.drawImage(a,Math.floor(s),Math.floor(c),Math.floor(l),Math.floor(u),0,0,Math.floor(l),Math.floor(u)),d}drawPlaceholder(e,t,n=1){let r=this._layers.get(`top`);if(r){let{width:i,height:a}=this.cellSize;if(i===-1||a===-1||(this._placeholder?a>=this._placeholder.height&&this._createPlaceHolder(a+1):this._createPlaceHolder(Math.max(a+1,24)),!this._placeholder))return;r.drawImage(this._placeholderBitmap??this._placeholder,e*i,t*a%2?0:1,i*n,a,e*i,t*a,i*n,a)}}rescaleCanvas(){let e=this.dimensions?.css.canvas.width||0,t=this.dimensions?.css.canvas.height||0;for(let n of this._layers.values())(n.canvas.width!==e||n.canvas.height!==t)&&(n.canvas.width=e,n.canvas.height=t)}_rescaleImage(t,n,r){if(n===t.actualCellSize.width&&r===t.actualCellSize.height)return;let{width:i,height:a}=t.origCellSize;if(n===i&&r===a){t.actual=t.orig,t.actualCellSize.width=i,t.actualCellSize.height=a;return}let o=e.createCanvas(this.document,Math.ceil(t.orig.width*n/i),Math.ceil(t.orig.height*r/a)),s=o.getContext(`2d`);s&&(s.drawImage(t.orig,0,0,o.width,o.height),t.actual=o,t.actualCellSize.width=n,t.actualCellSize.height=r)}_open(){this._renderService=this._terminal._core._renderService,this._oldSetRenderer=this._renderService.setRenderer.bind(this._renderService),this._renderService.setRenderer=e=>{for(let e of[...this._layers.keys()])this.removeLayerFromDom(e);this._oldSetRenderer?.call(this._renderService,e)}}insertLayerToDom(t=`top`){if(!this.document||!this._terminal._core.screenElement){console.warn(`image addon: cannot insert output canvas to DOM, missing document or screenElement`);return}if(this._layers.has(t))return;let n=e.createCanvas(this.document,this.dimensions?.css.canvas.width||0,this.dimensions?.css.canvas.height||0);n.classList.add(`xterm-image-layer-${t}`);let r=this._terminal._core.screenElement;r.style.isolation=`isolate`,t===`bottom`?(n.style.zIndex=`-1`,r.insertBefore(n,r.firstChild)):(n.style.zIndex=`0`,r.appendChild(n));let i=n.getContext(`2d`,{alpha:!0});if(!i){n.remove();return}this._layers.set(t,i),this.clearAll(t)}removeLayerFromDom(e=`top`){let t=this._layers.get(e);t&&(t.canvas.remove(),this._layers.delete(e))}hasLayer(e){return this._layers.has(e)}_createPlaceHolder(t=24){this._placeholderBitmap?.close(),this._placeholderBitmap=void 0;let n=e.createCanvas(this.document,32,t),r=n.getContext(`2d`,{alpha:!1});if(!r)return;let i=e.createImageData(r,32,t),a=new Uint32Array(i.data.buffer),o=(0,re.toRGBA8888)(0,0,0),s=(0,re.toRGBA8888)(255,255,255);a.fill(o);for(let e=0;e<t;++e){let t=e%2,n=e*32;for(let e=0;e<32;e+=2)a[n+e+t]=s}r.putImageData(i,0,0);let c=screen.width+32-1&-32||4096;this._placeholder=e.createCanvas(this.document,c,t);let l=this._placeholder.getContext(`2d`,{alpha:!1});if(!l){this._placeholder=void 0;return}for(let e=0;e<c;e+=32)l.drawImage(n,e,0);e.createImageBitmap(this._placeholder).then(e=>this._placeholderBitmap=e)}get document(){return this._terminal._core._coreBrowserService?.window.document}},ae={width:7,height:14},oe=class e{constructor(e=0,t=0,n=-1,r=-1){this.imageId=n,this.tileId=r,this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}get urlId(){return this._urlId}set urlId(e){this._urlId=e}clone(){return new e(this._ext,this._urlId,this.imageId,this.tileId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0&&this.imageId===-1}},se=new oe,ce=class{constructor(e,t,n){this._terminal=e,this._renderer=t,this._opts=n,this._images=new Map,this._lastId=0,this._lowestId=0,this._fullyCleared=!1,this._needsFullClear=!1,this._pixelLimit=25e5;try{this.setLimit(this._opts.storageLimit)}catch(e){e instanceof Error&&console.error(e.message),console.warn(`storageLimit is set to ${this.getLimit()} MB`)}this._viewportMetrics={cols:this._terminal.cols,rows:this._terminal.rows}}dispose(){this.reset()}reset(){for(let e of this._images.values())e.marker?.dispose();this._images.clear(),this._renderer.clearAll()}getLimit(){return this._pixelLimit*4/1e6}setLimit(e){if(e<.5||e>1e3)throw RangeError(`invalid storageLimit, should be at least 0.5 MB and not exceed 1G`);this._pixelLimit=e/4*1e6>>>0,this._evictOldest(0)}getUsage(){return this._getStoredPixels()*4/1e6}_getStoredPixels(){let e=0;for(let t of this._images.values())t.orig&&(e+=t.orig.width*t.orig.height,t.actual&&t.actual!==t.orig&&(e+=t.actual.width*t.actual.height));return e}_delImg(e){let t=this._images.get(e);t&&(this._images.delete(e),window.ImageBitmap&&t.orig instanceof ImageBitmap&&t.orig.close(),this.onImageDeleted?.(e))}wipeAlternate(){let e=[];for(let[t,n]of this._images.entries())n.bufferType===`alternate`&&(n.marker?.dispose(),e.push(t));for(let t of e)this._delImg(t);this._needsFullClear=!0,this._fullyCleared=!1}deleteImage(e){let t=this._images.get(e);t&&(t.marker?.dispose(),this._delImg(e))}addImage(e,t){this._evictOldest(e.width*e.height);let n=this._renderer.cellSize;(n.width===-1||n.height===-1)&&(n=ae);let r=Math.ceil(e.width/n.width),i=Math.ceil(e.height/n.height),a=++this._lastId,o=this._terminal._core.buffer,s=this._terminal.cols,c=this._terminal.rows,l=o.x,u=o.y,d=l,f=0;t.scrolling||(o.x=0,o.y=0,d=0),this._terminal._core._inputHandler._dirtyRowTracker.markDirty(o.y);for(let e=0;e<i;++e){let n=o.lines.get(o.y+o.ybase);for(let t=0;t<r&&!(d+t>=s);++t)this._writeToCell(n,d+t,a,e*r+t),f++;if(t.scrolling)e<i-1&&this._terminal._core._inputHandler.lineFeed();else if(++o.y>=c)break;o.x=d}this._terminal._core._inputHandler._dirtyRowTracker.markDirty(o.y),t.scrolling?t.cursorPos===`iip`?o.x=Math.min(d+r,s):o.x=d:(o.x=l,o.y=u);let p=[];for(let[e,t]of this._images.entries())t.tileCount<1&&(t.marker?.dispose(),p.push(e));for(let e of p)this._delImg(e);let m=this._terminal.registerMarker(0);m?.onDispose(()=>{this._images.get(a)&&this._delImg(a)}),this._terminal.buffer.active.type===`alternate`&&this._evictOnAlternate();let h={orig:e,origCellSize:n,actual:e,actualCellSize:{...n},marker:m||void 0,tileCount:f,bufferType:this._terminal.buffer.active.type,layer:t.layer,zIndex:t.zIndex};return this._images.set(a,h),this.onImageAdded?.(),a}render(e){let t=!1,n=!1;for(let e of this._images.values())if(e.layer===`bottom`?n=!0:t=!0,t&&n)break;if(t&&!this._renderer.hasLayer(`top`)&&(this._renderer.insertLayerToDom(`top`),!this._renderer.hasLayer(`top`)))return;if(n&&!this._renderer.hasLayer(`bottom`)&&this._renderer.insertLayerToDom(`bottom`),this._renderer.rescaleCanvas(),!this._images.size){this._fullyCleared||(this._renderer.clearAll(),this._fullyCleared=!0,this._needsFullClear=!1),this._renderer.hasLayer(`top`)&&this._renderer.removeLayerFromDom(`top`),this._renderer.hasLayer(`bottom`)&&this._renderer.removeLayerFromDom(`bottom`);return}!t&&this._renderer.hasLayer(`top`)&&(this._renderer.clearAll(`top`),this._renderer.removeLayerFromDom(`top`)),!n&&this._renderer.hasLayer(`bottom`)&&(this._renderer.clearAll(`bottom`),this._renderer.removeLayerFromDom(`bottom`)),this._needsFullClear&&=(this._renderer.clearAll(),this._fullyCleared=!0,!1);let{start:r,end:i}=e,a=this._terminal._core.buffer,o=this._terminal._core.cols;this._renderer.clearLines(r,i);let s=[],c=[];for(let e=r;e<=i;++e){let t=a.lines.get(e+a.ydisp);if(!t)return;for(let n=0;n<o;++n){let r;if(t.getBg(n)&268435456)r=t._extendedAttrs[n]??se;else{let e=t._extendedAttrs[n];if(!e||e.imageId===void 0||e.imageId===-1)continue;r=e}let i=r.imageId;if(i===void 0||i===-1)continue;let a=this._images.get(i);if(r.tileId!==-1){let l=r.tileId,u=n,d=1;for(;++n<o;){let e=t._extendedAttrs[n];if(!e||e.imageId!==i||e.tileId!==l+d)break;d++}n--,a?a.actual&&s.push({imgSpec:a,tileId:l,col:u,row:e,count:d}):this._opts.showPlaceholder&&c.push({col:u,row:e,count:d}),this._fullyCleared=!1}}}s.sort((e,t)=>e.imgSpec.zIndex-t.imgSpec.zIndex);for(let e of c)this._renderer.drawPlaceholder(e.col,e.row,e.count);for(let e of s)this._renderer.draw(e.imgSpec,e.tileId,e.col,e.row,e.count)}viewportResize(e){if(!this._images.size){this._viewportMetrics=e;return}if(this._viewportMetrics.cols>=e.cols){this._viewportMetrics=e;return}let t=this._terminal._core.buffer,n=t.lines.length,r=this._viewportMetrics.cols-1;for(let i=0;i<n;++i){let n=t.lines.get(i);if(n.getBg(r)&268435456){let t=n._extendedAttrs[r]??se,i=t.imageId;if(i===void 0||i===-1)continue;let a=this._images.get(i);if(!a)continue;let o=Math.ceil((a.actual?.width||0)/a.actualCellSize.width);if(t.tileId%o+1>=o)continue;let s=!1;for(let t=r+1;t>e.cols;++t)if(n._data[t*3+0]&4194303){s=!0;break}if(s)continue;let c=Math.min(e.cols,o-t.tileId%o+r),l=t.tileId;for(let e=r+1;e<c;++e)this._writeToCell(n,e,i,++l),a.tileCount++}}this._viewportMetrics=e}getImageAtBufferCell(e,t){let n=this._terminal._core.buffer.lines.get(t);if(n&&n.getBg(e)&268435456){let t=n._extendedAttrs[e]??se;if(t.imageId&&t.imageId!==-1){let e=this._images.get(t.imageId)?.orig;if(window.ImageBitmap&&e instanceof ImageBitmap){let t=ie.createCanvas(window.document,e.width,e.height);return t.getContext(`2d`)?.drawImage(e,0,0,e.width,e.height),t}return e}}}extractTileAtBufferCell(e,t){let n=this._terminal._core.buffer.lines.get(t);if(n&&n.getBg(e)&268435456){let t=n._extendedAttrs[e]??se;if(t.imageId&&t.imageId!==-1&&t.tileId!==-1){let e=this._images.get(t.imageId);if(e)return this._renderer.extractTile(e,t.tileId)}}}_evictOldest(e){let t=this._getStoredPixels(),n=t;for(;this._pixelLimit<n+e&&this._images.size;){let e=this._images.get(++this._lowestId);e&&e.orig&&(n-=e.orig.width*e.orig.height,e.actual&&e.orig!==e.actual&&(n-=e.actual.width*e.actual.height),e.marker?.dispose(),this._delImg(this._lowestId))}return t-n}_writeToCell(e,t,n,r){if(e._data[t*3+2]&268435456){let i=e._extendedAttrs[t];if(i){if(i.imageId!==void 0){let e=this._images.get(i.imageId);e&&e.tileCount--,i.imageId=n,i.tileId=r;return}e._extendedAttrs[t]=new oe(i.ext,i.urlId,n,r);return}}e._data[t*3+2]|=268435456,e._extendedAttrs[t]=new oe(0,0,n,r)}_evictOnAlternate(){for(let e of this._images.values())e.bufferType===`alternate`&&(e.tileCount=0);let e=this._terminal._core.buffer;for(let t=0;t<this._terminal.rows;++t){let n=e.lines.get(t);if(n){for(let e=0;e<this._terminal.cols;++e)if(n._data[e*3+2]&268435456){let t=n._extendedAttrs[e]?.imageId;if(t){let e=this._images.get(t);e&&e.tileCount++}}}}let t=[];for(let[e,n]of this._images.entries())n.bufferType===`alternate`&&!n.tileCount&&(n.marker?.dispose(),t.push(e));for(let e of t)this._delImg(e)}},le=I(z()),ue=I(ee());function de(e){let t=``;for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}function fe(e){let t=0;for(let n=0;n<e.length;++n){if(e[n]<48||e[n]>57)throw Error(`illegal char`);t=t*10+e[n]-48}return t}function pe(e){let t=de(e);if(!t.match(/^((auto)|(\d+?((px)|(%)){0,1}))$/))throw Error(`illegal size`);return t}function me(e){if(typeof Buffer<`u`)return Buffer.from(de(e),`base64`).toString();let t=atob(de(e)),n=new Uint8Array(t.length);for(let e=0;e<n.length;++e)n[e]=t.charCodeAt(e);return new TextDecoder().decode(n)}var he={inline:fe,size:fe,name:me,width:pe,height:pe,preserveAspectRatio:fe},ge=[70,105,108,101],_e=[77,117,108,116,105,112,97,114,116,70,105,108,101],ve=[70,105,108,101,80,97,114,116],ye=[70,105,108,101,69,110,100],be=[82,101,112,111,114,116,67,101,108,108,83,105,122,101],xe=1024,Se=class{constructor(){this.state=0,this._buffer=new Uint32Array(xe),this._position=0,this._key=``,this.fields={}}reset(){this._buffer.fill(0),this.state=0,this._position=0,this.fields={},this._key=``}end(){if(this.state===0){if(this._position===ye.length){for(let e=0;e<ye.length;++e)if(this._buffer[e]!==ye[e])return this._a();return this.fields.type=4,this.state=4,0}if(this._position===be.length){for(let e=0;e<be.length;++e)if(this._buffer[e]!==be[e])return this._a();return this.fields.type=5,this.state=4,0}return this._a()}return this.state===4?0:this.state===3&&this.fields.type===2&&this._storeValue(this._position)?(this.state=4,0):this._a()}parse(e,t,n){let r=this.state,i=this._position,a=this._buffer;if(r===1||r===4||r===0&&i>14)return-1;for(let o=t;o<n;++o){let t=e[o];switch(t){case 59:if(!this._storeValue(i))return this._a();r=2,i=0;break;case 61:if(r===0){if(a[0]===70){let e=0;for(;e<ge.length;++e)if(a[e]!==ge[e])return this._a();if(this.fields.type=1,i===ve.length){for(;e<ve.length;++e)if(a[e]!==ve[e])return this._a();return this.fields.type=3,this.state=4,o+1}}else if(a[0]===77){for(let e=0;e<_e.length;++e)if(a[e]!==_e[e])return this._a();this.fields.type=2}else return this._a();r=2,i=0}else if(r===2){if(!this._storeKey(i))return this._a();r=3,i=0}else if(r===3){if(i>=xe)return this._a();a[i++]=t}break;case 58:return r===3&&!this._storeValue(i)?this._a():(this.state=4,o+1);default:if(i>=xe)return this._a();a[i++]=t}}return this.state=r,this._position=i,-2}_a(){return this.fields.type=0,this.state=1,-1}_storeKey(e){let t=de(this._buffer.subarray(0,e));return t?(this._key=t,this.fields[t]=null,!0):!1}_storeValue(e){if(this._key){try{let t=this._buffer.slice(0,e);this.fields[this._key]=he[this._key]?he[this._key](t):t}catch{return!1}return!0}return!1}},Ce={mime:`unsupported`,width:0,height:0};function we(e){if(e.length<24)return Ce;let t=new Uint32Array(e.buffer,e.byteOffset,6);if(t[0]===1196314761&&t[1]===169478669&&t[3]===1380206665)return{mime:`image/png`,width:e[16]<<24|e[17]<<16|e[18]<<8|e[19],height:e[20]<<24|e[21]<<16|e[22]<<8|e[23]};if(e[0]===255&&e[1]===216&&e[2]===255){let[t,n]=Te(e);return{mime:`image/jpeg`,width:t,height:n}}return t[0]===944130375&&(e[4]===55||e[4]===57)&&e[5]===97?{mime:`image/gif`,width:e[7]<<8|e[6],height:e[9]<<8|e[8]}:t[0]===1718185841?{mime:`image/qoi`,width:e[4]<<24|e[5]<<16|e[6]<<8|e[7],height:e[8]<<24|e[9]<<16|e[10]<<8|e[11]}:Ce}function Te(e){let t=e.length,n=4,r=e[n]<<8|e[n+1];for(;;){if(n+=r,n>=t||e[n]!==255)return[0,0];if(e[n+1]===192||e[n+1]===194)return n+8<t?[e[n+7]<<8|e[n+8],e[n+5]<<8|e[n+6]]:[0,0];n+=2,r=e[n]<<8|e[n+1]}}var Ee={type:0,name:`Unnamed file`,size:0,width:`auto`,height:`auto`,preserveAspectRatio:1,inline:0},De=class{constructor(e,t,n,r){this._opts=e,this._renderer=t,this._storage=n,this._coreTerminal=r,this._aborted=!1,this._hp=new Se,this._header=Ee,this._metrics=Ce,this._isMultipart=!1,this._abortMulti=!1;let i=Math.ceil(this._opts.iipSizeLimit*4/3),a=Math.min(1048576,i);this._dec=new le.default(4194304,i,a),this._qoiDec=new ue.default(4194304)}reset(){this._hp.reset(),this._dec.release(),this._qoiDec.release()}start(){this._aborted=!1,this._metrics=Ce,this._hp.reset()}put(e,t,n){if(!this._aborted)if(this._hp.state===4)this._dec.put(e.subarray(t,n))!==0&&(this._dec.release(),this._aborted=!0);else{let r=this._hp.parse(e,t,n);if(r===-1){this._aborted=!0;return}if(r>0){if(this._hp.fields.type===1){if(this._isMultipart&&(this._isMultipart=!1,this._abortMulti=!1,this._dec.release()),this._header=Object.assign({},Ee,this._hp.fields),!this._header.inline){this._aborted=!0;return}this._dec.init()}else if(this._abortMulti){this._aborted=!0;return}this._dec.put(e.subarray(r,n))!==0&&(this._dec.release(),this._aborted=!0,this._isMultipart&&(this._abortMulti=!0))}}}end(e){if(this._aborted||this._hp.state!==4&&this._hp.end())return!0;let t=this._hp.fields.type;if(t===3)return!0;if(t===5){let e=ae.width,t=ae.height;this._renderer.dimensions&&(e=this._renderer.dimensions.css.canvas.width/this._coreTerminal.cols,t=this._renderer.dimensions.css.canvas.height/this._coreTerminal.rows);let n=this._coreTerminal._core._coreBrowserService?.dpr??1,r=`\x1B]1337;ReportCellSize=${t.toFixed(3)};${e.toFixed(3)};${n.toFixed(3)}\x1B\\`;return this._coreTerminal.input(r,!1),!0}if(t===2)return this._header=Object.assign({},Ee,this._hp.fields),this._isMultipart=!0,this._abortMulti=!1,this._dec.release(),this._dec.init(),!0;if(t===4&&(!this._isMultipart||(this._isMultipart=!1,this._abortMulti||this._header.type!==2)))return!0;let n=0,r=0,i;if((i=e)&&(i=!this._dec.end())&&(this._metrics=we(this._dec.data8),(i=this._metrics.mime!==`unsupported`)&&(n=this._metrics.width,r=this._metrics.height,(i=n&&r&&n*r<this._opts.pixelLimit)&&([n,r]=this._resize(n,r).map(Math.floor),i=n&&r&&n*r<this._opts.pixelLimit))),!i)return this._dec.release(),!0;let a;if(this._metrics.mime===`image/qoi`){let e=this._qoiDec.decode(this._dec.data8);if(a=new ImageData(new Uint8ClampedArray(e.buffer,e.byteOffset,e.byteLength),this._qoiDec.width,this._qoiDec.height),this._qoiDec.release(),n===this._qoiDec.width&&r===this._qoiDec.height){this._dec.release();let e=ie.createCanvas(void 0,this._qoiDec.width,this._qoiDec.height);return e.getContext(`2d`)?.putImageData(a,0,0),this._storage.addImage(e),!0}}else a=new Blob([this._dec.data8],{type:this._metrics.mime});return this._dec.release(),createImageBitmap(a,{resizeWidth:n,resizeHeight:r}).then(e=>(this._storage.addImage(e),!0))}_resize(e,t){let n=this._renderer.dimensions?.css.cell.width||ae.width,r=this._renderer.dimensions?.css.cell.height||ae.height,i=this._renderer.dimensions?.css.canvas.width||n*this._coreTerminal.cols,a=this._renderer.dimensions?.css.canvas.height||r*this._coreTerminal.rows,o=this._dim(this._header.width,i,n),s=this._dim(this._header.height,a,r);if(!o&&!s){let n=i/e,o=(a-r)/t,s=Math.min(n,o);return s<1?[e*s,t*s]:[e,t]}return o?this._header.preserveAspectRatio||!o||!s?[o,t*o/e]:[o,s]:[e*s/t,s]}_dim(e,t,n){return e===`auto`?0:e.endsWith(`%`)?parseInt(e.slice(0,-1),10)*t/100:e.endsWith(`px`)?parseInt(e.slice(0,-2),10):parseInt(e,10)*n}},Oe=I(z());function ke(e){let t={},n=e.split(`,`);for(let e of n){let n=e.indexOf(`=`);if(n===-1)continue;let r=e.substring(0,n),i=e.substring(n+1);if(r===`a`){t.action=i;continue}if(r===`o`){t.compression=i;continue}if(r===`t`){t.transmission=i;continue}if(r===`d`){t.deleteSelector=i;continue}let a=parseInt(i,10);switch(r){case`f`:t.format=a;break;case`i`:t.id=a;break;case`I`:t.imageNumber=a;break;case`s`:t.width=a;break;case`v`:t.height=a;break;case`x`:t.x=a;break;case`y`:t.y=a;break;case`w`:t.sourceWidth=a;break;case`h`:t.sourceHeight=a;break;case`X`:t.xOffset=a;break;case`Y`:t.yOffset=a;break;case`c`:t.columns=a;break;case`r`:t.rows=a;break;case`m`:t.more=a;break;case`q`:t.quiet=a;break;case`C`:t.cursorMovement=a;break;case`z`:t.zIndex=a;break;case`p`:t.placementId=a;break}}return t}var Ae=0,je=class{constructor(e,t,n,r){this._opts=e,this._renderer=t,this._kittyStorage=n,this._coreTerminal=r,this._aborted=!1,this._decodeError=!1,this._activeDecoder=null,this._inControlData=!0,this._controlData=new Uint32Array(512),this._controlLength=0,this._encodedSizeLimit=0,this._totalEncodedSize=0,this._parsedCommand=null,this._pendingTransmissions=new Map,this._maxEncodedBytes=Math.ceil(this._opts.kittySizeLimit*4/3),this._initialEncodedBytes=Math.min(4194304,this._maxEncodedBytes)}reset(){this._cleanupAllPending(),this._activeDecoder&&=(this._activeDecoder.release(),null),this._kittyStorage.reset()}dispose(){this.reset()}_removePendingEntry(e){this._pendingTransmissions.delete(e),this._lastPendingKey===e&&(this._lastPendingKey=void 0)}_cleanupAllPending(){for(let e of this._pendingTransmissions.values())e.decoder.release();this._pendingTransmissions.clear(),this._lastPendingKey=void 0}start(){this._aborted=!1,this._decodeError=!1,this._inControlData=!0,this._controlLength=0,this._parsedCommand=null,this._encodedSizeLimit=this._maxEncodedBytes,this._totalEncodedSize=0,this._activeDecoder=null}put(e,t,n){if(!this._aborted)if(!this._inControlData)this._streamPayload(e,t,n);else{let r=n;for(let i=t;i<n;i++)if(e[i]===59){this._inControlData=!1,r=i;break}let i=r-t;if(this._controlLength+i>512){this._aborted=!0;return}if(this._controlData.set(e.subarray(t,r),this._controlLength),this._controlLength+=i,!this._inControlData){if(this._parsedCommand=ke(this._parseControlDataString()),this._parsedCommand.id!==void 0&&this._parsedCommand.imageNumber!==void 0){this._sendResponse(this._parsedCommand.id,`EINVAL:cannot specify both i and I keys`,this._parsedCommand.quiet??0),this._aborted=!0;return}if(this._parsedCommand.action===`d`)return;let t=r+1;t<n&&this._streamPayload(e,t,n)}}}_streamPayload(e,t,n){if(this._aborted)return;let r=this._parsedCommand?.id??this._lastPendingKey??0,i=this._pendingTransmissions.get(r),a=i?.totalEncodedSize??0;if(this._totalEncodedSize+=n-t,a+this._totalEncodedSize>this._encodedSizeLimit){let e=this._activeDecoder??i?.decoder;e&&e.release(),this._activeDecoder=null,i&&this._removePendingEntry(r),this._aborted=!0;return}this._decodeError||(i?.decoder&&!this._activeDecoder&&(this._activeDecoder=i.decoder),this._activeDecoder||(this._activeDecoder=new Oe.default(4194304,this._maxEncodedBytes,this._initialEncodedBytes),this._activeDecoder.init()),this._activeDecoder.put(e.subarray(t,n))!==Ae&&(this._activeDecoder.release(),this._activeDecoder=null,this._decodeError=!0,i&&this._removePendingEntry(r)))}end(e){if(this._aborted||!e)return this._activeDecoder&&=(this._activeDecoder.release(),null),!0;if(this._inControlData)return this._handleNoPayloadCommand();let t=this._parsedCommand;if(t.action===`d`)return this._handleDelete(t);let n=t.id??this._lastPendingKey??0,r=t.more===1,i=this._pendingTransmissions.get(n);if(r)return this._activeDecoder&&=(i?(i.totalEncodedSize+=this._totalEncodedSize,i.decodeError=i.decodeError||this._decodeError):this._pendingTransmissions.set(n,{cmd:{...t},decoder:this._activeDecoder,totalEncodedSize:this._totalEncodedSize,decodeError:this._decodeError}),this._lastPendingKey=n,null),!0;i&&(this._lastPendingKey=void 0);let a=this._decodeError,o=t,s=this._activeDecoder;i&&(o=i.cmd,s=i.decoder,a||=i.decodeError,this._pendingTransmissions.delete(n));let c=new Uint8Array;s&&(s.end()!==Ae&&(a=!0),c=s.data8),this._activeDecoder=null;let l=this._handleCommandWithBytesAndCmd(o,c,a);return s&&s.release(),l}_parseControlDataString(){let e=``;for(let t=0;t<this._controlLength;t++)e+=String.fromCodePoint(this._controlData[t]);return e}_handleNoPayloadCommand(){let e=ke(this._parseControlDataString());if(e.id!==void 0&&e.imageNumber!==void 0)return this._sendResponse(e.id,`EINVAL:cannot specify both i and I keys`,e.quiet??0),!0;switch(e.action??`t`){case`d`:return this._handleDelete(e);case`q`:return this._sendResponse(e.id??0,`OK`,e.quiet??0),!0;case`p`:return this._handlePlacement(e);default:return e.id!==void 0&&this._sendResponse(e.id,`EINVAL:unsupported action`,e.quiet??0),!0}}_handleCommandWithBytesAndCmd(e,t,n){switch(e.action??`t`){case`t`:{let r=this._handleTransmit(e,t,n);return(e.transmission??`d`)===`d`&&e.id!==void 0&&(n?this._sendResponse(e.id,`EINVAL:invalid base64 data`,e.quiet??0):t.length>0&&this._sendResponse(e.id,`OK`,e.quiet??0)),r}case`T`:return this._handleTransmitDisplay(e,t,n);case`q`:return this._handleQuery(e,t,n);case`p`:return this._handlePlacement(e);default:return e.id!==void 0&&this._sendResponse(e.id,`EINVAL:unsupported action`,e.quiet??0),!0}}_handlePlacement(e){if(e.id===void 0)return!0;let t=e.id,n=this._kittyStorage.getImage(t);return n?this._displayImage(n,e).then(n=>(this._sendResponse(t,n?`OK`:`EINVAL:image rendering failed`,e.quiet??0,e.placementId),!0)):(this._sendResponse(t,`ENOENT:image not found`,e.quiet??0,e.placementId),!0)}_handleTransmit(e,t,n){return(e.transmission??`d`)===`d`?(n||t.length===0||this._kittyStorage.storeImage(e.id,{data:new Blob([t]),width:e.width??0,height:e.height??0,format:e.format??32,compression:e.compression??``}),!0):(e.id!==void 0&&this._sendResponse(e.id,`EINVAL:unsupported transmission medium`,e.quiet??0),!0)}_handleTransmitDisplay(e,t,n){if(n)return e.id!==void 0&&this._sendResponse(e.id,`EINVAL:invalid base64 data`,e.quiet??0),!0;this._handleTransmit(e,t,n);let r=e.id??this._kittyStorage.lastImageId,i=this._kittyStorage.getImage(r);if(i){let t=this._displayImage(i,e);return e.id===void 0?t.then(()=>!0):t.then(t=>(this._sendResponse(r,t?`OK`:`EINVAL:image rendering failed`,e.quiet??0),!0))}return!0}_handleQuery(e,t,n){let r=e.id??0,i=e.quiet??0;if((e.transmission??`d`)!==`d`)return this._sendResponse(r,`EINVAL:unsupported transmission medium`,i),!0;if(n)return this._sendResponse(r,`EINVAL:invalid base64 data`,i),!0;if(t.length===0)return this._sendResponse(r,`OK`,i),!0;let a=e.format??32;if(a===100)this._sendResponse(r,`OK`,i);else{let n=e.width??0,o=e.height??0;if(!n||!o)return this._sendResponse(r,`EINVAL:width and height required for raw pixel data`,i),!0;let s=a===32?4:3,c=n*o*s;if(t.length<c)return this._sendResponse(r,`EINVAL:insufficient pixel data`,i),!0;this._sendResponse(r,`OK`,i)}return!0}_handleDelete(e){switch(e.deleteSelector??`a`){case`a`:case`A`:this._cleanupAllPending(),this._kittyStorage.deleteAll();break;case`i`:case`I`:if(e.id!==void 0){let t=this._pendingTransmissions.get(e.id);t&&t.decoder.release(),this._removePendingEntry(e.id),this._kittyStorage.deleteById(e.id)}break;default:break}return!0}_sendResponse(e,t,n,r){let i=t===`OK`;if(i&&n>=1||!i&&n>=2)return;let a=`\x1B_Gi=${e}${r?`,p=${r}`:``};${t}\x1B\\`;this._coreTerminal._core.coreService.triggerDataEvent(a)}_displayImage(e,t){return this._decodeAndDisplay(e,t).then(()=>!0).catch(()=>!1)}async _decodeAndDisplay(e,t){let n=await this._createBitmap(e);try{let r=Math.max(0,t.x??0),i=Math.max(0,t.y??0),a=t.sourceWidth||n.width-r,o=t.sourceHeight||n.height-i,s=Math.max(0,n.width-r),c=Math.max(0,n.height-i),l=Math.max(0,Math.min(a,s)),u=Math.max(0,Math.min(o,c));if(l===0||u===0)throw Error(`invalid source rectangle`);if(r!==0||i!==0||l!==n.width||u!==n.height){let e=await createImageBitmap(n,r,i,l,u);n.close(),n=e}let d=this._renderer.dimensions?.css.cell.width||ae.width,f=this._renderer.dimensions?.css.cell.height||ae.height,p,m;t.columns!==void 0&&t.rows!==void 0?(p=t.columns,m=t.rows):t.columns===void 0?t.rows===void 0?(p=Math.ceil(n.width/d),m=Math.ceil(n.height/f)):(m=t.rows,p=Math.max(1,Math.ceil(n.width/n.height*(m*f)/d))):(p=t.columns,m=Math.max(1,Math.ceil(n.height/n.width*(p*d)/f)));let h=n.width,g=n.height;if((t.columns!==void 0||t.rows!==void 0)&&(h=Math.round(p*d),g=Math.round(m*f)),h*g>this._opts.pixelLimit)throw Error(`image exceeds pixel limit`);let _=this._coreTerminal._core.buffer,v=_.x,y=_.y,b=_.ybase,x=t.zIndex!==void 0&&t.zIndex<0?`bottom`:`top`;if(h!==n.width||g!==n.height){let e=await createImageBitmap(n,{resizeWidth:h,resizeHeight:g});n.close(),n=e}let S=Math.min(Math.max(0,t.xOffset??0),d-1),C=Math.min(Math.max(0,t.yOffset??0),f-1);if(S!==0||C!==0){let e=t.columns===void 0?n.width+S:Math.round(p*d),r=t.rows===void 0?n.height+C:Math.round(m*f),i=ie.createCanvas(window.document,e,r),a=i.getContext(`2d`);if(!a)throw Error(`Failed to create offset canvas context`);a.drawImage(n,S,C);let o=await createImageBitmap(i);if(i.width=i.height=0,n.close(),n=o,h=n.width,g=n.height,h*g>this._opts.pixelLimit)throw Error(`image exceeds pixel limit`);t.columns===void 0&&(p=Math.ceil(n.width/d)),t.rows===void 0&&(m=Math.ceil(n.height/f))}let w=t.zIndex??0;if(this._kittyStorage.addImage(e.id,n,!0,x,w),n=void 0,t.cursorMovement===1){let e=_.ybase-b;_.x=v,_.y=Math.max(y-e,0)}else _.x=Math.min(v+p,this._coreTerminal.cols)}catch(e){throw n?.close(),e}}async _createBitmap(e){let t=new Uint8Array(await e.data.arrayBuffer());if(e.compression===`z`&&(t=await this._decompressZlib(t)),e.format===100){let e=new Blob([t],{type:`image/png`});if(!window.createImageBitmap){let t=URL.createObjectURL(e),n=new Image;return new Promise((e,r)=>{n.addEventListener(`load`,()=>{URL.revokeObjectURL(t);let i=ie.createCanvas(window.document,n.width,n.height);i.getContext(`2d`)?.drawImage(n,0,0),createImageBitmap(i).then(e).catch(r)}),n.addEventListener(`error`,()=>{URL.revokeObjectURL(t),r(Error(`Failed to load image`))}),n.src=t})}return createImageBitmap(e)}let n=e.width,r=e.height;if(!n||!r)throw Error(`Width and height required for raw pixel data`);let i=e.format===32?4:3,a=n*r*i;if(t.length<a)throw Error(`Insufficient pixel data`);let o=n*r;if(e.format===32)return createImageBitmap(new ImageData(new Uint8ClampedArray(t.buffer,t.byteOffset,o*4),n,r));let s=new Uint8ClampedArray(o*4),c=new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),l=new Uint32Array(s.buffer),u=o&-4,d=0,f=0;for(let e=0;e<u;e+=4){let e=c[d++],t=c[d++],n=c[d++];l[f++]=4278190080|e,l[f++]=4278190080|e>>>24|t<<8,l[f++]=4278190080|t>>>16|n<<16,l[f++]=4278190080|n>>>8}let p=u*3,m=u*4;for(let e=u;e<o;e++)s[m]=t[p],s[m+1]=t[p+1],s[m+2]=t[p+2],s[m+3]=255,p+=3,m+=4;return createImageBitmap(new ImageData(s,n,r))}async _decompressZlib(e){try{return await this._decompress(e,`deflate`)}catch{return await this._decompress(e,`deflate-raw`)}}async _decompress(e,t){let n=new DecompressionStream(t),r=n.writable.getWriter();r.write(e),r.close();let i=[],a=n.readable.getReader();for(;;){let{done:e,value:t}=await a.read();if(e)break;i.push(t)}let o=i.reduce((e,t)=>e+t.length,0),s=new Uint8Array(o),c=0;for(let e of i)s.set(e,c),c+=e.length;return s}get images(){return this._kittyStorage.images}get _kittyIdToStorageId(){return this._kittyStorage.kittyIdToStorageId}get pendingTransmissions(){return this._pendingTransmissions}},Me=class e{constructor(e){this._storage=e,this._nextImageId=1,this._images=new Map,this._kittyIdToStorageId=new Map,this._storageIdToKittyId=new Map,this._handleStorageImageDeleted=e=>{let t=this._storageIdToKittyId.get(e);t!==void 0&&(this._kittyIdToStorageId.delete(t),this._storageIdToKittyId.delete(e),this._images.delete(t))},this._addImageOpts={scrolling:!0,layer:`top`,zIndex:0,cursorPos:`iip`},this._previousOnImageDeleted=this._storage.onImageDeleted,this._wrappedOnImageDeleted=e=>{this._previousOnImageDeleted?.(e),this._handleStorageImageDeleted(e)},this._storage.onImageDeleted=this._wrappedOnImageDeleted}reset(){this._nextImageId=1,this._images.clear(),this._kittyIdToStorageId.clear(),this._storageIdToKittyId.clear()}dispose(){this.reset(),this._storage.onImageDeleted===this._wrappedOnImageDeleted&&(this._storage.onImageDeleted=this._previousOnImageDeleted)}storeImage(t,n){let r=t??this._nextImageId++,i=this._kittyIdToStorageId.get(r);return i!==void 0&&(this._storage.deleteImage(i),this._kittyIdToStorageId.delete(r),this._storageIdToKittyId.delete(i)),!this._images.has(r)&&this._images.size>=e._maxStoredImages&&this._evictUndisplayedImages(),this._images.set(r,{...n,id:r}),r}addImage(e,t,n,r,i){let a=this._kittyIdToStorageId.get(e);a!==void 0&&this._storageIdToKittyId.delete(a),this._addImageOpts.scrolling=n,this._addImageOpts.layer=r,this._addImageOpts.zIndex=i;let o=this._storage.addImage(t,this._addImageOpts);this._kittyIdToStorageId.set(e,o),this._storageIdToKittyId.set(o,e)}getImage(e){return this._images.get(e)}deleteById(e){this._images.delete(e);let t=this._kittyIdToStorageId.get(e);t!==void 0&&(this._storage.deleteImage(t),this._kittyIdToStorageId.delete(e),this._storageIdToKittyId.delete(t))}deleteAll(){this._images.clear();for(let e of this._kittyIdToStorageId.values())this._storage.deleteImage(e);this._kittyIdToStorageId.clear(),this._storageIdToKittyId.clear()}get images(){return this._images}get kittyIdToStorageId(){return this._kittyIdToStorageId}get lastImageId(){return this._nextImageId-1}_evictUndisplayedImages(){for(let[t]of this._images){if(this._images.size<=e._maxStoredImages/2)break;this._kittyIdToStorageId.has(t)||this._images.delete(t)}}};Me._maxStoredImages=256;var Ne=Me,Pe=I(L()),Fe=I(V()),Ie=4194304,Le=Pe.PALETTE_ANSI_256;Le.set(Pe.PALETTE_VT340_COLOR);var Re=class{constructor(e,t,n){this._opts=e,this._storage=t,this._coreTerminal=n,this._size=0,this._aborted=!1,(0,Fe.DecoderAsync)({memoryLimit:this._opts.pixelLimit*4,palette:Le,paletteLimit:this._opts.sixelPaletteLimit}).then(e=>this._dec=e)}reset(){this._dec&&(this._dec.release(),this._dec._palette.fill(0),this._dec.init(0,Le,this._opts.sixelPaletteLimit))}hook(e){if(this._size=0,this._aborted=!1,this._dec){let t=e.params[1]===1?0:ze(this._coreTerminal._core._inputHandler._curAttrData,this._coreTerminal._core._themeService?.colors);this._dec.init(t,null,this._opts.sixelPaletteLimit)}}put(e,t,n){if(!(this._aborted||!this._dec)){if(this._size+=n-t,this._size>this._opts.sixelSizeLimit){console.warn(`SIXEL: too much data, aborting`),this._aborted=!0,this._dec.release();return}try{this._dec.decode(e,t,n)}catch(e){console.warn(`SIXEL: error while decoding image - ${e}`),this._aborted=!0,this._dec.release()}}}unhook(e){if(this._aborted||!e||!this._dec)return!0;let t=this._dec.width,n=this._dec.height;if(!t||!n)return n&&this._storage.advanceCursor(n),!0;let r=ie.createCanvas(void 0,t,n);return r.getContext(`2d`)?.putImageData(new ImageData(this._dec.data8,t,n),0,0),this._dec.memoryUsage>Ie&&this._dec.release(),this._storage.addImage(r),!0}};function ze(e,t){let n=0;if(!t)return n;if(e.isInverse())if(e.isFgDefault())n=Be(t.foreground.rgba);else if(e.isFgRGB()){let t=e.constructor.toColorRGB(e.getFgColor());n=(0,Pe.toRGBA8888)(...t)}else n=Be(t.ansi[e.getFgColor()].rgba);else if(e.isBgDefault())n=Be(t.background.rgba);else if(e.isBgRGB()){let t=e.constructor.toColorRGB(e.getBgColor());n=(0,Pe.toRGBA8888)(...t)}else n=Be(t.ansi[e.getBgColor()].rgba);return n}function Be(e){return Pe.BIG_ENDIAN?e:(e&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255}var Ve=class{constructor(e,t,n,r){this._storage=e,this._opts=t,this._renderer=n,this._terminal=r,this._addImageOpts={scrolling:!0,layer:`top`,zIndex:0,cursorPos:`vt340`}}addImage(e){this._addImageOpts.scrolling=this._opts.sixelScrolling,this._storage.addImage(e,this._addImageOpts)}advanceCursor(e){if(this._opts.sixelScrolling){let t=this._renderer.cellSize;(t.width===-1||t.height===-1)&&(t=ae);let n=Math.ceil(e/t.height);for(let e=1;e<n;++e)this._terminal._core._inputHandler.lineFeed()}}},He=class{constructor(e){this._storage=e,this._addImageOpts={scrolling:!0,layer:`top`,zIndex:0,cursorPos:`iip`}}addImage(e){this._storage.addImage(e,this._addImageOpts)}},Ue={enableSizeReports:!0,pixelLimit:16777216,sixelSupport:!0,sixelScrolling:!0,sixelPaletteLimit:4096,sixelSizeLimit:33554432,storageLimit:128,showPlaceholder:!0,iipSupport:!0,iipSizeLimit:33554432,kittySupport:!0,kittySizeLimit:33554432},We=4096,Ge=class{constructor(e){this._disposables=[],this._handlers=new Map,this._onImageAdded=new ne,this.onImageAdded=this._onImageAdded.event,this._opts=Object.assign({},Ue,e),this._defaultOpts=Object.assign({},Ue,e)}dispose(){for(let e of this._disposables)e.dispose();this._disposables.length=0,this._handlers.clear(),this._onImageAdded.dispose()}_disposeLater(...e){for(let t of e)this._disposables.push(t)}activate(e){if(this._terminal=e,this._renderer=new ie(e),this._storage=new ce(e,this._renderer,this._opts),this._storage.onImageAdded=()=>this._onImageAdded.fire(),this._opts.enableSizeReports){let t=e.options.windowOptions??{};t.getWinSizePixels=!0,t.getCellSizePixels=!0,t.getWinSizeChars=!0,e.options.windowOptions=t}if(this._disposeLater(this._renderer,this._storage,e.parser.registerCsiHandler({prefix:`?`,final:`h`},e=>this._decset(e)),e.parser.registerCsiHandler({prefix:`?`,final:`l`},e=>this._decrst(e)),e.parser.registerCsiHandler({final:`c`},e=>this._da1(e)),e.parser.registerCsiHandler({prefix:`?`,final:`S`},e=>this._xtermGraphicsAttributes(e)),e.onRender(e=>this._storage?.render(e)),e.parser.registerCsiHandler({intermediates:`!`,final:`p`},()=>this.reset()),e.parser.registerEscHandler({final:`c`},()=>this.reset()),e._core._inputHandler.onRequestReset(()=>this.reset()),e.buffer.onBufferChange(()=>this._storage?.wipeAlternate()),e.onResize(e=>this._storage?.viewportResize(e))),this._opts.sixelSupport){let t=new Ve(this._storage,this._opts,this._renderer,e),n=new Re(this._opts,t,e);this._handlers.set(`sixel`,n),this._disposeLater(e._core._inputHandler._parser.registerDcsHandler({final:`q`},n))}if(this._opts.iipSupport){let t=new He(this._storage),n=new De(this._opts,this._renderer,t,e);this._handlers.set(`iip`,n),this._disposeLater(e._core._inputHandler._parser.registerOscHandler(1337,n))}if(this._opts.kittySupport){let t=new Ne(this._storage),n=new je(this._opts,this._renderer,t,e);this._handlers.set(`kitty`,n),this._disposeLater(t,n,e._core._inputHandler._parser.registerApcHandler({final:`G`},n))}}reset(){this._opts.sixelScrolling=this._defaultOpts.sixelScrolling,this._opts.sixelPaletteLimit=this._defaultOpts.sixelPaletteLimit,this._storage?.reset();for(let e of this._handlers.values())e.reset();return!1}get storageLimit(){return this._storage?.getLimit()||-1}set storageLimit(e){this._storage?.setLimit(e),this._opts.storageLimit=e}get storageUsage(){return this._storage?this._storage.getUsage():-1}get showPlaceholder(){return this._opts.showPlaceholder}set showPlaceholder(e){this._opts.showPlaceholder=e,this._renderer?.showPlaceholder(e)}getImageAtBufferCell(e,t){return this._storage?.getImageAtBufferCell(e,t)}extractTileAtBufferCell(e,t){return this._storage?.extractTileAtBufferCell(e,t)}_report(e){this._terminal?._core.input(e,!1)}_decset(e){for(let t=0;t<e.length;++t)e[t]===80&&(this._opts.sixelScrolling=!1);return!1}_decrst(e){for(let t=0;t<e.length;++t)e[t]===80&&(this._opts.sixelScrolling=!0);return!1}_da1(e){return e[0]?!0:this._opts.sixelSupport?(this._report(`\x1B[?62;4;9;22c`),!0):!1}_xtermGraphicsAttributes(e){if(e.length<2)return!0;if(e[0]===1)switch(e[1]){case 1:return this._report(`\x1B[?${e[0]};0;${this._opts.sixelPaletteLimit}S`),!0;case 2:this._opts.sixelPaletteLimit=this._defaultOpts.sixelPaletteLimit,this._report(`\x1B[?${e[0]};0;${this._opts.sixelPaletteLimit}S`);for(let e of this._handlers.values())e.reset();return!0;case 3:return e.length>2&&!(e[2]instanceof Array)&&e[2]<=We?(this._opts.sixelPaletteLimit=e[2],this._report(`\x1B[?${e[0]};0;${this._opts.sixelPaletteLimit}S`)):this._report(`\x1B[?${e[0]};2S`),!0;case 4:return this._report(`\x1B[?${e[0]};0;${We}S`),!0;default:return this._report(`\x1B[?${e[0]};2S`),!0}if(e[0]===2)switch(e[1]){case 1:let t=this._renderer?.dimensions?.css.canvas.width,n=this._renderer?.dimensions?.css.canvas.height;if(!t||!n){let e=ae;t=(this._terminal?.cols||80)*e.width,n=(this._terminal?.rows||24)*e.height}if(t*n<this._opts.pixelLimit)this._report(`\x1B[?${e[0]};0;${t.toFixed(0)};${n.toFixed(0)}S`);else{let t=Math.floor(Math.sqrt(this._opts.pixelLimit));this._report(`\x1B[?${e[0]};0;${t};${t}S`)}return!0;case 4:let r=Math.floor(Math.sqrt(this._opts.pixelLimit));return this._report(`\x1B[?${e[0]};0;${r};${r}S`),!0;default:return this._report(`\x1B[?${e[0]};2S`),!0}return this._report(`\x1B[?${e[0]};1S`),!0}};function Ke(e){let t=0;for(let n=0;n<e.length;++n){let r=e.charCodeAt(n);if(r<48||57<r)return-1;t=t*10+r-48}return t}var qe=class{constructor(){this._st=0,this._pr=0}dispose(){this._seqHandler?.dispose(),this._onChange?.dispose()}activate(e){this._seqHandler=e.parser.registerOscHandler(9,e=>{if(!e.startsWith(`4;`))return!1;let t=e.split(`;`);if(t.length>3)return!0;t.length===2&&t.push(``);let n=Ke(t[1]),r=Ke(t[2]);switch(n){case 0:this.progress={state:n,value:0};break;case 1:if(r<0)return!0;this.progress={state:n,value:r};break;case 2:case 4:if(r<0)return!0;this.progress={state:n,value:r||this._pr};break;case 3:this.progress={state:n,value:this._pr};break}return!0}),this._onChange=new e._core._onData.constructor,this.onChange=this._onChange.event}get progress(){return{state:this._st,value:this._pr}}set progress(e){if(e.state<0||e.state>4){console.warn(`progress state out of bounds, not applied`);return}this._st=e.state,this._pr=Math.min(Math.max(e.value,0),100),this._onChange?.fire({state:this._st,value:this._pr})}};function Je(e){return{dispose:e}}function Ye(e){if(!e)return e;if(Array.isArray(e)){for(let t of e)t.dispose();return[]}return e.dispose(),e}function Xe(...e){return Je(()=>Ye(e))}var Ze=class{constructor(){this._disposables=new Set,this._isDisposed=!1}get isDisposed(){return this._isDisposed}add(e){return this._isDisposed?e.dispose():this._disposables.add(e),e}dispose(){if(!this._isDisposed){this._isDisposed=!0;for(let e of this._disposables)e.dispose();this._disposables.clear()}}clear(){for(let e of this._disposables)e.dispose();this._disposables.clear()}},Qe=class{constructor(){this._store=new Ze}dispose(){this._store.dispose()}_register(e){return this._store.add(e)}};Qe.None=Object.freeze({dispose(){}});var $e=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},et=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||=(e,t,n)=>{if(this._disposed)return Je(()=>{});let r={fn:e,thisArgs:t};this._listeners.push(r);let i=Je(()=>{let e=this._listeners.indexOf(r);e!==-1&&this._listeners.splice(e,1)});return n&&(Array.isArray(n)?n.push(i):n.add(i)),i},this._event}fire(e){if(!this._disposed)switch(this._listeners.length){case 0:return;case 1:{let{fn:t,thisArgs:n}=this._listeners[0];t.call(n,e);return}default:{let t=this._listeners.slice();for(let{fn:n,thisArgs:r}of t)n.call(r,e)}}}dispose(){this._disposed||(this._disposed=!0,this._listeners.length=0)}},tt;(e=>{function t(e,t){return e(e=>t.fire(e))}e.forward=t;function n(e,t){return(n,r,i)=>e(e=>n.call(r,t(e)),void 0,i)}e.map=n;function r(...e){return(t,n,r)=>{let i=new Ze;for(let r of e)i.add(r(e=>t.call(n,e)));return r&&(Array.isArray(r)?r.push(i):r.add(i)),i}}e.any=r;function i(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=i})(tt||={});function nt(e,t=0,n){let r=setTimeout(()=>{e(),n&&i.dispose()},t),i=Je(()=>{clearTimeout(r)});return n?.add(i),i}var rt=class extends Qe{constructor(e){super(),this._terminal=e,this._linesCacheTimeout=this._register(new $e),this._linesCacheDisposables=this._register(new $e),this._lastAccessTimestamp=0,this._register(Je(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=Xe(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._lastAccessTimestamp=Date.now(),this._linesCacheTimeout.value||this._scheduleLinesCacheTimeout(15e3)}_destroyLinesCache(){this._linesCache=void 0,this._lastAccessTimestamp=0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}_scheduleLinesCacheTimeout(e){this._linesCacheTimeout.value=nt(()=>{if(!this._linesCache)return;let e=Date.now()-this._lastAccessTimestamp;if(e>=15e3){this._destroyLinesCache();return}this._scheduleLinesCacheTimeout(15e3-e)},e)}getLineFromCache(e){return this._linesCache?.[e]}setLineInCache(e,t){this._linesCache&&(this._linesCache[e]=t)}translateBufferLineToStringWithWrap(e,t){let n=[],r=[0],i=this._terminal.buffer.active.getLine(e);for(;i;){let a=this._terminal.buffer.active.getLine(e+1),o=a?a.isWrapped:!1,s=i.translateToString(!o&&t);if(o&&a){let e=i.getCell(i.length-1);e&&e.getCode()===0&&e.getWidth()===1&&a.getCell(0)?.getWidth()===2&&(s=s.slice(0,-1))}if(n.push(s),o)r.push(r[r.length-1]+s.length);else break;e++,i=a}return[n.join(``),r]}},it=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(e){this._cachedSearchTerm=e}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(e){this._lastSearchOptions=e}isValidSearchTerm(e){return!!(e&&e.length>0)}didOptionsChange(e){return this._lastSearchOptions?e?this._lastSearchOptions.caseSensitive!==e.caseSensitive||this._lastSearchOptions.regex!==e.regex||this._lastSearchOptions.wholeWord!==e.wholeWord:!1:!0}shouldUpdateHighlighting(e,t){return t?.decorations?this._cachedSearchTerm===void 0||e!==this._cachedSearchTerm||this.didOptionsChange(t):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},at=class{constructor(e,t){this._terminal=e,this._lineCache=t}find(e,t,n,r){if(!e||e.length===0){this._terminal.clearSelection();return}if(n>=this._terminal.cols)throw Error(`Invalid col: ${n} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let i={startRow:t,startCol:n},a=this._findInLine(e,i,r);if(!a)for(let n=t+1;n<this._terminal.buffer.active.baseY+this._terminal.rows&&(i.startRow=n,i.startCol=0,a=this._findInLine(e,i,r),!a);n++);return a}findNextWithSelection(e,t,n){if(!e||e.length===0){this._terminal.clearSelection();return}let r=this._terminal.getSelectionPosition();this._terminal.clearSelection();let i=0,a=0;r&&(n===e?(i=r.end.x,a=r.end.y):(i=r.start.x,a=r.start.y)),this._lineCache.initLinesCache();let o={startRow:a,startCol:i},s=this._findInLine(e,o,t);if(!s)for(let n=a+1;n<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=n,o.startCol=0,s=this._findInLine(e,o,t),!s);n++);if(!s&&a!==0)for(let n=0;n<a&&(o.startRow=n,o.startCol=0,s=this._findInLine(e,o,t),!s);n++);return!s&&r&&(o.startRow=r.start.y,o.startCol=0,s=this._findInLine(e,o,t)),s}findPreviousWithSelection(e,t,n){if(!e||e.length===0){this._terminal.clearSelection();return}let r=this._terminal.getSelectionPosition();this._terminal.clearSelection();let i=this._terminal.buffer.active.baseY+this._terminal.rows-1,a=this._terminal.cols;this._lineCache.initLinesCache();let o={startRow:i,startCol:a},s;if(r&&(o.startRow=i=r.start.y,o.startCol=r.start.x,n!==e&&(s=this._findInLine(e,o,t,!1),s||(o.startRow=i=r.end.y,o.startCol=r.end.x))),s??=this._findInLine(e,o,t,!0),!s){o.startCol=Math.max(o.startCol,this._terminal.cols);for(let n=i-1;n>=0&&(o.startRow=n,s=this._findInLine(e,o,t,!0),!s);n--);}if(!s&&i!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let n=this._terminal.buffer.active.baseY+this._terminal.rows-1;n>=i&&(o.startRow=n,s=this._findInLine(e,o,t,!0),!s);n--);return s}_isWholeWord(e,t,n){return(e===0||` ~!@#$%^&*()+\`-=[]{}|\\;:"',./<>?`.includes(t[e-1]))&&(e+n.length===t.length||` ~!@#$%^&*()+\`-=[]{}|\\;:"',./<>?`.includes(t[e+n.length]))}_findInLine(e,t,n={},r=!1){let i=t.startRow,a=t.startCol;if(this._terminal.buffer.active.getLine(i)?.isWrapped){if(r){t.startCol+=this._terminal.cols;return}return t.startRow--,t.startCol+=this._terminal.cols,this._findInLine(e,t,n)}let o=this._lineCache.getLineFromCache(i);o||(o=this._lineCache.translateBufferLineToStringWithWrap(i,!0),this._lineCache.setLineInCache(i,o));let[s,c]=o,l=this._bufferColsToStringOffset(i,a),u=e,d=s;n.regex||(u=n.caseSensitive?e:e.toLowerCase(),d=n.caseSensitive?s:s.toLowerCase());let f=-1;if(n.regex){let t=RegExp(u,n.caseSensitive?`g`:`gi`),i;if(r)for(;i=t.exec(d.slice(0,l));)f=t.lastIndex-i[0].length,e=i[0],t.lastIndex-=e.length-1;else i=t.exec(d.slice(l)),i&&i[0].length>0&&(f=l+(t.lastIndex-i[0].length),e=i[0])}else r?l-u.length>=0&&(f=d.lastIndexOf(u,l-u.length)):f=d.indexOf(u,l);if(f>=0){if(n.wholeWord&&!this._isWholeWord(f,d,e))return;let t=0;for(;t<c.length-1&&f>=c[t+1];)t++;let r=t;for(;r<c.length-1&&f+e.length>=c[r+1];)r++;let a=f-c[t],o=f+e.length-c[r],s=this._stringLengthToBufferSize(i+t,a),l=this._stringLengthToBufferSize(i+r,o)-s+this._terminal.cols*(r-t);return{term:e,col:s,row:i+t,size:l}}}_stringLengthToBufferSize(e,t){let n=this._terminal.buffer.active.getLine(e);if(!n)return 0;for(let e=0;e<t;e++){let r=n.getCell(e);if(!r)break;let i=r.getChars();i.length>1&&(t-=i.length-1);let a=n.getCell(e+1);a&&a.getWidth()===0&&t++}return t}_bufferColsToStringOffset(e,t){let n=e,r=0,i=this._terminal.buffer.active.getLine(n);for(;t>0&&i;){for(let e=0;e<t&&e<this._terminal.cols;e++){let t=i.getCell(e);if(!t)break;t.getWidth()&&(r+=t.getCode()===0?1:t.getChars().length)}if(n++,i=this._terminal.buffer.active.getLine(n),i&&!i.isWrapped)break;t-=this._terminal.cols}return r}},ot=class extends Qe{constructor(e){super(),this._terminal=e,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(Je(()=>this.clearHighlightDecorations()))}createHighlightDecorations(e,t){this.clearHighlightDecorations();for(let n of e){let e=this._createResultDecorations(n,t,!1);if(e)for(let t of e)this._storeDecoration(t,n)}}createActiveDecoration(e,t){let n=this._createResultDecorations(e,t,!0);if(n)return{decorations:n,match:e,dispose(){Ye(n)}}}clearHighlightDecorations(){Ye(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(e,t){this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:t,dispose(){e.dispose()}})}_applyStyles(e,t,n){e.classList.contains(`xterm-find-result-decoration`)||(e.classList.add(`xterm-find-result-decoration`),t&&(e.style.outline=`1px solid ${t}`)),n&&e.classList.add(`xterm-find-active-result-decoration`)}_createResultDecorations(e,t,n){let r=[],i=e.col,a=e.size,o=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+e.row;for(;a>0;){let e=Math.min(this._terminal.cols-i,a);r.push([o,i,e]),i=0,a-=e,o++}let s=[];for(let e of r){let r=this._terminal.registerMarker(e[0]),i=this._terminal.registerDecoration({marker:r,x:e[1],width:e[2],layer:n?`top`:`bottom`,backgroundColor:n?t.activeMatchBackground:t.matchBackground,overviewRulerOptions:this._highlightedLines.has(r.line)?void 0:{color:n?t.activeMatchColorOverviewRuler:t.matchOverviewRuler,position:`center`}});if(i){let e=[];e.push(r),e.push(i.onRender(e=>this._applyStyles(e,n?t.activeMatchBorder:t.matchBorder,!1))),e.push(i.onDispose(()=>Ye(e))),s.push(i)}}return s.length===0?void 0:s}},st=class extends Qe{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new et)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(e){this._selectedDecoration=e}updateResults(e,t){this._searchResults=e.slice(0,t)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&=(this._selectedDecoration.dispose(),void 0)}findResultIndex(e){for(let t=0;t<this._searchResults.length;t++){let n=this._searchResults[t];if(n.row===e.row&&n.col===e.col&&n.size===e.size)return t}return-1}fireResultsChanged(e){if(!e)return;let t=-1;this._selectedDecoration&&(t=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:t,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},ct=class extends Qe{constructor(e){super(),this._highlightTimeout=this._register(new $e),this._lineCache=this._register(new $e),this._state=new it,this._resultTracker=this._register(new st),this._onAfterSearch=this._register(new et),this.onAfterSearch=this._onAfterSearch.event,this._onBeforeSearch=this._register(new et),this.onBeforeSearch=this._onBeforeSearch.event,this._highlightLimit=e?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(e){this._terminal=e,this._lineCache.value=new rt(e),this._engine=new at(e,this._lineCache.value),this._decorationManager=new ot(e),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(Je(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=nt(()=>{let e=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(e,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(e){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),e||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(e,t,n){if(!this._terminal||!this._engine)throw Error(`Cannot use addon until it has been loaded`);this._onBeforeSearch.fire(),this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let r=this._findNextAndSelect(e,t,n);return this._fireResults(t),this._state.cachedSearchTerm=e,this._onAfterSearch.fire(),r}_highlightAllMatches(e,t){if(!this._terminal||!this._engine||!this._decorationManager)throw Error(`Cannot use addon until it has been loaded`);if(!this._state.isValidSearchTerm(e)){this.clearDecorations();return}this.clearDecorations(!0);let n=[],r,i=this._engine.find(e,0,0,t);for(;i&&(r?.row!==i.row||r?.col!==i.col)&&!(n.length>=this._highlightLimit);){r=i,n.push(r);let a=this._terminal.cols,o=r.col+r.size,s=r.row;o>=a&&(s+=Math.floor(o/a),o%=a),i=this._engine.find(e,s,o,t)}this._resultTracker.updateResults(n,this._highlightLimit),t.decorations&&this._decorationManager.createHighlightDecorations(n,t.decorations)}_findNextAndSelect(e,t,n){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let r=this._engine.findNextWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(r,t?.decorations,n?.noScroll)}findPrevious(e,t,n){if(!this._terminal||!this._engine)throw Error(`Cannot use addon until it has been loaded`);this._onBeforeSearch.fire(),this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let r=this._findPreviousAndSelect(e,t,n);return this._fireResults(t),this._state.cachedSearchTerm=e,this._onAfterSearch.fire(),r}_fireResults(e){this._resultTracker.fireResultsChanged(!!e?.decorations)}_findPreviousAndSelect(e,t,n){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let r=this._engine.findPreviousWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(r,t?.decorations,n?.noScroll)}_selectResult(e,t,n){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!e)return this._terminal.clearSelection(),!1;if(this._terminal.select(e.col,e.row,e.size),t){let n=this._decorationManager.createActiveDecoration(e,t);n&&(this._resultTracker.selectedDecoration=n)}if(!n&&(e.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||e.row<this._terminal.buffer.active.viewportY)){let t=e.row-this._terminal.buffer.active.viewportY;t-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(t)}return!0}};function lt(e){return{dispose:e}}var ut=class{constructor(){this._disposables=new Set,this._isDisposed=!1}get isDisposed(){return this._isDisposed}add(e){return this._isDisposed?e.dispose():this._disposables.add(e),e}dispose(){if(!this._isDisposed){this._isDisposed=!0;for(let e of this._disposables)e.dispose();this._disposables.clear()}}clear(){for(let e of this._disposables)e.dispose();this._disposables.clear()}},dt=class{constructor(){this._store=new ut}dispose(){this._store.dispose()}_register(e){return this._store.add(e)}};dt.None=Object.freeze({dispose(){}});var ft=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||=(e,t,n)=>{if(this._disposed)return lt(()=>{});let r={fn:e,thisArgs:t};this._listeners.push(r);let i=lt(()=>{let e=this._listeners.indexOf(r);e!==-1&&this._listeners.splice(e,1)});return n&&(Array.isArray(n)?n.push(i):n.add(i)),i},this._event}fire(e){if(!this._disposed)switch(this._listeners.length){case 0:return;case 1:{let{fn:t,thisArgs:n}=this._listeners[0];t.call(n,e);return}default:{let t=this._listeners.slice();for(let{fn:n,thisArgs:r}of t)n.call(r,e)}}}dispose(){this._disposed||(this._disposed=!0,this._listeners.length=0)}},pt;(e=>{function t(e,t){return e(e=>t.fire(e))}e.forward=t;function n(e,t){return(n,r,i)=>e(e=>n.call(r,t(e)),void 0,i)}e.map=n;function r(...e){return(t,n,r)=>{let i=new ut;for(let r of e)i.add(r(e=>t.call(n,e)));return r&&(Array.isArray(r)?r.push(i):r.add(i)),i}}e.any=r;function i(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=i})(pt||={});var mt=class e{constructor(){this._providers=Object.create(null),this._active=``,this._onChange=new ft,this.onChange=this._onChange.event}static extractShouldJoin(e){return(e&1)!=0}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t,n=!1){return(e&16777215)<<3|(t&3)<<1|!!n}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e,this._active||(this.activeVersion=e.version)}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let a=0;a<i;++a){let o=t.charCodeAt(a);if(55296<=o&&o<=56319){if(++a>=i)return n+this.wcwidth(o);let e=t.charCodeAt(a);56320<=e&&e<=57343?o=(o-55296)*1024+e-56320+65536:n+=this.wcwidth(e)}let s=this.charProperties(o,r),c=e.extractWidth(s);e.extractShouldJoin(s)&&(c-=e.extractWidth(r)),n+=c,r=s}return n}charProperties(e,t){return this._activeProvider.charProperties(e,t)}},ht=0,gt=-3,_t=class{constructor(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}},vt=class{constructor(e,t){this.tag=0,this.bitcount=0,this.destLen=0,this.sourceIndex=0,this.source=e,this.dest=t,this.ltree=new _t,this.dtree=new _t}},yt=new _t,bt=new _t,xt=new Uint8Array(30),St=new Uint16Array(30),Ct=new Uint8Array(30),wt=new Uint16Array(30),Tt=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Et=new _t,Dt=new Uint8Array(320);function Ot(e,t,n,r){var i,a;for(i=0;i<n;++i)e[i]=0;for(i=0;i<30-n;++i)e[i+n]=i/n|0;for(a=r,i=0;i<30;++i)t[i]=a,a+=1<<e[i]}function kt(e,t){var n;for(n=0;n<7;++n)e.table[n]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,n=0;n<24;++n)e.trans[n]=256+n;for(n=0;n<144;++n)e.trans[24+n]=n;for(n=0;n<8;++n)e.trans[168+n]=280+n;for(n=0;n<112;++n)e.trans[176+n]=144+n;for(n=0;n<5;++n)t.table[n]=0;for(t.table[5]=32,n=0;n<32;++n)t.trans[n]=n}var At=new Uint16Array(16);function jt(e,t,n,r){var i,a;for(i=0;i<16;++i)e.table[i]=0;for(i=0;i<r;++i)e.table[t[n+i]]++;for(e.table[0]=0,a=0,i=0;i<16;++i)At[i]=a,a+=e.table[i];for(i=0;i<r;++i)t[n+i]&&(e.trans[At[t[n+i]]++]=i)}function Mt(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=e.tag&1;return e.tag>>>=1,t}function Nt(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var r=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,r+n}function Pt(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=0,r=0,i=0,a=e.tag;do r=2*r+(a&1),a>>>=1,++i,n+=t.table[i],r-=t.table[i];while(r>=0);return e.tag=a,e.bitcount-=i,t.trans[n+r]}function Ft(e,t,n){var r,i,a,o,s,c;for(r=Nt(e,5,257),i=Nt(e,5,1),a=Nt(e,4,4),o=0;o<19;++o)Dt[o]=0;for(o=0;o<a;++o){var l=Nt(e,3,0);Dt[Tt[o]]=l}for(jt(Et,Dt,0,19),s=0;s<r+i;){var u=Pt(e,Et);switch(u){case 16:var d=Dt[s-1];for(c=Nt(e,2,3);c;--c)Dt[s++]=d;break;case 17:for(c=Nt(e,3,3);c;--c)Dt[s++]=0;break;case 18:for(c=Nt(e,7,11);c;--c)Dt[s++]=0;break;default:Dt[s++]=u;break}}jt(t,Dt,0,r),jt(n,Dt,r,i)}function It(e,t,n){for(;;){var r=Pt(e,t);if(r===256)return ht;if(r<256)e.dest[e.destLen++]=r;else{var i,a,o,s;for(r-=257,i=Nt(e,xt[r],St[r]),a=Pt(e,n),o=e.destLen-Nt(e,Ct[a],wt[a]),s=o;s<o+i;++s)e.dest[e.destLen++]=e.dest[s]}}}function Lt(e){for(var t,n,r;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if(t=e.source[e.sourceIndex+1],t=256*t+e.source[e.sourceIndex],n=e.source[e.sourceIndex+3],n=256*n+e.source[e.sourceIndex+2],t!==(~n&65535))return gt;for(e.sourceIndex+=4,r=t;r;--r)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,ht}function Rt(e,t){var n=new vt(e,t),r,i,a;do{switch(r=Mt(n),i=Nt(n,2,0),i){case 0:a=Lt(n);break;case 1:a=It(n,yt,bt);break;case 2:Ft(n,n.ltree,n.dtree),a=It(n,n.ltree,n.dtree);break;default:a=gt}if(a!==ht)throw Error(`Data error`)}while(!r);return n.destLen<n.dest.length?typeof n.dest.slice==`function`?n.dest.slice(0,n.destLen):n.dest.subarray(0,n.destLen):n.dest}kt(yt,bt),Ot(xt,St,4,3),Ot(Ct,wt,2,1),xt[28]=0,St[28]=258;var zt=Rt,Bt=11,Vt=5,Ht=Bt-Vt,Ut=65536>>Bt,Wt=(1<<Ht)-1,Gt=2,Kt=(1<<Vt)-1,qt=65536>>Vt,Jt=qt+(1024>>Vt)+32,Yt=1<<Gt,Xt=new Uint8Array(new Uint32Array([305419896]).buffer)[0]===18,Zt=class{constructor(e){let t=new DataView(e.buffer);this.highStart=t.getUint32(0,!0),this.errorValue=t.getUint32(4,!0);let n=t.getUint32(8,!0);if(e=e.subarray(12),e=zt(e,new Uint8Array(n)),e=zt(e,new Uint8Array(n)),Xt){let t=e.length;for(let n=0;n<t;n+=4){let t=e[n];e[n]=e[n+3],e[n+3]=t;let r=e[n+1];e[n+1]=e[n+2],e[n+2]=r}}this.data=new Uint32Array(e.buffer)}get(e){let t;return e<0||e>1114111?this.errorValue:e<55296||e>56319&&e<=65535?(t=(this.data[e>>Vt]<<Gt)+(e&Kt),this.data[t]):e<=65535?(t=(this.data[qt+(e-55296>>Vt)]<<Gt)+(e&Kt),this.data[t]):e<this.highStart?(t=this.data[Jt-Ut+(e>>Bt)],t=this.data[t+(e>>Vt&Wt)],t=(t<<Gt)+(e&Kt),this.data[t]):this.data[this.data.length-Yt]}},Qt=`AAARAAAAAABwxwAAAb4LQfTtmw+sVmUdx58LL/ffe/kjzNBV80gW1F3yR+6CvbJiypoZa0paWmAWSluErSBbFtYkkuZykq6QamGJ4WRqo2kFGy6dYWtEq6G1MFAJbRbOVTQr+x7f5+x97q/n/3me87wXzm/3s+f/7/d7/p7znnvOlvGMbQM7wIPgEbAPHABPgcPgefAS+BfYwuv/F/Q2OulBxKcK6TMRPxu8FcwFbwcjYCFYDC4Cl4ArwNXgGvBJsA58UdBDwy+jbBO4La8DtoEd4H7wkNBuN+KPgn3gADgIngaHwFHwF/AyeAWMm4C+TGi3LdiJ/EnIex04A2RgFpgD5oKFYDG4CLwHXAo+IKSvAqt4/evA9bz9jWA6+Cq3dyvCP8HWNwX93wF38/ROcD94SCjP2+1B+BiPP4HwgOD/7xD/I08fRniMx48jPAFeBeuF+n29jE0G08FZvaPHYWZvh9mcEfAOjlhXx/qGfd2QvLO3zccmtMnzliC9lPt+GenD1nyMiK/LNf1cycs+gfAzPJ6vtxe4jhuQtx5sBLeA28G3eb3v8/Beif4HkPewxu5G6N/rMP4qfgEdvwZPgj+AZ8Cx3nYfxiE8Dk6AV0FfH/YEOB28AbwJDIPzQAtcAC4Gl/Z19F+J+NVCehWPr0b46b7RvixvdPg8yr7U10l/BfFN4La8DdgGdoAHwU/AI2AfOACeAofB8+AlcAKwfvyBKeCM/o7NrF9PXmdWv9/Ynot2I7ztIg8dF5I2a8i63CjZU+9Fm2Wcy4U4ZQVYyeOrwVoev57UuxHcJKRvFuJXgnU8/nUebtbYrKmpCUOx31P7UVNTU1NTU1NTU1OGLTz8Xr/77+W7+9vP0or0MxPMbXaizY8FW3sQ3wseB/t5/kGEh8DR/vbzwL8i/Af4Dy8fP8BYE0weaKenI/wV/DhrQG97JspngzlgLpgHzgPzwUhdVpfVZXVZXRa87HxwAVgQ4Pn5WEd85l5TUzOasvezFw/E3b/LoP9D4CpwrcTWWsGXNQOj748/G9k3G56d1KYxmbELwQbwKFiJvBM8nDWlHa5E+AOwCzwLzjkNeeB28NvTeB1OYyr0gQ1g99R23nGE50xj7MPgc+A+8K5Bxj4FHgB/G2z/T9XEzCZjd/S0WYX4Pc3/r/Nn5I0f6qQXIP5x8ENwBMyYyNhHJ3b0pOCuLrBvM941NTU1JyNHEp+BrC8dMyalt1/m3uWfhmeULzRGp9d3wf0WZSN8+prCr60Wz09tuNmx35sl9Y825HXvRN39KNveaL8flb9f913kbec67kHeTsR3gYcH2uV7ED4m2HhCYi/X9ZuBzvuXv0f8iKIfx5B/XCg7gTgbVPdvAsomCuWnD45eK28UyvL3Jt+s0fU2TVnOXJQvJHUWIb0ELAWXgCt4+UcMumSsEtpch/g6ouMGpG/ieZsc9N/q4YsLd3D9WyPbsWEbfNgO7hN82TWY/n8xKbmsC3xQsYKf+7sjrx2TH+u4H3vhx+OO6+X9hmtXN7C/4r15EPaeBs9J7L7YBeeED/k7wn8fbIf/Rji+yVizmd4vW6bB19cb/PU9w7MxMA60bzPHgM8+zG623+OnzOf55yNc3Gw/k303wveBy3nZcoTXgNVgLfiCRNcG5N3SbIebwZ08fhe4l8d/BH7K4yI/4+HPwS/BAfBks+PzIaHuc3x+ivSL4GUyZ68I6fwZYRNMG2qnz+Th2QjfMtTx/1zE5w61nyN+Q7C3aKgdin1dgrylYBn4INdhGn/Z2FfFiqH01/SUXMvnPD+jC+j85N/RqRhR/DYaS6T+P09K1mD+vzW+5zVqqeVUl0wTz2lK8odJHRGXfBufdGLSoSo3+ZFJ6sl0qvJVNmhI4z4i06mrZ6uT1le1z5h5HE3tMiHPtQ5javu+ItMXUr/MXpmwmyRL3D6U7UwIMyYfczGu0qdqb2pbhcw4xQkhWQBMerrZ/liXrGTbsQwTwrEu4zSczKLrd7fCSKiKn+zSo8BWXMe8myXWOivrUxWi60OPoQ7VIasbQ0S/Ukk3rZVullNhHEL1rYoxUF0PTfm6elWJzq54ZsU4z11ohOy0oxT2izFqCNj4TesXcWZo6+Jfqr1O+1O1beqDagypj2J9F1u2daucj3Eknmq/6PaHrK7Mb1o35DiW1a/a76LuhlDXZX25SOz11S33ErKxDb2/fc/bFKI6axskn+4/W90u9mOtbRf7smsoTdvOfwoRz0t6DaP9k81v6P7Re5aUQudTd303rX+bZzBl97/KR7E+Xbux9lLI+aNr1PfaYLpPDiW2/vrYTX1drMIeXbMye6HXlw8292Jl7ZXxLxRlxXbcaH9drjFlxfa3Qozx8NWRi834lPVZbD+SmN7EJPzc9TVCSVXXDps9L+513b2J7fMu176V2YOhx1A3JrJ8KrLxUumpcu5j/lYT+2tzLRVDZmhjO442a1Clu0ox9VPVXzE/lcS4V0k1D6LI1pJsz8fct9SGbO5l/rmKzTlvsxdj3IvRtC2uv0t1fotltvd2VaCy5Sp5m0EhnZG4CCNxXZrWp/VUIrOjapfnNw11ZNI0V/GWzKNuxtzGKKTEtJeR0NVmpojbtBuW5On0u0is9ZMxvU8ZM+8vEyadtu10oqtP9Q4rcJEm85+Two/QkpGwjI6YkgkhtUfzZOW6fFVexuRri+qj9TJJHZkdmW5abiu0rs6uj2TMfmx06bISUj9tZ9Lja8dVQtox6WpxTJKfW3M4MSTmvU4sWy1CU6BF4jIfdNeDjHWuO1lCWIm2Jr2ixNZvklD2fP0Q6+vsmO4hqN1hJvfDtV5G8mTlsvau4qPP1a64L1skT6QYEzEtq0PzGZOfCbSdSmcKTP7Qs86Ej/1hEpelaV6IMdT5ayu2+nT9tmnnO746XbLxE8t0qOrYtJWhmk9bvaLfsrotRVw1PnR+bcafSUKZ6Mps7smobybJLH2R6WqRkJa1DHV0UmbfUcksiSF0HExSpp+uY0zbTklMaCm7blzEtg8h1rNMXNaYi05ZXsbC75sQ/4+aUxFV2jL50Q3jE0rK2rVtN09By8OHoo1vH2LPSdE323mr2sdu0pUZiDkWLRKWnfeQY6taKzHF9n/GPv8jd/0/egiRvYMR24fU79iY3s9Qva9RlYR8n8HHtq9fMcT1HRWfdZXiHd9YInt/iI4PTaf+BimXKvdXYU+3hlRpHzs2dVK/cxhDn+xs0I2jzxjL5kpXz1VU72aLtkK/97sALKyQqu25SshvG6h08/cLrlKswRklKXvvXfa+pZt+y8nah5YUv2Oo/ap/X2URdRfico9K69hcp6r6XaCz5Wo/hs/iNTGF6N6tV92/9ZS0Wba9SlT3pKF/e6W674+x9ly+VRL73cPU8ygb31D3eSqfVd+iqET0y3YMYojoO11XqrTt2nPxmeq1HYeqxkmUMt8DiesjpoTSr+qDrD+qPZDiOZxMdH0pRPX8MFUfQtv0Xbs+a1a1NnRryNZ/2+tsaPG5ZoX0RXZei88yZGdo4UMPj/cwv/kMJboxLISuQbE+1VW12Mx7FWOrW3M9Hv7Y+uxyraPSo8B2TGPuLdOeZha+hBKf8Sjsm/oR+7pmsx/oeOraFWdXleeV6oyl41zm+mgSuq9C6ox1TsU8D+m4dwMmf8v2nz7Tm+fYfj7HV1K/x1HWjquvY+2dllxM64ue87Su772zzbXIVC+WxLZTRR9MdkMTypZNH1z6G0tUvoccwxA+hfLNdV+a7MaQqscztMi+7QnxDZXvd1dldWQOyMbApb1Jd2h91Ffx+y9Xfb7tClokboOvrRhrbVpFFO8z+65t2/u4su9MUx028znH01/TGVDmHAj13W1o+1USw+eUfYtpO+b82rRNsb6oPpV+1fdBqddB6n3WDXvdJDZrJ0QfQp6bsc/kqq4BIddHWXGdN1pmWveh58F1zYUW1zmOITHXWOg1XrZvZSWUf77tq1ofqear6muaT1lIQp3bofabSafJVlnfYo9B6LGr8uzz2Xchvzfw+T9PlgiV/A8=`;function $t(e){if(typeof Buffer<`u`)return Buffer.from(e,`base64`);let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<n.length;++e)n[e]=t.charCodeAt(e);return n}var en=new Zt($t(Qt)),tn=15,nn=0,rn=48,an=4,on=0,sn=1,cn=2,ln=3,un=4,dn=5,fn=6,pn=7,mn=8,hn=9,gn=10,_n=11,vn=32;function yn(e){return(e&rn)>>an}function bn(e,t){let n=(e&tn)>>nn,r=(t&tn)>>nn;return xn(n,r)?r===ln?vn:r+16:r-16}function xn(e,t){return e>=dn&&e<=hn&&(e==dn&&(t==dn||t==fn||t==mn||t==hn)||(e==mn||e==fn)&&(t==fn||t==pn)||(e==hn||e==pn)&&t==pn)||t==cn||t==gn||e==sn||t==un||e==gn&&t==_n||t==ln&&e==ln}function Sn(e){return en.get(e)}var Cn=class e{constructor(e=!0){this.ambiguousCharsAreWide=!1,this.version=e?`15-graphemes`:`15`,this.handleGraphemes=e}charProperties(t,n){if(t>=32&&t<127&&!(n>>3))return e._plainNarrowProperties;let r=Sn(t),i=yn(r),a=!1;if(i=i>=2&&(i===3||this.ambiguousCharsAreWide||t===65039)?2:1,n!==0){let e=mt.extractWidth(n);r=this.handleGraphemes?bn(mt.extractCharKind(n),r):+(i===0),a=r>0,a&&(e>i?i=e:r===32&&(i=2))}return mt.createPropertyValue(r,i,a)}wcwidth(e){let t=Sn(e),n=yn(t),r=(t&tn)>>nn;return r===cn||r===sn?0:n>=2&&(n===3||this.ambiguousCharsAreWide)?2:1}};Cn._plainNarrowProperties=mt.createPropertyValue(on,1,!1);var wn=Cn,Tn=class{constructor(){this._oldVersion=``}activate(e){this._provider15??=new wn(!1),this._provider15Graphemes??=new wn(!0);let t=e.unicode;this._unicode=t,t.register(this._provider15),t.register(this._provider15Graphemes),this._oldVersion=t.activeVersion,t.activeVersion=`15-graphemes`}dispose(){this._unicode&&(this._unicode.activeVersion=this._oldVersion)}},En=class{constructor(e,t,n,r={}){this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){let n=On.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(n))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(t,n)=>{if(this._options.hover){let{range:r}=e;this._options.hover(t,n,r)}},e))}};function Dn(e){try{let t=new URL(e),n=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch{return!1}}var On=class e{static computeLink(t,n,r,i){let a=n.flags.includes(`g`)?n.flags:`${n.flags}g`,o=new RegExp(n.source,a),[s,c]=e._getWindowedLineStrings(t-1,r),l=s.join(``),u,d=[];for(;u=o.exec(l);){let t=u[0];if(!Dn(t))continue;let[n,a]=e._mapStrIdx(r,c,0,u.index),[o,s]=e._mapStrIdx(r,n,a,t.length);if(n===-1||a===-1||o===-1||s===-1)continue;let l={start:{x:a+1,y:n+1},end:{x:s,y:o+1}};d.push({range:l,text:t,activate:i})}return d}static _getWindowedLineStrings(e,t){let n,r=e,i=e,a,o,s=[];if(n=t.buffer.active.getLine(e)){let e=n.translateToString(!0);if(n.isWrapped&&e[0]!==` `){for(a=0;(n=t.buffer.active.getLine(--r))&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),!(!n.isWrapped||o.indexOf(` `)!==-1)););s.reverse()}for(s.push(e),a=0;(n=t.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),o.indexOf(` `)===-1););}return[s,r]}static _mapStrIdx(e,t,n,r){let i=e.buffer.active,a=i.getNullCell(),o=n;for(;r;){let e=i.getLine(t);if(!e)return[-1,-1];for(let n=o;n<e.length;++n){e.getCell(n,a);let o=a.getChars();if(a.getWidth()&&(r-=o.length||1,n===e.length-1&&o===``)){let e=i.getLine(t+1);e&&e.isWrapped&&(e.getCell(0,a),a.getWidth()===2&&(r+=1))}if(r<0)return[t,n]}t++,o=0}return[t,o]}},kn=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function An(e,t){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}var jn=class{constructor(e=An,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,n=t.urlRegex??kn;this._linkProvider=this._terminal.registerLinkProvider(new En(this._terminal,n,this._handler,t))}dispose(){this._linkProvider?.dispose()}};function Mn(e){return{dispose:e}}function Nn(e){if(!e)return e;if(Array.isArray(e)){for(let t of e)t.dispose();return[]}return e.dispose(),e}function Pn(...e){return Mn(()=>Nn(e))}var Fn=class{constructor(){this._disposables=new Set,this._isDisposed=!1}get isDisposed(){return this._isDisposed}add(e){return this._isDisposed?e.dispose():this._disposables.add(e),e}dispose(){if(!this._isDisposed){this._isDisposed=!0;for(let e of this._disposables)e.dispose();this._disposables.clear()}}clear(){for(let e of this._disposables)e.dispose();this._disposables.clear()}},In=class{constructor(){this._store=new Fn}dispose(){this._store.dispose()}_register(e){return this._store.add(e)}};In.None=Object.freeze({dispose(){}});var Ln=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},Rn=!!(typeof process<`u`&&`title`in process&&(typeof navigator>`u`||navigator.userAgent.startsWith(`Node.js/`))),zn=Rn?`node`:navigator.userAgent,Bn=Rn?`node`:navigator.platform,Vn=zn.includes(`Firefox`);zn.includes(`Chrome`);var Hn=zn.includes(`Edge`),Un=/^((?!chrome|android).)*safari/i.test(zn);function Wn(){if(!Un)return 0;let e=zn.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1],10)}[`Macintosh`,`MacIntel`,`MacPPC`,`Mac68K`].includes(Bn),[`Windows`,`Win16`,`Win32`,`WinCE`].includes(Bn),Bn.indexOf(`Linux`),/\bCrOS\b/.test(zn);var Gn=0,Kn=0,qn=0,Jn=0,Yn={css:`#00000000`,rgba:0},Xn;(e=>{function t(e,t,n,r){return r===void 0?`#${tr(e)}${tr(t)}${tr(n)}`:`#${tr(e)}${tr(t)}${tr(n)}${tr(r)}`}e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(Xn||={});var Zn;(e=>{function t(e,t){if(Jn=(t.rgba&255)/255,Jn===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return Gn=a+Math.round((n-a)*Jn),Kn=o+Math.round((r-o)*Jn),qn=s+Math.round((i-s)*Jn),{css:Xn.toCss(Gn,Kn,qn),rgba:Xn.toRgba(Gn,Kn,qn)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=er.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return Xn.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[Gn,Kn,qn]=er.toChannels(t),{css:Xn.toCss(Gn,Kn,qn),rgba:t}}e.opaque=i;function a(e,t){return Jn=Math.round(t*255),[Gn,Kn,qn]=er.toChannels(e.rgba),{css:Xn.toCss(Gn,Kn,qn,Jn),rgba:Xn.toRgba(Gn,Kn,qn,Jn)}}e.opacity=a;function o(e,t){return Jn=e.rgba&255,a(e,Jn*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}e.toColorRGB=s})(Zn||={});var Qn;(e=>{let t,n;try{let e=document.createElement(`canvas`);e.width=1,e.height=1;let r=e.getContext(`2d`,{willReadFrequently:!0});r&&(t=r,t.globalCompositeOperation=`copy`,n=t.createLinearGradient(0,0,1,1))}catch{}function r(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return Gn=parseInt(e.slice(1,2).repeat(2),16),Kn=parseInt(e.slice(2,3).repeat(2),16),qn=parseInt(e.slice(3,4).repeat(2),16),Xn.toColor(Gn,Kn,qn);case 5:return Gn=parseInt(e.slice(1,2).repeat(2),16),Kn=parseInt(e.slice(2,3).repeat(2),16),qn=parseInt(e.slice(3,4).repeat(2),16),Jn=parseInt(e.slice(4,5).repeat(2),16),Xn.toColor(Gn,Kn,qn,Jn);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}let r=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(r)return Gn=parseInt(r[1],10),Kn=parseInt(r[2],10),qn=parseInt(r[3],10),Jn=Math.round((r[5]===void 0?1:parseFloat(r[5]))*255),Xn.toColor(Gn,Kn,qn,Jn);if(e===`transparent`)return{css:`transparent`,rgba:0};if(!t||!n||(t.fillStyle=n,t.fillStyle=e,typeof t.fillStyle!=`string`)||(t.fillRect(0,0,1,1),[Gn,Kn,qn,Jn]=t.getImageData(0,0,1,1).data,Jn!==255))throw Error(`css.toColor: Unsupported css format`);return{rgba:Xn.toRgba(Gn,Kn,qn,Jn),css:e}}e.toColor=r})(Qn||={});var $n;(e=>{function t(e){return n(e>>16&255,e>>8&255,e&255)}e.relativeLuminance=t;function n(e,t,n){let r=e/255,i=t/255,a=n/255,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,c=a<=.03928?a/12.92:((a+.055)/1.055)**2.4;return o*.2126+s*.7152+c*.0722}e.relativeLuminance2=n})($n||={});var er;(e=>{function t(e,t){if(Jn=(t&255)/255,Jn===1)return t;let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=e>>24&255,o=e>>16&255,s=e>>8&255;return Gn=a+Math.round((n-a)*Jn),Kn=o+Math.round((r-o)*Jn),qn=s+Math.round((i-s)*Jn),Xn.toRgba(Gn,Kn,qn)}e.blend=t;function n(e,t,n){let a=$n.relativeLuminance(e>>8),o=$n.relativeLuminance(t>>8);if(nr(a,o)<n){if(o<a){let o=r(e,t,n),s=nr(a,$n.relativeLuminance(o>>8));if(s<n){let r=i(e,t,n);return s>nr(a,$n.relativeLuminance(r>>8))?o:r}return o}let s=i(e,t,n),c=nr(a,$n.relativeLuminance(s>>8));if(c<n){let i=r(e,t,n);return c>nr(a,$n.relativeLuminance(i>>8))?s:i}return s}}e.ensureContrastRatio=n;function r(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=nr($n.relativeLuminance2(o,s,c),$n.relativeLuminance2(r,i,a));for(;l<n&&(o>0||s>0||c>0);)o-=Math.max(0,Math.ceil(o*.1)),s-=Math.max(0,Math.ceil(s*.1)),c-=Math.max(0,Math.ceil(c*.1)),l=nr($n.relativeLuminance2(o,s,c),$n.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.reduceLuminance=r;function i(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=nr($n.relativeLuminance2(o,s,c),$n.relativeLuminance2(r,i,a));for(;l<n&&(o<255||s<255||c<255);)o=Math.min(255,o+Math.ceil((255-o)*.1)),s=Math.min(255,s+Math.ceil((255-s)*.1)),c=Math.min(255,c+Math.ceil((255-c)*.1)),l=nr($n.relativeLuminance2(o,s,c),$n.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.increaseLuminance=i;function a(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}e.toChannels=a})(er||={});function tr(e){let t=e.toString(16);return t.length<2?`0`+t:t}function nr(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}function rr(e){if(!e)throw Error(`value must not be falsy`);return e}function ir(e){return 57508<=e&&e<=57558}function ar(e){return 57520<=e&&e<=57527}function or(e){return 57344<=e&&e<=63743}function sr(e){return 9472<=e&&e<=9631}function cr(e){return e>=128512&&e<=128591||e>=127744&&e<=128511||e>=128640&&e<=128767||e>=9728&&e<=9983||e>=9984&&e<=10175||e>=65024&&e<=65039||e>=129280&&e<=129535||e>=127462&&e<=127487}function lr(e,t,n,r){return t===1&&n>Math.ceil(r*1.5)&&e!==void 0&&e>255&&!cr(e)&&!ir(e)&&!or(e)}function ur(e){return ir(e)||sr(e)}function dr(){return{css:{canvas:fr(),cell:fr()},device:{canvas:fr(),cell:fr(),char:{width:0,height:0,left:0,top:0}}}}function fr(){return{width:0,height:0}}function pr(e,t,n=0){return(e-(Math.round(t)*2-n))%(Math.round(t)*2)}var K;(e=>(e.LINE_H=Object.freeze({type:2,data:`M0,.5 L1,.5`,strokeWidth:1}),e.LINE_V=Object.freeze({type:2,data:`M.5,0 L.5,1`,strokeWidth:1}),e.FADE_RIGHT=Object.freeze({type:2,data:`M0,.5 L.28,.5 M.32,.5 L.52,.5 M.60,.5 L.72,.5 M.84,.5 L.90,.5`,strokeWidth:1}),e.FADE_LEFT=Object.freeze({type:2,data:`M.10,.5 L.16,.5 M.28,.5 L.40,.5 M.48,.5 L.68,.5 M.72,.5 L1,.5`,strokeWidth:1}),e.FADE_DOWN=Object.freeze({type:2,data:`M.5,0 L.5,.28 M.5,.32 L.5,.52 M.5,.60 L.5,.72 M.5,.84 L.5,.90`,strokeWidth:1}),e.FADE_UP=Object.freeze({type:2,data:`M.5,.10 L.5,.16 M.5,.28 L.5,.40 M.5,.48 L.5,.68 M.5,.72 L.5,1`,strokeWidth:1}),e.CURVE_DOWN_RIGHT=Object.freeze({type:2,data:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`,strokeWidth:1}),e.CURVE_DOWN_LEFT=Object.freeze({type:2,data:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`,strokeWidth:1}),e.CURVE_UP_RIGHT=Object.freeze({type:2,data:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`,strokeWidth:1}),e.CURVE_UP_LEFT=Object.freeze({type:2,data:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`,strokeWidth:1}),e.NODE_FILL=Object.freeze({type:3,data:`M.85,.5 A.35,.175,0,1,1,.15,.5 A.35,.175,0,1,1,.85,.5`}),e.NODE_STROKE=Object.freeze({type:3,data:`M.85,.5 A.35,.175,0,1,1,.15,.5 A.35,.175,0,1,1,.85,.5`,strokeWidth:1}),e.NODE_LINE_RIGHT=Object.freeze({type:3,data:`M1,.5 L.85,.5`,strokeWidth:1}),e.NODE_LINE_LEFT=Object.freeze({type:3,data:`M0,.5 L.15,.5`,strokeWidth:1}),e.NODE_LINE_DOWN=Object.freeze({type:3,data:`M.5,1 L.5,.7`,strokeWidth:1}),e.NODE_LINE_UP=Object.freeze({type:3,data:`M.5,0 L.5,.3`,strokeWidth:1})))(K||={});var mr={"─":{type:2,data:`M0,.5 L1,.5`,strokeWidth:1},"━":{type:2,data:`M0,.5 L1,.5`,strokeWidth:3},"│":{type:2,data:`M.5,0 L.5,1`,strokeWidth:1},"┃":{type:2,data:`M.5,0 L.5,1`,strokeWidth:3},"┄":{type:2,data:`M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5`,strokeWidth:1},"┅":{type:2,data:`M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5`,strokeWidth:3},"┆":{type:2,data:`M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333`,strokeWidth:1},"┇":{type:2,data:`M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333`,strokeWidth:3},"┈":{type:2,data:`M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5`,strokeWidth:1},"┉":{type:2,data:`M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5`,strokeWidth:3},"┊":{type:2,data:`M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95`,strokeWidth:1},"┋":{type:2,data:`M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95`,strokeWidth:3},"┌":{type:2,data:`M0.5,1 L.5,.5 L1,.5`,strokeWidth:1},"┍":[{type:2,data:`M.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,.5 L1,.5`,strokeWidth:3}],"┎":[{type:2,data:`M.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,1`,strokeWidth:3}],"┏":{type:2,data:`M0.5,1 L.5,.5 L1,.5`,strokeWidth:3},"┐":{type:2,data:`M0,.5 L.5,.5 L.5,1`,strokeWidth:1},"┑":[{type:2,data:`M.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,.5 L0,.5`,strokeWidth:3}],"┒":[{type:2,data:`M.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,1`,strokeWidth:3}],"┓":{type:2,data:`M0,.5 L.5,.5 L.5,1`,strokeWidth:3},"└":{type:2,data:`M.5,0 L.5,.5 L1,.5`,strokeWidth:1},"┕":[{type:2,data:`M.5,.5 L.5,0`,strokeWidth:1},{type:2,data:`M.5,.5 L1,.5`,strokeWidth:3}],"┖":[{type:2,data:`M.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,0`,strokeWidth:3}],"┗":{type:2,data:`M.5,0 L.5,.5 L1,.5`,strokeWidth:3},"┘":{type:2,data:`M.5,0 L.5,.5 L0,.5`,strokeWidth:1},"┙":[{type:2,data:`M.5,.5 L.5,0`,strokeWidth:1},{type:2,data:`M.5,.5 L0,.5`,strokeWidth:3}],"┚":[{type:2,data:`M.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,0`,strokeWidth:3}],"┛":{type:2,data:`M.5,0 L.5,.5 L0,.5`,strokeWidth:3},"├":{type:2,data:`M.5,0 L.5,1 M.5,.5 L1,.5`,strokeWidth:1},"┝":[{type:2,data:`M.5,0 L.5,1`,strokeWidth:1},{type:2,data:`M.5,.5 L1,.5`,strokeWidth:3}],"┞":[{type:2,data:`M0.5,1 L.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,0`,strokeWidth:3}],"┟":[{type:2,data:`M.5,0 L.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,1`,strokeWidth:3}],"┠":[{type:2,data:`M.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,0 L.5,1`,strokeWidth:3}],"┡":[{type:2,data:`M.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,0 L.5,.5 L1,.5`,strokeWidth:3}],"┢":[{type:2,data:`M.5,.5 L.5,0`,strokeWidth:1},{type:2,data:`M0.5,1 L.5,.5 L1,.5`,strokeWidth:3}],"┣":{type:2,data:`M.5,0 L.5,1 M.5,.5 L1,.5`,strokeWidth:3},"┤":{type:2,data:`M.5,0 L.5,1 M.5,.5 L0,.5`,strokeWidth:1},"┥":[{type:2,data:`M.5,0 L.5,1`,strokeWidth:1},{type:2,data:`M.5,.5 L0,.5`,strokeWidth:3}],"┦":[{type:2,data:`M0,.5 L.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,0`,strokeWidth:3}],"┧":[{type:2,data:`M.5,0 L.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,1`,strokeWidth:3}],"┨":[{type:2,data:`M.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M.5,0 L.5,1`,strokeWidth:3}],"┩":[{type:2,data:`M.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,0 L.5,.5 L0,.5`,strokeWidth:3}],"┪":[{type:2,data:`M.5,.5 L.5,0`,strokeWidth:1},{type:2,data:`M0,.5 L.5,.5 L.5,1`,strokeWidth:3}],"┫":{type:2,data:`M.5,0 L.5,1 M.5,.5 L0,.5`,strokeWidth:3},"┬":{type:2,data:`M0,.5 L1,.5 M.5,.5 L.5,1`,strokeWidth:1},"┭":[{type:2,data:`M0.5,1 L.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L0,.5`,strokeWidth:3}],"┮":[{type:2,data:`M0,.5 L.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,.5 L1,.5`,strokeWidth:3}],"┯":[{type:2,data:`M.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M0,.5 L1,.5`,strokeWidth:3}],"┰":[{type:2,data:`M0,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,1`,strokeWidth:3}],"┱":[{type:2,data:`M.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M0,.5 L.5,.5 L.5,1`,strokeWidth:3}],"┲":[{type:2,data:`M.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M0.5,1 L.5,.5 L1,.5`,strokeWidth:3}],"┳":{type:2,data:`M0,.5 L1,.5 M.5,.5 L.5,1`,strokeWidth:3},"┴":{type:2,data:`M0,.5 L1,.5 M.5,.5 L.5,0`,strokeWidth:1},"┵":[{type:2,data:`M.5,0 L.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L0,.5`,strokeWidth:3}],"┶":[{type:2,data:`M.5,0 L.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L1,.5`,strokeWidth:3}],"┷":[{type:2,data:`M.5,.5 L.5,0`,strokeWidth:1},{type:2,data:`M0,.5 L1,.5`,strokeWidth:3}],"┸":[{type:2,data:`M0,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,0`,strokeWidth:3}],"┹":[{type:2,data:`M.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,0 L.5,.5 L0,.5`,strokeWidth:3}],"┺":[{type:2,data:`M.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M.5,0 L.5,.5 L1,.5`,strokeWidth:3}],"┻":{type:2,data:`M0,.5 L1,.5 M.5,.5 L.5,0`,strokeWidth:3},"┼":{type:2,data:`M0,.5 L1,.5 M.5,0 L.5,1`,strokeWidth:1},"┽":[{type:2,data:`M.5,0 L.5,1 M.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L0,.5`,strokeWidth:3}],"┾":[{type:2,data:`M.5,0 L.5,1 M.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L1,.5`,strokeWidth:3}],"┿":[{type:2,data:`M.5,0 L.5,1`,strokeWidth:1},{type:2,data:`M0,.5 L1,.5`,strokeWidth:3}],"╀":[{type:2,data:`M0,.5 L1,.5 M.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,0`,strokeWidth:3}],"╁":[{type:2,data:`M.5,.5 L.5,0 M0,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,1`,strokeWidth:3}],"╂":[{type:2,data:`M0,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,0 L.5,1`,strokeWidth:3}],"╃":[{type:2,data:`M0.5,1 L.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,0 L.5,.5 L0,.5`,strokeWidth:3}],"╄":[{type:2,data:`M0,.5 L.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,0 L.5,.5 L1,.5`,strokeWidth:3}],"╅":[{type:2,data:`M.5,0 L.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M0,.5 L.5,.5 L.5,1`,strokeWidth:3}],"╆":[{type:2,data:`M.5,0 L.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M0.5,1 L.5,.5 L1,.5`,strokeWidth:3}],"╇":[{type:2,data:`M.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,0 M0,.5 L1,.5`,strokeWidth:3}],"╈":[{type:2,data:`M.5,.5 L.5,0`,strokeWidth:1},{type:2,data:`M0,.5 L1,.5 M.5,.5 L.5,1`,strokeWidth:3}],"╉":[{type:2,data:`M.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,0 L.5,1 M.5,.5 L0,.5`,strokeWidth:3}],"╊":[{type:2,data:`M.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M.5,0 L.5,1 M.5,.5 L1,.5`,strokeWidth:3}],"╋":{type:2,data:`M0,.5 L1,.5 M.5,0 L.5,1`,strokeWidth:3},"╌":{type:2,data:`M.1,.5 L.4,.5 M.6,.5 L.9,.5`,strokeWidth:1},"╍":{type:2,data:`M.1,.5 L.4,.5 M.6,.5 L.9,.5`,strokeWidth:3},"╎":{type:2,data:`M.5,.1 L.5,.4 M.5,.6 L.5,.9`,strokeWidth:1},"╏":{type:2,data:`M.5,.1 L.5,.4 M.5,.6 L.5,.9`,strokeWidth:3},"═":{type:2,data:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`,strokeWidth:1},"║":{type:2,data:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`,strokeWidth:1},"╒":{type:2,data:(e,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`,strokeWidth:1},"╓":{type:2,data:(e,t)=>`M${.5-e},1 L${.5-e},.5 L1,.5 M${.5+e},.5 L${.5+e},1`,strokeWidth:1},"╔":{type:2,data:(e,t)=>`M1,${.5-t} L${.5-e},${.5-t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`,strokeWidth:1},"╕":{type:2,data:(e,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`,strokeWidth:1},"╖":{type:2,data:(e,t)=>`M${.5+e},1 L${.5+e},.5 L0,.5 M${.5-e},.5 L${.5-e},1`,strokeWidth:1},"╗":{type:2,data:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5+e},${.5-t} L${.5+e},1`,strokeWidth:1},"╘":{type:2,data:(e,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`,strokeWidth:1},"╙":{type:2,data:(e,t)=>`M1,.5 L${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`,strokeWidth:1},"╚":{type:2,data:(e,t)=>`M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0 M1,${.5+t} L${.5-e},${.5+t} L${.5-e},0`,strokeWidth:1},"╛":{type:2,data:(e,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`,strokeWidth:1},"╜":{type:2,data:(e,t)=>`M0,.5 L${.5+e},.5 L${.5+e},0 M${.5-e},.5 L${.5-e},0`,strokeWidth:1},"╝":{type:2,data:(e,t)=>`M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M0,${.5+t} L${.5+e},${.5+t} L${.5+e},0`,strokeWidth:1},"╞":{type:2,data:(e,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`,strokeWidth:1},"╟":{type:2,data:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1 M${.5+e},.5 L1,.5`,strokeWidth:1},"╠":{type:2,data:(e,t)=>`M${.5-e},0 L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`,strokeWidth:1},"╡":{type:2,data:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`,strokeWidth:1},"╢":{type:2,data:(e,t)=>`M0,.5 L${.5-e},.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`,strokeWidth:1},"╣":{type:2,data:(e,t)=>`M${.5+e},0 L${.5+e},1 M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0`,strokeWidth:1},"╤":{type:2,data:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`,strokeWidth:1},"╥":{type:2,data:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},1 M${.5+e},.5 L${.5+e},1`,strokeWidth:1},"╦":{type:2,data:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`,strokeWidth:1},"╧":{type:2,data:(e,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`,strokeWidth:1},"╨":{type:2,data:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`,strokeWidth:1},"╩":{type:2,data:(e,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`,strokeWidth:1},"╪":{type:2,data:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`,strokeWidth:1},"╫":{type:2,data:(e,t)=>`M0,.5 L1,.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`,strokeWidth:1},"╬":{type:2,data:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`,strokeWidth:1},"╭":{type:2,data:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`,strokeWidth:1},"╮":{type:2,data:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`,strokeWidth:1},"╯":{type:2,data:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`,strokeWidth:1},"╰":{type:2,data:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`,strokeWidth:1},"╱":{type:2,data:`M1,0 L0,1`,strokeWidth:1},"╲":{type:2,data:`M0,0 L1,1`,strokeWidth:1},"╳":{type:2,data:`M1,0 L0,1 M0,0 L1,1`,strokeWidth:1},"╴":{type:2,data:`M.5,.5 L0,.5`,strokeWidth:1},"╵":{type:2,data:`M.5,.5 L.5,0`,strokeWidth:1},"╶":{type:2,data:`M.5,.5 L1,.5`,strokeWidth:1},"╷":{type:2,data:`M.5,.5 L.5,1`,strokeWidth:1},"╸":{type:2,data:`M.5,.5 L0,.5`,strokeWidth:3},"╹":{type:2,data:`M.5,.5 L.5,0`,strokeWidth:3},"╺":{type:2,data:`M.5,.5 L1,.5`,strokeWidth:3},"╻":{type:2,data:`M.5,.5 L.5,1`,strokeWidth:3},"╼":[{type:2,data:`M.5,.5 L0,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L1,.5`,strokeWidth:3}],"╽":[{type:2,data:`M.5,.5 L.5,0`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,1`,strokeWidth:3}],"╾":[{type:2,data:`M.5,.5 L1,.5`,strokeWidth:1},{type:2,data:`M.5,.5 L0,.5`,strokeWidth:3}],"╿":[{type:2,data:`M.5,.5 L.5,1`,strokeWidth:1},{type:2,data:`M.5,.5 L.5,0`,strokeWidth:3}],"▀":{type:0,data:[{x:0,y:0,w:8,h:4}]},"▁":{type:0,data:[{x:0,y:7,w:8,h:1}]},"▂":{type:0,data:[{x:0,y:6,w:8,h:2}]},"▃":{type:0,data:[{x:0,y:5,w:8,h:3}]},"▄":{type:0,data:[{x:0,y:4,w:8,h:4}]},"▅":{type:0,data:[{x:0,y:3,w:8,h:5}]},"▆":{type:0,data:[{x:0,y:2,w:8,h:6}]},"▇":{type:0,data:[{x:0,y:1,w:8,h:7}]},"█":{type:0,data:[{x:0,y:0,w:8,h:8}]},"▉":{type:0,data:[{x:0,y:0,w:7,h:8}]},"▊":{type:0,data:[{x:0,y:0,w:6,h:8}]},"▋":{type:0,data:[{x:0,y:0,w:5,h:8}]},"▌":{type:0,data:[{x:0,y:0,w:4,h:8}]},"▍":{type:0,data:[{x:0,y:0,w:3,h:8}]},"▎":{type:0,data:[{x:0,y:0,w:2,h:8}]},"▏":{type:0,data:[{x:0,y:0,w:1,h:8}]},"▐":{type:0,data:[{x:4,y:0,w:4,h:8}]},"░":{type:1,data:[[1,0],[0,0]]},"▒":{type:1,data:[[1,0],[0,1]]},"▓":{type:1,data:[[1,1],[1,0]]},"▔":{type:0,data:[{x:0,y:0,w:8,h:1}]},"▕":{type:0,data:[{x:7,y:0,w:1,h:8}]},"▖":{type:0,data:[{x:0,y:4,w:4,h:4}]},"▗":{type:0,data:[{x:4,y:4,w:4,h:4}]},"▘":{type:0,data:[{x:0,y:0,w:4,h:4}]},"▙":{type:0,data:[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}]},"▚":{type:0,data:[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}]},"▛":{type:0,data:[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}]},"▜":{type:0,data:[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}]},"▝":{type:0,data:[{x:4,y:0,w:4,h:4}]},"▞":{type:0,data:[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}]},"▟":{type:0,data:[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}]},"":{type:5,data:{d:`M.3,1 L.03,1 L.03,.88 C.03,.82,.06,.78,.11,.73 C.15,.7,.2,.68,.28,.65 L.43,.6 C.49,.58,.53,.56,.56,.53 C.59,.5,.6,.47,.6,.43 L.6,.27 L.4,.27 L.69,.1 L.98,.27 L.78,.27 L.78,.46 C.78,.52,.76,.56,.72,.61 C.68,.66,.63,.67,.56,.7 L.48,.72 C.42,.74,.38,.76,.35,.78 C.32,.8,.31,.84,.31,.88 L.31,1 M.3,.5 L.03,.59 L.03,.09 L.3,.09 L.3,.655`,type:0}},"":{type:5,data:{d:`M.7,.4 L.7,.47 L.2,.47 L.2,.03 L.355,.03 L.355,.4 L.705,.4 M.7,.5 L.86,.5 L.86,.95 L.69,.95 L.44,.66 L.46,.86 L.46,.95 L.3,.95 L.3,.49 L.46,.49 L.71,.78 L.69,.565 L.69,.5`,type:0}},"":{type:5,data:{d:`M.25,.94 C.16,.94,.11,.92,.11,.87 L.11,.53 C.11,.48,.15,.455,.23,.45 L.23,.3 C.23,.25,.26,.22,.31,.19 C.36,.16,.43,.15,.51,.15 C.59,.15,.66,.16,.71,.19 C.77,.22,.79,.26,.79,.3 L.79,.45 C.87,.45,.91,.48,.91,.53 L.91,.87 C.91,.92,.86,.94,.77,.94 L.24,.94 M.53,.2 C.49,.2,.45,.21,.42,.23 C.39,.25,.38,.27,.38,.3 L.38,.45 L.68,.45 L.68,.3 C.68,.27,.67,.25,.64,.23 C.61,.21,.58,.2,.53,.2 M.58,.82 L.58,.66 C.63,.65,.65,.63,.65,.6 C.65,.58,.64,.57,.61,.56 C.58,.55,.56,.54,.52,.54 C.48,.54,.46,.55,.43,.56 C.4,.57,.39,.59,.39,.6 C.39,.63,.41,.64,.46,.66 L.46,.82 L.57,.82`,type:0}},"":{type:5,data:{d:`M.7,.4 L.7,.47 L.2,.47 L.2,.03 L.7,.03 L.7,.1 L.355,.1 L.355,.4 L.705,.4 M.7,.5 L.86,.5 L.86,.95 L.69,.95 L.44,.66 L.46,.86 L.46,.95 L.3,.95 L.3,.49 L.46,.49 L.71,.78 L.69,.565 L.69,.5`,type:0}},"":{type:5,data:{d:`M0,0 L1,.5 L0,1`,type:0,rightPadding:2}},"":{type:5,data:{d:`M-1,-.5 L1,.5 L-1,1.5`,type:1,leftPadding:1,rightPadding:1}},"":{type:5,data:{d:`M1,0 L0,.5 L1,1`,type:0,leftPadding:2}},"":{type:5,data:{d:`M2,-.5 L0,.5 L2,1.5`,type:1,leftPadding:1,rightPadding:1}},"":{type:5,data:{d:`M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0`,type:0,rightPadding:1}},"":{type:5,data:{d:`M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0`,type:1,rightPadding:1}},"":{type:5,data:{d:`M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0`,type:0,leftPadding:1}},"":{type:5,data:{d:`M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0`,type:1,leftPadding:1}},"":{type:5,data:{d:`M-.5,-.5 L1.5,1.5 L-.5,1.5`,type:0}},"":{type:5,data:{d:`M-.5,-.5 L1.5,1.5`,type:1,leftPadding:1,rightPadding:1}},"":{type:5,data:{d:`M1.5,-.5 L-.5,1.5 L1.5,1.5`,type:0}},"":{type:5,data:{d:`M1.5,-.5 L-.5,1.5`,type:1,leftPadding:1,rightPadding:1}},"":{type:5,data:{d:`M1.5,-.5 L-.5,1.5 L-.5,-.5`,type:0}},"":{type:5,data:{d:`M1.5,-.5 L-.5,1.5`,type:1,leftPadding:1,rightPadding:1}},"":{type:5,data:{d:`M-.5,-.5 L1.5,1.5 L1.5,-.5`,type:0}},"":{type:5,data:{d:`M-.5,-.5 L1.5,1.5`,type:1,leftPadding:1,rightPadding:1}},"":{type:5,data:{d:`M0.8069,0.6075 Q0.7991,0.612,0.7815,0.6218 T0.7542,0.6369 T0.7282,0.6508 T0.7016,0.6644 T0.6778,0.6758 T0.6551,0.6854 T0.637,0.6911 T0.622,0.6936 Q0.6186,0.6936,0.6128,0.6942 T0.6018,0.6952 T0.5894,0.6956 T0.5757,0.6952 T0.561,0.693 T0.5451,0.6879 Q0.5342,0.6834,0.5193,0.6756 T0.4925,0.6614 T0.4673,0.6485 T0.4436,0.6389 T0.4239,0.6363 T0.4089,0.6422 Q0.4045,0.6467,0.3958,0.6554 T0.3843,0.6669 T0.3748,0.6746 T0.3613,0.683 T0.3442,0.6903 L0.3499,0.6956 Q0.3584,0.7042,0.3679,0.7177 T0.3836,0.7403 T0.4019,0.7583 T0.4295,0.7703 Q0.4688,0.7785,0.5203,0.7605 Q0.4902,0.7817,0.449,0.7911 T0.3696,0.8001 Q0.3567,0.7997,0.341,0.7942 T0.3111,0.7813 T0.2805,0.766 T0.2493,0.753 T0.218,0.7472 T0.187,0.754 Q0.1762,0.7589,0.1653,0.7681 T0.1453,0.7895 T0.1308,0.818 T0.1264,0.8507 L0.1264,0.858 Q0.1453,0.8462,0.1607,0.8433 T0.1899,0.8452 T0.2226,0.8625 Q0.2344,0.8707,0.2485,0.8752 T0.2813,0.8831 T0.3089,0.889 Q0.2981,0.8915,0.2846,0.8956 T0.2603,0.9037 T0.2368,0.9115 T0.2129,0.9174 T0.1894,0.9194 T0.1653,0.9155 Q0.1504,0.9115,0.1328,0.9196 T0.0986,0.9421 T0.0655,0.9708 T0.0317,0.9943 T0,1 Q0.001,0.94,0.0017,0.6508 T0.0024,0.2322 Q0.002,0.2109,0.0007,0.1379 T0,0.0249 Q0.0058,0.0253,0.009,0.0257 T0.0156,0.0288 T0.0203,0.0333 T0.0264,0.0422 T0.0349,0.0539 Q0.044,0.0657,0.0542,0.072 T0.0752,0.0789 T0.096,0.0775 T0.1175,0.0694 T0.1379,0.0573 T0.1579,0.0432 Q0.2141,0,0.2673,0.0318 Q0.2588,0.0318,0.2517,0.033 T0.239,0.0361 T0.2276,0.0424 T0.218,0.0504 T0.2085,0.0612 T0.1997,0.0732 T0.1899,0.0875 T0.1795,0.1028 Q0.1748,0.1093,0.1507,0.1234 T0.1186,0.1448 Q0.0999,0.1612,0.1108,0.1783 Q0.1162,0.1877,0.1238,0.1928 T0.1404,0.1979 T0.158,0.1967 T0.1775,0.1895 T0.1963,0.1791 T0.2151,0.1663 T0.2314,0.1534 T0.2458,0.141 T0.2561,0.1322 Q0.2815,0.1106,0.3017,0.101 T0.344,0.0926 T0.3919,0.1077 Q0.4099,0.1175,0.4265,0.1206 T0.4588,0.1202 T0.488,0.1098 T0.5176,0.0914 Q0.5071,0.1032,0.4963,0.1122 T0.4722,0.1285 T0.4497,0.1401 T0.4223,0.1518 T0.3943,0.1636 Q0.374,0.1726,0.3623,0.1863 T0.3482,0.2162 Q0.3445,0.2403,0.3608,0.2605 T0.4072,0.2876 Q0.4194,0.2909,0.4326,0.2899 T0.457,0.2856 T0.4805,0.2764 T0.5032,0.264 T0.5256,0.2497 T0.5478,0.2352 T0.5698,0.2222 T0.5921,0.2118 Q0.6982,0.173,0.81,0.2436 Q0.833,0.2583,0.8496,0.2674 T0.887,0.2846 T0.925,0.294 T0.9617,0.2911 T1,0.2746 Q0.9817,0.2946,0.96,0.3056 T0.9175,0.3191 T0.8731,0.3209 T0.8277,0.3164 T0.7818,0.3109 T0.7359,0.3101 T0.6907,0.3197 T0.647,0.3448 Q0.6443,0.3472,0.6333,0.3562 T0.6194,0.3674 T0.6076,0.3766 T0.594,0.386 T0.5815,0.3931 T0.5661,0.4007 T0.5501,0.4064 L0.5556,0.4121 Q0.5627,0.4198,0.5722,0.4251 T0.5926,0.4337 T0.6131,0.439 T0.6343,0.4431 T0.6521,0.4468 Q0.6762,0.4529,0.7056,0.4463 Q0.6772,0.4623,0.6543,0.471 T0.604,0.4814 Q0.5962,0.4818,0.5815,0.4825 T0.5591,0.4835 T0.5393,0.4857 T0.519,0.4908 T0.5007,0.4996 T0.4812,0.5141 T0.4627,0.5353 L0.4549,0.5451 L0.4661,0.543 Q0.4759,0.541,0.4909,0.55 T0.5315,0.5796 T0.5684,0.6083 Q0.5799,0.6161,0.5915,0.6212 T0.6181,0.6308 L0.6331,0.6353 Q0.6514,0.6418,0.7004,0.633 T0.8069,0.6075 Z`,type:0}},"":{type:5,data:{d:`M0.011,0.0469 Q0.0152,0.0412,0.02,0.0361 T0.0292,0.0281 T0.0365,0.0253 Q0.0426,0.0257,0.0461,0.0263 T0.0534,0.03 T0.0582,0.0345 T0.0645,0.0434 T0.0723,0.0546 Q0.0807,0.0653,0.0897,0.0712 T0.1081,0.0775 T0.1255,0.0765 T0.1438,0.0695 T0.1605,0.0593 T0.1772,0.0473 Q0.2388,0,0.2927,0.0326 L0.2614,0.0767 L0.2581,0.0767 Q0.2494,0.0767,0.2444,0.0773 T0.2359,0.0789 T0.2291,0.0842 T0.2233,0.0922 T0.2146,0.1054 T0.2026,0.1236 Q0.1943,0.1354,0.1843,0.1444 T0.1675,0.1574 T0.1526,0.1654 T0.1429,0.1701 Q0.1436,0.1717,0.1446,0.1733 Q0.1504,0.1823,0.1581,0.1866 T0.1733,0.1915 T0.1909,0.1884 T0.2085,0.1809 T0.2265,0.169 T0.2427,0.1564 T0.2575,0.1436 T0.2688,0.1338 Q0.2969,0.1101,0.3195,0.0995 T0.3643,0.0901 T0.4114,0.1048 Q0.4279,0.1138,0.4426,0.1168 T0.4705,0.117 T0.4945,0.1089 T0.5186,0.0942 L0.5211,0.0926 L0.5289,0.0922 Q0.5411,0.095,0.5189,0.1203 Q0.505,0.1358,0.4913,0.1474 T0.4634,0.167 T0.4389,0.1796 T0.4121,0.1909 T0.3866,0.2011 Q0.3782,0.2047,0.3727,0.2092 Q0.3717,0.2117,0.3714,0.2141 Q0.3695,0.2263,0.3751,0.2388 T0.394,0.2616 T0.4253,0.2761 Q0.4398,0.2785,0.4513,0.2779 T0.4756,0.2724 T0.4987,0.2616 T0.5216,0.2476 T0.5453,0.2321 T0.5703,0.217 T0.5976,0.2043 Q0.7015,0.166,0.8099,0.2345 Q0.8361,0.2512,0.8572,0.2616 T0.9006,0.2779 T0.9432,0.281 T0.9819,0.2663 L0.9887,0.2671 Q1,0.272,0.9768,0.2969 Q0.9558,0.3193,0.9319,0.333 T0.8858,0.3513 T0.8391,0.3569 T0.793,0.3546 T0.7485,0.3497 T0.7065,0.3473 T0.6681,0.3522 T0.6344,0.3699 Q0.5963,0.4005,0.5847,0.4082 Q0.595,0.4139,0.6079,0.4174 T0.6367,0.4237 T0.6586,0.4278 Q0.6793,0.4331,0.7044,0.4278 Q0.7057,0.4278,0.707,0.4274 Q0.7067,0.429,0.7062,0.4313 T0.7036,0.4398 T0.6993,0.4513 T0.6931,0.4619 T0.6851,0.4698 Q0.6573,0.4857,0.6336,0.4947 T0.5831,0.5053 Q0.577,0.5057,0.5615,0.5065 T0.5394,0.508 T0.5221,0.51 T0.5042,0.5139 T0.4905,0.5204 Q0.5008,0.5232,0.515,0.5328 T0.549,0.5585 T0.5799,0.5824 Q0.5905,0.5897,0.6013,0.5946 T0.6262,0.6036 T0.6409,0.6081 Q0.6567,0.6134,0.7035,0.605 T0.8028,0.5816 L0.7974,0.5922 T0.7867,0.6134 L0.7812,0.624 Q0.7799,0.6248,0.7786,0.6252 Q0.7709,0.6297,0.7573,0.6372 T0.7346,0.6499 T0.7123,0.6621 T0.6897,0.6741 T0.6686,0.6847 T0.648,0.6941 T0.6297,0.7013 T0.6129,0.7062 T0.5995,0.7076 Q0.5992,0.7076,0.5831,0.7092 T0.5529,0.7092 T0.525,0.7019 Q0.5105,0.6958,0.4824,0.6811 T0.4356,0.6586 T0.4079,0.6533 Q0.3872,0.6741,0.3827,0.6782 Q0.3872,0.6835,0.3934,0.6929 T0.4037,0.7078 T0.4142,0.7198 T0.4284,0.7304 T0.4466,0.7365 Q0.4824,0.7443,0.5292,0.728 L0.5292,0.7294 T0.529,0.7333 T0.5284,0.7392 T0.5266,0.7463 T0.5236,0.7539 T0.5186,0.7612 T0.5111,0.7679 Q0.5086,0.77,0.5056,0.7716 Q0.4466,0.8104,0.3591,0.8091 Q0.344,0.8091,0.3246,0.802 T0.2893,0.7863 T0.2543,0.77 T0.2206,0.76 T0.1894,0.7643 Q0.1804,0.7684,0.1733,0.7753 Q0.1591,0.7892,0.1601,0.8169 Q0.1784,0.8067,0.1938,0.8053 T0.2212,0.8087 T0.2507,0.825 Q0.2614,0.8324,0.2744,0.8365 T0.3053,0.844 T0.332,0.8499 L0.303,0.894 L0.2998,0.8948 Q0.2904,0.8968,0.278,0.9009 T0.2554,0.9086 T0.233,0.9158 T0.2099,0.9213 T0.1868,0.9229 T0.1633,0.9192 Q0.1517,0.916,0.1367,0.9241 T0.1065,0.9462 T0.0753,0.9737 T0.041,0.9955 T0.0061,1 Q0,0.9984,0.0068,0.9845 Q0.009,0.9804,0.0123,0.9755 Q0.0187,0.9666,0.0261,0.9606 T0.0374,0.9555 Q0.0481,0.958,0.0629,0.949 T0.0931,0.9262 T0.1247,0.8987 T0.1597,0.8777 T0.1949,0.8752 Q0.213,0.8805,0.2343,0.8772 Q0.2249,0.8736,0.2172,0.8683 Q0.1914,0.8511,0.1738,0.8497 T0.1349,0.8617 Q0.1304,0.865,0.1273,0.8646 T0.1242,0.8605 L0.1239,0.8536 Q0.1226,0.8295,0.1354,0.8016 T0.1723,0.7496 Q0.1914,0.7308,0.2104,0.7219 Q0.2259,0.7145,0.2425,0.7141 T0.273,0.7182 T0.3022,0.7296 T0.3301,0.7439 T0.3569,0.7571 T0.3821,0.7643 Q0.373,0.7561,0.3598,0.7367 T0.3382,0.7088 L0.3327,0.7035 Q0.3282,0.699,0.3353,0.6884 T0.3517,0.6692 L0.3611,0.6607 Q0.3711,0.657,0.3751,0.6554 T0.3837,0.6507 T0.3898,0.6458 T0.3979,0.637 T0.4111,0.6236 Q0.4172,0.6175,0.4234,0.6138 Q0.4327,0.6081,0.4439,0.6077 T0.4655,0.6105 T0.4884,0.6201 T0.5113,0.633 T0.5347,0.6468 T0.5573,0.6578 Q0.5705,0.6635,0.5833,0.665 T0.6112,0.665 T0.6286,0.6635 Q0.6421,0.6631,0.6718,0.6501 Q0.626,0.6578,0.6089,0.6517 Q0.6063,0.6509,0.6002,0.6491 T0.5884,0.6454 T0.5757,0.6409 T0.561,0.6344 T0.5466,0.6256 Q0.536,0.6183,0.5108,0.5989 T0.4722,0.5712 T0.4527,0.564 L0.4418,0.5661 Q0.4308,0.5681,0.4366,0.5563 Q0.4401,0.5485,0.4476,0.5392 L0.455,0.5298 Q0.4631,0.5188,0.4714,0.51 T0.4866,0.4947 T0.5021,0.4831 T0.516,0.4749 T0.53,0.4694 T0.5428,0.4657 T0.5558,0.4637 T0.5674,0.4629 T0.5795,0.4625 Q0.5489,0.4543,0.534,0.4384 L0.5286,0.4327 Q0.5244,0.4282,0.5318,0.4174 T0.5486,0.398 L0.5579,0.3899 Q0.567,0.387,0.5749,0.3834 T0.5878,0.3772 T0.6012,0.3687 T0.6126,0.3603 T0.6268,0.3487 T0.6421,0.3361 Q0.6567,0.3242,0.6712,0.3159 T0.7009,0.3034 T0.7277,0.2973 T0.7556,0.2961 T0.7809,0.2977 T0.8074,0.301 Q0.8096,0.3014,0.8109,0.3016 T0.8143,0.302 T0.818,0.3026 Q0.8012,0.2936,0.7767,0.2781 Q0.6718,0.2117,0.5744,0.2476 Q0.5637,0.2516,0.5492,0.2604 T0.5218,0.2779 T0.4923,0.2965 T0.461,0.3124 T0.4282,0.3216 T0.394,0.3206 Q0.3637,0.3136,0.3474,0.2936 T0.3353,0.2459 Q0.3385,0.2247,0.355,0.2023 Q0.3646,0.1892,0.3763,0.179 Q0.3898,0.1672,0.4063,0.1595 Q0.3927,0.1562,0.3785,0.1485 Q0.3604,0.1387,0.3453,0.1354 T0.3161,0.1354 T0.2899,0.1458 T0.2627,0.166 Q0.262,0.1664,0.254,0.1733 T0.2414,0.1841 T0.2267,0.196 T0.2094,0.2086 T0.1915,0.2196 T0.1725,0.2288 T0.1546,0.2337 T0.1373,0.2343 T0.1223,0.228 T0.1097,0.2145 Q0.0962,0.1929,0.1258,0.1582 Q0.131,0.1517,0.1371,0.1464 Q0.1462,0.1387,0.156,0.1321 T0.1752,0.1205 T0.1878,0.1134 Q0.1891,0.1117,0.1947,0.103 T0.2035,0.0899 T0.2125,0.0781 T0.2243,0.064 Q0.1949,0.0616,0.1672,0.0828 Q0.153,0.0934,0.1412,0.1009 T0.1146,0.1146 T0.0873,0.1213 T0.0616,0.116 T0.0374,0.0962 Q0.0339,0.0909,0.0295,0.0846 T0.024,0.0767 T0.0202,0.0728 T0.0148,0.0704 T0.0068,0.0697 Q0.0003,0.0693,0.0058,0.0567 Q0.0077,0.0522,0.011,0.0469 Z`,type:0}},"":{type:5,data:{d:`M0.1934,0.6075 Q0.2012,0.612,0.2188,0.6218 T0.2459,0.6369 T0.2718,0.6508 T0.2983,0.6644 T0.322,0.6758 T0.3447,0.6854 T0.363,0.6911 T0.3783,0.6936 Q0.3796,0.6936,0.396,0.6952 T0.4265,0.6952 T0.4548,0.6879 Q0.4656,0.6834,0.4805,0.6756 T0.5073,0.6614 T0.5327,0.6485 T0.5564,0.6389 T0.5759,0.6363 T0.5909,0.6422 Q0.5953,0.6467,0.604,0.6554 T0.6155,0.6669 T0.6251,0.6746 T0.6387,0.683 T0.6556,0.6903 L0.6498,0.6956 Q0.6414,0.7042,0.6319,0.7177 T0.6162,0.7403 T0.5979,0.7583 T0.5703,0.7703 Q0.5313,0.7785,0.4799,0.7605 Q0.5097,0.7817,0.5508,0.7911 T0.6302,0.8001 Q0.6431,0.7997,0.659,0.7942 T0.6888,0.7813 T0.7194,0.766 T0.7506,0.753 T0.7819,0.7472 T0.8131,0.754 Q0.8239,0.7589,0.8346,0.7681 T0.8544,0.7895 T0.8689,0.818 T0.8737,0.8507 L0.8733,0.858 Q0.8591,0.849,0.8474,0.845 T0.8242,0.8421 T0.8021,0.8482 T0.7772,0.8625 Q0.7653,0.8707,0.7513,0.8752 T0.7184,0.8831 T0.6908,0.889 Q0.7017,0.8915,0.7152,0.8956 T0.7396,0.9037 T0.7633,0.9115 T0.7872,0.9174 T0.8107,0.9194 T0.8347,0.9155 Q0.8493,0.9115,0.8671,0.9196 T0.9015,0.9421 T0.9345,0.9708 T0.9682,0.9943 T0.9997,1 Q0.999,0.94,0.9983,0.6508 T0.9976,0.2322 Q0.9976,0.2109,0.9992,0.1379 T1,0.0249 Q0.9949,0.0249,0.9917,0.0257 T0.9863,0.0273 T0.9817,0.0308 T0.9776,0.0357 T0.9721,0.0437 T0.9651,0.0539 Q0.956,0.0657,0.9456,0.072 T0.9247,0.0789 T0.904,0.0775 T0.8823,0.0694 T0.862,0.0573 T0.8422,0.0432 Q0.7856,0,0.7328,0.0318 Q0.7392,0.0318,0.7452,0.0324 T0.756,0.0345 T0.7657,0.0386 T0.7741,0.0437 T0.7821,0.0506 T0.7894,0.0588 T0.7966,0.0683 T0.8039,0.0787 T0.8119,0.0904 T0.8202,0.1028 Q0.8249,0.1093,0.849,0.1234 T0.8811,0.1448 Q0.8998,0.1612,0.8893,0.1783 Q0.8835,0.1877,0.8759,0.1928 T0.8593,0.1979 T0.8417,0.1967 T0.8222,0.1895 T0.8034,0.1791 T0.7848,0.1663 T0.7687,0.1534 T0.7543,0.141 T0.744,0.1322 Q0.7186,0.1106,0.6984,0.101 T0.6559,0.0926 T0.6082,0.1077 Q0.5899,0.1175,0.5733,0.1206 T0.5411,0.1202 T0.5122,0.1098 T0.4822,0.0914 Q0.4927,0.1032,0.5036,0.1122 T0.5276,0.1285 T0.5503,0.1401 T0.5777,0.1518 T0.6055,0.1636 Q0.6258,0.1726,0.6375,0.1863 T0.6519,0.2162 Q0.6556,0.2403,0.6392,0.2605 T0.5926,0.2876 Q0.5804,0.2909,0.5672,0.2899 T0.5428,0.2856 T0.5193,0.2764 T0.4966,0.264 T0.4744,0.2497 T0.4523,0.2352 T0.4301,0.2222 T0.4077,0.2118 Q0.3021,0.173,0.1903,0.2436 Q0.1669,0.2583,0.1504,0.2674 T0.1129,0.2846 T0.075,0.294 T0.0384,0.2911 T0,0.2746 Q0.021,0.297,0.0459,0.3082 T0.0953,0.3207 T0.146,0.3193 T0.1988,0.3131 T0.2508,0.3095 T0.3029,0.3176 T0.3529,0.3448 Q0.3566,0.348,0.3652,0.355 T0.3771,0.3645 T0.3877,0.3731 T0.3993,0.3815 T0.4103,0.3884 T0.4226,0.3953 T0.4352,0.4009 T0.4497,0.4064 L0.4443,0.4121 Q0.4372,0.4198,0.4277,0.4251 T0.4072,0.4337 T0.3867,0.439 T0.3656,0.4431 T0.3481,0.4468 Q0.3241,0.4529,0.2943,0.4463 Q0.3227,0.4623,0.3458,0.471 T0.3959,0.4814 Q0.404,0.4818,0.4187,0.4825 T0.4409,0.4835 T0.4605,0.4857 T0.4809,0.4908 T0.4992,0.4996 T0.5186,0.5141 T0.5371,0.5353 L0.5449,0.5451 L0.5337,0.543 Q0.5242,0.541,0.5091,0.55 T0.4683,0.5796 T0.4314,0.6083 Q0.4203,0.6161,0.4086,0.6212 T0.382,0.6308 T0.3667,0.6353 Q0.3485,0.6418,0.2995,0.633 T0.1934,0.6075 Z`,type:0}},"":{type:5,data:{d:`M0.989,0.0469 Q0.9829,0.0379,0.9753,0.0316 T0.9635,0.0253 Q0.9574,0.0257,0.9539,0.0263 T0.9466,0.03 T0.9418,0.0345 T0.9355,0.0434 T0.9277,0.0546 Q0.9193,0.0653,0.9103,0.0712 T0.8919,0.0775 T0.8745,0.0765 T0.8564,0.0695 T0.8396,0.0593 T0.8228,0.0473 Q0.7612,0,0.7073,0.0326 L0.7386,0.0767 L0.7419,0.0767 Q0.7506,0.0767,0.7556,0.0773 T0.7641,0.0789 T0.7709,0.0842 T0.7767,0.0922 T0.7854,0.1054 T0.7974,0.1236 Q0.8057,0.1354,0.8157,0.1444 T0.8325,0.1574 T0.8474,0.1654 T0.8571,0.1701 Q0.8564,0.1717,0.8554,0.1733 Q0.8503,0.1815,0.844,0.186 T0.8301,0.1909 T0.8153,0.1903 T0.7993,0.1845 T0.7836,0.1758 T0.768,0.1648 T0.754,0.1535 T0.741,0.1425 T0.7312,0.1338 Q0.7031,0.1101,0.6805,0.0995 T0.6357,0.0901 T0.5886,0.1048 Q0.5721,0.1138,0.5574,0.1168 T0.5295,0.117 T0.5055,0.1089 T0.4814,0.0942 L0.4789,0.0926 L0.4711,0.0922 Q0.4589,0.095,0.4811,0.1203 Q0.495,0.1358,0.5087,0.1474 T0.5366,0.167 T0.5611,0.1796 T0.5879,0.1909 T0.6134,0.2011 Q0.6218,0.2047,0.6273,0.2092 Q0.6283,0.2117,0.6286,0.2141 Q0.6305,0.2263,0.6249,0.2388 T0.606,0.2616 T0.5747,0.2761 Q0.5602,0.2785,0.5487,0.2779 T0.5245,0.2724 T0.5015,0.2616 T0.4784,0.2476 T0.4547,0.2321 T0.4297,0.217 T0.4024,0.2043 Q0.2985,0.166,0.1901,0.2345 Q0.1694,0.248,0.1523,0.2569 T0.1165,0.2726 T0.0818,0.2812 T0.0494,0.2796 T0.0181,0.2663 L0.0116,0.2671 Q0,0.272,0.0232,0.2969 Q0.0468,0.3222,0.0742,0.3365 T0.1278,0.3542 T0.1807,0.3564 T0.233,0.352 T0.2815,0.3473 T0.3269,0.3509 T0.3656,0.3699 Q0.4037,0.4005,0.4153,0.4082 Q0.405,0.4139,0.3921,0.4174 T0.3633,0.4237 T0.3414,0.4278 Q0.3207,0.4331,0.2956,0.4278 Q0.2943,0.4278,0.293,0.4274 Q0.2933,0.429,0.2938,0.4313 T0.2964,0.4398 T0.3007,0.4513 T0.3069,0.4619 T0.3149,0.4698 Q0.3427,0.4857,0.3664,0.4947 T0.4169,0.5053 Q0.423,0.5057,0.4385,0.5065 T0.4606,0.508 T0.4779,0.51 T0.4958,0.5139 T0.5095,0.5204 Q0.4992,0.5232,0.485,0.5328 T0.451,0.5585 T0.4201,0.5824 Q0.4095,0.5897,0.3987,0.5946 T0.3738,0.6036 T0.3591,0.6081 Q0.3433,0.6134,0.2965,0.605 T0.1972,0.5816 L0.2026,0.5922 T0.2133,0.6134 L0.2188,0.624 Q0.2201,0.6248,0.2214,0.6252 Q0.2291,0.6297,0.2486,0.6405 T0.2786,0.657 T0.3066,0.6721 T0.3353,0.6866 T0.3598,0.6972 T0.383,0.7051 T0.4005,0.7076 Q0.4008,0.7076,0.4169,0.7092 T0.4471,0.7092 T0.475,0.7019 Q0.4895,0.6958,0.5176,0.6811 T0.5644,0.6586 T0.5921,0.6533 Q0.6128,0.6741,0.6173,0.6782 Q0.6131,0.6835,0.6068,0.6929 T0.5963,0.7078 T0.5858,0.7198 T0.5716,0.7304 T0.5534,0.7365 Q0.5179,0.7443,0.4708,0.728 L0.4708,0.7294 T0.471,0.7333 T0.4716,0.7392 T0.4734,0.7463 T0.4764,0.7539 T0.4814,0.7612 T0.4889,0.7679 Q0.4914,0.77,0.4944,0.7716 Q0.5534,0.8104,0.6409,0.8091 Q0.6521,0.8091,0.6654,0.8053 T0.6907,0.7959 T0.7157,0.7838 T0.741,0.772 T0.7652,0.7631 T0.7888,0.7594 T0.8106,0.7643 Q0.8196,0.7684,0.8267,0.7753 Q0.8409,0.7892,0.8399,0.8169 Q0.8216,0.8067,0.8062,0.8053 T0.7788,0.8087 T0.7493,0.825 Q0.7386,0.8324,0.7256,0.8365 T0.6947,0.844 T0.668,0.8499 L0.697,0.894 L0.7002,0.8948 Q0.7099,0.8968,0.7222,0.9009 T0.7446,0.9086 T0.767,0.9158 T0.7901,0.9213 T0.8132,0.9229 T0.8367,0.9192 Q0.8483,0.916,0.8633,0.9241 T0.8937,0.9462 T0.9248,0.9737 T0.959,0.9955 T0.9939,1 Q1,0.9984,0.9932,0.9845 Q0.991,0.9804,0.9877,0.9755 Q0.9813,0.9666,0.9739,0.9606 T0.9626,0.9555 Q0.9519,0.958,0.9372,0.949 T0.9071,0.9262 T0.8753,0.8987 T0.8403,0.8777 T0.8051,0.8752 Q0.787,0.8805,0.7657,0.8772 Q0.7751,0.8736,0.7828,0.8683 Q0.8086,0.8511,0.8262,0.8497 T0.8651,0.8617 Q0.8696,0.865,0.8727,0.8646 T0.8758,0.8605 L0.8761,0.8536 Q0.8774,0.8295,0.8646,0.8016 T0.8277,0.7496 Q0.8086,0.7308,0.7896,0.7219 Q0.7741,0.7145,0.7575,0.7141 T0.727,0.7182 T0.6978,0.7296 T0.6699,0.7439 T0.6433,0.7571 T0.6179,0.7643 Q0.627,0.7561,0.6402,0.7367 T0.6618,0.7088 L0.6673,0.7035 Q0.6718,0.699,0.6647,0.6884 T0.6483,0.6692 L0.6389,0.6607 Q0.6289,0.657,0.6249,0.6554 T0.6163,0.6507 T0.6102,0.6458 T0.6021,0.637 T0.5889,0.6236 Q0.5828,0.6175,0.5766,0.6138 Q0.5673,0.6081,0.5561,0.6077 T0.5345,0.6105 T0.5116,0.6201 T0.4887,0.633 T0.4653,0.6468 T0.4427,0.6578 Q0.4295,0.6635,0.4167,0.665 T0.3888,0.665 T0.3714,0.6635 Q0.3579,0.6631,0.3282,0.6501 Q0.374,0.6578,0.3911,0.6517 Q0.3937,0.6509,0.4024,0.6482 T0.4179,0.6434 T0.4348,0.6364 T0.4534,0.6256 Q0.464,0.6183,0.4892,0.5989 T0.5278,0.5712 T0.5476,0.564 L0.5582,0.5661 Q0.5692,0.5681,0.5634,0.5563 Q0.5599,0.5485,0.5524,0.5392 L0.545,0.5298 Q0.5369,0.5188,0.5286,0.51 T0.5134,0.4947 T0.4979,0.4831 T0.484,0.4749 T0.47,0.4694 T0.4572,0.4657 T0.4442,0.4637 T0.4326,0.4629 T0.4205,0.4625 Q0.4511,0.4543,0.466,0.4384 L0.4714,0.4327 Q0.4795,0.4237,0.4469,0.394 L0.4421,0.3899 Q0.433,0.387,0.4251,0.3834 T0.4122,0.3772 T0.3988,0.3687 T0.3874,0.3603 T0.3732,0.3487 T0.3579,0.3361 Q0.3433,0.3242,0.3288,0.3159 T0.2993,0.3034 T0.2725,0.2973 T0.2446,0.2961 T0.2193,0.2977 T0.1926,0.301 Q0.1855,0.3022,0.182,0.3026 Q0.1991,0.2936,0.2233,0.2781 Q0.3282,0.2117,0.4256,0.2476 Q0.4363,0.2516,0.451,0.2604 T0.4784,0.2779 T0.5077,0.2965 T0.539,0.3124 T0.5718,0.3216 T0.606,0.3206 Q0.6363,0.3136,0.6526,0.2936 T0.6647,0.2459 Q0.6615,0.2247,0.645,0.2023 Q0.6354,0.1892,0.6237,0.179 Q0.6102,0.1672,0.5937,0.1595 Q0.6073,0.1562,0.6215,0.1485 Q0.6396,0.1387,0.6547,0.1354 T0.6839,0.1354 T0.7101,0.1458 T0.7373,0.166 Q0.738,0.1664,0.746,0.1733 T0.7586,0.1841 T0.7733,0.196 T0.7907,0.2086 T0.8086,0.2196 T0.8275,0.2288 T0.8454,0.2337 T0.8627,0.2343 T0.8777,0.228 T0.8903,0.2145 Q0.9038,0.1929,0.8742,0.1582 Q0.869,0.1517,0.8629,0.1464 Q0.8538,0.1387,0.844,0.1321 T0.8248,0.1205 T0.8122,0.1134 Q0.8109,0.1117,0.8053,0.103 T0.7965,0.0899 T0.7875,0.0781 T0.7757,0.064 Q0.8051,0.0616,0.8328,0.0828 Q0.847,0.0934,0.8588,0.1009 T0.8854,0.1146 T0.9127,0.1213 T0.9384,0.116 T0.9626,0.0962 Q0.9664,0.0909,0.9706,0.0846 T0.976,0.0767 T0.9798,0.0728 T0.9852,0.0704 T0.9932,0.0697 Q0.9997,0.0693,0.9942,0.0567 Q0.9923,0.0522,0.989,0.0469 Z`,type:0}},"":{type:5,data:{d:`M0.4116,0.0126 L0.4116,0.0776 L0.4871,0.0776 L0.4871,0.0126 L0.4116,0.0126 Z M0.4043,0 L0.4944,0 Q0.4973,0,0.4995,0.0021 T0.5017,0.0063 L0.5017,0.0839 Q0.5017,0.0864,0.4993,0.0883 T0.4944,0.0902 L0.4043,0.0902 Q0.4014,0.0902,0.3992,0.0881 T0.397,0.0839 L0.397,0.0063 Q0.397,0.0038,0.3994,0.0019 T0.4043,0 Z M0.4116,0.0126 L0.4116,0.0776 L0.4871,0.0776 L0.4871,0.0126 L0.4116,0.0126 Z M0.4043,0 L0.4944,0 Q0.4973,0,0.4995,0.0021 T0.5017,0.0063 L0.5017,0.0839 Q0.5017,0.0864,0.4993,0.0883 T0.4944,0.0902 L0.4043,0.0902 Q0.4014,0.0902,0.3992,0.0881 T0.397,0.0839 L0.397,0.0063 Q0.397,0.0038,0.3994,0.0019 T0.4043,0 Z M0.4116,0.0126 L0.4116,0.0776 L0.4871,0.0776 L0.4871,0.0126 L0.4116,0.0126 Z M0.4043,0 L0.4944,0 Q0.4973,0,0.4995,0.0021 T0.5017,0.0063 L0.5017,0.0839 Q0.5017,0.0864,0.4993,0.0883 T0.4944,0.0902 L0.4043,0.0902 Q0.4014,0.0902,0.3992,0.0881 T0.397,0.0839 L0.397,0.0063 Q0.397,0.0038,0.3994,0.0019 T0.4043,0 Z M0.9099,0.0084 L0.9099,0.0818 L0.9951,0.0818 L0.9951,0.0084 L0.9099,0.0084 Z M0.9075,0.0042 L0.9976,0.0042 Q1,0.0042,1,0.0063 L1,0.0839 Q1,0.086,0.9976,0.086 L0.9075,0.086 Q0.905,0.086,0.905,0.0839 L0.905,0.0063 Q0.905,0.0042,0.9075,0.0042 Z M0.9099,0.0084 L0.9099,0.0818 L0.9951,0.0818 L0.9951,0.0084 L0.9099,0.0084 Z M0.9075,0.0042 L0.9976,0.0042 Q1,0.0042,1,0.0063 L1,0.0839 Q1,0.086,0.9976,0.086 L0.9075,0.086 Q0.905,0.086,0.905,0.0839 L0.905,0.0063 Q0.905,0.0042,0.9075,0.0042 Z M0.9099,0.0084 L0.9099,0.0818 L0.9951,0.0818 L0.9951,0.0084 L0.9099,0.0084 Z M0.9075,0.0042 L0.9976,0.0042 Q1,0.0042,1,0.0063 L1,0.0839 Q1,0.086,0.9976,0.086 L0.9075,0.086 Q0.905,0.086,0.905,0.0839 L0.905,0.0063 Q0.905,0.0042,0.9075,0.0042 Z M0.66,0.0063 L0.7501,0.0063 L0.7501,0.0839 L0.66,0.0839 L0.66,0.0063 Z M0.66,0.0063 L0.7501,0.0063 L0.7501,0.0839 L0.66,0.0839 L0.66,0.0063 Z M0.66,0.0063 L0.7501,0.0063 L0.7501,0.0839 L0.66,0.0839 L0.66,0.0063 Z M0.5309,0.0063 L0.621,0.0063 L0.621,0.0839 L0.5309,0.0839 L0.5309,0.0063 Z M0.5309,0.0063 L0.621,0.0063 L0.621,0.0839 L0.5309,0.0839 L0.5309,0.0063 Z M0.5309,0.0063 L0.621,0.0063 L0.621,0.0839 L0.5309,0.0839 L0.5309,0.0063 Z M0.2689,0.0063 L0.359,0.0063 L0.359,0.0839 L0.2689,0.0839 L0.2689,0.0063 Z M0.2689,0.0063 L0.359,0.0063 L0.359,0.0839 L0.2689,0.0839 L0.2689,0.0063 Z M0.2689,0.0063 L0.359,0.0063 L0.359,0.0839 L0.2689,0.0839 L0.2689,0.0063 Z M0.1374,0.0063 L0.2275,0.0063 L0.2275,0.0839 L0.1374,0.0839 L0.1374,0.0063 Z M0.1374,0.0063 L0.2275,0.0063 L0.2275,0.0839 L0.1374,0.0839 L0.1374,0.0063 Z M0.1374,0.0063 L0.2275,0.0063 L0.2275,0.0839 L0.1374,0.0839 L0.1374,0.0063 Z M0,0.0063 L0.0901,0.0063 L0.0901,0.0839 L0,0.0839 L0,0.0063 Z M0,0.0063 L0.0901,0.0063 L0.0901,0.0839 L0,0.0839 L0,0.0063 Z M0,0.0063 L0.0901,0.0063 L0.0901,0.0839 L0,0.0839 L0,0.0063 Z M0.4087,0.9224 L0.4087,0.9958 L0.4939,0.9958 L0.4939,0.9224 L0.4087,0.9224 Z M0.4062,0.9182 L0.4963,0.9182 Q0.4988,0.9182,0.4988,0.9203 L0.4988,0.9979 Q0.4988,1,0.4963,1 L0.4062,1 Q0.4038,1,0.4038,0.9979 L0.4038,0.9203 Q0.4038,0.9182,0.4062,0.9182 Z M0.4087,0.9224 L0.4087,0.9958 L0.4939,0.9958 L0.4939,0.9224 L0.4087,0.9224 Z M0.4062,0.9182 L0.4963,0.9182 Q0.4988,0.9182,0.4988,0.9203 L0.4988,0.9979 Q0.4988,1,0.4963,1 L0.4062,1 Q0.4038,1,0.4038,0.9979 L0.4038,0.9203 Q0.4038,0.9182,0.4062,0.9182 Z M0.4087,0.9224 L0.4087,0.9958 L0.4939,0.9958 L0.4939,0.9224 L0.4087,0.9224 Z M0.4062,0.9182 L0.4963,0.9182 Q0.4988,0.9182,0.4988,0.9203 L0.4988,0.9979 Q0.4988,1,0.4963,1 L0.4062,1 Q0.4038,1,0.4038,0.9979 L0.4038,0.9203 Q0.4038,0.9182,0.4062,0.9182 Z M0.1374,0.9203 L0.2275,0.9203 L0.2275,0.9979 L0.1374,0.9979 L0.1374,0.9203 Z M0.1374,0.9203 L0.2275,0.9203 L0.2275,0.9979 L0.1374,0.9979 L0.1374,0.9203 Z M0.1374,0.9203 L0.2275,0.9203 L0.2275,0.9979 L0.1374,0.9979 L0.1374,0.9203 Z M0,0.9203 L0.0901,0.9203 L0.0901,0.9979 L0,0.9979 L0,0.9203 Z M0,0.9203 L0.0901,0.9203 L0.0901,0.9979 L0,0.9979 L0,0.9203 Z M0,0.9203 L0.0901,0.9203 L0.0901,0.9979 L0,0.9979 L0,0.9203 Z M0.9099,0.1158 L0.9099,0.1888 L0.9951,0.1888 L0.9951,0.1158 L0.9099,0.1158 Z M0.9075,0.1116 L0.9976,0.1116 Q1,0.1116,1,0.1137 L1,0.1909 Q1,0.193,0.9976,0.193 L0.9075,0.193 Q0.905,0.193,0.905,0.1909 L0.905,0.1137 Q0.905,0.1116,0.9075,0.1116 Z M0.7852,0.6086 L0.7852,0.682 L0.8704,0.682 L0.8704,0.6086 L0.7852,0.6086 Z M0.7828,0.6044 L0.8729,0.6044 Q0.8753,0.6044,0.8753,0.6065 L0.8753,0.6841 Q0.8753,0.6862,0.8729,0.6862 L0.7828,0.6862 Q0.7803,0.6862,0.7803,0.6841 L0.7803,0.6065 Q0.7803,0.6044,0.7828,0.6044 Z M0.66,0.1137 L0.7501,0.1137 L0.7501,0.1909 L0.66,0.1909 L0.66,0.1137 Z M0.6624,0.4102 L0.6624,0.4836 L0.7477,0.4836 L0.7477,0.4102 L0.6624,0.4102 Z M0.66,0.406 L0.7501,0.406 Q0.7526,0.406,0.7526,0.4081 L0.7526,0.4857 Q0.7526,0.4878,0.7501,0.4878 L0.66,0.4878 Q0.6576,0.4878,0.6576,0.4857 L0.6576,0.4081 Q0.6576,0.406,0.66,0.406 Z M0.6624,0.7131 L0.6624,0.7865 L0.7477,0.7865 L0.7477,0.7131 L0.6624,0.7131 Z M0.66,0.7089 L0.7501,0.7089 Q0.7526,0.7089,0.7526,0.711 L0.7526,0.7886 Q0.7526,0.7907,0.7501,0.7907 L0.66,0.7907 Q0.6576,0.7907,0.6576,0.7886 L0.6576,0.711 Q0.6576,0.7089,0.66,0.7089 Z M0.5407,0.2227 L0.5407,0.2836 L0.6113,0.2836 L0.6113,0.2227 L0.5407,0.2227 Z M0.5309,0.206 L0.621,0.206 Q0.623,0.206,0.6249,0.2068 T0.6281,0.2089 T0.6301,0.2116 T0.6308,0.2143 L0.6308,0.2919 Q0.6308,0.2957,0.6276,0.298 T0.621,0.3003 L0.5309,0.3003 Q0.5265,0.3003,0.5239,0.2976 T0.5212,0.2919 L0.5212,0.2143 Q0.5212,0.211,0.5244,0.2085 T0.5309,0.206 Z M0.5407,0.3184 L0.5407,0.3792 L0.6113,0.3792 L0.6113,0.3184 L0.5407,0.3184 Z M0.5309,0.3016 L0.621,0.3016 Q0.6254,0.3016,0.6281,0.3043 T0.6308,0.31 L0.6308,0.3876 Q0.6308,0.3914,0.6276,0.3937 T0.621,0.396 L0.5309,0.396 Q0.5265,0.396,0.5239,0.3932 T0.5212,0.3876 L0.5212,0.31 Q0.5212,0.3062,0.5244,0.3039 T0.5309,0.3016 Z M0.5309,0.4081 L0.621,0.4081 L0.621,0.4857 L0.5309,0.4857 L0.5309,0.4081 Z M0.5309,0.5059 L0.621,0.5059 L0.621,0.5835 L0.5309,0.5835 L0.5309,0.5059 Z M0.5407,0.6149 L0.5407,0.6758 L0.6113,0.6758 L0.6113,0.6149 L0.5407,0.6149 Z M0.5309,0.5982 L0.621,0.5982 Q0.6254,0.5982,0.6281,0.6009 T0.6308,0.6065 L0.6308,0.6841 Q0.6308,0.6879,0.6276,0.6902 T0.621,0.6925 L0.5309,0.6925 Q0.5265,0.6925,0.5239,0.6898 T0.5212,0.6841 L0.5212,0.6065 Q0.5212,0.6028,0.5244,0.6005 T0.5309,0.5982 Z M0.4062,0.1137 L0.4963,0.1137 L0.4963,0.1909 L0.4062,0.1909 L0.4062,0.1137 Z M0.4062,0.2143 L0.4963,0.2143 L0.4963,0.2919 L0.4062,0.2919 L0.4062,0.2143 Z M0.4184,0.4186 L0.4184,0.4753 L0.4842,0.4753 L0.4842,0.4186 L0.4184,0.4186 Z M0.4062,0.3977 L0.4963,0.3977 Q0.5017,0.3977,0.5051,0.401 T0.5085,0.4081 L0.5085,0.4857 Q0.5085,0.4904,0.5046,0.4933 T0.4963,0.4962 L0.4062,0.4962 Q0.4009,0.4962,0.3975,0.4929 T0.3941,0.4857 L0.3941,0.4081 Q0.3941,0.4035,0.398,0.4006 T0.4062,0.3977 Z M0.4062,0.5059 L0.4963,0.5059 L0.4963,0.5835 L0.4062,0.5835 L0.4062,0.5059 Z M0.4087,0.7131 L0.4087,0.7865 L0.4939,0.7865 L0.4939,0.7131 L0.4087,0.7131 Z M0.4062,0.7089 L0.4963,0.7089 Q0.4988,0.7089,0.4988,0.711 L0.4988,0.7886 Q0.4988,0.7907,0.4963,0.7907 L0.4062,0.7907 Q0.4038,0.7907,0.4038,0.7886 L0.4038,0.711 Q0.4038,0.7089,0.4062,0.7089 Z M0.2689,0.1137 L0.359,0.1137 L0.359,0.1909 L0.2689,0.1909 L0.2689,0.1137 Z M0.2689,0.2143 L0.359,0.2143 L0.359,0.2919 L0.2689,0.2919 L0.2689,0.2143 Z M0.2689,0.8154 L0.359,0.8154 L0.359,0.8926 L0.2689,0.8926 L0.2689,0.8154 Z M0.2689,0.31 L0.359,0.31 L0.359,0.3876 L0.2689,0.3876 L0.2689,0.31 Z M0.2689,0.8154 L0.359,0.8154 L0.359,0.8926 L0.2689,0.8926 L0.2689,0.8154 Z M0.2689,0.4081 L0.359,0.4081 L0.359,0.4857 L0.2689,0.4857 L0.2689,0.4081 Z M0.2689,0.5059 L0.359,0.5059 L0.359,0.5835 L0.2689,0.5835 L0.2689,0.5059 Z M0.2689,0.711 L0.359,0.711 L0.359,0.7886 L0.2689,0.7886 L0.2689,0.711 Z M0.2689,0.8154 L0.359,0.8154 L0.359,0.8926 L0.2689,0.8926 L0.2689,0.8154 Z M0.1374,0.1137 L0.2275,0.1137 L0.2275,0.1909 L0.1374,0.1909 L0.1374,0.1137 Z M0.1374,0.2143 L0.2275,0.2143 L0.2275,0.2919 L0.1374,0.2919 L0.1374,0.2143 Z M0.1374,0.8154 L0.2275,0.8154 L0.2275,0.8926 L0.1374,0.8926 L0.1374,0.8154 Z M0.1374,0.31 L0.2275,0.31 L0.2275,0.3876 L0.1374,0.3876 L0.1374,0.31 Z M0.1374,0.8154 L0.2275,0.8154 L0.2275,0.8926 L0.1374,0.8926 L0.1374,0.8154 Z M0.1374,0.4081 L0.2275,0.4081 L0.2275,0.4857 L0.1374,0.4857 L0.1374,0.4081 Z M0.1374,0.5059 L0.2275,0.5059 L0.2275,0.5835 L0.1374,0.5835 L0.1374,0.5059 Z M0.1374,0.6065 L0.2275,0.6065 L0.2275,0.6841 L0.1374,0.6841 L0.1374,0.6065 Z M0.1374,0.711 L0.2275,0.711 L0.2275,0.7886 L0.1374,0.7886 L0.1374,0.711 Z M0.1374,0.8154 L0.2275,0.8154 L0.2275,0.8926 L0.1374,0.8926 L0.1374,0.8154 Z M0,0.1137 L0.0901,0.1137 L0.0901,0.1909 L0,0.1909 L0,0.1137 Z M0,0.2143 L0.0901,0.2143 L0.0901,0.2919 L0,0.2919 L0,0.2143 Z M0,0.8154 L0.0901,0.8154 L0.0901,0.8926 L0,0.8926 L0,0.8154 Z M0,0.31 L0.0901,0.31 L0.0901,0.3876 L0,0.3876 L0,0.31 Z M0,0.8154 L0.0901,0.8154 L0.0901,0.8926 L0,0.8926 L0,0.8154 Z M0,0.4081 L0.0901,0.4081 L0.0901,0.4857 L0,0.4857 L0,0.4081 Z M0,0.5059 L0.0901,0.5059 L0.0901,0.5835 L0,0.5835 L0,0.5059 Z M0,0.6065 L0.0901,0.6065 L0.0901,0.6841 L0,0.6841 L0,0.6065 Z M0,0.711 L0.0901,0.711 L0.0901,0.7886 L0,0.7886 L0,0.711 Z M0,0.8154 L0.0901,0.8154 L0.0901,0.8926 L0,0.8926 L0,0.8154 Z`,type:0}},"":{type:5,data:{d:`M0.5884,0.0126 L0.5884,0.0776 L0.5129,0.0776 L0.5129,0.0126 L0.5884,0.0126 Z M0.5957,0 L0.5056,0 Q0.5027,0,0.5005,0.0021 T0.4983,0.0063 L0.4983,0.0839 Q0.4983,0.0864,0.5007,0.0883 T0.5056,0.0902 L0.5957,0.0902 Q0.5986,0.0902,0.6008,0.0881 T0.603,0.0839 L0.603,0.0063 Q0.603,0.0038,0.6006,0.0019 T0.5957,0 Z M0.5884,0.0126 L0.5884,0.0776 L0.5129,0.0776 L0.5129,0.0126 L0.5884,0.0126 Z M0.5957,0 L0.5056,0 Q0.5027,0,0.5005,0.0021 T0.4983,0.0063 L0.4983,0.0839 Q0.4983,0.0864,0.5007,0.0883 T0.5056,0.0902 L0.5957,0.0902 Q0.5986,0.0902,0.6008,0.0881 T0.603,0.0839 L0.603,0.0063 Q0.603,0.0038,0.6006,0.0019 T0.5957,0 Z M0.5884,0.0126 L0.5884,0.0776 L0.5129,0.0776 L0.5129,0.0126 L0.5884,0.0126 Z M0.5957,0 L0.5056,0 Q0.5027,0,0.5005,0.0021 T0.4983,0.0063 L0.4983,0.0839 Q0.4983,0.0864,0.5007,0.0883 T0.5056,0.0902 L0.5957,0.0902 Q0.5986,0.0902,0.6008,0.0881 T0.603,0.0839 L0.603,0.0063 Q0.603,0.0038,0.6006,0.0019 T0.5957,0 Z M0.0901,0.0084 L0.0901,0.0818 L0.0049,0.0818 L0.0049,0.0084 L0.0901,0.0084 Z M0.0925,0.0042 L0.0024,0.0042 Q0,0.0042,0,0.0063 L0,0.0839 Q0,0.086,0.0024,0.086 L0.0925,0.086 Q0.095,0.086,0.095,0.0839 L0.095,0.0063 Q0.095,0.0042,0.0925,0.0042 Z M0.0901,0.0084 L0.0901,0.0818 L0.0049,0.0818 L0.0049,0.0084 L0.0901,0.0084 Z M0.0925,0.0042 L0.0024,0.0042 Q0,0.0042,0,0.0063 L0,0.0839 Q0,0.086,0.0024,0.086 L0.0925,0.086 Q0.095,0.086,0.095,0.0839 L0.095,0.0063 Q0.095,0.0042,0.0925,0.0042 Z M0.0901,0.0084 L0.0901,0.0818 L0.0049,0.0818 L0.0049,0.0084 L0.0901,0.0084 Z M0.0925,0.0042 L0.0024,0.0042 Q0,0.0042,0,0.0063 L0,0.0839 Q0,0.086,0.0024,0.086 L0.0925,0.086 Q0.095,0.086,0.095,0.0839 L0.095,0.0063 Q0.095,0.0042,0.0925,0.0042 Z M0.34,0.0063 L0.2499,0.0063 L0.2499,0.0839 L0.34,0.0839 L0.34,0.0063 Z M0.34,0.0063 L0.2499,0.0063 L0.2499,0.0839 L0.34,0.0839 L0.34,0.0063 Z M0.34,0.0063 L0.2499,0.0063 L0.2499,0.0839 L0.34,0.0839 L0.34,0.0063 Z M0.4691,0.0063 L0.379,0.0063 L0.379,0.0839 L0.4691,0.0839 L0.4691,0.0063 Z M0.4691,0.0063 L0.379,0.0063 L0.379,0.0839 L0.4691,0.0839 L0.4691,0.0063 Z M0.4691,0.0063 L0.379,0.0063 L0.379,0.0839 L0.4691,0.0839 L0.4691,0.0063 Z M0.7311,0.0063 L0.641,0.0063 L0.641,0.0839 L0.7311,0.0839 L0.7311,0.0063 Z M0.7311,0.0063 L0.641,0.0063 L0.641,0.0839 L0.7311,0.0839 L0.7311,0.0063 Z M0.7311,0.0063 L0.641,0.0063 L0.641,0.0839 L0.7311,0.0839 L0.7311,0.0063 Z M0.8626,0.0063 L0.7725,0.0063 L0.7725,0.0839 L0.8626,0.0839 L0.8626,0.0063 Z M0.8626,0.0063 L0.7725,0.0063 L0.7725,0.0839 L0.8626,0.0839 L0.8626,0.0063 Z M0.8626,0.0063 L0.7725,0.0063 L0.7725,0.0839 L0.8626,0.0839 L0.8626,0.0063 Z M1,0.0063 L0.9099,0.0063 L0.9099,0.0839 L1,0.0839 L1,0.0063 Z M1,0.0063 L0.9099,0.0063 L0.9099,0.0839 L1,0.0839 L1,0.0063 Z M1,0.0063 L0.9099,0.0063 L0.9099,0.0839 L1,0.0839 L1,0.0063 Z M0.5913,0.9224 L0.5913,0.9958 L0.5061,0.9958 L0.5061,0.9224 L0.5913,0.9224 Z M0.5938,0.9182 L0.5037,0.9182 Q0.5012,0.9182,0.5012,0.9203 L0.5012,0.9979 Q0.5012,1,0.5037,1 L0.5938,1 Q0.5962,1,0.5962,0.9979 L0.5962,0.9203 Q0.5962,0.9182,0.5938,0.9182 Z M0.5913,0.9224 L0.5913,0.9958 L0.5061,0.9958 L0.5061,0.9224 L0.5913,0.9224 Z M0.5938,0.9182 L0.5037,0.9182 Q0.5012,0.9182,0.5012,0.9203 L0.5012,0.9979 Q0.5012,1,0.5037,1 L0.5938,1 Q0.5962,1,0.5962,0.9979 L0.5962,0.9203 Q0.5962,0.9182,0.5938,0.9182 Z M0.5913,0.9224 L0.5913,0.9958 L0.5061,0.9958 L0.5061,0.9224 L0.5913,0.9224 Z M0.5938,0.9182 L0.5037,0.9182 Q0.5012,0.9182,0.5012,0.9203 L0.5012,0.9979 Q0.5012,1,0.5037,1 L0.5938,1 Q0.5962,1,0.5962,0.9979 L0.5962,0.9203 Q0.5962,0.9182,0.5938,0.9182 Z M0.8626,0.9203 L0.7725,0.9203 L0.7725,0.9979 L0.8626,0.9979 L0.8626,0.9203 Z M0.8626,0.9203 L0.7725,0.9203 L0.7725,0.9979 L0.8626,0.9979 L0.8626,0.9203 Z M0.8626,0.9203 L0.7725,0.9203 L0.7725,0.9979 L0.8626,0.9979 L0.8626,0.9203 Z M1,0.9203 L0.9099,0.9203 L0.9099,0.9979 L1,0.9979 L1,0.9203 Z M1,0.9203 L0.9099,0.9203 L0.9099,0.9979 L1,0.9979 L1,0.9203 Z M1,0.9203 L0.9099,0.9203 L0.9099,0.9979 L1,0.9979 L1,0.9203 Z M0.0901,0.1158 L0.0901,0.1888 L0.0049,0.1888 L0.0049,0.1158 L0.0901,0.1158 Z M0.0925,0.1116 L0.0024,0.1116 Q0,0.1116,0,0.1137 L0,0.1909 Q0,0.193,0.0024,0.193 L0.0925,0.193 Q0.095,0.193,0.095,0.1909 L0.095,0.1137 Q0.095,0.1116,0.0925,0.1116 Z M0.2148,0.6086 L0.2148,0.682 L0.1296,0.682 L0.1296,0.6086 L0.2148,0.6086 Z M0.2172,0.6044 L0.1271,0.6044 Q0.1247,0.6044,0.1247,0.6065 L0.1247,0.6841 Q0.1247,0.6862,0.1271,0.6862 L0.2172,0.6862 Q0.2197,0.6862,0.2197,0.6841 L0.2197,0.6065 Q0.2197,0.6044,0.2172,0.6044 Z M0.34,0.1137 L0.2499,0.1137 L0.2499,0.1909 L0.34,0.1909 L0.34,0.1137 Z M0.3376,0.4102 L0.3376,0.4836 L0.2523,0.4836 L0.2523,0.4102 L0.3376,0.4102 Z M0.34,0.406 L0.2499,0.406 Q0.2474,0.406,0.2474,0.4081 L0.2474,0.4857 Q0.2474,0.4878,0.2499,0.4878 L0.34,0.4878 Q0.3424,0.4878,0.3424,0.4857 L0.3424,0.4081 Q0.3424,0.406,0.34,0.406 Z M0.3376,0.7131 L0.3376,0.7865 L0.2523,0.7865 L0.2523,0.7131 L0.3376,0.7131 Z M0.34,0.7089 L0.2499,0.7089 Q0.2474,0.7089,0.2474,0.711 L0.2474,0.7886 Q0.2474,0.7907,0.2499,0.7907 L0.34,0.7907 Q0.3424,0.7907,0.3424,0.7886 L0.3424,0.711 Q0.3424,0.7089,0.34,0.7089 Z M0.4593,0.2227 L0.4593,0.2836 L0.3887,0.2836 L0.3887,0.2227 L0.4593,0.2227 Z M0.4691,0.206 L0.379,0.206 Q0.3746,0.206,0.3719,0.2087 T0.3692,0.2143 L0.3692,0.2919 Q0.3692,0.2957,0.3724,0.298 T0.379,0.3003 L0.4691,0.3003 Q0.4735,0.3003,0.4761,0.2976 T0.4788,0.2919 L0.4788,0.2143 Q0.4788,0.211,0.4756,0.2085 T0.4691,0.206 Z M0.4593,0.3184 L0.4593,0.3792 L0.3887,0.3792 L0.3887,0.3184 L0.4593,0.3184 Z M0.4691,0.3016 L0.379,0.3016 Q0.3746,0.3016,0.3719,0.3043 T0.3692,0.31 L0.3692,0.3876 Q0.3692,0.3914,0.3724,0.3937 T0.379,0.396 L0.4691,0.396 Q0.4735,0.396,0.4761,0.3932 T0.4788,0.3876 L0.4788,0.31 Q0.4788,0.3062,0.4756,0.3039 T0.4691,0.3016 Z M0.4691,0.4081 L0.379,0.4081 L0.379,0.4857 L0.4691,0.4857 L0.4691,0.4081 Z M0.4691,0.5059 L0.379,0.5059 L0.379,0.5835 L0.4691,0.5835 L0.4691,0.5059 Z M0.4593,0.6149 L0.4593,0.6758 L0.3887,0.6758 L0.3887,0.6149 L0.4593,0.6149 Z M0.4691,0.5982 L0.379,0.5982 Q0.3746,0.5982,0.3719,0.6009 T0.3692,0.6065 L0.3692,0.6841 Q0.3692,0.6879,0.3724,0.6902 T0.379,0.6925 L0.4691,0.6925 Q0.4735,0.6925,0.4761,0.6898 T0.4788,0.6841 L0.4788,0.6065 Q0.4788,0.6028,0.4756,0.6005 T0.4691,0.5982 Z M0.5938,0.1137 L0.5037,0.1137 L0.5037,0.1909 L0.5938,0.1909 L0.5938,0.1137 Z M0.5938,0.2143 L0.5037,0.2143 L0.5037,0.2919 L0.5938,0.2919 L0.5938,0.2143 Z M0.5816,0.4186 L0.5816,0.4753 L0.5158,0.4753 L0.5158,0.4186 L0.5816,0.4186 Z M0.5938,0.3977 L0.5037,0.3977 Q0.4983,0.3977,0.4949,0.401 T0.4915,0.4081 L0.4915,0.4857 Q0.4915,0.4904,0.4954,0.4933 T0.5037,0.4962 L0.5938,0.4962 Q0.5991,0.4962,0.6025,0.4929 T0.6059,0.4857 L0.6059,0.4081 Q0.6059,0.4035,0.602,0.4006 T0.5938,0.3977 Z M0.5938,0.5059 L0.5037,0.5059 L0.5037,0.5835 L0.5938,0.5835 L0.5938,0.5059 Z M0.5913,0.7131 L0.5913,0.7865 L0.5061,0.7865 L0.5061,0.7131 L0.5913,0.7131 Z M0.5938,0.7089 L0.5037,0.7089 Q0.5012,0.7089,0.5012,0.711 L0.5012,0.7886 Q0.5012,0.7907,0.5037,0.7907 L0.5938,0.7907 Q0.5962,0.7907,0.5962,0.7886 L0.5962,0.711 Q0.5962,0.7089,0.5938,0.7089 Z M0.7311,0.1137 L0.641,0.1137 L0.641,0.1909 L0.7311,0.1909 L0.7311,0.1137 Z M0.7311,0.2143 L0.641,0.2143 L0.641,0.2919 L0.7311,0.2919 L0.7311,0.2143 Z M0.7311,0.8154 L0.641,0.8154 L0.641,0.8926 L0.7311,0.8926 L0.7311,0.8154 Z M0.7311,0.31 L0.641,0.31 L0.641,0.3876 L0.7311,0.3876 L0.7311,0.31 Z M0.7311,0.8154 L0.641,0.8154 L0.641,0.8926 L0.7311,0.8926 L0.7311,0.8154 Z M0.7311,0.4081 L0.641,0.4081 L0.641,0.4857 L0.7311,0.4857 L0.7311,0.4081 Z M0.7311,0.5059 L0.641,0.5059 L0.641,0.5835 L0.7311,0.5835 L0.7311,0.5059 Z M0.7311,0.711 L0.641,0.711 L0.641,0.7886 L0.7311,0.7886 L0.7311,0.711 Z M0.7311,0.8154 L0.641,0.8154 L0.641,0.8926 L0.7311,0.8926 L0.7311,0.8154 Z M0.8626,0.1137 L0.7725,0.1137 L0.7725,0.1909 L0.8626,0.1909 L0.8626,0.1137 Z M0.8626,0.2143 L0.7725,0.2143 L0.7725,0.2919 L0.8626,0.2919 L0.8626,0.2143 Z M0.8626,0.8154 L0.7725,0.8154 L0.7725,0.8926 L0.8626,0.8926 L0.8626,0.8154 Z M0.8626,0.31 L0.7725,0.31 L0.7725,0.3876 L0.8626,0.3876 L0.8626,0.31 Z M0.8626,0.8154 L0.7725,0.8154 L0.7725,0.8926 L0.8626,0.8926 L0.8626,0.8154 Z M0.8626,0.4081 L0.7725,0.4081 L0.7725,0.4857 L0.8626,0.4857 L0.8626,0.4081 Z M0.8626,0.5059 L0.7725,0.5059 L0.7725,0.5835 L0.8626,0.5835 L0.8626,0.5059 Z M0.8626,0.6065 L0.7725,0.6065 L0.7725,0.6841 L0.8626,0.6841 L0.8626,0.6065 Z M0.8626,0.711 L0.7725,0.711 L0.7725,0.7886 L0.8626,0.7886 L0.8626,0.711 Z M0.8626,0.8154 L0.7725,0.8154 L0.7725,0.8926 L0.8626,0.8926 L0.8626,0.8154 Z M1,0.1137 L0.9099,0.1137 L0.9099,0.1909 L1,0.1909 L1,0.1137 Z M1,0.2143 L0.9099,0.2143 L0.9099,0.2919 L1,0.2919 L1,0.2143 Z M1,0.8154 L0.9099,0.8154 L0.9099,0.8926 L1,0.8926 L1,0.8154 Z M1,0.31 L0.9099,0.31 L0.9099,0.3876 L1,0.3876 L1,0.31 Z M1,0.8154 L0.9099,0.8154 L0.9099,0.8926 L1,0.8926 L1,0.8154 Z M1,0.4081 L0.9099,0.4081 L0.9099,0.4857 L1,0.4857 L1,0.4081 Z M1,0.5059 L0.9099,0.5059 L0.9099,0.5835 L1,0.5835 L1,0.5059 Z M1,0.6065 L0.9099,0.6065 L0.9099,0.6841 L1,0.6841 L1,0.6065 Z M1,0.711 L0.9099,0.711 L0.9099,0.7886 L1,0.7886 L1,0.711 Z M1,0.8154 L0.9099,0.8154 L0.9099,0.8926 L1,0.8926 L1,0.8154 Z`,type:0}},"":{type:5,data:{d:`M0.6529,0.018 L0.6529,0.112 L0.7724,0.112 L0.7724,0.018 L0.6529,0.018 Z M0.6411,0 L0.7837,0 Q0.7873,0,0.7902,0.0015 T0.7943,0.005 T0.7956,0.0092 L0.7956,0.1208 Q0.7956,0.125,0.7917,0.1275 T0.7837,0.13 L0.6411,0.13 Q0.6359,0.13,0.6326,0.1271 T0.6292,0.1208 L0.6292,0.0092 Q0.6292,0.005,0.6331,0.0025 T0.6411,0 Z M0.6529,0.018 L0.6529,0.112 L0.7724,0.112 L0.7724,0.018 L0.6529,0.018 Z M0.6411,0 L0.7837,0 Q0.7873,0,0.7902,0.0015 T0.7943,0.005 T0.7956,0.0092 L0.7956,0.1208 Q0.7956,0.125,0.7917,0.1275 T0.7837,0.13 L0.6411,0.13 Q0.6359,0.13,0.6326,0.1271 T0.6292,0.1208 L0.6292,0.0092 Q0.6292,0.005,0.6331,0.0025 T0.6411,0 Z M0.6529,0.018 L0.6529,0.112 L0.7724,0.112 L0.7724,0.018 L0.6529,0.018 Z M0.6411,0 L0.7837,0 Q0.7873,0,0.7902,0.0015 T0.7943,0.005 T0.7956,0.0092 L0.7956,0.1208 Q0.7956,0.125,0.7917,0.1275 T0.7837,0.13 L0.6411,0.13 Q0.6359,0.13,0.6326,0.1271 T0.6292,0.1208 L0.6292,0.0092 Q0.6292,0.005,0.6331,0.0025 T0.6411,0 Z M0.4325,0.0143 L0.4325,0.1158 L0.5628,0.1158 L0.5628,0.0143 L0.4325,0.0143 Z M0.4264,0.0042 L0.5695,0.0042 Q0.5721,0.0042,0.5739,0.0057 T0.5757,0.0092 L0.5757,0.1208 Q0.5757,0.1221,0.5752,0.1231 T0.5736,0.1248 T0.5716,0.1256 T0.5695,0.1258 L0.4264,0.1258 Q0.4238,0.1258,0.422,0.1244 T0.4202,0.1208 L0.4202,0.0092 Q0.4202,0.008,0.4207,0.0069 T0.4222,0.0052 T0.4243,0.0044 T0.4264,0.0042 Z M0.4325,0.0143 L0.4325,0.1158 L0.5628,0.1158 L0.5628,0.0143 L0.4325,0.0143 Z M0.4264,0.0042 L0.5695,0.0042 Q0.5721,0.0042,0.5739,0.0057 T0.5757,0.0092 L0.5757,0.1208 Q0.5757,0.1221,0.5752,0.1231 T0.5736,0.1248 T0.5716,0.1256 T0.5695,0.1258 L0.4264,0.1258 Q0.4238,0.1258,0.422,0.1244 T0.4202,0.1208 L0.4202,0.0092 Q0.4202,0.008,0.4207,0.0069 T0.4222,0.0052 T0.4243,0.0044 T0.4264,0.0042 Z M0.4325,0.0143 L0.4325,0.1158 L0.5628,0.1158 L0.5628,0.0143 L0.4325,0.0143 Z M0.4264,0.0042 L0.5695,0.0042 Q0.5721,0.0042,0.5739,0.0057 T0.5757,0.0092 L0.5757,0.1208 Q0.5757,0.1221,0.5752,0.1231 T0.5736,0.1248 T0.5716,0.1256 T0.5695,0.1258 L0.4264,0.1258 Q0.4238,0.1258,0.422,0.1244 T0.4202,0.1208 L0.4202,0.0092 Q0.4202,0.008,0.4207,0.0069 T0.4222,0.0052 T0.4243,0.0044 T0.4264,0.0042 Z M0.2178,0.0092 L0.3605,0.0092 L0.3605,0.1208 L0.2178,0.1208 L0.2178,0.0092 Z M0.2178,0.0092 L0.3605,0.0092 L0.3605,0.1208 L0.2178,0.1208 L0.2178,0.0092 Z M0.2178,0.0092 L0.3605,0.0092 L0.3605,0.1208 L0.2178,0.1208 L0.2178,0.0092 Z M0,0.0092 L0.1432,0.0092 L0.1432,0.1208 L0,0.1208 L0,0.0092 Z M0,0.0092 L0.1432,0.0092 L0.1432,0.1208 L0,0.1208 L0,0.0092 Z M0,0.0092 L0.1432,0.0092 L0.1432,0.1208 L0,0.1208 L0,0.0092 Z M0.8574,0.3217 L0.8574,0.4098 L0.9691,0.4098 L0.9691,0.3217 L0.8574,0.3217 Z M0.8419,0.2978 L0.9846,0.2978 Q0.9892,0.2978,0.9928,0.2997 T0.9982,0.3043 T1,0.31 L1,0.4216 Q1,0.427,0.9951,0.4304 T0.9846,0.4337 L0.8419,0.4337 Q0.8352,0.4337,0.8308,0.4299 T0.8265,0.4216 L0.8265,0.31 Q0.8265,0.3062,0.829,0.3035 T0.835,0.2993 T0.8419,0.2978 Z M0.8574,0.888 L0.8574,0.9757 L0.9691,0.9757 L0.9691,0.888 L0.8574,0.888 Z M0.8419,0.8637 L0.9846,0.8637 Q0.9892,0.8637,0.9928,0.8658 T0.9982,0.8706 T1,0.8758 L1,0.9878 Q1,0.9929,0.9951,0.9964 T0.9846,1 L0.8419,1 Q0.8352,1,0.8308,0.996 T0.8265,0.9878 L0.8265,0.8758 Q0.8265,0.8708,0.8314,0.8672 T0.8419,0.8637 Z M0.6509,0.169 L0.6509,0.2706 L0.7806,0.2706 L0.7806,0.169 L0.6509,0.169 Z M0.6442,0.159 L0.7868,0.159 Q0.7899,0.159,0.7917,0.1604 T0.7935,0.164 L0.7935,0.2756 Q0.7935,0.2781,0.7915,0.2796 T0.7868,0.281 L0.6442,0.281 Q0.6416,0.281,0.6395,0.2794 T0.6375,0.2756 L0.6375,0.164 Q0.6375,0.1619,0.6398,0.1604 T0.6442,0.159 Z M0.6632,0.6044 L0.6632,0.6858 L0.7678,0.6858 L0.7678,0.6044 L0.6632,0.6044 Z M0.6442,0.5742 L0.7868,0.5742 Q0.7951,0.5742,0.8007,0.5791 T0.8064,0.5893 L0.8064,0.7013 Q0.8064,0.7076,0.8002,0.712 T0.7868,0.7164 L0.6442,0.7164 Q0.6359,0.7164,0.6305,0.7114 T0.6251,0.7013 L0.6251,0.5893 Q0.6251,0.5847,0.6282,0.5812 T0.6357,0.5759 T0.6442,0.5742 Z M0.4264,0.164 L0.5695,0.164 L0.5695,0.2756 L0.4264,0.2756 L0.4264,0.164 Z M0.4325,0.315 L0.4325,0.4165 L0.5628,0.4165 L0.5628,0.315 L0.4325,0.315 Z M0.4264,0.3049 L0.5695,0.3049 Q0.5721,0.3049,0.5739,0.3064 T0.5757,0.31 L0.5757,0.4216 Q0.5757,0.4237,0.5736,0.4251 T0.5695,0.4266 L0.4264,0.4266 Q0.4238,0.4266,0.422,0.4251 T0.4202,0.4216 L0.4202,0.31 Q0.4202,0.3087,0.4207,0.3077 T0.4222,0.306 T0.4243,0.3052 T0.4264,0.3049 Z M0.4264,0.4476 L0.5695,0.4476 L0.5695,0.5596 L0.4264,0.5596 L0.4264,0.4476 Z M0.4392,0.7408 L0.4392,0.8326 L0.5561,0.8326 L0.5561,0.7408 L0.4392,0.7408 Z M0.4264,0.7206 L0.5695,0.7206 Q0.5747,0.7206,0.5783,0.724 T0.5819,0.7307 L0.5819,0.8427 Q0.5819,0.8469,0.5778,0.8498 T0.5695,0.8528 L0.4264,0.8528 Q0.4207,0.8528,0.4171,0.8496 T0.4135,0.8427 L0.4135,0.7307 Q0.4135,0.7265,0.4176,0.7236 T0.4264,0.7206 Z M0.2178,0.164 L0.3605,0.164 L0.3605,0.2756 L0.2178,0.2756 L0.2178,0.164 Z M0.2178,0.31 L0.3605,0.31 L0.3605,0.4216 L0.2178,0.4216 L0.2178,0.31 Z M0.2178,0.5893 L0.3605,0.5893 L0.3605,0.7013 L0.2178,0.7013 L0.2178,0.5893 Z M0.2178,0.7307 L0.3605,0.7307 L0.3605,0.8427 L0.2178,0.8427 L0.2178,0.7307 Z M0.2178,0.8758 L0.3605,0.8758 L0.3605,0.9878 L0.2178,0.9878 L0.2178,0.8758 Z M0,0.164 L0.1432,0.164 L0.1432,0.2756 L0,0.2756 L0,0.164 Z M0,0.31 L0.1432,0.31 L0.1432,0.4216 L0,0.4216 L0,0.31 Z M0,0.4476 L0.1432,0.4476 L0.1432,0.5596 L0,0.5596 L0,0.4476 Z M0,0.5893 L0.1432,0.5893 L0.1432,0.7013 L0,0.7013 L0,0.5893 Z M0,0.7307 L0.1432,0.7307 L0.1432,0.8427 L0,0.8427 L0,0.7307 Z M0,0.8758 L0.1432,0.8758 L0.1432,0.9878 L0,0.9878 L0,0.8758 Z`,type:0}},"":{type:5,data:{d:`M0.3476,0.018 L0.3476,0.112 L0.2276,0.112 L0.2276,0.018 L0.3476,0.018 Z M0.3594,0 L0.2163,0 Q0.2132,0,0.2104,0.0015 T0.2062,0.005 T0.2049,0.0092 L0.2049,0.1208 Q0.2049,0.1237,0.2067,0.1258 T0.2111,0.129 T0.2163,0.13 L0.3594,0.13 Q0.3641,0.13,0.3674,0.1271 T0.3708,0.1208 L0.3708,0.0092 Q0.3708,0.005,0.3669,0.0025 T0.3594,0 Z M0.3476,0.018 L0.3476,0.112 L0.2276,0.112 L0.2276,0.018 L0.3476,0.018 Z M0.3594,0 L0.2163,0 Q0.2132,0,0.2104,0.0015 T0.2062,0.005 T0.2049,0.0092 L0.2049,0.1208 Q0.2049,0.1237,0.2067,0.1258 T0.2111,0.129 T0.2163,0.13 L0.3594,0.13 Q0.3641,0.13,0.3674,0.1271 T0.3708,0.1208 L0.3708,0.0092 Q0.3708,0.005,0.3669,0.0025 T0.3594,0 Z M0.3476,0.018 L0.3476,0.112 L0.2276,0.112 L0.2276,0.018 L0.3476,0.018 Z M0.3594,0 L0.2163,0 Q0.2132,0,0.2104,0.0015 T0.2062,0.005 T0.2049,0.0092 L0.2049,0.1208 Q0.2049,0.1237,0.2067,0.1258 T0.2111,0.129 T0.2163,0.13 L0.3594,0.13 Q0.3641,0.13,0.3674,0.1271 T0.3708,0.1208 L0.3708,0.0092 Q0.3708,0.005,0.3669,0.0025 T0.3594,0 Z M0.5675,0.0143 L0.5675,0.1158 L0.4377,0.1158 L0.4377,0.0143 L0.5675,0.0143 Z M0.5736,0.0042 L0.431,0.0042 Q0.4284,0.0042,0.4264,0.0057 T0.4243,0.0092 L0.4243,0.1208 Q0.4243,0.1221,0.4251,0.1231 T0.4269,0.1248 T0.4289,0.1256 T0.431,0.1258 L0.5736,0.1258 Q0.5767,0.1258,0.5785,0.1244 T0.5803,0.1208 L0.5803,0.0092 Q0.5803,0.008,0.5798,0.0069 T0.5783,0.0052 T0.5762,0.0044 T0.5736,0.0042 Z M0.5675,0.0143 L0.5675,0.1158 L0.4377,0.1158 L0.4377,0.0143 L0.5675,0.0143 Z M0.5736,0.0042 L0.431,0.0042 Q0.4284,0.0042,0.4264,0.0057 T0.4243,0.0092 L0.4243,0.1208 Q0.4243,0.1221,0.4251,0.1231 T0.4269,0.1248 T0.4289,0.1256 T0.431,0.1258 L0.5736,0.1258 Q0.5767,0.1258,0.5785,0.1244 T0.5803,0.1208 L0.5803,0.0092 Q0.5803,0.008,0.5798,0.0069 T0.5783,0.0052 T0.5762,0.0044 T0.5736,0.0042 Z M0.5675,0.0143 L0.5675,0.1158 L0.4377,0.1158 L0.4377,0.0143 L0.5675,0.0143 Z M0.5736,0.0042 L0.431,0.0042 Q0.4284,0.0042,0.4264,0.0057 T0.4243,0.0092 L0.4243,0.1208 Q0.4243,0.1221,0.4251,0.1231 T0.4269,0.1248 T0.4289,0.1256 T0.431,0.1258 L0.5736,0.1258 Q0.5767,0.1258,0.5785,0.1244 T0.5803,0.1208 L0.5803,0.0092 Q0.5803,0.008,0.5798,0.0069 T0.5783,0.0052 T0.5762,0.0044 T0.5736,0.0042 Z M0.7827,0.0092 L0.6395,0.0092 L0.6395,0.1208 L0.7827,0.1208 L0.7827,0.0092 Z M0.7827,0.0092 L0.6395,0.0092 L0.6395,0.1208 L0.7827,0.1208 L0.7827,0.0092 Z M0.7827,0.0092 L0.6395,0.0092 L0.6395,0.1208 L0.7827,0.1208 L0.7827,0.0092 Z M1,0.0092 L0.8574,0.0092 L0.8574,0.1208 L1,0.1208 L1,0.0092 Z M1,0.0092 L0.8574,0.0092 L0.8574,0.1208 L1,0.1208 L1,0.0092 Z M1,0.0092 L0.8574,0.0092 L0.8574,0.1208 L1,0.1208 L1,0.0092 Z M0.1432,0.3217 L0.1432,0.4098 L0.0309,0.4098 L0.0309,0.3217 L0.1432,0.3217 Z M0.1586,0.2978 L0.0154,0.2978 Q0.0088,0.2978,0.0044,0.3016 T0,0.31 L0,0.4216 Q0,0.427,0.0049,0.4304 T0.0154,0.4337 L0.1586,0.4337 Q0.1648,0.4337,0.1694,0.4299 T0.174,0.4216 L0.174,0.31 Q0.174,0.3062,0.1715,0.3035 T0.1653,0.2993 T0.1586,0.2978 Z M0.1432,0.888 L0.1432,0.9757 L0.0309,0.9757 L0.0309,0.888 L0.1432,0.888 Z M0.1586,0.8637 L0.0154,0.8637 Q0.0108,0.8637,0.0072,0.8658 T0.0018,0.8706 T0,0.8758 L0,0.9878 Q0,0.9929,0.0049,0.9964 T0.0154,1 L0.1586,1 Q0.1648,1,0.1694,0.996 T0.174,0.9878 L0.174,0.8758 Q0.174,0.8725,0.1715,0.8695 T0.1653,0.8651 T0.1586,0.8637 Z M0.3496,0.169 L0.3496,0.2706 L0.2194,0.2706 L0.2194,0.169 L0.3496,0.169 Z M0.3563,0.159 L0.2132,0.159 Q0.2106,0.159,0.2088,0.1604 T0.207,0.164 L0.207,0.2756 Q0.207,0.2781,0.2091,0.2796 T0.2132,0.281 L0.3563,0.281 Q0.3589,0.281,0.3607,0.2794 T0.3625,0.2756 L0.3625,0.164 Q0.3625,0.1619,0.3605,0.1604 T0.3563,0.159 Z M0.3368,0.6044 L0.3368,0.6858 L0.2327,0.6858 L0.2327,0.6044 L0.3368,0.6044 Z M0.3563,0.5742 L0.2132,0.5742 Q0.2049,0.5742,0.1993,0.5791 T0.1936,0.5893 L0.1936,0.7013 Q0.1936,0.7076,0.2001,0.712 T0.2132,0.7164 L0.3563,0.7164 Q0.3641,0.7164,0.3697,0.7114 T0.3754,0.7013 L0.3754,0.5893 Q0.3754,0.5847,0.3723,0.5812 T0.3648,0.5759 T0.3563,0.5742 Z M0.5736,0.164 L0.431,0.164 L0.431,0.2756 L0.5736,0.2756 L0.5736,0.164 Z M0.5675,0.315 L0.5675,0.4165 L0.4377,0.4165 L0.4377,0.315 L0.5675,0.315 Z M0.5736,0.3049 L0.431,0.3049 Q0.4284,0.3049,0.4264,0.3064 T0.4243,0.31 L0.4243,0.4216 Q0.4243,0.4237,0.4266,0.4251 T0.431,0.4266 L0.5736,0.4266 Q0.5767,0.4266,0.5785,0.4251 T0.5803,0.4216 L0.5803,0.31 Q0.5803,0.3087,0.5798,0.3077 T0.5783,0.306 T0.5762,0.3052 T0.5736,0.3049 Z M0.5736,0.4476 L0.431,0.4476 L0.431,0.5596 L0.5736,0.5596 L0.5736,0.4476 Z M0.5613,0.7408 L0.5613,0.8326 L0.4439,0.8326 L0.4439,0.7408 L0.5613,0.7408 Z M0.5736,0.7206 L0.431,0.7206 Q0.4253,0.7206,0.4217,0.724 T0.4181,0.7307 L0.4181,0.8427 Q0.4181,0.8469,0.4222,0.8498 T0.431,0.8528 L0.5736,0.8528 Q0.5778,0.8528,0.5808,0.8511 T0.5855,0.8471 T0.587,0.8427 L0.587,0.7307 Q0.587,0.7265,0.5826,0.7236 T0.5736,0.7206 Z M0.7827,0.164 L0.6395,0.164 L0.6395,0.2756 L0.7827,0.2756 L0.7827,0.164 Z M0.7827,0.31 L0.6395,0.31 L0.6395,0.4216 L0.7827,0.4216 L0.7827,0.31 Z M0.7827,0.5893 L0.6395,0.5893 L0.6395,0.7013 L0.7827,0.7013 L0.7827,0.5893 Z M0.7827,0.7307 L0.6395,0.7307 L0.6395,0.8427 L0.7827,0.8427 L0.7827,0.7307 Z M0.7827,0.8758 L0.6395,0.8758 L0.6395,0.9878 L0.7827,0.9878 L0.7827,0.8758 Z M1,0.164 L0.8574,0.164 L0.8574,0.2756 L1,0.2756 L1,0.164 Z M1,0.31 L0.8574,0.31 L0.8574,0.4216 L1,0.4216 L1,0.31 Z M1,0.4476 L0.8574,0.4476 L0.8574,0.5596 L1,0.5596 L1,0.4476 Z M1,0.5893 L0.8574,0.5893 L0.8574,0.7013 L1,0.7013 L1,0.5893 Z M1,0.7307 L0.8574,0.7307 L0.8574,0.8427 L1,0.8427 L1,0.7307 Z M1,0.8758 L0.8574,0.8758 L0.8574,0.9878 L1,0.9878 L1,0.8758 Z`,type:0}},"":{type:5,data:{d:`M0.0008,0.9979 Q0.0008,1,0.0032,1 Q0.0482,1,0.0602,0.9975 Q0.0667,0.9963,0.0847,0.9917 T0.1084,0.9859 Q0.1124,0.9851,0.1221,0.9851 L0.1253,0.9851 L0.1285,0.9851 Q0.1518,0.9851,0.1655,0.9809 Q0.1695,0.9801,0.1731,0.9788 T0.1791,0.9766 T0.1839,0.9747 T0.1888,0.9732 L0.1936,0.972 T0.1988,0.9712 T0.2048,0.971 L0.2096,0.971 Q0.2201,0.9714,0.2233,0.9714 T0.2345,0.9693 Q0.2386,0.9685,0.2502,0.9674 T0.2715,0.966 L0.2811,0.9656 Q0.2916,0.9647,0.2916,0.9573 Q0.2916,0.954,0.2892,0.9515 T0.2819,0.9486 Q0.2755,0.9482,0.2683,0.9482 Q0.2643,0.9482,0.2582,0.9484 T0.2498,0.9486 Q0.2426,0.9486,0.2402,0.9473 Q0.2386,0.9469,0.2317,0.943 T0.2161,0.937 Q0.2104,0.9357,0.1992,0.933 T0.1831,0.9291 Q0.1807,0.9287,0.1783,0.9285 T0.1739,0.928 T0.1703,0.9276 T0.1675,0.9272 T0.1655,0.9266 T0.1639,0.9253 Q0.1598,0.9216,0.1462,0.9216 L0.143,0.9216 L0.1398,0.9216 L0.1365,0.9216 Q0.1197,0.9195,0.1197,0.9154 L0.1197,0.9154 Q0.1205,0.9121,0.1373,0.9088 T0.1703,0.9054 Q0.1791,0.9054,0.1863,0.904 T0.1984,0.9011 T0.2064,0.8992 Q0.2402,0.8967,0.2506,0.8934 Q0.2538,0.8926,0.2602,0.8899 T0.2707,0.8872 Q0.2715,0.8872,0.2731,0.8876 Q0.2795,0.8884,0.2884,0.8884 Q0.3068,0.8884,0.3092,0.8826 L0.3092,0.8797 Q0.3092,0.8772,0.3076,0.8747 T0.3044,0.8706 T0.3028,0.8681 Q0.3076,0.8656,0.3237,0.8656 Q0.3317,0.8656,0.3622,0.8623 Q0.3655,0.8623,0.3867,0.8617 T0.4217,0.8602 Q0.4241,0.8598,0.4289,0.8598 L0.4345,0.8598 L0.441,0.8598 Q0.4578,0.8598,0.4667,0.8586 Q0.4739,0.8573,0.4851,0.8567 T0.5004,0.8552 Q0.5012,0.8552,0.5108,0.855 T0.5269,0.853 T0.5333,0.8461 Q0.5333,0.8445,0.5325,0.8432 T0.5309,0.8409 T0.5289,0.8391 T0.5261,0.8378 L0.5229,0.837 T0.5185,0.8362 T0.5133,0.8355 T0.5076,0.8349 T0.502,0.8341 Q0.4932,0.8324,0.4859,0.8324 Q0.4827,0.8324,0.4787,0.8328 T0.4731,0.8333 Q0.4707,0.8333,0.4683,0.8324 Q0.4482,0.825,0.4394,0.825 Q0.4369,0.825,0.4345,0.8254 Q0.4225,0.827,0.4153,0.827 Q0.4088,0.827,0.4064,0.8258 Q0.3976,0.8204,0.3751,0.8204 Q0.3703,0.8204,0.3667,0.8214 T0.3622,0.8225 Q0.3598,0.8225,0.3558,0.82 Q0.351,0.8175,0.3402,0.8167 T0.3177,0.8156 T0.3028,0.8146 L0.2956,0.8121 T0.2871,0.8094 T0.2771,0.8073 T0.2635,0.8063 Q0.261,0.8063,0.2586,0.8067 Q0.2378,0.8071,0.2273,0.8071 Q0.2072,0.8071,0.2024,0.8051 Q0.1976,0.8034,0.1932,0.8026 T0.1867,0.8013 T0.1847,0.8001 L0.1847,0.7993 Q0.1855,0.7984,0.1855,0.7978 T0.1859,0.7966 T0.1867,0.7959 T0.188,0.7955 T0.1896,0.7951 T0.1916,0.7949 T0.1944,0.7945 T0.1984,0.7941 T0.2032,0.7939 Q0.212,0.7926,0.2325,0.7918 T0.2562,0.7905 Q0.2691,0.7893,0.2787,0.7847 Q0.2835,0.7827,0.2968,0.7791 T0.3149,0.7756 Q0.3189,0.7756,0.3305,0.7733 T0.3446,0.771 L0.3454,0.771 Q0.3462,0.771,0.3498,0.7721 T0.3574,0.774 T0.3655,0.7748 Q0.3703,0.7748,0.3743,0.7731 T0.3823,0.7708 T0.3916,0.77 T0.3992,0.7694 Q0.4008,0.7694,0.4076,0.7688 T0.4205,0.7675 L0.4305,0.7665 Q0.4345,0.7657,0.4402,0.7617 T0.4458,0.7545 Q0.4458,0.7503,0.4353,0.7487 Q0.4297,0.7478,0.4209,0.7462 T0.4044,0.7433 T0.3904,0.7416 L0.3847,0.7416 Q0.3807,0.7416,0.3747,0.7422 T0.3663,0.7428 T0.3606,0.7424 Q0.3582,0.742,0.3562,0.7418 T0.3522,0.7412 T0.3482,0.7406 T0.3446,0.7401 T0.341,0.7397 T0.3373,0.7393 T0.3341,0.7391 L0.3293,0.7391 Q0.3277,0.7395,0.3253,0.7395 Q0.3205,0.7395,0.3052,0.7387 T0.2835,0.7379 Q0.2755,0.7379,0.253,0.7325 Q0.2506,0.7316,0.2462,0.731 T0.2382,0.7296 T0.2305,0.7271 T0.2181,0.7234 T0.2048,0.7196 T0.2,0.7155 Q0.2,0.7142,0.2016,0.713 Q0.208,0.7059,0.2285,0.6978 T0.2618,0.6898 Q0.2739,0.6898,0.2831,0.6848 T0.2956,0.6794 Q0.3028,0.6786,0.3289,0.6765 T0.3566,0.674 Q0.3582,0.674,0.3855,0.6723 T0.4406,0.6688 T0.4755,0.6653 Q0.5004,0.6607,0.5124,0.6599 L0.5165,0.6599 Q0.5213,0.6599,0.5277,0.6605 T0.5373,0.6611 Q0.543,0.6611,0.5494,0.6599 Q0.592,0.6524,0.6,0.6524 Q0.6064,0.6524,0.61,0.6499 T0.6161,0.6474 Q0.6177,0.6474,0.6261,0.6495 T0.6418,0.6516 L0.6482,0.6516 Q0.653,0.6512,0.6651,0.6506 T0.6876,0.6493 T0.7084,0.6477 T0.7229,0.645 Q0.7269,0.6437,0.7333,0.6437 Q0.7373,0.6437,0.7458,0.6443 T0.7574,0.645 Q0.7614,0.645,0.7631,0.6445 T0.7655,0.6441 Q0.7671,0.6441,0.7723,0.6448 T0.7823,0.6454 Q0.788,0.6454,0.7952,0.6445 Q0.8233,0.6408,0.8723,0.6367 Q0.9012,0.6342,0.9092,0.6342 L0.9165,0.6342 L0.9205,0.6342 Q0.9277,0.6342,0.9382,0.6323 T0.9526,0.6304 Q0.9534,0.6304,0.9594,0.6307 T0.9695,0.6309 Q0.9976,0.6309,0.9992,0.6234 Q1,0.6201,1,0.618 Q1,0.6089,0.9775,0.608 Q0.9703,0.6076,0.9582,0.6076 Q0.9518,0.6076,0.9394,0.6078 T0.9213,0.608 Q0.9036,0.608,0.8972,0.6072 Q0.894,0.6068,0.8871,0.6058 T0.8751,0.6039 T0.8627,0.6024 T0.8506,0.6018 L0.8474,0.6018 Q0.841,0.6022,0.8281,0.6041 T0.8112,0.606 Q0.8096,0.606,0.808,0.6056 Q0.7783,0.6002,0.7647,0.6002 Q0.7598,0.6002,0.7454,0.6006 T0.7261,0.601 Q0.7221,0.601,0.7145,0.6022 T0.7036,0.6035 Q0.6996,0.6035,0.6964,0.6022 Q0.6723,0.5902,0.6442,0.5902 Q0.6426,0.5902,0.6386,0.5904 T0.6337,0.5906 Q0.6273,0.5906,0.6249,0.5894 L0.6177,0.5856 T0.6116,0.5838 T0.6016,0.5825 T0.5855,0.5823 Q0.5719,0.5823,0.5574,0.5798 T0.5373,0.5774 L0.5341,0.5774 Q0.5293,0.5778,0.5213,0.5786 T0.51,0.5794 Q0.5036,0.5794,0.4988,0.5769 Q0.4932,0.574,0.4771,0.574 Q0.4723,0.574,0.4631,0.5745 T0.4498,0.5749 Q0.4418,0.5749,0.4394,0.5736 Q0.4353,0.5724,0.4305,0.5715 T0.4225,0.5707 T0.4145,0.5705 T0.4056,0.5699 Q0.4008,0.5691,0.398,0.5689 T0.394,0.5689 T0.3908,0.5686 T0.3855,0.5674 Q0.3831,0.567,0.3811,0.5662 T0.3779,0.5645 T0.3743,0.563 T0.3695,0.5624 Q0.3655,0.5624,0.3594,0.5635 T0.3494,0.5645 T0.3406,0.5635 T0.3325,0.5624 Q0.3309,0.5624,0.3301,0.5628 L0.3141,0.5628 Q0.2635,0.5628,0.2506,0.5612 Q0.2474,0.5608,0.2434,0.5608 Q0.2402,0.5608,0.2349,0.561 T0.2273,0.5612 Q0.2209,0.5612,0.2177,0.5595 Q0.2145,0.557,0.2145,0.5558 Q0.2169,0.5537,0.2345,0.5521 Q0.2876,0.5475,0.3028,0.5425 Q0.3068,0.5413,0.3149,0.5396 T0.3309,0.5367 T0.3478,0.5338 T0.3606,0.5309 Q0.3631,0.5305,0.3755,0.5259 T0.3968,0.5214 Q0.3992,0.5214,0.4024,0.5218 T0.4096,0.5222 Q0.4161,0.5222,0.4213,0.5209 T0.4313,0.5185 T0.4402,0.5172 Q0.4418,0.5168,0.447,0.5168 L0.4558,0.5168 T0.4639,0.5162 T0.4707,0.5141 T0.4731,0.5102 Q0.4731,0.5089,0.4723,0.5081 Q0.4699,0.5019,0.4627,0.4994 T0.4369,0.4965 Q0.4273,0.4961,0.4193,0.4946 T0.4048,0.4915 T0.3952,0.4894 Q0.392,0.4886,0.388,0.4886 Q0.3847,0.4886,0.3775,0.4892 T0.3647,0.4898 Q0.3598,0.4898,0.355,0.4894 Q0.3165,0.4861,0.3141,0.4853 Q0.2779,0.4774,0.2715,0.4774 Q0.2699,0.4774,0.2683,0.4776 T0.2627,0.4778 Q0.2498,0.4778,0.2281,0.4762 Q0.2241,0.4749,0.2233,0.4737 Q0.2249,0.472,0.2321,0.4708 Q0.2402,0.4695,0.2554,0.4695 L0.2675,0.4695 L0.2795,0.4695 Q0.294,0.4695,0.2996,0.4679 Q0.3141,0.4629,0.3373,0.4616 Q0.3414,0.4612,0.3466,0.4606 T0.3582,0.4589 T0.3687,0.4562 T0.3727,0.4525 Q0.3727,0.4509,0.3703,0.4492 Q0.3639,0.4455,0.3474,0.4419 T0.3213,0.4384 L0.3157,0.4384 L0.31,0.4384 Q0.294,0.4384,0.2859,0.4363 Q0.2795,0.4347,0.2691,0.4347 L0.2618,0.4347 L0.2546,0.4347 Q0.2458,0.4347,0.2394,0.4338 Q0.2257,0.4318,0.2193,0.4303 T0.2092,0.4266 T0.2052,0.4224 T0.2024,0.4154 T0.196,0.4052 Q0.1912,0.3994,0.1867,0.3949 T0.1807,0.3884 T0.1791,0.3849 Q0.1791,0.3824,0.1839,0.3745 Q0.1871,0.3687,0.1944,0.3637 T0.2072,0.3561 T0.2221,0.3501 T0.2321,0.3463 Q0.2353,0.3455,0.241,0.3445 T0.2522,0.3428 T0.2639,0.3411 T0.2731,0.3384 T0.2956,0.3351 T0.3197,0.3326 Q0.3213,0.3322,0.3237,0.3322 T0.3325,0.3331 T0.3414,0.3339 Q0.3478,0.3339,0.3518,0.3314 Q0.3606,0.3264,0.3703,0.3264 Q0.3775,0.3264,0.3847,0.3293 Q0.3888,0.331,0.396,0.331 Q0.4024,0.331,0.4116,0.3295 T0.4265,0.3266 T0.4414,0.3227 T0.4514,0.3202 Q0.4578,0.3181,0.4839,0.3152 T0.5112,0.3123 T0.5177,0.3119 T0.5285,0.3111 T0.5398,0.3096 T0.549,0.3065 T0.5526,0.3015 Q0.5526,0.2999,0.5518,0.2982 Q0.547,0.2903,0.5386,0.2883 T0.5165,0.2862 Q0.5116,0.2862,0.5056,0.2866 T0.4972,0.287 Q0.4884,0.287,0.4787,0.2833 Q0.4594,0.2758,0.4265,0.2758 Q0.4169,0.2758,0.4129,0.2766 Q0.4112,0.2771,0.4104,0.2771 Q0.4088,0.2771,0.4056,0.2748 T0.3968,0.2721 Q0.3695,0.2696,0.359,0.2659 Q0.355,0.2646,0.351,0.2646 T0.3426,0.2661 T0.3365,0.2675 T0.3333,0.2659 Q0.3277,0.2605,0.3116,0.2553 T0.2859,0.2501 L0.2843,0.2501 L0.2819,0.2501 Q0.2779,0.2501,0.2723,0.2493 T0.2586,0.2472 T0.2474,0.2455 Q0.1799,0.236,0.1719,0.236 Q0.1663,0.236,0.1606,0.235 T0.1502,0.2316 T0.1454,0.2265 Q0.1454,0.2223,0.1558,0.2173 Q0.1679,0.2115,0.1859,0.2092 T0.2185,0.207 T0.2353,0.2057 Q0.2369,0.2049,0.2502,0.2041 T0.2799,0.2022 T0.302,0.2007 Q0.3084,0.1999,0.3245,0.1954 T0.347,0.1908 Q0.3502,0.1908,0.3534,0.1916 Q0.3663,0.197,0.388,0.197 Q0.404,0.197,0.4088,0.1929 Q0.4096,0.192,0.4108,0.192 T0.4177,0.1945 T0.4277,0.197 T0.4369,0.1949 Q0.4442,0.1908,0.4843,0.1875 Q0.4892,0.1871,0.4968,0.1839 T0.5084,0.1808 L0.5108,0.1808 Q0.5213,0.1825,0.5454,0.1825 Q0.5823,0.1825,0.5992,0.1779 Q0.6096,0.1746,0.6217,0.1746 Q0.6249,0.1746,0.6309,0.1748 T0.6394,0.175 Q0.6434,0.175,0.6466,0.1746 Q0.6474,0.1746,0.6594,0.1738 T0.6787,0.1713 T0.6892,0.1659 Q0.6924,0.1634,0.6924,0.1593 Q0.6924,0.1547,0.6888,0.151 T0.6795,0.1472 Q0.6779,0.1472,0.6763,0.1477 Q0.6699,0.1493,0.6667,0.1493 Q0.661,0.1493,0.6506,0.1456 Q0.6329,0.1394,0.6129,0.1394 Q0.6048,0.1394,0.5992,0.1377 T0.5888,0.136 T0.5803,0.1377 T0.5751,0.1394 Q0.5711,0.1394,0.5639,0.1369 Q0.5365,0.1273,0.5116,0.1273 Q0.4876,0.1273,0.4667,0.1253 Q0.4627,0.1248,0.4542,0.1211 T0.4337,0.1174 L0.4305,0.1174 Q0.4217,0.1178,0.4153,0.119 T0.408,0.1203 Q0.4056,0.1203,0.4,0.117 Q0.3976,0.1153,0.396,0.1136 T0.3932,0.1112 T0.39,0.1099 T0.3847,0.1095 Q0.3799,0.1095,0.3687,0.1103 Q0.355,0.1112,0.3434,0.1141 T0.3301,0.117 Q0.3261,0.117,0.3229,0.1145 Q0.3181,0.1116,0.3052,0.1087 T0.2787,0.1043 T0.2546,0.1029 Q0.2506,0.1029,0.2474,0.1033 Q0.2418,0.1037,0.2349,0.1054 T0.2249,0.107 Q0.2225,0.107,0.2193,0.1066 Q0.2024,0.1024,0.1863,0.1024 Q0.1823,0.1024,0.1562,0.0971 T0.1269,0.0917 T0.1161,0.0896 T0.106,0.0854 Q0.1076,0.0846,0.11,0.0842 Q0.1173,0.0821,0.1261,0.0821 Q0.1301,0.0821,0.1369,0.0825 T0.1462,0.083 Q0.1494,0.083,0.151,0.0825 T0.1831,0.0813 T0.2201,0.0784 T0.243,0.074 T0.2667,0.0718 Q0.2707,0.0718,0.2755,0.0724 T0.2843,0.073 T0.2936,0.0724 T0.3024,0.0705 T0.3072,0.068 T0.3092,0.0657 T0.3108,0.0647 Q0.3116,0.0643,0.3133,0.0643 L0.3157,0.0643 L0.3181,0.0643 Q0.3446,0.0643,0.3446,0.0556 T0.3205,0.0469 L0.3189,0.0469 Q0.3157,0.0469,0.3157,0.0465 Q0.3084,0.0427,0.2835,0.0386 Q0.2739,0.0369,0.2675,0.0342 T0.2538,0.0299 Q0.249,0.029,0.245,0.029 T0.2378,0.0303 T0.2321,0.0315 Q0.2305,0.0315,0.2273,0.0307 Q0.2201,0.0286,0.2004,0.0272 T0.1775,0.0245 Q0.1735,0.0228,0.1663,0.0226 T0.1522,0.0197 T0.1345,0.0145 T0.1124,0.0079 Q0.0996,0.0033,0.0671,0.0044 T0.0297,0.0041 Q0.0169,0,0.0024,0.0017 Q0,0.0021,0,0.0037 Z M0.0064,0.9954 L0.0056,0.0058 Q0.0177,0.005,0.0281,0.0083 Q0.0345,0.01,0.0675,0.0089 T0.1108,0.012 Q0.1221,0.0162,0.1329,0.0187 T0.1498,0.0236 T0.1606,0.0268 T0.1691,0.0274 T0.1759,0.0286 Q0.1807,0.0303,0.2,0.0315 T0.2257,0.0348 Q0.2305,0.0361,0.2337,0.0361 Q0.2361,0.0361,0.2398,0.0348 T0.2466,0.0336 Q0.249,0.0336,0.2522,0.034 Q0.2586,0.0353,0.2655,0.0382 T0.2827,0.0427 Q0.3068,0.0469,0.3124,0.0502 Q0.3157,0.0523,0.3237,0.0523 L0.3277,0.0523 L0.3309,0.0523 Q0.3398,0.0523,0.3398,0.0556 Q0.3398,0.0581,0.3341,0.0587 T0.3205,0.0593 T0.3092,0.0603 T0.3036,0.0643 T0.2932,0.068 Q0.2884,0.0684,0.2843,0.0684 Q0.2811,0.0684,0.2763,0.0678 T0.2667,0.0672 Q0.2586,0.0672,0.2422,0.0697 T0.2177,0.0747 Q0.2137,0.0759,0.1831,0.0767 T0.1494,0.0784 L0.1474,0.0784 T0.1398,0.078 T0.1285,0.0776 Q0.1173,0.0776,0.1084,0.08 Q0.1004,0.0817,0.1004,0.0846 Q0.1004,0.0867,0.104,0.0888 T0.1124,0.0923 T0.1213,0.0948 T0.1269,0.0958 T0.155,0.1014 T0.1863,0.107 Q0.2016,0.107,0.2185,0.1107 Q0.2217,0.1116,0.2257,0.1116 Q0.2289,0.1116,0.2365,0.1099 T0.2482,0.1074 L0.2538,0.1074 Q0.2683,0.1074,0.2912,0.1107 T0.3197,0.1182 Q0.3245,0.1215,0.3301,0.1215 Q0.3333,0.1215,0.3454,0.1184 T0.3687,0.1145 Q0.3735,0.1141,0.3779,0.1139 T0.3843,0.1134 T0.3871,0.1132 Q0.3896,0.1132,0.39,0.1136 T0.392,0.1161 T0.3968,0.1203 Q0.404,0.1248,0.408,0.1248 Q0.4096,0.1248,0.4165,0.1234 T0.4305,0.1215 L0.4337,0.1215 Q0.4442,0.1215,0.4518,0.1251 T0.4659,0.1294 Q0.4876,0.1319,0.5116,0.1319 T0.5622,0.141 Q0.5703,0.1439,0.5751,0.1439 Q0.5791,0.1439,0.5831,0.1423 T0.5888,0.1406 Q0.592,0.1406,0.5944,0.1412 T0.6012,0.1427 T0.6129,0.1435 Q0.6313,0.1435,0.649,0.1497 Q0.6602,0.1535,0.6667,0.1535 Q0.6715,0.1535,0.6779,0.1522 Q0.6787,0.1518,0.6795,0.1518 Q0.6827,0.1518,0.6847,0.1541 T0.6867,0.1593 Q0.6867,0.1618,0.6851,0.1634 Q0.6835,0.1655,0.6775,0.1667 T0.6598,0.169 T0.6458,0.1705 T0.6402,0.1709 Q0.6378,0.1709,0.6321,0.1705 T0.6225,0.1701 Q0.6096,0.1701,0.5968,0.1738 Q0.5823,0.1779,0.5446,0.1779 Q0.5205,0.1779,0.5116,0.1767 Q0.51,0.1763,0.5084,0.1763 Q0.5028,0.1763,0.4944,0.1796 T0.4835,0.1829 L0.4771,0.1833 T0.4659,0.1844 L0.4546,0.1858 T0.443,0.1881 T0.4337,0.1912 Q0.4321,0.1916,0.4305,0.1916 Q0.4273,0.1916,0.4209,0.1895 T0.412,0.1875 Q0.408,0.1875,0.4056,0.19 Q0.4024,0.1925,0.388,0.1925 Q0.3663,0.1925,0.3558,0.1879 Q0.3518,0.1862,0.3462,0.1862 Q0.3373,0.1862,0.3213,0.191 T0.3012,0.1962 Q0.2964,0.1966,0.2799,0.1976 T0.2494,0.1997 T0.2313,0.2024 L0.2313,0.2024 L0.2293,0.2024 L0.2261,0.2024 L0.2217,0.2024 Q0.204,0.2024,0.1851,0.2047 T0.1526,0.2136 Q0.1406,0.2198,0.1406,0.226 Q0.1406,0.2319,0.1518,0.2362 T0.1719,0.2406 Q0.1791,0.2406,0.2466,0.2497 Q0.2498,0.2501,0.2574,0.2516 T0.2711,0.2538 T0.2819,0.2547 L0.2851,0.2547 Q0.2851,0.2543,0.2859,0.2543 Q0.294,0.2543,0.3096,0.2592 T0.3285,0.2684 Q0.3317,0.2721,0.3373,0.2721 Q0.3406,0.2721,0.3462,0.2708 T0.3542,0.2696 Q0.3558,0.2696,0.3574,0.27 Q0.3679,0.2737,0.3968,0.2762 Q0.3984,0.2766,0.4004,0.2779 L0.4044,0.2804 T0.4096,0.2816 Q0.412,0.2816,0.4145,0.2808 Q0.4177,0.2804,0.4249,0.2804 Q0.4586,0.2804,0.4763,0.287 Q0.4867,0.2912,0.4972,0.2912 Q0.5004,0.2912,0.5064,0.2908 T0.5165,0.2903 Q0.5293,0.2903,0.5361,0.2922 T0.547,0.3003 L0.547,0.3011 Q0.547,0.3036,0.5414,0.3049 T0.5249,0.3067 T0.51,0.3082 Q0.5092,0.3082,0.4831,0.3111 T0.4498,0.3161 Q0.408,0.3264,0.3952,0.3264 Q0.3896,0.3264,0.3863,0.3252 Q0.3783,0.3223,0.3703,0.3223 Q0.359,0.3223,0.3494,0.3277 Q0.347,0.3293,0.343,0.3293 Q0.3414,0.3293,0.3353,0.3285 T0.3253,0.3277 T0.3181,0.3285 Q0.3149,0.3289,0.2952,0.3306 T0.2699,0.3347 Q0.2675,0.3364,0.2598,0.3372 T0.2434,0.3395 T0.2297,0.3426 L0.2205,0.3461 T0.2048,0.3523 T0.1908,0.3606 T0.1791,0.3725 Q0.1743,0.3803,0.1743,0.3845 Q0.1743,0.3874,0.1763,0.3901 T0.1827,0.3976 T0.1912,0.4073 T0.198,0.4189 T0.2032,0.4276 T0.2137,0.4326 T0.2386,0.438 Q0.2458,0.4392,0.2562,0.4392 L0.2639,0.4392 L0.2699,0.4392 Q0.2795,0.4392,0.2843,0.4405 Q0.2932,0.443,0.3092,0.443 L0.3157,0.443 L0.3213,0.443 Q0.3293,0.443,0.3458,0.4463 T0.3671,0.4525 Q0.3598,0.4558,0.3373,0.4571 Q0.3124,0.4587,0.298,0.4637 Q0.294,0.465,0.2811,0.465 L0.2703,0.465 L0.2586,0.465 Q0.241,0.465,0.2305,0.4666 Q0.2185,0.4687,0.2185,0.4728 Q0.2185,0.4745,0.2205,0.4764 T0.2241,0.4791 L0.2265,0.4803 L0.2273,0.4803 Q0.2506,0.4824,0.261,0.4824 Q0.2675,0.4824,0.2699,0.482 Q0.2699,0.4815,0.2707,0.4815 Q0.2771,0.4815,0.3124,0.4898 Q0.3173,0.4907,0.3229,0.4913 T0.3386,0.4925 T0.3542,0.4936 T0.3663,0.494 Q0.3711,0.494,0.3787,0.4936 T0.3888,0.4932 Q0.392,0.4932,0.3944,0.4936 T0.4032,0.4959 T0.4181,0.499 T0.4369,0.5006 Q0.449,0.501,0.455,0.5021 T0.4639,0.5048 T0.4675,0.5093 L0.4675,0.5097 Q0.4675,0.5106,0.4663,0.511 T0.4622,0.5116 L0.4566,0.512 T0.4486,0.5124 T0.4402,0.5127 Q0.4345,0.5131,0.4257,0.5153 T0.4096,0.5176 Q0.4064,0.5176,0.4024,0.5172 L0.3968,0.5172 Q0.3863,0.5172,0.3731,0.522 T0.359,0.5268 Q0.355,0.528,0.3317,0.5321 T0.3004,0.5388 Q0.2867,0.5433,0.2337,0.5479 Q0.2096,0.55,0.2096,0.5562 Q0.2096,0.5591,0.2145,0.5628 Q0.2193,0.5662,0.2289,0.5662 Q0.2313,0.5662,0.2373,0.5657 T0.2458,0.5653 L0.2498,0.5653 Q0.2635,0.5674,0.3124,0.5674 Q0.3261,0.5674,0.3301,0.567 L0.3317,0.567 Q0.3341,0.567,0.3394,0.568 T0.3486,0.5691 Q0.3542,0.5691,0.3606,0.5678 T0.3699,0.5666 T0.3759,0.5686 T0.3839,0.5718 T0.3908,0.573 T0.3964,0.5734 T0.4048,0.5742 T0.4165,0.5751 T0.4277,0.5757 T0.4369,0.5778 Q0.4426,0.5794,0.4538,0.5794 Q0.4586,0.5794,0.4679,0.5792 T0.4811,0.579 Q0.4924,0.579,0.4956,0.5807 Q0.502,0.584,0.5108,0.584 L0.5137,0.584 T0.5173,0.5838 L0.5205,0.5834 L0.5237,0.583 L0.5269,0.5825 T0.5305,0.5821 T0.5341,0.5819 L0.5365,0.5819 Q0.5414,0.5819,0.5562,0.5842 T0.5855,0.5865 Q0.5912,0.5865,0.5948,0.5867 T0.6012,0.5869 T0.6064,0.5873 T0.61,0.5877 T0.6133,0.5886 T0.6157,0.5896 L0.6185,0.591 T0.6217,0.5931 Q0.6265,0.5952,0.6369,0.5952 L0.6418,0.5952 L0.6466,0.5952 Q0.6723,0.5952,0.6932,0.606 Q0.698,0.608,0.7044,0.608 Q0.7084,0.608,0.7161,0.6068 T0.7261,0.6056 Q0.7309,0.6056,0.7454,0.6051 T0.7647,0.6047 Q0.7775,0.6047,0.8072,0.6101 Q0.8096,0.6105,0.812,0.6105 Q0.8177,0.6105,0.8297,0.6085 T0.8474,0.606 L0.8506,0.606 Q0.8562,0.606,0.8647,0.607 T0.8831,0.6095 T0.8964,0.6118 Q0.9036,0.6122,0.9221,0.6122 L0.9406,0.6122 L0.959,0.6122 L0.9767,0.6122 Q0.9952,0.613,0.9952,0.6172 Q0.9952,0.6176,0.9944,0.6221 Q0.9936,0.6259,0.9574,0.6259 L0.955,0.6259 L0.9526,0.6259 Q0.9478,0.6259,0.9373,0.628 T0.9205,0.63 L0.9173,0.63 Q0.9133,0.6296,0.9084,0.6296 Q0.9004,0.6296,0.8715,0.6321 Q0.8233,0.6367,0.7944,0.64 Q0.7888,0.6408,0.7839,0.6408 T0.7739,0.6402 T0.7671,0.6396 Q0.7639,0.6396,0.7622,0.64 Q0.7614,0.6404,0.759,0.6404 Q0.7574,0.6404,0.749,0.6398 T0.7357,0.6392 Q0.7261,0.6392,0.7213,0.6412 Q0.7173,0.6425,0.7032,0.6437 T0.6711,0.6458 T0.6474,0.647 Q0.645,0.6474,0.6418,0.6474 Q0.6353,0.6474,0.6277,0.6454 T0.6161,0.6433 Q0.6104,0.6433,0.6072,0.6456 T0.6,0.6479 Q0.5912,0.6479,0.5486,0.6557 Q0.5422,0.657,0.5373,0.657 Q0.5349,0.657,0.5289,0.6564 T0.5173,0.6557 L0.5124,0.6557 Q0.4996,0.6562,0.4739,0.6611 Q0.4675,0.6624,0.4398,0.6645 T0.3851,0.668 T0.3558,0.6698 Q0.355,0.6698,0.3285,0.6721 T0.2948,0.6752 Q0.2892,0.6761,0.2843,0.6786 T0.2747,0.6831 T0.2618,0.6852 Q0.253,0.6852,0.2394,0.6893 T0.2141,0.6993 T0.1968,0.7105 Q0.1944,0.713,0.1944,0.7155 Q0.1944,0.7196,0.2012,0.7229 T0.2177,0.7285 T0.2281,0.7308 Q0.2321,0.7329,0.2365,0.7339 T0.245,0.7356 T0.2514,0.7366 Q0.2522,0.737,0.2554,0.7379 T0.2614,0.7393 T0.2679,0.7406 T0.2755,0.7416 T0.2835,0.742 Q0.29,0.742,0.3048,0.7428 T0.3253,0.7437 L0.3301,0.7437 L0.3333,0.7437 Q0.3341,0.7437,0.3598,0.7466 Q0.3639,0.7474,0.3671,0.7474 T0.3759,0.7466 T0.3855,0.7457 Q0.388,0.7457,0.3904,0.7462 Q0.3984,0.7466,0.4137,0.7495 T0.4349,0.7532 T0.441,0.7557 Q0.441,0.7599,0.4289,0.7619 Q0.4257,0.7628,0.4197,0.7634 T0.4072,0.7644 T0.3984,0.7652 Q0.3968,0.7652,0.3912,0.7655 T0.3811,0.7665 T0.3719,0.7694 Q0.3695,0.7702,0.3655,0.7702 T0.3546,0.7686 T0.3462,0.7665 L0.3446,0.7665 Q0.3406,0.7665,0.3293,0.769 T0.3149,0.7715 Q0.3084,0.7715,0.2952,0.7748 T0.2763,0.781 Q0.2675,0.7847,0.2554,0.7864 Q0.253,0.7864,0.2325,0.7874 T0.2024,0.7893 Q0.2008,0.7893,0.1984,0.7897 T0.1948,0.7901 T0.1916,0.7903 T0.1888,0.7908 T0.1867,0.7914 T0.1847,0.7922 L0.1831,0.793 T0.1819,0.7943 L0.1811,0.7959 T0.1799,0.7976 Q0.1791,0.7993,0.1791,0.8001 Q0.1791,0.8034,0.1831,0.8051 T0.1932,0.8078 T0.2,0.8092 Q0.2072,0.8117,0.2257,0.8117 Q0.2337,0.8117,0.2586,0.8109 L0.2635,0.8109 Q0.2707,0.8109,0.2767,0.8117 T0.2859,0.8136 T0.2936,0.8163 T0.3012,0.8187 Q0.3068,0.82,0.3277,0.8206 T0.3526,0.8237 Q0.3582,0.8266,0.3622,0.8266 Q0.3647,0.8266,0.3687,0.8258 T0.3751,0.825 Q0.396,0.825,0.404,0.8291 Q0.408,0.8316,0.4161,0.8316 Q0.4217,0.8316,0.4353,0.8295 L0.4394,0.8295 Q0.4466,0.8295,0.4659,0.8366 Q0.4699,0.8378,0.4747,0.8378 Q0.4763,0.8378,0.4807,0.8374 T0.4884,0.837 Q0.494,0.837,0.5004,0.8382 Q0.5052,0.8391,0.5124,0.8399 Q0.5221,0.8411,0.5249,0.8422 T0.5277,0.8461 Q0.5277,0.8482,0.5233,0.849 T0.5112,0.8501 T0.4996,0.8511 Q0.4964,0.8519,0.4851,0.8523 T0.4659,0.8544 Q0.4578,0.8557,0.4402,0.8557 L0.4349,0.8557 L0.4297,0.8557 L0.4209,0.8557 Q0.408,0.8565,0.3867,0.8571 T0.3614,0.8582 Q0.3317,0.8611,0.3237,0.8611 L0.3225,0.8611 L0.3213,0.8611 Q0.2972,0.8611,0.2972,0.8681 Q0.2972,0.8714,0.3008,0.8747 T0.3044,0.8805 Q0.3044,0.881,0.3036,0.8814 Q0.3012,0.8839,0.2851,0.8839 Q0.2779,0.8839,0.2739,0.883 Q0.2723,0.8826,0.2699,0.8826 T0.2643,0.8835 T0.259,0.8853 T0.2542,0.8876 T0.249,0.8893 Q0.2386,0.8922,0.2056,0.8946 Q0.2016,0.8951,0.1916,0.898 T0.1703,0.9009 Q0.1518,0.9009,0.1337,0.9044 T0.1149,0.9146 L0.1149,0.9158 Q0.1149,0.9175,0.1157,0.9187 T0.1173,0.921 T0.1201,0.9226 T0.1233,0.9237 T0.1269,0.9245 L0.1305,0.9251 T0.1337,0.9255 L0.1357,0.9258 Q0.139,0.9262,0.1446,0.9262 T0.1542,0.9266 T0.1598,0.9282 Q0.1614,0.9303,0.1647,0.9314 T0.1739,0.9328 T0.1815,0.9336 Q0.1863,0.9345,0.1976,0.9372 T0.2145,0.9415 Q0.2225,0.9432,0.2285,0.9467 T0.2378,0.9515 Q0.2426,0.9531,0.2514,0.9531 Q0.2538,0.9531,0.2602,0.9529 T0.2707,0.9527 Q0.2763,0.9527,0.2815,0.9531 T0.2867,0.9569 T0.2811,0.9614 Q0.2434,0.9627,0.2329,0.9652 Q0.2249,0.9672,0.2241,0.9672 L0.2096,0.9668 L0.2056,0.9668 Q0.2,0.9668,0.196,0.9672 T0.1884,0.9687 T0.1815,0.9708 T0.1731,0.9737 T0.1639,0.9772 Q0.1518,0.9805,0.1285,0.9805 L0.1253,0.9805 Q0.1124,0.9805,0.1076,0.9818 Q0.1012,0.983,0.0831,0.9876 T0.0594,0.9934 Q0.049,0.9954,0.0064,0.9954 Z M0.0032,0.9979 L0.0024,0.0037 Q0.0161,0.0021,0.0289,0.0062 Q0.0337,0.0075,0.0671,0.0066 T0.1116,0.01 T0.1337,0.0166 T0.151,0.022 Q0.1582,0.0249,0.1659,0.0251 T0.1767,0.0265 Q0.1807,0.0278,0.2,0.0292 T0.2265,0.0328 Q0.2305,0.034,0.2329,0.034 T0.239,0.0326 T0.2458,0.0311 T0.253,0.0319 Q0.2578,0.0332,0.2614,0.0342 T0.2667,0.0363 T0.2723,0.0384 T0.2827,0.0406 Q0.3084,0.0448,0.3141,0.0485 Q0.3149,0.0494,0.3225,0.0494 T0.3361,0.0504 T0.3422,0.0554 T0.3357,0.0606 T0.3205,0.0618 T0.31,0.0626 Q0.3092,0.0626,0.3056,0.0659 T0.2932,0.0701 Q0.2884,0.0709,0.2843,0.0709 Q0.2811,0.0709,0.2759,0.0701 T0.2667,0.0693 Q0.2586,0.0693,0.2422,0.0718 T0.2193,0.0763 Q0.2137,0.0784,0.1831,0.079 T0.1502,0.0805 Q0.1494,0.0809,0.147,0.0809 Q0.1454,0.0809,0.1386,0.0803 T0.1277,0.0796 Q0.1173,0.0796,0.1092,0.0821 Q0.1036,0.0834,0.1036,0.0854 Q0.1036,0.0879,0.1129,0.0908 T0.1269,0.0937 Q0.1293,0.0937,0.1558,0.0991 T0.1863,0.1045 Q0.2016,0.1045,0.2193,0.1087 Q0.2225,0.1091,0.2249,0.1091 Q0.2289,0.1091,0.2357,0.1076 T0.2482,0.1054 Q0.2506,0.1049,0.2546,0.1049 Q0.2699,0.1049,0.2924,0.1085 T0.3213,0.1165 Q0.3253,0.119,0.3301,0.119 Q0.3325,0.119,0.3446,0.1161 T0.3687,0.1124 Q0.3831,0.1112,0.3863,0.1112 T0.3908,0.1118 T0.3936,0.1145 T0.3984,0.1186 Q0.4048,0.1228,0.408,0.1228 Q0.4096,0.1228,0.4161,0.1213 T0.4305,0.1195 L0.4337,0.1195 Q0.4426,0.1195,0.4474,0.1211 T0.4566,0.1246 T0.4667,0.1273 Q0.4876,0.1298,0.5116,0.1298 Q0.5365,0.1298,0.5631,0.1389 Q0.5703,0.1414,0.5751,0.1414 Q0.5783,0.1414,0.5819,0.1398 T0.5888,0.1381 Q0.5928,0.1381,0.5984,0.1398 T0.6129,0.1414 Q0.6321,0.1414,0.6498,0.1477 Q0.661,0.1514,0.6667,0.1514 Q0.6707,0.1514,0.6771,0.1501 Q0.6787,0.1497,0.6795,0.1497 Q0.6835,0.1497,0.6863,0.1526 T0.6892,0.1593 Q0.6892,0.1626,0.6876,0.1647 Q0.6851,0.1672,0.6799,0.1686 T0.6695,0.1705 T0.6566,0.1715 T0.6458,0.1725 Q0.6434,0.173,0.6402,0.173 Q0.6378,0.173,0.6317,0.1727 T0.6225,0.1725 Q0.6096,0.1725,0.5984,0.1759 Q0.5823,0.1804,0.5454,0.1804 Q0.5205,0.1804,0.5116,0.1788 L0.5084,0.1788 Q0.5036,0.1788,0.4956,0.1819 T0.4843,0.185 Q0.4434,0.1887,0.4353,0.1929 Q0.4321,0.1945,0.4289,0.1945 T0.4197,0.1922 T0.4112,0.19 T0.4072,0.1912 Q0.4032,0.1949,0.388,0.1949 Q0.3663,0.1949,0.3542,0.19 Q0.351,0.1883,0.3462,0.1883 Q0.3406,0.1883,0.3321,0.1906 T0.3153,0.1954 T0.302,0.1983 Q0.2972,0.1991,0.2859,0.1997 T0.2643,0.201 T0.245,0.2024 T0.2337,0.2041 Q0.2321,0.2045,0.2181,0.2045 T0.1851,0.207 T0.1542,0.2157 Q0.143,0.2211,0.143,0.226 Q0.143,0.2314,0.153,0.2348 T0.1719,0.2381 Q0.1791,0.2381,0.2474,0.2476 Q0.2506,0.248,0.2558,0.2489 T0.2651,0.2505 T0.2739,0.252 T0.2819,0.2526 Q0.2835,0.2526,0.2851,0.2522 L0.2859,0.2522 Q0.2948,0.2522,0.3104,0.2574 T0.3309,0.2671 Q0.3333,0.2696,0.3365,0.2696 Q0.339,0.2696,0.3442,0.2684 T0.3526,0.2671 T0.3582,0.2679 Q0.3687,0.2717,0.3968,0.2742 Q0.4,0.2746,0.4036,0.2771 T0.4096,0.2796 Q0.4112,0.2796,0.4137,0.2787 Q0.4169,0.2779,0.4257,0.2779 Q0.4594,0.2779,0.4779,0.2849 Q0.4876,0.2891,0.4972,0.2891 Q0.4996,0.2891,0.506,0.2887 T0.5165,0.2883 Q0.5253,0.2883,0.5305,0.2889 T0.541,0.292 T0.5494,0.299 L0.5494,0.3015 Q0.5494,0.3036,0.5466,0.3051 T0.5386,0.3073 T0.5285,0.3086 T0.5181,0.3094 T0.5108,0.3102 Q0.5068,0.3107,0.494,0.3121 L0.4683,0.315 T0.4506,0.3181 Q0.449,0.3181,0.4426,0.32 T0.4313,0.3229 T0.4197,0.3256 T0.4064,0.3281 T0.3952,0.3289 Q0.3888,0.3289,0.3855,0.3273 Q0.3783,0.3243,0.3703,0.3243 Q0.3598,0.3243,0.351,0.3297 Q0.3478,0.3314,0.3422,0.3314 Q0.3398,0.3314,0.3337,0.3306 T0.3245,0.3297 T0.3189,0.3306 Q0.3149,0.3314,0.2956,0.3328 T0.2715,0.3368 Q0.2691,0.338,0.2635,0.3391 T0.2522,0.3407 T0.2406,0.3424 T0.2313,0.3447 Q0.2305,0.3447,0.2213,0.348 T0.206,0.354 T0.1924,0.3621 T0.1815,0.3733 Q0.1767,0.3816,0.1767,0.3849 Q0.1767,0.387,0.1783,0.3893 T0.1847,0.3961 T0.1936,0.4063 T0.2004,0.4181 T0.2052,0.4264 T0.2145,0.4309 T0.2386,0.4359 Q0.2458,0.4372,0.2554,0.4372 Q0.2578,0.4372,0.2627,0.437 T0.2699,0.4367 Q0.2795,0.4367,0.2851,0.4384 Q0.294,0.4409,0.3092,0.4409 Q0.3116,0.4409,0.3157,0.4407 T0.3213,0.4405 Q0.3301,0.4405,0.3466,0.444 T0.3687,0.4509 Q0.3703,0.4517,0.3703,0.4525 Q0.3703,0.4575,0.3373,0.4596 Q0.3133,0.4608,0.2988,0.4658 Q0.294,0.4674,0.2803,0.4674 Q0.2763,0.4674,0.2687,0.4672 T0.257,0.467 Q0.2402,0.467,0.2313,0.4687 Q0.2209,0.4708,0.2209,0.4737 Q0.2209,0.4741,0.2213,0.4749 T0.2229,0.4764 L0.2249,0.4774 T0.2265,0.4778 L0.2273,0.4782 Q0.2498,0.4803,0.2618,0.4803 Q0.2667,0.4803,0.2691,0.4799 Q0.2699,0.4795,0.2715,0.4795 Q0.2779,0.4795,0.3133,0.4873 Q0.3181,0.4886,0.3233,0.4892 T0.3386,0.4905 T0.3542,0.4915 T0.3655,0.4919 Q0.3703,0.4919,0.3779,0.4915 T0.3888,0.4911 T0.3952,0.4915 Q0.3976,0.4919,0.4008,0.4927 L0.4072,0.4944 T0.4149,0.4961 T0.4249,0.4975 T0.4369,0.4985 Q0.449,0.499,0.4554,0.5 T0.4651,0.5031 T0.4699,0.5085 Q0.4707,0.5093,0.4707,0.5097 Q0.4707,0.5114,0.4687,0.5124 T0.4631,0.5139 T0.4562,0.5145 T0.4478,0.5147 L0.4402,0.5147 Q0.4353,0.5151,0.4265,0.5174 T0.4096,0.5197 L0.4024,0.5197 Q0.4,0.5193,0.3968,0.5193 Q0.3896,0.5193,0.3831,0.5209 T0.3703,0.5253 T0.3598,0.5288 Q0.3558,0.5301,0.3321,0.5342 T0.302,0.5409 Q0.2876,0.5454,0.2337,0.55 Q0.2112,0.5521,0.2112,0.5558 Q0.2112,0.5574,0.2161,0.5612 Q0.2201,0.5637,0.2281,0.5637 Q0.2305,0.5637,0.2361,0.5633 T0.2442,0.5628 Q0.2474,0.5628,0.2498,0.5633 Q0.2635,0.5653,0.3133,0.5653 Q0.3261,0.5653,0.3301,0.5649 L0.3325,0.5649 Q0.3349,0.5649,0.3402,0.5657 T0.3494,0.5666 Q0.3542,0.5666,0.3598,0.5657 Q0.3663,0.5645,0.3695,0.5645 Q0.3735,0.5645,0.3775,0.5666 T0.3847,0.5695 Q0.3888,0.5707,0.3912,0.5709 T0.3968,0.5711 T0.4048,0.572 Q0.4096,0.5724,0.4165,0.5726 T0.4281,0.5734 T0.4378,0.5757 Q0.4418,0.5774,0.4522,0.5774 Q0.4562,0.5774,0.4655,0.5769 T0.4795,0.5765 Q0.4932,0.5765,0.4972,0.579 Q0.5028,0.5819,0.51,0.5819 Q0.5141,0.5819,0.5221,0.5809 T0.5341,0.5798 L0.5373,0.5798 Q0.5422,0.5798,0.557,0.5821 T0.5855,0.5844 L0.5936,0.5844 L0.5992,0.5844 T0.604,0.5848 T0.6076,0.5852 T0.6108,0.5859 T0.6137,0.5865 T0.6161,0.5873 T0.6181,0.5881 T0.6209,0.5896 L0.6233,0.591 Q0.6265,0.5927,0.6353,0.5927 L0.6402,0.5927 L0.645,0.5927 Q0.6723,0.5927,0.6948,0.6039 Q0.6988,0.606,0.7036,0.606 Q0.7076,0.606,0.7153,0.6045 T0.7261,0.6031 Q0.7309,0.6031,0.7454,0.6027 T0.7647,0.6022 Q0.7783,0.6022,0.808,0.608 L0.812,0.608 Q0.8169,0.608,0.8293,0.6062 T0.8474,0.6039 L0.8506,0.6039 Q0.857,0.6039,0.8655,0.6049 T0.8835,0.6074 T0.8972,0.6093 Q0.9036,0.6101,0.9213,0.6101 L0.9398,0.6101 L0.959,0.6101 L0.9767,0.6101 Q0.9976,0.6109,0.9976,0.6176 Q0.9976,0.6188,0.9968,0.6226 Q0.9952,0.6284,0.9671,0.6284 L0.959,0.6284 L0.9526,0.6284 Q0.9486,0.6284,0.9382,0.6302 T0.9205,0.6321 L0.9173,0.6321 Q0.9133,0.6317,0.9092,0.6317 Q0.9012,0.6317,0.8715,0.6346 Q0.8233,0.6387,0.7944,0.6421 Q0.7888,0.6429,0.7831,0.6429 Q0.7783,0.6429,0.7731,0.6425 T0.7663,0.6421 L0.7622,0.6421 Q0.7614,0.6425,0.7586,0.6425 T0.7474,0.6421 T0.7349,0.6416 Q0.7261,0.6416,0.7221,0.6429 Q0.7173,0.645,0.7032,0.646 T0.6711,0.6479 T0.6482,0.6491 Q0.645,0.6495,0.6418,0.6495 Q0.6353,0.6495,0.6273,0.6474 T0.6161,0.6454 Q0.612,0.6454,0.6088,0.6477 T0.6,0.6499 Q0.5912,0.6499,0.5494,0.6578 Q0.5422,0.6591,0.5373,0.6591 Q0.5341,0.6591,0.5281,0.6584 T0.5173,0.6578 L0.5124,0.6578 Q0.5004,0.6582,0.4747,0.6632 Q0.4675,0.6649,0.4398,0.6667 T0.3851,0.6703 T0.3566,0.6719 Q0.3534,0.6723,0.3406,0.6734 T0.3141,0.6757 T0.2948,0.6773 Q0.2908,0.6781,0.2819,0.6829 T0.2618,0.6877 Q0.2482,0.6877,0.2273,0.6958 T0.1992,0.7117 Q0.1976,0.7138,0.1976,0.7155 Q0.1976,0.7188,0.2032,0.7213 T0.2181,0.7258 T0.2289,0.7292 Q0.2337,0.7308,0.2378,0.7316 L0.2458,0.7333 T0.2522,0.7345 Q0.2747,0.7399,0.2835,0.7399 Q0.29,0.7399,0.3048,0.7408 T0.3253,0.7416 Q0.3277,0.7416,0.3297,0.7414 T0.3341,0.7412 L0.3598,0.7445 Q0.3639,0.7449,0.3663,0.7449 Q0.3695,0.7449,0.3751,0.7443 T0.3855,0.7437 L0.3904,0.7437 Q0.3984,0.7441,0.4141,0.7472 T0.4353,0.7507 Q0.4434,0.752,0.4434,0.7553 Q0.4434,0.7578,0.439,0.7605 T0.4297,0.764 Q0.4257,0.7648,0.4201,0.7655 T0.4076,0.7665 T0.3984,0.7673 Q0.3968,0.7673,0.3912,0.7677 T0.3815,0.7688 T0.3735,0.771 T0.3655,0.7727 Q0.3606,0.7727,0.3534,0.7708 T0.3458,0.769 L0.3446,0.769 Q0.3414,0.769,0.3297,0.7713 T0.3149,0.7735 Q0.3092,0.7735,0.296,0.7771 T0.2771,0.7831 Q0.2683,0.7872,0.2554,0.7885 Q0.253,0.7889,0.2325,0.7897 T0.2032,0.7914 Q0.2008,0.7918,0.198,0.792 T0.194,0.7924 T0.1912,0.7928 T0.1888,0.793 T0.1867,0.7934 T0.1851,0.7943 T0.1843,0.7953 T0.1835,0.7968 T0.1823,0.7984 T0.1815,0.8001 Q0.1815,0.8022,0.1847,0.8032 T0.1932,0.8053 T0.2008,0.8071 Q0.2072,0.8092,0.2265,0.8092 Q0.2361,0.8092,0.2586,0.8088 L0.2635,0.8088 Q0.2731,0.8088,0.2795,0.8098 T0.2928,0.8134 T0.302,0.8167 Q0.306,0.8179,0.3277,0.8183 T0.3542,0.8221 Q0.359,0.8246,0.3622,0.8246 Q0.3639,0.8246,0.3675,0.8237 T0.3751,0.8229 Q0.3968,0.8229,0.4048,0.8275 Q0.4088,0.8291,0.4161,0.8291 Q0.4225,0.8291,0.4353,0.8275 Q0.4369,0.827,0.4394,0.827 Q0.4474,0.827,0.4675,0.8345 Q0.4707,0.8358,0.4739,0.8358 Q0.4755,0.8358,0.4799,0.8353 T0.4876,0.8349 Q0.494,0.8349,0.5012,0.8362 L0.5076,0.837 T0.5133,0.8376 T0.5181,0.8382 T0.5221,0.8391 L0.5253,0.8399 T0.5277,0.8409 L0.5293,0.8422 T0.5301,0.8438 L0.5301,0.8461 Q0.5301,0.8499,0.5249,0.8511 T0.5112,0.8526 T0.5004,0.8532 Q0.4964,0.854,0.4851,0.8546 T0.4667,0.8565 Q0.4578,0.8577,0.441,0.8577 L0.4345,0.8577 L0.4289,0.8577 L0.4209,0.8577 Q0.4153,0.8582,0.4088,0.8586 T0.3968,0.8592 T0.3855,0.8594 T0.3755,0.8596 T0.3675,0.86 T0.3622,0.8602 Q0.3317,0.8635,0.3237,0.8635 Q0.2996,0.8635,0.2996,0.8681 Q0.2996,0.8698,0.3032,0.8733 T0.3068,0.8797 L0.3068,0.8822 Q0.3052,0.8859,0.2859,0.8859 Q0.2787,0.8859,0.2739,0.8851 L0.2699,0.8851 Q0.2659,0.8851,0.259,0.888 T0.2498,0.8913 Q0.2394,0.8946,0.2056,0.8971 Q0.2032,0.8971,0.1928,0.9002 T0.1703,0.9034 Q0.1526,0.9034,0.1353,0.9067 T0.1173,0.915 L0.1173,0.9158 Q0.1173,0.9166,0.1177,0.9175 T0.1189,0.9191 T0.1205,0.9204 T0.1229,0.9212 T0.1257,0.922 T0.1285,0.9226 T0.1309,0.9231 T0.1337,0.9235 T0.1365,0.9237 L0.1446,0.9237 T0.1554,0.9243 T0.1614,0.9268 T0.1659,0.9293 T0.1743,0.9303 T0.1823,0.9316 Q0.1863,0.932,0.1912,0.9332 T0.2028,0.9361 T0.2153,0.939 Q0.2233,0.9411,0.2297,0.9448 T0.2386,0.9494 Q0.2426,0.9506,0.2506,0.9506 Q0.253,0.9506,0.2594,0.9504 T0.2699,0.9502 Q0.2763,0.9502,0.2819,0.9511 Q0.2851,0.9511,0.2871,0.9529 T0.2892,0.9573 Q0.2892,0.9627,0.2811,0.9635 Q0.2434,0.9652,0.2337,0.9672 Q0.2257,0.9693,0.2241,0.9693 Q0.2217,0.9693,0.2096,0.9689 L0.2056,0.9689 Q0.1976,0.9689,0.1924,0.9699 T0.1787,0.9741 L0.1647,0.9793 Q0.1518,0.983,0.1285,0.983 L0.1261,0.983 L0.1237,0.983 Q0.1124,0.983,0.1076,0.9838 Q0.102,0.9851,0.0839,0.9896 T0.0602,0.9954 T0.0406,0.9971 T0.0153,0.9979 L0.0032,0.9979 Z`,type:0}},"":{type:5,data:{d:`M0.9992,0.998 Q0.9992,1,0.9968,1 Q0.9521,1,0.9392,0.998 Q0.9335,0.997,0.9152,0.9921 T0.8913,0.9862 Q0.8873,0.9852,0.8783,0.9852 L0.8747,0.9852 L0.871,0.9852 Q0.8483,0.9852,0.8345,0.9812 Q0.8289,0.9792,0.8228,0.9773 T0.8135,0.9743 T0.8054,0.9723 T0.7948,0.9713 L0.7908,0.9713 L0.777,0.9713 T0.7656,0.9693 Q0.7616,0.9683,0.7498,0.9674 T0.7283,0.9664 L0.7186,0.9654 Q0.708,0.9644,0.708,0.9575 Q0.708,0.9545,0.7109,0.952 T0.7178,0.9486 L0.7315,0.9486 L0.7417,0.9486 L0.7502,0.9486 Q0.7575,0.9486,0.7599,0.9476 Q0.7616,0.9466,0.7685,0.9426 T0.7843,0.9377 Q0.7899,0.9357,0.8009,0.9332 T0.8175,0.9298 Q0.82,0.9288,0.8228,0.9283 T0.8277,0.9278 T0.8313,0.9273 T0.8341,0.9263 T0.8362,0.9258 Q0.8402,0.9219,0.854,0.9219 L0.8569,0.9219 L0.8597,0.9219 L0.8637,0.9219 Q0.88,0.9199,0.88,0.9159 L0.88,0.9149 Q0.88,0.913,0.8719,0.911 T0.852,0.9075 T0.8297,0.906 Q0.8224,0.906,0.8167,0.905 T0.8074,0.9031 T0.8001,0.9006 T0.794,0.8991 Q0.7599,0.8971,0.7494,0.8942 Q0.7461,0.8932,0.7397,0.8902 T0.7299,0.8872 L0.7267,0.8872 Q0.721,0.8882,0.7121,0.8882 Q0.6926,0.8882,0.691,0.8833 L0.691,0.8803 Q0.691,0.8773,0.6922,0.8749 T0.6955,0.8704 L0.6975,0.8684 Q0.6926,0.8655,0.6764,0.8655 Q0.6683,0.8655,0.6375,0.8625 Q0.6358,0.8625,0.629,0.862 T0.6148,0.8615 T0.5973,0.861 T0.5791,0.8605 L0.5718,0.8605 L0.5661,0.8605 L0.5596,0.8605 Q0.5426,0.8605,0.5337,0.8586 Q0.5264,0.8576,0.515,0.8571 T0.4996,0.8556 Q0.498,0.8556,0.4947,0.8551 T0.4882,0.8546 T0.4809,0.8541 T0.474,0.8531 T0.4692,0.8506 T0.4672,0.8467 Q0.4672,0.8437,0.468,0.8422 T0.4704,0.8398 T0.4736,0.8383 T0.4781,0.8368 T0.4838,0.8358 T0.4911,0.8353 T0.4988,0.8338 Q0.5069,0.8328,0.5142,0.8328 Q0.5174,0.8328,0.5215,0.8333 T0.5264,0.8338 Q0.5296,0.8338,0.532,0.8328 Q0.5523,0.8249,0.5604,0.8249 L0.5653,0.8249 Q0.5775,0.8269,0.5848,0.8269 Q0.5912,0.8269,0.5937,0.8259 Q0.6026,0.821,0.6253,0.821 Q0.6294,0.821,0.6334,0.822 T0.6383,0.8229 Q0.6399,0.8229,0.644,0.82 Q0.6504,0.817,0.6723,0.816 T0.6975,0.814 Q0.6999,0.814,0.7048,0.8121 T0.7129,0.8091 T0.7226,0.8071 T0.7372,0.8061 L0.7421,0.8061 Q0.7624,0.8071,0.7721,0.8071 Q0.7924,0.8071,0.7981,0.8051 Q0.8021,0.8032,0.807,0.8027 T0.8135,0.8017 T0.8151,0.8002 L0.8151,0.7992 Q0.8143,0.7962,0.8127,0.7957 T0.8045,0.7943 Q0.7997,0.7943,0.7964,0.7933 Q0.7883,0.7933,0.7676,0.7923 T0.7437,0.7903 Q0.7307,0.7893,0.7218,0.7844 Q0.7194,0.7834,0.7141,0.7819 L0.7036,0.7789 T0.693,0.7765 T0.6853,0.7755 Q0.6805,0.7755,0.6691,0.773 T0.6553,0.7705 Q0.6545,0.7705,0.6545,0.7715 Q0.6537,0.7715,0.65,0.7725 T0.6423,0.774 T0.635,0.7745 Q0.6294,0.7745,0.6257,0.773 T0.618,0.771 T0.6083,0.77 T0.601,0.7695 Q0.5985,0.7695,0.5921,0.769 T0.5795,0.7676 T0.5702,0.7666 Q0.5653,0.7656,0.5596,0.7616 T0.5539,0.7547 Q0.5539,0.7498,0.5645,0.7488 Q0.5693,0.7478,0.5852,0.7448 T0.6099,0.7418 L0.6148,0.7418 Q0.6196,0.7418,0.6253,0.7423 T0.6338,0.7428 L0.6399,0.7428 Q0.6431,0.7418,0.6488,0.7409 T0.6586,0.7394 T0.6659,0.7389 L0.6707,0.7389 Q0.6723,0.7399,0.6748,0.7399 Q0.6796,0.7399,0.6946,0.7389 T0.7161,0.7379 Q0.7251,0.7379,0.7478,0.7319 Q0.7494,0.7319,0.7539,0.7315 T0.762,0.73 T0.7697,0.727 T0.7818,0.723 T0.7948,0.7196 T0.7997,0.7151 Q0.7997,0.7141,0.7989,0.7132 Q0.7924,0.7062,0.7717,0.6978 T0.738,0.6894 Q0.7267,0.6894,0.717,0.6845 T0.7048,0.6795 Q0.6975,0.6785,0.6711,0.6766 T0.6431,0.6746 Q0.6415,0.6736,0.6144,0.6721 T0.5596,0.6686 T0.5247,0.6657 Q0.4996,0.6607,0.4874,0.6597 L0.4834,0.6597 Q0.4785,0.6597,0.4724,0.6607 T0.4631,0.6617 Q0.4574,0.6617,0.4501,0.6597 Q0.4088,0.6518,0.4006,0.6518 Q0.3933,0.6518,0.3901,0.6499 T0.3844,0.6479 T0.3739,0.6499 T0.3585,0.6518 L0.352,0.6518 Q0.3471,0.6508,0.335,0.6503 T0.3122,0.6494 T0.2912,0.6479 T0.2766,0.6449 Q0.2733,0.6439,0.2668,0.6439 Q0.2628,0.6439,0.2543,0.6444 T0.2425,0.6449 T0.2368,0.6439 L0.2344,0.6439 Q0.2336,0.6439,0.2283,0.6444 T0.2182,0.6449 Q0.2117,0.6449,0.2052,0.6439 Q0.1768,0.6409,0.1281,0.637 Q0.0989,0.634,0.0916,0.634 L0.0835,0.634 L0.0795,0.634 Q0.0722,0.634,0.0616,0.632 T0.0479,0.6301 Q0.0462,0.6301,0.0406,0.6306 T0.0308,0.6311 Q0.0032,0.6311,0.0008,0.6231 Q0,0.6202,0,0.6182 Q0,0.6083,0.0227,0.6083 Q0.03,0.6073,0.0422,0.6073 Q0.0487,0.6073,0.0608,0.6078 T0.0787,0.6083 Q0.0973,0.6083,0.103,0.6073 Q0.1062,0.6063,0.1131,0.6053 T0.1253,0.6039 T0.1375,0.6024 T0.1492,0.6014 L0.1533,0.6014 Q0.1598,0.6024,0.1723,0.6044 T0.189,0.6063 Q0.1906,0.6063,0.1922,0.6053 Q0.2214,0.6004,0.236,0.6004 Q0.2409,0.6004,0.2551,0.6009 T0.2741,0.6014 Q0.2782,0.6014,0.2859,0.6024 T0.2968,0.6034 Q0.3009,0.6034,0.3041,0.6024 Q0.3277,0.5905,0.356,0.5905 L0.3613,0.5905 L0.3666,0.5905 Q0.3731,0.5905,0.3755,0.5895 Q0.382,0.5856,0.3844,0.5846 T0.3938,0.5831 T0.4144,0.5826 T0.4428,0.5801 T0.4631,0.5776 L0.4663,0.5776 Q0.4704,0.5776,0.4785,0.5786 T0.4899,0.5796 Q0.4964,0.5796,0.5012,0.5767 Q0.5069,0.5737,0.5223,0.5737 Q0.5272,0.5737,0.5369,0.5742 T0.5499,0.5747 Q0.558,0.5747,0.5612,0.5737 Q0.5661,0.5717,0.5714,0.5712 T0.5835,0.5702 T0.5945,0.5692 T0.6018,0.5687 L0.6062,0.5687 T0.6095,0.5682 T0.6148,0.5678 Q0.6172,0.5668,0.6196,0.5653 T0.6245,0.5633 T0.631,0.5628 T0.6407,0.5638 T0.6504,0.5648 T0.6594,0.5638 T0.6675,0.5628 L0.6707,0.5628 L0.6861,0.5628 Q0.7364,0.5628,0.7494,0.5608 L0.7567,0.5608 L0.7652,0.5608 L0.7729,0.5608 Q0.7794,0.5608,0.7818,0.5589 Q0.7851,0.5569,0.7859,0.5559 Q0.7835,0.5539,0.7656,0.5519 Q0.7121,0.547,0.6975,0.543 Q0.6934,0.541,0.6853,0.5396 L0.6691,0.5366 T0.6525,0.5336 T0.6391,0.5312 Q0.6367,0.5302,0.6245,0.5257 T0.6034,0.5213 L0.5977,0.5213 Q0.5945,0.5223,0.5904,0.5223 Q0.5839,0.5223,0.5787,0.5208 T0.5685,0.5183 T0.5596,0.5173 Q0.558,0.5173,0.5552,0.5168 T0.5495,0.5163 L0.5434,0.5163 T0.5373,0.5158 T0.532,0.5148 T0.5284,0.5129 T0.5272,0.5104 L0.5272,0.5074 Q0.5304,0.5015,0.5377,0.499 T0.5629,0.4965 Q0.5734,0.4955,0.5811,0.4946 T0.5953,0.4916 T0.605,0.4896 Q0.6083,0.4886,0.6123,0.4886 Q0.6148,0.4886,0.6225,0.4891 T0.635,0.4896 L0.6456,0.4896 Q0.6837,0.4857,0.6861,0.4857 Q0.7226,0.4768,0.7283,0.4768 Q0.7307,0.4768,0.732,0.4773 T0.7372,0.4777 Q0.7502,0.4777,0.7721,0.4758 Q0.7753,0.4748,0.777,0.4738 Q0.7745,0.4718,0.768,0.4708 Q0.7599,0.4688,0.7445,0.4688 Q0.7405,0.4688,0.7324,0.4693 T0.721,0.4698 Q0.7056,0.4698,0.6999,0.4679 Q0.6861,0.4629,0.6626,0.4619 Q0.6586,0.4609,0.6533,0.4604 T0.6419,0.459 T0.6314,0.456 T0.6269,0.452 Q0.6269,0.451,0.6302,0.4491 Q0.6358,0.4451,0.6525,0.4416 T0.6788,0.4382 L0.6845,0.4382 L0.6902,0.4382 Q0.7064,0.4382,0.7145,0.4362 Q0.7202,0.4342,0.7307,0.4342 L0.7356,0.4342 L0.7409,0.4342 L0.7453,0.4342 Q0.7543,0.4342,0.7607,0.4332 Q0.7778,0.4313,0.7847,0.4288 T0.7932,0.4248 T0.7972,0.4169 T0.8045,0.4045 L0.8094,0.3986 T0.8135,0.3942 L0.8167,0.3912 T0.8191,0.3887 T0.8204,0.3867 T0.8208,0.3848 Q0.8208,0.3818,0.8167,0.3739 Q0.8127,0.3689,0.8054,0.3635 T0.7924,0.3556 T0.7778,0.3497 T0.768,0.3462 Q0.764,0.3442,0.7478,0.3427 T0.7267,0.3383 Q0.7234,0.3363,0.7044,0.3348 T0.6805,0.3323 L0.6764,0.3323 T0.6679,0.3328 T0.6586,0.3333 Q0.6521,0.3333,0.648,0.3314 Q0.6391,0.3264,0.6294,0.3264 Q0.6229,0.3264,0.6156,0.3294 Q0.6115,0.3304,0.6042,0.3304 Q0.5977,0.3304,0.5888,0.3289 T0.5738,0.3264 T0.5584,0.3225 L0.5491,0.3195 Q0.5418,0.3185,0.5162,0.3155 T0.4895,0.3121 T0.4826,0.3116 T0.4716,0.3111 T0.4607,0.3096 T0.4513,0.3066 T0.4477,0.3017 Q0.4477,0.2997,0.4485,0.2977 Q0.4526,0.2898,0.4611,0.2878 T0.4842,0.2859 Q0.4882,0.2859,0.4943,0.2864 T0.5028,0.2868 Q0.5118,0.2868,0.5215,0.2829 Q0.5401,0.276,0.5734,0.276 Q0.5831,0.276,0.5872,0.277 L0.5904,0.277 T0.5949,0.2745 T0.6034,0.272 Q0.631,0.269,0.6407,0.2661 Q0.6448,0.2641,0.6488,0.2641 T0.6573,0.2656 T0.6634,0.2671 Q0.6659,0.2671,0.6675,0.2651 Q0.6723,0.2601,0.6886,0.2552 T0.7137,0.2502 L0.7153,0.2502 L0.7178,0.2502 Q0.7218,0.2502,0.7279,0.2493 T0.7417,0.2468 T0.7526,0.2453 Q0.8208,0.2354,0.8281,0.2354 Q0.8337,0.2354,0.8394,0.2344 T0.8496,0.2315 T0.854,0.2265 Q0.854,0.2216,0.8443,0.2176 Q0.8354,0.2127,0.8216,0.2102 T0.7972,0.2072 T0.777,0.2067 T0.7648,0.2057 Q0.7632,0.2047,0.7498,0.2038 T0.7202,0.2018 T0.6983,0.1998 Q0.6918,0.1998,0.676,0.1949 T0.6537,0.1899 Q0.6496,0.1899,0.6472,0.1919 Q0.6342,0.1968,0.6123,0.1968 Q0.5961,0.1968,0.5912,0.1929 Q0.5904,0.1919,0.5892,0.1919 T0.5823,0.1944 T0.5722,0.1968 T0.5637,0.1949 Q0.5556,0.1909,0.5158,0.1869 Q0.5109,0.1869,0.5032,0.1835 T0.4915,0.18 Q0.4907,0.18,0.4891,0.181 Q0.4793,0.182,0.455,0.182 Q0.4177,0.182,0.4015,0.1771 Q0.3901,0.1741,0.3779,0.1741 Q0.3747,0.1741,0.369,0.1746 T0.3609,0.1751 Q0.3569,0.1751,0.3536,0.1741 Q0.3512,0.1741,0.3459,0.1736 T0.3358,0.1726 T0.3256,0.1716 T0.3167,0.1696 T0.3106,0.1662 Q0.3082,0.1632,0.3082,0.1592 Q0.3082,0.1543,0.3114,0.1508 T0.3204,0.1474 L0.3236,0.1474 Q0.3301,0.1494,0.3333,0.1494 Q0.339,0.1494,0.3496,0.1454 Q0.3674,0.1385,0.3869,0.1385 Q0.395,0.1385,0.4011,0.137 T0.4116,0.1355 T0.4197,0.1375 T0.425,0.1395 Q0.429,0.1395,0.4355,0.1365 Q0.4631,0.1266,0.4882,0.1266 Q0.5126,0.1266,0.5337,0.1246 Q0.5369,0.1246,0.5458,0.1207 T0.5661,0.1167 L0.5693,0.1167 Q0.5791,0.1177,0.5852,0.1187 T0.5921,0.1197 Q0.5945,0.1197,0.6002,0.1167 Q0.6026,0.1147,0.605,0.1123 T0.6091,0.1093 T0.6156,0.1088 T0.6318,0.1098 Q0.6456,0.1108,0.6569,0.1137 T0.6707,0.1167 Q0.674,0.1167,0.6772,0.1147 Q0.6821,0.1108,0.6946,0.1083 T0.721,0.1044 T0.7453,0.1029 L0.7526,0.1029 Q0.7583,0.1039,0.7652,0.1053 T0.7753,0.1068 Q0.7778,0.1068,0.7802,0.1058 Q0.7981,0.1019,0.8143,0.1019 Q0.8175,0.1019,0.8439,0.0964 T0.8735,0.091 Q0.8759,0.091,0.8836,0.089 T0.8938,0.0851 Q0.8929,0.0841,0.8905,0.0841 Q0.8832,0.0821,0.8735,0.0821 Q0.8694,0.0821,0.8629,0.0826 T0.854,0.0831 Q0.8508,0.0831,0.8491,0.0821 Q0.8475,0.0821,0.8171,0.0811 T0.7802,0.0781 T0.7571,0.0737 T0.7332,0.0712 Q0.7299,0.0712,0.7247,0.0717 T0.7161,0.0722 L0.7064,0.0722 Q0.7032,0.0712,0.7003,0.0707 T0.6959,0.0692 T0.693,0.0678 T0.6914,0.0663 T0.6902,0.0648 T0.689,0.0643 L0.6869,0.0643 L0.6845,0.0643 L0.6821,0.0643 Q0.6553,0.0643,0.6553,0.0554 T0.6796,0.0465 L0.6813,0.0465 L0.6845,0.0465 Q0.6918,0.0425,0.717,0.0376 Q0.7226,0.0366,0.7267,0.0356 T0.7324,0.0336 T0.7376,0.0317 T0.747,0.0297 Q0.7518,0.0287,0.7551,0.0287 T0.762,0.0297 T0.768,0.0307 L0.7729,0.0307 Q0.7802,0.0277,0.7997,0.0267 T0.8224,0.0237 Q0.8273,0.0227,0.8341,0.0223 T0.8475,0.0193 T0.8654,0.0143 T0.8873,0.0079 Q0.9002,0.003,0.9331,0.004 T0.97,0.004 Q0.9838,0,0.9976,0.001 Q1,0.001,1,0.003 Z M0.9935,0.996 L0.9951,0.0049 Q0.9822,0.0049,0.9716,0.0079 Q0.9659,0.0099,0.9327,0.0089 T0.8897,0.0119 Q0.8775,0.0158,0.8666,0.0183 T0.85,0.0237 Q0.8418,0.0267,0.8341,0.0272 T0.8248,0.0277 Q0.82,0.0297,0.8001,0.0312 T0.7745,0.0346 Q0.7697,0.0356,0.7664,0.0356 Q0.764,0.0356,0.7603,0.0341 T0.7534,0.0326 Q0.751,0.0326,0.7478,0.0336 Q0.7429,0.0346,0.7397,0.0356 T0.7344,0.0376 T0.7283,0.0401 T0.7178,0.0425 Q0.6926,0.0465,0.6878,0.0495 Q0.6845,0.0514,0.6764,0.0514 L0.6723,0.0514 L0.6691,0.0514 Q0.6602,0.0514,0.6602,0.0554 Q0.6602,0.0574,0.6659,0.0579 T0.6796,0.0589 T0.691,0.0603 T0.6967,0.0643 T0.7072,0.0673 Q0.7121,0.0682,0.7153,0.0682 T0.7238,0.0678 T0.7332,0.0673 Q0.7413,0.0673,0.7579,0.0692 T0.7818,0.0742 Q0.7867,0.0752,0.8171,0.0762 T0.8508,0.0781 L0.852,0.0781 T0.8601,0.0776 T0.8719,0.0772 Q0.8832,0.0772,0.8921,0.0791 Q0.8994,0.0811,0.8994,0.0841 T0.8933,0.0895 T0.8812,0.094 T0.8735,0.0959 T0.8451,0.1014 T0.8143,0.1068 Q0.7989,0.1068,0.7818,0.1098 Q0.7778,0.1108,0.7745,0.1108 T0.768,0.1103 T0.7603,0.1088 T0.7518,0.1068 L0.7461,0.1068 Q0.7315,0.1068,0.7088,0.1103 T0.6805,0.1177 Q0.6756,0.1207,0.6699,0.1207 Q0.6667,0.1207,0.6545,0.1177 T0.631,0.1147 Q0.6269,0.1137,0.6225,0.1133 T0.616,0.1128 L0.6123,0.1128 T0.6103,0.1133 L0.6083,0.1157 T0.6034,0.1197 Q0.5961,0.1246,0.5921,0.1246 Q0.5904,0.1246,0.5835,0.1231 T0.5693,0.1217 L0.5661,0.1217 Q0.558,0.1217,0.5535,0.1231 T0.5446,0.1266 T0.5345,0.1296 Q0.5126,0.1316,0.4882,0.1316 T0.438,0.1405 Q0.4298,0.1434,0.425,0.1434 Q0.4209,0.1434,0.4173,0.1419 T0.4112,0.1405 T0.4027,0.1419 T0.3869,0.1434 Q0.3682,0.1434,0.3512,0.1494 Q0.3398,0.1533,0.3333,0.1533 Q0.3285,0.1533,0.3228,0.1513 L0.3212,0.1513 Q0.3179,0.1513,0.3155,0.1538 T0.3131,0.1592 Q0.3131,0.1612,0.3147,0.1632 Q0.3171,0.1652,0.3232,0.1667 T0.3406,0.1691 T0.3544,0.1701 L0.3601,0.1701 L0.3678,0.1701 L0.3771,0.1701 Q0.3909,0.1701,0.4031,0.1731 Q0.4177,0.178,0.4558,0.178 Q0.4793,0.178,0.4882,0.1761 L0.4915,0.1761 Q0.498,0.1761,0.5061,0.179 T0.5158,0.183 Q0.5166,0.183,0.5231,0.1835 T0.5341,0.1845 T0.545,0.1855 T0.5572,0.1874 T0.5661,0.1909 Q0.5677,0.1919,0.5702,0.1919 T0.5791,0.1894 T0.588,0.1869 Q0.5921,0.1869,0.5945,0.1899 Q0.5977,0.1919,0.6123,0.1919 Q0.6334,0.1919,0.6448,0.1879 Q0.6488,0.186,0.6537,0.186 Q0.6626,0.186,0.6784,0.1909 T0.6983,0.1958 Q0.704,0.1968,0.7206,0.1973 T0.7506,0.1993 T0.7689,0.2018 L0.7705,0.2018 L0.7741,0.2018 L0.7786,0.2018 Q0.8248,0.2018,0.8475,0.2136 Q0.8597,0.2196,0.8597,0.2255 T0.8483,0.2359 T0.8281,0.2404 Q0.8208,0.2404,0.7534,0.2493 Q0.7502,0.2502,0.7425,0.2512 T0.7287,0.2532 T0.7178,0.2542 L0.7153,0.2542 L0.7137,0.2542 Q0.7064,0.2542,0.6906,0.2591 T0.6715,0.2681 T0.6626,0.272 Q0.6594,0.272,0.6541,0.2705 T0.6464,0.269 T0.6431,0.27 Q0.6318,0.273,0.6034,0.276 Q0.6018,0.276,0.5998,0.2774 T0.5957,0.2799 T0.5904,0.2809 L0.5856,0.2809 Q0.5823,0.2799,0.575,0.2799 Q0.541,0.2799,0.5239,0.2868 Q0.5134,0.2908,0.5028,0.2908 Q0.4996,0.2908,0.4935,0.2903 T0.4842,0.2898 Q0.4704,0.2898,0.4635,0.2918 T0.4534,0.2997 L0.4534,0.3007 Q0.4534,0.3037,0.459,0.3046 T0.4753,0.3066 T0.4899,0.3076 Q0.4907,0.3076,0.5166,0.3106 T0.5507,0.3155 Q0.5921,0.3264,0.605,0.3264 Q0.6107,0.3264,0.6131,0.3254 Q0.6212,0.3225,0.6294,0.3225 Q0.6407,0.3225,0.6513,0.3274 Q0.6529,0.3294,0.6569,0.3294 Q0.6594,0.3294,0.665,0.3284 T0.6748,0.3274 T0.6821,0.3284 Q0.6861,0.3294,0.6967,0.3299 T0.7165,0.3314 T0.7299,0.3343 Q0.7324,0.3363,0.7486,0.3383 T0.7697,0.3422 Q0.7713,0.3432,0.7774,0.3452 T0.7887,0.3492 T0.8005,0.3546 T0.8127,0.3625 T0.8208,0.3719 Q0.8256,0.3798,0.8256,0.3848 Q0.8256,0.3877,0.8236,0.3902 T0.8171,0.3976 T0.809,0.4075 T0.8021,0.4189 T0.7968,0.4273 T0.7867,0.4322 T0.7616,0.4382 Q0.7543,0.4392,0.7437,0.4392 L0.7364,0.4392 L0.7299,0.4392 Q0.7202,0.4392,0.7161,0.4402 Q0.7072,0.4431,0.691,0.4431 L0.6845,0.4431 L0.6788,0.4431 Q0.6707,0.4431,0.6545,0.4461 T0.6334,0.452 Q0.6399,0.456,0.6626,0.457 Q0.6878,0.458,0.7024,0.4639 Q0.7064,0.4649,0.7186,0.4649 L0.7295,0.4649 L0.7413,0.4649 Q0.7591,0.4649,0.7697,0.4669 Q0.7818,0.4688,0.7818,0.4728 Q0.7818,0.4748,0.7798,0.4763 T0.7753,0.4787 L0.7737,0.4797 L0.7729,0.4797 Q0.7494,0.4827,0.7388,0.4827 Q0.7332,0.4827,0.7307,0.4817 L0.7291,0.4817 Q0.7226,0.4817,0.6878,0.4896 Q0.6829,0.4906,0.6772,0.4911 T0.6618,0.4921 T0.646,0.4931 T0.6342,0.4936 T0.6212,0.4931 T0.6115,0.4926 Q0.6083,0.4926,0.6058,0.4931 T0.5969,0.4955 T0.5819,0.499 T0.5629,0.5005 Q0.5572,0.5005,0.5527,0.501 T0.545,0.502 T0.5397,0.503 T0.5361,0.5045 T0.5337,0.5064 T0.5328,0.5094 L0.532,0.5094 Q0.532,0.5104,0.5337,0.5109 T0.5381,0.5114 T0.5438,0.5119 T0.5515,0.5124 L0.5604,0.5124 Q0.5661,0.5134,0.5746,0.5153 T0.5912,0.5173 L0.5977,0.5173 L0.6026,0.5173 Q0.6139,0.5173,0.6273,0.5218 T0.6407,0.5272 Q0.6448,0.5282,0.6683,0.5321 T0.6991,0.5381 Q0.7137,0.543,0.7664,0.548 Q0.7908,0.55,0.7908,0.5559 Q0.7908,0.5589,0.7859,0.5628 Q0.781,0.5658,0.7713,0.5658 Q0.7689,0.5658,0.7628,0.5653 T0.7543,0.5648 T0.7502,0.5658 Q0.7364,0.5678,0.6878,0.5678 Q0.674,0.5678,0.6699,0.5668 L0.6683,0.5668 Q0.6659,0.5668,0.6606,0.5678 T0.6513,0.5687 Q0.6464,0.5687,0.6391,0.5678 Q0.6334,0.5668,0.6302,0.5668 T0.6241,0.5687 T0.6164,0.5717 Q0.6123,0.5727,0.6099,0.5727 L0.6062,0.5727 T0.6022,0.5732 T0.5953,0.5737 Q0.5904,0.5747,0.5839,0.5747 T0.5726,0.5752 T0.5629,0.5776 T0.5458,0.5796 Q0.5418,0.5796,0.5324,0.5791 T0.5191,0.5786 Q0.5077,0.5786,0.5045,0.5806 Q0.498,0.5836,0.4899,0.5836 Q0.4858,0.5836,0.4777,0.5826 T0.4655,0.5816 L0.4631,0.5816 Q0.4582,0.5816,0.4436,0.5841 T0.4144,0.5865 L0.4051,0.5865 L0.3986,0.5865 T0.3933,0.587 T0.3897,0.5875 T0.3869,0.5885 T0.3844,0.5895 T0.3812,0.591 T0.3779,0.5925 Q0.3739,0.5955,0.3633,0.5955 L0.3585,0.5955 L0.3536,0.5955 Q0.3277,0.5955,0.3066,0.6053 Q0.3017,0.6083,0.296,0.6083 Q0.2912,0.6083,0.2839,0.6068 T0.2741,0.6053 Q0.2693,0.6053,0.2547,0.6048 T0.236,0.6044 Q0.2222,0.6044,0.193,0.6103 L0.1882,0.6103 Q0.1825,0.6103,0.1703,0.6083 T0.1525,0.6063 L0.15,0.6063 Q0.1436,0.6063,0.135,0.6073 T0.1168,0.6098 T0.1038,0.6113 Q0.0973,0.6123,0.0787,0.6123 L0.06,0.6123 L0.0414,0.6123 L0.0235,0.6123 Q0.0049,0.6133,0.0049,0.6172 L0.0057,0.6222 Q0.0073,0.6261,0.043,0.6261 L0.0454,0.6261 L0.0479,0.6261 Q0.0527,0.6261,0.0633,0.6281 T0.0803,0.6301 L0.0835,0.6301 L0.0916,0.6301 Q0.0998,0.6301,0.129,0.632 Q0.1768,0.636,0.206,0.64 Q0.2117,0.6409,0.2165,0.6409 Q0.2206,0.6409,0.2263,0.6405 T0.2336,0.64 L0.2384,0.64 L0.2409,0.64 T0.251,0.6395 T0.2644,0.639 Q0.2741,0.639,0.279,0.6409 Q0.283,0.6429,0.2972,0.6439 T0.3293,0.6459 T0.3528,0.6469 L0.3577,0.6469 Q0.3642,0.6469,0.3723,0.6449 T0.3844,0.6429 Q0.3901,0.6429,0.3933,0.6454 T0.4006,0.6479 Q0.4088,0.6479,0.4517,0.6558 Q0.4582,0.6568,0.4623,0.6568 Q0.4655,0.6568,0.4716,0.6563 T0.4826,0.6558 L0.4882,0.6558 Q0.5004,0.6558,0.5255,0.6607 Q0.5328,0.6627,0.5604,0.6647 T0.6152,0.6682 T0.644,0.6696 T0.6719,0.6721 T0.7056,0.6756 Q0.7113,0.6756,0.7198,0.6805 T0.738,0.6855 Q0.7453,0.6855,0.7551,0.6879 T0.7741,0.6939 T0.7912,0.7018 T0.8029,0.7102 Q0.8054,0.7132,0.8054,0.7151 Q0.8054,0.7191,0.8009,0.7216 T0.7908,0.7255 T0.779,0.7285 T0.7721,0.731 Q0.7672,0.7329,0.7632,0.7339 T0.7551,0.7354 T0.7486,0.7369 Q0.7478,0.7369,0.7445,0.7379 T0.7388,0.7394 T0.7324,0.7404 L0.7242,0.7413 T0.7161,0.7418 Q0.7105,0.7418,0.6955,0.7428 T0.6748,0.7438 L0.6699,0.7438 L0.6667,0.7438 Q0.6659,0.7438,0.6407,0.7468 Q0.6367,0.7478,0.6334,0.7478 T0.6245,0.7468 T0.6148,0.7458 L0.6099,0.7458 Q0.6018,0.7468,0.5864,0.7498 T0.5653,0.7532 T0.5596,0.7557 Q0.5596,0.7596,0.571,0.7616 Q0.5742,0.7626,0.5803,0.7631 T0.5929,0.7641 T0.6018,0.7656 L0.6087,0.7656 T0.6192,0.7666 T0.6277,0.7695 Q0.631,0.7705,0.6342,0.7705 Q0.6383,0.7705,0.6452,0.7685 T0.6537,0.7666 L0.6553,0.7666 Q0.6602,0.7666,0.6711,0.769 T0.6853,0.7715 Q0.691,0.7715,0.7048,0.775 T0.7242,0.7814 Q0.7324,0.7854,0.7445,0.7864 Q0.7478,0.7864,0.768,0.7873 T0.7972,0.7893 Q0.7989,0.7893,0.8017,0.7898 T0.8054,0.7903 L0.8082,0.7903 T0.811,0.7908 T0.8131,0.7913 T0.8151,0.7918 L0.8167,0.7928 T0.8179,0.7943 T0.8191,0.7957 T0.8204,0.7977 T0.8208,0.8002 Q0.8208,0.8032,0.8171,0.8051 T0.8074,0.8081 T0.7997,0.8091 Q0.7932,0.8121,0.7737,0.8121 Q0.7664,0.8121,0.7413,0.8111 L0.7364,0.8111 Q0.7275,0.8111,0.7214,0.8121 T0.7084,0.8155 T0.6991,0.819 Q0.6934,0.82,0.6723,0.8205 T0.6472,0.8239 Q0.6423,0.8269,0.6375,0.8269 Q0.6358,0.8269,0.6338,0.8264 T0.6294,0.8254 T0.6253,0.8249 Q0.6042,0.8249,0.5961,0.8289 Q0.5921,0.8318,0.5839,0.8318 Q0.5783,0.8318,0.5645,0.8299 L0.5604,0.8299 Q0.5531,0.8299,0.5337,0.8368 Q0.5296,0.8378,0.5255,0.8378 Q0.5239,0.8378,0.5195,0.8373 T0.5118,0.8368 Q0.5061,0.8368,0.4996,0.8388 Q0.4947,0.8388,0.4882,0.8398 Q0.4777,0.8417,0.4753,0.8427 T0.4728,0.8467 Q0.4728,0.8487,0.4769,0.8492 T0.4886,0.8501 T0.5004,0.8516 Q0.5036,0.8516,0.515,0.8521 T0.5345,0.8546 Q0.5426,0.8556,0.5596,0.8556 L0.5649,0.8556 L0.5702,0.8556 L0.5791,0.8556 Q0.5921,0.8566,0.6135,0.8571 T0.6383,0.8586 Q0.6683,0.8615,0.6764,0.8615 L0.6776,0.8615 L0.6788,0.8615 Q0.7032,0.8615,0.7032,0.8684 Q0.7032,0.8714,0.6995,0.8749 T0.6959,0.8803 L0.6959,0.8813 Q0.6991,0.8843,0.7153,0.8843 Q0.7218,0.8843,0.7259,0.8833 L0.7299,0.8833 Q0.7324,0.8833,0.7348,0.8838 T0.7393,0.8848 T0.7433,0.8863 L0.7474,0.8882 T0.751,0.8892 Q0.7616,0.8922,0.7948,0.8952 Q0.7981,0.8952,0.8082,0.8981 T0.8297,0.9011 T0.8528,0.9026 T0.8747,0.907 T0.8856,0.9149 L0.8856,0.9159 Q0.8856,0.9179,0.8848,0.9189 T0.8828,0.9209 T0.88,0.9228 T0.8767,0.9243 T0.8731,0.9248 T0.8698,0.9253 T0.8666,0.9258 L0.8646,0.9258 Q0.8621,0.9258,0.8577,0.9263 T0.85,0.9268 T0.8439,0.9273 T0.8402,0.9278 Q0.8386,0.9298,0.8358,0.9308 T0.8305,0.9322 T0.8244,0.9332 T0.8183,0.9337 Q0.8135,0.9347,0.8025,0.9372 T0.7859,0.9416 Q0.7778,0.9436,0.7717,0.9471 T0.7624,0.9515 Q0.7575,0.9535,0.7486,0.9535 Q0.7461,0.9535,0.7397,0.953 T0.7291,0.9525 Q0.7234,0.9525,0.7186,0.953 T0.7137,0.957 T0.7194,0.9614 Q0.7567,0.9634,0.7664,0.9654 Q0.7745,0.9674,0.7762,0.9674 L0.7908,0.9674 Q0.7924,0.9664,0.7948,0.9664 Q0.8029,0.9664,0.8082,0.9679 T0.8224,0.9723 T0.8362,0.9773 Q0.8483,0.9812,0.871,0.9812 L0.8751,0.9812 Q0.8873,0.9812,0.8929,0.9822 T0.9165,0.9876 T0.9408,0.9931 Q0.9513,0.996,0.9935,0.996 Z M0.9968,0.998 L0.9976,0.003 Q0.9838,0.002,0.9708,0.0059 Q0.9659,0.0069,0.9327,0.0059 T0.8881,0.0099 Q0.8767,0.0138,0.8658,0.0163 T0.8491,0.0218 Q0.8418,0.0247,0.8341,0.0247 T0.8232,0.0257 Q0.8191,0.0277,0.7997,0.0292 T0.7737,0.0326 Q0.7697,0.0336,0.7672,0.0336 T0.7612,0.0321 T0.7543,0.0307 T0.747,0.0317 Q0.7397,0.0326,0.7336,0.0356 T0.717,0.0406 Q0.6918,0.0445,0.6861,0.0475 Q0.6845,0.0485,0.6772,0.0485 T0.6638,0.05 T0.6577,0.0549 T0.6642,0.0598 T0.6796,0.0613 T0.6902,0.0623 Q0.691,0.0623,0.6946,0.0658 T0.7064,0.0702 L0.7161,0.0702 Q0.7194,0.0702,0.7242,0.0697 T0.7332,0.0692 Q0.7413,0.0692,0.7579,0.0717 T0.781,0.0762 Q0.7867,0.0781,0.8171,0.0786 T0.85,0.0801 L0.8532,0.0801 Q0.8548,0.0801,0.8613,0.0796 T0.8727,0.0791 Q0.8832,0.0791,0.8913,0.0811 Q0.897,0.0831,0.897,0.0851 Q0.897,0.088,0.8873,0.0905 T0.8735,0.093 Q0.871,0.093,0.8447,0.0984 T0.8143,0.1039 Q0.7981,0.1039,0.781,0.1078 Q0.7778,0.1088,0.7745,0.1088 T0.7644,0.1073 T0.7518,0.1048 L0.7453,0.1048 Q0.7299,0.1048,0.7076,0.1083 T0.6788,0.1157 Q0.6748,0.1187,0.6699,0.1187 Q0.6675,0.1187,0.6557,0.1157 T0.6318,0.1118 Q0.6164,0.1108,0.6135,0.1108 T0.6095,0.1113 T0.6067,0.1142 T0.6018,0.1187 Q0.5953,0.1227,0.5921,0.1227 Q0.5904,0.1227,0.5839,0.1212 T0.5693,0.1187 L0.5661,0.1187 Q0.558,0.1187,0.5527,0.1207 T0.5434,0.1246 T0.5337,0.1266 Q0.5126,0.1296,0.4882,0.1296 T0.4371,0.1385 Q0.4298,0.1414,0.425,0.1414 Q0.4225,0.1414,0.4189,0.1395 T0.4112,0.1375 Q0.4079,0.1375,0.4019,0.1395 T0.3869,0.1414 Q0.3682,0.1414,0.3504,0.1474 Q0.3398,0.1513,0.3333,0.1513 Q0.3293,0.1513,0.3228,0.1494 L0.3204,0.1494 Q0.3179,0.1494,0.3155,0.1508 T0.3118,0.1543 T0.3106,0.1592 T0.3127,0.1642 T0.32,0.1677 T0.3305,0.1701 T0.3435,0.1716 T0.3544,0.1721 Q0.3569,0.1731,0.3601,0.1731 Q0.3625,0.1731,0.3686,0.1726 T0.3779,0.1721 Q0.3901,0.1721,0.4023,0.1751 Q0.4177,0.18,0.455,0.18 Q0.4793,0.18,0.4882,0.178 L0.4915,0.178 Q0.4964,0.178,0.5045,0.1815 T0.5158,0.185 Q0.5564,0.1889,0.5645,0.1929 Q0.5677,0.1939,0.571,0.1939 Q0.575,0.1939,0.5807,0.1919 T0.5888,0.1899 T0.5929,0.1909 Q0.5969,0.1949,0.6123,0.1949 Q0.6334,0.1949,0.6456,0.1899 Q0.6488,0.1879,0.6537,0.1879 Q0.661,0.1879,0.6772,0.1929 T0.6983,0.1978 Q0.704,0.1988,0.7206,0.1998 T0.7502,0.2018 T0.7664,0.2038 Q0.7672,0.2038,0.7818,0.2043 T0.8151,0.2067 T0.8459,0.2156 Q0.8573,0.2206,0.8573,0.2255 Q0.8573,0.2295,0.8516,0.2324 T0.8394,0.2369 T0.8281,0.2384 Q0.8208,0.2384,0.7526,0.2473 Q0.7494,0.2483,0.7421,0.2493 T0.7287,0.2512 T0.7178,0.2522 L0.7153,0.2522 L0.7137,0.2522 Q0.7056,0.2522,0.6898,0.2572 T0.6691,0.2671 Q0.6667,0.269,0.6634,0.269 Q0.661,0.269,0.6557,0.2681 T0.6472,0.2671 Q0.6448,0.2671,0.6415,0.2681 Q0.631,0.271,0.6034,0.274 Q0.5994,0.274,0.5961,0.2765 T0.5904,0.2789 L0.5864,0.2789 Q0.5831,0.2779,0.5742,0.2779 Q0.541,0.2779,0.5223,0.2849 Q0.5126,0.2888,0.5028,0.2888 Q0.5004,0.2888,0.4943,0.2883 T0.4842,0.2878 Q0.4704,0.2878,0.4627,0.2898 T0.4509,0.2987 Q0.4501,0.2997,0.4501,0.3007 Q0.4501,0.3046,0.4574,0.3066 T0.4765,0.3091 T0.4899,0.3096 Q0.4931,0.3106,0.5061,0.3121 T0.5316,0.315 T0.5499,0.3175 Q0.5507,0.3175,0.5572,0.3195 T0.5685,0.3225 T0.5803,0.3254 T0.5933,0.3279 T0.605,0.3284 T0.6148,0.3274 Q0.6221,0.3244,0.6294,0.3244 Q0.6399,0.3244,0.6496,0.3294 Q0.6529,0.3314,0.6577,0.3314 Q0.6602,0.3314,0.6663,0.3304 T0.6756,0.3294 T0.6813,0.3304 Q0.6837,0.3304,0.6873,0.3309 L0.6946,0.3318 T0.7024,0.3323 T0.7105,0.3328 T0.7178,0.3338 T0.7238,0.3348 T0.7283,0.3363 Q0.7324,0.3383,0.7482,0.3403 T0.7689,0.3442 Q0.7697,0.3442,0.779,0.3477 T0.794,0.3536 T0.8074,0.3615 T0.8183,0.3729 Q0.8232,0.3808,0.8232,0.3848 Q0.8232,0.3867,0.8216,0.3892 T0.8151,0.3961 T0.8062,0.406 T0.7997,0.4179 T0.7952,0.4263 T0.7855,0.4308 T0.7616,0.4362 Q0.7543,0.4372,0.7445,0.4372 L0.7372,0.4372 L0.7307,0.4372 Q0.7202,0.4372,0.7153,0.4382 Q0.7064,0.4402,0.691,0.4402 L0.6845,0.4402 L0.6788,0.4402 Q0.6699,0.4402,0.6533,0.4436 T0.6318,0.451 Q0.6302,0.451,0.6302,0.452 Q0.6302,0.457,0.6626,0.459 Q0.6869,0.4609,0.7015,0.4659 Q0.7064,0.4669,0.7202,0.4669 L0.7311,0.4669 L0.7429,0.4669 Q0.7599,0.4669,0.7689,0.4688 Q0.7794,0.4708,0.7794,0.4738 L0.7786,0.4748 T0.777,0.4763 T0.7749,0.4773 L0.7737,0.4777 L0.7729,0.4777 Q0.7502,0.4797,0.738,0.4797 L0.7315,0.4797 L0.7291,0.4797 Q0.7226,0.4797,0.6869,0.4876 Q0.6821,0.4886,0.6768,0.4891 T0.6614,0.4901 T0.6456,0.4916 L0.6342,0.4916 Q0.6294,0.4916,0.6217,0.4911 T0.6115,0.4906 Q0.6083,0.4906,0.6054,0.4911 T0.5961,0.4936 T0.5815,0.4965 T0.5629,0.4985 Q0.5507,0.4985,0.5442,0.4995 T0.5345,0.5025 T0.5304,0.5084 L0.5296,0.5094 Q0.5296,0.5114,0.5316,0.5124 T0.5373,0.5138 T0.5442,0.5143 L0.5523,0.5143 L0.5604,0.5143 Q0.5637,0.5153,0.5677,0.5158 T0.5742,0.5173 T0.5811,0.5188 T0.5904,0.5193 L0.5977,0.5193 L0.6026,0.5193 Q0.6107,0.5193,0.6168,0.5208 T0.6294,0.5252 T0.6399,0.5292 Q0.6448,0.5302,0.6679,0.5341 T0.6983,0.541 Q0.7129,0.545,0.7664,0.55 Q0.7883,0.5519,0.7883,0.5559 Q0.7883,0.5579,0.7843,0.5608 T0.7721,0.5638 Q0.7697,0.5638,0.764,0.5633 T0.7559,0.5628 L0.7502,0.5628 Q0.7364,0.5648,0.6869,0.5648 L0.6699,0.5648 L0.6675,0.5648 Q0.665,0.5648,0.6602,0.5658 T0.6513,0.5668 Q0.6464,0.5668,0.6399,0.5658 Q0.6342,0.5648,0.6302,0.5648 T0.6225,0.5668 T0.6156,0.5697 Q0.6107,0.5707,0.6087,0.5707 T0.6034,0.5712 T0.5953,0.5717 Q0.5904,0.5727,0.5835,0.5727 T0.5718,0.5732 T0.562,0.5757 Q0.558,0.5767,0.5483,0.5767 L0.5349,0.5767 L0.5207,0.5767 Q0.5069,0.5767,0.5028,0.5786 Q0.4972,0.5816,0.4899,0.5816 Q0.4858,0.5816,0.4781,0.5806 T0.4663,0.5796 L0.4631,0.5796 Q0.4582,0.5796,0.4432,0.5821 T0.4144,0.5846 L0.4071,0.5846 L0.4011,0.5846 T0.3958,0.5851 T0.3921,0.5856 T0.3889,0.5861 T0.3865,0.5865 T0.384,0.5875 L0.382,0.5885 L0.3796,0.5895 L0.3771,0.5905 Q0.3731,0.5925,0.365,0.5925 L0.3601,0.5925 L0.3552,0.5925 Q0.3277,0.5925,0.3049,0.6044 Q0.3017,0.6053,0.296,0.6053 Q0.292,0.6053,0.2847,0.6044 T0.2741,0.6034 Q0.2693,0.6034,0.2547,0.6029 T0.236,0.6024 Q0.2222,0.6024,0.1922,0.6073 Q0.1906,0.6083,0.1882,0.6083 Q0.1833,0.6083,0.1711,0.6063 T0.1533,0.6044 Q0.1517,0.6034,0.1492,0.6034 Q0.1436,0.6034,0.135,0.6048 T0.1168,0.6078 T0.103,0.6093 Q0.0973,0.6103,0.0787,0.6103 L0.0604,0.6103 L0.0414,0.6103 L0.0235,0.6103 Q0.0024,0.6113,0.0024,0.6172 Q0.0024,0.6192,0.0032,0.6231 Q0.0049,0.6281,0.0333,0.6281 L0.0414,0.6281 L0.0479,0.6281 Q0.0519,0.6281,0.0624,0.6301 T0.0803,0.632 L0.0835,0.632 L0.0916,0.632 Q0.0989,0.632,0.1281,0.634 L0.206,0.6419 Q0.2117,0.6429,0.2174,0.6429 Q0.2214,0.6429,0.2271,0.6424 T0.2344,0.6419 L0.2376,0.6419 Q0.2393,0.6429,0.2417,0.6429 T0.2526,0.6419 T0.2652,0.6409 Q0.2741,0.6409,0.2782,0.6429 T0.2968,0.6459 T0.3293,0.6479 T0.352,0.6489 Q0.3552,0.6499,0.3585,0.6499 Q0.365,0.6499,0.3731,0.6474 T0.3844,0.6449 Q0.3885,0.6449,0.3917,0.6474 T0.4006,0.6499 Q0.4088,0.6499,0.4509,0.6578 Q0.4574,0.6588,0.4631,0.6588 Q0.4655,0.6588,0.4716,0.6583 T0.4834,0.6578 L0.4874,0.6578 Q0.5004,0.6588,0.5255,0.6637 Q0.532,0.6647,0.56,0.6667 T0.6148,0.6701 T0.644,0.6716 Q0.6464,0.6726,0.6594,0.6736 T0.6861,0.6756 T0.7048,0.6775 Q0.7097,0.6775,0.7186,0.6825 T0.738,0.6874 Q0.7518,0.6874,0.7729,0.6958 T0.8005,0.7122 Q0.8029,0.7141,0.8029,0.7151 Q0.8029,0.7191,0.7968,0.7216 T0.7818,0.726 T0.7705,0.729 L0.764,0.731 T0.7583,0.7324 T0.753,0.7334 T0.7486,0.7349 Q0.7251,0.7399,0.7161,0.7399 Q0.7097,0.7399,0.6951,0.7409 T0.6748,0.7418 L0.6703,0.7418 L0.6667,0.7418 Q0.6659,0.7418,0.6399,0.7448 L0.6334,0.7448 Q0.631,0.7448,0.6249,0.7443 T0.6148,0.7438 L0.6099,0.7438 Q0.601,0.7448,0.5856,0.7473 T0.5645,0.7507 Q0.5572,0.7517,0.5572,0.7547 T0.5616,0.7606 T0.5702,0.7646 Q0.5734,0.7646,0.5779,0.7651 T0.5864,0.7661 T0.5949,0.7671 T0.6018,0.7676 L0.6071,0.7676 T0.6135,0.7681 T0.62,0.769 T0.6269,0.771 T0.6342,0.7725 Q0.6391,0.7725,0.6464,0.7705 T0.6541,0.7685 L0.6553,0.7685 Q0.6586,0.7685,0.6699,0.771 T0.6853,0.7735 Q0.6902,0.7735,0.704,0.777 T0.7226,0.7834 Q0.7315,0.7873,0.7445,0.7883 Q0.747,0.7883,0.7676,0.7893 T0.7972,0.7913 Q0.7989,0.7913,0.8017,0.7918 T0.8058,0.7923 T0.809,0.7928 T0.8114,0.7933 T0.8131,0.7938 T0.8147,0.7943 T0.8159,0.7953 L0.8171,0.7967 T0.8175,0.7982 Q0.8183,0.7992,0.8183,0.8002 Q0.8183,0.8022,0.8155,0.8032 T0.807,0.8051 T0.7989,0.8071 Q0.7932,0.8091,0.7737,0.8091 L0.7413,0.8091 L0.7372,0.8091 Q0.7275,0.8091,0.721,0.8101 T0.7072,0.8136 T0.6983,0.817 Q0.6942,0.818,0.6825,0.818 T0.6602,0.819 T0.6456,0.822 Q0.6415,0.8249,0.6375,0.8249 Q0.6367,0.8249,0.6326,0.8239 T0.6253,0.8229 Q0.6034,0.8229,0.5953,0.8279 Q0.5912,0.8289,0.5848,0.8289 Q0.5775,0.8289,0.5645,0.8279 Q0.5629,0.8269,0.5604,0.8269 Q0.5523,0.8269,0.5328,0.8348 Q0.5296,0.8358,0.5264,0.8358 Q0.5247,0.8358,0.5203,0.8353 T0.5126,0.8348 Q0.5061,0.8348,0.4988,0.8358 Q0.4947,0.8368,0.4882,0.8378 Q0.4826,0.8388,0.4797,0.8388 T0.474,0.8398 T0.4704,0.8422 T0.4696,0.8462 T0.472,0.8501 T0.4781,0.8521 T0.4854,0.8526 L0.4935,0.8526 T0.4996,0.8536 Q0.5036,0.8536,0.515,0.8546 T0.5337,0.8566 Q0.5426,0.8576,0.5596,0.8576 L0.5657,0.8576 L0.571,0.8576 L0.5791,0.8576 Q0.5921,0.8586,0.6135,0.8591 T0.6383,0.8605 Q0.6683,0.8635,0.6764,0.8635 Q0.6999,0.8635,0.6999,0.8684 Q0.6999,0.8694,0.6967,0.8734 T0.6934,0.8803 L0.6934,0.8823 Q0.6951,0.8863,0.7137,0.8863 Q0.7218,0.8863,0.7267,0.8853 L0.7299,0.8853 Q0.734,0.8853,0.7409,0.8882 T0.7502,0.8912 Q0.7607,0.8942,0.794,0.8971 Q0.7972,0.8971,0.8078,0.9001 T0.8297,0.9031 Q0.8475,0.9031,0.8646,0.9065 T0.8824,0.9149 L0.8824,0.9159 Q0.8824,0.9169,0.882,0.9179 T0.8808,0.9194 L0.8792,0.9204 T0.8767,0.9214 T0.8743,0.9224 T0.8715,0.9228 L0.8686,0.9228 T0.8662,0.9233 T0.8637,0.9238 L0.8556,0.9238 T0.8447,0.9243 T0.8386,0.9268 Q0.837,0.9278,0.835,0.9288 T0.8305,0.9303 T0.8244,0.9308 T0.8175,0.9318 Q0.8127,0.9327,0.8017,0.9352 T0.7851,0.9397 Q0.777,0.9416,0.7705,0.9451 T0.7616,0.9496 Q0.7575,0.9505,0.7494,0.9505 L0.7405,0.9505 L0.7307,0.9505 Q0.7234,0.9505,0.7178,0.9515 Q0.7145,0.9515,0.7125,0.9535 T0.7105,0.9575 Q0.7105,0.9624,0.7194,0.9634 Q0.7567,0.9654,0.7664,0.9674 Q0.7745,0.9693,0.7762,0.9693 L0.7908,0.9693 L0.7948,0.9693 Q0.8005,0.9693,0.8058,0.9698 T0.8143,0.9718 T0.824,0.9753 T0.8354,0.9792 Q0.8483,0.9832,0.871,0.9832 L0.8739,0.9832 L0.8767,0.9832 Q0.8873,0.9832,0.8921,0.9842 Q0.8978,0.9852,0.9157,0.9896 T0.94,0.996 Q0.9424,0.996,0.9469,0.9965 T0.9566,0.997 T0.9676,0.9975 T0.9781,0.998 L0.9874,0.998 L0.9943,0.998 L0.9968,0.998 Z`,type:0}},"":{type:5,data:{d:`M1,0.5071 L0.8623,0.7102 L0.5865,0.7102 L0.4489,0.5071 L0.5865,0.3045 L0.8623,0.3045 Z M0.4135,0.7974 L0.2758,1 L0,1 L0,0.5944 L0.2758,0.5944 Z M0.4135,0.2026 L0.2758,0.4056 L0,0.4056 L0,0 L0.2758,0 Z`,type:0}},"":{type:5,data:{d:`M0.9726,0.5071 L0.8451,0.3184 L0.59,0.3184 L0.4624,0.5071 L0.59,0.6955 L0.8451,0.6955 Z M1,0.5071 L0.8588,0.716 L0.5768,0.716 L0.4355,0.5071 L0.5768,0.2982 L0.8588,0.2982 Z M0.401,0.7911 L0.2735,0.6028 L0.0236,0.6028 L0.0236,0.9799 L0.2735,0.9799 Z M0.4284,0.7911 L0.2872,1 L0,1 L0,0.5826 L0.2872,0.5826 Z M0.401,0.2089 L0.2735,0.0201 L0.0236,0.0201 L0.0236,0.3972 L0.2735,0.3972 Z M0.4284,0.2089 L0.2872,0.4174 L0,0.4174 L0,0 L0.2872,0 Z`,type:0}},"":{type:5,data:{d:`M1,0.4996 Q1,0.5365,0.9924,0.568 T0.9718,0.6177 T0.9433,0.6363 L0.9425,0.6367 Q0.9355,0.6367,0.9285,0.6326 L0.9308,0.6326 Q0.9129,0.6195,0.9013,0.587 T0.8871,0.5164 T0.8943,0.4373 T0.9254,0.3687 L0.9254,0.3691 Q0.9339,0.3628,0.9425,0.3628 Q0.9584,0.3628,0.9716,0.3811 T0.9924,0.431 T1,0.4996 Z M0.9234,0.6321 L0.8776,0.7169 Q0.8791,0.732,0.8791,0.7441 Q0.8791,0.781,0.8716,0.8123 T0.8508,0.862 T0.8224,0.8809 L0.8216,0.8809 Q0.8154,0.8809,0.8092,0.8775 L0.8088,0.8775 Q0.7905,0.8633,0.7792,0.8297 T0.766,0.7571 T0.775,0.6768 T0.8088,0.6086 L0.7431,0.6065 Q0.719,0.6313,0.7072,0.6705 T0.6965,0.7487 T0.7097,0.823 T0.7423,0.8763 L0.7913,0.8775 L0.7314,0.9895 L0.4648,0.5038 L0.7299,0.0176 L0.7882,0.1229 L0.7404,0.1212 Q0.7244,0.138,0.7136,0.1617 T0.6982,0.2108 T0.6943,0.2632 T0.7003,0.3144 T0.7159,0.3586 T0.7396,0.3909 L0.8072,0.3926 Q0.7894,0.3796,0.7777,0.3479 T0.7635,0.2789 T0.7697,0.2011 T0.7987,0.1326 Q0.8092,0.1225,0.8204,0.1225 Q0.8321,0.1225,0.8426,0.1332 T0.8609,0.1623 T0.8731,0.2062 T0.8776,0.2592 Q0.8776,0.268,0.8768,0.2815 L0.9219,0.3628 L0.8644,0.3612 Q0.8403,0.3855,0.8284,0.4247 T0.8177,0.5029 T0.8309,0.5772 T0.8632,0.6305 Z M0.6759,0.6384 Q0.6576,0.625,0.6457,0.5914 T0.6319,0.5185 T0.6407,0.4375 T0.6751,0.3691 L0.609,0.367 Q0.5849,0.3918,0.5731,0.431 T0.5626,0.509 T0.5758,0.5833 T0.6082,0.6367 Z M0.6459,0.0025 L0.391,0.4551 L0.0035,0.4551 L0.246,0 Z M0.6553,1 L0.2421,1 L0,0.5449 L0.3875,0.5449 Z`,type:0}},"":{type:5,data:{d:`M0.4996,0 Q0.5562,0,0.5961,0.0166 T0.6364,0.0566 L0.6368,0.0575 Q0.6368,0.0646,0.6324,0.0713 L0.6324,0.0692 Q0.6196,0.0868,0.5872,0.0986 T0.5166,0.1128 T0.4373,0.1057 T0.3689,0.0747 L0.3694,0.0747 Q0.3627,0.0663,0.3627,0.0575 Q0.3627,0.0336,0.4028,0.0168 T0.4996,0 Z M0.6324,0.0768 L0.717,0.1225 Q0.7321,0.1212,0.744,0.1212 Q0.8007,0.1212,0.8406,0.1378 T0.8809,0.1779 L0.8813,0.1783 Q0.8813,0.1846,0.8778,0.1909 Q0.8636,0.2093,0.8299,0.2208 T0.7573,0.2343 T0.6769,0.2253 T0.6089,0.1913 L0.6067,0.2567 Q0.6315,0.281,0.6707,0.2928 T0.7489,0.3035 T0.8231,0.2903 T0.8764,0.258 L0.8778,0.2085 L0.9898,0.2685 L0.504,0.5352 L0.0177,0.2701 L0.1227,0.2118 L0.1213,0.2596 Q0.1457,0.2836,0.1851,0.2955 T0.2635,0.3062 T0.3377,0.293 T0.3911,0.2605 L0.3928,0.193 Q0.38,0.2106,0.3483,0.2221 T0.2792,0.2364 T0.2013,0.2303 T0.1324,0.2013 Q0.1222,0.1909,0.1222,0.1795 Q0.1222,0.156,0.1623,0.1393 T0.2591,0.1225 Q0.2679,0.1225,0.2817,0.1233 L0.3627,0.078 L0.3609,0.1359 Q0.3857,0.1598,0.4249,0.1718 T0.5031,0.1825 T0.5773,0.1693 T0.6306,0.1367 Z M0.6386,0.3242 Q0.6253,0.3427,0.5917,0.3544 T0.5186,0.3683 T0.4376,0.3595 T0.3689,0.3251 L0.3671,0.3909 Q0.3915,0.4148,0.4309,0.4268 T0.5093,0.4375 T0.5835,0.4243 T0.6368,0.3918 Z M0.0027,0.354 L0.4553,0.6091 L0.4553,0.9962 L0,0.7542 Z M1,0.3448 L1,0.7576 L0.5447,1 L0.5447,0.6128 Z`,type:0}},"":{type:5,data:{d:`M0,0.7699 Q0,0.7172,0.0277,0.6731 T0.103,0.6032 T0.2066,0.5774 Q0.2487,0.5774,0.2865,0.5922 T0.3526,0.6339 L0.3935,0.6715 Q0.4218,0.6984,0.438,0.7336 T0.4541,0.8075 Q0.4541,0.8602,0.4264,0.9046 T0.3511,0.9745 T0.2475,1 Q0.2054,1,0.1676,0.9852 T0.1016,0.9435 L0.0606,0.9059 Q0.0317,0.879,0.0159,0.8438 T0,0.7699 Z M0.5459,0.7699 Q0.5459,0.7172,0.5736,0.6731 T0.6489,0.6032 T0.7525,0.5774 Q0.7946,0.5774,0.8324,0.5922 T0.8984,0.6339 L0.9394,0.6715 Q0.9579,0.6892,0.9714,0.7105 T0.9925,0.7567 T1,0.8075 Q1,0.8602,0.9723,0.9046 T0.897,0.9745 T0.7934,1 Q0.7513,1,0.7135,0.9852 T0.6474,0.9435 L0.6065,0.9059 Q0.5776,0.879,0.5617,0.8438 T0.5459,0.7699 Z M0,0.1925 Q0,0.1398,0.0277,0.0957 T0.103,0.0258 T0.2066,0 Q0.2487,0,0.2865,0.0148 T0.3526,0.0565 L0.3935,0.0941 Q0.4218,0.121,0.438,0.1562 T0.4541,0.2301 Q0.4541,0.2828,0.4264,0.3269 T0.3511,0.3968 T0.2475,0.4226 Q0.2054,0.4226,0.1676,0.4078 T0.1016,0.3661 L0.0606,0.3285 Q0.0317,0.3016,0.0159,0.2664 T0,0.1925 Z M0.5459,0.1925 Q0.5459,0.1398,0.5736,0.0957 T0.6489,0.0258 T0.7525,0 Q0.7946,0,0.8324,0.0148 T0.8984,0.0565 L0.9394,0.0941 Q0.9677,0.121,0.9838,0.1562 T1,0.2301 Q1,0.2828,0.9723,0.3269 T0.897,0.3968 T0.7934,0.4226 Q0.7513,0.4226,0.7135,0.4078 T0.6474,0.3661 L0.6065,0.3285 Q0.5874,0.3108,0.5741,0.2895 T0.5534,0.2433 T0.5459,0.1925 Z M0.3301,0.6403 Q0.3306,0.6403,0.3312,0.6409 L0.3272,0.6371 L0.3272,0.6371 Z M0.8759,0.6403 Q0.8765,0.6403,0.8771,0.6409 Q0.8748,0.6387,0.8725,0.6371 L0.8731,0.6371 Z M0.3301,0.0629 Q0.3306,0.0629,0.3312,0.0634 L0.3272,0.0597 L0.3272,0.0602 Z M0.8759,0.0629 Q0.8765,0.0629,0.8771,0.0634 Q0.8748,0.0613,0.8725,0.0597 Q0.8731,0.0597,0.8731,0.0602 Z M0.779,0.4113 L0.7501,0.3849 Q0.7046,0.3844,0.6636,0.3661 Q0.7132,0.407,0.779,0.4113 Z M0.7957,0.4118 Q0.8477,0.4113,0.8918,0.3874 T0.9619,0.3223 T0.9885,0.2323 L0.9585,0.2048 Q0.9538,0.2769,0.8987,0.3282 T0.7657,0.3844 Z M0.9879,0.2167 Q0.9827,0.1554,0.9388,0.1097 Q0.9585,0.1478,0.959,0.1898 Z M0.2331,0.4113 L0.2043,0.3849 Q0.1587,0.3844,0.1177,0.3661 Q0.1673,0.407,0.2331,0.4113 Z M0.2499,0.4118 Q0.2885,0.4118,0.324,0.3973 T0.3852,0.3589 T0.4264,0.3019 T0.4426,0.2323 L0.4126,0.2048 Q0.408,0.2769,0.3529,0.3282 T0.2198,0.3844 Z M0.442,0.2167 Q0.4368,0.1554,0.393,0.1097 Q0.4126,0.1478,0.4132,0.1903 Z M0.779,0.9887 L0.7501,0.9624 Q0.7046,0.9618,0.6636,0.9435 Q0.7132,0.9844,0.779,0.9887 Z M0.7957,0.9892 Q0.8477,0.9887,0.8918,0.9648 T0.9619,0.8997 T0.9885,0.8097 L0.9585,0.7823 Q0.9538,0.8543,0.8987,0.9056 T0.7657,0.9618 Z M0.9879,0.7941 Q0.9827,0.7328,0.9388,0.6871 Q0.9585,0.7253,0.959,0.7672 Z M0.2331,0.9887 L0.2043,0.9624 Q0.1587,0.9618,0.1177,0.9435 Q0.1673,0.9844,0.2331,0.9887 Z M0.2499,0.9892 Q0.3018,0.9887,0.3459,0.9648 T0.416,0.8997 T0.4426,0.8102 L0.4126,0.7823 Q0.408,0.8543,0.3529,0.9056 T0.2198,0.9618 Z M0.442,0.7941 Q0.4368,0.7328,0.393,0.6871 Q0.4126,0.7253,0.4132,0.7672 Z M0.3191,0.6452 Q0.2943,0.622,0.2643,0.6091 T0.2066,0.5962 Q0.1795,0.5962,0.1497,0.6091 T0.0949,0.6441 T0.0537,0.6995 T0.0375,0.7699 Q0.0375,0.8419,0.0941,0.8941 Q0.1189,0.9172,0.1489,0.9304 T0.2066,0.9435 Q0.2337,0.9435,0.2634,0.9304 T0.3182,0.8952 T0.3595,0.8398 T0.3756,0.7699 Q0.3756,0.6978,0.3191,0.6452 Z M0.026,0.7731 L0.026,0.7699 Q0.026,0.6935,0.0854,0.6376 Q0.0658,0.6538,0.0514,0.6739 T0.0289,0.718 T0.0202,0.7677 Z M0.0271,0.7892 L0.0208,0.7833 Q0.0254,0.8419,0.0681,0.886 Q0.0664,0.8828,0.0646,0.879 Q0.0329,0.8382,0.0271,0.7892 Z M0.3866,0.7823 Q0.382,0.8511,0.3278,0.9016 Q0.3843,0.8565,0.3918,0.7871 Z M0.3872,0.7677 L0.393,0.7726 L0.393,0.7699 Q0.393,0.7349,0.3791,0.7038 Q0.3739,0.6973,0.3681,0.6914 Q0.3866,0.7274,0.3872,0.7677 Z M0.865,0.6452 Q0.8402,0.622,0.8102,0.6091 T0.7525,0.5962 Q0.7305,0.5962,0.7072,0.6043 T0.6619,0.628 T0.6223,0.6642 T0.5941,0.7124 T0.5834,0.7699 Q0.5834,0.8419,0.6399,0.8941 Q0.6561,0.9097,0.6757,0.9207 T0.7149,0.9376 T0.7525,0.9435 Q0.7796,0.9435,0.8093,0.9304 T0.8641,0.8952 T0.9054,0.8398 T0.9215,0.7699 Q0.9215,0.6978,0.865,0.6452 Z M0.5718,0.7731 L0.5718,0.7699 Q0.5718,0.6935,0.6313,0.6376 Q0.6013,0.6618,0.584,0.6954 T0.5661,0.7677 Z M0.573,0.7892 L0.5666,0.7833 Q0.5713,0.8419,0.614,0.886 Q0.6122,0.8828,0.6105,0.879 Q0.5788,0.8382,0.573,0.7892 Z M0.9325,0.7823 Q0.9279,0.8511,0.8736,0.9016 Q0.9308,0.8565,0.9377,0.7871 Z M0.9331,0.7672 L0.9388,0.7726 L0.9388,0.7699 Q0.9388,0.7349,0.925,0.7038 Q0.9198,0.6973,0.914,0.6914 Q0.9325,0.7274,0.9331,0.7672 Z M0.3191,0.0677 Q0.2943,0.0446,0.2643,0.0317 T0.2066,0.0188 Q0.1795,0.0188,0.1497,0.0317 T0.0949,0.0667 T0.0537,0.122 T0.0375,0.1925 Q0.0375,0.2645,0.0941,0.3167 Q0.1189,0.3398,0.1489,0.353 T0.2066,0.3661 Q0.2337,0.3661,0.2634,0.353 T0.3182,0.3177 T0.3595,0.2624 T0.3756,0.1925 Q0.3756,0.1204,0.3191,0.0677 Z M0.026,0.1957 L0.026,0.1925 Q0.026,0.1161,0.0854,0.0602 Q0.0554,0.0844,0.0381,0.118 T0.0202,0.1903 Z M0.0271,0.2118 L0.0208,0.2059 Q0.0254,0.2645,0.0681,0.3086 Q0.0664,0.3054,0.0646,0.3016 Q0.0329,0.2608,0.0271,0.2118 Z M0.3866,0.2048 Q0.382,0.2737,0.3278,0.3242 Q0.3849,0.279,0.3918,0.2097 Z M0.3872,0.1903 L0.393,0.1952 L0.393,0.1925 Q0.393,0.1581,0.3791,0.1263 Q0.3739,0.1199,0.3681,0.114 Q0.3866,0.15,0.3872,0.1903 Z M0.865,0.0677 Q0.8402,0.0446,0.8102,0.0317 T0.7525,0.0188 Q0.7253,0.0188,0.6956,0.0317 T0.6408,0.0667 T0.5995,0.122 T0.5834,0.1925 Q0.5834,0.2645,0.6399,0.3167 Q0.6647,0.3398,0.6947,0.353 T0.7525,0.3661 Q0.7796,0.3661,0.8093,0.353 T0.8641,0.3177 T0.9054,0.2624 T0.9215,0.1925 Q0.9215,0.1204,0.865,0.0677 Z M0.5718,0.1957 L0.5718,0.1925 Q0.5718,0.1161,0.6313,0.0602 Q0.6013,0.0844,0.584,0.118 T0.5661,0.1903 Z M0.573,0.2118 L0.5666,0.2059 Q0.5713,0.2645,0.614,0.3086 Q0.6122,0.3054,0.6105,0.3016 Q0.5788,0.2608,0.573,0.2118 Z M0.9325,0.2048 Q0.9279,0.2737,0.8736,0.3242 Q0.9308,0.279,0.9377,0.2097 Z M0.9331,0.1898 L0.9388,0.1952 L0.9388,0.1925 Q0.9388,0.1575,0.925,0.1263 Q0.9198,0.1199,0.914,0.114 Q0.9325,0.15,0.9331,0.1898 Z`,type:0}},"":{type:5,data:{d:`M0.7639,0.1974 L0.9593,0.1974 L0.9593,0.1443 L0.7639,0.1443 L0.7639,0.1974 Z M0.7586,0.109 L0.9727,0.109 Q0.9839,0.109,0.992,0.1153 T1,0.1291 L1,0.382 Q1,0.3906,0.9912,0.3964 T0.9727,0.4021 L0.7586,0.4021 Q0.7468,0.4021,0.739,0.3956 T0.7313,0.382 L0.7313,0.1291 Q0.7313,0.1246,0.7339,0.1207 T0.7406,0.1143 T0.7495,0.1104 T0.7586,0.109 Z M0.7639,0.6575 L0.9593,0.6575 L0.9593,0.6044 L0.7639,0.6044 L0.7639,0.6575 Z M0.7313,0.8347 L0.7313,0.5843 Q0.7313,0.5757,0.7401,0.5699 T0.7586,0.5641 L0.9706,0.5641 Q0.9818,0.5641,0.9898,0.5705 T0.9979,0.5843 L0.9979,0.8347 Q0.9979,0.8433,0.989,0.8491 T0.9706,0.8549 L0.7586,0.8549 Q0.7468,0.8549,0.739,0.8483 T0.7313,0.8347 Z M0,1 L0,0 L0.7607,0 L0.7607,1 L0,1 Z`,type:0}},"":{type:5,data:{d:`M0.9764,0.0029 L0.3179,0.4552 L0,0.4552 L0,0 Z M1,1 L0,1 L0,0.5448 L0.3091,0.5448 Z`,type:0}},"":{type:5,data:{d:`M0.0236,0.0029 L0.6824,0.4552 L1,0.4552 L1,0 Z M0,1 L1,1 L1,0.5448 L0.6912,0.5448 Z`,type:0}},"":{type:3,data:`M0,0 L1,0 L1,.05 L.1,.05 L.1,.95 L1,.95 L1,1 L0,1 Z`},"":{type:3,data:`M0,0 L1,0 L1,.05 L0,.05 Z M0,.95 L1,.95 L1,1 L0,1 Z`},"":{type:3,data:`M1,0 L0,0 L0,.05 L.9,.05 L.9,.95 L0,.95 L0,1 L1,1 Z`},"":{type:3,data:`M0,0 L1,0 L1,.05 L.1,.05 L.1,.95 L1,.95 L1,1 L0,1 Z M.25,.15 L1,.15 L1,.85 L.25,.85 Z`},"":{type:3,data:`M0,0 L1,0 L1,.05 L0,.05 Z M0,.95 L1,.95 L1,1 L0,1 Z M0,.15 L1,.15 L1,.85 L0,.85 Z`},"":{type:3,data:`M1,0 L0,0 L0,.05 L.9,.05 L.9,.95 L0,.95 L0,1 L1,1 Z M0,.15 L.75,.15 L.75,.85 L0,.85 Z`},"":{type:5,data:{d:`M0.6574,0.303 Q0.623,0.291,0.5852,0.285 T0.5082,0.279 T0.4311,0.285 T0.359,0.303 L0.3082,0.248 Q0.3525,0.232,0.4041,0.2235 T0.5082,0.215 T0.6123,0.2235 T0.7082,0.248 Z`,type:0},scaleType:1},"":{type:5,data:{d:`M0.8557,0.582 L0.7656,0.551 Q0.7852,0.53,0.7951,0.507 T0.8049,0.46 Q0.8049,0.424,0.782,0.3905 T0.718,0.332 T0.6221,0.293 T0.5082,0.279 L0.5082,0.215 Q0.5607,0.215,0.6123,0.2235 T0.709,0.248 T0.7918,0.287 T0.8557,0.3375 T0.8959,0.3965 T0.9098,0.46 T0.8959,0.5235 T0.8557,0.582 Z`,type:0},scaleType:1},"":{type:5,data:{d:`M0.5082,0.705 Q0.482,0.705,0.4557,0.703 T0.4049,0.697 L0.4311,0.635 Q0.4508,0.638,0.4697,0.6395 T0.5082,0.641 Q0.5672,0.641,0.6221,0.627 T0.718,0.588 T0.782,0.5295 T0.8049,0.46 Q0.8049,0.436,0.7951,0.413 T0.7656,0.369 L0.8557,0.338 Q0.882,0.365,0.8959,0.3965 T0.9098,0.46 T0.8959,0.5235 T0.8557,0.5825 T0.7918,0.633 T0.709,0.672 T0.6123,0.6965 T0.5082,0.705 Z`,type:0},scaleType:1},"":{type:5,data:{d:`M0.5082,0.705 Q0.4557,0.705,0.4041,0.6965 T0.3074,0.672 T0.2246,0.633 T0.1607,0.5825 T0.1205,0.5235 T0.1066,0.46 L0.2115,0.46 Q0.2115,0.496,0.2344,0.5295 T0.2984,0.588 T0.3943,0.627 T0.5082,0.641 T0.6221,0.627 T0.718,0.588 T0.782,0.5295 T0.8049,0.46 L0.9098,0.46 Q0.9098,0.492,0.8959,0.5235 T0.8557,0.5825 T0.7918,0.633 T0.709,0.672 T0.6123,0.6965 T0.5082,0.705 Z`,type:0},scaleType:1},"":{type:5,data:{d:`M0.5082,0.705 Q0.4557,0.705,0.4041,0.6965 T0.3074,0.672 T0.2246,0.633 T0.1607,0.5825 T0.1205,0.5235 T0.1066,0.46 T0.1205,0.3965 T0.1607,0.338 L0.2508,0.369 Q0.2311,0.39,0.2213,0.413 T0.2115,0.46 Q0.2115,0.496,0.2344,0.5295 T0.2984,0.588 T0.3943,0.627 T0.5082,0.641 Q0.5279,0.641,0.5467,0.6395 T0.5852,0.635 L0.6115,0.697 Q0.5869,0.701,0.5607,0.703 T0.5082,0.705 Z`,type:0},scaleType:1},"":{type:5,data:{d:`M0.1607,0.582 Q0.1344,0.555,0.1205,0.5235 T0.1066,0.46 T0.1205,0.3965 T0.1607,0.3375 T0.2246,0.287 T0.3074,0.248 T0.4041,0.2235 T0.5082,0.215 L0.5082,0.279 Q0.4492,0.279,0.3943,0.293 T0.2984,0.332 T0.2344,0.3905 T0.2115,0.46 Q0.2115,0.484,0.2213,0.507 T0.2508,0.551 Z`,type:0},scaleType:1},"":K.LINE_H,"":K.LINE_V,"":K.FADE_RIGHT,"":K.FADE_LEFT,"":K.FADE_DOWN,"":K.FADE_UP,"":K.CURVE_DOWN_RIGHT,"":K.CURVE_DOWN_LEFT,"":K.CURVE_UP_RIGHT,"":K.CURVE_UP_LEFT,"":[K.LINE_V,K.CURVE_UP_RIGHT],"":[K.LINE_V,K.CURVE_DOWN_RIGHT],"":[K.CURVE_DOWN_RIGHT,K.CURVE_UP_RIGHT],"":[K.LINE_V,K.CURVE_UP_LEFT],"":[K.LINE_V,K.CURVE_DOWN_LEFT],"":[K.CURVE_DOWN_LEFT,K.CURVE_UP_LEFT],"":[K.LINE_H,K.CURVE_DOWN_LEFT],"":[K.LINE_H,K.CURVE_DOWN_RIGHT],"":[K.CURVE_DOWN_LEFT,K.CURVE_DOWN_RIGHT],"":[K.LINE_H,K.CURVE_UP_LEFT],"":[K.LINE_H,K.CURVE_UP_RIGHT],"":[K.CURVE_UP_LEFT,K.CURVE_UP_RIGHT],"":[K.LINE_V,K.CURVE_UP_LEFT,K.CURVE_UP_RIGHT],"":[K.LINE_V,K.CURVE_DOWN_LEFT,K.CURVE_DOWN_RIGHT],"":[K.LINE_H,K.CURVE_DOWN_LEFT,K.CURVE_UP_LEFT],"":[K.LINE_H,K.CURVE_DOWN_RIGHT,K.CURVE_UP_RIGHT],"":[K.LINE_V,K.CURVE_DOWN_RIGHT,K.CURVE_UP_LEFT],"":[K.LINE_V,K.CURVE_DOWN_LEFT,K.CURVE_UP_RIGHT],"":[K.LINE_H,K.CURVE_DOWN_RIGHT,K.CURVE_UP_LEFT],"":[K.LINE_H,K.CURVE_DOWN_LEFT,K.CURVE_UP_RIGHT],"":[K.NODE_FILL,K.NODE_STROKE],"":K.NODE_STROKE,"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_RIGHT],"":[K.NODE_STROKE,K.NODE_LINE_RIGHT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_LEFT],"":[K.NODE_STROKE,K.NODE_LINE_LEFT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_LEFT,K.NODE_LINE_RIGHT],"":[K.NODE_STROKE,K.NODE_LINE_LEFT,K.NODE_LINE_RIGHT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_DOWN],"":[K.NODE_STROKE,K.NODE_LINE_DOWN],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_UP],"":[K.NODE_STROKE,K.NODE_LINE_UP],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_DOWN,K.NODE_LINE_UP],"":[K.NODE_STROKE,K.NODE_LINE_DOWN,K.NODE_LINE_UP],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_DOWN,K.NODE_LINE_RIGHT],"":[K.NODE_STROKE,K.NODE_LINE_DOWN,K.NODE_LINE_RIGHT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_DOWN,K.NODE_LINE_LEFT],"":[K.NODE_STROKE,K.NODE_LINE_DOWN,K.NODE_LINE_LEFT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_RIGHT],"":[K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_RIGHT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_LEFT],"":[K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_LEFT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_DOWN,K.NODE_LINE_RIGHT],"":[K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_DOWN,K.NODE_LINE_RIGHT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_DOWN,K.NODE_LINE_LEFT],"":[K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_DOWN,K.NODE_LINE_LEFT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_DOWN,K.NODE_LINE_LEFT,K.NODE_LINE_RIGHT],"":[K.NODE_STROKE,K.NODE_LINE_DOWN,K.NODE_LINE_LEFT,K.NODE_LINE_RIGHT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_LEFT,K.NODE_LINE_RIGHT],"":[K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_LEFT,K.NODE_LINE_RIGHT],"":[K.NODE_FILL,K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_DOWN,K.NODE_LINE_LEFT,K.NODE_LINE_RIGHT],"":[K.NODE_STROKE,K.NODE_LINE_UP,K.NODE_LINE_DOWN,K.NODE_LINE_LEFT,K.NODE_LINE_RIGHT],"🬀":gr(1),"🬁":gr(2),"🬂":gr(3),"🬃":gr(4),"🬄":gr(5),"🬅":gr(6),"🬆":gr(7),"🬇":gr(8),"🬈":gr(9),"🬉":gr(10),"🬊":gr(11),"🬋":gr(12),"🬌":gr(13),"🬍":gr(14),"🬎":gr(15),"🬏":gr(16),"🬐":gr(17),"🬑":gr(18),"🬒":gr(19),"🬓":gr(20),"🬔":gr(22),"🬕":gr(23),"🬖":gr(24),"🬗":gr(25),"🬘":gr(26),"🬙":gr(27),"🬚":gr(28),"🬛":gr(29),"🬜":gr(30),"🬝":gr(31),"🬞":gr(32),"🬟":gr(33),"🬠":gr(34),"🬡":gr(35),"🬢":gr(36),"🬣":gr(37),"🬤":gr(38),"🬥":gr(39),"🬦":gr(40),"🬧":gr(41),"🬨":gr(43),"🬩":gr(44),"🬪":gr(45),"🬫":gr(46),"🬬":gr(47),"🬭":gr(48),"🬮":gr(49),"🬯":gr(50),"🬰":gr(51),"🬱":gr(52),"🬲":gr(53),"🬳":gr(54),"🬴":gr(55),"🬵":gr(56),"🬶":gr(57),"🬷":gr(58),"🬸":gr(59),"🬹":gr(60),"🬺":gr(61),"🬻":gr(62),"🬼":{type:3,data:`M0,0.6667 L0,1 L0.5,1 Z`},"🬽":{type:3,data:`M0,0.6667 L0,1 L1,1 Z`},"🬾":{type:3,data:`M0,0.3333 L0,1 L0.5,1 Z`},"🬿":{type:3,data:`M0,0.3333 L0,1 L1,1 Z`},"🭀":{type:3,data:`M0,0 L0,1 L0.5,1 Z`},"🭁":{type:3,data:`M0,0.3333 L0.5,0 L1,0 L1,1 L0,1 Z`},"🭂":{type:3,data:`M0,0.3333 L1,0 L1,1 L0,1 Z`},"🭃":{type:3,data:`M0,0.6667 L0.5,0 L1,0 L1,1 L0,1 Z`},"🭄":{type:3,data:`M0,0.6667 L1,0 L1,1 L0,1 Z`},"🭅":{type:3,data:`M0,1 L0.5,0 L1,0 L1,1 Z`},"🭆":{type:3,data:`M0,0.6667 L1,0.3333 L1,1 L0,1 Z`},"🭇":{type:3,data:`M0.5,1 L1,0.6667 L1,1 Z`},"🭈":{type:3,data:`M0,1 L1,0.6667 L1,1 Z`},"🭉":{type:3,data:`M0.5,1 L1,0.3333 L1,1 Z`},"🭊":{type:3,data:`M0,1 L1,0.3333 L1,1 Z`},"🭋":{type:3,data:`M0.5,1 L1,0 L1,1 Z`},"🭌":{type:3,data:`M0.5,0 L0,0 L0,1 L1,1 L1,0.3333 Z`},"🭍":{type:3,data:`M0,0 L0,1 L1,1 L1,0.3333 Z`},"🭎":{type:3,data:`M0.5,0 L0,0 L0,1 L1,1 L1,0.6667 Z`},"🭏":{type:3,data:`M0,0 L0,1 L1,1 L1,0.6667 Z`},"🭐":{type:3,data:`M0.5,0 L0,0 L0,1 L1,1 Z`},"🭑":{type:3,data:`M0,0.3333 L0,1 L1,1 L1,0.6667 Z`},"🭒":{type:3,data:`M0,0.6667 L0.5,1 L1,1 L1,0 L0,0 Z`},"🭓":{type:3,data:`M0,0.6667 L1,1 L1,0 L0,0 Z`},"🭔":{type:3,data:`M0,0.3333 L0.5,1 L1,1 L1,0 L0,0 Z`},"🭕":{type:3,data:`M0,0.3333 L1,1 L1,0 L0,0 Z`},"🭖":{type:3,data:`M0,0 L0.5,1 L1,1 L1,0 Z`},"🭗":{type:3,data:`M0,0.3333 L0,0 L0.5,0 Z`},"🭘":{type:3,data:`M0,0.3333 L0,0 L1,0 Z`},"🭙":{type:3,data:`M0,0.6667 L0,0 L0.5,0 Z`},"🭚":{type:3,data:`M0,0.6667 L0,0 L1,0 Z`},"🭛":{type:3,data:`M0,1 L0,0 L0.5,0 Z`},"🭜":{type:3,data:`M0,0.6667 L0,0 L1,0 L1,0.3333 Z`},"🭝":{type:3,data:`M0.5,1 L0,1 L0,0 L1,0 L1,0.6667 Z`},"🭞":{type:3,data:`M0,1 L0,0 L1,0 L1,0.6667 Z`},"🭟":{type:3,data:`M0.5,1 L0,1 L0,0 L1,0 L1,0.3333 Z`},"🭠":{type:3,data:`M0,1 L0,0 L1,0 L1,0.3333 Z`},"🭡":{type:3,data:`M0.5,1 L0,1 L0,0 L1,0 Z`},"🭢":{type:3,data:`M0.5,0 L1,0 L1,0.3333 Z`},"🭣":{type:3,data:`M0,0 L1,0 L1,0.3333 Z`},"🭤":{type:3,data:`M0.5,0 L1,0 L1,0.6667 Z`},"🭥":{type:3,data:`M0,0 L1,0 L1,0.6667 Z`},"🭦":{type:3,data:`M0.5,0 L1,0 L1,1 Z`},"🭧":{type:3,data:`M0,0.3333 L1,0.6667 L1,0 L0,0 Z`},"🭨":{type:3,data:`M0,0 L1,0 L1,1 L0,1 L0.5,0.5 Z`},"🭩":{type:3,data:`M0,0 L0.5,0.5 L1,0 L1,1 L0,1 Z`},"🭪":{type:3,data:`M0,0 L1,0 L0.5,0.5 L1,1 L0,1 Z`},"🭫":{type:3,data:`M0,0 L1,0 L1,1 L0.5,0.5 L0,1 Z`},"🭬":{type:3,data:`M0,0 L0.5,0.5 L0,1 Z`},"🭭":{type:3,data:`M0,0 L1,0 L0.5,0.5 Z`},"🭮":{type:3,data:`M1,0 L1,1 L0.5,0.5 Z`},"🭯":{type:3,data:`M0,1 L1,1 L0.5,0.5 Z`},"🭰":{type:0,data:[{x:1,y:0,w:1,h:8}]},"🭱":{type:0,data:[{x:2,y:0,w:1,h:8}]},"🭲":{type:0,data:[{x:3,y:0,w:1,h:8}]},"🭳":{type:0,data:[{x:4,y:0,w:1,h:8}]},"🭴":{type:0,data:[{x:5,y:0,w:1,h:8}]},"🭵":{type:0,data:[{x:6,y:0,w:1,h:8}]},"🭶":{type:0,data:[{x:0,y:1,w:8,h:1}]},"🭷":{type:0,data:[{x:0,y:2,w:8,h:1}]},"🭸":{type:0,data:[{x:0,y:3,w:8,h:1}]},"🭹":{type:0,data:[{x:0,y:4,w:8,h:1}]},"🭺":{type:0,data:[{x:0,y:5,w:8,h:1}]},"🭻":{type:0,data:[{x:0,y:6,w:8,h:1}]},"🭼":{type:0,data:[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}]},"🭽":{type:0,data:[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}]},"🭾":{type:0,data:[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}]},"🭿":{type:0,data:[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}]},"🮀":{type:0,data:[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}]},"🮁":{type:0,data:[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}]},"🮂":{type:0,data:[{x:0,y:0,w:8,h:2}]},"🮃":{type:0,data:[{x:0,y:0,w:8,h:3}]},"🮄":{type:0,data:[{x:0,y:0,w:8,h:5}]},"🮅":{type:0,data:[{x:0,y:0,w:8,h:6}]},"🮆":{type:0,data:[{x:0,y:0,w:8,h:7}]},"🮇":{type:0,data:[{x:6,y:0,w:2,h:8}]},"🮈":{type:0,data:[{x:5,y:0,w:3,h:8}]},"🮉":{type:0,data:[{x:3,y:0,w:5,h:8}]},"🮊":{type:0,data:[{x:2,y:0,w:6,h:8}]},"🮋":{type:0,data:[{x:1,y:0,w:7,h:8}]},"🮌":{type:1,data:[[1,0],[0,1]],clipPath:`M0,0 L0.5,0 L0.5,1 L0,1 Z`},"🮍":{type:1,data:[[1,0],[0,1]],clipPath:`M0.5,0 L1,0 L1,1 L0.5,1 Z`},"🮎":{type:1,data:[[1,0],[0,1]],clipPath:`M0,0 L1,0 L1,0.5 L0,0.5 Z`},"🮏":{type:1,data:[[1,0],[0,1]],clipPath:`M0,0.5 L1,0.5 L1,1 L0,1 Z`},"🮐":{type:1,data:[[0,1],[1,0]]},"🮑":[{type:1,data:[[0,1],[1,0]],clipPath:`M0,0.5 L1,0.5 L1,1 L0,1 Z`},{type:0,data:[{x:0,y:0,w:8,h:4}]}],"🮒":[{type:1,data:[[0,1],[1,0]],clipPath:`M0,0 L1,0 L1,0.5 L0,0.5 Z`},{type:0,data:[{x:0,y:4,w:8,h:4}]}],"🮔":[{type:1,data:[[0,1],[1,0]],clipPath:`M0,0 L0.5,0 L0.5,1 L0,1 Z`},{type:0,data:[{x:4,y:0,w:4,h:8}]}],"🮕":{type:0,data:[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}]},"🮖":{type:0,data:[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}]},"🮗":{type:0,data:[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]},"🮘":{type:2,data:`M-0.25,-0.25 L1.25,1.25 M-0.25,0 L1,1.25 M-0.25,0.25 L0.75,1.25 M-0.25,0.5 L0.5,1.25 M0,-0.25 L1.25,1 M0.25,-0.25 L1.25,0.75 M0.5,-0.25 L1.25,0.5 M-0.25,0.75 L0.25,1.25 M0.75,-0.25 L1.25,0.25`,strokeWidth:1},"🮙":{type:2,data:`M-0.25,0.5 L0.5,-0.25 M-0.25,0.75 L0.75,-0.25 M-0.25,1 L1,-0.25 M-0.25,1.25 L1.25,-0.25 M0,1.25 L1.25,0 M0.25,1.25 L1.25,0.25 M0.5,1.25 L1.25,0.5 M-0.25,0.25 L0.25,-0.25 M0.75,1.25 L1.25,0.75`,strokeWidth:1},"🮚":{type:5,data:{d:`M0,0 L.5,.5 L0,1 L1,1 L.5,.5 L1,0`,type:0}},"🮛":{type:5,data:{d:`M0,0 L.5,.5 L1,0 L1,1 L.5,.5 L0,1`,type:0}},"🮜":{type:1,data:[[1,0],[0,1]],clipPath:`M0,0 L1,0 L0,1 Z`},"🮝":{type:1,data:[[1,0],[0,1]],clipPath:`M0,0 L1,0 L1,1 Z`},"🮞":{type:1,data:[[1,0],[0,1]],clipPath:`M1,0 L1,1 L0,1 Z`},"🮟":{type:1,data:[[1,0],[0,1]],clipPath:`M0,0 L1,1 L0,1 Z`},"🮠":{type:2,data:`M.5,0 L0,.5`,strokeWidth:1},"🮡":{type:2,data:`M.5,0 L1,.5`,strokeWidth:1},"🮢":{type:2,data:`M0,.5 L.5,1`,strokeWidth:1},"🮣":{type:2,data:`M1,.5 L.5,1`,strokeWidth:1},"🮤":{type:2,data:`M.5,0 L0,.5 L.5,1`,strokeWidth:1},"🮥":{type:2,data:`M.5,0 L1,.5 L.5,1`,strokeWidth:1},"🮦":{type:2,data:`M0,.5 L.5,1 L1,.5`,strokeWidth:1},"🮧":{type:2,data:`M0,.5 L.5,0 L1,.5`,strokeWidth:1},"🮨":{type:2,data:`M.5,0 L0,.5 M1,.5 L.5,1`,strokeWidth:1},"🮩":{type:2,data:`M.5,0 L1,.5 M0,.5 L.5,1`,strokeWidth:1},"🮪":{type:2,data:`M.5,0 L1,.5 L.5,1 L0,.5`,strokeWidth:1},"🮫":{type:2,data:`M.5,0 L0,.5 L.5,1 L1,.5`,strokeWidth:1},"🮬":{type:2,data:`M0,.5 L.5,0 L1,.5 L.5,1`,strokeWidth:1},"🮭":{type:2,data:`M1,.5 L.5,0 L0,.5 L.5,1`,strokeWidth:1},"🮮":{type:2,data:`M.5,0 L1,.5 L.5,1 L0,.5 Z`,strokeWidth:1},"🮯":{type:2,data:`M0,.5 L1,.5 M.5,.35 L.5,.65`,strokeWidth:1},"🮰":{type:3,data:`M0.1,0.2 L0.1,.8 L.4,.6 L.9,0.6 Z`,scaleType:1},"🮱":{type:4,data:{d:`M.1,.525 L.35,.675 L.9,.35`,type:1},scaleType:1},"🮲":{type:3,data:`M.29,.27 L0.13,.56 L.22,.59 L.35,0.35 L.67,.35 L.57,.57 L.71,.76 L.22,.76 L.42,1 L.53,.98 L.43,.86 L.9,.86 L.71,.6 L1,.6 L1,.52 L.83,.52 L.92,.36 L1,.36 L1,.27Z M.99,.13 A.12,.12,0,1,1,.75,.13 A.12,.12,0,1,1,.99,.13`},"🮳":{type:3,data:`M0,.27 L.3,.27 L.55,.12 L.63,.18 L.33,.36 L0,.36 M0,.52 L.33,.52 L.59,.89 L.73,.89 L.73,.98 L.53,.98 L.28,.6 L0,.6`},"🮴":{type:4,data:{d:`M.15,.55 L.5,.4 L.5,.45 L.65,.45 L.65,.35 L.85,.35 L.85,.625 L.5,.625 L.5,.7 Z`,type:0},scaleType:1},"🮵":[{type:5,data:{d:`M0,0 L1,0 L1,.0625 L0,.0625 Z M0,.9375 L1,.9375 L1,1 L0,1 Z`,type:0}},{type:5,data:{d:`M.15,.5 L.5,.35 L.5,.425 L.85,.425 L.85,.575 L.5,.575 L.5,.65 Z`,type:0},scaleType:1}],"🮶":[{type:5,data:{d:`M0,0 L1,0 L1,.0625 L0,.0625 Z M0,.9375 L1,.9375 L1,1 L0,1 Z`,type:0}},{type:5,data:{d:`M.85,.5 L.5,.35 L.5,.425 L.15,.425 L.15,.575 L.5,.575 L.5,.65 Z`,type:0},scaleType:1}],"🮷":[{type:5,data:{d:`M.875,0 L1,0 L1,1 L.875,1 Z`,type:0}},{type:5,data:{d:`M.5,.675 L.2,.5 L.35,.5 L.35,.325 L.65,.325 L.65,.5 L.8,.5 Z`,type:0},scaleType:1}],"🮸":[{type:5,data:{d:`M.875,0 L1,0 L1,1 L.875,1 Z`,type:0}},{type:5,data:{d:`M.5,.325 L.2,.5 L.35,.5 L.35,.675 L.65,.675 L.65,.5 L.8,.5 Z`,type:0},scaleType:1}],"🮹":{type:5,data:{d:`M1,.89 L.11,.89 L.11,.37 L.36,.12 L.74,.12 L.96,.34 L1,.34 L1,.405 L.92,.405 L.69,.185 L.41,.185 L.21,.42 L.21,.825 L1,.825 Z`,type:0}},"🮺":{type:5,data:{d:`M0,.89 L0,.825 L.78,.825 L.78,.53 L.7,.415 L0,.415 L0,.35 L.75,.35 L.88,.48 L.88,.89 Z`,type:0}},"🮻":{type:5,data:{d:`M.31,.275 L.44,.275 L.44,.47 L.05,.47 L.05,.405 L.31,.405 Z M.56,.275 L.69,.275 L.69,.405 L.95,.405 L.95,.47 L.56,.47 Z M.05,.53 L.44,.53 L.44,.725 L.31,.725 L.31,.595 L.05,.595 Z M.56,.53 L.95,.53 L.95,.595 L.69,.595 L.69,.725 L.56,.725 Z`,type:0},scaleType:1},"🮼":[{type:3,data:`M0,0 L1,0 L1,1 L0,1 L0,.935 L.885,.935 L.885,.065 L0,.065 Z`},{type:3,data:`M.67,.5 A.17,.085,0,1,1,.33,.5 A.17,.085,0,1,1,.67,.5`,scaleType:1}],"🮽":{type:4,data:{d:`M0,0 L.5,.5 L1,0 L1,1 L.5,.5 L0,1 Z`,type:1}},"🮾":{type:4,data:{d:`M1,.5 L.5,1`,type:1}},"🮿":{type:4,data:{d:`M.5,0 L1,.5 L.5,1 L0,.5 Z`,type:1}},"🯀":{type:3,data:`M.16,.445 A.02,.01,0,0,1,.39,.33 L.5,.375 L.61,.33 A.02,.01,0,0,1,.84,.445 L.75,.5 L.84,.555 A.02,.01,0,0,1,.61,.67 L.5,.625 L.39,.67 A.02,.01,0,0,1,.16,.555 L.25,.5 Z M.24,.41 L.39,.5 L.24,.59 L.32,.63 L.5,.555 L.68,.63 L.76,.59 L.61,.5 L.76,.41 L.68,.37 L.5,.445 L.32,.37 Z`,scaleType:1},"🯁":{type:3,data:`M0.142308,0.924 Q0.130770,0.924,0.120193,0.922 T0.101924,0.916 T0.089424,0.9065 T0.084616,0.895 V0.025 Q0.084616,0.019,0.089424,0.0135 T0.101924,0.004 T0.120193,-0.002 T0.142308,-0.004 Q0.150000,-0.004,0.157693,-0.003 T0.173078,0.000 L0.430770,0.085 Q0.451924,0.059,0.494232,0.041 T0.587501,0.013 T0.692309,-0.0005 T0.800001,-0.004 H1 V0.055 H0.800001 Q0.771155,0.055,0.742309,0.056 T0.685578,0.060 T0.630770,0.0685 T0.580770,0.0825 T0.543270,0.1045 T0.528847,0.133 V0.647 H0.530770 Q0.596155,0.645,0.659616,0.638 T0.782693,0.6165 T0.893270,0.5805 T1,0.531 V0.623 Q0.934616,0.644,0.880770,0.6595 T0.769232,0.685 T0.650963,0.700 T0.528847,0.707 V0.787 Q0.528847,0.802,0.543270,0.8155 T0.580770,0.8375 T0.630770,0.8515 T0.685578,0.860 T0.742309,0.864 T0.800001,0.865 H1 V0.924 H0.800001 Q0.746155,0.924,0.692309,0.9205 T0.587501,0.907 T0.494232,0.879 T0.430770,0.835 L0.173078,0.920 Q0.165386,0.922,0.157693,0.923 T0.142308,0.924 Z M0.2,0.841 L0.415385,0.770 V0.150 L0.2,0.079 V0.841 Z M1,0.698 Q0.973077,0.694,0.969231,0.6885 T0.965385,0.677 Q0.965385,0.672,0.969231,0.6665 T1,0.657 V0.698 Z`},"🯂":{type:3,data:`M0,0.623 V0.531 Q0.044231,0.512,0.0625,0.4905 T0.092308,0.4465 T0.108654,0.4005 T0.113462,0.354 V0.351 Q0.113462,0.345,0.117308,0.3395 T0.129808,0.3305 T0.148846,0.3245 T0.171154,0.323 H0.501923 Q0.532692,0.323,0.563462,0.3185 T0.617308,0.303 T0.651923,0.2765 T0.663462,0.2435 V0.241 Q0.663462,0.219,0.657692,0.197 T0.639423,0.1545 T0.604808,0.115 T0.549615,0.082 T0.475577,0.0615 T0.392308,0.055 H0 V-0.004 H1 V0.055 H0.667308 Q0.694231,0.071,0.713462,0.09 T0.746154,0.129 T0.766346,0.1705 T0.775,0.213 H1 V0.316 Q0.971154,0.305,0.955769,0.2965 T0.920192,0.2825 T0.876923,0.2745 T0.830769,0.272 H0.773077 Q0.767308,0.297,0.743269,0.319 T0.680769,0.355 T0.595192,0.375 T0.501923,0.381 H0.227308 Q0.223462,0.415,0.211,0.4485 T0.172692,0.5135 T0.108269,0.573 T0,0.623 Z M0.611538,0.924 H0 V0.865 H0.611538 Q0.642308,0.865,0.673077,0.8605 T0.727885,0.845 T0.762308,0.8185 T0.773077,0.787 V0.785 Q0.773077,0.769,0.762308,0.7535 T0.727885,0.727 T0.673077,0.7115 T0.611538,0.707 H0.059615 Q0.048077,0.707,0.037115,0.7045 T0,0.694 V0.653 Q0.026923,0.648,0.037115,0.646 T0.059615,0.644 H0.722692 Q0.753462,0.644,0.784231,0.6395 T0.839038,0.624 T0.873846,0.5975 T0.884615,0.566 V0.564 Q0.884615,0.548,0.873846,0.532 T0.839038,0.5055 T0.784231,0.49 T0.722692,0.4855 H0.392308 Q0.380769,0.4855,0.370192,0.483 T0.351923,0.4765 T0.339423,0.467 T0.334615,0.4555 T0.339423,0.444 T0.351923,0.4345 T0.370192,0.428 T0.392308,0.4255 H0.832692 Q0.855769,0.4255,0.878846,0.4235 T0.922115,0.416 T0.957692,0.4015 T1,0.3815 V0.4685 Q0.975,0.4705,0.966346,0.4725 T0.95,0.4765 Q0.961538,0.4835,0.969231,0.4915 T1,0.5075 V0.6205 Q0.965385,0.6455,0.926923,0.665 T0.84,0.6935 Q0.866923,0.7115,0.877596,0.7345 T0.894231,0.7855 V0.787 Q0.894231,0.815,0.876923,0.8425 T0.820192,0.8895 T0.726923,0.916 T0.611538,0.924 Z`},"🯃":{type:3,data:`M0,0.473 V0.386 Q0.025490,0.378,0.028431,0.3695 T0.031373,0.352 V0.35 Q0.031373,0.342,0.028431,0.333 T0,0.316 V0.213 H0.652941 Q0.684314,0.213,0.715686,0.2085 T0.770588,0.193 T0.804902,0.1665 T0.815686,0.135 V0.133 Q0.815686,0.117,0.804902,0.101 T0.770588,0.0745 T0.715686,0.0595 T0.652941,0.055 H0 V-0.004 H0.652941 Q0.707843,-0.004,0.761765,0.004 T0.856863,0.031 T0.915686,0.0775 T0.933333,0.133 V0.135 Q0.933333,0.163,0.915686,0.1905 T0.856863,0.237 T0.761765,0.264 T0.652941,0.272 H0.109804 Q0.131373,0.29,0.140196,0.31 T0.149020,0.35 V0.352 Q0.149020,0.37,0.142157,0.388 T0.118627,0.4225 T0.076471,0.452 T0,0.473 Z M0,0.625 V0.513 Q0.029412,0.526,0.032353,0.54 T0.035294,0.568 V0.57 Q0.035294,0.584,0.032353,0.598 T0,0.625 Z`},"🯄":{type:3,data:`M0.019231,1.085 V-0.165 H0.980769 V1.085 H0.019231 Z M0.446154,0.527 H0.553846 Q0.553846,0.511,0.5625,0.495 T0.591346,0.466 T0.631731,0.4405 T0.666346,0.4135 T0.688462,0.3825 T0.696154,0.35 Q0.696154,0.33,0.682692,0.311 T0.641346,0.2785 T0.575,0.259 T0.498077,0.253 T0.421154,0.259 T0.356731,0.279 T0.315385,0.3125 T0.301923,0.352 V0.357 H0.409615 V0.354 Q0.409615,0.345,0.414423,0.335 T0.431731,0.318 T0.4625,0.3075 T0.498077,0.304 Q0.517308,0.304,0.534615,0.307 T0.564423,0.3165 T0.582692,0.332 T0.588462,0.35 Q0.588462,0.366,0.572115,0.3805 T0.535577,0.4075 T0.496154,0.4335 T0.465385,0.4625 T0.45,0.4945 T0.446154,0.527 Z M0.5,0.667 Q0.519231,0.667,0.5375,0.664 T0.569231,0.654 T0.588462,0.637 T0.594231,0.617 T0.588462,0.5975 T0.569231,0.581 T0.5375,0.571 T0.5,0.568 T0.4625,0.571 T0.430769,0.581 T0.411538,0.5975 T0.405769,0.617 T0.411538,0.637 T0.430769,0.654 T0.4625,0.664 T0.5,0.667 Z`,scaleType:1},"🯅":{type:5,data:{d:`M.44,.425 L.44,.51 L.44,.56 L.19,.685 L.26,.72 L.5,.605 L.74,.72 L.81,.685 L.56,.56 L.56,.51 L.56,.425 Z M.17,.46 L.17,.51 L.83,.51 L.83,.46 Z M.67,.35 C.67,.303,.594,.265,.5,.265 C.406,.265,.33,.303,.33,.35 C.33,.397,.406,.435,.5,.435 C.594,.435,.67,.397,.67,.35 Z M.56,.35 C.56,.3665,.533,.38,.5,.38 C.467,.38,.44,.3665,.44,.35 C.44,.3335,.467,.32,.5,.32 C.533,.32,.56,.3335,.56,.35 Z`,type:0},scaleType:1},"🯆":{type:5,data:{d:`M.44,.425 L.44,.46 L.23,.385 L.19,.43 L.44,.51 L.44,.56 L.29,.71 L.38,.735 L.5,.605 L.61,.735 L.7,.71 L.56,.56 L.56,.51 L.81,.43 L.77,.385 L.56,.46 L.56,.425 Z M.67,.35 C.67,.303,.594,.265,.5,.265 C.406,.265,.33,.303,.33,.35 C.33,.397,.406,.435,.5,.435 C.594,.435,.67,.397,.67,.35 Z M.56,.35 C.56,.3665,.533,.38,.5,.38 C.467,.38,.44,.3665,.44,.35 C.44,.3335,.467,.32,.5,.32 C.533,.32,.56,.3335,.56,.35 Z`,type:0},scaleType:1},"🯇":{type:5,data:{d:`M.44,.425 L.44,.56 L.29,.71 L.38,.735 L.5,.605 L.74,.72 L.81,.685 L.56,.56 L.56,.425 Z M.18,.53 L.23,.575 L.81,.43 L.77,.385 Z M.67,.35 C.67,.303,.594,.265,.5,.265 C.406,.265,.33,.303,.33,.35 C.33,.397,.406,.435,.5,.435 C.594,.435,.67,.397,.67,.35 Z M.56,.35 C.56,.3665,.533,.38,.5,.38 C.467,.38,.44,.3665,.44,.35 C.44,.3335,.467,.32,.5,.32 C.533,.32,.56,.3335,.56,.35 Z`,type:0},scaleType:1},"🯈":{type:5,data:{d:`M.44,.425 L.44,.56 L.19,.685 L.26,.72 L.5,.605 L.62,.735 L.71,.71 L.56,.56 L.56,.425 Z M.23,.385 L.18,.43 L.77,.575 L.81,.53 Z M.67,.35 C.67,.303,.594,.265,.5,.265 C.406,.265,.33,.303,.33,.35 C.33,.397,.406,.435,.5,.435 C.594,.435,.67,.397,.67,.35 Z M.56,.35 C.56,.3665,.533,.38,.5,.38 C.467,.38,.44,.3665,.44,.35 C.44,.3335,.467,.32,.5,.32 C.533,.32,.56,.3335,.56,.35 Z`,type:0},scaleType:1},"🯉":{type:5,data:{d:`M.44,.425 L.45,.495 L.15,.645 L.34,.645 L.34,.7 L.44,.7 L.44,.645 L.56,.645 L.56,.7 L.66,.7 L.66,.645 L.84,.645 L.54,.495 L.56,.425 Z M.39,.6 L.5,.55 L.60,.6 Z M.17,.46 L.17,.51 L.83,.51 L.83,.46 Z M.67,.35 C.67,.303,.594,.265,.5,.265 C.406,.265,.33,.303,.33,.35 C.33,.397,.406,.435,.5,.435 C.594,.435,.67,.397,.67,.35 Z M.56,.35 C.56,.3665,.533,.38,.5,.38 C.467,.38,.44,.3665,.44,.35 C.44,.3335,.467,.32,.5,.32 C.533,.32,.56,.3335,.56,.35 Z`,type:0},scaleType:1},"🯊":{type:5,data:{d:`M.26,.375 L.5,.255 L.74,.375 L.74,.665 L.5,.55 L.26,.665 Z M.37,.395 L.37,.54 L.5,.475 L.63,.54 L.63,.395 L.5,.33 Z`,type:0},scaleType:1},"🯋":{type:5,data:{d:`M.09,.41 L.32,.295 L.5,.375 L.68,.295 L.91,.41 L.75,.5 L.91,.59 L.68,.705 L.5,.625 L.32,.705 L.09,.59 L.25,.5 Z M.24,.41 L.39,.5 L.24,.59 L.32,.63 L.5,.555 L.68,.63 L.76,.59 L.61,.5 L.76,.41 L.68,.37 L.5,.445 L.32,.37 Z`,type:0},scaleType:1},"🯌":{type:5,data:{d:`M.55,.305 L.88,.305 L.88,.355 L.65,.355 L.65,.47 L.88,.47 L.88,.52 L.55,.52 Z`,type:0},scaleType:1},"🯍":{type:5,data:{d:`M.38,.39 L.5,.33 L.62,.39 L.62,.53 L.5,.47 L.38,.53 Z`,type:0},scaleType:1},"🯎":{type:3,data:`M0,0 L0.6667,0 L0.6667,1 L0,1 Z`},"🯏":{type:3,data:`M0,0 L0.3333,0 L0.3333,1 L0,1 Z`},"🯐":{type:2,data:`M1,.5 L0,1`,strokeWidth:1},"🯑":{type:2,data:`M1,0 L0,.5`,strokeWidth:1},"🯒":{type:2,data:`M0,0 L1,.5`,strokeWidth:1},"🯓":{type:2,data:`M0,.5 L1,1`,strokeWidth:1},"🯔":{type:2,data:`M0,0 L.5,1`,strokeWidth:1},"🯕":{type:2,data:`M.5,0 L1,1`,strokeWidth:1},"🯖":{type:2,data:`M1,0 L.5,1`,strokeWidth:1},"🯗":{type:2,data:`M.5,0 L0,1`,strokeWidth:1},"🯘":{type:2,data:`M0,0 L.5,.5 L1,0`,strokeWidth:1},"🯙":{type:2,data:`M1,0 L.5,.5 L1,1`,strokeWidth:1},"🯚":{type:2,data:`M0,1 L.5,.5 L1,1`,strokeWidth:1},"🯛":{type:2,data:`M0,0 L.5,.5 L0,1`,strokeWidth:1},"🯜":{type:2,data:`M0,0 L.5,1 L1,0`,strokeWidth:1},"🯝":{type:2,data:`M1,0 L0,.5 L1,1`,strokeWidth:1},"🯞":{type:2,data:`M0,1 L.5,0 L1,1`,strokeWidth:1},"🯟":{type:2,data:`M0,0 L1,.5 L0,1`,strokeWidth:1},"🯠":{type:5,data:{d:`M0,0 C0,.276,.224,.5,.5,.5 C.776,.5,1,.276,1,0`,type:1}},"🯡":{type:5,data:{d:`M1,0 C.724,0,.5,.224,.5,.5 C.5,.776,.724,1,1,1`,type:1}},"🯢":{type:5,data:{d:`M0,1 C0,.724,.224,.5,.5,.5 C.776,.5,1,.724,1,1`,type:1}},"🯣":{type:5,data:{d:`M0,0 C.276,0,.5,.224,.5,.5 C.5,.776,.276,1,0,1`,type:1}},"🯤":{type:0,data:[{x:2,y:0,w:4,h:4}]},"🯥":{type:0,data:[{x:2,y:4,w:4,h:4}]},"🯦":{type:0,data:[{x:0,y:2,w:4,h:4}]},"🯧":{type:0,data:[{x:4,y:2,w:4,h:4}]},"🯨":{type:5,data:{d:`M0,0 C0,.276,.224,.5,.5,.5 C.776,.5,1,.276,1,0 Z`,type:0}},"🯩":{type:5,data:{d:`M1,0 C.724,0,.5,.224,.5,.5 C.5,.776,.724,1,1,1 Z`,type:0}},"🯪":{type:5,data:{d:`M0,1 C0,.724,.224,.5,.5,.5 C.776,.5,1,.724,1,1 Z`,type:0}},"🯫":{type:5,data:{d:`M0,0 C.276,0,.5,.224,.5,.5 C.5,.776,.276,1,0,1 Z`,type:0}},"🯬":{type:5,data:{d:`M1,0 L.5,0 C.5,.276,.724,.5,1,.5 Z`,type:0}},"🯭":{type:5,data:{d:`M0,1 L.5,1 C.5,.724,.276,.5,0,.5 Z`,type:0}},"🯮":{type:5,data:{d:`M1,1 L1,.5 C.724,.5,.5,.724,.5,1 Z`,type:0}},"🯯":{type:5,data:{d:`M0,0 L0,.5 C.276,.5,.5,.276,.5,0 Z`,type:0}},"🯰":{type:5,data:{d:_r(126),type:0},scaleType:1},"🯱":{type:5,data:{d:_r(48),type:0},scaleType:1},"🯲":{type:5,data:{d:_r(109),type:0},scaleType:1},"🯳":{type:5,data:{d:_r(121),type:0},scaleType:1},"🯴":{type:5,data:{d:_r(51),type:0},scaleType:1},"🯵":{type:5,data:{d:_r(91),type:0},scaleType:1},"🯶":{type:5,data:{d:_r(95),type:0},scaleType:1},"🯷":{type:5,data:{d:_r(114),type:0},scaleType:1},"🯸":{type:5,data:{d:_r(127),type:0},scaleType:1},"🯹":{type:5,data:{d:_r(123),type:0},scaleType:1},"🯺":{type:5,data:{d:`M.5,.175 C.2,.175,.15,.305,.15,.435 L.05,.63 L.35,.63 C.35,.682,.42,.76,.5,.76 C.58,.76,.65,.682,.65,.63 L.95,.63 L.85,.435 C.85,.305,.8,.175,.5,.175 Z`,type:0},scaleType:1},...Object.fromEntries(Array.from({length:256},(e,t)=>[String.fromCodePoint(10240+t),{type:6,data:t}]))},hr=new Set([9617,9618,9619,129932,129933,129934,129935,129936,129937,129938,129940,129948,129949,129950,129951]);function gr(e){return{type:2,data:()=>{let t=[],n=[.375,.25,.375],r=[0,3/8,5/8];for(let i=0;i<3;i++){let a=e>>i*2&1,o=e>>i*2+1&1;a&&o?t.push(`M0,${r[i]} L1,${r[i]} L1,${r[i]+n[i]} L0,${r[i]+n[i]} Z`):a?t.push(`M0,${r[i]} L0.5,${r[i]} L0.5,${r[i]+n[i]} L0,${r[i]+n[i]} Z`):o&&t.push(`M0.5,${r[i]} L1,${r[i]} L1,${r[i]+n[i]} L0.5,${r[i]+n[i]} Z`)}return t.join(` `)}}}function _r(e){let t=[];if(e&64){let e=.21500000000000002,n=.7849999999999999;t.push(`M${e},0.2125 L${e+.075},0.175 L${n-.075},0.175 L${n},0.2125 L${n-.075},0.25 L${e+.075},0.25 Z`)}if(e&32){let e=.7999999999999999,n=.95-.15/2,r=.95,i=.265,a=.485;t.push(`M${n},${i} L${r},${i+.0375} L${r},${a-.0375} L${n},${a} L${e},${a-.0375} L${e},${i+.0375} Z`)}if(e&16){let e=.7999999999999999,n=.95-.15/2,r=.95,i=.515,a=.735;t.push(`M${n},${i} L${r},${i+.0375} L${r},${a-.0375} L${n},${a} L${e},${a-.0375} L${e},${i+.0375} Z`)}if(e&8){let e=.21500000000000002,n=.7849999999999999;t.push(`M${e},0.7875 L${e+.075},0.75 L${n-.075},0.75 L${n},0.7875 L${n-.075},0.825 L${e+.075},0.825 Z`)}if(e&4&&t.push(`M0.125,0.515 L0.2,0.5525 L0.2,0.6975 L0.125,0.735 L0.05,0.6975 L0.05,0.5525 Z`),e&2&&t.push(`M0.125,0.265 L0.2,0.3025 L0.2,0.4475 L0.125,0.485 L0.05,0.4475 L0.05,0.3025 Z`),e&1){let e=.21500000000000002,n=.7849999999999999;t.push(`M${e},0.5 L${e+.075},0.4625 L${n-.075},0.4625 L${n},0.5 L${n-.075},0.5375 L${e+.075},0.5375 Z`)}return t.join(` `)}var vr=0,yr=0,br=!1,xr=!1,Sr=!1,Cr,wr=0,Tr=class{constructor(e,t,n,r,i,a){this._terminal=e,this._optionService=t,this._selectionRenderModel=n,this._decorationService=r,this._coreBrowserService=i,this._themeService=a,this.result={fg:0,bg:0,ext:0}}resolve(e,t,n,r,i){this.result.bg=e.bg,this.result.fg=e.fg,this.result.ext=e.bg&268435456?e.extended.ext:0,yr=0,vr=0,xr=!1,br=!1,Sr=!1,Cr=this._themeService.colors,wr=0;let a=e.getCode();if(a!==0&&e.extended.underlineStyle===4){let e=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));wr=t*r%(Math.round(e)*2)}if(wr===0&&hr.has(a)&&(wr=t*r%2*2+n*i%2),this._decorationService.forEachDecorationAtCell(t,n,`bottom`,e=>{e.backgroundColorRGB&&(yr=e.backgroundColorRGB.rgba>>8&16777215,xr=!0),e.foregroundColorRGB&&(vr=e.foregroundColorRGB.rgba>>8&16777215,br=!0)}),Sr=this._selectionRenderModel.isCellSelected(this._terminal,t,n),Sr){if(this.result.fg&67108864||this.result.bg&50331648){if(this.result.fg&67108864)switch(this.result.fg&50331648){case 16777216:case 33554432:yr=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:yr=(this.result.fg&16777215)<<8|255;break;case 0:default:yr=this._themeService.colors.foreground.rgba}else switch(this.result.bg&50331648){case 16777216:case 33554432:yr=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:yr=(this.result.bg&16777215)<<8|255;break}yr=er.blend(yr,(this._coreBrowserService.isFocused?Cr.selectionBackgroundOpaque:Cr.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}else yr=(this._coreBrowserService.isFocused?Cr.selectionBackgroundOpaque:Cr.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(xr=!0,Cr.selectionForeground&&(vr=Cr.selectionForeground.rgba>>8&16777215,br=!0),ur(e.getCode())){if(this.result.fg&67108864&&!(this.result.bg&50331648))vr=(this._coreBrowserService.isFocused?Cr.selectionBackgroundOpaque:Cr.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(this.result.fg&67108864)switch(this.result.bg&50331648){case 16777216:case 33554432:vr=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:vr=(this.result.bg&16777215)<<8|255;break}else switch(this.result.fg&50331648){case 16777216:case 33554432:vr=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:vr=(this.result.fg&16777215)<<8|255;break;case 0:default:vr=this._themeService.colors.foreground.rgba}vr=er.blend(vr,(this._coreBrowserService.isFocused?Cr.selectionBackgroundOpaque:Cr.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}br=!0}}this._decorationService.forEachDecorationAtCell(t,n,`top`,e=>{e.backgroundColorRGB&&(yr=e.backgroundColorRGB.rgba>>8&16777215,xr=!0),e.foregroundColorRGB&&(vr=e.foregroundColorRGB.rgba>>8&16777215,br=!0)}),xr&&(yr=Sr?e.bg&-150994944|yr|50331648:e.bg&-16777216|yr|50331648),br&&(vr=e.fg&-83886080|vr|50331648),this.result.fg&67108864&&(xr&&!br&&(vr=this.result.bg&50331648?this.result.fg&-134217728|this.result.bg&67108863:this.result.fg&-134217728|Cr.background.rgba>>8&16777215|50331648,br=!0),!xr&&br&&(yr=this.result.fg&50331648?this.result.bg&-67108864|this.result.fg&67108863:this.result.bg&-67108864|Cr.foreground.rgba>>8&16777215|50331648,xr=!0)),Cr=void 0,this.result.bg=xr?yr:this.result.bg,this.result.fg=br?vr:this.result.fg,this.result.ext&=536870911,this.result.ext|=wr<<29&3758096384}},Er=.5,Dr=Vn||Hn?`bottom`:`ideographic`;function Or(e,t,n,r,i,a,o,s,c,l,u,d,f=0){let p=mr[t];if(p){let t=Array.isArray(p)?p:[p];for(let p of t)kr(e,p,n,r,i,a,o,s,c,l,u,d,f);return!0}return!1}function kr(e,t,n,r,i,a,o,s,c,l,u,d,f=0){let p=i,m=a,h=n,g=r;switch(t.scaleType===1&&(p=o,m=s,h=n+(i-o)/2,g=r+(a-s)/2),t.clipPath&&(e.save(),zr(e,t.clipPath,h,g,p,m)),t.type){case 0:Ar(e,t.data,h,g,p,m);break;case 1:Lr(e,t.data,h,g,p,m,f);break;case 2:Rr(e,t.data,h,g,p,m,l,u,t.strokeWidth);break;case 3:Nr(e,t.data,h,g,p,m,l,t.strokeWidth);break;case 4:Fr(e,t.data,h,g,p,m,l,d);break;case 5:Br(e,t.data,h,g,p,m,c,l,u);break;case 6:Mr(e,t.data,h,g,p,m);break}t.clipPath&&e.restore()}function Ar(e,t,n,r,i,a){for(let o=0;o<t.length;o++){let s=t[o],c=i/8,l=a/8;e.fillRect(n+s.x*c,r+s.y*l,s.w*c,s.h*l)}}var jr=new Uint8Array([1,0,1,2,1,4,5,0,5,2,5,4,1,6,5,6]);function Mr(e,t,n,r,i,a){let o=i/8,s=a*.1,c=a*.8/8,l=Math.min(o,c);for(let i=0;i<8;i++)if(t&1<<i){let t=jr[i*2],a=jr[i*2+1],u=n+(t+1)*o,d=r+s+(a+1)*c;e.beginPath(),e.arc(u,d,l,0,Math.PI*2),e.fill()}}function Nr(e,t,n,r,i,a,o,s){let c=typeof t==`string`?t:t(0,0);e.beginPath();let l=0,u=0,d=0,f=0,p=``;for(let t of c.split(` `)){let o=t[0],s=t.substring(1).split(`,`);if(o===`Z`){e.closePath(),p=o;continue}if(o===`V`){let t=r+parseFloat(s[0])*a;e.lineTo(l,t),u=t,d=l,f=u,p=o;continue}if(o===`H`){let t=n+parseFloat(s[0])*i;e.lineTo(t,u),l=t,d=l,f=u,p=o;continue}if(!s[0]||!s[1])continue;if(o===`A`){let t=parseFloat(s[0])*i,o=parseFloat(s[1])*a,c=parseFloat(s[2])*Math.PI/180,d=parseInt(s[3],10),f=parseInt(s[4],10),p=n+parseFloat(s[5])*i,m=r+parseFloat(s[6])*a;Pr(e,l,u,t,o,c,d,f,p,m),l=p,u=m;continue}let c=s.map((e,t)=>{let o=parseFloat(e);return t%2==0?n+o*i:r+o*a});if(o===`M`)e.moveTo(c[0],c[1]),l=c[0],u=c[1],d=l,f=u;else if(o===`L`)e.lineTo(c[0],c[1]),l=c[0],u=c[1],d=l,f=u;else if(o===`Q`)e.quadraticCurveTo(c[0],c[1],c[2],c[3]),d=c[0],f=c[1],l=c[2],u=c[3];else if(o===`T`){let t,n;p===`Q`||p===`T`?(t=2*l-d,n=2*u-f):(t=l,n=u),e.quadraticCurveTo(t,n,c[0],c[1]),d=t,f=n,l=c[0],u=c[1]}else o===`C`&&(e.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]),d=c[2],f=c[3],l=c[4],u=c[5]);p=o}s===void 0?e.fill():(e.strokeStyle=e.fillStyle,e.lineWidth=o*s,e.stroke())}function Pr(e,t,n,r,i,a,o,s,c,l){if(r===0||i===0){e.lineTo(c,l);return}r=Math.abs(r),i=Math.abs(i);let u=Math.cos(a),d=Math.sin(a),f=(t-c)/2,p=(n-l)/2,m=u*f+d*p,h=-d*f+u*p,g=r*r,_=i*i,v=m*m,y=h*h,b=v/g+y/_;if(b>1){let e=Math.sqrt(b);r*=e,i*=e,g=r*r,_=i*i}let x=(g*_-g*y-_*v)/(g*y+_*v);x<0&&(x=0);let S=(o===s?-1:1)*Math.sqrt(x),C=S*(r*h/i),w=S*-(i*m/r),T=u*C-d*w+(t+c)/2,E=d*C+u*w+(n+l)/2,D=(m-C)/r,O=(h-w)/i,k=(-m-C)/r,A=(-h-w)/i,j=Math.atan2(O,D),M=Math.atan2(A,k)-j;s===0&&M>0?M-=2*Math.PI:s===1&&M<0&&(M+=2*Math.PI);let N=j+M;e.ellipse(T,E,r,i,a,j,N,s===0)}function Fr(e,t,n,r,i,a,o,s){e.save(),e.fillRect(n,r,i,a),s&&(e.fillStyle=s,e.strokeStyle=s),e.lineWidth=o,e.lineCap=`square`,e.beginPath();for(let o of t.d.split(` `)){let t=o[0],s=o.substring(1).split(`,`);if(!s[0]||!s[1]){t===`Z`&&e.closePath();continue}let c=s.map((e,t)=>{let o=parseFloat(e);return t%2==0?n+o*i:r+o*a});t===`M`?e.moveTo(c[0],c[1]):t===`L`&&e.lineTo(c[0],c[1])}t.type===1?e.stroke():e.fill(),e.restore()}var Ir=new Map;function Lr(e,t,n,r,i,a,o=0){let s=Ir.get(t);s||(s=new Map,Ir.set(t,s));let c=e.fillStyle;if(typeof c!=`string`)throw Error(`Unexpected fillStyle type "${c}"`);let l=s.get(c);if(!l){let n=t[0].length,r=t.length,i=e.canvas.ownerDocument.createElement(`canvas`);i.width=n,i.height=r;let a=rr(i.getContext(`2d`)),o=new ImageData(n,r),u,d,f,p;if(c.startsWith(`#`))u=parseInt(c.slice(1,3),16),d=parseInt(c.slice(3,5),16),f=parseInt(c.slice(5,7),16),p=c.length>7&&parseInt(c.slice(7,9),16)||1;else if(c.startsWith(`rgba`))[u,d,f,p]=c.substring(5,c.length-1).split(`,`).map(e=>parseFloat(e));else throw Error(`Unexpected fillStyle color format "${c}" when drawing pattern glyph`);for(let e=0;e<r;e++)for(let r=0;r<n;r++)o.data[(e*n+r)*4]=u,o.data[(e*n+r)*4+1]=d,o.data[(e*n+r)*4+2]=f,o.data[(e*n+r)*4+3]=t[e][r]*(p*255);a.putImageData(o,0,0),l=rr(e.createPattern(i,null)),s.set(c,l)}let u=o>>1&1,d=o&1;u!==0||d!==0?l.setTransform(new DOMMatrix().translateSelf(-u,-d)):l.setTransform(new DOMMatrix),e.fillStyle=l,e.fillRect(n,r,i,a)}function Rr(e,t,n,r,i,a,o,s,c){e.save(),e.beginPath(),e.rect(n,r,i,a),e.clip(),e.beginPath();let l;l=typeof t==`function`?t(.15,.15/a*i):t;let u={currentX:0,currentY:0,lastControlX:0,lastControlY:0,lastCommand:``};for(let t of l.split(` `)){let c=t[0];if(c===`Z`){e.closePath(),u.lastCommand=c;continue}let l=Hr[c];if(!l){s.error(`Could not find drawing instructions for "${c}"`);continue}let d=t.substring(1).split(`,`);!d[0]||!d[1]||(l(e,Ur(d,i,a,n,r,!0,o,0,0,!1),u),u.lastCommand=c)}c===void 0?e.fill():(e.strokeStyle=e.fillStyle,e.lineWidth=o*c,e.stroke()),e.closePath(),e.restore()}function zr(e,t,n,r,i,a){e.beginPath();for(let o of t.split(` `)){let t=o[0];if(t===`Z`){e.closePath();continue}let s=o.substring(1).split(`,`);if(!s[0]||!s[1])continue;let c=n+parseFloat(s[0])*i,l=r+parseFloat(s[1])*a;t===`M`?e.moveTo(c,l):t===`L`&&e.lineTo(c,l)}e.clip()}function Br(e,t,n,r,i,a,o,s,c){let l=new Path2D;l.rect(n,r,i,a),e.clip(l),e.beginPath();let u=o/12;e.lineWidth=s*u;let d={currentX:0,currentY:0,lastControlX:0,lastControlY:0,lastCommand:``};for(let o of t.d.split(` `)){let l=o[0];if(l===`Z`){e.closePath(),d.lastCommand=l;continue}let f=Hr[l];if(!f){c.error(`Could not find drawing instructions for "${l}"`);continue}let p=o.substring(1).split(`,`);!p[0]||!p[1]||(f(e,Ur(p,i,a,n,r,!1,s,(t.leftPadding??0)*(u/2),(t.rightPadding??0)*(u/2)),d),d.lastCommand=l)}t.type===1?(e.strokeStyle=e.fillStyle,e.stroke()):e.fill(),e.closePath()}function Vr(e,t,n=0){return Math.max(Math.min(e,t),n)}var Hr={C:(e,t,n)=>{e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),n.lastControlX=t[2],n.lastControlY=t[3],n.currentX=t[4],n.currentY=t[5]},L:(e,t,n)=>{e.lineTo(t[0],t[1]),n.lastControlX=n.currentX=t[0],n.lastControlY=n.currentY=t[1]},M:(e,t,n)=>{e.moveTo(t[0],t[1]),n.lastControlX=n.currentX=t[0],n.lastControlY=n.currentY=t[1]},Q:(e,t,n)=>{e.quadraticCurveTo(t[0],t[1],t[2],t[3]),n.lastControlX=t[0],n.lastControlY=t[1],n.currentX=t[2],n.currentY=t[3]},T:(e,t,n)=>{let r,i;n.lastCommand===`Q`||n.lastCommand===`T`?(r=2*n.currentX-n.lastControlX,i=2*n.currentY-n.lastControlY):(r=n.currentX,i=n.currentY),e.quadraticCurveTo(r,i,t[0],t[1]),n.lastControlX=r,n.lastControlY=i,n.currentX=t[0],n.currentY=t[1]}};function Ur(e,t,n,r,i,a,o,s=0,c=0,l=!0){let u=e.map(e=>parseFloat(e)||parseInt(e));if(u.length<2)throw Error(`Too few arguments for instruction`);for(let e=0;e<u.length;e+=2){if(u[e]*=t-s*o-c*o,a&&u[e]!==0){let n=Math.round(u[e]+.5)-.5;u[e]=l?Vr(n,t,0):n}u[e]+=r+s*o}for(let e=1;e<u.length;e+=2){if(u[e]*=n,a&&u[e]!==0){let t=Math.round(u[e]+.5)-.5;u[e]=l?Vr(t,n,0):t}u[e]+=i}return u}var Wr=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},Gr=class{constructor(){this._data=new Wr}set(e,t,n,r,i){this._data.get(e,t)||this._data.set(e,t,new Wr),this._data.get(e,t).set(n,r,i)}get(e,t,n,r){return this._data.get(e,t)?.get(n,r)}clear(){this._data.clear()}},Kr=class{constructor(e){this._tasks=[],this._i=0,this._logService=e}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&=(this._cancelCallback(this._idleCallback),void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||=this._requestCallback(this._process.bind(this))}_process(e){this._idleCallback=void 0;let t,n=0,r=e.timeRemaining(),i;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),n=Math.max(t,n),i=e.timeRemaining(),n*1.5>i){r-t<-20&&this._logService.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=i}this.clear()}},qr=class extends Kr{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},Jr=class extends Kr{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Yr=`requestIdleCallback`in globalThis?Jr:qr,Xr=class e{constructor(){this.fg=0,this.bg=0,this.extended=new Zr}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Zr=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Qr=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||=(e,t,n)=>{if(this._disposed)return Mn(()=>{});let r={fn:e,thisArgs:t};this._listeners.push(r);let i=Mn(()=>{let e=this._listeners.indexOf(r);e!==-1&&this._listeners.splice(e,1)});return n&&(Array.isArray(n)?n.push(i):n.add(i)),i},this._event}fire(e){if(!this._disposed)switch(this._listeners.length){case 0:return;case 1:{let{fn:t,thisArgs:n}=this._listeners[0];t.call(n,e);return}default:{let t=this._listeners.slice();for(let{fn:n,thisArgs:r}of t)n.call(r,e)}}}dispose(){this._disposed||(this._disposed=!0,this._listeners.length=0)}},$r;(e=>{function t(e,t){return e(e=>t.fire(e))}e.forward=t;function n(e,t){return(n,r,i)=>e(e=>n.call(r,t(e)),void 0,i)}e.map=n;function r(...e){return(t,n,r)=>{let i=new Fn;for(let r of e)i.add(r(e=>t.call(n,e)));return r&&(Array.isArray(r)?r.push(i):r.add(i)),i}}e.any=r;function i(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=i})($r||={});var ei={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},ti=2,ni,ri=class e{constructor(e,t,n,r){this._document=e,this._config=t,this._unicodeService=n,this._logService=r,this._didWarmUp=!1,this._cacheMap=new Gr,this._cacheMapCombined=new Gr,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new Xr,this._textureSize=512,this._onAddTextureAtlasCanvas=new Qr,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new Qr,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=ci(e,this._config.deviceCellWidth*4+ti*2,this._config.deviceCellHeight+ti*2),this._tmpCtx=rr(this._tmpCanvas.getContext(`2d`,{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){this._tmpCanvas.remove();for(let e of this.pages)e.canvas.remove();this._onAddTextureAtlasCanvas.dispose(),this._onRemoveTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||=(this._doWarmUp(),!0)}_doWarmUp(){let e=new Yr(this._logService);for(let t=33;t<126;t++)e.enqueue(()=>{if(!this._cacheMap.get(t,0,0,0)){let e=this._drawToCache(t,0,0,0,!1,void 0);this._cacheMap.set(t,0,0,0,e)}})}beginFrame(){let e=this._requestClearModel;return this._requestClearModel=!1,e}clearTexture(){if(!(this._pages[0].currentRow.x===0&&this._pages[0].currentRow.y===0)){for(let e of this._pages)e.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(e.maxAtlasPages&&this._pages.length>=Math.max(4,e.maxAtlasPages)){let t=this._pages.filter(t=>t.canvas.width*2<=(e.maxTextureSize||4096)).sort((e,t)=>t.canvas.width===e.canvas.width?t.percentageUsed-e.percentageUsed:t.canvas.width-e.canvas.width),n=-1,r=0;for(let e=0;e<t.length;e++)if(t[e].canvas.width!==r)n=e,r=t[e].canvas.width;else if(e-n===3)break;let i=t.slice(n,n+4);if(i.length<4||i.some(e=>e.canvas.width!==i[0].canvas.width)){let e=new ai(this._document,this._textureSize);return this._pages.push(e),this._activePages.push(e),this._onAddTextureAtlasCanvas.fire(e.canvas),e}let a=i.map(e=>e.glyphs[0].texturePage).sort((e,t)=>e-t),o=this.pages.length-i.length,s=this._mergePages(i,o);s.version=++ai.nextVersion;for(let e=a.length-1;e>=0;e--)this._deletePage(a[e]);this.pages.push(s),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(s.canvas)}let t=new ai(this._document,this._textureSize);return this._pages.push(t),this._activePages.push(t),this._onAddTextureAtlasCanvas.fire(t.canvas),t}_mergePages(e,t){let n=e[0].canvas.width*2,r=new ai(this._document,n,e);for(let[i,a]of e.entries()){let e=i*a.canvas.width%n,o=Math.floor(i/2)*a.canvas.height;r.ctx.drawImage(a.canvas,e,o);for(let r of a.glyphs)r.texturePage=t,r.sizeClipSpace.x=r.size.x/n,r.sizeClipSpace.y=r.size.y/n,r.texturePosition.x+=e,r.texturePosition.y+=o,r.texturePositionClipSpace.x=r.texturePosition.x/n,r.texturePositionClipSpace.y=r.texturePosition.y/n;this._onRemoveTextureAtlasCanvas.fire(a.canvas);let s=this._activePages.indexOf(a);s!==-1&&this._activePages.splice(s,1)}return r}_deletePage(e){this._pages.splice(e,1);for(let t=e;t<this._pages.length;t++){let e=this._pages[t];for(let t of e.glyphs)t.texturePage--;e.version=++ai.nextVersion}}getRasterizedGlyphCombinedChar(e,t,n,r,i,a){return this._getFromCacheMap(this._cacheMapCombined,e,t,n,r,i,a)}getRasterizedGlyph(e,t,n,r,i,a){return this._getFromCacheMap(this._cacheMap,e,t,n,r,i,a)}_getFromCacheMap(e,t,n,r,i,a,o){return ni=e.get(t,n,r,i),ni||(ni=this._drawToCache(t,n,r,i,a,o),e.set(t,n,r,i,ni)),ni}_getColorFromAnsiIndex(e){if(e>=this._config.colors.ansi.length)throw Error(`No color found for idx `+e);return this._config.colors.ansi[e]}_getBackgroundColor(e,t,n,r){if(this._config.allowTransparency)return Yn;let i;switch(e){case 16777216:case 33554432:i=this._getColorFromAnsiIndex(t);break;case 50331648:let e=Xr.toColorRGB(t);i=Xn.toColor(e[0],e[1],e[2]);break;default:i=n?Zn.opaque(this._config.colors.foreground):this._config.colors.background;break}return this._config.allowTransparency||(i=Zn.opaque(i)),i}_getForegroundColor(e,t,n,r,i,a,o,s,c,l){let u=this._getMinimumContrastColor(e,t,n,r,i,a,o,c,s,l);if(u)return u;let d;switch(i){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&c&&a<8&&(a+=8),d=this._getColorFromAnsiIndex(a);break;case 50331648:let e=Xr.toColorRGB(a);d=Xn.toColor(e[0],e[1],e[2]);break;default:d=o?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(d=Zn.opaque(d)),s&&(d=Zn.multiplyOpacity(d,Er)),d}_resolveBackgroundRgba(e,t,n){switch(e){case 16777216:case 33554432:return this._getColorFromAnsiIndex(t).rgba;case 50331648:return t<<8;default:return n?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(e,t,n,r){switch(e){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&r&&t<8&&(t+=8),this._getColorFromAnsiIndex(t).rgba;case 50331648:return t<<8;default:return n?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(e,t,n,r,i,a,o,s,c,l){if(this._config.minimumContrastRatio===1||l)return;let u=this._getContrastCache(c),d=u.getColor(e,r);if(d!==void 0)return d??void 0;let f=this._resolveBackgroundRgba(t,n,o),p=this._resolveForegroundRgba(i,a,o,s),m=er.ensureContrastRatio(f,p,this._config.minimumContrastRatio/(c?2:1));if(!m){u.setColor(e,r,null);return}let h=Xn.toColor(m>>24&255,m>>16&255,m>>8&255);return u.setColor(e,r,h),h}_getContrastCache(e){return e?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(t,n,r,i,a,o){let s=typeof t==`number`?String.fromCharCode(t):t;o&&this._tmpCanvas.parentElement!==o&&(this._tmpCanvas.style.display=`none`,o.append(this._tmpCanvas));let c=Math.min(this._config.deviceCellWidth*Math.max(s.length,2)+ti*2,this._config.deviceMaxTextureSize);this._tmpCanvas.width<c&&(this._tmpCanvas.width=c);let l=Math.min(this._config.deviceCellHeight+ti*4,this._textureSize);if(this._tmpCanvas.height<l&&(this._tmpCanvas.height=l),this._tmpCtx.save(),this._workAttributeData.fg=r,this._workAttributeData.bg=n,this._workAttributeData.extended.ext=i,this._workAttributeData.isInvisible())return ei;let u=!!this._workAttributeData.isBold(),d=!!this._workAttributeData.isInverse(),f=!!this._workAttributeData.isDim(),p=!!this._workAttributeData.isItalic(),m=!!this._workAttributeData.isUnderline(),h=!!this._workAttributeData.isStrikethrough(),g=!!this._workAttributeData.isOverline(),_=this._workAttributeData.getFgColor(),v=this._workAttributeData.getFgColorMode(),y=this._workAttributeData.getBgColor(),b=this._workAttributeData.getBgColorMode();if(d){let e=_;_=y,y=e;let t=v;v=b,b=t}let x=this._getBackgroundColor(b,y,d,f);this._tmpCtx.globalCompositeOperation=`copy`,this._tmpCtx.fillStyle=x.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation=`source-over`;let S=u?this._config.fontWeightBold:this._config.fontWeight,C=p?`italic`:``;this._tmpCtx.font=`${C} ${S} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=Dr;let w=s.length===1&&ir(s.charCodeAt(0)),T=s.length===1&&ar(s.charCodeAt(0)),E=this._getForegroundColor(n,b,y,r,v,_,d,f,u,ur(s.charCodeAt(0)));this._tmpCtx.fillStyle=E.css;let D=T?0:ti*2,O=!1;if(this._config.customGlyphs!==!1){let e=this._workAttributeData.getUnderlineVariantOffset();O=Or(this._tmpCtx,s,D,D,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.deviceCharWidth,this._config.deviceCharHeight,this._config.fontSize,this._config.devicePixelRatio,this._logService,x.css,e)}let k=!w,A;if(A=typeof t==`number`?this._unicodeService.wcwidth(t):this._unicodeService.getStringCellWidth(t),m){this._tmpCtx.save();let e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),t=e%2==1?.5:0;if(this._tmpCtx.lineWidth=e,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())k=!1,this._tmpCtx.strokeStyle=`rgb(${Xr.toColorRGB(this._workAttributeData.getUnderlineColor()).join(`,`)})`;else{k=!1;let e=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&e<8&&(e+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(e).css}this._tmpCtx.fillStyle=this._tmpCtx.strokeStyle,this._tmpCtx.beginPath();let n=D,r=Math.ceil(D+this._config.deviceCharHeight)-t-(a?e*2:0),i=r+e*2,o=this._workAttributeData.getUnderlineVariantOffset(),c=0,l=0;for(let t=0;t<A;t++){let a=!1;this._tmpCtx.save(),c=r,l=i;let s=n+t*this._config.deviceCellWidth,u=n+(t+1)*this._config.deviceCellWidth;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(s,r),this._tmpCtx.lineTo(u,r),this._tmpCtx.moveTo(s,i),this._tmpCtx.lineTo(u,i);break;case 3:c=this._config.deviceCharHeight+1,l=c+3*this._config.devicePixelRatio;let t=new Path2D;t.rect(s,c,this._config.deviceCellWidth,l-c),this._tmpCtx.clip(t);let n=this._config.deviceCellWidth,d=l-c,f=n/6,p=d/3;for(let e of[[0,2,1,3,2.4,3,0,.6],[5.5,0,2.5,3,1.1,3,4.1,0],[4,0,6,2,6,.6,5.4,0]]){this._tmpCtx.beginPath();for(let t=0;t<e.length;t+=2){let n=s+e[t]*f,r=l-e[t+1]*p;t===0?this._tmpCtx.moveTo(n,r):this._tmpCtx.lineTo(n,r)}this._tmpCtx.closePath(),this._tmpCtx.fill()}a=!0;break;case 4:let m=o===0?0:o>=e?e*2-o:e-o;o>=e||m===0?(this._tmpCtx.setLineDash([Math.round(e),Math.round(e)]),this._tmpCtx.moveTo(s+m,r),this._tmpCtx.lineTo(u,r)):(this._tmpCtx.setLineDash([Math.round(e),Math.round(e)]),this._tmpCtx.moveTo(s,r),this._tmpCtx.lineTo(s+m,r),this._tmpCtx.moveTo(s+m+e,r),this._tmpCtx.lineTo(u,r)),o=pr(u-s,e,o);break;case 5:let h=u-s,g=Math.floor(.6*h),_=Math.floor(.3*h),v=h-g-_;this._tmpCtx.setLineDash([g,_,v]),this._tmpCtx.moveTo(s,r),this._tmpCtx.lineTo(u,r);break;default:this._tmpCtx.moveTo(s,r),this._tmpCtx.lineTo(u,r);break}a||this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!O&&this._config.fontSize>=12&&!this._config.allowTransparency&&s!==` `){this._tmpCtx.save(),this._tmpCtx.textBaseline=`alphabetic`;let t=this._tmpCtx.measureText(s);if(this._tmpCtx.restore(),`actualBoundingBoxDescent`in t&&t.actualBoundingBoxDescent>0){this._tmpCtx.save();let t=new Path2D;t.rect(n,c-Math.ceil(e/2),this._config.deviceCellWidth*A,l-c+Math.ceil(e/2)),this._tmpCtx.clip(t),this._tmpCtx.lineWidth=this._config.devicePixelRatio*3,this._tmpCtx.strokeStyle=x.css,this._tmpCtx.strokeText(s,D,D+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(g){let e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),t=e%2==1?.5:0;this._tmpCtx.lineWidth=e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(D,D+t),this._tmpCtx.lineTo(D+this._config.deviceCharWidth*A,D+t),this._tmpCtx.stroke()}if(O||this._tmpCtx.fillText(s,D,D+this._config.deviceCharHeight),s===`_`&&!this._config.allowTransparency){let e=oi(this._tmpCtx.getImageData(D,D,this._config.deviceCellWidth,this._config.deviceCellHeight),x,E,k);if(e)for(let t=1;t<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=x.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(s,D,D+this._config.deviceCharHeight-t),e=oi(this._tmpCtx.getImageData(D,D,this._config.deviceCellWidth,this._config.deviceCellHeight),x,E,k),e);t++);}if(h){let e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),t=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(D,D+Math.floor(this._config.deviceCharHeight/2)-t),this._tmpCtx.lineTo(D+this._config.deviceCharWidth*A,D+Math.floor(this._config.deviceCharHeight/2)-t),this._tmpCtx.stroke()}this._tmpCtx.restore();let j=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height),M;if(M=this._config.allowTransparency?si(j):oi(j,x,E,k),M)return ei;let N=this._findGlyphBoundingBox(j,this._workBoundingBox,c,T,O,D),P,F;for(;;){if(this._activePages.length===0){let e=this._createNewPage();P=e,F=e.currentRow,F.height=N.size.y;break}P=this._activePages[this._activePages.length-1],F=P.currentRow;for(let e of this._activePages)N.size.y<=e.currentRow.height&&(P=e,F=e.currentRow);for(let e=this._activePages.length-1;e>=0;e--)for(let t of this._activePages[e].fixedRows)t.height<=F.height&&N.size.y<=t.height&&(P=this._activePages[e],F=t);if(N.size.x>this._textureSize){this._overflowSizePage||(this._overflowSizePage=new ai(this._document,this._config.deviceMaxTextureSize),this.pages.push(this._overflowSizePage),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(this._overflowSizePage.canvas)),P=this._overflowSizePage,F=this._overflowSizePage.currentRow,F.x+N.size.x>=P.canvas.width&&(F.x=0,F.y+=F.height,F.height=0);break}if(F.y+N.size.y>=P.canvas.height||F.height>N.size.y+2){let t=!1;if(P.currentRow.y+P.currentRow.height+N.size.y>=P.canvas.height){let n;for(let e of this._activePages)if(e.currentRow.y+e.currentRow.height+N.size.y<e.canvas.height){n=e;break}if(n)P=n;else if(e.maxAtlasPages&&this._pages.length>=e.maxAtlasPages&&F.y+N.size.y<=P.canvas.height&&F.height>=N.size.y&&F.x+N.size.x<=P.canvas.width)t=!0;else{let e=this._createNewPage();P=e,F=e.currentRow,F.height=N.size.y,t=!0}}t||(P.currentRow.height>0&&P.fixedRows.push(P.currentRow),F={x:0,y:P.currentRow.y+P.currentRow.height,height:N.size.y},P.fixedRows.push(F),P.currentRow={x:0,y:F.y+F.height,height:0})}if(F.x+N.size.x<=P.canvas.width)break;F===P.currentRow?(F.x=0,F.y+=F.height,F.height=0):P.fixedRows.splice(P.fixedRows.indexOf(F),1)}return N.texturePage=this._pages.indexOf(P),N.texturePosition.x=F.x,N.texturePosition.y=F.y,N.texturePositionClipSpace.x=F.x/P.canvas.width,N.texturePositionClipSpace.y=F.y/P.canvas.height,N.sizeClipSpace.x/=P.canvas.width,N.sizeClipSpace.y/=P.canvas.height,F.height=Math.max(F.height,N.size.y),F.x+=N.size.x,P.ctx.putImageData(j,N.texturePosition.x-this._workBoundingBox.left,N.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,N.size.x,N.size.y),P.addGlyph(N),P.version=++ai.nextVersion,N}_findGlyphBoundingBox(e,t,n,r,i,a){t.top=0;let o=r?this._config.deviceCellHeight:this._tmpCanvas.height,s=r?this._config.deviceCellWidth:n,c=!1;for(let n=0;n<o;n++){for(let r=0;r<s;r++){let i=n*this._tmpCanvas.width*4+r*4+3;if(e.data[i]!==0){t.top=n,c=!0;break}}if(c)break}t.left=0,c=!1;for(let n=0;n<a+s;n++){for(let r=0;r<o;r++){let i=r*this._tmpCanvas.width*4+n*4+3;if(e.data[i]!==0){t.left=n,c=!0;break}}if(c)break}t.right=s,c=!1;for(let n=a+s-1;n>=a;n--){for(let r=0;r<o;r++){let i=r*this._tmpCanvas.width*4+n*4+3;if(e.data[i]!==0){t.right=n,c=!0;break}}if(c)break}t.bottom=o,c=!1;for(let n=o-1;n>=0;n--){for(let r=0;r<s;r++){let i=n*this._tmpCanvas.width*4+r*4+3;if(e.data[i]!==0){t.bottom=n,c=!0;break}}if(c)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:t.right-t.left+1,y:t.bottom-t.top+1},sizeClipSpace:{x:t.right-t.left+1,y:t.bottom-t.top+1},offset:{x:-t.left+a+(r||i?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-t.top+a+(r||i?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}},ii=class e{constructor(t,n,r){if(this._usedPixels=0,this._glyphs=[],this.version=++e.nextVersion,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],this.canvas=ci(t,n,n),this.ctx=rr(this.canvas.getContext(`2d`,{alpha:!0})),r)if(r.length===4)this._glyphs=this._glyphs.concat(r[0].glyphs,r[1].glyphs,r[2].glyphs,r[3].glyphs),this._usedPixels=r[0]._usedPixels+r[1]._usedPixels+r[2]._usedPixels+r[3]._usedPixels;else for(let e=0;e<r.length;++e)this._glyphs=this._glyphs.concat(r[e].glyphs),this._usedPixels+=r[e]._usedPixels}get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(e){this._glyphs.push(e),this._usedPixels+=e.size.x*e.size.y}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version=++e.nextVersion}};ii.nextVersion=0;var ai=ii;function oi(e,t,n,r){let i=t.rgba>>>24,a=t.rgba>>>16&255,o=t.rgba>>>8&255,s=n.rgba>>>24,c=n.rgba>>>16&255,l=n.rgba>>>8&255,u=Math.floor((Math.abs(i-s)+Math.abs(a-c)+Math.abs(o-l))/12),d=!0;for(let t=0;t<e.data.length;t+=4)e.data[t]===i&&e.data[t+1]===a&&e.data[t+2]===o||r&&Math.abs(e.data[t]-i)+Math.abs(e.data[t+1]-a)+Math.abs(e.data[t+2]-o)<u?e.data[t+3]=0:d=!1;return d}function si(e){for(let t=0;t<e.data.length;t+=4)if(e.data[t+3]>0)return!1;return!0}function ci(e,t,n){let r=e.createElement(`canvas`);return r.width=t,r.height=n,r}function li(e,t,n,r,i,a,o,s,c=!0){let l={foreground:a.foreground,background:a.background,cursor:Yn,cursorAccent:Yn,selectionForeground:Yn,selectionBackgroundTransparent:Yn,selectionBackgroundOpaque:Yn,selectionInactiveBackgroundTransparent:Yn,selectionInactiveBackgroundOpaque:Yn,overviewRulerBorder:Yn,scrollbarSliderBackground:Yn,scrollbarSliderHoverBackground:Yn,scrollbarSliderActiveBackground:Yn,ansi:a.ansi.slice(),contrastCache:a.contrastCache,halfContrastCache:a.halfContrastCache};return{customGlyphs:c,devicePixelRatio:o,deviceMaxTextureSize:s,letterSpacing:i.letterSpacing,lineHeight:i.lineHeight,deviceCellWidth:e,deviceCellHeight:t,deviceCharWidth:n,deviceCharHeight:r,fontFamily:i.fontFamily,fontSize:i.fontSize,fontWeight:i.fontWeight,fontWeightBold:i.fontWeightBold,allowTransparency:i.allowTransparency,drawBoldTextInBrightColors:i.drawBoldTextInBrightColors,minimumContrastRatio:i.minimumContrastRatio,colors:l}}function ui(e,t){for(let n=0;n<e.colors.ansi.length;n++)if(e.colors.ansi[n].rgba!==t.colors.ansi[n].rgba)return!1;return e.devicePixelRatio===t.devicePixelRatio&&e.deviceMaxTextureSize===t.deviceMaxTextureSize&&e.customGlyphs===t.customGlyphs&&e.lineHeight===t.lineHeight&&e.letterSpacing===t.letterSpacing&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontWeightBold===t.fontWeightBold&&e.allowTransparency===t.allowTransparency&&e.deviceCellWidth===t.deviceCellWidth&&e.deviceCellHeight===t.deviceCellHeight&&e.deviceCharWidth===t.deviceCharWidth&&e.deviceCharHeight===t.deviceCharHeight&&e.drawBoldTextInBrightColors===t.drawBoldTextInBrightColors&&e.minimumContrastRatio===t.minimumContrastRatio&&e.colors.foreground.rgba===t.colors.foreground.rgba&&e.colors.background.rgba===t.colors.background.rgba}function di(e){return(e&50331648)==16777216||(e&50331648)==33554432}var fi=[];function pi(e,t,n,r,i,a,o,s,c,l=!0){let u=li(r,i,a,o,t,n,s,c,l);for(let t=0;t<fi.length;t++){let n=fi[t],r=n.ownedBy.indexOf(e);if(r>=0){if(ui(n.config,u))return n.atlas;n.ownedBy.length===1?(n.atlas.dispose(),fi.splice(t,1)):n.ownedBy.splice(r,1);break}}for(let t=0;t<fi.length;t++){let n=fi[t];if(ui(n.config,u))return n.ownedBy.push(e),n.atlas}let d=e._core,f=d._logService,p={atlas:new ri(document,u,d.unicodeService,f),config:u,ownedBy:[e]};return fi.push(p),p.atlas}function mi(e){for(let t=0;t<fi.length;t++){let n=fi[t].ownedBy.indexOf(e);if(n!==-1){fi[t].ownedBy.length===1?(fi[t].atlas.dispose(),fi.splice(t,1)):fi[t].ownedBy.splice(n,1);break}}}var hi=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._isIdlePaused=!1,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&(this._restartInterval(),this._resetIdleTimer())}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&=(this._coreBrowserService.window.clearInterval(this._blinkInterval),void 0),this._blinkStartTimeout&&=(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),void 0),this._animationFrame&&=(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),void 0),this._idleTimeout&&=(this._coreBrowserService.window.clearTimeout(this._idleTimeout),void 0)}restartBlinkAnimation(){this._isIdlePaused&&this._resetIdleTimer(),!this.isPaused&&(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}))}_restartInterval(e=600){this._blinkInterval&&=(this._coreBrowserService.window.clearInterval(this._blinkInterval),void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){let e=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,e>0){this._restartInterval(e);return}}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){let e=600-(Date.now()-this._animationTimeRestarted);this._animationTimeRestarted=void 0,this._restartInterval(e);return}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},e)}pause(){this.isCursorVisible=!0,this._isIdlePaused=!1,this._blinkInterval&&=(this._coreBrowserService.window.clearInterval(this._blinkInterval),void 0),this._blinkStartTimeout&&=(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),void 0),this._animationFrame&&=(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),void 0),this._idleTimeout&&=(this._coreBrowserService.window.clearTimeout(this._idleTimeout),void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this._resetIdleTimer(),this.restartBlinkAnimation()}_resetIdleTimer(){this._isIdlePaused=!1,this._idleTimeout&&this._coreBrowserService.window.clearTimeout(this._idleTimeout),this._idleTimeout=this._coreBrowserService.window.setTimeout(()=>{this._stopBlinkingDueToIdle()},3e5)}_stopBlinkingDueToIdle(){this.isCursorVisible=!0,this._isIdlePaused=!0,this._blinkInterval&&=(this._coreBrowserService.window.clearInterval(this._blinkInterval),void 0),this._blinkStartTimeout&&=(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),void 0),this._animationFrame&&=(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),void 0),this._coreBrowserService.window.clearTimeout(this._idleTimeout),this._idleTimeout=void 0,this._renderCallback()}};function gi(e,t,n){let r=new t.ResizeObserver(t=>{let i=t.find(t=>t.target===e);if(!i)return;if(!(`devicePixelContentBoxSize`in i)){r?.disconnect(),r=void 0;return}let a=i.devicePixelContentBoxSize[0].inlineSize,o=i.devicePixelContentBoxSize[0].blockSize;a>0&&o>0&&n(a,o)});try{r.observe(e,{box:[`device-pixel-content-box`]})}catch{r.disconnect(),r=void 0}return Mn(()=>r?.disconnect())}function _i(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}var vi=class e extends Xr{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Zr,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?_i(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}attributesEquals(e){if(this.getFgColorMode()!==e.getFgColorMode()||this.getFgColor()!==e.getFgColor()||this.getBgColorMode()!==e.getBgColorMode()||this.getBgColor()!==e.getBgColor()||this.isInverse()!==e.isInverse()||this.isBold()!==e.isBold()||this.isUnderline()!==e.isUnderline())return!1;if(this.isUnderline()){if(this.getUnderlineStyle()!==e.getUnderlineStyle())return!1;let t=this.isUnderlineColorDefault(),n=e.isUnderlineColorDefault();if(!(t&&n)&&(t!==n||this.getUnderlineColor()!==e.getUnderlineColor()||this.getUnderlineColorMode()!==e.getUnderlineColorMode()))return!1}return!(this.isOverline()!==e.isOverline()||this.isBlink()!==e.isBlink()||this.isInvisible()!==e.isInvisible()||this.isItalic()!==e.isItalic()||this.isDim()!==e.isDim()||this.isStrikethrough()!==e.isStrikethrough())}},yi=class extends In{constructor(e,t,n){super(),this._renderCallback=e,this._coreBrowserService=t,this._optionsService=n,this._intervalDuration=0,this._blinkOn=!0,this._needsBlinkInViewport=!1,this._isViewportVisible=!0,this._register(this._optionsService.onSpecificOptionChange(`blinkIntervalDuration`,e=>{this.setIntervalDuration(e)})),this.setIntervalDuration(this._optionsService.rawOptions.blinkIntervalDuration),this._register(Mn(()=>this._clearInterval()))}get isBlinkOn(){return this._blinkOn}get isEnabled(){return this._intervalDuration>0}setNeedsBlinkInViewport(e){this._needsBlinkInViewport!==e&&(this._needsBlinkInViewport=e,this._updateIntervalState())}setViewportVisible(e){this._isViewportVisible!==e&&(this._isViewportVisible=e,this._updateIntervalState())}setIntervalDuration(e){e!==this._intervalDuration&&(this._intervalDuration=e,this._clearInterval(),this._updateIntervalState())}_updateIntervalState(){if(this._intervalDuration>0&&this._needsBlinkInViewport&&this._isViewportVisible){if(this._interval!==void 0)return;let e=this._blinkOn;this._blinkOn=!0,this._interval=this._coreBrowserService.window.setInterval(()=>{this._blinkOn=!this._blinkOn,this._renderCallback()},this._intervalDuration),e||this._renderCallback();return}this._clearInterval(),this._blinkOn||(this._blinkOn=!0,this._renderCallback())}_clearInterval(){this._interval!==void 0&&(this._coreBrowserService.window.clearInterval(this._interval),this._interval=void 0)}},bi=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]);function xi(e,t,n,r){let i=rr(e.createProgram());if(e.attachShader(i,rr(Si(e,e.VERTEX_SHADER,t,r))),e.attachShader(i,rr(Si(e,e.FRAGMENT_SHADER,n,r))),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS))return i;r.error(e.getProgramInfoLog(i)),e.deleteProgram(i)}function Si(e,t,n,r){let i=rr(e.createShader(t));if(e.shaderSource(i,n),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS))return i;r.error(e.getShaderInfoLog(i)),e.deleteShader(i)}function Ci(e,t){let n=Math.min(e.length*2,t),r=new Float32Array(n);for(let t=0;t<e.length;t++)r[t]=e[t];return r}var wi=class{constructor(e){this.texture=e,this.version=-1}},Ti=`#version 300 es
10
+ layout (location = 0) in vec2 a_unitquad;
11
+ layout (location = 1) in vec2 a_cellpos;
12
+ layout (location = 2) in vec2 a_offset;
13
+ layout (location = 3) in vec2 a_size;
14
+ layout (location = 4) in float a_texpage;
15
+ layout (location = 5) in vec2 a_texcoord;
16
+ layout (location = 6) in vec2 a_texsize;
17
+
18
+ uniform mat4 u_projection;
19
+ uniform vec2 u_resolution;
20
+
21
+ out vec2 v_texcoord;
22
+ flat out int v_texpage;
23
+
24
+ void main() {
25
+ vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
26
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
27
+ v_texpage = int(a_texpage);
28
+ v_texcoord = a_texcoord + a_unitquad * a_texsize;
29
+ }`;function Ei(e){let t=``;for(let n=1;n<e;n++)t+=` else if (v_texpage == ${n}) { outColor = texture(u_texture[${n}], v_texcoord); }`;return`#version 300 es
30
+ precision lowp float;
31
+
32
+ in vec2 v_texcoord;
33
+ flat in int v_texpage;
34
+
35
+ uniform sampler2D u_texture[${e}];
36
+
37
+ out vec4 outColor;
38
+
39
+ void main() {
40
+ if (v_texpage == 0) {
41
+ outColor = texture(u_texture[0], v_texcoord);
42
+ } ${t}
43
+ }`}var Di=0,Oi,ki=0,Ai=0,ji=class extends In{constructor(e,t,n,r,i){super(),this._terminal=e,this._gl=t,this._dimensions=n,this._optionsService=r,this._logService=i,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array,attributesBuffers:[new Float32Array,new Float32Array]};let a=this._gl;ri.maxAtlasPages===void 0&&(ri.maxAtlasPages=Math.min(32,rr(a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS))),ri.maxTextureSize=rr(a.getParameter(a.MAX_TEXTURE_SIZE))),this._program=rr(xi(a,Ti,Ei(ri.maxAtlasPages),this._logService)),this._register(Mn(()=>a.deleteProgram(this._program))),this._projectionLocation=rr(a.getUniformLocation(this._program,`u_projection`)),this._resolutionLocation=rr(a.getUniformLocation(this._program,`u_resolution`)),this._textureLocation=rr(a.getUniformLocation(this._program,`u_texture`));let o=this._vertexArrayObject=a.createVertexArray();this._register(Mn(()=>a.deleteVertexArray(o))),a.bindVertexArray(o);let s=new Float32Array([0,0,1,0,0,1,1,1]),c=a.createBuffer();this._register(Mn(()=>a.deleteBuffer(c))),a.bindBuffer(a.ARRAY_BUFFER,c),a.bufferData(a.ARRAY_BUFFER,s,a.STATIC_DRAW),a.enableVertexAttribArray(0),a.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);let l=new Uint8Array([0,1,2,3]),u=a.createBuffer();this._register(Mn(()=>a.deleteBuffer(u))),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,u),a.bufferData(a.ELEMENT_ARRAY_BUFFER,l,a.STATIC_DRAW),this._attributesBuffer=rr(a.createBuffer()),this._register(Mn(()=>a.deleteBuffer(this._attributesBuffer))),a.bindBuffer(a.ARRAY_BUFFER,this._attributesBuffer),a.enableVertexAttribArray(2),a.vertexAttribPointer(2,2,a.FLOAT,!1,44,0),a.vertexAttribDivisor(2,1),a.enableVertexAttribArray(3),a.vertexAttribPointer(3,2,a.FLOAT,!1,44,2*Float32Array.BYTES_PER_ELEMENT),a.vertexAttribDivisor(3,1),a.enableVertexAttribArray(4),a.vertexAttribPointer(4,1,a.FLOAT,!1,44,4*Float32Array.BYTES_PER_ELEMENT),a.vertexAttribDivisor(4,1),a.enableVertexAttribArray(5),a.vertexAttribPointer(5,2,a.FLOAT,!1,44,5*Float32Array.BYTES_PER_ELEMENT),a.vertexAttribDivisor(5,1),a.enableVertexAttribArray(6),a.vertexAttribPointer(6,2,a.FLOAT,!1,44,7*Float32Array.BYTES_PER_ELEMENT),a.vertexAttribDivisor(6,1),a.enableVertexAttribArray(1),a.vertexAttribPointer(1,2,a.FLOAT,!1,44,9*Float32Array.BYTES_PER_ELEMENT),a.vertexAttribDivisor(1,1),a.useProgram(this._program);let d=new Int32Array(ri.maxAtlasPages);for(let e=0;e<ri.maxAtlasPages;e++)d[e]=e;a.uniform1iv(this._textureLocation,d),a.uniformMatrix4fv(this._projectionLocation,!1,bi),this._atlasTextures=[];for(let e=0;e<ri.maxAtlasPages;e++){let t=new wi(rr(a.createTexture()));this._register(Mn(()=>a.deleteTexture(t.texture))),a.activeTexture(a.TEXTURE0+e),a.bindTexture(a.TEXTURE_2D,t.texture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,1,1,0,a.RGBA,a.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[e]=t}a.enable(a.BLEND),a.blendFunc(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return this._atlas?this._atlas.beginFrame():!0}updateCell(e,t,n,r,i,a,o,s,c){this._updateCell(this._vertices.attributes,e,t,n,r,i,a,o,s,c)}_updateCell(e,t,n,r,i,a,o,s,c,l){if(Di=(n*this._terminal.cols+t)*11,r===0||r===void 0){e.fill(0,Di,Di+11-1-2);return}this._atlas&&(Oi=s&&s.length>1?this._atlas.getRasterizedGlyphCombinedChar(s,i,a,o,!1,this._terminal.element):this._atlas.getRasterizedGlyph(r,i,a,o,!1,this._terminal.element),ki=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),i!==l&&Oi.offset.x>ki?(Ai=Oi.offset.x-ki,e[Di]=-(Oi.offset.x-Ai)+this._dimensions.device.char.left,e[Di+1]=-Oi.offset.y+this._dimensions.device.char.top,e[Di+2]=(Oi.size.x-Ai)/this._dimensions.device.canvas.width,e[Di+3]=Oi.size.y/this._dimensions.device.canvas.height,e[Di+4]=Oi.texturePage,e[Di+5]=Oi.texturePositionClipSpace.x+Ai/this._atlas.pages[Oi.texturePage].canvas.width,e[Di+6]=Oi.texturePositionClipSpace.y,e[Di+7]=Oi.sizeClipSpace.x-Ai/this._atlas.pages[Oi.texturePage].canvas.width,e[Di+8]=Oi.sizeClipSpace.y):(e[Di]=-Oi.offset.x+this._dimensions.device.char.left,e[Di+1]=-Oi.offset.y+this._dimensions.device.char.top,e[Di+2]=Oi.size.x/this._dimensions.device.canvas.width,e[Di+3]=Oi.size.y/this._dimensions.device.canvas.height,e[Di+4]=Oi.texturePage,e[Di+5]=Oi.texturePositionClipSpace.x,e[Di+6]=Oi.texturePositionClipSpace.y,e[Di+7]=Oi.sizeClipSpace.x,e[Di+8]=Oi.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&lr(r,c,Oi.size.x,this._dimensions.device.cell.width)&&(e[Di+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width))}clear(){let e=this._terminal,t=e.cols*e.rows*11;this._vertices.count===t?this._vertices.attributes.fill(0):this._vertices.attributes=new Float32Array(t);let n=0;for(;n<this._vertices.attributesBuffers.length;n++)this._vertices.count===t?this._vertices.attributesBuffers[n].fill(0):this._vertices.attributesBuffers[n]=new Float32Array(t);this._vertices.count=t,n=0;for(let t=0;t<e.rows;t++)for(let r=0;r<e.cols;r++)this._vertices.attributes[n+9]=r/e.cols,this._vertices.attributes[n+10]=t/e.rows,n+=11}handleResize(){let e=this._gl;e.useProgram(this._program),e.viewport(0,0,this._dimensions.device.canvas.width,this._dimensions.device.canvas.height),e.uniform2f(this._resolutionLocation,this._dimensions.device.canvas.width,this._dimensions.device.canvas.height),this.clear()}render(e){if(!this._atlas)return;let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;let n=this._vertices.attributesBuffers[this._activeBuffer],r=0;for(let t=0;t<e.lineLengths.length;t++){let i=t*this._terminal.cols*11,a=this._vertices.attributes.subarray(i,i+e.lineLengths[t]*11);n.set(a,r),r+=a.length}t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,n.subarray(0,r),t.STREAM_DRAW);for(let e=0;e<this._atlas.pages.length;e++)this._atlas.pages[e].version!==this._atlasTextures[e].version&&this._bindAtlasPageTexture(t,this._atlas,e);t.drawElementsInstanced(t.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,r/11)}setAtlas(e){this._atlas=e,this.invalidateAtlasTextures()}invalidateAtlasTextures(){for(let e of this._atlasTextures)e.version=-1}_bindAtlasPageTexture(e,t,n){e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,this._atlasTextures[n].texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.pages[n].canvas),this._atlasTextures[n].version=t.pages[n].version}setDimensions(e){this._dimensions=e}},Mi=class{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(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let i=e.buffers.active.ydisp,a=t[1]-i,o=n[1]-i,s=Math.max(a,0),c=Math.min(o,e.rows-1);if(s>=e.rows||c<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=a,this.viewportEndRow=o,this.viewportCappedStartRow=s,this.viewportCappedEndRow=c,this.startCol=t[0],this.endCol=n[0]}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol):!1}};function Ni(){return new Mi}var Pi=2147483648,Fi=class{constructor(){this.cells=new Uint32Array,this.lineLengths=new Uint32Array,this.selection=Ni()}resize(e,t){let n=e*t*4;n!==this.cells.length&&(this.cells=new Uint32Array(n),this.lineLengths=new Uint32Array(t))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}},Ii=`#version 300 es
44
+ layout (location = 0) in vec2 a_position;
45
+ layout (location = 1) in vec2 a_size;
46
+ layout (location = 2) in vec4 a_color;
47
+ layout (location = 3) in vec2 a_unitquad;
48
+
49
+ uniform mat4 u_projection;
50
+
51
+ out vec4 v_color;
52
+
53
+ void main() {
54
+ vec2 zeroToOne = a_position + (a_unitquad * a_size);
55
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
56
+ v_color = a_color;
57
+ }`,Li=`#version 300 es
58
+ precision lowp float;
59
+
60
+ in vec4 v_color;
61
+
62
+ out vec4 outColor;
63
+
64
+ void main() {
65
+ outColor = v_color;
66
+ }`,Ri=8,zi=Ri*Float32Array.BYTES_PER_ELEMENT,Bi=20*Ri,Vi=class{constructor(){this.attributes=new Float32Array(Bi),this.count=0}},Hi=0,Ui=0,Wi=0,Gi=0,Ki=0,qi=0,Ji=0,Yi=class extends In{constructor(e,t,n,r,i){super(),this._terminal=e,this._gl=t,this._dimensions=n,this._themeService=r,this._logService=i,this._vertices=new Vi,this._verticesCursor=new Vi;let a=this._gl;this._program=rr(xi(a,Ii,Li,this._logService)),this._register(Mn(()=>a.deleteProgram(this._program))),this._projectionLocation=rr(a.getUniformLocation(this._program,`u_projection`));let o=this._vertexArrayObject=a.createVertexArray();this._register(Mn(()=>a.deleteVertexArray(o))),a.bindVertexArray(o);let s=new Float32Array([0,0,1,0,0,1,1,1]),c=a.createBuffer();this._register(Mn(()=>a.deleteBuffer(c))),a.bindBuffer(a.ARRAY_BUFFER,c),a.bufferData(a.ARRAY_BUFFER,s,a.STATIC_DRAW),a.enableVertexAttribArray(3),a.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let l=new Uint8Array([0,1,2,3]),u=a.createBuffer();this._register(Mn(()=>a.deleteBuffer(u))),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,u),a.bufferData(a.ELEMENT_ARRAY_BUFFER,l,a.STATIC_DRAW),this._attributesBuffer=rr(a.createBuffer()),this._register(Mn(()=>a.deleteBuffer(this._attributesBuffer))),a.bindBuffer(a.ARRAY_BUFFER,this._attributesBuffer),a.enableVertexAttribArray(0),a.vertexAttribPointer(0,2,a.FLOAT,!1,zi,0),a.vertexAttribDivisor(0,1),a.enableVertexAttribArray(1),a.vertexAttribPointer(1,2,a.FLOAT,!1,zi,2*Float32Array.BYTES_PER_ELEMENT),a.vertexAttribDivisor(1,1),a.enableVertexAttribArray(2),a.vertexAttribPointer(2,4,a.FLOAT,!1,zi,4*Float32Array.BYTES_PER_ELEMENT),a.vertexAttribDivisor(2,1),this._updateCachedColors(r.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,bi),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,n=this._vertices,r=1,i,a,o,s,c,l,u,d,f,p,m;for(i=0;i<t.rows;i++){for(o=-1,s=0,c=0,l=!1,a=0;a<t.cols;a++)u=(i*t.cols+a)*4,d=e.cells[u+1],f=e.cells[u+2],p=!!(f&67108864),(d!==s||f!==c&&(l||p))&&((s!==0||l&&c!==0)&&(m=r++*Ri,this._updateRectangle(n,m,c,s,o,a,i)),o=a,s=d,c=f,l=p);(s!==0||l&&c!==0)&&(m=r++*Ri,this._updateRectangle(n,m,c,s,o,t.cols,i))}n.count=r}updateCursor(e){let t=this._verticesCursor,n=e.cursor;if(!n||n.style===`block`){t.count=0;return}let r,i=0;(n.style===`bar`||n.style===`outline`)&&(r=i++*Ri,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.style===`bar`?n.dpr*n.cursorWidth:n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(n.style===`underline`||n.style===`outline`)&&(r=i++*Ri,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,(n.y+1)*this._dimensions.device.cell.height-n.dpr,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat)),n.style===`outline`&&(r=i++*Ri,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat),r=i++*Ri,this._addRectangleFloat(t.attributes,r,(n.x+n.width)*this._dimensions.device.cell.width-n.dpr,n.y*this._dimensions.device.cell.height,n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=i}_updateRectangle(e,t,n,r,i,a,o){if(n&67108864)switch(n&50331648){case 16777216:case 33554432:Hi=this._themeService.colors.ansi[n&255].rgba;break;case 50331648:Hi=(n&16777215)<<8;break;case 0:default:Hi=this._themeService.colors.foreground.rgba}else switch(r&50331648){case 16777216:case 33554432:Hi=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:Hi=(r&16777215)<<8;break;case 0:default:Hi=this._themeService.colors.background.rgba}e.attributes.length<t+Ri&&(e.attributes=Ci(e.attributes,(this._terminal.rows*this._terminal.cols+1)*Ri)),Ui=i*this._dimensions.device.cell.width,Wi=o*this._dimensions.device.cell.height,Gi=(Hi>>24&255)/255,Ki=(Hi>>16&255)/255,qi=(Hi>>8&255)/255,Ji=1,this._addRectangle(e.attributes,t,Ui,Wi,(a-i)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,Gi,Ki,qi,Ji)}_addRectangle(e,t,n,r,i,a,o,s,c,l){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=s,e[t+6]=c,e[t+7]=l}_addRectangleFloat(e,t,n,r,i,a,o){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(e.rgba&255)/255])}},Xi=class extends In{constructor(e,t,n,r,i,a,o,s){super(),this._container=t,this._alpha=i,this._coreBrowserService=a,this._optionsService=o,this._themeService=s,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-${n}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(Mn(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=rr(this._canvas.getContext(`2d`,{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,n){}handleSelectionChanged(e,t,n,r=!1){}_setTransparency(e,t){if(t===this._alpha)return;let n=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,n),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=pi(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,n=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,n*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,n,r){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(e,t,n,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=Dr,this._clipCell(n,r,t.getWidth()),this._ctx.fillText(t.getChars(),n*this._deviceCellWidth+this._deviceCharLeft,r*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,n){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,n){let r=t?e.options.fontWeightBold:e.options.fontWeight;return`${n?`italic`:``} ${r} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},Zi=class extends Xi{constructor(e,t,n,r,i,a,o){super(n,e,`link`,t,!0,i,a,o),this._register(r.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(r.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&di(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},Qi=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r,e.addEventListener(t,n,r)}dispose(){!this._node||!this._handler||(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function $i(e,t,n,r){return new Qi(e,t,n,r)}var ea=class extends In{constructor(e,t,n,r,i,a,o,s,c,l=!0,u){super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._logService=o,this._optionsService=s,this._themeService=c,this._customGlyphs=l,this._cursorBlinkStateManager=this._register(new Ln),this._charAtlasDisposable=this._register(new Ln),this._observerDisposable=this._register(new Ln),this._model=new Fi,this._rowHasBlinkingCells=[],this._rowHasBlinkingCellsCount=0,this._workCell=new vi,this._rectangleRenderer=this._register(new Ln),this._glyphRenderer=this._register(new Ln),this._onChangeTextureAtlas=this._register(new Qr),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new Qr),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new Qr),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new Qr),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new Qr),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`);let d={antialias:!1,depth:!1,preserveDrawingBuffer:u};if(this._gl=this._canvas.getContext(`webgl2`,d),!this._gl)throw Error(`WebGL2 not supported `+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new Tr(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new Zi(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,s,this._themeService)],this.dimensions=dr(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(s.onOptionChange(()=>this._handleOptionsChanged())),this._textBlinkStateManager=this._register(new yi(()=>this._requestRedrawViewport(),this._coreBrowserService,this._optionsService)),this._resetBlinkingRowState(),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register($i(this._canvas,`webglcontextlost`,e=>{this._logService.debug(`webglcontextlost event received`),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,this._logService.warn(`webgl context not restored; firing onContextLoss`),this._onContextLoss.fire(e)},3e3)})),this._register($i(this._canvas,`webglcontextrestored`,e=>{this._logService.warn(`webglcontextrestored event received`),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,mi(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=gi(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=gi(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._register($i(this._coreBrowserService.mainDocument,`mousedown`,()=>this._cursorBlinkStateManager.value?.restartBlinkAnimation())),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(Mn(()=>{clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0;for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),mi(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows),this._resetBlinkingRowState();for(let e of this._renderLayers)e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1),this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1,sync:!0})}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleViewportVisibilityChange(e){this._textBlinkStateManager.setViewportVisible(e)}handleSelectionChanged(e,t,n){for(let r of this._renderLayers)r.handleSelectionChanged(this._terminal,e,t,n);this._model.selection.update(this._core,e,t,n),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new Yi(this._terminal,this._gl,this.dimensions,this._themeService,this._logService),this._glyphRenderer.value=new ji(this._terminal,this._gl,this.dimensions,this._optionsService,this._logService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=pi(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize,this._customGlyphs);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=Pn($r.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),$r.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let e of this._renderLayers)e.reset(this._terminal);this._resetBlinkingRowState(),this._textBlinkStateManager.setNeedsBlinkInViewport(!1),this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached)if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return;for(let n of this._renderLayers)n.handleGridChanged(this._terminal,e,t);if(!this._glyphRenderer.value||!this._rectangleRenderer.value)return;this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t);let n=!1,r=0;for(;this._charAtlas&&this._glyphRenderer.value.beginFrame()&&r++<32;)n=!0,this._clearModel(!0),this._updateModel(0,this._terminal.rows-1);n&&this._glyphRenderer.value.invalidateAtlasTextures(),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor()}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new hi(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let n=this._core,r=this._workCell,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b;e=na(e,n.rows-1,0),t=na(t,n.rows-1,0);let x=this._coreService.decPrivateModes.cursorStyle??n.options.cursorStyle??`block`,S=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,C=S-n.buffer.ydisp,w=Math.min(this._terminal.buffer.active.cursorX,n.cols-1),T=-1,E=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let D=!1;for(a=e;a<=t;a++){o=a+n.buffer.ydisp;let e=n.buffer.lines.get(o);if(!e){for(this._model.lineLengths[a]=0,y=0;y<n.cols;y++)b=(a*n.cols+y)*4,D=!0,this._nullModelCell(y,a,b,0,0,0);this._setRowBlinkState(a,!1);continue}s=e;let t=!1;for(this._model.lineLengths[a]=0,m=S===o,u=0,c=this._characterJoinerService.getJoinedCharacters(o),y=0;y<n.cols;y++){if(i=this._cellColorResolver.result.bg,s.loadCell(y,r),y===0&&(i=this._cellColorResolver.result.bg),l=!1,d=y>=u,f=y,c.length>0&&y===c[0][0]&&d){p=c.shift();let e=this._model.selection.isCellSelected(this._terminal,p[0],o);for(v=p[0]+1;v<p[1];v++)d&&=e===this._model.selection.isCellSelected(this._terminal,v,o);d&&=!m||w<p[0]||w>=p[1],d?(l=!0,r=new ta(r,s.translateToString(!0,p[0],p[1]),p[1]-p[0]),f=p[1]-1):u=p[1]}if(h=r.getChars(),g=r.getCode(),v=(a*n.cols+y)*4,!t&&r.isBlink()&&(t=!0),this._cellColorResolver.resolve(r,y,o,this.dimensions.device.cell.width,this.dimensions.device.cell.height),E&&o===S&&(y===w&&(this._model.cursor={x:w,y:C,width:r.getWidth(),style:this._coreBrowserService.isFocused?x:n.options.cursorInactiveStyle,cursorWidth:n.options.cursorWidth,dpr:this._devicePixelRatio},T=w+r.getWidth()-1),y>=w&&y<=T&&(this._coreBrowserService.isFocused&&x===`block`||this._coreBrowserService.isFocused===!1&&n.options.cursorInactiveStyle===`block`)&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),this._textBlinkStateManager.isEnabled&&!this._textBlinkStateManager.isBlinkOn&&r.isBlink()&&(this._cellColorResolver.result.fg|=1073741824),g!==0&&(this._model.lineLengths[a]=y+1),!(this._model.cells[v]===g&&this._model.cells[v+1]===this._cellColorResolver.result.bg&&this._model.cells[v+2]===this._cellColorResolver.result.fg&&this._model.cells[v+3]===this._cellColorResolver.result.ext)&&(D=!0,h.length>1&&(g|=Pi),this._model.cells[v]=g,this._model.cells[v+1]=this._cellColorResolver.result.bg,this._model.cells[v+2]=this._cellColorResolver.result.fg,this._model.cells[v+3]=this._cellColorResolver.result.ext,_=r.getWidth(),this._glyphRenderer.value.updateCell(y,a,g,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,h,_,i),l)){for(r=this._workCell,y++;y<=f;y++)b=(a*n.cols+y)*4,this._nullModelCell(y,a,b,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext);y--}}this._setRowBlinkState(a,t)}D&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model),this._updateTextBlinkState()}_nullModelCell(e,t,n,r,i,a){this._glyphRenderer.value.updateCell(e,t,0,r,i,a,``,0,0),this._model.cells[n]=0,this._model.cells[n+1]=r,this._model.cells[n+2]=i,this._model.cells[n+3]=a}_resetBlinkingRowState(){this._rowHasBlinkingCells=Array(this._terminal.rows).fill(!1),this._rowHasBlinkingCellsCount=0}_setRowBlinkState(e,t){this._rowHasBlinkingCells[e]!==t&&(this._rowHasBlinkingCells[e]=t,this._rowHasBlinkingCellsCount+=t?1:-1)}_updateTextBlinkState(){this._textBlinkStateManager.setNeedsBlinkInViewport(this._rowHasBlinkingCellsCount>0)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1,sync:!0}))}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},ta=class extends Xr{constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function na(e,t,n=0){return Math.max(Math.min(e,t),n)}var ra=class extends In{constructor(e){if(Un&&Wn()<16&&!document.createElement(`canvas`).getContext(`webgl2`,{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error(`WebGL2 is only supported on Safari 16 and above`);super(),this._onChangeTextureAtlas=this._register(new Qr),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new Qr),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new Qr),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new Qr),this.onContextLoss=this._onContextLoss.event,this._customGlyphs=e?.customGlyphs??!0,this._preserveDrawingBuffer=e?.preserveDrawingBuffer}activate(e){let t=e._core;if(!e.element){this._register(t.onWillOpen(()=>this.activate(e)));return}this._terminal=e;let n=t.coreService,r=t.optionsService,i=t,a=i._renderService,o=i._characterJoinerService,s=i._charSizeService,c=i._coreBrowserService,l=i._decorationService,u=i._logService,d=i._themeService;this._renderer=this._register(new ea(e,o,s,c,n,l,u,r,d,this._customGlyphs,this._preserveDrawingBuffer)),this._register($r.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register($r.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register($r.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register($r.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(Mn(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},ia=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,oa=(e,t)=>{for(var n in t)ia(e,n,{get:t[n],enumerable:!0})},sa=(e,t,n,r)=>{for(var i=r>1?void 0:r?aa(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&ia(t,n,i),i},q=(e,t)=>(n,r)=>t(n,r,e),ca=`Terminal input`,la={get:()=>ca,set:e=>ca=e},ua=`Too much output to announce, navigate to rows manually to read`,da={get:()=>ua,set:e=>ua=e};function fa(e){return e.replace(/\r?\n/g,`\r`)}function pa(e,t){return t?`\x1B[200~${e.replace(/\x1b/g,`␛`)}\x1B[201~`:e}function ma(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function ha(e,t,n,r){e.stopPropagation(),e.clipboardData&&ga(e.clipboardData.getData(`text/plain`),t,n,r)}function ga(e,t,n,r){e=fa(e),e=pa(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function _a(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function va(e,t,n,r,i){_a(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function ya(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function ba(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var xa=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Sa=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o])&&o<4;)a<<=6,a|=s&63;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},Ca=class e{constructor(){this.fg=0,this.bg=0,this.extended=new wa}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},wa=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Ta=class e extends Ca{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new wa,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?ya(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}attributesEquals(e){if(this.getFgColorMode()!==e.getFgColorMode()||this.getFgColor()!==e.getFgColor()||this.getBgColorMode()!==e.getBgColorMode()||this.getBgColor()!==e.getBgColor()||this.isInverse()!==e.isInverse()||this.isBold()!==e.isBold()||this.isUnderline()!==e.isUnderline())return!1;if(this.isUnderline()){if(this.getUnderlineStyle()!==e.getUnderlineStyle())return!1;let t=this.isUnderlineColorDefault(),n=e.isUnderlineColorDefault();if(!(t&&n)&&(t!==n||this.getUnderlineColor()!==e.getUnderlineColor()||this.getUnderlineColorMode()!==e.getUnderlineColorMode()))return!1}return!(this.isOverline()!==e.isOverline()||this.isBlink()!==e.isBlink()||this.isInvisible()!==e.isInvisible()||this.isItalic()!==e.isItalic()||this.isDim()!==e.isDim()||this.isStrikethrough()!==e.isStrikethrough())}},Ea=new Map;function Da(e){return e.di$dependencies||[]}function Oa(e){if(Ea.has(e))return Ea.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);ka(t,e,r)};return t._id=e,Ea.set(e,t),t}function ka(e,t,n){t.di$target===t?t.di$dependencies.push({id:e,index:n}):(t.di$dependencies=[{id:e,index:n}],t.di$target=t)}var Aa=Oa(`BufferService`),ja=Oa(`MouseStateService`),Ma=Oa(`CoreService`),Na=Oa(`CharsetService`),Pa=Oa(`InstantiationService`),Fa=Oa(`LogService`),Ia=Oa(`OptionsService`),La=Oa(`OscLinkService`),Ra=Oa(`UnicodeService`),za=Oa(`DecorationService`),Ba=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n,this._workCell=new Ta}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=this._workCell,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId)if(c===-1){c=t,s=a.extended.urlId;continue}else l=a.extended.urlId!==s;else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a=t+ +(!l&&t===o-1),u=this._getRangeWithLineWrap(e,c,a,s),d=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(d=!0)}catch{d=!0}d||r.push({text:n,range:u,activate:(e,t)=>i?i.activate(e,t,u):Va(e,t),hover:(e,t)=>i?.hover?.(e,t,u),leave:(e,t)=>i?.leave?.(e,t,u)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}_getRangeWithLineWrap(e,t,n,r){let i=e,a=t,o=e,s=n;for(;a===0&&this._bufferService.buffer.lines.get(i-1)?.isWrapped;){let e=this._bufferService.buffer.lines.get(i-2);if(!e)break;let t=e.getTrimmedLength();if(t===0||!this._hasUrlId(e,t-1,r))break;let n=t-1;for(;n>0&&this._hasUrlId(e,n-1,r);)n--;i--,a=n}for(;;){let e=this._bufferService.buffer.lines.get(o-1);if(!e)break;let t=e.getTrimmedLength();if(s!==t)break;let n=this._bufferService.buffer.lines.get(o);if(!n?.isWrapped)break;let i=n.getTrimmedLength();if(i===0||!this._hasUrlId(n,0,r))break;let a=1;for(;a<i&&this._hasUrlId(n,a,r);)a++;o++,s=a}return{start:{x:a+1,y:i},end:{x:s,y:o}}}_hasUrlId(e,t,n){let r=this._workCell;return e.loadCell(t,r),!!r.hasExtendedAttrs()&&r.extended.urlId===n}};Ba=sa([q(0,Aa),q(1,Ia),q(2,La)],Ba);function Va(e,t){if(confirm(`Do you want to navigate to ${t}?
67
+
68
+ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var Ha=Oa(`CharSizeService`),Ua=Oa(`CoreBrowserService`),Wa=Oa(`MouseCoordsService`),Ga=Oa(`MouseService`),Ka=Oa(`RenderService`),qa=Oa(`SelectionService`),Ja=Oa(`CharacterJoinerService`),Ya=Oa(`ThemeService`),Xa=Oa(`LinkProviderService`),Za=Oa(`KeyboardService`);function Qa(e){return{dispose:e}}function $a(e){if(!e)return e;if(Array.isArray(e)){for(let t of e)t.dispose();return[]}return e.dispose(),e}var eo=class{constructor(){this._disposables=new Set,this._isDisposed=!1}get isDisposed(){return this._isDisposed}add(e){return this._isDisposed?e.dispose():this._disposables.add(e),e}dispose(){if(!this._isDisposed){this._isDisposed=!0;for(let e of this._disposables)e.dispose();this._disposables.clear()}}clear(){for(let e of this._disposables)e.dispose();this._disposables.clear()}},to=class{constructor(){this._store=new eo}dispose(){this._store.dispose()}_register(e){return this._store.add(e)}};to.None=Object.freeze({dispose(){}});var no=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}};function ro(e,t=0,n){let r=setTimeout(()=>{e(),n&&i.dispose()},t),i=Qa(()=>{clearTimeout(r)});return n?.add(i),i}var io=class{constructor(){this._token=-1,this._isDisposed=!1}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw Error(`Calling cancelAndSet on a disposed TimeoutTimer`);this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw Error(`Calling setIfNotSet on a disposed TimeoutTimer`);this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},ao=class{constructor(){this._isScheduled=!1,this._isDisposed=!1}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._isScheduled=!1}set(e){if(this._isDisposed)throw Error(`Calling set on a disposed MicrotaskTimer`);this._isScheduled||(this._isScheduled=!0,queueMicrotask(()=>{this._isScheduled&&(this._isScheduled=!1,e())}))}},oo=class{constructor(){this._isDisposed=!1}cancel(){this._disposable?.dispose(),this._disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this._isDisposed)throw Error(`Calling cancelAndSet on a disposed IntervalTimer`);this.cancel();let r=n.setInterval(()=>{e()},t);this._disposable={dispose:()=>{n.clearInterval(r),this._disposable=void 0}}}dispose(){this.cancel(),this._isDisposed=!0}};function so(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView;let n=e;return n?.view?n.view:window}var co=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r,e.addEventListener(t,n,r)}dispose(){!this._node||!this._handler||(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function lo(e,t,n,r){return new co(e,t,n,r)}function uo(e,t,n,r){return lo(e,t,n,r)}var fo={CLICK:`click`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_LEAVE:`mouseleave`,KEY_DOWN:`keydown`,KEY_UP:`keyup`,INPUT:`input`,BLUR:`blur`,FOCUS:`focus`,CHANGE:`change`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_UP:`pointerup`,MOUSE_WHEEL:`wheel`,WHEEL:`wheel`};function po(e){let t=e.getBoundingClientRect(),n=so(e);return{left:t.left+n.scrollX,top:t.top+n.scrollY,width:t.width,height:t.height}}var mo=class{constructor(e,t){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){console.error(e)}}static sort(e,t){return t.priority-e.priority}},ho=new Map;function go(e){let t=ho.get(e);return t||(t={next:[],current:[],animFrameRequested:!1,inAnimationFrameRunner:!1},ho.set(e,t)),t}function _o(e){let t=go(e);for(t.animFrameRequested=!1,t.current=t.next,t.next=[],t.inAnimationFrameRunner=!0;t.current.length>0;)t.current.sort(mo.sort),t.current.shift().execute();t.inAnimationFrameRunner=!1}function vo(e,t,n=0){let r=go(e),i=new mo(t,n);return r.next.push(i),r.animFrameRequested||(r.animFrameRequested=!0,e.requestAnimationFrame(()=>_o(e))),i}var yo=class extends oo{constructor(e){super(),this._defaultTarget=e?so(e):void 0}cancelAndSet(e,t,n){super.cancelAndSet(e,t,n??this._defaultTarget??window)}},bo=class{constructor(e){this.domNode=e,this._width=``,this._height=``,this._top=``,this._left=``,this._bottom=``,this._right=``,this._className=``,this._position=``,this._layerHint=!1,this._contain=`none`}setWidth(e){let t=xo(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=xo(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=xo(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=xo(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=xo(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=xo(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,e?this.domNode.style.transform=`translate3d(0px, 0px, 0px)`:this.domNode.style.transform=``)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}};function xo(e){return typeof e==`number`?`${e}px`:e}var So={};oa(So,{getSafariVersion:()=>jo,getZoomFactor:()=>Ao,isChrome:()=>Do,isChromeOS:()=>Fo,isFirefox:()=>Eo,isLegacyEdge:()=>Oo,isLinux:()=>Po,isMac:()=>Mo,isNode:()=>Co,isSafari:()=>ko,isWindows:()=>No});var Co=!!(typeof process<`u`&&`title`in process&&(typeof navigator>`u`||navigator.userAgent.startsWith(`Node.js/`))),wo=Co?`node`:navigator.userAgent,To=Co?`node`:navigator.platform,Eo=wo.includes(`Firefox`),Do=wo.includes(`Chrome`),Oo=wo.includes(`Edge`),ko=/^((?!chrome|android).)*safari/i.test(wo);function Ao(e){return 1}function jo(){if(!ko)return 0;let e=wo.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1],10)}var Mo=[`Macintosh`,`MacIntel`,`MacPPC`,`Mac68K`].includes(To),No=[`Windows`,`Win16`,`Win32`,`WinCE`].includes(To),Po=To.indexOf(`Linux`)>=0,Fo=/\bCrOS\b/.test(wo),Io=new WeakMap;function Lo(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if(t.origin!==`null`&&n.origin!==`null`&&t.origin!==n.origin)return null}catch{return null}return e.parent}var Ro=class{static _getSameOriginWindowChain(e){let t=Io.get(e);if(!t){t=[],Io.set(e,t);let n=e,r;do r=Lo(n),r?t.push({window:new WeakRef(n),iframeElement:n.frameElement??null}):t.push({window:new WeakRef(n),iframeElement:null}),n=r;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,r=0,i=this._getSameOriginWindowChain(e);for(let e of i){let i=e.window.deref();if(n+=i?.scrollY??0,r+=i?.scrollX??0,i===t||!e.iframeElement)break;let a=e.iframeElement.getBoundingClientRect();n+=a.top,r+=a.left}return{top:n,left:r}}},zo=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail??1,t.type===`dblclick`&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX==`number`?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=Ro.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},Bo=class{constructor(e,t=0,n=0){this.browserEvent=e??null,this.target=e?e.target??e.targetNode??e.srcElement??null:null,this.deltaY=n,this.deltaX=t;let r=!1;if(Do){let e=navigator.userAgent.match(/Chrome\/(\d+)/);r=(e?parseInt(e[1],10):123)<=122}if(e){let t=e,n=e,i=e.view?.devicePixelRatio??1;if(typeof t.wheelDeltaY<`u`)r?this.deltaY=t.wheelDeltaY/(120*i):this.deltaY=t.wheelDeltaY/120;else if(typeof n.VERTICAL_AXIS<`u`&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if(e.type===`wheel`){let t=e;t.deltaMode===t.DOM_DELTA_LINE?Eo&&!Mo?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof t.wheelDeltaX<`u`)ko&&No?this.deltaX=-(t.wheelDeltaX/120):r?this.deltaX=t.wheelDeltaX/(120*i):this.deltaX=t.wheelDeltaX/120;else if(typeof n.HORIZONTAL_AXIS<`u`&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type===`wheel`){let t=e;t.deltaMode===t.DOM_DELTA_LINE?Eo&&!Mo?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(r?this.deltaY=e.wheelDelta/(120*i):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},Vo=class{constructor(){this._hooks=new eo,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let t=this._onStopCallback;this._onStopCallback=null,e&&t&&t()}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,r,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=i;let a=e;try{e.setPointerCapture(t),this._hooks.add(Qa(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{a=so(e)}this._hooks.add(lo(a,fo.POINTER_MOVE,e=>{if(e.buttons!==n){this.stopMonitoring(!0);return}e.preventDefault(),this._pointerMoveCallback(e)})),this._hooks.add(lo(a,fo.POINTER_UP,e=>this.stopMonitoring(!0)))}},Ho=class extends to{_onclick(e,t){this._register(lo(e,fo.CLICK,n=>t(new zo(so(e),n))))}_onmouseover(e,t){this._register(lo(e,fo.MOUSE_OVER,n=>t(new zo(so(e),n))))}_onmouseleave(e,t){this._register(lo(e,fo.MOUSE_LEAVE,n=>t(new zo(so(e),n))))}},Uo=class extends Ho{constructor(e){super(),this._handleActivate=e.handleActivate,this.bgDomNode=document.createElement(`div`),this.bgDomNode.className=`xterm-arrow-background`,this.bgDomNode.style.position=`absolute`,this.bgDomNode.style.width=e.bgWidth+`px`,this.bgDomNode.style.height=e.bgHeight+`px`,typeof e.top<`u`&&(this.bgDomNode.style.top=`0px`),typeof e.left<`u`&&(this.bgDomNode.style.left=`0px`),typeof e.bottom<`u`&&(this.bgDomNode.style.bottom=`0px`),typeof e.right<`u`&&(this.bgDomNode.style.right=`0px`),this.domNode=document.createElement(`div`),this.domNode.className=e.className,this.domNode.style.position=`absolute`;let t=Math.min(e.bgWidth,e.bgHeight);this.domNode.style.width=t+`px`,this.domNode.style.height=t+`px`,typeof e.top<`u`&&(this.domNode.style.top=e.top+`px`),typeof e.left<`u`&&(this.domNode.style.left=e.left+`px`),typeof e.bottom<`u`&&(this.domNode.style.bottom=e.bottom+`px`),typeof e.right<`u`&&(this.domNode.style.right=e.right+`px`),this._pointerMoveMonitor=this._register(new Vo),this._register(uo(this.bgDomNode,fo.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._register(uo(this.domNode,fo.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._pointerdownRepeatTimer=this._register(new yo),this._pointerdownScheduleRepeatTimer=this._register(new io)}_arrowPointerDown(e){!e.target||!(e.target instanceof Element)||(this._handleActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._handleActivate(),1e3/24,so(e))},200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault())}},J=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||=(e,t,n)=>{if(this._disposed)return Qa(()=>{});let r={fn:e,thisArgs:t};this._listeners.push(r);let i=Qa(()=>{let e=this._listeners.indexOf(r);e!==-1&&this._listeners.splice(e,1)});return n&&(Array.isArray(n)?n.push(i):n.add(i)),i},this._event}fire(e){if(!this._disposed)switch(this._listeners.length){case 0:return;case 1:{let{fn:t,thisArgs:n}=this._listeners[0];t.call(n,e);return}default:{let t=this._listeners.slice();for(let{fn:n,thisArgs:r}of t)n.call(r,e)}}}dispose(){this._disposed||(this._disposed=!0,this._listeners.length=0)}},Wo;(e=>{function t(e,t){return e(e=>t.fire(e))}e.forward=t;function n(e,t){return(n,r,i)=>e(e=>n.call(r,t(e)),void 0,i)}e.map=n;function r(...e){return(t,n,r)=>{let i=new eo;for(let r of e)i.add(r(e=>t.call(n,e)));return r&&(Array.isArray(r)?r.push(i):r.add(i)),i}}e.any=r;function i(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=i})(Wo||={});var Go=class e{constructor(e,t,n,r,i,a,o){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,n|=0,r|=0,i|=0,a|=0,o|=0),this.rawScrollLeft=r,this.rawScrollTop=o,t<0&&(t=0),r+t>n&&(r=n-t),r<0&&(r=0),i<0&&(i=0),o+i>a&&(o=a-i),o<0&&(o=0),this.width=t,this.scrollWidth=n,this.scrollLeft=r,this.height=i,this.scrollHeight=a,this.scrollTop=o}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(t,n){return new e(this._forceIntegerValues,typeof t.width<`u`?t.width:this.width,typeof t.scrollWidth<`u`?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof t.height<`u`?t.height:this.height,typeof t.scrollHeight<`u`?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new e(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<`u`?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<`u`?t.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let n=this.width!==e.width,r=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,a=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:r,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:o,scrollTopChanged:s}}},Ko=class extends to{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new J),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Go(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0){this.setScrollPositionNow(e);return}if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>`u`?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>`u`?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let r;r=t?new Xo(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):Xo.start(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{let t=this._state.withScrollPosition(e);this._smoothScrolling=Xo.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},qo=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};function Jo(e,t){let n=t-e;return function(t){return e+n*Qo(t)}}function Yo(e,t,n){return function(r){return r<n?e(r/n):t((r-n)/(1-n))}}var Xo=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.duration=r,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this._scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this._scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){if(Math.abs(e-t)>2.5*n){let r,i;return e<t?(r=e+.75*n,i=t-.75*n):(r=e-.75*n,i=t+.75*n),Yo(Jo(e,r),Jo(i,t),.33)}return Jo(e,t)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){let t=(e-this.startTime)/this.duration;return t<1?new qo(this._scrollLeft(t),this._scrollTop(t),!1):new qo(this.to.scrollLeft,this.to.scrollTop,!0)}static start(t,n,r){return r+=10,new e(t,n,Date.now()-10,r)}};function Zo(e){return e**3}function Qo(e){return 1-Zo(1-e)}var $o=class extends to{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new io)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?` xterm-fade`:``)))}},es=140,ts=class extends Ho{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new $o(e.visibility,`xterm-visible xterm-scrollbar `+e.extraScrollbarClassName,`xterm-invisible xterm-scrollbar `+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new Vo),this._shouldRender=!0,this.domNode=new bo(document.createElement(`div`)),this.domNode.setAttribute(`role`,`presentation`),this.domNode.setAttribute(`aria-hidden`,`true`),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition(`absolute`),this._register(lo(this.domNode.domNode,fo.POINTER_DOWN,e=>this._domNodePointerDown(e)))}_createArrow(e){let t=this._register(new Uo(e));return this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode),t}_createSlider(e,t,n,r){this.slider=new bo(document.createElement(`div`)),this.slider.setClassName(`xterm-slider`),this.slider.setPosition(`absolute`),this.slider.setTop(e),this.slider.setLeft(t),typeof n==`number`&&this.slider.setWidth(n),typeof r==`number`&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain(`strict`),this.domNode.domNode.appendChild(this.slider.domNode),this._register(lo(this.slider.domNode,fo.POINTER_DOWN,e=>{e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))})),this._onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_handleElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_handleElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_handleElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._handlePointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);n<=i&&i<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._handlePointerDown(e)}_handlePointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX==`number`&&typeof e.offsetY==`number`)t=e.offsetX,n=e.offsetY;else{let r=po(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}let r=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName(`xterm-active`,!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{let i=this._sliderOrthogonalPointerPosition(e),a=Math.abs(i-n);if(No&&a>es){this._setDesiredScrollPositionNow(r.getScrollPosition());return}let o=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(o))},()=>{this.slider.toggleClassName(`xterm-active`,!1),this._host.handleDragEnd()}),this._host.handleDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},ns=class e{constructor(e,t,n,r,i,a){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=r,this._scrollSize=i,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize===t?!1:(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){let t=Math.round(e);return this._scrollSize===t?!1:(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition===t?!1:(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setArrowSize(e){let t=Math.round(e);this._arrowSize!==t&&(this._arrowSize=t,this._refreshComputedValues())}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,r,i){let a=Math.max(0,n-e),o=Math.max(0,a-2*t),s=r>0&&r>n;if(!s)return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(o),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*o/r))),l=(o-c)/(r-n),u=i*l;return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(c),computedSliderRatio:l,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,n=this._scrollPosition;return t<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;let t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}},rs=class extends ts{constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new ns(t.horizontalHasArrows?t.horizontalScrollbarSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,r.width,r.scrollWidth,i.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:`xterm-horizontal`,scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw Error(`horizontalHasArrows is not supported in xterm.js`);this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}handleScroll(e){return this._shouldRender=this._handleElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._handleElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._handleElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},is=class extends ts{constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition(),a=t.verticalHasArrows;super({lazyRender:t.lazyRender,host:n,scrollbarState:new ns(a?t.verticalScrollbarSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,r.height,r.scrollHeight,i.scrollTop),visibility:t.vertical,extraScrollbarClassName:`xterm-vertical`,scrollable:e,scrollByPage:t.scrollByPage}),this._arrowScrollDelta=0,this._setArrows(a,t.verticalScrollbarSize),this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}handleScroll(e){return this._shouldRender=this._handleElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._handleElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._handleElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}_arrowScroll(e){let t=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollTop:t.scrollTop+e})}_setArrows(e,t){if(this._arrowScrollDelta=t,(!this._arrowUp||!this._arrowDown)&&(this._arrowUp=this._createArrow({className:`xterm-scra xterm-arrow-up`,top:0,left:0,bgWidth:t,bgHeight:t,handleActivate:()=>this._arrowScroll(-this._arrowScrollDelta)}),this._arrowDown=this._createArrow({className:`xterm-scra xterm-arrow-down`,bottom:0,left:0,bgWidth:t,bgHeight:t,handleActivate:()=>this._arrowScroll(this._arrowScrollDelta)})),this._updateArrowSize(this._arrowUp,t),this._updateArrowSize(this._arrowDown,t),!this._arrowUp||!this._arrowDown)return;let n=e?``:`none`;this._arrowUp.bgDomNode.style.display=n,this._arrowUp.domNode.style.display=n,this._arrowDown.bgDomNode.style.display=n,this._arrowDown.domNode.style.display=n}_updateArrowSize(e,t){e&&(e.bgDomNode.style.width=`${t}px`,e.bgDomNode.style.height=`${t}px`,e.domNode.style.width=`${t}px`,e.domNode.style.height=`${t}px`)}updateOptions(e){let t=e.verticalHasArrows?e.verticalScrollbarSize:0;this._scrollbarState.setArrowSize(t),this._setArrows(e.verticalHasArrows,e.verticalScrollbarSize),this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},as=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},os=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,n=1,r=this._rear;for(;r!==-1;){let i=r===this._front?e:2**-n;if(e-=i,t+=this._memory[r].score*i,r===this._front)break;r=(this._capacity+r-1)%this._capacity,n++}return t<=.5}acceptStandardWheelEvent(e){if(Do){let t=Ao(so(e.browserEvent));this.accept(Date.now(),e.deltaX*t,e.deltaY*t)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,n){let r=null,i=new as(e,t,n);this._front===-1&&this._rear===-1?(this._memory[0]=i,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i),i.score=this._computeScore(i,r)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(n+=.25),t){let r=Math.abs(e.deltaX),i=Math.abs(e.deltaY),a=Math.abs(t.deltaX),o=Math.abs(t.deltaY),s=Math.max(Math.min(r,a),1),c=Math.max(Math.min(i,o),1),l=Math.max(r,a),u=Math.max(i,o);l%s===0&&u%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}};os.INSTANCE=new os;var ss=os,cs=class extends Ho{constructor(e,t,n){super(),this._onScroll=this._register(new J),this.onScroll=this._onScroll.event,t??={};let r,i=!n;n?r=n:(t.mouseWheelSmoothScroll=!1,r=new Ko({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>vo(so(e),t)})),this._options=ls(t),this._scrollable=r,this._register(this._scrollable.onScroll(e=>{this._handleScroll(e),this._onScroll.fire(e)})),i&&this._register(this._scrollable);let a={handleMouseWheel:e=>this._handleMouseWheel(e),handleDragStart:()=>this._handleDragStart(),handleDragEnd:()=>this._handleDragEnd()};this._verticalScrollbar=this._register(new is(this._scrollable,this._options,a)),this._horizontalScrollbar=this._register(new rs(this._scrollable,this._options,a)),this._domNode=document.createElement(`div`),this._domNode.className=`xterm-scrollable-element `+this._options.className,this._domNode.setAttribute(`role`,`presentation`),this._domNode.style.position=`relative`,this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=new bo(document.createElement(`div`)),this._leftShadowDomNode.setClassName(`xterm-shadow`),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=new bo(document.createElement(`div`)),this._topShadowDomNode.setClassName(`xterm-shadow`),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=new bo(document.createElement(`div`)),this._topLeftShadowDomNode.setClassName(`xterm-shadow`),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode??this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this._onmouseover(this._listenOnDomNode,e=>this._handleMouseOver(e)),this._onmouseleave(this._listenOnDomNode,e=>this._handleMouseLeave(e)),this._hideTimeout=this._register(new io),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=$a(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}updateClassName(e){this._options.className=e,Mo&&(this._options.className+=` xterm-mac`),this._domNode.className=`xterm-scrollable-element `+this._options.className}updateOptions(e){typeof e.handleMouseWheel<`u`&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<`u`&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<`u`&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<`u`&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<`u`&&(this._options.horizontal=e.horizontal),typeof e.vertical<`u`&&(this._options.vertical=e.vertical),typeof e.horizontalHasArrows<`u`&&(this._options.horizontalHasArrows=e.horizontalHasArrows),typeof e.verticalHasArrows<`u`&&(this._options.verticalHasArrows=e.verticalHasArrows),typeof e.horizontalScrollbarSize<`u`&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<`u`&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<`u`&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._handleMouseWheel(new Bo(e))}_setListeningToMouseWheel(e){this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=$a(this._mouseWheelToDispose),e)&&this._mouseWheelToDispose.push(lo(this._listenOnDomNode,fo.MOUSE_WHEEL,e=>{this._handleMouseWheel(new Bo(e))},{passive:!1}))}_handleMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=ss.INSTANCE;t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&i+r===0?i=r=0:Math.abs(r)>=Math.abs(i)?i=0:r=0),this._options.flipAxes&&([r,i]=[i,r]);let a=!Mo&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!i&&(i=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(i*=this._options.fastScrollSensitivity,r*=this._options.fastScrollSensitivity);let o=this._scrollable.getFutureScrollPosition(),s={};if(r){let e=50*r,t=o.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(s,t)}if(i){let e=50*i,t=o.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(s,t)}s=this._scrollable.validateScrollPosition(s),(o.scrollLeft!==s.scrollLeft||o.scrollTop!==s.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(s):this._scrollable.setScrollPositionNow(s),n=!0)}let r=n;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_handleScroll(e){this._shouldRender=this._horizontalScrollbar.handleScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.handleScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,r=n?` xterm-shadow-left`:``,i=t?` xterm-shadow-top`:``,a=n||t?` xterm-shadow-top-left-corner`:``;this._leftShadowDomNode.setClassName(`xterm-shadow${r}`),this._topShadowDomNode.setClassName(`xterm-shadow${i}`),this._topLeftShadowDomNode.setClassName(`xterm-shadow${a}${i}${r}`)}}_handleDragStart(){this._isDragging=!0,this._reveal()}_handleDragEnd(){this._isDragging=!1,this._hide()}_handleMouseLeave(e){this._mouseIsOver=!1,this._hide()}_handleMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),500)}};function ls(e){let t={lazyRender:typeof e.lazyRender<`u`?e.lazyRender:!1,className:typeof e.className<`u`?e.className:``,useShadows:typeof e.useShadows<`u`?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<`u`?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<`u`?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<`u`?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<`u`?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<`u`?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<`u`?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<`u`?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<`u`?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<`u`?e.mouseWheelSmoothScroll:!0,listenOnDomNode:typeof e.listenOnDomNode<`u`?e.listenOnDomNode:null,horizontal:typeof e.horizontal<`u`?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<`u`?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<`u`?e.horizontalHasArrows:!1,vertical:typeof e.vertical<`u`?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<`u`?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<`u`?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<`u`?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<`u`?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<`u`?e.verticalSliderSize:t.verticalScrollbarSize,Mo&&(t.className+=` xterm-mac`),t}var us=class extends to{constructor(e,t,n,r,i,a,o,s,c){super(),this._bufferService=n,this._coreService=i,this._optionsService=s,this._renderService=c,this._onRequestScrollLines=this._register(new J),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1,this._needsSyncOnRender=!1;let l=this._register(new Ko({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:e=>vo(r.window,e)}));this._register(this._optionsService.onSpecificOptionChange(`smoothScrollDuration`,()=>{l.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new cs(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,verticalHasArrows:this._optionsService.rawOptions.scrollbar?.showArrows??!1,...this._getChangeOptions()},l)),this._register(this._optionsService.onMultipleOptionChange([`scrollSensitivity`,`fastScrollSensitivity`,`scrollbar`],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(a.onProtocolChange(e=>{this._scrollableElement.updateOptions({handleMouseWheel:!(e&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(Wo.runAndSubscribe(o.onChangeColors,()=>{e.style.backgroundColor=o.colors.background.css,this._scrollableElement.getDomNode().style.backgroundColor=o.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Qa(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=r.mainDocument.createElement(`style`),t.appendChild(this._styleElement),this._register(Qa(()=>this._styleElement.remove())),this._register(Wo.runAndSubscribe(o.onChangeColors,()=>{this._styleElement.textContent=[`.xterm .xterm-scrollable-element > .xterm-scrollbar > .xterm-slider {`,` background: ${o.colors.scrollbarSliderBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .xterm-scrollbar > .xterm-slider:hover {`,` background: ${o.colors.scrollbarSliderHoverBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .xterm-scrollbar > .xterm-slider.xterm-active {`,` background: ${o.colors.scrollbarSliderActiveBackground.css};`,`}`].join(`
69
+ `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._renderService.onRender(()=>{this._needsSyncOnRender&&(this._needsSyncOnRender=!1,this._sync())})),this._register(this._scrollableElement.onScroll(e=>this._handleScroll(e)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){let e=this._optionsService.rawOptions.scrollbar?.showScrollbar??!0,t=this._optionsService.rawOptions.scrollbar?.showArrows??!1,n=e?this._optionsService.rawOptions.scrollbar?.width??14:0;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,vertical:e?1:2,verticalScrollbarSize:n,verticalHasArrows:t}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){if(!(!this._renderService||this._isSyncing)){if(this._coreService.decPrivateModes.synchronizedOutput){this._needsSyncOnRender=!0;return}this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1}}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}handleTouchScroll(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({scrollTop:t.scrollTop-e})}};us=sa([q(2,Aa),q(3,Ua),q(4,Ma),q(5,ja),q(6,Ya),q(7,Ia),q(8,Ka)],us);var ds=class extends to{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,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(e=>this._removeDecoration(e))),this._register(Qa(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement(`div`);t.classList.add(`xterm-decoration`),t.classList.toggle(`xterm-decoration-top-layer`,e?.options?.layer===`top`),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display=`none`),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display=`none`,e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive?`none`:`block`,this._altBufferIsActive||(n.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,n.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(n)}}_refreshXPosition(e,t=e.element){if(!t)return;let n=e.options.x??0;(e.options.anchor||`left`)===`right`?t.style.right=n?`${n*this._renderService.dimensions.css.cell.width}px`:``:t.style.left=n?`${n*this._renderService.dimensions.css.cell.width}px`:``}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};ds=sa([q(1,Aa),q(2,Ua),q(3,za),q(4,Ka)],ds);var fs=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(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||`full`]&&t<=e.endBufferLine+this._linePadding[n||`full`]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},ps={full:0,left:0,center:0,right:0},ms={full:0,left:0,center:0,right:0},hs={full:0,left:0,center:0,right:0},gs=class extends to{constructor(e,t,n,r,i,a,o,s){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=a,this._themeService=o,this._coreBrowserService=s,this._colorZoneStore=new fs,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-decoration-overview-ruler`),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(Qa(()=>this._canvas?.remove()));let c=this._canvas.getContext(`2d`);if(c)this._ctx=c;else throw Error(`Ctx cannot be null`);this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),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())})),this._register(this._renderService.onDimensionsChange(()=>this._queueRefresh(!0))),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange(`scrollbar`,()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._register(Qa(()=>{this._animationFrame!==void 0&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)})),this._queueRefresh(!0)}get _width(){let e=this._optionsService.rawOptions.scrollbar;return e?.showScrollbar??!0?e?.width??0:0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);ms.full=this._canvas.width,ms.left=e,ms.center=t,ms.right=e,this._refreshDrawHeightConstants(),hs.full=1,hs.left=1,hs.center=1+ms.left,hs.right=1+ms.left+ms.center}_refreshDrawHeightConstants(){ps.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);ps.left=t,ps.center=t,ps.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ps.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ps.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ps.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ps.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){if(this._store.isDisposed||!this._renderService.hasRenderer())return;let e=this._renderService.dimensions.css.canvas.height,t=this._renderService.dimensions.device.canvas.height;this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${e}px`,this._canvas.height=t,this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){if(this._store.isDisposed||!this._renderService.hasRenderer())return;this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let e of this._decorationService.decorations)this._colorZoneStore.addDecoration(e);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!==`full`&&this._renderColorZone(t);for(let t of e)t.position===`full`&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.scrollbar?.overviewRuler?.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.scrollbar?.overviewRuler?.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(hs[e.position||`full`],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-ps[e.position||`full`]/2),ms[e.position||`full`],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+ps[e.position||`full`]))}_queueRefresh(e,t){this._store.isDisposed||(this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._store.isDisposed||this._refreshDecorations(),this._animationFrame=void 0})))}};gs=sa([q(2,Aa),q(3,za),q(4,Ka),q(5,Ia),q(6,Ya),q(7,Ua)],gs);var _s=class{constructor(e,t,n,r,i,a){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._compositionSuffix=``,this._dataAlreadySent=``}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0;let e=this._textarea.selectionStart??this._textarea.value.length,t=this._textarea.selectionEnd??e;this._compositionPosition.start=Math.min(e,t),this._compositionPosition.end=Math.max(e,t),this._compositionSuffix=this._textarea.value.substring(this._compositionPosition.end),this._compositionView.textContent=``,this._dataAlreadySent=``,this._compositionView.classList.add(`active`)}compositionupdate(e){this._compositionView.textContent=`\u200E${e.data}\u200E`,this.updateCompositionElements(),setTimeout(()=>{let e=this._textarea.selectionEnd??this._textarea.value.length;this._compositionPosition.end=Math.max(this._compositionPosition.start,e)},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove(`active`),this._isComposing=!1,e){let e={start:this._compositionPosition.start,end:this._compositionPosition.end},t=this._compositionSuffix;this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let n;if(e.start+=this._dataAlreadySent.length,this._isComposing)n=this._textarea.value.substring(e.start,this._compositionPosition.start);else{let r=this._textarea.value,i=t.length>0&&r.endsWith(t)?r.length-t.length:r.length;n=r.substring(e.start,Math.max(e.start,i))}n.length>0&&this._coreService.triggerDataEvent(n,!0)}},0)}else{this._isSendingComposition=!1;let e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){if(this._textareaChangeTimer)return;let e=this._textarea.value;this._textareaChangeTimer=window.setTimeout(()=>{if(this._textareaChangeTimer=void 0,!this._isComposing){let t=this._textarea.value,n=t.replace(e,``);this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent(``,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),t=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=e*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+`px`,this._compositionView.style.top=n+`px`,this._compositionView.style.height=t+`px`,this._compositionView.style.lineHeight=t+`px`,this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+`px`;let i=this._bufferService.cols*this._renderService.dimensions.css.cell.width-r;this._compositionView.style.maxWidth=i+`px`,this._compositionView.style.overflow=`hidden`,this._compositionView.style.direction=`rtl`;let a=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+`px`,this._textarea.style.top=n+`px`,this._textarea.style.width=Math.max(a.width,1)+`px`,this._textarea.style.height=Math.max(a.height,1)+`px`,this._textarea.style.lineHeight=a.height+`px`}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};_s=sa([q(2,Aa),q(3,Ia),q(4,Ma),q(5,Ka)],_s);var vs=0,ys=0,bs=0,xs=0,Ss={css:`#00000000`,rgba:0},Cs;(e=>{function t(e,t,n,r){return r===void 0?`#${Os(e)}${Os(t)}${Os(n)}`:`#${Os(e)}${Os(t)}${Os(n)}${Os(r)}`}e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(Cs||={});var ws;(e=>{function t(e,t){if(xs=(t.rgba&255)/255,xs===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return vs=a+Math.round((n-a)*xs),ys=o+Math.round((r-o)*xs),bs=s+Math.round((i-s)*xs),{css:Cs.toCss(vs,ys,bs),rgba:Cs.toRgba(vs,ys,bs)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=Ds.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return Cs.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[vs,ys,bs]=Ds.toChannels(t),{css:Cs.toCss(vs,ys,bs),rgba:t}}e.opaque=i;function a(e,t){return xs=Math.round(t*255),[vs,ys,bs]=Ds.toChannels(e.rgba),{css:Cs.toCss(vs,ys,bs,xs),rgba:Cs.toRgba(vs,ys,bs,xs)}}e.opacity=a;function o(e,t){return xs=e.rgba&255,a(e,xs*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}e.toColorRGB=s})(ws||={});var Ts;(e=>{let t,n;try{let e=document.createElement(`canvas`);e.width=1,e.height=1;let r=e.getContext(`2d`,{willReadFrequently:!0});r&&(t=r,t.globalCompositeOperation=`copy`,n=t.createLinearGradient(0,0,1,1))}catch{}function r(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return vs=parseInt(e.slice(1,2).repeat(2),16),ys=parseInt(e.slice(2,3).repeat(2),16),bs=parseInt(e.slice(3,4).repeat(2),16),Cs.toColor(vs,ys,bs);case 5:return vs=parseInt(e.slice(1,2).repeat(2),16),ys=parseInt(e.slice(2,3).repeat(2),16),bs=parseInt(e.slice(3,4).repeat(2),16),xs=parseInt(e.slice(4,5).repeat(2),16),Cs.toColor(vs,ys,bs,xs);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}let r=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(r)return vs=parseInt(r[1],10),ys=parseInt(r[2],10),bs=parseInt(r[3],10),xs=Math.round((r[5]===void 0?1:parseFloat(r[5]))*255),Cs.toColor(vs,ys,bs,xs);if(e===`transparent`)return{css:`transparent`,rgba:0};if(!t||!n||(t.fillStyle=n,t.fillStyle=e,typeof t.fillStyle!=`string`)||(t.fillRect(0,0,1,1),[vs,ys,bs,xs]=t.getImageData(0,0,1,1).data,xs!==255))throw Error(`css.toColor: Unsupported css format`);return{rgba:Cs.toRgba(vs,ys,bs,xs),css:e}}e.toColor=r})(Ts||={});var Es;(e=>{function t(e){return n(e>>16&255,e>>8&255,e&255)}e.relativeLuminance=t;function n(e,t,n){let r=e/255,i=t/255,a=n/255,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,c=a<=.03928?a/12.92:((a+.055)/1.055)**2.4;return o*.2126+s*.7152+c*.0722}e.relativeLuminance2=n})(Es||={});var Ds;(e=>{function t(e,t){if(xs=(t&255)/255,xs===1)return t;let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=e>>24&255,o=e>>16&255,s=e>>8&255;return vs=a+Math.round((n-a)*xs),ys=o+Math.round((r-o)*xs),bs=s+Math.round((i-s)*xs),Cs.toRgba(vs,ys,bs)}e.blend=t;function n(e,t,n){let a=Es.relativeLuminance(e>>8),o=Es.relativeLuminance(t>>8);if(ks(a,o)<n){if(o<a){let o=r(e,t,n),s=ks(a,Es.relativeLuminance(o>>8));if(s<n){let r=i(e,t,n);return s>ks(a,Es.relativeLuminance(r>>8))?o:r}return o}let s=i(e,t,n),c=ks(a,Es.relativeLuminance(s>>8));if(c<n){let i=r(e,t,n);return c>ks(a,Es.relativeLuminance(i>>8))?s:i}return s}}e.ensureContrastRatio=n;function r(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=ks(Es.relativeLuminance2(o,s,c),Es.relativeLuminance2(r,i,a));for(;l<n&&(o>0||s>0||c>0);)o-=Math.max(0,Math.ceil(o*.1)),s-=Math.max(0,Math.ceil(s*.1)),c-=Math.max(0,Math.ceil(c*.1)),l=ks(Es.relativeLuminance2(o,s,c),Es.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.reduceLuminance=r;function i(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=ks(Es.relativeLuminance2(o,s,c),Es.relativeLuminance2(r,i,a));for(;l<n&&(o<255||s<255||c<255);)o=Math.min(255,o+Math.ceil((255-o)*.1)),s=Math.min(255,s+Math.ceil((255-s)*.1)),c=Math.min(255,c+Math.ceil((255-c)*.1)),l=ks(Es.relativeLuminance2(o,s,c),Es.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.increaseLuminance=i;function a(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}e.toChannels=a})(Ds||={});function Os(e){let t=e.toString(16);return t.length<2?`0`+t:t}function ks(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var As=class extends Ca{constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},js=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Ta}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let n=[],r=t.translateToString(!0),i=t.getTrimmedLength(),a=0,o=0,s=0,c=t.getFg(0),l=t.getBg(0);for(let e=0;e<i;e++)if(t.loadCell(e,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==c||this._workCell.bg!==l){if(e-a>1){let e=this._getJoinedRanges(r,s,o,t,a);for(let t=0;t<e.length;t++)n.push(e[t])}a=e,s=o,c=this._workCell.fg,l=this._workCell.bg}o+=this._workCell.getChars().length||1}if(i-a>1){let e=this._getJoinedRanges(r,s,o,t,a);for(let t=0;t<e.length;t++)n.push(e[t])}return n}_getJoinedRanges(e,t,n,r,i){let a=e.substring(t,n),o=[];try{o=this._characterJoiners[0].handler(a)}catch(e){console.error(e)}for(let e=1;e<this._characterJoiners.length;e++)try{let t=this._characterJoiners[e].handler(a);for(let e=0;e<t.length;e++)js._mergeRanges(o,t[e])}catch(e){console.error(e)}return this._stringRangesToCellRanges(o,r,i),o}_stringRangesToCellRanges(e,t,n){let r=0,i=!1,a=0,o=e[r];if(!o)return;let s=t.getTrimmedLength();for(let c=n;c<s;c++){let n=t.getWidth(c),s=t.getString(c).length||1;if(n!==0){if(!i&&o[0]<=a&&(o[0]=c,i=!0),o[1]<=a){if(o[1]=c,o=e[++r],!o)break;o[0]<=a?(o[0]=c,i=!0):i=!1}a+=s}}o&&(o[1]=s)}static _mergeRanges(e,t){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(n){if(t[1]<=i[0])return e[r-1][1]=t[1],e;if(t[1]<=i[1])return e[r-1][1]=Math.max(t[1],i[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=i[0])return e.splice(r,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),n=!0);continue}}return n?e[e.length-1][1]=t[1]:e.push(t),e}};js=sa([q(0,Aa)],js);function Ms(e){if(!e)throw Error(`value must not be falsy`);return e}function Ns(e){return 57508<=e&&e<=57558}function Ps(e){return 9472<=e&&e<=9631}function Fs(e){return Ns(e)||Ps(e)}function Is(){return{css:{canvas:Ls(),cell:Ls()},device:{canvas:Ls(),cell:Ls(),char:{width:0,height:0,left:0,top:0}}}}function Ls(){return{width:0,height:0}}var Rs=class{constructor(e,t,n,r,i,a,o){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._themeService=o,this._workCell=new Ta,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,r,i,a,o,s,c,l,u,d,f){let p=[];f&&(f.hasBlinkingCells=!1);let m=this._characterJoinerService.getJoinedCharacters(t),h=this._themeService.colors,g=e.getNoBgTrimmedLength();n&&g<a+1&&(g=a+1);let _,v=0,y=``,b,x=0,S=0,C=0,w=!1,T=0,E=!1,D,O=0,k=[],A=u!==-1&&d!==-1;for(let j=0;j<g;j++){e.loadCell(j,this._workCell);let g=this._workCell.getWidth();if(g===0)continue;let M=!1,N=j>=O,P=j,F=this._workCell;if(m.length>0&&j===m[0][0]&&N){let r=m.shift(),i=this._isCellInSelection(r[0],t);for(b=r[0]+1;b<r[1];b++)N&&=i===this._isCellInSelection(b,t);N&&=!n||a<r[0]||a>=r[1],N?(M=!0,F=new As(this._workCell,e.translateToString(!0,r[0],r[1]),r[1]-r[0]),P=r[1]-1,g=F.getWidth()):O=r[1]}let I=this._isCellInSelection(j,t),L=n&&j===a,R=A&&j>=u&&j<=d;f&&F.isBlink()&&(f.hasBlinkingCells=!0),!s&&F.isBlink()&&k.push(`xterm-blink-hidden`);let z=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,e=>{z=!0});let ee=F.getChars()||` `;if(ee===` `&&(F.isUnderline()||F.isOverline())&&(ee=`\xA0`),D=g*c-l.get(ee,F.isBold(),F.isItalic()),!_)_=this._document.createElement(`span`);else if(v&&(I&&E||!I&&!E&&F.bg===x)&&(I&&E&&h.selectionForeground||F.fg===S)&&F.extended.ext===C&&R===w&&D===T&&!L&&!M&&!z&&N){F.isInvisible()?y+=` `:y+=ee,v++;continue}else v&&(_.textContent=y),_=this._document.createElement(`span`),v=0,y=``;if(x=F.bg,S=F.fg,C=F.extended.ext,w=R,T=D,E=I,M&&a>=j&&a<=P&&(a=j),!this._coreService.isCursorHidden&&L&&this._coreService.isCursorInitialized){if(k.push(`xterm-cursor`),this._coreBrowserService.isFocused)o&&k.push(`xterm-cursor-blink`),k.push(r===`bar`?`xterm-cursor-bar`:r===`underline`?`xterm-cursor-underline`:`xterm-cursor-block`);else if(i)switch(i){case`outline`:k.push(`xterm-cursor-outline`);break;case`block`:k.push(`xterm-cursor-block`);break;case`bar`:k.push(`xterm-cursor-bar`);break;case`underline`:k.push(`xterm-cursor-underline`);break;default:break}}if(F.isBold()&&k.push(`xterm-bold`),F.isItalic()&&k.push(`xterm-italic`),F.isDim()&&k.push(`xterm-dim`),y=F.isInvisible()?` `:F.getChars()||` `,F.isUnderline()&&(k.push(`xterm-underline-${F.extended.underlineStyle}`),y===` `&&(y=`\xA0`),!F.isUnderlineColorDefault()))if(F.isUnderlineColorRGB())_.style.textDecorationColor=`rgb(${Ca.toColorRGB(F.getUnderlineColor()).join(`,`)})`;else{let e=F.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&F.isBold()&&e<8&&(e+=8),_.style.textDecorationColor=h.ansi[e].css}F.isOverline()&&(k.push(`xterm-overline`),y===` `&&(y=`\xA0`)),F.isStrikethrough()&&k.push(`xterm-strikethrough`),R&&(_.style.textDecoration=`underline`);let B=F.getFgColor(),V=F.getFgColorMode(),H=F.getBgColor(),U=F.getBgColorMode(),te=!!F.isInverse();if(te){let e=B;B=H,H=e;let t=V;V=U,U=t}let W,ne,G=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,e=>{e.options.layer!==`top`&&G||(e.backgroundColorRGB&&(U=50331648,H=e.backgroundColorRGB.rgba>>8&16777215,W=e.backgroundColorRGB),e.foregroundColorRGB&&(V=50331648,B=e.foregroundColorRGB.rgba>>8&16777215,ne=e.foregroundColorRGB),G=e.options.layer===`top`)}),!G&&I&&(W=this._coreBrowserService.isFocused?h.selectionBackgroundOpaque:h.selectionInactiveBackgroundOpaque,H=W.rgba>>8&16777215,U=50331648,G=!0,h.selectionForeground&&(V=50331648,B=h.selectionForeground.rgba>>8&16777215,ne=h.selectionForeground)),G&&k.push(`xterm-decoration-top`);let re;switch(U){case 16777216:case 33554432:re=h.ansi[H],k.push(`xterm-bg-${H}`);break;case 50331648:re=Cs.toColor(H>>16,H>>8&255,H&255),this._addStyle(_,`background-color:#${(H>>>0).toString(16).padStart(6,`0`)}`);break;default:te?(re=h.foreground,k.push(`xterm-bg-257`)):re=h.background}switch(W||F.isDim()&&(W=ws.multiplyOpacity(re,.5)),V){case 16777216:case 33554432:F.isBold()&&B<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(B+=8),this._applyMinimumContrast(_,re,h.ansi[B],F,W,void 0)||k.push(`xterm-fg-${B}`);break;case 50331648:let e=Cs.toColor(B>>16&255,B>>8&255,B&255);this._applyMinimumContrast(_,re,e,F,W,ne)||this._addStyle(_,`color:#${B.toString(16).padStart(6,`0`)}`);break;default:this._applyMinimumContrast(_,re,h.foreground,F,W,ne)||te&&k.push(`xterm-fg-257`)}k.length&&=(_.className=k.join(` `),0),!L&&!M&&!z&&N?v++:_.textContent=y,D!==this.defaultSpacing&&(_.style.letterSpacing=`${D}px`),p.push(_),j=P}return _&&v&&(_.textContent=y),p}_applyMinimumContrast(e,t,n,r,i,a){if(this._optionsService.rawOptions.minimumContrastRatio===1||Fs(r.getCode()))return!1;let o=this._getContrastCache(r),s;if(!i&&!a&&(s=o.getColor(t.rgba,n.rgba)),s===void 0){let e=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);s=ws.ensureContrastRatio(i??t,a??n,e),o.setColor((i??t).rgba,(a??n).rgba,s??null)}return s?(this._addStyle(e,`color:${s.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute(`style`,`${e.getAttribute(`style`)||``}${t};`)}_isCellInSelection(e,t){let n=this._selectionStart,r=this._selectionEnd;return!n||!r?!1:this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e<r[0]&&t<=r[1]:e<n[0]&&t>=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t<r[1]||n[1]===r[1]&&t===n[1]&&e>=n[0]&&e<r[0]||n[1]<r[1]&&t===r[1]&&e<r[0]||n[1]<r[1]&&t===n[1]&&e>=n[0]}};Rs=sa([q(1,Ja),q(2,Ia),q(3,Ua),q(4,Ma),q(5,za),q(6,Ya)],Rs);var zs=class{constructor(e=()=>new Bs){this._flat=new Float32Array(256),this._font=``,this._fontSize=0,this._weight=`normal`,this._weightBold=`bold`,this._canvasElements=[],this._canvasElements=[e(),e(),e(),e()],this.clear()}dispose(){this._canvasElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,n,r){e===this._font&&t===this._fontSize&&n===this._weight&&r===this._weightBold||(this._font=e,this._fontSize=t,this._weight=n,this._weightBold=r,this._canvasElements[0].setFont(e,t,n,!1),this._canvasElements[1].setFont(e,t,r,!1),this._canvasElements[2].setFont(e,t,n,!0),this._canvasElements[3].setFont(e,t,r,!0),this.clear())}get(e,t,n){let r;if(!t&&!n&&e.length===1&&(r=e.charCodeAt(0))<256){if(this._flat[r]!==-9999)return this._flat[r];let t=this._measure(e,0);return t>0&&(this._flat[r]=t),t}let i=e;t&&(i+=`B`),n&&(i+=`I`);let a=this._holey.get(i);if(a===void 0){let r=0;t&&(r|=1),n&&(r|=2),a=this._measure(e,r),a>0&&this._holey.set(i,a)}return a}_measure(e,t){return this._canvasElements[t].measure(e)}},Bs=class{constructor(){typeof OffscreenCanvas<`u`?(this._canvas=new OffscreenCanvas(1,1),this._ctx=Ms(this._canvas.getContext(`2d`))):(this._canvas=document.createElement(`canvas`),this._canvas.width=1,this._canvas.height=1,this._ctx=Ms(this._canvas.getContext(`2d`)))}setFont(e,t,n,r){let i=r?`italic`:``;this._ctx.font=`${i} ${n} ${t}px ${e}`.trim()}measure(e){return this._ctx.measureText(e).width}},Vs=class{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(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let i=e.buffers.active.ydisp,a=t[1]-i,o=n[1]-i,s=Math.max(a,0),c=Math.min(o,e.rows-1);if(s>=e.rows||c<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=a,this.viewportEndRow=o,this.viewportCappedStartRow=s,this.viewportCappedEndRow=c,this.startCol=t[0],this.endCol=n[0]}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol):!1}};function Hs(){return new Vs}var Us=class extends to{constructor(e,t,n){super(),this._renderCallback=e,this._coreBrowserService=t,this._optionsService=n,this._intervalDuration=0,this._blinkOn=!0,this._needsBlinkInViewport=!1,this._isViewportVisible=!0,this._register(this._optionsService.onSpecificOptionChange(`blinkIntervalDuration`,e=>{this.setIntervalDuration(e)})),this.setIntervalDuration(this._optionsService.rawOptions.blinkIntervalDuration),this._register(Qa(()=>this._clearInterval()))}get isBlinkOn(){return this._blinkOn}get isEnabled(){return this._intervalDuration>0}setNeedsBlinkInViewport(e){this._needsBlinkInViewport!==e&&(this._needsBlinkInViewport=e,this._updateIntervalState())}setViewportVisible(e){this._isViewportVisible!==e&&(this._isViewportVisible=e,this._updateIntervalState())}setIntervalDuration(e){e!==this._intervalDuration&&(this._intervalDuration=e,this._clearInterval(),this._updateIntervalState())}_updateIntervalState(){if(this._intervalDuration>0&&this._needsBlinkInViewport&&this._isViewportVisible){if(this._interval!==void 0)return;let e=this._blinkOn;this._blinkOn=!0,this._interval=this._coreBrowserService.window.setInterval(()=>{this._blinkOn=!this._blinkOn,this._renderCallback()},this._intervalDuration),e||this._renderCallback();return}this._clearInterval(),this._blinkOn||(this._blinkOn=!0,this._renderCallback())}_clearInterval(){this._interval!==void 0&&(this._coreBrowserService.window.clearInterval(this._interval),this._interval=void 0)}},Ws=1,Gs=class extends to{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=a,this._linkifier2=o,this._charSizeService=c,this._optionsService=l,this._bufferService=u,this._coreService=d,this._coreBrowserService=f,this._themeService=p,this._terminalClass=Ws++,this._rowElements=[],this._selectionRenderModel=Hs(),this._lastSelectionColumnMode=!1,this._rowHasBlinkingCells=[],this._rowHasBlinkingCellsCount=0,this._onRequestRedraw=this._register(new J),this.onRequestRedraw=this._onRequestRedraw.event,this._rowContainer=this._document.createElement(`div`),this._rowContainer.classList.add(`xterm-rows`),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(`xterm-selection`),this._selectionContainer.setAttribute(`aria-hidden`,`true`),this.dimensions=Is(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(e=>this._injectCss(e))),this._injectCss(this._themeService.colors),this._rowFactory=s.createInstance(Rs,document),this._element.classList.add(`xterm-dom-renderer-owner-`+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(e=>this._handleLinkHover(e))),this._register(this._linkifier2.onHideLinkUnderline(e=>this._handleLinkLeave(e))),this._cursorBlinkStateManager=new Ks(this._rowContainer,this._coreBrowserService),this._register(lo(this._document,`mousedown`,()=>this._cursorBlinkStateManager.restartBlinkAnimation())),this._register(Qa(()=>this._cursorBlinkStateManager.dispose())),this._textBlinkStateManager=this._register(new Us(()=>this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1}),this._coreBrowserService,this._optionsService)),this._register(Qa(()=>{this._element.classList.remove(`xterm-dom-renderer-owner-`+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new zs,this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),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/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),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(let e of this._rowElements)e.style.width=`${this.dimensions.css.canvas.width}px`,e.style.height=`${this.dimensions.css.cell.height}px`,e.style.lineHeight=`${this.dimensions.css.cell.height}px`,e.style.overflow=`hidden`;this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .xterm-rows span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,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(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .xterm-rows { pointer-events: none; color: ${e.foreground.css};}`;t+=`${this._terminalSelector} .xterm-rows, ${this._terminalSelector} .xterm-rows span { font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`,t+=`${this._terminalSelector} .xterm-rows .xterm-dim { color: ${ws.multiplyOpacity(e.foreground,.5).css};}`,t+=`${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;}${this._terminalSelector} span.xterm-blink-hidden { visibility: hidden;}`;let n=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .xterm-rows.xterm-focus .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .xterm-rows.xterm-focus .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .xterm-rows.xterm-focus .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .xterm-rows.xterm-cursor-blink-idle .xterm-cursor.xterm-cursor-blink { animation: none !important;}${this._terminalSelector} .xterm-rows .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .xterm-rows .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .xterm-rows .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .xterm-rows .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .xterm-rows .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .xterm-selection div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .xterm-selection div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,r]of e.ansi.entries())t+=`${this._terminalSelector} .xterm-fg-${n} { color: ${r.css}; }${this._terminalSelector} .xterm-fg-${n}.xterm-dim { color: ${ws.multiplyOpacity(r,.5).css}; }${this._terminalSelector} .xterm-bg-${n} { background-color: ${r.css}; }`;t+=`${this._terminalSelector} .xterm-fg-257 { color: ${ws.opaque(e.background).css}; }${this._terminalSelector} .xterm-fg-257.xterm-dim { color: ${ws.multiplyOpacity(ws.opaque(e.background),.5).css}; }${this._terminalSelector} .xterm-bg-257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get(`W`,!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let e=this._rowElements.length;e<=t;e++){let e=this._document.createElement(`div`);this._rowContainer.appendChild(e),this._rowElements.push(e),this._rowHasBlinkingCells.push(!1)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop()),this._rowHasBlinkingCells.pop()&&this._rowHasBlinkingCellsCount--}handleResize(e,t){this._refreshRowElements(e,t),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(`xterm-focus`),this._cursorBlinkStateManager.pause(),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(`xterm-focus`),this._cursorBlinkStateManager.resume(),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleViewportVisibilityChange(e){this._textBlinkStateManager.setViewportVisible(e)}handleSelectionChanged(e,t,n){let r=this._bufferService.rows;this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n);let i=0,a=-1;this._lastSelectionStart&&this._lastSelectionEnd&&(this._selectionRenderModel.update(this._terminal,this._lastSelectionStart,this._lastSelectionEnd,this._lastSelectionColumnMode),this._selectionRenderModel.hasSelection&&(i=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow));let o=0,s=-1;if(!e||!t)return;if(this._selectionRenderModel.update(this._terminal,e,t,n),this._selectionRenderModel.hasSelection){let r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,a=this._selectionRenderModel.viewportCappedStartRow,c=this._selectionRenderModel.viewportCappedEndRow;o=a,s=c;let l=this._document.createDocumentFragment();if(n){let n=e[0]>t[0];l.appendChild(this._createSelectionElement(a,n?t[0]:e[0],n?e[0]:t[0],c-a+1))}else{let n=r===a?e[0]:0,o=a===i?t[0]:this._bufferService.cols;l.appendChild(this._createSelectionElement(a,n,o));let s=c-a-1;if(l.appendChild(this._createSelectionElement(a+1,0,this._bufferService.cols,s)),a!==c){let e=i===c?t[0]:this._bufferService.cols;l.appendChild(this._createSelectionElement(c,0,e))}}this._selectionContainer.appendChild(l)}let c=Math.min(i,o),l=Math.max(a,s);if(l>=0){c=Math.max(c,0),l=Math.min(l,r-1);let e=this._bufferService.buffer.y;this._selectionRenderModel.hasSelection&&e>=0&&e<r&&(c=Math.min(c,e),l=Math.max(l,e)),this.renderRows(c,l)}this._lastSelectionStart=e,this._lastSelectionEnd=t,this._lastSelectionColumnMode=n}_createSelectionElement(e,t,n,r=1){let i=this._document.createElement(`div`),a=t*this.dimensions.css.cell.width,o=this.dimensions.css.cell.width*(n-t);return a+o>this.dimensions.css.canvas.width&&(o=this.dimensions.css.canvas.width-a),i.style.height=`${r*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${a}px`,i.style.width=`${o}px`,i}handleCursorMove(){this._cursorBlinkStateManager.restartBlinkAnimation()}_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(let e of this._rowElements)e.replaceChildren();this._rowHasBlinkingCellsCount>0&&(this._rowHasBlinkingCells.fill(!1),this._rowHasBlinkingCellsCount=0,this._textBlinkStateManager.setNeedsBlinkInViewport(!1))}renderRows(e,t){let n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),a=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,o=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle,c={hasBlinkingCells:!1};for(let l=e;l<=t;l++){let e=l+n.ydisp,t=this._rowElements[l];if(!t)continue;let u=n.lines.get(e);if(!u){t.replaceChildren(),this._setRowBlinkState(l,!1);continue}t.replaceChildren(...this._rowFactory.createRow(u,e,e===r,o,s,i,a,this._textBlinkStateManager.isBlinkOn,this.dimensions.css.cell.width,this._widthCache,-1,-1,c)),this._setRowBlinkState(l,c.hasBlinkingCells)}this._updateTextBlinkState()}get _terminalSelector(){return`.xterm-dom-renderer-owner-${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,a){n<0&&(e=0),r<0&&(t=0);let o=this._bufferService.rows-1;n=Math.max(Math.min(n,o),0),r=Math.max(Math.min(r,o),0),i=Math.min(i,this._bufferService.cols);let s=this._bufferService.buffer,c=s.ybase+s.y,l=Math.min(s.x,i-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle,p={hasBlinkingCells:!1};for(let o=n;o<=r;++o){let m=o+s.ydisp,h=this._rowElements[o];if(!h)continue;let g=s.lines.get(m);if(!g){h.replaceChildren(),this._setRowBlinkState(o,!1);continue}h.replaceChildren(...this._rowFactory.createRow(g,m,m===c,d,f,l,u,this._textBlinkStateManager.isBlinkOn,this.dimensions.css.cell.width,this._widthCache,a?o===n?e:0:-1,a?(o===r?t:i)-1:-1,p)),this._setRowBlinkState(o,p.hasBlinkingCells)}this._updateTextBlinkState()}_setRowBlinkState(e,t){this._rowHasBlinkingCells[e]!==t&&(this._rowHasBlinkingCells[e]=t,this._rowHasBlinkingCellsCount+=t?1:-1)}_updateTextBlinkState(){this._textBlinkStateManager.setNeedsBlinkInViewport(this._rowHasBlinkingCellsCount>0)}};Gs=sa([q(7,Pa),q(8,Ha),q(9,Ia),q(10,Aa),q(11,Ma),q(12,Ua),q(13,Ya)],Gs);var Ks=class{constructor(e,t){this._rowContainer=e,this._coreBrowserService=t,this._isIdlePaused=!1,this._coreBrowserService.isFocused&&this._resetIdleTimer()}dispose(){this._clearIdleTimer()}restartBlinkAnimation(){this._isIdlePaused&&this._rowContainer.classList.remove(`xterm-cursor-blink-idle`),this._resetIdleTimer()}pause(){this._isIdlePaused=!1,this._clearIdleTimer()}resume(){this._isIdlePaused=!1,this._rowContainer.classList.remove(`xterm-cursor-blink-idle`),this._resetIdleTimer()}_resetIdleTimer(){this._isIdlePaused=!1,this._clearIdleTimer(),this._idleTimeout=this._coreBrowserService.window.setTimeout(()=>{this._stopBlinkingDueToIdle()},3e5)}_clearIdleTimer(){this._idleTimeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._idleTimeout),this._idleTimeout=void 0)}_stopBlinkingDueToIdle(){this._rowContainer.classList.add(`xterm-cursor-blink-idle`),this._isIdlePaused=!0,this._idleTimeout=void 0}},qs=class extends to{constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this._register(new J),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new Xs(this._optionsService))}catch{this._measureStrategy=this._register(new Ys(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange([`fontFamily`,`fontSize`],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};qs=sa([q(2,Ia)],qs);var Js=class extends to{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},Ys=class extends Js{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,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}},Xs=class extends Js{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext(`2d`);let t=this._ctx.measureText(`W`);if(!(`width`in t&&`fontBoundingBoxAscent`in t&&`fontBoundingBoxDescent`in t))throw Error(`Required font metrics not supported`)}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText(`W`);return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},Zs=class extends to{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._onDprChange=this._register(new J),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new J),this.onWindowChange=this._onWindowChange.event,this._screenDprMonitor=this._register(new Qs(this._window)),this._register(this.onWindowChange(e=>this._screenDprMonitor.setWindow(e))),this._register(Wo.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(lo(this._textarea,`focus`,()=>this._isFocused=!0)),this._register(lo(this._textarea,`blur`,()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,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}},Qs=class extends to{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new no),this._onDprChange=this._register(new J),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Qa(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=lo(this._parentWindow,`resize`,()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},$s=class extends to{constructor(){super(),this.linkProviders=[],this._register(Qa(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function ec(e,t,n){let r=n.getBoundingClientRect(),i=e.getComputedStyle(n),a=parseInt(i.getPropertyValue(`padding-left`),10),o=parseInt(i.getPropertyValue(`padding-top`),10);return[t.clientX-r.left-a,t.clientY-r.top-o]}function tc(e,t,n,r,i,a,o,s,c){if(!a)return;let l=ec(e,t,n);return l[0]=Math.ceil((l[0]+(c?o/2:0))/o),l[1]=Math.ceil(l[1]/s),l[0]=Math.min(Math.max(l[0],1),r+ +!!c),l[1]=Math.min(Math.max(l[1],1),i),l}var nc=class{constructor(e,t){this._charSizeService=e,this._renderService=t}getCoords(e,t,n,r,i){return tc(so(t),e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let n=ec(so(t),e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};nc=sa([q(0,Ha),q(1,Ka)],nc);var rc=typeof window==`object`?window:globalThis;function ic(e,t=0){return e[e.length-(1+t)]}function ac(e,t,n){let r=null,i=null;if(typeof n.value==`function`?(r=`value`,i=n.value,i.length!==0&&console.warn(`Memoize should only be used in functions with zero parameters`)):typeof n.get==`function`&&(r=`get`,i=n.get),!i||!r)throw Error(`not supported`);let a=`$memoize$${t}`,o=n;o[r]=function(...e){return this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,e)}),this[a]}}var oc=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};oc.Undefined=new oc(void 0);var sc=oc,cc=class{constructor(){this._first=sc.Undefined,this._last=sc.Undefined}push(e){return this._insert(e,!0)}_insert(e,t){let n=new sc(e);if(this._first===sc.Undefined)this._first=n,this._last=n;else if(t){let e=this._last;this._last=n,n.prev=e,e.next=n}else{let e=this._first;this._first=n,n.next=e,e.prev=n}let r=!1;return()=>{r||(r=!0,this._remove(n))}}_remove(e){if(e.prev!==sc.Undefined&&e.next!==sc.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===sc.Undefined&&e.next===sc.Undefined?(this._first=sc.Undefined,this._last=sc.Undefined):e.next===sc.Undefined?(this._last=this._last.prev,this._last.next=sc.Undefined):e.prev===sc.Undefined&&(this._first=this._first.next,this._first.prev=sc.Undefined)}*[Symbol.iterator](){let e=this._first;for(;e!==sc.Undefined;)yield e.element,e=e.next}},lc;(e=>(e.TAP=`-xterm-gesturetap`,e.CHANGE=`-xterm-gesturechange`,e.START=`-xterm-gesturestart`,e.END=`-xterm-gesturesend`,e.CONTEXT_MENU=`-xterm-gesturecontextmenu`))(lc||={});var uc=class e extends to{constructor(){super(),this._dispatched=!1,this._targets=new cc,this._ignoreTargets=new cc,this._activeTouches={},this._handle=null,this._lastSetTapCountTime=0;let e=rc;this._register(lo(e.document,`touchstart`,e=>this._handleTouchStart(e),{passive:!1})),this._register(lo(e.document,`touchend`,t=>this._handleTouchEnd(e,t))),this._register(lo(e.document,`touchmove`,e=>this._handleTouchMove(e),{passive:!1}))}static addTarget(t){return e.isTouchDevice()?(e._instance||=new e,Qa(e._instance._targets.push(t))):to.None}static ignoreTarget(t){return e.isTouchDevice()?(e._instance||=new e,Qa(e._instance._ignoreTargets.push(t))):to.None}static isTouchDevice(){return`ontouchstart`in rc||navigator.maxTouchPoints>0}dispose(){this._handle&&=(this._handle.dispose(),null),super.dispose()}_handleTouchStart(e){let t=Date.now();this._handle&&=(this._handle.dispose(),null);for(let n=0,r=e.targetTouches.length;n<r;n++){let r=e.targetTouches.item(n);this._activeTouches[r.identifier]={id:r.identifier,initialTarget:r.target,initialTimeStamp:t,initialPageX:r.pageX,initialPageY:r.pageY,rollingTimestamps:[t],rollingPageX:[r.pageX],rollingPageY:[r.pageY]};let i=this._newGestureEvent(lc.START,r.target);i.pageX=r.pageX,i.pageY=r.pageY,this._dispatchEvent(i)}this._dispatched&&=(e.preventDefault(),e.stopPropagation(),!1)}_handleTouchEnd(t,n){let r=Date.now(),i=Object.keys(this._activeTouches).length;for(let a=0,o=n.changedTouches.length;a<o;a++){let o=n.changedTouches.item(a);if(!this._activeTouches.hasOwnProperty(String(o.identifier))){console.warn(`move of an UNKNOWN touch`,o);continue}let s=this._activeTouches[o.identifier],c=Date.now()-s.initialTimeStamp;if(c<e._holdDelay&&Math.abs(s.initialPageX-ic(s.rollingPageX))<30&&Math.abs(s.initialPageY-ic(s.rollingPageY))<30){let e=this._newGestureEvent(lc.TAP,s.initialTarget);e.pageX=ic(s.rollingPageX),e.pageY=ic(s.rollingPageY),this._dispatchEvent(e)}else if(c>=e._holdDelay&&Math.abs(s.initialPageX-ic(s.rollingPageX))<30&&Math.abs(s.initialPageY-ic(s.rollingPageY))<30){let e=this._newGestureEvent(lc.CONTEXT_MENU,s.initialTarget);e.pageX=ic(s.rollingPageX),e.pageY=ic(s.rollingPageY),this._dispatchEvent(e)}else if(i===1){let e=ic(s.rollingPageX),n=ic(s.rollingPageY),i=ic(s.rollingTimestamps)-s.rollingTimestamps[0],a=e-s.rollingPageX[0],o=n-s.rollingPageY[0],c=[...this._targets].filter(e=>s.initialTarget instanceof Node&&e.contains(s.initialTarget));this._inertia(t,c,r,Math.abs(a)/i,a>0?1:-1,e,Math.abs(o)/i,o>0?1:-1,n)}this._dispatchEvent(this._newGestureEvent(lc.END,s.initialTarget)),delete this._activeTouches[o.identifier]}this._dispatched&&=(n.preventDefault(),n.stopPropagation(),!1)}_newGestureEvent(e,t){let n=document.createEvent(`CustomEvent`);return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}_dispatchEvent(t){if(t.type===lc.TAP){let n=new Date().getTime(),r;r=n-this._lastSetTapCountTime>e._clearTapCountTime?1:2,this._lastSetTapCountTime=n,t.tapCount=r}else (t.type===lc.CHANGE||t.type===lc.CONTEXT_MENU)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let e of this._ignoreTargets)if(e.contains(t.initialTarget))return;let e=[];for(let n of this._targets)if(n.contains(t.initialTarget)){let r=0,i=t.initialTarget;for(;i&&i!==n;)r++,i=i.parentElement;e.push([r,n])}e.sort((e,t)=>e[0]-t[0]);for(let[,n]of e)n.dispatchEvent(t),this._dispatched=!0}}_inertia(t,n,r,i,a,o,s,c,l){this._handle=vo(t,()=>{let u=Date.now(),d=u-r,f=0,p=0,m=!0;i+=e._scrollFriction*d,s+=e._scrollFriction*d,i>0&&(m=!1,f=a*i*d),s>0&&(m=!1,p=c*s*d);let h=this._newGestureEvent(lc.CHANGE);h.translationX=f,h.translationY=p,n.forEach(e=>e.dispatchEvent(h)),m||this._inertia(t,n,u,i,a,o+f,s,c,l+p)})}_handleTouchMove(e){let t=Date.now();for(let n=0,r=e.changedTouches.length;n<r;n++){let r=e.changedTouches.item(n);if(!this._activeTouches.hasOwnProperty(String(r.identifier))){console.warn(`end of an UNKNOWN touch`,r);continue}let i=this._activeTouches[r.identifier],a=this._newGestureEvent(lc.CHANGE,i.initialTarget);a.translationX=r.pageX-ic(i.rollingPageX),a.translationY=r.pageY-ic(i.rollingPageY),a.pageX=r.pageX,a.pageY=r.pageY,a.clientX=r.clientX,a.clientY=r.clientY,this._dispatchEvent(a),i.rollingPageX.length>3&&(i.rollingPageX.shift(),i.rollingPageY.shift(),i.rollingTimestamps.shift()),i.rollingPageX.push(r.pageX),i.rollingPageY.push(r.pageY),i.rollingTimestamps.push(t)}this._dispatched&&=(e.preventDefault(),e.stopPropagation(),!1)}};uc._scrollFriction=-.005,uc._holdDelay=700,uc._clearTapCountTime=400,sa([ac],uc,`isTouchDevice`,1);var dc=uc,fc=class{constructor(e,t,n,r,i,a,o,s,c){this._renderService=e,this._mouseCoordsService=t,this._mouseStateService=n,this._coreService=r,this._bufferService=i,this._optionsService=a,this._selectionService=o,this._logService=s,this._coreBrowserService=c,this._lastEvent=null,this._wheelPartialScroll=0,this._touchScrollAccumulator=0}bindMouse(e,t,n){let{element:r,document:i}=e,a={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o={target:e,focus:n,requestedEvents:a},s={mouseup:e=>this._handleMouseUp(o,e),wheel:e=>this._handleWheel(o,e),mousedrag:e=>this._handleMouseDrag(o,e),mousemove:e=>this._handleMouseMove(o,e)};this._altMouseCursor=new pc(r,i,()=>this._mouseStateService.areMouseEventsActive&&!!this._optionsService.rawOptions.mouseEventsRequireAlt),t(this._altMouseCursor),t(this._mouseStateService.onProtocolChange(e=>{this._handleProtocolChange(o,s,e)})),t(this._optionsService.onSpecificOptionChange(`mouseEventsRequireAlt`,()=>{this._syncMouseModeState(r),this._altMouseCursor?.sync()})),this._mouseStateService.activeProtocol=this._mouseStateService.activeProtocol,t(Qa(()=>{a.mouseup&&i.removeEventListener(`mouseup`,a.mouseup),a.mousedrag&&i.removeEventListener(`mousemove`,a.mousedrag)})),t(lo(r,`mousedown`,e=>this._handleMouseDown(o,e))),t(lo(r,`wheel`,e=>this._handlePassiveWheel(o,e),{passive:!1})),t(dc.addTarget(e.screenElement)),t(lo(e.screenElement,lc.START,()=>this._handleTouchStart())),t(lo(e.screenElement,lc.CHANGE,e=>this._handleTouchChange(o,e)))}_sendEvent(e,t){let n=this._mouseCoordsService.getMouseReportCoords(t,e.target.screenElement);if(!n)return!1;let r,i;switch(t.overrideType||t.type){case`mousemove`:i=32,t.buttons===void 0?(r=3,t.button!==void 0&&(r=t.button<3?t.button:3)):r=t.buttons&1?0:t.buttons&4?1:t.buttons&2?2:3;break;case`mouseup`:i=0,r=t.button<3?t.button:3;break;case`mousedown`:i=1,r=t.button<3?t.button:3;break;case`wheel`:if(!this._mouseStateService.allowCustomWheelEvent(t))return!1;let e=t.deltaY;if(e===0||this._consumeWheelEvent(t,this._renderService?.dimensions?.device?.cell?.height,this._coreBrowserService?.dpr)===0)return!1;i=e<0?0:1,r=4;break;default:return!1}if(i===void 0||r===void 0||r>4||r!==4&&this._optionsService.rawOptions.mouseEventsRequireAlt&&this._mouseStateService.areMouseEventsActive&&!t.altKey)return!1;let a=r!==4&&this._optionsService.rawOptions.mouseEventsRequireAlt&&this._mouseStateService.areMouseEventsActive;return this._triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:r,action:i,ctrl:t.ctrlKey,alt:a?!1:t.altKey,shift:t.shiftKey})}_handleMouseUp(e,t){this._sendEvent(e,t),t.buttons||(e.requestedEvents.mouseup&&e.target.document.removeEventListener(`mouseup`,e.requestedEvents.mouseup),e.requestedEvents.mousedrag&&e.target.document.removeEventListener(`mousemove`,e.requestedEvents.mousedrag))}_handleWheel(e,t){return this._sendEvent(e,t),t.preventDefault(),t.stopPropagation(),!1}_handleMouseDrag(e,t){t.buttons&&this._sendEvent(e,t)}_handleMouseMove(e,t){t.buttons||this._sendEvent(e,t)}_handleMouseDown(e,t){t.preventDefault(),e.focus(),!(!this._mouseStateService.areMouseEventsActive||this._selectionService.shouldForceSelection(t))&&(this._sendEvent(e,t),e.requestedEvents.mouseup&&e.target.document.addEventListener(`mouseup`,e.requestedEvents.mouseup),e.requestedEvents.mousedrag&&e.target.document.addEventListener(`mousemove`,e.requestedEvents.mousedrag))}_handlePassiveWheel(e,t){if(!e.requestedEvents.wheel){if(!this._mouseStateService.allowCustomWheelEvent(t))return!1;if(!this._bufferService.buffer.hasScrollback){if(t.deltaY===0)return!1;if(this._consumeWheelEvent(t,this._renderService?.dimensions?.device?.cell?.height,this._coreBrowserService?.dpr)===0)return t.preventDefault(),t.stopPropagation(),!1;let e=`\x1B`+(this._coreService.decPrivateModes.applicationCursorKeys?`O`:`[`)+(t.deltaY<0?`A`:`B`);return this._coreService.triggerDataEvent(e,!0),t.preventDefault(),t.stopPropagation(),!1}}}_handleTouchStart(){this._touchScrollAccumulator=0}_handleTouchChange(e,t){if(t.preventDefault(),t.stopPropagation(),e.requestedEvents.wheel){this._handleTouchScrollAsWheel(e,t);return}if(!this._bufferService.buffer.hasScrollback){this._handleTouchScrollAsKeys(t);return}e.target.handleTouchScroll?.(t.translationY)}_handleTouchScrollAsKeys(e){let t=this._renderService?.dimensions.css.cell.height;if(!t)return;this._touchScrollAccumulator-=e.translationY;let n=Math.trunc(this._touchScrollAccumulator/t);if(n===0)return;this._touchScrollAccumulator-=n*t;let r=`\x1B`+(this._coreService.decPrivateModes.applicationCursorKeys?`O`:`[`)+(n<0?`A`:`B`);for(let e=0;e<Math.abs(n);e++)this._coreService.triggerDataEvent(r,!0)}_handleTouchScrollAsWheel(e,t){let n=this._renderService?.dimensions.css.cell.height;if(!n)return;this._touchScrollAccumulator-=t.translationY;let r=Math.trunc(this._touchScrollAccumulator/n);if(r===0)return;this._touchScrollAccumulator-=r*n;let i=this._mouseCoordsService.getMouseReportCoords(t,e.target.screenElement);if(i)for(let e=0;e<Math.abs(r);e++)this._triggerMouseEvent({col:i.col,row:i.row,x:i.x,y:i.y,button:4,action:r<0?0:1,ctrl:!1,alt:!1,shift:!1})}reset(){this._lastEvent=null,this._wheelPartialScroll=0,this._touchScrollAccumulator=0}_syncMouseModeState(e){this._mouseStateService.areMouseEventsActive?this._optionsService.rawOptions.mouseEventsRequireAlt?(this._altMouseCursor?.resetClass(),this._selectionService.enable()):(e.classList.add(`enable-mouse-events`),this._selectionService.disable()):(e.classList.remove(`enable-mouse-events`),this._selectionService.enable())}_handleProtocolChange(e,t,n){let{element:r,document:i}=e.target,{requestedEvents:a}=e;n?this._optionsService.rawOptions.logLevel===`debug`&&this._logService.debug(`Binding to mouse events:`,this._explainEvents(n)):this._logService.debug(`Unbinding from mouse events.`),this._syncMouseModeState(r),this._altMouseCursor?.sync(),n&8?a.mousemove||=(r.addEventListener(`mousemove`,t.mousemove),t.mousemove):(a.mousemove&&r.removeEventListener(`mousemove`,a.mousemove),a.mousemove=null),n&16?a.wheel||=(r.addEventListener(`wheel`,t.wheel,{passive:!1}),t.wheel):(a.wheel&&r.removeEventListener(`wheel`,a.wheel),a.wheel=null),n&2?a.mouseup??=t.mouseup:(a.mouseup&&i.removeEventListener(`mouseup`,a.mouseup),a.mouseup=null),n&4?a.mousedrag??=t.mousedrag:(a.mousedrag&&i.removeEventListener(`mousemove`,a.mousedrag),a.mousedrag=null)}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}_consumeWheelEvent(e,t,n){if(e.deltaY===0||e.shiftKey||t===void 0||n===void 0)return 0;let r=t/n,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=r+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._mouseStateService.isPixelEncoding))||!this._mouseStateService.restrictMouseEvent(e))return!1;let t=this._mouseStateService.encodeMouseEvent(e);return t&&(this._mouseStateService.isDefaultEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}_explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};fc=sa([q(0,Ka),q(1,Wa),q(2,ja),q(3,Ma),q(4,Aa),q(5,Ia),q(6,qa),q(7,Fa),q(8,Ua)],fc);var pc=class{constructor(e,t,n){this._element=e,this._document=t,this._isActive=n,this._listeners=new no}dispose(){this._listeners.dispose()}sync(){if(this._listeners.clear(),!this._isActive())return;let e=new eo,t=e=>this.syncFromModifier(e);e.add(lo(this._document,`keydown`,t)),e.add(lo(this._document,`keyup`,t)),e.add(lo(this._element,`mousemove`,t));let n=this._element.ownerDocument?.defaultView;n&&e.add(lo(n,`blur`,()=>{this._isActive()&&this.resetClass()})),this._listeners.value=e}resetClass(){this._updateClass(!1)}syncFromModifier(e){this._isActive()&&this._updateClass(e.getModifierState(`Alt`))}_updateClass(e){e?this._element.classList.add(`enable-mouse-events`):this._element.classList.remove(`enable-mouse-events`)}},mc=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame!==void 0&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame??=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()),this._animationFrame}refresh(e,t,n){this._rowCount=n,e??=0,t??=this._rowCount-1,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t),this._animationFrame===void 0&&(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){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},hc=class{constructor(e){this._tasks=[],this._i=0,this._logService=e}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&=(this._cancelCallback(this._idleCallback),void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||=this._requestCallback(this._process.bind(this))}_process(e){this._idleCallback=void 0;let t,n=0,r=e.timeRemaining(),i;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),n=Math.max(t,n),i=e.timeRemaining(),n*1.5>i){r-t<-20&&this._logService.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=i}this.clear()}},gc=class extends hc{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},_c=class extends hc{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},vc=`requestIdleCallback`in globalThis?_c:gc,yc=class{constructor(e){this._queue=new vc(e)}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}dispose(){this._queue.clear()}},bc=class extends to{constructor(e,t,n,r,i,a,o,s,c,l){super(),this._rowCount=e,this._optionsService=n,this._logService=r,this._charSizeService=i,this._coreService=a,this._coreBrowserService=c,this._renderer=this._register(new no),this._observerDisposable=this._register(new no),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 J),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new J),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new J),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new J),this.onRefreshRequest=this._onRefreshRequest.event,this._pausedResizeTask=this._register(new yc(this._logService)),this._renderDebouncer=new mc((e,t)=>this._renderRows(e,t),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new xc(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Qa(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(s.onResize(()=>this._fullRefresh())),this._register(s.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(o.onDecorationRegistered(()=>this._fullRefresh())),this._register(o.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange([`drawBoldTextInBrightColors`,`letterSpacing`,`lineHeight`,`fontFamily`,`fontSize`,`fontWeight`,`fontWeightBold`,`minimumContrastRatio`,`rescaleOverlappingGlyphs`],()=>{this.clear(),this.handleResize(s.cols,s.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange([`cursorBlink`,`cursorStyle`],()=>this.refreshRows(s.buffer.y,s.buffer.y,void 0,!0))),this._register(l.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(e=>this._registerIntersectionObserver(e,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if(`IntersectionObserver`in e){let n=new e.IntersectionObserver(e=>this._handleIntersectionChange(e[e.length-1]),{threshold:0});this._observerDisposable.value=Qa(()=>{this._intersectionObserver?.disconnect(),this._intersectionObserver=void 0}),this._intersectionObserver=n,n.observe(t)}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,this._renderer.value?.handleViewportVisibilityChange?.(!this._isPaused),!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(e,t,n=!1,r=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let i=this._syncOutputHandler.flush();i&&(e=Math.min(e,i.start),t=Math.max(t,i.end)),r||(this._isNextRenderRedrawOnly=!1),n?this._renderRows(e,t):this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&=(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,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(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(e=>this.refreshRows(e.start,e.end,e.sync,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,n){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,this._renderer.value?.handleSelectionChanged(e,t,n)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};bc=sa([q(2,Ia),q(3,Fa),q(4,Ha),q(5,Ma),q(6,za),q(7,Aa),q(8,Ua),q(9,Ya)],bc);var xc=class{constructor(e,t,n){this._coreBrowserService=e,this._coreService=t,this._onTimeout=n,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout??=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3)}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function Sc(e,t,n,r){let i=n.buffer.x,a=n.buffer.y;if(!n.buffer.hasScrollback)return Tc(i,a,e,t,n,r)+Ec(a,t,n,r)+Dc(i,a,e,t,n,r);let o;if(a===t)return o=i>e?`D`:`C`,Pc(Math.abs(i-e),Nc(o,r));o=a>t?`D`:`C`;let s=Math.abs(a-t);return Pc(wc(a>t?e:i,n)+(s-1)*n.cols+1+Cc(a>t?i:e,n),Nc(o,r))}function Cc(e,t){return e-1}function wc(e,t){return t.cols-e}function Tc(e,t,n,r,i,a){return Ec(t,r,i,a).length===0?``:Pc(Mc(e,t,e,t-kc(t,i),!1,i).length,Nc(`D`,a))}function Ec(e,t,n,r){let i=e-kc(e,n),a=t-kc(t,n);return Pc(Math.abs(i-a)-Oc(e,t,n),Nc(jc(e,t),r))}function Dc(e,t,n,r,i,a){let o;o=Ec(t,r,i,a).length>0?r-kc(r,i):t;let s=r,c=Ac(e,t,n,r,i,a);return Pc(Mc(e,o,n,s,c===`C`,i).length,Nc(c,a))}function Oc(e,t,n){let r=0,i=e-kc(e,n),a=t-kc(t,n);for(let o=0;o<Math.abs(i-a);o++){let a=jc(e,t)===`A`?-1:1;n.buffer.lines.get(i+a*o)?.isWrapped&&r++}return r}function kc(e,t){let n=0,r=t.buffer.lines.get(e),i=r?.isWrapped;for(;i&&e>=0&&e<t.rows;)n++,r=t.buffer.lines.get(--e),i=r?.isWrapped;return n}function Ac(e,t,n,r,i,a){let o;return o=Ec(t,r,i,a).length>0?r-kc(r,i):t,e<n&&o<=r||e>=n&&o<r?`C`:`D`}function jc(e,t){return e>t?`A`:`B`}function Mc(e,t,n,r,i,a){let o=e,s=t,c=``;for(;(o!==n||s!==r)&&s>=0&&s<a.buffer.lines.length;)o+=i?1:-1,i&&o>a.cols-1?(c+=a.buffer.translateBufferLineToString(s,!1,e,o),o=0,e=0,s++):!i&&o<0&&(c+=a.buffer.translateBufferLineToString(s,!1,0,e+1),o=a.cols-1,e=o,s--);return c+a.buffer.translateBufferLineToString(s,!1,e,o)}function Nc(e,t){return`\x1B`+(t?`O`:`[`)+e}function Pc(e,t){e=Math.floor(e);let n=``;for(let r=0;r<e;r++)n+=t;return n}var Fc=class{constructor(e){this._bufferService=e,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.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()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):this.selectionStart&&this.selectionStart[1]<0?(this.selectionStart=[0,0],!0):!1}};function Ic(e,t){if(e.start.y>e.end.y)throw Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var Lc=RegExp(`\xA0`,`g`),Rc=class extends to{constructor(e,t,n,r,i,a,o,s,c,l){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseCoordsService=a,this._optionsService=o,this._mouseStateService=s,this._renderService=c,this._coreBrowserService=l,this._dragScrollAmount=0,this._enabled=!0,this._trimListener=this._register(new no),this._workCell=new Ta,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new J),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new J),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new J),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new J),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=e=>this._handleMouseMove(e),this._mouseUpListener=e=>this._handleMouseUp(e),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener.value=this._bufferService.buffer.lines.onTrim(e=>this._handleTrim(e)),this._register(this._bufferService.buffers.onBufferActivate(e=>this._handleBufferActivate(e))),this.enable(),this._model=new Fc(this._bufferService),this._activeSelectionMode=0,this._register(Qa(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(e=>{e.rowsChanged&&this.clearSelection()}))}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(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return``;let n=this._bufferService.buffer,r=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return``;let i=e[0]<t[0]?e[0]:t[0],a=e[0]<t[0]?t[0]:e[0];for(let o=e[1];o<=t[1];o++){let e=n.translateBufferLineToString(o,!0,i,a);r.push(e)}}else{let i=e[1]===t[1]?t[0]:void 0;r.push(n.translateBufferLineToString(e[1],!0,e[0],i));for(let i=e[1]+1;i<=t[1]-1;i++){let e=n.lines.get(i),t=n.translateBufferLineToString(i,!0);e?.isWrapped?r[r.length-1]+=t:r.push(t)}if(e[1]!==t[1]){let e=n.lines.get(t[1]),i=n.translateBufferLineToString(t[1],!0,0,t[0]);e&&e.isWrapped?r[r.length-1]+=i:r.push(i)}}return r.map(e=>e.replace(Lc,` `)).join(No?`\r
70
+ `:`
71
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh()),Po&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=Ic(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseCoordsService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=ec(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-50),50),t/=50,t/Math.abs(t)+Math.round(t*14))}shouldForceSelection(e){return this._optionsService.rawOptions.mouseEventsRequireAlt&&this._mouseStateService.areMouseEventsActive?!e.altKey:Mo?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0&&!(this._optionsService.rawOptions.mouseEventsRequireAlt&&this._mouseStateService.areMouseEventsActive&&e.altKey)){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener(`mouseup`,this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener(`mouseup`,this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){let t=this.hasSelection;if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0,t&&this._fireOnSelectionChange(this._model.finalSelectionStart,this._model.finalSelectionEnd,!1);let n=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);n&&n.length!==this._model.selectionStart[0]&&n.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return this._optionsService.rawOptions.mouseEventsRequireAlt&&this._mouseStateService.areMouseEventsActive?!1:e.altKey&&!(Mo&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let n=this._bufferService.buffer;if(this._model.selectionEnd[1]<n.lines.length){let e=n.lines.get(this._model.selectionEnd[1]);e&&e.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[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});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows-1,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<500&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let t=this._mouseCoordsService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(t&&t[0]!==void 0&&t[1]!==void 0){let e=Sc(t[0]-1,t[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(e,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,n=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!n){this._oldHasSelection&&this._fireOnSelectionChange(e,t,n);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,n)}_fireOnSelectionChange(e,t,n){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=n,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.value=e.activeBuffer.lines.onTrim(e=>this._handleTrim(e))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let r=0;t>=r;r++){let i=e.loadCell(r,this._workCell).getChars().length;this._workCell.getWidth()===0?n--:i>1&&t!==r&&(n+=i-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,n=!0,r=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,a=i.lines.get(e[1]);if(!a)return;let o=i.translateBufferLineToString(e[1],!1),s=this._convertViewportColToCharacterIndex(a,e[0]),c=s,l=e[0]-s,u=0,d=0,f=0,p=0;if(o.charAt(s)===` `){for(;s>0&&o.charAt(s-1)===` `;)s--;for(;c<o.length&&o.charAt(c+1)===` `;)c++}else{let t=e[0],n=e[0];a.getWidth(t)===0&&(u++,t--),a.getWidth(n)===2&&(d++,n++);let r=a.getString(n).length;for(r>1&&(p+=r-1,c+=r-1);t>0&&s>0&&!this._isCharWordSeparator(a.loadCell(t-1,this._workCell));){a.loadCell(t-1,this._workCell);let e=this._workCell.getChars().length;this._workCell.getWidth()===0?(u++,t--):e>1&&(f+=e-1,s-=e-1),s--,t--}for(;n<a.length&&c+1<o.length&&!this._isCharWordSeparator(a.loadCell(n+1,this._workCell));){a.loadCell(n+1,this._workCell);let e=this._workCell.getChars().length;this._workCell.getWidth()===2?(d++,n++):e>1&&(p+=e-1,c+=e-1),c++,n++}}c++;let m=s+l-u+f,h=Math.min(this._bufferService.cols,c-s+u+d-f-p);if(!(!t&&o.slice(s,c).trim()===``)){if(n&&m===0&&a.getCodePoint(0)!==32){let t=i.lines.get(e[1]-1);if(t&&a.isWrapped&&t.getCodePoint(this._bufferService.cols-1)!==32){let t=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(t){let e=this._bufferService.cols-t.start;m-=e,h+=e}}}if(r&&m+h===this._bufferService.cols&&a.getCodePoint(this._bufferService.cols-1)!==32){let t=i.lines.get(e[1]+1);if(t?.isWrapped&&t.getCodePoint(0)!==32){let t=this._getWordAt([0,e[1]+1],!1,!1,!0);t&&(h+=t.length)}}return{start:m,length:h}}}_selectWordAt(e,t){let n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=Ic(n,this._bufferService.cols)}};Rc=sa([q(3,Aa),q(4,Ma),q(5,Wa),q(6,Ia),q(7,ja),q(8,Ka),q(9,Ua)],Rc);var zc=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},Bc=class{constructor(){this._color=new zc,this._css=new zc}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Vc=Object.freeze((()=>{let e=[Ts.toColor(`#2e3436`),Ts.toColor(`#cc0000`),Ts.toColor(`#4e9a06`),Ts.toColor(`#c4a000`),Ts.toColor(`#3465a4`),Ts.toColor(`#75507b`),Ts.toColor(`#06989a`),Ts.toColor(`#d3d7cf`),Ts.toColor(`#555753`),Ts.toColor(`#ef2929`),Ts.toColor(`#8ae234`),Ts.toColor(`#fce94f`),Ts.toColor(`#729fcf`),Ts.toColor(`#ad7fa8`),Ts.toColor(`#34e2e2`),Ts.toColor(`#eeeeec`)],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let r=t[n/36%6|0],i=t[n/6%6|0],a=t[n%6];e.push({css:Cs.toCss(r,i,a),rgba:Cs.toRgba(r,i,a)})}for(let t=0;t<24;t++){let n=8+t*10;e.push({css:Cs.toCss(n,n,n),rgba:Cs.toRgba(n,n,n)})}return e})()),Hc=Ts.toColor(`#ffffff`),Uc=Ts.toColor(`#000000`),Wc=Ts.toColor(`#ffffff`),Gc=Uc,Kc={css:`rgba(255, 255, 255, 0.3)`,rgba:4294967117},qc=Hc,Jc=class extends to{constructor(e){super(),this._optionsService=e,this._contrastCache=new Bc,this._halfContrastCache=new Bc,this._onChangeColors=this._register(new J),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:Hc,background:Uc,cursor:Wc,cursorAccent:Gc,selectionForeground:void 0,selectionBackgroundTransparent:Kc,selectionBackgroundOpaque:ws.blend(Uc,Kc),selectionInactiveBackgroundTransparent:Kc,selectionInactiveBackgroundOpaque:ws.blend(Uc,Kc),scrollbarSliderBackground:ws.opacity(Hc,.2),scrollbarSliderHoverBackground:ws.opacity(Hc,.4),scrollbarSliderActiveBackground:ws.opacity(Hc,.5),overviewRulerBorder:Hc,ansi:Vc.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)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=Yc(e.foreground,Hc),t.background=Yc(e.background,Uc),t.cursor=ws.blend(t.background,Yc(e.cursor,Wc)),t.cursorAccent=ws.blend(t.background,Yc(e.cursorAccent,Gc)),t.selectionBackgroundTransparent=Yc(e.selectionBackground,Kc),t.selectionBackgroundOpaque=ws.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=Yc(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=ws.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?Yc(e.selectionForeground,Ss):void 0,t.selectionForeground===Ss&&(t.selectionForeground=void 0),ws.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=ws.opacity(t.selectionBackgroundTransparent,.3)),ws.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=ws.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=Yc(e.scrollbarSliderBackground,ws.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=Yc(e.scrollbarSliderHoverBackground,ws.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=Yc(e.scrollbarSliderActiveBackground,ws.opacity(t.foreground,.5)),t.overviewRulerBorder=Yc(e.overviewRulerBorder,qc),t.ansi=Vc.slice(),t.ansi[0]=Yc(e.black,Vc[0]),t.ansi[1]=Yc(e.red,Vc[1]),t.ansi[2]=Yc(e.green,Vc[2]),t.ansi[3]=Yc(e.yellow,Vc[3]),t.ansi[4]=Yc(e.blue,Vc[4]),t.ansi[5]=Yc(e.magenta,Vc[5]),t.ansi[6]=Yc(e.cyan,Vc[6]),t.ansi[7]=Yc(e.white,Vc[7]),t.ansi[8]=Yc(e.brightBlack,Vc[8]),t.ansi[9]=Yc(e.brightRed,Vc[9]),t.ansi[10]=Yc(e.brightGreen,Vc[10]),t.ansi[11]=Yc(e.brightYellow,Vc[11]),t.ansi[12]=Yc(e.brightBlue,Vc[12]),t.ansi[13]=Yc(e.brightMagenta,Vc[13]),t.ansi[14]=Yc(e.brightCyan,Vc[14]),t.ansi[15]=Yc(e.brightWhite,Vc[15]),e.extendedAnsi){let n=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let r=0;r<n;r++)t.ansi[r+16]=Yc(e.extendedAnsi[r],Vc[r+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let e=0;e<this._restoreColors.ansi.length;++e)this._colors.ansi[e]=this._restoreColors.ansi[e];return}switch(e){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[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(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()}}};Jc=sa([q(0,Ia)],Jc);function Yc(e,t){if(e!==void 0)try{return Ts.toColor(e)}catch{}return t}var Xc={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:[`'`,`"`]};function Zc(e,t,n,r){let i={type:0,cancel:!1,key:void 0},a=!!e.shiftKey|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key===`UIKeyInputUpArrow`?t?i.key=`\x1BOA`:i.key=`\x1B[A`:e.key===`UIKeyInputLeftArrow`?t?i.key=`\x1BOD`:i.key=`\x1B[D`:e.key===`UIKeyInputRightArrow`?t?i.key=`\x1BOC`:i.key=`\x1B[C`:e.key===`UIKeyInputDownArrow`&&(t?i.key=`\x1BOB`:i.key=`\x1B[B`);break;case 8:i.key=e.ctrlKey?`\b`:``,e.altKey&&(i.key=`\x1B`+i.key);break;case 9:if(e.shiftKey){i.key=`\x1B[Z`;break}i.key=` `,i.cancel=!0;break;case 13:e.key===`c`&&e.ctrlKey?i.key=``:i.key=e.altKey?`\x1B\r`:`\r`,i.cancel=!0;break;case 27:i.key=`\x1B`,e.altKey&&(i.key=`\x1B\x1B`),i.cancel=!0;break;case 37:if(e.metaKey)break;a?i.key=`\x1B[1;`+(a+1)+`D`:t?i.key=`\x1BOD`:i.key=`\x1B[D`;break;case 39:if(e.metaKey)break;a?i.key=`\x1B[1;`+(a+1)+`C`:t?i.key=`\x1BOC`:i.key=`\x1B[C`;break;case 38:if(e.metaKey)break;a?i.key=`\x1B[1;`+(a+1)+`A`:t?i.key=`\x1BOA`:i.key=`\x1B[A`;break;case 40:if(e.metaKey)break;a?i.key=`\x1B[1;`+(a+1)+`B`:t?i.key=`\x1BOB`:i.key=`\x1B[B`;break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=`\x1B[2~`);break;case 46:a?i.key=`\x1B[3;`+(a+1)+`~`:i.key=`\x1B[3~`;break;case 36:a?i.key=`\x1B[1;`+(a+1)+`H`:t?i.key=`\x1BOH`:i.key=`\x1B[H`;break;case 35:a?i.key=`\x1B[1;`+(a+1)+`F`:t?i.key=`\x1BOF`:i.key=`\x1B[F`;break;case 33:e.shiftKey?i.type=2:e.ctrlKey?i.key=`\x1B[5;`+(a+1)+`~`:i.key=`\x1B[5~`;break;case 34:e.shiftKey?i.type=3:e.ctrlKey?i.key=`\x1B[6;`+(a+1)+`~`:i.key=`\x1B[6~`;break;case 112:a?i.key=`\x1B[1;`+(a+1)+`P`:i.key=`\x1BOP`;break;case 113:a?i.key=`\x1B[1;`+(a+1)+`Q`:i.key=`\x1BOQ`;break;case 114:a?i.key=`\x1B[1;`+(a+1)+`R`:i.key=`\x1BOR`;break;case 115:a?i.key=`\x1B[1;`+(a+1)+`S`:i.key=`\x1BOS`;break;case 116:a?i.key=`\x1B[15;`+(a+1)+`~`:i.key=`\x1B[15~`;break;case 117:a?i.key=`\x1B[17;`+(a+1)+`~`:i.key=`\x1B[17~`;break;case 118:a?i.key=`\x1B[18;`+(a+1)+`~`:i.key=`\x1B[18~`;break;case 119:a?i.key=`\x1B[19;`+(a+1)+`~`:i.key=`\x1B[19~`;break;case 120:a?i.key=`\x1B[20;`+(a+1)+`~`:i.key=`\x1B[20~`;break;case 121:a?i.key=`\x1B[21;`+(a+1)+`~`:i.key=`\x1B[21~`;break;case 122:a?i.key=`\x1B[23;`+(a+1)+`~`:i.key=`\x1B[23~`;break;case 123:a?i.key=`\x1B[24;`+(a+1)+`~`:i.key=`\x1B[24~`;break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=`\0`:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=``:e.key===`/`?i.key=``:e.keyCode===219?i.key=`\x1B`:e.keyCode===220?i.key=``:e.keyCode===221&&(i.key=``);else if((!n||r)&&e.altKey&&!e.metaKey){let t=Xc[e.keyCode]?.[+!!e.shiftKey];if(t)i.key=`\x1B`+t;else if(e.keyCode>=65&&e.keyCode<=90){let t=e.ctrlKey?e.keyCode-64:e.keyCode+32,n=String.fromCharCode(t);e.shiftKey&&(n=n.toUpperCase()),i.key=`\x1B`+n}else if(e.keyCode===32)i.key=`\x1B`+(e.ctrlKey?`\0`:` `);else if(e.key===`Dead`&&e.code.startsWith(`Key`)){let t=e.code.slice(3,4);e.shiftKey||(t=t.toLowerCase()),i.key=`\x1B`+t,i.cancel=!0}}else if(n&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey)e.keyCode===65&&(i.type=1);else if(e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1)i.key=e.key;else if(e.key&&e.ctrlKey&&e.shiftKey)switch(e.code){case`Minus`:i.key=``;break;case`Digit2`:i.key=`\0`;break;case`Digit6`:i.key=``;break}break}return i}var Qc=class{constructor(){this._functionalKeyCodes={Escape:27,Enter:13,Tab:9,Backspace:127,CapsLock:57358,ScrollLock:57359,NumLock:57360,PrintScreen:57361,Pause:57362,ContextMenu:57363,F13:57376,F14:57377,F15:57378,F16:57379,F17:57380,F18:57381,F19:57382,F20:57383,F21:57384,F22:57385,F23:57386,F24:57387,F25:57388,KP_0:57399,KP_1:57400,KP_2:57401,KP_3:57402,KP_4:57403,KP_5:57404,KP_6:57405,KP_7:57406,KP_8:57407,KP_9:57408,KP_Decimal:57409,KP_Divide:57410,KP_Multiply:57411,KP_Subtract:57412,KP_Add:57413,KP_Enter:57414,KP_Equal:57415,ShiftLeft:57441,ShiftRight:57447,ControlLeft:57442,ControlRight:57448,AltLeft:57443,AltRight:57449,MetaLeft:57444,MetaRight:57450,MediaPlayPause:57430,MediaStop:57432,MediaTrackNext:57435,MediaTrackPrevious:57436,AudioVolumeDown:57438,AudioVolumeUp:57439,AudioVolumeMute:57440},this._csiTildeKeys={Insert:2,Delete:3,PageUp:5,PageDown:6,F5:15,F6:17,F7:18,F8:19,F9:20,F10:21,F11:23,F12:24},this._csiLetterKeys={ArrowUp:`A`,ArrowDown:`B`,ArrowRight:`C`,ArrowLeft:`D`,Home:`H`,End:`F`},this._ss3FunctionKeys={F1:`P`,F2:`Q`,F3:`R`,F4:`S`}}_getNumpadKeyCode(e){if(e.code.startsWith(`Numpad`)){let t=e.code.slice(6);if(t>=`0`&&t<=`9`)return 57399+parseInt(t,10);switch(t){case`Decimal`:return 57409;case`Divide`:return 57410;case`Multiply`:return 57411;case`Subtract`:return 57412;case`Add`:return 57413;case`Enter`:return 57414;case`Equal`:return 57415}}}_getModifierKeyCode(e){switch(e.code){case`ShiftLeft`:return 57441;case`ShiftRight`:return 57447;case`ControlLeft`:return 57442;case`ControlRight`:return 57448;case`AltLeft`:return 57443;case`AltRight`:return 57449;case`MetaLeft`:return 57444;case`MetaRight`:return 57450}}_encodeModifiers(e){let t=0;return e.shiftKey&&(t|=1),e.altKey&&(t|=2),e.ctrlKey&&(t|=4),e.metaKey&&(t|=8),t>0?t+1:0}_getKeyCode(e,t){let n=this._getNumpadKeyCode(e);if(n!==void 0)return n;let r=this._getModifierKeyCode(e);if(r!==void 0)return r;let i=this._functionalKeyCodes[e.key];if(i!==void 0)return i;if((e.shiftKey||t&&e.altKey)&&e.code){if(e.code.startsWith(`Digit`)&&e.code.length===6){let t=e.code.charAt(5);if(t>=`0`&&t<=`9`)return t.charCodeAt(0)}if(e.code.startsWith(`Key`)&&e.code.length===4)return e.code.charAt(3).toLowerCase().charCodeAt(0)}if(e.key.length===1){let t=e.key.codePointAt(0);return t>=65&&t<=90?t+32:t}}_isModifierKey(e){return e.key===`Shift`||e.key===`Control`||e.key===`Alt`||e.key===`Meta`}_isLockKey(e){return e.key===`CapsLock`||e.key===`NumLock`||e.key===`ScrollLock`}_buildCsiLetterSequence(e,t,n,r){let i=r&&n!==1;if(t>0||i){let r=`\x1B[1;`+(t>0?t:`1`);return i&&(r+=`:`+n),r+=e,r}return`\x1B[`+e}_buildSs3Sequence(e,t,n,r){let i=r&&n!==1;if(t>0||i){let r=`\x1B[1;`+(t>0?t:`1`);return i&&(r+=`:`+n),r+=e,r}return`\x1BO`+e}_buildCsiTildeSequence(e,t,n,r){let i=r&&n!==1,a=`\x1B[`+e;return(t>0||i)&&(a+=`;`+(t>0?t:`1`),i&&(a+=`:`+n)),a+=`~`,a}_buildCsiUSequence(e,t,n,r,i,a,o){let s=!!(i&2),c=!!(i&4),l=`\x1B[`+t,u;c&&e.shiftKey&&e.key.length===1&&!a&&!o&&(u=e.key.codePointAt(0),l+=`:`+u);let d=i&16&&r!==3&&e.key.length===1&&!a&&!o&&!e.ctrlKey?e.key.codePointAt(0):void 0,f=s&&r!==1&&(r===3||d===void 0);return(n>0||f||d!==void 0)&&(l+=`;`,n>0?l+=n:f&&(l+=`1`),f&&(l+=`:`+r)),d!==void 0&&(l+=`;`+d),l+=`u`,l}evaluate(e,t,n=1,r=!1){let i={type:0,cancel:!1,key:void 0},a=this._encodeModifiers(e),o=this._isModifierKey(e),s=!!(t&2);if(!s&&n===3||o&&!(t&8)||this._isLockKey(e)&&!(t&8))return i;let c=this._csiLetterKeys[e.key];if(c)return i.key=this._buildCsiLetterSequence(c,a,n,s),i.cancel=!0,i;let l=this._ss3FunctionKeys[e.key];if(l)return i.key=this._buildSs3Sequence(l,a,n,s),i.cancel=!0,i;let u=this._csiTildeKeys[e.key];if(u!==void 0)return i.key=this._buildCsiTildeSequence(u,a,n,s),i.cancel=!0,i;let d=this._getKeyCode(e,r);if(d===void 0)return i;let f=d===13||d===9||d===127;if(f&&n===3&&!(t&8))return i;let p=this._functionalKeyCodes[e.key]!==void 0||this._getNumpadKeyCode(e)!==void 0;if(t&8||s&&n===3||(t&1||s)&&(p&&!f||a>0&&e.key.length!==1||a-1>1))i.key=this._buildCsiUSequence(e,d,a,n,t,p,o),i.cancel=!0;else{let t=d===13?`\r`:d===9?` `:d===127?``:void 0;t?i.key=t:e.key.length===1&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(i.key=e.key)}return i}static shouldUseProtocol(e){return e>0}},$c=class{constructor(){this._codeToVk={KeyA:65,KeyB:66,KeyC:67,KeyD:68,KeyE:69,KeyF:70,KeyG:71,KeyH:72,KeyI:73,KeyJ:74,KeyK:75,KeyL:76,KeyM:77,KeyN:78,KeyO:79,KeyP:80,KeyQ:81,KeyR:82,KeyS:83,KeyT:84,KeyU:85,KeyV:86,KeyW:87,KeyX:88,KeyY:89,KeyZ:90,Digit0:48,Digit1:49,Digit2:50,Digit3:51,Digit4:52,Digit5:53,Digit6:54,Digit7:55,Digit8:56,Digit9:57,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,Numpad0:96,Numpad1:97,Numpad2:98,Numpad3:99,Numpad4:100,Numpad5:101,Numpad6:102,Numpad7:103,Numpad8:104,Numpad9:105,NumpadMultiply:106,NumpadAdd:107,NumpadSeparator:108,NumpadSubtract:109,NumpadDecimal:110,NumpadDivide:111,NumpadEnter:13,NumLock:144,ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Home:36,End:35,PageUp:33,PageDown:34,Insert:45,Delete:46,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,CapsLock:20,ScrollLock:145,Escape:27,Enter:13,Tab:9,Space:32,Backspace:8,Pause:19,ContextMenu:93,PrintScreen:44,Semicolon:186,Equal:187,Comma:188,Minus:189,Period:190,Slash:191,Backquote:192,BracketLeft:219,Backslash:220,BracketRight:221,Quote:222,IntlBackslash:226},this._codeToScancode={KeyQ:16,KeyW:17,KeyE:18,KeyR:19,KeyT:20,KeyY:21,KeyU:22,KeyI:23,KeyO:24,KeyP:25,KeyA:30,KeyS:31,KeyD:32,KeyF:33,KeyG:34,KeyH:35,KeyJ:36,KeyK:37,KeyL:38,KeyZ:44,KeyX:45,KeyC:46,KeyV:47,KeyB:48,KeyN:49,KeyM:50,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Digit0:11,F1:59,F2:60,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,F10:68,F11:87,F12:88,Numpad0:82,Numpad1:79,Numpad2:80,Numpad3:81,Numpad4:75,Numpad5:76,Numpad6:77,Numpad7:71,Numpad8:72,Numpad9:73,NumpadMultiply:55,NumpadAdd:78,NumpadSubtract:74,NumpadDecimal:83,NumpadDivide:53,NumpadEnter:28,NumLock:69,ArrowUp:72,ArrowDown:80,ArrowLeft:75,ArrowRight:77,Home:71,End:79,PageUp:73,PageDown:81,Insert:82,Delete:83,ShiftLeft:42,ShiftRight:54,ControlLeft:29,ControlRight:29,AltLeft:56,AltRight:56,CapsLock:58,ScrollLock:70,Escape:1,Enter:28,Tab:15,Space:57,Backspace:14,Pause:69,Semicolon:39,Equal:13,Comma:51,Minus:12,Period:52,Slash:53,Backquote:41,BracketLeft:26,Backslash:43,BracketRight:27,Quote:40},this._enhancedKeyCodes=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`,`Insert`,`Delete`,`NumpadEnter`,`NumpadDivide`,`ControlRight`,`AltRight`,`PrintScreen`,`Pause`,`ContextMenu`,`MetaLeft`,`MetaRight`]),this._keyToControlChar={Enter:13,Backspace:8,Tab:9,Escape:27}}_getVirtualKeyCode(e){let t=this._codeToVk[e.code];return t===void 0?e.keyCode||0:t}_getScanCode(e){return this._codeToScancode[e.code]||0}_getUnicodeChar(e){if(e.ctrlKey&&!e.altKey&&!e.metaKey){if(e.key===`Enter`)return 10;if(e.key===`Backspace`)return 127}let t=this._keyToControlChar[e.key];if(t!==void 0)return t;if(e.key.length===1){let t=e.key.codePointAt(0)||0;if(e.ctrlKey&&!e.altKey&&!e.metaKey){if(t>=65&&t<=90)return t-64;if(t>=97&&t<=122)return t-96}return t}return 0}_getControlKeyState(e){let t=0;return e.shiftKey&&(t|=16),e.ctrlKey&&(e.code===`ControlRight`?t|=4:t|=8),e.altKey&&(e.code===`AltRight`?t|=1:t|=2),this._enhancedKeyCodes.has(e.code)&&(t|=256),t}evaluateKeyboardEvent(e,t){return{type:0,cancel:!0,key:`\x1B[${this._getVirtualKeyCode(e)};${this._getScanCode(e)};${this._getUnicodeChar(e)};${+!!t};${this._getControlKeyState(e)};1_`}}},el=class{constructor(e,t){this._coreService=e,this._optionsService=t}_getWin32InputMode(){return this._win32InputMode??=new $c,this._win32InputMode}_getKittyKeyboard(){return this._kittyKeyboard??=new Qc,this._kittyKeyboard}evaluateKeyDown(e){if(this.useWin32InputMode)return this._getWin32InputMode().evaluateKeyboardEvent(e,!0);let t=this._coreService.kittyKeyboard.flags;return this.useKitty?this._getKittyKeyboard().evaluate(e,t,e.repeat?2:1,Mo&&this._optionsService.rawOptions.macOptionIsMeta):Zc(e,this._coreService.decPrivateModes.applicationCursorKeys,Mo,this._optionsService.rawOptions.macOptionIsMeta)}evaluateKeyUp(e){if(this.useWin32InputMode)return this._getWin32InputMode().evaluateKeyboardEvent(e,!1);let t=this._coreService.kittyKeyboard.flags;if(this.useKitty&&t&2)return this._getKittyKeyboard().evaluate(e,t,3,Mo&&this._optionsService.rawOptions.macOptionIsMeta)}get useKitty(){let e=this._coreService.kittyKeyboard.flags;return!!(this._optionsService.rawOptions.vtExtensions?.kittyKeyboard&&Qc.shouldUseProtocol(e))}get useWin32InputMode(){return!!(this._optionsService.rawOptions.vtExtensions?.win32InputMode&&this._coreService.decPrivateModes.win32InputMode)}};el=sa([q(0,Ma),q(1,Ia)],el);var tl=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}forEach(e){for(let[t,n]of this._entries.entries())e(t,n)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},nl=class{constructor(){this._services=new tl,this._services.set(Pa,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let n=Da(e).sort((e,t)=>e.index-t.index),r=[];for(let t of n){let n=this._services.get(t.id);if(!n)throw Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id._id}.`);r.push(n)}let i=n.length>0?n[0].index:t.length;if(t.length!==i)throw Error(`[createInstance] First service dependency of ${e.name} at position ${i+1} conflicts with ${t.length} static arguments`);return new e(...t,...r)}},rl={trace:0,debug:1,info:2,warn:3,error:4,off:5},il=`xterm.js: `,al=class extends to{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=rl[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]==`function`&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?``:il)+t,...n)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};al=sa([q(0,Ia)],al);var ol=class extends to{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new J),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new J),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new J),this.onTrim=this.onTrimEmitter.event,this._array=Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=Array(e);for(let n=0;n<Math.min(e,this.length);n++)t[n]=this._array[this._getCyclicIndex(n)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw 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(e,t,...n){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let t=this._length-1;t>=e;t--)this._array[this._getCyclicIndex(t+n.length)]=this._array[this._getCyclicIndex(t)];for(let t=0;t<n.length;t++)this._array[this._getCyclicIndex(e+t)]=n[t];if(n.length&&this.onInsertEmitter.fire({index:e,amount:n.length}),this._length+n.length>this._maxLength){let e=this._length+n.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=n.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw Error(`start argument out of range`);if(e+n<0)throw Error(`Cannot shift elements in list beyond index 0`);if(n>0){for(let r=t-1;r>=0;r--)this.set(e+r+n,this.get(e+r));let r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<t;r++)this.set(e+r+n,this.get(e+r))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},sl=class{constructor(){this._chunks=[],this._length=0}get length(){return this._length}reset(){this._chunks.length=0,this._length=0}append(e){this._chunks.push(e),this._length+=e.length}toString(){return this._chunks.join(``)}},cl=class{constructor(e){this._limit=e,this._builder=new sl}get length(){return this._builder.length}get limit(){return this._limit}reset(){this._builder.reset()}append(e){return this._builder.append(e),this._builder.length>this._limit?(this._builder.reset(),!0):!1}toString(){return this._builder.toString()}},ll=Object.freeze(new Ca),ul=0,dl=new Ta,fl=new sl,pl=class e{constructor(e,t,n,r=!1){this._stringCache=e,this.isWrapped=r,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*3);let i=n??Ta.fromCharData([0,``,1,0]);for(let e=0;e<t;++e)this.setCell(e,i);this.length=t}get(e){let t=this._data[e*3+0],n=t&2097151;return[this._data[e*3+1],t&2097152?this._combined[e]:n?ya(n):``,t>>22,t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):n]}set(e,t){this._invalidateStringCache(),this._data[e*3+1]=t[0],t[1].length>1?(this._combined[e]=t[1],this._data[e*3+0]=e|2097152|t[2]<<22):this._data[e*3+0]=t[1].charCodeAt(0)|t[2]<<22}getWidth(e){return this._data[e*3+0]>>22}hasWidth(e){return this._data[e*3+0]&12582912}getFg(e){return this._data[e*3+1]}getBg(e){return this._data[e*3+2]}hasContent(e){return this._data[e*3+0]&4194303}getCodePoint(e){let t=this._data[e*3+0];return t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):t&2097151}isCombined(e){return this._data[e*3+0]&2097152}getString(e){let t=this._data[e*3+0];return t&2097152?this._combined[e]:t&2097151?ya(t&2097151):``}isProtected(e){return this._data[e*3+2]&536870912}loadCell(e,t){return ul=e*3,t.content=this._data[ul+0],t.fg=this._data[ul+1],t.bg=this._data[ul+2],t.content&2097152?t.combinedData=this._combined[e]:t.combinedData=``,t.bg&268435456?t.extended=this._extendedAttrs[e]:t.extended=ll.extended.clone(),t}setCell(e,t){this._invalidateStringCache(),t.content&2097152&&(this._combined[e]=t.combinedData),t.bg&268435456&&(this._extendedAttrs[e]=t.extended),this._data[e*3+0]=t.content,this._data[e*3+1]=t.fg,this._data[e*3+2]=t.bg}setCellFromCodepoint(e,t,n,r){this._invalidateStringCache(),r.bg&268435456&&(this._extendedAttrs[e]=r.extended),this._data[e*3+0]=t|n<<22,this._data[e*3+1]=r.fg,this._data[e*3+2]=r.bg}addCodepointToCell(e,t,n){this._invalidateStringCache();let r=this._data[e*3+0];r&2097152?this._combined[e]+=ya(t):r&2097151?(this._combined[e]=ya(r&2097151)+ya(t),r&=-2097152,r|=2097152):r=t|1<<22,n&&(r&=-12582913,r|=n<<22),this._data[e*3+0]=r}insertCells(e,t,n){if(this._invalidateStringCache(),e%=this.length,e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length-e){for(let n=this.length-e-t-1;n>=0;--n)this.setCell(e+t+n,this.loadCell(e+n,dl));for(let r=0;r<t;++r)this.setCell(e+r,n)}else for(let t=e;t<this.length;++t)this.setCell(t,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(e,t,n){if(this._invalidateStringCache(),e%=this.length,t<this.length-e){for(let n=0;n<this.length-e-t;++n)this.setCell(e+n,this.loadCell(e+t+n,dl));for(let e=this.length-t;e<this.length;++e)this.setCell(e,n)}else for(let t=e;t<this.length;++t)this.setCell(t,n);e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),this.getWidth(e)===0&&!this.hasContent(e)&&this.setCellFromCodepoint(e,0,1,n)}replaceCells(e,t,n,r=!1){if(this._invalidateStringCache(),r){for(e&&this.getWidth(e-1)===2&&!this.isProtected(e-1)&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length&&this.getWidth(t-1)===2&&!this.isProtected(t)&&this.setCellFromCodepoint(t,0,1,n);e<t&&e<this.length;)this.isProtected(e)||this.setCell(e,n),e++;return}for(e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t,0,1,n);e<t&&e<this.length;)this.setCell(e++,n)}resize(e,t){if(this._invalidateStringCache(),e===this.length)return this._data.length*4*2<this._data.buffer.byteLength;let n=e*3;if(e>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let e=new Uint32Array(n);e.set(this._data),this._data=e}for(let n=this.length;n<e;++n)this.setCell(n,t)}else{this._data=this._data.subarray(0,n);let t=Object.keys(this._combined);for(let n=0;n<t.length;n++){let r=parseInt(t[n],10);r>=e&&delete this._combined[r]}let r=Object.keys(this._extendedAttrs);for(let t=0;t<r.length;t++){let n=parseInt(r[t],10);n>=e&&delete this._extendedAttrs[n]}}return this.length=e,n*4*2<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*2<this._data.buffer.byteLength){let e=new Uint32Array(this._data.length);return e.set(this._data),this._data=e,1}return 0}fill(e,t=!1){if(this._invalidateStringCache(),t){for(let t=0;t<this.length;++t)this.isProtected(t)||this.setCell(t,e);return}this._combined={},this._extendedAttrs={};for(let t=0;t<this.length;++t)this.setCell(t,e)}copyFrom(e){this._invalidateStringCache(),this.length===e.length?this._data.set(e._data):this._data=new Uint32Array(e._data),this.length=e.length,this._copySparseMapsFrom(e),this.isWrapped=e.isWrapped}clone(){let t=new e(this._stringCache,0,void 0,!1);return t._data=new Uint32Array(this._data),t.length=this.length,t._copySparseMapsFrom(this),t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(this._data[e*3+0]&4194303)return e+(this._data[e*3+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(this._data[e*3+0]&4194303||this._data[e*3+2]&50331648)return e+(this._data[e*3+0]>>22);return 0}copyCellsFrom(e,t,n,r,i){this._invalidateStringCache();let a=e._data;if(i)for(let i=r-1;i>=0;i--){for(let e=0;e<3;e++)this._data[(n+i)*3+e]=a[(t+i)*3+e];this._copyCellMapsFrom(e,t+i,n+i)}else for(let i=0;i<r;i++){for(let e=0;e<3;e++)this._data[(n+i)*3+e]=a[(t+i)*3+e];this._copyCellMapsFrom(e,t+i,n+i)}}translateToString(e,t,n,r){let i=(t===void 0||t===0)&&n===void 0&&r===void 0;i&&this._stringCache.touch?.();let a=i?this._getStringCacheEntry(!1):void 0;if(i&&a?.value!==void 0){if(e)return a.isTrimmed?a.value:a.value.trimEnd();if(!a.isTrimmed)return a.value}for(t??=0,n??=this.length,e&&(n=Math.min(n,this.getTrimmedLength())),r&&(r.length=0),fl.reset();t<n;){let e=this._data[t*3+0],n=e&2097151,i=e&2097152?this._combined[t]:n?ya(n):` `;if(fl.append(i),r)for(let e=0;e<i.length;++e)r.push(t);t+=e>>22||1}r&&r.push(t);let o=fl.toString();if(fl.reset(),i){let t=this._getStringCacheEntry(!0);t.value=o,t.isTrimmed=!!e}return o}_getStringCacheEntry(e){let t=this._stringCacheEntryRef?.deref();if(t&&t.generation===this._stringCache.generation)return t;if(!e)return;let n=this._stringCache.allocateEntry();return this._stringCacheEntryRef=new WeakRef(n),n}_invalidateStringCache(){let e=this._getStringCacheEntry(!1);e&&(e.value=void 0,e.isTrimmed=!1)}_copyCellMapsFrom(e,t,n){let r=t*3;e._data[r+0]&2097152&&(this._combined[n]=e._combined[t]),e._data[r+2]&268435456&&(this._extendedAttrs[n]=e._extendedAttrs[t])}_copySparseMapsFrom(e){this._combined={},this._extendedAttrs={};for(let t=0;t<e.length;t++)this._copyCellMapsFrom(e,t,t)}},ml=class extends to{constructor(){super(),this.generation=0,this.entries=new Set,this._clearTimeout=this._register(new no),this._lastAccessTimestamp=0,this._register(Qa(()=>this.entries.clear()))}touch(){this._scheduleClear()}allocateEntry(){let e={value:void 0,isTrimmed:!1,generation:this.generation};return this.entries.add(e),this._scheduleClear(),e}clear(){this._clearTimeout.clear(),this._lastAccessTimestamp=0,this.generation++;for(let e of this.entries)e.value=void 0,e.isTrimmed=!1;this.entries.clear()}_scheduleClear(){this._lastAccessTimestamp=Date.now(),!this._clearTimeout.value&&this._scheduleClearTimeout(15e3)}_scheduleClearTimeout(e){this._clearTimeout.value=ro(()=>{let e=Date.now()-this._lastAccessTimestamp;if(e>=15e3){this.clear();return}this._scheduleClearTimeout(15e3-e)},e)}};function hl(e,t,n,r,i,a){let o=[];for(let s=0;s<e.length-1;s++){let c=s,l=e.get(++c);if(!l.isWrapped)continue;let u=[e.get(s)];for(;c<e.length&&l.isWrapped;)u.push(l),l=e.get(++c);if(!a&&r>=s&&r<c){s+=u.length-1;continue}let d=0,f=yl(u,d,t),p=1,m=0;for(;p<u.length;){let e=yl(u,p,t),r=e-m,a=n-f,o=Math.min(r,a);u[d].copyCellsFrom(u[p],m,f,o,!1),f+=o,f===n&&(d++,f=0),m+=o,m===e&&(p++,m=0),f===0&&d!==0&&u[d-1].getWidth(n-1)===2&&(u[d].copyCellsFrom(u[d-1],n-1,f++,1,!1),u[d-1].setCell(n-1,i))}u[d].replaceCells(f,n,i);let h=0;for(let e=u.length-1;e>0&&(e>d||u[e].getTrimmedLength()===0);e--)h++;h>0&&(o.push(s+u.length-h),o.push(h)),s+=u.length-1}return o}function gl(e,t){let n=[],r=0,i=t[r],a=0;for(let o=0;o<e.length;o++)if(i===o){let n=t[++r];e.onDeleteEmitter.fire({index:o-a,amount:n}),o+=n-1,a+=n,i=t[++r]}else n.push(o);return{layout:n,countRemoved:a}}function _l(e,t){let n=[];for(let r=0;r<t.length;r++)n.push(e.get(t[r]));for(let t=0;t<n.length;t++)e.set(t,n[t]);e.length=t.length}function vl(e,t,n){let r=[],i=0;for(let n=0;n<e.length;n++)i+=yl(e,n,t);let a=0,o=0,s=0;for(;s<i;){if(i-s<n){r.push(i-s);break}a+=n;let c=yl(e,o,t);a>c&&(a-=c,o++);let l=e[o].getWidth(a-1)===2;l&&a--;let u=l?n-1:n;r.push(u),s+=u}return r}function yl(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();let r=!e[t].hasContent(n-1)&&e[t].getWidth(n-1)===1,i=e[t+1].getWidth(0)===2;return r&&i?n-1:n}var bl=class e{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=e._nextId++,this._onDispose=this.register(new J),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),$a(this._disposables),this._disposables.length=0)}register(e){return this._disposables.push(e),e}};bl._nextId=1;var xl=bl,Sl={},Cl=Sl.B;Sl[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:`≥`,"{":`π`,"|":`≠`,"}":`£`,"~":`·`},Sl.A={"#":`£`},Sl.B=void 0,Sl[4]={"#":`£`,"@":`¾`,"[":`ij`,"\\":`½`,"]":`|`,"{":`¨`,"|":`f`,"}":`¼`,"~":`´`},Sl.C=Sl[5]={"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},Sl.R={"#":`£`,"@":`à`,"[":`°`,"\\":`ç`,"]":`§`,"{":`é`,"|":`ù`,"}":`è`,"~":`¨`},Sl.Q={"@":`à`,"[":`â`,"\\":`ç`,"]":`ê`,"^":`î`,"`":`ô`,"{":`é`,"|":`ù`,"}":`è`,"~":`û`},Sl.K={"@":`§`,"[":`Ä`,"\\":`Ö`,"]":`Ü`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`ß`},Sl.Y={"#":`£`,"@":`§`,"[":`°`,"\\":`ç`,"]":`é`,"`":`ù`,"{":`à`,"|":`ò`,"}":`è`,"~":`ì`},Sl.E=Sl[6]={"@":`Ä`,"[":`Æ`,"\\":`Ø`,"]":`Å`,"^":`Ü`,"`":`ä`,"{":`æ`,"|":`ø`,"}":`å`,"~":`ü`},Sl.Z={"#":`£`,"@":`§`,"[":`¡`,"\\":`Ñ`,"]":`¿`,"{":`°`,"|":`ñ`,"}":`ç`},Sl.H=Sl[7]={"@":`É`,"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},Sl[`=`]={"#":`ù`,"@":`à`,"[":`é`,"\\":`ç`,"]":`ê`,"^":`î`,_:`è`,"`":`ô`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`û`};var wl=4294967295,Tl=class extends to{constructor(e,t,n,r){super(),this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this._logService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=ll.clone(),this.savedCharset=Cl,this.savedCharsets=[],this.savedGlevel=0,this.savedOriginMode=!1,this.savedWraparoundMode=!0,this.markers=[],this._nullCell=Ta.fromCharData([0,``,1,0]),this._whitespaceCell=Ta.fromCharData([0,` `,1,32]),this._isClearing=!1,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new ol(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops(),this._memoryCleanupQueue=new vc(this._logService),this._register(Qa(()=>this._memoryCleanupQueue.clear())),this._register(Qa(()=>this.clearAllMarkers())),this._stringCache=this._register(new ml)}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new wa),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new wa),this._whitespaceCell}getBlankLine(e,t){return new pl(this._stringCache,this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>wl?wl:t}fillViewportRows(e){if(this.lines.length===0){e??=ll;let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this._stringCache.clear(),this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new ol(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let n=this.getNullCell(ll);this._stringCache.clear();let r=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(let t=0;t<this.lines.length;t++)r+=+this.lines.get(t).resize(e,n);let a=0;if(this._rows<t)for(let r=this._rows;r<t;r++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new pl(this._stringCache,e,n,!1)):this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(new pl(this._stringCache,e,n,!1)));else for(let e=this._rows;e>t;e--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){let e=this.lines.length-i;e>0&&(this.lines.trimStart(e),this.ybase=Math.max(this.ybase-e,0),this.ydisp=Math.max(this.ydisp-e,0),this.savedY=Math.max(this.savedY-e,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),a&&(this.y+=a),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let t=0;t<this.lines.length;t++)r+=+this.lines.get(t).resize(e,n);if(this._cols=e,this._rows=t,this.lines.length>0){let e=Math.max(0,this.lines.length-this.ybase-1);this.y=Math.min(this.y,e)}this._memoryCleanupQueue.clear(),r>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend===`conpty`&&e.buildNumber>=21376:this._hasScrollback}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=hl(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(ll),n);if(r.length>0){let n=gl(this.lines,r);_l(this.lines,n.layout),this._reflowLargerAdjustViewport(e,t,n.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){let r=this.getNullCell(ll),i=n;for(;i-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new pl(this._stringCache,e,r,!1))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-n,0)}_reflowSmaller(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=this.getNullCell(ll),i=[],a=0;for(let o=this.lines.length-1;o>=0;o--){let s=this.lines.get(o);if(!s||!s.isWrapped&&s.getTrimmedLength()<=e)continue;let c=[s];for(;s.isWrapped&&o>0;)s=this.lines.get(--o),c.unshift(s);if(!n){let e=this.ybase+this.y;if(e>=o&&e<o+c.length)continue}let l=c[c.length-1].getTrimmedLength(),u=vl(c,this._cols,e),d=u.length-c.length,f;f=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+d):Math.max(0,this.lines.length-this.lines.maxLength+d);let p=[];for(let e=0;e<d;e++){let e=this.getBlankLine(ll,!0);p.push(e)}p.length>0&&(i.push({start:o+c.length+a,newLines:p}),a+=p.length),c.push(...p);let m=u.length-1,h=u[m];h===0&&(m--,h=u[m]);let g=c.length-d-1,_=l;for(;g>=0;){let e=Math.min(_,h);if(c[m]===void 0)break;c[m].copyCellsFrom(c[g],_-e,h-e,e,!0),h-=e,h===0&&(m--,h=u[m]),_-=e,_===0&&(g--,_=yl(c,Math.max(g,0),this._cols))}for(let t=0;t<c.length;t++)u[t]<e&&c[t].setCell(u[t],r);let v=d-f;for(;v-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+a)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+d,this.ybase+t-1)}if(i.length>0){let e=[],t=[];for(let e=0;e<this.lines.length;e++)t.push(this.lines.get(e));let n=this.lines.length,r=n-1,o=0,s=i[o];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+a);let c=0;for(let l=Math.min(this.lines.maxLength-1,n+a-1);l>=0;l--)if(s&&s.start>r+c){for(let e=s.newLines.length-1;e>=0;e--)this.lines.set(l--,s.newLines[e]);l++,e.push({index:r+1,amount:s.newLines.length}),c+=s.newLines.length,s=i[++o]}else this.lines.set(l,t[r--]);let l=0;for(let t=e.length-1;t>=0;t--)e[t].index+=l,this.lines.onInsertEmitter.fire(e[t]),l+=e[t].amount;let u=Math.max(0,n+a-this.lines.maxLength);u>0&&this.lines.onTrimEmitter.fire(u)}}translateBufferLineToString(e,t,n=0,r){let i=this.lines.get(e);return i?i.translateToString(t,n,r):``}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+1<this.lines.length&&this.lines.get(n+1).isWrapped;)n++;return{first:t,last:n}}setupTabStops(e){for(e==null?(this.tabs={},e=0):this.tabs[e]||(e=this.prevStop(e));e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e??=this.x;!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e??=this.x;!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new xl(e);return this.markers.push(t),t.register(this.lines.onTrim(e=>{t.line-=e,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(e=>{t.line>=e.index&&(t.line+=e.amount)})),t.register(this.lines.onDelete(e=>{t.line>=e.index&&t.line<e.index+e.amount&&t.dispose(),t.line>e.index&&(t.line-=e.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},El=class extends to{constructor(e,t,n){super(),this._optionsService=e,this._bufferService=t,this._logService=n,this._normalBuffer=this._register(new no),this._altBuffer=this._register(new no),this._onBufferActivate=this._register(new J),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 Tl(!0,this._optionsService,this._bufferService,this._logService),this._normalBuffer.value=this._normal,this._normal.fillViewportRows(),this._alt=new Tl(!1,this._optionsService,this._bufferService,this._logService),this._altBuffer.value=this._alt,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(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),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(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},Dl=class extends to{constructor(e,t){super(),this.isUserScrolling=!1,this._onResize=this._register(new J),this.onResize=this._onResize.event,this._onScroll=this._register(new J),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,2),this.rows=Math.max(e.rawOptions.rows||0,1),this.buffers=this._register(new El(e,this,t)),this._register(this.buffers.onBufferActivate(e=>{this._onScroll.fire(e.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let n=this.cols!==e,r=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:n,rowsChanged:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let n=this.buffer,r;r=this._cachedBlankLine,(!r||r.length!==this.cols||r.getFg(0)!==e.fg||r.getBg(0)!==e.bg)&&(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;let i=n.ybase+n.scrollTop,a=n.ybase+n.scrollBottom;if(n.scrollTop===0){let e=n.lines.isFull;a===n.lines.length-1?e?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(a+1,0,r.clone()),e?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{let e=a-i+1;n.lines.shiftElements(i+1,e-1,-1),n.lines.set(a,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t){let n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);let r=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),r!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))}};Dl=sa([q(0,Ia),q(1,Fa)],Dl);var Ol={cols:80,rows:24,showCursorImmediately:!1,cursorBlink:!1,blinkIntervalDuration:0,cursorStyle:`block`,cursorWidth:1,cursorInactiveStyle:`outline`,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollSensitivity:5,fontFamily:`monospace`,fontSize:15,fontWeight:`normal`,fontWeightBold:`bold`,ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:`info`,logger:null,scrollback:1e3,scrollbar:{showScrollbar:!0},scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,mouseEventsRequireAlt:!1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Mo,windowOptions:{},windowsPty:{},wordSeparator:` ()[]{}',"\``,altClickMovesCursor:!0,convertEol:!1,termName:`xterm`,quirks:{},vtExtensions:{}},kl=[`normal`,`bold`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`],Al=class extends to{constructor(e){super(),this._onOptionChange=this._register(new J),this.onOptionChange=this._onOptionChange.event;let t={...Ol};for(let n in e)if(n in t)try{let r=e[n];t[n]=this._sanitizeAndValidateOption(n,r)}catch(e){console.error(e)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Qa(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(n=>{n===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(n=>{e.indexOf(n)!==-1&&t()})}_setupOptions(){let e=e=>{if(!(e in Ol))throw Error(`No option with key "${e}"`);return this.rawOptions[e]},t=(e,t)=>{if(!(e in Ol))throw Error(`No option with key "${e}"`);t=this._sanitizeAndValidateOption(e,t),this.rawOptions[e]!==t&&(this.rawOptions[e]=t,this._onOptionChange.fire(e))};for(let n in this.rawOptions){let r={get:e.bind(this,n),set:t.bind(this,n)};Object.defineProperty(this.options,n,r)}}_sanitizeAndValidateOption(e,t){switch(e){case`cursorStyle`:if(t||=Ol[e],!jl(t))throw Error(`"${t}" is not a valid value for ${e}`);break;case`wordSeparator`:t||=Ol[e];break;case`fontWeight`:case`fontWeightBold`:if(typeof t==`number`&&1<=t&&t<=1e3)break;t=kl.includes(t)?t:Ol[e];break;case`blinkIntervalDuration`:if(t=Math.floor(t),t<0)throw Error(`${e} cannot be less than 0, value: ${t}`);break;case`cursorWidth`:t=Math.floor(t);case`lineHeight`:case`tabStopWidth`:if(t<1)throw Error(`${e} cannot be less than 1, value: ${t}`);break;case`minimumContrastRatio`:t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case`scrollback`:if(t=Math.min(t,4294967295),t<0)throw Error(`${e} cannot be less than 0, value: ${t}`);break;case`fastScrollSensitivity`:case`scrollSensitivity`:if(t<=0)throw Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case`rows`:case`cols`:if(!t&&t!==0)throw Error(`${e} must be numeric, value: ${t}`);break;case`windowsPty`:t??={};break}return t}};function jl(e){return e===`block`||e===`underline`||e===`bar`}var Ml=Object.freeze({insertMode:!1}),Nl=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,colorSchemeUpdates:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,win32InputMode:!1,wraparound:!0}),Pl=()=>({flags:0,mainFlags:0,altFlags:0,mainStack:[],altStack:[]}),Fl=class extends to{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorHidden=!1,this._onData=this._register(new J),this.onData=this._onData.event,this._onUserInput=this._register(new J),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new J),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new J),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.isCursorInitialized=n.rawOptions.showCursorImmediately??!1,this.modes=structuredClone(Ml),this.decPrivateModes=structuredClone(Nl),this.kittyKeyboard=Pl()}reset(){this.modes=structuredClone(Ml),this.decPrivateModes=structuredClone(Nl),this.kittyKeyboard=Pl()}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace(`sending data (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace(`sending binary (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onBinary.fire(e))}};Fl=sa([q(0,Aa),q(1,Fa),q(2,Ia)],Fl);var Il={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function Ll(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(n|=64,n|=e.action):(n|=e.button&3,e.button&4&&(n|=64),e.button&8&&(n|=128),e.action===32?n|=32:e.action===0&&!t&&(n|=3)),n}var Rl=String.fromCharCode,zl={DEFAULT:e=>{let t=[Ll(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?``:`\x1B[M${Rl(t[0])}${Rl(t[1])}${Rl(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${Ll(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${Ll(e,!0)};${e.x};${e.y}${t}`}},Bl=class extends to{constructor(){super(),this._protocols={},this._encodings={},this._activeProtocol=``,this._activeEncoding=``,this._onProtocolChange=this._register(new J),this.onProtocolChange=this._onProtocolChange.event;for(let e of Object.keys(Il))this.addProtocol(e,Il[e]);for(let e of Object.keys(zl))this.addEncoding(e,zl[e]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol=`NONE`,this.activeEncoding=`DEFAULT`}setCustomWheelEventHandler(e){this._customWheelEventHandler=e}allowCustomWheelEvent(e){return this._customWheelEventHandler?this._customWheelEventHandler(e)!==!1:!0}restrictMouseEvent(e){return this._protocols[this._activeProtocol].restrict(e)}encodeMouseEvent(e){return this._encodings[this._activeEncoding](e)}get isDefaultEncoding(){return this._activeEncoding===`DEFAULT`}get isPixelEncoding(){return this._activeEncoding===`SGR_PIXELS`}},Vl=class e{constructor(){this._providers=Object.create(null),this._active=``,this._onChange=new J,this.onChange=this._onChange.event}static extractShouldJoin(e){return(e&1)!=0}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t,n=!1){return(e&16777215)<<3|(t&3)<<1|!!n}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e,this._active||(this.activeVersion=e.version)}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let a=0;a<i;++a){let o=t.charCodeAt(a);if(55296<=o&&o<=56319){if(++a>=i)return n+this.wcwidth(o);let e=t.charCodeAt(a);56320<=e&&e<=57343?o=(o-55296)*1024+e-56320+65536:n+=this.wcwidth(e)}let s=this.charProperties(o,r),c=e.extractWidth(s);e.extractShouldJoin(s)&&(c-=e.extractWidth(r)),n+=c,r=s}return n}charProperties(e,t){return this._activeProvider.charProperties(e,t)}},Hl=[[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]],Ul=[[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]],Wl;function Gl(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var Kl=class{constructor(){if(this.version=`6`,!Wl){Wl=new Uint8Array(65536),Wl.fill(1),Wl[0]=0,Wl.fill(0,1,32),Wl.fill(0,127,160),Wl.fill(2,4352,4448),Wl[9001]=2,Wl[9002]=2,Wl.fill(2,11904,42192),Wl[12351]=1,Wl.fill(2,44032,55204),Wl.fill(2,63744,64256),Wl.fill(2,65040,65050),Wl.fill(2,65072,65136),Wl.fill(2,65280,65377),Wl.fill(2,65504,65511);for(let e=0;e<Hl.length;++e)Wl.fill(0,Hl[e][0],Hl[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Wl[e]:Gl(e,Ul)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=Vl.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return Vl.createPropertyValue(0,n,r)}},ql=class{constructor(){this.glevel=0,this._charsets=[]}get charsets(){return this._charsets}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function Jl(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&t&&(n.isWrapped=t[3]!==0&&t[3]!==32)}var Yl=class e{constructor(e=32,t=32){if(this.maxLength=e,this.maxSubParamsLength=t,t>256)throw Error(`maxSubParamsLength must not be greater than 256`);this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let n=new e;if(!t.length)return n;for(let e=+!!Array.isArray(t[0]);e<t.length;++e){let r=t[e];if(Array.isArray(r))for(let e=0;e<r.length;++e)n.addSubParam(r[e]);else n.addParam(r)}return n}clone(){let t=new e(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let e=[];for(let t=0;t<this.length;++t){e.push(this.params[t]);let n=this._subParamsIdx[t]>>8,r=this._subParamsIdx[t]&255;r-n>0&&e.push(Array.prototype.slice.call(this._subParams,n,r))}return e}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}resetZdm(){this.length=1,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1,this._subParamsIdx[0]=0,this.params[0]=0}addParam(e){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(e<-1)throw Error(`values less than -1 are not allowed`);this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>2147483647?2147483647:e}addSubParam(e){if(this._digitIsSub=!0,this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(e<-1)throw Error(`values less than -1 are not allowed`);this._subParams[this._subParamsLength++]=e>2147483647?2147483647:e,this._subParamsIdx[this.length-1]++}}hasSubParams(e){return(this._subParamsIdx[e]&255)-(this._subParamsIdx[e]>>8)>0}getSubParams(e){let t=this._subParamsIdx[e]>>8,n=this._subParamsIdx[e]&255;return n-t>0?this._subParams.subarray(t,n):null}getSubParamsAll(){let e={};for(let t=0;t<this.length;++t){let n=this._subParamsIdx[t]>>8,r=this._subParamsIdx[t]&255;r-n>0&&(e[t]=this._subParams.slice(n,r))}return e}addDigit(e){let t;if(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,r=n[t-1];n[t-1]=~r?Math.min(r*10+e,2147483647):e}},Xl=[],Zl=class{constructor(){this._state=0,this._active=Xl,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]??=[];let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Xl}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Xl,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Xl,!this._active.length)this._handlerFb(this._id,`START`);else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,n){if(!this._active.length)this._handlerFb(this._id,`PUT`,ba(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}start(){this.reset(),this._state=1}put(e,t,n){if(this._state!==3){if(this._state===1)for(;t<n;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&n-t>0&&this._put(e,t,n)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,`END`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].end(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=Xl,this._id=-1,this._state=0}}},Ql=class e{constructor(t){this._handler=t,this._data=new cl(e._payloadLimit),this._hitLimit=!1}start(){this._data.reset(),this._hitLimit=!1}put(e,t,n){this._hitLimit||this._data.append(ba(e,t,n))&&(this._hitLimit=!0)}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data.toString()),t instanceof Promise))return t.then(e=>(this._data.reset(),this._hitLimit=!1,e));return this._data.reset(),this._hitLimit=!1,t}};Ql._payloadLimit=1e7;var $l=Ql,eu=[],tu=class{constructor(){this._handlers=Object.create(null),this._active=eu,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=eu}registerHandler(e,t){this._handlers[e]??=[];let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=eu,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||eu,!this._active.length)this._handlerFb(this._ident,`HOOK`,t);else for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(t)}put(e,t,n){if(!this._active.length)this._handlerFb(this._ident,`PUT`,ba(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,`UNHOOK`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].unhook(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=eu,this._ident=0}},nu=new Yl;nu.addParam(0);var ru=class e{constructor(t){this._handler=t,this._data=new cl(e._payloadLimit),this._params=nu,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():nu,this._data.reset(),this._hitLimit=!1}put(e,t,n){this._hitLimit||this._data.append(ba(e,t,n))&&(this._hitLimit=!0)}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data.toString(),this._params),t instanceof Promise))return t.then(e=>(this._params=nu,this._data.reset(),this._hitLimit=!1,e));return this._params=nu,this._data.reset(),this._hitLimit=!1,t}};ru._payloadLimit=1e7;var iu=ru,au=[],ou=class{constructor(){this._handlers=Object.create(null),this._active=au,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]??=[];let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=au}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=au,this._ident=0}start(e){if(this.reset(),this._ident=e,this._active=this._handlers[e]||au,!this._active.length)this._handlerFb(this._ident,`START`);else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}put(e,t,n){if(!this._active.length)this._handlerFb(this._ident,`PUT`,ba(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}end(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,`END`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].end(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=au,this._ident=0}},su=class e{constructor(t){this._handler=t,this._data=new cl(e._payloadLimit),this._hitLimit=!1}start(){this._data.reset(),this._hitLimit=!1}put(e,t,n){this._hitLimit||this._data.append(ba(e,t,n))&&(this._hitLimit=!0)}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data.toString()),t instanceof Promise))return t.then(e=>(this._data.reset(),this._hitLimit=!1,e));return this._data.reset(),this._hitLimit=!1,t}};su._payloadLimit=1e7;var cu=su,lu=class{constructor(e){this.table=new Uint16Array(e)}setDefault(e,t){this.table.fill(e<<8|t)}add(e,t,n,r){this.table[t<<8|e]=n<<8|r}addMany(e,t,n,r){for(let i=0;i<e.length;i++)this.table[t<<8|e[i]]=n<<8|r}},uu=160,du=(function(){let e=new lu(4257),t=Array.apply(null,Array(256)).map((e,t)=>t),n=(e,n)=>t.slice(e,n),r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));let a=n(0,17);e.setDefault(1,0),e.addMany(r,0,2,0);for(let t of a)e.addMany([24,26,153,154],t,3,0),e.addMany(n(128,144),t,3,0),e.addMany(n(144,152),t,3,0),e.add(156,t,0,0),e.add(27,t,11,1),e.add(157,t,4,8),e.addMany([152,158],t,0,7),e.add(159,t,11,14),e.add(155,t,11,3),e.add(144,t,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(95,1,11,14),e.addMany(i,14,0,14),e.add(127,14,0,14),e.addMany(n(32,48),14,9,15),e.addMany(n(48,127),14,15,16),e.addMany(n(48,127),15,15,16),e.addMany(i,15,0,15),e.addMany(n(32,48),15,9,15),e.add(127,15,0,15),e.addMany(r,16,16,16),e.addMany(i,16,0,16),e.addMany(n(8,14),16,16,16),e.add(127,16,0,16),e.addMany([27,156,24,26],16,17,0),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(uu,0,2,0),e.add(uu,8,5,8),e.add(uu,6,0,6),e.add(uu,11,0,11),e.add(uu,13,13,13),e.add(uu,16,16,16),e})(),fu=class extends to{constructor(e=du){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new Yl,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(e,t,n)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,t)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._executeHandlersArr=Array(24).fill(void 0),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Qa(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._executeHandlersArr=Array(24).fill(void 0),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new Zl),this._dcsParser=this._register(new tu),this._apcParser=this._register(new ou),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:`\\`},()=>!0)}_identifier(e,t=[64,126]){let n=0;if(e.prefix){if(e.prefix.length>1)throw Error(`only one byte as prefix supported`);if(n=e.prefix.charCodeAt(0),n<60||n>63)throw Error(`prefix must be in range 0x3c .. 0x3f`)}if(e.intermediates){if(e.intermediates.length>2)throw Error(`only two bytes as intermediates are supported`);for(let t=0;t<e.intermediates.length;++t){let r=e.intermediates.charCodeAt(t);if(32>r||r>47)throw Error(`intermediate must be in range 0x20 .. 0x2f`);n<<=8,n|=r}}if(e.final.length!==1)throw Error(`final must be a single byte`);let r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw Error(`final must be in range ${t[0]} .. ${t[1]}`);return n<<=8,n|=r,n}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join(``)}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let n=this._identifier(e,[48,126]);this._escHandlers[n]??=[];let r=this._escHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){let n=e.charCodeAt(0);this._executeHandlers[n]=t,n<24&&(this._executeHandlersArr[n]=t)}clearExecuteHandler(e){let t=e.charCodeAt(0);this._executeHandlers[t]&&delete this._executeHandlers[t],t<24&&(this._executeHandlersArr[t]=void 0)}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let n=this._identifier(e);this._csiHandlers[n]??=[];let r=this._csiHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}registerApcHandler(e,t){return e.prefix=void 0,this._apcParser.registerHandler(this._identifier(e,[48,126]),t)}clearApcHandler(e){e.prefix=void 0,this._apcParser.clearHandler(this._identifier(e,[48,126]))}setApcHandlerFallback(e){this._apcParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._apcParser.reset(),this._params.resetZdm(),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,r,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=r,this._parseStack.chunkPos=i}parse(e,t,n){let r,i,a=0,o;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,a=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,Error(`improper continuation due to previous async handler, giving up parsing`);let t=this._parseStack.handlers,i=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](this._params),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 4:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],o=this._dcsParser.unhook(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.resetZdm(),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],o=this._oscParser.end(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.resetZdm(),this._collect=0;break;case 7:if(r=e[this._parseStack.chunkPos],o=this._apcParser.end(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.resetZdm(),this._collect=0;break}this._parseStack.state=0,a=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&255}for(let n=a;n<t;++n){if(r=e[n],r<24&&this.currentState<=6){(this._executeHandlersArr[r]??this._executeHandlerFb)(r),this.precedingJoinState=0;continue}if(r===27&&this.currentState<8&&n+2<t&&e[n+1]===91){this._params.resetZdm(),this._collect=0;let r=n+2,a=e[r];a>=60&&a<=63&&(this._collect=a,r++);let s=!1;for(;r<t;r++)if(a=e[r],a>=48&&a<=57)this._params.addDigit(a-48);else if(a===59)this._params.addParam(0);else if(a===58)this._params.addSubParam(-1);else if(a>=64&&a<=126){let e=this._csiHandlers[this._collect<<8|a],t=e?e.length-1:-1;for(;t>=0&&(o=e[t](this._params),o!==!0);t--)if(o instanceof Promise)return i=1792,this._preserveStack(3,e,t,i,r),o;t<0&&this._csiHandlerFb(this._collect<<8|a,this._params),this.precedingJoinState=0,n=r,this.currentState=0,s=!0;break}else break;s||(n=r-1,this.currentState=4);continue}switch(i=this._transitions.table[this.currentState<<8|(r<uu?r:uu)],i>>8){case 2:let a=n,s=t-4;for(;a<s&&e[++a]>=32&&(e[a]<=126||e[a]>=uu)&&e[++a]>=32&&(e[a]<=126||e[a]>=uu)&&e[++a]>=32&&(e[a]<=126||e[a]>=uu)&&e[++a]>=32&&(e[a]<=126||e[a]>=uu););if(a>=s)for(;a<t&&e[a]>=32&&(e[a]<=126||e[a]>=uu);)a++;this._printHandler(e,n,a),n=a-1;break;case 3:this._executeHandlers[r]?this._executeHandlers[r]():this._executeHandlerFb(r),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:n,code:r,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let c=this._csiHandlers[this._collect<<8|r],l=c?c.length-1:-1;for(;l>=0&&(o=c[l](this._params),o!==!0);l--)if(o instanceof Promise)return this._preserveStack(3,c,l,i,n),o;l<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingJoinState=0;break;case 8:do switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}while(++n<t&&(r=e[n])>47&&r<60);n--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:let u=this._escHandlers[this._collect<<8|r],d=u?u.length-1:-1;for(;d>=0&&(o=u[d](),o!==!0);d--)if(o instanceof Promise)return this._preserveStack(4,u,d,i,n),o;d<0&&this._escHandlerFb(this._collect<<8|r),this.precedingJoinState=0;break;case 11:this._params.resetZdm(),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let i=n+1;;++i)if(i>=t||(r=e[i])===24||r===26||r===27||r>127&&r<uu){this._dcsParser.put(e,n,i),n=i-1;break}break;case 14:if(o=this._dcsParser.unhook(r!==24&&r!==26),o)return this._preserveStack(6,[],0,i,n),o;r===27&&(i|=1),this._params.resetZdm(),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let i=n+1;;i++)if(i>=t||(r=e[i])<32||r>127&&r<uu){this._oscParser.put(e,n,i),n=i-1;break}break;case 6:if(o=this._oscParser.end(r!==24&&r!==26),o)return this._preserveStack(5,[],0,i,n),o;r===27&&(i|=1),this._params.resetZdm(),this._collect=0,this.precedingJoinState=0;break;case 15:this._apcParser.start(this._collect<<8|r);break;case 16:for(let r=n+1;;++r)if(!(r<t&&(e[r]>=32&&e[r]<127||e[r]>=8&&e[r]<14||e[r]>=uu))){this._apcParser.put(e,n,r),n=r-1;break}break;case 17:if(o=this._apcParser.end(r!==24&&r!==26),o)return this._preserveStack(7,[],0,i,n),o;r===27&&(i|=1),this._params.resetZdm(),this._collect=0,this.precedingJoinState=0;break}this.currentState=i&255}}},pu=/^([\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})$/,mu=/^[\da-f]+$/;function hu(e){if(!e)return;let t=e.toLowerCase();if(t.startsWith(`rgb:`)){t=t.slice(4);let e=pu.exec(t);if(e){let t=e[1]?15:e[4]?255:e[7]?4095:65535;return[Math.round(parseInt(e[1]||e[4]||e[7]||e[10],16)/t*255),Math.round(parseInt(e[2]||e[5]||e[8]||e[11],16)/t*255),Math.round(parseInt(e[3]||e[6]||e[9]||e[12],16)/t*255)]}}else if(t.startsWith(`#`)&&(t=t.slice(1),mu.exec(t)&&[3,6,9,12].includes(t.length))){let e=t.length/3,n=[0,0,0];for(let r=0;r<3;++r){let i=parseInt(t.slice(e*r,e*r+e),16);n[r]=e===1?i<<4:e===2?i:e===3?i>>4:i>>8}return n}}function gu(e,t){let n=e.toString(16),r=n.length<2?`0`+n:n;switch(t){case 4:return n[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}function _u(e,t=16){let[n,r,i]=e;return`rgb:${gu(n,t)}/${gu(r,t)}/${gu(i,t)}`}var vu=`6.1.0-beta.285`,yu={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function bu(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var xu=0,Su=class extends to{constructor(e,t,n,r,i,a,o,s,c=new fu){super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=r,this._optionsService=i,this._oscLinkService=a,this._mouseStateService=o,this._unicodeService=s,this._parser=c,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new xa,this._utf8Decoder=new Sa,this._windowTitle=``,this._iconName=``,this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=ll.clone(),this._eraseAttrDataInternal=ll.clone(),this._onRequestBell=this._register(new J),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new J),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new J),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new J),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new J),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new J),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new J),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new J),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new J),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new J),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new J),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new J),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new J),this.onColor=this._onColor.event,this._onRequestColorSchemeQuery=this._register(new J),this.onRequestColorSchemeQuery=this._onRequestColorSchemeQuery.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 Cu(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(e=>this._activeBuffer=e.activeBuffer)),this._parser.setCsiHandlerFallback((e,t)=>{this._logService.debug(`Unknown CSI code: `,{identifier:this._parser.identToString(e),params:t.toArray()})}),this._parser.setEscHandlerFallback(e=>{this._logService.debug(`Unknown ESC code: `,{identifier:this._parser.identToString(e)})}),this._parser.setExecuteHandlerFallback(e=>{this._logService.debug(`Unknown EXECUTE code: `,{code:e})}),this._parser.setOscHandlerFallback((e,t,n)=>{this._logService.debug(`Unknown OSC code: `,{identifier:e,action:t,data:n})}),this._parser.setDcsHandlerFallback((e,t,n)=>{t===`HOOK`&&(n=n.toArray()),this._logService.debug(`Unknown DCS code: `,{identifier:this._parser.identToString(e),action:t,payload:n})}),this._parser.setApcHandlerFallback((e,t,n)=>{this._logService.debug(`Unknown APC code: `,{identifier:this._parser.identToString(e),action:t,payload:n})}),this._parser.setPrintHandler((e,t,n)=>this.print(e,t,n)),this._parser.registerCsiHandler({final:`@`},e=>this.insertChars(e)),this._parser.registerCsiHandler({intermediates:` `,final:`@`},e=>this.scrollLeft(e)),this._parser.registerCsiHandler({final:`A`},e=>this.cursorUp(e)),this._parser.registerCsiHandler({intermediates:` `,final:`A`},e=>this.scrollRight(e)),this._parser.registerCsiHandler({final:`B`},e=>this.cursorDown(e)),this._parser.registerCsiHandler({final:`C`},e=>this.cursorForward(e)),this._parser.registerCsiHandler({final:`D`},e=>this.cursorBackward(e)),this._parser.registerCsiHandler({final:`E`},e=>this.cursorNextLine(e)),this._parser.registerCsiHandler({final:`F`},e=>this.cursorPrecedingLine(e)),this._parser.registerCsiHandler({final:`G`},e=>this.cursorCharAbsolute(e)),this._parser.registerCsiHandler({final:`H`},e=>this.cursorPosition(e)),this._parser.registerCsiHandler({final:`I`},e=>this.cursorForwardTab(e)),this._parser.registerCsiHandler({final:`J`},e=>this.eraseInDisplay(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`J`},e=>this.eraseInDisplay(e,!0)),this._parser.registerCsiHandler({final:`K`},e=>this.eraseInLine(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`K`},e=>this.eraseInLine(e,!0)),this._parser.registerCsiHandler({final:`L`},e=>this.insertLines(e)),this._parser.registerCsiHandler({final:`M`},e=>this.deleteLines(e)),this._parser.registerCsiHandler({final:`P`},e=>this.deleteChars(e)),this._parser.registerCsiHandler({final:`S`},e=>this.scrollUp(e)),this._parser.registerCsiHandler({final:`T`},e=>this.scrollDown(e)),this._parser.registerCsiHandler({final:`X`},e=>this.eraseChars(e)),this._parser.registerCsiHandler({final:`Z`},e=>this.cursorBackwardTab(e)),this._parser.registerCsiHandler({final:`^`},e=>this.scrollDown(e)),this._parser.registerCsiHandler({final:"`"},e=>this.charPosAbsolute(e)),this._parser.registerCsiHandler({final:`a`},e=>this.hPositionRelative(e)),this._parser.registerCsiHandler({final:`b`},e=>this.repeatPrecedingCharacter(e)),this._parser.registerCsiHandler({final:`c`},e=>this.sendDeviceAttributesPrimary(e)),this._parser.registerCsiHandler({prefix:`>`,final:`c`},e=>this.sendDeviceAttributesSecondary(e)),this._parser.registerCsiHandler({final:`d`},e=>this.linePosAbsolute(e)),this._parser.registerCsiHandler({final:`e`},e=>this.vPositionRelative(e)),this._parser.registerCsiHandler({final:`f`},e=>this.hVPosition(e)),this._parser.registerCsiHandler({final:`g`},e=>this.tabClear(e)),this._parser.registerCsiHandler({final:`h`},e=>this.setMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`h`},e=>this.setModePrivate(e)),this._parser.registerCsiHandler({final:`l`},e=>this.resetMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`l`},e=>this.resetModePrivate(e)),this._parser.registerCsiHandler({final:`m`},e=>this.charAttributes(e)),this._parser.registerCsiHandler({final:`n`},e=>this.deviceStatus(e)),this._parser.registerCsiHandler({prefix:`?`,final:`n`},e=>this.deviceStatusPrivate(e)),this._parser.registerCsiHandler({intermediates:`!`,final:`p`},e=>this.softReset(e)),this._parser.registerCsiHandler({prefix:`>`,final:`q`},e=>this.sendXtVersion(e)),this._parser.registerCsiHandler({intermediates:` `,final:`q`},e=>this.setCursorStyle(e)),this._parser.registerCsiHandler({final:`r`},e=>this.setScrollRegion(e)),this._parser.registerCsiHandler({final:`s`},e=>this.saveCursor(e)),this._parser.registerCsiHandler({final:`t`},e=>this.windowOptions(e)),this._parser.registerCsiHandler({final:`u`},e=>this.restoreCursor(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`}`},e=>this.insertColumns(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`~`},e=>this.deleteColumns(e)),this._parser.registerCsiHandler({intermediates:`"`,final:`q`},e=>this.selectProtected(e)),this._parser.registerCsiHandler({intermediates:`$`,final:`p`},e=>this.requestMode(e,!0)),this._parser.registerCsiHandler({prefix:`?`,intermediates:`$`,final:`p`},e=>this.requestMode(e,!1)),this._parser.registerCsiHandler({prefix:`=`,final:`u`},e=>this.kittyKeyboardSet(e)),this._parser.registerCsiHandler({prefix:`?`,final:`u`},e=>this.kittyKeyboardQuery(e)),this._parser.registerCsiHandler({prefix:`>`,final:`u`},e=>this.kittyKeyboardPush(e)),this._parser.registerCsiHandler({prefix:`<`,final:`u`},e=>this.kittyKeyboardPop(e)),this._parser.setExecuteHandler(`\x07`,()=>this.bell()),this._parser.setExecuteHandler(`
72
+ `,()=>this.lineFeed()),this._parser.setExecuteHandler(`\v`,()=>this.lineFeed()),this._parser.setExecuteHandler(`\f`,()=>this.lineFeed()),this._parser.setExecuteHandler(`\r`,()=>this.carriageReturn()),this._parser.setExecuteHandler(`\b`,()=>this.backspace()),this._parser.setExecuteHandler(` `,()=>this.tab()),this._parser.setExecuteHandler(``,()=>this.shiftOut()),this._parser.setExecuteHandler(``,()=>this.shiftIn()),this._parser.setExecuteHandler(`„`,()=>this.index()),this._parser.setExecuteHandler(`…`,()=>this.nextLine()),this._parser.setExecuteHandler(`ˆ`,()=>this.tabSet()),this._parser.registerOscHandler(0,new $l(e=>(this.setTitle(e),this.setIconName(e),!0))),this._parser.registerOscHandler(1,new $l(e=>this.setIconName(e))),this._parser.registerOscHandler(2,new $l(e=>this.setTitle(e))),this._parser.registerOscHandler(4,new $l(e=>this.setOrReportIndexedColor(e))),this._parser.registerOscHandler(8,new $l(e=>this.setHyperlink(e))),this._parser.registerOscHandler(10,new $l(e=>this.setOrReportFgColor(e))),this._parser.registerOscHandler(11,new $l(e=>this.setOrReportBgColor(e))),this._parser.registerOscHandler(12,new $l(e=>this.setOrReportCursorColor(e))),this._parser.registerOscHandler(104,new $l(e=>this.restoreIndexedColor(e))),this._parser.registerOscHandler(110,new $l(e=>this.restoreFgColor(e))),this._parser.registerOscHandler(111,new $l(e=>this.restoreBgColor(e))),this._parser.registerOscHandler(112,new $l(e=>this.restoreCursorColor(e))),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(let e in Sl)this._parser.registerEscHandler({intermediates:`(`,final:e},()=>this.selectCharset(`(`+e)),this._parser.registerEscHandler({intermediates:`)`,final:e},()=>this.selectCharset(`)`+e)),this._parser.registerEscHandler({intermediates:`*`,final:e},()=>this.selectCharset(`*`+e)),this._parser.registerEscHandler({intermediates:`+`,final:e},()=>this.selectCharset(`+`+e)),this._parser.registerEscHandler({intermediates:`-`,final:e},()=>this.selectCharset(`-`+e)),this._parser.registerEscHandler({intermediates:`.`,final:e},()=>this.selectCharset(`.`+e)),this._parser.registerEscHandler({intermediates:`/`,final:e},()=>this.selectCharset(`/`+e));this._parser.registerEscHandler({intermediates:`#`,final:`8`},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(e=>(this._logService.error(`Parsing error: `,e),e)),this._parser.registerDcsHandler({intermediates:`$`,final:`q`},new iu((e,t)=>this.requestStatusString(e,t)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,n,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=r}_logSlowResolvingAsync(e){if(this._logService.logLevel<=3){let t,n=new Promise((e,n)=>{t=setTimeout(()=>n(`#SLOW_TIMEOUT`),5e3)});Promise.race([e,n]).then(()=>{t!==void 0&&clearTimeout(t)},e=>{if(t!==void 0&&clearTimeout(t),e!==`#SLOW_TIMEOUT`)throw e;console.warn(`async parser handler taking longer than 5000 ms`)})}}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,r=this._activeBuffer.x,i=this._activeBuffer.y,a=0,o=this._parseStack.paused;if(o){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;r=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>131072&&(a=this._parseStack.position+131072)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e==`string`?` "${e}"`:` "${Array.prototype.map.call(e,e=>String.fromCharCode(e)).join(``)}"`}`),this._logService.logLevel===0&&this._logService.trace(`parsing data (codes)`,typeof e==`string`?e.split(``).map(e=>e.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(e.length,131072))),o||this._dirtyRowTracker.clearRange(),e.length>131072)for(let t=a;t<e.length;t+=131072){let a=t+131072<e.length?t+131072:e.length,o=typeof e==`string`?this._stringDecoder.decode(e.substring(t,a),this._parseBuffer):this._utf8Decoder.decode(e.subarray(t,a),this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,o))return this._preserveStack(r,i,o,t),this._logSlowResolvingAsync(n),n}else if(!o){let t=typeof e==`string`?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,t))return this._preserveStack(r,i,t,0),this._logSlowResolvingAsync(n),n}(this._activeBuffer.x!==r||this._activeBuffer.y!==i)&&this._onCursorMove.fire();let s=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),c=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);c<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(c,this._bufferService.rows-1),end:Math.min(s,this._bufferService.rows-1)})}print(e,t,n){let r,i,a=this._charsetService.charset,o=this._optionsService.rawOptions.screenReaderMode,s=this._bufferService.cols,c=this._coreService.decPrivateModes.wraparound,l=this._coreService.modes.insertMode,u=this._curAttrData,d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);if(!d)return;this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&n-t>0&&d.getWidth(this._activeBuffer.x-1)===2&&d.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let f=this._parser.precedingJoinState;for(let p=t;p<n;++p){if(r=e[p],r===173)continue;if(r<127&&a){let e=a[String.fromCharCode(r)];e&&(r=e.charCodeAt(0))}let t=this._unicodeService.charProperties(r,f);i=Vl.extractWidth(t);let n=Vl.extractShouldJoin(t),m=n?Vl.extractWidth(f):0;f=t,o&&this._onA11yChar.fire(ya(r));let h=this._getCurrentLinkId();if(h&&this._oscLinkService.addLineToLink(h,this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+i-m>s){if(c){let e=d,t=this._activeBuffer.x-m;if(this._activeBuffer.x=m,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),d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),!d)return;for(m>0&&d instanceof pl&&d.copyCellsFrom(e,t,0,m,!1);t<s;)e.setCellFromCodepoint(t++,0,1,u)}else if(this._activeBuffer.x=s-1,i===2)continue}if(n&&this._activeBuffer.x){let e=d.getWidth(this._activeBuffer.x-1)?1:2;d.addCodepointToCell(this._activeBuffer.x-e,r,i);for(let e=i-m;--e>=0;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u);continue}if(l&&(d.insertCells(this._activeBuffer.x,i-m,this._activeBuffer.getNullCell(u)),d.getWidth(s-1)===2&&d.setCellFromCodepoint(s-1,0,1,u)),d.setCellFromCodepoint(this._activeBuffer.x++,r,i,u),i>0)for(;--i;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=f,this._activeBuffer.x<s&&n-t>0&&d.getWidth(this._activeBuffer.x)===0&&!d.hasContent(this._activeBuffer.x)&&d.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final===`t`&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,e=>bu(e.params[0],this._optionsService.rawOptions.windowOptions)?t(e):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new iu(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new $l(t))}registerApcHandler(e,t){return this._parser.registerApcHandler(e,new cu(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,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(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n,r=!1,i=!1){let a=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);a&&(a.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),i),r&&(a.isWrapped=!1))}_resetBufferLine(e,t=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let n;switch(e.params[0]){case 0:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);n<this._bufferService.rows;n++)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(n);break;case 1:if(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols){let e=this._activeBuffer.lines.get(n+1);e&&(e.isWrapped=!1)}for(;n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(n=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,n-1);n--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+n)?.getTrimmedLength(););for(;n>=0;n--)this._bufferService.scroll(this._eraseAttrData())}else{for(n=this._bufferService.rows,this._dirtyRowTracker.markDirty(n-1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let e=this._activeBuffer.lines.length-this._bufferService.rows;e>0&&(this._activeBuffer.lines.trimStart(e),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-e,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-e,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,i=this._bufferService.rows-1+this._activeBuffer.ybase-r+1;for(;t--;)this._activeBuffer.lines.splice(i-1,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r;for(r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-r;t--;)this._activeBuffer.lines.splice(n,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)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(e){let t=e.params[0]||1;for(;t--;)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(ll));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let n=e.params[0]||1,r=Vl.extractWidth(t),i=this._activeBuffer.x-r,a=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(i),o=new Uint32Array(a.length*n),s=0;for(let e=0;e<a.length;){let t=a.codePointAt(e)||0;o[s++]=t,e+=t>65535?2:1}let c=s;for(let e=1;e<n;++e)o.copyWithin(c,0,s),c+=s;return this.print(o,0,c),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is(`xterm`)||this._is(`rxvt-unicode`)||this._is(`screen`)?this._coreService.triggerDataEvent(`\x1B[?1;2c`):this._is(`linux`)&&this._coreService.triggerDataEvent(`\x1B[?6c`)),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is(`xterm`)?this._coreService.triggerDataEvent(`\x1B[>0;276;0c`):this._is(`rxvt-unicode`)?this._coreService.triggerDataEvent(`\x1B[>85;95;0c`):this._is(`linux`)?this._coreService.triggerDataEvent(e.params[0]+`c`):this._is(`screen`)&&this._coreService.triggerDataEvent(`\x1B[>83;40003;0c`)),!0}sendXtVersion(e){return e.params[0]>0||this._coreService.triggerDataEvent(`\x1BP>|xterm.js(${vu})\x1B\\`),!0}_is(e){return(this._optionsService.rawOptions.termName+``).startsWith(e)}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,Cl),this._charsetService.setgCharset(1,Cl),this._charsetService.setgCharset(2,Cl),this._charsetService.setgCharset(3,Cl);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.rawOptions.quirks?.allowSetCursorBlink&&(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._mouseStateService.activeProtocol=`X10`;break;case 1e3:this._mouseStateService.activeProtocol=`VT200`;break;case 1002:this._mouseStateService.activeProtocol=`DRAG`;break;case 1003:this._mouseStateService.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._mouseStateService.activeEncoding=`SGR`;break;case 1015:this._logService.debug(`DECSET 1015 not supported (see #2507)`);break;case 1016:this._mouseStateService.activeEncoding=`SGR_PIXELS`;break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:if(this._optionsService.rawOptions.vtExtensions?.kittyKeyboard){let e=this._coreService.kittyKeyboard;e.mainFlags=e.flags,e.flags=e.altFlags}this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break;case 2031:(this._optionsService.rawOptions.vtExtensions?.colorSchemeQuery??!0)&&(this._coreService.decPrivateModes.colorSchemeUpdates=!0);break;case 9001:this._optionsService.rawOptions.vtExtensions?.win32InputMode&&(this._coreService.decPrivateModes.win32InputMode=!0);break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){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.rawOptions.quirks?.allowSetCursorBlink&&(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._mouseStateService.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:this._mouseStateService.activeEncoding=`DEFAULT`;break;case 1015:this._logService.debug(`DECRST 1015 not supported (see #2507)`);break;case 1016:this._mouseStateService.activeEncoding=`DEFAULT`;break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:if(this._optionsService.rawOptions.vtExtensions?.kittyKeyboard){let e=this._coreService.kittyKeyboard;e.altFlags=e.flags,e.flags=e.mainFlags}this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break;case 2031:(this._optionsService.rawOptions.vtExtensions?.colorSchemeQuery??!0)&&(this._coreService.decPrivateModes.colorSchemeUpdates=!1);break;case 9001:this._optionsService.rawOptions.vtExtensions?.win32InputMode&&(this._coreService.decPrivateModes.win32InputMode=!1);break}return!0}requestMode(e,t){let n;(e=>(e[e.NOT_RECOGNIZED=0]=`NOT_RECOGNIZED`,e[e.SET=1]=`SET`,e[e.RESET=2]=`RESET`,e[e.PERMANENTLY_SET=3]=`PERMANENTLY_SET`,e[e.PERMANENTLY_RESET=4]=`PERMANENTLY_RESET`))(n||={});let r=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:a}=this._mouseStateService,o=this._coreService,{buffers:s,cols:c}=this._bufferService,{active:l,alt:u}=s,d=this._optionsService.rawOptions,f=(e,n)=>(o.triggerDataEvent(`\x1B[${t?``:`?`}${e};${n}$y`),!0),p=e=>e?1:2,m=e.params[0];return t?m===2?f(m,4):m===4?f(m,p(o.modes.insertMode)):m===12?f(m,3):m===20?f(m,p(d.convertEol)):f(m,0):m===1?f(m,p(r.applicationCursorKeys)):m===3?f(m,d.windowOptions.setWinLines?c===80?2:+(c===132):0):m===6?f(m,p(r.origin)):m===7?f(m,p(r.wraparound)):m===8?f(m,3):m===9?f(m,p(i===`X10`)):m===12?f(m,p(d.cursorBlink)):m===25?f(m,p(!o.isCursorHidden)):m===45?f(m,p(r.reverseWraparound)):m===66?f(m,p(r.applicationKeypad)):m===67?f(m,4):m===1e3?f(m,p(i===`VT200`)):m===1002?f(m,p(i===`DRAG`)):m===1003?f(m,p(i===`ANY`)):m===1004?f(m,p(r.sendFocus)):m===1005?f(m,4):m===1006?f(m,p(a===`SGR`)):m===1015?f(m,4):m===1016?f(m,p(a===`SGR_PIXELS`)):m===1048?f(m,1):m===47||m===1047||m===1049?f(m,p(l===u)):m===2004?f(m,p(r.bracketedPasteMode)):m===2026?f(m,p(r.synchronizedOutput)):m===9001&&this._optionsService.rawOptions.vtExtensions?.win32InputMode?f(m,p(r.win32InputMode)):f(m,0)}_updateAttrColor(e,t,n,r,i){return t===2?(e|=50331648,e&=-16777216,e|=Ca.fromColorRGB([n,r,i])):t===5&&(e&=-67108864,e|=33554432|n&255),e}_extractColor(e,t,n){let r=[0,0,-1,0,0,0],i=0,a=0;do{if(r[a+i]=e.params[t+a],e.hasSubParams(t+a)){let n=e.getSubParams(t+a),o=0;do r[1]===5&&(i=1),r[a+o+1+i]=n[o];while(++o<n.length&&o+a+1+i<r.length);break}if(r[1]===5&&a+i>=2||r[1]===2&&a+i>=5)break;r[1]&&(i=1)}while(++a+t<e.length&&a+i<r.length);for(let e=2;e<r.length;++e)r[e]===-1&&(r[e]=0);switch(r[0]){case 38:n.fg=this._updateAttrColor(n.fg,r[1],r[3],r[4],r[5]);break;case 48:n.bg=this._updateAttrColor(n.bg,r[1],r[3],r[4],r[5]);break;case 58:n.extended=n.extended.clone(),n.extended.underlineColor=this._updateAttrColor(n.extended.underlineColor,r[1],r[3],r[4],r[5])}return a}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=ll.fg,e.bg=ll.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,n,r=this._curAttrData;for(let i=0;i<t;i++)n=e.params[i],n>=30&&n<=37?(r.fg&=-67108864,r.fg|=16777216|n-30):n>=40&&n<=47?(r.bg&=-67108864,r.bg|=16777216|n-40):n>=90&&n<=97?(r.fg&=-67108864,r.fg|=n-90|16777224):n>=100&&n<=107?(r.bg&=-67108864,r.bg|=n-100|16777224):n===0?this._processSGR0(r):n===1?r.fg|=134217728:n===3?r.bg|=67108864:n===4?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):n===5?r.fg|=536870912:n===7?r.fg|=67108864:n===8?r.fg|=1073741824:n===9?r.fg|=2147483648:n===2?r.bg|=134217728:n===21?this._processUnderline(2,r):n===22?(r.fg&=-134217729,r.bg&=-134217729):n===23?r.bg&=-67108865:n===24?(r.fg&=-268435457,this._processUnderline(0,r)):n===25?r.fg&=-536870913:n===27?r.fg&=-67108865:n===28?r.fg&=-1073741825:n===29?r.fg&=2147483647:n===39?(r.fg&=-67108864,r.fg|=ll.fg&16777215):n===49?(r.bg&=-67108864,r.bg|=ll.bg&16777215):n===38||n===48||n===58?i+=this._extractColor(e,i,r):n===53?r.bg|=1073741824:n===55?r.bg&=-1073741825:n===221&&(this._optionsService.rawOptions.vtExtensions?.kittySgrBoldFaintControl??!0)?r.fg&=-134217729:n===222&&(this._optionsService.rawOptions.vtExtensions?.kittySgrBoldFaintControl??!0)?r.bg&=-134217729:n===59?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):this._logService.debug(`Unknown SGR attribute: %d.`,n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`\x1B[0n`);break;case 6:let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`\x1B[${e};${t}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`\x1B[?${e};${t}R`);break;case 15:break;case 25:break;case 26:break;case 53:break;case 996:(this._optionsService.rawOptions.vtExtensions?.colorSchemeQuery??!0)&&this._onRequestColorSchemeQuery.fire();break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=ll.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(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle=`block`;break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle=`underline`;break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle=`bar`;break}let e=t%2==1;this._coreService.decPrivateModes.cursorBlink=e}return!0}setScrollRegion(e){let t=e.params[0]||1,n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||n===0)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!bu(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`\x1B[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){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,this._activeBuffer.savedCharsets=this._charsetService.charsets.slice(),this._activeBuffer.savedGlevel=this._charsetService.glevel,this._activeBuffer.savedOriginMode=this._coreService.decPrivateModes.origin,this._activeBuffer.savedWraparoundMode=this._coreService.decPrivateModes.wraparound,!0}restoreCursor(e){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;for(let e=0;e<this._activeBuffer.savedCharsets.length;e++)this._charsetService.setgCharset(e,this._activeBuffer.savedCharsets[e]);return this._charsetService.setgLevel(this._activeBuffer.savedGlevel),this._coreService.decPrivateModes.origin=this._activeBuffer.savedOriginMode,this._coreService.decPrivateModes.wraparound=this._activeBuffer.savedWraparoundMode,this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],n=e.split(`;`);for(;n.length>1;){let e=n.shift(),r=n.shift();if(/^\d+$/.exec(e)){let n=parseInt(e,10);if(wu(n))if(r===`?`)t.push({type:0,index:n});else{let e=hu(r);e&&t.push({type:1,index:n,color:e})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(`;`);if(t===-1)return!0;let n=e.slice(0,t).trim(),r=e.slice(t+1);return r?this._createHyperlink(n,r):n.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let n=e.split(`:`),r,i=n.findIndex(e=>e.startsWith(`id=`));return i!==-1&&(r=n[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let n=e.split(`;`);for(let e=0;e<n.length&&!(t>=this._specialColors.length);++e,++t)if(n[e]===`?`)this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let r=hu(n[e]);r&&this._onColor.fire([{type:1,index:this._specialColors[t],color:r}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],n=e.split(`;`);for(let e=0;e<n.length;++e)if(/^\d+$/.exec(n[e])){let r=parseInt(n[e],10);wu(r)&&t.push({type:2,index:r})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){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,Cl),!0}selectCharset(e){return e.length===2?(e[0]===`/`||this._charsetService.setgCharset(yu[e[0]],Sl[e[1]]??Cl),!0):(this.selectDefaultCharset(),!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){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,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=ll.clone(),this._eraseAttrDataInternal=ll.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new Ta;e.content=4194373,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let n=this._activeBuffer.ybase+this._activeBuffer.y+t,r=this._activeBuffer.lines.get(n);r&&(r.fill(e),r.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let n=e=>(this._coreService.triggerDataEvent(`\x1B${e}\x1B\\`),!0),r=this._bufferService.buffer,i=this._optionsService.rawOptions;return n(e===`"q`?`P1$r${+!!this._curAttrData.isProtected()}"q`:e===`"p`?`P1$r61;1"p`:e===`r`?`P1$r${r.scrollTop+1};${r.scrollBottom+1}r`:e===`m`?`P1$r0m`:e===` q`?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-+!!i.cursorBlink} q`:`P0$r`)}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}kittyKeyboardSet(e){if(!this._optionsService.rawOptions.vtExtensions?.kittyKeyboard)return!0;let t=e.params[0]||0,n=e.length>1&&e.params[1]||1,r=this._coreService.kittyKeyboard;switch(n){case 1:r.flags=t;break;case 2:r.flags|=t;break;case 3:r.flags&=~t;break}return!0}kittyKeyboardQuery(e){if(!this._optionsService.rawOptions.vtExtensions?.kittyKeyboard)return!0;let t=this._coreService.kittyKeyboard.flags;return this._coreService.triggerDataEvent(`\x1B[?${t}u`),!0}kittyKeyboardPush(e){if(!this._optionsService.rawOptions.vtExtensions?.kittyKeyboard)return!0;let t=e.params[0]||0,n=this._coreService.kittyKeyboard,r=this._bufferService.buffer===this._bufferService.buffers.alt?n.altStack:n.mainStack;return r.length>=16&&r.shift(),r.push(n.flags),n.flags=t,!0}kittyKeyboardPop(e){if(!this._optionsService.rawOptions.vtExtensions?.kittyKeyboard)return!0;let t=Math.max(1,e.params[0]||1),n=this._coreService.kittyKeyboard,r=this._bufferService.buffer===this._bufferService.buffers.alt?n.altStack:n.mainStack;for(let e=0;e<t&&r.length>0;e++)n.flags=r.pop();return r.length===0&&t>0&&(n.flags=0),!0}},Cu=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(xu=e,e=t,t=xu),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};Cu=sa([q(0,Aa)],Cu);function wu(e){return 0<=e&&e<256}var Tu=class extends to{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._innerWriteTimer=this._register(new io),this._onWriteParsed=this._register(new J),this.onWriteParsed=this._onWriteParsed.event,this._register(Qa(()=>{this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0}))}handleUserInput(){this._didUserInput=!0}flushSync(){if(this._store.isDisposed||this._isSyncWriting)return;this._isSyncWriting=!0;let e,t=!1;for(;e=this._writeBuffer.shift();){t=!0,this._action(e);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._writeBuffer.length=0,this._callbacks.length=0,this._isSyncWriting=!1,t&&this._onWriteParsed.fire()}writeSync(e,t){if(this._store.isDisposed)return;if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let n;for(;n=this._writeBuffer.shift();){this._action(n);let e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(!this._store.isDisposed){if(this._pendingData>5e7)throw Error(`write data discarded, use flow control to avoid losing data`);if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}this._scheduleInnerWrite()}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}}_scheduleInnerWrite(e=0,t=!0){this._store.isDisposed||this._innerWriteTimer.cancelAndSet(()=>this._innerWrite(e,t),0)}_innerWrite(e=0,t=!0){if(this._store.isDisposed)return;let n=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let e=this._writeBuffer[this._bufferOffset],r=this._action(e,t);if(r){r.catch(e=>(queueMicrotask(()=>{throw e}),Promise.resolve(!1))).then(e=>{this._store.isDisposed||(performance.now()-n>=12?this._scheduleInnerWrite(0,e):this._innerWrite(n,e))});return}let i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=e.length,performance.now()-n>=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),this._scheduleInnerWrite()):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},Eu=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let n=t.addMarker(t.ybase+t.y),r={data:e,id:this._nextId++,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(r,n)),this._dataByLinkId.set(r.id,r),r.id}let n=e,r=this._getEntryIdKey(n),i=this._entriesWithId.get(r);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let a=t.addMarker(t.ybase+t.y),o={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(o,a)),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(e,t){let n=this._dataByLinkId.get(e);if(n&&n.lines.every(e=>e.line!==t)){let e=this._bufferService.buffer.addMarker(t);n.lines.push(e),e.onDispose(()=>this._removeMarkerFromLink(n,e))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let n=e.lines.indexOf(t);n!==-1&&(e.lines.splice(n,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};Eu=sa([q(0,Aa)],Eu);var Du=!1,Ou=class extends to{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new no),this._onBinary=this._register(new J),this.onBinary=this._onBinary.event,this._onData=this._register(new J),this.onData=this._onData.event,this._onLineFeed=this._register(new J),this.onLineFeed=this._onLineFeed.event,this._onRender=this._register(new J),this.onRender=this._onRender.event,this._onResize=this._register(new J),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new J),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new J),this._instantiationService=new nl,this.optionsService=this._register(new Al(e)),this._instantiationService.setService(Ia,this.optionsService),this._logService=this._register(this._instantiationService.createInstance(al)),this._instantiationService.setService(Fa,this._logService),this._bufferService=this._register(this._instantiationService.createInstance(Dl)),this._instantiationService.setService(Aa,this._bufferService),this.coreService=this._register(this._instantiationService.createInstance(Fl)),this._instantiationService.setService(Ma,this.coreService),this.mouseStateService=this._register(this._instantiationService.createInstance(Bl)),this._instantiationService.setService(ja,this.mouseStateService),this.unicodeService=this._register(this._instantiationService.createInstance(Vl)),this.unicodeService.register(new Kl),this._instantiationService.setService(Ra,this.unicodeService),this._charsetService=this._instantiationService.createInstance(ql),this._instantiationService.setService(Na,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(Eu),this._instantiationService.setService(La,this._oscLinkService),this._inputHandler=this._register(new Su(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.mouseStateService,this.unicodeService)),this._register(Wo.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(Wo.forward(this._bufferService.onResize,this._onResize)),this._register(Wo.forward(this.coreService.onData,this._onData)),this._register(Wo.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange([`windowsPty`],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new Tu((e,t)=>this._inputHandler.parse(e,t))),this._register(Wo.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new J),this._onScroll.event(e=>{this._onScrollApi?.fire(e.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(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!Du&&(this._logService.warn(`writeSync is unreliable and will be removed soon.`),Du=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,2),t=Math.max(t,1),this._writeBuffer.flushSync(),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}registerApcHandler(e,t){return this._inputHandler.registerApcHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.mouseStateService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.backend!==void 0&&t.buildNumber!==void 0&&(e=t.backend===`conpty`&&t.buildNumber<21376),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(Jl.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:`H`},()=>(Jl(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Qa(()=>{for(let t of e)t.dispose()})}}},ku=0,Au=class{constructor(e,t){this._getKey=e,this._array=[],this._insertedValues=[],this._isFlushingInserted=!1,this._deletedIndices=[],this._isFlushingDeleted=!1,this._flushInsertedTask=new vc(t),this._flushDeletedTask=new vc(t)}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((e,t)=>this._getKey(e)-this._getKey(t)),t=0,n=0,r=Array(this._array.length+this._insertedValues.length);for(let i=0;i<r.length;i++)n>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[n])?(r[i]=e[t],t++):r[i]=this._array[n++];this._array=r,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(ku=this._search(t),ku===-1)||this._getKey(this._array[ku])!==t)return!1;do if(this._array[ku]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(ku),!0;while(++ku<this._array.length&&this._getKey(this._array[ku])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((e,t)=>e-t),t=0,n=Array(this._array.length-e.length),r=0;for(let i=0;i<this._array.length;i++)e[t]===i?t++:n[r++]=this._array[i];this._array=n,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(ku=this._search(e),!(ku<0||ku>=this._array.length)&&this._getKey(this._array[ku])===e))do yield this._array[ku];while(++ku<this._array.length&&this._getKey(this._array[ku])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(ku=this._search(e),!(ku<0||ku>=this._array.length)&&this._getKey(this._array[ku])===e))do t(this._array[ku]);while(++ku<this._array.length&&this._getKey(this._array[ku])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,n=this._array.length-1;for(;n>=t;){let r=t+n>>1,i=this._getKey(this._array[r]);if(i>e)n=r-1;else if(i<e)t=r+1;else{for(;r>0&&this._getKey(this._array[r-1])===e;)r--;return r}}return t}},ju=0,Mu=0,Nu=class extends to{constructor(e,t){super(),this._logService=e,this._bufferService=t,this._lineCache=this._register(new Pu),this._onDecorationRegistered=this._register(new J),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new J),this.onDecorationRemoved=this._onDecorationRemoved.event,this._decorations=new Au(e=>e?.marker.line,this._logService),this._register(Qa(()=>this.reset())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._lineCache.attachToBufferLines(this._bufferService.buffer.lines)})),this._lineCache.attachToBufferLines(this._bufferService.buffer.lines)}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new Fu(e);if(t){let e=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&(this._lineCache.remove(t),this._onDecorationRemoved.fire(t)),e.dispose())});this._decorations.insert(t),this._lineCache.add(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear(),this._lineCache.clear()}*getDecorationsAtCell(e,t,n){let r=this._lineCache.getDecorationsOnLine(t);if(r)for(let t of r)ju=t.options.x??0,Mu=ju+(t.options.width??1),e>=ju&&e<Mu&&(!n||(t.options.layer??`bottom`)===n)&&(yield t)}forEachDecorationAtCell(e,t,n,r){let i=this._lineCache.getDecorationsOnLine(t);if(i)for(let t of i)ju=t.options.x??0,Mu=ju+(t.options.width??1),e>=ju&&e<Mu&&(!n||(t.options.layer??`bottom`)===n)&&r(t)}};Nu=sa([q(0,Fa),q(1,Aa)],Nu);var Pu=class extends to{constructor(){super(...arguments),this._decorationsByLine=new Map,this._decorations=new Set,this._bufferLineListeners=this._register(new no),this._lineIndexSyncTimer=this._register(new ao),this._lineIndexSyncCallbacks=[]}clear(){this._lineIndexSyncCallbacks.length=0,this._lineIndexSyncTimer.cancel(),this._decorationsByLine.clear(),this._decorations.clear()}add(e){this._decorations.add(e),this._addToLineBuckets(e)}remove(e){this._decorations.delete(e),this._removeFromLineBuckets(e)}getDecorationsOnLine(e){return this._decorationsByLine.get(e)}attachToBufferLines(e){let t=new eo;this._bufferLineListeners.value=t,t.add(e.onTrim(e=>this._handleBufferLinesTrim(e))),t.add(e.onInsert(e=>this._handleBufferLinesInsert(e))),t.add(e.onDelete(e=>this._handleBufferLinesDelete(e)))}_getDecorationHeight(e){return e.options.height??1}_addToLineBuckets(e){let t=e.marker.line;if(t<0)return;e._indexedStartLine=t;let n=this._getDecorationHeight(e);for(let r=t;r<t+n;r++){let t=this._decorationsByLine.get(r);t||(t=[],this._decorationsByLine.set(r,t)),t.push(e)}}_removeFromLineBuckets(e){let t=e._indexedStartLine,n=this._getDecorationHeight(e);for(let r=t;r<t+n;r++){let t=this._decorationsByLine.get(r);if(!t)continue;let n=t.indexOf(e);n!==-1&&t.splice(n,1),t.length===0&&this._decorationsByLine.delete(r)}}_reindexDecoration(e){this._removeFromLineBuckets(e),!e.marker.isDisposed&&e.marker.line>=0&&this._addToLineBuckets(e)}_scheduleLineIndexSync(e){this._lineIndexSyncCallbacks.push(e),this._lineIndexSyncTimer.set(()=>{let e=this._lineIndexSyncCallbacks;this._lineIndexSyncCallbacks=[];for(let t of e)t()})}_handleBufferLinesTrim(e){if(e<=0)return;let t=new Map;for(let[n,r]of this._decorationsByLine){let i=n-e;i<0||this._mergeLineBucket(t,i,r)}this._decorationsByLine.clear();for(let[e,n]of t)this._decorationsByLine.set(e,n);for(let t of this._decorations)t.marker.isDisposed||(t._indexedStartLine-=e)}_handleBufferLinesInsert(e){this._scheduleLineIndexSync(()=>this._applyBufferLinesInsert(e))}_handleBufferLinesDelete(e){this._scheduleLineIndexSync(()=>this._applyBufferLinesDelete(e))}_mergeLineBucket(e,t,n){let r=e.get(t);if(r)for(let e=0,t=n.length;e<t;e++)r.push(n[e]);else e.set(t,n.slice())}_applyBufferLinesInsert(e){let{index:t,amount:n}=e,r=[];for(let e of this._decorations){if(e.marker.isDisposed)continue;let n=e._indexedStartLine;n<t&&n+this._getDecorationHeight(e)>t&&(r.push(e),this._removeFromLineBuckets(e))}let i=new Map;for(let[e,r]of this._decorationsByLine){let a=e>=t?e+n:e;this._mergeLineBucket(i,a,r)}this._decorationsByLine.clear();for(let[e,t]of i)this._decorationsByLine.set(e,t);for(let e of this._decorations)e.marker.isDisposed||e._indexedStartLine>=t&&(e._indexedStartLine=e.marker.line);for(let e of r)this._addToLineBuckets(e)}_applyBufferLinesDelete(e){let t=e.index+e.amount,n=new Map;for(let[r,i]of this._decorationsByLine){if(r>=e.index&&r<t)continue;let a=r>=t?r-e.amount:r;this._mergeLineBucket(n,a,i)}this._decorationsByLine.clear();for(let[e,t]of n)this._decorationsByLine.set(e,t);let r=[];for(let n of this._decorations){if(n.marker.isDisposed)continue;let i=n._indexedStartLine,a=this._getDecorationHeight(n);i>=t?n._indexedStartLine=n.marker.line:i<e.index&&i+a>t&&r.push(n)}for(let e of r)this._reindexDecoration(e)}},Fu=class extends eo{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new J),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new J),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this._indexedStartLine=e.marker.line,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position=`full`)}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Ts.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Ts.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},Iu=1e3,Lu=class{constructor(e,t=Iu){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&=(clearTimeout(this._refreshTimeoutID),void 0),this._additionalRefreshRequested=!1}refresh(e,t,n){this._rowCount=n,e??=0,t??=this._rowCount-1,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t);let r=performance.now();if(r-this._lastRefreshMs>=this._debounceThresholdMS)this._refreshTimeoutID!==void 0&&(clearTimeout(this._refreshTimeoutID),this._refreshTimeoutID=void 0,this._additionalRefreshRequested=!1),this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){let e=r-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},t)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},Ru=!1,zu=class extends to{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce=``;let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement(`div`),this._accessibilityContainer.classList.add(`xterm-accessibility`),this._rowContainer=i.createElement(`div`),this._rowContainer.setAttribute(`role`,`list`),this._rowContainer.classList.add(`xterm-accessibility-tree`),this._rowElements=[];for(let e=0;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);if(this._topBoundaryFocusListener=e=>this._handleBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._handleBoundaryFocus(e,1),this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement(`div`),this._liveRegion.classList.add(`live-region`),this._liveRegion.setAttribute(`aria-live`,`assertive`),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new Lu(this._renderRows.bind(this))),!this._terminal.element)throw Error(`Cannot enable accessibility before Terminal.open`);Ru?(this._accessibilityContainer.classList.add(`debug`),this._rowContainer.classList.add(`debug`),this._debugRootContainer=i.createElement(`div`),this._debugRootContainer.classList.add(`xterm`),this._debugRootContainer.appendChild(i.createTextNode(`------start a11y------`)),this._debugRootContainer.appendChild(this._accessibilityContainer),this._debugRootContainer.appendChild(i.createTextNode(`------end a11y------`)),this._terminal.element.insertAdjacentElement(`afterend`,this._debugRootContainer)):this._terminal.element.insertAdjacentElement(`afterbegin`,this._accessibilityContainer),this._register(this._terminal.onResize(e=>this._handleResize(e.rows))),this._register(this._terminal.onRender(e=>this._refreshRows(e.start,e.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(e=>this._handleChar(e))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
73
+ `))),this._register(this._terminal.onA11yTab(e=>this._handleTab(e))),this._register(this._terminal.onKey(e=>this._handleKey(e.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(lo(i,`selectionchange`,()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Qa(()=>{Ru?this._debugRootContainer.remove():this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(` `)}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
74
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent=da.get())))}_clearLiveRegion(){this._liveRegion.textContent=``,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)||``,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.textContent=`\xA0`,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute(`aria-posinset`,o),s.setAttribute(`aria-setsize`,r),this._alignRowWidth(s))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent===da.get()&&this._clearLiveRegion(),this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=``)}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute(`aria-posinset`)===(t===0?`1`:`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener(`focus`,this._topBoundaryFocusListener),a.removeEventListener(`focus`,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement(`afterbegin`,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error(`anchorNode and/or focusNode are null`);return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute(`aria-posinset`),10)-1;if(isNaN(r))return console.warn(`row is invalid. Race condition?`),null;let i=this._rowColumns.get(n);if(!i)return console.warn(`columns is null. Race condition?`),null;let a=t<i.length?i[t]:i.slice(-1)[0]+1;return a>=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(!(!a||!o)){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error(`invalid range`);this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(`focus`,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement(`div`);return e.setAttribute(`role`,`listitem`),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform=``;let t=e.getBoundingClientRect().width,n=this._rowColumns.get(e)?.slice(-1)?.[0];if(!n)return;let r=n*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${r/t})`}};zu=sa([q(1,Pa),q(2,Ua),q(3,Ka)],zu);var Bu=class extends to{constructor(e,t,n,r,i){super(),this._element=e,this._mouseCoordsService=t,this._renderService=n,this._bufferService=r,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new J),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new J),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Qa(()=>{$a(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(lo(this._element,`mouseleave`,()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(lo(this._element,`mousemove`,this._handleMouseMove.bind(this))),this._register(lo(this._element,`mousedown`,this._handleMouseDown.bind(this))),this._register(lo(this._element,`mouseup`,this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let e=0;e<n.length;e++){let t=n[e];if(t.classList.contains(`xterm`))break;if(t.classList.contains(`xterm-hover`))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(e=>{e?.forEach(e=>{e.link.dispose&&e.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[r,i]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(r)&&(n=this._checkLinkProviderResult(r,e,n)):i.provideLinks(e.y,t=>{if(this._isMouseOut)return;let i=t?.map(e=>({link:e}));this._activeProviderReplies?.set(r,i),n=this._checkLinkProviderResult(r,e,n),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let n=new Set;for(let r=0;r<t.size;r++){let i=t.get(r);if(i)for(let t=0;t<i.length;t++){let r=i[t],a=r.link.range.start.y<e?0:r.link.range.start.x,o=r.link.range.end.y>e?this._bufferService.cols:r.link.range.end.x;for(let e=a;e<=o;e++){if(n.has(e)){i.splice(t--,1);break}n.add(e)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;let r=this._activeProviderReplies.get(e),i=!1;for(let t=0;t<e;t++)(!this._activeProviderReplies.has(t)||this._activeProviderReplies.get(t))&&(i=!0);if(!i&&r){let e=r.find(e=>this._linkAtPosition(e.link,t));e&&(n=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let e=0;e<this._activeProviderReplies.size;e++){let r=this._activeProviderReplies.get(e)?.find(e=>this._linkAtPosition(e.link,t));if(r){n=!0,this._handleNewLink(r);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element);t&&this._mouseDownLink&&Vu(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,$a(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle(`xterm-cursor-pointer`,e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e=>{if(!this._currentLink)return;let t=e.start===0?0:e.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent)){let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element);e&&this._askForLink(e,!1)}})))}_linkHover(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add(`xterm-cursor-pointer`)),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove(`xterm-cursor-pointer`)),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t){let n=this._mouseCoordsService.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};Bu=sa([q(1,Wa),q(2,Ka),q(3,Aa),q(4,Xa)],Bu);function Vu(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var Hu=class extends Ou{constructor(e={}){super(e),this._linkifier=this._register(new no),this.browser=So,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new no),this._onCursorMove=this._register(new J),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new J),this.onKey=this._onKey.event,this._onSelectionChange=this._register(new J),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new J),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new J),this.onBell=this._onBell.event,this._onFocus=this._register(new J),this._onBlur=this._register(new J),this._onA11yCharEmitter=this._register(new J),this._onA11yTabEmitter=this._register(new J),this._onWillOpen=this._register(new J),this._onDimensionsChange=this._register(new J),this.onDimensionsChange=this._onDimensionsChange.event,this._setup(),this._decorationService=this._instantiationService.createInstance(Nu),this._instantiationService.setService(za,this._decorationService),this._keyboardService=this._instantiationService.createInstance(el),this._instantiationService.setService(Za,this._keyboardService),this._linkProviderService=this._instantiationService.createInstance($s),this._instantiationService.setService(Xa,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(Ba)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(e=>this.refresh(e?.start??0,e?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(e=>this._reportWindowsOptions(e))),this._register(this._inputHandler.onColor(e=>this._handleColorEvent(e))),this._register(Wo.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(Wo.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(Wo.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(Wo.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(e=>this._afterResize(e.cols,e.rows))),this._register(Qa(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}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}get dimensions(){if(!this._renderService)return;let e=this._renderService.dimensions;return{css:{canvas:{...e.css.canvas},cell:{...e.css.cell}},device:{canvas:{...e.device.canvas},cell:{...e.device.cell},char:{...e.device.char}}}}_handleColorEvent(e){if(this._themeService)for(let t of e){let e,n;switch(t.index){case 256:e=`foreground`,n=`10`;break;case 257:e=`background`,n=`11`;break;case 258:e=`cursor`,n=`12`;break;default:e=`ansi`,n=`4;`+t.index}switch(t.type){case 0:let r=ws.toColorRGB(e===`ansi`?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`\x1B]${n};${_u(r)}\x1B\\`);break;case 1:if(e===`ansi`)this._themeService.modifyColors(e=>e.ansi[t.index]=Cs.toColor(...t.color));else{let n=e;this._themeService.modifyColors(e=>e[n]=Cs.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_reportColorScheme(){if(!this._themeService)return;let e=Es.relativeLuminance(this._themeService.colors.background.rgba>>8)<Es.relativeLuminance(this._themeService.colors.foreground.rgba>>8)?1:2;this.coreService.triggerDataEvent(`\x1B[?997;${e}n`)}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(zu,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(`\x1B[I`),this.element.classList.add(`focus`),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value=``,this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(`\x1B[O`),this.element.classList.remove(`focus`),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),a=this._renderService.dimensions.css.cell.width*i,o=this.buffer.y*this._renderService.dimensions.css.cell.height,s=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+`px`,this.textarea.style.top=o+`px`,this.textarea.style.width=a+`px`,this.textarea.style.height=r+`px`,this.textarea.style.lineHeight=r+`px`,this.textarea.style.zIndex=`-5`}_initGlobal(){this._bindKeys(),this._register(lo(this.element,`copy`,e=>{this.hasSelection()&&ma(e,this._selectionService)}));let e=e=>ha(e,this.textarea,this.coreService,this.optionsService);this._register(lo(this.textarea,`paste`,e)),this._register(lo(this.element,`paste`,e)),Eo?this._register(lo(this.element,`mousedown`,e=>{e.button===2&&va(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(lo(this.element,`contextmenu`,e=>{va(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Po&&this._register(lo(this.element,`auxclick`,e=>{e.button===1&&_a(e,this.textarea,this.screenElement)}))}_bindKeys(){this._register(lo(this.textarea,`keyup`,e=>this._keyUp(e),!0)),this._register(lo(this.textarea,`keydown`,e=>this._keyDown(e),!0)),this._register(lo(this.textarea,`keypress`,e=>this._keyPress(e),!0)),this._register(lo(this.textarea,`compositionstart`,()=>{this._syncTextArea(),this._compositionHelper.compositionstart(),this._compositionHelper.updateCompositionElements()})),this._register(lo(this.textarea,`compositionupdate`,e=>this._compositionHelper.compositionupdate(e))),this._register(lo(this.textarea,`compositionend`,()=>this._compositionHelper.compositionend())),this._register(lo(this.textarea,`input`,e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw Error(`Terminal requires a parent element.`);if(e.isConnected||this._logService.debug(`Terminal.open was called on an element that was not attached to the DOM`),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.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`),this.element.classList.toggle(`allow-transparency`,this.options.allowTransparency),this._register(this.optionsService.onSpecificOptionChange(`allowTransparency`,e=>this.element.classList.toggle(`allow-transparency`,e))),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement(`div`),this._viewportElement.classList.add(`xterm-viewport`),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement(`div`),this.screenElement.classList.add(`xterm-screen`),this._register(lo(this.screenElement,`mousemove`,e=>this.updateCursorStyle(e))),this._helperContainer=this._document.createElement(`div`),this._helperContainer.classList.add(`xterm-helpers`),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let n=this.textarea=this._document.createElement(`textarea`);this.textarea.classList.add(`xterm-helper-textarea`),this.textarea.setAttribute(`aria-label`,la.get()),Fo||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._register(this.optionsService.onSpecificOptionChange(`disableStdin`,()=>n.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(Zs,this.textarea,e.ownerDocument.defaultView??window,this._document??(typeof window<`u`?window.document:null))),this._instantiationService.setService(Ua,this._coreBrowserService),this._register(lo(this.textarea,`focus`,e=>this._handleTextAreaFocus(e))),this._register(lo(this.textarea,`blur`,()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(qs,this._document,this._helperContainer),this._instantiationService.setService(Ha,this._charSizeService),this._themeService=this._instantiationService.createInstance(Jc),this._instantiationService.setService(Ya,this._themeService),this._register(this._inputHandler.onRequestColorSchemeQuery(()=>this._reportColorScheme())),this._register(this._themeService.onChangeColors(()=>{this.coreService.decPrivateModes.colorSchemeUpdates&&this._reportColorScheme()})),this._characterJoinerService=this._instantiationService.createInstance(js),this._instantiationService.setService(Ja,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(bc,this.rows,this.screenElement)),this._instantiationService.setService(Ka,this._renderService),this._register(this._renderService.onRenderedViewportChange(e=>this._onRender.fire(e))),this._register(this._renderService.onDimensionsChange(e=>this._onDimensionsChange.fire({css:{canvas:{...e.css.canvas},cell:{...e.css.cell}},device:{canvas:{...e.device.canvas},cell:{...e.device.cell},char:{...e.device.char}}}))),this.onResize(e=>this._renderService.resize(e.cols,e.rows)),this._compositionView=this._document.createElement(`div`),this._compositionView.classList.add(`composition-view`),this._compositionHelper=this._instantiationService.createInstance(_s,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseCoordsService=this._instantiationService.createInstance(nc),this._instantiationService.setService(Wa,this._mouseCoordsService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(Bu,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch(e){this._logService.error(`onWillOpen handler threw an exception`,e)}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>{this._renderService.handleResize(this.cols,this.rows),this._syncTextArea()})),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(us,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(e=>{super.scrollLines(e,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Rc,this.element,this.screenElement,r)),this._instantiationService.setService(qa,this._selectionService),this._mouseService=this._instantiationService.createInstance(fc),this._instantiationService.setService(Ga,this._mouseService),this._register(this._selectionService.onRequestScrollLines(e=>this.scrollLines(e.amount,e.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()})),this._register(Wo.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(ds,this.screenElement)),this._register(lo(this.element,`mousedown`,e=>this._selectionService.handleMouseDown(e))),this.mouseStateService.areMouseEventsActive&&!this.options.mouseEventsRequireAlt?(this._selectionService.disable(),this.element.classList.add(`enable-mouse-events`)):(this._selectionService.enable(),this.element.classList.remove(`enable-mouse-events`)),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(zu,this)),this._register(this.optionsService.onSpecificOptionChange(`screenReaderMode`,e=>this._handleScreenReaderModeOptionChange(e)));let i=this.options.scrollbar?.showScrollbar??!0,a=this.options.scrollbar?.width;i&&a&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(gs,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange(`scrollbar`,e=>{let t=(e?.showScrollbar??!0)&&!!e?.width;!this._overviewRulerRenderer&&t&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(gs,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this._mouseService.bindMouse({element:this.element,screenElement:this.screenElement,document:this._document,handleTouchScroll:e=>this._viewport?.handleTouchScroll(e)},e=>this._register(e),()=>this.focus())}_createRenderer(){return this._instantiationService.createInstance(Gs,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}refresh(e,t,n=!1){this._renderService?.refreshRows(e,t,n)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?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(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){ga(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this.mouseStateService.setCustomWheelEventHandler(e)}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:``}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key===`Dead`||e.key===`AltGraph`)&&(this._unprocessedDeadKey=!0);let n=this._keyboardService.evaluateKeyDown(e);if(this.updateCursorStyle(e),n.type===3||n.type===2){let t=this.rows-1;return this.scrollLines(n.type===2?-t:t),e.preventDefault(),e.stopPropagation(),!1}if(n.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(n.cancel&&(e.preventDefault(),e.stopPropagation()),!n.key)||!this._keyboardService.useKitty&&!this._keyboardService.useWin32InputMode&&e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;(n.key===``||n.key===`\r`)&&(this.textarea.value=``);let r=this._keyboardService.useWin32InputMode&&Uu(e);if(this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!r),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return e.preventDefault(),e.stopPropagation(),!1;this._keyDownHandled=!0}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState(`AltGraph`);return t.type===`keypress`?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){if(this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return;Uu(e)||this.focus();let t=this._keyboardService.evaluateKeyUp(e);if(t?.key){let n=this._keyboardService.useWin32InputMode&&Uu(e);this.coreService.triggerDataEvent(t.key,!n)}this.updateCursorStyle(e),this._keyPressHandled=!1}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType===`insertText`&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){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 e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(ll));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._mouseService?.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1,!0)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains(`focus`)?this.coreService.triggerDataEvent(`\x1B[I`):this.coreService.triggerDataEvent(`\x1B[O`)}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let e=this._renderService.dimensions.css.canvas.width.toFixed(0),t=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`\x1B[4;${t};${e}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`\x1B[6;${r};${n}t`);break}}};function Uu(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18||e.keyCode===91||e.keyCode===92||e.keyCode===93||e.keyCode===224||e.key===`Meta`}var Wu=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n<this._addons.length;n++)if(this._addons[n]===e){t=n;break}if(t===-1)throw Error(`Could not dispose an addon that has not been loaded`);e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},Gu=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new Ta)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},Ku=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,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(e){let t=this._buffer.lines.get(e);if(t)return new Gu(t)}getNullCell(){return new Ta}},qu=class extends to{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new J),this.onBufferChange=this._onBufferChange.event,this._normal=new Ku(this._core.buffers.normal,`normal`),this._alternate=new Ku(this._core.buffers.alt,`alternate`),this._register(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 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)}},Ju=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,e=>t(e.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(e,n)=>t(e,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}registerApcHandler(e,t){return this._core.registerApcHandler(e,t)}},Yu=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},Xu=[`cols`,`rows`],Zu=0,Qu=class extends to{constructor(e){super(),this._core=this._register(new Hu(e)),this._addonManager=this._register(new Wu),this._publicOptions={...this._core.options};let t=e=>this._core.options[e],n=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(let e in this._core.options){let r={get:t.bind(this,e),set:n.bind(this,e)};Object.defineProperty(this._publicOptions,e,r)}}_checkReadonlyOptions(e){if(Xu.includes(e))throw Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw 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 onDimensionsChange(){return this._core.onDimensionsChange}get element(){return this._core.element}get screenElement(){return this._core.screenElement}get parser(){return this._parser??=new Ju(this._core)}get unicode(){return this._checkProposedApi(),new Yu(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._register(new qu(this._core))}get markers(){return this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t=`none`;switch(this._core.mouseStateService.activeProtocol){case`X10`:t=`x10`;break;case`VT200`:t=`vt200`;break;case`DRAG`:t=`drag`;break;case`ANY`:t=`any`;break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,showCursor:!this._core.coreService.isCursorHidden,synchronizedOutputMode:e.synchronizedOutput,win32InputMode:e.win32InputMode,wraparoundMode:e.wraparound}}get dimensions(){return this._core.dimensions}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
75
+ `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return la.get()},set promptLabel(e){la.set(e)},get tooMuchOutput(){return da.get()},set tooMuchOutput(e){da.set(e)}}}_verifyIntegers(...e){for(Zu of e)if(Zu===1/0||isNaN(Zu)||Zu%1!=0)throw Error(`This API only accepts integers`)}_verifyPositiveIntegers(...e){for(Zu of e)if(Zu&&(Zu===1/0||isNaN(Zu)||Zu%1!=0||Zu<0))throw Error(`This API only accepts positive integers`)}},$u=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ed=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),td=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),nd=e=>{let t=td(e);return t.charAt(0).toUpperCase()+t.slice(1)},rd={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},id=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ad=(0,b.createContext)({}),od=()=>(0,b.useContext)(ad),sd=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=od()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...rd,width:t??l??rd.width,height:t??l??rd.height,stroke:e??f,strokeWidth:m,className:$u(`lucide`,p,i),...!a&&!id(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),cd=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(sd,{ref:i,iconNode:t,className:$u(`lucide-${ed(nd(e))}`,`lucide-${e}`,n),...r}));return n.displayName=nd(e),n},ld=cd(`binary`,[[`rect`,{x:`14`,y:`14`,width:`4`,height:`6`,rx:`2`,key:`p02svl`}],[`rect`,{x:`6`,y:`4`,width:`4`,height:`6`,rx:`2`,key:`xm4xkj`}],[`path`,{d:`M6 20h4`,key:`1i6q5t`}],[`path`,{d:`M14 10h4`,key:`ru81e7`}],[`path`,{d:`M6 14h2v6`,key:`16z9wg`}],[`path`,{d:`M14 4h2v6`,key:`1idq9u`}]]),ud=cd(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),dd=cd(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),fd=cd(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),pd=cd(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),md=cd(`file-diff`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),hd=cd(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),gd=cd(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),_d=cd(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),vd=cd(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),yd=cd(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),bd=cd(`monitor-cog`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`m14.305 7.53.923-.382`,key:`1mlnsw`}],[`path`,{d:`m15.228 4.852-.923-.383`,key:`82mpwg`}],[`path`,{d:`m16.852 3.228-.383-.924`,key:`ln4sir`}],[`path`,{d:`m16.852 8.772-.383.923`,key:`1dejw0`}],[`path`,{d:`m19.148 3.228.383-.924`,key:`192kgf`}],[`path`,{d:`m19.53 9.696-.382-.924`,key:`fiavlr`}],[`path`,{d:`m20.772 4.852.924-.383`,key:`1j8mgp`}],[`path`,{d:`m20.772 7.148.924.383`,key:`zix9be`}],[`path`,{d:`M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7`,key:`1tnzv8`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}]]),xd=cd(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Sd=cd(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Cd=cd(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),wd=cd(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Td=cd(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Ed=cd(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Dd=cd(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Od=cd(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function kd(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=kd(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ad(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=kd(e))&&(r&&(r+=` `),r+=t);return r}var jd=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Md=(e,t)=>({classGroupId:e,validator:t}),Nd=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Pd=`-`,Fd=[],Id=`arbitrary..`,Ld=e=>{let t=Bd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return zd(e);let n=e.split(Pd);return Rd(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?jd(i,t):t:i||Fd}return n[e]||Fd}}},Rd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Rd(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Pd):e.slice(t).join(Pd),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},zd=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Id+r:void 0})(),Bd=e=>{let{theme:t,classGroups:n}=e;return Vd(n,t)},Vd=(e,t)=>{let n=Nd();for(let r in e){let i=e[r];Hd(i,n,r,t)}return n},Hd=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Ud(i,t,n,r)}},Ud=(e,t,n,r)=>{if(typeof e==`string`){Wd(e,t,n);return}if(typeof e==`function`){Gd(e,t,n,r);return}Kd(e,t,n,r)},Wd=(e,t,n)=>{let r=e===``?t:qd(t,e);r.classGroupId=n},Gd=(e,t,n,r)=>{if(Jd(e)){Hd(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Md(n,e))},Kd=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Hd(o,qd(t,a),n,r)}},qd=(e,t)=>{let n=e,r=t.split(Pd),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Nd(),n.nextPart.set(t,i)),n=i}return n},Jd=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Yd=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Xd=`!`,Zd=`:`,Qd=[],$d=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ef=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Zd){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Xd)?(c=s.slice(0,-1),l=!0):s.startsWith(Xd)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return $d(t,l,c,u)};if(t){let e=t+Zd,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):$d(Qd,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},tf=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},nf=e=>({cache:Yd(e.cacheSize),parseClassName:ef(e),sortModifiers:tf(e),...Ld(e)}),rf=/\s+/,af=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(rf),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Xd:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},of=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=sf(n))&&(i&&(i+=` `),i+=r);return i},sf=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=sf(e[r]))&&(n&&(n+=` `),n+=t);return n},cf=(e,...t)=>{let n,r,i,a,o=o=>(n=nf(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=af(e,n);return i(e,a),a};return a=o,(...e)=>a(of(...e))},lf=[],uf=e=>{let t=t=>t[e]||lf;return t.isThemeGetter=!0,t},df=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ff=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pf=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,mf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_f=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yf=e=>pf.test(e),bf=e=>!!e&&!Number.isNaN(Number(e)),xf=e=>!!e&&Number.isInteger(Number(e)),Sf=e=>e.endsWith(`%`)&&bf(e.slice(0,-1)),Cf=e=>mf.test(e),wf=()=>!0,Tf=e=>hf.test(e)&&!gf.test(e),Ef=()=>!1,Df=e=>_f.test(e),Of=e=>vf.test(e),kf=e=>!Y(e)&&!X(e),Af=e=>Gf(e,Yf,Ef),Y=e=>df.test(e),jf=e=>Gf(e,Xf,Tf),Mf=e=>Gf(e,Zf,bf),Nf=e=>Gf(e,$f,wf),Pf=e=>Gf(e,Qf,Ef),Ff=e=>Gf(e,qf,Ef),If=e=>Gf(e,Jf,Of),Lf=e=>Gf(e,ep,Df),X=e=>ff.test(e),Rf=e=>Kf(e,Xf),zf=e=>Kf(e,Qf),Bf=e=>Kf(e,qf),Vf=e=>Kf(e,Yf),Hf=e=>Kf(e,Jf),Uf=e=>Kf(e,ep,!0),Wf=e=>Kf(e,$f,!0),Gf=(e,t,n)=>{let r=df.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Kf=(e,t,n=!1)=>{let r=ff.exec(e);return r?r[1]?t(r[1]):n:!1},qf=e=>e===`position`||e===`percentage`,Jf=e=>e===`image`||e===`url`,Yf=e=>e===`length`||e===`size`||e===`bg-size`,Xf=e=>e===`length`,Zf=e=>e===`number`,Qf=e=>e===`family-name`,$f=e=>e===`number`||e===`weight`,ep=e=>e===`shadow`,tp=cf(()=>{let e=uf(`color`),t=uf(`font`),n=uf(`text`),r=uf(`font-weight`),i=uf(`tracking`),a=uf(`leading`),o=uf(`breakpoint`),s=uf(`container`),c=uf(`spacing`),l=uf(`radius`),u=uf(`shadow`),d=uf(`inset-shadow`),f=uf(`text-shadow`),p=uf(`drop-shadow`),m=uf(`blur`),h=uf(`perspective`),g=uf(`aspect`),_=uf(`ease`),v=uf(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),X,Y],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[X,Y,c],T=()=>[yf,`full`,`auto`,...w()],E=()=>[xf,`none`,`subgrid`,X,Y],D=()=>[`auto`,{span:[`full`,xf,X,Y]},xf,X,Y],O=()=>[xf,`auto`,X,Y],k=()=>[`auto`,`min`,`max`,`fr`,X,Y],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[yf,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[yf,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[yf,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,X,Y],L=()=>[...b(),Bf,Ff,{position:[X,Y]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],z=()=>[`auto`,`cover`,`contain`,Vf,Af,{size:[X,Y]}],ee=()=>[Sf,Rf,jf],B=()=>[``,`none`,`full`,l,X,Y],V=()=>[``,bf,Rf,jf],H=()=>[`solid`,`dashed`,`dotted`,`double`],U=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],te=()=>[bf,Sf,Bf,Ff],W=()=>[``,`none`,m,X,Y],ne=()=>[`none`,bf,X,Y],G=()=>[`none`,bf,X,Y],re=()=>[bf,X,Y],ie=()=>[yf,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Cf],breakpoint:[Cf],color:[wf],container:[Cf],"drop-shadow":[Cf],ease:[`in`,`out`,`in-out`],font:[kf],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Cf],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Cf],shadow:[Cf],spacing:[`px`,bf],text:[Cf],"text-shadow":[Cf],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,yf,Y,X,g]}],container:[`container`],columns:[{columns:[bf,Y,X,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[xf,`auto`,X,Y]}],basis:[{basis:[yf,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[bf,yf,`auto`,`initial`,`none`,Y]}],grow:[{grow:[``,bf,X,Y]}],shrink:[{shrink:[``,bf,X,Y]}],order:[{order:[xf,`first`,`last`,`none`,X,Y]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Rf,jf]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Wf,Nf]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Sf,Y]}],"font-family":[{font:[zf,Pf,t]}],"font-features":[{"font-features":[Y]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,X,Y]}],"line-clamp":[{"line-clamp":[bf,`none`,X,Mf]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,X,Y]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,X,Y]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...H(),`wavy`]}],"text-decoration-thickness":[{decoration:[bf,`from-font`,`auto`,X,jf]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[bf,`auto`,X,Y]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,X,Y]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,X,Y]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:z()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},xf,X,Y],radial:[``,X,Y],conic:[xf,X,Y]},Hf,If]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-bs":[{"border-bs":V()}],"border-w-be":[{"border-be":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":V()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...H(),`hidden`,`none`]}],"divide-style":[{divide:[...H(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...H(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[bf,X,Y]}],"outline-w":[{outline:[``,bf,Rf,jf]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,Uf,Lf]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Uf,Lf]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:V()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[bf,jf]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Uf,Lf]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[bf,X,Y]}],"mix-blend":[{"mix-blend":[...U(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":U()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[bf]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[X,Y]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[bf]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,X,Y]}],filter:[{filter:[``,`none`,X,Y]}],blur:[{blur:W()}],brightness:[{brightness:[bf,X,Y]}],contrast:[{contrast:[bf,X,Y]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Uf,Lf]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,bf,X,Y]}],"hue-rotate":[{"hue-rotate":[bf,X,Y]}],invert:[{invert:[``,bf,X,Y]}],saturate:[{saturate:[bf,X,Y]}],sepia:[{sepia:[``,bf,X,Y]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,X,Y]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[bf,X,Y]}],"backdrop-contrast":[{"backdrop-contrast":[bf,X,Y]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,bf,X,Y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[bf,X,Y]}],"backdrop-invert":[{"backdrop-invert":[``,bf,X,Y]}],"backdrop-opacity":[{"backdrop-opacity":[bf,X,Y]}],"backdrop-saturate":[{"backdrop-saturate":[bf,X,Y]}],"backdrop-sepia":[{"backdrop-sepia":[``,bf,X,Y]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,X,Y]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[bf,`initial`,X,Y]}],ease:[{ease:[`linear`,`initial`,_,X,Y]}],delay:[{delay:[bf,X,Y]}],animate:[{animate:[`none`,v,X,Y]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,X,Y]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":[`scale-3d`],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[X,Y,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":[`translate-none`],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,X,Y]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,X,Y]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[bf,Rf,jf,Mf]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function np(...e){return tp(Ad(e))}function rp(e){let t=b.useRef(!0);t.current&&(t.current=!1,e())}function ip(){return typeof window<`u`}function ap(e){return cp(e)?(e.nodeName||``).toLowerCase():`#document`}function op(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sp(e){return((cp(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function cp(e){return ip()?e instanceof Node||e instanceof op(e).Node:!1}function lp(e){return ip()?e instanceof Element||e instanceof op(e).Element:!1}function up(e){return ip()?e instanceof HTMLElement||e instanceof op(e).HTMLElement:!1}function dp(e){return!ip()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof op(e).ShadowRoot}function fp(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Cp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function pp(e){return/^(table|td|th)$/.test(ap(e))}function mp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var hp=/transform|translate|scale|rotate|perspective|filter/,gp=/paint|layout|strict|content/,_p=e=>!!e&&e!==`none`,vp;function yp(e){let t=lp(e)?Cp(e):e;return _p(t.transform)||_p(t.translate)||_p(t.scale)||_p(t.rotate)||_p(t.perspective)||!xp()&&(_p(t.backdropFilter)||_p(t.filter))||hp.test(t.willChange||``)||gp.test(t.contain||``)}function bp(e){let t=Tp(e);for(;up(t)&&!Sp(t);){if(yp(t))return t;if(mp(t))return null;t=Tp(t)}return null}function xp(){return vp??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),vp}function Sp(e){return/^(html|body|#document)$/.test(ap(e))}function Cp(e){return op(e).getComputedStyle(e)}function wp(e){return lp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tp(e){if(ap(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||dp(e)&&e.host||sp(e);return dp(t)?t.host:t}function Ep(e){let t=Tp(e);return Sp(t)?e.ownerDocument?e.ownerDocument.body:e.body:up(t)&&fp(t)?t:Ep(t)}function Dp(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ep(e),i=r===e.ownerDocument?.body,a=op(r);if(i){let e=Op(a);return t.concat(a,a.visualViewport||[],fp(r)?r:[],e&&n?Dp(e):[])}else return t.concat(r,Dp(r,[],n))}function Op(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}var Ap=typeof navigator<`u`,jp=Bp(),Mp=Hp(),Np=Vp(),Pp=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),Fp=jp.platform===`MacIntel`&&jp.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(jp.platform);Ap&&/firefox/i.test(Np);var Ip=Ap&&/apple/i.test(navigator.vendor);Ap&&/Edg/i.test(Np);var Lp=Ap&&/android/i.test(Mp)||/android/i.test(Np),Rp=Ap&&Mp.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,zp=Np.includes(`jsdom/`);function Bp(){if(!Ap)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function Vp(){if(!Ap)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Hp(){if(!Ap)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}function Up(e){return e?.ownerDocument||document}var Z=typeof document<`u`?b.useLayoutEffect:()=>{},Wp={};function Gp(e,t){let n=b.useRef(Wp);return n.current===Wp&&(n.current=e(t)),n}var Kp=[];function qp(e){b.useEffect(e,Kp)}var Jp=0,Yp=class e{static create(){return new e}currentId=Jp;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Jp,t()},e)}isStarted(){return this.currentId!==Jp}clear=()=>{this.currentId!==Jp&&(clearTimeout(this.currentId),this.currentId=Jp)};disposeEffect=()=>this.clear};function Xp(){let e=Gp(Yp.create).current;return qp(e.disposeEffect),e}var Zp=null;globalThis.requestAnimationFrame;var Qp=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},$p=class e{static create(){return new e}static request(e){return Qp.request(e)}static cancel(e){return Qp.cancel(e)}currentId=Zp;request(e){this.cancel(),this.currentId=Qp.request(()=>{this.currentId=Zp,e()})}cancel=()=>{this.currentId!==Zp&&(Qp.cancel(this.currentId),this.currentId=Zp)};disposeEffect=()=>this.cancel};function em(){let e=Gp($p.create).current;return qp(e.disposeEffect),e}function tm(){}var nm=Object.freeze([]),rm=Object.freeze({}),im={},am={},om=``;function sm(e){if(typeof document>`u`)return!1;let t=Up(e);return op(t).innerWidth-t.documentElement.clientWidth>0}function cm(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Up(e),n=t.documentElement,r=t.body,i=fp(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function lm(e){let t=Up(e),n=t.documentElement,r=t.body,i=fp(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function um(e){let t=Up(e),n=t.documentElement,r=t.body,i=op(n),a=0,o=0,s=!1,c=$p.create();if(Pp&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,im={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},om=n.style.scrollBehavior,am={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=fp(n)?n:r;if(s=cm(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,im),Object.assign(r.style,am),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=om)}function d(){u(),c.request(l)}l();let f=kp(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var dm=new class{lockCount=0;restore=null;timeoutLock=Yp.create();timeoutUnlock=Yp.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Up(e).documentElement,n=op(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=tm;return}let r=Fp||!sm(e);this.restore=r?lm(e):um(e)}};function fm(e=!0,t=null){Z(()=>{if(e)return dm.acquire(t)},[e,t])}function pm(e){e.preventDefault(),e.stopPropagation()}function mm(e){return`nativeEvent`in e}function hm(e){return e.pointerType===``&&e.isTrusted?!0:Lp&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function gm(e){return zp?!1:!Lp&&e.width===0&&e.height===0||Lp&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function _m(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function vm(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function ym(e,t){return t!=null&&!_m(t)?0:typeof e==`function`?e():e}function bm(e,t,n){let r=ym(e,n);return typeof r==`number`?r:r?.[t]}function xm(e){return typeof e==`function`?e():e}function Sm(e,t){return t||e===`click`||e===`mousedown`}var Cm=`none`,wm=`trigger-press`,Tm=`trigger-hover`,Em=`trigger-focus`,Dm=`outside-press`,Om=`item-press`,km=`focus-out`,Am=`escape-key`,jm=`list-navigation`,Mm=`cancel-open`,Nm=`disabled`,Pm=`imperative-action`,Fm=`window-resize`;function Im(e,t,n,r){let i=!1,a=!1,o=r??rm;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var Lm=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Yp,currentIdRef:{current:null},currentContextRef:{current:null}});function Rm(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=b.useRef(n),a=b.useRef(n),o=b.useRef(null),s=b.useRef(null),c=Xp();return(0,y.jsx)(Lm.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function zm(e,t={open:!1}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`floatingId`),{open:i}=t,{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=b.useContext(Lm),[f,p]=b.useState(!1);return Z(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!i&&a.current===r){if(p(!1),s){let t=r;return d.start(s,()=>{n.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[i,r,a,o,s,c,l,d,n]),Z(()=>{if(!i)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:n.setOpen,setIsInstantPhase:p},a.current=r,o.current={open:0,close:bm(c.current,`close`)},t!==null&&t!==r?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Im(Cm))):(p(!1),e?.setIsInstantPhase(!1))},[i,r,n,a,o,s,c,l,d]),Z(()=>()=>{l.current=null},[l]),b.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function Bm(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Vm(e,t,n,r){let i=Gp(Um).current;return Wm(i,e,t,n,r)&&Km(i,[e,t,n,r]),i.callback}function Hm(e){let t=Gp(Um).current;return Gm(t,e)&&Km(t,e),t.callback}function Um(){return{callback:null,cleanup:null,refs:[]}}function Wm(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Gm(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Km(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}function qm(e){let t=Gp(Jm,e).current;return t.next=e,Z(t.effect),t}function Jm(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Ym=b[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Xm=Ym&&Ym!==b.useLayoutEffect?Ym:e=>e();function Zm(e){let t=Gp(Qm).current;return t.next=e,Xm(t.effect),t.trampoline}function Qm(){let e={next:void 0,callback:$m,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function $m(){}var eh={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},th={...eh,position:`fixed`,top:0,left:0},nh={...eh,position:`absolute`},rh=b.forwardRef(function(e,t){let[n,r]=b.useState();Z(()=>{Ip&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,y.jsx)(`span`,{...e,ref:t,style:th,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})}),ih=`data-base-ui-focusable`,ah=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,oh=`ArrowLeft`,sh=`ArrowRight`,ch=`ArrowUp`,lh=`ArrowDown`;function uh(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function dh(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&dp(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function fh(e){return`composedPath`in e?e.composedPath()[0]:e.target}function ph(e,t){if(!lp(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(dh(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function mh(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function hh(e){return e.matches(`html,body`)}function gh(e){return up(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function _h(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${ah}`)!=null}function vh(e){return e?e.getAttribute(`role`)===`combobox`&&gh(e):!1}function yh(e){if(!e||zp)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function bh(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}var xh=[`top`,`right`,`bottom`,`left`],Sh=Math.min,Ch=Math.max,wh=Math.round,Th=Math.floor,Eh=e=>({x:e,y:e}),Dh={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Oh(e,t,n){return Ch(e,Sh(t,n))}function kh(e,t){return typeof e==`function`?e(t):e}function Ah(e){return e.split(`-`)[0]}function jh(e){return e.split(`-`)[1]}function Mh(e){return e===`x`?`y`:`x`}function Nh(e){return e===`y`?`height`:`width`}function Ph(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Fh(e){return Mh(Ph(e))}function Ih(e,t,n){n===void 0&&(n=!1);let r=jh(e),i=Fh(e),a=Nh(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Gh(o)),[o,Gh(o)]}function Lh(e){let t=Gh(e);return[Rh(e),t,Rh(t)]}function Rh(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var zh=[`left`,`right`],Bh=[`right`,`left`],Vh=[`top`,`bottom`],Hh=[`bottom`,`top`];function Uh(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Bh:zh:t?zh:Bh;case`left`:case`right`:return t?Vh:Hh;default:return[]}}function Wh(e,t,n,r){let i=jh(e),a=Uh(Ah(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Rh)))),a}function Gh(e){let t=Ah(e);return Dh[t]+e.slice(t.length)}function Kh(e){return{top:0,right:0,bottom:0,left:0,...e}}function qh(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Kh(e)}function Jh(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Yh(e,t,n){return Math.floor(e/t)!==n}function Xh(e,t){return t<0||t>=e.length}function Zh(e,t){return $h(e.current,{disabledIndices:t})}function Qh(e,t){return $h(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function $h(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&ig(e,a,r));return a}function eg(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!ig(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Th(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!ig(e,r,s))return r}};d&&pm(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=$h(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=$h(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}Xh(e,f)&&(f=u)}if(n===`both`){let n=Th(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&pm(t),u%o===o-1?r&&(f=$h(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=$h(e,{startingIndex:u,disabledIndices:s}),r&&Yh(f,o,n)&&(f=$h(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Yh(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&pm(t),u%o===0?r&&(f=$h(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=$h(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Yh(f,o,n)&&(f=$h(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Yh(f,o,n)&&(f=u));let c=Th(l/o)===n;Xh(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:$h(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function tg(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function ng(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function rg(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function ig(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?og(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function ag(e){return e.visibility===`hidden`||e.visibility===`collapse`}function og(e,t=e?Cp(e):null){return!e||!e.isConnected||!t||ag(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var sg=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function cg(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return dp(n)?n.host:null}function lg(e){for(let t of Array.from(e.children))if(ap(t)===`summary`)return t;return null}function ug(e,t){let n=lg(t);return!!n&&(e===n||dh(n,e))}function dg(e){let t=e?ap(e):``;return e!=null&&e.matches(sg)&&(t!==`summary`||e.parentElement!=null&&ap(e.parentElement)===`details`&&lg(e.parentElement)===e)&&(t!==`details`||lg(e)==null)&&(t!==`input`||e.type!==`hidden`)}function fg(e){if(!dg(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=cg(t)){let n=t!==e,r=ap(t)===`slot`;if(t.hasAttribute(`inert`)||n&&ap(t)===`details`&&!t.open&&!ug(e,t)||t.hasAttribute(`hidden`)||!r&&!pg(t,n))return!1}return!0}function pg(e,t){let n=Cp(e);return t?n.display!==`none`:og(e,n)}function mg(e){let t=e.tabIndex;if(t<0){let t=ap(e);if(t===`details`||t===`audio`||t===`video`||up(e)&&e.isContentEditable)return 0}return t}function hg(e){if(ap(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function gg(e,t){let n=hg(e);if(!n)return!0;let r=t.find(e=>{let t=hg(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=hg(e);return t?.name===n.name&&t.form===n.form})===n}function _g(e){if(up(e)&&ap(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return up(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function vg(e,t){_g(e).forEach(e=>{dg(e)&&t.push(e),vg(e,t)})}function yg(e,t,n){_g(e).forEach(e=>{up(e)&&e.matches(t)&&n.push(e),yg(e,t,n)})}function bg(e){return fg(e)&&mg(e)>=0}function xg(e){let t=[];return vg(e,t),t.filter(fg)}function Sg(e){let t=xg(e);return t.filter(e=>mg(e)>=0&&gg(e,t))}function Cg(e,t){let n=Sg(e),r=n.length;if(r===0)return;let i=uh(Up(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function wg(e){return Cg(Up(e).body,1)||e}function Tg(e){return Cg(Up(e).body,-1)||e}function Eg(e,t){if(!e)return null;let n=Sg(Up(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Dg(e){return Eg(e,1)}function Og(e){return Eg(e,-1)}function kg(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!dh(n,r)}function Ag(e){Sg(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function jg(e){let t=[];yg(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Mg(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Mg(e,t.id,n)])}function Ng(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Pg(e){return`data-base-ui-${e}`}var Fg=0;function Ig(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Fg);let a=()=>e?.focus({preventScroll:n});if(i)return a(),tm;let o=requestAnimationFrame(a);return Fg=o,()=>{Fg===o&&(cancelAnimationFrame(o),Fg=0)}}var Lg={inert:new WeakMap,"aria-hidden":new WeakMap},Rg=`data-base-ui-inert`,zg={inert:new WeakSet,"aria-hidden":new WeakSet},Bg=new WeakMap,Vg=0;function Hg(e){return zg[e]}function Ug(e){return e?dp(e)?e.host:Ug(e.parentNode):null}var Wg=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Ug(t);return e.contains(n)?n:null}).filter(e=>e!=null),Gg=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Kg=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{ap(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function qg(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=Wg(t,e),u=i?Wg(t,a):[],d=new Set(u),f=i?Kg(t,Gg(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=Lg[o],n=Hg(o);c=n,s=e;let r=Wg(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);Kg(t,Gg(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(Bg.get(e)||0)+1;Bg.set(e,t),m.push(e),t===1&&e.setAttribute(Rg,``)}),Vg+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(Bg.get(e)||0)-1;Bg.set(e,t),t||e.removeAttribute(Rg)}),--Vg,Vg||(Lg.inert=new WeakMap,Lg[`aria-hidden`]=new WeakMap,zg.inert=new WeakSet,zg[`aria-hidden`]=new WeakSet,Bg=new WeakMap)}}function Jg(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=Up(e[0]).body;return qg(e,o,n,r,{mark:i,markerIgnoreElements:a})}var Yg={...b},Xg=0;function Zg(e,t=`mui`){let[n,r]=b.useState(e),i=e||n;return b.useEffect(()=>{n??(Xg+=1,r(`${t}-${Xg}`))},[n,t]),i}var Qg=Yg.useId;function $g(e,t){if(Qg!==void 0){let n=Qg();return e??(t?`${t}-${n}`:n)}return Zg(e,t)}function e_(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var t_=e_(`https://base-ui.com/production-error`,`Base UI`),n_=19;function r_(e){return n_>=e}function i_(e){if(!b.isValidElement(e))return null;let t=e,n=t.props;return(r_(19)?n?.ref:t.ref)??null}function a_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function o_(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function s_(e,t){return typeof e==`function`?e(t):e}function c_(e,t){return typeof e==`function`?e(t):e}var l_={};function u_(e,t,n,r,i){if(!n&&!r&&!i&&!e)return f_(t);let a=f_(e);return t&&(a=p_(a,t)),n&&(a=p_(a,n)),r&&(a=p_(a,r)),i&&(a=p_(a,i)),a}function d_(e){if(e.length===0)return l_;if(e.length===1)return f_(e[0]);let t=f_(e[0]);for(let n=1;n<e.length;n+=1)t=p_(t,e[n]);return t}function f_(e){return __(e)?{...v_(e,l_)}:m_(e)}function p_(e,t){return __(t)?v_(t,e):h_(e,t)}function m_(e){let t={...e};for(let e in t){let n=t[e];g_(e,n)&&(t[e]=b_(n))}return t}function h_(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=a_(e.style,r);break;case`className`:e[n]=S_(e.className,r);break;default:g_(n,r)?e[n]=y_(e[n],r):e[n]=r}}return e}function g_(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function __(e){return typeof e==`function`}function v_(e,t){return __(e)?e(t):e??l_}function y_(e,t){return t?e?(...n)=>{let r=n[0];if(C_(r)){let i=r;x_(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:b_(t):e}function b_(e){return e&&((...t)=>{let n=t[0];return C_(n)&&x_(n),e(...t)})}function x_(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function S_(e,t){return t?e?t+` `+e:t:e}function C_(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function w_(e,t,n={}){let r=t.render,i=T_(t,n);return n.enabled===!1?null:O_(e,r,i,n.state??rm)}function T_(e,t={}){let{className:n,style:r,render:i}=e,{state:a=rm,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?s_(n,a):void 0,d=l?c_(r,a):void 0,f=l?o_(a,c):rm,p=l&&s?E_(s):void 0,m=l?a_(f,p)??{}:rm;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=Hm([m.ref,i_(i),...o]):m.ref=Vm(m.ref,i_(i),o):Vm(null,null)),l?(u!==void 0&&(m.className=S_(m.className,u)),d!==void 0&&(m.style=a_(m.style,d)),m):rm}function E_(e){return Array.isArray(e)?d_(e):u_(void 0,e)}var D_=Symbol.for(`react.lazy`);function O_(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=u_(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===D_&&(i=b.Children.toArray(t)[0]),b.cloneElement(i,e)}if(e&&typeof e==`string`)return k_(e,n);throw Error(t_(8))}function k_(e,t){return e===`button`?(0,b.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,b.createElement)(`img`,{alt:``,...t,key:t.key}):b.createElement(e,t)}var A_={style:{transition:`none`}},j_=`data-base-ui-click-trigger`,M_={fallbackAxisSide:`none`},N_={fallbackAxisSide:`end`},P_={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},F_=c(g()),I_=b.createContext(null),L_=()=>b.useContext(I_),R_=Pg(`portal`);function z_(e={}){let{ref:t,container:n,componentProps:r=rm,elementProps:i}=e,a=$g(),o=L_()?.portalNode,[s,c]=b.useState(null),[l,u]=b.useState(null),d=Zm(e=>{e!==null&&u(e)}),f=b.useRef(null);Z(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(cp(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=w_(`div`,r,{ref:[t,d],props:[{id:a,[R_]:``},i]});return{portalNode:l,portalSubtree:s&&p?F_.createPortal(p,s):null}}var B_=b.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,style:s,...c}=e,{portalNode:l,portalSubtree:u}=z_({container:r,ref:t,componentProps:e,elementProps:c}),d=b.useRef(null),f=b.useRef(null),p=b.useRef(null),m=b.useRef(null),[h,g]=b.useState(null),_=b.useRef(!1),v=h?.modal,x=h?.open,S=typeof o==`boolean`?o:!!h&&!h.modal&&h.open&&!!l;b.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&kg(e)&&(e.type===`focusin`?_.current&&=(jg(l),!1):(Ag(l),_.current=!0))}return Bm(kp(l,`focusin`,e,!0),kp(l,`focusout`,e,!0))},[l,v]),b.useEffect(()=>{!l||x!==!1||(jg(l),_.current=!1)},[x,l]);let C=b.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,y.jsxs)(b.Fragment,{children:[u,(0,y.jsxs)(I_.Provider,{value:C,children:[S&&l&&(0,y.jsx)(rh,{"data-type":`outside`,ref:d,onFocus:e=>{kg(e,l)?p.current?.focus():Tg(h?h.domReference:null)?.focus()}}),S&&l&&(0,y.jsx)(`span`,{"aria-owns":l.id,style:P_}),l&&F_.createPortal(n,l),S&&l&&(0,y.jsx)(rh,{"data-type":`outside`,ref:f,onFocus:e=>{kg(e,l)?m.current?.focus():(wg(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Im(`focus-out`,e.nativeEvent)))}})]})]})});function V_(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var H_=class{nodesRef={current:[]};events=V_();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},U_=b.createContext(null),W_=b.createContext(null),G_=()=>b.useContext(U_)?.id||null,K_=e=>{let t=b.useContext(W_);return e??t};function q_(e){let t=$g(),n=K_(e),r=G_();return Z(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function J_(e){let{children:t,id:n}=e,r=G_();return(0,y.jsx)(U_.Provider,{value:b.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Y_(e){let{children:t,externalTree:n}=e,r=Gp(()=>n??new H_).current;return(0,y.jsx)(W_.Provider,{value:r,children:t})}function X_(e){return e==null?e:`current`in e?e.current:e}function Z_(e,t){let n=op(fh(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Q_=20,$_=[];function ev(){$_=$_.filter(e=>e.deref()?.isConnected)}function tv(e){ev(),e&&ap(e)!==`body`&&($_.push(new WeakRef(e)),$_.length>Q_&&($_=$_.slice(-Q_)))}function nv(){return ev(),$_[$_.length-1]?.deref()}function rv(e){return e?bg(e)?e:Sg(e)[0]||e:null}function iv(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=xg(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return bg(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function av(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:x,dataRef:S}=h.context,C=Zm(()=>S.current.floatingContext?.nodeId),w=i===!1,T=vh(_)&&w,E=b.useRef([`content`]),D=qm(i),O=qm(a),k=qm(l),A=K_(p),j=L_(),M=b.useRef(!1),N=b.useRef(!1),P=b.useRef(!1),F=b.useRef(null),I=b.useRef(``),L=b.useRef(``),R=b.useRef(null),z=b.useRef(null),ee=Vm(R,f,j?.beforeInsideRef),B=Vm(z,j?.afterInsideRef),V=Xp(),H=Xp(),U=em(),te=j!=null,W=bh(v),ne=Zm((e=W)=>e?Sg(e):[]),G=Zm(()=>m?.().filter(e=>e!=null)??[]);b.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&dh(W,uh(Up(W)))&&ne().length===0&&!T&&pm(e)}return kp(Up(W),`keydown`,e)},[r,_,W,s,E,T,ne]),b.useEffect(()=>{if(r||!g)return;let e=Up(W);function t(){P.current=!1}function n(e){let t=fh(e),n=G();P.current=!(dh(v,t)||dh(_,t)||dh(j?.portalNode,t)||n.some(e=>e===t||dh(e,t))),L.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(N.current=!0)}function i(){L.current=`keyboard`}return Bm(kp(e,`pointerdown`,n,!0),kp(e,`pointerup`,t,!0),kp(e,`pointercancel`,t,!0),kp(e,`keydown`,i,!0))},[r,v,_,W,g,j,G]),b.useEffect(()=>{if(r||!c)return;let e=Up(W);function t(){N.current=!0,H.start(0,()=>{N.current=!1})}function n(e){let t=fh(e);bg(t)&&(F.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=fh(t);queueMicrotask(()=>{let a=C(),c=h.context.triggerElements,l=G(),f=n?.hasAttribute(Pg(`focus-guard`))&&[R.current,z.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,X_(d),X_(u)].includes(n),p=!(dh(_,n)||dh(v,n)||dh(n,v)||dh(j?.portalNode,n)||l.some(e=>e===n||dh(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>dh(e,n))||f||A&&(Mg(A.nodesRef.current,a).find(e=>dh(e.context?.elements.floating,n)||dh(e.context?.elements.domReference,n))||Ng(A.nodesRef.current,a).find(e=>[e.context?.elements.floating,bh(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&W&&iv(W,E),o&&r!==_&&!og(i)&&uh(e)===e.body){if(up(W)&&(W.focus(),o===`popup`)){U.request(()=>{W.focus()});return}let e=ne(),t=F.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||W;up(n)&&n.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(T||!s)&&n&&p&&!N.current&&(T||n!==nv())&&(M.current=!0,h.setOpen(!1,Im(km,t)))})}function a(){P.current||(S.current.insideReactTree=!0,V.start(0,()=>{S.current.insideReactTree=!1}))}let l=up(_)?_:null;if(!(!v&&!l))return Bm(l&&kp(l,`focusout`,i),l&&kp(l,`pointerdown`,t),v&&kp(v,`focusin`,n),v&&kp(v,`focusout`,i),v&&j&&kp(v,`focusout`,a,!0))},[r,_,v,W,s,A,j,h,c,o,ne,T,C,E,S,V,H,U,u,d,G]),b.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${Pg(`portal`)}]`)||[]),t=(A?Ng(A.nodesRef.current,C()):[]).find(e=>vh(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Jg([...[v,...e,R.current,z.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...G()],t,X_(d),X_(u),T?_:null].filter(e=>e!=null),{ariaHidden:s||T,mark:!1}),i=Jg([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,E,j,T,A,C,u,d,G]),Z(()=>{if(!g||r||!up(W))return;let e=uh(Up(W));queueMicrotask(()=>{let t=D.current,n=typeof t==`function`?t(k.current||``):t;if(n===void 0||n===!1||dh(W,e))return;let r=null,i=()=>(r??=ne(W),r[0]||W),a;a=n===!0||n===null?i():X_(n),a||=i(),Ig(a,{preventScroll:a===W})})},[r,g,W,w,ne,D,k]),Z(()=>{if(r||!W)return;let e=Up(W);tv(uh(e));function t(e){if(e.open||(I.current=Z_(e.nativeEvent,L.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(M.current=!0),e.reason===`outside-press`)if(e.nested)M.current=!1;else if(hm(e.nativeEvent)||gm(e.nativeEvent))M.current=!1;else{let e=!1;Up(W).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}x.on(`openchange`,t);function n(){let e=O.current,t=typeof e==`function`?e(I.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=_||nv();return e&&e.isConnected?e:null}let n=_||nv();return X_(t)||n||null}return()=>{x.off(`openchange`,t);let r=uh(e),i=G(),a=dh(v,r)||i.some(e=>e===r||dh(e,r))||A&&Mg(A.nodesRef.current,C(),!1).some(e=>dh(e.context?.elements.floating,r)),o=O.current,s=n();queueMicrotask(()=>{let t=rv(s),n=typeof o!=`boolean`;o&&!M.current&&up(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),M.current=!1})}},[r,v,W,O,S,x,A,_,C,G]),Z(()=>{if(!Pp||g||!v)return;let e=uh(Up(v));!up(e)||!gh(e)||dh(v,e)&&e.blur()},[g,v]),Z(()=>{if(!(r||!j))return j.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{j.setFocusManagerState(null)}},[r,j,s,g,h,c,_]),Z(()=>{if(!(r||!W))return iv(W,E),()=>{queueMicrotask(ev)}},[r,W,E]);let re=!r&&(s?!T:!0)&&(te||s);return(0,y.jsxs)(b.Fragment,{children:[re&&(0,y.jsx)(rh,{"data-type":`inside`,ref:ee,onFocus:e=>{if(s){let e=ne();Ig(e[e.length-1])}else j?.portalNode&&(M.current=!1,kg(e,j.portalNode)?wg(_)?.focus():X_(d??j.beforeOutsideRef)?.focus())}}),n,re&&(0,y.jsx)(rh,{"data-type":`inside`,ref:B,onFocus:e=>{s?Ig(ne()[0]):j?.portalNode&&(c&&(M.current=!0),kg(e,j.portalNode)?Tg(_)?.focus():X_(u??j.afterOutsideRef)?.focus())}})]})}function ov(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a=`click`,toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:u=wm}=t,d=b.useRef(void 0),f=em(),p=Xp(),m=b.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,i=e.nativeEvent,m=n.select(`open`);if(e.button!==0||a===`click`||_m(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,_=n.select(`domReferenceElement`)!==e.currentTarget,v=m&&_||!(m&&o&&(!(h&&c)||g===`click`||g===`mousedown`)),y=fh(i);if(gh(y)){let e=Im(u,i,y);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let b=e.currentTarget;f.request(()=>{let e=Im(u,i,b);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if(a===`mousedown-only`)return;let t=d.current;if(a===`mousedown`&&t){d.current=void 0;return}if(_m(t,!0)&&s)return;let i=n.select(`open`),f=r.current.openEvent,m=n.select(`domReferenceElement`)!==e.currentTarget,h=i&&m||!(i&&o&&(!(f&&c)||vm(f))),g=Im(u,e.nativeEvent,e.currentTarget);h&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,a,s,n,c,o,f,p,l,u]);return b.useMemo(()=>i?{reference:m}:rm,[i,m])}function sv(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function cv(e){return e!=null&&e.clientX!=null}function lv(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{enabled:s=!0,axis:c=`both`}=t,l=b.useRef(!1),u=b.useRef(null),[d,f]=b.useState(),[p,m]=b.useState([]),h=Zm((e,t,r)=>{l.current||o.current.openEvent&&!cv(o.current.openEvent)||n.set(`positionReference`,sv(r??a,{x:e,y:t,axis:c,dataRef:o,pointerType:d}))}),g=Zm(e=>{r?u.current||m([]):h(e.clientX,e.clientY,e.currentTarget)}),_=_m(d)?i:r,v=b.useCallback(()=>{if(!_||!s)return;let e=op(i);function t(e){dh(i,fh(e))?(u.current?.(),u.current=null):h(e.clientX,e.clientY)}if(!o.current.openEvent||cv(o.current.openEvent))return u.current=kp(e,`mousemove`,t),()=>{u.current?.(),u.current=null};n.set(`positionReference`,a)},[_,s,i,o,a,n,h]);b.useEffect(()=>v(),[v,p]),b.useEffect(()=>{s&&!i&&(l.current=!1)},[s,i]),b.useEffect(()=>{!s&&r&&(l.current=!0)},[s,r]);let y=b.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return b.useMemo(()=>s?{reference:y,trigger:y}:{},[s,y])}var uv={intentional:`onClick`,sloppy:`onPointerDown`};function dv(){return!1}function fv(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function pv(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=dv,referencePressEvent:d=`sloppy`,bubbles:f,externalTree:p}=t,m=K_(p),h=Zm(typeof c==`function`?c:()=>!1),g=typeof c==`function`?h:c,_=g!==!1,v=Zm(()=>l),y=b.useRef(!1),x=b.useRef(!1),S=b.useRef(!1),{escapeKey:C,outsidePress:w}=fv(f),T=b.useRef(null),E=Xp(),D=Xp(),O=Zm(()=>{D.clear(),a.current.insideReactTree=!1}),k=b.useRef(!1),A=b.useRef(``),j=Zm(u),M=Zm(e=>{if(!r||!o||!s||e.key!==`Escape`||k.current)return;let t=a.current.floatingContext?.nodeId,i=m?Mg(m.nodesRef.current,t):[];if(!C&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=Im(Am,mm(e)?e.nativeEvent:e);n.setOpen(!1,c),!C&&!c.isPropagationAllowed&&e.stopPropagation()}),N=Zm(()=>{a.current.insideReactTree=!0,D.start(0,O)});b.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=w;let e=new Yp,t=new Yp;function c(){e.clear(),k.current=!0}function l(){e.start(xp()?5:0,()=>{k.current=!1})}function u(){S.current=!0,t.start(0,()=>{S.current=!1})}function d(){y.current=!1,x.current=!1}function f(){let e=A.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=a.current.floatingContext?.nodeId,r=m&&Mg(m.nodesRef.current,t).some(t=>mh(e,t.context?.elements.floating));return mh(e,n.select(`floatingElement`))||mh(e,n.select(`domReferenceElement`))||r}function b(e){if(p(e)){O();return}if(a.current.insideReactTree){O();return}let r=fh(e),i=`[${Pg(`inert`)}]`,o=lp(r)?r.getRootNode():null,s=Array.from((dp(o)?o:Up(n.select(`floatingElement`))).querySelectorAll(i)),c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>dh(e,r))))return;let l=lp(r)?r:null;for(;l&&!Sp(l);){let e=Tp(l);if(Sp(e)||!lp(e))break;l=e}if(s.length&&lp(r)&&!hh(r)&&!dh(r,n.select(`floatingElement`))&&s.every(e=>!dh(l,e)))return;if(up(r)&&!(`touches`in e)){let t=Sp(r),n=Cp(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(h(e))return;if(f()===`intentional`&&S.current){t.clear(),S.current=!1;return}if(typeof g==`function`&&!g(e))return;let u=a.current.floatingContext?.nodeId,d=m?Mg(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,Im(Dm,e)),O()}function D(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||mh(e,n.select(`floatingElement`))||mh(e,n.select(`domReferenceElement`))||b(e)}function j(e){if(f()!==`sloppy`||!n.select(`open`)||!o||mh(e,n.select(`floatingElement`))||mh(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function N(e,t){let n=fh(e);if(!n)return;let r=kp(n,e.type,()=>{t(e),r()})}function P(e){A.current=`touch`,N(e,j)}function F(e){E.clear(),e.type===`pointerdown`&&(A.current=e.pointerType),!(e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)&&N(e,e=>{e.type===`pointerdown`?D(e):b(e)})}function I(e){if(!y.current)return;let n=x.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!h(e)){if(n){u();return}typeof g==`function`&&!g(e)||(t.clear(),S.current=!0,O())}}}function L(e){if(f()!==`sloppy`||!T.current||mh(e,n.select(`floatingElement`))||mh(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-T.current.startX),i=Math.abs(t.clientY-T.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(T.current.dismissOnTouchEnd=!0),a>10&&(b(e),E.clear(),T.current=null)}function R(e){N(e,L)}function z(e){f()!==`sloppy`||!T.current||mh(e,n.select(`floatingElement`))||mh(e,n.select(`domReferenceElement`))||(T.current.dismissOnTouchEnd&&b(e),E.clear(),T.current=null)}function ee(e){N(e,z)}let B=Up(i),V=Bm(s&&Bm(kp(B,`keydown`,M),kp(B,`compositionstart`,c),kp(B,`compositionend`,l)),_&&Bm(kp(B,`click`,F,!0),kp(B,`pointerdown`,F,!0),kp(B,`pointerup`,I,!0),kp(B,`pointercancel`,I,!0),kp(B,`mousedown`,F,!0),kp(B,`mouseup`,I,!0),kp(B,`touchstart`,P,!0),kp(B,`touchmove`,R,!0),kp(B,`touchend`,ee,!0)));return()=>{V(),e.clear(),t.clear(),d(),S.current=!1}},[a,i,s,_,g,r,o,C,w,M,O,v,m,n,E]),b.useEffect(O,[g,O]);let P=b.useMemo(()=>({onKeyDown:M,[uv[d]]:e=>{j()&&n.setOpen(!1,Im(wm,e.nativeEvent))},...d!==`intentional`&&{onClick(e){j()&&n.setOpen(!1,Im(`trigger-press`,e.nativeEvent))}}}),[M,n,d,j]),F=Zm(e=>{if(!r||!o||e.button!==0)return;let t=fh(e.nativeEvent);dh(n.select(`floatingElement`),t)&&(y.current||(y.current=!0,x.current=!1))}),I=Zm(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(x.current=!0)}),L=b.useMemo(()=>({onKeyDown:M,onPointerDown:I,onMouseDown:I,onClickCapture:N,onMouseDownCapture(e){N(),F(e)},onPointerDownCapture(e){N(),F(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[M,N,F,I]);return b.useMemo(()=>o?{reference:P,floating:L,trigger:P}:{},[o,P,L])}function mv(e,t,n){let{reference:r,floating:i}=e,a=Ph(t),o=Fh(t),s=Nh(o),c=Ah(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(jh(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function hv(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=kh(t,e),p=qh(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Jh(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Jh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var gv=50,_v=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:hv},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=mv(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<gv&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=mv(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},vv=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=kh(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ah(r),_=Ph(o),v=Ah(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Gh(o)]:Lh(o)),x=p!==`none`;!d&&x&&b.push(...Wh(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Ih(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Ph(t))||T.every(e=>Ph(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ph(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function yv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bv(e){return xh.some(t=>e[t]>=0)}var xv=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=kh(e,t);switch(i){case`referenceHidden`:{let e=yv(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:bv(e)}}}case`escaped`:{let e=yv(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:bv(e)}}}default:return{}}}}},Sv=new Set([`left`,`top`]);async function Cv(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ah(n),s=jh(n),c=Ph(n)===`y`,l=Sv.has(o)?-1:1,u=a&&c?-1:1,d=kh(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var wv=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Cv(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Tv=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=kh(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ph(Ah(i)),p=Mh(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Oh(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Oh(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ev=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=kh(e,t),u={x:n,y:r},d=Ph(i),f=Mh(d),p=u[f],m=u[d],h=kh(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Sv.has(Ah(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Dv=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=kh(e,t),u=await o.detectOverflow(t,l),d=Ah(i),f=jh(i),p=Ph(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Sh(h-u[g],v),x=Sh(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ch(u.left,0),t=Ch(u.right,0),n=Ch(u.top,0),r=Ch(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ch(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ch(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Ov(e){let t=Cp(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=up(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=wh(n)!==a||wh(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function kv(e){return lp(e)?e:e.contextElement}function Av(e){let t=kv(e);if(!up(t))return Eh(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ov(t),o=(a?wh(n.width):n.width)/r,s=(a?wh(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var jv=Eh(0);function Mv(e){let t=op(e);return!xp()||!t.visualViewport?jv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Nv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==op(e)?!1:t}function Pv(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=kv(e),o=Eh(1);t&&(r?lp(r)&&(o=Av(r)):o=Av(e));let s=Nv(a,n,r)?Mv(a):Eh(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=op(a),t=r&&lp(r)?op(r):r,n=e,i=Op(n);for(;i&&r&&t!==n;){let e=Av(i),t=i.getBoundingClientRect(),r=Cp(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=op(i),i=Op(n)}}return Jh({width:u,height:d,x:c,y:l})}function Fv(e,t){let n=wp(e).scrollLeft;return t?t.left+n:Pv(sp(e)).left+n}function Iv(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Fv(e,n),y:n.top+t.scrollTop}}function Lv(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=sp(r),s=t?mp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Eh(1),u=Eh(0),d=up(r);if((d||!d&&!a)&&((ap(r)!==`body`||fp(o))&&(c=wp(r)),d)){let e=Pv(r);l=Av(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Iv(o,c):Eh(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Rv(e){return Array.from(e.getClientRects())}function zv(e){let t=sp(e),n=wp(e),r=e.ownerDocument.body,i=Ch(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ch(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Fv(e),s=-n.scrollTop;return Cp(r).direction===`rtl`&&(o+=Ch(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Bv=25;function Vv(e,t){let n=op(e),r=sp(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=xp();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Fv(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Bv&&(a-=o)}else l<=Bv&&(a+=l);return{width:a,height:o,x:s,y:c}}function Hv(e,t){let n=Pv(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=up(e)?Av(e):Eh(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Uv(e,t,n){let r;if(t===`viewport`)r=Vv(e,n);else if(t===`document`)r=zv(sp(e));else if(lp(t))r=Hv(t,n);else{let n=Mv(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Jh(r)}function Wv(e,t){let n=Tp(e);return n===t||!lp(n)||Sp(n)?!1:Cp(n).position===`fixed`||Wv(n,t)}function Gv(e,t){let n=t.get(e);if(n)return n;let r=Dp(e,[],!1).filter(e=>lp(e)&&ap(e)!==`body`),i=null,a=Cp(e).position===`fixed`,o=a?Tp(e):e;for(;lp(o)&&!Sp(o);){let t=Cp(o),n=yp(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||fp(o)&&!n&&Wv(e,o))?r=r.filter(e=>e!==o):i=t,o=Tp(o)}return t.set(e,r),r}function Kv(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?mp(t)?[]:Gv(t,this._c):[].concat(n),r],o=Uv(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Uv(t,a[e],i);s=Ch(n.top,s),c=Sh(n.right,c),l=Sh(n.bottom,l),u=Ch(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function qv(e){let{width:t,height:n}=Ov(e);return{width:t,height:n}}function Jv(e,t,n){let r=up(t),i=sp(t),a=n===`fixed`,o=Pv(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Eh(0);function l(){c.x=Fv(i)}if(r||!r&&!a)if((ap(t)!==`body`||fp(i))&&(s=wp(t)),r){let e=Pv(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Iv(i,s):Eh(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Yv(e){return Cp(e).position===`static`}function Xv(e,t){if(!up(e)||Cp(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return sp(e)===n&&(n=n.ownerDocument.body),n}function Zv(e,t){let n=op(e);if(mp(e))return n;if(!up(e)){let t=Tp(e);for(;t&&!Sp(t);){if(lp(t)&&!Yv(t))return t;t=Tp(t)}return n}let r=Xv(e,t);for(;r&&pp(r)&&Yv(r);)r=Xv(r,t);return r&&Sp(r)&&Yv(r)&&!yp(r)?n:r||bp(e)||n}var Qv=async function(e){let t=this.getOffsetParent||Zv,n=this.getDimensions,r=await n(e.floating);return{reference:Jv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $v(e){return Cp(e).direction===`rtl`}var ey={convertOffsetParentRelativeRectToViewportRelativeRect:Lv,getDocumentElement:sp,getClippingRect:Kv,getOffsetParent:Zv,getElementRects:Qv,getClientRects:Rv,getDimensions:qv,getScale:Av,isElement:lp,isRTL:$v};function ty(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ny(e,t){let n=null,r,i=sp(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Th(d),h=Th(i.clientWidth-(u+f)),g=Th(i.clientHeight-(d+p)),_=Th(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ch(0,Sh(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!ty(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function ry(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=kv(e),u=i||a?[...l?Dp(l):[],...t?Dp(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?ny(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Pv(e):null;c&&g();function g(){let t=Pv(e);h&&!ty(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var iy=wv,ay=Tv,oy=vv,sy=Dv,cy=xv,ly=Ev,uy=(e,t,n)=>{let r=new Map,i={platform:ey,...n},a={...i.platform,_c:r};return _v(e,t,{...i,platform:a})},dy=typeof document<`u`?b.useLayoutEffect:function(){};function fy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!fy(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!fy(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function py(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function my(e,t){let n=py(e);return Math.round(t*n)/n}function hy(e){let t=b.useRef(e);return dy(()=>{t.current=e}),t}function gy(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);fy(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=hy(c),O=hy(i),k=hy(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),uy(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!fy(T.current,t)&&(T.current=t,F_.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);dy(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);dy(()=>(j.current=!0,()=>{j.current=!1}),[]),dy(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),P=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=my(N.floating,u.x),r=my(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...py(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var _y=(e,t)=>{let n=iy(e);return{name:n.name,fn:n.fn,options:[e,t]}},vy=(e,t)=>{let n=ay(e);return{name:n.name,fn:n.fn,options:[e,t]}},yy=(e,t)=>({fn:ly(e).fn,options:[e,t]}),by=(e,t)=>{let n=oy(e);return{name:n.name,fn:n.fn,options:[e,t]}},xy=(e,t)=>{let n=sy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sy=(e,t)=>{let n=cy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(t_(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},Cy=o((e=>{var t=f();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),wy=o(((e,t)=>{t.exports=Cy()})),Ty=o((e=>{var t=f(),n=wy();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Ey=o(((e,t)=>{t.exports=Ty()})),Dy=[],Oy=void 0;function ky(){return Oy}function Ay(e){Dy.push(e)}function jy(e){let t=(t,n)=>{let r=Gp(Ny).current,i;try{Oy=r;for(let e of Dy)e.before(r);i=e(t,n);for(let e of Dy)e.after(r);r.didInitialize=!0}finally{Oy=void 0}return i};return t.displayName=e.displayName||e.name,t}function My(e){return b.forwardRef(jy(e))}function Ny(){return{didInitialize:!1}}var Py=wy(),Fy=Ey(),Iy=r_(19)?zy:By;function Ly(e,t,n,r,i){return Iy(e,t,n,r,i)}function Ry(e,t,n,r,i){let a=b.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Py.useSyncExternalStore)(e.subscribe,a,a)}Ay({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Py.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function zy(e,t,n,r,i){let a=ky();if(!a)return Ry(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function By(e,t,n,r,i){return(0,Fy.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Vy=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Ly(this,e,t,n,r)}},Hy=class extends Vy{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e),Z(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;Z(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;Z(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=t!==void 0;Z(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return b.useDebugValue(e),Ly(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=Zm(t??tm);this.context[e]=n}useStateSetter(e){let t=b.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Uy={open:Q(e=>e.open),transitionStatus:Q(e=>e.transitionStatus),domReferenceElement:Q(e=>e.domReferenceElement),referenceElement:Q(e=>e.positionReference??e.referenceElement),floatingElement:Q(e=>e.floatingElement),floatingId:Q(e=>e.floatingId)},Wy=class extends Hy{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:V_(),nested:n,triggerElements:i},Uy),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&vm(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Gy(e,t=!1,n=!1){let[r,i]=b.useState(e&&t?`idle`:void 0),[a,o]=b.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),Z(()=>{if(!e&&a&&r!==`ending`&&n){let e=$p.request(()=>{i(`ending`)});return()=>{$p.cancel(e)}}},[e,a,r,n]),Z(()=>{if(!e||t)return;let n=$p.request(()=>{i(void 0)});return()=>{$p.cancel(n)}},[t,e]),Z(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=$p.request(()=>{i(`idle`)});return()=>{$p.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}var Ky=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),qy={[Ky.startingStyle]:``},Jy={[Ky.endingStyle]:``},Yy={transitionStatus(e){return e===`starting`?qy:e===`ending`?Jy:null}};function Xy(e,t=!1,n=!0){let r=em();return Zm((i,a=null)=>{r.cancel();let o=X_(e);if(o==null)return;let s=o,c=()=>{F_.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=Ky.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Zy(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=Zm(i),o=Xy(r,n,!1);b.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function Qy(e,t){let n=b.useRef(null),r=b.useRef(null);return b.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function $y(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Qy(e,n),o=Zm(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return Z(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function eb(e){let t=e.useState(`open`);Z(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function tb(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Gy(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=Zm(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Zy({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var nb=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function rb(){return new Wy({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new nb,floatingId:``,syncOnly:!1,nested:!1,onOpenChange:void 0})}function ib(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:rb(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:rm,inactiveTriggerProps:rm,popupProps:rm}}var ab=Q(e=>e.triggerIdProp??e.activeTriggerId),ob={open:Q(e=>e.openProp??e.open),mounted:Q(e=>e.mounted),transitionStatus:Q(e=>e.transitionStatus),floatingRootContext:Q(e=>e.floatingRootContext),preventUnmountingOnClose:Q(e=>e.preventUnmountingOnClose),payload:Q(e=>e.payload),activeTriggerId:ab,activeTriggerElement:Q(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Q((e,t)=>t!==void 0&&ab(e)===t),isOpenedByTrigger:Q((e,t)=>t!==void 0&&ab(e)===t&&e.open),isMountedByTrigger:Q((e,t)=>t!==void 0&&ab(e)===t&&e.mounted),triggerProps:Q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Q(e=>e.popupProps),popupElement:Q(e=>e.popupElement),positionerElement:Q(e=>e.positionerElement)};function sb(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=$g(),a=G_()!=null,o=Gp(()=>new Wy({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new nb,floatingId:i,syncOnly:!1,nested:a})).current;return Z(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=lp(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function cb(e={}){let{nodeId:t,externalTree:n}=e,r=sb(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=b.useState(null),c=b.useRef(null),l=K_(n);Z(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=gy({...e,elements:{...a,...o&&{reference:o}}}),d=b.useCallback(e=>{let t=lp(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=b.useState(void 0),[m,h]=b.useState(null);i.useSyncedValue(`referenceElement`,f??null);let g=lp(f)?f:null;i.useSyncedValue(`domReferenceElement`,f===void 0?a.domReference:g),i.useSyncedValue(`floatingElement`,m);let _=b.useCallback(e=>{(lp(e)||e===null)&&(c.current=e,p(e)),(lp(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!lp(e))&&u.refs.setReference(e)},[u.refs,p]),v=b.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),y=b.useMemo(()=>({...u.refs,setReference:_,setFloating:v,setPositionReference:d,domReference:c}),[u.refs,_,v,d]),x=b.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),S=i.useState(`open`),C=i.useState(`floatingId`),w=b.useMemo(()=>({...u,dataRef:i.context.dataRef,open:S,onOpenChange:i.setOpen,events:i.context.events,floatingId:C,refs:y,elements:x,nodeId:t,rootStore:i}),[u,y,x,t,i,S,C]);return Z(()=>{i.context.dataRef.current.floatingContext=w;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=w)}),b.useMemo(()=>({...u,context:w,refs:y,elements:x,rootStore:i}),[u,y,x,w,i])}function lb(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,i=$g(),a=G_()!=null,o=t.useState(`open`),s=t.useState(`activeTriggerElement`),c=t.useState(n?`popupElement`:`positionerElement`),l=t.context.triggerElements,u=Gp(()=>new Wy({open:o,transitionStatus:void 0,referenceElement:s,floatingElement:c,triggerElements:l,onOpenChange:r,floatingId:i,syncOnly:!0,nested:a})).current;return Z(()=>{let e={open:o,floatingId:i,referenceElement:s,floatingElement:c};lp(s)&&(e.domReferenceElement=s),u.state.positionReference===u.state.referenceElement&&(e.positionReference=s),u.update(e)},[o,i,s,c,u]),u.context.onOpenChange=r,u.context.nested=a,u}var ub=Rp&&Ip;function db(e,t={}){let n=`rootStore`in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:a=!0,delay:o}=t,s=b.useRef(!1),c=b.useRef(null),l=Xp(),u=b.useRef(!0);b.useEffect(()=>{let e=n.select(`domReferenceElement`);if(!a)return;let t=op(e);function r(){let e=n.select(`domReferenceElement`);!n.select(`open`)&&up(e)&&e===uh(Up(e))&&(s.current=!0)}function i(){u.current=!0}function o(){u.current=!1}return Bm(kp(t,`blur`,r),ub&&kp(t,`keydown`,i,!0),ub&&kp(t,`pointerdown`,o,!0))},[n,a]),b.useEffect(()=>{if(!a)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=n.select(`domReferenceElement`);lp(e)&&(c.current=e,s.current=!0)}}return r.on(`openchange`,e),()=>{r.off(`openchange`,e)}},[r,a,n]);let d=b.useMemo(()=>({onMouseLeave(){s.current=!1,c.current=null},onFocus(e){let t=e.currentTarget;if(s.current){if(c.current===t)return;s.current=!1,c.current=null}let r=fh(e.nativeEvent);if(lp(r)){if(ub&&!e.relatedTarget){if(!u.current&&!gh(r))return}else if(!yh(r))return}let i=ph(e.relatedTarget,n.context.triggerElements),{nativeEvent:a,currentTarget:d}=e,f=typeof o==`function`?o():o;if(n.select(`open`)&&i||f===0||f===void 0){n.setOpen(!0,Im(Em,a,d));return}l.start(f,()=>{s.current||n.setOpen(!0,Im(Em,a,d))})},onBlur(e){s.current=!1,c.current=null;let t=e.relatedTarget,r=e.nativeEvent,a=lp(t)&&t.hasAttribute(Pg(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let e=n.select(`domReferenceElement`),o=uh(Up(e));!t&&o===e||dh(i.current.floatingContext?.refs.floating.current,o)||dh(e,o)||a||ph(t??o,n.context.triggerElements)||n.setOpen(!1,Im(Em,r))})}}),[i,n,l,o]);return b.useMemo(()=>a?{reference:d,trigger:d}:{},[a,d])}var fb=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Yp,this.restTimeout=new Yp,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},pb=new WeakMap;function mb(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&pb.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),pb.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function hb(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=pb.get(n);a&&a!==e&&mb(a),mb(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,pb.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function gb(e){let t=Gp(fb.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,qp(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function _b(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0,nodeId:l}=t,u=gb(n),d=K_(),f=G_(),p=Zm(()=>Sm(o.current.openEvent?.type,u.interactedInside)),m=Zm(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),h=Zm(e=>ph(e,n.context.triggerElements)),g=b.useCallback(e=>{let t=bm(c,`close`,u.pointerType),r=()=>{n.setOpen(!1,Im(Tm,e)),d?.events.emit(`floating.closed`,e)};t?u.openChangeTimeout.start(t,r):(u.openChangeTimeout.clear(),r())},[c,n,u,d]),_=Zm(()=>{mb(u)}),v=Zm(e=>{let t=fh(e);if(!_h(t)){u.interactedInside=!1;return}u.interactedInside=t?.closest(`[aria-haspopup]`)!=null});Z(()=>{r||(u.pointerType=void 0,u.restTimeoutPending=!1,u.interactedInside=!1,_())},[r,u,_]),b.useEffect(()=>_,[_]),Z(()=>{if(s&&r&&u.handleCloseOptions?.blockPointerEvents&&m()&&lp(a)&&i){let e=a,t=i,n=Up(i),r=d?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),hb(u,{scopeElement:u.handleCloseOptions?.getScope?.()??u.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{_()}}},[s,r,a,i,u,m,d,f,_]);let y=Xp();b.useEffect(()=>{if(!s)return;function e(){u.openChangeTimeout.clear(),y.clear(),d?.events.off(`floating.closed`,r),_()}function t(e){if(d&&f&&Mg(d.nodesRef.current,f).length>0){d.events.on(`floating.closed`,r);return}if(h(e.relatedTarget))return;let t=o.current.floatingContext?.nodeId??l,n=e.relatedTarget;if(!(d&&t&&lp(n)&&Mg(d.nodesRef.current,t,!1).some(e=>dh(e.context?.elements.floating,n)))){if(u.handler){u.handler(e);return}_(),p()||g(e)}}function r(e){!d||!f||Mg(d.nodesRef.current,f).length>0||y.start(0,()=>{d.events.off(`floating.closed`,r),n.setOpen(!1,Im(Tm,e)),d.events.emit(`floating.closed`,e)})}let a=i;return Bm(a&&kp(a,`mouseenter`,e),a&&kp(a,`mouseleave`,t),a&&kp(a,`pointerdown`,v,!0),()=>{d?.events.off(`floating.closed`,r)})},[s,i,n,o,l,p,h,g,_,v,u,d,f,y])}var vb={current:null};function yb(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:d=vb,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m,isClosing:h}=t,g=K_(f),_=gb(n),v=b.useRef(!1),y=qm(s),x=qm(o),S=qm(l),C=qm(a),w=qm(h);p&&(_.handleCloseOptions=y.current?.__options);let T=Zm(()=>Sm(r.current.openEvent?.type,_.interactedInside)),E=Zm(e=>ph(e,n.context.triggerElements)),D=Zm((e,t,r)=>{let i=n.context.triggerElements;if(i.hasElement(t))return!e||!dh(e,t);if(!lp(r))return!1;let a=r;return i.hasMatchingElement(e=>dh(e,a))&&(!e||!dh(e,a))}),O=Zm((e,t=!0)=>{let r=bm(x.current,`close`,_.pointerType);r?_.openChangeTimeout.start(r,()=>{n.setOpen(!1,Im(Tm,e)),g?.events.emit(`floating.closed`,e)}):t&&(_.openChangeTimeout.clear(),n.setOpen(!1,Im(Tm,e)),g?.events.emit(`floating.closed`,e))}),k=Zm(()=>{_.handler&&=(Up(n.select(`domReferenceElement`)).removeEventListener(`mousemove`,_.handler),void 0)}),A=Zm(()=>{mb(_)});return b.useEffect(()=>k,[k]),b.useEffect(()=>{if(!a)return;function e(e){e.open?v.current=!1:(v.current=e.reason===Tm,k(),_.openChangeTimeout.clear(),_.restTimeout.clear(),_.blockMouseMove=!0,_.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,_,k]),b.useEffect(()=>{if(!a)return;let e=d.current??(p?n.select(`domReferenceElement`):null);if(!lp(e))return;function t(e){if(_.openChangeTimeout.clear(),_.blockMouseMove=!1,c&&!_m(_.pointerType))return;let t=xm(S.current),r=bm(x.current,`open`,_.pointerType),i=fh(e),a=e.currentTarget??null,o=n.select(`domReferenceElement`),s=a;if(lp(i)&&!n.context.triggerElements.hasElement(i)){for(let e of n.context.triggerElements.elements())if(dh(e,i)){s=e;break}}lp(a)&&lp(o)&&!n.context.triggerElements.hasElement(a)&&dh(a,o)&&(s=o);let l=s==null?!1:D(o,s,i),u=n.select(`open`),d=w.current?.()??n.select(`transitionStatus`)===`ending`,f=!u&&d&&v.current,p=!l&&lp(s)&&lp(o)&&dh(o,s)&&f,m=t>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){n.setOpen(!0,Im(Tm,e,s));return}m||(r?_.openChangeTimeout.start(r,()=>{g&&n.setOpen(!0,Im(Tm,e,s))}):g&&n.setOpen(!0,Im(Tm,e,s)))}function i(e){if(T()){A();return}k();let t=Up(n.select(`domReferenceElement`));_.restTimeout.clear(),_.restTimeoutPending=!1;let i=r.current.floatingContext??m?.();if(!E(e.relatedTarget)){if(y.current&&i){n.select(`open`)||_.openChangeTimeout.clear();let r=d.current;_.handler=y.current({...i,tree:g,x:e.clientX,y:e.clientY,onClose(){A(),k(),C.current&&!T()&&r===n.select(`domReferenceElement`)&&O(e,!0)}}),t.addEventListener(`mousemove`,_.handler),_.handler(e);return}(_.pointerType!==`touch`||!dh(n.select(`floatingElement`),e.relatedTarget))&&O(e)}}return u?Bm(kp(e,`mousemove`,t,{once:!0}),kp(e,`mouseenter`,t),kp(e,`mouseleave`,i)):Bm(kp(e,`mouseenter`,t),kp(e,`mouseleave`,i))},[k,A,r,x,O,n,a,y,_,p,D,T,E,c,u,S,d,g,C,m,w]),b.useMemo(()=>{if(!a)return;function e(e){_.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.select(`open`),o=D(i,r,e.target);if(c&&!_m(_.pointerType))return;if(a&&o&&_.handleCloseOptions?.blockPointerEvents){let e=n.select(`floatingElement`);e&&hb(_,{scopeElement:_.handleCloseOptions?.getScope?.()??r.ownerDocument.body,referenceElement:r,floatingElement:e})}let s=xm(S.current);if(a&&!o||s===0||!o&&_.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;_.restTimeout.clear();function l(){if(_.restTimeoutPending=!1,T())return;let e=n.select(`open`);!_.blockMouseMove&&(!e||o)&&n.setOpen(!0,Im(Tm,t,r))}_.pointerType===`touch`?F_.flushSync(()=>{l()}):o&&a?l():(_.restTimeoutPending=!0,_.restTimeout.start(s,l))}}},[a,_,T,D,c,n,S])}function bb(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=b.useCallback(t=>xb(t,e,`reference`),t),o=b.useCallback(t=>xb(t,e,`floating`),n),s=b.useCallback(t=>xb(t,e,`item`),r),c=b.useCallback(t=>xb(t,e,`trigger`),i);return b.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function xb(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[ih]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&Sb(a,s,i,r)}return Sb(a,e,i,r),a}function Sb(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var Cb=`Escape`;function wb(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Tb(e,t){return wb(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Eb(e,t,n){return wb(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Db(e,t,n){return wb(t,n?e===oh:e===sh,e===lh)}function Ob(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Cb:wb(t,n?e===sh:e===oh,e===ch)}function kb(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:f=!1,loopFocus:p=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:_=`auto`,focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:S=`vertical`,parentOrientation:C,cols:w=1,id:T,resetOnPointerLeave:E=!0,externalTree:D}=t,O=qm(bh(i)),k=G_(),A=K_(D);Z(()=>{o.current.orientation=S},[o,S]);let j=vh(a),M=b.useRef(_),N=b.useRef(d??-1),P=b.useRef(null),F=b.useRef(!0),I=Zm(e=>{l(N.current===-1?null:N.current,e)}),L=b.useRef(I),R=b.useRef(!!i),z=b.useRef(r),ee=b.useRef(!1),B=b.useRef(!1),V=b.useRef(null),H=qm(x),U=qm(r),te=qm(d),W=qm(E),ne=Zm(()=>{function e(e){g?A?.events.emit(`virtualfocus`,e):V.current=Ig(e,{sync:ee.current,preventScroll:!0})}let t=s.current[N.current],n=B.current;t&&e(t),(ee.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[N.current]||t;r&&(t||e(r),ie&&(n||!F.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});Z(()=>{u&&(r&&i?(N.current=d??-1,M.current&&d!=null&&(B.current=!0,I())):R.current&&(N.current=-1,L.current()))},[u,r,i,d,I]),Z(()=>{if(u){if(!r){ee.current=!1;return}if(i)if(c==null){if(ee.current=!1,te.current!=null)return;if(R.current&&(N.current=-1,ne()),(!z.current||!R.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(N.current=P.current==null||Eb(P.current,S,h)||m?Zh(s):Qh(s),P.current=null,I())};t()}}else Xh(s.current,c)||(N.current=c,ne(),B.current=!1)}},[u,r,i,c,te,m,s,S,h,I,ne,H]),Z(()=>{if(!u||i||!A||g||!R.current)return;let e=A.nodesRef.current,t=e.find(e=>e.id===k)?.context?.elements.floating,n=uh(Up(i)),r=e.some(e=>e.context&&dh(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[u,i,A,k,g]),Z(()=>{L.current=I,z.current=r,R.current=!!i}),Z(()=>{r||(P.current=null,M.current=_)},[r,_]);let G=c!=null,re=Zm(e=>{if(!U.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&(N.current!==t||c!==t)&&(N.current=t,I(e))}),ie=b.useMemo(()=>({onFocus(e){ee.current=!0,re(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){ee.current=!0,B.current=!1,v&&re(e)},onPointerLeave(e){if(!U.current||!F.current||e.pointerType===`touch`)return;ee.current=!0;let t=e.relatedTarget;if(!(!v||s.current.includes(t))&&W.current&&(V.current?.(),V.current=null,N.current=-1,I(e),!g)){let e=O.current,t=uh(Up(e));e&&dh(e,t)&&e.focus({preventScroll:!0})}}}),[re,U,O,v,s,I,W,g]),ae=b.useCallback(()=>C??A?.nodesRef.current.find(e=>e.id===k)?.context?.dataRef?.current.orientation,[k,A,C]),oe=Zm(e=>{if(F.current=!1,ee.current=!0,e.which===229||!U.current&&e.currentTarget===O.current)return;if(m&&Ob(e.key,S,h,w)){Tb(e.key,ae())||pm(e),n.setOpen(!1,Im(jm,e.nativeEvent)),up(a)&&(g?A?.events.emit(`virtualfocus`,a):a.focus());return}let t=N.current,i=Zh(s,x),o=Qh(s,x);if(j||(e.key===`Home`&&(pm(e),N.current=i,I(e)),e.key===`End`&&(pm(e),N.current=o,I(e))),w>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=tg(t,w,!1),r=n.findIndex(e=>e!=null&&!ig(s.current,e,x)),a=n.reduce((e,t,n)=>t!=null&&!ig(s.current,t,x)?n:e,-1),c=n[eg(n.map(e=>e==null?null:s.current[e]),{event:e,orientation:S,loopFocus:p,rtl:h,cols:w,disabledIndices:rg([...(typeof x==`function`?null:x)||s.current.map((e,t)=>ig(s.current,t,x)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:ng(N.current>o?i:N.current,t,n,w,e.key===`ArrowDown`?`bl`:e.key===(h?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(N.current=c,I(e)),S===`both`)return}if(Tb(e.key,S)){if(pm(e),r&&!g&&uh(e.currentTarget.ownerDocument)===e.currentTarget){N.current=Eb(e.key,S,h)?i:o,I(e);return}Eb(e.key,S,h)?p?t>=o?f&&t!==s.current.length?N.current=-1:(ee.current=!1,N.current=i):N.current=$h(s.current,{startingIndex:t,disabledIndices:x}):N.current=Math.min(o,$h(s.current,{startingIndex:t,disabledIndices:x})):p?t<=i?f&&t!==-1?N.current=s.current.length:(ee.current=!1,N.current=o):N.current=$h(s.current,{startingIndex:t,decrement:!0,disabledIndices:x}):N.current=Math.max(i,$h(s.current,{startingIndex:t,decrement:!0,disabledIndices:x})),Xh(s.current,N.current)&&(N.current=-1),I(e)}}),se=b.useMemo(()=>g&&r&&G&&{"aria-activedescendant":`${T}-${c}`},[g,r,G,T,c]),ce=b.useMemo(()=>({"aria-orientation":S===`both`?void 0:S,...j?{}:se,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!g){let t=fh(e.nativeEvent);if(t&&!dh(O.current,t))return;pm(e),n.setOpen(!1,Im(km,e.nativeEvent)),up(a)&&a.focus();return}oe(e)},onPointerMove(){F.current=!0}}),[se,oe,O,S,j,n,r,g,a]),le=b.useMemo(()=>{function e(e){_===`auto`&&hm(e.nativeEvent)&&(M.current=!g)}function t(e){M.current=_,_===`auto`&&gm(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(e){let t=n.select(`open`);F.current=!1;let r=e.key.startsWith(`Arrow`),i=Db(e.key,ae(),h),a=Tb(e.key,S),o=(m?i:a)||e.key===`Enter`||e.key.trim()===``;if(g&&t)return oe(e);if(!(!t&&!y&&r)){if(o){let t=Tb(e.key,ae());P.current=m&&t?null:e.key}if(m){i&&(pm(e),t?(N.current=Zh(s,H.current),I(e)):n.setOpen(!0,Im(jm,e.nativeEvent,e.currentTarget)));return}a&&(te.current!=null&&(N.current=te.current),pm(e),!t&&y?n.setOpen(!0,Im(jm,e.nativeEvent,e.currentTarget)):oe(e),t&&I(e))}},onFocus(e){n.select(`open`)&&!g&&(N.current=-1,I(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[oe,H,_,s,m,I,n,y,S,ae,h,te,g]),ue=b.useMemo(()=>({...se,...le}),[se,le]);return b.useMemo(()=>u?{reference:ue,floating:ce,item:ie,trigger:le}:{},[u,ue,ce,le,ie])}var Ab=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function jb(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingId`),a=n.useState(`domReferenceElement`),o=n.useState(`floatingElement`),{role:s=`dialog`}=t,c=$g(),l=a?.id||c,u=b.useMemo(()=>bh(o)?.id||i,[o,i]),d=Ab.get(s)??s,f=G_()!=null,p=b.useMemo(()=>d===`tooltip`||s===`label`?rm:{"aria-haspopup":d===`alertdialog`?`dialog`:d,"aria-expanded":`false`,...d===`listbox`&&{role:`combobox`},...d===`menu`&&f&&{role:`menuitem`},...s===`select`&&{"aria-autocomplete":`none`},...s===`combobox`&&{"aria-autocomplete":`list`}},[d,f,s]),m=b.useMemo(()=>d===`tooltip`||s===`label`?{[`aria-${s===`label`?`labelledby`:`describedby`}`]:r?u:void 0}:{...p,"aria-expanded":r?`true`:`false`,"aria-controls":r?u:void 0,...d===`menu`&&{id:l}},[d,u,r,l,s,p]),h=b.useMemo(()=>{let e={id:u,...d&&{role:d}};return d===`tooltip`||s===`label`?e:{...e,...d===`menu`&&{"aria-labelledby":l}}},[d,u,l,s]),g=b.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${u}-fui-option`}};switch(s){case`select`:case`combobox`:return{...n,"aria-selected":t};default:}return{}},[u,s]);return b.useMemo(()=>({reference:m,floating:h,item:g,trigger:p}),[m,h,p,g])}function Mb(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,elementsRef:o,activeIndex:s,onMatch:c,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,p=Xp(),m=b.useRef(``),h=b.useRef(f??s??-1),g=b.useRef(null);Z(()=>{!i&&f!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[i,f,p]),Z(()=>{i&&m.current===``&&(h.current=f??s??-1)},[i,f,s]);let _=Zm(e=>{e?r.current.typing||(r.current.typing=e,l?.(e)):r.current.typing&&(r.current.typing=e,l?.(e))}),v=Zm(e=>{function t(e){let t=o?.current[e];return!t||og(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=a.current;if(m.current.length>0&&e.key===` `&&(pm(e),_(!0)),m.current.length>0&&m.current[0]!==` `&&n(r,m.current)===-1&&e.key!==` `&&_(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(pm(e),_(!0));let l=m.current===``;l&&(h.current=f??s??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(d,()=>{m.current=``,h.current=g.current,_(!1)});let u=((l?f??s??-1:h.current)??0)+1,v=n(r,m.current,u);v===-1?e.key!==` `&&(m.current=``,_(!1)):(c?.(v),g.current=v)}),y=Zm(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=dh(r,t),o=dh(i,t);a||o||(p.clear(),m.current=``,h.current=g.current,_(!1))}),x=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]),S=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return b.useMemo(()=>u?{reference:x,floating:S}:{},[u,x,S])}var Nb=.1,Pb=Nb*Nb,Fb=.5;function Ib(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Lb(e,t,n,r,i,a,o,s,c,l){let u=!1;return Ib(e,t,n,r,i,a)&&(u=!u),Ib(e,t,i,a,o,s)&&(u=!u),Ib(e,t,o,s,c,l)&&(u=!u),Ib(e,t,c,l,n,r)&&(u=!u),u}function Rb(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function zb(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Bb(e={}){let{blockPointerEvents:t=!1}=e,n=new Yp,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Pb;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=fh(r),g=r.type===`mouseleave`,_=dh(u,h),v=dh(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&lp(r.relatedTarget)&&dh(u,r.relatedTarget))return;function y(){return!!(s&&Mg(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=zb(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=zb(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=zb(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=zb(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Rb(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Fb/2:Fb*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Fb+1,o=C||T?S.bottom-Fb:S.top,s=C?T?S.bottom-Fb:S.top:S.bottom-Fb;M=Lb(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Fb/2:Fb*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Fb,o=C||T?S.top+Fb:S.bottom,s=C?T?S.top+Fb:S.bottom:S.top+Fb;M=Lb(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Fb/2:Fb*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Fb+1,o=w||E?S.right-Fb:S.left,s=w?E?S.right-Fb:S.left:S.right-Fb;M=Lb(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Fb/2:Fb*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Fb,o=w||E?S.left+Fb:S.right,s=w?E?S.left+Fb:S.right:S.left+Fb;M=Lb(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function Vb(e){let t=b.useRef(``),n=b.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:b.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function Hb(e,t){let n=b.useRef(e),r=Zm(t);Z(()=>{n.current!==e&&r(n.current)},[e,r]),Z(()=>{n.current=e},[e])}function Ub(e){let[t,n]=b.useState(null),r=Zm((t,r)=>{e||n(r||(Fp?`touch`:``))});Hb(e,t=>{t&&!e&&n(null)});let{onClick:i,onPointerDown:a}=Vb(r);return b.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}function Wb(e){let{store:t,parentContext:n,actionsRef:r,isDrawer:i}=e,a=t.useState(`open`),o=t.useState(`disablePointerDismissal`),s=t.useState(`modal`),c=t.useState(`popupElement`),{openMethod:l,triggerProps:u}=Ub(a);eb(t);let{forceUnmount:d}=tb(a,t),f=b.useCallback(()=>{t.setOpen(!1,Im(Pm))},[t]);b.useImperativeHandle(r,()=>({unmount:d,close:f}),[d,f]);let p=lb({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0}),[m,h]=b.useState(0),[g,_]=b.useState(0),v=m===0,y=jb(p),x=pv(p,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:s===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=fh(e);if(v&&!o){let e=n;return s&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||dh(e,c)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:v});fm(a&&s===!0,c);let{getReferenceProps:S,getFloatingProps:C,getTriggerProps:w}=bb([y,x]);t.useContextCallback(`onNestedDialogOpen`,(e,t)=>{h(e),_(t)}),t.useContextCallback(`onNestedDialogClose`,()=>{h(0),_(0)}),b.useEffect(()=>(n?.onNestedDialogOpen&&a&&n.onNestedDialogOpen(m+1,g+ +!!i),n?.onNestedDialogClose&&!a&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&a&&n.onNestedDialogClose()}),[i,a,m,g,n]);let T=b.useMemo(()=>S(u),[S,u]),E=b.useMemo(()=>w(u),[w,u]),D=b.useMemo(()=>C(),[C]);t.useSyncedValues({openMethod:l,activeTriggerProps:T,inactiveTriggerProps:E,popupProps:D,floatingRootContext:p,nestedOpenDialogCount:m,nestedOpenDrawerCount:g})}var Gb=b.createContext(void 0);function Kb(e){let t=b.useContext(Gb);if(e===!1&&t===void 0)throw Error(t_(27));return t}var qb={...ob,modal:Q(e=>e.modal),nested:Q(e=>e.nested),nestedOpenDialogCount:Q(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:Q(e=>e.nestedOpenDrawerCount),disablePointerDismissal:Q(e=>e.disablePointerDismissal),openMethod:Q(e=>e.openMethod),descriptionElementId:Q(e=>e.descriptionElementId),titleElementId:Q(e=>e.titleElementId),viewportElement:Q(e=>e.viewportElement),role:Q(e=>e.role)},Jb=class e extends Hy{constructor(e){super(Yb(e),{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new nb,onOpenChange:void 0,onOpenChangeComplete:void 0},qb)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};static useStore(t,n){let r=Gp(()=>new e(n)).current;return t??r}};function Yb(e={}){return{...ib(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}var Xb=b.createContext(!1);function Zb(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,actionsRef:o,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=Kb(!0),d=!!u,f=Jb.useStore(s?.store,{open:r,openProp:n,activeTriggerId:l,triggerIdProp:c,modal:!0,disablePointerDismissal:!0,nested:d,role:`alertdialog`});f.useControlledProp(`openProp`,n),f.useControlledProp(`triggerIdProp`,c),f.useSyncedValue(`nested`,d),f.useContextCallback(`onOpenChange`,i),f.useContextCallback(`onOpenChangeComplete`,a);let p=f.useState(`payload`);Wb({store:f,actionsRef:o,parentContext:u?.store.context,isDrawer:!1,onOpenChange:i,triggerIdProp:c});let m=b.useMemo(()=>({store:f}),[f]);return(0,y.jsx)(Xb.Provider,{value:!1,children:(0,y.jsx)(Gb.Provider,{value:m,children:typeof t==`function`?t({payload:p}):t})})}var Qb=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Ky.startingStyle]=`startingStyle`,e[e.endingStyle=Ky.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),$b=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),ex={[$b.popupOpen]:``},tx={[$b.popupOpen]:``,[$b.pressed]:``},nx={[Qb.open]:``},rx={[Qb.closed]:``},ix={[Qb.anchorHidden]:``},ax={open(e){return e?ex:null}},ox={open(e){return e?tx:null}},sx={open(e){return e?nx:rx},anchorHidden(e){return e?ix:null}},cx={...sx,...Yy},lx=b.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=Kb(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return w_(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:cx,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),ux=b.createContext(void 0);function dx(e=!1){let t=b.useContext(ux);if(t===void 0&&!e)throw Error(t_(16));return t}function fx(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:b.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function px(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=b.useRef(null),s=dx(!0),c=a??s!==void 0,{props:l}=fx({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=b.useCallback(()=>{let e=o.current;mx(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return Z(u,[u]),{getButtonProps:b.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return u_({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(x_(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=mx(a),l=!i&&hx(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(x_(e),a?.(e),e.target===e.currentTarget&&i&&c&&mx(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Zm(e=>{o.current=e,u()})}}function mx(e){return up(e)&&e.tagName===`BUTTON`}function hx(e){return!!(e?.tagName===`A`&&e?.href)}function gx(e){return $g(e,`base-ui`)}var _x=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=Kb(),c=gx(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),w_(`p`,e,{ref:t,props:[{id:c},o]})}),vx=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),yx=function(e){return e[e.open=Qb.open]=`open`,e[e.closed=Qb.closed]=`closed`,e[e.startingStyle=Qb.startingStyle]=`startingStyle`,e[e.endingStyle=Qb.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),bx=b.createContext(void 0);function xx(){let e=b.useContext(bx);if(e===void 0)throw Error(t_(26));return e}var Sx=`ArrowUp`,Cx=`ArrowDown`,wx=`ArrowLeft`,Tx=`ArrowRight`,Ex=`Home`,Dx=new Set([wx,Tx]),Ox=new Set([Sx,Cx]),kx=new Set([...Dx,...Ox]);new Set([...kx,Ex,`End`]);var Ax=new Set([Sx,Cx,wx,Tx,Ex,`End`]),jx={...sx,...Yy,nestedDialogOpen(e){return e?{[yx.nestedDialogOpen]:``}:null}},Mx=b.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,style:o,...s}=e,{store:c}=Kb(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),b=c.useState(`titleElementId`),x=c.useState(`transitionStatus`),S=c.useState(`role`);xx(),Zy({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});function C(e){return e===`touch`?c.context.popupRef.current:!0}let w=i===void 0?C:i,T=w_(`div`,e,{state:{open:_,nested:h,transitionStatus:x,nestedDialogOpen:g>0},props:[f,{"aria-labelledby":b??void 0,"aria-describedby":l??void 0,role:S,tabIndex:-1,hidden:!m,onKeyDown(e){Ax.has(e.key)&&e.stopPropagation()},style:{[vx.nestedDialogs]:g}},s],ref:[t,c.context.popupRef,c.useStateSetter(`popupElement`)],stateAttributesMapping:jx});return(0,y.jsx)(av,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:w,returnFocus:r,modal:p!==!1,restoreFocus:`popup`,children:T})});function Nx(e){return r_(19)?e:e?`true`:void 0}var Px=b.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,y.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Fx=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Kb(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,y.jsx)(bx.Provider,{value:n,children:(0,y.jsxs)(B_,{ref:t,...r,children:[a&&o===!0&&(0,y.jsx)(Px,{ref:i.context.internalBackdropRef,inert:Nx(!s)}),e.children]})}):null}),Ix=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=Kb(),c=gx(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),w_(`h2`,e,{ref:t,props:[{id:c},o]})}),Lx=`border border-border/60 bg-background/70 text-muted-foreground shadow-xs ring-0 backdrop-blur-md`,Rx=`duration-150 ease-snappy data-closed:duration-100 data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:blur-out-[5px] data-closed:slide-out-to-top-2 data-open:fade-in-0 data-open:zoom-in-95 data-open:blur-in-[5px] data-open:slide-in-from-top-2`,zx=`fixed inset-0 isolate z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs`,Bx=`duration-150 ease-snappy data-closed:duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,Vx=`border border-border/60 bg-background/90 text-foreground shadow-lg ring-0`,Hx=`duration-150 ease-snappy data-closed:duration-100 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,Ux=`absolute inset-0 bg-black/10 supports-backdrop-filter:backdrop-blur-xs transition-[opacity,backdrop-filter] duration-150 ease-snappy data-[closed]:opacity-0 data-[open]:opacity-100`,Wx=`transition-[opacity,transform] duration-150 ease-snappy data-[closed]:opacity-0 data-[closed]:scale-95 data-[open]:opacity-100 data-[open]:scale-100`,Gx=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=px({disabled:i,focusableWhenDisabled:a,native:o});return w_(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),Kx=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,qx=Ad,Jx=(e,t)=>n=>{if(t?.variants==null)return qx(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Kx(t)||Kx(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return qx(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Yx=Jx(`group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,lg:`h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-9`,"icon-xs":`size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Xx({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,y.jsx)(Gx,{"data-slot":`button`,className:np(Yx({variant:t,size:n,className:e})),...r})}function Zx({...e}){return(0,y.jsx)(Zb,{"data-slot":`alert-dialog`,...e})}function Qx({...e}){return(0,y.jsx)(Fx,{"data-slot":`alert-dialog-portal`,...e})}function $x({className:e,...t}){return(0,y.jsx)(lx,{"data-slot":`alert-dialog-overlay`,className:np(zx,Bx,e),...t})}function eS({className:e,size:t=`default`,...n}){return(0,y.jsxs)(Qx,{children:[(0,y.jsx)($x,{}),(0,y.jsx)(Mx,{"data-slot":`alert-dialog-content`,"data-size":t,className:np(`group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl p-6 text-popover-foreground outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg`,Vx,Hx,e),...n})]})}function tS({className:e,...t}){return(0,y.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:np(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function nS({className:e,...t}){return(0,y.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:np(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function rS({className:e,...t}){return(0,y.jsx)(Ix,{"data-slot":`alert-dialog-title`,className:np(`font-heading text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function iS({className:e,...t}){return(0,y.jsx)(_x,{"data-slot":`alert-dialog-description`,className:np(`text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function aS({className:e,...t}){return(0,y.jsx)(Xx,{"data-slot":`alert-dialog-action`,className:np(e),...t})}function oS(e){return w_(e.defaultTagName??`div`,e,e)}var sS=Jx(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function cS({className:e,variant:t=`default`,render:n,...r}){return oS({defaultTagName:`span`,props:u_({className:np(sS({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}var lS=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),uS={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},dS={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},fS={disabled:!1,...dS},pS={valid(e){return e===null?null:e?{[lS.valid]:``}:{[lS.invalid]:``}}},mS=b.createContext({invalid:void 0,name:void 0,validityData:{state:uS,errors:[],error:``,value:``,initialValue:null},setValidityData:tm,disabled:void 0,touched:dS.touched,setTouched:tm,dirty:dS.dirty,setDirty:tm,filled:dS.filled,setFilled:tm,focused:dS.focused,setFocused:tm,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:fS,markedDirtyRef:{current:!1},registerFieldControl:tm,validation:{getValidationProps:(e=rm)=>e,getInputValidationProps:(e=rm)=>e,inputRef:{current:null},commit:async()=>{}}});function hS(e=!0){let t=b.useContext(mS);if(t.setValidityData===tm&&!e)throw Error(t_(28));return t}var gS=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:tm,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function _S(){return b.useContext(gS)}var vS=b.createContext({controlId:void 0,registerControlId:tm,labelId:void 0,setLabelId:tm,messageIds:[],setMessageIds:tm,getDescriptionProps:e=>e});function yS(){return b.useContext(vS)}function bS(e,t,n,r=!0,i){let[a,o]=b.useState(),s=gx(i?`${i}-label`:void 0),c=e??t??a;return Z(()=>{let i=e||t||!r?void 0:xS(n.current,s);a!==i&&o(i)}),c}function xS(e,t){let n=SS(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function SS(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function CS(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=yS(),o=gx(t),s=n?i:void 0,c=Gp(()=>Symbol(`labelable-control`)),l=b.useRef(!1),u=b.useRef(t!=null),d=Zm(()=>{!l.current||a===tm||(l.current=!1,a(c.current,void 0))});return Z(()=>{if(a===tm)return;let e;if(n){let n=r?.current;e=lp(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),b.useEffect(()=>d,[d]),i??o}function wS({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=b.useRef(e!==void 0),[a,o]=b.useState(t);return[i?e:a,b.useCallback(e=>{i||o(e)},[])]}function TS(e,t){let{enabled:n=!0,getValue:r,id:i,value:a}=t,{registerFieldControl:o}=hS(),s=b.useRef(null);s.current||=Symbol(),Z(()=>{let t=s.current;if(!(!t||!n))return o(t,{controlRef:e,getValue:r,id:i,value:a}),()=>{o(t,void 0)}},[e,n,r,i,o,a])}var ES=b.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:x,validationMode:S,validation:C}=hS(),w=h||s,T=m??a,E={...p,disabled:w},{labelId:D}=yS(),O=CS({id:i});Z(()=>{let e=o!=null;C.inputRef.current?.value||e&&o!==``?x(!0):e&&o===``&&x(!1)},[C.inputRef,x,o]);let k=b.useRef(null);Z(()=>{u&&k.current===uh(Up(k.current))&&y(!0)},[u,y]);let[A]=wS({controlled:o,default:l,name:`FieldControl`,state:`value`}),j=o!==void 0,M=j?A:void 0,N=Zm(()=>C.inputRef.current?.value);return TS(C.inputRef,{id:O,value:M,getValue:N}),w_(`input`,e,{ref:[t,k],state:E,props:[{id:O,disabled:w,name:T,ref:C.inputRef,"aria-labelledby":D,autoFocus:u,...j?{value:M}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,Im(Cm,e.nativeEvent)),_(t!==v.initialValue),x(t!==``)},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),S===`onBlur`&&C.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),C.commit(e.currentTarget.value))}},C.getInputValidationProps(),f],stateAttributesMapping:pS})}),DS=b.forwardRef(function(e,t){return(0,y.jsx)(ES,{ref:t,...e})});function OS({className:e,type:t,...n}){return(0,y.jsx)(DS,{type:t,"data-slot":`input`,className:np(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function kS({className:e,...t}){return(0,y.jsx)(`textarea`,{"data-slot":`textarea`,className:np(`flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function AS({className:e,...t}){return(0,y.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:np(`group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var jS=Jx(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function MS({className:e,align:t=`inline-start`,...n}){return(0,y.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:np(jS({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var NS=Jx(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function PS({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,y.jsx)(Xx,{type:t,"data-size":r,variant:n,className:np(NS({size:r}),e),...i})}function FS({className:e,...t}){return(0,y.jsx)(`span`,{className:np(`flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4`,e),...t})}function IS({className:e,...t}){return(0,y.jsx)(OS,{"data-slot":`input-group-control`,className:np(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent`,e),...t})}function LS({className:e,...t}){return(0,y.jsx)(gd,{role:`status`,"aria-label":`Loading`,className:np(`spinner-line-fade size-4`,e),...t})}var RS=1e3,zS=1.2,BS=.1,VS=`localterm`,HS=`† `,US=`npx @monotykamary/localterm@latest start`,WS=1500,GS=5e3,KS=.35,qS=3e3,JS=2e3,YS=`localterm:diff-view-mode`,XS=1500,ZS=`#ffc79944`,QS=`#ffc799`,$S=`#ff8080`,eC=`localterm:terminal-theme-id`,tC=`localterm:terminal-font-id`,nC=`localterm:terminal-font-size`,rC=`localterm:terminal-line-height`,iC=`localterm:terminal-cursor-style`,aC=`localterm:terminal-cursor-blink`,oC=`localterm:terminal-scrollback`,sC=`localterm:terminal-scroll-on-user-input`,cC=`localterm:terminal-padding-x`,lC=`localterm:terminal-padding-y`,uC=`localterm-google-fonts`,dC=`localterm:nerd-font-enabled`,fC=`flex w-full items-center gap-2.5 rounded-sm px-2.5 py-2 text-sm text-muted-foreground outline-none transition-colors`,pC=10,mC=(e,t)=>{let n=e.toLowerCase(),r=t.toLowerCase(),i=r.indexOf(n);if(i!==-1){let e=Array.from({length:n.length},(e,t)=>i+t);return r===n?{score:1,indices:e}:i===0?{score:2,indices:e}:{score:3,indices:e}}let a=gC(n,r);return a?{score:4+(1-a.score/hC(n.length)),indices:a.indices}:null},hC=e=>{let t=e;return t+=(e-1)*.5,t+=e*.5,t},gC=(e,t)=>{let n=0,r=0,i=-1,a=[];for(let o=0;o<t.length&&n<e.length;o++)t[o]===e[n]&&(r+=1,i===o-1&&(r+=.5),(o===0||t[o-1]===` `||t[o-1]===`-`)&&(r+=.5),i=o,a.push(o),n++);return n===e.length?{score:r,indices:a}:null},_C=(e,t)=>t?e.flatMap(e=>{let n=mC(t,e.label);if(n)return[{cmd:e,score:n.score,indices:n.indices}];let r=mC(t,`${e.category} ${e.label}`);return r?[{cmd:e,score:pC+r.score,indices:null}]:[]}).sort((e,t)=>e.score-t.score).map(({cmd:e,indices:t})=>({cmd:e,indices:t})):e.map(e=>({cmd:e,indices:null})),vC=({label:e,indices:t})=>{if(!t||t.length===0)return(0,y.jsx)(y.Fragment,{children:e});let n=new Set(t),r=[];for(let t=0;t<e.length;t++){let i=n.has(t),a=r[r.length-1];a&&a.hit===i?a.text+=e[t]:r.push({text:e[t],hit:i})}return(0,y.jsx)(y.Fragment,{children:r.map((e,t)=>(0,y.jsx)(`span`,{className:e.hit?`font-semibold text-foreground`:void 0,children:e.text},t))})},yC=({keys:e,label:t})=>(0,y.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,y.jsx)(`kbd`,{className:`rounded border border-border/40 bg-muted/30 px-1 font-mono text-[10px]`,children:e}),t]}),bC=({open:e,onClose:t,commands:n,onActiveItemChange:r})=>{let[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(0),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(!1),f=(0,b.useRef)(null),p=(0,b.useId)(),m=(0,b.useMemo)(()=>_C(n,i),[n,i]),h=(0,b.useMemo)(()=>{let e=[];return m.forEach((t,n)=>{let r=e[e.length-1];r&&r.category===t.cmd.category?r.entries.push({entry:t,index:n}):e.push({category:t.cmd.category,entries:[{entry:t,index:n}]})}),e},[m]);(0,b.useEffect)(()=>{if(e){l(!0),a(``),s(0);let e=requestAnimationFrame(()=>{d(!0),f.current?.focus()});return()=>cancelAnimationFrame(e)}if(d(!1),c){let e=window.setTimeout(()=>l(!1),150);return()=>window.clearTimeout(e)}},[e]),(0,b.useEffect)(()=>{s(0)},[i]),(0,b.useEffect)(()=>{r&&r(e?m[o]?.cmd??null:null)},[e,m,o,r]),(0,b.useEffect)(()=>{let t=m[o]?.cmd;!e||!t||document.getElementById(`${p}-${t.id}`)?.scrollIntoView?.({block:`nearest`})},[o,m,e,p]),(0,b.useEffect)(()=>{if(!e||!c)return;let n=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),t())};return window.addEventListener(`keydown`,n,!0),()=>window.removeEventListener(`keydown`,n,!0)},[e,c,t]);let g=(0,b.useCallback)(()=>{let e=m[o]?.cmd;e&&(t(),e.action())},[o,m,t]),_=(0,b.useCallback)(e=>{let t=m.length,n=e.key===`ArrowDown`||e.ctrlKey&&e.key===`n`,r=e.key===`ArrowUp`||e.ctrlKey&&e.key===`p`;if(n||r){if(e.preventDefault(),t===0)return;s(e=>(e+(n?1:-1)+t)%t);return}if(e.key===`Enter`){e.preventDefault(),g();return}},[g,m.length]);if(!c)return null;let v=e&&u,x=(e,n,r)=>{let{cmd:i,indices:a}=e;return(0,y.jsxs)(`button`,{id:`${p}-${i.id}`,type:`button`,role:`option`,"aria-selected":n===o,className:np(fC,n===o&&`bg-foreground/10 text-foreground`),onMouseMove:()=>{n!==o&&s(n)},onClick:()=>{t(),i.action()},children:[i.icon?(0,y.jsx)(`span`,{className:`shrink-0 text-muted-foreground/70`,children:i.icon}):(0,y.jsx)(`span`,{className:`w-4 shrink-0`}),(0,y.jsx)(`span`,{className:`flex-1 truncate text-left`,children:(0,y.jsx)(vC,{label:i.label,indices:a})}),r?(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] uppercase tracking-wide text-muted-foreground/50`,children:i.category}):null,i.checked?(0,y.jsx)(ud,{"aria-label":`active`,className:`size-3.5 shrink-0`}):null,i.shortcut?(0,y.jsx)(`kbd`,{className:`shrink-0 rounded border border-border/40 bg-muted/30 px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground/70`,children:i.shortcut}):null]},i.id)};return(0,y.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[18vh]`,children:[(0,y.jsx)(`div`,{"data-open":v||void 0,"data-closed":!v||void 0,className:np(Ux),onClick:t}),(0,y.jsxs)(`div`,{role:`dialog`,"aria-label":`command palette`,"aria-modal":!0,"data-open":v||void 0,"data-closed":!v||void 0,className:np(`relative z-10 flex max-h-[400px] w-[520px] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-xl`,Vx,Wx),children:[(0,y.jsxs)(`div`,{className:`flex items-center border-b border-border/40 px-3`,children:[(0,y.jsx)(wd,{className:`size-4 shrink-0 text-muted-foreground/60`}),(0,y.jsx)(`input`,{ref:f,autoFocus:!0,type:`text`,value:i,onChange:e=>a(e.target.value),onKeyDown:_,placeholder:`Type a command…`,"aria-label":`search commands`,"aria-activedescendant":m[o]?`${p}-${m[o].cmd.id}`:void 0,"aria-controls":p,"aria-expanded":!0,"aria-haspopup":`listbox`,role:`combobox`,className:`h-10 w-full bg-transparent px-2.5 text-sm text-foreground outline-none placeholder:text-muted-foreground/70`})]}),(0,y.jsx)(`div`,{id:p,role:`listbox`,className:`flex-1 overflow-y-auto overscroll-contain p-1.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:m.length===0?(0,y.jsxs)(`div`,{className:`px-2.5 py-6 text-center text-sm text-muted-foreground/70`,children:[`No commands match “`,i,`”`]}):i?m.map((e,t)=>x(e,t,!0)):h.map(e=>(0,y.jsxs)(`div`,{role:`group`,"aria-label":e.category,children:[(0,y.jsx)(`div`,{className:`px-2.5 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wide text-muted-foreground/50`,children:e.category}),e.entries.map(({entry:e,index:t})=>x(e,t,!1))]},e.category))}),(0,y.jsxs)(`div`,{className:`flex items-center gap-3 border-t border-border/40 px-3 py-1.5 text-[10px] text-muted-foreground/60`,children:[(0,y.jsx)(yC,{keys:`↑↓`,label:`navigate`}),(0,y.jsx)(yC,{keys:`↵`,label:`run`}),(0,y.jsx)(yC,{keys:`esc`,label:`close`}),(0,y.jsxs)(`span`,{className:`ml-auto`,children:[m.length,` `,m.length===1?`command`:`commands`]})]})]})]})},xC=e=>{let t=[],n=[],r=[],i=()=>{let e=Math.max(n.length,r.length);for(let i=0;i<e;i+=1)t.push({left:n[i]??null,right:r[i]??null});n=[],r=[]};for(let a of e.lines){if(a.type===`del`){n.push(a);continue}if(a.type===`add`){r.push(a);continue}i(),t.push({left:a,right:a})}return i(),t},SC=64*1024,CC=1*1024*1024,wC=4*1024,TC=1024,EC=1e3,DC=1e3;Object.freeze({status:`aborted`});function $(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var OC=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},kC=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},AC={};function jC(e){return e&&Object.assign(AC,e),AC}function MC(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function NC(e,t){return typeof t==`bigint`?t.toString():t}function PC(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function FC(e){return e==null}function IC(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function LC(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var RC=Symbol(`evaluating`);function zC(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==RC)return r===void 0&&(r=RC,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function BC(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function VC(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function HC(e){return JSON.stringify(e)}function UC(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var WC=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function GC(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var KC=PC(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function qC(e){if(GC(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(GC(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function JC(e){return qC(e)?{...e}:Array.isArray(e)?[...e]:e}var YC=new Set([`string`,`number`,`symbol`]);function XC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ZC(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function QC(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function $C(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ew={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tw(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return ZC(e,VC(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return BC(this,`shape`,e),e},checks:[]}))}function nw(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return ZC(e,VC(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return BC(this,`shape`,r),r},checks:[]}))}function rw(e,t){if(!qC(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ZC(e,VC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return BC(this,`shape`,n),n}}))}function iw(e,t){if(!qC(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ZC(e,VC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return BC(this,`shape`,n),n}}))}function aw(e,t){return ZC(e,VC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return BC(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function ow(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return ZC(t,VC(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return BC(this,`shape`,i),i},checks:[]}))}function sw(e,t,n){return ZC(t,VC(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return BC(this,`shape`,i),i}}))}function cw(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function lw(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function uw(e){return typeof e==`string`?e:e?.message}function dw(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=uw(e.inst?._zod.def?.error?.(e))??uw(t?.error?.(e))??uw(n.customError?.(e))??uw(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function fw(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function pw(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var mw=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,NC,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},hw=$(`$ZodError`,mw),gw=$(`$ZodError`,mw,{Parent:Error});function _w(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function vw(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var yw=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new OC;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>dw(e,a,jC())));throw WC(t,i?.callee),t}return o.value},bw=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>dw(e,a,jC())));throw WC(t,i?.callee),t}return o.value},xw=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new OC;return a.issues.length?{success:!1,error:new(e??hw)(a.issues.map(e=>dw(e,i,jC())))}:{success:!0,data:a.value}},Sw=xw(gw),Cw=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>dw(e,i,jC())))}:{success:!0,data:a.value}},ww=Cw(gw),Tw=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return yw(e)(t,n,i)},Ew=e=>(t,n,r)=>yw(e)(t,n,r),Dw=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return bw(e)(t,n,i)},Ow=e=>async(t,n,r)=>bw(e)(t,n,r),kw=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return xw(e)(t,n,i)},Aw=e=>(t,n,r)=>xw(e)(t,n,r),jw=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Cw(e)(t,n,i)},Mw=e=>async(t,n,r)=>Cw(e)(t,n,r),Nw=/^[cC][^\s-]{8,}$/,Pw=/^[0-9a-z]+$/,Fw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Iw=/^[0-9a-vA-V]{20}$/,Lw=/^[A-Za-z0-9]{27}$/,Rw=/^[a-zA-Z0-9_-]{21}$/,zw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Bw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Vw=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Hw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Uw=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Ww(){return new RegExp(Uw,`u`)}var Gw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,qw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Jw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xw=/^[A-Za-z0-9_-]*$/,Zw=/^\+[1-9]\d{6,14}$/,Qw=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,$w=RegExp(`^${Qw}$`);function eT(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tT(e){return RegExp(`^${eT(e)}$`)}function nT(e){let t=eT({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Qw}T(?:${r})$`)}var rT=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},iT=/^-?\d+$/,aT=/^-?\d+(?:\.\d+)?$/,oT=/^(?:true|false)$/i,sT=/^[^A-Z]*$/,cT=/^[^a-z]*$/,lT=$(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),uT={number:`number`,bigint:`bigint`,object:`date`},dT=$(`$ZodCheckLessThan`,(e,t)=>{lT.init(e,t);let n=uT[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fT=$(`$ZodCheckGreaterThan`,(e,t)=>{lT.init(e,t);let n=uT[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),pT=$(`$ZodCheckMultipleOf`,(e,t)=>{lT.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):LC(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),mT=$(`$ZodCheckNumberFormat`,(e,t)=>{lT.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ew[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=iT)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),hT=$(`$ZodCheckMaxLength`,(e,t)=>{var n;lT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!FC(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=fw(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),gT=$(`$ZodCheckMinLength`,(e,t)=>{var n;lT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!FC(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=fw(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_T=$(`$ZodCheckLengthEquals`,(e,t)=>{var n;lT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!FC(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=fw(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),vT=$(`$ZodCheckStringFormat`,(e,t)=>{var n,r;lT.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),yT=$(`$ZodCheckRegex`,(e,t)=>{vT.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),bT=$(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=sT,vT.init(e,t)}),xT=$(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=cT,vT.init(e,t)}),ST=$(`$ZodCheckIncludes`,(e,t)=>{lT.init(e,t);let n=XC(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),CT=$(`$ZodCheckStartsWith`,(e,t)=>{lT.init(e,t);let n=RegExp(`^${XC(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),wT=$(`$ZodCheckEndsWith`,(e,t)=>{lT.init(e,t);let n=RegExp(`.*${XC(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),TT=$(`$ZodCheckOverwrite`,(e,t)=>{lT.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ET=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
76
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
77
+ `))}},DT={major:4,minor:3,patch:6},OT=$(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=DT;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=cw(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new OC;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=cw(e,t))});else{if(e.issues.length===t)continue;r||=cw(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(cw(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new OC;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new OC;return o.then(e=>t(e,r,a))}return t(o,r,a)}}zC(e,`~standard`,()=>({validate:t=>{try{let n=Sw(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return ww(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),kT=$(`$ZodString`,(e,t)=>{OT.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??rT(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),AT=$(`$ZodStringFormat`,(e,t)=>{vT.init(e,t),kT.init(e,t)}),jT=$(`$ZodGUID`,(e,t)=>{t.pattern??=Bw,AT.init(e,t)}),MT=$(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Vw(e)}else t.pattern??=Vw();AT.init(e,t)}),NT=$(`$ZodEmail`,(e,t)=>{t.pattern??=Hw,AT.init(e,t)}),PT=$(`$ZodURL`,(e,t)=>{AT.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),FT=$(`$ZodEmoji`,(e,t)=>{t.pattern??=Ww(),AT.init(e,t)}),IT=$(`$ZodNanoID`,(e,t)=>{t.pattern??=Rw,AT.init(e,t)}),LT=$(`$ZodCUID`,(e,t)=>{t.pattern??=Nw,AT.init(e,t)}),RT=$(`$ZodCUID2`,(e,t)=>{t.pattern??=Pw,AT.init(e,t)}),zT=$(`$ZodULID`,(e,t)=>{t.pattern??=Fw,AT.init(e,t)}),BT=$(`$ZodXID`,(e,t)=>{t.pattern??=Iw,AT.init(e,t)}),VT=$(`$ZodKSUID`,(e,t)=>{t.pattern??=Lw,AT.init(e,t)}),HT=$(`$ZodISODateTime`,(e,t)=>{t.pattern??=nT(t),AT.init(e,t)}),UT=$(`$ZodISODate`,(e,t)=>{t.pattern??=$w,AT.init(e,t)}),WT=$(`$ZodISOTime`,(e,t)=>{t.pattern??=tT(t),AT.init(e,t)}),GT=$(`$ZodISODuration`,(e,t)=>{t.pattern??=zw,AT.init(e,t)}),KT=$(`$ZodIPv4`,(e,t)=>{t.pattern??=Gw,AT.init(e,t),e._zod.bag.format=`ipv4`}),qT=$(`$ZodIPv6`,(e,t)=>{t.pattern??=Kw,AT.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),JT=$(`$ZodCIDRv4`,(e,t)=>{t.pattern??=qw,AT.init(e,t)}),YT=$(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Jw,AT.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function XT(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var ZT=$(`$ZodBase64`,(e,t)=>{t.pattern??=Yw,AT.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{XT(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function QT(e){if(!Xw.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return XT(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var $T=$(`$ZodBase64URL`,(e,t)=>{t.pattern??=Xw,AT.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{QT(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),eE=$(`$ZodE164`,(e,t)=>{t.pattern??=Zw,AT.init(e,t)});function tE(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var nE=$(`$ZodJWT`,(e,t)=>{AT.init(e,t),e._zod.check=n=>{tE(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),rE=$(`$ZodNumber`,(e,t)=>{OT.init(e,t),e._zod.pattern=e._zod.bag.pattern??aT,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),iE=$(`$ZodNumberFormat`,(e,t)=>{mT.init(e,t),rE.init(e,t)}),aE=$(`$ZodBoolean`,(e,t)=>{OT.init(e,t),e._zod.pattern=oT,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),oE=$(`$ZodUnknown`,(e,t)=>{OT.init(e,t),e._zod.parse=e=>e}),sE=$(`$ZodNever`,(e,t)=>{OT.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function cE(e,t,n){e.issues.length&&t.issues.push(...lw(n,e.issues)),t.value[n]=e.value}var lE=$(`$ZodArray`,(e,t)=>{OT.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>cE(t,n,e))):cE(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function uE(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...lw(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function dE(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=$C(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function fE(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>uE(e,n,i,t,u))):uE(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var pE=$(`$ZodObject`,(e,t)=>{if(OT.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=PC(()=>dE(t));zC(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=GC,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>uE(n,t,e,s,r))):uE(i,t,e,s,r)}return i?fE(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),mE=$(`$ZodObjectJIT`,(e,t)=>{pE.init(e,t);let n=e._zod.parse,r=PC(()=>dE(t)),i=e=>{let t=new ET([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=HC(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=HC(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
78
+ if (${n}.issues.length) {
79
+ if (${o} in input) {
80
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
81
+ ...iss,
82
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
83
+ })));
84
+ }
85
+ }
86
+
87
+ if (${n}.value === undefined) {
88
+ if (${o} in input) {
89
+ newResult[${o}] = undefined;
90
+ }
91
+ } else {
92
+ newResult[${o}] = ${n}.value;
93
+ }
94
+
95
+ `):t.write(`
96
+ if (${n}.issues.length) {
97
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
98
+ ...iss,
99
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
100
+ })));
101
+ }
102
+
103
+ if (${n}.value === undefined) {
104
+ if (${o} in input) {
105
+ newResult[${o}] = undefined;
106
+ }
107
+ } else {
108
+ newResult[${o}] = ${n}.value;
109
+ }
110
+
111
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=GC,s=!AC.jitless,c=s&&KC.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?fE([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function hE(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!cw(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>dw(e,r,jC())))}),t)}var gE=$(`$ZodUnion`,(e,t)=>{OT.init(e,t),zC(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),zC(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),zC(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),zC(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>IC(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>hE(t,i,e,a)):hE(s,i,e,a)}}),_E=$(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,gE.init(e,t);let n=e._zod.parse;zC(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=PC(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!GC(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),vE=$(`$ZodIntersection`,(e,t)=>{OT.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>bE(e,t,n)):bE(e,i,a)}});function yE(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(qC(e)&&qC(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=yE(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=yE(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bE(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),cw(e))return e;let o=yE(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var xE=$(`$ZodEnum`,(e,t)=>{OT.init(e,t);let n=MC(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>YC.has(typeof e)).map(e=>typeof e==`string`?XC(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),SE=$(`$ZodLiteral`,(e,t)=>{if(OT.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?XC(e):e?XC(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),CE=$(`$ZodTransform`,(e,t)=>{OT.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new kC(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new OC;return n.value=i,n}});function wE(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var TE=$(`$ZodOptional`,(e,t)=>{OT.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,zC(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),zC(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${IC(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>wE(t,e.value)):wE(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),EE=$(`$ZodExactOptional`,(e,t)=>{TE.init(e,t),zC(e._zod,`values`,()=>t.innerType._zod.values),zC(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),DE=$(`$ZodNullable`,(e,t)=>{OT.init(e,t),zC(e._zod,`optin`,()=>t.innerType._zod.optin),zC(e._zod,`optout`,()=>t.innerType._zod.optout),zC(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${IC(e.source)}|null)$`):void 0}),zC(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),OE=$(`$ZodDefault`,(e,t)=>{OT.init(e,t),e._zod.optin=`optional`,zC(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>kE(e,t)):kE(r,t)}});function kE(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var AE=$(`$ZodPrefault`,(e,t)=>{OT.init(e,t),e._zod.optin=`optional`,zC(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),jE=$(`$ZodNonOptional`,(e,t)=>{OT.init(e,t),zC(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ME(t,e)):ME(i,e)}});function ME(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var NE=$(`$ZodCatch`,(e,t)=>{OT.init(e,t),zC(e._zod,`optin`,()=>t.innerType._zod.optin),zC(e._zod,`optout`,()=>t.innerType._zod.optout),zC(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>dw(e,n,jC()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>dw(e,n,jC()))},input:e.value}),e.issues=[]),e)}}),PE=$(`$ZodPipe`,(e,t)=>{OT.init(e,t),zC(e._zod,`values`,()=>t.in._zod.values),zC(e._zod,`optin`,()=>t.in._zod.optin),zC(e._zod,`optout`,()=>t.out._zod.optout),zC(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>FE(e,t.in,n)):FE(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>FE(e,t.out,n)):FE(r,t.out,n)}});function FE(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var IE=$(`$ZodReadonly`,(e,t)=>{OT.init(e,t),zC(e._zod,`propValues`,()=>t.innerType._zod.propValues),zC(e._zod,`values`,()=>t.innerType._zod.values),zC(e._zod,`optin`,()=>t.innerType?._zod?.optin),zC(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(LE):LE(r)}});function LE(e){return e.value=Object.freeze(e.value),e}var RE=$(`$ZodCustom`,(e,t)=>{lT.init(e,t),OT.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>zE(t,n,r,e));zE(i,n,r,e)}});function zE(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(pw(e))}}var BE,VE=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function HE(){return new VE}(BE=globalThis).__zod_globalRegistry??(BE.__zod_globalRegistry=HE());var UE=globalThis.__zod_globalRegistry;function WE(e,t){return new e({type:`string`,...QC(t)})}function GE(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...QC(t)})}function KE(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...QC(t)})}function qE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...QC(t)})}function JE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...QC(t)})}function YE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...QC(t)})}function XE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...QC(t)})}function ZE(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...QC(t)})}function QE(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...QC(t)})}function $E(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...QC(t)})}function eD(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...QC(t)})}function tD(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...QC(t)})}function nD(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...QC(t)})}function rD(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...QC(t)})}function iD(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...QC(t)})}function aD(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...QC(t)})}function oD(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...QC(t)})}function sD(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...QC(t)})}function cD(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...QC(t)})}function lD(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...QC(t)})}function uD(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...QC(t)})}function dD(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...QC(t)})}function fD(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...QC(t)})}function pD(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...QC(t)})}function mD(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...QC(t)})}function hD(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...QC(t)})}function gD(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...QC(t)})}function _D(e,t){return new e({type:`number`,checks:[],...QC(t)})}function vD(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...QC(t)})}function yD(e,t){return new e({type:`boolean`,...QC(t)})}function bD(e){return new e({type:`unknown`})}function xD(e,t){return new e({type:`never`,...QC(t)})}function SD(e,t){return new dT({check:`less_than`,...QC(t),value:e,inclusive:!1})}function CD(e,t){return new dT({check:`less_than`,...QC(t),value:e,inclusive:!0})}function wD(e,t){return new fT({check:`greater_than`,...QC(t),value:e,inclusive:!1})}function TD(e,t){return new fT({check:`greater_than`,...QC(t),value:e,inclusive:!0})}function ED(e,t){return new pT({check:`multiple_of`,...QC(t),value:e})}function DD(e,t){return new hT({check:`max_length`,...QC(t),maximum:e})}function OD(e,t){return new gT({check:`min_length`,...QC(t),minimum:e})}function kD(e,t){return new _T({check:`length_equals`,...QC(t),length:e})}function AD(e,t){return new yT({check:`string_format`,format:`regex`,...QC(t),pattern:e})}function jD(e){return new bT({check:`string_format`,format:`lowercase`,...QC(e)})}function MD(e){return new xT({check:`string_format`,format:`uppercase`,...QC(e)})}function ND(e,t){return new ST({check:`string_format`,format:`includes`,...QC(t),includes:e})}function PD(e,t){return new CT({check:`string_format`,format:`starts_with`,...QC(t),prefix:e})}function FD(e,t){return new wT({check:`string_format`,format:`ends_with`,...QC(t),suffix:e})}function ID(e){return new TT({check:`overwrite`,tx:e})}function LD(e){return ID(t=>t.normalize(e))}function RD(){return ID(e=>e.trim())}function zD(){return ID(e=>e.toLowerCase())}function BD(){return ID(e=>e.toUpperCase())}function VD(){return ID(e=>UC(e))}function HD(e,t,n){return new e({type:`array`,element:t,...QC(n)})}function UD(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...QC(n)})}function WD(e){let t=GD(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(pw(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(pw(r))}},e(n.value,n)));return t}function GD(e,t){let n=new lT({check:`custom`,...QC(t)});return n._zod.check=e,n}function KD(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??UE,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function qD(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,qD(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&XD(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function JD(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
112
+
113
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function YD(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:QD(t,`input`,e.processors),output:QD(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function XD(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return XD(r.element,n);if(r.type===`set`)return XD(r.valueType,n);if(r.type===`lazy`)return XD(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return XD(r.innerType,n);if(r.type===`intersection`)return XD(r.left,n)||XD(r.right,n);if(r.type===`record`||r.type===`map`)return XD(r.keyType,n)||XD(r.valueType,n);if(r.type===`pipe`)return XD(r.in,n)||XD(r.out,n);if(r.type===`object`){for(let e in r.shape)if(XD(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(XD(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(XD(e,n))return!0;return!!(r.rest&&XD(r.rest,n))}return!1}var ZD=(e,t={})=>n=>{let r=KD({...n,processors:t});return qD(e,r),JD(r,e),YD(r,e)},QD=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=KD({...i??{},target:a,io:t,processors:n});return qD(e,o),JD(o,e),YD(o,e)},$D={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},eO=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=$D[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},tO=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},nO=(e,t,n,r)=>{n.type=`boolean`},rO=(e,t,n,r)=>{n.not={}},iO=(e,t,n,r)=>{let i=e._zod.def,a=MC(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},aO=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},oO=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},sO=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},cO=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=qD(a.element,t,{...r,path:[...r.path,`items`]})},lO=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=qD(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=qD(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},uO=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>qD(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},dO=(e,t,n,r)=>{let i=e._zod.def,a=qD(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=qD(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},fO=(e,t,n,r)=>{let i=e._zod.def,a=qD(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},pO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},mO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},hO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},gO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},_O=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;qD(a,t,r);let o=t.seen.get(e);o.ref=a},vO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},yO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},bO=$(`ZodISODateTime`,(e,t)=>{HT.init(e,t),KO.init(e,t)});function xO(e){return pD(bO,e)}var SO=$(`ZodISODate`,(e,t)=>{UT.init(e,t),KO.init(e,t)});function CO(e){return mD(SO,e)}var wO=$(`ZodISOTime`,(e,t)=>{WT.init(e,t),KO.init(e,t)});function TO(e){return hD(wO,e)}var EO=$(`ZodISODuration`,(e,t)=>{GT.init(e,t),KO.init(e,t)});function DO(e){return gD(EO,e)}var OO=(e,t)=>{hw.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>vw(e,t)},flatten:{value:t=>_w(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,NC,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,NC,2)}},isEmpty:{get(){return e.issues.length===0}}})};$(`ZodError`,OO);var kO=$(`ZodError`,OO,{Parent:Error}),AO=yw(kO),jO=bw(kO),MO=xw(kO),NO=Cw(kO),PO=Tw(kO),FO=Ew(kO),IO=Dw(kO),LO=Ow(kO),RO=kw(kO),zO=Aw(kO),BO=jw(kO),VO=Mw(kO),HO=$(`ZodType`,(e,t)=>(OT.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:QD(e,`input`),output:QD(e,`output`)}}),e.toJSONSchema=ZD(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(VC(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>ZC(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>AO(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>MO(e,t,n),e.parseAsync=async(t,n)=>jO(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>NO(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>PO(e,t,n),e.decode=(t,n)=>FO(e,t,n),e.encodeAsync=async(t,n)=>IO(e,t,n),e.decodeAsync=async(t,n)=>LO(e,t,n),e.safeEncode=(t,n)=>RO(e,t,n),e.safeDecode=(t,n)=>zO(e,t,n),e.safeEncodeAsync=async(t,n)=>BO(e,t,n),e.safeDecodeAsync=async(t,n)=>VO(e,t,n),e.refine=(t,n)=>e.check(rA(t,n)),e.superRefine=t=>e.check(iA(t)),e.overwrite=t=>e.check(ID(t)),e.optional=()=>zk(e),e.exactOptional=()=>Vk(e),e.nullable=()=>Uk(e),e.nullish=()=>zk(Uk(e)),e.nonoptional=t=>Yk(e,t),e.array=()=>Ck(e),e.or=t=>Dk([e,t]),e.and=t=>jk(e,t),e.transform=t=>$k(e,Lk(t)),e.default=t=>Gk(e,t),e.prefault=t=>qk(e,t),e.catch=t=>Zk(e,t),e.pipe=t=>$k(e,t),e.readonly=()=>tA(e),e.describe=t=>{let n=e.clone();return UE.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return UE.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return UE.get(e);let n=e.clone();return UE.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),UO=$(`_ZodString`,(e,t)=>{kT.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eO(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(AD(...t)),e.includes=(...t)=>e.check(ND(...t)),e.startsWith=(...t)=>e.check(PD(...t)),e.endsWith=(...t)=>e.check(FD(...t)),e.min=(...t)=>e.check(OD(...t)),e.max=(...t)=>e.check(DD(...t)),e.length=(...t)=>e.check(kD(...t)),e.nonempty=(...t)=>e.check(OD(1,...t)),e.lowercase=t=>e.check(jD(t)),e.uppercase=t=>e.check(MD(t)),e.trim=()=>e.check(RD()),e.normalize=(...t)=>e.check(LD(...t)),e.toLowerCase=()=>e.check(zD()),e.toUpperCase=()=>e.check(BD()),e.slugify=()=>e.check(VD())}),WO=$(`ZodString`,(e,t)=>{kT.init(e,t),UO.init(e,t),e.email=t=>e.check(GE(qO,t)),e.url=t=>e.check(ZE(XO,t)),e.jwt=t=>e.check(fD(dk,t)),e.emoji=t=>e.check(QE(ZO,t)),e.guid=t=>e.check(KE(JO,t)),e.uuid=t=>e.check(qE(YO,t)),e.uuidv4=t=>e.check(JE(YO,t)),e.uuidv6=t=>e.check(YE(YO,t)),e.uuidv7=t=>e.check(XE(YO,t)),e.nanoid=t=>e.check($E(QO,t)),e.guid=t=>e.check(KE(JO,t)),e.cuid=t=>e.check(eD($O,t)),e.cuid2=t=>e.check(tD(ek,t)),e.ulid=t=>e.check(nD(tk,t)),e.base64=t=>e.check(lD(ck,t)),e.base64url=t=>e.check(uD(lk,t)),e.xid=t=>e.check(rD(nk,t)),e.ksuid=t=>e.check(iD(rk,t)),e.ipv4=t=>e.check(aD(ik,t)),e.ipv6=t=>e.check(oD(ak,t)),e.cidrv4=t=>e.check(sD(ok,t)),e.cidrv6=t=>e.check(cD(sk,t)),e.e164=t=>e.check(dD(uk,t)),e.datetime=t=>e.check(xO(t)),e.date=t=>e.check(CO(t)),e.time=t=>e.check(TO(t)),e.duration=t=>e.check(DO(t))});function GO(e){return WE(WO,e)}var KO=$(`ZodStringFormat`,(e,t)=>{AT.init(e,t),UO.init(e,t)}),qO=$(`ZodEmail`,(e,t)=>{NT.init(e,t),KO.init(e,t)}),JO=$(`ZodGUID`,(e,t)=>{jT.init(e,t),KO.init(e,t)}),YO=$(`ZodUUID`,(e,t)=>{MT.init(e,t),KO.init(e,t)}),XO=$(`ZodURL`,(e,t)=>{PT.init(e,t),KO.init(e,t)}),ZO=$(`ZodEmoji`,(e,t)=>{FT.init(e,t),KO.init(e,t)}),QO=$(`ZodNanoID`,(e,t)=>{IT.init(e,t),KO.init(e,t)}),$O=$(`ZodCUID`,(e,t)=>{LT.init(e,t),KO.init(e,t)}),ek=$(`ZodCUID2`,(e,t)=>{RT.init(e,t),KO.init(e,t)}),tk=$(`ZodULID`,(e,t)=>{zT.init(e,t),KO.init(e,t)}),nk=$(`ZodXID`,(e,t)=>{BT.init(e,t),KO.init(e,t)}),rk=$(`ZodKSUID`,(e,t)=>{VT.init(e,t),KO.init(e,t)}),ik=$(`ZodIPv4`,(e,t)=>{KT.init(e,t),KO.init(e,t)}),ak=$(`ZodIPv6`,(e,t)=>{qT.init(e,t),KO.init(e,t)}),ok=$(`ZodCIDRv4`,(e,t)=>{JT.init(e,t),KO.init(e,t)}),sk=$(`ZodCIDRv6`,(e,t)=>{YT.init(e,t),KO.init(e,t)}),ck=$(`ZodBase64`,(e,t)=>{ZT.init(e,t),KO.init(e,t)}),lk=$(`ZodBase64URL`,(e,t)=>{$T.init(e,t),KO.init(e,t)}),uk=$(`ZodE164`,(e,t)=>{eE.init(e,t),KO.init(e,t)}),dk=$(`ZodJWT`,(e,t)=>{nE.init(e,t),KO.init(e,t)}),fk=$(`ZodNumber`,(e,t)=>{rE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tO(e,t,n,r),e.gt=(t,n)=>e.check(wD(t,n)),e.gte=(t,n)=>e.check(TD(t,n)),e.min=(t,n)=>e.check(TD(t,n)),e.lt=(t,n)=>e.check(SD(t,n)),e.lte=(t,n)=>e.check(CD(t,n)),e.max=(t,n)=>e.check(CD(t,n)),e.int=t=>e.check(hk(t)),e.safe=t=>e.check(hk(t)),e.positive=t=>e.check(wD(0,t)),e.nonnegative=t=>e.check(TD(0,t)),e.negative=t=>e.check(SD(0,t)),e.nonpositive=t=>e.check(CD(0,t)),e.multipleOf=(t,n)=>e.check(ED(t,n)),e.step=(t,n)=>e.check(ED(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function pk(e){return _D(fk,e)}var mk=$(`ZodNumberFormat`,(e,t)=>{iE.init(e,t),fk.init(e,t)});function hk(e){return vD(mk,e)}var gk=$(`ZodBoolean`,(e,t)=>{aE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nO(e,t,n,r)});function _k(e){return yD(gk,e)}var vk=$(`ZodUnknown`,(e,t)=>{oE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function yk(){return bD(vk)}var bk=$(`ZodNever`,(e,t)=>{sE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rO(e,t,n,r)});function xk(e){return xD(bk,e)}var Sk=$(`ZodArray`,(e,t)=>{lE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cO(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(OD(t,n)),e.nonempty=t=>e.check(OD(1,t)),e.max=(t,n)=>e.check(DD(t,n)),e.length=(t,n)=>e.check(kD(t,n)),e.unwrap=()=>e.element});function Ck(e,t){return HD(Sk,e,t)}var wk=$(`ZodObject`,(e,t)=>{mE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lO(e,t,n,r),zC(e,`shape`,()=>t.shape),e.keyof=()=>Nk(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yk()}),e.loose=()=>e.clone({...e._zod.def,catchall:yk()}),e.strict=()=>e.clone({...e._zod.def,catchall:xk()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>rw(e,t),e.safeExtend=t=>iw(e,t),e.merge=t=>aw(e,t),e.pick=t=>tw(e,t),e.omit=t=>nw(e,t),e.partial=(...t)=>ow(Rk,e,t[0]),e.required=(...t)=>sw(Jk,e,t[0])});function Tk(e,t){return new wk({type:`object`,shape:e??{},...QC(t)})}var Ek=$(`ZodUnion`,(e,t)=>{gE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uO(e,t,n,r),e.options=t.options});function Dk(e,t){return new Ek({type:`union`,options:e,...QC(t)})}var Ok=$(`ZodDiscriminatedUnion`,(e,t)=>{Ek.init(e,t),_E.init(e,t)});function kk(e,t,n){return new Ok({type:`union`,options:t,discriminator:e,...QC(n)})}var Ak=$(`ZodIntersection`,(e,t)=>{vE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dO(e,t,n,r)});function jk(e,t){return new Ak({type:`intersection`,left:e,right:t})}var Mk=$(`ZodEnum`,(e,t)=>{xE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iO(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Mk({...t,checks:[],...QC(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Mk({...t,checks:[],...QC(r),entries:i})}});function Nk(e,t){return new Mk({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...QC(t)})}var Pk=$(`ZodLiteral`,(e,t)=>{SE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aO(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Fk(e,t){return new Pk({type:`literal`,values:Array.isArray(e)?e:[e],...QC(t)})}var Ik=$(`ZodTransform`,(e,t)=>{CE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sO(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new kC(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(pw(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(pw(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Lk(e){return new Ik({type:`transform`,transform:e})}var Rk=$(`ZodOptional`,(e,t)=>{TE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zk(e){return new Rk({type:`optional`,innerType:e})}var Bk=$(`ZodExactOptional`,(e,t)=>{EE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vk(e){return new Bk({type:`optional`,innerType:e})}var Hk=$(`ZodNullable`,(e,t)=>{DE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Uk(e){return new Hk({type:`nullable`,innerType:e})}var Wk=$(`ZodDefault`,(e,t)=>{OE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gk(e,t){return new Wk({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():JC(t)}})}var Kk=$(`ZodPrefault`,(e,t)=>{AE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qk(e,t){return new Kk({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():JC(t)}})}var Jk=$(`ZodNonOptional`,(e,t)=>{jE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yk(e,t){return new Jk({type:`nonoptional`,innerType:e,...QC(t)})}var Xk=$(`ZodCatch`,(e,t)=>{NE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zk(e,t){return new Xk({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Qk=$(`ZodPipe`,(e,t)=>{PE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_O(e,t,n,r),e.in=t.in,e.out=t.out});function $k(e,t){return new Qk({type:`pipe`,in:e,out:t})}var eA=$(`ZodReadonly`,(e,t)=>{IE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tA(e){return new eA({type:`readonly`,innerType:e})}var nA=$(`ZodCustom`,(e,t)=>{RE.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oO(e,t,n,r)});function rA(e,t={}){return UD(nA,e,t)}function iA(e){return WD(e)}Tk({ok:_k(),sessions:pk().int().nonnegative()}).strict(),kk(`type`,[Tk({type:Fk(`input`),data:GO().max(SC)}).strict(),Tk({type:Fk(`resize`),cols:pk().int().positive().max(EC),rows:pk().int().positive().max(DC),pixelWidth:pk().int().nonnegative().optional(),pixelHeight:pk().int().nonnegative().optional()}).strict()]);var aA=kk(`type`,[Tk({type:Fk(`output`),data:GO().max(CC)}).strict(),Tk({type:Fk(`exit`),code:pk().int().nullable()}).strict(),Tk({type:Fk(`title`),title:GO().max(wC)}).strict(),Tk({type:Fk(`session`),shell:GO().min(1),shellName:GO().min(1),pid:pk().int().nonnegative(),cwd:GO().min(1),title:GO().max(wC)}).strict(),Tk({type:Fk(`cwd`),cwd:GO().min(1)}).strict(),Tk({type:Fk(`foreground`),process:GO().max(256).nullable()}).strict(),Tk({type:Fk(`notification`),body:GO().min(1).max(TC)}).strict()]),oA=Nk([`modified`,`added`,`deleted`,`renamed`,`untracked`]),sA=Tk({isRepo:_k(),files:pk().int().nonnegative(),additions:pk().int().nonnegative(),deletions:pk().int().nonnegative(),binaries:pk().int().nonnegative()}).strict(),cA=Tk({path:GO().min(1),oldPath:GO().min(1).nullable(),status:oA,additions:pk().int().nonnegative(),deletions:pk().int().nonnegative(),binary:_k(),patch:GO().nullable(),patchOmitted:_k()}).strict(),lA=Tk({isRepo:_k(),files:Ck(cA)}).strict(),uA=`/api/git/diff-summary`,dA=`/api/git/diff`,fA=(e,t)=>{let n=new URL(e,window.location.href);return n.searchParams.set(`cwd`,t),n.toString()},pA=async(e,t)=>{try{let n=await fetch(fA(uA,e),{signal:t});if(!n.ok)return null;let r=sA.safeParse(await n.json());return r.success?r.data:null}catch{return null}},mA=async(e,t)=>{try{let n=await fetch(fA(dA,e),{signal:t});if(!n.ok)return null;let r=lA.safeParse(await n.json());return r.success?r.data:null}catch{return null}},hA=e=>`${e.filePath}${e.side}:${e.lineNumber}`,gA="Please address the following code review comments. Run `git diff` (or `git diff HEAD`) to see the full context of any changes, especially for deleted lines.\n",_A=e=>e.side===`old`?`${e.filePath} (deleted, was L${e.lineNumber} — see \`git diff\`)`:`${e.filePath} L${e.lineNumber}`,vA=e=>{let t=[...e].sort((e,t)=>e.filePath.localeCompare(t.filePath)||e.lineNumber-t.lineNumber),n=gA;for(let e of t)n+=`\n- ${_A(e)}: ${e.comment}`;return n},yA=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@(.*)$/,bA=e=>{let t=[],n=null,r=0,i=0,a=e.split(`
114
+ `);a.length>0&&a[a.length-1]===``&&a.pop();for(let e of a){let a=yA.exec(e);if(a){r=Number.parseInt(a[1],10),i=Number.parseInt(a[2],10),n={header:e,lines:[]},t.push(n);continue}if(!n)continue;let o=e[0];if(o===`\\`){let e=n.lines[n.lines.length-1];e&&(e.noNewline=!0);continue}if(o===`+`){n.lines.push({type:`add`,text:e.slice(1),oldLine:null,newLine:i,noNewline:!1}),i+=1;continue}if(o===`-`){n.lines.push({type:`del`,text:e.slice(1),oldLine:r,newLine:null,noNewline:!1}),r+=1;continue}n.lines.push({type:`context`,text:o===` `?e.slice(1):e,oldLine:r,newLine:i,noNewline:!1}),r+=1,i+=1}return t},xA=e=>e.reduce((e,t)=>e+t.lines.length,0),SA=e=>{if(typeof window>`u`)return null;try{let t=window.localStorage.getItem(e);return t===null||t.trim()===``?null:t}catch{return null}},CA=(e,t)=>{if(!(typeof window>`u`))try{window.localStorage.setItem(e,t)}catch{}},wA=(e,t,n)=>({load:()=>{let r=SA(e);if(r===null)return t;let i=Number(r);return Number.isFinite(i)?n(i):t},store:t=>CA(e,String(t))}),TA=(e,t)=>({load:()=>{let n=SA(e);return n===`true`?!0:n===`false`?!1:t},store:t=>CA(e,String(t))}),EA=(e,t,n)=>({load:()=>{let r=SA(e);return r!==null&&n(r)?r:t},store:t=>CA(e,t)}),DA=(e,t,n)=>({load:()=>t(SA(e)),store:t=>CA(e,n(t))}),OA=EA(YS,`unified`,e=>e===`unified`||e===`split`),kA=OA.load,AA=OA.store,jA=e=>e.type===`del`?e.oldLine===null?null:{side:`old`,lineNumber:e.oldLine}:e.newLine===null?null:{side:`new`,lineNumber:e.newLine},MA={modified:{letter:`M`,className:`text-amber-400`},added:{letter:`A`,className:`text-emerald-400`},deleted:{letter:`D`,className:`text-red-400`},renamed:{letter:`R`,className:`text-sky-400`},untracked:{letter:`U`,className:`text-emerald-400`}},NA=`text-emerald-400`,PA=`text-red-400`,FA=`w-12 shrink-0 select-none px-2 text-right text-muted-foreground/50 tabular-nums`,IA=e=>{let t=e.lastIndexOf(`/`);return t===-1?{directory:``,basename:e}:{directory:e.slice(0,t+1),basename:e.slice(t+1)}},LA=e=>e===`add`?`bg-emerald-500/10`:e===`del`?`bg-red-500/10`:``,RA=e=>e===`context`?`text-muted-foreground`:`text-foreground/90`,zA=({onClick:e})=>(0,y.jsx)(`button`,{type:`button`,onClick:e,"aria-label":`comment on line`,className:`absolute top-1/2 left-1 z-10 hidden size-4 -translate-y-1/2 items-center justify-center rounded-sm bg-primary text-primary-foreground transition-transform group-hover/line:flex hover:scale-110`,children:(0,y.jsx)(_d,{className:`size-3`,"aria-hidden":`true`})}),BA=({initialComment:e,onSave:t,onCancel:n})=>{let[r,i]=(0,b.useState)(e),a=r.trim(),o=()=>{a&&t(a)};return(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(kS,{autoFocus:!0,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),n()):e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),o())},placeholder:`Leave a comment on this line…`,"aria-label":`line comment`,className:`min-h-12 text-xs`}),(0,y.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,y.jsx)(Xx,{size:`xs`,onClick:o,disabled:!a,children:`Save comment`}),(0,y.jsx)(Xx,{size:`xs`,variant:`ghost`,onClick:n,children:`Cancel`})]})]})},VA=({annotation:e,isEditing:t,onEdit:n,onSave:r,onCancel:i,onDelete:a})=>(0,y.jsx)(`div`,{className:`border-y border-border/40 bg-muted/20 py-2 pr-4 pl-3 font-sans`,children:(0,y.jsx)(`div`,{className:`sticky left-3 max-w-xl`,children:t?(0,y.jsx)(BA,{initialComment:e?.comment??``,onSave:r,onCancel:i}):e?(0,y.jsxs)(`div`,{className:`group/comment flex items-start gap-2`,children:[(0,y.jsx)(vd,{className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,y.jsx)(`p`,{className:`min-w-0 flex-1 whitespace-pre-wrap text-foreground/90`,children:e.comment}),(0,y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover/comment:opacity-100`,children:[(0,y.jsx)(Xx,{variant:`ghost`,size:`icon-xs`,onClick:n,"aria-label":`edit comment`,className:`hover:text-foreground`,children:(0,y.jsx)(xd,{})}),(0,y.jsx)(Xx,{variant:`ghost`,size:`icon-xs`,onClick:a,"aria-label":`delete comment`,className:`hover:text-destructive`,children:(0,y.jsx)(Dd,{})})]})]}):null})}),HA=({line:e,onAnnotate:t})=>(0,y.jsxs)(`div`,{className:np(`group/line relative flex`,LA(e.type)),children:[t?(0,y.jsx)(zA,{onClick:t}):null,(0,y.jsx)(`span`,{className:FA,children:e.oldLine??``}),(0,y.jsx)(`span`,{className:FA,children:e.newLine??``}),(0,y.jsx)(`span`,{className:np(`w-5 shrink-0 select-none text-center`,e.type===`add`&&NA,e.type===`del`&&PA),children:e.type===`add`?`+`:e.type===`del`?`-`:``}),(0,y.jsxs)(`span`,{className:np(`whitespace-pre pr-4`,RA(e.type)),children:[e.text,e.noNewline?(0,y.jsx)(`span`,{className:`select-none text-muted-foreground/50`,title:`No newline at end of file`,children:` ⊘`}):null]})]}),UA=({line:e,side:t,onAnnotate:n})=>{if(!e)return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`span`,{className:FA}),(0,y.jsx)(`span`,{className:`min-w-0 flex-1 bg-muted/20`})]});let r=e.type===`context`?`context`:t===`left`?`del`:`add`;return(0,y.jsxs)(y.Fragment,{children:[n?(0,y.jsx)(zA,{onClick:n}):null,(0,y.jsx)(`span`,{className:np(FA,LA(r)),children:t===`left`?e.oldLine??``:e.newLine??``}),(0,y.jsx)(`span`,{className:np(`min-w-0 flex-1 overflow-x-clip whitespace-pre pr-2`,LA(r),RA(e.type)),children:e.text})]})},WA=({hunk:e})=>(0,y.jsx)(`div`,{className:`select-none bg-muted/30 px-4 py-0.5 text-muted-foreground/60`,children:e.header}),GA=({file:e,viewMode:t,annotations:n,editingKey:r,onOpenEditor:i,onSaveAnnotation:a,onCancelEditor:o,onDeleteAnnotation:s})=>{let[c,l]=(0,b.useState)(!1),u=(0,b.useMemo)(()=>e.patch?bA(e.patch):[],[e.patch]),d=(0,b.useMemo)(()=>xA(u),[u]);if((0,b.useEffect)(()=>{l(!1)},[e.path]),e.binary)return(0,y.jsx)(KA,{icon:!0,children:`Binary file — no text diff to show.`});if(e.patchOmitted)return(0,y.jsx)(KA,{icon:!0,children:`Diff too large to display.`});if(u.length===0)return(0,y.jsx)(KA,{children:e.status===`renamed`?`Renamed without content changes.`:e.status===`untracked`&&e.additions===0?`Empty file.`:`No content changes.`});let f=c?1/0:JS,p=0,m=[];for(let e of u){if(p>=f)break;let t=f-p,n=e.lines.length<=t?e.lines:e.lines.slice(0,t);m.push(n===e.lines?e:{header:e.header,lines:n}),p+=n.length}let h=d-p,g=t=>{let i=jA(t);if(!i)return null;let o=hA({filePath:e.path,...i});return{key:o,saved:n[o],isEditing:r===o,save:t=>a({filePath:e.path,...i,comment:t})}},_=e=>e&&(e.saved||e.isEditing)?(0,y.jsx)(VA,{annotation:e.saved,isEditing:e.isEditing,onEdit:()=>i(e.key),onSave:e.save,onCancel:o,onDelete:()=>s(e.key)}):null;return(0,y.jsxs)(`div`,{className:np(`pb-4 font-mono text-xs leading-5`,t===`unified`&&`min-w-max`),children:[m.map(e=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(WA,{hunk:e}),t===`unified`?e.lines.map((e,t)=>{let n=g(e);return(0,y.jsxs)(b.Fragment,{children:[(0,y.jsx)(HA,{line:e,onAnnotate:n?()=>i(n.key):void 0}),_(n)]},t)}):xC(e).map((e,t)=>{let n=e.left?g(e.left):null,r=e.right?g(e.right):null,a=n!==null&&n.key===r?.key;return(0,y.jsxs)(b.Fragment,{children:[(0,y.jsxs)(`div`,{className:`flex`,children:[(0,y.jsx)(`div`,{className:`group/line relative flex w-1/2 min-w-0 border-r border-border/40`,children:(0,y.jsx)(UA,{line:e.left,side:`left`,onAnnotate:n?()=>i(n.key):void 0})}),(0,y.jsx)(`div`,{className:`group/line relative flex w-1/2 min-w-0`,children:(0,y.jsx)(UA,{line:e.right,side:`right`,onAnnotate:r?()=>i(r.key):void 0})})]}),_(n),a?null:_(r)]},t)})]},e.header+String(e.lines[0]?.newLine??e.lines[0]?.oldLine??``))),h>0?(0,y.jsx)(`div`,{className:`px-4 py-2`,children:(0,y.jsxs)(Xx,{variant:`outline`,size:`xs`,onClick:()=>l(!0),children:[`Show `,h.toLocaleString(),` more lines`]})}):null]})},KA=({children:e,icon:t})=>(0,y.jsxs)(`div`,{className:`flex h-full min-h-32 items-center justify-center gap-2 text-sm text-muted-foreground`,children:[t?(0,y.jsx)(hd,{className:`size-4`,"aria-hidden":`true`}):null,e]}),qA=({open:e,cwd:t,onClose:n,onSendToTerminal:r})=>{let[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(null),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)(!1),[m,h]=(0,b.useState)(null),[g,_]=(0,b.useState)(()=>kA()),[v,x]=(0,b.useState)(0),[S,C]=(0,b.useState)({}),[w,T]=(0,b.useState)(null),E=(0,b.useRef)(null),D=(0,b.useRef)(null);(0,b.useEffect)(()=>{if(e){a(!0);let e=requestAnimationFrame(()=>s(!0));return()=>cancelAnimationFrame(e)}if(s(!1),i){let e=window.setTimeout(()=>a(!1),150);return()=>window.clearTimeout(e)}},[e]),(0,b.useEffect)(()=>{if(!e||!t)return;let n=new AbortController;return d(!0),p(!1),mA(t,n.signal).then(e=>{if(!n.signal.aborted){if(d(!1),!e){p(!0);return}l(e)}}),()=>n.abort()},[e,t,v]);let O=c?.files??[];(0,b.useEffect)(()=>{c&&(m&&c.files.some(e=>e.path===m)||h(c.files[0]?.path??null))},[c,m]);let k=O.find(e=>e.path===m)??null,A=k?O.indexOf(k):-1,j=(0,b.useMemo)(()=>{let e=0,t=0,n=0;for(let r of O)e+=r.additions,t+=r.deletions,r.binary&&(n+=1);return{additions:e,deletions:t,binaries:n}},[O]),M=(0,b.useCallback)(e=>{if(O.length===0)return;let t=Math.min(O.length-1,Math.max(0,(A===-1?0:A)+e));h(O[t].path),(D.current?.children[t])?.scrollIntoView({block:`nearest`})},[O,A]);(0,b.useEffect)(()=>{if(!e||!i)return;let t=e=>{let t=e.target,r=t instanceof HTMLElement&&t.tagName===`TEXTAREA`;if(e.key===`Escape`){if(r)return;e.preventDefault(),e.stopPropagation(),n();return}r||t instanceof HTMLElement&&t.tagName===`INPUT`||(e.key===`ArrowDown`||e.key===`j`?(e.preventDefault(),M(1)):(e.key===`ArrowUp`||e.key===`k`)&&(e.preventDefault(),M(-1)))};return window.addEventListener(`keydown`,t,!0),()=>window.removeEventListener(`keydown`,t,!0)},[e,i,n,M]),(0,b.useEffect)(()=>{e&&o&&E.current?.focus()},[e,o]);let N=(0,b.useCallback)(e=>{_(e),AA(e)},[]),P=(0,b.useCallback)(e=>{T(e)},[]),F=(0,b.useCallback)(()=>{T(null)},[]),I=(0,b.useCallback)(e=>{C(t=>({...t,[hA(e)]:e})),T(null)},[]),L=(0,b.useCallback)(e=>{C(t=>{let{[e]:n,...r}=t;return r}),T(t=>t===e?null:t)},[]),R=(0,b.useMemo)(()=>Object.values(S),[S]),z=(0,b.useMemo)(()=>{let e=new Map;for(let t of R)e.set(t.filePath,(e.get(t.filePath)??0)+1);return e},[R]),ee=(0,b.useCallback)(()=>{C({}),T(null)},[]),B=(0,b.useCallback)(()=>{!r||R.length===0||(r(vA(R)),C({}),T(null),n())},[r,R,n]);if(!i)return null;let V=e&&o,H=c?.isRepo??!0,U=c!==null&&H&&O.length===0;return(0,y.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6`,children:[(0,y.jsx)(`div`,{"data-open":V||void 0,"data-closed":!V||void 0,className:np(Ux),onClick:n}),(0,y.jsxs)(`div`,{ref:E,role:`dialog`,"aria-label":`git diff viewer`,"aria-modal":!0,tabIndex:-1,"data-open":V||void 0,"data-closed":!V||void 0,className:np(`relative z-10 flex h-full w-full max-w-7xl flex-col overflow-hidden rounded-xl outline-none`,Vx,Wx),children:[(0,y.jsxs)(`header`,{className:`flex shrink-0 items-center gap-3 border-b border-border/40 px-4 py-2.5`,children:[(0,y.jsx)(`h2`,{className:`text-sm font-medium text-foreground`,children:`Changes`}),(0,y.jsxs)(`span`,{className:`font-mono text-xs tabular-nums text-muted-foreground`,children:[(0,y.jsxs)(`span`,{className:NA,children:[`+`,j.additions.toLocaleString()]}),` `,(0,y.jsxs)(`span`,{className:PA,children:[`−`,j.deletions.toLocaleString()]}),j.binaries>0?(0,y.jsxs)(`span`,{className:`text-muted-foreground/70`,children:[` · `,j.binaries,` binary`]}):null]}),u?(0,y.jsx)(LS,{className:`size-3.5`,"aria-label":`loading diff`}):null,(0,y.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[(0,y.jsx)(`div`,{role:`radiogroup`,"aria-label":`diff layout`,className:`flex items-center rounded-md border border-border/60 p-0.5`,children:[`unified`,`split`].map(e=>(0,y.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":g===e,onClick:()=>N(e),className:np(`rounded-sm px-2 py-0.5 text-xs capitalize transition-colors`,g===e?`bg-foreground/10 text-foreground`:`text-muted-foreground hover:text-foreground`),children:e},e))}),(0,y.jsx)(Xx,{variant:`ghost`,size:`icon-sm`,onClick:()=>x(e=>e+1),"aria-label":`refresh diff`,className:`hover:text-foreground`,children:(0,y.jsx)(Cd,{})}),(0,y.jsx)(Xx,{variant:`ghost`,size:`icon-sm`,onClick:n,"aria-label":`close diff viewer`,className:`hover:text-foreground`,children:(0,y.jsx)(Od,{})})]})]}),f?(0,y.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 text-sm text-muted-foreground`,children:[`Couldn't load the diff from the localterm daemon.`,(0,y.jsx)(Xx,{variant:`outline`,size:`xs`,onClick:()=>x(e=>e+1),children:`Retry`})]}):H?U?(0,y.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-muted-foreground`,children:`Working tree clean — nothing to diff.`}):c===null?(0,y.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,y.jsx)(LS,{"aria-label":`loading diff`})}):(0,y.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,y.jsx)(`div`,{ref:D,role:`listbox`,"aria-label":`changed files`,className:`w-72 shrink-0 overflow-y-auto overscroll-contain border-r border-border/40 p-1.5`,children:O.map(e=>{let t=MA[e.status],{directory:n,basename:r}=IA(e.path),i=e.path===m,a=z.get(e.path)??0;return(0,y.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":i,onClick:()=>h(e.path),className:np(`flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs outline-none transition-colors`,i?`bg-foreground/10 text-foreground`:`text-muted-foreground hover:bg-foreground/5`),children:[(0,y.jsx)(`span`,{className:np(`w-3 shrink-0 font-mono font-semibold`,t.className),title:e.status,children:t.letter}),(0,y.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono`,dir:`rtl`,children:(0,y.jsxs)(`bdi`,{children:[(0,y.jsx)(`span`,{className:`text-muted-foreground/60`,children:n}),(0,y.jsx)(`span`,{className:i?`text-foreground`:``,children:r})]})}),a>0?(0,y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-0.5 font-mono text-[10px] tabular-nums text-muted-foreground`,title:`${a} pending comment${a===1?``:`s`}`,children:[(0,y.jsx)(vd,{className:`size-2.5`,"aria-hidden":`true`}),a]}):null,e.binary?(0,y.jsx)(`span`,{className:`shrink-0 rounded border border-border/40 px-1 font-mono text-[10px] text-muted-foreground/70`,children:`BIN`}):(0,y.jsxs)(`span`,{className:`shrink-0 font-mono tabular-nums`,children:[(0,y.jsxs)(`span`,{className:NA,children:[`+`,e.additions]}),` `,(0,y.jsxs)(`span`,{className:PA,children:[`−`,e.deletions]})]})]},e.path)})}),(0,y.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:k?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-border/40 px-4 py-1.5 font-mono text-xs text-muted-foreground`,children:[k.oldPath?(0,y.jsxs)(`span`,{className:`truncate`,children:[k.oldPath,(0,y.jsx)(`span`,{className:`text-muted-foreground/50`,children:` → `}),(0,y.jsx)(`span`,{className:`text-foreground`,children:k.path})]}):(0,y.jsx)(`span`,{className:`truncate text-foreground`,children:k.path}),k.binary?null:(0,y.jsxs)(`span`,{className:`ml-auto shrink-0 tabular-nums`,children:[(0,y.jsxs)(`span`,{className:NA,children:[`+`,k.additions]}),` `,(0,y.jsxs)(`span`,{className:PA,children:[`−`,k.deletions]})]})]}),(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto overscroll-contain`,children:(0,y.jsx)(GA,{file:k,viewMode:g,annotations:S,editingKey:w,onOpenEditor:P,onSaveAnnotation:I,onCancelEditor:F,onDeleteAnnotation:L})})]}):(0,y.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-muted-foreground`,children:`Select a file to view its diff.`})})]}):(0,y.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-muted-foreground`,children:`Not a git repository.`}),R.length>0?(0,y.jsxs)(`footer`,{className:`flex shrink-0 items-center gap-2 border-t border-border/40 px-4 py-2`,children:[(0,y.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[R.length,` pending comment`,R.length===1?``:`s`]}),(0,y.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,y.jsx)(Xx,{variant:`ghost`,size:`xs`,onClick:ee,children:`Clear all`}),r?(0,y.jsxs)(Xx,{size:`xs`,onClick:B,children:[(0,y.jsx)(Td,{"aria-hidden":`true`}),`Send to terminal`]}):null]})]}):null]})]})},JA=b.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return w_(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function YA({className:e,orientation:t=`horizontal`,...n}){return(0,y.jsx)(JA,{"data-slot":`separator`,orientation:t,className:np(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...n})}var XA=Jx(`flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1`,{variants:{orientation:{horizontal:`*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0`,vertical:`flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0`}},defaultVariants:{orientation:`horizontal`}});function ZA({className:e,orientation:t,...n}){return(0,y.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":t,className:np(XA({orientation:t}),e),...n})}function QA({className:e,render:t,...n}){return oS({defaultTagName:`div`,props:u_({className:np(`flex items-center gap-2 rounded-md border bg-muted px-2.5 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4`,e)},n),render:t,state:{slot:`button-group-text`}})}var $A=e=>String(e),ej=`size-7 rounded-none border-0 bg-transparent text-foreground hover:bg-foreground/10 hover:text-foreground disabled:opacity-30 [&_svg]:size-3.5`,tj=`h-7 min-w-[3rem] cursor-ew-resize touch-none justify-center border-y-0 border-r border-l! border-border/60 bg-transparent px-1.5 text-xs font-medium tabular-nums text-foreground select-none hover:bg-foreground/5 focus-visible:outline-none focus-visible:bg-foreground/5`,nj={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1},rj=({value:e,min:t,max:n,step:r,ariaLabel:i,decrementAriaLabel:a,incrementAriaLabel:o,formatDisplay:s=$A,onValueChange:c})=>{let l=(0,b.useRef)(null),u=(0,b.useRef)(e),d=t=>{if(t.button===0){try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}l.current=t.clientX,u.current=e}},f=e=>{let t=l.current;if(t===null)return;let n=e.clientX-t,i=Math.round(n/5);i!==0&&c(u.current+i*r)},p=e=>{if(l.current!==null){try{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)}catch{}l.current=null}};return(0,y.jsxs)(ZA,{"aria-label":i,className:`h-7 overflow-hidden rounded-md border border-border/60`,children:[(0,y.jsx)(Xx,{variant:`ghost`,size:`icon-xs`,onClick:()=>c(e-r),disabled:e<=t,"aria-label":a,className:ej,children:(0,y.jsx)(yd,{})}),(0,y.jsx)(QA,{role:`slider`,tabIndex:0,"aria-label":i,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":e,"aria-valuetext":s(e),"aria-orientation":`horizontal`,title:`Drag or use arrow keys to adjust`,className:tj,onPointerDown:d,onPointerMove:f,onPointerUp:p,onPointerCancel:p,onPointerLeave:e=>{if(l.current===null)return;let t=!1;try{t=e.currentTarget.hasPointerCapture(e.pointerId)}catch{}t||(l.current=null)},onKeyDown:i=>{if(i.key===`Home`){i.preventDefault(),c(t);return}if(i.key===`End`){i.preventDefault(),c(n);return}let a=nj[i.key];a!==void 0&&(i.preventDefault(),c(e+a*r))},children:s(e)}),(0,y.jsx)(Xx,{variant:`ghost`,size:`icon-xs`,onClick:()=>c(e+r),disabled:e>=n,"aria-label":o,className:ej,children:(0,y.jsx)(Sd,{})})]})};function ij(e){let[t,n]=b.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}var aj=b.createContext(null),oj=b.createContext(null);function sj(){let e=b.useContext(aj);if(e===null)throw Error(t_(60));return e}function cj(){let e=b.useContext(oj);if(e===null)throw Error(t_(61));return e}var lj=(e,t)=>Object.is(e,t);function uj(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function dj(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:uj(t,e,n))}function fj(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:uj(e,t,n))}function pj(e,t,n){return e.filter(e=>!uj(t,e,n))}function mj(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function hj(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function gj(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(hj(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function _j(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return mj(e)}function vj(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?mj(e.value):mj(e)}function yj(e,t,n){function r(){return _j(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=hj(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function bj(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,y.jsx)(b.Fragment,{children:yj(r,t,n)},i)),e),[])}var xj={id:Q(e=>e.id),labelId:Q(e=>e.labelId),modal:Q(e=>e.modal),multiple:Q(e=>e.multiple),items:Q(e=>e.items),itemToStringLabel:Q(e=>e.itemToStringLabel),itemToStringValue:Q(e=>e.itemToStringValue),isItemEqualToValue:Q(e=>e.isItemEqualToValue),value:Q(e=>e.value),hasSelectedValue:Q(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:vj(t,r)!==``}),hasNullItemLabel:Q((e,t)=>t?gj(e.items):!1),open:Q(e=>e.open),mounted:Q(e=>e.mounted),forceMount:Q(e=>e.forceMount),transitionStatus:Q(e=>e.transitionStatus),openMethod:Q(e=>e.openMethod),activeIndex:Q(e=>e.activeIndex),selectedIndex:Q(e=>e.selectedIndex),isActive:Q((e,t)=>e.activeIndex===t),isSelected:Q((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>uj(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:uj(n,i,r)}),isSelectedByFocus:Q((e,t)=>e.selectedIndex===t),popupProps:Q(e=>e.popupProps),triggerProps:Q(e=>e.triggerProps),triggerElement:Q(e=>e.triggerElement),positionerElement:Q(e=>e.positionerElement),listElement:Q(e=>e.listElement),scrollUpArrowVisible:Q(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Q(e=>e.scrollDownArrowVisible),hasScrollArrows:Q(e=>e.hasScrollArrows)};function Sj(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Cj(e,t){return Math.max(0,e-t)}function wj(e,t){if(t<=0)return 0;let n=Sj(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function Tj(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:x=!1,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:w=lj,highlightItemOnHover:T=!0,children:E}=e,{clearErrors:D}=_S(),{setDirty:O,setTouched:k,setFocused:A,shouldValidateOnChange:j,validityData:M,setFilled:N,name:P,disabled:F,validation:I,validationMode:L}=hS(),R=CS({id:t}),z=F||d,ee=P??c,[B,V]=wS({controlled:n,default:x?r??nm:r,name:`Select`,state:`value`}),[H,U]=wS({controlled:a,default:o,name:`Select`,state:`open`}),te=b.useRef([]),W=b.useRef([]),ne=b.useRef(null),G=b.useRef(null),re=b.useRef(0),ie=b.useRef(null),ae=b.useRef([]),oe=b.useRef(!1),se=b.useRef(!1),ce=b.useRef(null),le=b.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),ue=b.useRef(!1),{mounted:de,setMounted:fe,transitionStatus:pe}=Gy(H),{openMethod:me,triggerProps:he}=Ub(H),ge=Gp(()=>new Vy({id:R,labelId:void 0,modal:m,multiple:x,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:w,value:B,open:H,mounted:de,transitionStatus:pe,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,_e=Ly(ge,xj.activeIndex),ve=Ly(ge,xj.selectedIndex),ye=Ly(ge,xj.triggerElement),be=Ly(ge,xj.positionerElement),xe=ij(me),Se=me??xe,Ce=b.useMemo(()=>x&&Array.isArray(B)&&B.length===0?``:vj(B,C),[x,B,C]),we=b.useMemo(()=>x&&Array.isArray(B)?B.map(e=>vj(e,C)):vj(B,C),[x,B,C]);TS(qm(ge.state.triggerElement),{id:R,value:B,getValue:Zm(()=>we)});let Te=b.useRef(B);Z(()=>{B!==Te.current&&ge.set(`forceMount`,!0)},[ge,B]),Z(()=>{N(x?Array.isArray(B)&&B.length>0:B!=null)},[x,B,N]),Z(function(){if(H)return;let e=ae.current;if(x){let t=Array.isArray(B)?B:[];if(t.length===0){ge.set(`selectedIndex`,null);return}let n=t[t.length-1],r=fj(e,n,w);ge.set(`selectedIndex`,r===-1?null:r);return}let t=fj(e,B,w);ge.set(`selectedIndex`,t===-1?null:t)},[x,H,B,ae,w,ge]),Hb(B,()=>{D(ee),O(B!==M.initialValue),j()?I.commit(B):I.commit(B,!0)});let Ee=Zm((e,t)=>{if(s?.(e,t),!t.isCanceled&&(U(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(k(!0),A(!1),L===`onBlur`&&I.commit(B)),!e&&ge.state.activeIndex!==null)){let e=te.current[ge.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),De=Zm(()=>{fe(!1),ge.update({activeIndex:null,openMethod:null}),_?.(!1)});Zy({enabled:!h,open:H,ref:ne,onComplete(){H||De()}}),b.useImperativeHandle(h,()=>({unmount:De}),[De]);let Oe=Zm((e,t)=>{i?.(e,t),!t.isCanceled&&V(e)}),ke=Zm(()=>{let e=ge.state.listElement||ne.current;if(!e)return;let t=Cj(e.scrollHeight,e.clientHeight),n=wj(e.scrollTop,t),r=n>0,i=n<t;ge.state.scrollUpArrowVisible!==r&&ge.set(`scrollUpArrowVisible`,r),ge.state.scrollDownArrowVisible!==i&&ge.set(`scrollDownArrowVisible`,i)}),Ae=sb({open:H,onOpenChange:Ee,elements:{reference:ye,floating:be}}),{getReferenceProps:je,getFloatingProps:Me,getItemProps:Ne}=bb([ov(Ae,{enabled:!f&&!z,event:`mousedown`}),pv(Ae,{bubbles:!1}),kb(Ae,{enabled:!f&&!z,listRef:te,activeIndex:_e,selectedIndex:ve,disabledIndices:nm,onNavigate(e){e===null&&!H||ge.set(`activeIndex`,e)},focusItemOnHover:T}),Mb(Ae,{enabled:!f&&!z&&(H||!x),listRef:W,activeIndex:_e,selectedIndex:ve,onMatch(e){H?ge.set(`activeIndex`,e):Oe(ae.current[e],Im(`none`))},onTypingChange(e){oe.current=e}})]),Pe=b.useMemo(()=>u_(je(),he,R?{id:R}:rm),[je,he,R]);rp(()=>{ge.update({popupProps:Me(),triggerProps:Pe})}),Z(()=>{ge.update({id:R,modal:m,multiple:x,value:B,open:H,mounted:de,transitionStatus:pe,popupProps:Me(),triggerProps:Pe,items:v,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:w,openMethod:Se})},[ge,R,m,x,B,H,de,pe,Me,Pe,v,S,C,w,Se]);let Fe=b.useMemo(()=>({store:ge,name:ee,required:p,disabled:z,readOnly:f,multiple:x,highlightItemOnHover:T,setValue:Oe,setOpen:Ee,listRef:te,popupRef:ne,scrollHandlerRef:G,handleScrollArrowVisibility:ke,scrollArrowsMountedCountRef:re,getItemProps:Ne,events:Ae.context.events,valueRef:ie,valuesRef:ae,labelsRef:W,typingRef:oe,selectionRef:le,selectedItemTextRef:ce,validation:I,onOpenChangeComplete:_,keyboardActiveRef:se,alignItemWithTriggerActiveRef:ue,initialValueRef:Te}),[ge,ee,p,z,f,x,T,Oe,Ee,Ne,Ae.context.events,I,_,ke]),Ie=Vm(g,I.inputRef),Le=x&&Array.isArray(B)&&B.length>0,Re=x?void 0:ee,ze=b.useMemo(()=>!x||!Array.isArray(B)||!ee?null:B.map(e=>{let t=vj(e,C);return(0,y.jsx)(`input`,{type:`hidden`,form:l,name:ee,value:t},t)}),[x,B,l,ee,C]);return(0,y.jsx)(aj.Provider,{value:Fe,children:(0,y.jsxs)(oj.Provider,{value:Ae,children:[E,(0,y.jsx)(`input`,{...I.getInputValidationProps({onFocus(){ge.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.value,n=Im(Cm,e.nativeEvent);function r(){if(x)return;let e=ae.current.find(e=>vj(e,C).toLowerCase()===t.toLowerCase()||_j(e,S).toLowerCase()===t.toLowerCase());e!=null&&(O(e!==M.initialValue),Oe(e,n),j()&&I.commit(e))}ge.set(`forceMount`,!0),queueMicrotask(r)}}),id:R&&Re==null?`${R}-hidden-input`:void 0,form:l,name:Re,autoComplete:u,value:Ce,disabled:z,required:p&&!Le,readOnly:f,ref:Ie,style:ee?nh:th,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ze]})})}function Ej(e,t){return e??t}function Dj(e){let t=e.getBoundingClientRect(),n=op(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var Oj=2,kj=400,Aj=200,jj={...ox,...pS,value:()=>null},Mj=b.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,setFocused:u,validationMode:d,state:f,disabled:p}=hS(),{labelId:m}=yS(),{store:h,setOpen:g,selectionRef:_,validation:v,readOnly:y,required:x,alignItemWithTriggerActiveRef:S,disabled:C,keyboardActiveRef:w}=sj(),T=p||C||a,E=Ly(h,xj.open),D=Ly(h,xj.value),O=Ly(h,xj.triggerProps),k=Ly(h,xj.positionerElement),A=Ly(h,xj.listElement),j=Ly(h,xj.id),M=Ly(h,xj.labelId),N=Ly(h,xj.hasSelectedValue),P=!N&&E,F=Ly(h,xj.hasNullItemLabel,P),I=i??j,L=Ej(m,M);CS({id:I});let R=qm(k),z=b.useRef(null),{getButtonProps:ee,buttonRef:B}=px({disabled:T,native:o}),V=Vm(t,z,B,Zm(e=>{h.set(`triggerElement`,e)})),H=Xp(),U=Xp(),te=Xp(),W=Xp();b.useEffect(()=>{if(E)return N||F?W.start(Aj,()=>{_.current.allowUnselectedMouseUp=!0,te.start(Aj,()=>{_.current.allowSelectedMouseUp=!0})}):te.start(kj,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}),()=>{te.clear(),W.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},U.clear()},[E,N,F,_,U,te,W]);let ne=b.useMemo(()=>A?.id??bh(k)?.id,[A,k]),G=u_(O,{id:I,role:`combobox`,"aria-expanded":E?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":E?ne:void 0,"aria-labelledby":L,"aria-readonly":y||void 0,"aria-required":x||void 0,tabIndex:T?-1:0,ref:V,onFocus(e){u(!0),E&&S.current&&g(!1,Im(Cm,e.nativeEvent)),H.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){dh(k,e.relatedTarget)||(l(!0),u(!1),d===`onBlur`&&v.commit(D))},onPointerMove(){w.current=!1},onKeyDown(){w.current=!0},onMouseDown(e){if(E)return;let t=Up(e.currentTarget);function n(e){if(!z.current)return;let t=e.target;if(dh(z.current,t)||dh(R.current,t)||t===z.current)return;let n=Dj(z.current);e.clientX>=n.left-Oj&&e.clientX<=n.right+Oj&&e.clientY>=n.top-Oj&&e.clientY<=n.bottom+Oj||g(!1,Im(Mm,e))}U.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},v.getValidationProps,c,ee);G.role=`combobox`;let re={...f,open:E,disabled:T,value:D,readOnly:y,placeholder:!N};return w_(`button`,e,{ref:[t,z],state:re,stateAttributesMapping:jj,props:G})}),Nj={value:()=>null},Pj=b.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=sj(),u=Ly(c,xj.value),d=Ly(c,xj.items),f=Ly(c,xj.itemToStringLabel),p=Ly(c,xj.hasSelectedValue),m=!p&&a!=null&&i==null,h=Ly(c,xj.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(!p&&a!=null&&!h?a:Array.isArray(u)?bj(u,d,f):yj(u,d,f)),w_(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:Nj})}),Fj=b.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{store:o}=sj();return w_(`span`,e,{state:{open:Ly(o,xj.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:ax})}),Ij=b.createContext(void 0),Lj=b.forwardRef(function(e,t){let{store:n}=sj(),r=Ly(n,xj.mounted),i=Ly(n,xj.forceMount);return r||i?(0,y.jsx)(Ij.Provider,{value:!0,children:(0,y.jsx)(B_,{ref:t,...e})}):null}),Rj=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function zj(){return b.useContext(Rj)}function Bj(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Zm(i),o=b.useRef(0),s=Gp(Hj).current,c=Gp(Vj).current,[l,u]=b.useState(0),d=b.useRef(l),f=Zm((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=Zm(e=>{c.delete(e),d.current+=1,u(d.current)}),m=b.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(Uj).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);Z(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),Z(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),Z(()=>()=>{n.current=[]},[n]),Z(()=>()=>{r&&(r.current=[])},[r]);let h=Zm(e=>(s.add(e),()=>{s.delete(e)}));Z(()=>{s.forEach(e=>e(m))},[s,m]);let g=b.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,y.jsx)(Rj.Provider,{value:g,children:t})}function Vj(){return new Map}function Hj(){return new Set}function Uj(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var Wj=b.createContext(void 0);function Gj(){return b.useContext(Wj)?.direction??`ltr`}var Kj=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=kh(e,t)||{};if(l==null)return{};let f=qh(u),p={x:n,y:r},m=Fh(i),h=Nh(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Oh(k,j,A),N=!c.arrow&&jh(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),qj=(e,t)=>({...Kj(e),options:[e,t]}),Jj={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await Sy().fn(e)).data?.referenceHidden||a}}}},Yj={sideX:`left`,sideY:`top`},Xj={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=op(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:Yj};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=Up(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=Ah(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:Yj.sideX,g=f===`top`?`bottom`:Yj.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function Zj(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Qj(e,t,n){let{rects:r,placement:i}=e;return{side:Zj(t,Ah(i),n),align:jh(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function $j(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:m,collisionAvoidance:h,shiftCrossAxis:g=!1,nodeId:_,adaptiveOrigin:v,lazyFlip:y=!1,externalTree:x}=e,[S,C]=b.useState(null);!m&&S!==null&&C(null);let w=h.side||`flip`,T=h.align||`flip`,E=h.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=Zm(D),k=D?O:t,A=qm(t),j=qm(m),M=Gj()===`rtl`,N=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],P=a===`center`?N:`${N}-${a}`,F=c,I=+(r===`bottom`),L=+(r===`top`),R=+(r===`right`),z=+(r===`left`);typeof F==`number`?F={top:F+I,right:F+z,bottom:F+L,left:F+R}:F&&={top:(F.top||0)+I,right:(F.right||0)+z,bottom:(F.bottom||0)+L,left:(F.left||0)+R};let ee={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:F},B=b.useRef(null),V=qm(i),H=qm(o),U=[_y(e=>{let t=Qj(e,r,M),n=typeof V.current==`function`?V.current(t):V.current,i=typeof H.current==`function`?H.current(t):H.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,M,r])],te=T===`none`&&w!==`shift`,W=!te&&(l||g||w===`shift`),ne=w===`none`?null:by({...ee,padding:{top:F.top+1,right:F.right+1,bottom:F.bottom+1,left:F.left+1},mainAxis:!g&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),G=te?null:vy(e=>{let t=Up(e.elements.floating).documentElement;return{...ee,rootBoundary:g?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:W,limiter:l||g?void 0:yy(e=>{if(!B.current)return{};let{width:t,height:n}=B.current.getBoundingClientRect(),r=Ph(Ah(e.placement)),i=r===`y`?t:n,a=r===`y`?F.left+F.right:F.top+F.bottom;return{offset:i/2+a/2}})}},[ee,l,g,F,T]);w===`shift`||T===`shift`||a===`center`?U.push(G,ne):U.push(ne,G),U.push(xy({...ee,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=op(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),qj(()=>({element:B.current||Up(B.current).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=Ah(a),l=Ph(c),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(Qj(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,W&&l===`y`&&b?S:x),{}}},Jj,v),Z(()=>{!m&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[m,p]);let re=b.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:ie,elements:ae,x:oe,y:se,middlewareData:ce,update:le,placement:ue,context:de,isPositioned:fe,floatingStyles:pe}=cb({rootContext:p,open:f?m:void 0,placement:P,middleware:U,strategy:n,whileElementsMounted:f?void 0:(...e)=>ry(...e,re),nodeId:_,externalTree:x}),{sideX:me,sideY:he}=ce.adaptiveOrigin||Yj,ge=fe?n:`fixed`,_e=b.useMemo(()=>{let e=v?{position:ge,[me]:oe,[he]:se}:{position:ge,...pe};return fe||(e.opacity=0),e},[v,ge,me,oe,he,se,pe,fe]),ve=b.useRef(null);Z(()=>{if(!m)return;let e=A.current,t=typeof e==`function`?e():e,n=(eM(t)?t.current:t)||null;n!==ve.current&&(ie.setPositionReference(n),ve.current=n)},[m,ie,k,A]),b.useEffect(()=>{if(!m)return;let e=A.current;typeof e!=`function`&&eM(e)&&e.current!==ve.current&&(ie.setPositionReference(e.current),ve.current=e.current)},[m,ie,k,A]),b.useEffect(()=>{if(f&&m&&ae.domReference&&ae.floating)return ry(ae.domReference,ae.floating,le,re)},[f,m,ae,le,re]);let ye=Ah(ue),be=Zj(r,ye,M),xe=jh(ue)||`center`,Se=!!ce.hide?.referenceHidden;Z(()=>{y&&m&&fe&&C(ye)},[y,m,fe,ye]);let Ce=b.useMemo(()=>({position:`absolute`,top:ce.arrow?.y,left:ce.arrow?.x}),[ce.arrow]),we=ce.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:_e,arrowStyles:Ce,arrowRef:B,arrowUncentered:we,side:be,align:xe,physicalSide:ye,anchorHidden:Se,refs:ie,context:de,isPositioned:fe,update:le}),[_e,Ce,B,we,be,xe,ye,Se,ie,de,fe,le])}function eM(e){return e!=null&&`current`in e}var tM=b.createContext(void 0);function nM(){let e=b.useContext(tM);if(!e)throw Error(t_(59));return e}function rM(e,t){e&&Object.assign(e.style,t)}var iM={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`};function aM(e){return e===`starting`?A_:rm}function oM(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),w_(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},aM(r),i],stateAttributesMapping:sx})}var sM=20;function cM(e,t,n,r){let[i,a]=b.useState(!1);Z(()=>{if(!e||!t||n==null){a(!1);return}let r=Up(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-sM)},[e,t,n]),fm(e&&(!t||i),r)}var lM={position:`fixed`},uM=b.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=M_,style:_,...v}=e,{store:x,listRef:S,labelsRef:C,alignItemWithTriggerActiveRef:w,selectedItemTextRef:T,valuesRef:E,initialValueRef:D,popupRef:O,setValue:k}=sj(),A=cj(),j=Ly(x,xj.open),M=Ly(x,xj.mounted),N=Ly(x,xj.modal),P=Ly(x,xj.value),F=Ly(x,xj.openMethod),I=Ly(x,xj.positionerElement),L=Ly(x,xj.triggerElement),R=Ly(x,xj.isItemEqualToValue),z=Ly(x,xj.transitionStatus),ee=b.useRef(null),B=b.useRef(null),[V,H]=b.useState(h),U=M&&V&&F!==`touch`;!M&&V!==h&&H(h),Z(()=>{M||(xj.scrollUpArrowVisible(x.state)&&x.set(`scrollUpArrowVisible`,!1),xj.scrollDownArrowVisible(x.state)&&x.set(`scrollDownArrowVisible`,!1))},[x,M]),b.useImperativeHandle(w,()=>U),cM((U||N)&&j,F===`touch`,I,L);let te=$j({anchor:n,floatingRootContext:A,positionMethod:r,mounted:M,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??U,collisionAvoidance:g,keepMounted:!0}),W=U?`none`:te.side,ne=U?lM:te.positionerStyles,G=oM(e,{open:j,side:W,align:te.align,anchorHidden:te.anchorHidden},{styles:ne,transitionStatus:z,props:v,refs:[t,Zm(e=>{x.set(`positionerElement`,e)})],hidden:!M,inert:!j}),re=b.useRef(0),ie=Zm(e=>{if(e.size===0&&re.current===0||E.current.length===0)return;let t=re.current;if(re.current=e.size,e.size===t)return;let n=Im(Cm);if(t!==0&&!x.state.multiple&&P!==null&&fj(E.current,P,R)===-1){let e=D.current,t=e!=null&&fj(E.current,e,R)!==-1?e:null;k(t,n),t===null&&(x.set(`selectedIndex`,null),T.current=null)}if(t!==0&&x.state.multiple&&Array.isArray(P)){let e=e=>fj(E.current,e,R)!==-1,t=P.filter(t=>e(t));(t.length!==P.length||t.some(e=>!dj(P,e,R)))&&(k(t,n),t.length===0&&(x.set(`selectedIndex`,null),T.current=null))}if(j&&U){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};rM(I,e),rM(O.current,e)}}),ae=b.useMemo(()=>({...te,side:W,alignItemWithTriggerActive:U,setControlledAlignItemWithTrigger:H,scrollUpArrowRef:ee,scrollDownArrowRef:B}),[te,W,U,H]);return(0,y.jsx)(Bj,{elementsRef:S,labelsRef:C,onMapChange:ie,children:(0,y.jsxs)(tM.Provider,{value:ae,children:[M&&N&&(0,y.jsx)(Px,{inert:Nx(!j),cutout:L}),G]})})}),dM=`base-ui-disable-scrollbar`,fM={className:dM,getElement(e){return(0,y.jsx)(`style`,{nonce:e,href:dM,precedence:`base-ui:low`,children:`.${dM}{scrollbar-width:none}.${dM}::-webkit-scrollbar{display:none}`})}},pM=b.createContext(void 0);function mM(e){let t=b.useContext(pM);if(t===void 0&&!e)throw Error(t_(69));return t}var hM=b.createContext(void 0),gM={disableStyleElements:!1};function _M(){return b.useContext(hM)??gM}var vM={...sx,...Yy},yM=b.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:c,onOpenChangeComplete:l,setOpen:u,valueRef:d,selectedItemTextRef:f,keyboardActiveRef:p,multiple:m,handleScrollArrowVisibility:h,scrollHandlerRef:g,listRef:_,highlightItemOnHover:v}=sj(),{side:x,align:S,alignItemWithTriggerActive:C,isPositioned:w,setControlledAlignItemWithTrigger:T,scrollDownArrowRef:E,scrollUpArrowRef:D}=nM(),O=mM(!0)!=null,k=cj(),A=Gj(),{nonce:j,disableStyleElements:M}=_M(),N=Ly(s,xj.id),P=Ly(s,xj.open),F=Ly(s,xj.mounted),I=Ly(s,xj.popupProps),L=Ly(s,xj.transitionStatus),R=Ly(s,xj.triggerElement),z=Ly(s,xj.positionerElement),ee=Ly(s,xj.listElement),B=b.useRef(!1),V=b.useRef(!1),H=b.useRef({}),U=em(),te=Zm(e=>{if(!z||!c.current||!V.current)return;if(B.current||!C){h();return}let t=z.style.top===`0px`,n=z.style.bottom===`0px`;if(!t&&!n){h();return}let r=SM(z),i=CM(z.getBoundingClientRect().height,`y`,r),a=Up(z),o=getComputedStyle(z),s=parseFloat(o.marginTop),l=parseFloat(o.marginBottom),u=bM(getComputedStyle(c.current)),d=Math.min(a.documentElement.clientHeight-s-l,u),f=e.scrollTop,p=xM(e),m=0,g=null,_=!1,v=!1,y=e=>{z.style.height=`${e}px`},b=(t,n)=>{let r=Sj(t,0,d-i);r>0&&y(i+r),e.scrollTop=n,d-(i+r)<=1&&(B.current=!0),h()},x=t?p-f:f,S=Math.min(i+x,d);if(m=S,x<=1){b(x,t?p:0);return}if(d-S>1?t?v=!0:g=0:(_=!0,n&&f<p&&(g=f-(x-(i+x-d)))),m=Math.ceil(m),m!==0&&y(m),v||g!=null){let t=xM(e),n=v?t:Sj(g,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(_||m>=d-1)&&(B.current=!0),h()});b.useImperativeHandle(g,()=>te,[te]),Zy({open:P,ref:c,onComplete(){P&&l?.(!0)}});let W={open:P,transitionStatus:L,side:x,align:S};Z(()=>{!z||!c.current||Object.keys(H.current).length||(H.current={top:z.style.top||`0`,left:z.style.left||`0`,right:z.style.right,height:z.style.height,bottom:z.style.bottom,minHeight:z.style.minHeight,maxHeight:z.style.maxHeight,marginTop:z.style.marginTop,marginBottom:z.style.marginBottom})},[c,z]),Z(()=>{P||C||(V.current=!1,B.current=!1,rM(z,H.current))},[P,C,z,c]),Z(()=>{let e=c.current;if(!P||!R||!z||!e||C&&!w||s.state.transitionStatus===`ending`)return;if(!C){V.current=!0,U.request(h),e.style.removeProperty(`--transform-origin`);return}let t=EM(e);e.style.removeProperty(`--transform-origin`);try{let t=f.current,n=d.current,r=getComputedStyle(z),i=getComputedStyle(e),a=Up(R),o=op(z),c=SM(R),l=wM(R.getBoundingClientRect(),c),u=wM(z.getBoundingClientRect(),c),p=l.height,m=ee||e,g=m.scrollHeight,y=parseFloat(i.borderBottomWidth),b=parseFloat(r.marginTop)||10,x=parseFloat(r.marginBottom)||10,S=parseFloat(r.minHeight)||100,C=bM(i),w=a.documentElement.clientHeight-b-x,E=a.documentElement.clientWidth,D=w-l.bottom+p,O,k=A===`rtl`?l.right-u.width:l.left,j=0;if(t&&n){let e=wM(n.getBoundingClientRect(),c);O=wM(t.getBoundingClientRect(),c),k=u.left+(A===`rtl`?e.right-O.right:e.left-O.left);let r=e.top-l.top+e.height/2;j=O.top-u.top+O.height/2-r}let M=D+j+x+y,N=Math.min(w,M),P=w-b-x,F=M-N,I=E-5;z.style.left=`${Sj(k,5,I-u.width)}px`,z.style.height=`${N}px`,z.style.maxHeight=`auto`,z.style.marginTop=`${b}px`,z.style.marginBottom=`${x}px`,e.style.height=`100%`;let L=xM(m),U=F>=L-1;U&&(N=Math.min(w,u.height)-(F-L));let te=l.top<20||l.bottom>w-20||Math.ceil(N)+1<Math.min(g,S),W=(o.visualViewport?.scale??1)!==1&&Pp;if(te||W){V.current=!0,rM(z,H.current),T(!1);return}let ne=Math.max(S,N);if(U){let e=Math.max(0,w-M);z.style.top=u.height>=P?`0`:`${e}px`,z.style.height=`${N}px`,m.scrollTop=xM(m)}else z.style.bottom=`0`,m.scrollTop=F;if(O){let t=u.top,n=u.height,r=O.top+O.height/2,i=Sj(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(ne===w||N>=C)&&(B.current=!0),h(),v&&s.state.selectedIndex===null&&s.state.activeIndex===null&&_.current[0]!=null&&s.set(`activeIndex`,0),V.current=!0}finally{t()}},[s,P,z,R,d,f,c,h,C,T,U,E,D,ee,_,v,A,w]),b.useEffect(()=>{if(!C||!z||!P)return;let e=op(z);function t(e){u(!1,Im(Fm,e))}return kp(e,`resize`,t)},[u,C,z,P]);let ne={...ee?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":m||void 0,id:`${N}-list`},onKeyDown(e){p.current=!0,O&&Ax.has(e.key)&&e.stopPropagation()},onMouseMove(){p.current=!1},onScroll(e){ee||te(e.currentTarget)},...C&&{style:ee?{height:`100%`}:iM}},G=w_(`div`,e,{ref:[t,c],state:W,stateAttributesMapping:vM,props:[I,ne,aM(L),{className:!ee&&C?fM.className:void 0},o]});return(0,y.jsxs)(b.Fragment,{children:[!M&&fM.getElement(j),(0,y.jsx)(av,{context:k,modal:!1,disabled:!F,returnFocus:a,restoreFocus:!0,children:G})]})});function bM(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function xM(e){return Cj(e.scrollHeight,e.clientHeight)}function SM(e){return ey.getScale(e)}function CM(e,t,n){return e/n[t]}function wM(e,t){return Jh({x:CM(e.x,`x`,t),y:CM(e.y,`y`,t),width:CM(e.width,`x`,t),height:CM(e.height,`y`,t)})}var TM=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function EM(e){let{style:t}=e,n={};for(let[e,r]of TM)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of TM){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var DM=b.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=sj(),{alignItemWithTriggerActive:c}=nM(),l=Ly(o,xj.hasScrollArrows),u=Ly(o,xj.openMethod),d=Ly(o,xj.multiple),f={id:`${Ly(o,xj.id)}-list`,role:`listbox`,"aria-multiselectable":d||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:iM},className:l&&u!==`touch`?fM.className:void 0};return w_(`div`,e,{ref:[t,Zm(e=>{o.set(`listElement`,e)})],props:[f,a]})}),OM=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function kM(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=zj(),f=b.useRef(-1),[p,m]=b.useState(a??(i===OM.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=b.useRef(null),g=b.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return Z(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),Z(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),b.useMemo(()=>({ref:g,index:p}),[p,g])}var AM=b.createContext(void 0);function jM(){let e=b.useContext(AM);if(!e)throw Error(t_(57));return e}var MM=b.memo(b.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,style:c,...l}=e,u=b.useRef(null),d=kM({label:a,textRef:u,indexGuessBehavior:OM.GuessFromOrder}),{store:f,getItemProps:p,setOpen:m,setValue:h,selectionRef:g,typingRef:_,valuesRef:v,multiple:x,selectedItemTextRef:S}=sj(),C=Ly(f,xj.isActive,d.index),w=Ly(f,xj.isSelected,d.index,i),T=Ly(f,xj.isSelectedByFocus,d.index),E=Ly(f,xj.isItemEqualToValue),D=d.index,O=D!==-1,k=b.useRef(null),A=qm(D);Z(()=>{if(!O)return;let e=v.current;return e[D]=i,()=>{delete e[D]}},[O,D,i,v]),Z(()=>{if(!O)return;let e=f.state.value,t=e;x&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&uj(i,t,E)&&(f.set(`selectedIndex`,D),u.current&&(S.current=u.current))},[O,D,x,E,f,i,S]);let j={disabled:o,selected:w,highlighted:C},M=p({active:C,selected:w});M.id=void 0;let N=b.useRef(null),P=b.useRef(`mouse`),F=b.useRef(!1),{getButtonProps:I,buttonRef:L}=px({disabled:o,focusableWhenDisabled:!0,native:s,composite:!0});function R(e){let t=f.state.value;if(x){let n=Array.isArray(t)?t:[];h(w?pj(n,i,E):[...n,i],Im(Om,e))}else h(i,Im(Om,e)),m(!1,Im(Om,e))}let z={role:`option`,"aria-selected":w,tabIndex:C?0:-1,onTouchStart(){g.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){N.current=e.key,f.set(`activeIndex`,D),e.key===` `&&_.current&&e.preventDefault()},onClick(e){F.current=!1,!(e.type===`keydown`&&N.current===null)&&(o||e.type===`keydown`&&N.current===` `&&_.current||P.current!==`touch`&&!C||(N.current=null,R(e.nativeEvent)))},onPointerEnter(e){P.current=e.pointerType},onPointerDown(e){P.current=e.pointerType,F.current=!0},onMouseUp(){if(o)return;if(F.current){F.current=!1;return}let e=!g.current.allowSelectedMouseUp&&w,t=!g.current.allowUnselectedMouseUp&&!w;e||t||P.current!==`touch`&&!C||k.current?.click()}},ee=w_(`div`,e,{ref:[L,t,d.ref,k],state:j,props:[M,z,l,I]}),B=b.useMemo(()=>({selected:w,indexRef:A,textRef:u,selectedByFocus:T,hasRegistered:O}),[w,A,u,T,O]);return(0,y.jsx)(AM.Provider,{value:B,children:ee})})),NM=b.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=jM();return n||r?(0,y.jsx)(PM,{...e,ref:t}):null}),PM=b.memo(b.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=jM(),c=b.useRef(null),{transitionStatus:l,setMounted:u}=Gy(s),d=w_(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:Yy});return Zy({open:s,ref:c,onComplete(){s||u(!1)}}),d})),FM=b.memo(b.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=jM(),{selectedItemTextRef:o}=sj(),{className:s,render:c,style:l,...u}=e;return w_(`div`,e,{ref:[b.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:u})})),IM=b.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o=!1,...s}=e,c=a===`up`,{store:l,popupRef:u,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=sj(),{side:m,scrollDownArrowRef:h,scrollUpArrowRef:g}=nM(),_=Ly(l,c?xj.scrollUpArrowVisible:xj.scrollDownArrowVisible),v=Ly(l,xj.openMethod),y=_&&v!==`touch`,b=Xp(),x=c?g:h,{transitionStatus:S,setMounted:C}=Gy(y);Z(()=>(p.current+=1,l.state.hasScrollArrows||l.set(`hasScrollArrows`,!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&l.state.hasScrollArrows&&l.set(`hasScrollArrows`,!1)}),[l,p]),Zy({open:y,ref:x,onComplete(){y||C(!1)}});let w=w_(`div`,e,{ref:[t,x],state:{direction:a,visible:y,side:m,transitionStatus:S},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||b.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??u.current;if(!e)return;l.set(`activeIndex`,null),f();let n=Cj(e.scrollHeight,e.clientHeight),r=wj(e.scrollTop,n),i=r===(c?0:n),a=d.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&l.set(c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i){b.clear();return}if(a.length>0){let t=x.current?.offsetHeight||0;e.scrollTop=LM(a,c,r,e.clientHeight,t,n)}b.start(40,t)}b.start(40,t)},onMouseLeave(){b.clear()}},s]});return y||o?w:null});function LM(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?wj(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?wj(l.offsetTop+l.offsetHeight-r+i,a):a}var RM=b.forwardRef(function(e,t){return(0,y.jsx)(IM,{...e,ref:t,direction:`down`})}),zM=b.forwardRef(function(e,t){return(0,y.jsx)(IM,{...e,ref:t,direction:`up`})}),BM=Tj;function VM({className:e,...t}){return(0,y.jsx)(Pj,{"data-slot":`select-value`,className:np(`flex flex-1 text-left`,e),...t})}function HM({className:e,size:t=`default`,children:n,...r}){return(0,y.jsxs)(Mj,{"data-slot":`select-trigger`,"data-size":t,className:np(`flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,y.jsx)(Fj,{render:(0,y.jsx)(dd,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function UM({className:e,children:t,footer:n,side:r=`bottom`,sideOffset:i=4,align:a=`center`,alignOffset:o=0,alignItemWithTrigger:s=!0,...c}){return(0,y.jsx)(Lj,{children:(0,y.jsx)(uM,{side:r,sideOffset:i,align:a,alignOffset:o,alignItemWithTrigger:s,className:`isolate z-50`,children:(0,y.jsxs)(yM,{"data-slot":`select-content`,"data-align-trigger":s,className:np(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...c,children:[(0,y.jsx)(GM,{}),(0,y.jsx)(DM,{children:t}),(0,y.jsx)(KM,{}),n]})})})}function WM({className:e,children:t,...n}){return(0,y.jsxs)(MM,{"data-slot":`select-item`,className:np(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,y.jsx)(FM,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,y.jsx)(NM,{render:(0,y.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,y.jsx)(ud,{className:`pointer-events-none`})})]})}function GM({className:e,...t}){return(0,y.jsx)(zM,{"data-slot":`select-scroll-up-button`,className:np(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,y.jsx)(fd,{})})}function KM({className:e,...t}){return(0,y.jsx)(RM,{"data-slot":`select-scroll-down-button`,className:np(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,y.jsx)(dd,{})})}var qM=`h-7 justify-between gap-1.5 rounded-md border-border/60 bg-transparent px-2 text-xs font-normal text-foreground shadow-none focus-visible:border-ring/40 focus-visible:ring-1 focus-visible:ring-ring/40 dark:bg-transparent`,JM=`max-h-72 w-(--anchor-width) origin-(--transform-origin) gap-0 overflow-x-hidden p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,YM=`rounded-sm py-1.5 pr-7 pl-2 text-xs hover:bg-foreground/10 hover:text-foreground focus:bg-foreground/10 focus:text-foreground`,XM=({value:e,items:t,ariaLabel:n,placeholder:r,onValueChange:i,open:a,onOpenChange:o,onItemHover:s,triggerClassName:c,triggerStyle:l,footerSlot:u})=>{let d=t.find(t=>t.id===e),f=d?.itemStyle?{...d.itemStyle,...l}:l;return(0,y.jsxs)(BM,{value:e,onValueChange:i,open:a,onOpenChange:o,children:[(0,y.jsx)(HM,{size:`sm`,"aria-label":n,className:np(qM,`w-full`,c),style:f,children:(0,y.jsx)(VM,{placeholder:r,children:()=>d?.label||r})}),(0,y.jsx)(UM,{alignItemWithTrigger:!1,sideOffset:4,className:np(JM,Lx,Rx),footer:u?(0,y.jsx)(`div`,{className:`border-t border-border/40 p-1`,children:u}):void 0,children:t.map(e=>(0,y.jsx)(WM,{value:e.id,className:YM,style:e.itemStyle,onPointerEnter:s?()=>s(e.id):void 0,onFocus:s?()=>s(e.id):void 0,children:e.label},e.id))})]})};function ZM(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,a=t!==void 0,[o,s]=wS({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=Gy(o,!0,!0),[d,f]=b.useState(o),[{height:p,width:m},h]=b.useState({height:void 0,width:void 0}),g=gx(),[_,v]=b.useState(),y=_??g,[x,S]=b.useState(!1),[C,w]=b.useState(!1),T=b.useRef(null),E=b.useRef(null),D=b.useRef(null),O=b.useRef(null),k=Xy(O,!1),A=Zm(e=>{let t=!o,n=Im(wm,e.nativeEvent);if(r(t,n),n.isCanceled)return;let i=O.current;E.current===`css-animation`&&i!=null&&i.style.removeProperty(`animation-name`),!x&&!C&&(E.current!=null&&E.current!==`css-animation`&&!c&&t&&l(!0),E.current===`css-animation`&&(!d&&t&&f(!0),!c&&t&&l(!0))),s(t),E.current===`none`&&c&&!t&&l(!1)});return Z(()=>{a&&E.current===`none`&&!o&&l(!1)},[a,o,t,l]),b.useMemo(()=>({abortControllerRef:T,animationTypeRef:E,disabled:i,handleTrigger:A,height:p,mounted:c,open:o,panelId:y,panelRef:O,runOnceAnimationsFinish:k,setDimensions:h,setHiddenUntilFound:S,setKeepMounted:w,setMounted:l,setOpen:s,setPanelIdState:v,setVisible:f,transitionDimensionRef:D,transitionStatus:u,visible:d,width:m}),[T,E,i,A,p,c,o,y,O,k,h,S,w,l,s,f,D,u,d,m])}var QM=b.createContext(void 0);function $M(){let e=b.useContext(QM);if(e===void 0)throw Error(t_(15));return e}var eN=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Ky.startingStyle]=`startingStyle`,e[e.endingStyle=Ky.endingStyle]=`endingStyle`,e}({}),tN=function(e){return e.panelOpen=`data-panel-open`,e}({}),nN={[eN.open]:``},rN={[eN.closed]:``},iN={open(e){return e?{[tN.panelOpen]:``}:null}},aN={open(e){return e?nN:rN},...Yy},oN=b.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=Zm(o),d=ZM({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=b.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=b.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=w_(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:aN});return(0,y.jsx)(QM.Provider,{value:p,children:m})}),sN={...iN,...Yy},cN=b.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=$M(),{className:s,disabled:c=o,id:l,render:u,nativeButton:d=!0,style:f,...p}=e,{getButtonProps:m,buttonRef:h}=px({disabled:c,focusableWhenDisabled:!0,native:d}),g=b.useMemo(()=>({"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i}),[n,r,i]);return w_(`button`,e,{state:a,ref:[t,h],props:[g,p,m],stateAttributesMapping:sN})}),lN=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e}({});function uN(e){let{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:i,hiddenUntilFound:a,keepMounted:o,id:s,mounted:c,onOpenChange:l,open:u,panelRef:d,runOnceAnimationsFinish:f,setDimensions:p,setMounted:m,setOpen:h,setVisible:g,transitionDimensionRef:_,visible:v,width:y}=e,x=b.useRef(!1),S=b.useRef(null),C=b.useRef(u),w=b.useRef(u),T=em(),E=b.useMemo(()=>n.current===`css-animation`?!v:!u&&!c,[u,c,v,n]),D=Vm(r,d,Zm(e=>{if(!e)return;if(n.current==null||_.current==null){let t=getComputedStyle(e),r=t.animationName!==`none`&&t.animationName!==``,i=t.transitionDuration!==`0s`&&t.transitionDuration!==``;r&&i||(t.animationName===`none`&&t.transitionDuration!==`0s`?n.current=`css-transition`:t.animationName!==`none`&&t.transitionDuration===`0s`?n.current=`css-animation`:n.current=`none`),e.getAttribute(lN.orientation)===`horizontal`||t.transitionProperty.indexOf(`width`)>-1?_.current=`width`:_.current=`height`}if(n.current!==`css-transition`)return;(i===void 0||y===void 0)&&(p({height:e.scrollHeight,width:e.scrollWidth}),w.current&&e.style.setProperty(`transition-duration`,`0s`));let t=-1,r=-1;return t=$p.request(()=>{w.current=!1,r=$p.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})}),()=>{$p.cancel(t),$p.cancel(r)}}));return Z(()=>{if(n.current!==`css-transition`)return;let e=d.current;if(!e)return;let r=-1;if(t.current!=null&&(t.current.abort(),t.current=null),u){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)}),!w.current&&!o&&e.setAttribute(eN.startingStyle,``),p({height:e.scrollHeight,width:e.scrollWidth}),r=$p.request(()=>{Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})})}else{if(e.scrollHeight===0&&e.scrollWidth===0)return;p({height:e.scrollHeight,width:e.scrollWidth});let n=new AbortController;t.current=n;let r=n.signal,i=null,a=eN.endingStyle;return i=new MutationObserver(o=>{o.some(e=>e.type===`attributes`&&e.attributeName===a)&&(i?.disconnect(),i=null,f(()=>{p({height:0,width:0}),e.style.removeProperty(`content-visibility`),m(!1),t.current===n&&(t.current=null)},r))}),i.observe(e,{attributes:!0,attributeFilter:[a]}),()=>{i?.disconnect(),T.cancel(),t.current===n&&(n.abort(),t.current=null)}}return()=>{$p.cancel(r)}},[t,n,T,a,o,c,u,d,f,p,m]),Z(()=>{if(n.current!==`css-animation`)return;let e=d.current;e&&(S.current=e.style.animationName||S.current,e.style.setProperty(`animation-name`,`none`),p({height:e.scrollHeight,width:e.scrollWidth}),!C.current&&!x.current&&e.style.removeProperty(`animation-name`),u?(t.current!=null&&(t.current.abort(),t.current=null),m(!0),g(!0)):(t.current=new AbortController,f(()=>{m(!1),g(!1),t.current=null},t.current.signal)))},[t,n,u,d,f,p,m,g,v]),qp(()=>{let e=$p.request(()=>{C.current=!1});return()=>$p.cancel(e)}),Z(()=>{if(!a)return;let e=d.current;if(!e)return;let t=-1,n=-1;return u&&x.current&&(e.style.transitionDuration=`0s`,p({height:e.scrollHeight,width:e.scrollWidth}),t=$p.request(()=>{x.current=!1,n=$p.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})})),()=>{$p.cancel(t),$p.cancel(n)}},[a,u,d,p]),Z(()=>{let e=d.current;e&&a&&E&&(e.setAttribute(`hidden`,`until-found`),n.current===`css-transition`&&e.setAttribute(eN.startingStyle,``))},[a,E,n,d]),b.useEffect(function(){let e=d.current;if(!e)return;function t(e){x.current=!0,h(!0),l(!0,Im(Cm,e))}return kp(e,`beforematch`,t)},[l,d,h]),b.useMemo(()=>({props:{hidden:E,id:s,ref:D}}),[E,s,D])}var dN=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),fN=b.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{abortControllerRef:l,animationTypeRef:u,height:d,mounted:f,onOpenChange:p,open:m,panelId:h,panelRef:g,runOnceAnimationsFinish:_,setDimensions:v,setHiddenUntilFound:y,setKeepMounted:x,setMounted:S,setPanelIdState:C,setOpen:w,setVisible:T,state:E,transitionDimensionRef:D,visible:O,width:k,transitionStatus:A}=$M(),j=r??!1,M=i??!1;Z(()=>{if(o)return C(o),()=>{C(void 0)}},[o,C]),Z(()=>{y(j)},[y,j]),Z(()=>{x(M)},[x,M]);let{props:N}=uN({abortControllerRef:l,animationTypeRef:u,externalRef:t,height:d,hiddenUntilFound:j,id:h,keepMounted:M,mounted:f,onOpenChange:p,open:m,panelRef:g,runOnceAnimationsFinish:_,setDimensions:v,setMounted:S,setOpen:w,setVisible:T,transitionDimensionRef:D,visible:O,width:k});Zy({open:m&&A===`idle`,ref:g,onComplete(){m&&v({height:void 0,width:void 0})}});let P=w_(`div`,e,{state:b.useMemo(()=>({...E,transitionStatus:A}),[E,A]),ref:[t,g],props:[N,{style:{[dN.collapsiblePanelHeight]:d===void 0?`auto`:`${d}px`,[dN.collapsiblePanelWidth]:k===void 0?`auto`:`${k}px`}},c],stateAttributesMapping:aN});return M||j||f?P:null});function pN({...e}){return(0,y.jsx)(oN,{"data-slot":`collapsible`,...e})}function mN({...e}){return(0,y.jsx)(cN,{"data-slot":`collapsible-trigger`,...e})}function hN({...e}){return(0,y.jsx)(fN,{"data-slot":`collapsible-content`,...e})}function gN({className:e,...t}){return(0,y.jsx)(`label`,{"data-slot":`label`,className:np(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function _N({className:e,...t}){return(0,y.jsx)(`div`,{"data-slot":`field-group`,className:np(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t})}var vN=Jx(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function yN({className:e,orientation:t=`vertical`,...n}){return(0,y.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:np(vN({orientation:t}),e),...n})}function bN({className:e,...t}){return(0,y.jsx)(gN,{"data-slot":`field-label`,className:np(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-3 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}var xN=b.createContext(void 0);function SN(e){let t=b.useContext(xN);if(t===void 0&&!e)throw Error(t_(47));return t}function CN(){return{...ib(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var wN={...ob,disabled:Q(e=>e.disabled),instantType:Q(e=>e.instantType),openMethod:Q(e=>e.openMethod),openChangeReason:Q(e=>e.openChangeReason),modal:Q(e=>e.modal),focusManagerModal:Q(e=>e.focusManagerModal),stickIfOpen:Q(e=>e.stickIfOpen),titleElementId:Q(e=>e.titleElementId),descriptionElementId:Q(e=>e.descriptionElementId),openOnHover:Q(e=>e.openOnHover),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport)},TN=class e extends Hy{constructor(e){let t={...CN(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new Yp,triggerElements:new nb},wN)}setOpen=(e,t)=>{let n=t.reason===Tm,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),F_.flushSync(a)):a(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=Gp(()=>new e(n)).current,i=t??r;return qp(r.disposeEffect),i}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function EN({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=TN.useStore(s?.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});rp(()=>{n===void 0&&u.state.open===!1&&r===!0&&u.update({open:!0,activeTriggerId:l})}),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a);let{openMethod:p,triggerProps:m}=Ub(d);eb(u);let{forceUnmount:h}=tb(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});b.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let g=b.useCallback(()=>{u.setOpen(!1,Im(Pm))},[u]);b.useImperativeHandle(e.actionsRef,()=>({unmount:h,close:g}),[h,g]);let _=lb({popupStore:u,onOpenChange:u.setOpen}),{getReferenceProps:v,getFloatingProps:x,getTriggerProps:S}=bb([pv(_,{outsidePressEvent:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),jb(_)]),C=b.useMemo(()=>v(m),[v,m]),w=b.useMemo(()=>S(m),[S,m]),T=b.useMemo(()=>x(),[x]);u.useSyncedValues({modal:o,openMethod:p,activeTriggerProps:C,inactiveTriggerProps:w,popupProps:T,floatingRootContext:_,nested:G_()!=null});let E=b.useMemo(()=>({store:u}),[u]);return(0,y.jsx)(xN.Provider,{value:E,children:typeof t==`function`?t({payload:f}):t})}function DN(e){return SN(!0)?(0,y.jsx)(EN,{props:e}):(0,y.jsx)(Y_,{children:(0,y.jsx)(EN,{props:e})})}function ON(e,t){let n=b.useRef(null);return{preFocusGuardRef:n,handlePreFocusGuardFocus:Zm(t=>{F_.flushSync(()=>{e.setOpen(!1,Im(km,t.nativeEvent,t.currentTarget))}),Og(n.current)?.focus()}),handleFocusTargetFocus:Zm(n=>{let r=e.select(`positionerElement`);if(r&&kg(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{F_.flushSync(()=>{e.setOpen(!1,Im(km,n.nativeEvent,n.currentTarget))});let i=Dg(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&dh(r,i);){let e=i;if(i=wg(i),i===e)break}i?.focus()}})}}var kN=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,handle:o,payload:s,openOnHover:c=!1,delay:l=300,closeDelay:u=0,id:d,style:f,...p}=e,m=SN(!0),h=o?.store??m?.store;if(!h)throw Error(t_(74));let g=gx(d),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),x=h.useState(`isOpenedByTrigger`,g),S=b.useRef(null),{registerTrigger:C,isMountedByThisTrigger:w}=$y(g,S,h,{payload:s,disabled:i,openOnHover:c,closeDelay:u}),T=h.useState(`openChangeReason`),E=h.useState(`stickIfOpen`),D=h.useState(`openMethod`),O=h.useState(`focusManagerModal`),k=yb(v,{enabled:v!=null&&c&&(D!==`touch`||T!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Bb(),restMs:l,delay:{close:u},triggerElementRef:S,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),A=bb([ov(v,{enabled:v!=null,stickIfOpen:E})]),j=h.useState(`triggerProps`,w),M={disabled:i,open:x},{getButtonProps:N,buttonRef:P}=px({disabled:i,native:a}),F=b.useMemo(()=>({open(e){return e&&T===`trigger-press`?ox.open(e):ax.open(e)}}),[T]),I=w_(`button`,e,{state:M,ref:[P,t,C,S],props:[A.getReferenceProps(),k,j,{[j_]:``,id:g},p,N],stateAttributesMapping:F}),{preFocusGuardRef:L,handlePreFocusGuardFocus:R,handleFocusTargetFocus:z}=ON(h,S);return _&&!O?(0,y.jsxs)(b.Fragment,{children:[(0,y.jsx)(rh,{ref:L,onFocus:R}),(0,y.jsx)(b.Fragment,{children:I},g),(0,y.jsx)(rh,{ref:h.context.triggerFocusTargetRef,onFocus:z})]}):(0,y.jsx)(b.Fragment,{children:I},g)}),AN=b.createContext(void 0);function jN(){let e=b.useContext(AN);if(e===void 0)throw Error(t_(45));return e}var MN=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=SN();return i.useState(`mounted`)||n?(0,y.jsx)(AN.Provider,{value:n,children:(0,y.jsx)(B_,{ref:t,...r})}):null}),NN=b.createContext(void 0);function PN(){let e=b.useContext(NN);if(!e)throw Error(t_(46));return e}var FN=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=N_,style:g,..._}=e,{store:v}=SN(),x=jN(),S=q_(),C=v.useState(`floatingRootContext`),w=v.useState(`mounted`),T=v.useState(`open`),E=v.useState(`openChangeReason`),D=v.useState(`activeTriggerElement`),O=v.useState(`modal`),k=v.useState(`openMethod`),A=v.useState(`positionerElement`),j=v.useState(`instantType`),M=v.useState(`transitionStatus`),N=v.useState(`hasViewport`),P=b.useRef(null),F=Xy(A,!1,!1),I=$j({anchor:i,floatingRootContext:C,positionMethod:a,mounted:w,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:x,nodeId:S,collisionAvoidance:h,adaptiveOrigin:N?Xj:void 0}),L=C.useState(`domReferenceElement`);Z(()=>{let e=L,t=P.current;if(e&&(P.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return F(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[L,F,v]);let R={open:T,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:j};cM(T&&O===!0&&E!==`trigger-hover`,k===`touch`,A,D);let z=b.useCallback(e=>{v.set(`positionerElement`,e)},[v]),ee=oM(e,R,{styles:I.positionerStyles,transitionStatus:M,props:_,refs:[t,z],hidden:!w,inert:!T});return(0,y.jsxs)(NN.Provider,{value:I,children:[w&&O===!0&&E!==`trigger-hover`&&(0,y.jsx)(Px,{ref:v.context.internalBackdropRef,inert:Nx(!T),cutout:D}),(0,y.jsx)(J_,{id:S,children:ee})]})}),IN=b.createContext(void 0);function LN(){let[e,t]=b.useState(0),n=Zm(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:b.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function RN(e){let{value:t,children:n}=e;return(0,y.jsx)(IN.Provider,{value:t,children:n})}var zN={...sx,...Yy},BN=b.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,style:o,...s}=e,{store:c}=SN(),l=PN(),u=mM(!0)!=null,{context:d,hasClosePart:f}=LN(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),x=c.useState(`descriptionElementId`),S=c.useState(`modal`),C=c.useState(`mounted`),w=c.useState(`openChangeReason`),T=c.useState(`activeTriggerElement`),E=c.useState(`floatingRootContext`);Zy({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}});let D=c.useState(`disabled`),O=c.useState(`openOnHover`),k=c.useState(`closeDelay`);_b(E,{enabled:O&&!D,closeDelay:k});function A(e){return e===`touch`?c.context.popupRef.current:!0}let j=i===void 0?A:i,M={open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},N=S!==!1&&f;c.useSyncedValue(`focusManagerModal`,N);let P=b.useCallback(e=>{c.set(`popupElement`,e)},[c]),F=w_(`div`,e,{state:M,ref:[t,c.context.popupRef,P],props:[_,{"aria-labelledby":v,"aria-describedby":x,onKeyDown(e){u&&Ax.has(e.key)&&e.stopPropagation()}},aM(g),s],stateAttributesMapping:zN});return(0,y.jsx)(av,{context:E,openInteractionType:m,modal:N,disabled:!C||w===`trigger-hover`,initialFocus:j,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:up(T)?T:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,y.jsx)(RN,{value:d,children:F})})});function VN({...e}){return(0,y.jsx)(DN,{"data-slot":`popover`,...e})}function HN({...e}){return(0,y.jsx)(kN,{"data-slot":`popover-trigger`,...e})}function UN({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,y.jsx)(MN,{children:(0,y.jsx)(FN,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,y.jsx)(BN,{"data-slot":`popover-content`,className:np(`z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var WN=b.createContext(void 0);function GN(){let e=b.useContext(WN);if(e===void 0)throw Error(t_(63));return e}var KN=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),qN={...pS,checked(e){return e?{[KN.checked]:``}:{[KN.unchecked]:``}}},JN=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,form:o,id:s,inputRef:c,name:l,nativeButton:u=!1,onCheckedChange:d,readOnly:f=!1,required:p=!1,disabled:m=!1,render:h,uncheckedValue:g,value:_,style:v,...x}=e,{clearErrors:S}=_S(),{state:C,setTouched:w,setDirty:T,validityData:E,setFilled:D,setFocused:O,shouldValidateOnChange:k,validationMode:A,disabled:j,name:M,validation:N}=hS(),{labelId:P}=yS(),F=j||m,I=M??l,L=Zm(d),R=b.useRef(null),z=Vm(R,c,N.inputRef),ee=b.useRef(null),B=gx(),V=CS({id:s,implicit:!1,controlRef:ee}),H=u?void 0:V,[U,te]=wS({controlled:n,default:!!i,name:`Switch`,state:`checked`});TS(ee,{id:B,value:U}),Z(()=>{R.current&&D(R.current.checked)},[R,D]),Hb(U,()=>{S(I),T(U!==E.initialValue),D(U),k()?N.commit(U):N.commit(U,!0)});let{getButtonProps:W,buttonRef:ne}=px({disabled:F,native:u}),G=bS(a,P,R,!u,H),re={id:u?V:B,role:`switch`,"aria-checked":U,"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-labelledby":G,onFocus(){F||O(!0)},onBlur(){let e=R.current;!e||F||(w(!0),O(!1),A===`onBlur`&&N.commit(e.checked))},onClick(e){f||F||(e.preventDefault(),R.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},ie=b.useMemo(()=>u_({checked:U,disabled:F,form:o,id:H,name:I,required:p,style:I?nh:th,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:z,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(f){e.preventDefault();return}let t=e.currentTarget.checked,n=Im(Cm,e.nativeEvent);L?.(t,n),!n.isCanceled&&te(t)},onFocus(){ee.current?.focus()}},N.getInputValidationProps,_===void 0?rm:{value:_}),[U,F,o,z,H,I,L,f,p,te,N,_]),ae=b.useMemo(()=>({...C,checked:U,disabled:F,readOnly:f,required:p}),[C,U,F,f,p]),oe=w_(`span`,e,{state:ae,ref:[t,ee,ne],props:[re,N.getValidationProps,x,W],stateAttributesMapping:qN});return(0,y.jsxs)(WN.Provider,{value:ae,children:[oe,!U&&I&&g!==void 0&&(0,y.jsx)(`input`,{type:`hidden`,form:o,name:I,value:g}),(0,y.jsx)(`input`,{...ie,suppressHydrationWarning:!0})]})}),YN=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=hS(),s=GN();return w_(`span`,e,{state:{...o,...s},ref:t,stateAttributesMapping:qN,props:a})});function XN({className:e,size:t=`default`,...n}){return(0,y.jsx)(JN,{"data-slot":`switch`,"data-size":t,className:np(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,y.jsx)(YN,{"data-slot":`switch-thumb`,className:`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground`})})}var ZN=b.createContext(void 0);function QN(e){let t=b.useContext(ZN);if(t===void 0&&!e)throw Error(t_(72));return t}var $N={...ob,disabled:Q(e=>e.disabled),instantType:Q(e=>e.instantType),isInstantPhase:Q(e=>e.isInstantPhase),trackCursorAxis:Q(e=>e.trackCursorAxis),disableHoverablePopup:Q(e=>e.disableHoverablePopup),lastOpenChangeReason:Q(e=>e.openChangeReason),closeOnClick:Q(e=>e.closeOnClick),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport)},eP=class e extends Hy{constructor(e){super({...tP(),...e},{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new nb},$N)}setOpen=(e,t)=>{let n=t.reason,r=n===Tm,i=e&&n===`trigger-focus`,a=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0);let o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)};r?F_.flushSync(o):o()};static useStore(t,n){let r=Gp(()=>new e(n)).current,i=t??r,a=lb({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=a,i}};function tP(){return{...ib(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var nP=jy(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=eP.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});rp(()=>{r===void 0&&p.state.open===!1&&n===!0&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),Z(()=>{m&&t&&p.setOpen(!1,Im(Nm))},[m,t,p]),p.useSyncedValue(`disabled`,t),eb(p);let{forceUnmount:v,transitionStatus:x}=tb(h,p),S=p.select(`floatingRootContext`),C=p.useState(`isInstantPhase`),w=p.useState(`instantType`),T=p.useState(`lastOpenChangeReason`),E=b.useRef(null);Z(()=>{x===`ending`&&T===`none`||x!==`ending`&&C?(w!==`delay`&&(E.current=w),p.set(`instantType`,`delay`)):E.current!==null&&(p.set(`instantType`,E.current),E.current=null)},[x,C,T,w,p]),Z(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]);let D=b.useCallback(()=>{p.setOpen(!1,Im(Pm))},[p]);b.useImperativeHandle(o,()=>({unmount:v,close:D}),[v,D]);let{getReferenceProps:O,getFloatingProps:k,getTriggerProps:A}=bb([pv(S,{enabled:!t,referencePress:()=>p.select(`closeOnClick`)}),lv(S,{enabled:!t&&a!==`none`,axis:a===`none`?void 0:a})]),j=b.useMemo(()=>O(),[O]),M=b.useMemo(()=>A(),[A]),N=b.useMemo(()=>k(),[k]);return p.useSyncedValues({activeTriggerProps:j,inactiveTriggerProps:M,popupProps:N}),(0,y.jsx)(ZN.Provider,{value:p,children:typeof f==`function`?f({payload:_}):f})}),rP=b.createContext(void 0);function iP(){return b.useContext(rP)}var aP=function(e){return e[e.popupOpen=$b.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),oP=My(function(e,t){let{className:n,render:r,handle:i,payload:a,disabled:o,delay:s,closeOnClick:c=!0,closeDelay:l,id:u,style:d,...f}=e,p=QN(!0),m=i?.store??p;if(!m)throw Error(t_(82));let h=gx(u),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=b.useRef(null),x=s??600,S=l??0,{registerTrigger:C,isMountedByThisTrigger:w}=$y(h,y,m,{payload:a,closeOnClick:c,closeDelay:S}),T=iP(),{delayRef:E,isInstantPhase:D,hasProvider:O}=zm(v,{open:_});m.useSyncedValue(`isInstantPhase`,D);let k=m.useState(`disabled`),A=o??k,j=m.useState(`trackCursorAxis`),M=m.useState(`disableHoverablePopup`),N=yb(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!M&&j!==`both`?Bb():null,restMs(){let e=T?.delay,t=typeof E.current==`object`?E.current.open:void 0,n=x;return O&&(n=t===0?0:s??e??x),n},delay(){let e=typeof E.current==`object`?E.current.close:void 0,t=S;return l==null&&O&&(t=e),{close:t}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`}),P=db(v,{enabled:!A}).reference,F={open:_},I=m.useState(`triggerProps`,w);return w_(`button`,e,{state:F,ref:[t,C,y],props:[N,P,I,{onPointerDown(){m.set(`closeOnClick`,c)},id:h,[aP.triggerDisabled]:A?``:void 0},f],stateAttributesMapping:ax})}),sP=b.createContext(void 0);function cP(){let e=b.useContext(sP);if(e===void 0)throw Error(t_(70));return e}var lP=b.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=z_({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,y.jsxs)(b.Fragment,{children:[l,c&&F_.createPortal(n,c)]})}),uP=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return QN().useState(`mounted`)||n?(0,y.jsx)(sP.Provider,{value:n,children:(0,y.jsx)(lP,{ref:t,...r})}):null}),dP=b.createContext(void 0);function fP(){let e=b.useContext(dP);if(e===void 0)throw Error(t_(71));return e}var pP=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=N_,style:g,..._}=e,v=QN(),x=cP(),S=v.useState(`open`),C=v.useState(`mounted`),w=v.useState(`trackCursorAxis`),T=v.useState(`disableHoverablePopup`),E=v.useState(`floatingRootContext`),D=v.useState(`instantType`),O=v.useState(`transitionStatus`),k=$j({anchor:i,positionMethod:a,floatingRootContext:E,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:x,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?Xj:void 0}),A=oM(e,b.useMemo(()=>({open:S,side:k.side,align:k.align,anchorHidden:k.anchorHidden,instant:w===`none`?D:`tracking-cursor`}),[S,k.side,k.align,k.anchorHidden,w,D]),{styles:k.positionerStyles,transitionStatus:O,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!C,inert:!S||w===`both`||T});return(0,y.jsx)(dP.Provider,{value:k,children:A})}),mP={...sx,...Yy},hP=b.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=QN(),{side:s,align:c}=fP(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`);Zy({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}});let m=o.useState(`disabled`),h=o.useState(`closeDelay`);return _b(p,{enabled:!m,closeDelay:h}),w_(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,o.useStateSetter(`popupElement`)],props:[f,aM(d),a],stateAttributesMapping:mP})}),gP=b.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=QN(),s=o.useState(`open`),c=o.useState(`instantType`),{arrowRef:l,side:u,align:d,arrowUncentered:f,arrowStyles:p}=fP();return w_(`div`,e,{state:{open:s,side:u,align:d,uncentered:f,instant:c},ref:[t,l],props:[{style:p,"aria-hidden":!0},a],stateAttributesMapping:sx})}),_P=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=b.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=b.useMemo(()=>({open:t,close:n}),[t,n]);return(0,y.jsx)(rP.Provider,{value:i,children:(0,y.jsx)(Rm,{delay:a,timeoutMs:r,children:e.children})})};function vP({delay:e=0,...t}){return(0,y.jsx)(_P,{"data-slot":`tooltip-provider`,delay:e,...t})}function yP({...e}){return(0,y.jsx)(nP,{"data-slot":`tooltip`,...e})}function bP({...e}){return(0,y.jsx)(oP,{"data-slot":`tooltip-trigger`,...e})}function xP({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,y.jsx)(uP,{children:(0,y.jsx)(pP,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,y.jsxs)(hP,{"data-slot":`tooltip-content`,className:np(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,y.jsx)(gP,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var SP=[{id:`block`,name:`Block`},{id:`bar`,name:`Bar`},{id:`underline`,name:`Underline`}],CP=`block`,wP=SP.map(e=>e.id),TP=e=>typeof e==`string`&&wP.includes(e),EP=e=>e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`),DP=`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`,OP=`"Symbols Nerd Font"`,kP=(e,t)=>`"${EP(e)}"${t?`, ${OP}`:``}, ${DP}`,AP=(e,t,n)=>({id:e,name:t,family:kP(t,!0),source:n}),jP=AP(`geist-mono`,`Geist Mono`,`fontsource`),MP=AP(`jetbrains-mono`,`JetBrains Mono`,`google`),NP=AP(`fira-code`,`Fira Code`,`google`),PP=AP(`ibm-plex-mono`,`IBM Plex Mono`,`google`),FP=AP(`source-code-pro`,`Source Code Pro`,`google`),IP=AP(`roboto-mono`,`Roboto Mono`,`google`),LP=AP(`dm-mono`,`DM Mono`,`google`),RP=AP(`inconsolata`,`Inconsolata`,`google`),zP=AP(`space-mono`,`Space Mono`,`google`),BP=AP(`ubuntu-mono`,`Ubuntu Mono`,`google`),VP=[jP,AP(`anonymous-pro`,`Anonymous Pro`,`google`),LP,NP,PP,RP,MP,IP,FP,zP,BP];jP.id;var HP=e=>e?VP.find(t=>t.id===e)??jP:jP,UP=(e,t)=>kP(e.name,t),WP=()=>{let e=VP.filter(e=>e.source===`google`);return e.length===0?``:`https://fonts.googleapis.com/css2?${e.map(e=>`family=${e.name.replace(/ /g,`+`)}:wght@400;700`).join(`&`)}&display=swap`},GP=[{value:1e3,label:`1k lines`},{value:1e4,label:`10k lines`},{value:5e4,label:`50k lines`},{value:1e5,label:`100k lines`}],KP=1e4,qP=GP.map(e=>e.value),JP=e=>qP.includes(e),YP={id:`vesper`,name:`Vesper`,source:`raunofreiberg/vesper`,colors:{background:`#101010`,foreground:`#ffffff`,cursor:`#ffc799`,cursorAccent:`#101010`,selectionBackground:`#2a2a2a`,selectionForeground:`#ffffff`,black:`#101010`,red:`#ff8080`,green:`#99ffe4`,yellow:`#ffc799`,blue:`#a0a0a0`,magenta:`#ffc799`,cyan:`#99ffe4`,white:`#ffffff`,brightBlack:`#505050`,brightRed:`#ff9999`,brightGreen:`#b3ffe4`,brightYellow:`#ffd1a8`,brightBlue:`#b0b0b0`,brightMagenta:`#ffc799`,brightCyan:`#66ddcc`,brightWhite:`#ffffff`}},XP=[YP,{id:`ayu-mirage`,name:`Ayu Mirage`,source:`ayu-theme/vscode-ayu`,colors:{background:`#1f2430`,foreground:`#cccac2`,cursor:`#ffcc66`,cursorAccent:`#1f2430`,selectionBackground:`#34455a`,selectionForeground:`#cccac2`,black:`#171b24`,red:`#f28273`,green:`#87d96c`,yellow:`#fcca60`,blue:`#6acdff`,magenta:`#ddbbff`,cyan:`#93e2c8`,white:`#c7c7c7`,brightBlack:`#686868`,brightRed:`#f28779`,brightGreen:`#d5ff80`,brightYellow:`#ffcd66`,brightBlue:`#73d0ff`,brightMagenta:`#dfbfff`,brightCyan:`#95e6cb`,brightWhite:`#ffffff`}},{id:`catppuccin-frappe`,name:`Catppuccin Frappé`,source:`catppuccin/wezterm + style-guide`,colors:{background:`#303446`,foreground:`#c6d0f5`,cursor:`#f2d5cf`,cursorAccent:`#232634`,selectionBackground:`#626880`,selectionForeground:`#c6d0f5`,black:`#51576d`,red:`#e78284`,green:`#a6d189`,yellow:`#e5c890`,blue:`#8caaee`,magenta:`#f4b8e4`,cyan:`#81c8be`,white:`#b5bfe2`,brightBlack:`#626880`,brightRed:`#e78284`,brightGreen:`#a6d189`,brightYellow:`#e5c890`,brightBlue:`#8caaee`,brightMagenta:`#f4b8e4`,brightCyan:`#81c8be`,brightWhite:`#a5adce`}},{id:`catppuccin-macchiato`,name:`Catppuccin Macchiato`,source:`catppuccin/wezterm + style-guide`,colors:{background:`#24273a`,foreground:`#cad3f5`,cursor:`#f4dbd6`,cursorAccent:`#181926`,selectionBackground:`#5b6078`,selectionForeground:`#cad3f5`,black:`#494d64`,red:`#ed8796`,green:`#a6da95`,yellow:`#eed49f`,blue:`#8aadf4`,magenta:`#f5bde6`,cyan:`#8bd5ca`,white:`#b8c0e0`,brightBlack:`#5b6078`,brightRed:`#ed8796`,brightGreen:`#a6da95`,brightYellow:`#eed49f`,brightBlue:`#8aadf4`,brightMagenta:`#f5bde6`,brightCyan:`#8bd5ca`,brightWhite:`#a5adcb`}},{id:`catppuccin-mocha`,name:`Catppuccin Mocha`,source:`catppuccin/wezterm + style-guide`,colors:{background:`#1e1e2e`,foreground:`#cdd6f4`,cursor:`#f5e0dc`,cursorAccent:`#11111b`,selectionBackground:`#585b70`,selectionForeground:`#cdd6f4`,black:`#45475a`,red:`#f38ba8`,green:`#a6e3a1`,yellow:`#f9e2af`,blue:`#89b4fa`,magenta:`#f5c2e7`,cyan:`#94e2d5`,white:`#bac2de`,brightBlack:`#585b70`,brightRed:`#f38ba8`,brightGreen:`#a6e3a1`,brightYellow:`#f9e2af`,brightBlue:`#89b4fa`,brightMagenta:`#f5c2e7`,brightCyan:`#94e2d5`,brightWhite:`#a6adc8`}},{id:`dracula`,name:`Dracula`,source:`dracula/visual-studio-code`,colors:{background:`#282a36`,foreground:`#f8f8f2`,cursor:`#f8f8f2`,cursorAccent:`#282a36`,selectionBackground:`#44475a`,selectionForeground:`#f8f8f2`,black:`#21222c`,red:`#ff5555`,green:`#50fa7b`,yellow:`#f1fa8c`,blue:`#bd93f9`,magenta:`#ff79c6`,cyan:`#8be9fd`,white:`#f8f8f2`,brightBlack:`#6272a4`,brightRed:`#ff6e6e`,brightGreen:`#69ff94`,brightYellow:`#ffffa5`,brightBlue:`#d6acff`,brightMagenta:`#ff92df`,brightCyan:`#a4ffff`,brightWhite:`#ffffff`}},{id:`github-dark`,name:`GitHub Dark Default`,source:`primer/github-vscode-theme + @primer/primitives`,colors:{background:`#0d1117`,foreground:`#e6edf3`,cursor:`#e6edf3`,cursorAccent:`#0d1117`,selectionBackground:`#264f78`,selectionForeground:`#e6edf3`,black:`#484f58`,red:`#ff7b72`,green:`#3fb950`,yellow:`#d29922`,blue:`#58a6ff`,magenta:`#bc8cff`,cyan:`#39c5cf`,white:`#b1bac4`,brightBlack:`#6e7681`,brightRed:`#ffa198`,brightGreen:`#56d364`,brightYellow:`#e3b341`,brightBlue:`#79c0ff`,brightMagenta:`#d2a8ff`,brightCyan:`#56d4dd`,brightWhite:`#ffffff`}},{id:`gruvbox-dark`,name:`Gruvbox Dark (Medium)`,source:`jdinhify/vscode-theme-gruvbox`,colors:{background:`#282828`,foreground:`#ebdbb2`,cursor:`#ebdbb2`,cursorAccent:`#282828`,selectionBackground:`#504945`,selectionForeground:`#ebdbb2`,black:`#3c3836`,red:`#cc241d`,green:`#98971a`,yellow:`#d79921`,blue:`#458588`,magenta:`#b16286`,cyan:`#689d6a`,white:`#a89984`,brightBlack:`#928374`,brightRed:`#fb4934`,brightGreen:`#b8bb26`,brightYellow:`#fabd2f`,brightBlue:`#83a598`,brightMagenta:`#d3869b`,brightCyan:`#8ec07c`,brightWhite:`#ebdbb2`}},{id:`monokai`,name:`Monokai`,source:`vscode/extensions/theme-monokai`,colors:{background:`#272822`,foreground:`#f8f8f2`,cursor:`#f8f8f0`,cursorAccent:`#272822`,selectionBackground:`#878b91`,selectionForeground:`#f8f8f2`,black:`#333333`,red:`#c4265e`,green:`#86b42b`,yellow:`#b3b42b`,blue:`#6a7ec8`,magenta:`#8c6bc8`,cyan:`#56adbc`,white:`#e3e3dd`,brightBlack:`#666666`,brightRed:`#f92672`,brightGreen:`#a6e22e`,brightYellow:`#e2e22e`,brightBlue:`#819aff`,brightMagenta:`#ae81ff`,brightCyan:`#66d9ef`,brightWhite:`#f8f8f2`}},{id:`night-owl`,name:`Night Owl`,source:`sdras/night-owl-vscode-theme`,colors:{background:`#011627`,foreground:`#d6deeb`,cursor:`#80a4c2`,cursorAccent:`#011627`,selectionBackground:`#1b90dd`,selectionForeground:`#d6deeb`,black:`#011627`,red:`#ef5350`,green:`#22da6e`,yellow:`#c5e478`,blue:`#82aaff`,magenta:`#c792ea`,cyan:`#21c7a8`,white:`#ffffff`,brightBlack:`#575656`,brightRed:`#ef5350`,brightGreen:`#22da6e`,brightYellow:`#ffeb95`,brightBlue:`#82aaff`,brightMagenta:`#c792ea`,brightCyan:`#7fdbca`,brightWhite:`#ffffff`}},{id:`nord`,name:`Nord`,source:`arcticicestudio/nord-visual-studio-code`,colors:{background:`#2e3440`,foreground:`#d8dee9`,cursor:`#d8dee9`,cursorAccent:`#2e3440`,selectionBackground:`#434c5e`,selectionForeground:`#eceff4`,black:`#3b4252`,red:`#bf616a`,green:`#a3be8c`,yellow:`#ebcb8b`,blue:`#81a1c1`,magenta:`#b48ead`,cyan:`#88c0d0`,white:`#e5e9f0`,brightBlack:`#4c566a`,brightRed:`#bf616a`,brightGreen:`#a3be8c`,brightYellow:`#ebcb8b`,brightBlue:`#81a1c1`,brightMagenta:`#b48ead`,brightCyan:`#8fbcbb`,brightWhite:`#eceff4`}},{id:`one-dark-pro`,name:`One Dark Pro`,source:`Binaryify/OneDark-Pro`,colors:{background:`#282c34`,foreground:`#abb2bf`,cursor:`#abb2bf`,cursorAccent:`#282c34`,selectionBackground:`#3e4452`,selectionForeground:`#abb2bf`,black:`#3f4451`,red:`#e05561`,green:`#8cc265`,yellow:`#d18f52`,blue:`#4aa5f0`,magenta:`#c162de`,cyan:`#42b3c2`,white:`#d7dae0`,brightBlack:`#4f5666`,brightRed:`#ff616e`,brightGreen:`#a5e075`,brightYellow:`#f0a45d`,brightBlue:`#4dc4ff`,brightMagenta:`#de73ff`,brightCyan:`#4cd1e0`,brightWhite:`#e6e6e6`}},{id:`solarized-dark`,name:`Solarized Dark`,source:`vscode/extensions/theme-solarized-dark`,colors:{background:`#002b36`,foreground:`#839496`,cursor:`#d30102`,cursorAccent:`#002b36`,selectionBackground:`#274642`,selectionForeground:`#93a1a1`,black:`#073642`,red:`#dc322f`,green:`#859900`,yellow:`#b58900`,blue:`#268bd2`,magenta:`#d33682`,cyan:`#2aa198`,white:`#eee8d5`,brightBlack:`#002b36`,brightRed:`#cb4b16`,brightGreen:`#586e75`,brightYellow:`#657b83`,brightBlue:`#839496`,brightMagenta:`#6c71c4`,brightCyan:`#93a1a1`,brightWhite:`#fdf6e3`}},{id:`synthwave-84`,name:`SynthWave '84`,source:`robb0wen/synthwave-vscode`,colors:{background:`#262335`,foreground:`#ffffff`,cursor:`#03edf9`,cursorAccent:`#262335`,selectionBackground:`#463465`,selectionForeground:`#ffffff`,black:`#2a2139`,red:`#fe4450`,green:`#72f1b8`,yellow:`#f3e70f`,blue:`#03edf9`,magenta:`#ff7edb`,cyan:`#03edf9`,white:`#ffffff`,brightBlack:`#495495`,brightRed:`#fe4450`,brightGreen:`#72f1b8`,brightYellow:`#fede5d`,brightBlue:`#03edf9`,brightMagenta:`#ff7edb`,brightCyan:`#03edf9`,brightWhite:`#ffffff`}},{id:`tokyo-night`,name:`Tokyo Night`,source:`enkia/tokyo-night-vscode-theme`,colors:{background:`#1a1b26`,foreground:`#a9b1d6`,cursor:`#c0caf5`,cursorAccent:`#1a1b26`,selectionBackground:`#515c7e`,selectionForeground:`#c0caf5`,black:`#363b54`,red:`#f7768e`,green:`#73daca`,yellow:`#e0af68`,blue:`#7aa2f7`,magenta:`#bb9af7`,cyan:`#7dcfff`,white:`#787c99`,brightBlack:`#363b54`,brightRed:`#f7768e`,brightGreen:`#73daca`,brightYellow:`#e0af68`,brightBlue:`#7aa2f7`,brightMagenta:`#bb9af7`,brightCyan:`#7dcfff`,brightWhite:`#acb0d0`}},{id:`tokyo-night-storm`,name:`Tokyo Night Storm`,source:`enkia/tokyo-night-vscode-theme`,colors:{background:`#24283b`,foreground:`#a9b1d6`,cursor:`#c0caf5`,cursorAccent:`#24283b`,selectionBackground:`#6f7bb6`,selectionForeground:`#c0caf5`,black:`#414868`,red:`#f7768e`,green:`#73daca`,yellow:`#e0af68`,blue:`#7aa2f7`,magenta:`#bb9af7`,cyan:`#7dcfff`,white:`#8089b3`,brightBlack:`#414868`,brightRed:`#f7768e`,brightGreen:`#73daca`,brightYellow:`#e0af68`,brightBlue:`#7aa2f7`,brightMagenta:`#bb9af7`,brightCyan:`#7dcfff`,brightWhite:`#a9b1d6`}}];YP.id;var ZP=e=>e?XP.find(t=>t.id===e)??YP:YP,QP=`text-[10px] font-medium tracking-wide text-muted-foreground/70 uppercase`,$P=`text-xs font-normal text-muted-foreground`,eF=Object.fromEntries(VP.map(e=>[e.id,{fontFamily:e.family}])),tF=XP.map(e=>({id:e.id,label:e.name})),nF=VP.map(e=>({id:e.id,label:e.name,itemStyle:eF[e.id]})),rF=SP.map(e=>({id:e.id,label:e.name})),iF=GP.map(e=>({id:String(e.value),label:e.label})),aF=e=>e.toFixed(1),oF=({label:e,value:t,title:n,valueClassName:r})=>(0,y.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,y.jsx)(`dt`,{className:$P,children:e}),(0,y.jsx)(`dd`,{title:n??t,className:np(`min-w-0 truncate text-right text-foreground/90`,r),children:t})]}),sF=({themeId:e,onThemeChange:t,onThemePreview:n,fontId:r,onFontChange:i,onFontPreview:a,nerdFontEnabled:o,onNerdFontEnabledChange:s,fontSize:c,onFontSizeChange:l,lineHeight:u,onLineHeightChange:d,paddingX:f,onPaddingXChange:p,paddingY:m,onPaddingYChange:h,cursorStyle:g,onCursorStyleChange:_,onCursorStylePreview:v,cursorBlink:x,onCursorBlinkChange:S,scrollback:C,onScrollbackChange:w,scrollOnUserInput:T,onScrollOnUserInputChange:E,notificationsPermission:D,onNotificationsPermissionRequest:O,sessionInfo:k,onPopoverOpenChange:A,onClose:j})=>{let[M,N]=(0,b.useState)(!1),[P,F]=(0,b.useState)(!1),I=(0,b.useRef)(null);return(0,y.jsxs)(VN,{open:M,onOpenChange:e=>{N(e),A?.(e),e||(F(!1),n?.(null),a?.(null),v?.(null),j?.())},children:[(0,y.jsx)(HN,{render:(0,y.jsx)(Xx,{variant:`ghost`,size:`icon-sm`,"aria-label":`terminal settings`,className:`hover:text-foreground`}),children:(0,y.jsx)(Ed,{})}),(0,y.jsx)(UN,{ref:I,side:`bottom`,align:`end`,sideOffset:8,className:np(`w-64 gap-0 overflow-hidden p-3`,Lx,Rx),children:(0,y.jsxs)(_N,{className:`gap-3`,children:[(0,y.jsxs)(yN,{orientation:`vertical`,className:`gap-1.5`,children:[(0,y.jsx)(bN,{className:QP,children:`Theme`}),(0,y.jsx)(XM,{value:e,items:tF,ariaLabel:`select theme`,placeholder:`Theme`,onValueChange:e=>{e&&t(e)},onOpenChange:e=>{e||n?.(null)},onItemHover:n?e=>n(e):void 0})]}),(0,y.jsx)(YA,{className:`bg-border/40`}),(0,y.jsxs)(yN,{orientation:`vertical`,className:`gap-1.5`,children:[(0,y.jsx)(bN,{className:QP,children:`Font`}),(0,y.jsx)(XM,{value:r,items:nF,ariaLabel:`select font`,placeholder:`Font`,open:P,onValueChange:e=>{e&&i(e)},onOpenChange:e=>{F(e),e||a?.(null)},onItemHover:a?e=>a(e):void 0}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:$P,children:`Size`}),(0,y.jsx)(rj,{value:c,min:9,max:24,step:1,ariaLabel:`terminal font size`,decrementAriaLabel:`decrease font size`,incrementAriaLabel:`increase font size`,onValueChange:l})]}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:$P,children:`Line height`}),(0,y.jsx)(rj,{value:u,min:1,max:2,step:BS,ariaLabel:`terminal line height`,decrementAriaLabel:`decrease line height`,incrementAriaLabel:`increase line height`,formatDisplay:aF,onValueChange:d})]}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,y.jsxs)(yP,{children:[(0,y.jsx)(bP,{render:(0,y.jsx)(`span`,{className:$P}),children:`Nerd Font icons`}),(0,y.jsx)(xP,{side:`bottom`,sideOffset:8,className:`max-w-xs`,children:`Appends a Symbols Only Nerd Font to the font stack. Icon glyphs (Private Use Area codepoints) are resolved by the symbols font while all other characters render from the primary font above.`})]}),(0,y.jsx)(XN,{"aria-label":`toggle nerd font icons`,checked:o,onCheckedChange:s})]})]}),(0,y.jsx)(YA,{className:`bg-border/40`}),(0,y.jsxs)(yN,{orientation:`vertical`,className:`gap-1.5`,children:[(0,y.jsx)(bN,{className:QP,children:`Window`}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:$P,children:`Pad X`}),(0,y.jsx)(rj,{value:f,min:0,max:48,step:1,ariaLabel:`terminal horizontal padding`,decrementAriaLabel:`decrease horizontal padding`,incrementAriaLabel:`increase horizontal padding`,onValueChange:p})]}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:$P,children:`Pad Y`}),(0,y.jsx)(rj,{value:m,min:0,max:48,step:1,ariaLabel:`terminal vertical padding`,decrementAriaLabel:`decrease vertical padding`,incrementAriaLabel:`increase vertical padding`,onValueChange:h})]})]}),(0,y.jsx)(YA,{className:`bg-border/40`}),(0,y.jsxs)(yN,{orientation:`vertical`,className:`gap-1.5`,children:[(0,y.jsx)(bN,{className:QP,children:`Notifications`}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,y.jsxs)(yP,{children:[(0,y.jsx)(bP,{render:(0,y.jsx)(`span`,{className:$P}),children:`Desktop alerts`}),(0,y.jsx)(xP,{side:`bottom`,sideOffset:8,className:`max-w-xs`,children:`When on, OSC 9 sequences from the shell trigger browser notifications. Enable to receive alerts when the tab is in the background. Blocked permissions must be changed in browser settings.`})]}),(0,y.jsx)(XN,{"aria-label":`toggle desktop notifications`,checked:D===`granted`,disabled:D===`unsupported`||D===`denied`,onCheckedChange:e=>{e&&O()}})]})]}),(0,y.jsx)(YA,{className:`bg-border/40`}),(0,y.jsxs)(yN,{orientation:`vertical`,className:`gap-1.5`,children:[(0,y.jsx)(bN,{className:QP,children:`Cursor`}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:$P,children:`Style`}),(0,y.jsx)(XM,{value:g,items:rF,ariaLabel:`select cursor style`,placeholder:`Cursor style`,triggerClassName:`w-fit min-w-[7rem]`,onValueChange:e=>{TP(e)&&_(e)},onOpenChange:e=>{e||v?.(null)},onItemHover:v?e=>{TP(e)&&v?.(e)}:void 0})]}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:$P,children:`Blink`}),(0,y.jsx)(XN,{"aria-label":`toggle cursor blink`,checked:x,onCheckedChange:S})]})]}),(0,y.jsx)(YA,{className:`bg-border/40`}),(0,y.jsxs)(yN,{orientation:`vertical`,className:`gap-1.5`,children:[(0,y.jsx)(bN,{className:QP,children:`Scrollback`}),(0,y.jsx)(XM,{value:String(C),items:iF,ariaLabel:`select scrollback`,placeholder:`Scrollback`,onValueChange:e=>{if(e===null)return;let t=Number(e);JP(t)&&w(t)}}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,y.jsxs)(yP,{children:[(0,y.jsx)(bP,{render:(0,y.jsx)(`span`,{className:$P}),children:`Pin to bottom on input`}),(0,y.jsx)(xP,{side:`bottom`,sideOffset:8,className:`max-w-xs`,children:`When on, typing scrolls the viewport back to the bottom. When off, the viewport stays where you scrolled — useful for reading history while typing.`})]}),(0,y.jsx)(XN,{"aria-label":`toggle pin to bottom on input`,checked:T,onCheckedChange:E})]})]}),k?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(YA,{className:`bg-border/40`}),(0,y.jsxs)(pN,{defaultOpen:!1,children:[(0,y.jsx)(mN,{render:(0,y.jsxs)(`button`,{type:`button`,className:`group/shell flex w-full items-center justify-between gap-2 rounded-sm py-1 text-left transition-colors outline-none hover:text-foreground/90 focus-visible:text-foreground/90`,children:[(0,y.jsx)(`span`,{className:QP,children:`Shell`}),(0,y.jsx)(dd,{className:`size-3 text-muted-foreground/60 transition-transform duration-200 ease-snappy will-change-transform group-aria-expanded/shell:rotate-180`})]})}),(0,y.jsx)(hN,{className:`h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 ease-snappy data-closed:h-0`,children:(0,y.jsxs)(`dl`,{className:`flex flex-col gap-1 pt-2 text-xs`,children:[(0,y.jsx)(oF,{label:`Name`,value:k.shellName}),(0,y.jsx)(oF,{label:`Path`,value:k.shell,title:k.shell}),(0,y.jsx)(oF,{label:`PID`,value:String(k.pid),valueClassName:`tabular-nums`}),(0,y.jsx)(oF,{label:`Cwd`,value:k.cwd,title:k.cwd})]})})]})]}):null]})})]})},cF=e=>{let[t,n]=(0,b.useState)(null);return(0,b.useEffect)(()=>{if(n(null),!e)return;let t=!1,r=null,i=null,a=()=>{t||(r!==null&&window.clearTimeout(r),r=window.setTimeout(o,qS))},o=()=>{if(r!==null&&(window.clearTimeout(r),r=null),!t){if(document.hidden){a();return}i?.abort(),i=new AbortController,pA(e,i.signal).then(e=>{t||(e&&n(e),a())})}},s=()=>{document.hidden||o()};return document.addEventListener(`visibilitychange`,s),o(),()=>{t=!0,document.removeEventListener(`visibilitychange`,s),r!==null&&window.clearTimeout(r),i?.abort()}},[e]),t},lF=2.4,uF=.04045,dF=12.92,fF=.055,pF=1.055,mF=.0031308,hF=24389/27,gF=216/24389,_F=.95047,vF=1,yF=1.08883,bF=.008856,xF=7.787,SF=e=>{let t=e/255;return t<=uF?t/dF:((t+fF)/pF)**+lF},CF=e=>e<=0?0:e>=1?255:Math.round(e<=mF?dF*e*255:(pF*e**(1/lF)-fF)*255),wF=e=>e>bF?Math.cbrt(e):xF*e+16/116,TF=e=>{let t=SF(e.r),n=SF(e.g),r=SF(e.b);return{x:.4124564*t+.3575761*n+.1804375*r,y:.2126729*t+.7151522*n+.072175*r,z:.0193339*t+.119192*n+.9503041*r}},EF=e=>{let t=3.2404542*e.x-1.5371385*e.y-.4985314*e.z,n=-.969266*e.x+1.8760108*e.y+.041556*e.z,r=.0556434*e.x-.2040259*e.y+1.0572252*e.z;return{r:CF(t),g:CF(n),b:CF(r)}},DF=e=>{let t=e.x/_F,n=e.y/vF,r=e.z/yF,i=wF(t),a=wF(n),o=wF(r);return{l:116*a-16,a:500*(i-a),b:200*(a-o)}},OF=(e,t)=>{let n=e*e*e;return n>gF?t*n:t*((116*e-16)/hF)},kF=e=>{let t=(e.l+16)/116,n=e.a/500+t,r=t-e.b/200;return{x:OF(n,_F),y:OF(t,vF),z:OF(r,yF)}},AF=e=>DF(TF(e)),jF=e=>EF(kF(e)),MF=e=>{let t=e.replace(/^#/,``);return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},NF=e=>{let t=Math.max(0,Math.min(255,Math.round(e.r))),n=Math.max(0,Math.min(255,Math.round(e.g))),r=Math.max(0,Math.min(255,Math.round(e.b)));return`#${t.toString(16).padStart(2,`0`)}${n.toString(16).padStart(2,`0`)}${r.toString(16).padStart(2,`0`)}`},PF=e=>AF(MF(e)),FF=e=>NF(jF(e)),IF=6,LF=5,RF=24,zF=25,BF=(e,t,n)=>({l:t.l+e*(n.l-t.l),a:t.a+e*(n.a-t.a),b:t.b+e*(n.b-t.b)}),VF=(e,t=!1)=>{let n=e.background??`#000000`,r=e.foreground??`#ffffff`,i=[PF(n),PF(e.red??`#ff0000`),PF(e.green??`#00ff00`),PF(e.yellow??`#ffff00`),PF(e.blue??`#0000ff`),PF(e.magenta??`#ff00ff`),PF(e.cyan??`#00ffff`),PF(r)];if(i[7].l<i[0].l&&!t){let e=i[0];i[0]=i[7],i[7]=e}let a=[];for(let e=0;e<IF;e++){let t=BF(e/LF,i[0],i[1]),n=BF(e/LF,i[2],i[3]),r=BF(e/LF,i[4],i[5]),o=BF(e/LF,i[6],i[7]);for(let e=0;e<IF;e++){let i=BF(e/LF,t,n),s=BF(e/LF,r,o);for(let e=0;e<IF;e++){let t=BF(e/LF,i,s);a.push(FF(t))}}}for(let e=0;e<RF;e++){let t=(e+1)/zF;a.push(FF(BF(t,i[0],i[7])))}return a},HF=`Symbols Nerd Font`,UF=``,WF=async e=>{if(!(typeof document>`u`)&&e.name)try{await document.fonts.ready;let t=[document.fonts.load(`16px "${e.name}"`),document.fonts.load(`bold 16px "${e.name}"`),document.fonts.load(`16px "${HF}"`,UF),document.fonts.load(`bold 16px "${HF}"`,UF)];await Promise.all(t)}catch{}},GF=(e,t)=>`\x1b[${e};${t+1}u`,KF=e=>{let t=e.buffer.active,n=Math.max(0,t.baseY-t.viewportY);return{distanceFromBottom:n,wasAtBottom:n===0}},qF=[[127995,127999],[128732,128735],[129008,129008],[129401,129401],[129484,129484],[129653,129655],[129659,129660],[129671,129672],[129705,129711],[129719,129725],[129727,129727],[129731,129733],[129742,129743],[129751,129755],[129760,129768],[129776,129784]],JF=e=>{if(e<127995||e>129784)return!1;for(let[t,n]of qF)if(e>=t&&e<=n)return!0;return!1},YF=6,XF=4,ZF=class{version=`15-graphemes-emoji`;base;constructor(e){this.base=e}wcwidth(e){return JF(e)?2:this.base.wcwidth(e)}charProperties(e,t){let n=this.base.charProperties(e,t);return JF(e)?n&~YF|XF:n}},QF=e=>!!e.shiftKey|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0),$F=(e,t)=>{let n=e.buffer.active,r=Math.max(0,n.baseY-n.viewportY),i=r===0;try{t.fit()}catch{return!1}try{if(i)return e.scrollToBottom(),!0;let t=e.buffer.active;if(r>t.baseY)return e.scrollToBottom(),!0;let n=t.baseY-r-t.viewportY;n!==0&&e.scrollLines(n)}catch{}return!0},eI=(e,t)=>`\r\n\r\n\x1b[2;31m[connection lost · code ${e}${t?` · ${t}`:``}]\x1b[0m\r\n`,tI={block:{blink:`\x1B[1 q`,steady:`\x1B[2 q`},underline:{blink:`\x1B[3 q`,steady:`\x1B[4 q`},bar:{blink:`\x1B[5 q`,steady:`\x1B[6 q`}},nI=(e,t)=>{let n=t?`blink`:`steady`;return`\x1b[?25h${tI[e][n]}`},rI=(e,t)=>`${nI(e,t)}\r\n\x1b[2;32m[reconnected]\x1b[0m\r\n\r\n`,iI=e=>`\r\n\x1b[2;31m[${e===null?`shell exited`:`shell exited with code ${e}`}]\x1b[0m\r\n`,aI=55296,oI=56319,sI=(e,t)=>{if(e.length<=t)return[e];let n=[],r=0;for(;r<e.length;){let i=Math.min(r+t,e.length);if(i<e.length){let t=e.charCodeAt(i-1);t>=aI&&t<=oI&&--i}i===r&&(i=r+t),n.push(e.slice(r,i)),r=i}return n},cI=(e,t)=>{if(t.wasAtBottom){e.scrollToBottom();return}let n=e.buffer.active;if(t.distanceFromBottom>n.baseY){e.scrollToBottom();return}let r=n.baseY-t.distanceFromBottom-n.viewportY;r!==0&&e.scrollLines(r)},lI=new class{terminal=null;chunks=[];scheduled=!1;afterFlush=null;attach(e){this.terminal=e}setAfterFlush(e){this.afterFlush=e}detach(){this.flush(),this.terminal=null,this.afterFlush=null}push(e){this.chunks.push(e),this.scheduled||(this.scheduled=!0,queueMicrotask(()=>this.flush()))}flush(){this.scheduled=!1;let e=this.chunks,t=this.terminal;this.chunks=[],!(!t||e.length===0)&&(e.length===1?t.write(e[0]):t.write(e.join(``)),this.afterFlush?.())}},uI=e=>e[0]===3,dI=e=>{if(!Number.isFinite(e))return 13;let t=Math.round(e);return t<9?9:t>24?24:t},fI=1/BS,pI=e=>Math.round(e*fI)/fI,mI=e=>{if(!Number.isFinite(e))return zS;let t=pI(e);return t<1?1:t>2?2:t},hI=1/1,gI=e=>Math.round(e*hI)/hI,_I=e=>{if(!Number.isFinite(e))return 0;let t=gI(e);return t<0?0:t>48?48:t},vI=e=>{if(!Number.isFinite(e))return 0;let t=gI(e);return t<0?0:t>48?48:t},yI=()=>{if(typeof navigator>`u`)return!1;let e=navigator.platform||navigator.userAgent||``;return/Mac|iPhone|iPad|iPod/i.test(e)},bI=e=>e<1e3?String(e):e<1e4?`${(e/1e3).toFixed(1).replace(/\.0$/,``)}k`:`${Math.round(e/1e3)}k`,xI=(e,t,n)=>e.key!==t&&e.key!==t.toUpperCase()?!1:n?e.metaKey&&!e.ctrlKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.altKey,SI=(e,t)=>xI(e,`k`,t),CI=(e,t)=>xI(e,`g`,t),wI=(e,t)=>xI(e,`f`,t),TI=(e,t)=>e.code===`Backslash`?e.altKey&&!e.metaKey&&!e.ctrlKey?!0:t?e.metaKey&&!e.ctrlKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.altKey:!1,EI=TA(aC,!0),DI=EI.load,OI=EI.store,kI=EA(iC,CP,TP),AI=kI.load,jI=kI.store,MI=DA(tC,e=>HP(e).id,e=>e),NI=MI.load,PI=MI.store,FI=wA(nC,13,dI),II=FI.load,LI=FI.store,RI=wA(rC,zS,mI),zI=RI.load,BI=RI.store,VI=wA(oC,KP,e=>JP(e)?e:KP),HI=VI.load,UI=VI.store,WI=TA(sC,!0),GI=WI.load,KI=WI.store,qI=DA(eC,e=>ZP(e).id,e=>e),JI=qI.load,YI=qI.store,XI=wA(cC,0,_I),ZI=XI.load,QI=XI.store,$I=wA(lC,0,vI),eL=$I.load,tL=$I.store,nL=TA(dC,!1),rL=nL.load,iL=nL.store,aL=`<path d='m6 8 4 4-4 4M12 16h6'/>`,oL=[`<circle cx='7' cy='12' r='1.5' fill='currentColor' stroke='none'/>`,`<circle cx='12' cy='12' r='1.5' fill='currentColor' stroke='none'/>`,`<circle cx='17' cy='12' r='1.5' fill='currentColor' stroke='none'/>`].join(``),sL={ready:`hsl(220 8% 46%)`,running:`hsl(142 72% 45%)`,"alive-quiet":`hsl(210 65% 50%)`,dead:`hsl(0 72% 50%)`},cL={ready:`hsl(220 10% 16%)`,running:`hsl(142 85% 12%)`,"alive-quiet":`hsl(210 70% 14%)`,dead:`hsl(0 80% 12%)`},lL={ready:aL,running:oL,"alive-quiet":aL,dead:aL},uL=`<circle cx='19' cy='7' r='3.5' fill='hsl(0 72% 50%)' stroke='white' stroke-width='1.5'/>`,dL=(e,t=!1)=>{let n=sL[e],r=cL[e],i=lL[e],a=t?uL:``;return[`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' color='${r}' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='${e===`dead`?KS:1}'>`,`<rect x='2' y='4' width='20' height='16' rx='2' fill='${n}'/>`,i,a,`</svg>`].join(``)},fL=`ready`,pL=null,mL=!1,hL=(e,t)=>pL===null||e!==fL||t!==mL,gL=(e,t)=>{fL=e,pL=e,mL=t},_L=()=>{fL=`ready`,pL=null,mL=!1},vL=(e,t=!1)=>{if(typeof document>`u`||!hL(e,t))return;gL(e,t);let n=`data:image/svg+xml,${encodeURIComponent(dL(e,t))}`,r=document.querySelector(`link[rel="icon"]`);r||(r=document.createElement(`link`),r.rel=`icon`,document.head.appendChild(r)),r.type=`image/svg+xml`,r.href=n},yL=`/api/health`,bL=async()=>{try{return(await fetch(yL)).ok}catch{return!1}},xL=(e,t)=>t.buffer.active.type!==`alternate`||t.modes.mouseTrackingMode!==`none`?!1:e.deltaMode===WheelEvent.DOM_DELTA_PIXEL,SL=e=>e||`localterm`,CL=e=>`${HS}${e||`localterm`}`,wL={matchBackground:ZS,activeMatchBackground:QS,activeMatchBorder:$S,matchOverviewRuler:QS,activeMatchColorOverviewRuler:$S},TL=`cwd`,EL=e=>{let t=new URL(`/ws`,window.location.href);t.protocol=t.protocol===`https:`?`wss:`:`ws:`;let n=e??new URLSearchParams(window.location.search).get(TL);return n&&t.searchParams.set(TL,n),t.toString()},DL=e=>{let t=new URL(window.location.origin);return e&&t.searchParams.set(TL,e),t.toString()},OL=({onModalOpenChange:e,onForegroundProcessChange:t}={})=>{let n=(0,b.useRef)(null),r=(0,b.useRef)(null),i=(0,b.useRef)(!1),a=(0,b.useRef)(null),o=(0,b.useRef)(null),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(null),u=(0,b.useRef)(null),d=(0,b.useRef)(null),f=(0,b.useRef)(null),p=(0,b.useRef)(JI()),m=(0,b.useRef)(NI()),h=(0,b.useRef)(II()),g=(0,b.useRef)(zI()),_=(0,b.useRef)(AI()),v=(0,b.useRef)(DI()),x=(0,b.useRef)(HI()),C=(0,b.useRef)(GI()),w=(0,b.useRef)(ZI()),T=(0,b.useRef)(eL()),E=(0,b.useRef)(rL()),O=(0,b.useRef)(null),k=(0,b.useRef)(null),A=(0,b.useRef)(null),j=(0,b.useRef)(null),M=(0,b.useRef)(null),[N,P]=(0,b.useState)(null),[F,I]=(0,b.useState)(0),[L,R]=(0,b.useState)(!1),[z,ee]=(0,b.useState)(!1),[B,V]=(0,b.useState)(!1),[H,U]=(0,b.useState)(!1),te=(0,b.useRef)(null),[W,ne]=(0,b.useState)(0),[G,re]=(0,b.useState)(!1),[ie,ae]=(0,b.useState)(!1),oe=(0,b.useRef)(null),se=(0,b.useRef)(!1),ce=G||ie;se.current=ie;let[le,ue]=(0,b.useState)(``),[de,fe]=(0,b.useState)({resultIndex:-1,resultCount:0}),[pe,me]=(0,b.useState)(p.current),[he,ge]=(0,b.useState)(null),_e=he??pe,ve=(0,b.useMemo)(()=>ZP(_e),[_e]),ye=(0,b.useMemo)(()=>({...ve.colors,extendedAnsi:VF(ve.colors)}),[ve]),[be,xe]=(0,b.useState)(m.current),[Se,Ce]=(0,b.useState)(null),we=Se??be,[Te,Ee]=(0,b.useState)(E.current),De=(0,b.useMemo)(()=>HP(we),[we]),[Oe,ke]=(0,b.useState)(h.current),[Ae,je]=(0,b.useState)(g.current),[Me,Ne]=(0,b.useState)(_.current),[Pe,Fe]=(0,b.useState)(null),Ie=Pe??Me,[Le,Re]=(0,b.useState)(v.current),[ze,Be]=(0,b.useState)(x.current),[Ve,He]=(0,b.useState)(C.current),[Ue,We]=(0,b.useState)(w.current),[Ke,Je]=(0,b.useState)(T.current),[Ye,Xe]=(0,b.useState)(null),[Ze,Qe]=(0,b.useState)(`Notification`in window?Notification.permission:`unsupported`),[$e,et]=(0,b.useState)(null),tt=(0,b.useRef)(null),nt=(0,b.useRef)(!1),rt=(0,b.useMemo)(yI,[]),[it,at]=(0,b.useState)(!1),ot=cF($e),st=ot!==null&&ot.isRepo&&ot.files>0;(0,b.useEffect)(()=>{let e=n.current;if(!e)return;let l=!1,u=!1,d=!1,y=``,b=null,w=null,T=null,N=null,F=null,L=0,R=`ready`,z=!1,ee=!1,B=[0],V=()=>B[B.length-1]??0,H=()=>{let e=performance.now()-L;if(e<750){F=window.setTimeout(H,750-e);return}F=null,N!==null&&(window.clearTimeout(N),N=null),R===`running`&&(document.hidden&&(z=!0),ee?(R=`alive-quiet`,vL(`alive-quiet`,z)):(R=`ready`,vL(`ready`,z)))},U=()=>{R!==`running`&&N===null&&(N=window.setTimeout(()=>{N=null,!(l||u)&&(R=`running`,z=!1,vL(`running`))},250)),L=performance.now(),F===null&&(F=window.setTimeout(H,750))},W=()=>{N!==null&&(window.clearTimeout(N),N=null),F!==null&&(window.clearTimeout(F),F=null),(R!==`ready`||z)&&(R=`ready`,z=!1,vL(`ready`))},ne=HP(m.current);WF(ne).then(()=>{if(l)return;let e=r.current;e&&e.clearTextureAtlas(),G._core._charSizeService.measure(),Ae()});let G=new Qu({allowProposedApi:!0,cursorBlink:v.current,cursorStyle:_.current,fontFamily:UP(ne,E.current),fontSize:h.current,lineHeight:g.current,scrollback:x.current,theme:{...ZP(p.current).colors,extendedAnsi:VF(ZP(p.current).colors)},macOptionIsMeta:!0,scrollOnUserInput:C.current,windowOptions:{getWinSizePixels:!0,getCellSizePixels:!0,getWinSizeChars:!0},scrollbar:{showScrollbar:!1}});r.current=G,lI.attach(G);let re=new D;O.current=re,G.loadAddon(re),G.loadAddon(new jn),G.loadAddon(new S),G.loadAddon(new Ge),G.loadAddon(new qe),G.loadAddon(new Tn);let ie=G._core.unicodeService._activeProvider;G.unicode.register(new ZF(ie)),G.unicode.activeVersion=`15-graphemes-emoji`;let ae=new ct;G.loadAddon(ae),o.current=ae;let oe=ae.onDidChangeResults(fe);G.open(e),re.proposeDimensions&&=()=>{if(!G||!G.element||!G.element.parentElement)return;let e=G,t=e._core._renderService.dimensions.css.cell.width,n=e._core._renderService.dimensions.css.cell.height;if(t===0||n===0)return;let r=window.getComputedStyle(G.element.parentElement),i=window.getComputedStyle(G.element),a=Math.max(0,parseInt(r.getPropertyValue(`width`)))-(parseInt(i.getPropertyValue(`padding-right`))+parseInt(i.getPropertyValue(`padding-left`))),o=parseInt(r.getPropertyValue(`height`))-(parseInt(i.getPropertyValue(`padding-top`))+parseInt(i.getPropertyValue(`padding-bottom`)));return{cols:Math.max(2,Math.floor(a/t)),rows:Math.max(1,Math.floor(o/n))}};let se=()=>{let e=G.buffer.active,t=e.length,n=G.rows,r=e.viewportY+n>=t,i=t>n,a=j.current,o=M.current;if(!(!a||!o)&&(a.classList.toggle(`xterm-scrollbar-visible`,!r&&i),i)){let r=n/t,i=e.viewportY/t;o.style.height=`${r*100}%`,o.style.top=`${i*100}%`}};se();let ce=G.onScroll(se);lI.setAfterFlush(se);let le=!1,ue=0,de=0,pe=e=>{if(e.button===0){le=!0,ue=e.clientY,de=G.buffer.active.viewportY;try{e.target.setPointerCapture(e.pointerId)}catch{}e.preventDefault()}},me=e=>{if(!le)return;let t=j.current;if(!t)return;let n=t.clientHeight,r=G.buffer.active.length-G.rows;if(r<=0||n<=0)return;let i=n/r,a=e.clientY-ue,o=Math.max(0,Math.min(r,de+Math.round(a/i)));o!==G.buffer.active.viewportY&&G.scrollLines(o-G.buffer.active.viewportY)},he=()=>{le=!1},ge=e=>{if(e.button!==0||e.target===M.current)return;let t=j.current;if(!t)return;let n=t.getBoundingClientRect(),r=(e.clientY-n.top)/n.height,i=G.buffer.active,a=i.length,o=Math.max(0,Math.min(a-G.rows,Math.round(r*a)-Math.floor(G.rows/2)));G.scrollLines(o-i.viewportY)},_e=M.current,ve=j.current;_e&&(_e.addEventListener(`pointerdown`,pe),_e.addEventListener(`pointermove`,me),_e.addEventListener(`pointerup`,he),_e.addEventListener(`pointercancel`,he)),ve&&ve.addEventListener(`pointerdown`,ge);try{let e=new ra;e.onContextLoss(()=>e.dispose()),G.loadAddon(e)}catch{}let ye=G.parser.registerCsiHandler({prefix:`>`,final:`u`},e=>{let t=e[0],n=typeof t==`number`?t:1;return B.push(n),!0}),be=G.parser.registerCsiHandler({prefix:`<`,final:`u`},e=>{let t=e[0],n=typeof t==`number`&&t>0?t:1;for(let e=0;e<n&&B.length>1;e+=1)B.pop();return!0}),xe=G.parser.registerCsiHandler({prefix:`=`,final:`u`},e=>{let t=e[0],n=e[1];if(typeof t!=`number`)return!0;let r=t,i=typeof n==`number`&&n>0?n:1,a=B.length-1,o=B[a]??0;return i===1?B[a]=r:i===2?B[a]=o|r:i===3&&(B[a]=o&~r),!0}),Se=G.parser.registerCsiHandler({final:`J`},uI),Ce=G.parser.registerCsiHandler({prefix:`?`,final:`J`},uI),we=e=>{b?.readyState===WebSocket.OPEN&&b.send(JSON.stringify(e))},Te=()=>{let e=f.current;e&&cancelAnimationFrame(e.frameId),f.current=null},Ee=()=>{let e=f.current;e&&cI(G,e.anchor)},De=e=>{Te(),f.current={anchor:e,frameId:requestAnimationFrame(()=>{Ee(),f.current=null})}};G.attachCustomWheelEventHandler(e=>xL(e,G)?(e.preventDefault(),!1):!0),G.attachCustomKeyEventHandler(e=>{if(e.key===`Tab`&&(e.metaKey||e.ctrlKey))return!1;if(TI(e,rt)){if(e.type===`keydown`){e.preventDefault();let t=document.getElementById(`new-shell-link`);t instanceof HTMLAnchorElement&&t.click()}return!1}if(SI(e,rt))return e.type===`keydown`&&(e.preventDefault(),te.current?.()),!1;if(CI(e,rt))return e.type===`keydown`&&(e.preventDefault(),A.current?.()),!1;if(wI(e,rt))return e.type===`keydown`&&(e.preventDefault(),k.current?.()),!1;if(e.type===`keydown`&&e.key===`Enter`){let t=QF(e),n=(V()&1)!=0;if(t!==0&&n)return e.preventDefault(),we({type:`input`,data:GF(13,t)}),!1;if(t===1)return e.preventDefault(),we({type:`input`,data:`
115
+ `}),!1}return!0});let Oe=e=>{if(u)return;let t=e.trim();t&&(y=t,document.title=SL(t))};s.current=()=>G.focus(),c.current=e=>G.paste(e);let ke=(e,t)=>{let n=G,r=n._core._renderService?.dimensions?.css?.canvas?.width,i=n._core._renderService?.dimensions?.css?.canvas?.height;we({type:`resize`,cols:e,rows:t,...r!=null&&i!=null?{pixelWidth:Math.round(r),pixelHeight:Math.round(i)}:{}})},Ae=()=>{let e=KF(G);$F(G,re)&&(De(e),ke(G.cols,G.rows))},je=()=>{T!==null&&window.clearTimeout(T),T=window.setTimeout(()=>{T=null,Ae()},80)};G.onData(e=>{for(let t of sI(e,SC))we({type:`input`,data:t})}),G.onResize(({cols:e,rows:t})=>{ke(e,t),se()});let Me=new ResizeObserver(je),Ne=()=>{!document.hidden&&z&&(z=!1,vL(R))};document.addEventListener(`visibilitychange`,Ne),Me.observe(e),Ae(),requestAnimationFrame(()=>G.focus());let Pe=e=>{if(!u){if(u=!0,e===null||e===0){window.close(),setTimeout(()=>{l||(W(),vL(`dead`),G.write(iI(e)),document.title=CL(y),P({reason:`shell-exited`,exitCode:e}),Xe(null))},100);return}W(),vL(`dead`),G.write(iI(e)),document.title=CL(y),P({reason:`shell-exited`,exitCode:e}),Xe(null)}},Fe=(e,t,n)=>{u||(u=!0,W(),vL(`dead`),G.write(eI(e,t)),document.title=CL(y),P({reason:`connection-lost`,closeCode:e,closeReason:t,wasClean:n}),Xe(null))},Ie=()=>{if(l)return;let e=new WebSocket(EL(tt.current));b=e,e.addEventListener(`open`,()=>{l||b!==e||(d=!0,nt.current=!0,I(0),ke(G.cols,G.rows))}),e.addEventListener(`message`,n=>{if(l||b!==e)return;let r;try{r=JSON.parse(typeof n.data==`string`?n.data:String(n.data))}catch{return}if(typeof r==`object`&&r&&r.type===`output`&&typeof r.data==`string`){let e=r.data;lI.push(e),U();return}let i=aA.safeParse(r);if(!i.success)return;let a=i.data;if(a.type===`title`)Oe(a.title);else if(a.type===`session`)Xe({shell:a.shell,shellName:a.shellName,pid:a.pid,cwd:a.cwd,title:a.title}),et(a.cwd),Oe(a.title);else if(a.type===`cwd`)et(a.cwd);else if(a.type===`foreground`){let e=a.process!==null;t?.(e),!e&&R===`alive-quiet`&&(R=`ready`,vL(`ready`,z)),ee=e}else a.type===`notification`?`Notification`in window&&Notification.permission===`granted`&&new Notification(a.body):a.type===`exit`&&(W(),Pe(a.code))}),e.addEventListener(`close`,t=>{if(b===e&&(b=null,nt.current=!1,!l&&!u)){if(d){console.warn(`[localterm] websocket closed: code=${t.code} reason=${JSON.stringify(t.reason)} wasClean=${t.wasClean}`),Fe(t.code,t.reason,t.wasClean);return}I(e=>e+1),w=window.setTimeout(Ie,RS)}}),e.addEventListener(`error`,t=>{console.warn(`[localterm] websocket error`,t);try{e.close()}catch{}})};return a.current=()=>{if(!l){u=!1,d=!1,nt.current=!1,P(null),Xe(null),I(0),vL(`ready`),t?.(!1),w!==null&&(window.clearTimeout(w),w=null);try{b?.close()}catch{}b=null,Ie()}},Ie(),i.current=!0,()=>{l=!0,i.current=!1,_e&&(_e.removeEventListener(`pointerdown`,pe),_e.removeEventListener(`pointermove`,me),_e.removeEventListener(`pointerup`,he),_e.removeEventListener(`pointercancel`,he)),ve&&ve.removeEventListener(`pointerdown`,ge),oe.dispose(),ce.dispose(),ye.dispose(),be.dispose(),xe.dispose(),Se.dispose(),Ce.dispose(),w!==null&&window.clearTimeout(w),T!==null&&window.clearTimeout(T),Te(),W(),document.removeEventListener(`visibilitychange`,Ne),Me.disconnect();try{b?.close()}catch{}b=null,lI.detach(),G.dispose(),document.title=VS}},[]),(0,b.useEffect)(()=>{if(!i.current)return;let e=r.current;e&&(e.options.theme=ye)},[ye]),(0,b.useEffect)(()=>{if(!i.current||!r.current)return;let e=!1;return WF(De).then(()=>{if(e)return;let t=r.current;if(!t)return;t.options.fontFamily=UP(De,Te),t.clearTextureAtlas();let n=O.current;n&&$F(t,n)}),()=>{e=!0}},[De,Te]);let lt=(0,b.useCallback)(e=>{me(e),ge(null),YI(e)},[]),ut=(0,b.useCallback)(e=>{xe(e),Ce(null),PI(e)},[]),dt=(0,b.useCallback)(e=>{Ee(e),iL(e)},[]);(0,b.useEffect)(()=>{if(!i.current)return;let e=r.current;if(!e)return;e.options.fontSize=Oe;let t=O.current;t&&$F(e,t)},[Oe]);let ft=(0,b.useCallback)(e=>{let t=dI(e);ke(t),LI(t)},[]);(0,b.useEffect)(()=>{if(!i.current)return;let e=r.current;if(!e)return;e.options.lineHeight=Ae;let t=O.current;t&&$F(e,t)},[Ae]);let pt=(0,b.useCallback)(e=>{let t=mI(e);je(t),BI(t)},[]);(0,b.useEffect)(()=>{if(!i.current)return;let e=r.current;e&&(e.options.cursorStyle=Ie)},[Ie]);let mt=(0,b.useCallback)(e=>{Ne(e),Fe(null),jI(e)},[]);(0,b.useEffect)(()=>{if(!i.current)return;let e=r.current;e&&(e.options.cursorBlink=Le)},[Le]);let ht=(0,b.useCallback)(e=>{Re(e),OI(e)},[]);(0,b.useEffect)(()=>{if(!i.current)return;let e=r.current;e&&(e.options.scrollback=ze)},[ze]);let gt=(0,b.useCallback)(e=>{Be(e),UI(e)},[]);(0,b.useEffect)(()=>{if(!i.current)return;let e=r.current;e&&(e.options.scrollOnUserInput=Ve)},[Ve]);let _t=(0,b.useCallback)(e=>{He(e),KI(e)},[]);(0,b.useEffect)(()=>{if(!i.current)return;let e=r.current;if(!e)return;let t=O.current;t&&$F(e,t)},[Ue,Ke]);let vt=(0,b.useCallback)(e=>{let t=_I(e);We(t),QI(t)},[]),yt=(0,b.useCallback)(e=>{let t=vI(e);Je(t),tL(t)},[]),bt=(0,b.useCallback)(()=>{`Notification`in window&&Notification.requestPermission().then(e=>{Qe(e)})},[]);(0,b.useEffect)(()=>{if(!B)return;let e=l.current;e&&(e.focus(),e.select())},[B,W]);let xt=(0,b.useCallback)(e=>{if(!e){o.current?.clearDecorations(),fe({resultIndex:-1,resultCount:0});return}o.current?.findNext(e,{decorations:wL})},[]),St=(0,b.useCallback)(e=>{e&&o.current?.findPrevious(e,{decorations:wL})},[]),Ct=(0,b.useCallback)(()=>{V(!1),ue(``),fe({resultIndex:-1,resultCount:0}),o.current?.clearDecorations(),s.current?.()},[]),wt=(0,b.useCallback)(()=>{oe.current!==null&&(window.clearTimeout(oe.current),oe.current=null),re(!0)},[]),Tt=(0,b.useCallback)(e=>{let t=e.clientY<=0||e.clientX>=window.innerWidth-1?XS:200;oe.current=window.setTimeout(()=>{oe.current=null,se.current||re(!1)},t)},[]),Et=(0,b.useCallback)(e=>{ae(e),e||(oe.current!==null&&window.clearTimeout(oe.current),oe.current=window.setTimeout(()=>{oe.current=null,re(!1)},200))},[]);te.current=(0,b.useCallback)(()=>{U(e=>!e)},[]);let Dt=(0,b.useCallback)(()=>{U(!1),s.current?.()},[]),Ot=(0,b.useCallback)(()=>{V(!0),U(!1),ne(e=>e+1)},[]);k.current=Ot;let kt=(0,b.useCallback)(()=>{at(!0),U(!1)},[]);A.current=kt;let At=(0,b.useCallback)(()=>{at(!1),s.current?.()},[]),jt=(0,b.useCallback)(e=>{c.current?.(e)},[]),Mt=(0,b.useCallback)(e=>{let t=e.target.value;ue(t),xt(t)},[xt]),Nt=(0,b.useCallback)(e=>{if(wI(e.nativeEvent,rt)){e.preventDefault(),e.currentTarget.select();return}if(e.key===`Escape`){e.preventDefault(),Ct();return}e.key===`Enter`&&(e.preventDefault(),e.shiftKey?St(le):xt(le))},[Ct,xt,St,rt,le]),Pt=(0,b.useCallback)(()=>{ee(!0),a.current?.(),u.current!==null&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{u.current=null,ee(!1)},800)},[]),Ft=(0,b.useCallback)(()=>{navigator.clipboard.writeText(US).then(()=>{R(!0),d.current!==null&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{d.current=null,R(!1)},WS)}).catch(()=>{})},[]);(0,b.useEffect)(()=>()=>{oe.current!==null&&(window.clearTimeout(oe.current),oe.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null),d.current!==null&&(window.clearTimeout(d.current),d.current=null)},[]),(0,b.useEffect)(()=>{if(tt.current=$e,!$e)return;let e=new URL(window.location.href);if(e.searchParams.get(TL)!==$e){e.searchParams.set(TL,$e);try{window.history.replaceState(null,``,e)}catch{}}},[$e]);let It=DL($e),Lt=N!==null,Rt=!Lt&&F>=2,zt=Lt||Rt,Bt=N!==null&&N.reason!==`shell-exited`||Rt;(0,b.useEffect)(()=>{if(!Bt)return;let e=Date.now(),t=!1,n=null,i=i=>{if(t||nt.current)return;if(i){let e=r.current;e&&(e.write(rI(Ie,Le)),e.refresh(0,e.rows-1),e.focus()),a.current?.();return}let s=Date.now()-e<5e3?250:GS;n=window.setTimeout(o,s)},o=()=>{bL().then(i)};return o(),()=>{t=!0,n!==null&&window.clearTimeout(n)}},[Bt,Ie,Le]),(0,b.useEffect)(()=>{e?.(zt),zt&&(U(!1),at(!1))},[zt,e]);let Vt=de.resultCount===0?`0/0`:`${de.resultIndex+1}/${de.resultCount}`,Ht=ve.colors.background??`#101010`,Ut=(0,b.useMemo)(()=>{let e=rt?`⌘`:`Ctrl+`;return[{id:`find`,label:`Find in terminal`,category:`Actions`,shortcut:`${e}F`,icon:(0,y.jsx)(wd,{className:`size-3.5`}),action:Ot},{id:`git-diff`,label:`View git diff`,category:`Actions`,shortcut:`${e}G`,icon:(0,y.jsx)(md,{className:`size-3.5`}),action:kt},{id:`new-shell`,label:`Open new shell`,category:`Actions`,shortcut:`Alt+T`,icon:(0,y.jsx)(Sd,{className:`size-3.5`}),action:()=>{let e=document.getElementById(`new-shell-link`);e instanceof HTMLAnchorElement&&e.click()}},{id:`font-size-up`,label:`Increase font size`,category:`Settings`,shortcut:`${e}+`,icon:(0,y.jsx)(bd,{className:`size-3.5`}),action:()=>ft(Oe+1)},{id:`font-size-down`,label:`Decrease font size`,category:`Settings`,shortcut:`${e}-`,icon:(0,y.jsx)(bd,{className:`size-3.5`}),action:()=>ft(Oe-1)},{id:`cursor-blink`,label:`Cursor blink`,category:`Settings`,checked:Le,action:()=>ht(!Le)},{id:`scroll-on-input`,label:`Pin to bottom on input`,category:`Settings`,checked:Ve,action:()=>_t(!Ve)},...SP.map(e=>({id:`cursor:${e.id}`,label:e.name,category:`Cursor`,checked:e.id===Me,action:()=>mt(e.id)})),...VP.map(e=>({id:`font:${e.id}`,label:e.name,category:`Font`,checked:e.id===be,action:()=>ut(e.id)})),...XP.map(e=>({id:`theme:${e.id}`,label:e.name,category:`Theme`,checked:e.id===pe,action:()=>lt(e.id)}))]},[rt,lt,ut,Ot,kt,mt,Le,ht,Oe,ft,Ve,_t,pe,be,Me]),Wt=(0,b.useCallback)(e=>{let t=e?.id??``;ge(t.startsWith(`theme:`)?t.slice(6):null),Ce(t.startsWith(`font:`)?t.slice(5):null);let n=t.startsWith(`cursor:`)?t.slice(7):null;Fe(TP(n)?n:null)},[]);return(0,y.jsxs)(`div`,{className:`h-dvh w-dvw`,style:{background:Ht},children:[(0,y.jsxs)(`div`,{className:`relative h-full w-full`,children:[(0,y.jsx)(`div`,{ref:n,"aria-label":`terminal session`,className:`absolute`,style:{top:Ke,right:Ue,bottom:Ke,left:Ue}}),(0,y.jsx)(`div`,{ref:j,className:`xterm-scrollbar-track`,style:{top:Ke,right:Ue,bottom:Ke},children:(0,y.jsx)(`div`,{ref:M,className:`xterm-scrollbar-thumb`})}),N===null?null:(0,y.jsx)(cS,{variant:`destructive`,role:`status`,"aria-live":`polite`,className:`absolute top-2 left-3 z-10`,children:N.reason===`shell-exited`?N.exitCode===null?`exited`:`exited · code ${N.exitCode}`:`disconnected · code ${N.closeCode}`}),(0,y.jsxs)(`div`,{className:np(`absolute right-0 top-0 z-10 flex flex-col items-end pr-3 pt-1`,ce||st?`pointer-events-auto`:`pointer-events-none`),onMouseEnter:wt,onMouseLeave:Tt,children:[(0,y.jsx)(`div`,{"aria-hidden":`true`,className:np(`pointer-events-auto mr-0.5 h-[2px] w-5 rounded-full bg-muted-foreground/25 transition-opacity duration-150`,ce||B||st?`opacity-0`:`opacity-100`)}),!B&&(0,y.jsxs)(`div`,{role:`toolbar`,"aria-label":`terminal actions`,className:np(`mt-1 flex items-center gap-0.5 rounded-md border border-border/60 bg-background/70 p-0.5 text-muted-foreground shadow-xs backdrop-blur-md`,`transition-[opacity,transform] duration-200 ease-snappy`,ce||st?`translate-y-0 opacity-100`:`pointer-events-none -translate-y-1 opacity-0`),onMouseDown:e=>e.preventDefault(),onKeyDown:()=>s.current?.(),children:[(0,y.jsx)(`div`,{className:np(`grid`,st&&`transition-[grid-template-columns] duration-200 ease-snappy`,st&&!ce?`grid-cols-[0fr]`:`grid-cols-[1fr]`),children:(0,y.jsxs)(`div`,{className:np(`flex min-w-0 items-center gap-0.5 overflow-hidden`,st&&`transition-opacity duration-200 ease-snappy`,st&&!ce?`pointer-events-none opacity-0`:`opacity-100`),children:[(0,y.jsx)(sF,{themeId:pe,onThemeChange:lt,onThemePreview:ge,fontId:be,onFontChange:ut,onFontPreview:Ce,nerdFontEnabled:Te,onNerdFontEnabledChange:dt,fontSize:Oe,onFontSizeChange:ft,lineHeight:Ae,onLineHeightChange:pt,cursorStyle:Me,onCursorStyleChange:mt,onCursorStylePreview:Fe,cursorBlink:Le,onCursorBlinkChange:ht,scrollback:ze,onScrollbackChange:gt,scrollOnUserInput:Ve,onScrollOnUserInputChange:_t,paddingX:Ue,onPaddingXChange:vt,paddingY:Ke,onPaddingYChange:yt,notificationsPermission:Ze,onNotificationsPermissionRequest:bt,sessionInfo:Ye,onPopoverOpenChange:Et,onClose:s.current??void 0}),(0,y.jsx)(Xx,{variant:`ghost`,size:`icon-sm`,onClick:Ot,"aria-label":`find in terminal`,className:`hover:text-foreground`,children:(0,y.jsx)(wd,{})}),(0,y.jsx)(Xx,{variant:`ghost`,size:`icon-sm`,nativeButton:!1,"aria-label":`open a new shell in a new browser tab`,render:(0,y.jsx)(`a`,{id:`new-shell-link`,href:It,target:`_blank`,rel:`noopener noreferrer`}),className:`hover:text-foreground`,children:(0,y.jsx)(Sd,{})})]})}),st&&ot!==null?(0,y.jsxs)(`button`,{type:`button`,onClick:kt,"aria-label":`view git diff: ${ot.additions} additions, ${ot.deletions} deletions${ot.binaries>0?`, ${ot.binaries} binary files changed`:``}`,title:`${rt?`⌘`:`Ctrl+`}G`,className:`flex h-8 items-center gap-1 rounded-[min(var(--radius-md),10px)] px-2 font-mono text-xs tabular-nums outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,children:[(0,y.jsxs)(`span`,{className:`text-emerald-400`,children:[`+`,bI(ot.additions)]}),(0,y.jsxs)(`span`,{className:`text-red-400`,children:[`−`,bI(ot.deletions)]}),ot.binaries>0?(0,y.jsxs)(`span`,{className:`flex items-center gap-0.5 text-muted-foreground`,children:[(0,y.jsx)(ld,{className:`size-3`,"aria-hidden":`true`}),ot.binaries]}):null]}):null]}),B&&(0,y.jsxs)(AS,{role:`search`,"aria-label":`find in terminal`,className:`mt-1 w-80 border-border/60 bg-background/70 text-muted-foreground shadow-xs backdrop-blur-md dark:bg-background/70`,children:[(0,y.jsx)(IS,{ref:l,type:`search`,value:le,onChange:Mt,onKeyDown:Nt,placeholder:`Find`,"aria-label":`find query`,className:`text-xs`}),(0,y.jsxs)(MS,{align:`inline-end`,children:[(0,y.jsx)(FS,{role:`status`,"aria-label":`match count`,className:`text-xs tabular-nums`,children:Vt}),(0,y.jsx)(PS,{size:`icon-xs`,onClick:()=>St(le),disabled:de.resultCount===0,"aria-label":`previous match`,children:(0,y.jsx)(fd,{})}),(0,y.jsx)(PS,{size:`icon-xs`,onClick:()=>xt(le),disabled:de.resultCount===0,"aria-label":`next match`,children:(0,y.jsx)(dd,{})})]})]})]})]}),(0,y.jsx)(bC,{open:H,onClose:Dt,commands:Ut,onActiveItemChange:Wt}),(0,y.jsx)(qA,{open:it,cwd:$e,onClose:At,onSendToTerminal:jt}),(0,y.jsx)(Zx,{open:zt,children:(0,y.jsx)(eS,{children:N===null?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(tS,{children:[(0,y.jsxs)(rS,{className:`flex items-center gap-2`,children:[(0,y.jsx)(LS,{"aria-hidden":`true`,role:`presentation`,"aria-label":void 0}),`Lost connection`]}),(0,y.jsx)(iS,{children:`The localterm server isn't responding. Start it again from your terminal, then retry.`})]}),(0,y.jsxs)(AS,{children:[(0,y.jsx)(IS,{readOnly:!0,value:US,"aria-label":`restart command`,className:`font-mono`}),(0,y.jsx)(MS,{align:`inline-end`,children:(0,y.jsx)(PS,{size:`icon-xs`,onClick:Ft,"aria-label":L?`Copied`:`Copy restart command`,children:L?(0,y.jsx)(ud,{}):(0,y.jsx)(pd,{})})})]}),(0,y.jsx)(nS,{children:(0,y.jsxs)(aS,{onClick:Pt,disabled:z,children:[z?(0,y.jsx)(LS,{"data-icon":`inline-start`}):null,`Retry`]})})]}):N.reason===`shell-exited`?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(tS,{children:[(0,y.jsx)(rS,{children:`Shell ended`}),(0,y.jsx)(iS,{children:N.exitCode===null||N.exitCode===0?`Open a new shell to keep going, or close this tab.`:`Exit code ${N.exitCode}. Open a new shell to keep going.`})]}),(0,y.jsx)(nS,{children:(0,y.jsx)(aS,{onClick:()=>window.open(It,`_blank`,`noopener,noreferrer`),children:`New shell`})})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(tS,{children:[(0,y.jsxs)(rS,{className:`flex items-center gap-2`,children:[(0,y.jsx)(LS,{"aria-hidden":`true`,role:`presentation`,"aria-label":void 0}),`Connection lost`]}),(0,y.jsxs)(iS,{children:[`The browser lost its connection to the localterm daemon (close code`,` `,N.closeCode,N.closeReason?` · ${N.closeReason}`:``,`). Reconnecting spawns a fresh shell. The previous one can't be reattached.`]})]}),(0,y.jsx)(nS,{children:(0,y.jsxs)(aS,{onClick:Pt,disabled:z,children:[z?(0,y.jsx)(LS,{"data-icon":`inline-start`}):null,`Reconnect`]})})]})})})]})},kL=()=>{let e=(0,b.useRef)(!1),t=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let n=n=>{e.current||t.current&&n.preventDefault()},r=()=>window.addEventListener(`beforeunload`,n);return window.addEventListener(`keydown`,r,{once:!0}),()=>{window.removeEventListener(`keydown`,r),window.removeEventListener(`beforeunload`,n)}},[]),(0,y.jsx)(OL,{onModalOpenChange:(0,b.useCallback)(t=>{e.current=t},[]),onForegroundProcessChange:(0,b.useCallback)(e=>{t.current=e},[])})};_L(),vL(`ready`),(()=>{if(typeof document>`u`||document.getElementById(`localterm-google-fonts`))return;let e=WP();if(!e)return;let t=document.createElement(`link`);t.id=uC,t.rel=`stylesheet`,t.href=e,document.head.appendChild(t)})();var AL=document.getElementById(`root`);if(!AL)throw Error(`Root element not found`);(0,x.createRoot)(AL).render((0,y.jsx)(b.StrictMode,{children:(0,y.jsx)(vP,{delay:300,children:(0,y.jsx)(kL,{})})}));
116
+ //# sourceMappingURL=index-CkgIOHRh.js.map