comprehende 0.4.1 → 0.5.0

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,1713 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./apl-CORt7UWP.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./json-Cp-IABpG.js","./astro-HNnZUWAn.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-2xfisSek.js","./html-derivative-DlHx6ybY.js","./sql-CRqJ_cUM.js","./bsl-DlhNcFeZ.js","./sdbl-DVxCFoDh.js","./cairo-KRGpt6FW.js","./python-B6aJPvgy.js","./chapel-DTp_pixX.js","./c-BIGW1oBm.js","./cobol-nBiQ_Alo.js","./coffee-Ch7k5sss.js","./cpp-BMRokrvK.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./crystal-DGywbUpC.js","./shellscript-Yzrsuije.js","./edge-FbVlp4U3.js","./elixir-CkH2-t6x.js","./elm-DbKCFpqz.js","./erb-DXfck5VN.js","./ruby-C0TQ7zu5.js","./haml-D5jkg6IW.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./lua-BaeVxFsk.js","./yaml-Buea-lGh.js","./erlang-DsQrWhSR.js","./markdown-Cvjx9yec.js","./fortran-fixed-form-CkoXwp7k.js","./fortran-free-form-BxgE0vQu.js","./fsharp-CXgrBDvD.js","./gdresource-TyuKm33G.js","./gdshader-DkwncUOv.js","./gdscript-DqcFQ5yU.js","./git-commit-F4YmCXRG.js","./diff-D97Zzqfu.js","./git-rebase-r7XF79zn.js","./glimmer-js-ByusRIyA.js","./glimmer-ts-BfAWNZQY.js","./hack-BWmVpMyf.js","./handlebars-BpdQsYii.js","./http-jrhK8wxY.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./hxml-2-FPmUDs.js","./haxe-CfZj7gIn.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-5Bft2YPA.js","./r-Cf5RLm7j.js","./just-Cwhn7H3k.js","./perl-B9cMNwum.js","./latex-D5pSuvFb.js","./tex-D96PA37w.js","./liquid-C0sCDyMI.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-D1_yUvq7.js","./nextflow-C-mBbutL.js","./nextflow-groovy-vE_lwT2v.js","./nginx-BpAMiNFr.js","./nim-BIad80T-.js","./org-DM6o9KBp.js","./ini-BEwlwnbL.js","./make-CHLpvVh8.js","./php-Csjmro_R.js","./vb-Cu-pLBUe.js","./clojure-P80f7IUj.js","./objective-c-DXmwc3jG.js","./docker-BcOcwvcX.js","./go-C27-OAKa.js","./groovy-gcz8RCvz.js","./raku-DXvB9xmW.js","./rust-B1yitclQ.js","./scala-CqE71os6.js","./csharp-DSvCPggb.js","./dart-bE4Kk8sk.js","./ocaml-C0hk2d4L.js","./zig-VOosw3JB.js","./xsl-CtQFsRM5.js","./pug-DKIMFp6K.js","./qml-3beO22l8.js","./razor-BjBPvh-w.js","./rst-bs7f0vWN.js","./cmake-D1j8_8rp.js","./sas-DEy46yEz.js","./shaderlab-Dg9Lc6iA.js","./hlsl-D3lLCCz7.js","./shellsession-BADoaaVG.js","./soy-8wufbnw4.js","./sparql-rVzFXLq3.js","./turtle-BsS91CYL.js","./stata-DI20mbqo.js","./surrealql-Cjom0U5J.js","./svelte-Cy7k_4gC.js","./templ-DhtptRzy.js","./ts-tags-D351s5mN.js","./twig-27uCiNez.js","./typst-BUadGCkm.js","./bat-CickPsom.js","./bibtex-CHM0blh-.js","./jsonc-Des-eS-w.js","./log-2UxHyX5q.js","./powershell-BmBUJMz7.js","./swift-C2oV4EkX.js","./verilog-nZwndyjY.js","./system-verilog-0hqHdDBg.js","./vue-BqiEGhQt.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
2
+ function rO(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(i,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function zd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tp={exports:{}},Ys={};var Xx;function oO(){if(Xx)return Ys;Xx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,o,s){var l=null;if(s!==void 0&&(l=""+s),o.key!==void 0&&(l=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:i,key:l,ref:o!==void 0?o:null,props:s}}return Ys.Fragment=t,Ys.jsx=n,Ys.jsxs=n,Ys}var Kx;function aO(){return Kx||(Kx=1,Tp.exports=oO()),Tp.exports}var A=aO(),Ap={exports:{}},Ee={};var Qx;function sO(){if(Qx)return Ee;Qx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function v(H){return H===null||typeof H!="object"?null:(H=g&&H[g]||H["@@iterator"],typeof H=="function"?H:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function _(H,Y,I){this.props=H,this.context=Y,this.refs=C,this.updater=I||x}_.prototype.isReactComponent={},_.prototype.setState=function(H,Y){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,Y,"setState")},_.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function w(){}w.prototype=_.prototype;function k(H,Y,I){this.props=H,this.context=Y,this.refs=C,this.updater=I||x}var D=k.prototype=new w;D.constructor=k,S(D,_.prototype),D.isPureReactComponent=!0;var M=Array.isArray;function O(){}var z={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function F(H,Y,I){var le=I.ref;return{$$typeof:e,type:H,key:Y,ref:le!==void 0?le:null,props:I}}function ee(H,Y){return F(H.type,Y,H.props)}function q(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function U(H){var Y={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(I){return Y[I]})}var Z=/\/+/g;function X(H,Y){return typeof H=="object"&&H!==null&&H.key!=null?U(""+H.key):Y.toString(36)}function W(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(O,O):(H.status="pending",H.then(function(Y){H.status==="pending"&&(H.status="fulfilled",H.value=Y)},function(Y){H.status==="pending"&&(H.status="rejected",H.reason=Y)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function P(H,Y,I,le,fe){var re=typeof H;(re==="undefined"||re==="boolean")&&(H=null);var de=!1;if(H===null)de=!0;else switch(re){case"bigint":case"string":case"number":de=!0;break;case"object":switch(H.$$typeof){case e:case t:de=!0;break;case p:return de=H._init,P(de(H._payload),Y,I,le,fe)}}if(de)return fe=fe(H),de=le===""?"."+X(H,0):le,M(fe)?(I="",de!=null&&(I=de.replace(Z,"$&/")+"/"),P(fe,Y,I,"",function(Pe){return Pe})):fe!=null&&(q(fe)&&(fe=ee(fe,I+(fe.key==null||H&&H.key===fe.key?"":(""+fe.key).replace(Z,"$&/")+"/")+de)),Y.push(fe)),1;de=0;var _e=le===""?".":le+":";if(M(H))for(var pe=0;pe<H.length;pe++)le=H[pe],re=_e+X(le,pe),de+=P(le,Y,I,re,fe);else if(pe=v(H),typeof pe=="function")for(H=pe.call(H),pe=0;!(le=H.next()).done;)le=le.value,re=_e+X(le,pe++),de+=P(le,Y,I,re,fe);else if(re==="object"){if(typeof H.then=="function")return P(W(H),Y,I,le,fe);throw Y=String(H),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return de}function $(H,Y,I){if(H==null)return H;var le=[],fe=0;return P(H,le,"","",function(re){return Y.call(I,re,fe++)}),le}function ne(H){if(H._status===-1){var Y=H._result;Y=Y(),Y.then(function(I){(H._status===0||H._status===-1)&&(H._status=1,H._result=I)},function(I){(H._status===0||H._status===-1)&&(H._status=2,H._result=I)}),H._status===-1&&(H._status=0,H._result=Y)}if(H._status===1)return H._result.default;throw H._result}var ue=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},R={map:$,forEach:function(H,Y,I){$(H,function(){Y.apply(this,arguments)},I)},count:function(H){var Y=0;return $(H,function(){Y++}),Y},toArray:function(H){return $(H,function(Y){return Y})||[]},only:function(H){if(!q(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return Ee.Activity=m,Ee.Children=R,Ee.Component=_,Ee.Fragment=n,Ee.Profiler=o,Ee.PureComponent=k,Ee.StrictMode=i,Ee.Suspense=d,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(H){return z.H.useMemoCache(H)}},Ee.cache=function(H){return function(){return H.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(H,Y,I){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var le=S({},H.props),fe=H.key;if(Y!=null)for(re in Y.key!==void 0&&(fe=""+Y.key),Y)!j.call(Y,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&Y.ref===void 0||(le[re]=Y[re]);var re=arguments.length-2;if(re===1)le.children=I;else if(1<re){for(var de=Array(re),_e=0;_e<re;_e++)de[_e]=arguments[_e+2];le.children=de}return F(H.type,fe,le)},Ee.createContext=function(H){return H={$$typeof:l,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:s,_context:H},H},Ee.createElement=function(H,Y,I){var le,fe={},re=null;if(Y!=null)for(le in Y.key!==void 0&&(re=""+Y.key),Y)j.call(Y,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(fe[le]=Y[le]);var de=arguments.length-2;if(de===1)fe.children=I;else if(1<de){for(var _e=Array(de),pe=0;pe<de;pe++)_e[pe]=arguments[pe+2];fe.children=_e}if(H&&H.defaultProps)for(le in de=H.defaultProps,de)fe[le]===void 0&&(fe[le]=de[le]);return F(H,re,fe)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(H){return{$$typeof:c,render:H}},Ee.isValidElement=q,Ee.lazy=function(H){return{$$typeof:p,_payload:{_status:-1,_result:H},_init:ne}},Ee.memo=function(H,Y){return{$$typeof:f,type:H,compare:Y===void 0?null:Y}},Ee.startTransition=function(H){var Y=z.T,I={};z.T=I;try{var le=H(),fe=z.S;fe!==null&&fe(I,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(O,ue)}catch(re){ue(re)}finally{Y!==null&&I.types!==null&&(Y.types=I.types),z.T=Y}},Ee.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Ee.use=function(H){return z.H.use(H)},Ee.useActionState=function(H,Y,I){return z.H.useActionState(H,Y,I)},Ee.useCallback=function(H,Y){return z.H.useCallback(H,Y)},Ee.useContext=function(H){return z.H.useContext(H)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(H,Y){return z.H.useDeferredValue(H,Y)},Ee.useEffect=function(H,Y){return z.H.useEffect(H,Y)},Ee.useEffectEvent=function(H){return z.H.useEffectEvent(H)},Ee.useId=function(){return z.H.useId()},Ee.useImperativeHandle=function(H,Y,I){return z.H.useImperativeHandle(H,Y,I)},Ee.useInsertionEffect=function(H,Y){return z.H.useInsertionEffect(H,Y)},Ee.useLayoutEffect=function(H,Y){return z.H.useLayoutEffect(H,Y)},Ee.useMemo=function(H,Y){return z.H.useMemo(H,Y)},Ee.useOptimistic=function(H,Y){return z.H.useOptimistic(H,Y)},Ee.useReducer=function(H,Y,I){return z.H.useReducer(H,Y,I)},Ee.useRef=function(H){return z.H.useRef(H)},Ee.useState=function(H){return z.H.useState(H)},Ee.useSyncExternalStore=function(H,Y,I){return z.H.useSyncExternalStore(H,Y,I)},Ee.useTransition=function(){return z.H.useTransition()},Ee.version="19.2.8",Ee}var Zx;function Yg(){return Zx||(Zx=1,Ap.exports=sO()),Ap.exports}var N=Yg();const lO=zd(N),Ml=rO({__proto__:null,default:lO},[N]);var Lp={exports:{}},Xs={},Rp={exports:{}},Op={};var Jx;function uO(){return Jx||(Jx=1,(function(e){function t(P,$){var ne=P.length;P.push($);e:for(;0<ne;){var ue=ne-1>>>1,R=P[ue];if(0<o(R,$))P[ue]=$,P[ne]=R,ne=ue;else break e}}function n(P){return P.length===0?null:P[0]}function i(P){if(P.length===0)return null;var $=P[0],ne=P.pop();if(ne!==$){P[0]=ne;e:for(var ue=0,R=P.length,H=R>>>1;ue<H;){var Y=2*(ue+1)-1,I=P[Y],le=Y+1,fe=P[le];if(0>o(I,ne))le<R&&0>o(fe,I)?(P[ue]=fe,P[le]=ne,ue=le):(P[ue]=I,P[Y]=ne,ue=Y);else if(le<R&&0>o(fe,ne))P[ue]=fe,P[le]=ne,ue=le;else break e}}return $}function o(P,$){var ne=P.sortIndex-$.sortIndex;return ne!==0?ne:P.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],p=1,m=null,g=3,v=!1,x=!1,S=!1,C=!1,_=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function D(P){for(var $=n(f);$!==null;){if($.callback===null)i(f);else if($.startTime<=P)i(f),$.sortIndex=$.expirationTime,t(d,$);else break;$=n(f)}}function M(P){if(S=!1,D(P),!x)if(n(d)!==null)x=!0,O||(O=!0,U());else{var $=n(f);$!==null&&W(M,$.startTime-P)}}var O=!1,z=-1,j=5,F=-1;function ee(){return C?!0:!(e.unstable_now()-F<j)}function q(){if(C=!1,O){var P=e.unstable_now();F=P;var $=!0;try{e:{x=!1,S&&(S=!1,w(z),z=-1),v=!0;var ne=g;try{t:{for(D(P),m=n(d);m!==null&&!(m.expirationTime>P&&ee());){var ue=m.callback;if(typeof ue=="function"){m.callback=null,g=m.priorityLevel;var R=ue(m.expirationTime<=P);if(P=e.unstable_now(),typeof R=="function"){m.callback=R,D(P),$=!0;break t}m===n(d)&&i(d),D(P)}else i(d);m=n(d)}if(m!==null)$=!0;else{var H=n(f);H!==null&&W(M,H.startTime-P),$=!1}}break e}finally{m=null,g=ne,v=!1}$=void 0}}finally{$?U():O=!1}}}var U;if(typeof k=="function")U=function(){k(q)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,X=Z.port2;Z.port1.onmessage=q,U=function(){X.postMessage(null)}}else U=function(){_(q,0)};function W(P,$){z=_(function(){P(e.unstable_now())},$)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(P){switch(g){case 1:case 2:case 3:var $=3;break;default:$=g}var ne=g;g=$;try{return P()}finally{g=ne}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(P,$){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ne=g;g=P;try{return $()}finally{g=ne}},e.unstable_scheduleCallback=function(P,$,ne){var ue=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ue+ne:ue):ne=ue,P){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=ne+R,P={id:p++,callback:$,priorityLevel:P,startTime:ne,expirationTime:R,sortIndex:-1},ne>ue?(P.sortIndex=ne,t(f,P),n(d)===null&&P===n(f)&&(S?(w(z),z=-1):S=!0,W(M,ne-ue))):(P.sortIndex=R,t(d,P),x||v||(x=!0,O||(O=!0,U()))),P},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(P){var $=g;return function(){var ne=g;g=$;try{return P.apply(this,arguments)}finally{g=ne}}}})(Op)),Op}var eS;function cO(){return eS||(eS=1,Rp.exports=uO()),Rp.exports}var Dp={exports:{}},Ut={};var tS;function dO(){if(tS)return Ut;tS=1;var e=Yg();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(d,f,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:d,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ut.createPortal=function(d,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(d,f,null,p)},Ut.flushSync=function(d){var f=l.T,p=i.p;try{if(l.T=null,i.p=2,d)return d()}finally{l.T=f,i.p=p,i.d.f()}},Ut.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(d,f))},Ut.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Ut.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,m=c(p,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?i.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:v}):p==="script"&&i.d.X(d,{crossOrigin:m,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Ut.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);i.d.M(d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(d)},Ut.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,m=c(p,f.crossOrigin);i.d.L(d,p,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Ut.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=c(f.as,f.crossOrigin);i.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(d)},Ut.requestFormReset=function(d){i.d.r(d)},Ut.unstable_batchedUpdates=function(d,f){return d(f)},Ut.useFormState=function(d,f,p){return l.H.useFormState(d,f,p)},Ut.useFormStatus=function(){return l.H.useHostTransitionStatus()},Ut.version="19.2.8",Ut}var nS;function kw(){if(nS)return Dp.exports;nS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Dp.exports=dO(),Dp.exports}var iS;function fO(){if(iS)return Xs;iS=1;var e=cO(),t=Yg(),n=kw();function i(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function s(r){var a=r,u=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(u=a.return),r=a.return;while(r)}return a.tag===3?u:null}function l(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function c(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(s(r)!==r)throw Error(i(188))}function f(r){var a=r.alternate;if(!a){if(a=s(r),a===null)throw Error(i(188));return a!==r?null:r}for(var u=r,h=a;;){var y=u.return;if(y===null)break;var b=y.alternate;if(b===null){if(h=y.return,h!==null){u=h;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===u)return d(y),r;if(b===h)return d(y),a;b=b.sibling}throw Error(i(188))}if(u.return!==h.return)u=y,h=b;else{for(var E=!1,L=y.child;L;){if(L===u){E=!0,u=y,h=b;break}if(L===h){E=!0,h=y,u=b;break}L=L.sibling}if(!E){for(L=b.child;L;){if(L===u){E=!0,u=b,h=y;break}if(L===h){E=!0,h=b,u=y;break}L=L.sibling}if(!E)throw Error(i(189))}}if(u.alternate!==h)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?r:a}function p(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=p(r),a!==null)return a;r=r.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),k=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function U(r){return r===null||typeof r!="object"?null:(r=q&&r[q]||r["@@iterator"],typeof r=="function"?r:null)}var Z=Symbol.for("react.client.reference");function X(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===Z?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case S:return"Fragment";case _:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case O:return"SuspenseList";case F:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case x:return"Portal";case k:return r.displayName||"Context";case w:return(r._context.displayName||"Context")+".Consumer";case D:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case z:return a=r.displayName||null,a!==null?a:X(r.type)||"Memo";case j:a=r._payload,r=r._init;try{return X(r(a))}catch{}}return null}var W=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ue=[],R=-1;function H(r){return{current:r}}function Y(r){0>R||(r.current=ue[R],ue[R]=null,R--)}function I(r,a){R++,ue[R]=r.current,r.current=a}var le=H(null),fe=H(null),re=H(null),de=H(null);function _e(r,a){switch(I(re,a),I(fe,r),I(le,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?vx(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=vx(a),r=bx(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Y(le),I(le,r)}function pe(){Y(le),Y(fe),Y(re)}function Pe(r){r.memoizedState!==null&&I(de,r);var a=le.current,u=bx(a,r.type);a!==u&&(I(fe,r),I(le,u))}function je(r){fe.current===r&&(Y(le),Y(fe)),de.current===r&&(Y(de),Gs._currentValue=ne)}var st,He;function Ve(r){if(st===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);st=a&&a[1]||"",He=-1<u.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+st+r+He}var rt=!1;function en(r,a){if(!r||rt)return"";rt=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(te){var J=te}Reflect.construct(r,[],se)}else{try{se.call()}catch(te){J=te}r.call(se.prototype)}}else{try{throw Error()}catch(te){J=te}(se=r())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(te){if(te&&J&&typeof te.stack=="string")return[te.stack,J.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=h.DetermineComponentFrameRoot(),E=b[0],L=b[1];if(E&&L){var B=E.split(`
5
+ `),Q=L.split(`
6
+ `);for(y=h=0;h<B.length&&!B[h].includes("DetermineComponentFrameRoot");)h++;for(;y<Q.length&&!Q[y].includes("DetermineComponentFrameRoot");)y++;if(h===B.length||y===Q.length)for(h=B.length-1,y=Q.length-1;1<=h&&0<=y&&B[h]!==Q[y];)y--;for(;1<=h&&0<=y;h--,y--)if(B[h]!==Q[y]){if(h!==1||y!==1)do if(h--,y--,0>y||B[h]!==Q[y]){var ie=`
7
+ `+B[h].replace(" at new "," at ");return r.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",r.displayName)),ie}while(1<=h&&0<=y);break}}}finally{rt=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?Ve(u):""}function jt(r,a){switch(r.tag){case 26:case 27:case 5:return Ve(r.type);case 16:return Ve("Lazy");case 13:return r.child!==a&&a!==null?Ve("Suspense Fallback"):Ve("Suspense");case 19:return Ve("SuspenseList");case 0:case 15:return en(r.type,!1);case 11:return en(r.type.render,!1);case 1:return en(r.type,!0);case 31:return Ve("Activity");default:return""}}function Bt(r){try{var a="",u=null;do a+=jt(r,u),u=r,r=r.return;while(r);return a}catch(h){return`
8
+ Error generating stack: `+h.message+`
9
+ `+h.stack}}var Wt=Object.prototype.hasOwnProperty,dt=e.unstable_scheduleCallback,ni=e.unstable_cancelCallback,ff=e.unstable_shouldYield,hf=e.unstable_requestPaint,Yt=e.unstable_now,pf=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,he=e.unstable_UserBlockingPriority,Se=e.unstable_NormalPriority,Oe=e.unstable_LowPriority,$e=e.unstable_IdlePriority,mn=e.log,Ei=e.unstable_setDisableYieldValue,Xt=null,St=null;function tn(r){if(typeof mn=="function"&&Ei(r),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(Xt,r)}catch{}}var Ze=Math.clz32?Math.clz32:GA,lr=Math.log,Vn=Math.LN2;function GA(r){return r>>>=0,r===0?32:31-(lr(r)/Vn|0)|0}var $l=256,ql=262144,Wl=4194304;function Yr(r){var a=r&42;if(a!==0)return a;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Yl(r,a,u){var h=r.pendingLanes;if(h===0)return 0;var y=0,b=r.suspendedLanes,E=r.pingedLanes;r=r.warmLanes;var L=h&134217727;return L!==0?(h=L&~b,h!==0?y=Yr(h):(E&=L,E!==0?y=Yr(E):u||(u=L&~r,u!==0&&(y=Yr(u))))):(L=h&~b,L!==0?y=Yr(L):E!==0?y=Yr(E):u||(u=h&~r,u!==0&&(y=Yr(u)))),y===0?0:a!==0&&a!==y&&(a&b)===0&&(b=y&-y,u=a&-a,b>=u||b===32&&(u&4194048)!==0)?a:y}function is(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function $A(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Jy(){var r=Wl;return Wl<<=1,(Wl&62914560)===0&&(Wl=4194304),r}function mf(r){for(var a=[],u=0;31>u;u++)a.push(r);return a}function rs(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function qA(r,a,u,h,y,b){var E=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var L=r.entanglements,B=r.expirationTimes,Q=r.hiddenUpdates;for(u=E&~u;0<u;){var ie=31-Ze(u),se=1<<ie;L[ie]=0,B[ie]=-1;var J=Q[ie];if(J!==null)for(Q[ie]=null,ie=0;ie<J.length;ie++){var te=J[ie];te!==null&&(te.lane&=-536870913)}u&=~se}h!==0&&ev(r,h,0),b!==0&&y===0&&r.tag!==0&&(r.suspendedLanes|=b&~(E&~a))}function ev(r,a,u){r.pendingLanes|=a,r.suspendedLanes&=~a;var h=31-Ze(a);r.entangledLanes|=a,r.entanglements[h]=r.entanglements[h]|1073741824|u&261930}function tv(r,a){var u=r.entangledLanes|=a;for(r=r.entanglements;u;){var h=31-Ze(u),y=1<<h;y&a|r[h]&a&&(r[h]|=a),u&=~y}}function nv(r,a){var u=a&-a;return u=(u&42)!==0?1:gf(u),(u&(r.suspendedLanes|a))!==0?0:u}function gf(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function yf(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function iv(){var r=$.p;return r!==0?r:(r=window.event,r===void 0?32:Vx(r.type))}function rv(r,a){var u=$.p;try{return $.p=r,a()}finally{$.p=u}}var ur=Math.random().toString(36).slice(2),It="__reactFiber$"+ur,nn="__reactProps$"+ur,$o="__reactContainer$"+ur,vf="__reactEvents$"+ur,WA="__reactListeners$"+ur,YA="__reactHandles$"+ur,ov="__reactResources$"+ur,os="__reactMarker$"+ur;function bf(r){delete r[It],delete r[nn],delete r[vf],delete r[WA],delete r[YA]}function qo(r){var a=r[It];if(a)return a;for(var u=r.parentNode;u;){if(a=u[$o]||u[It]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(r=kx(r);r!==null;){if(u=r[It])return u;r=kx(r)}return a}r=u,u=r.parentNode}return null}function Wo(r){if(r=r[It]||r[$o]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function as(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function Yo(r){var a=r[ov];return a||(a=r[ov]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function At(r){r[os]=!0}var av=new Set,sv={};function Xr(r,a){Xo(r,a),Xo(r+"Capture",a)}function Xo(r,a){for(sv[r]=a,r=0;r<a.length;r++)av.add(a[r])}var XA=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]*$"),lv={},uv={};function KA(r){return Wt.call(uv,r)?!0:Wt.call(lv,r)?!1:XA.test(r)?uv[r]=!0:(lv[r]=!0,!1)}function Xl(r,a,u){if(KA(a))if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var h=a.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+u)}}function Kl(r,a,u){if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+u)}}function ki(r,a,u,h){if(h===null)r.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(a,u,""+h)}}function Tn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function cv(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function QA(r,a,u){var h=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var y=h.get,b=h.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return y.call(this)},set:function(E){u=""+E,b.call(this,E)}}),Object.defineProperty(r,a,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(E){u=""+E},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function xf(r){if(!r._valueTracker){var a=cv(r)?"checked":"value";r._valueTracker=QA(r,a,""+r[a])}}function dv(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var u=a.getValue(),h="";return r&&(h=cv(r)?r.checked?"true":"false":r.value),r=h,r!==u?(a.setValue(r),!0):!1}function Ql(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var ZA=/[\n"\\]/g;function An(r){return r.replace(ZA,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Sf(r,a,u,h,y,b,E,L){r.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?r.type=E:r.removeAttribute("type"),a!=null?E==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Tn(a)):r.value!==""+Tn(a)&&(r.value=""+Tn(a)):E!=="submit"&&E!=="reset"||r.removeAttribute("value"),a!=null?_f(r,E,Tn(a)):u!=null?_f(r,E,Tn(u)):h!=null&&r.removeAttribute("value"),y==null&&b!=null&&(r.defaultChecked=!!b),y!=null&&(r.checked=y&&typeof y!="function"&&typeof y!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?r.name=""+Tn(L):r.removeAttribute("name")}function fv(r,a,u,h,y,b,E,L){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.type=b),a!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||a!=null)){xf(r);return}u=u!=null?""+Tn(u):"",a=a!=null?""+Tn(a):u,L||a===r.value||(r.value=a),r.defaultValue=a}h=h??y,h=typeof h!="function"&&typeof h!="symbol"&&!!h,r.checked=L?r.checked:!!h,r.defaultChecked=!!h,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(r.name=E),xf(r)}function _f(r,a,u){a==="number"&&Ql(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function Ko(r,a,u,h){if(r=r.options,a){a={};for(var y=0;y<u.length;y++)a["$"+u[y]]=!0;for(u=0;u<r.length;u++)y=a.hasOwnProperty("$"+r[u].value),r[u].selected!==y&&(r[u].selected=y),y&&h&&(r[u].defaultSelected=!0)}else{for(u=""+Tn(u),a=null,y=0;y<r.length;y++){if(r[y].value===u){r[y].selected=!0,h&&(r[y].defaultSelected=!0);return}a!==null||r[y].disabled||(a=r[y])}a!==null&&(a.selected=!0)}}function hv(r,a,u){if(a!=null&&(a=""+Tn(a),a!==r.value&&(r.value=a),u==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=u!=null?""+Tn(u):""}function pv(r,a,u,h){if(a==null){if(h!=null){if(u!=null)throw Error(i(92));if(W(h)){if(1<h.length)throw Error(i(93));h=h[0]}u=h}u==null&&(u=""),a=u}u=Tn(a),r.defaultValue=u,h=r.textContent,h===u&&h!==""&&h!==null&&(r.value=h),xf(r)}function Qo(r,a){if(a){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=a;return}}r.textContent=a}var JA=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 mv(r,a,u){var h=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":h?r.setProperty(a,u):typeof u!="number"||u===0||JA.has(a)?a==="float"?r.cssFloat=u:r[a]=(""+u).trim():r[a]=u+"px"}function gv(r,a,u){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||a!=null&&a.hasOwnProperty(h)||(h.indexOf("--")===0?r.setProperty(h,""):h==="float"?r.cssFloat="":r[h]="");for(var y in a)h=a[y],a.hasOwnProperty(y)&&u[y]!==h&&mv(r,y,h)}else for(var b in a)a.hasOwnProperty(b)&&mv(r,b,a[b])}function Cf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 eL=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"]]),tL=/^[\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 Zl(r){return tL.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Ti(){}var wf=null;function Ef(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Zo=null,Jo=null;function yv(r){var a=Wo(r);if(a&&(r=a.stateNode)){var u=r[nn]||null;e:switch(r=a.stateNode,a.type){case"input":if(Sf(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+An(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var h=u[a];if(h!==r&&h.form===r.form){var y=h[nn]||null;if(!y)throw Error(i(90));Sf(h,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<u.length;a++)h=u[a],h.form===r.form&&dv(h)}break e;case"textarea":hv(r,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Ko(r,!!u.multiple,a,!1)}}}var kf=!1;function vv(r,a,u){if(kf)return r(a,u);kf=!0;try{var h=r(a);return h}finally{if(kf=!1,(Zo!==null||Jo!==null)&&(ju(),Zo&&(a=Zo,r=Jo,Jo=Zo=null,yv(a),r)))for(a=0;a<r.length;a++)yv(r[a])}}function ss(r,a){var u=r.stateNode;if(u===null)return null;var h=u[nn]||null;if(h===null)return null;u=h[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(r=r.type,h=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!h;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(i(231,a,typeof u));return u}var Ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tf=!1;if(Ai)try{var ls={};Object.defineProperty(ls,"passive",{get:function(){Tf=!0}}),window.addEventListener("test",ls,ls),window.removeEventListener("test",ls,ls)}catch{Tf=!1}var cr=null,Af=null,Jl=null;function bv(){if(Jl)return Jl;var r,a=Af,u=a.length,h,y="value"in cr?cr.value:cr.textContent,b=y.length;for(r=0;r<u&&a[r]===y[r];r++);var E=u-r;for(h=1;h<=E&&a[u-h]===y[b-h];h++);return Jl=y.slice(r,1<h?1-h:void 0)}function eu(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function tu(){return!0}function xv(){return!1}function rn(r){function a(u,h,y,b,E){this._reactName=u,this._targetInst=y,this.type=h,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var L in r)r.hasOwnProperty(L)&&(u=r[L],this[L]=u?u(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?tu:xv,this.isPropagationStopped=xv,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=tu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=tu)},persist:function(){},isPersistent:tu}),a}var Kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nu=rn(Kr),us=m({},Kr,{view:0,detail:0}),nL=rn(us),Lf,Rf,cs,iu=m({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Df,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==cs&&(cs&&r.type==="mousemove"?(Lf=r.screenX-cs.screenX,Rf=r.screenY-cs.screenY):Rf=Lf=0,cs=r),Lf)},movementY:function(r){return"movementY"in r?r.movementY:Rf}}),Sv=rn(iu),iL=m({},iu,{dataTransfer:0}),rL=rn(iL),oL=m({},us,{relatedTarget:0}),Of=rn(oL),aL=m({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),sL=rn(aL),lL=m({},Kr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),uL=rn(lL),cL=m({},Kr,{data:0}),_v=rn(cL),dL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fL={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"},hL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pL(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=hL[r])?!!a[r]:!1}function Df(){return pL}var mL=m({},us,{key:function(r){if(r.key){var a=dL[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=eu(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?fL[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Df,charCode:function(r){return r.type==="keypress"?eu(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?eu(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),gL=rn(mL),yL=m({},iu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cv=rn(yL),vL=m({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Df}),bL=rn(vL),xL=m({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),SL=rn(xL),_L=m({},iu,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),CL=rn(_L),wL=m({},Kr,{newState:0,oldState:0}),EL=rn(wL),kL=[9,13,27,32],Mf=Ai&&"CompositionEvent"in window,ds=null;Ai&&"documentMode"in document&&(ds=document.documentMode);var TL=Ai&&"TextEvent"in window&&!ds,wv=Ai&&(!Mf||ds&&8<ds&&11>=ds),Ev=" ",kv=!1;function Tv(r,a){switch(r){case"keyup":return kL.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Av(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ea=!1;function AL(r,a){switch(r){case"compositionend":return Av(a);case"keypress":return a.which!==32?null:(kv=!0,Ev);case"textInput":return r=a.data,r===Ev&&kv?null:r;default:return null}}function LL(r,a){if(ea)return r==="compositionend"||!Mf&&Tv(r,a)?(r=bv(),Jl=Af=cr=null,ea=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return wv&&a.locale!=="ko"?null:a.data;default:return null}}var RL={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 Lv(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!RL[r.type]:a==="textarea"}function Rv(r,a,u,h){Zo?Jo?Jo.push(h):Jo=[h]:Zo=h,a=qu(a,"onChange"),0<a.length&&(u=new nu("onChange","change",null,u,h),r.push({event:u,listeners:a}))}var fs=null,hs=null;function OL(r){fx(r,0)}function ru(r){var a=as(r);if(dv(a))return r}function Ov(r,a){if(r==="change")return a}var Dv=!1;if(Ai){var If;if(Ai){var Nf="oninput"in document;if(!Nf){var Mv=document.createElement("div");Mv.setAttribute("oninput","return;"),Nf=typeof Mv.oninput=="function"}If=Nf}else If=!1;Dv=If&&(!document.documentMode||9<document.documentMode)}function Iv(){fs&&(fs.detachEvent("onpropertychange",Nv),hs=fs=null)}function Nv(r){if(r.propertyName==="value"&&ru(hs)){var a=[];Rv(a,hs,r,Ef(r)),vv(OL,a)}}function DL(r,a,u){r==="focusin"?(Iv(),fs=a,hs=u,fs.attachEvent("onpropertychange",Nv)):r==="focusout"&&Iv()}function ML(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return ru(hs)}function IL(r,a){if(r==="click")return ru(a)}function NL(r,a){if(r==="input"||r==="change")return ru(a)}function zL(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var gn=typeof Object.is=="function"?Object.is:zL;function ps(r,a){if(gn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var u=Object.keys(r),h=Object.keys(a);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var y=u[h];if(!Wt.call(a,y)||!gn(r[y],a[y]))return!1}return!0}function zv(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Pv(r,a){var u=zv(r);r=0;for(var h;u;){if(u.nodeType===3){if(h=r+u.textContent.length,r<=a&&h>=a)return{node:u,offset:a-r};r=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=zv(u)}}function Hv(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?Hv(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function jv(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Ql(r.document);a instanceof r.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)r=a.contentWindow;else break;a=Ql(r.document)}return a}function zf(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var PL=Ai&&"documentMode"in document&&11>=document.documentMode,ta=null,Pf=null,ms=null,Hf=!1;function Bv(r,a,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Hf||ta==null||ta!==Ql(h)||(h=ta,"selectionStart"in h&&zf(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),ms&&ps(ms,h)||(ms=h,h=qu(Pf,"onSelect"),0<h.length&&(a=new nu("onSelect","select",null,a,u),r.push({event:a,listeners:h}),a.target=ta)))}function Qr(r,a){var u={};return u[r.toLowerCase()]=a.toLowerCase(),u["Webkit"+r]="webkit"+a,u["Moz"+r]="moz"+a,u}var na={animationend:Qr("Animation","AnimationEnd"),animationiteration:Qr("Animation","AnimationIteration"),animationstart:Qr("Animation","AnimationStart"),transitionrun:Qr("Transition","TransitionRun"),transitionstart:Qr("Transition","TransitionStart"),transitioncancel:Qr("Transition","TransitionCancel"),transitionend:Qr("Transition","TransitionEnd")},jf={},Uv={};Ai&&(Uv=document.createElement("div").style,"AnimationEvent"in window||(delete na.animationend.animation,delete na.animationiteration.animation,delete na.animationstart.animation),"TransitionEvent"in window||delete na.transitionend.transition);function Zr(r){if(jf[r])return jf[r];if(!na[r])return r;var a=na[r],u;for(u in a)if(a.hasOwnProperty(u)&&u in Uv)return jf[r]=a[u];return r}var Vv=Zr("animationend"),Fv=Zr("animationiteration"),Gv=Zr("animationstart"),HL=Zr("transitionrun"),jL=Zr("transitionstart"),BL=Zr("transitioncancel"),$v=Zr("transitionend"),qv=new Map,Bf="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(" ");Bf.push("scrollEnd");function Fn(r,a){qv.set(r,a),Xr(a,[r])}var ou=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Ln=[],ia=0,Uf=0;function au(){for(var r=ia,a=Uf=ia=0;a<r;){var u=Ln[a];Ln[a++]=null;var h=Ln[a];Ln[a++]=null;var y=Ln[a];Ln[a++]=null;var b=Ln[a];if(Ln[a++]=null,h!==null&&y!==null){var E=h.pending;E===null?y.next=y:(y.next=E.next,E.next=y),h.pending=y}b!==0&&Wv(u,y,b)}}function su(r,a,u,h){Ln[ia++]=r,Ln[ia++]=a,Ln[ia++]=u,Ln[ia++]=h,Uf|=h,r.lanes|=h,r=r.alternate,r!==null&&(r.lanes|=h)}function Vf(r,a,u,h){return su(r,a,u,h),lu(r)}function Jr(r,a){return su(r,null,null,a),lu(r)}function Wv(r,a,u){r.lanes|=u;var h=r.alternate;h!==null&&(h.lanes|=u);for(var y=!1,b=r.return;b!==null;)b.childLanes|=u,h=b.alternate,h!==null&&(h.childLanes|=u),b.tag===22&&(r=b.stateNode,r===null||r._visibility&1||(y=!0)),r=b,b=b.return;return r.tag===3?(b=r.stateNode,y&&a!==null&&(y=31-Ze(u),r=b.hiddenUpdates,h=r[y],h===null?r[y]=[a]:h.push(a),a.lane=u|536870912),b):null}function lu(r){if(50<Ps)throw Ps=0,Qh=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var ra={};function UL(r,a,u,h){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(r,a,u,h){return new UL(r,a,u,h)}function Ff(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Li(r,a){var u=r.alternate;return u===null?(u=yn(r.tag,a,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=a,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,a=r.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function Yv(r,a){r.flags&=65011714;var u=r.alternate;return u===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,a=u.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function uu(r,a,u,h,y,b){var E=0;if(h=r,typeof r=="function")Ff(r)&&(E=1);else if(typeof r=="string")E=qR(r,u,le.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case F:return r=yn(31,u,a,y),r.elementType=F,r.lanes=b,r;case S:return eo(u.children,y,b,a);case C:E=8,y|=24;break;case _:return r=yn(12,u,a,y|2),r.elementType=_,r.lanes=b,r;case M:return r=yn(13,u,a,y),r.elementType=M,r.lanes=b,r;case O:return r=yn(19,u,a,y),r.elementType=O,r.lanes=b,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case k:E=10;break e;case w:E=9;break e;case D:E=11;break e;case z:E=14;break e;case j:E=16,h=null;break e}E=29,u=Error(i(130,r===null?"null":typeof r,"")),h=null}return a=yn(E,u,a,y),a.elementType=r,a.type=h,a.lanes=b,a}function eo(r,a,u,h){return r=yn(7,r,h,a),r.lanes=u,r}function Gf(r,a,u){return r=yn(6,r,null,a),r.lanes=u,r}function Xv(r){var a=yn(18,null,null,0);return a.stateNode=r,a}function $f(r,a,u){return a=yn(4,r.children!==null?r.children:[],r.key,a),a.lanes=u,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Kv=new WeakMap;function Rn(r,a){if(typeof r=="object"&&r!==null){var u=Kv.get(r);return u!==void 0?u:(a={value:r,source:a,stack:Bt(a)},Kv.set(r,a),a)}return{value:r,source:a,stack:Bt(a)}}var oa=[],aa=0,cu=null,gs=0,On=[],Dn=0,dr=null,ii=1,ri="";function Ri(r,a){oa[aa++]=gs,oa[aa++]=cu,cu=r,gs=a}function Qv(r,a,u){On[Dn++]=ii,On[Dn++]=ri,On[Dn++]=dr,dr=r;var h=ii;r=ri;var y=32-Ze(h)-1;h&=~(1<<y),u+=1;var b=32-Ze(a)+y;if(30<b){var E=y-y%5;b=(h&(1<<E)-1).toString(32),h>>=E,y-=E,ii=1<<32-Ze(a)+y|u<<y|h,ri=b+r}else ii=1<<b|u<<y|h,ri=r}function qf(r){r.return!==null&&(Ri(r,1),Qv(r,1,0))}function Wf(r){for(;r===cu;)cu=oa[--aa],oa[aa]=null,gs=oa[--aa],oa[aa]=null;for(;r===dr;)dr=On[--Dn],On[Dn]=null,ri=On[--Dn],On[Dn]=null,ii=On[--Dn],On[Dn]=null}function Zv(r,a){On[Dn++]=ii,On[Dn++]=ri,On[Dn++]=dr,ii=a.id,ri=a.overflow,dr=r}var Nt=null,ot=null,ze=!1,fr=null,Mn=!1,Yf=Error(i(519));function hr(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ys(Rn(a,r)),Yf}function Jv(r){var a=r.stateNode,u=r.type,h=r.memoizedProps;switch(a[It]=r,a[nn]=h,u){case"dialog":Me("cancel",a),Me("close",a);break;case"iframe":case"object":case"embed":Me("load",a);break;case"video":case"audio":for(u=0;u<js.length;u++)Me(js[u],a);break;case"source":Me("error",a);break;case"img":case"image":case"link":Me("error",a),Me("load",a);break;case"details":Me("toggle",a);break;case"input":Me("invalid",a),fv(a,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":Me("invalid",a);break;case"textarea":Me("invalid",a),pv(a,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||h.suppressHydrationWarning===!0||gx(a.textContent,u)?(h.popover!=null&&(Me("beforetoggle",a),Me("toggle",a)),h.onScroll!=null&&Me("scroll",a),h.onScrollEnd!=null&&Me("scrollend",a),h.onClick!=null&&(a.onclick=Ti),a=!0):a=!1,a||hr(r,!0)}function e0(r){for(Nt=r.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:Mn=!1;return;case 27:case 3:Mn=!0;return;default:Nt=Nt.return}}function sa(r){if(r!==Nt)return!1;if(!ze)return e0(r),ze=!0,!1;var a=r.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||fp(r.type,r.memoizedProps)),u=!u),u&&ot&&hr(r),e0(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ot=Ex(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ot=Ex(r)}else a===27?(a=ot,Tr(r.type)?(r=yp,yp=null,ot=r):ot=a):ot=Nt?Nn(r.stateNode.nextSibling):null;return!0}function to(){ot=Nt=null,ze=!1}function Xf(){var r=fr;return r!==null&&(ln===null?ln=r:ln.push.apply(ln,r),fr=null),r}function ys(r){fr===null?fr=[r]:fr.push(r)}var Kf=H(null),no=null,Oi=null;function pr(r,a,u){I(Kf,a._currentValue),a._currentValue=u}function Di(r){r._currentValue=Kf.current,Y(Kf)}function Qf(r,a,u){for(;r!==null;){var h=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,h!==null&&(h.childLanes|=a)):h!==null&&(h.childLanes&a)!==a&&(h.childLanes|=a),r===u)break;r=r.return}}function Zf(r,a,u,h){var y=r.child;for(y!==null&&(y.return=r);y!==null;){var b=y.dependencies;if(b!==null){var E=y.child;b=b.firstContext;e:for(;b!==null;){var L=b;b=y;for(var B=0;B<a.length;B++)if(L.context===a[B]){b.lanes|=u,L=b.alternate,L!==null&&(L.lanes|=u),Qf(b.return,u,r),h||(E=null);break e}b=L.next}}else if(y.tag===18){if(E=y.return,E===null)throw Error(i(341));E.lanes|=u,b=E.alternate,b!==null&&(b.lanes|=u),Qf(E,u,r),E=null}else E=y.child;if(E!==null)E.return=y;else for(E=y;E!==null;){if(E===r){E=null;break}if(y=E.sibling,y!==null){y.return=E.return,E=y;break}E=E.return}y=E}}function la(r,a,u,h){r=null;for(var y=a,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var E=y.alternate;if(E===null)throw Error(i(387));if(E=E.memoizedProps,E!==null){var L=y.type;gn(y.pendingProps.value,E.value)||(r!==null?r.push(L):r=[L])}}else if(y===de.current){if(E=y.alternate,E===null)throw Error(i(387));E.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(r!==null?r.push(Gs):r=[Gs])}y=y.return}r!==null&&Zf(a,r,u,h),a.flags|=262144}function du(r){for(r=r.firstContext;r!==null;){if(!gn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function io(r){no=r,Oi=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function zt(r){return t0(no,r)}function fu(r,a){return no===null&&io(r),t0(r,a)}function t0(r,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},Oi===null){if(r===null)throw Error(i(308));Oi=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Oi=Oi.next=a;return u}var VL=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(u,h){r.push(h)}};this.abort=function(){a.aborted=!0,r.forEach(function(u){return u()})}},FL=e.unstable_scheduleCallback,GL=e.unstable_NormalPriority,gt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jf(){return{controller:new VL,data:new Map,refCount:0}}function vs(r){r.refCount--,r.refCount===0&&FL(GL,function(){r.controller.abort()})}var bs=null,eh=0,ua=0,ca=null;function $L(r,a){if(bs===null){var u=bs=[];eh=0,ua=ip(),ca={status:"pending",value:void 0,then:function(h){u.push(h)}}}return eh++,a.then(n0,n0),a}function n0(){if(--eh===0&&bs!==null){ca!==null&&(ca.status="fulfilled");var r=bs;bs=null,ua=0,ca=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function qL(r,a){var u=[],h={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return r.then(function(){h.status="fulfilled",h.value=a;for(var y=0;y<u.length;y++)(0,u[y])(a)},function(y){for(h.status="rejected",h.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),h}var i0=P.S;P.S=function(r,a){Bb=Yt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&$L(r,a),i0!==null&&i0(r,a)};var ro=H(null);function th(){var r=ro.current;return r!==null?r:Je.pooledCache}function hu(r,a){a===null?I(ro,ro.current):I(ro,a.pool)}function r0(){var r=th();return r===null?null:{parent:gt._currentValue,pool:r}}var da=Error(i(460)),nh=Error(i(474)),pu=Error(i(542)),mu={then:function(){}};function o0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function a0(r,a,u){switch(u=r[u],u===void 0?r.push(a):u!==a&&(a.then(Ti,Ti),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,l0(r),r;default:if(typeof a.status=="string")a.then(Ti,Ti);else{if(r=Je,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(h){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=h}},function(h){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=h}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,l0(r),r}throw ao=a,da}}function oo(r){try{var a=r._init;return a(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ao=u,da):u}}var ao=null;function s0(){if(ao===null)throw Error(i(459));var r=ao;return ao=null,r}function l0(r){if(r===da||r===pu)throw Error(i(483))}var fa=null,xs=0;function gu(r){var a=xs;return xs+=1,fa===null&&(fa=[]),a0(fa,r,a)}function Ss(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function yu(r,a){throw a.$$typeof===g?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function u0(r){function a(G,V){if(r){var K=G.deletions;K===null?(G.deletions=[V],G.flags|=16):K.push(V)}}function u(G,V){if(!r)return null;for(;V!==null;)a(G,V),V=V.sibling;return null}function h(G){for(var V=new Map;G!==null;)G.key!==null?V.set(G.key,G):V.set(G.index,G),G=G.sibling;return V}function y(G,V){return G=Li(G,V),G.index=0,G.sibling=null,G}function b(G,V,K){return G.index=K,r?(K=G.alternate,K!==null?(K=K.index,K<V?(G.flags|=67108866,V):K):(G.flags|=67108866,V)):(G.flags|=1048576,V)}function E(G){return r&&G.alternate===null&&(G.flags|=67108866),G}function L(G,V,K,ae){return V===null||V.tag!==6?(V=Gf(K,G.mode,ae),V.return=G,V):(V=y(V,K),V.return=G,V)}function B(G,V,K,ae){var be=K.type;return be===S?ie(G,V,K.props.children,ae,K.key):V!==null&&(V.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&oo(be)===V.type)?(V=y(V,K.props),Ss(V,K),V.return=G,V):(V=uu(K.type,K.key,K.props,null,G.mode,ae),Ss(V,K),V.return=G,V)}function Q(G,V,K,ae){return V===null||V.tag!==4||V.stateNode.containerInfo!==K.containerInfo||V.stateNode.implementation!==K.implementation?(V=$f(K,G.mode,ae),V.return=G,V):(V=y(V,K.children||[]),V.return=G,V)}function ie(G,V,K,ae,be){return V===null||V.tag!==7?(V=eo(K,G.mode,ae,be),V.return=G,V):(V=y(V,K),V.return=G,V)}function se(G,V,K){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Gf(""+V,G.mode,K),V.return=G,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return K=uu(V.type,V.key,V.props,null,G.mode,K),Ss(K,V),K.return=G,K;case x:return V=$f(V,G.mode,K),V.return=G,V;case j:return V=oo(V),se(G,V,K)}if(W(V)||U(V))return V=eo(V,G.mode,K,null),V.return=G,V;if(typeof V.then=="function")return se(G,gu(V),K);if(V.$$typeof===k)return se(G,fu(G,V),K);yu(G,V)}return null}function J(G,V,K,ae){var be=V!==null?V.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return be!==null?null:L(G,V,""+K,ae);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case v:return K.key===be?B(G,V,K,ae):null;case x:return K.key===be?Q(G,V,K,ae):null;case j:return K=oo(K),J(G,V,K,ae)}if(W(K)||U(K))return be!==null?null:ie(G,V,K,ae,null);if(typeof K.then=="function")return J(G,V,gu(K),ae);if(K.$$typeof===k)return J(G,V,fu(G,K),ae);yu(G,K)}return null}function te(G,V,K,ae,be){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return G=G.get(K)||null,L(V,G,""+ae,be);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case v:return G=G.get(ae.key===null?K:ae.key)||null,B(V,G,ae,be);case x:return G=G.get(ae.key===null?K:ae.key)||null,Q(V,G,ae,be);case j:return ae=oo(ae),te(G,V,K,ae,be)}if(W(ae)||U(ae))return G=G.get(K)||null,ie(V,G,ae,be,null);if(typeof ae.then=="function")return te(G,V,K,gu(ae),be);if(ae.$$typeof===k)return te(G,V,K,fu(V,ae),be);yu(V,ae)}return null}function ye(G,V,K,ae){for(var be=null,Be=null,ve=V,Le=V=0,Ne=null;ve!==null&&Le<K.length;Le++){ve.index>Le?(Ne=ve,ve=null):Ne=ve.sibling;var Ue=J(G,ve,K[Le],ae);if(Ue===null){ve===null&&(ve=Ne);break}r&&ve&&Ue.alternate===null&&a(G,ve),V=b(Ue,V,Le),Be===null?be=Ue:Be.sibling=Ue,Be=Ue,ve=Ne}if(Le===K.length)return u(G,ve),ze&&Ri(G,Le),be;if(ve===null){for(;Le<K.length;Le++)ve=se(G,K[Le],ae),ve!==null&&(V=b(ve,V,Le),Be===null?be=ve:Be.sibling=ve,Be=ve);return ze&&Ri(G,Le),be}for(ve=h(ve);Le<K.length;Le++)Ne=te(ve,G,Le,K[Le],ae),Ne!==null&&(r&&Ne.alternate!==null&&ve.delete(Ne.key===null?Le:Ne.key),V=b(Ne,V,Le),Be===null?be=Ne:Be.sibling=Ne,Be=Ne);return r&&ve.forEach(function(Dr){return a(G,Dr)}),ze&&Ri(G,Le),be}function xe(G,V,K,ae){if(K==null)throw Error(i(151));for(var be=null,Be=null,ve=V,Le=V=0,Ne=null,Ue=K.next();ve!==null&&!Ue.done;Le++,Ue=K.next()){ve.index>Le?(Ne=ve,ve=null):Ne=ve.sibling;var Dr=J(G,ve,Ue.value,ae);if(Dr===null){ve===null&&(ve=Ne);break}r&&ve&&Dr.alternate===null&&a(G,ve),V=b(Dr,V,Le),Be===null?be=Dr:Be.sibling=Dr,Be=Dr,ve=Ne}if(Ue.done)return u(G,ve),ze&&Ri(G,Le),be;if(ve===null){for(;!Ue.done;Le++,Ue=K.next())Ue=se(G,Ue.value,ae),Ue!==null&&(V=b(Ue,V,Le),Be===null?be=Ue:Be.sibling=Ue,Be=Ue);return ze&&Ri(G,Le),be}for(ve=h(ve);!Ue.done;Le++,Ue=K.next())Ue=te(ve,G,Le,Ue.value,ae),Ue!==null&&(r&&Ue.alternate!==null&&ve.delete(Ue.key===null?Le:Ue.key),V=b(Ue,V,Le),Be===null?be=Ue:Be.sibling=Ue,Be=Ue);return r&&ve.forEach(function(iO){return a(G,iO)}),ze&&Ri(G,Le),be}function Ke(G,V,K,ae){if(typeof K=="object"&&K!==null&&K.type===S&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case v:e:{for(var be=K.key;V!==null;){if(V.key===be){if(be=K.type,be===S){if(V.tag===7){u(G,V.sibling),ae=y(V,K.props.children),ae.return=G,G=ae;break e}}else if(V.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&oo(be)===V.type){u(G,V.sibling),ae=y(V,K.props),Ss(ae,K),ae.return=G,G=ae;break e}u(G,V);break}else a(G,V);V=V.sibling}K.type===S?(ae=eo(K.props.children,G.mode,ae,K.key),ae.return=G,G=ae):(ae=uu(K.type,K.key,K.props,null,G.mode,ae),Ss(ae,K),ae.return=G,G=ae)}return E(G);case x:e:{for(be=K.key;V!==null;){if(V.key===be)if(V.tag===4&&V.stateNode.containerInfo===K.containerInfo&&V.stateNode.implementation===K.implementation){u(G,V.sibling),ae=y(V,K.children||[]),ae.return=G,G=ae;break e}else{u(G,V);break}else a(G,V);V=V.sibling}ae=$f(K,G.mode,ae),ae.return=G,G=ae}return E(G);case j:return K=oo(K),Ke(G,V,K,ae)}if(W(K))return ye(G,V,K,ae);if(U(K)){if(be=U(K),typeof be!="function")throw Error(i(150));return K=be.call(K),xe(G,V,K,ae)}if(typeof K.then=="function")return Ke(G,V,gu(K),ae);if(K.$$typeof===k)return Ke(G,V,fu(G,K),ae);yu(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,V!==null&&V.tag===6?(u(G,V.sibling),ae=y(V,K),ae.return=G,G=ae):(u(G,V),ae=Gf(K,G.mode,ae),ae.return=G,G=ae),E(G)):u(G,V)}return function(G,V,K,ae){try{xs=0;var be=Ke(G,V,K,ae);return fa=null,be}catch(ve){if(ve===da||ve===pu)throw ve;var Be=yn(29,ve,null,G.mode);return Be.lanes=ae,Be.return=G,Be}}}var so=u0(!0),c0=u0(!1),mr=!1;function ih(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rh(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function gr(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function yr(r,a,u){var h=r.updateQueue;if(h===null)return null;if(h=h.shared,(Fe&2)!==0){var y=h.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),h.pending=a,a=lu(r),Wv(r,null,u),a}return su(r,h,a,u),lu(r)}function _s(r,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var h=a.lanes;h&=r.pendingLanes,u|=h,a.lanes=u,tv(r,u)}}function oh(r,a){var u=r.updateQueue,h=r.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var y=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var E={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?y=b=E:b=b.next=E,u=u.next}while(u!==null);b===null?y=b=a:b=b.next=a}else y=b=a;u={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:h.shared,callbacks:h.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=a:r.next=a,u.lastBaseUpdate=a}var ah=!1;function Cs(){if(ah){var r=ca;if(r!==null)throw r}}function ws(r,a,u,h){ah=!1;var y=r.updateQueue;mr=!1;var b=y.firstBaseUpdate,E=y.lastBaseUpdate,L=y.shared.pending;if(L!==null){y.shared.pending=null;var B=L,Q=B.next;B.next=null,E===null?b=Q:E.next=Q,E=B;var ie=r.alternate;ie!==null&&(ie=ie.updateQueue,L=ie.lastBaseUpdate,L!==E&&(L===null?ie.firstBaseUpdate=Q:L.next=Q,ie.lastBaseUpdate=B))}if(b!==null){var se=y.baseState;E=0,ie=Q=B=null,L=b;do{var J=L.lane&-536870913,te=J!==L.lane;if(te?(Ie&J)===J:(h&J)===J){J!==0&&J===ua&&(ah=!0),ie!==null&&(ie=ie.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var ye=r,xe=L;J=a;var Ke=u;switch(xe.tag){case 1:if(ye=xe.payload,typeof ye=="function"){se=ye.call(Ke,se,J);break e}se=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=xe.payload,J=typeof ye=="function"?ye.call(Ke,se,J):ye,J==null)break e;se=m({},se,J);break e;case 2:mr=!0}}J=L.callback,J!==null&&(r.flags|=64,te&&(r.flags|=8192),te=y.callbacks,te===null?y.callbacks=[J]:te.push(J))}else te={lane:J,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ie===null?(Q=ie=te,B=se):ie=ie.next=te,E|=J;if(L=L.next,L===null){if(L=y.shared.pending,L===null)break;te=L,L=te.next,te.next=null,y.lastBaseUpdate=te,y.shared.pending=null}}while(!0);ie===null&&(B=se),y.baseState=B,y.firstBaseUpdate=Q,y.lastBaseUpdate=ie,b===null&&(y.shared.lanes=0),_r|=E,r.lanes=E,r.memoizedState=se}}function d0(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function f0(r,a){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)d0(u[r],a)}var ha=H(null),vu=H(0);function h0(r,a){r=Ui,I(vu,r),I(ha,a),Ui=r|a.baseLanes}function sh(){I(vu,Ui),I(ha,ha.current)}function lh(){Ui=vu.current,Y(ha),Y(vu)}var vn=H(null),In=null;function vr(r){var a=r.alternate;I(ft,ft.current&1),I(vn,r),In===null&&(a===null||ha.current!==null||a.memoizedState!==null)&&(In=r)}function uh(r){I(ft,ft.current),I(vn,r),In===null&&(In=r)}function p0(r){r.tag===22?(I(ft,ft.current),I(vn,r),In===null&&(In=r)):br()}function br(){I(ft,ft.current),I(vn,vn.current)}function bn(r){Y(vn),In===r&&(In=null),Y(ft)}var ft=H(0);function bu(r){for(var a=r;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||mp(u)||gp(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Mi=0,Ae=null,Ye=null,yt=null,xu=!1,pa=!1,lo=!1,Su=0,Es=0,ma=null,WL=0;function ut(){throw Error(i(321))}function ch(r,a){if(a===null)return!1;for(var u=0;u<a.length&&u<r.length;u++)if(!gn(r[u],a[u]))return!1;return!0}function dh(r,a,u,h,y,b){return Mi=b,Ae=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,P.H=r===null||r.memoizedState===null?Q0:kh,lo=!1,b=u(h,y),lo=!1,pa&&(b=g0(a,u,h,y)),m0(r),b}function m0(r){P.H=As;var a=Ye!==null&&Ye.next!==null;if(Mi=0,yt=Ye=Ae=null,xu=!1,Es=0,ma=null,a)throw Error(i(300));r===null||vt||(r=r.dependencies,r!==null&&du(r)&&(vt=!0))}function g0(r,a,u,h){Ae=r;var y=0;do{if(pa&&(ma=null),Es=0,pa=!1,25<=y)throw Error(i(301));if(y+=1,yt=Ye=null,r.updateQueue!=null){var b=r.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}P.H=Z0,b=a(u,h)}while(pa);return b}function YL(){var r=P.H,a=r.useState()[0];return a=typeof a.then=="function"?ks(a):a,r=r.useState()[0],(Ye!==null?Ye.memoizedState:null)!==r&&(Ae.flags|=1024),a}function fh(){var r=Su!==0;return Su=0,r}function hh(r,a,u){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~u}function ph(r){if(xu){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}xu=!1}Mi=0,yt=Ye=Ae=null,pa=!1,Es=Su=0,ma=null}function Kt(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Ae.memoizedState=yt=r:yt=yt.next=r,yt}function ht(){if(Ye===null){var r=Ae.alternate;r=r!==null?r.memoizedState:null}else r=Ye.next;var a=yt===null?Ae.memoizedState:yt.next;if(a!==null)yt=a,Ye=r;else{if(r===null)throw Ae.alternate===null?Error(i(467)):Error(i(310));Ye=r,r={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},yt===null?Ae.memoizedState=yt=r:yt=yt.next=r}return yt}function _u(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ks(r){var a=Es;return Es+=1,ma===null&&(ma=[]),r=a0(ma,r,a),a=Ae,(yt===null?a.memoizedState:yt.next)===null&&(a=a.alternate,P.H=a===null||a.memoizedState===null?Q0:kh),r}function Cu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return ks(r);if(r.$$typeof===k)return zt(r)}throw Error(i(438,String(r)))}function mh(r){var a=null,u=Ae.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var h=Ae.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(a={data:h.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=_u(),Ae.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(r),h=0;h<r;h++)u[h]=ee;return a.index++,u}function Ii(r,a){return typeof a=="function"?a(r):a}function wu(r){var a=ht();return gh(a,Ye,r)}function gh(r,a,u){var h=r.queue;if(h===null)throw Error(i(311));h.lastRenderedReducer=u;var y=r.baseQueue,b=h.pending;if(b!==null){if(y!==null){var E=y.next;y.next=b.next,b.next=E}a.baseQueue=y=b,h.pending=null}if(b=r.baseState,y===null)r.memoizedState=b;else{a=y.next;var L=E=null,B=null,Q=a,ie=!1;do{var se=Q.lane&-536870913;if(se!==Q.lane?(Ie&se)===se:(Mi&se)===se){var J=Q.revertLane;if(J===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),se===ua&&(ie=!0);else if((Mi&J)===J){Q=Q.next,J===ua&&(ie=!0);continue}else se={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(L=B=se,E=b):B=B.next=se,Ae.lanes|=J,_r|=J;se=Q.action,lo&&u(b,se),b=Q.hasEagerState?Q.eagerState:u(b,se)}else J={lane:se,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(L=B=J,E=b):B=B.next=J,Ae.lanes|=se,_r|=se;Q=Q.next}while(Q!==null&&Q!==a);if(B===null?E=b:B.next=L,!gn(b,r.memoizedState)&&(vt=!0,ie&&(u=ca,u!==null)))throw u;r.memoizedState=b,r.baseState=E,r.baseQueue=B,h.lastRenderedState=b}return y===null&&(h.lanes=0),[r.memoizedState,h.dispatch]}function yh(r){var a=ht(),u=a.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=r;var h=u.dispatch,y=u.pending,b=a.memoizedState;if(y!==null){u.pending=null;var E=y=y.next;do b=r(b,E.action),E=E.next;while(E!==y);gn(b,a.memoizedState)||(vt=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),u.lastRenderedState=b}return[b,h]}function y0(r,a,u){var h=Ae,y=ht(),b=ze;if(b){if(u===void 0)throw Error(i(407));u=u()}else u=a();var E=!gn((Ye||y).memoizedState,u);if(E&&(y.memoizedState=u,vt=!0),y=y.queue,xh(x0.bind(null,h,y,r),[r]),y.getSnapshot!==a||E||yt!==null&&yt.memoizedState.tag&1){if(h.flags|=2048,ga(9,{destroy:void 0},b0.bind(null,h,y,u,a),null),Je===null)throw Error(i(349));b||(Mi&127)!==0||v0(h,a,u)}return u}function v0(r,a,u){r.flags|=16384,r={getSnapshot:a,value:u},a=Ae.updateQueue,a===null?(a=_u(),Ae.updateQueue=a,a.stores=[r]):(u=a.stores,u===null?a.stores=[r]:u.push(r))}function b0(r,a,u,h){a.value=u,a.getSnapshot=h,S0(a)&&_0(r)}function x0(r,a,u){return u(function(){S0(a)&&_0(r)})}function S0(r){var a=r.getSnapshot;r=r.value;try{var u=a();return!gn(r,u)}catch{return!0}}function _0(r){var a=Jr(r,2);a!==null&&un(a,r,2)}function vh(r){var a=Kt();if(typeof r=="function"){var u=r;if(r=u(),lo){tn(!0);try{u()}finally{tn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:r},a}function C0(r,a,u,h){return r.baseState=u,gh(r,Ye,typeof h=="function"?h:Ii)}function XL(r,a,u,h,y){if(Tu(r))throw Error(i(485));if(r=a.action,r!==null){var b={payload:y,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){b.listeners.push(E)}};P.T!==null?u(!0):b.isTransition=!1,h(b),u=a.pending,u===null?(b.next=a.pending=b,w0(a,b)):(b.next=u.next,a.pending=u.next=b)}}function w0(r,a){var u=a.action,h=a.payload,y=r.state;if(a.isTransition){var b=P.T,E={};P.T=E;try{var L=u(y,h),B=P.S;B!==null&&B(E,L),E0(r,a,L)}catch(Q){bh(r,a,Q)}finally{b!==null&&E.types!==null&&(b.types=E.types),P.T=b}}else try{b=u(y,h),E0(r,a,b)}catch(Q){bh(r,a,Q)}}function E0(r,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){k0(r,a,h)},function(h){return bh(r,a,h)}):k0(r,a,u)}function k0(r,a,u){a.status="fulfilled",a.value=u,T0(a),r.state=u,a=r.pending,a!==null&&(u=a.next,u===a?r.pending=null:(u=u.next,a.next=u,w0(r,u)))}function bh(r,a,u){var h=r.pending;if(r.pending=null,h!==null){h=h.next;do a.status="rejected",a.reason=u,T0(a),a=a.next;while(a!==h)}r.action=null}function T0(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function A0(r,a){return a}function L0(r,a){if(ze){var u=Je.formState;if(u!==null){e:{var h=Ae;if(ze){if(ot){t:{for(var y=ot,b=Mn;y.nodeType!==8;){if(!b){y=null;break t}if(y=Nn(y.nextSibling),y===null){y=null;break t}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){ot=Nn(y.nextSibling),h=y.data==="F!";break e}}hr(h)}h=!1}h&&(a=u[0])}}return u=Kt(),u.memoizedState=u.baseState=a,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:A0,lastRenderedState:a},u.queue=h,u=Y0.bind(null,Ae,h),h.dispatch=u,h=vh(!1),b=Eh.bind(null,Ae,!1,h.queue),h=Kt(),y={state:a,dispatch:null,action:r,pending:null},h.queue=y,u=XL.bind(null,Ae,y,b,u),y.dispatch=u,h.memoizedState=r,[a,u,!1]}function R0(r){var a=ht();return O0(a,Ye,r)}function O0(r,a,u){if(a=gh(r,a,A0)[0],r=wu(Ii)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var h=ks(a)}catch(E){throw E===da?pu:E}else h=a;a=ht();var y=a.queue,b=y.dispatch;return u!==a.memoizedState&&(Ae.flags|=2048,ga(9,{destroy:void 0},KL.bind(null,y,u),null)),[h,b,r]}function KL(r,a){r.action=a}function D0(r){var a=ht(),u=Ye;if(u!==null)return O0(a,u,r);ht(),a=a.memoizedState,u=ht();var h=u.queue.dispatch;return u.memoizedState=r,[a,h,!1]}function ga(r,a,u,h){return r={tag:r,create:u,deps:h,inst:a,next:null},a=Ae.updateQueue,a===null&&(a=_u(),Ae.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=r.next=r:(h=u.next,u.next=r,r.next=h,a.lastEffect=r),r}function M0(){return ht().memoizedState}function Eu(r,a,u,h){var y=Kt();Ae.flags|=r,y.memoizedState=ga(1|a,{destroy:void 0},u,h===void 0?null:h)}function ku(r,a,u,h){var y=ht();h=h===void 0?null:h;var b=y.memoizedState.inst;Ye!==null&&h!==null&&ch(h,Ye.memoizedState.deps)?y.memoizedState=ga(a,b,u,h):(Ae.flags|=r,y.memoizedState=ga(1|a,b,u,h))}function I0(r,a){Eu(8390656,8,r,a)}function xh(r,a){ku(2048,8,r,a)}function QL(r){Ae.flags|=4;var a=Ae.updateQueue;if(a===null)a=_u(),Ae.updateQueue=a,a.events=[r];else{var u=a.events;u===null?a.events=[r]:u.push(r)}}function N0(r){var a=ht().memoizedState;return QL({ref:a,nextImpl:r}),function(){if((Fe&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function z0(r,a){return ku(4,2,r,a)}function P0(r,a){return ku(4,4,r,a)}function H0(r,a){if(typeof a=="function"){r=r();var u=a(r);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function j0(r,a,u){u=u!=null?u.concat([r]):null,ku(4,4,H0.bind(null,a,r),u)}function Sh(){}function B0(r,a){var u=ht();a=a===void 0?null:a;var h=u.memoizedState;return a!==null&&ch(a,h[1])?h[0]:(u.memoizedState=[r,a],r)}function U0(r,a){var u=ht();a=a===void 0?null:a;var h=u.memoizedState;if(a!==null&&ch(a,h[1]))return h[0];if(h=r(),lo){tn(!0);try{r()}finally{tn(!1)}}return u.memoizedState=[h,a],h}function _h(r,a,u){return u===void 0||(Mi&1073741824)!==0&&(Ie&261930)===0?r.memoizedState=a:(r.memoizedState=u,r=Vb(),Ae.lanes|=r,_r|=r,u)}function V0(r,a,u,h){return gn(u,a)?u:ha.current!==null?(r=_h(r,u,h),gn(r,a)||(vt=!0),r):(Mi&42)===0||(Mi&1073741824)!==0&&(Ie&261930)===0?(vt=!0,r.memoizedState=u):(r=Vb(),Ae.lanes|=r,_r|=r,a)}function F0(r,a,u,h,y){var b=$.p;$.p=b!==0&&8>b?b:8;var E=P.T,L={};P.T=L,Eh(r,!1,a,u);try{var B=y(),Q=P.S;if(Q!==null&&Q(L,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var ie=qL(B,h);Ts(r,a,ie,_n(r))}else Ts(r,a,h,_n(r))}catch(se){Ts(r,a,{then:function(){},status:"rejected",reason:se},_n())}finally{$.p=b,E!==null&&L.types!==null&&(E.types=L.types),P.T=E}}function ZL(){}function Ch(r,a,u,h){if(r.tag!==5)throw Error(i(476));var y=G0(r).queue;F0(r,y,a,ne,u===null?ZL:function(){return $0(r),u(h)})}function G0(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:ne},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:u},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function $0(r){var a=G0(r);a.next===null&&(a=r.alternate.memoizedState),Ts(r,a.next.queue,{},_n())}function wh(){return zt(Gs)}function q0(){return ht().memoizedState}function W0(){return ht().memoizedState}function JL(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var u=_n();r=gr(u);var h=yr(a,r,u);h!==null&&(un(h,a,u),_s(h,a,u)),a={cache:Jf()},r.payload=a;return}a=a.return}}function eR(r,a,u){var h=_n();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Tu(r)?X0(a,u):(u=Vf(r,a,u,h),u!==null&&(un(u,r,h),K0(u,a,h)))}function Y0(r,a,u){var h=_n();Ts(r,a,u,h)}function Ts(r,a,u,h){var y={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Tu(r))X0(a,y);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var E=a.lastRenderedState,L=b(E,u);if(y.hasEagerState=!0,y.eagerState=L,gn(L,E))return su(r,a,y,0),Je===null&&au(),!1}catch{}if(u=Vf(r,a,y,h),u!==null)return un(u,r,h),K0(u,a,h),!0}return!1}function Eh(r,a,u,h){if(h={lane:2,revertLane:ip(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Tu(r)){if(a)throw Error(i(479))}else a=Vf(r,u,h,2),a!==null&&un(a,r,2)}function Tu(r){var a=r.alternate;return r===Ae||a!==null&&a===Ae}function X0(r,a){pa=xu=!0;var u=r.pending;u===null?a.next=a:(a.next=u.next,u.next=a),r.pending=a}function K0(r,a,u){if((u&4194048)!==0){var h=a.lanes;h&=r.pendingLanes,u|=h,a.lanes=u,tv(r,u)}}var As={readContext:zt,use:Cu,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};As.useEffectEvent=ut;var Q0={readContext:zt,use:Cu,useCallback:function(r,a){return Kt().memoizedState=[r,a===void 0?null:a],r},useContext:zt,useEffect:I0,useImperativeHandle:function(r,a,u){u=u!=null?u.concat([r]):null,Eu(4194308,4,H0.bind(null,a,r),u)},useLayoutEffect:function(r,a){return Eu(4194308,4,r,a)},useInsertionEffect:function(r,a){Eu(4,2,r,a)},useMemo:function(r,a){var u=Kt();a=a===void 0?null:a;var h=r();if(lo){tn(!0);try{r()}finally{tn(!1)}}return u.memoizedState=[h,a],h},useReducer:function(r,a,u){var h=Kt();if(u!==void 0){var y=u(a);if(lo){tn(!0);try{u(a)}finally{tn(!1)}}}else y=a;return h.memoizedState=h.baseState=y,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:y},h.queue=r,r=r.dispatch=eR.bind(null,Ae,r),[h.memoizedState,r]},useRef:function(r){var a=Kt();return r={current:r},a.memoizedState=r},useState:function(r){r=vh(r);var a=r.queue,u=Y0.bind(null,Ae,a);return a.dispatch=u,[r.memoizedState,u]},useDebugValue:Sh,useDeferredValue:function(r,a){var u=Kt();return _h(u,r,a)},useTransition:function(){var r=vh(!1);return r=F0.bind(null,Ae,r.queue,!0,!1),Kt().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,u){var h=Ae,y=Kt();if(ze){if(u===void 0)throw Error(i(407));u=u()}else{if(u=a(),Je===null)throw Error(i(349));(Ie&127)!==0||v0(h,a,u)}y.memoizedState=u;var b={value:u,getSnapshot:a};return y.queue=b,I0(x0.bind(null,h,b,r),[r]),h.flags|=2048,ga(9,{destroy:void 0},b0.bind(null,h,b,u,a),null),u},useId:function(){var r=Kt(),a=Je.identifierPrefix;if(ze){var u=ri,h=ii;u=(h&~(1<<32-Ze(h)-1)).toString(32)+u,a="_"+a+"R_"+u,u=Su++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=WL++,a="_"+a+"r_"+u.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:wh,useFormState:L0,useActionState:L0,useOptimistic:function(r){var a=Kt();a.memoizedState=a.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=Eh.bind(null,Ae,!0,u),u.dispatch=a,[r,a]},useMemoCache:mh,useCacheRefresh:function(){return Kt().memoizedState=JL.bind(null,Ae)},useEffectEvent:function(r){var a=Kt(),u={impl:r};return a.memoizedState=u,function(){if((Fe&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},kh={readContext:zt,use:Cu,useCallback:B0,useContext:zt,useEffect:xh,useImperativeHandle:j0,useInsertionEffect:z0,useLayoutEffect:P0,useMemo:U0,useReducer:wu,useRef:M0,useState:function(){return wu(Ii)},useDebugValue:Sh,useDeferredValue:function(r,a){var u=ht();return V0(u,Ye.memoizedState,r,a)},useTransition:function(){var r=wu(Ii)[0],a=ht().memoizedState;return[typeof r=="boolean"?r:ks(r),a]},useSyncExternalStore:y0,useId:q0,useHostTransitionStatus:wh,useFormState:R0,useActionState:R0,useOptimistic:function(r,a){var u=ht();return C0(u,Ye,r,a)},useMemoCache:mh,useCacheRefresh:W0};kh.useEffectEvent=N0;var Z0={readContext:zt,use:Cu,useCallback:B0,useContext:zt,useEffect:xh,useImperativeHandle:j0,useInsertionEffect:z0,useLayoutEffect:P0,useMemo:U0,useReducer:yh,useRef:M0,useState:function(){return yh(Ii)},useDebugValue:Sh,useDeferredValue:function(r,a){var u=ht();return Ye===null?_h(u,r,a):V0(u,Ye.memoizedState,r,a)},useTransition:function(){var r=yh(Ii)[0],a=ht().memoizedState;return[typeof r=="boolean"?r:ks(r),a]},useSyncExternalStore:y0,useId:q0,useHostTransitionStatus:wh,useFormState:D0,useActionState:D0,useOptimistic:function(r,a){var u=ht();return Ye!==null?C0(u,Ye,r,a):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:mh,useCacheRefresh:W0};Z0.useEffectEvent=N0;function Th(r,a,u,h){a=r.memoizedState,u=u(h,a),u=u==null?a:m({},a,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Ah={enqueueSetState:function(r,a,u){r=r._reactInternals;var h=_n(),y=gr(h);y.payload=a,u!=null&&(y.callback=u),a=yr(r,y,h),a!==null&&(un(a,r,h),_s(a,r,h))},enqueueReplaceState:function(r,a,u){r=r._reactInternals;var h=_n(),y=gr(h);y.tag=1,y.payload=a,u!=null&&(y.callback=u),a=yr(r,y,h),a!==null&&(un(a,r,h),_s(a,r,h))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var u=_n(),h=gr(u);h.tag=2,a!=null&&(h.callback=a),a=yr(r,h,u),a!==null&&(un(a,r,u),_s(a,r,u))}};function J0(r,a,u,h,y,b,E){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(h,b,E):a.prototype&&a.prototype.isPureReactComponent?!ps(u,h)||!ps(y,b):!0}function eb(r,a,u,h){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,h),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,h),a.state!==r&&Ah.enqueueReplaceState(a,a.state,null)}function uo(r,a){var u=a;if("ref"in a){u={};for(var h in a)h!=="ref"&&(u[h]=a[h])}if(r=r.defaultProps){u===a&&(u=m({},u));for(var y in r)u[y]===void 0&&(u[y]=r[y])}return u}function tb(r){ou(r)}function nb(r){console.error(r)}function ib(r){ou(r)}function Au(r,a){try{var u=r.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(h){setTimeout(function(){throw h})}}function rb(r,a,u){try{var h=r.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Lh(r,a,u){return u=gr(u),u.tag=3,u.payload={element:null},u.callback=function(){Au(r,a)},u}function ob(r){return r=gr(r),r.tag=3,r}function ab(r,a,u,h){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var b=h.value;r.payload=function(){return y(b)},r.callback=function(){rb(a,u,h)}}var E=u.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(r.callback=function(){rb(a,u,h),typeof y!="function"&&(Cr===null?Cr=new Set([this]):Cr.add(this));var L=h.stack;this.componentDidCatch(h.value,{componentStack:L!==null?L:""})})}function tR(r,a,u,h,y){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(a=u.alternate,a!==null&&la(a,u,y,!0),u=vn.current,u!==null){switch(u.tag){case 31:case 13:return In===null?Bu():u.alternate===null&&ct===0&&(ct=3),u.flags&=-257,u.flags|=65536,u.lanes=y,h===mu?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([h]):a.add(h),ep(r,h,y)),!1;case 22:return u.flags|=65536,h===mu?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([h]):u.add(h)),ep(r,h,y)),!1}throw Error(i(435,u.tag))}return ep(r,h,y),Bu(),!1}if(ze)return a=vn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,h!==Yf&&(r=Error(i(422),{cause:h}),ys(Rn(r,u)))):(h!==Yf&&(a=Error(i(423),{cause:h}),ys(Rn(a,u))),r=r.current.alternate,r.flags|=65536,y&=-y,r.lanes|=y,h=Rn(h,u),y=Lh(r.stateNode,h,y),oh(r,y),ct!==4&&(ct=2)),!1;var b=Error(i(520),{cause:h});if(b=Rn(b,u),zs===null?zs=[b]:zs.push(b),ct!==4&&(ct=2),a===null)return!0;h=Rn(h,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,r=y&-y,u.lanes|=r,r=Lh(u.stateNode,h,r),oh(u,r),!1;case 1:if(a=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Cr===null||!Cr.has(b))))return u.flags|=65536,y&=-y,u.lanes|=y,y=ob(y),ab(y,r,u,h),oh(u,y),!1}u=u.return}while(u!==null);return!1}var Rh=Error(i(461)),vt=!1;function Pt(r,a,u,h){a.child=r===null?c0(a,null,u,h):so(a,r.child,u,h)}function sb(r,a,u,h,y){u=u.render;var b=a.ref;if("ref"in h){var E={};for(var L in h)L!=="ref"&&(E[L]=h[L])}else E=h;return io(a),h=dh(r,a,u,E,b,y),L=fh(),r!==null&&!vt?(hh(r,a,y),Ni(r,a,y)):(ze&&L&&qf(a),a.flags|=1,Pt(r,a,h,y),a.child)}function lb(r,a,u,h,y){if(r===null){var b=u.type;return typeof b=="function"&&!Ff(b)&&b.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=b,ub(r,a,b,h,y)):(r=uu(u.type,null,h,a,a.mode,y),r.ref=a.ref,r.return=a,a.child=r)}if(b=r.child,!Hh(r,y)){var E=b.memoizedProps;if(u=u.compare,u=u!==null?u:ps,u(E,h)&&r.ref===a.ref)return Ni(r,a,y)}return a.flags|=1,r=Li(b,h),r.ref=a.ref,r.return=a,a.child=r}function ub(r,a,u,h,y){if(r!==null){var b=r.memoizedProps;if(ps(b,h)&&r.ref===a.ref)if(vt=!1,a.pendingProps=h=b,Hh(r,y))(r.flags&131072)!==0&&(vt=!0);else return a.lanes=r.lanes,Ni(r,a,y)}return Oh(r,a,u,h,y)}function cb(r,a,u,h){var y=h.children,b=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((a.flags&128)!==0){if(b=b!==null?b.baseLanes|u:u,r!==null){for(h=a.child=r.child,y=0;h!==null;)y=y|h.lanes|h.childLanes,h=h.sibling;h=y&~b}else h=0,a.child=null;return db(r,a,b,u,h)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&hu(a,b!==null?b.cachePool:null),b!==null?h0(a,b):sh(),p0(a);else return h=a.lanes=536870912,db(r,a,b!==null?b.baseLanes|u:u,u,h)}else b!==null?(hu(a,b.cachePool),h0(a,b),br(),a.memoizedState=null):(r!==null&&hu(a,null),sh(),br());return Pt(r,a,y,u),a.child}function Ls(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function db(r,a,u,h,y){var b=th();return b=b===null?null:{parent:gt._currentValue,pool:b},a.memoizedState={baseLanes:u,cachePool:b},r!==null&&hu(a,null),sh(),p0(a),r!==null&&la(r,a,h,!0),a.childLanes=y,null}function Lu(r,a){return a=Ou({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function fb(r,a,u){return so(a,r.child,null,u),r=Lu(a,a.pendingProps),r.flags|=2,bn(a),a.memoizedState=null,r}function nR(r,a,u){var h=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(ze){if(h.mode==="hidden")return r=Lu(a,h),a.lanes=536870912,Ls(null,r);if(uh(a),(r=ot)?(r=wx(r,Mn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:dr!==null?{id:ii,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},u=Xv(r),u.return=a,a.child=u,Nt=a,ot=null)):r=null,r===null)throw hr(a);return a.lanes=536870912,null}return Lu(a,h)}var b=r.memoizedState;if(b!==null){var E=b.dehydrated;if(uh(a),y)if(a.flags&256)a.flags&=-257,a=fb(r,a,u);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(vt||la(r,a,u,!1),y=(u&r.childLanes)!==0,vt||y){if(h=Je,h!==null&&(E=nv(h,u),E!==0&&E!==b.retryLane))throw b.retryLane=E,Jr(r,E),un(h,r,E),Rh;Bu(),a=fb(r,a,u)}else r=b.treeContext,ot=Nn(E.nextSibling),Nt=a,ze=!0,fr=null,Mn=!1,r!==null&&Zv(a,r),a=Lu(a,h),a.flags|=4096;return a}return r=Li(r.child,{mode:h.mode,children:h.children}),r.ref=a.ref,a.child=r,r.return=a,r}function Ru(r,a){var u=a.ref;if(u===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(r===null||r.ref!==u)&&(a.flags|=4194816)}}function Oh(r,a,u,h,y){return io(a),u=dh(r,a,u,h,void 0,y),h=fh(),r!==null&&!vt?(hh(r,a,y),Ni(r,a,y)):(ze&&h&&qf(a),a.flags|=1,Pt(r,a,u,y),a.child)}function hb(r,a,u,h,y,b){return io(a),a.updateQueue=null,u=g0(a,h,u,y),m0(r),h=fh(),r!==null&&!vt?(hh(r,a,b),Ni(r,a,b)):(ze&&h&&qf(a),a.flags|=1,Pt(r,a,u,b),a.child)}function pb(r,a,u,h,y){if(io(a),a.stateNode===null){var b=ra,E=u.contextType;typeof E=="object"&&E!==null&&(b=zt(E)),b=new u(h,b),a.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Ah,a.stateNode=b,b._reactInternals=a,b=a.stateNode,b.props=h,b.state=a.memoizedState,b.refs={},ih(a),E=u.contextType,b.context=typeof E=="object"&&E!==null?zt(E):ra,b.state=a.memoizedState,E=u.getDerivedStateFromProps,typeof E=="function"&&(Th(a,u,E,h),b.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(E=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),E!==b.state&&Ah.enqueueReplaceState(b,b.state,null),ws(a,h,b,y),Cs(),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4194308),h=!0}else if(r===null){b=a.stateNode;var L=a.memoizedProps,B=uo(u,L);b.props=B;var Q=b.context,ie=u.contextType;E=ra,typeof ie=="object"&&ie!==null&&(E=zt(ie));var se=u.getDerivedStateFromProps;ie=typeof se=="function"||typeof b.getSnapshotBeforeUpdate=="function",L=a.pendingProps!==L,ie||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(L||Q!==E)&&eb(a,b,h,E),mr=!1;var J=a.memoizedState;b.state=J,ws(a,h,b,y),Cs(),Q=a.memoizedState,L||J!==Q||mr?(typeof se=="function"&&(Th(a,u,se,h),Q=a.memoizedState),(B=mr||J0(a,u,B,h,J,Q,E))?(ie||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(a.flags|=4194308)):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=h,a.memoizedState=Q),b.props=h,b.state=Q,b.context=E,h=B):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),h=!1)}else{b=a.stateNode,rh(r,a),E=a.memoizedProps,ie=uo(u,E),b.props=ie,se=a.pendingProps,J=b.context,Q=u.contextType,B=ra,typeof Q=="object"&&Q!==null&&(B=zt(Q)),L=u.getDerivedStateFromProps,(Q=typeof L=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==se||J!==B)&&eb(a,b,h,B),mr=!1,J=a.memoizedState,b.state=J,ws(a,h,b,y),Cs();var te=a.memoizedState;E!==se||J!==te||mr||r!==null&&r.dependencies!==null&&du(r.dependencies)?(typeof L=="function"&&(Th(a,u,L,h),te=a.memoizedState),(ie=mr||J0(a,u,ie,h,J,te,B)||r!==null&&r.dependencies!==null&&du(r.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,te,B),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,te,B)),typeof b.componentDidUpdate=="function"&&(a.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(a.flags|=1024),a.memoizedProps=h,a.memoizedState=te),b.props=h,b.state=te,b.context=B,h=ie):(typeof b.componentDidUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(a.flags|=1024),h=!1)}return b=h,Ru(r,a),h=(a.flags&128)!==0,b||h?(b=a.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:b.render(),a.flags|=1,r!==null&&h?(a.child=so(a,r.child,null,y),a.child=so(a,null,u,y)):Pt(r,a,u,y),a.memoizedState=b.state,r=a.child):r=Ni(r,a,y),r}function mb(r,a,u,h){return to(),a.flags|=256,Pt(r,a,u,h),a.child}var Dh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mh(r){return{baseLanes:r,cachePool:r0()}}function Ih(r,a,u){return r=r!==null?r.childLanes&~u:0,a&&(r|=Sn),r}function gb(r,a,u){var h=a.pendingProps,y=!1,b=(a.flags&128)!==0,E;if((E=b)||(E=r!==null&&r.memoizedState===null?!1:(ft.current&2)!==0),E&&(y=!0,a.flags&=-129),E=(a.flags&32)!==0,a.flags&=-33,r===null){if(ze){if(y?vr(a):br(),(r=ot)?(r=wx(r,Mn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:dr!==null?{id:ii,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},u=Xv(r),u.return=a,a.child=u,Nt=a,ot=null)):r=null,r===null)throw hr(a);return gp(r)?a.lanes=32:a.lanes=536870912,null}var L=h.children;return h=h.fallback,y?(br(),y=a.mode,L=Ou({mode:"hidden",children:L},y),h=eo(h,y,u,null),L.return=a,h.return=a,L.sibling=h,a.child=L,h=a.child,h.memoizedState=Mh(u),h.childLanes=Ih(r,E,u),a.memoizedState=Dh,Ls(null,h)):(vr(a),Nh(a,L))}var B=r.memoizedState;if(B!==null&&(L=B.dehydrated,L!==null)){if(b)a.flags&256?(vr(a),a.flags&=-257,a=zh(r,a,u)):a.memoizedState!==null?(br(),a.child=r.child,a.flags|=128,a=null):(br(),L=h.fallback,y=a.mode,h=Ou({mode:"visible",children:h.children},y),L=eo(L,y,u,null),L.flags|=2,h.return=a,L.return=a,h.sibling=L,a.child=h,so(a,r.child,null,u),h=a.child,h.memoizedState=Mh(u),h.childLanes=Ih(r,E,u),a.memoizedState=Dh,a=Ls(null,h));else if(vr(a),gp(L)){if(E=L.nextSibling&&L.nextSibling.dataset,E)var Q=E.dgst;E=Q,h=Error(i(419)),h.stack="",h.digest=E,ys({value:h,source:null,stack:null}),a=zh(r,a,u)}else if(vt||la(r,a,u,!1),E=(u&r.childLanes)!==0,vt||E){if(E=Je,E!==null&&(h=nv(E,u),h!==0&&h!==B.retryLane))throw B.retryLane=h,Jr(r,h),un(E,r,h),Rh;mp(L)||Bu(),a=zh(r,a,u)}else mp(L)?(a.flags|=192,a.child=r.child,a=null):(r=B.treeContext,ot=Nn(L.nextSibling),Nt=a,ze=!0,fr=null,Mn=!1,r!==null&&Zv(a,r),a=Nh(a,h.children),a.flags|=4096);return a}return y?(br(),L=h.fallback,y=a.mode,B=r.child,Q=B.sibling,h=Li(B,{mode:"hidden",children:h.children}),h.subtreeFlags=B.subtreeFlags&65011712,Q!==null?L=Li(Q,L):(L=eo(L,y,u,null),L.flags|=2),L.return=a,h.return=a,h.sibling=L,a.child=h,Ls(null,h),h=a.child,L=r.child.memoizedState,L===null?L=Mh(u):(y=L.cachePool,y!==null?(B=gt._currentValue,y=y.parent!==B?{parent:B,pool:B}:y):y=r0(),L={baseLanes:L.baseLanes|u,cachePool:y}),h.memoizedState=L,h.childLanes=Ih(r,E,u),a.memoizedState=Dh,Ls(r.child,h)):(vr(a),u=r.child,r=u.sibling,u=Li(u,{mode:"visible",children:h.children}),u.return=a,u.sibling=null,r!==null&&(E=a.deletions,E===null?(a.deletions=[r],a.flags|=16):E.push(r)),a.child=u,a.memoizedState=null,u)}function Nh(r,a){return a=Ou({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function Ou(r,a){return r=yn(22,r,null,a),r.lanes=0,r}function zh(r,a,u){return so(a,r.child,null,u),r=Nh(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function yb(r,a,u){r.lanes|=a;var h=r.alternate;h!==null&&(h.lanes|=a),Qf(r.return,a,u)}function Ph(r,a,u,h,y,b){var E=r.memoizedState;E===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:y,treeForkCount:b}:(E.isBackwards=a,E.rendering=null,E.renderingStartTime=0,E.last=h,E.tail=u,E.tailMode=y,E.treeForkCount=b)}function vb(r,a,u){var h=a.pendingProps,y=h.revealOrder,b=h.tail;h=h.children;var E=ft.current,L=(E&2)!==0;if(L?(E=E&1|2,a.flags|=128):E&=1,I(ft,E),Pt(r,a,h,u),h=ze?gs:0,!L&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&yb(r,u,a);else if(r.tag===19)yb(r,u,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(y){case"forwards":for(u=a.child,y=null;u!==null;)r=u.alternate,r!==null&&bu(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=a.child,a.child=null):(y=u.sibling,u.sibling=null),Ph(a,!1,y,u,b,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=a.child,a.child=null;y!==null;){if(r=y.alternate,r!==null&&bu(r)===null){a.child=y;break}r=y.sibling,y.sibling=u,u=y,y=r}Ph(a,!0,u,null,b,h);break;case"together":Ph(a,!1,null,null,void 0,h);break;default:a.memoizedState=null}return a.child}function Ni(r,a,u){if(r!==null&&(a.dependencies=r.dependencies),_r|=a.lanes,(u&a.childLanes)===0)if(r!==null){if(la(r,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,u=Li(r,r.pendingProps),a.child=u,u.return=a;r.sibling!==null;)r=r.sibling,u=u.sibling=Li(r,r.pendingProps),u.return=a;u.sibling=null}return a.child}function Hh(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&du(r)))}function iR(r,a,u){switch(a.tag){case 3:_e(a,a.stateNode.containerInfo),pr(a,gt,r.memoizedState.cache),to();break;case 27:case 5:Pe(a);break;case 4:_e(a,a.stateNode.containerInfo);break;case 10:pr(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,uh(a),null;break;case 13:var h=a.memoizedState;if(h!==null)return h.dehydrated!==null?(vr(a),a.flags|=128,null):(u&a.child.childLanes)!==0?gb(r,a,u):(vr(a),r=Ni(r,a,u),r!==null?r.sibling:null);vr(a);break;case 19:var y=(r.flags&128)!==0;if(h=(u&a.childLanes)!==0,h||(la(r,a,u,!1),h=(u&a.childLanes)!==0),y){if(h)return vb(r,a,u);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),I(ft,ft.current),h)break;return null;case 22:return a.lanes=0,cb(r,a,u,a.pendingProps);case 24:pr(a,gt,r.memoizedState.cache)}return Ni(r,a,u)}function bb(r,a,u){if(r!==null)if(r.memoizedProps!==a.pendingProps)vt=!0;else{if(!Hh(r,u)&&(a.flags&128)===0)return vt=!1,iR(r,a,u);vt=(r.flags&131072)!==0}else vt=!1,ze&&(a.flags&1048576)!==0&&Qv(a,gs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var h=a.pendingProps;if(r=oo(a.elementType),a.type=r,typeof r=="function")Ff(r)?(h=uo(r,h),a.tag=1,a=pb(null,a,r,h,u)):(a.tag=0,a=Oh(null,a,r,h,u));else{if(r!=null){var y=r.$$typeof;if(y===D){a.tag=11,a=sb(null,a,r,h,u);break e}else if(y===z){a.tag=14,a=lb(null,a,r,h,u);break e}}throw a=X(r)||r,Error(i(306,a,""))}}return a;case 0:return Oh(r,a,a.type,a.pendingProps,u);case 1:return h=a.type,y=uo(h,a.pendingProps),pb(r,a,h,y,u);case 3:e:{if(_e(a,a.stateNode.containerInfo),r===null)throw Error(i(387));h=a.pendingProps;var b=a.memoizedState;y=b.element,rh(r,a),ws(a,h,null,u);var E=a.memoizedState;if(h=E.cache,pr(a,gt,h),h!==b.cache&&Zf(a,[gt],u,!0),Cs(),h=E.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:E.cache},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){a=mb(r,a,h,u);break e}else if(h!==y){y=Rn(Error(i(424)),a),ys(y),a=mb(r,a,h,u);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,ot=Nn(r.firstChild),Nt=a,ze=!0,fr=null,Mn=!0,u=c0(a,null,h,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(to(),h===y){a=Ni(r,a,u);break e}Pt(r,a,h,u)}a=a.child}return a;case 26:return Ru(r,a),r===null?(u=Rx(a.type,null,a.pendingProps,null))?a.memoizedState=u:ze||(u=a.type,r=a.pendingProps,h=Wu(re.current).createElement(u),h[It]=a,h[nn]=r,Ht(h,u,r),At(h),a.stateNode=h):a.memoizedState=Rx(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Pe(a),r===null&&ze&&(h=a.stateNode=Tx(a.type,a.pendingProps,re.current),Nt=a,Mn=!0,y=ot,Tr(a.type)?(yp=y,ot=Nn(h.firstChild)):ot=y),Pt(r,a,a.pendingProps.children,u),Ru(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&ze&&((y=h=ot)&&(h=MR(h,a.type,a.pendingProps,Mn),h!==null?(a.stateNode=h,Nt=a,ot=Nn(h.firstChild),Mn=!1,y=!0):y=!1),y||hr(a)),Pe(a),y=a.type,b=a.pendingProps,E=r!==null?r.memoizedProps:null,h=b.children,fp(y,b)?h=null:E!==null&&fp(y,E)&&(a.flags|=32),a.memoizedState!==null&&(y=dh(r,a,YL,null,null,u),Gs._currentValue=y),Ru(r,a),Pt(r,a,h,u),a.child;case 6:return r===null&&ze&&((r=u=ot)&&(u=IR(u,a.pendingProps,Mn),u!==null?(a.stateNode=u,Nt=a,ot=null,r=!0):r=!1),r||hr(a)),null;case 13:return gb(r,a,u);case 4:return _e(a,a.stateNode.containerInfo),h=a.pendingProps,r===null?a.child=so(a,null,h,u):Pt(r,a,h,u),a.child;case 11:return sb(r,a,a.type,a.pendingProps,u);case 7:return Pt(r,a,a.pendingProps,u),a.child;case 8:return Pt(r,a,a.pendingProps.children,u),a.child;case 12:return Pt(r,a,a.pendingProps.children,u),a.child;case 10:return h=a.pendingProps,pr(a,a.type,h.value),Pt(r,a,h.children,u),a.child;case 9:return y=a.type._context,h=a.pendingProps.children,io(a),y=zt(y),h=h(y),a.flags|=1,Pt(r,a,h,u),a.child;case 14:return lb(r,a,a.type,a.pendingProps,u);case 15:return ub(r,a,a.type,a.pendingProps,u);case 19:return vb(r,a,u);case 31:return nR(r,a,u);case 22:return cb(r,a,u,a.pendingProps);case 24:return io(a),h=zt(gt),r===null?(y=th(),y===null&&(y=Je,b=Jf(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=u),y=b),a.memoizedState={parent:h,cache:y},ih(a),pr(a,gt,y)):((r.lanes&u)!==0&&(rh(r,a),ws(a,null,null,u),Cs()),y=r.memoizedState,b=a.memoizedState,y.parent!==h?(y={parent:h,cache:h},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),pr(a,gt,h)):(h=b.cache,pr(a,gt,h),h!==y.cache&&Zf(a,[gt],u,!0))),Pt(r,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function zi(r){r.flags|=4}function jh(r,a,u,h,y){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(y&335544128)===y)if(r.stateNode.complete)r.flags|=8192;else if(qb())r.flags|=8192;else throw ao=mu,nh}else r.flags&=-16777217}function xb(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Nx(a))if(qb())r.flags|=8192;else throw ao=mu,nh}function Du(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?Jy():536870912,r.lanes|=a,xa|=a)}function Rs(r,a){if(!ze)switch(r.tailMode){case"hidden":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:h.sibling=null}}function at(r){var a=r.alternate!==null&&r.alternate.child===r.child,u=0,h=0;if(a)for(var y=r.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags&65011712,h|=y.flags&65011712,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags,h|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=h,r.childLanes=u,a}function rR(r,a,u){var h=a.pendingProps;switch(Wf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(a),null;case 1:return at(a),null;case 3:return u=a.stateNode,h=null,r!==null&&(h=r.memoizedState.cache),a.memoizedState.cache!==h&&(a.flags|=2048),Di(gt),pe(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(sa(a)?zi(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Xf())),at(a),null;case 26:var y=a.type,b=a.memoizedState;return r===null?(zi(a),b!==null?(at(a),xb(a,b)):(at(a),jh(a,y,null,h,u))):b?b!==r.memoizedState?(zi(a),at(a),xb(a,b)):(at(a),a.flags&=-16777217):(r=r.memoizedProps,r!==h&&zi(a),at(a),jh(a,y,r,h,u)),null;case 27:if(je(a),u=re.current,y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==h&&zi(a);else{if(!h){if(a.stateNode===null)throw Error(i(166));return at(a),null}r=le.current,sa(a)?Jv(a):(r=Tx(y,h,u),a.stateNode=r,zi(a))}return at(a),null;case 5:if(je(a),y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==h&&zi(a);else{if(!h){if(a.stateNode===null)throw Error(i(166));return at(a),null}if(b=le.current,sa(a))Jv(a);else{var E=Wu(re.current);switch(b){case 1:b=E.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=E.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":b=E.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof h.is=="string"?E.createElement("select",{is:h.is}):E.createElement("select"),h.multiple?b.multiple=!0:h.size&&(b.size=h.size);break;default:b=typeof h.is=="string"?E.createElement(y,{is:h.is}):E.createElement(y)}}b[It]=a,b[nn]=h;e:for(E=a.child;E!==null;){if(E.tag===5||E.tag===6)b.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===a)break e;for(;E.sibling===null;){if(E.return===null||E.return===a)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}a.stateNode=b;e:switch(Ht(b,y,h),y){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&zi(a)}}return at(a),jh(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,u),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==h&&zi(a);else{if(typeof h!="string"&&a.stateNode===null)throw Error(i(166));if(r=re.current,sa(a)){if(r=a.stateNode,u=a.memoizedProps,h=null,y=Nt,y!==null)switch(y.tag){case 27:case 5:h=y.memoizedProps}r[It]=a,r=!!(r.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||gx(r.nodeValue,u)),r||hr(a,!0)}else r=Wu(r).createTextNode(h),r[It]=a,a.stateNode=r}return at(a),null;case 31:if(u=a.memoizedState,r===null||r.memoizedState!==null){if(h=sa(a),u!==null){if(r===null){if(!h)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[It]=a}else to(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;at(a),r=!1}else u=Xf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return a.flags&256?(bn(a),a):(bn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return at(a),null;case 13:if(h=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(y=sa(a),h!==null&&h.dehydrated!==null){if(r===null){if(!y)throw Error(i(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(i(317));y[It]=a}else to(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;at(a),y=!1}else y=Xf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(bn(a),a):(bn(a),null)}return bn(a),(a.flags&128)!==0?(a.lanes=u,a):(u=h!==null,r=r!==null&&r.memoizedState!==null,u&&(h=a.child,y=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(y=h.alternate.memoizedState.cachePool.pool),b=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==y&&(h.flags|=2048)),u!==r&&u&&(a.child.flags|=8192),Du(a,a.updateQueue),at(a),null);case 4:return pe(),r===null&&sp(a.stateNode.containerInfo),at(a),null;case 10:return Di(a.type),at(a),null;case 19:if(Y(ft),h=a.memoizedState,h===null)return at(a),null;if(y=(a.flags&128)!==0,b=h.rendering,b===null)if(y)Rs(h,!1);else{if(ct!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(b=bu(r),b!==null){for(a.flags|=128,Rs(h,!1),r=b.updateQueue,a.updateQueue=r,Du(a,r),a.subtreeFlags=0,r=u,u=a.child;u!==null;)Yv(u,r),u=u.sibling;return I(ft,ft.current&1|2),ze&&Ri(a,h.treeForkCount),a.child}r=r.sibling}h.tail!==null&&Yt()>Pu&&(a.flags|=128,y=!0,Rs(h,!1),a.lanes=4194304)}else{if(!y)if(r=bu(b),r!==null){if(a.flags|=128,y=!0,r=r.updateQueue,a.updateQueue=r,Du(a,r),Rs(h,!0),h.tail===null&&h.tailMode==="hidden"&&!b.alternate&&!ze)return at(a),null}else 2*Yt()-h.renderingStartTime>Pu&&u!==536870912&&(a.flags|=128,y=!0,Rs(h,!1),a.lanes=4194304);h.isBackwards?(b.sibling=a.child,a.child=b):(r=h.last,r!==null?r.sibling=b:a.child=b,h.last=b)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Yt(),r.sibling=null,u=ft.current,I(ft,y?u&1|2:u&1),ze&&Ri(a,h.treeForkCount),r):(at(a),null);case 22:case 23:return bn(a),lh(),h=a.memoizedState!==null,r!==null?r.memoizedState!==null!==h&&(a.flags|=8192):h&&(a.flags|=8192),h?(u&536870912)!==0&&(a.flags&128)===0&&(at(a),a.subtreeFlags&6&&(a.flags|=8192)):at(a),u=a.updateQueue,u!==null&&Du(a,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==u&&(a.flags|=2048),r!==null&&Y(ro),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Di(gt),at(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function oR(r,a){switch(Wf(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Di(gt),pe(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return je(a),null;case 31:if(a.memoizedState!==null){if(bn(a),a.alternate===null)throw Error(i(340));to()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(bn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));to()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return Y(ft),null;case 4:return pe(),null;case 10:return Di(a.type),null;case 22:case 23:return bn(a),lh(),r!==null&&Y(ro),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Di(gt),null;case 25:return null;default:return null}}function Sb(r,a){switch(Wf(a),a.tag){case 3:Di(gt),pe();break;case 26:case 27:case 5:je(a);break;case 4:pe();break;case 31:a.memoizedState!==null&&bn(a);break;case 13:bn(a);break;case 19:Y(ft);break;case 10:Di(a.type);break;case 22:case 23:bn(a),lh(),r!==null&&Y(ro);break;case 24:Di(gt)}}function Os(r,a){try{var u=a.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&r)===r){h=void 0;var b=u.create,E=u.inst;h=b(),E.destroy=h}u=u.next}while(u!==y)}}catch(L){We(a,a.return,L)}}function xr(r,a,u){try{var h=a.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var b=y.next;h=b;do{if((h.tag&r)===r){var E=h.inst,L=E.destroy;if(L!==void 0){E.destroy=void 0,y=a;var B=u,Q=L;try{Q()}catch(ie){We(y,B,ie)}}}h=h.next}while(h!==b)}}catch(ie){We(a,a.return,ie)}}function _b(r){var a=r.updateQueue;if(a!==null){var u=r.stateNode;try{f0(a,u)}catch(h){We(r,r.return,h)}}}function Cb(r,a,u){u.props=uo(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(h){We(r,a,h)}}function Ds(r,a){try{var u=r.ref;if(u!==null){switch(r.tag){case 26:case 27:case 5:var h=r.stateNode;break;case 30:h=r.stateNode;break;default:h=r.stateNode}typeof u=="function"?r.refCleanup=u(h):u.current=h}}catch(y){We(r,a,y)}}function oi(r,a){var u=r.ref,h=r.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(y){We(r,a,y)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){We(r,a,y)}else u.current=null}function wb(r){var a=r.type,u=r.memoizedProps,h=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(y){We(r,r.return,y)}}function Bh(r,a,u){try{var h=r.stateNode;TR(h,r.type,u,a),h[nn]=a}catch(y){We(r,r.return,y)}}function Eb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Tr(r.type)||r.tag===4}function Uh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Eb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Tr(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Vh(r,a,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(r),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Ti));else if(h!==4&&(h===27&&Tr(r.type)&&(u=r.stateNode,a=null),r=r.child,r!==null))for(Vh(r,a,u),r=r.sibling;r!==null;)Vh(r,a,u),r=r.sibling}function Mu(r,a,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,a?u.insertBefore(r,a):u.appendChild(r);else if(h!==4&&(h===27&&Tr(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(Mu(r,a,u),r=r.sibling;r!==null;)Mu(r,a,u),r=r.sibling}function kb(r){var a=r.stateNode,u=r.memoizedProps;try{for(var h=r.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);Ht(a,h,u),a[It]=r,a[nn]=u}catch(b){We(r,r.return,b)}}var Pi=!1,bt=!1,Fh=!1,Tb=typeof WeakSet=="function"?WeakSet:Set,Lt=null;function aR(r,a){if(r=r.containerInfo,cp=ec,r=jv(r),zf(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var y=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var E=0,L=-1,B=-1,Q=0,ie=0,se=r,J=null;t:for(;;){for(var te;se!==u||y!==0&&se.nodeType!==3||(L=E+y),se!==b||h!==0&&se.nodeType!==3||(B=E+h),se.nodeType===3&&(E+=se.nodeValue.length),(te=se.firstChild)!==null;)J=se,se=te;for(;;){if(se===r)break t;if(J===u&&++Q===y&&(L=E),J===b&&++ie===h&&(B=E),(te=se.nextSibling)!==null)break;se=J,J=se.parentNode}se=te}u=L===-1||B===-1?null:{start:L,end:B}}else u=null}u=u||{start:0,end:0}}else u=null;for(dp={focusedElem:r,selectionRange:u},ec=!1,Lt=a;Lt!==null;)if(a=Lt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,Lt=r;else for(;Lt!==null;){switch(a=Lt,b=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)y=r[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&b!==null){r=void 0,u=a,y=b.memoizedProps,b=b.memoizedState,h=u.stateNode;try{var ye=uo(u.type,y);r=h.getSnapshotBeforeUpdate(ye,b),h.__reactInternalSnapshotBeforeUpdate=r}catch(xe){We(u,u.return,xe)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,u=r.nodeType,u===9)pp(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":pp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,Lt=r;break}Lt=a.return}}function Ab(r,a,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:ji(r,u),h&4&&Os(5,u);break;case 1:if(ji(r,u),h&4)if(r=u.stateNode,a===null)try{r.componentDidMount()}catch(E){We(u,u.return,E)}else{var y=uo(u.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(y,a,r.__reactInternalSnapshotBeforeUpdate)}catch(E){We(u,u.return,E)}}h&64&&_b(u),h&512&&Ds(u,u.return);break;case 3:if(ji(r,u),h&64&&(r=u.updateQueue,r!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{f0(r,a)}catch(E){We(u,u.return,E)}}break;case 27:a===null&&h&4&&kb(u);case 26:case 5:ji(r,u),a===null&&h&4&&wb(u),h&512&&Ds(u,u.return);break;case 12:ji(r,u);break;case 31:ji(r,u),h&4&&Ob(r,u);break;case 13:ji(r,u),h&4&&Db(r,u),h&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=mR.bind(null,u),NR(r,u))));break;case 22:if(h=u.memoizedState!==null||Pi,!h){a=a!==null&&a.memoizedState!==null||bt,y=Pi;var b=bt;Pi=h,(bt=a)&&!b?Bi(r,u,(u.subtreeFlags&8772)!==0):ji(r,u),Pi=y,bt=b}break;case 30:break;default:ji(r,u)}}function Lb(r){var a=r.alternate;a!==null&&(r.alternate=null,Lb(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&bf(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var lt=null,on=!1;function Hi(r,a,u){for(u=u.child;u!==null;)Rb(r,a,u),u=u.sibling}function Rb(r,a,u){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(Xt,u)}catch{}switch(u.tag){case 26:bt||oi(u,a),Hi(r,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:bt||oi(u,a);var h=lt,y=on;Tr(u.type)&&(lt=u.stateNode,on=!1),Hi(r,a,u),Us(u.stateNode),lt=h,on=y;break;case 5:bt||oi(u,a);case 6:if(h=lt,y=on,lt=null,Hi(r,a,u),lt=h,on=y,lt!==null)if(on)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(u.stateNode)}catch(b){We(u,a,b)}else try{lt.removeChild(u.stateNode)}catch(b){We(u,a,b)}break;case 18:lt!==null&&(on?(r=lt,_x(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),Aa(r)):_x(lt,u.stateNode));break;case 4:h=lt,y=on,lt=u.stateNode.containerInfo,on=!0,Hi(r,a,u),lt=h,on=y;break;case 0:case 11:case 14:case 15:xr(2,u,a),bt||xr(4,u,a),Hi(r,a,u);break;case 1:bt||(oi(u,a),h=u.stateNode,typeof h.componentWillUnmount=="function"&&Cb(u,a,h)),Hi(r,a,u);break;case 21:Hi(r,a,u);break;case 22:bt=(h=bt)||u.memoizedState!==null,Hi(r,a,u),bt=h;break;default:Hi(r,a,u)}}function Ob(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Aa(r)}catch(u){We(a,a.return,u)}}}function Db(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Aa(r)}catch(u){We(a,a.return,u)}}function sR(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new Tb),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new Tb),a;default:throw Error(i(435,r.tag))}}function Iu(r,a){var u=sR(r);a.forEach(function(h){if(!u.has(h)){u.add(h);var y=gR.bind(null,r,h);h.then(y,y)}})}function an(r,a){var u=a.deletions;if(u!==null)for(var h=0;h<u.length;h++){var y=u[h],b=r,E=a,L=E;e:for(;L!==null;){switch(L.tag){case 27:if(Tr(L.type)){lt=L.stateNode,on=!1;break e}break;case 5:lt=L.stateNode,on=!1;break e;case 3:case 4:lt=L.stateNode.containerInfo,on=!0;break e}L=L.return}if(lt===null)throw Error(i(160));Rb(b,E,y),lt=null,on=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Mb(a,r),a=a.sibling}var Gn=null;function Mb(r,a){var u=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:an(a,r),sn(r),h&4&&(xr(3,r,r.return),Os(3,r),xr(5,r,r.return));break;case 1:an(a,r),sn(r),h&512&&(bt||u===null||oi(u,u.return)),h&64&&Pi&&(r=r.updateQueue,r!==null&&(h=r.callbacks,h!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var y=Gn;if(an(a,r),sn(r),h&512&&(bt||u===null||oi(u,u.return)),h&4){var b=u!==null?u.memoizedState:null;if(h=r.memoizedState,u===null)if(h===null)if(r.stateNode===null){e:{h=r.type,u=r.memoizedProps,y=y.ownerDocument||y;t:switch(h){case"title":b=y.getElementsByTagName("title")[0],(!b||b[os]||b[It]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(h),y.head.insertBefore(b,y.querySelector("head > title"))),Ht(b,h,u),b[It]=r,At(b),h=b;break e;case"link":var E=Mx("link","href",y).get(h+(u.href||""));if(E){for(var L=0;L<E.length;L++)if(b=E[L],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){E.splice(L,1);break t}}b=y.createElement(h),Ht(b,h,u),y.head.appendChild(b);break;case"meta":if(E=Mx("meta","content",y).get(h+(u.content||""))){for(L=0;L<E.length;L++)if(b=E[L],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){E.splice(L,1);break t}}b=y.createElement(h),Ht(b,h,u),y.head.appendChild(b);break;default:throw Error(i(468,h))}b[It]=r,At(b),h=b}r.stateNode=h}else Ix(y,r.type,r.stateNode);else r.stateNode=Dx(y,h,r.memoizedProps);else b!==h?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,h===null?Ix(y,r.type,r.stateNode):Dx(y,h,r.memoizedProps)):h===null&&r.stateNode!==null&&Bh(r,r.memoizedProps,u.memoizedProps)}break;case 27:an(a,r),sn(r),h&512&&(bt||u===null||oi(u,u.return)),u!==null&&h&4&&Bh(r,r.memoizedProps,u.memoizedProps);break;case 5:if(an(a,r),sn(r),h&512&&(bt||u===null||oi(u,u.return)),r.flags&32){y=r.stateNode;try{Qo(y,"")}catch(ye){We(r,r.return,ye)}}h&4&&r.stateNode!=null&&(y=r.memoizedProps,Bh(r,y,u!==null?u.memoizedProps:y)),h&1024&&(Fh=!0);break;case 6:if(an(a,r),sn(r),h&4){if(r.stateNode===null)throw Error(i(162));h=r.memoizedProps,u=r.stateNode;try{u.nodeValue=h}catch(ye){We(r,r.return,ye)}}break;case 3:if(Ku=null,y=Gn,Gn=Yu(a.containerInfo),an(a,r),Gn=y,sn(r),h&4&&u!==null&&u.memoizedState.isDehydrated)try{Aa(a.containerInfo)}catch(ye){We(r,r.return,ye)}Fh&&(Fh=!1,Ib(r));break;case 4:h=Gn,Gn=Yu(r.stateNode.containerInfo),an(a,r),sn(r),Gn=h;break;case 12:an(a,r),sn(r);break;case 31:an(a,r),sn(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Iu(r,h)));break;case 13:an(a,r),sn(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(zu=Yt()),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Iu(r,h)));break;case 22:y=r.memoizedState!==null;var B=u!==null&&u.memoizedState!==null,Q=Pi,ie=bt;if(Pi=Q||y,bt=ie||B,an(a,r),bt=ie,Pi=Q,sn(r),h&8192)e:for(a=r.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(u===null||B||Pi||bt||co(r)),u=null,a=r;;){if(a.tag===5||a.tag===26){if(u===null){B=u=a;try{if(b=B.stateNode,y)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{L=B.stateNode;var se=B.memoizedProps.style,J=se!=null&&se.hasOwnProperty("display")?se.display:null;L.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(ye){We(B,B.return,ye)}}}else if(a.tag===6){if(u===null){B=a;try{B.stateNode.nodeValue=y?"":B.memoizedProps}catch(ye){We(B,B.return,ye)}}}else if(a.tag===18){if(u===null){B=a;try{var te=B.stateNode;y?Cx(te,!0):Cx(B.stateNode,!1)}catch(ye){We(B,B.return,ye)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}h&4&&(h=r.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,Iu(r,u))));break;case 19:an(a,r),sn(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Iu(r,h)));break;case 30:break;case 21:break;default:an(a,r),sn(r)}}function sn(r){var a=r.flags;if(a&2){try{for(var u,h=r.return;h!==null;){if(Eb(h)){u=h;break}h=h.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var y=u.stateNode,b=Uh(r);Mu(r,b,y);break;case 5:var E=u.stateNode;u.flags&32&&(Qo(E,""),u.flags&=-33);var L=Uh(r);Mu(r,L,E);break;case 3:case 4:var B=u.stateNode.containerInfo,Q=Uh(r);Vh(r,Q,B);break;default:throw Error(i(161))}}catch(ie){We(r,r.return,ie)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function Ib(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;Ib(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function ji(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Ab(r,a.alternate,a),a=a.sibling}function co(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:xr(4,a,a.return),co(a);break;case 1:oi(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&Cb(a,a.return,u),co(a);break;case 27:Us(a.stateNode);case 26:case 5:oi(a,a.return),co(a);break;case 22:a.memoizedState===null&&co(a);break;case 30:co(a);break;default:co(a)}r=r.sibling}}function Bi(r,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var h=a.alternate,y=r,b=a,E=b.flags;switch(b.tag){case 0:case 11:case 15:Bi(y,b,u),Os(4,b);break;case 1:if(Bi(y,b,u),h=b,y=h.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Q){We(h,h.return,Q)}if(h=b,y=h.updateQueue,y!==null){var L=h.stateNode;try{var B=y.shared.hiddenCallbacks;if(B!==null)for(y.shared.hiddenCallbacks=null,y=0;y<B.length;y++)d0(B[y],L)}catch(Q){We(h,h.return,Q)}}u&&E&64&&_b(b),Ds(b,b.return);break;case 27:kb(b);case 26:case 5:Bi(y,b,u),u&&h===null&&E&4&&wb(b),Ds(b,b.return);break;case 12:Bi(y,b,u);break;case 31:Bi(y,b,u),u&&E&4&&Ob(y,b);break;case 13:Bi(y,b,u),u&&E&4&&Db(y,b);break;case 22:b.memoizedState===null&&Bi(y,b,u),Ds(b,b.return);break;case 30:break;default:Bi(y,b,u)}a=a.sibling}}function Gh(r,a){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&vs(u))}function $h(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&vs(r))}function $n(r,a,u,h){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Nb(r,a,u,h),a=a.sibling}function Nb(r,a,u,h){var y=a.flags;switch(a.tag){case 0:case 11:case 15:$n(r,a,u,h),y&2048&&Os(9,a);break;case 1:$n(r,a,u,h);break;case 3:$n(r,a,u,h),y&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&vs(r)));break;case 12:if(y&2048){$n(r,a,u,h),r=a.stateNode;try{var b=a.memoizedProps,E=b.id,L=b.onPostCommit;typeof L=="function"&&L(E,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(B){We(a,a.return,B)}}else $n(r,a,u,h);break;case 31:$n(r,a,u,h);break;case 13:$n(r,a,u,h);break;case 23:break;case 22:b=a.stateNode,E=a.alternate,a.memoizedState!==null?b._visibility&2?$n(r,a,u,h):Ms(r,a):b._visibility&2?$n(r,a,u,h):(b._visibility|=2,ya(r,a,u,h,(a.subtreeFlags&10256)!==0||!1)),y&2048&&Gh(E,a);break;case 24:$n(r,a,u,h),y&2048&&$h(a.alternate,a);break;default:$n(r,a,u,h)}}function ya(r,a,u,h,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var b=r,E=a,L=u,B=h,Q=E.flags;switch(E.tag){case 0:case 11:case 15:ya(b,E,L,B,y),Os(8,E);break;case 23:break;case 22:var ie=E.stateNode;E.memoizedState!==null?ie._visibility&2?ya(b,E,L,B,y):Ms(b,E):(ie._visibility|=2,ya(b,E,L,B,y)),y&&Q&2048&&Gh(E.alternate,E);break;case 24:ya(b,E,L,B,y),y&&Q&2048&&$h(E.alternate,E);break;default:ya(b,E,L,B,y)}a=a.sibling}}function Ms(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=r,h=a,y=h.flags;switch(h.tag){case 22:Ms(u,h),y&2048&&Gh(h.alternate,h);break;case 24:Ms(u,h),y&2048&&$h(h.alternate,h);break;default:Ms(u,h)}a=a.sibling}}var Is=8192;function va(r,a,u){if(r.subtreeFlags&Is)for(r=r.child;r!==null;)zb(r,a,u),r=r.sibling}function zb(r,a,u){switch(r.tag){case 26:va(r,a,u),r.flags&Is&&r.memoizedState!==null&&WR(u,Gn,r.memoizedState,r.memoizedProps);break;case 5:va(r,a,u);break;case 3:case 4:var h=Gn;Gn=Yu(r.stateNode.containerInfo),va(r,a,u),Gn=h;break;case 22:r.memoizedState===null&&(h=r.alternate,h!==null&&h.memoizedState!==null?(h=Is,Is=16777216,va(r,a,u),Is=h):va(r,a,u));break;default:va(r,a,u)}}function Pb(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function Ns(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];Lt=h,jb(h,r)}Pb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Hb(r),r=r.sibling}function Hb(r){switch(r.tag){case 0:case 11:case 15:Ns(r),r.flags&2048&&xr(9,r,r.return);break;case 3:Ns(r);break;case 12:Ns(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,Nu(r)):Ns(r);break;default:Ns(r)}}function Nu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];Lt=h,jb(h,r)}Pb(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:xr(8,a,a.return),Nu(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Nu(a));break;default:Nu(a)}r=r.sibling}}function jb(r,a){for(;Lt!==null;){var u=Lt;switch(u.tag){case 0:case 11:case 15:xr(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:vs(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,Lt=h;else e:for(u=r;Lt!==null;){h=Lt;var y=h.sibling,b=h.return;if(Lb(h),h===u){Lt=null;break e}if(y!==null){y.return=b,Lt=y;break e}Lt=b}}}var lR={getCacheForType:function(r){var a=zt(gt),u=a.data.get(r);return u===void 0&&(u=r(),a.data.set(r,u)),u},cacheSignal:function(){return zt(gt).controller.signal}},uR=typeof WeakMap=="function"?WeakMap:Map,Fe=0,Je=null,De=null,Ie=0,qe=0,xn=null,Sr=!1,ba=!1,qh=!1,Ui=0,ct=0,_r=0,fo=0,Wh=0,Sn=0,xa=0,zs=null,ln=null,Yh=!1,zu=0,Bb=0,Pu=1/0,Hu=null,Cr=null,_t=0,wr=null,Sa=null,Vi=0,Xh=0,Kh=null,Ub=null,Ps=0,Qh=null;function _n(){return(Fe&2)!==0&&Ie!==0?Ie&-Ie:P.T!==null?ip():iv()}function Vb(){if(Sn===0)if((Ie&536870912)===0||ze){var r=ql;ql<<=1,(ql&3932160)===0&&(ql=262144),Sn=r}else Sn=536870912;return r=vn.current,r!==null&&(r.flags|=32),Sn}function un(r,a,u){(r===Je&&(qe===2||qe===9)||r.cancelPendingCommit!==null)&&(_a(r,0),Er(r,Ie,Sn,!1)),rs(r,u),((Fe&2)===0||r!==Je)&&(r===Je&&((Fe&2)===0&&(fo|=u),ct===4&&Er(r,Ie,Sn,!1)),ai(r))}function Fb(r,a,u){if((Fe&6)!==0)throw Error(i(327));var h=!u&&(a&127)===0&&(a&r.expiredLanes)===0||is(r,a),y=h?fR(r,a):Jh(r,a,!0),b=h;do{if(y===0){ba&&!h&&Er(r,a,0,!1);break}else{if(u=r.current.alternate,b&&!cR(u)){y=Jh(r,a,!1),b=!1;continue}if(y===2){if(b=a,r.errorRecoveryDisabledLanes&b)var E=0;else E=r.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){a=E;e:{var L=r;y=zs;var B=L.current.memoizedState.isDehydrated;if(B&&(_a(L,E).flags|=256),E=Jh(L,E,!1),E!==2){if(qh&&!B){L.errorRecoveryDisabledLanes|=b,fo|=b,y=4;break e}b=ln,ln=y,b!==null&&(ln===null?ln=b:ln.push.apply(ln,b))}y=E}if(b=!1,y!==2)continue}}if(y===1){_a(r,0),Er(r,a,0,!0);break}e:{switch(h=r,b=y,b){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Er(h,a,Sn,!Sr);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(y=zu+300-Yt(),10<y)){if(Er(h,a,Sn,!Sr),Yl(h,0,!0)!==0)break e;Vi=a,h.timeoutHandle=xx(Gb.bind(null,h,u,ln,Hu,Yh,a,Sn,fo,xa,Sr,b,"Throttled",-0,0),y);break e}Gb(h,u,ln,Hu,Yh,a,Sn,fo,xa,Sr,b,null,-0,0)}}break}while(!0);ai(r)}function Gb(r,a,u,h,y,b,E,L,B,Q,ie,se,J,te){if(r.timeoutHandle=-1,se=a.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ti},zb(a,b,se);var ye=(b&62914560)===b?zu-Yt():(b&4194048)===b?Bb-Yt():0;if(ye=YR(se,ye),ye!==null){Vi=b,r.cancelPendingCommit=ye(Zb.bind(null,r,a,b,u,h,y,E,L,B,ie,se,null,J,te)),Er(r,b,E,!Q);return}}Zb(r,a,b,u,h,y,E,L,B)}function cR(r){for(var a=r;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var y=u[h],b=y.getSnapshot;y=y.value;try{if(!gn(b(),y))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Er(r,a,u,h){a&=~Wh,a&=~fo,r.suspendedLanes|=a,r.pingedLanes&=~a,h&&(r.warmLanes|=a),h=r.expirationTimes;for(var y=a;0<y;){var b=31-Ze(y),E=1<<b;h[b]=-1,y&=~E}u!==0&&ev(r,u,a)}function ju(){return(Fe&6)===0?(Hs(0),!1):!0}function Zh(){if(De!==null){if(qe===0)var r=De.return;else r=De,Oi=no=null,ph(r),fa=null,xs=0,r=De;for(;r!==null;)Sb(r.alternate,r),r=r.return;De=null}}function _a(r,a){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,RR(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),Vi=0,Zh(),Je=r,De=u=Li(r.current,null),Ie=a,qe=0,xn=null,Sr=!1,ba=is(r,a),qh=!1,xa=Sn=Wh=fo=_r=ct=0,ln=zs=null,Yh=!1,(a&8)!==0&&(a|=a&32);var h=r.entangledLanes;if(h!==0)for(r=r.entanglements,h&=a;0<h;){var y=31-Ze(h),b=1<<y;a|=r[y],h&=~b}return Ui=a,au(),u}function $b(r,a){Ae=null,P.H=As,a===da||a===pu?(a=s0(),qe=3):a===nh?(a=s0(),qe=4):qe=a===Rh?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,xn=a,De===null&&(ct=1,Au(r,Rn(a,r.current)))}function qb(){var r=vn.current;return r===null?!0:(Ie&4194048)===Ie?In===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?r===In:!1}function Wb(){var r=P.H;return P.H=As,r===null?As:r}function Yb(){var r=P.A;return P.A=lR,r}function Bu(){ct=4,Sr||(Ie&4194048)!==Ie&&vn.current!==null||(ba=!0),(_r&134217727)===0&&(fo&134217727)===0||Je===null||Er(Je,Ie,Sn,!1)}function Jh(r,a,u){var h=Fe;Fe|=2;var y=Wb(),b=Yb();(Je!==r||Ie!==a)&&(Hu=null,_a(r,a)),a=!1;var E=ct;e:do try{if(qe!==0&&De!==null){var L=De,B=xn;switch(qe){case 8:Zh(),E=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(a=!0);var Q=qe;if(qe=0,xn=null,Ca(r,L,B,Q),u&&ba){E=0;break e}break;default:Q=qe,qe=0,xn=null,Ca(r,L,B,Q)}}dR(),E=ct;break}catch(ie){$b(r,ie)}while(!0);return a&&r.shellSuspendCounter++,Oi=no=null,Fe=h,P.H=y,P.A=b,De===null&&(Je=null,Ie=0,au()),E}function dR(){for(;De!==null;)Xb(De)}function fR(r,a){var u=Fe;Fe|=2;var h=Wb(),y=Yb();Je!==r||Ie!==a?(Hu=null,Pu=Yt()+500,_a(r,a)):ba=is(r,a);e:do try{if(qe!==0&&De!==null){a=De;var b=xn;t:switch(qe){case 1:qe=0,xn=null,Ca(r,a,b,1);break;case 2:case 9:if(o0(b)){qe=0,xn=null,Kb(a);break}a=function(){qe!==2&&qe!==9||Je!==r||(qe=7),ai(r)},b.then(a,a);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:o0(b)?(qe=0,xn=null,Kb(a)):(qe=0,xn=null,Ca(r,a,b,7));break;case 5:var E=null;switch(De.tag){case 26:E=De.memoizedState;case 5:case 27:var L=De;if(E?Nx(E):L.stateNode.complete){qe=0,xn=null;var B=L.sibling;if(B!==null)De=B;else{var Q=L.return;Q!==null?(De=Q,Uu(Q)):De=null}break t}}qe=0,xn=null,Ca(r,a,b,5);break;case 6:qe=0,xn=null,Ca(r,a,b,6);break;case 8:Zh(),ct=6;break e;default:throw Error(i(462))}}hR();break}catch(ie){$b(r,ie)}while(!0);return Oi=no=null,P.H=h,P.A=y,Fe=u,De!==null?0:(Je=null,Ie=0,au(),ct)}function hR(){for(;De!==null&&!ff();)Xb(De)}function Xb(r){var a=bb(r.alternate,r,Ui);r.memoizedProps=r.pendingProps,a===null?Uu(r):De=a}function Kb(r){var a=r,u=a.alternate;switch(a.tag){case 15:case 0:a=hb(u,a,a.pendingProps,a.type,void 0,Ie);break;case 11:a=hb(u,a,a.pendingProps,a.type.render,a.ref,Ie);break;case 5:ph(a);default:Sb(u,a),a=De=Yv(a,Ui),a=bb(u,a,Ui)}r.memoizedProps=r.pendingProps,a===null?Uu(r):De=a}function Ca(r,a,u,h){Oi=no=null,ph(a),fa=null,xs=0;var y=a.return;try{if(tR(r,y,a,u,Ie)){ct=1,Au(r,Rn(u,r.current)),De=null;return}}catch(b){if(y!==null)throw De=y,b;ct=1,Au(r,Rn(u,r.current)),De=null;return}a.flags&32768?(ze||h===1?r=!0:ba||(Ie&536870912)!==0?r=!1:(Sr=r=!0,(h===2||h===9||h===3||h===6)&&(h=vn.current,h!==null&&h.tag===13&&(h.flags|=16384))),Qb(a,r)):Uu(a)}function Uu(r){var a=r;do{if((a.flags&32768)!==0){Qb(a,Sr);return}r=a.return;var u=rR(a.alternate,a,Ui);if(u!==null){De=u;return}if(a=a.sibling,a!==null){De=a;return}De=a=r}while(a!==null);ct===0&&(ct=5)}function Qb(r,a){do{var u=oR(r.alternate,r);if(u!==null){u.flags&=32767,De=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(r=r.sibling,r!==null)){De=r;return}De=r=u}while(r!==null);ct=6,De=null}function Zb(r,a,u,h,y,b,E,L,B){r.cancelPendingCommit=null;do Vu();while(_t!==0);if((Fe&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(b=a.lanes|a.childLanes,b|=Uf,qA(r,u,b,E,L,B),r===Je&&(De=Je=null,Ie=0),Sa=a,wr=r,Vi=u,Xh=b,Kh=y,Ub=h,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,yR(Se,function(){return ix(),null})):(r.callbackNode=null,r.callbackPriority=0),h=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||h){h=P.T,P.T=null,y=$.p,$.p=2,E=Fe,Fe|=4;try{aR(r,a,u)}finally{Fe=E,$.p=y,P.T=h}}_t=1,Jb(),ex(),tx()}}function Jb(){if(_t===1){_t=0;var r=wr,a=Sa,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=P.T,P.T=null;var h=$.p;$.p=2;var y=Fe;Fe|=4;try{Mb(a,r);var b=dp,E=jv(r.containerInfo),L=b.focusedElem,B=b.selectionRange;if(E!==L&&L&&L.ownerDocument&&Hv(L.ownerDocument.documentElement,L)){if(B!==null&&zf(L)){var Q=B.start,ie=B.end;if(ie===void 0&&(ie=Q),"selectionStart"in L)L.selectionStart=Q,L.selectionEnd=Math.min(ie,L.value.length);else{var se=L.ownerDocument||document,J=se&&se.defaultView||window;if(J.getSelection){var te=J.getSelection(),ye=L.textContent.length,xe=Math.min(B.start,ye),Ke=B.end===void 0?xe:Math.min(B.end,ye);!te.extend&&xe>Ke&&(E=Ke,Ke=xe,xe=E);var G=Pv(L,xe),V=Pv(L,Ke);if(G&&V&&(te.rangeCount!==1||te.anchorNode!==G.node||te.anchorOffset!==G.offset||te.focusNode!==V.node||te.focusOffset!==V.offset)){var K=se.createRange();K.setStart(G.node,G.offset),te.removeAllRanges(),xe>Ke?(te.addRange(K),te.extend(V.node,V.offset)):(K.setEnd(V.node,V.offset),te.addRange(K))}}}}for(se=[],te=L;te=te.parentNode;)te.nodeType===1&&se.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<se.length;L++){var ae=se[L];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}ec=!!cp,dp=cp=null}finally{Fe=y,$.p=h,P.T=u}}r.current=a,_t=2}}function ex(){if(_t===2){_t=0;var r=wr,a=Sa,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=P.T,P.T=null;var h=$.p;$.p=2;var y=Fe;Fe|=4;try{Ab(r,a.alternate,a)}finally{Fe=y,$.p=h,P.T=u}}_t=3}}function tx(){if(_t===4||_t===3){_t=0,hf();var r=wr,a=Sa,u=Vi,h=Ub;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?_t=5:(_t=0,Sa=wr=null,nx(r,r.pendingLanes));var y=r.pendingLanes;if(y===0&&(Cr=null),yf(u),a=a.stateNode,St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(Xt,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=P.T,y=$.p,$.p=2,P.T=null;try{for(var b=r.onRecoverableError,E=0;E<h.length;E++){var L=h[E];b(L.value,{componentStack:L.stack})}}finally{P.T=a,$.p=y}}(Vi&3)!==0&&Vu(),ai(r),y=r.pendingLanes,(u&261930)!==0&&(y&42)!==0?r===Qh?Ps++:(Ps=0,Qh=r):Ps=0,Hs(0)}}function nx(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,vs(a)))}function Vu(){return Jb(),ex(),tx(),ix()}function ix(){if(_t!==5)return!1;var r=wr,a=Xh;Xh=0;var u=yf(Vi),h=P.T,y=$.p;try{$.p=32>u?32:u,P.T=null,u=Kh,Kh=null;var b=wr,E=Vi;if(_t=0,Sa=wr=null,Vi=0,(Fe&6)!==0)throw Error(i(331));var L=Fe;if(Fe|=4,Hb(b.current),Nb(b,b.current,E,u),Fe=L,Hs(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(Xt,b)}catch{}return!0}finally{$.p=y,P.T=h,nx(r,a)}}function rx(r,a,u){a=Rn(u,a),a=Lh(r.stateNode,a,2),r=yr(r,a,2),r!==null&&(rs(r,2),ai(r))}function We(r,a,u){if(r.tag===3)rx(r,r,u);else for(;a!==null;){if(a.tag===3){rx(a,r,u);break}else if(a.tag===1){var h=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Cr===null||!Cr.has(h))){r=Rn(u,r),u=ob(2),h=yr(a,u,2),h!==null&&(ab(u,h,a,r),rs(h,2),ai(h));break}}a=a.return}}function ep(r,a,u){var h=r.pingCache;if(h===null){h=r.pingCache=new uR;var y=new Set;h.set(a,y)}else y=h.get(a),y===void 0&&(y=new Set,h.set(a,y));y.has(u)||(qh=!0,y.add(u),r=pR.bind(null,r,a,u),a.then(r,r))}function pR(r,a,u){var h=r.pingCache;h!==null&&h.delete(a),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,Je===r&&(Ie&u)===u&&(ct===4||ct===3&&(Ie&62914560)===Ie&&300>Yt()-zu?(Fe&2)===0&&_a(r,0):Wh|=u,xa===Ie&&(xa=0)),ai(r)}function ox(r,a){a===0&&(a=Jy()),r=Jr(r,a),r!==null&&(rs(r,a),ai(r))}function mR(r){var a=r.memoizedState,u=0;a!==null&&(u=a.retryLane),ox(r,u)}function gR(r,a){var u=0;switch(r.tag){case 31:case 13:var h=r.stateNode,y=r.memoizedState;y!==null&&(u=y.retryLane);break;case 19:h=r.stateNode;break;case 22:h=r.stateNode._retryCache;break;default:throw Error(i(314))}h!==null&&h.delete(a),ox(r,u)}function yR(r,a){return dt(r,a)}var Fu=null,wa=null,tp=!1,Gu=!1,np=!1,kr=0;function ai(r){r!==wa&&r.next===null&&(wa===null?Fu=wa=r:wa=wa.next=r),Gu=!0,tp||(tp=!0,bR())}function Hs(r,a){if(!np&&Gu){np=!0;do for(var u=!1,h=Fu;h!==null;){if(r!==0){var y=h.pendingLanes;if(y===0)var b=0;else{var E=h.suspendedLanes,L=h.pingedLanes;b=(1<<31-Ze(42|r)+1)-1,b&=y&~(E&~L),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,ux(h,b))}else b=Ie,b=Yl(h,h===Je?b:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(b&3)===0||is(h,b)||(u=!0,ux(h,b));h=h.next}while(u);np=!1}}function vR(){ax()}function ax(){Gu=tp=!1;var r=0;kr!==0&&LR()&&(r=kr);for(var a=Yt(),u=null,h=Fu;h!==null;){var y=h.next,b=sx(h,a);b===0?(h.next=null,u===null?Fu=y:u.next=y,y===null&&(wa=u)):(u=h,(r!==0||(b&3)!==0)&&(Gu=!0)),h=y}_t!==0&&_t!==5||Hs(r),kr!==0&&(kr=0)}function sx(r,a){for(var u=r.suspendedLanes,h=r.pingedLanes,y=r.expirationTimes,b=r.pendingLanes&-62914561;0<b;){var E=31-Ze(b),L=1<<E,B=y[E];B===-1?((L&u)===0||(L&h)!==0)&&(y[E]=$A(L,a)):B<=a&&(r.expiredLanes|=L),b&=~L}if(a=Je,u=Ie,u=Yl(r,r===a?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h=r.callbackNode,u===0||r===a&&(qe===2||qe===9)||r.cancelPendingCommit!==null)return h!==null&&h!==null&&ni(h),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||is(r,u)){if(a=u&-u,a===r.callbackPriority)return a;switch(h!==null&&ni(h),yf(u)){case 2:case 8:u=he;break;case 32:u=Se;break;case 268435456:u=$e;break;default:u=Se}return h=lx.bind(null,r),u=dt(u,h),r.callbackPriority=a,r.callbackNode=u,a}return h!==null&&h!==null&&ni(h),r.callbackPriority=2,r.callbackNode=null,2}function lx(r,a){if(_t!==0&&_t!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(Vu()&&r.callbackNode!==u)return null;var h=Ie;return h=Yl(r,r===Je?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h===0?null:(Fb(r,h,a),sx(r,Yt()),r.callbackNode!=null&&r.callbackNode===u?lx.bind(null,r):null)}function ux(r,a){if(Vu())return null;Fb(r,a,!0)}function bR(){OR(function(){(Fe&6)!==0?dt(oe,vR):ax()})}function ip(){if(kr===0){var r=ua;r===0&&(r=$l,$l<<=1,($l&261888)===0&&($l=256)),kr=r}return kr}function cx(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Zl(""+r)}function dx(r,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,r.id&&u.setAttribute("form",r.id),a.parentNode.insertBefore(u,a),r=new FormData(r),u.parentNode.removeChild(u),r}function xR(r,a,u,h,y){if(a==="submit"&&u&&u.stateNode===y){var b=cx((y[nn]||null).action),E=h.submitter;E&&(a=(a=E[nn]||null)?cx(a.formAction):E.getAttribute("formAction"),a!==null&&(b=a,E=null));var L=new nu("action","action",null,h,y);r.push({event:L,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(kr!==0){var B=E?dx(y,E):new FormData(y);Ch(u,{pending:!0,data:B,method:y.method,action:b},null,B)}}else typeof b=="function"&&(L.preventDefault(),B=E?dx(y,E):new FormData(y),Ch(u,{pending:!0,data:B,method:y.method,action:b},b,B))},currentTarget:y}]})}}for(var rp=0;rp<Bf.length;rp++){var op=Bf[rp],SR=op.toLowerCase(),_R=op[0].toUpperCase()+op.slice(1);Fn(SR,"on"+_R)}Fn(Vv,"onAnimationEnd"),Fn(Fv,"onAnimationIteration"),Fn(Gv,"onAnimationStart"),Fn("dblclick","onDoubleClick"),Fn("focusin","onFocus"),Fn("focusout","onBlur"),Fn(HL,"onTransitionRun"),Fn(jL,"onTransitionStart"),Fn(BL,"onTransitionCancel"),Fn($v,"onTransitionEnd"),Xo("onMouseEnter",["mouseout","mouseover"]),Xo("onMouseLeave",["mouseout","mouseover"]),Xo("onPointerEnter",["pointerout","pointerover"]),Xo("onPointerLeave",["pointerout","pointerover"]),Xr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var js="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(" "),CR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(js));function fx(r,a){a=(a&4)!==0;for(var u=0;u<r.length;u++){var h=r[u],y=h.event;h=h.listeners;e:{var b=void 0;if(a)for(var E=h.length-1;0<=E;E--){var L=h[E],B=L.instance,Q=L.currentTarget;if(L=L.listener,B!==b&&y.isPropagationStopped())break e;b=L,y.currentTarget=Q;try{b(y)}catch(ie){ou(ie)}y.currentTarget=null,b=B}else for(E=0;E<h.length;E++){if(L=h[E],B=L.instance,Q=L.currentTarget,L=L.listener,B!==b&&y.isPropagationStopped())break e;b=L,y.currentTarget=Q;try{b(y)}catch(ie){ou(ie)}y.currentTarget=null,b=B}}}}function Me(r,a){var u=a[vf];u===void 0&&(u=a[vf]=new Set);var h=r+"__bubble";u.has(h)||(hx(a,r,2,!1),u.add(h))}function ap(r,a,u){var h=0;a&&(h|=4),hx(u,r,h,a)}var $u="_reactListening"+Math.random().toString(36).slice(2);function sp(r){if(!r[$u]){r[$u]=!0,av.forEach(function(u){u!=="selectionchange"&&(CR.has(u)||ap(u,!1,r),ap(u,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[$u]||(a[$u]=!0,ap("selectionchange",!1,a))}}function hx(r,a,u,h){switch(Vx(a)){case 2:var y=QR;break;case 8:y=ZR;break;default:y=_p}u=y.bind(null,a,u,r),y=void 0,!Tf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),h?y!==void 0?r.addEventListener(a,u,{capture:!0,passive:y}):r.addEventListener(a,u,!0):y!==void 0?r.addEventListener(a,u,{passive:y}):r.addEventListener(a,u,!1)}function lp(r,a,u,h,y){var b=h;if((a&1)===0&&(a&2)===0&&h!==null)e:for(;;){if(h===null)return;var E=h.tag;if(E===3||E===4){var L=h.stateNode.containerInfo;if(L===y)break;if(E===4)for(E=h.return;E!==null;){var B=E.tag;if((B===3||B===4)&&E.stateNode.containerInfo===y)return;E=E.return}for(;L!==null;){if(E=qo(L),E===null)return;if(B=E.tag,B===5||B===6||B===26||B===27){h=b=E;continue e}L=L.parentNode}}h=h.return}vv(function(){var Q=b,ie=Ef(u),se=[];e:{var J=qv.get(r);if(J!==void 0){var te=nu,ye=r;switch(r){case"keypress":if(eu(u)===0)break e;case"keydown":case"keyup":te=gL;break;case"focusin":ye="focus",te=Of;break;case"focusout":ye="blur",te=Of;break;case"beforeblur":case"afterblur":te=Of;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=Sv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=rL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=bL;break;case Vv:case Fv:case Gv:te=sL;break;case $v:te=SL;break;case"scroll":case"scrollend":te=nL;break;case"wheel":te=CL;break;case"copy":case"cut":case"paste":te=uL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Cv;break;case"toggle":case"beforetoggle":te=EL}var xe=(a&4)!==0,Ke=!xe&&(r==="scroll"||r==="scrollend"),G=xe?J!==null?J+"Capture":null:J;xe=[];for(var V=Q,K;V!==null;){var ae=V;if(K=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||K===null||G===null||(ae=ss(V,G),ae!=null&&xe.push(Bs(V,ae,K))),Ke)break;V=V.return}0<xe.length&&(J=new te(J,ye,null,u,ie),se.push({event:J,listeners:xe}))}}if((a&7)===0){e:{if(J=r==="mouseover"||r==="pointerover",te=r==="mouseout"||r==="pointerout",J&&u!==wf&&(ye=u.relatedTarget||u.fromElement)&&(qo(ye)||ye[$o]))break e;if((te||J)&&(J=ie.window===ie?ie:(J=ie.ownerDocument)?J.defaultView||J.parentWindow:window,te?(ye=u.relatedTarget||u.toElement,te=Q,ye=ye?qo(ye):null,ye!==null&&(Ke=s(ye),xe=ye.tag,ye!==Ke||xe!==5&&xe!==27&&xe!==6)&&(ye=null)):(te=null,ye=Q),te!==ye)){if(xe=Sv,ae="onMouseLeave",G="onMouseEnter",V="mouse",(r==="pointerout"||r==="pointerover")&&(xe=Cv,ae="onPointerLeave",G="onPointerEnter",V="pointer"),Ke=te==null?J:as(te),K=ye==null?J:as(ye),J=new xe(ae,V+"leave",te,u,ie),J.target=Ke,J.relatedTarget=K,ae=null,qo(ie)===Q&&(xe=new xe(G,V+"enter",ye,u,ie),xe.target=K,xe.relatedTarget=Ke,ae=xe),Ke=ae,te&&ye)t:{for(xe=wR,G=te,V=ye,K=0,ae=G;ae;ae=xe(ae))K++;ae=0;for(var be=V;be;be=xe(be))ae++;for(;0<K-ae;)G=xe(G),K--;for(;0<ae-K;)V=xe(V),ae--;for(;K--;){if(G===V||V!==null&&G===V.alternate){xe=G;break t}G=xe(G),V=xe(V)}xe=null}else xe=null;te!==null&&px(se,J,te,xe,!1),ye!==null&&Ke!==null&&px(se,Ke,ye,xe,!0)}}e:{if(J=Q?as(Q):window,te=J.nodeName&&J.nodeName.toLowerCase(),te==="select"||te==="input"&&J.type==="file")var Be=Ov;else if(Lv(J))if(Dv)Be=NL;else{Be=ML;var ve=DL}else te=J.nodeName,!te||te.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Q&&Cf(Q.elementType)&&(Be=Ov):Be=IL;if(Be&&(Be=Be(r,Q))){Rv(se,Be,u,ie);break e}ve&&ve(r,J,Q),r==="focusout"&&Q&&J.type==="number"&&Q.memoizedProps.value!=null&&_f(J,"number",J.value)}switch(ve=Q?as(Q):window,r){case"focusin":(Lv(ve)||ve.contentEditable==="true")&&(ta=ve,Pf=Q,ms=null);break;case"focusout":ms=Pf=ta=null;break;case"mousedown":Hf=!0;break;case"contextmenu":case"mouseup":case"dragend":Hf=!1,Bv(se,u,ie);break;case"selectionchange":if(PL)break;case"keydown":case"keyup":Bv(se,u,ie)}var Le;if(Mf)e:{switch(r){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else ea?Tv(r,u)&&(Ne="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ne="onCompositionStart");Ne&&(wv&&u.locale!=="ko"&&(ea||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&ea&&(Le=bv()):(cr=ie,Af="value"in cr?cr.value:cr.textContent,ea=!0)),ve=qu(Q,Ne),0<ve.length&&(Ne=new _v(Ne,r,null,u,ie),se.push({event:Ne,listeners:ve}),Le?Ne.data=Le:(Le=Av(u),Le!==null&&(Ne.data=Le)))),(Le=TL?AL(r,u):LL(r,u))&&(Ne=qu(Q,"onBeforeInput"),0<Ne.length&&(ve=new _v("onBeforeInput","beforeinput",null,u,ie),se.push({event:ve,listeners:Ne}),ve.data=Le)),xR(se,r,Q,u,ie)}fx(se,a)})}function Bs(r,a,u){return{instance:r,listener:a,currentTarget:u}}function qu(r,a){for(var u=a+"Capture",h=[];r!==null;){var y=r,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=ss(r,u),y!=null&&h.unshift(Bs(r,y,b)),y=ss(r,a),y!=null&&h.push(Bs(r,y,b))),r.tag===3)return h;r=r.return}return[]}function wR(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function px(r,a,u,h,y){for(var b=a._reactName,E=[];u!==null&&u!==h;){var L=u,B=L.alternate,Q=L.stateNode;if(L=L.tag,B!==null&&B===h)break;L!==5&&L!==26&&L!==27||Q===null||(B=Q,y?(Q=ss(u,b),Q!=null&&E.unshift(Bs(u,Q,B))):y||(Q=ss(u,b),Q!=null&&E.push(Bs(u,Q,B)))),u=u.return}E.length!==0&&r.push({event:a,listeners:E})}var ER=/\r\n?/g,kR=/\u0000|\uFFFD/g;function mx(r){return(typeof r=="string"?r:""+r).replace(ER,`
10
+ `).replace(kR,"")}function gx(r,a){return a=mx(a),mx(r)===a}function Xe(r,a,u,h,y,b){switch(u){case"children":typeof h=="string"?a==="body"||a==="textarea"&&h===""||Qo(r,h):(typeof h=="number"||typeof h=="bigint")&&a!=="body"&&Qo(r,""+h);break;case"className":Kl(r,"class",h);break;case"tabIndex":Kl(r,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Kl(r,u,h);break;case"style":gv(r,h,b);break;case"data":if(a!=="object"){Kl(r,"data",h);break}case"src":case"href":if(h===""&&(a!=="a"||u!=="href")){r.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(u);break}h=Zl(""+h),r.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){r.setAttribute(u,"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 b=="function"&&(u==="formAction"?(a!=="input"&&Xe(r,a,"name",y.name,y,null),Xe(r,a,"formEncType",y.formEncType,y,null),Xe(r,a,"formMethod",y.formMethod,y,null),Xe(r,a,"formTarget",y.formTarget,y,null)):(Xe(r,a,"encType",y.encType,y,null),Xe(r,a,"method",y.method,y,null),Xe(r,a,"target",y.target,y,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(u);break}h=Zl(""+h),r.setAttribute(u,h);break;case"onClick":h!=null&&(r.onclick=Ti);break;case"onScroll":h!=null&&Me("scroll",r);break;case"onScrollEnd":h!=null&&Me("scrollend",r);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(i(61));if(u=h.__html,u!=null){if(y.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"multiple":r.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":r.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){r.removeAttribute("xlink:href");break}u=Zl(""+h),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(u,""+h):r.removeAttribute(u);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":h&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(u,""):r.removeAttribute(u);break;case"capture":case"download":h===!0?r.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(u,h):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?r.setAttribute(u,h):r.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?r.removeAttribute(u):r.setAttribute(u,h);break;case"popover":Me("beforetoggle",r),Me("toggle",r),Xl(r,"popover",h);break;case"xlinkActuate":ki(r,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ki(r,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ki(r,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ki(r,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ki(r,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ki(r,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ki(r,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ki(r,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ki(r,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Xl(r,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=eL.get(u)||u,Xl(r,u,h))}}function up(r,a,u,h,y,b){switch(u){case"style":gv(r,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(i(61));if(u=h.__html,u!=null){if(y.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"children":typeof h=="string"?Qo(r,h):(typeof h=="number"||typeof h=="bigint")&&Qo(r,""+h);break;case"onScroll":h!=null&&Me("scroll",r);break;case"onScrollEnd":h!=null&&Me("scrollend",r);break;case"onClick":h!=null&&(r.onclick=Ti);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sv.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),a=u.slice(2,y?u.length-7:void 0),b=r[nn]||null,b=b!=null?b[u]:null,typeof b=="function"&&r.removeEventListener(a,b,y),typeof h=="function")){typeof b!="function"&&b!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(a,h,y);break e}u in r?r[u]=h:h===!0?r.setAttribute(u,""):Xl(r,u,h)}}}function Ht(r,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",r),Me("load",r);var h=!1,y=!1,b;for(b in u)if(u.hasOwnProperty(b)){var E=u[b];if(E!=null)switch(b){case"src":h=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Xe(r,a,b,E,u,null)}}y&&Xe(r,a,"srcSet",u.srcSet,u,null),h&&Xe(r,a,"src",u.src,u,null);return;case"input":Me("invalid",r);var L=b=E=y=null,B=null,Q=null;for(h in u)if(u.hasOwnProperty(h)){var ie=u[h];if(ie!=null)switch(h){case"name":y=ie;break;case"type":E=ie;break;case"checked":B=ie;break;case"defaultChecked":Q=ie;break;case"value":b=ie;break;case"defaultValue":L=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,a));break;default:Xe(r,a,h,ie,u,null)}}fv(r,b,L,B,Q,E,y,!1);return;case"select":Me("invalid",r),h=E=b=null;for(y in u)if(u.hasOwnProperty(y)&&(L=u[y],L!=null))switch(y){case"value":b=L;break;case"defaultValue":E=L;break;case"multiple":h=L;default:Xe(r,a,y,L,u,null)}a=b,u=E,r.multiple=!!h,a!=null?Ko(r,!!h,a,!1):u!=null&&Ko(r,!!h,u,!0);return;case"textarea":Me("invalid",r),b=y=h=null;for(E in u)if(u.hasOwnProperty(E)&&(L=u[E],L!=null))switch(E){case"value":h=L;break;case"defaultValue":y=L;break;case"children":b=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(i(91));break;default:Xe(r,a,E,L,u,null)}pv(r,h,y,b);return;case"option":for(B in u)u.hasOwnProperty(B)&&(h=u[B],h!=null)&&(B==="selected"?r.selected=h&&typeof h!="function"&&typeof h!="symbol":Xe(r,a,B,h,u,null));return;case"dialog":Me("beforetoggle",r),Me("toggle",r),Me("cancel",r),Me("close",r);break;case"iframe":case"object":Me("load",r);break;case"video":case"audio":for(h=0;h<js.length;h++)Me(js[h],r);break;case"image":Me("error",r),Me("load",r);break;case"details":Me("toggle",r);break;case"embed":case"source":case"link":Me("error",r),Me("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in u)if(u.hasOwnProperty(Q)&&(h=u[Q],h!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Xe(r,a,Q,h,u,null)}return;default:if(Cf(a)){for(ie in u)u.hasOwnProperty(ie)&&(h=u[ie],h!==void 0&&up(r,a,ie,h,u,void 0));return}}for(L in u)u.hasOwnProperty(L)&&(h=u[L],h!=null&&Xe(r,a,L,h,u,null))}function TR(r,a,u,h){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,E=null,L=null,B=null,Q=null,ie=null;for(te in u){var se=u[te];if(u.hasOwnProperty(te)&&se!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":B=se;default:h.hasOwnProperty(te)||Xe(r,a,te,null,h,se)}}for(var J in h){var te=h[J];if(se=u[J],h.hasOwnProperty(J)&&(te!=null||se!=null))switch(J){case"type":b=te;break;case"name":y=te;break;case"checked":Q=te;break;case"defaultChecked":ie=te;break;case"value":E=te;break;case"defaultValue":L=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,a));break;default:te!==se&&Xe(r,a,J,te,h,se)}}Sf(r,E,L,B,Q,ie,b,y);return;case"select":te=E=L=J=null;for(b in u)if(B=u[b],u.hasOwnProperty(b)&&B!=null)switch(b){case"value":break;case"multiple":te=B;default:h.hasOwnProperty(b)||Xe(r,a,b,null,h,B)}for(y in h)if(b=h[y],B=u[y],h.hasOwnProperty(y)&&(b!=null||B!=null))switch(y){case"value":J=b;break;case"defaultValue":L=b;break;case"multiple":E=b;default:b!==B&&Xe(r,a,y,b,h,B)}a=L,u=E,h=te,J!=null?Ko(r,!!u,J,!1):!!h!=!!u&&(a!=null?Ko(r,!!u,a,!0):Ko(r,!!u,u?[]:"",!1));return;case"textarea":te=J=null;for(L in u)if(y=u[L],u.hasOwnProperty(L)&&y!=null&&!h.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:Xe(r,a,L,null,h,y)}for(E in h)if(y=h[E],b=u[E],h.hasOwnProperty(E)&&(y!=null||b!=null))switch(E){case"value":J=y;break;case"defaultValue":te=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(i(91));break;default:y!==b&&Xe(r,a,E,y,h,b)}hv(r,J,te);return;case"option":for(var ye in u)J=u[ye],u.hasOwnProperty(ye)&&J!=null&&!h.hasOwnProperty(ye)&&(ye==="selected"?r.selected=!1:Xe(r,a,ye,null,h,J));for(B in h)J=h[B],te=u[B],h.hasOwnProperty(B)&&J!==te&&(J!=null||te!=null)&&(B==="selected"?r.selected=J&&typeof J!="function"&&typeof J!="symbol":Xe(r,a,B,J,h,te));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 xe in u)J=u[xe],u.hasOwnProperty(xe)&&J!=null&&!h.hasOwnProperty(xe)&&Xe(r,a,xe,null,h,J);for(Q in h)if(J=h[Q],te=u[Q],h.hasOwnProperty(Q)&&J!==te&&(J!=null||te!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(i(137,a));break;default:Xe(r,a,Q,J,h,te)}return;default:if(Cf(a)){for(var Ke in u)J=u[Ke],u.hasOwnProperty(Ke)&&J!==void 0&&!h.hasOwnProperty(Ke)&&up(r,a,Ke,void 0,h,J);for(ie in h)J=h[ie],te=u[ie],!h.hasOwnProperty(ie)||J===te||J===void 0&&te===void 0||up(r,a,ie,J,h,te);return}}for(var G in u)J=u[G],u.hasOwnProperty(G)&&J!=null&&!h.hasOwnProperty(G)&&Xe(r,a,G,null,h,J);for(se in h)J=h[se],te=u[se],!h.hasOwnProperty(se)||J===te||J==null&&te==null||Xe(r,a,se,J,h,te)}function yx(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AR(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var y=u[h],b=y.transferSize,E=y.initiatorType,L=y.duration;if(b&&L&&yx(E)){for(E=0,L=y.responseEnd,h+=1;h<u.length;h++){var B=u[h],Q=B.startTime;if(Q>L)break;var ie=B.transferSize,se=B.initiatorType;ie&&yx(se)&&(B=B.responseEnd,E+=ie*(B<L?1:(L-Q)/(B-Q)))}if(--h,a+=8*(b+E)/(y.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var cp=null,dp=null;function Wu(r){return r.nodeType===9?r:r.ownerDocument}function vx(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bx(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function fp(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var hp=null;function LR(){var r=window.event;return r&&r.type==="popstate"?r===hp?!1:(hp=r,!0):(hp=null,!1)}var xx=typeof setTimeout=="function"?setTimeout:void 0,RR=typeof clearTimeout=="function"?clearTimeout:void 0,Sx=typeof Promise=="function"?Promise:void 0,OR=typeof queueMicrotask=="function"?queueMicrotask:typeof Sx<"u"?function(r){return Sx.resolve(null).then(r).catch(DR)}:xx;function DR(r){setTimeout(function(){throw r})}function Tr(r){return r==="head"}function _x(r,a){var u=a,h=0;do{var y=u.nextSibling;if(r.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(h===0){r.removeChild(y),Aa(a);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")Us(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,Us(u);for(var b=u.firstChild;b;){var E=b.nextSibling,L=b.nodeName;b[os]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=E}}else u==="body"&&Us(r.ownerDocument.body);u=y}while(u);Aa(a)}function Cx(r,a){var u=r;r=0;do{var h=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=h}while(u)}function pp(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":pp(u),bf(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function MR(r,a,u,h){for(;r.nodeType===1;){var y=u;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!h&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(h){if(!r[os])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(b=r.getAttribute("rel"),b==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(b!==y.rel||r.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||r.getAttribute("title")!==(y.title==null?null:y.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(b=r.getAttribute("src"),(b!==(y.src==null?null:y.src)||r.getAttribute("type")!==(y.type==null?null:y.type)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&r.getAttribute("name")===b)return r}else return r;if(r=Nn(r.nextSibling),r===null)break}return null}function IR(r,a,u){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=Nn(r.nextSibling),r===null))return null;return r}function wx(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Nn(r.nextSibling),r===null))return null;return r}function mp(r){return r.data==="$?"||r.data==="$~"}function gp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function NR(r,a){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||u.readyState!=="loading")a();else{var h=function(){a(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),r._reactRetry=h}}function Nn(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var yp=null;function Ex(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(a===0)return Nn(r.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}r=r.nextSibling}return null}function kx(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return r;a--}else u!=="/$"&&u!=="/&"||a++}r=r.previousSibling}return null}function Tx(r,a,u){switch(a=Wu(u),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Us(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);bf(r)}var zn=new Map,Ax=new Set;function Yu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Fi=$.d;$.d={f:zR,r:PR,D:HR,C:jR,L:BR,m:UR,X:FR,S:VR,M:GR};function zR(){var r=Fi.f(),a=ju();return r||a}function PR(r){var a=Wo(r);a!==null&&a.tag===5&&a.type==="form"?$0(a):Fi.r(r)}var Ea=typeof document>"u"?null:document;function Lx(r,a,u){var h=Ea;if(h&&typeof a=="string"&&a){var y=An(a);y='link[rel="'+r+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),Ax.has(y)||(Ax.add(y),r={rel:r,crossOrigin:u,href:a},h.querySelector(y)===null&&(a=h.createElement("link"),Ht(a,"link",r),At(a),h.head.appendChild(a)))}}function HR(r){Fi.D(r),Lx("dns-prefetch",r,null)}function jR(r,a){Fi.C(r,a),Lx("preconnect",r,a)}function BR(r,a,u){Fi.L(r,a,u);var h=Ea;if(h&&r&&a){var y='link[rel="preload"][as="'+An(a)+'"]';a==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+An(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+An(u.imageSizes)+'"]')):y+='[href="'+An(r)+'"]';var b=y;switch(a){case"style":b=ka(r);break;case"script":b=Ta(r)}zn.has(b)||(r=m({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:r,as:a},u),zn.set(b,r),h.querySelector(y)!==null||a==="style"&&h.querySelector(Vs(b))||a==="script"&&h.querySelector(Fs(b))||(a=h.createElement("link"),Ht(a,"link",r),At(a),h.head.appendChild(a)))}}function UR(r,a){Fi.m(r,a);var u=Ea;if(u&&r){var h=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+An(h)+'"][href="'+An(r)+'"]',b=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Ta(r)}if(!zn.has(b)&&(r=m({rel:"modulepreload",href:r},a),zn.set(b,r),u.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Fs(b)))return}h=u.createElement("link"),Ht(h,"link",r),At(h),u.head.appendChild(h)}}}function VR(r,a,u){Fi.S(r,a,u);var h=Ea;if(h&&r){var y=Yo(h).hoistableStyles,b=ka(r);a=a||"default";var E=y.get(b);if(!E){var L={loading:0,preload:null};if(E=h.querySelector(Vs(b)))L.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":a},u),(u=zn.get(b))&&vp(r,u);var B=E=h.createElement("link");At(B),Ht(B,"link",r),B._p=new Promise(function(Q,ie){B.onload=Q,B.onerror=ie}),B.addEventListener("load",function(){L.loading|=1}),B.addEventListener("error",function(){L.loading|=2}),L.loading|=4,Xu(E,a,h)}E={type:"stylesheet",instance:E,count:1,state:L},y.set(b,E)}}}function FR(r,a){Fi.X(r,a);var u=Ea;if(u&&r){var h=Yo(u).hoistableScripts,y=Ta(r),b=h.get(y);b||(b=u.querySelector(Fs(y)),b||(r=m({src:r,async:!0},a),(a=zn.get(y))&&bp(r,a),b=u.createElement("script"),At(b),Ht(b,"link",r),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(y,b))}}function GR(r,a){Fi.M(r,a);var u=Ea;if(u&&r){var h=Yo(u).hoistableScripts,y=Ta(r),b=h.get(y);b||(b=u.querySelector(Fs(y)),b||(r=m({src:r,async:!0,type:"module"},a),(a=zn.get(y))&&bp(r,a),b=u.createElement("script"),At(b),Ht(b,"link",r),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(y,b))}}function Rx(r,a,u,h){var y=(y=re.current)?Yu(y):null;if(!y)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=ka(u.href),u=Yo(y).hoistableStyles,h=u.get(a),h||(h={type:"style",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=ka(u.href);var b=Yo(y).hoistableStyles,E=b.get(r);if(E||(y=y.ownerDocument||y,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(r,E),(b=y.querySelector(Vs(r)))&&!b._p&&(E.instance=b,E.state.loading=5),zn.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},zn.set(r,u),b||$R(y,r,u,E.state))),a&&h===null)throw Error(i(528,""));return E}if(a&&h!==null)throw Error(i(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ta(u),u=Yo(y).hoistableScripts,h=u.get(a),h||(h={type:"script",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function ka(r){return'href="'+An(r)+'"'}function Vs(r){return'link[rel="stylesheet"]['+r+"]"}function Ox(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function $R(r,a,u,h){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?h.loading=1:(a=r.createElement("link"),h.preload=a,a.addEventListener("load",function(){return h.loading|=1}),a.addEventListener("error",function(){return h.loading|=2}),Ht(a,"link",u),At(a),r.head.appendChild(a))}function Ta(r){return'[src="'+An(r)+'"]'}function Fs(r){return"script[async]"+r}function Dx(r,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var h=r.querySelector('style[data-href~="'+An(u.href)+'"]');if(h)return a.instance=h,At(h),h;var y=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(r.ownerDocument||r).createElement("style"),At(h),Ht(h,"style",y),Xu(h,u.precedence,r),a.instance=h;case"stylesheet":y=ka(u.href);var b=r.querySelector(Vs(y));if(b)return a.state.loading|=4,a.instance=b,At(b),b;h=Ox(u),(y=zn.get(y))&&vp(h,y),b=(r.ownerDocument||r).createElement("link"),At(b);var E=b;return E._p=new Promise(function(L,B){E.onload=L,E.onerror=B}),Ht(b,"link",h),a.state.loading|=4,Xu(b,u.precedence,r),a.instance=b;case"script":return b=Ta(u.src),(y=r.querySelector(Fs(b)))?(a.instance=y,At(y),y):(h=u,(y=zn.get(b))&&(h=m({},u),bp(h,y)),r=r.ownerDocument||r,y=r.createElement("script"),At(y),Ht(y,"link",h),r.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(h=a.instance,a.state.loading|=4,Xu(h,u.precedence,r));return a.instance}function Xu(r,a,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,b=y,E=0;E<h.length;E++){var L=h[E];if(L.dataset.precedence===a)b=L;else if(b!==y)break}b?b.parentNode.insertBefore(r,b.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(r,a.firstChild))}function vp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function bp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Ku=null;function Mx(r,a,u){if(Ku===null){var h=new Map,y=Ku=new Map;y.set(u,h)}else y=Ku,h=y.get(u),h||(h=new Map,y.set(u,h));if(h.has(r))return h;for(h.set(r,null),u=u.getElementsByTagName(r),y=0;y<u.length;y++){var b=u[y];if(!(b[os]||b[It]||r==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var E=b.getAttribute(a)||"";E=r+E;var L=h.get(E);L?L.push(b):h.set(E,[b])}}return h}function Ix(r,a,u){r=r.ownerDocument||r,r.head.insertBefore(u,a==="title"?r.querySelector("head > title"):null)}function qR(r,a,u){if(u===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Nx(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function WR(r,a,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=ka(h.href),b=a.querySelector(Vs(y));if(b){a=b._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Qu.bind(r),a.then(r,r)),u.state.loading|=4,u.instance=b,At(b);return}b=a.ownerDocument||a,h=Ox(h),(y=zn.get(y))&&vp(h,y),b=b.createElement("link"),At(b);var E=b;E._p=new Promise(function(L,B){E.onload=L,E.onerror=B}),Ht(b,"link",h),u.instance=b}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=Qu.bind(r),a.addEventListener("load",u),a.addEventListener("error",u))}}var xp=0;function YR(r,a){return r.stylesheets&&r.count===0&&Ju(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var h=setTimeout(function(){if(r.stylesheets&&Ju(r,r.stylesheets),r.unsuspend){var b=r.unsuspend;r.unsuspend=null,b()}},6e4+a);0<r.imgBytes&&xp===0&&(xp=62500*AR());var y=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Ju(r,r.stylesheets),r.unsuspend)){var b=r.unsuspend;r.unsuspend=null,b()}},(r.imgBytes>xp?50:800)+a);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(h),clearTimeout(y)}}:null}function Qu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ju(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Zu=null;function Ju(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Zu=new Map,a.forEach(XR,r),Zu=null,Qu.call(r))}function XR(r,a){if(!(a.state.loading&4)){var u=Zu.get(r);if(u)var h=u.get(null);else{u=new Map,Zu.set(r,u);for(var y=r.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var E=y[b];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(u.set(E.dataset.precedence,E),h=E)}h&&u.set(null,h)}y=a.instance,E=y.getAttribute("data-precedence"),b=u.get(E)||h,b===h&&u.set(null,y),u.set(E,y),this.count++,h=Qu.bind(this),y.addEventListener("load",h),y.addEventListener("error",h),b?b.parentNode.insertBefore(y,b.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(y,r.firstChild)),a.state.loading|=4}}var Gs={$$typeof:k,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function KR(r,a,u,h,y,b,E,L,B){this.tag=1,this.containerInfo=r,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=mf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mf(0),this.hiddenUpdates=mf(null),this.identifierPrefix=h,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function zx(r,a,u,h,y,b,E,L,B,Q,ie,se){return r=new KR(r,a,u,E,B,Q,ie,se,L),a=1,b===!0&&(a|=24),b=yn(3,null,null,a),r.current=b,b.stateNode=r,a=Jf(),a.refCount++,r.pooledCache=a,a.refCount++,b.memoizedState={element:h,isDehydrated:u,cache:a},ih(b),r}function Px(r){return r?(r=ra,r):ra}function Hx(r,a,u,h,y,b){y=Px(y),h.context===null?h.context=y:h.pendingContext=y,h=gr(a),h.payload={element:u},b=b===void 0?null:b,b!==null&&(h.callback=b),u=yr(r,h,a),u!==null&&(un(u,r,a),_s(u,r,a))}function jx(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<a?u:a}}function Sp(r,a){jx(r,a),(r=r.alternate)&&jx(r,a)}function Bx(r){if(r.tag===13||r.tag===31){var a=Jr(r,67108864);a!==null&&un(a,r,67108864),Sp(r,67108864)}}function Ux(r){if(r.tag===13||r.tag===31){var a=_n();a=gf(a);var u=Jr(r,a);u!==null&&un(u,r,a),Sp(r,a)}}var ec=!0;function QR(r,a,u,h){var y=P.T;P.T=null;var b=$.p;try{$.p=2,_p(r,a,u,h)}finally{$.p=b,P.T=y}}function ZR(r,a,u,h){var y=P.T;P.T=null;var b=$.p;try{$.p=8,_p(r,a,u,h)}finally{$.p=b,P.T=y}}function _p(r,a,u,h){if(ec){var y=Cp(h);if(y===null)lp(r,a,h,tc,u),Fx(r,h);else if(eO(y,r,a,u,h))h.stopPropagation();else if(Fx(r,h),a&4&&-1<JR.indexOf(r)){for(;y!==null;){var b=Wo(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=Yr(b.pendingLanes);if(E!==0){var L=b;for(L.pendingLanes|=2,L.entangledLanes|=2;E;){var B=1<<31-Ze(E);L.entanglements[1]|=B,E&=~B}ai(b),(Fe&6)===0&&(Pu=Yt()+500,Hs(0))}}break;case 31:case 13:L=Jr(b,2),L!==null&&un(L,b,2),ju(),Sp(b,2)}if(b=Cp(h),b===null&&lp(r,a,h,tc,u),b===y)break;y=b}y!==null&&h.stopPropagation()}else lp(r,a,h,null,u)}}function Cp(r){return r=Ef(r),wp(r)}var tc=null;function wp(r){if(tc=null,r=qo(r),r!==null){var a=s(r);if(a===null)r=null;else{var u=a.tag;if(u===13){if(r=l(a),r!==null)return r;r=null}else if(u===31){if(r=c(a),r!==null)return r;r=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return tc=r,null}function Vx(r){switch(r){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(pf()){case oe:return 2;case he:return 8;case Se:case Oe:return 32;case $e:return 268435456;default:return 32}default:return 32}}var Ep=!1,Ar=null,Lr=null,Rr=null,$s=new Map,qs=new Map,Or=[],JR="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 Fx(r,a){switch(r){case"focusin":case"focusout":Ar=null;break;case"dragenter":case"dragleave":Lr=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":$s.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":qs.delete(a.pointerId)}}function Ws(r,a,u,h,y,b){return r===null||r.nativeEvent!==b?(r={blockedOn:a,domEventName:u,eventSystemFlags:h,nativeEvent:b,targetContainers:[y]},a!==null&&(a=Wo(a),a!==null&&Bx(a)),r):(r.eventSystemFlags|=h,a=r.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),r)}function eO(r,a,u,h,y){switch(a){case"focusin":return Ar=Ws(Ar,r,a,u,h,y),!0;case"dragenter":return Lr=Ws(Lr,r,a,u,h,y),!0;case"mouseover":return Rr=Ws(Rr,r,a,u,h,y),!0;case"pointerover":var b=y.pointerId;return $s.set(b,Ws($s.get(b)||null,r,a,u,h,y)),!0;case"gotpointercapture":return b=y.pointerId,qs.set(b,Ws(qs.get(b)||null,r,a,u,h,y)),!0}return!1}function Gx(r){var a=qo(r.target);if(a!==null){var u=s(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){r.blockedOn=a,rv(r.priority,function(){Ux(u)});return}}else if(a===31){if(a=c(u),a!==null){r.blockedOn=a,rv(r.priority,function(){Ux(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function nc(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var u=Cp(r.nativeEvent);if(u===null){u=r.nativeEvent;var h=new u.constructor(u.type,u);wf=h,u.target.dispatchEvent(h),wf=null}else return a=Wo(u),a!==null&&Bx(a),r.blockedOn=u,!1;a.shift()}return!0}function $x(r,a,u){nc(r)&&u.delete(a)}function tO(){Ep=!1,Ar!==null&&nc(Ar)&&(Ar=null),Lr!==null&&nc(Lr)&&(Lr=null),Rr!==null&&nc(Rr)&&(Rr=null),$s.forEach($x),qs.forEach($x)}function ic(r,a){r.blockedOn===a&&(r.blockedOn=null,Ep||(Ep=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,tO)))}var rc=null;function qx(r){rc!==r&&(rc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){rc===r&&(rc=null);for(var a=0;a<r.length;a+=3){var u=r[a],h=r[a+1],y=r[a+2];if(typeof h!="function"){if(wp(h||u)===null)continue;break}var b=Wo(u);b!==null&&(r.splice(a,3),a-=3,Ch(b,{pending:!0,data:y,method:u.method,action:h},h,y))}}))}function Aa(r){function a(B){return ic(B,r)}Ar!==null&&ic(Ar,r),Lr!==null&&ic(Lr,r),Rr!==null&&ic(Rr,r),$s.forEach(a),qs.forEach(a);for(var u=0;u<Or.length;u++){var h=Or[u];h.blockedOn===r&&(h.blockedOn=null)}for(;0<Or.length&&(u=Or[0],u.blockedOn===null);)Gx(u),u.blockedOn===null&&Or.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var y=u[h],b=u[h+1],E=y[nn]||null;if(typeof b=="function")E||qx(u);else if(E){var L=null;if(b&&b.hasAttribute("formAction")){if(y=b,E=b[nn]||null)L=E.formAction;else if(wp(y)!==null)continue}else L=E.action;typeof L=="function"?u[h+1]=L:(u.splice(h,3),h-=3),qx(u)}}}function Wx(){function r(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(E){return y=E})},focusReset:"manual",scroll:"manual"})}function a(){y!==null&&(y(),y=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,y=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),y!==null&&(y(),y=null)}}}function kp(r){this._internalRoot=r}oc.prototype.render=kp.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var u=a.current,h=_n();Hx(u,h,r,a,null,null)},oc.prototype.unmount=kp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;Hx(r.current,2,null,r,null,null),ju(),a[$o]=null}};function oc(r){this._internalRoot=r}oc.prototype.unstable_scheduleHydration=function(r){if(r){var a=iv();r={blockedOn:null,target:r,priority:a};for(var u=0;u<Or.length&&a!==0&&a<Or[u].priority;u++);Or.splice(u,0,r),u===0&&Gx(r)}};var Yx=t.version;if(Yx!=="19.2.8")throw Error(i(527,Yx,"19.2.8"));$.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=f(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var nO={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ac=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ac.isDisabled&&ac.supportsFiber)try{Xt=ac.inject(nO),St=ac}catch{}}return Xs.createRoot=function(r,a){if(!o(r))throw Error(i(299));var u=!1,h="",y=tb,b=nb,E=ib;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError)),a=zx(r,1,!1,null,null,u,h,null,y,b,E,Wx),r[$o]=a.current,sp(r),new kp(a)},Xs.hydrateRoot=function(r,a,u){if(!o(r))throw Error(i(299));var h=!1,y="",b=tb,E=nb,L=ib,B=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(E=u.onCaughtError),u.onRecoverableError!==void 0&&(L=u.onRecoverableError),u.formState!==void 0&&(B=u.formState)),a=zx(r,1,!0,a,u??null,h,y,B,b,E,L,Wx),a.context=Px(null),u=a.current,h=_n(),h=gf(h),y=gr(h),y.callback=null,yr(u,y,h),u=h,a.current.lanes=u,rs(a,u),ai(a),r[$o]=a.current,sp(r),new oc(a)},Xs.version="19.2.8",Xs}var rS;function hO(){if(rS)return Lp.exports;rS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Lp.exports=fO(),Lp.exports}var pO=hO();function mO(e,t){const n=getComputedStyle(e),i=parseFloat(n.fontSize);return t*i}function gO(e,t){const n=getComputedStyle(e.ownerDocument.documentElement),i=parseFloat(n.fontSize);return t*i}function yO(e){return e/100*window.innerHeight}function vO(e){return e/100*window.innerWidth}function bO(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function rl({groupSize:e,panelElement:t,styleProp:n}){let i;const[o,s]=bO(n);switch(s){case"%":{i=o/100*e;break}case"px":{i=o;break}case"rem":{i=gO(t,o);break}case"em":{i=mO(t,o);break}case"vh":{i=yO(o);break}case"vw":{i=vO(o);break}}return i}function Qt(e){return parseFloat(e.toFixed(3))}function Ya({group:e}){const{orientation:t,panels:n}=e;return n.reduce((i,o)=>(i+=t==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,i),0)}function Pm(e){const{panels:t}=e,n=Ya({group:e});return n===0?t.map(i=>({groupResizeBehavior:i.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:i.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:i.panelConstraints.disabled,minSize:0,maxSize:100,panelId:i.id})):t.map(i=>{const{element:o,panelConstraints:s}=i;let l=0;if(s.collapsedSize!==void 0){const p=rl({groupSize:n,panelElement:o,styleProp:s.collapsedSize});l=Qt(p/n*100)}let c;if(s.defaultSize!==void 0){const p=rl({groupSize:n,panelElement:o,styleProp:s.defaultSize});c=Qt(p/n*100)}let d=0;if(s.minSize!==void 0){const p=rl({groupSize:n,panelElement:o,styleProp:s.minSize});d=Qt(p/n*100)}let f=100;if(s.maxSize!==void 0){const p=rl({groupSize:n,panelElement:o,styleProp:s.maxSize});f=Qt(p/n*100)}return{groupResizeBehavior:s.groupResizeBehavior,collapsedSize:l,collapsible:s.collapsible===!0,defaultSize:c,disabled:s.disabled,minSize:d,maxSize:f,panelId:i.id}})}function Qe(e,t="Assertion error"){if(!e)throw Error(t)}function Hm(e,t){return Array.from(t).sort(e==="horizontal"?xO:SO)}function xO(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function SO(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Tw(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Aw(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function _O({orientation:e,rects:t,targetRect:n}){const i={x:n.x+n.width/2,y:n.y+n.height/2};let o,s=Number.MAX_VALUE;for(const l of t){const{x:c,y:d}=Aw(i,l),f=e==="horizontal"?c:d;f<s&&(s=f,o=l)}return Qe(o,"No rect found"),o}let sc;function CO(){return sc===void 0&&(typeof matchMedia=="function"?sc=!!matchMedia("(pointer:coarse)").matches:sc=!1),sc}function Lw(e){const{element:t,orientation:n,panels:i,separators:o}=e,s=Hm(n,Array.from(t.children).filter(Tw).map(x=>({element:x}))).map(({element:x})=>x),l=[];let c=!1,d=!1,f=-1,p=-1,m=0,g,v=[];{let x=-1;for(const S of s)S.hasAttribute("data-panel")&&(x++,S.hasAttribute("data-disabled")||(m++,f===-1&&(f=x),p=x))}if(m>1){let x=-1;for(const S of s)if(S.hasAttribute("data-panel")){x++;const C=i.find(_=>_.element===S);if(C){if(g){const _=g.element.getBoundingClientRect(),w=S.getBoundingClientRect();let k;if(d){const D=n==="horizontal"?new DOMRect(_.right,_.top,0,_.height):new DOMRect(_.left,_.bottom,_.width,0),M=n==="horizontal"?new DOMRect(w.left,w.top,0,w.height):new DOMRect(w.left,w.top,w.width,0);switch(v.length){case 0:{k=[D,M];break}case 1:{const O=v[0],z=_O({orientation:n,rects:[_,w],targetRect:O.element.getBoundingClientRect()});k=[O,z===_?M:D];break}default:{k=v;break}}}else v.length?k=v:k=[n==="horizontal"?new DOMRect(_.right,w.top,w.left-_.right,w.height):new DOMRect(w.left,_.bottom,w.width,w.top-_.bottom)];for(const D of k){let M="width"in D?D:D.element.getBoundingClientRect();const O=CO()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(M.width<O){const j=O-M.width;M=new DOMRect(M.x-j/2,M.y,M.width+j,M.height)}if(M.height<O){const j=O-M.height;M=new DOMRect(M.x,M.y-j/2,M.width,M.height+j)}const z=x<=f||x>p;!c&&!z&&l.push({group:e,groupSize:Ya({group:e}),panels:[g,C],separator:"width"in D?void 0:D,rect:M}),c=!1}}d=!1,g=C,v=[]}}else if(S.hasAttribute("data-separator")){S.ariaDisabled!==null&&(c=!0);const C=o.find(_=>_.element===S);C?v.push(C):(g=void 0,v=[])}else d=!0}return l}class Rw{#e={};addListener(t,n){const i=this.#e[t];return i===void 0?this.#e[t]=[n]:i.includes(n)||i.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const i=this.#e[t];if(i!==void 0)if(i.length===1)i[0].call(null,n);else{let o=!1,s=null;const l=Array.from(i);for(let c=0;c<l.length;c++){const d=l[c];try{d.call(null,n)}catch(f){s===null&&(o=!0,s=f)}}if(o)throw s}}removeAllListeners(){this.#e={}}removeListener(t,n){const i=this.#e[t];if(i!==void 0){const o=i.indexOf(n);o>=0&&i.splice(o,1)}}}let Ba={cursorFlags:0,state:"inactive"};const Xg=new Rw;function Lo(){return Ba}function wO(e){return Xg.addListener("change",e)}function EO(e){const t=Ba,n={...Ba};n.cursorFlags=e,Ba=n,Xg.emit("change",{prev:t,next:n})}function Ua(e){const t=Ba;Ba=e,Xg.emit("change",{prev:t,next:e})}const kO=e=>e,Mp=()=>{},Ow=1,Dw=2,Mw=4,Iw=8,oS=3,aS=12;let lc;function sS(){return lc===void 0&&(lc=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(lc=!0)),lc}function TO({cursorFlags:e,groups:t,state:n}){let i=0,o=0;switch(n){case"active":case"hover":t.forEach(s=>{if(!s.mutableState.disableCursor)switch(s.orientation){case"horizontal":{i++;break}case"vertical":{o++;break}}})}if(!(i===0&&o===0)){switch(n){case"active":{if(e&&sS()){const s=(e&Ow)!==0,l=(e&Dw)!==0,c=(e&Mw)!==0,d=(e&Iw)!==0;if(s)return c?"se-resize":d?"ne-resize":"e-resize";if(l)return c?"sw-resize":d?"nw-resize":"w-resize";if(c)return"s-resize";if(d)return"n-resize"}break}}return sS()?i>0&&o>0?"move":i>0?"ew-resize":"ns-resize":i>0&&o>0?"grab":i>0?"col-resize":"row-resize"}}const lS=new WeakMap;function Kg(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=lS.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));const i=Lo();switch(i.state){case"active":case"hover":{const o=TO({cursorFlags:i.cursorFlags,groups:i.hitRegions.map(l=>l.group),state:i.state}),s=`*, *:hover {cursor: ${o} !important; }`;if(t===s)return;t=s,o?n.cssRules.length===0?n.insertRule(s):n.replaceSync(s):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}lS.set(e,{prevStyle:t,styleSheet:n})}let vi=new Map;const Nw=new Rw;function AO(e){vi=new Map(vi),vi.delete(e)}function uS(e,t){for(const[n]of vi)if(n.id===e)return n}function Br(e,t){for(const[n,i]of vi)if(n.id===e)return i;if(t)throw Error(`Could not find data for Group with id ${e}`)}function jo(){return vi}function Qg(e,t){return Nw.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function tr(e,t,n){const i=vi.get(e);vi=new Map(vi),vi.set(e,t),Nw.emit("groupChange",{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:i,next:t})}function zw(e){const t=Lo();let n=!1;return t.state==="active"&&(Ua({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(Kg(e),n=!0,t.hitRegions.forEach(i=>{const o=Br(i.group.id,!0);tr(i.group,o,{isUserInteraction:!0})}))),n}function cS(e){e.defaultPrevented||zw(e.currentTarget)}function LO(e,t,n){let i,o={x:1/0,y:1/0};for(const s of t){const l=Aw(n,s.rect);switch(e){case"horizontal":{l.x<=o.x&&(i=s,o=l);break}case"vertical":{l.y<=o.y&&(i=s,o=l);break}}}return i?{distance:o,hitRegion:i}:void 0}function RO(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function OO(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:hS(e),b:hS(t)};let i;for(;n.a.at(-1)===n.b.at(-1);)i=n.a.pop(),n.b.pop();Qe(i,"Stacking order can only be calculated for elements with a common ancestor");const o={a:fS(dS(n.a)),b:fS(dS(n.b))};if(o.a===o.b){const s=i.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let c=s.length;for(;c--;){const d=s[c];if(d===l.a)return 1;if(d===l.b)return-1}}return Math.sign(o.a-o.b)}const DO=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function MO(e){const t=getComputedStyle(Pw(e)??e).display;return t==="flex"||t==="inline-flex"}function IO(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||MO(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||DO.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function dS(e){let t=e.length;for(;t--;){const n=e[t];if(Qe(n,"Missing node"),IO(n))return n}return null}function fS(e){return e&&Number(getComputedStyle(e).zIndex)||0}function hS(e){const t=[];for(;e;)t.push(e),e=Pw(e);return t}function Pw(e){const{parentNode:t}=e;return RO(t)?t.host:t}function NO(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function zO({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Tw(n)||n.contains(e)||e.contains(n))return!0;if(OO(n,e)>0){let i=n;for(;i;){if(i.contains(e))return!0;if(NO(i.getBoundingClientRect(),t))return!1;i=i.parentElement}}return!0}function Zg(e,t){const n=[];return t.forEach((i,o)=>{if(o.disabled)return;const s=Lw(o),l=LO(o.orientation,s,{x:e.clientX,y:e.clientY});l&&l.distance.x<=0&&l.distance.y<=0&&zO({groupElement:o.element,hitRegion:l.hitRegion.rect,pointerEventTarget:e.target})&&n.push(l.hitRegion)}),n}function PO(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Ft(e,t,n=0){return Math.abs(Qt(e)-Qt(t))<=n}function fi(e,t){return Ft(e,t)?0:e>t?1:-1}function Pa({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:i}){const{collapsedSize:o=0,collapsible:s,disabled:l,maxSize:c=100,minSize:d=0}=t;if(l&&!e)return n;if(fi(i,d)<0)if(s){const f=(o+d)/2;fi(i,f)<0?i=o:i=d}else i=d;return i=Math.min(c,i),i=Qt(i),i}function vl({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:i,prevLayout:o,trigger:s}){if(Ft(e,0))return t;const l=s==="imperative-api",c=Object.values(t),d=Object.values(o),f=[...c],[p,m]=i;Qe(p!=null,"Invalid first pivot index"),Qe(m!=null,"Invalid second pivot index");let g=0;switch(s){case"keyboard":{{const S=e<0?m:p,C=n[S];Qe(C,`Panel constraints not found for index ${S}`);const{collapsedSize:_=0,collapsible:w,minSize:k=0}=C;if(w){const D=c[S];if(Qe(D!=null,`Previous layout not found for panel index ${S}`),Ft(D,_)){const M=k-D;fi(M,Math.abs(e))>0&&(e=e<0?0-M:M)}}}{const S=e<0?p:m,C=n[S];Qe(C,`No panel constraints found for index ${S}`);const{collapsedSize:_=0,collapsible:w,minSize:k=0}=C;if(w){const D=c[S];if(Qe(D!=null,`Previous layout not found for panel index ${S}`),Ft(D,k)){const M=D-_;fi(M,Math.abs(e))>0&&(e=e<0?0-M:M)}}}break}default:{const S=e<0?m:p,C=n[S];Qe(C,`Panel constraints not found for index ${S}`);const _=c[S],{collapsible:w,collapsedSize:k,minSize:D}=C;if(w&&fi(_,D)<0)if(e>0){const M=D-k,O=M/2,z=_+e;fi(z,D)<0&&(e=fi(e,O)<=0?0:M)}else{const M=D-k,O=100-M/2,z=_-e;fi(z,D)<0&&(e=fi(100+e,O)>0?0:-M)}break}}{const S=e<0?1:-1;let C=e<0?m:p,_=0;for(;;){const k=c[C];Qe(k!=null,`Previous layout not found for panel index ${C}`);const D=Pa({overrideDisabledPanels:l,panelConstraints:n[C],prevSize:k,size:100})-k;if(_+=D,C+=S,C<0||C>=n.length)break}const w=Math.min(Math.abs(e),Math.abs(_));e=e<0?0-w:w}{let S=e<0?p:m;for(;S>=0&&S<n.length;){const C=Math.abs(e)-Math.abs(g),_=c[S];Qe(_!=null,`Previous layout not found for panel index ${S}`);const w=_-C,k=Pa({overrideDisabledPanels:l,panelConstraints:n[S],prevSize:_,size:w});if(!Ft(_,k)&&(g+=_-k,f[S]=k,g.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?S--:S++}}if(PO(d,f))return o;{const S=e<0?m:p,C=c[S];Qe(C!=null,`Previous layout not found for panel index ${S}`);const _=C+g,w=Pa({overrideDisabledPanels:l,panelConstraints:n[S],prevSize:C,size:_});if(f[S]=w,!Ft(w,_)){let k=_-w,D=e<0?m:p;for(;D>=0&&D<n.length;){const M=f[D];Qe(M!=null,`Previous layout not found for panel index ${D}`);const O=M+k,z=Pa({overrideDisabledPanels:l,panelConstraints:n[D],prevSize:M,size:O});if(Ft(M,z)||(k-=z-M,f[D]=z),Ft(k,0))break;e>0?D--:D++}}}const v=Object.values(f).reduce((S,C)=>C+S,0);if(!Ft(v,100,.1))return o;const x=Object.keys(o);return f.reduce((S,C,_)=>(S[x[_]]=C,S),{})}function Ro(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||fi(e[n],t[n])!==0)return!1;return!0}function Oo({layout:e,panelConstraints:t}){const n=Object.values(e),i=[...n],o=i.reduce((c,d)=>c+d,0);if(i.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${i.map(c=>`${c}%`).join(", ")}`);if(!Ft(o,100)&&i.length>0)for(let c=0;c<t.length;c++){const d=i[c];Qe(d!=null,`No layout data found for index ${c}`);const f=100/o*d;i[c]=f}let s=0;for(let c=0;c<t.length;c++){const d=n[c];Qe(d!=null,`No layout data found for index ${c}`);const f=i[c];Qe(f!=null,`No layout data found for index ${c}`);const p=Pa({overrideDisabledPanels:!0,panelConstraints:t[c],prevSize:d,size:f});f!=p&&(s+=f-p,i[c]=p)}if(!Ft(s,0))for(let c=0;c<t.length;c++){const d=i[c];Qe(d!=null,`No layout data found for index ${c}`);const f=d+s,p=Pa({overrideDisabledPanels:!0,panelConstraints:t[c],prevSize:d,size:f});if(d!==p&&(s-=p-d,i[c]=p,Ft(s,0)))break}const l=Object.keys(e);return i.reduce((c,d,f)=>(c[l[f]]=d,c),{})}function Hw({groupId:e,panelId:t}){const n=()=>{const d=jo();for(const[f,{defaultLayoutDeferred:p,derivedPanelConstraints:m,layout:g,groupSize:v,separatorToPanels:x}]of d)if(f.id===e)return{defaultLayoutDeferred:p,derivedPanelConstraints:m,group:f,groupSize:v,layout:g,separatorToPanels:x};throw Error(`Group ${e} not found`)},i=()=>{const d=n().derivedPanelConstraints.find(f=>f.panelId===t);if(d!==void 0)return d;throw Error(`Panel constraints not found for Panel ${t}`)},o=()=>{const d=n().group.panels.find(f=>f.id===t);if(d!==void 0)return d;throw Error(`Layout not found for Panel ${t}`)},s=()=>{const d=n().layout[t];if(d!==void 0)return d;throw Error(`Layout not found for Panel ${t}`)},l=({nextSize:d,panels:f,prevLayout:p,derivedPanelConstraints:m})=>{const g=s(),v=f.findIndex(C=>C.id===t),x=v===0,S=v===f.length-1;if(S&&d<g&&(x||f.slice(0,v).every((C,_)=>{const w=m[_];return w?.collapsible&&Ft(w.collapsedSize,p[w.panelId])}))){const C=f.slice(0,v).reduce((_,w)=>_+p[w.id],0);return{...p,[t]:Qt(100-C)}}return vl({delta:S?g-d:d-g,initialLayout:p,panelConstraints:m,pivotIndices:S?[v-1,v]:[v,v+1],prevLayout:p,trigger:"imperative-api"})},c=d=>{const f=s();if(d===f)return;const{defaultLayoutDeferred:p,derivedPanelConstraints:m,group:g,groupSize:v,layout:x,separatorToPanels:S}=n(),C=l({nextSize:d,panels:g.panels,prevLayout:x,derivedPanelConstraints:m}),_=Oo({layout:C,panelConstraints:m});Ro(x,_)||tr(g,{defaultLayoutDeferred:p,derivedPanelConstraints:m,groupSize:v,layout:_,separatorToPanels:S})};return{collapse:()=>{const{collapsible:d,collapsedSize:f}=i(),{mutableValues:p}=o(),m=s();d&&m!==f&&(p.expandToSize=m,c(f))},expand:()=>{const{collapsible:d,collapsedSize:f,minSize:p}=i(),{mutableValues:m}=o(),g=s();if(d&&g===f){let v=m.expandToSize??p;v===0&&(v=1),c(v)}},getSize:()=>{const{group:d}=n(),f=s(),{element:p}=o(),m=d.orientation==="horizontal"?p.offsetWidth:p.offsetHeight;return{asPercentage:f,inPixels:m}},isCollapsed:()=>{const{collapsible:d,collapsedSize:f}=i(),p=s();return d&&Ft(f,p)},resize:d=>{const{group:f}=n(),{element:p}=o(),m=Ya({group:f}),g=rl({groupSize:m,panelElement:p,styleProp:d}),v=Qt(g/m*100);c(v)}}}function pS(e){if(e.defaultPrevented)return;const t=jo();Zg(e,t).forEach(n=>{if(n.separator&&!n.separator.disableDoubleClick){const i=n.panels.find(o=>o.panelConstraints.defaultSize!==void 0);if(i){const o=i.panelConstraints.defaultSize,s=Hw({groupId:n.group.id,panelId:i.id});s&&o!==void 0&&(s.resize(o),e.preventDefault())}}})}function $c(e){const t=jo();for(const[n]of t)if(n.separators.some(i=>i.element===e))return n;throw Error("Could not find parent Group for separator element")}function jw({groupId:e}){const t=()=>{const n=jo();for(const[i,o]of n)if(i.id===e)return{group:i,...o};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:i}=t();return n?{}:i},setLayout(n){const{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,groupSize:l,layout:c,separatorToPanels:d}=t(),f=Oo({layout:n,panelConstraints:o});return i?c:(Ro(c,f)||tr(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,groupSize:l,layout:f,separatorToPanels:d}),f)}}}function ho(e,t){const n=$c(e),i=Br(n.id,!0),o=n.separators.find(p=>p.element===e);Qe(o,"Matching separator not found");const s=i.separatorToPanels.get(o);Qe(s,"Matching panels not found");const l=s.map(p=>n.panels.indexOf(p)),c=jw({groupId:n.id}).getLayout(),d=vl({delta:t,initialLayout:c,panelConstraints:i.derivedPanelConstraints,pivotIndices:l,prevLayout:c,trigger:"keyboard"}),f=Oo({layout:d,panelConstraints:i.derivedPanelConstraints});Ro(c,f)||tr(n,{defaultLayoutDeferred:i.defaultLayoutDeferred,derivedPanelConstraints:i.derivedPanelConstraints,groupSize:i.groupSize,layout:f,separatorToPanels:i.separatorToPanels},{isUserInteraction:!0})}function mS(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=$c(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&ho(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&ho(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&ho(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&ho(t,-5);break}case"End":{e.preventDefault(),ho(t,100);break}case"Enter":{e.preventDefault();const i=$c(t),o=Br(i.id,!0),{derivedPanelConstraints:s,layout:l,separatorToPanels:c}=o,d=i.separators.find(g=>g.element===t);Qe(d,"Matching separator not found");const f=c.get(d);Qe(f,"Matching panels not found");const p=f[0],m=s.find(g=>g.panelId===p.id);if(Qe(m,"Panel metadata not found"),m.collapsible){const g=l[p.id],v=m.collapsedSize===g?i.mutableState.expandedPanelSizes[p.id]??m.minSize:m.collapsedSize;ho(t,v-g)}break}case"F6":{e.preventDefault();const i=$c(t).separators.map(l=>l.element),o=Array.from(i).findIndex(l=>l===e.currentTarget);Qe(o!==null,"Index not found");const s=e.shiftKey?o>0?o-1:i.length-1:o+1<i.length?o+1:0;i[s].focus({preventScroll:!0});break}case"Home":{e.preventDefault(),ho(t,-100);break}}}function gS(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=jo(),n=Zg(e,t),i=new Map;let o=!1;n.forEach(s=>{s.separator&&(o||(o=!0,s.separator.element.focus({focusVisible:!1,preventScroll:!0})));const l=t.get(s.group);l&&i.set(s.group,l.layout)}),Ua({cursorFlags:0,hitRegions:n,initialLayoutMap:i,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}function Bw({document:e,event:t,hitRegions:n,initialLayoutMap:i,mountedGroups:o,pointerDownAtPoint:s,prevCursorFlags:l}){let c=0;n.forEach(f=>{const{group:p,groupSize:m}=f,{orientation:g,panels:v}=p,{disableCursor:x}=p.mutableState;let S=0;s?g==="horizontal"?S=(t.clientX-s.x)/m*100:S=(t.clientY-s.y)/m*100:g==="horizontal"?S=t.clientX<0?-100:100:S=t.clientY<0?-100:100;const C=i.get(p),_=o.get(p);if(!C||!_)return;const{defaultLayoutDeferred:w,derivedPanelConstraints:k,groupSize:D,layout:M,separatorToPanels:O}=_;if(k&&M&&O){const z=vl({delta:S,initialLayout:C,panelConstraints:k,pivotIndices:f.panels.map(j=>v.indexOf(j)),prevLayout:M,trigger:"mouse-or-touch"});if(Ro(z,M)){if(S!==0&&!x)switch(g){case"horizontal":{c|=S<0?Ow:Dw;break}case"vertical":{c|=S<0?Mw:Iw;break}}}else tr(f.group,{defaultLayoutDeferred:w,derivedPanelConstraints:k,groupSize:D,layout:z,separatorToPanels:O})}});let d=0;t.movementX===0?d|=l&oS:d|=c&oS,t.movementY===0?d|=l&aS:d|=c&aS,EO(d),Kg(e)}function yS(e){const t=jo(),n=Lo();n.state==="active"&&Bw({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function vS(e){if(e.defaultPrevented)return;const t=Lo(),n=jo();switch(t.state){case"active":{if(e.buttons===0){Ua({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(i=>{const o=Br(i.group.id,!0);tr(i.group,o,{isUserInteraction:!0})});return}for(const i of t.hitRegions)if(i.separator){const{element:o}=i.separator;o.hasPointerCapture?.(e.pointerId)||o.setPointerCapture?.(e.pointerId)}Bw({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const i=Zg(e,n);i.length===0?t.state!=="inactive"&&Ua({cursorFlags:0,state:"inactive"}):Ua({cursorFlags:0,hitRegions:i,state:"hover"}),Kg(e.currentTarget);break}}}function bS(e){e.relatedTarget instanceof HTMLIFrameElement&&Lo().state==="hover"&&Ua({cursorFlags:0,state:"inactive"})}function xS(e){e.defaultPrevented||e.pointerType==="mouse"&&e.button>0||zw(e.currentTarget)&&e.preventDefault()}function SS(e){let t=0,n=0;const i={};for(const s of e)if(s.defaultSize!==void 0){t++;const l=Qt(s.defaultSize);n+=l,i[s.panelId]=l}else i[s.panelId]=void 0;const o=e.length-t;if(o!==0){const s=Qt((100-n)/o);for(const l of e)l.defaultSize===void 0&&(i[l.panelId]=s)}return i}function HO(e,t,n){if(!n[0])return;const i=e.panels.find(d=>d.element===t);if(!i||!i.onResize)return;const o=Ya({group:e}),s=e.orientation==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,l=i.mutableValues.prevSize,c={asPercentage:Qt(s/o*100),inPixels:s};i.mutableValues.prevSize=c,i.onResize(c,i.id,l)}function jO(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function BO({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:i}){if(n<=0||t<=0||n===t)return i;let o=0,s=0,l=!1;const c=new Map,d=[];for(const m of e.panels){const g=i[m.id]??0;if(m.panelConstraints.groupResizeBehavior==="preserve-pixel-size"){l=!0;const v=g/100*n,x=Qt(v/t*100);c.set(m.id,x),o+=x}else d.push(m.id),s+=g}if(!l||d.length===0)return i;const f=100-o,p={...i};if(c.forEach((m,g)=>{p[g]=m}),s>0)for(const m of d){const g=i[m]??0;p[m]=Qt(g/s*f)}else{const m=Qt(f/d.length);for(const g of d)p[g]=m}return p}function UO(e,t){const n=e.map(o=>o.id),i=Object.keys(t);if(n.length!==i.length)return!1;for(const o of n)if(!i.includes(o))return!1;return!0}const La=new Map;function VO(e){let t=!0;Qe(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,i=new Set,o=new Set,s=new n(x=>{for(const S of x){const{borderBoxSize:C,target:_}=S;if(_===e.element){if(t){const w=Ya({group:e});if(w===0)return;const k=Br(e.id);if(!k)return;const D=Pm(e),M=k.defaultLayoutDeferred?SS(D):k.layout,O=BO({group:e,nextGroupSize:w,prevGroupSize:k.groupSize,prevLayout:M}),z=Oo({layout:O,panelConstraints:D});if(!k.defaultLayoutDeferred&&Ro(k.layout,z)&&jO(k.derivedPanelConstraints,D)&&k.groupSize===w)return;tr(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:D,groupSize:w,layout:z,separatorToPanels:k.separatorToPanels})}}else HO(e,_,C)}});s.observe(e.element),e.panels.forEach(x=>{Qe(!i.has(x.id),`Panel ids must be unique; id "${x.id}" was used more than once`),i.add(x.id),x.onResize&&s.observe(x.element)});const l=Ya({group:e}),c=Pm(e),d=e.panels.map(({id:x})=>x).join(",");let f=e.mutableState.defaultLayout;f&&(UO(e.panels,f)||(f=void 0));const p=e.mutableState.layouts[d]??f??SS(c),m=Oo({layout:p,panelConstraints:c}),g=e.element.ownerDocument;La.set(g,(La.get(g)??0)+1);const v=new Map;return Lw(e).forEach(x=>{x.separator&&v.set(x.separator,x.panels)}),tr(e,{defaultLayoutDeferred:l===0,derivedPanelConstraints:c,groupSize:l,layout:m,separatorToPanels:v}),e.separators.forEach(x=>{Qe(!o.has(x.id),`Separator ids must be unique; id "${x.id}" was used more than once`),o.add(x.id),x.element.addEventListener("keydown",mS)}),La.get(g)===1&&(g.addEventListener("contextmenu",cS,!0),g.addEventListener("dblclick",pS,!0),g.addEventListener("pointerdown",gS,!0),g.addEventListener("pointerleave",yS),g.addEventListener("pointermove",vS),g.addEventListener("pointerout",bS),g.addEventListener("pointerup",xS,!0)),function(){t=!1,La.set(g,Math.max(0,(La.get(g)??0)-1)),AO(e),e.separators.forEach(x=>{x.element.removeEventListener("keydown",mS)}),La.get(g)||(g.removeEventListener("contextmenu",cS,!0),g.removeEventListener("dblclick",pS,!0),g.removeEventListener("pointerdown",gS,!0),g.removeEventListener("pointerleave",yS),g.removeEventListener("pointermove",vS),g.removeEventListener("pointerout",bS),g.removeEventListener("pointerup",xS,!0)),s.disconnect()}}function FO(){const[e,t]=N.useState({}),n=N.useCallback(()=>t({}),[]);return[e,n]}function Jg(e){const t=N.useId();return`${e??t}`}const Bo=typeof window<"u"?N.useLayoutEffect:N.useEffect;function ul(e){const t=N.useRef(e);return Bo(()=>{t.current=e},[e]),N.useCallback((...n)=>t.current?.(...n),[t])}function ey(...e){return ul(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function ty(e){const t=N.useRef({...e});return Bo(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const Uw=N.createContext(null);function GO(e,t){const n=N.useRef({getLayout:()=>({}),setLayout:kO});N.useImperativeHandle(t,()=>n.current,[]),Bo(()=>{Object.assign(n.current,jw({groupId:e}))})}function Vw({children:e,className:t,defaultLayout:n,disableCursor:i,disabled:o,elementRef:s,groupRef:l,id:c,onLayoutChange:d,onLayoutChanged:f,orientation:p="horizontal",resizeTargetMinimumSize:m={coarse:20,fine:10},style:g,...v}){const x=N.useRef({onLayoutChange:{},onLayoutChanged:{}}),S=ul(q=>{Ro(x.current.onLayoutChange,q)||(x.current.onLayoutChange=q,d?.(q))}),C=ul((q,U)=>{Ro(x.current.onLayoutChanged,q)||(x.current.onLayoutChanged=q,f?.(q,{isUserInteraction:U}))}),_=Jg(c),w=N.useRef(null),[k,D]=FO(),M=N.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:m,separators:[]}),O=ey(w,s);GO(_,l);const z=ul((q,U)=>{const Z=Lo(),X=uS(q),W=Br(q);if(W){let P=!1;return Z.state==="active"&&(P=Z.hitRegions.some($=>$.group===X)),{flexGrow:W.layout[U]??1,pointerEvents:P?"none":void 0}}if(n?.[U])return{flexGrow:n?.[U]}}),j=ty({defaultLayout:n,disableCursor:i}),F=N.useMemo(()=>({get disableCursor(){return!!j.disableCursor},getPanelStyles:z,id:_,orientation:p,registerPanel:q=>{const U=M.current;return U.panels=Hm(p,[...U.panels,q]),D(),()=>{U.panels=U.panels.filter(Z=>Z!==q),D()}},registerSeparator:q=>{const U=M.current;return U.separators=Hm(p,[...U.separators,q]),D(),()=>{U.separators=U.separators.filter(Z=>Z!==q),D()}},updatePanelProps:(q,{disabled:U})=>{const Z=M.current.panels.find(P=>P.id===q);Z&&(Z.panelConstraints.disabled=U);const X=uS(_),W=Br(_);X&&W&&tr(X,{...W,derivedPanelConstraints:Pm(X)})},updateSeparatorProps:(q,{disabled:U,disableDoubleClick:Z})=>{const X=M.current.separators.find(W=>W.id===q);X&&(X.disabled=U,X.disableDoubleClick=Z)}}),[z,_,D,p,j]),ee=N.useRef(null);return Bo(()=>{const q=w.current;if(q===null)return;const U=M.current;let Z;if(j.defaultLayout!==void 0&&Object.keys(j.defaultLayout).length===U.panels.length){Z={};for(const R of U.panels){const H=j.defaultLayout[R.id];H!==void 0&&(Z[R.id]=H)}}const X={disabled:!!o,element:q,id:_,mutableState:{defaultLayout:Z,disableCursor:!!j.disableCursor,expandedPanelSizes:M.current.lastExpandedPanelSizes,layouts:M.current.layouts},orientation:p,panels:U.panels,resizeTargetMinimumSize:U.resizeTargetMinimumSize,separators:U.separators};ee.current=X;const W=VO(X),{defaultLayoutDeferred:P,derivedPanelConstraints:$,layout:ne}=Br(X.id,!0);!P&&$.length>0&&(S(ne),C(ne,!1));const ue=Qg(_,R=>{const{defaultLayoutDeferred:H,derivedPanelConstraints:Y,layout:I}=R.next;if(H||Y.length===0)return;const le=X.panels.map(({id:re})=>re).join(",");X.mutableState.layouts[le]=I,Y.forEach(re=>{if(re.collapsible){const{layout:de}=R.prev??{};if(de){const _e=Ft(re.collapsedSize,I[re.panelId]),pe=Ft(re.collapsedSize,de[re.panelId]);_e&&!pe&&(X.mutableState.expandedPanelSizes[re.panelId]=de[re.panelId])}}});const fe=Lo().state!=="active";S(I),fe&&C(I,R.isUserInteraction)});return()=>{ee.current=null,W(),ue()}},[o,_,C,S,p,k,j]),N.useEffect(()=>{const q=ee.current;q&&(q.mutableState.defaultLayout=n,q.mutableState.disableCursor=!!i)}),A.jsx(Uw.Provider,{value:F,children:A.jsx("div",{...v,className:t,"data-group":!0,"data-testid":_,id:_,ref:O,style:{height:"100%",width:"100%",overflow:"hidden",...g,display:"flex",flexDirection:p==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:p==="horizontal"?"pan-y":"pan-x"},children:e})})}Vw.displayName="Group";function qc(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function $O({id:e,panelIds:t,storage:n}){const i=qc(e,[]),o=n.getItem(i);if(o)try{const s=JSON.parse(o);if(t){const l=t.join(","),c=s[l];if(c&&Array.isArray(c.layout)&&t.length===c.layout.length){const d={};for(let f=0;f<t.length;f++)d[t[f]]=c.layout[f];return d}}else{const l=Object.keys(s);if(l.length===1){const c=s[l[0]];if(c&&Array.isArray(c.layout)){const d=l[0].split(",");if(d.length===c.layout.length){const f={};for(let p=0;p<d.length;p++)f[d[p]]=c.layout[p];return f}}}}}catch{}}function qO({debounceSaveMs:e=100,onlySaveAfterUserInteractions:t,panelIds:n,storage:i=localStorage,...o}){const s=n!==void 0,l="id"in o?o.id:o.groupId,c=qc(l,n??[]),d=N.useSyncExternalStore(WO,()=>i.getItem(c),()=>i.getItem(c)),f=N.useMemo(()=>{if(d){const C=JSON.parse(d),_=Object.values(C);if(Array.from(_).every(w=>typeof w=="number"))return C}},[d]),p=N.useMemo(()=>{if(!f)return $O({id:l,panelIds:n,storage:i})},[f,l,n,i]),m=f??p,g=N.useRef(null),v=N.useCallback(()=>{const C=g.current;C&&(g.current=null,clearTimeout(C))},[]);N.useLayoutEffect(()=>()=>{v()},[v]);const x=N.useCallback((C,_)=>{if(!_.isUserInteraction)return;v();let w;s?w=qc(l,Object.keys(C)):w=qc(l,[]);try{i.setItem(w,JSON.stringify(C))}catch(k){console.error(k)}},[v,s,l,t,i]),S=N.useCallback(C=>{v(),e===0?x(C,{isUserInteraction:!1}):g.current=setTimeout(()=>{x(C,{isUserInteraction:!1})},e)},[v,e,x]);return{defaultLayout:m,onLayoutChange:S,onLayoutChanged:x}}function WO(){return function(){}}function ny(){const e=N.useContext(Uw);return Qe(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function YO(e,t){const{id:n}=ny(),i=N.useRef({collapse:Mp,expand:Mp,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Mp});N.useImperativeHandle(t,()=>i.current,[]),Bo(()=>{Object.assign(i.current,Hw({groupId:n,panelId:e}))})}function Fw({children:e,className:t,collapsedSize:n="0%",collapsible:i=!1,defaultSize:o,disabled:s,elementRef:l,groupResizeBehavior:c="preserve-relative-size",id:d,maxSize:f="100%",minSize:p="0%",onResize:m,panelRef:g,style:v,...x}){const S=!!d,C=Jg(d),_=ty({disabled:s}),w=N.useRef(null),k=ey(w,l),{getPanelStyles:D,id:M,orientation:O,registerPanel:z,updatePanelProps:j}=ny(),F=m!==null,ee=ul((X,W,P)=>{m?.(X,d,P)});Bo(()=>{const X=w.current;if(X!==null){const W={element:X,id:C,idIsStable:S,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:F?ee:void 0,panelConstraints:{groupResizeBehavior:c,collapsedSize:n,collapsible:i,defaultSize:o,disabled:_.disabled,maxSize:f,minSize:p}};return z(W)}},[c,n,i,o,F,C,S,f,p,ee,z,_]),N.useEffect(()=>{j(C,{disabled:s})},[s,C,j]),YO(C,g);const q=()=>{const X=D(M,C);if(X)return JSON.stringify(X)},U=N.useSyncExternalStore(X=>Qg(M,X),q,q);let Z;return U?Z=JSON.parse(U):o!==void 0?Z={flexGrow:void 0,flexShrink:void 0,flexBasis:o}:Z={flexGrow:1},A.jsx("div",{...x,"data-disabled":s||void 0,"data-panel":!0,"data-testid":C,id:C,ref:k,style:{...XO,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...Z},children:A.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...v,touchAction:O==="horizontal"?"pan-y":"pan-x"},children:e})})}Fw.displayName="Panel";const XO={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function KO({layout:e,panelConstraints:t,panelId:n,panelIndex:i}){let o,s;const l=e[n],c=t.find(d=>d.panelId===n);if(c){const d=c.maxSize,f=c.collapsible?c.collapsedSize:c.minSize,p=[i,i+1];s=Oo({layout:vl({delta:f-l,initialLayout:e,panelConstraints:t,pivotIndices:p,prevLayout:e}),panelConstraints:t})[n],o=Oo({layout:vl({delta:d-l,initialLayout:e,panelConstraints:t,pivotIndices:p,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:o,valueMin:s,valueNow:l}}function Gw({children:e,className:t,disabled:n,disableDoubleClick:i,elementRef:o,id:s,style:l,...c}){const d=Jg(s),f=ty({disabled:n,disableDoubleClick:i}),[p,m]=N.useState({}),[g,v]=N.useState("inactive"),[x,S]=N.useState(!1),C=N.useRef(null),_=ey(C,o),{disableCursor:w,id:k,orientation:D,registerSeparator:M,updateSeparatorProps:O}=ny(),z=D==="horizontal"?"vertical":"horizontal";Bo(()=>{const ee=C.current;if(ee!==null){const q={disabled:f.disabled,disableDoubleClick:f.disableDoubleClick,element:ee,id:d},U=M(q),Z=wO(W=>{v(W.next.state!=="inactive"&&W.next.hitRegions.some(P=>P.separator===q)?W.next.state:"inactive")}),X=Qg(k,W=>{const{derivedPanelConstraints:P,layout:$,separatorToPanels:ne}=W.next,ue=ne.get(q);if(ue){const R=ue[0],H=ue.indexOf(R);m(KO({layout:$,panelConstraints:P,panelId:R.id,panelIndex:H}))}});return()=>{Z(),X(),U()}}},[k,d,M,f]),N.useEffect(()=>{O(d,{disabled:n,disableDoubleClick:i})},[n,i,d,O]);let j;n&&!w&&(j="not-allowed");let F;return n?F="disabled":g==="active"?F="active":x?F="focus":F=g,A.jsx("div",{...c,"aria-controls":p.valueControls,"aria-disabled":n||void 0,"aria-orientation":z,"aria-valuemax":p.valueMax,"aria-valuemin":p.valueMin,"aria-valuenow":p.valueNow,children:e,className:t,"data-separator":F,"data-testid":d,id:d,onBlur:()=>S(!1),onFocus:()=>S(!0),ref:_,role:"separator",style:{flexBasis:"auto",cursor:j,...l,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}Gw.displayName="Separator";function $w(e){switch(e.kind){case"review":return"api/review.json";case"hunks":return`api/hunks/${encodeURIComponent(e.group)}.json`;case"file":return`api/files/${e.side}/${uc(e.path)}.json`;case"blame":return`api/blame/${e.side}/${uc(e.path)}.json`;case"image":return`api/images/${e.side}/${uc(e.path)}`;case"patch":return`api/patches/${uc(e.path)}.json`}}function uc(e){return e.split("/").map(encodeURIComponent).join("/")}function jm(e){return new URL($w(e),new URL("./",document.baseURI)).href}async function Il(e){const t=new URL($w(e),new URL("./",document.baseURI)).href,n=await fetch(t),i=await n.text();if(!n.ok){let o=i;try{const s=JSON.parse(i);s.error!==void 0&&(o=s.error)}catch{}throw new Error(o)}return JSON.parse(i)}function QO(){return Il({kind:"review"})}function ZO(e){return Il({kind:"hunks",group:e})}function JO(e){return Il({kind:"patch",path:e})}function qw(e,t){return Il({kind:"file",path:e,side:t})}function eD(e,t){return Il({kind:"blame",path:e,side:t})}function tD(e){return e.slice(0,7)}function Ww(e,t){return e.findIndex(n=>n.id===t)+1}function cl(e){return String(e).padStart(2,"0")}function Yw(e){return e.replace("-"," ")}const Xw=180,Do={review:"Reading the review.",group:"Reading git.",file:"Reading this file.",blame:"Reading blame.",lockfile:"Reading the lockfile."};function nD(e,t,n=Xw){return e&&t>=n}var iD=Object.defineProperty,iy=(e,t)=>iD(e,"name",{value:t,configurable:!0});function Bm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}iy(Bm,"setRef");function Kw(...e){return t=>{let n=!1;const i=e.map(o=>{const s=Bm(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<i.length;o++){const s=i[o];typeof s=="function"?s():Bm(e[o],null)}}}}iy(Kw,"composeRefs");function Uo(...e){return N.useCallback(Kw(...e),e)}iy(Uo,"useComposedRefs");var rD=Object.defineProperty,ti=(e,t)=>rD(e,"name",{value:t,configurable:!0});function ry(e){const t=N.forwardRef((n,i)=>{let{children:o,...s}=n,l=null,c=!1;const d=[];Um(o)&&typeof cc=="function"&&(o=cc(o._payload)),N.Children.forEach(o,g=>{if(n1(g)){c=!0;const v=g;let x="child"in v.props?v.props.child:v.props.children;Um(x)&&typeof cc=="function"&&(x=cc(x._payload)),l=oD(v,x),d.push(l?.props?.children)}else d.push(g)}),l?l=N.cloneElement(l,void 0,d):!c&&N.Children.count(o)===1&&N.isValidElement(o)&&(l=o);const f=l?t1(l):void 0,p=Uo(i,f);if(!l){if(o||o===0)throw new Error(c?lD(e):sD(e));return o}const m=e1(s,l.props??{});return l.type!==N.Fragment&&(m.ref=i?p:f),N.cloneElement(l,m)});return t.displayName=`${e}.Slot`,t}ti(ry,"createSlot");var Qw=ry("Slot"),Zw=Symbol.for("radix.slottable");function Jw(e){const t=ti(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Zw,t}ti(Jw,"createSlottable");var oD=ti((e,t)=>{if("child"in e.props){const n=e.props.child;return N.isValidElement(n)?N.cloneElement(n,void 0,e.props.children(n.props.children)):null}return N.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function e1(e,t){const n={...t};for(const i in t){const o=e[i],s=t[i];/^on[A-Z]/.test(i)?o&&s?n[i]=(...c)=>{const d=s(...c);return o(...c),d}:o&&(n[i]=o):i==="style"?n[i]={...o,...s}:i==="className"&&(n[i]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}ti(e1,"mergeProps");function t1(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ti(t1,"getElementRef");function n1(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zw}ti(n1,"isSlottable");var aD=Symbol.for("react.lazy");function Um(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===aD&&"_payload"in e&&i1(e._payload)}ti(Um,"isLazyComponent");function i1(e){return typeof e=="object"&&e!==null&&"then"in e}ti(i1,"isPromiseLike");var sD=ti(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),lD=ti(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),cc=Ml[" use ".trim().toString()];function r1(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r1(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function o1(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r1(e))&&(i&&(i+=" "),i+=t);return i}const _S=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,CS=o1,a1=(e,t)=>n=>{var i;if(t?.variants==null)return CS(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(f=>{const p=n?.[f],m=s?.[f];if(p===null)return null;const g=_S(p)||_S(m);return o[f][g]}),c=n&&Object.entries(n).reduce((f,p)=>{let[m,g]=p;return g===void 0||(f[m]=g),f},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((f,p)=>{let{class:m,className:g,...v}=p;return Object.entries(v).every(x=>{let[S,C]=x;return Array.isArray(C)?C.includes({...s,...c}[S]):{...s,...c}[S]===C})?[...f,m,g]:f},[]);return CS(e,l,d,n?.class,n?.className)},uD=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},cD=(e,t)=>({classGroupId:e,validator:t}),s1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),od="-",wS=[],dD="arbitrary..",fD=e=>{const t=pD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return hD(l);const c=l.split(od),d=c[0]===""&&c.length>1?1:0;return l1(c,d,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=i[l],f=n[l];return d?f?uD(f,d):d:f||wS}return n[l]||wS}}},l1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const f=l1(e,t+1,s);if(f)return f}const l=n.validators;if(l===null)return;const c=t===0?e.join(od):e.slice(t).join(od),d=l.length;for(let f=0;f<d;f++){const p=l[f];if(p.validator(c))return p.classGroupId}},hD=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?dD+i:void 0})(),pD=e=>{const{theme:t,classGroups:n}=e;return mD(n,t)},mD=(e,t)=>{const n=s1();for(const i in e){const o=e[i];oy(o,n,i,t)}return n},oy=(e,t,n,i)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];gD(l,t,n,i)}},gD=(e,t,n,i)=>{if(typeof e=="string"){yD(e,t,n);return}if(typeof e=="function"){vD(e,t,n,i);return}bD(e,t,n,i)},yD=(e,t,n)=>{const i=e===""?t:u1(t,e);i.classGroupId=n},vD=(e,t,n,i)=>{if(xD(e)){oy(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(cD(n,e))},bD=(e,t,n,i)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[c,d]=o[l];oy(d,u1(t,c),n,i)}},u1=(e,t)=>{let n=e;const i=t.split(od),o=i.length;for(let s=0;s<o;s++){const l=i[s];let c=n.nextPart.get(l);c||(c=s1(),n.nextPart.set(l,c)),n=c}return n},xD=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,SD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=i[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},Vm="!",ES=":",_D=[],kS=(e,t,n,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),CD=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=o=>{const s=[];let l=0,c=0,d=0,f;const p=o.length;for(let S=0;S<p;S++){const C=o[S];if(l===0&&c===0){if(C===ES){s.push(o.slice(d,S)),d=S+1;continue}if(C==="/"){f=S;continue}}C==="["?l++:C==="]"?l--:C==="("?c++:C===")"&&c--}const m=s.length===0?o:o.slice(d);let g=m,v=!1;m.endsWith(Vm)?(g=m.slice(0,-1),v=!0):m.startsWith(Vm)&&(g=m.slice(1),v=!0);const x=f&&f>d?f-d:void 0;return kS(s,v,g,x)};if(t){const o=t+ES,s=i;i=l=>l.startsWith(o)?s(l.slice(o.length)):kS(_D,!1,l,void 0,!0)}if(n){const o=i;i=s=>n({className:s,parseClassName:o})}return i},wD=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",d=t.has(l);c||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(l)):o.push(l)}return o.length>0&&(o.sort(),i.push(...o)),i}},ED=e=>({cache:SD(e.cacheSize),parseClassName:CD(e),sortModifiers:wD(e),postfixLookupClassGroupIds:kD(e),...fD(e)}),kD=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let i=0;i<n.length;i++)t[n[i]]=!0;return t},TD=/\s+/,AD=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:l}=t,c=[],d=e.trim().split(TD);let f="";for(let p=d.length-1;p>=0;p-=1){const m=d[p],{isExternal:g,modifiers:v,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:C}=n(m);if(g){f=m+(f.length>0?" "+f:f);continue}let _=!!C,w;if(_){const z=S.substring(0,C);w=i(z);const j=w&&l[w]?i(S):void 0;j&&j!==w&&(w=j,_=!1)}else w=i(S);if(!w){if(!_){f=m+(f.length>0?" "+f:f);continue}if(w=i(S),!w){f=m+(f.length>0?" "+f:f);continue}_=!1}const k=v.length===0?"":v.length===1?v[0]:s(v).join(":"),D=x?k+Vm:k,M=D+w;if(c.indexOf(M)>-1)continue;c.push(M);const O=o(w,_);for(let z=0;z<O.length;++z){const j=O[z];c.push(D+j)}f=m+(f.length>0?" "+f:f)}return f},LD=(...e)=>{let t=0,n,i,o="";for(;t<e.length;)(n=e[t++])&&(i=c1(n))&&(o&&(o+=" "),o+=i);return o},c1=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=c1(e[i]))&&(n&&(n+=" "),n+=t);return n},RD=(e,...t)=>{let n,i,o,s;const l=d=>{const f=t.reduce((p,m)=>m(p),e());return n=ED(f),i=n.cache.get,o=n.cache.set,s=c,c(d)},c=d=>{const f=i(d);if(f)return f;const p=AD(d,n);return o(d,p),p};return s=l,(...d)=>s(LD(...d))},OD=[],Ct=e=>{const t=n=>n[e]||OD;return t.isThemeGetter=!0,t},d1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,f1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,DD=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,MD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ID=/\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$/,ND=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mr=e=>DD.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),si=e=>!!e&&Number.isInteger(Number(e)),Ip=e=>e.endsWith("%")&&Re(e.slice(0,-1)),Gi=e=>MD.test(e),h1=()=>!0,HD=e=>ID.test(e)&&!ND.test(e),ay=()=>!1,jD=e=>zD.test(e),BD=e=>PD.test(e),UD=e=>!me(e)&&!ge(e),VD=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),FD=e=>$r(e,g1,ay),me=e=>d1.test(e),po=e=>$r(e,y1,HD),TS=e=>$r(e,QD,Re),GD=e=>$r(e,b1,h1),$D=e=>$r(e,v1,ay),AS=e=>$r(e,p1,ay),qD=e=>$r(e,m1,BD),dc=e=>$r(e,x1,jD),ge=e=>f1.test(e),Ks=e=>Vo(e,y1),WD=e=>Vo(e,v1),LS=e=>Vo(e,p1),YD=e=>Vo(e,g1),XD=e=>Vo(e,m1),fc=e=>Vo(e,x1,!0),KD=e=>Vo(e,b1,!0),$r=(e,t,n)=>{const i=d1.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Vo=(e,t,n=!1)=>{const i=f1.exec(e);return i?i[1]?t(i[1]):n:!1},p1=e=>e==="position"||e==="percentage",m1=e=>e==="image"||e==="url",g1=e=>e==="length"||e==="size"||e==="bg-size",y1=e=>e==="length",QD=e=>e==="number",v1=e=>e==="family-name",b1=e=>e==="number"||e==="weight",x1=e=>e==="shadow",ZD=()=>{const e=Ct("color"),t=Ct("font"),n=Ct("text"),i=Ct("font-weight"),o=Ct("tracking"),s=Ct("leading"),l=Ct("breakpoint"),c=Ct("container"),d=Ct("spacing"),f=Ct("radius"),p=Ct("shadow"),m=Ct("inset-shadow"),g=Ct("text-shadow"),v=Ct("drop-shadow"),x=Ct("blur"),S=Ct("perspective"),C=Ct("aspect"),_=Ct("ease"),w=Ct("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...D(),ge,me],O=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],j=()=>[ge,me,d],F=()=>[Mr,"full","auto",...j()],ee=()=>[si,"none","subgrid",ge,me],q=()=>["auto",{span:["full",si,ge,me]},si,ge,me],U=()=>[si,"auto",ge,me],Z=()=>["auto","min","max","fr",ge,me],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...j()],$=()=>[Mr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],ne=()=>[Mr,"screen","full","dvw","lvw","svw","min","max","fit",...j()],ue=()=>[Mr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],R=()=>[e,ge,me],H=()=>[...D(),LS,AS,{position:[ge,me]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",YD,FD,{size:[ge,me]}],le=()=>[Ip,Ks,po],fe=()=>["","none","full",f,ge,me],re=()=>["",Re,Ks,po],de=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[Re,Ip,LS,AS],Pe=()=>["","none",x,ge,me],je=()=>["none",Re,ge,me],st=()=>["none",Re,ge,me],He=()=>[Re,ge,me],Ve=()=>[Mr,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gi],breakpoint:[Gi],color:[h1],container:[Gi],"drop-shadow":[Gi],ease:["in","out","in-out"],font:[UD],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gi],shadow:[Gi],spacing:["px",Re],text:[Gi],"text-shadow":[Gi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mr,me,ge,C]}],container:["container"],"container-type":[{"@container":["","normal","size",ge,me]}],"container-named":[VD],columns:[{columns:[Re,me,ge,c]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:M()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[si,"auto",ge,me]}],basis:[{basis:[Mr,"full","auto",c,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,Mr,"auto","initial","none",me]}],grow:[{grow:["",Re,ge,me]}],shrink:[{shrink:["",Re,ge,me]}],order:[{order:[si,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...ne()]}],"min-inline-size":[{"min-inline":["auto",...ne()]}],"max-inline-size":[{"max-inline":["none",...ne()]}],"block-size":[{block:["auto",...ue()]}],"min-block-size":[{"min-block":["auto",...ue()]}],"max-block-size":[{"max-block":["none",...ue()]}],w:[{w:[c,"screen",...$()]}],"min-w":[{"min-w":[c,"screen","none",...$()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,Ks,po]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,KD,GD]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ip,me]}],"font-family":[{font:[WD,$D,t]}],"font-features":[{"font-features":[me]}],"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:[o,ge,me]}],"line-clamp":[{"line-clamp":[Re,"none",ge,TS]}],leading:[{leading:[s,...j()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",ge,po]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[Re,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[si,ge,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],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",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},si,ge,me],radial:["",ge,me],conic:[si,ge,me]},XD,qD]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,ge,me]}],"outline-w":[{outline:["",Re,Ks,po]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",p,fc,dc]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",m,fc,dc]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[Re,po]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",g,fc,dc]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[Re,ge,me]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"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":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[ge,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,me]}],filter:[{filter:["","none",ge,me]}],blur:[{blur:Pe()}],brightness:[{brightness:[Re,ge,me]}],contrast:[{contrast:[Re,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",v,fc,dc]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",Re,ge,me]}],"hue-rotate":[{"hue-rotate":[Re,ge,me]}],invert:[{invert:["",Re,ge,me]}],saturate:[{saturate:[Re,ge,me]}],sepia:[{sepia:["",Re,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":Pe()}],"backdrop-brightness":[{"backdrop-brightness":[Re,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Re,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Re,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Re,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Re,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,ge,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",ge,me]}],ease:[{ease:["linear","initial",_,ge,me]}],delay:[{delay:[Re,ge,me]}],animate:[{animate:["none",w,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ge,me]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:st()}],"scale-x":[{"scale-x":st()}],"scale-y":[{"scale-y":st()}],"scale-z":[{"scale-z":st()}],"scale-3d":["scale-3d"],skew:[{skew:He()}],"skew-x":[{"skew-x":He()}],"skew-y":[{"skew-y":He()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ve()}],"translate-x":[{"translate-x":Ve()}],"translate-y":[{"translate-y":Ve()}],"translate-z":[{"translate-z":Ve()}],"translate-none":["translate-none"],zoom:[{zoom:[si,ge,me]}],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":R()}],"scrollbar-track-color":[{"scrollbar-track":R()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",ge,me]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[Re,Ks,po,TS]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},JD=RD(ZD);function it(...e){return JD(o1(e))}const eM=a1("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-[var(--motion)] ease-[var(--motion-ease)] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 text-xs has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8"}},defaultVariants:{variant:"default",size:"default"}});function Gt({className:e,variant:t="default",size:n="default",asChild:i=!1,...o}){const s=i?Qw:"button";return A.jsx(s,{"data-slot":"button",className:it(eM({variant:t,size:n}),e),...o})}function S1(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const tM=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nM=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iM={};function RS(e,t){return(iM.jsx?nM:tM).test(e)}const rM=/[ \t\n\f\r]/g;function Pd(e){return typeof e=="object"?e.type==="text"?OS(e.value):!1:OS(e)}function OS(e){return e.replace(rM,"")===""}class Nl{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Nl.prototype.normal={};Nl.prototype.property={};Nl.prototype.space=void 0;function _1(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new Nl(n,i,t)}function Fm(e){return e.toLowerCase()}class pn{constructor(t,n){this.attribute=n,this.property=t}}pn.prototype.attribute="";pn.prototype.booleanish=!1;pn.prototype.boolean=!1;pn.prototype.commaOrSpaceSeparated=!1;pn.prototype.commaSeparated=!1;pn.prototype.defined=!1;pn.prototype.mustUseProperty=!1;pn.prototype.number=!1;pn.prototype.overloadedBoolean=!1;pn.prototype.property="";pn.prototype.spaceSeparated=!1;pn.prototype.space=void 0;let oM=0;const we=Fo(),xt=Fo(),Gm=Fo(),ce=Fo(),et=Fo(),Eo=Fo(),Cn=Fo();function Fo(){return 2**++oM}const $m=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:xt,commaOrSpaceSeparated:Cn,commaSeparated:Eo,number:ce,overloadedBoolean:Gm,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),Np=Object.keys($m);class sy extends pn{constructor(t,n,i,o){let s=-1;if(super(t,n),DS(this,"space",o),typeof i=="number")for(;++s<Np.length;){const l=Np[s];DS(this,Np[s],(i&$m[l])===$m[l])}}}sy.prototype.defined=!0;function DS(e,t,n){n&&(e[t]=n)}function Xa(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const s=new sy(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,n[Fm(i)]=i,n[Fm(s.attribute)]=i}return new Nl(t,n,e.space)}const C1=Xa({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:et,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:ce,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:et,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:xt,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function w1(e,t){return t in e?e[t]:t}function E1(e,t){return w1(e,t.toLowerCase())}const aM=Xa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Eo,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alpha:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:et,autoFocus:we,autoPlay:we,blocking:et,capture:null,charSet:null,checked:we,cite:null,className:et,closedBy:null,colorSpace:null,cols:ce,colSpan:ce,command:null,commandFor:null,content:null,contentEditable:xt,controls:we,controlsList:et,coords:ce|Eo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:Gm,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:et,height:ce,hidden:Gm,high:ce,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:et,itemRef:et,itemScope:we,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:we,optimum:ce,pattern:null,ping:et,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:et,required:we,reversed:we,rows:ce,rowSpan:ce,sandbox:et,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootCustomElementRegistry:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shadowRootSerializable:we,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:xt,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:we,disablePictureInPicture:we,disableRemotePlayback:we,exportParts:Eo,part:et,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:E1}),sM=Xa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Cn,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Eo,g2:Eo,glyphName:Eo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:Cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ce,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Cn,rev:Cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Cn,requiredFeatures:Cn,requiredFonts:Cn,requiredFormats:Cn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:Cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Cn,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:w1}),k1=Xa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),T1=Xa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:E1}),A1=Xa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),lM={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},uM=/[A-Z]/g,MS=/-[a-z]/g,cM=/^data[-\w.:]+$/i;function L1(e,t){const n=Fm(t);let i=t,o=pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&cM.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(MS,fM);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!MS.test(s)){let l=s.replace(uM,dM);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=sy}return new o(i,t)}function dM(e){return"-"+e.toLowerCase()}function fM(e){return e.charAt(1).toUpperCase()}const R1=_1([C1,aM,k1,T1,A1],"html"),zl=_1([C1,sM,k1,T1,A1],"svg");function O1(e){return e.join(" ").trim()}var Ra={},zp,IS;function hM(){if(IS)return zp;IS=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
11
+ `,f="/",p="*",m="",g="comment",v="declaration";function x(C,_){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];_=_||{};var w=1,k=1;function D(X){var W=X.match(t);W&&(w+=W.length);var P=X.lastIndexOf(d);k=~P?X.length-P:k+X.length}function M(){var X={line:w,column:k};return function(W){return W.position=new O(X),F(),W}}function O(X){this.start=X,this.end={line:w,column:k},this.source=_.source}O.prototype.content=C;function z(X){var W=new Error(_.source+":"+w+":"+k+": "+X);if(W.reason=X,W.filename=_.source,W.line=w,W.column=k,W.source=C,!_.silent)throw W}function j(X){var W=X.exec(C);if(W){var P=W[0];return D(P),C=C.slice(P.length),W}}function F(){j(n)}function ee(X){var W;for(X=X||[];W=q();)W!==!1&&X.push(W);return X}function q(){var X=M();if(!(f!=C.charAt(0)||p!=C.charAt(1))){for(var W=2;m!=C.charAt(W)&&(p!=C.charAt(W)||f!=C.charAt(W+1));)++W;if(W+=2,m===C.charAt(W-1))return z("End of comment missing");var P=C.slice(2,W-2);return k+=2,D(P),C=C.slice(W),k+=2,X({type:g,comment:P})}}function U(){var X=M(),W=j(i);if(W){if(q(),!j(o))return z("property missing ':'");var P=j(s),$=X({type:v,property:S(W[0].replace(e,m)),value:P?S(P[0].replace(e,m)):m});return j(l),$}}function Z(){var X=[];ee(X);for(var W;W=U();)W!==!1&&(X.push(W),ee(X));return X}return F(),Z()}function S(C){return C?C.replace(c,m):m}return zp=x,zp}var NS;function pM(){if(NS)return Ra;NS=1;var e=Ra&&Ra.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.default=n;const t=e(hM());function n(i,o){let s=null;if(!i||typeof i!="string")return s;const l=(0,t.default)(i),c=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?o(f,p,d):p&&(s=s||{},s[f]=p)}),s}return Ra}var Qs={},zS;function mM(){if(zS)return Qs;zS=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(f){return!f||n.test(f)||e.test(f)},l=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),s(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,c):f=f.replace(i,c),f.replace(t,l))};return Qs.camelCase=d,Qs}var Zs,PS;function gM(){if(PS)return Zs;PS=1;var e=Zs&&Zs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(pM()),n=mM();function i(o,s){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(l[(0,n.camelCase)(c,s)]=d)}),l}return i.default=i,Zs=i,Zs}var yM=gM();const vM=zd(yM),D1=M1("end"),ly=M1("start");function M1(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function bM(e){const t=ly(e),n=D1(e);if(t&&n)return{start:t,end:n}}function dl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?HS(e.position):"start"in e||"end"in e?HS(e):"line"in e||"column"in e?qm(e):""}function qm(e){return jS(e&&e.line)+":"+jS(e&&e.column)}function HS(e){return qm(e&&e.start)+"-"+qm(e&&e.end)}function jS(e){return e&&typeof e=="number"?e:1}class qt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?o=t:!s.cause&&t&&(l=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?s.ruleId=i:(s.source=i.slice(0,d),s.ruleId=i.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const c=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=dl(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qt.prototype.file="";qt.prototype.name="";qt.prototype.reason="";qt.prototype.message="";qt.prototype.stack="";qt.prototype.column=void 0;qt.prototype.line=void 0;qt.prototype.ancestors=void 0;qt.prototype.cause=void 0;qt.prototype.fatal=void 0;qt.prototype.place=void 0;qt.prototype.ruleId=void 0;qt.prototype.source=void 0;const uy={}.hasOwnProperty,xM=new Map,SM=/[A-Z]/g,_M=new Set(["table","tbody","thead","tfoot","tr"]),CM=new Set(["td","th"]),I1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wM(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=DM(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=OM(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?zl:R1,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=N1(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function N1(e,t,n){if(t.type==="element")return EM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return AM(e,t,n);if(t.type==="mdxjsEsm")return TM(e,t);if(t.type==="root")return LM(e,t,n);if(t.type==="text")return RM(e,t)}function EM(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=zl,e.schema=o),e.ancestors.push(t);const s=P1(e,t.tagName,!1),l=MM(e,t);let c=dy(e,t);return _M.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Pd(d):!0})),z1(e,l,s,t),cy(l,c),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function kM(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}bl(e,t.position)}function TM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bl(e,t.position)}function AM(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=zl,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:P1(e,t.name,!0),l=IM(e,t),c=dy(e,t);return z1(e,l,s,t),cy(l,c),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function LM(e,t,n){const i={};return cy(i,dy(e,t)),e.create(t,e.Fragment,i,n)}function RM(e,t){return t.value}function z1(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function cy(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function OM(e,t,n){return i;function i(o,s,l,c){const f=Array.isArray(l.children)?n:t;return c?f(s,l,c):f(s,l)}}function DM(e,t){return n;function n(i,o,s,l){const c=Array.isArray(s.children),d=ly(i);return t(o,s,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function MM(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&uy.call(t.properties,o)){const s=NM(e,o,t.properties[o]);if(s){const[l,c]=s;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&CM.has(t.tagName)?i=c:n[l]=c}}if(i){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function IM(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const l=s.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else bl(e,t.position);else{const o=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,s=e.evaluater.evaluateExpression(c.expression)}else bl(e,t.position);else s=i.value===null?!0:i.value;n[o]=s}return n}function dy(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:xM;for(;++i<t.children.length;){const s=t.children[i];let l;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const f=o.get(d)||0;l=d+"-"+f,o.set(d,f+1)}}const c=N1(e,s,l);c!==void 0&&n.push(c)}return n}function NM(e,t,n){const i=L1(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?S1(n):O1(n)),i.property==="style"){let o=typeof n=="object"?n:zM(e,String(n));return e.stylePropertyNameCase==="css"&&(o=PM(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?lM[i.property]||i.property:i.attribute,n]}}function zM(e,t){try{return vM(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new qt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=I1+"#cannot-parse-style-attribute",o}}function P1(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,l;for(;++s<o.length;){const c=RS(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}i=l}else i=RS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return uy.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);bl(e)}function bl(e,t){const n=new qt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=I1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function PM(e){const t={};let n;for(n in e)uy.call(e,n)&&(t[HM(n)]=e[n]);return t}function HM(e){let t=e.replace(SM,jM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jM(e){return"-"+e.toLowerCase()}const Pp={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},BM={};function UM(e,t){const n=BM,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return H1(e,i,o)}function H1(e,t,n){if(VM(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return BS(e.children,t,n)}return Array.isArray(e)?BS(e,t,n):""}function BS(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=H1(e[o],t,n);return i.join("")}function VM(e){return!!(e&&typeof e=="object")}const US=document.createElement("i");function fy(e){const t="&"+e+";";US.innerHTML=t;const n=US.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Si(e,t,n,i){const o=e.length;let s=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);s<i.length;)l=i.slice(s,s+1e4),l.unshift(t,0),e.splice(...l),s+=1e4,t+=1e4}function Hn(e,t){return e.length>0?(Si(e,e.length,0,t),e):t}const VS={}.hasOwnProperty;function FM(e){const t={};let n=-1;for(;++n<e.length;)GM(t,e[n]);return t}function GM(e,t){let n;for(n in t){const o=(VS.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){VS.call(o,l)||(o[l]=[]);const c=s[l];$M(o[l],Array.isArray(c)?c:c?[c]:[])}}}function $M(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Si(e,0,0,i)}function j1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Va(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gi=qr(/[A-Za-z]/),kn=qr(/[\dA-Za-z]/),qM=qr(/[#-'*+\--9=?A-Z^-~]/);function Wm(e){return e!==null&&(e<32||e===127)}const Ym=qr(/\d/),WM=qr(/[\dA-Fa-f]/),YM=qr(/[!-/:-@[-`{-~]/);function Ce(e){return e!==null&&e<-2}function dn(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const XM=qr(new RegExp("\\p{P}|\\p{S}","u")),KM=qr(/\s/);function qr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ka(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&kn(e.charCodeAt(n+1))&&kn(e.charCodeAt(n+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const c=e.charCodeAt(n+1);s<56320&&c>56319&&c<57344?(l=String.fromCharCode(s,c),o=1):l="�"}else l=String.fromCharCode(s);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function nt(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(d){return Ge(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ge(d)&&s++<o?(e.consume(d),c):(e.exit(n),t(d))}}const QM={tokenize:ZM};function ZM(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),s(c)}function s(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ce(c)?(e.consume(c),e.exit("chunkText"),s):(e.consume(c),l)}}const JM={tokenize:e2},FS={tokenize:t2};function e2(e){const t=this,n=[];let i=0,o,s,l;return c;function c(k){if(i<n.length){const D=n[i];return t.containerState=D[1],e.attempt(D[0].continuation,d,f)(k)}return f(k)}function d(k){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&w();const D=t.events.length;let M=D,O;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){O=t.events[M][1].end;break}_(i);let z=D;for(;z<t.events.length;)t.events[z][1].end={...O},z++;return Si(t.events,M+1,0,t.events.slice(D)),t.events.length=z,f(k)}return c(k)}function f(k){if(i===n.length){if(!o)return g(k);if(o.currentConstruct&&o.currentConstruct.concrete)return x(k);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(FS,p,m)(k)}function p(k){return o&&w(),_(i),g(k)}function m(k){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,x(k)}function g(k){return t.containerState={},e.attempt(FS,v,x)(k)}function v(k){return i++,n.push([t.currentConstruct,t.containerState]),g(k)}function x(k){if(k===null){o&&w(),_(0),e.consume(k);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),S(k)}function S(k){if(k===null){C(e.exit("chunkFlow"),!0),_(0),e.consume(k);return}return Ce(k)?(e.consume(k),C(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(k),S)}function C(k,D){const M=t.sliceStream(k);if(D&&M.push(null),k.previous=s,s&&(s.next=k),s=k,o.defineSkip(k.start),o.write(M),t.parser.lazy[k.start.line]){let O=o.events.length;for(;O--;)if(o.events[O][1].start.offset<l&&(!o.events[O][1].end||o.events[O][1].end.offset>l))return;const z=t.events.length;let j=z,F,ee;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(F){ee=t.events[j][1].end;break}F=!0}for(_(i),O=z;O<t.events.length;)t.events[O][1].end={...ee},O++;Si(t.events,j+1,0,t.events.slice(z)),t.events.length=O}}function _(k){let D=n.length;for(;D-- >k;){const M=n[D];t.containerState=M[1],M[0].exit.call(t,e)}n.length=k}function w(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function t2(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function GS(e){if(e===null||dn(e)||KM(e))return 1;if(XM(e))return 2}function hy(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!i.includes(s)&&(t=s(t,n),i.push(s))}return t}const Xm={name:"attention",resolveAll:n2,tokenize:i2};function n2(e,t){let n=-1,i,o,s,l,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},g={...e[n][1].start};$S(m,-d),$S(g,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},s={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[i][1].end={...l.start},e[n][1].start={...c.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=Hn(f,[["enter",e[i][1],t],["exit",e[i][1],t]])),f=Hn(f,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",s,t]]),f=Hn(f,hy(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),f=Hn(f,[["exit",s,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=Hn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Si(e,i-1,n-i+3,f),n=i+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function i2(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=GS(i);let s;return l;function l(d){return s=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===s)return e.consume(d),c;const f=e.exit("attentionSequence"),p=GS(d),m=!p||p===2&&o||n.includes(d),g=!o||o===2&&p||n.includes(i);return f._open=!!(s===42?m:m&&(o||!g)),f._close=!!(s===42?g:g&&(p||!m)),t(d)}}function $S(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const r2={name:"autolink",tokenize:o2};function o2(e,t,n){let i=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(v){return gi(v)?(e.consume(v),l):v===64?n(v):f(v)}function l(v){return v===43||v===45||v===46||kn(v)?(i=1,c(v)):f(v)}function c(v){return v===58?(e.consume(v),i=0,d):(v===43||v===45||v===46||kn(v))&&i++<32?(e.consume(v),c):(i=0,f(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Wm(v)?n(v):(e.consume(v),d)}function f(v){return v===64?(e.consume(v),p):qM(v)?(e.consume(v),f):n(v)}function p(v){return kn(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),i=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):g(v)}function g(v){if((v===45||kn(v))&&i++<63){const x=v===45?g:m;return e.consume(v),x}return n(v)}}const Hd={partial:!0,tokenize:a2};function a2(e,t,n){return i;function i(s){return Ge(s)?nt(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Ce(s)?t(s):n(s)}}const B1={continuation:{tokenize:l2},exit:u2,name:"blockQuote",tokenize:s2};function s2(e,t,n){const i=this;return o;function o(l){if(l===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return Ge(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function l2(e,t,n){const i=this;return o;function o(l){return Ge(l)?nt(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(B1,t,n)(l)}}function u2(e){e.exit("blockQuote")}const U1={name:"characterEscape",tokenize:c2};function c2(e,t,n){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return YM(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const V1={name:"characterReference",tokenize:d2};function d2(e,t,n){const i=this;let o=0,s,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),s=31,l=kn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=WM,p):(e.enter("characterReferenceValue"),s=7,l=Ym,p(m))}function p(m){if(m===59&&o){const g=e.exit("characterReferenceValue");return l===kn&&!fy(i.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&o++<s?(e.consume(m),p):n(m)}}const qS={partial:!0,tokenize:h2},WS={concrete:!0,name:"codeFenced",tokenize:f2};function f2(e,t,n){const i=this,o={partial:!0,tokenize:M};let s=0,l=0,c;return d;function d(O){return f(O)}function f(O){const z=i.events[i.events.length-1];return s=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,c=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(O)}function p(O){return O===c?(l++,e.consume(O),p):l<3?n(O):(e.exit("codeFencedFenceSequence"),Ge(O)?nt(e,m,"whitespace")(O):m(O))}function m(O){return O===null||Ce(O)?(e.exit("codeFencedFence"),i.interrupt?t(O):e.check(qS,S,D)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(O))}function g(O){return O===null||Ce(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(O)):Ge(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,v,"whitespace")(O)):O===96&&O===c?n(O):(e.consume(O),g)}function v(O){return O===null||Ce(O)?m(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(O))}function x(O){return O===null||Ce(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(O)):O===96&&O===c?n(O):(e.consume(O),x)}function S(O){return e.attempt(o,D,C)(O)}function C(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),_}function _(O){return s>0&&Ge(O)?nt(e,w,"linePrefix",s+1)(O):w(O)}function w(O){return O===null||Ce(O)?e.check(qS,S,D)(O):(e.enter("codeFlowValue"),k(O))}function k(O){return O===null||Ce(O)?(e.exit("codeFlowValue"),w(O)):(e.consume(O),k)}function D(O){return e.exit("codeFenced"),t(O)}function M(O,z,j){let F=0;return ee;function ee(W){return O.enter("lineEnding"),O.consume(W),O.exit("lineEnding"),q}function q(W){return O.enter("codeFencedFence"),Ge(W)?nt(O,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):U(W)}function U(W){return W===c?(O.enter("codeFencedFenceSequence"),Z(W)):j(W)}function Z(W){return W===c?(F++,O.consume(W),Z):F>=l?(O.exit("codeFencedFenceSequence"),Ge(W)?nt(O,X,"whitespace")(W):X(W)):j(W)}function X(W){return W===null||Ce(W)?(O.exit("codeFencedFence"),z(W)):j(W)}}}function h2(e,t,n){const i=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const Hp={name:"codeIndented",tokenize:m2},p2={partial:!0,tokenize:g2};function m2(e,t,n){const i=this;return o;function o(f){return e.enter("codeIndented"),nt(e,s,"linePrefix",5)(f)}function s(f){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):Ce(f)?e.attempt(p2,l,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Ce(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function g2(e,t,n){const i=this;return o;function o(l){return i.parser.lazy[i.now().line]?n(l):Ce(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):nt(e,s,"linePrefix",5)(l)}function s(l){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Ce(l)?o(l):n(l)}}const y2={name:"codeText",previous:b2,resolve:v2,tokenize:x2};function v2(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function b2(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function x2(e,t,n){let i=0,o,s;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),i++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(s=e.enter("codeTextSequence"),o=0,p(m)):Ce(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Ce(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(s.type="codeTextData",f(m))}}class S2{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&Js(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Js(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Js(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Js(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Js(this.left,n.reverse())}}}function Js(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function F1(e){const t={};let n=-1,i,o,s,l,c,d,f;const p=new S2(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,_2(p,n)),n=t[n],f=!0);else if(i[1]._container){for(s=n,o=void 0;s--;)if(l=p.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},c=p.slice(o,n),c.unshift(i),p.splice(o,n-o+1,c))}}return Si(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function _2(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const s=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],f={};let p,m,g=-1,v=n,x=0,S=0;const C=[S];for(;v;){for(;e.get(++o)[1]!==v;);s.push(o),v._tokenizer||(p=i.sliceStream(v),v.next||p.push(null),m&&l.defineSkip(v.start),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++g<c.length;)c[g][0]==="exit"&&c[g-1][0]==="enter"&&c[g][1].type===c[g-1][1].type&&c[g][1].start.line!==c[g][1].end.line&&(S=g+1,C.push(S),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(l.events=[],v?(v._tokenizer=void 0,v.previous=void 0):C.pop(),g=C.length;g--;){const _=c.slice(C[g],C[g+1]),w=s.pop();d.push([w,w+_.length-1]),e.splice(w,2,_)}for(d.reverse(),g=-1;++g<d.length;)f[x+d[g][0]]=x+d[g][1],x+=d[g][1]-d[g][0]-1;return f}const C2={resolve:E2,tokenize:k2},w2={partial:!0,tokenize:T2};function E2(e){return F1(e),e}function k2(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?s(c):Ce(c)?e.check(w2,l,s)(c):(e.consume(c),o)}function s(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function T2(e,t,n){const i=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),nt(e,s,"linePrefix")}function s(l){if(l===null||Ce(l))return n(l);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function G1(e,t,n,i,o,s,l,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(_){return _===60?(e.enter(i),e.enter(o),e.enter(s),e.consume(_),e.exit(s),g):_===null||_===32||_===41||Wm(_)?n(_):(e.enter(i),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(_))}function g(_){return _===62?(e.enter(s),e.consume(_),e.exit(s),e.exit(o),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(c),g(_)):_===null||_===60||Ce(_)?n(_):(e.consume(_),_===92?x:v)}function x(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function S(_){return!p&&(_===null||_===41||dn(_))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(i),t(_)):p<f&&_===40?(e.consume(_),p++,S):_===41?(e.consume(_),p--,S):_===null||_===32||_===40||Wm(_)?n(_):(e.consume(_),_===92?C:S)}function C(_){return _===40||_===41||_===92?(e.consume(_),S):S(_)}}function $1(e,t,n,i,o,s){const l=this;let c=0,d;return f;function f(v){return e.enter(i),e.enter(o),e.consume(v),e.exit(o),e.enter(s),p}function p(v){return c>999||v===null||v===91||v===93&&!d||v===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(v):v===93?(e.exit(s),e.enter(o),e.consume(v),e.exit(o),e.exit(i),t):Ce(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||Ce(v)||c++>999?(e.exit("chunkString"),p(v)):(e.consume(v),d||(d=!Ge(v)),v===92?g:m)}function g(v){return v===91||v===92||v===93?(e.consume(v),c++,m):m(v)}}function q1(e,t,n,i,o,s){let l;return c;function c(g){return g===34||g===39||g===40?(e.enter(i),e.enter(o),e.consume(g),e.exit(o),l=g===40?41:g,d):n(g)}function d(g){return g===l?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),t):(e.enter(s),f(g))}function f(g){return g===l?(e.exit(s),d(l)):g===null?n(g):Ce(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===l||g===null||Ce(g)?(e.exit("chunkString"),f(g)):(e.consume(g),g===92?m:p)}function m(g){return g===l||g===92?(e.consume(g),p):p(g)}}function fl(e,t){let n;return i;function i(o){return Ce(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Ge(o)?nt(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const A2={name:"definition",tokenize:R2},L2={partial:!0,tokenize:O2};function R2(e,t,n){const i=this;let o;return s;function s(v){return e.enter("definition"),l(v)}function l(v){return $1.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function c(v){return o=Va(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return dn(v)?fl(e,f)(v):f(v)}function f(v){return G1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(L2,m,m)(v)}function m(v){return Ge(v)?nt(e,g,"whitespace")(v):g(v)}function g(v){return v===null||Ce(v)?(e.exit("definition"),i.parser.defined.push(o),t(v)):n(v)}}function O2(e,t,n){return i;function i(c){return dn(c)?fl(e,o)(c):n(c)}function o(c){return q1(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return Ge(c)?nt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Ce(c)?t(c):n(c)}}const D2={name:"hardBreakEscape",tokenize:M2};function M2(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ce(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const I2={name:"headingAtx",resolve:N2,tokenize:z2};function N2(e,t){let n=e.length-2,i=3,o,s;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},s={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Si(e,i,n-i+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function z2(e,t,n){let i=0;return o;function o(p){return e.enter("atxHeading"),s(p)}function s(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&i++<6?(e.consume(p),l):p===null||dn(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Ce(p)?(e.exit("atxHeading"),t(p)):Ge(p)?nt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||dn(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const P2=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],YS=["pre","script","style","textarea"],H2={concrete:!0,name:"htmlFlow",resolveTo:U2,tokenize:V2},j2={partial:!0,tokenize:G2},B2={partial:!0,tokenize:F2};function U2(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function V2(e,t,n){const i=this;let o,s,l,c,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),g):I===47?(e.consume(I),s=!0,S):I===63?(e.consume(I),o=3,i.interrupt?t:R):gi(I)?(e.consume(I),l=String.fromCharCode(I),C):n(I)}function g(I){return I===45?(e.consume(I),o=2,v):I===91?(e.consume(I),o=5,c=0,x):gi(I)?(e.consume(I),o=4,i.interrupt?t:R):n(I)}function v(I){return I===45?(e.consume(I),i.interrupt?t:R):n(I)}function x(I){const le="CDATA[";return I===le.charCodeAt(c++)?(e.consume(I),c===le.length?i.interrupt?t:U:x):n(I)}function S(I){return gi(I)?(e.consume(I),l=String.fromCharCode(I),C):n(I)}function C(I){if(I===null||I===47||I===62||dn(I)){const le=I===47,fe=l.toLowerCase();return!le&&!s&&YS.includes(fe)?(o=1,i.interrupt?t(I):U(I)):P2.includes(l.toLowerCase())?(o=6,le?(e.consume(I),_):i.interrupt?t(I):U(I)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(I):s?w(I):k(I))}return I===45||kn(I)?(e.consume(I),l+=String.fromCharCode(I),C):n(I)}function _(I){return I===62?(e.consume(I),i.interrupt?t:U):n(I)}function w(I){return Ge(I)?(e.consume(I),w):ee(I)}function k(I){return I===47?(e.consume(I),ee):I===58||I===95||gi(I)?(e.consume(I),D):Ge(I)?(e.consume(I),k):ee(I)}function D(I){return I===45||I===46||I===58||I===95||kn(I)?(e.consume(I),D):M(I)}function M(I){return I===61?(e.consume(I),O):Ge(I)?(e.consume(I),M):k(I)}function O(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,z):Ge(I)?(e.consume(I),O):j(I)}function z(I){return I===d?(e.consume(I),d=null,F):I===null||Ce(I)?n(I):(e.consume(I),z)}function j(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||dn(I)?M(I):(e.consume(I),j)}function F(I){return I===47||I===62||Ge(I)?k(I):n(I)}function ee(I){return I===62?(e.consume(I),q):n(I)}function q(I){return I===null||Ce(I)?U(I):Ge(I)?(e.consume(I),q):n(I)}function U(I){return I===45&&o===2?(e.consume(I),P):I===60&&o===1?(e.consume(I),$):I===62&&o===4?(e.consume(I),H):I===63&&o===3?(e.consume(I),R):I===93&&o===5?(e.consume(I),ue):Ce(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(j2,Y,Z)(I)):I===null||Ce(I)?(e.exit("htmlFlowData"),Z(I)):(e.consume(I),U)}function Z(I){return e.check(B2,X,Y)(I)}function X(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),W}function W(I){return I===null||Ce(I)?Z(I):(e.enter("htmlFlowData"),U(I))}function P(I){return I===45?(e.consume(I),R):U(I)}function $(I){return I===47?(e.consume(I),l="",ne):U(I)}function ne(I){if(I===62){const le=l.toLowerCase();return YS.includes(le)?(e.consume(I),H):U(I)}return gi(I)&&l.length<8?(e.consume(I),l+=String.fromCharCode(I),ne):U(I)}function ue(I){return I===93?(e.consume(I),R):U(I)}function R(I){return I===62?(e.consume(I),H):I===45&&o===2?(e.consume(I),R):U(I)}function H(I){return I===null||Ce(I)?(e.exit("htmlFlowData"),Y(I)):(e.consume(I),H)}function Y(I){return e.exit("htmlFlow"),t(I)}}function F2(e,t,n){const i=this;return o;function o(l){return Ce(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):n(l)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function G2(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Hd,t,n)}}const $2={name:"htmlText",tokenize:q2};function q2(e,t,n){const i=this;let o,s,l;return c;function c(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),d}function d(R){return R===33?(e.consume(R),f):R===47?(e.consume(R),M):R===63?(e.consume(R),k):gi(R)?(e.consume(R),j):n(R)}function f(R){return R===45?(e.consume(R),p):R===91?(e.consume(R),s=0,x):gi(R)?(e.consume(R),w):n(R)}function p(R){return R===45?(e.consume(R),v):n(R)}function m(R){return R===null?n(R):R===45?(e.consume(R),g):Ce(R)?(l=m,$(R)):(e.consume(R),m)}function g(R){return R===45?(e.consume(R),v):m(R)}function v(R){return R===62?P(R):R===45?g(R):m(R)}function x(R){const H="CDATA[";return R===H.charCodeAt(s++)?(e.consume(R),s===H.length?S:x):n(R)}function S(R){return R===null?n(R):R===93?(e.consume(R),C):Ce(R)?(l=S,$(R)):(e.consume(R),S)}function C(R){return R===93?(e.consume(R),_):S(R)}function _(R){return R===62?P(R):R===93?(e.consume(R),_):S(R)}function w(R){return R===null||R===62?P(R):Ce(R)?(l=w,$(R)):(e.consume(R),w)}function k(R){return R===null?n(R):R===63?(e.consume(R),D):Ce(R)?(l=k,$(R)):(e.consume(R),k)}function D(R){return R===62?P(R):k(R)}function M(R){return gi(R)?(e.consume(R),O):n(R)}function O(R){return R===45||kn(R)?(e.consume(R),O):z(R)}function z(R){return Ce(R)?(l=z,$(R)):Ge(R)?(e.consume(R),z):P(R)}function j(R){return R===45||kn(R)?(e.consume(R),j):R===47||R===62||dn(R)?F(R):n(R)}function F(R){return R===47?(e.consume(R),P):R===58||R===95||gi(R)?(e.consume(R),ee):Ce(R)?(l=F,$(R)):Ge(R)?(e.consume(R),F):P(R)}function ee(R){return R===45||R===46||R===58||R===95||kn(R)?(e.consume(R),ee):q(R)}function q(R){return R===61?(e.consume(R),U):Ce(R)?(l=q,$(R)):Ge(R)?(e.consume(R),q):F(R)}function U(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),o=R,Z):Ce(R)?(l=U,$(R)):Ge(R)?(e.consume(R),U):(e.consume(R),X)}function Z(R){return R===o?(e.consume(R),o=void 0,W):R===null?n(R):Ce(R)?(l=Z,$(R)):(e.consume(R),Z)}function X(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||dn(R)?F(R):(e.consume(R),X)}function W(R){return R===47||R===62||dn(R)?F(R):n(R)}function P(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function $(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),ne}function ne(R){return Ge(R)?nt(e,ue,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ue(R)}function ue(R){return e.enter("htmlTextData"),l(R)}}const py={name:"labelEnd",resolveAll:K2,resolveTo:Q2,tokenize:Z2},W2={tokenize:J2},Y2={tokenize:eI},X2={tokenize:tI};function K2(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&Si(e,0,e.length,n),e}function Q2(e,t){let n=e.length,i=0,o,s,l,c;for(;n--;)if(o=e[n][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[s][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",f,t]],c=Hn(c,e.slice(s+1,s+i+3)),c=Hn(c,[["enter",p,t]]),c=Hn(c,hy(t.parser.constructs.insideSpan.null,e.slice(s+i+4,l-3),t)),c=Hn(c,[["exit",p,t],e[l-2],e[l-1],["exit",f,t]]),c=Hn(c,e.slice(l+1)),c=Hn(c,[["exit",d,t]]),Si(e,s,e.length,c),e}function Z2(e,t,n){const i=this;let o=i.events.length,s,l;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){s=i.events[o][1];break}return c;function c(g){return s?s._inactive?m(g):(l=i.parser.defined.includes(Va(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),d):n(g)}function d(g){return g===40?e.attempt(W2,p,l?p:m)(g):g===91?e.attempt(Y2,p,l?f:m)(g):l?p(g):m(g)}function f(g){return e.attempt(X2,p,m)(g)}function p(g){return t(g)}function m(g){return s._balanced=!0,n(g)}}function J2(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return dn(m)?fl(e,s)(m):s(m)}function s(m){return m===41?p(m):G1(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return dn(m)?fl(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?q1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return dn(m)?fl(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function eI(e,t,n){const i=this;return o;function o(c){return $1.call(i,e,s,l,"reference","referenceMarker","referenceString")(c)}function s(c){return i.parser.defined.includes(Va(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function tI(e,t,n){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const nI={name:"labelStartImage",resolveAll:py.resolveAll,tokenize:iI};function iI(e,t,n){const i=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),s}function s(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const rI={name:"labelStartLink",resolveAll:py.resolveAll,tokenize:oI};function oI(e,t,n){const i=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const jp={name:"lineEnding",tokenize:aI};function aI(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const Wc={name:"thematicBreak",tokenize:sI};function sI(e,t,n){let i=0,o;return s;function s(f){return e.enter("thematicBreak"),l(f)}function l(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):i>=3&&(f===null||Ce(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),i++,d):(e.exit("thematicBreakSequence"),Ge(f)?nt(e,c,"whitespace")(f):c(f))}}const cn={continuation:{tokenize:dI},exit:hI,name:"list",tokenize:cI},lI={partial:!0,tokenize:pI},uI={partial:!0,tokenize:fI};function cI(e,t,n){const i=this,o=i.events[i.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return c;function c(v){const x=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:Ym(v)){if(i.containerState.type||(i.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Wc,n,f)(v):f(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return Ym(v)&&++l<10?(e.consume(v),d):(!i.interrupt||l<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),f(v)):n(v)}function f(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Hd,i.interrupt?n:p,e.attempt(lI,g,m))}function p(v){return i.containerState.initialBlankLine=!0,s++,g(v)}function m(v){return Ge(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),g):n(v)}function g(v){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function dI(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Hd,o,s);function o(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,nt(e,t,"listItemIndent",i.containerState.size+1)(c)}function s(c){return i.containerState.furtherBlankLines||!Ge(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(uI,t,l)(c))}function l(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,nt(e,e.attempt(cn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function fI(e,t,n){const i=this;return nt(e,o,"listItemIndent",i.containerState.size+1);function o(s){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(s):n(s)}}function hI(e){e.exit(this.containerState.type)}function pI(e,t,n){const i=this;return nt(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const l=i.events[i.events.length-1];return!Ge(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const XS={name:"setextUnderline",resolveTo:mI,tokenize:gI};function mI(e,t){let n=e.length,i,o,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",l,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function gI(e,t,n){const i=this;let o;return s;function s(f){let p=i.events.length,m;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){m=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),o=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ge(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ce(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const yI={tokenize:vI};function vI(e){const t=this,n=e.attempt(Hd,i,e.attempt(this.parser.constructs.flowInitial,o,nt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(C2,o)),"linePrefix")));return n;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const bI={resolveAll:Y1()},xI=W1("string"),SI=W1("text");function W1(e){return{resolveAll:Y1(e==="text"?_I:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],s=n.attempt(o,l,c);return l;function l(p){return f(p)?s(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),s(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=o[p];let g=-1;if(m)for(;++g<m.length;){const v=m[g];if(!v.previous||v.previous.call(i,i.previous))return!0}return!1}}}function Y1(e){return t;function t(n,i){let o=-1,s;for(;++o<=n.length;)s===void 0?n[o]&&n[o][1].type==="data"&&(s=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==s+2&&(n[s][1].end=n[o-1][1].end,n.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(n,i):n}}function _I(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],o=t.sliceStream(i);let s=o.length,l=-1,c=0,d;for(;s--;){const f=o[s];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(f===-2)d=!0,c++;else if(f!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const CI={42:cn,43:cn,45:cn,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,62:B1},wI={91:A2},EI={[-2]:Hp,[-1]:Hp,32:Hp},kI={35:I2,42:Wc,45:[XS,Wc],60:H2,61:XS,95:Wc,96:WS,126:WS},TI={38:V1,92:U1},AI={[-5]:jp,[-4]:jp,[-3]:jp,33:nI,38:V1,42:Xm,60:[r2,$2],91:rI,92:[D2,U1],93:py,95:Xm,96:y2},LI={null:[Xm,bI]},RI={null:[42,95]},OI={null:[]},DI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:RI,contentInitial:wI,disable:OI,document:CI,flow:kI,flowInitial:EI,insideSpan:LI,string:TI,text:AI},Symbol.toStringTag,{value:"Module"}));function MI(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},s=[];let l=[],c=[];const d={attempt:z(M),check:z(O),consume:w,enter:k,exit:D,interrupt:z(O,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:x,parser:e,previous:null,sliceSerialize:g,sliceStream:v,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&s.push(t),f;function m(q){return l=Hn(l,q),C(),l[l.length-1]!==null?[]:(j(t,0),f.events=hy(s,f.events,f),f.events)}function g(q,U){return NI(v(q),U)}function v(q){return II(l,q)}function x(){const{_bufferIndex:q,_index:U,line:Z,column:X,offset:W}=i;return{_bufferIndex:q,_index:U,line:Z,column:X,offset:W}}function S(q){o[q.line]=q.column,ee()}function C(){let q;for(;i._index<l.length;){const U=l[i._index];if(typeof U=="string")for(q=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===q&&i._bufferIndex<U.length;)_(U.charCodeAt(i._bufferIndex));else _(U)}}function _(q){p=p(q)}function w(q){Ce(q)?(i.line++,i.column=1,i.offset+=q===-3?2:1,ee()):q!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=q}function k(q,U){const Z=U||{};return Z.type=q,Z.start=x(),f.events.push(["enter",Z,f]),c.push(Z),Z}function D(q){const U=c.pop();return U.end=x(),f.events.push(["exit",U,f]),U}function M(q,U){j(q,U.from)}function O(q,U){U.restore()}function z(q,U){return Z;function Z(X,W,P){let $,ne,ue,R;return Array.isArray(X)?Y(X):"tokenize"in X?Y([X]):H(X);function H(re){return de;function de(_e){const pe=_e!==null&&re[_e],Pe=_e!==null&&re.null,je=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return Y(je)(_e)}}function Y(re){return $=re,ne=0,re.length===0?P:I(re[ne])}function I(re){return de;function de(_e){return R=F(),ue=re,re.partial||(f.currentConstruct=re),re.name&&f.parser.constructs.disable.null.includes(re.name)?fe():re.tokenize.call(U?Object.assign(Object.create(f),U):f,d,le,fe)(_e)}}function le(re){return q(ue,R),W}function fe(re){return R.restore(),++ne<$.length?I($[ne]):P}}}function j(q,U){q.resolveAll&&!s.includes(q)&&s.push(q),q.resolve&&Si(f.events,U,f.events.length-U,q.resolve(f.events.slice(U),f)),q.resolveTo&&(f.events=q.resolveTo(f.events,f))}function F(){const q=x(),U=f.previous,Z=f.currentConstruct,X=f.events.length,W=Array.from(c);return{from:X,restore:P};function P(){i=q,f.previous=U,f.currentConstruct=Z,f.events.length=X,c=W,ee()}}function ee(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function II(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(i,s)];else{if(l=e.slice(n,o),i>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(i):l.shift()}s>0&&l.push(e[o].slice(0,s))}return l}function NI(e,t){let n=-1;const i=[];let o;for(;++n<e.length;){const s=e[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
12
+ `;break}case-3:{l=`\r
13
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(s)}o=s===-2,i.push(l)}return i.join("")}function zI(e){const i={constructs:FM([DI,...(e||{}).extensions||[]]),content:o(QM),defined:[],document:o(JM),flow:o(yI),lazy:{},string:o(xI),text:o(SI)};return i;function o(s){return l;function l(c){return MI(i,s,c)}}}function PI(e){for(;!F1(e););return e}const KS=/[\0\t\n\r]/g;function HI(){let e=1,t="",n=!0,i;return o;function o(s,l,c){const d=[];let f,p,m,g,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),m=0,t="",n&&(s.charCodeAt(0)===65279&&m++,n=void 0);m<s.length;){if(KS.lastIndex=m,f=KS.exec(s),g=f&&f.index!==void 0?f.index:s.length,v=s.charCodeAt(g),!f){t=s.slice(m);break}if(v===10&&m===g&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),m<g&&(d.push(s.slice(m,g)),e+=g-m),v){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}m=g+1}return c&&(i&&d.push(-5),t&&d.push(t),d.push(null)),d}}const jI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function BI(e){return e.replace(jI,UI)}function UI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),s=o===120||o===88;return j1(n.slice(s?2:1),s?16:10)}return fy(n)||e}const X1={}.hasOwnProperty;function VI(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),FI(n)(PI(zI(n).document().write(HI()(e,t,!0))))}function FI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Wt),autolinkProtocol:F,autolinkEmail:F,atxHeading:s(rt),blockQuote:s(Pe),characterEscape:F,characterReference:F,codeFenced:s(je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(je,l),codeText:s(st,l),codeTextData:F,data:F,codeFlowValue:F,definition:s(He),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Ve),hardBreakEscape:s(en),hardBreakTrailing:s(en),htmlFlow:s(jt,l),htmlFlowData:F,htmlText:s(jt,l),htmlTextData:F,image:s(Bt),label:l,link:s(Wt),listItem:s(ni),listItemValue:g,listOrdered:s(dt,m),listUnordered:s(dt),paragraph:s(ff),reference:I,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(rt),strong:s(hf),thematicBreak:s(pf)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:pe,autolinkProtocol:_e,blockQuote:d(),characterEscapeValue:ee,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:re,characterReference:de,codeFenced:d(C),codeFencedFence:S,codeFencedFenceInfo:v,codeFencedFenceMeta:x,codeFlowValue:ee,codeIndented:d(_),codeText:d(W),codeTextData:ee,data:ee,definition:d(),definitionDestinationString:D,definitionLabelString:w,definitionTitleString:k,emphasis:d(),hardBreakEscape:d(U),hardBreakTrailing:d(U),htmlFlow:d(Z),htmlFlowData:ee,htmlText:d(X),htmlTextData:ee,image:d($),label:ue,labelText:ne,lineEnding:q,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:le,resourceDestinationString:R,resourceTitleString:H,resource:Y,setextHeading:d(j),setextHeadingLineSequence:z,setextHeadingText:O,strong:d(),thematicBreak:d()}};K1(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(oe){let he={type:"root",children:[]};const Se={stack:[he],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:p,data:n},Oe=[];let $e=-1;for(;++$e<oe.length;)if(oe[$e][1].type==="listOrdered"||oe[$e][1].type==="listUnordered")if(oe[$e][0]==="enter")Oe.push($e);else{const mn=Oe.pop();$e=o(oe,mn,$e)}for($e=-1;++$e<oe.length;){const mn=t[oe[$e][0]];X1.call(mn,oe[$e][1].type)&&mn[oe[$e][1].type].call(Object.assign({sliceSerialize:oe[$e][2].sliceSerialize},Se),oe[$e][1])}if(Se.tokenStack.length>0){const mn=Se.tokenStack[Se.tokenStack.length-1];(mn[1]||QS).call(Se,void 0,mn[0])}for(he.position={start:Ir(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Ir(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)he=t.transforms[$e](he)||he;return he}function o(oe,he,Se){let Oe=he-1,$e=-1,mn=!1,Ei,Xt,St,tn;for(;++Oe<=Se;){const Ze=oe[Oe];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?$e++:$e--,tn=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Ei&&!tn&&!$e&&!St&&(St=Oe),tn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tn=void 0}if(!$e&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||$e===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Ei){let lr=Oe;for(Xt=void 0;lr--;){const Vn=oe[lr];if(Vn[1].type==="lineEnding"||Vn[1].type==="lineEndingBlank"){if(Vn[0]==="exit")continue;Xt&&(oe[Xt][1].type="lineEndingBlank",mn=!0),Vn[1].type="lineEnding",Xt=lr}else if(!(Vn[1].type==="linePrefix"||Vn[1].type==="blockQuotePrefix"||Vn[1].type==="blockQuotePrefixWhitespace"||Vn[1].type==="blockQuoteMarker"||Vn[1].type==="listItemIndent"))break}St&&(!Xt||St<Xt)&&(Ei._spread=!0),Ei.end=Object.assign({},Xt?oe[Xt][1].start:Ze[1].end),oe.splice(Xt||Oe,0,["exit",Ei,Ze[2]]),Oe++,Se++}if(Ze[1].type==="listItemPrefix"){const lr={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Ei=lr,oe.splice(Oe,0,["enter",lr,Ze[2]]),Oe++,Se++,St=void 0,tn=!0}}}return oe[he][1]._spread=mn,Se}function s(oe,he){return Se;function Se(Oe){c.call(this,oe(Oe),Oe),he&&he.call(this,Oe)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(oe,he,Se){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([he,Se||void 0]),oe.position={start:Ir(he.start),end:void 0}}function d(oe){return he;function he(Se){oe&&oe.call(this,Se),f.call(this,Se)}}function f(oe,he){const Se=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==oe.type&&(he?he.call(this,oe,Oe[0]):(Oe[1]||QS).call(this,oe,Oe[0]));else throw new Error("Cannot close `"+oe.type+"` ("+dl({start:oe.start,end:oe.end})+"): it’s not open");Se.position.end=Ir(oe.end)}function p(){return UM(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(oe){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function v(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.lang=oe}function x(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe.replace(/(\r?\n|\r)$/g,"")}function w(oe){const he=this.resume(),Se=this.stack[this.stack.length-1];Se.label=he,Se.identifier=Va(this.sliceSerialize(oe)).toLowerCase()}function k(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.title=oe}function D(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.url=oe}function M(oe){const he=this.stack[this.stack.length-1];if(!he.depth){const Se=this.sliceSerialize(oe).length;he.depth=Se}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function z(oe){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function F(oe){const Se=this.stack[this.stack.length-1].children;let Oe=Se[Se.length-1];(!Oe||Oe.type!=="text")&&(Oe=Yt(),Oe.position={start:Ir(oe.start),end:void 0},Se.push(Oe)),this.stack.push(Oe)}function ee(oe){const he=this.stack.pop();he.value+=this.sliceSerialize(oe),he.position.end=Ir(oe.end)}function q(oe){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Se=he.children[he.children.length-1];Se.position.end=Ir(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(he.type)&&(F.call(this,oe),ee.call(this,oe))}function U(){this.data.atHardBreak=!0}function Z(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe}function X(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe}function W(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe}function P(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=he,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function $(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=he,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ne(oe){const he=this.sliceSerialize(oe),Se=this.stack[this.stack.length-2];Se.label=BI(he),Se.identifier=Va(he).toLowerCase()}function ue(){const oe=this.stack[this.stack.length-1],he=this.resume(),Se=this.stack[this.stack.length-1];if(this.data.inReference=!0,Se.type==="link"){const Oe=oe.children;Se.children=Oe}else Se.alt=he}function R(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.url=oe}function H(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.title=oe}function Y(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function le(oe){const he=this.resume(),Se=this.stack[this.stack.length-1];Se.label=he,Se.identifier=Va(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function fe(oe){this.data.characterReferenceType=oe.type}function re(oe){const he=this.sliceSerialize(oe),Se=this.data.characterReferenceType;let Oe;Se?(Oe=j1(he,Se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=fy(he);const $e=this.stack[this.stack.length-1];$e.value+=Oe}function de(oe){const he=this.stack.pop();he.position.end=Ir(oe.end)}function _e(oe){ee.call(this,oe);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(oe)}function pe(oe){ee.call(this,oe);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(oe)}function Pe(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function st(){return{type:"inlineCode",value:""}}function He(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ve(){return{type:"emphasis",children:[]}}function rt(){return{type:"heading",depth:0,children:[]}}function en(){return{type:"break"}}function jt(){return{type:"html",value:""}}function Bt(){return{type:"image",title:null,url:"",alt:null}}function Wt(){return{type:"link",title:null,url:"",children:[]}}function dt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function ni(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function ff(){return{type:"paragraph",children:[]}}function hf(){return{type:"strong",children:[]}}function Yt(){return{type:"text",value:""}}function pf(){return{type:"thematicBreak"}}}function Ir(e){return{line:e.line,column:e.column,offset:e.offset}}function K1(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?K1(e,i):GI(e,i)}}function GI(e,t){let n;for(n in t)if(X1.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function QS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+dl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+dl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+dl({start:t.start,end:t.end})+") is still open")}function $I(e){const t=this;t.parser=n;function n(i){return VI(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qI(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function WI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
14
+ `}]}function YI(e,t){const n=t.value?t.value+`
15
+ `:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function XI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KI(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QI(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=Ka(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let l,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=s+1,c+=1,e.footnoteCounts.set(i,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function ZI(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JI(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Q1(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=i:o.push({type:"text",value:i}),o}function eN(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Q1(e,t);const o={src:Ka(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,s),e.applyData(t,s)}function tN(e,t){const n={src:Ka(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function nN(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function iN(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Q1(e,t);const o={href:Ka(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function rN(e,t){const n={href:Ka(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function oN(e,t,n){const i=e.all(t),o=n?aN(n):Z1(t),s={},l=[];if(typeof t.checked=="boolean"){const p=i[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const p=i[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
16
+ `}),p.type==="element"&&p.tagName==="p"&&!o?l.push(...p.children):l.push(p)}const d=i[i.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
17
+ `});const f={type:"element",tagName:"li",properties:s,children:l};return e.patch(t,f),e.applyData(t,f)}function aN(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Z1(n[i])}return t}function Z1(e){const t=e.spread;return t??e.children.length>1}function sN(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){const l=i[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function lN(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function cN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dN(e,t){const n=e.all(t),i=n.shift(),o=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=ly(t.children[1]),d=D1(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),o.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function fN(e,t,n){const i=n?n.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],g={},v=l?l[d]:void 0;v&&(g.align=v);let x={type:"element",tagName:s,properties:g,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function hN(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ZS=9,JS=32;function pN(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const s=[];for(;i;)s.push(e_(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return s.push(e_(t.slice(o),o>0,!1)),s.join("")}function e_(e,t,n){let i=0,o=e.length;if(t){let s=e.codePointAt(i);for(;s===ZS||s===JS;)i++,s=e.codePointAt(i)}if(n){let s=e.codePointAt(o-1);for(;s===ZS||s===JS;)o--,s=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function mN(e,t){const n={type:"text",value:pN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function gN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const yN={blockquote:qI,break:WI,code:YI,delete:XI,emphasis:KI,footnoteReference:QI,heading:ZI,html:JI,imageReference:eN,image:tN,inlineCode:nN,linkReference:iN,link:rN,listItem:oN,list:sN,paragraph:lN,root:uN,strong:cN,table:dN,tableCell:hN,tableRow:fN,text:mN,thematicBreak:gN,toml:hc,yaml:hc,definition:hc,footnoteDefinition:hc};function hc(){}const J1=-1,jd=0,hl=1,ad=2,my=3,gy=4,yy=5,vy=6,eE=7,tE=8,nE=typeof self=="object"?self:globalThis,t_=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new nE[e](t)},vN=(e,t)=>{const n=(o,s)=>(e.set(s,o),o),i=o=>{if(e.has(o))return e.get(o);const[s,l]=t[o];switch(s){case jd:case J1:return n(l,o);case hl:{const c=n([],o);for(const d of l)c.push(i(d));return c}case ad:{const c=n({},o);for(const[d,f]of l)c[i(d)]=i(f);return c}case my:return n(new Date(l),o);case gy:{const{source:c,flags:d}=l;return n(new RegExp(c,d),o)}case yy:{const c=n(new Map,o);for(const[d,f]of l)c.set(i(d),i(f));return c}case vy:{const c=n(new Set,o);for(const d of l)c.add(i(d));return c}case eE:{const{name:c,message:d}=l;return n(typeof nE[c]=="function"?t_(c,d):new Error(d),o)}case tE:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(t_(s,l),o)};return i},n_=e=>vN(new Map,e)(0),yo="",{toString:bN}={},{keys:xN}=Object,el=e=>{const t=typeof e;if(t!=="object"||!e)return[jd,t];const n=bN.call(e).slice(8,-1);switch(n){case"Array":return[hl,yo];case"Object":return[ad,yo];case"Date":return[my,yo];case"RegExp":return[gy,yo];case"Map":return[yy,yo];case"Set":return[vy,yo];case"DataView":return[hl,n]}return n.includes("Array")?[hl,n]:e instanceof Error?[eE,e.name||"Error"]:[ad,n]},pc=([e,t])=>e===jd&&(t==="function"||t==="symbol"),SN=(e,t,n,i)=>{const o=(l,c)=>{const d=i.push(l)-1;return n.set(c,d),d},s=l=>{if(n.has(l))return n.get(l);let[c,d]=el(l);switch(c){case jd:{let p=l;switch(d){case"bigint":c=tE,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([J1],l)}return o([c,p],l)}case hl:{if(d){let g=l;return d==="DataView"?g=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(g=new Uint8Array(l)),o([d,[...g]],l)}const p=[],m=o([c,p],l);for(const g of l)p.push(s(g));return m}case ad:{if(d)switch(d){case"BigInt":return o([d,l.toString()],l);case"Boolean":case"Number":case"String":return o([d,l.valueOf()],l)}if(t&&"toJSON"in l)return s(l.toJSON());const p=[],m=o([c,p],l);for(const g of xN(l))(e||!pc(el(l[g])))&&p.push([s(g),s(l[g])]);return m}case my:return o([c,isNaN(l.getTime())?yo:l.toISOString()],l);case gy:{const{source:p,flags:m}=l;return o([c,{source:p,flags:m}],l)}case yy:{const p=[],m=o([c,p],l);for(const[g,v]of l)(e||!(pc(el(g))||pc(el(v))))&&p.push([s(g),s(v)]);return m}case vy:{const p=[],m=o([c,p],l);for(const g of l)(e||!pc(el(g)))&&p.push(s(g));return m}}const{message:f}=l;return o([c,{name:d,message:f}],l)};return s},i_=(e,{json:t,lossy:n}={})=>{const i=[];return SN(!(t||n),!!t,new Map,i)(e),i},sd=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?n_(i_(e,t)):structuredClone(e):(e,t)=>n_(i_(e,t));function _N(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function CN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function wN(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_N,i=e.options.footnoteBackLabel||CN,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),g=Ka(m.toLowerCase());let v=0;const x=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++v<=S;){x.length>0&&x.push({type:"text",value:" "});let w=typeof n=="string"?n:n(d,v);typeof w=="string"&&(w={type:"text",value:w}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,v),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const w=C.children[C.children.length-1];w&&w.type==="text"?w.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...x)}else p.push(...x);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(p,!0)};e.patch(f,_),c.push(_)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...sd(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
18
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
19
+ `}]}}const iE=(function(e){if(e==null)return AN;if(typeof e=="function")return Bd(e);if(typeof e=="object")return Array.isArray(e)?EN(e):kN(e);if(typeof e=="string")return TN(e);throw new Error("Expected function, string, or object as test")});function EN(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=iE(e[n]);return Bd(i);function i(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function kN(e){const t=e;return Bd(n);function n(i){const o=i;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function TN(e){return Bd(t);function t(n){return n&&n.type===e}}function Bd(e){return t;function t(n,i,o){return!!(LN(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function AN(){return!0}function LN(e){return e!==null&&typeof e=="object"&&"type"in e}const rE=[],RN=!0,r_=!1,ON="skip";function DN(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const s=iE(o),l=i?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return g;function g(){let v=rE,x,S,C;if((!t||s(d,f,p[p.length-1]||void 0))&&(v=MN(n(d,p)),v[0]===r_))return v;if("children"in d&&d.children){const _=d;if(_.children&&v[0]!==ON)for(S=(i?_.children.length:-1)+l,C=p.concat(_);S>-1&&S<_.children.length;){const w=_.children[S];if(x=c(w,S,C)(),x[0]===r_)return x;S=typeof x[1]=="number"?x[1]:S+l}}return v}}}function MN(e){return Array.isArray(e)?e:typeof e=="number"?[RN,e]:e==null?rE:[e]}function oE(e,t,n,i){let o,s,l;typeof t=="function"&&typeof n!="function"?(s=void 0,l=t,o=n):(s=t,l=n,o=i),DN(e,s,c,o);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return l(d,m,p)}}const Km={}.hasOwnProperty,IN={};function NN(e,t){const n=t||IN,i=new Map,o=new Map,s=new Map,l={...yN,...n.handlers},c={all:f,applyData:PN,definitionById:i,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:l,one:d,options:n,patch:zN,wrap:jN};return oE(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?i:o,g=String(p.identifier).toUpperCase();m.has(g)||m.set(g,p)}}),c;function d(p,m){const g=p.type,v=c.handlers[g];if(Km.call(c.handlers,g)&&v)return v(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(g)){if("children"in p){const{children:S,...C}=p,_=sd(C);return _.children=c.all(p),_}return sd(p)}return(c.options.unknownHandler||HN)(c,p,m)}function f(p){const m=[];if("children"in p){const g=p.children;let v=-1;for(;++v<g.length;){const x=c.one(g[v],p);if(x){if(v&&g[v-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=o_(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=o_(S.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function zN(e,t){e.position&&(t.position=bM(e))}function PN(e,t){let n=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,sd(s)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function HN(e,t){const n=t.data||{},i="value"in t&&!(Km.call(n,"hProperties")||Km.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function jN(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
20
+ `});++i<e.length;)i&&n.push({type:"text",value:`
21
+ `}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
22
+ `}),n}function o_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function a_(e,t){const n=NN(e,t),i=n.one(e,void 0),o=wN(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
23
+ `},o),s}function BN(e,t){return e&&"run"in e?async function(n,i){const o=a_(n,{file:i,...t});await e.run(o,i)}:function(n,i){return a_(n,{file:i,...e||t})}}function s_(e){if(e)throw e}var Bp,l_;function UN(){if(l_)return Bp;l_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},s=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var g;for(g in f);return typeof g>"u"||e.call(f,g)},l=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(i)return i(f,p).value}else return;return f[p]};return Bp=function d(){var f,p,m,g,v,x,S=arguments[0],C=1,_=arguments.length,w=!1;for(typeof S=="boolean"&&(w=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<_;++C)if(f=arguments[C],f!=null)for(p in f)m=c(S,p),g=c(f,p),S!==g&&(w&&g&&(s(g)||(v=o(g)))?(v?(v=!1,x=m&&o(m)?m:[]):x=m&&s(m)?m:{},l(S,{name:p,newValue:d(w,x,g)})):typeof g<"u"&&l(S,{name:p,newValue:g}));return S},Bp}var VN=UN();const Up=zd(VN);function Qm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function FN(){const e=[],t={run:n,use:i};return t;function n(...o){let s=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...o);function c(d,...f){const p=e[++s];let m=-1;if(d){l(d);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,p?GN(p,c)(...f):l(null,...f)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function GN(e,t){let n;return i;function i(...l){const c=e.length>l.length;let d;c&&l.push(o);try{d=e.apply(this,l)}catch(f){const p=f;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(s,o):d instanceof Error?o(d):s(d))}function o(l,...c){n||(n=!0,t(l,...c))}function s(l){o(null,l)}}const di={basename:$N,dirname:qN,extname:WN,join:YN,sep:"/"};function $N(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pl(e);let n=0,i=-1,o=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else i<0&&(s=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else l<0&&(s=!0,l=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(i=o):(c=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function qN(e){if(Pl(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function WN(e){Pl(e);let t=e.length,n=-1,i=0,o=-1,s=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||n<0||s===0||s===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function YN(...e){let t=-1,n;for(;++t<e.length;)Pl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":XN(n)}function XN(e){Pl(e);const t=e.codePointAt(0)===47;let n=KN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function KN(e,t){let n="",i=0,o=-1,s=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(o===l-1||s===1))if(o!==l-1&&s===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),o=l,s=0;continue}}else if(n.length>0){n="",i=0,o=l,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),i=l-o-1;o=l,s=0}else c===46&&s>-1?s++:s=-1}return n}function Pl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const QN={cwd:ZN};function ZN(){return"/"}function Zm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function JN(e){if(typeof e=="string")e=new URL(e);else if(!Zm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ez(e)}function ez(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Vp=["history","path","basename","stem","extname","dirname"];class aE{constructor(t){let n;t?Zm(t)?n={path:t}:typeof t=="string"||tz(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":QN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Vp.length;){const s=Vp[i];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let o;for(o in n)Vp.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?di.basename(this.path):void 0}set basename(t){Gp(t,"basename"),Fp(t,"basename"),this.path=di.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?di.dirname(this.path):void 0}set dirname(t){u_(this.basename,"dirname"),this.path=di.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?di.extname(this.path):void 0}set extname(t){if(Fp(t,"extname"),u_(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=di.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zm(t)&&(t=JN(t)),Gp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?di.basename(this.path,this.extname):void 0}set stem(t){Gp(t,"stem"),Fp(t,"stem"),this.path=di.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new qt(t,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Fp(e,t){if(e&&e.includes(di.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+di.sep+"`")}function Gp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function u_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function tz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nz=(function(e){const i=this.constructor.prototype,o=i[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),iz={}.hasOwnProperty;class by extends nz{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=FN()}copy(){const t=new by;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Up(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Wp("data",this.frozen),this.namespace[t]=n,this):iz.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Wp("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=mc(t),i=this.parser||this.Parser;return $p("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),$p("process",this.parser||this.Parser),qp("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(s,l){const c=mc(t),d=i.parse(c);i.run(d,c,function(p,m,g){if(p||!m||!g)return f(p);const v=m,x=i.stringify(v,g);az(x)?g.value=x:g.result=x,f(p,g)});function f(p,m){p||!m?l(p):s?s(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),$p("processSync",this.parser||this.Parser),qp("processSync",this.compiler||this.Compiler),this.process(t,o),d_("processSync","process",n),i;function o(s,l){n=!0,s_(s),i=l}}run(t,n,i){c_(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?s(void 0,i):new Promise(s);function s(l,c){const d=mc(n);o.run(t,d,f);function f(p,m,g){const v=m||t;p?c(p):l?l(v):i(void 0,v,g)}}}runSync(t,n){let i=!1,o;return this.run(t,n,s),d_("runSync","run",i),o;function s(l,c){s_(l),o=c,i=!0}}stringify(t,n){this.freeze();const i=mc(n),o=this.compiler||this.Compiler;return qp("stringify",o),c_(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(Wp("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(o.settings=Up(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];s(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,g=-1;for(;++m<i.length;)if(i[m][0]===f){g=m;break}if(g===-1)i.push([f,...p]);else if(p.length>0){let[v,...x]=p;const S=i[g][1];Qm(S)&&Qm(v)&&(v=Up(!0,S,v)),i[g]=[f,v,...x]}}}}const rz=new by().freeze();function $p(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Wp(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function c_(e){if(!Qm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function d_(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function mc(e){return oz(e)?e:new aE(e)}function oz(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function az(e){return typeof e=="string"||sz(e)}function sz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lz="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",f_=[],h_={allowDangerousHtml:!0},uz=/^(https?|ircs?|mailto|xmpp)$/i,cz=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function dz(e){const t=fz(e),n=hz(e);return pz(t.runSync(t.parse(n),n),e)}function fz(e){const t=e.rehypePlugins||f_,n=e.remarkPlugins||f_,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...h_}:h_;return rz().use($I).use(n).use(BN,i).use(t)}function hz(e){const t=e.children||"",n=new aE;return typeof t=="string"&&(n.value=t),n}function pz(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,s=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||mz;for(const p of cz)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+lz+p.id,void 0);return oE(e,f),wM(e,{Fragment:A.Fragment,components:o,ignoreInvalidStyle:!0,jsx:A.jsx,jsxs:A.jsxs,passKeys:!0,passNode:!0});function f(p,m,g){if(p.type==="raw"&&g&&typeof m=="number")return l?g.children.splice(m,1):g.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let v;for(v in Pp)if(Object.hasOwn(Pp,v)&&Object.hasOwn(p.properties,v)){const x=p.properties[v],S=Pp[v];(S===null||S.includes(p.tagName))&&(p.properties[v]=d(String(x||""),v,p))}}if(p.type==="element"){let v=n?!n.includes(p.tagName):s?s.includes(p.tagName):!1;if(!v&&i&&typeof m=="number"&&(v=!i(p,m,g)),v&&g&&typeof m=="number")return c&&p.children?g.children.splice(m,1,...p.children):g.children.splice(m,1),m}}}function mz(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||uz.test(e.slice(0,t))?e:""}const gz=["code","em","strong"];function yz(e){return e.replace(/\s+/g," ").trim()}const vz="mx-[0.08em] box-decoration-clone rounded-[0.22em] bg-[color-mix(in_srgb,var(--foreground)_8%,transparent)] px-[0.32em] py-[0.12em] font-mono text-[0.86em] font-medium not-italic",bz={code:({children:e})=>N.createElement("code",{className:vz},e),strong:({children:e})=>N.createElement("strong",{className:"font-semibold"},e)};function ko(e){const t=yz(e.text);return t===""?null:N.createElement(dz,{skipHtml:!0,unwrapDisallowed:!0,allowedElements:[...gz],components:bz,children:t})}function Jm(e){return A.jsxs("div",{className:it("max-w-[68ch]",e.className),children:[e.kicker!==void 0?A.jsx("p",{className:"mb-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:e.kicker}):null,A.jsx("h1",{className:"mb-3 font-serif text-[1.75rem] leading-snug text-foreground",children:e.title}),e.children]})}function xz(e){const{group:t,index:n,groups:i,partTitle:o,onOpenGroup:s}=e;return A.jsxs(Jm,{kicker:o!==void 0?`${o} · ${cl(n)}`:cl(n),title:t.title,children:[A.jsx("p",{className:"mb-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:"Why"}),A.jsx("p",{className:"mb-6 font-serif text-lg leading-relaxed text-foreground",children:A.jsx(ko,{text:t.why})}),A.jsx("p",{className:"mb-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:"What"}),A.jsx("p",{className:"mb-5 leading-relaxed text-foreground",children:A.jsx(ko,{text:t.summary})}),t.dependsOn.length>0?A.jsxs("p",{className:"mb-5 text-muted-foreground",children:["Depends on"," ",t.dependsOn.map((l,c)=>{const d=i.find(p=>p.id===l),f=d!==void 0?`${cl(Ww(i,l))} ${d.title}`:l;return A.jsxs("span",{children:[c>0?", ":"",A.jsx(Gt,{type:"button",variant:"link",className:"h-auto p-0",onClick:()=>s(l),children:f})]},l)})]}):null,t.lookFor.length>0?A.jsx("ul",{className:"mb-2 list-disc space-y-2 pl-5 leading-relaxed",children:t.lookFor.map((l,c)=>A.jsx("li",{children:A.jsx(ko,{text:l})},c))}):null,t.staleCount>0?A.jsxs("p",{className:"mt-4 text-warn",children:[t.staleCount," hunk ref",t.staleCount===1?"":"s"," no longer match live git. Git wins; the pointer is flagged, not replaced."]}):null]})}function Sz(e){return/^(@@ -\d+(?:,\d+)? \+\d+(?:,\d+)? @@)/.exec(e)?.[1]??e}function _z(e){const t=[],n=/^(?:export\s+)?(?:async\s+)?(?:function|class|type|interface|enum)\s+([A-Za-z_][\w]*)/;for(const i of e){const s=n.exec(i.trim())?.[1];s!==void 0&&!t.includes(s)&&t.push(s)}return t}function Cz(e){let t=0,n=0;for(const i of e)i.kind==="add"?t+=1:i.kind==="del"&&(n+=1);return{added:t,removed:n}}const xy="diffs-container";(()=>{try{return!1}catch{return!1}})();const wz=/(?=^From [a-f0-9]+ .+$)/m,sE=/(?=^diff --git)/gm,Ez=new RegExp("(?<=\\n)"),kz=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Tz=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Az=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Lz=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Sy="header-prefix",_y="header-filename-suffix",Cy="header-metadata",Hl="header-custom",mt={dark:"pierre-dark",light:"pierre-light"},Rz="data-theme-css",Oz="data-unsafe-css",Dz="data-diffs-scrollbar-measure",lE="--diffs-scrollbar-gutter-measured",Mz=1e5,wy={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...wy});const Iz=Object.freeze({fromStart:0,fromEnd:0}),ld={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},uE={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Fa=new Set;let Ga=null;function cE(e){Fa.add(e),Ga??=requestAnimationFrame(dE)}function eg(e){Fa.delete(e)&&Fa.size===0&&Ga!=null&&(cancelAnimationFrame(Ga),Ga=null)}function dE(e){const t=new Set(Fa);Fa.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Fa.size>0?Ga=requestAnimationFrame(dE):Ga=null}function ud(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),o=Object.keys(e),s=new Set(Object.keys(t));for(const l of o)if(s.delete(l),!i.has(l)&&(!(l in t)||e[l]!==t[l]))return!1;for(const l of Array.from(s))if(!i.has(l))return!1;return!0}function Qa(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Ud(e,t){const n=e?.theme??mt,i=t?.theme??mt,o=p_(e),s=p_(t);return Qa(n,i)&&ud(e,t,["theme","parseDiffOptions"])&&ud(o,s)}function p_(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function tg(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function nr(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const Nz=new TextEncoder,zz=new TextDecoder("utf-8",{ignoreBOM:!0}),Pz=/[\uD800-\uDFFF]/,ng=1024;let Ha=new Uint8Array(ng);function fE(){Ha.length!==ng&&(Ha=new Uint8Array(ng))}function wt(e){if(e.length===0)return e;if(Pz.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;Ha.length<t&&(Ha=new Uint8Array(t));const{written:n}=Nz.encodeInto(e,Ha);return zz.decode(Ha.subarray(0,n))}function _i(e,t){return e-(t===0?0:1)}function hn(e,t){return _i(e,t)+t}const Hz=4096,jz=.5;function Bz(e){for(const t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){const i=t.hunkContent[n];if(i.type!=="change")continue;const o=Vz(e,i);o!=null&&(t.hunkContent.splice(n,1,...o),n+=o.length-1)}Uz(t,e)}}function Uz(e,t){const{hunkContent:n}=e;for(let i=1;i<n.length;i++){const o=n[i],s=n[i-1];if(o.type!=="change"||o.additions>0&&o.deletions>0||s.type!=="context")continue;const l=o.additions>0,c=l?t.additionLines:t.deletionLines,d=l?o.additionLineIndex:o.deletionLineIndex,f=l?o.additions:o.deletions,p=c[d]??"";if(p.trim()!=="")continue;let m=!0;for(let C=1;C<f;C++)if(c[d+C]!==p){m=!1;break}if(!m)continue;let g=0;for(;g<s.lines&&t.additionLines[s.additionLineIndex+s.lines-1-g]===p;)g++;if(g===0||i===1&&g===s.lines)continue;o.additionLineIndex-=g,o.deletionLineIndex-=g;const v=o.additionLineIndex+o.additions,x=o.deletionLineIndex+o.deletions,S=n[i+1];S?.type==="context"?(S.lines+=g,S.additionLineIndex=v,S.deletionLineIndex=x):n.splice(i+1,0,{type:"context",lines:g,additionLineIndex:v,deletionLineIndex:x}),s.lines-=g,s.lines===0&&(n.splice(i-1,1),i--)}}function Vz(e,t){const{deletions:n,additions:i,deletionLineIndex:o,additionLineIndex:s}=t,l=Math.min(n,i),c=Math.abs(i-n);if(l===0||c===0||l*(c+1)>Hz)return null;const d=[];for(let S=0;S<n;S++)d.push(m_(e.deletionLines[o+S]??""));const f=[];for(let S=0;S<i;S++)f.push(m_(e.additionLines[s+S]??""));const p=i>n;let m=0,g=-1;for(let S=0;S<=c;S++){let C=0;for(let _=0;_<l;_++)C+=Gz(d[_+(p?0:S)],f[_+(p?S:0)]);S===0?g=C+l*jz:C>g&&(g=C,m=S)}if(m===0)return null;const v=[],x=(S,C,_,w)=>{(S>0||C>0)&&v.push({type:"change",deletions:S,additions:C,deletionLineIndex:_,additionLineIndex:w})};return p?(x(0,m,o,s),x(l,l,o,s+m),x(0,i-l-m,o+l,s+m+l)):(x(m,0,o,s),x(l,l,o+m,s),x(n-l-m,0,o+m+l,s+l)),v}const Fz=/\s+/g;function m_(e){return e.replace(Fz,"")}function Gz(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),i=Math.min(e.length,t.length);if(i===0)return 0;let o=0;for(;o<i&&e[o]===t[o];)o++;let s=0;for(;s<i-o&&e[e.length-1-s]===t[t.length-1-s];)s++;return(o+s)/n}function $z(e,t,n){try{return qz(e,t,n)}finally{fE()}}function qz(e,t,n=!1){const i=nP(e),o=i?Kz(e):Qz(e);let s;const l=[];for(const c of o){if(i&&!sE.test(c)){if(s==null)s=wt(c);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",c)}continue}else if(!i&&!Zz(c)){if(s==null)s=wt(c);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",c)}continue}const d=hE(c,{cacheKey:t!=null?`${t}-${l.length}`:void 0,isGitDiff:i,throwOnError:n});d!=null&&l.push(d)}return{patchMetadata:s,files:l}}function Wz(e,t){try{return hE(e,t)}finally{fE()}}function hE(e,{cacheKey:t,isGitDiff:n=sE.test(e),oldFile:i,newFile:o,throwOnError:s=!1}={}){let l=0;const c=yE(e,"@@ ");let d;const f=i==null||o==null;let p=0,m=0;for(const g of c){const v=pE(g),x=v[0];if(x==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",g);continue}const S=gE(x);let C=0,_=0;if(S==null||d==null){if(d!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",g);continue}d={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:f,additionLines:!f&&i!=null&&o!=null?g_(o.contents):[],deletionLines:!f&&i!=null&&o!=null?g_(i.contents):[],cacheKey:b_(t)},d.additionLines.length===1&&o?.contents===""&&(d.additionLines.length=0),d.deletionLines.length===1&&i?.contents===""&&(d.deletionLines.length=0);for(const F of v){if(F.startsWith("diff --git")){const q=F.trim().match(Az),U=q?.[1]??q?.[2],Z=q?.[3]??q?.[4];if(U==null||Z==null){if(s)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",F);continue}d.name=wt(Z.trim()),U!==Z&&(d.prevName=wt(U.trim()));continue}const ee=F.startsWith("---")||F.startsWith("+++")?F.match(n?Tz:kz):null;if(ee!=null){const[,q,U]=ee;if(q==="---"&&U!=="/dev/null"){const Z=wt(U.trim());d.prevName=Z,d.name=Z}else q==="+++"&&U!=="/dev/null"&&(d.name=wt(U.trim()))}else if(n){if(F.startsWith("new mode ")&&(d.mode=wt(F.slice(8).trim())),F.startsWith("old mode ")&&(d.prevMode=wt(F.slice(8).trim())),F.startsWith("new file mode")&&(d.type="new",d.mode=wt(F.slice(13).trim())),F.startsWith("deleted file mode")&&(d.type="deleted",d.mode=wt(F.slice(17).trim())),F.startsWith("similarity index")&&(F.startsWith("similarity index 100%")?d.type="rename-pure":d.type="rename-changed"),F.startsWith("index ")){const[,q,U,Z]=F.trim().match(Lz)??[];q!=null&&(d.prevObjectId=wt(q)),U!=null&&(d.newObjectId=wt(U)),Z!=null&&(d.mode=wt(Z))}F.startsWith("rename from ")&&(d.prevName=wt(F.slice(12).trim())),F.startsWith("rename to ")&&(d.name=wt(F.slice(10).trim()))}}continue}let w,k;for(;v.length>0&&(v[v.length-1]===`
24
+ `||v[v.length-1]==="\r"||v[v.length-1]===`\r
25
+ `||v[v.length-1]==="");)v.pop();const{additionStart:D,deletionStart:M}=S;p=f?p:M-1,m=f?m:D-1;const O={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:S.additionCount,additionStart:D,additionLines:C,deletionCount:S.deletionCount,deletionStart:M,deletionLines:_,deletionLineIndex:p,additionLineIndex:m,hunkContent:[],hunkContext:b_(S.hunkContext),hunkSpecs:wt(x),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let z=0,j=0;for(let F=1;F<v.length;F++){const ee=v[F];if(z>=O.additionCount&&j>=O.deletionCount&&!ee.startsWith("\\")){if(s&&Jz(ee)&&!eP(ee))throw Error("parsePatchContent: hunk has more lines than expected");break}const q=ee[0];if(q!=="+"&&q!=="-"&&q!==" "&&q!=="\\"){if(s)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${q}", full line: "${ee}"`),console.error("processFile: invalid rawLine:",ee);continue}const U=iP(q);if(U==="addition"){if(s&&z>=O.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const Z=Yp(ee);(w==null||w.type!=="change")&&(w=Xp("change",p,m),O.hunkContent.push(w)),m++,z++,f&&d.additionLines.push(Z),w.additions++,C++,k="addition"}else if(U==="deletion"){if(s&&j>=O.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const Z=Yp(ee);(w==null||w.type!=="change")&&(w=Xp("change",p,m),O.hunkContent.push(w)),p++,j++,f&&d.deletionLines.push(Z),w.deletions++,_++,k="deletion"}else if(U==="context"){if(s&&(j>=O.deletionCount||z>=O.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const Z=Yp(ee);(w==null||w.type!=="context")&&(w=Xp("context",p,m),O.hunkContent.push(w)),m++,p++,z++,j++,f&&(d.deletionLines.push(Z),d.additionLines.push(Z)),w.lines++,k="context"}else if(U==="metadata"&&w!=null){if(w.type==="context"?(O.noEOFCRAdditions=!0,O.noEOFCRDeletions=!0):k==="deletion"?O.noEOFCRDeletions=!0:k==="addition"&&(O.noEOFCRAdditions=!0),f&&(k==="addition"||k==="context")){const Z=d.additionLines.length-1;Z>=0&&(d.additionLines[Z]=nr(d.additionLines[Z]))}if(f&&(k==="deletion"||k==="context")){const Z=d.deletionLines.length-1;Z>=0&&(d.deletionLines[Z]=nr(d.deletionLines[Z]))}}}if(s&&(z!==O.additionCount||j!==O.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");O.additionLines=C,O.deletionLines=_,O.collapsedBefore=Math.max(_i(O.additionStart,O.additionCount)-l,0),d.hunks.push(O),l=hn(O.additionStart,O.additionCount);for(const F of O.hunkContent)F.type==="context"?(O.splitLineCount+=F.lines,O.unifiedLineCount+=F.lines):(O.splitLineCount+=Math.max(F.additions,F.deletions),O.unifiedLineCount+=F.deletions+F.additions);O.splitLineStart=d.splitLineCount+O.collapsedBefore,O.unifiedLineStart=d.unifiedLineCount+O.collapsedBefore,d.splitLineCount+=O.collapsedBefore+O.splitLineCount,d.unifiedLineCount+=O.collapsedBefore+O.unifiedLineCount}if(d!=null){if(s&&f&&!n&&d.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(d.hunks.length>0&&!f&&d.additionLines.length>0&&d.deletionLines.length>0){const g=d.hunks[d.hunks.length-1],v=hn(g.additionStart,g.additionCount),x=d.additionLines.length,S=Math.max(x-v,0);d.splitLineCount+=S,d.unifiedLineCount+=S}return n||(d.prevName!=null&&d.name!==d.prevName?d.hunks.length>0?d.type="rename-changed":d.type="rename-pure":(i==null||i.contents==="")&&o!=null&&o.contents!==""?d.type="new":i!=null&&i.contents!==""&&(o==null||o.contents==="")&&(d.type="deleted")),d.type!=="rename-pure"&&d.type!=="rename-changed"&&(d.prevName=void 0),Bz(d),d}}function Yz(e,t,n=!1){const i=[],o=Xz(e)?e.split(wz):[e];for(const s of o)try{i.push($z(s,t!=null?`${t}-${i.length}`:void 0,n))}catch(l){if(n)throw l;console.error(l)}return i}function Xz(e){return e.startsWith("From ")||e.includes(`
26
+ From `)}function g_(e){const t=pE(e);for(let n=0;n<t.length;n++)t[n]=wt(t[n]);return t}function pE(e){if(e.length===0)return[""];const t=[];let n=0;for(;;){const i=e.indexOf(`
27
+ `,n);if(i===-1)break;t.push(e.slice(n,i+1)),n=i+1}return n<e.length&&t.push(e.slice(n)),t}function Kz(e){return yE(e,"diff --git")}function Qz(e){if(e.length===0)return[""];const t=[];let n=0,i=0,o=0,s=0,l=!1;for(;i<e.length;){const c=ig(e,i);if(o<=0&&s<=0){if(mE(e,i)){i>n&&t.push(e.slice(n,i)),n=i,l=!0,i=ig(e,c);continue}if(l&&e.startsWith("@@ -",i)){const f=gE(e.slice(i,c));f!=null&&(o=f.deletionCount,s=f.additionCount)}i=c;continue}const d=e[i];if(d==="\\"){i=c;continue}d===" "?(o=Math.max(o-1,0),s=Math.max(s-1,0)):d==="-"?o=Math.max(o-1,0):d==="+"&&(s=Math.max(s-1,0)),i=c}return t.push(e.slice(n)),t}function Zz(e){return mE(e,0)}function mE(e,t){const n=ig(e,t);return y_(e,t,"---")&&y_(e,n,"+++")}function y_(e,t,n){if(!e.startsWith(n,t))return!1;const i=e[t+n.length];if(i!==" "&&i!==" ")return!1;for(let o=t+n.length+1;o<e.length;o++){const s=e[o];if(s===`
28
+ `||s==="\r")break;if(s!==" "&&s!==" ")return!0}return!1}function ig(e,t){const n=e.indexOf(`
29
+ `,t);return n===-1?e.length:n+1}function Jz(e){const t=e[0];return t==="+"||t==="-"||t===" "}function eP(e){if(!e.startsWith("--"))return!1;for(let t=2;t<e.length;t++){const n=e[t];if(n!==" "&&n!==" "&&n!==`
30
+ `&&n!=="\r")return!1}return!0}function gE(e){if(!e.startsWith("@@ -"))return;let t=4;const n=gc(e,t);if(n==null)return;const i=n.value;t=n.endIndex;let o=1;if(e[t]===","){const p=gc(e,t+1);if(p==null)return;o=p.value,t=p.endIndex}if(e[t]!==" "||e[t+1]!=="+")return;t+=2;const s=gc(e,t);if(s==null)return;const l=s.value;t=s.endIndex;let c=1;if(e[t]===","){const p=gc(e,t+1);if(p==null)return;c=p.value,t=p.endIndex}if(e[t]!==" "||e[t+1]!=="@"||e[t+2]!=="@")return;let d;const f=t+3;return e[f]===" "&&(d=tP(e.slice(f+1))),{additionCount:c,additionStart:l,deletionCount:o,deletionStart:i,hunkContext:d}}function gc(e,t){let n=t,i=0;for(;n<e.length;n++){const o=e.charCodeAt(n)-48;if(o<0||o>9)break;i=i*10+o}if(n!==t)return{value:i,endIndex:n}}function tP(e){return e.endsWith(`\r
31
+ `)?e.slice(0,-2):e.endsWith(`
32
+ `)?e.slice(0,-1):e}function nP(e){return e.startsWith("diff --git")||e.includes(`
33
+ diff --git`)}function yE(e,t){if(e.length===0)return[""];const n=`
34
+ ${t}`,i=e.startsWith(t)?0:v_(e,n,0);if(i===-1)return[e];const o=[];i>0&&o.push(e.slice(0,i));let s=i;for(;;){const l=v_(e,n,s+1);if(l===-1)break;o.push(e.slice(s,l)),s=l}return o.push(e.slice(s)),o}function v_(e,t,n){const i=e.indexOf(t,n);return i===-1?-1:i+1}function b_(e){return e==null?e:wt(e)}function iP(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function Yp(e){const t=e.slice(1);return wt(t===""?`
35
+ `:t)}function Xp(e,t,n){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:n,deletionLineIndex:t}}class Ey{diff(t,n,i={}){let o;typeof i=="function"?(o=i,i={}):"callback"in i&&(o=i.callback);const s=this.castInput(t,i),l=this.castInput(n,i),c=this.removeEmpty(this.tokenize(s,i)),d=this.removeEmpty(this.tokenize(l,i));return this.diffWithOptionsObj(c,d,i,o)}diffWithOptionsObj(t,n,i,o){var s;const l=w=>{if(w=this.postProcess(w,i),o){setTimeout(function(){o(w)},0);return}else return w},c=n.length,d=t.length;let f=1,p=c+d;i.maxEditLength!=null&&(p=Math.min(p,i.maxEditLength));const m=(s=i.timeout)!==null&&s!==void 0?s:1/0,g=Date.now()+m,v=[{oldPos:-1,lastComponent:void 0}];let x=this.extractCommon(v[0],n,t,0,i);if(v[0].oldPos+1>=d&&x+1>=c)return l(this.buildValues(v[0].lastComponent,n,t));let S=-1/0,C=1/0;const _=()=>{for(let w=Math.max(S,-f);w<=Math.min(C,f);w+=2){let k;const D=v[w-1],M=v[w+1];D&&(v[w-1]=void 0);let O=!1;if(M){const j=M.oldPos-w;O=M&&0<=j&&j<c}const z=D&&D.oldPos+1<d;if(!O&&!z){v[w]=void 0;continue}if(!z||O&&D.oldPos<M.oldPos?k=this.addToPath(M,!0,!1,0,i):k=this.addToPath(D,!1,!0,1,i),x=this.extractCommon(k,n,t,w,i),k.oldPos+1>=d&&x+1>=c)return l(this.buildValues(k.lastComponent,n,t))||!0;v[w]=k,k.oldPos+1>=d&&(C=Math.min(C,w-1)),x+1>=c&&(S=Math.max(S,w+1))}f++};if(o)(function w(){setTimeout(function(){if(f>p||Date.now()>g)return o(void 0);_()||w()},0)})();else for(;f<=p&&Date.now()<=g;){const w=_();if(w)return w}}addToPath(t,n,i,o,s){const l=t.lastComponent;return l&&!s.oneChangePerToken&&l.added===n&&l.removed===i?{oldPos:t.oldPos+o,lastComponent:{count:l.count+1,added:n,removed:i,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:i,previousComponent:l}}}extractCommon(t,n,i,o,s){const l=n.length,c=i.length;let d=t.oldPos,f=d-o,p=0;for(;f+1<l&&d+1<c&&this.equals(i[d+1],n[f+1],s);)f++,d++,p++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return p&&!s.oneChangePerToken&&(t.lastComponent={count:p,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,f}equals(t,n,i){return i.comparator?i.comparator(t,n):t===n||!!i.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,i){const o=[];let s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=s;o.reverse();const l=o.length;let c=0,d=0,f=0;for(;c<l;c++){const p=o[c];if(p.removed)p.value=this.join(i.slice(f,f+p.count)),f+=p.count;else{if(!p.added&&this.useLongestToken){let m=n.slice(d,d+p.count);m=m.map(function(g,v){const x=i[f+v];return x.length>g.length?x:g}),p.value=this.join(m)}else p.value=this.join(n.slice(d,d+p.count));d+=p.count,p.added||(f+=p.count)}}return o}}class rP extends Ey{}const oP=new rP;function aP(e,t,n){return oP.diff(e,t,n)}const x_="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class sP extends Ey{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${x_}]+|[^\\S\\n\\r]+|[^${x_}]`,"ug");return t.match(n)||[]}}const lP=new sP;function uP(e,t,n){return lP.diff(e,t,n)}class cP extends Ey{constructor(){super(...arguments),this.tokenize=fP}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
36
+ `))&&(t=t.trim()),(!i.newlineIsToken||!n.includes(`
37
+ `))&&(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
38
+ `)&&(t=t.slice(0,-1)),n.endsWith(`
39
+ `)&&(n=n.slice(0,-1))),super.equals(t,n,i)}}const dP=new cP;function S_(e,t,n){return dP.diff(e,t,n)}function fP(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
40
+ `));const n=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let o=0;o<i.length;o++){const s=i[o];o%2&&!t.newlineIsToken?n[n.length-1]+=s:n.push(s)}return n}function hP(e){for(let t=0;t<e.length;t++)if(e[t]<" "||e[t]>"~"||e[t]==='"'||e[t]==="\\")return!0;return!1}function Nr(e){if(!hP(e))return e;let t='"';const n=new TextEncoder().encode(e);let i=0;for(;i<n.length;){const o=n[i];o===7?t+="\\a":o===8?t+="\\b":o===9?t+="\\t":o===10?t+="\\n":o===11?t+="\\v":o===12?t+="\\f":o===13?t+="\\r":o===34?t+='\\"':o===92?t+="\\\\":o>=32&&o<=126?t+=String.fromCharCode(o):t+="\\"+o.toString(8).padStart(3,"0"),i++}return t+='"',t}const __={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function C_(e,t,n,i,o,s,l){let c;l?typeof l=="function"?c={callback:l}:c=l:c={},typeof c.context>"u"&&(c.context=4);const d=c.context;if(c.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(c.callback){const{callback:p}=c;S_(n,i,Object.assign(Object.assign({},c),{callback:m=>{const g=f(m);p(g)}}))}else return f(S_(n,i,c));function f(p){if(!p)return;p.push({value:"",lines:[]});function m(w){return w.map(function(k){return" "+k})}const g=[];let v=0,x=0,S=[],C=1,_=1;for(let w=0;w<p.length;w++){const k=p[w],D=k.lines||mP(k.value);if(k.lines=D,k.added||k.removed){if(!v){const M=p[w-1];v=C,x=_,M&&(S=d>0?m(M.lines.slice(-d)):[],v-=S.length,x-=S.length)}for(const M of D)S.push((k.added?"+":"-")+M);k.added?_+=D.length:C+=D.length}else{if(v)if(D.length<=d*2&&w<p.length-2)for(const M of m(D))S.push(M);else{const M=Math.min(D.length,d);for(const z of m(D.slice(0,M)))S.push(z);const O={oldStart:v,oldLines:C-v+M,newStart:x,newLines:_-x+M,lines:S};g.push(O),v=0,x=0,S=[]}C+=D.length,_+=D.length}}for(const w of g)for(let k=0;k<w.lines.length;k++)w.lines[k].endsWith(`
41
+ `)?w.lines[k]=w.lines[k].slice(0,-1):(w.lines.splice(k+1,0,"\"),k++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:s,hunks:g}}}function rg(e,t){var n,i,o,s,l,c;if(t||(t=__),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(p=>p.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(p=>rg(p,t)).join(`
42
+ `)}const d=[];if(e.isGit){if(t=__,!e.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!e.newFileName)throw new Error("newFileName must be specified for Git patches");let p=e.oldFileName,m=e.newFileName;e.isCreate&&p==="/dev/null"?p=m.replace(/^b\//,"a/"):e.isDelete&&m==="/dev/null"&&(m=p.replace(/^a\//,"b/")),d.push("diff --git "+Nr(p)+" "+Nr(m)),e.isDelete&&d.push("deleted file mode "+((n=e.oldMode)!==null&&n!==void 0?n:"100644")),e.isCreate&&d.push("new file mode "+((i=e.newMode)!==null&&i!==void 0?i:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(d.push("old mode "+e.oldMode),d.push("new mode "+e.newMode)),e.isRename&&(d.push("rename from "+Nr(((o=e.oldFileName)!==null&&o!==void 0?o:"").replace(/^a\//,""))),d.push("rename to "+Nr(((s=e.newFileName)!==null&&s!==void 0?s:"").replace(/^b\//,"")))),e.isCopy&&(d.push("copy from "+Nr(((l=e.oldFileName)!==null&&l!==void 0?l:"").replace(/^a\//,""))),d.push("copy to "+Nr(((c=e.newFileName)!==null&&c!==void 0?c:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&d.push("Index: "+e.oldFileName),t.includeUnderline&&d.push("===================================================================");const f=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||f)&&(d.push("--- "+Nr(e.oldFileName)+(e.oldHeader?" "+e.oldHeader:"")),d.push("+++ "+Nr(e.newFileName)+(e.newHeader?" "+e.newHeader:"")));for(let p=0;p<e.hunks.length;p++){const m=e.hunks[p],g=m.oldLines===0?m.oldStart-1:m.oldStart,v=m.newLines===0?m.newStart-1:m.newStart;d.push("@@ -"+g+","+m.oldLines+" +"+v+","+m.newLines+" @@");for(const x of m.lines)d.push(x)}return d.join(`
43
+ `)+`
44
+ `}function pP(e,t,n,i,o,s,l){if(typeof l=="function"&&(l={callback:l}),l?.callback){const{callback:c}=l;C_(e,t,n,i,o,s,Object.assign(Object.assign({},l),{callback:d=>{c(d?rg(d,l.headerOptions):void 0)}}))}else{const c=C_(e,t,n,i,o,s,l);return c?rg(c,l?.headerOptions):void 0}}function mP(e){const t=e.endsWith(`
45
+ `),n=e.split(`
46
+ `).map(i=>i+`
47
+ `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}const gP="/dev/null";function Mo(e,t,n,i=!1){if(e===null&&t===null)throw new Error("parseDiffFromFile: You must pass oldFile, newFile, or both");const o=e??w_(),s=t??w_(),l=Wz(pP(o.name,s.name,o.contents,s.contents,o.header,s.header,n),{cacheKey:(()=>{const d=e?.cacheKey??e?.name,f=t?.cacheKey??t?.name;return d!=null&&f!=null?d+":"+f:d??f})(),oldFile:o,newFile:s,throwOnError:i});if(l==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");e===null?(l.type="new",l.prevName=void 0):t===null&&(l.type="deleted",l.prevName=void 0);const c=t?.lang??(t===null?e?.lang:void 0);return c!=null&&(l.lang=c),l}function w_(){return{name:gP,contents:""}}function qn(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function xi(e){return{type:"text",value:e}}function Te({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function cd({name:e,width:t=16,height:n=16,properties:i}){return Te({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[Te({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function yP(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function ja(e){return Te({tagName:"div",properties:{"data-gutter":""},children:e})}function vE(e,t,n,i={}){return Te({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[Te({tagName:"span",properties:{"data-line-number-content":""},children:[xi(`${t}`)]})]:void 0})}function wn(e,t,n){return Te({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function vP(){return Te({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[cd({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function bP(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function yc(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}const xP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],E_={}.hasOwnProperty;function SP(e,t){const n=t||{};function i(o,...s){let l=i.invalid;const c=i.handlers;if(o&&E_.call(o,e)){const d=String(o[e]);l=E_.call(c,d)?c[d]:i.unknown}if(l)return l.call(this,o,...s)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const _P=/["&'<>`]/g,CP=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wP=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,EP=/[|\\{}()[\]^$+*?.]/g,k_=new WeakMap;function kP(e,t){if(e=e.replace(t.subset?TP(t.subset):_P,i),t.subset||t.escapeOnly)return e;return e.replace(CP,n).replace(wP,i);function n(o,s,l){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function i(o,s,l){return t.format(o.charCodeAt(0),l.charCodeAt(s+1),t)}}function TP(e){let t=k_.get(e);return t||(t=AP(e),k_.set(e,t)),t}function AP(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(EP,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const LP=/[\dA-Fa-f]/;function RP(e,t,n){const i="&#x"+e.toString(16).toUpperCase();return n&&t&&!LP.test(String.fromCharCode(t))?i:i+";"}const OP=/\d/;function DP(e,t,n){const i="&#"+String(e);return n&&t&&!OP.test(String.fromCharCode(t))?i:i+";"}const MP=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Kp={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},IP=["cent","copy","divide","gt","lt","not","para","times"],bE={}.hasOwnProperty,og={};let vc;for(vc in Kp)bE.call(Kp,vc)&&(og[Kp[vc]]=vc);const NP=/[^\dA-Za-z]/;function zP(e,t,n,i){const o=String.fromCharCode(e);if(bE.call(og,o)){const s=og[o],l="&"+s;return n&&MP.includes(s)&&!IP.includes(s)&&(!i||t&&t!==61&&NP.test(String.fromCharCode(t)))?l:l+";"}return""}function PP(e,t,n){let i=RP(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=zP(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const s=DP(e,t,n.omitOptionalSemicolons);s.length<i.length&&(i=s)}return o&&(!n.useShortestReferences||o.length<i.length)?o:i}function $a(e,t){return kP(e,Object.assign({format:PP},t))}const HP=/^>|^->|<!--|-->|--!>|<!-$/g,jP=[">"],BP=["<",">"];function UP(e,t,n,i){return i.settings.bogusComments?"<?"+$a(e.value,Object.assign({},i.settings.characterReferences,{subset:jP}))+">":"<!--"+e.value.replace(HP,o)+"-->";function o(s){return $a(s,Object.assign({},i.settings.characterReferences,{subset:BP}))}}function VP(e,t,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"}function T_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(t);for(;o!==-1;)i++,o=n.indexOf(t,o+t.length);return i}const Tt=SE(1),xE=SE(-1),FP=[];function SE(e){return t;function t(n,i,o){const s=n?n.children:FP;let l=(i||0)+e,c=s[l];if(!o)for(;c&&Pd(c);)l+=e,c=s[l];return c}}const GP={}.hasOwnProperty;function _E(e){return t;function t(n,i,o){return GP.call(e,n.tagName)&&e[n.tagName](n,i,o)}}const ky=_E({body:qP,caption:Qp,colgroup:Qp,dd:KP,dt:XP,head:Qp,html:$P,li:YP,optgroup:QP,option:ZP,p:WP,rp:A_,rt:A_,tbody:eH,td:L_,tfoot:tH,th:L_,thead:JP,tr:nH});function Qp(e,t,n){const i=Tt(n,t,!0);return!i||i.type!=="comment"&&!(i.type==="text"&&Pd(i.value.charAt(0)))}function $P(e,t,n){const i=Tt(n,t);return!i||i.type!=="comment"}function qP(e,t,n){const i=Tt(n,t);return!i||i.type!=="comment"}function WP(e,t,n){const i=Tt(n,t);return i?i.type==="element"&&(i.tagName==="address"||i.tagName==="article"||i.tagName==="aside"||i.tagName==="blockquote"||i.tagName==="details"||i.tagName==="div"||i.tagName==="dl"||i.tagName==="fieldset"||i.tagName==="figcaption"||i.tagName==="figure"||i.tagName==="footer"||i.tagName==="form"||i.tagName==="h1"||i.tagName==="h2"||i.tagName==="h3"||i.tagName==="h4"||i.tagName==="h5"||i.tagName==="h6"||i.tagName==="header"||i.tagName==="hgroup"||i.tagName==="hr"||i.tagName==="main"||i.tagName==="menu"||i.tagName==="nav"||i.tagName==="ol"||i.tagName==="p"||i.tagName==="pre"||i.tagName==="section"||i.tagName==="table"||i.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function YP(e,t,n){const i=Tt(n,t);return!i||i.type==="element"&&i.tagName==="li"}function XP(e,t,n){const i=Tt(n,t);return!!(i&&i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd"))}function KP(e,t,n){const i=Tt(n,t);return!i||i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd")}function A_(e,t,n){const i=Tt(n,t);return!i||i.type==="element"&&(i.tagName==="rp"||i.tagName==="rt")}function QP(e,t,n){const i=Tt(n,t);return!i||i.type==="element"&&i.tagName==="optgroup"}function ZP(e,t,n){const i=Tt(n,t);return!i||i.type==="element"&&(i.tagName==="option"||i.tagName==="optgroup")}function JP(e,t,n){const i=Tt(n,t);return!!(i&&i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot"))}function eH(e,t,n){const i=Tt(n,t);return!i||i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot")}function tH(e,t,n){return!Tt(n,t)}function nH(e,t,n){const i=Tt(n,t);return!i||i.type==="element"&&i.tagName==="tr"}function L_(e,t,n){const i=Tt(n,t);return!i||i.type==="element"&&(i.tagName==="td"||i.tagName==="th")}const iH=_E({body:aH,colgroup:sH,head:oH,html:rH,tbody:lH});function rH(e){const t=Tt(e,-1);return!t||t.type!=="comment"}function oH(e){const t=new Set;for(const i of e.children)if(i.type==="element"&&(i.tagName==="base"||i.tagName==="title")){if(t.has(i.tagName))return!1;t.add(i.tagName)}const n=e.children[0];return!n||n.type==="element"}function aH(e){const t=Tt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Pd(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function sH(e,t,n){const i=xE(n,t),o=Tt(e,-1,!0);return n&&i&&i.type==="element"&&i.tagName==="colgroup"&&ky(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function lH(e,t,n){const i=xE(n,t),o=Tt(e,-1);return n&&i&&i.type==="element"&&(i.tagName==="thead"||i.tagName==="tbody")&&ky(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const bc={name:[[`
48
+ \f\r &/=>`.split(""),`
49
+ \f\r "&'/=>\``.split("")],[`\0
50
+ \f\r "&'/<=>`.split(""),`\0
51
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
52
+ \f\r &>`.split(""),`\0
53
+ \f\r "&'<=>\``.split("")],[`\0
54
+ \f\r "&'<=>\``.split(""),`\0
55
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function uH(e,t,n,i){const o=i.schema,s=o.space==="svg"?!1:i.settings.omitOptionalTags;let l=o.space==="svg"?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase());const c=[];let d;o.space==="html"&&e.tagName==="svg"&&(i.schema=zl);const f=cH(i,e.properties),p=i.all(o.space==="html"&&e.tagName==="template"?e.content:e);return i.schema=o,p&&(l=!1),(f||!s||!iH(e,t,n))&&(c.push("<",e.tagName,f?" "+f:""),l&&(o.space==="svg"||i.settings.closeSelfClosing)&&(d=f.charAt(f.length-1),(!i.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(p),!l&&(!s||!ky(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function cH(e,t){const n=[];let i=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=dH(e,o,t[o]);s&&n.push(s)}}for(;++i<n.length;){const s=e.settings.tightAttributes?n[i].charAt(n[i].length-1):void 0;i!==n.length-1&&s!=='"'&&s!=="'"&&(n[i]+=" ")}return n.join("")}function dH(e,t,n){const i=L1(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let l=e.quote,c;if(i.overloadedBoolean&&(n===i.attribute||n==="")?n=!0:(i.boolean||i.overloadedBoolean)&&(typeof n!="string"||n===i.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const d=$a(i.attribute,Object.assign({},e.settings.characterReferences,{subset:bc.name[o][s]}));return n===!0||(n=Array.isArray(n)?(i.commaSeparated?S1:O1)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(c=$a(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:bc.unquoted[o][s]}))),c!==n&&(e.settings.quoteSmart&&T_(n,l)>T_(n,e.alternative)&&(l=e.alternative),c=l+$a(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?bc.single:bc.double)[o][s],attribute:!0}))+l),d+(c&&"="+c))}const fH=["<","&"];function CE(e,t,n,i){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:$a(e.value,Object.assign({},i.settings.characterReferences,{subset:fH}))}function hH(e,t,n,i){return i.settings.allowDangerousHtml?e.value:CE(e,t,n,i)}function pH(e,t,n,i){return i.all(e)}const mH=SP("type",{invalid:gH,unknown:yH,handlers:{comment:UP,doctype:VP,element:uH,raw:hH,root:pH,text:CE}});function gH(e){throw new Error("Expected node, not `"+e+"`")}function yH(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const vH={},bH={},xH=[];function Zt(e,t){const n=t||vH,i=n.quote||'"',o=i==='"'?"'":'"';if(i!=='"'&&i!=="'")throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:SH,all:_H,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||xP,characterReferences:n.characterReferences||bH,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?zl:R1,quote:i,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function SH(e,t,n){return mH(e,t,n,this)}function _H(e){const t=[],n=e&&e.children||xH;let i=-1;for(;++i<n.length;)t[i]=this.one(n[i],i,e);return t.join("")}var wE=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),eg(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){const n=!(e===this.selectedRange||tg(e??void 0,this.selectedRange??void 0)),i=t?.lineNumberOnly??!1,o=t?.activeLineSide!==this.selectedRangeHighlightSide||i!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!o||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=i,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){const i=e!==this.editorActiveLine,o=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!i&&!o||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:o,onMergeConflictActionClick:s}=this.options;t==null&&n==null&&i==null&&s==null&&o==null||this.options.onGutterUtilityClick!=null&&yc(e.composedPath())||($i(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:o,onTokenLeave:s,enableGutterUtility:l=!1}=this.options;t==="disabled"&&!l&&n==null&&i==null&&o==null&&s==null||($i(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if($i(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){$i(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();$i(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const o=this.resolvePointerTarget(i);$i(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:l,onLineEnter:c,onLineLeave:d,onTokenClick:f,onTokenEnter:p,onTokenLeave:m,onHunkExpand:g,onMergeConflictActionClick:v}=this.options;switch(e){case"move":{const x=Zp(o)&&this.hoveredLine?.lineElement===o.lineElement;Yc(o)&&this.hoveredToken?.tokenElement===o.tokenElement||(this.hoveredToken!=null&&(m?.(this.hoveredToken,t),this.clearHoveredToken()),Yc(o)&&(this.setHoveredToken(this.toTokenEventBaseProps(o)),p?.(this.hoveredToken,t))),x||(this.hoveredLine!=null&&(d?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Zp(o)?(this.setHoveredLine(this.toEventBaseProps(o)),this.placeUtility(),c?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(o==null)break;if(EH(o)&&v!=null){v(o);break}if(wH(o)&&g!=null){g(o.hunkIndex,o.all||t.shiftKey?"both":o.direction,o.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Zp(o))break;Yc(o)&&f!=null&&f(this.toTokenEventBaseProps(o),t);const x=this.toEventBaseProps(o);l!=null&&o.numberColumn?l({...x,event:t}):s?.({...x,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:o,onLineEnter:s,onLineLeave:l,onTokenClick:c,onTokenEnter:d,onTokenLeave:f,onHunkExpand:p,onMergeConflictActionClick:m,enableGutterUtility:g=!1,enableLineSelection:v=!1,onGutterUtilityClick:x}=this.options,S=x!=null,C=n!=="disabled"||i!=null||o!=null||s!=null||l!=null||c!=null||d!=null||f!=null||p!=null||m!=null||g||v||S;C&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,$i(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const k=[];return(t==="both"||t==="click")&&(i!=null&&k.push("onLineClick"),o!=null&&k.push("onLineNumberClick"),p!=null&&k.push("expandable hunk separators"),m!=null&&k.push("merge conflict actions")),k})()),$i(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),$i(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!C&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const _=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",w=this.pointerSession.mode==="gutterSelecting";(!v&&_||!S&&w)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,o=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),o&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!o&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();yc(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:o,eventSide:s,lineIndex:l}=n;if(e.shiftKey&&this.selectedRange!=null){const c=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(c==null)return;const d=c.start<=c.end?l>=c.start:l<=c.end;this.selectionAnchor={lineNumber:d?this.selectedRange.start:this.selectedRange.end,side:d?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(o,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===o&&this.selectedRange?.end===o){const c={lineNumber:o,side:s};this.selectionAnchor=c,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:c,pending:c},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:o,side:s},this.updateSelection(o,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{onGutterUtilityClick:t}=this.options;if(t==null)return;const n=this.currentSelectionEnds(),i=n?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=n?.top??i;i==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:i},this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;const n={lineNumber:t.lineNumber,side:t.eventSide};if(bP(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{const{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(n.current=i,this.updateSelection(i.lineNumber,i.side));const o=this.buildSelectedLineRange(n.anchor,n.current);t?.({...o}),this.selectionAnchor=void 0,this.notifySelectionEnd(o),this.notifySelectionCommitted(o),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=Zt(vP());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);ol(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),o=this.selectionPointRowIndex(n);if(!(i==null||o==null))return i>o?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const o of i){if(!(o instanceof HTMLElement))continue;const s=this.resolvePointerTarget(xc(o));if(ol(s)&&!(this.mode==="diff"&&e.side!=null&&s.side!==e.side))return s}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(ol(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(ol(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&yc(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=xc(e);if(t&&yc(n))return;const i=TH(e);return i!=null?xc(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=LH(AH(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?xc(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=O_(t)?t:O_(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let o;if(e==null)o=null;else{const s=this.selectionAnchor?.side??t,l=this.selectionAnchor?.lineNumber??e;o=this.buildSelectionRange(l,e,s,t)}tg(i??void 0,o??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=o:(this.selectedRange=o,cE(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;const i=this.getIndexesFromSelection(e.range,t);if(i==null)throw console.error({rowRange:i,range:e.range}),new Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return i}getLineRenderColumns(e,t,n,i){if(this.pre==null||t==null&&i==null)return[];const{children:o}=this.pre;if(o.length>2)throw console.error(o),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const s=[];for(const l of o){const c=l.hasAttribute("data-deletions")?"deletions":l.hasAttribute("data-additions")?"additions":void 0,d=e!=null&&t!=null&&(e.highlightSide==null||c==null||e.highlightSide===c),f=n!=null&&i!=null&&(n.highlightSide==null||c==null||n.highlightSide===c);if(!d&&!f)continue;const[p,m]=l.children;if(!(p instanceof HTMLElement)||!(m instanceof HTMLElement))throw new Error("InteractionManager.renderSelection: missing gutter or content element");if(m.children.length!==p.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");s.push({content:m,gutter:p,renderEditorActiveLine:f,renderSelectedLines:d})}return s}renderSelection=()=>{eg(this.renderSelection);const e=this.getSelectionRenderState();if(this.pre==null)return;const{editorActiveLine:t,selectedLines:n}=e,i=!D_(this.renderedSelectedLinesState,n),o=!D_(this.renderedEditorActiveLineState,t);if(!i&&!o)return;i&&(this.renderedSelectedLinesState=void 0),o&&(this.renderedEditorActiveLineState=void 0);const s=this.pre.getAttribute("data-diff-type")==="split",l=i?this.resolveLineRenderRange(n,s,"selected-lines"):void 0,c=o?this.resolveLineRenderRange(t,s,"editor-active-line"):void 0,d=this.getLineRenderColumns(i?n:void 0,l,o?t:void 0,c),f=n.range==null||d.some(S=>S.renderSelectedLines),p=t.range==null||d.some(S=>S.renderEditorActiveLine);if(i)for(const S of this.pre.querySelectorAll("[data-selected-line]"))S.removeAttribute("data-selected-line");if(o)for(const S of this.pre.querySelectorAll("[data-editor-active-line]"))S.removeAttribute("data-editor-active-line");const m=l==null?void 0:Math.min(l.start,l.end),g=l==null?void 0:Math.max(l.start,l.end),v=m===g,x=c?.start;for(const S of d){const{content:C,gutter:_,renderEditorActiveLine:w,renderSelectedLines:k}=S,D=Math.max(k?g??-1/0:-1/0,w?x??-1/0:-1/0),M=C.children.length;for(let O=0;O<M;O++){const z=C.children[O],j=_.children[O];if(!(z instanceof HTMLElement)||!(j instanceof HTMLElement))continue;const F=this.parseLineIndex(z,s);if((F??0)>D)break;if(F!=null){if(k&&m!=null&&g!=null&&F>=m&&F<=g){let ee=v?"single":F===m?"first":F===g?"last":"";j.setAttribute("data-selected-line",ee),n.lineNumberOnly||(z.setAttribute("data-selected-line",ee),j.nextSibling instanceof HTMLElement&&z.nextSibling instanceof HTMLElement&&(z.nextSibling.hasAttribute("data-line-annotation")||z.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(v?(ee="last",z.setAttribute("data-selected-line","first")):F===m?ee="":F===g&&z.setAttribute("data-selected-line",""),z.nextSibling.setAttribute("data-selected-line",ee),j.nextSibling.setAttribute("data-selected-line",ee)))}w&&F===x&&(j.setAttribute("data-editor-active-line",""),t.lineNumberOnly||z.setAttribute("data-editor-active-line",""))}}}i&&f&&(this.renderedSelectedLinesState=n),o&&p&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:o,tokenText:s}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:o,tokenText:s}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:o,tokenText:s}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...n!=null?{side:n}:{},...n!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let t=!1,n,i,o,s,l,c,d,f,p,m;for(const v of e){if(!(v instanceof HTMLElement))continue;if(m==null&&v.hasAttribute("data-merge-conflict-action")){const _=v.getAttribute("data-merge-conflict-action")??void 0,w=v.getAttribute("data-merge-conflict-conflict-index")??void 0,k=w!=null?Number.parseInt(w,10):NaN;kH(_)&&Number.isFinite(k)&&(m={kind:"merge-conflict-action",resolution:_,conflictIndex:k})}if(c==null&&v.hasAttribute("data-char")){c=v;const _=v.getAttribute("data-char");if(_!=null){const w=Number.parseInt(_,10);if(!Number.isNaN(w)){const k=v.textContent??"",D=w+k.length;(k.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(d={tokenElement:c,lineCharStart:w,lineCharEnd:D,tokenText:k});continue}}}const x=l==null?v.getAttribute("data-column-number")??void 0:void 0;if(x!=null){l=v,p=Number.parseInt(x,10),t=!0,n=I_(v),s=v.getAttribute("data-line-index")??void 0;continue}const S=o==null?v.getAttribute("data-line")??void 0:void 0;if(S!=null){o=v,p=Number.parseInt(S,10),n=I_(v),s=v.getAttribute("data-line-index")??void 0;continue}if(f==null&&(v.hasAttribute("data-expand-button")||v.hasAttribute("data-unmodified-lines"))){f={hunkIndex:void 0,direction:v.hasAttribute("data-expand-up")?"up":v.hasAttribute("data-expand-down")?"down":"both",all:v.hasAttribute("data-expand-all-button")};continue}const C=f!=null?v.getAttribute("data-expand-index")??void 0:void 0;if(f!=null&&C!=null){const _=Number.parseInt(C,10);Number.isNaN(_)||(f.hunkIndex=_);continue}if(i==null&&v.hasAttribute("data-code")){i=v;break}}if(m!=null)return m;if(f?.hunkIndex!=null)return{type:"line-info",hunkIndex:f.hunkIndex,direction:f.direction,all:f.all};if(o??=s!=null?R_(i,`[data-line][data-line-index="${s}"]`):void 0,l??=s!=null?R_(i,`[data-column-number][data-line-index="${s}"]`):void 0,i==null||o==null||l==null||n==null||p==null||Number.isNaN(p))return;const g=this.parseLineIndex(o,this.isSplitDiff());return d!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:o,lineNumber:p,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:g,...d}:{kind:"token",lineType:n,lineElement:o,lineNumber:p,numberColumn:t,numberElement:l,side:M_(n,i),splitLineIndex:g,...d}:this.mode==="file"?{kind:"line",lineType:n,lineElement:o,lineNumber:p,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:g}:{kind:"line",lineType:n,lineElement:o,lineNumber:p,numberColumn:t,numberElement:l,side:M_(n,i),splitLineIndex:g}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function dd({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:o,onLineEnter:s,onLineLeave:l,onLineNumberClick:c,onTokenClick:d,onTokenEnter:f,onTokenLeave:p,renderGutterUtility:m,__debugPointerEvents:g,enableLineSelection:v,controlledSelection:x,onLineSelected:S,onLineSelectionStart:C,onLineSelectionChange:_,onLineSelectionEnd:w},k,D,M){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:CH({enableGutterUtility:t,renderGutterUtility:m,onGutterUtilityClick:i}),usesCustomGutterUtility:m!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:k,onMergeConflictActionClick:M,onLineClick:o,onLineEnter:s,onLineLeave:l,onLineNumberClick:c,onTokenClick:d,onTokenEnter:f,onTokenLeave:p,__debugPointerEvents:g,enableLineSelection:v,controlledSelection:x,onLineSelected:S,onLineSelectionStart:C,onLineSelectionChange:_,onLineSelectionEnd:w,getLineIndex:D}}function CH({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function ol(e){return e!=null&&"kind"in e&&e.kind==="line"}function Yc(e){return e!=null&&"kind"in e&&e.kind==="token"}function Zp(e){return ol(e)||Yc(e)}function wH(e){return"type"in e&&e.type==="line-info"}function EH(e){return"kind"in e&&e.kind==="merge-conflict-action"}function kH(e){return e==="current"||e==="incoming"||e==="both"}function R_(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function xc(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function TH(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function AH(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function LH(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function O_(e){return e!=null&&typeof e.elementFromPoint=="function"}function RH(e,t){return e===t||tg(e??void 0,t??void 0)}function D_(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&RH(e?.range??null,t.range)}function M_(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function I_(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function $i(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var EE=class Xi{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=Xi.resizeObserver??new ResizeObserver(Xi.handleSharedResizeEntries);return Xi.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const o=Xi.managersByElement.get(i.target);if(o==null)continue;const s=n.get(o);s==null?n.set(o,[i]):s.push(i)}for(const[i,o]of n)i.handleResizeEntries(o)}observedNodes=new Map;setup(t,{disableAnnotations:n,columnVariables:i="apply"}){const o=new Set,s=i==="apply";let l=0;const c=new Map(this.observedNodes);this.observedNodes.clear();for(const d of t.children){if(l===2)break;const f=(()=>{if(d instanceof HTMLElement&&d.tagName==="CODE")return d})();if(f==null)continue;l++;let p=c.get(f);if(p!=null&&p.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let m=f.firstElementChild;m instanceof HTMLElement||(m=null),p!=null?(this.observedNodes.set(f,p),c.delete(f),p.numberElement!==m?(p.numberElement!=null&&(this.unobserve(p.numberElement),c.delete(p.numberElement)),m!=null&&(this.observe(m),c.delete(m),this.observedNodes.set(m,p)),p.numberElement=m,p.numberWidth=0):p.numberElement!=null?(c.delete(p.numberElement),this.observedNodes.set(p.numberElement,p)):p.numberWidth=0,MH(p,s)):(p={type:"code",codeElement:f,numberElement:m,codeWidth:"auto",numberWidth:0,applyColumnVariables:s},this.observedNodes.set(f,p),this.observe(f),m!=null&&(this.observedNodes.set(m,p),this.observe(m)))}if(l>1&&!n){const d=t.querySelectorAll('[data-line-annotation*=","]'),f=new Map;for(const p of d){if(!(p instanceof HTMLElement))continue;const m=p.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(m)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:m,element:p});continue}let g=f.get(m);g==null&&(g=[],f.set(m,g)),g.push(p)}for(const[p,m]of f){if(m.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",p,m);continue}const[g,v]=m,x=g.firstElementChild,S=v.firstElementChild;if(!(g instanceof HTMLElement)||!(v instanceof HTMLElement)||!(x instanceof HTMLElement)||!(S instanceof HTMLElement))continue;let C=c.get(x);if(C!=null){this.observedNodes.set(x,C),this.observedNodes.set(S,C),c.delete(x),c.delete(S);continue}const _=x.getBoundingClientRect().height,w=S.getBoundingClientRect().height;C={type:"annotations",column1:{container:g,child:x,childHeight:_},column2:{container:v,child:S,childHeight:w},currentHeight:"auto"},o.add({child1:x,child2:S,item:C,newHeight:Math.max(_,w)})}for(const p of o)this.applyNewHeight(p.item,p.newHeight),this.observedNodes.set(p.child1,p.item),this.observedNodes.set(p.child2,p.item),this.observe(p.child1),this.observe(p.child2);o.clear()}for(const[d,f]of c)this.unobserve(d),f.type==="code"?IH(f):NH(f);c.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=Xi,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),Xi.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=Xi,o=n.get(t);if(o!=null){if(o!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),Xi.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const o of t){const{target:s,borderBoxSize:l,contentBoxSize:c}=o;if(!(s instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",o);continue}const d=this.observedNodes.get(s);if(d==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",o);continue}if(d.type==="annotations"){const f=(()=>{if(s===d.column1.child)return d.column1;if(s===d.column2.child)return d.column2})();if(f==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:d,target:s});continue}f.childHeight=l[0].blockSize,i.add(d)}else if(d.type==="code"){const f=n.get(d)??{},p=c[0].inlineSize;s===d.codeElement?f.codeInlineSize=p:s===d.numberElement&&(f.numberInlineSize=p),n.set(d,f)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const o=i.codeInlineSize!=null?OH(i.codeInlineSize):n.codeWidth,s=i.numberInlineSize!=null?DH(i.numberInlineSize):n.numberWidth,l=o!==n.codeWidth,c=s!==n.numberWidth;!l&&!c||(n.codeWidth=o,n.numberWidth=s,n.applyColumnVariables&&kE(n,{codeWidthChanged:l,numberWidthChanged:c}))}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function OH(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function DH(e){return Math.max(Math.ceil(e),0)}function MH(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?kE(e,{codeWidthChanged:!0,numberWidthChanged:!0}):TE(e))}function kE(e,{codeWidthChanged:t,numberWidthChanged:n}){const{codeElement:i,codeWidth:o,numberWidth:s}=e;if(t&&i.style.setProperty("--diffs-column-width",`${typeof o=="number"?`${o}px`:"auto"}`),n&&i.style.setProperty("--diffs-column-number-width",`${s===0?"auto":`${s}px`}`),t||n&&o!=="auto"){const l=typeof o=="number"?Math.max(o-s,0):0;i.style.setProperty("--diffs-column-content-width",`${l>0?`${l}px`:"auto"}`)}}function TE(e){e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width")}function IH(e){e.codeElement.isConnected&&TE(e)}function NH(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Io=new Map,Jp=new Map,zH=new Map,ag=new Set;function fd(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!ag.has(t))return!1;return!0}function N_(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(ag.has(n.name))continue;let i=Io.get(n.name);i==null&&(i=n,Io.set(n.name,i)),ag.add(i.name),t.loadLanguageSync(i.data)}}function AE(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}var sg=Object.defineProperty,PH=Object.getOwnPropertyDescriptor,HH=Object.getOwnPropertyNames,jH=Object.prototype.hasOwnProperty,BH=(e,t)=>{let n={};for(var i in e)sg(n,i,{get:e[i],enumerable:!0});return sg(n,Symbol.toStringTag,{value:"Module"}),n},UH=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=HH(t),s=0,l=o.length,c;s<l;s++)c=o[s],!jH.call(e,c)&&c!==n&&sg(e,c,{get:(d=>t[d]).bind(null,c),enumerable:!(i=PH(t,c))||i.enumerable});return e},VH=(e,t,n)=>(UH(e,t,"default"),n);const FH="modulepreload",GH=function(e,t){return new URL(e,t).href},z_={},T=function(t,n,i){let o=Promise.resolve();if(n&&n.length>0){let f=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};const l=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");o=f(n.map(p=>{if(p=GH(p,i),p in z_)return;z_[p]=!0;const m=p.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(i)for(let x=l.length-1;x>=0;x--){const S=l[x];if(S.href===p&&(!m||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${g}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":FH,m||(v.as="script"),v.crossOrigin="",v.href=p,d&&v.setAttribute("nonce",d),document.head.appendChild(v),m)return new Promise((x,S)=>{v.addEventListener("load",x),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})},LE=[{id:"abap",name:"ABAP",import:(()=>T(()=>import("./abap-BdImnpbu.js"),[],import.meta.url))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>T(()=>import("./actionscript-3-B3316cI-.js"),[],import.meta.url))},{id:"ada",name:"Ada",import:(()=>T(()=>import("./ada-bCR0ucgS.js"),[],import.meta.url))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>T(()=>import("./ahk-CsyLZFj1.js"),[],import.meta.url))},{id:"ahk2",name:"AutoHotkey2",import:(()=>T(()=>import("./ahk2-8Zs4aa1G.js"),[],import.meta.url))},{id:"angular-html",name:"Angular HTML",import:(()=>T(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>T(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:"apache",name:"Apache Conf",import:(()=>T(()=>import("./apache-Pmp26Uib.js"),[],import.meta.url))},{id:"apex",name:"Apex",import:(()=>T(()=>import("./apex-DhZFqWV2.js"),[],import.meta.url))},{id:"apl",name:"APL",import:(()=>T(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9]),import.meta.url))},{id:"applescript",name:"AppleScript",import:(()=>T(()=>import("./applescript-Co6uUVPk.js"),[],import.meta.url))},{id:"ara",name:"Ara",import:(()=>T(()=>import("./ara-BRHolxvo.js"),[],import.meta.url))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>T(()=>import("./asciidoc-CSVQ5wI8.js"),[],import.meta.url))},{id:"asm",name:"Assembly",import:(()=>T(()=>import("./asm-D_Q5rh1f.js"),[],import.meta.url))},{id:"astro",name:"Astro",import:(()=>T(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13]),import.meta.url))},{id:"awk",name:"AWK",import:(()=>T(()=>import("./awk-DMzUqQB5.js"),[],import.meta.url))},{id:"ballerina",name:"Ballerina",import:(()=>T(()=>import("./ballerina-BFfxhgS-.js"),[],import.meta.url))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>T(()=>import("./bat-CickPsom.js"),[],import.meta.url))},{id:"beancount",name:"Beancount",import:(()=>T(()=>import("./beancount-k_qm7-4y.js"),[],import.meta.url))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>T(()=>import("./berry-uYugtg8r.js"),[],import.meta.url))},{id:"bibtex",name:"BibTeX",import:(()=>T(()=>import("./bibtex-CHM0blh-.js"),[],import.meta.url))},{id:"bicep",name:"Bicep",import:(()=>T(()=>import("./bicep-Bmn6On1c.js"),[],import.meta.url))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>T(()=>import("./bird2-Bx8U0n9b.js"),[],import.meta.url))},{id:"blade",name:"Blade",import:(()=>T(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9]),import.meta.url))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>T(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18]),import.meta.url))},{id:"c",name:"C",import:(()=>T(()=>import("./c-BIGW1oBm.js"),[],import.meta.url))},{id:"c3",name:"C3",import:(()=>T(()=>import("./c3-Dp5svz6Z.js"),[],import.meta.url))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>T(()=>import("./cadence-Bv_4Rxtq.js"),[],import.meta.url))},{id:"cairo",name:"Cairo",import:(()=>T(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20]),import.meta.url))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>T(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22]),import.meta.url))},{id:"clarity",name:"Clarity",import:(()=>T(()=>import("./clarity-Dn5IMItf.js"),[],import.meta.url))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>T(()=>import("./clojure-P80f7IUj.js"),[],import.meta.url))},{id:"cmake",name:"CMake",import:(()=>T(()=>import("./cmake-D1j8_8rp.js"),[],import.meta.url))},{id:"cobol",name:"COBOL",import:(()=>T(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8]),import.meta.url))},{id:"codeowners",name:"CODEOWNERS",import:(()=>T(()=>import("./codeowners-Bp6g37R7.js"),[],import.meta.url))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>T(()=>import("./codeql-DsOJ9woJ.js"),[],import.meta.url))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>T(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2]),import.meta.url))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>T(()=>import("./common-lisp-Cg-RD9OK.js"),[],import.meta.url))},{id:"coq",name:"Rocq",import:(()=>T(()=>import("./coq-C7JzOVbR.js"),[],import.meta.url))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>T(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22]),import.meta.url))},{id:"crystal",name:"Crystal",import:(()=>T(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29]),import.meta.url))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>T(()=>import("./csharp-DSvCPggb.js"),[],import.meta.url))},{id:"css",name:"CSS",import:(()=>T(()=>import("./css-CLj8gQPS.js"),[],import.meta.url))},{id:"csv",name:"CSV",import:(()=>T(()=>import("./csv-fuZLfV_i.js"),[],import.meta.url))},{id:"cue",name:"CUE",import:(()=>T(()=>import("./cue-D82EKSYY.js"),[],import.meta.url))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>T(()=>import("./cypher-COkxafJQ.js"),[],import.meta.url))},{id:"d",name:"D",import:(()=>T(()=>import("./d-85-TOEBH.js"),[],import.meta.url))},{id:"dart",name:"Dart",import:(()=>T(()=>import("./dart-bE4Kk8sk.js"),[],import.meta.url))},{id:"dax",name:"DAX",import:(()=>T(()=>import("./dax-CEL-wOlO.js"),[],import.meta.url))},{id:"desktop",name:"Desktop",import:(()=>T(()=>import("./desktop-BmXAJ9_W.js"),[],import.meta.url))},{id:"diff",name:"Diff",import:(()=>T(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>T(()=>import("./docker-BcOcwvcX.js"),[],import.meta.url))},{id:"dotenv",name:"dotEnv",import:(()=>T(()=>import("./dotenv-Da5cRb03.js"),[],import.meta.url))},{id:"dream-maker",name:"Dream Maker",import:(()=>T(()=>import("./dream-maker-BtqSS_iP.js"),[],import.meta.url))},{id:"edge",name:"Edge",import:(()=>T(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15]),import.meta.url))},{id:"elixir",name:"Elixir",import:(()=>T(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3]),import.meta.url))},{id:"elm",name:"Elm",import:(()=>T(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22]),import.meta.url))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>T(()=>import("./emacs-lisp-C_m_b--Z.js"),[],import.meta.url))},{id:"erb",name:"ERB",import:(()=>T(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39]),import.meta.url))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>T(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41]),import.meta.url))},{id:"fennel",name:"Fennel",import:(()=>T(()=>import("./fennel-BYunw83y.js"),[],import.meta.url))},{id:"fish",name:"Fish",import:(()=>T(()=>import("./fish-BvzEVeQv.js"),[],import.meta.url))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>T(()=>import("./fluent-C4IJs8-o.js"),[],import.meta.url))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>T(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43]),import.meta.url))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>T(()=>import("./fortran-free-form-BxgE0vQu.js"),[],import.meta.url))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>T(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41]),import.meta.url))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>T(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47]),import.meta.url))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>T(()=>import("./gdscript-DqcFQ5yU.js"),[],import.meta.url))},{id:"gdshader",name:"GDShader",import:(()=>T(()=>import("./gdshader-DkwncUOv.js"),[],import.meta.url))},{id:"genie",name:"Genie",import:(()=>T(()=>import("./genie-D0YGMca9.js"),[],import.meta.url))},{id:"gherkin",name:"Gherkin",import:(()=>T(()=>import("./gherkin-DyxjwDmM.js"),[],import.meta.url))},{id:"git-commit",name:"Git Commit Message",import:(()=>T(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49]),import.meta.url))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>T(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29]),import.meta.url))},{id:"gleam",name:"Gleam",import:(()=>T(()=>import("./gleam-BspZqrRM.js"),[],import.meta.url))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>T(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1]),import.meta.url))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>T(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1]),import.meta.url))},{id:"glsl",name:"GLSL",import:(()=>T(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22]),import.meta.url))},{id:"gn",name:"GN",import:(()=>T(()=>import("./gn-n2N0HUVH.js"),[],import.meta.url))},{id:"gnuplot",name:"Gnuplot",import:(()=>T(()=>import("./gnuplot-DdkO51Og.js"),[],import.meta.url))},{id:"go",name:"Go",import:(()=>T(()=>import("./go-C27-OAKa.js"),[],import.meta.url))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>T(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13]),import.meta.url))},{id:"groovy",name:"Groovy",import:(()=>T(()=>import("./groovy-gcz8RCvz.js"),[],import.meta.url))},{id:"hack",name:"Hack",import:(()=>T(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16]),import.meta.url))},{id:"haml",name:"Ruby Haml",import:(()=>T(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3]),import.meta.url))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>T(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39]),import.meta.url))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>T(()=>import("./haskell-Df6bDoY_.js"),[],import.meta.url))},{id:"haxe",name:"Haxe",import:(()=>T(()=>import("./haxe-CfZj7gIn.js"),[],import.meta.url))},{id:"hcl",name:"HashiCorp HCL",import:(()=>T(()=>import("./hcl-BWvSN4gD.js"),[],import.meta.url))},{id:"hjson",name:"Hjson",import:(()=>T(()=>import("./hjson-D5-asLiD.js"),[],import.meta.url))},{id:"hlsl",name:"HLSL",import:(()=>T(()=>import("./hlsl-D3lLCCz7.js"),[],import.meta.url))},{id:"html",name:"HTML",import:(()=>T(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3]),import.meta.url))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>T(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:"http",name:"HTTP",import:(()=>T(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13]),import.meta.url))},{id:"hurl",name:"Hurl",import:(()=>T(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57]),import.meta.url))},{id:"hxml",name:"HXML",import:(()=>T(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59]),import.meta.url))},{id:"hy",name:"Hy",import:(()=>T(()=>import("./hy-DFXneXwc.js"),[],import.meta.url))},{id:"imba",name:"Imba",import:(()=>T(()=>import("./imba-DGztddWO.js"),[],import.meta.url))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>T(()=>import("./ini-BEwlwnbL.js"),[],import.meta.url))},{id:"java",name:"Java",import:(()=>T(()=>import("./java-CylS5w8V.js"),[],import.meta.url))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>T(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url))},{id:"jinja",name:"Jinja",import:(()=>T(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3]),import.meta.url))},{id:"jison",name:"Jison",import:(()=>T(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2]),import.meta.url))},{id:"json",name:"JSON",import:(()=>T(()=>import("./json-Cp-IABpG.js"),[],import.meta.url))},{id:"json5",name:"JSON5",import:(()=>T(()=>import("./json5-C9tS-k6U.js"),[],import.meta.url))},{id:"jsonc",name:"JSON with Comments",import:(()=>T(()=>import("./jsonc-Des-eS-w.js"),[],import.meta.url))},{id:"jsonl",name:"JSON Lines",import:(()=>T(()=>import("./jsonl-DcaNXYhu.js"),[],import.meta.url))},{id:"jsonnet",name:"Jsonnet",import:(()=>T(()=>import("./jsonnet-DFQXde-d.js"),[],import.meta.url))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>T(()=>import("./jssm-C2t-YnRu.js"),[],import.meta.url))},{id:"jsx",name:"JSX",import:(()=>T(()=>import("./jsx-g9-lgVsj.js"),[],import.meta.url))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>T(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16]),import.meta.url))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>T(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39]),import.meta.url))},{id:"kdl",name:"KDL",import:(()=>T(()=>import("./kdl-DV7GczEv.js"),[],import.meta.url))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>T(()=>import("./kotlin-BdnUsdx6.js"),[],import.meta.url))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>T(()=>import("./kusto-wEQ09or8.js"),[],import.meta.url))},{id:"latex",name:"LaTeX",import:(()=>T(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63]),import.meta.url))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>T(()=>import("./lean-BZvkOJ9d.js"),[],import.meta.url))},{id:"less",name:"Less",import:(()=>T(()=>import("./less-B1dDrJ26.js"),[],import.meta.url))},{id:"liquid",name:"Liquid",import:(()=>T(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9]),import.meta.url))},{id:"llvm",name:"LLVM IR",import:(()=>T(()=>import("./llvm-BZoOZj88.js"),[],import.meta.url))},{id:"log",name:"Log file",import:(()=>T(()=>import("./log-2UxHyX5q.js"),[],import.meta.url))},{id:"logo",name:"Logo",import:(()=>T(()=>import("./logo-BtOb2qkB.js"),[],import.meta.url))},{id:"lua",name:"Lua",import:(()=>T(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22]),import.meta.url))},{id:"luau",name:"Luau",import:(()=>T(()=>import("./luau-BnpPk5vE.js"),[],import.meta.url))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>T(()=>import("./make-CHLpvVh8.js"),[],import.meta.url))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>T(()=>import("./markdown-Cvjx9yec.js"),[],import.meta.url))},{id:"marko",name:"Marko",import:(()=>T(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11]),import.meta.url))},{id:"matlab",name:"MATLAB",import:(()=>T(()=>import("./matlab-D7o27uSR.js"),[],import.meta.url))},{id:"mdc",name:"MDC",import:(()=>T(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3]),import.meta.url))},{id:"mdx",name:"MDX",import:(()=>T(()=>import("./mdx-Cmh6b_Ma.js"),[],import.meta.url))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>T(()=>import("./mermaid-CQcHuHx7.js"),[],import.meta.url))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>T(()=>import("./mipsasm-CKIfxQSi.js"),[],import.meta.url))},{id:"mojo",name:"Mojo",import:(()=>T(()=>import("./mojo-DJz3ZmWd.js"),[],import.meta.url))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>T(()=>import("./moonbit-CHtswR0a.js"),[],import.meta.url))},{id:"move",name:"Move",import:(()=>T(()=>import("./move-el3G9tDJ.js"),[],import.meta.url))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>T(()=>import("./narrat-DRg8JJMk.js"),[],import.meta.url))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>T(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73]),import.meta.url))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>T(()=>import("./nextflow-groovy-vE_lwT2v.js"),[],import.meta.url))},{id:"nginx",name:"Nginx",import:(()=>T(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22]),import.meta.url))},{id:"nim",name:"Nim",import:(()=>T(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41]),import.meta.url))},{id:"nix",name:"Nix",import:(()=>T(()=>import("./nix-CwoSXNpI.js"),[],import.meta.url))},{id:"nsis",name:"NSIS",import:(()=>T(()=>import("./nsis-BlV79W_Q.js"),[],import.meta.url))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>T(()=>import("./nushell-D3jzshHO.js"),[],import.meta.url))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>T(()=>import("./objective-c-DXmwc3jG.js"),[],import.meta.url))},{id:"objective-cpp",name:"Objective-C++",import:(()=>T(()=>import("./objective-cpp-CLxacb5B.js"),[],import.meta.url))},{id:"ocaml",name:"OCaml",import:(()=>T(()=>import("./ocaml-C0hk2d4L.js"),[],import.meta.url))},{id:"odin",name:"Odin",import:(()=>T(()=>import("./odin-BBf5iR-q.js"),[],import.meta.url))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>T(()=>import("./openscad-C4EeE6gA.js"),[],import.meta.url))},{id:"org",name:"Org Markup",import:(()=>T(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67]),import.meta.url))},{id:"pascal",name:"Pascal",import:(()=>T(()=>import("./pascal-D93ZcfNL.js"),[],import.meta.url))},{id:"perl",name:"Perl",import:(()=>T(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16]),import.meta.url))},{id:"php",name:"PHP",import:(()=>T(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9]),import.meta.url))},{id:"pkl",name:"Pkl",import:(()=>T(()=>import("./pkl-u5AG7uiY.js"),[],import.meta.url))},{id:"plsql",name:"PL/SQL",import:(()=>T(()=>import("./plsql-ChMvpjG-.js"),[],import.meta.url))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>T(()=>import("./po-BTJTHyun.js"),[],import.meta.url))},{id:"polar",name:"Polar",import:(()=>T(()=>import("./polar-C0HS_06l.js"),[],import.meta.url))},{id:"postcss",name:"PostCSS",import:(()=>T(()=>import("./postcss-CXtECtnM.js"),[],import.meta.url))},{id:"powerquery",name:"PowerQuery",import:(()=>T(()=>import("./powerquery-CEu0bR-o.js"),[],import.meta.url))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>T(()=>import("./powershell-BmBUJMz7.js"),[],import.meta.url))},{id:"prisma",name:"Prisma",import:(()=>T(()=>import("./prisma-Vru482bI.js"),[],import.meta.url))},{id:"prolog",name:"Prolog",import:(()=>T(()=>import("./prolog-CbFg5uaA.js"),[],import.meta.url))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>T(()=>import("./proto-C7zT0LnQ.js"),[],import.meta.url))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>T(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1]),import.meta.url))},{id:"puppet",name:"Puppet",import:(()=>T(()=>import("./puppet-BMWR74SV.js"),[],import.meta.url))},{id:"purescript",name:"PureScript",import:(()=>T(()=>import("./purescript-CklMAg4u.js"),[],import.meta.url))},{id:"python",name:"Python",aliases:["py"],import:(()=>T(()=>import("./python-B6aJPvgy.js"),[],import.meta.url))},{id:"qml",name:"QML",import:(()=>T(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2]),import.meta.url))},{id:"qmldir",name:"QML Directory",import:(()=>T(()=>import("./qmldir-C8lEn-DE.js"),[],import.meta.url))},{id:"qss",name:"Qt Style Sheets",import:(()=>T(()=>import("./qss-IeuSbFQv.js"),[],import.meta.url))},{id:"r",name:"R",import:(()=>T(()=>import("./r-Cf5RLm7j.js"),[],import.meta.url))},{id:"racket",name:"Racket",import:(()=>T(()=>import("./racket-BqYA7rlc.js"),[],import.meta.url))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>T(()=>import("./raku-DXvB9xmW.js"),[],import.meta.url))},{id:"razor",name:"ASP.NET Razor",import:(()=>T(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89]),import.meta.url))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>T(()=>import("./rbs-CpoqiR4B.js"),[],import.meta.url))},{id:"reg",name:"Windows Registry Script",import:(()=>T(()=>import("./reg-C-SQnVFl.js"),[],import.meta.url))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>T(()=>import("./regexp-CDVJQ6XC.js"),[],import.meta.url))},{id:"rel",name:"Rel",import:(()=>T(()=>import("./rel-C3B-1QV4.js"),[],import.meta.url))},{id:"riscv",name:"RISC-V",import:(()=>T(()=>import("./riscv-BM1_JUlF.js"),[],import.meta.url))},{id:"ron",name:"RON",import:(()=>T(()=>import("./ron-D8l8udqQ.js"),[],import.meta.url))},{id:"rosmsg",name:"ROS Interface",import:(()=>T(()=>import("./rosmsg-BJDFO7_C.js"),[],import.meta.url))},{id:"rst",name:"reStructuredText",import:(()=>T(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38]),import.meta.url))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>T(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39]),import.meta.url))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>T(()=>import("./rust-B1yitclQ.js"),[],import.meta.url))},{id:"sas",name:"SAS",import:(()=>T(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16]),import.meta.url))},{id:"sass",name:"Sass",import:(()=>T(()=>import("./sass-Cj5Yp3dK.js"),[],import.meta.url))},{id:"scala",name:"Scala",import:(()=>T(()=>import("./scala-CqE71os6.js"),[],import.meta.url))},{id:"scheme",name:"Scheme",import:(()=>T(()=>import("./scheme-C98Dy4si.js"),[],import.meta.url))},{id:"scss",name:"SCSS",import:(()=>T(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3]),import.meta.url))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>T(()=>import("./sdbl-DVxCFoDh.js"),[],import.meta.url))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>T(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101]),import.meta.url))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>T(()=>import("./shellscript-Yzrsuije.js"),[],import.meta.url))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>T(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29]),import.meta.url))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>T(()=>import("./smalltalk-BOQMe2GC.js"),[],import.meta.url))},{id:"smithy",name:"Smithy",import:(()=>T(()=>import("./smithy-cds9vsN8.js"),[],import.meta.url))},{id:"solidity",name:"Solidity",import:(()=>T(()=>import("./solidity-DijEV5ha.js"),[],import.meta.url))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>T(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3]),import.meta.url))},{id:"sparql",name:"SPARQL",import:(()=>T(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105]),import.meta.url))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>T(()=>import("./splunk-BtCnVYZw.js"),[],import.meta.url))},{id:"sql",name:"SQL",import:(()=>T(()=>import("./sql-CRqJ_cUM.js"),[],import.meta.url))},{id:"ssh-config",name:"SSH Config",import:(()=>T(()=>import("./ssh-config-_ykCGR6B.js"),[],import.meta.url))},{id:"stata",name:"Stata",import:(()=>T(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16]),import.meta.url))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>T(()=>import("./stylus-BEDo0Tqx.js"),[],import.meta.url))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>T(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2]),import.meta.url))},{id:"svelte",name:"Svelte",import:(()=>T(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12]),import.meta.url))},{id:"swift",name:"Swift",import:(()=>T(()=>import("./swift-C2oV4EkX.js"),[],import.meta.url))},{id:"system-verilog",name:"SystemVerilog",import:(()=>T(()=>import("./system-verilog-0hqHdDBg.js"),[],import.meta.url))},{id:"systemd",name:"Systemd Units",import:(()=>T(()=>import("./systemd-4A_iFExJ.js"),[],import.meta.url))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>T(()=>import("./talonscript-CkByrt1z.js"),[],import.meta.url))},{id:"tasl",name:"Tasl",import:(()=>T(()=>import("./tasl-QIJgUcNo.js"),[],import.meta.url))},{id:"tcl",name:"Tcl",import:(()=>T(()=>import("./tcl-dwOrl1Do.js"),[],import.meta.url))},{id:"templ",name:"Templ",import:(()=>T(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3]),import.meta.url))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>T(()=>import("./terraform-BETggiCN.js"),[],import.meta.url))},{id:"tex",name:"TeX",import:(()=>T(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63]),import.meta.url))},{id:"toml",name:"TOML",import:(()=>T(()=>import("./toml-vGWfd6FD.js"),[],import.meta.url))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>T(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8]),import.meta.url))},{id:"tsv",name:"TSV",import:(()=>T(()=>import("./tsv-B_m7g4N7.js"),[],import.meta.url))},{id:"tsx",name:"TSX",import:(()=>T(()=>import("./tsx-COt5Ahok.js"),[],import.meta.url))},{id:"turtle",name:"Turtle",import:(()=>T(()=>import("./turtle-BsS91CYL.js"),[],import.meta.url))},{id:"twig",name:"Twig",import:(()=>T(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39]),import.meta.url))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>T(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>T(()=>import("./typespec-CAFt9gP4.js"),[],import.meta.url))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>T(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80]),import.meta.url))},{id:"v",name:"V",import:(()=>T(()=>import("./v-BGw2Nkan.js"),[],import.meta.url))},{id:"vala",name:"Vala",import:(()=>T(()=>import("./vala-CsfeWuGM.js"),[],import.meta.url))},{id:"vb",name:"Visual Basic",import:(()=>T(()=>import("./vb-Cu-pLBUe.js"),[],import.meta.url))},{id:"verilog",name:"Verilog",import:(()=>T(()=>import("./verilog-nZwndyjY.js"),[],import.meta.url))},{id:"vhdl",name:"VHDL",import:(()=>T(()=>import("./vhdl-CeAyd5Ju.js"),[],import.meta.url))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>T(()=>import("./viml-CJc9bBzg.js"),[],import.meta.url))},{id:"vue",name:"Vue",import:(()=>T(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15]),import.meta.url))},{id:"vue-html",name:"Vue HTML",import:(()=>T(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2]),import.meta.url))},{id:"vue-vine",name:"Vue Vine",import:(()=>T(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2]),import.meta.url))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>T(()=>import("./vyper-CDx5xZoG.js"),[],import.meta.url))},{id:"wasm",name:"WebAssembly",import:(()=>T(()=>import("./wasm-MzD3tlZU.js"),[],import.meta.url))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>T(()=>import("./wenyan-BV7otONQ.js"),[],import.meta.url))},{id:"wgsl",name:"WGSL",import:(()=>T(()=>import("./wgsl-Dx-B1_4e.js"),[],import.meta.url))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>T(()=>import("./wikitext-BhOHFoWU.js"),[],import.meta.url))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>T(()=>import("./wit-5i3qLPDT.js"),[],import.meta.url))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>T(()=>import("./wolfram-lXgVvXCa.js"),[],import.meta.url))},{id:"xml",name:"XML",import:(()=>T(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8]),import.meta.url))},{id:"xsl",name:"XSL",import:(()=>T(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8]),import.meta.url))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>T(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url))},{id:"zenscript",name:"ZenScript",import:(()=>T(()=>import("./zenscript-DVFEvuxE.js"),[],import.meta.url))},{id:"zig",name:"Zig",import:(()=>T(()=>import("./zig-VOosw3JB.js"),[],import.meta.url))}],$H=Object.fromEntries(LE.map(e=>[e.id,e.import])),qH=Object.fromEntries(LE.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),lg={...$H,...qH},WH=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>T(()=>import("./andromeeda-C4gqWexZ.js"),[],import.meta.url))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>T(()=>import("./aurora-x-D-2ljcwZ.js"),[],import.meta.url))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>T(()=>import("./ayu-dark-DYE7WIF3.js"),[],import.meta.url))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>T(()=>import("./ayu-light-BA47KaF1.js"),[],import.meta.url))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>T(()=>import("./ayu-mirage-32ctXXKs.js"),[],import.meta.url))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>T(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[],import.meta.url))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>T(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[],import.meta.url))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>T(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[],import.meta.url))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>T(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[],import.meta.url))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>T(()=>import("./dark-plus-C3mMm8J8.js"),[],import.meta.url))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>T(()=>import("./dracula-BzJJZx-M.js"),[],import.meta.url))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>T(()=>import("./dracula-soft-BXkSAIEj.js"),[],import.meta.url))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>T(()=>import("./everforest-dark-BgDCqdQA.js"),[],import.meta.url))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>T(()=>import("./everforest-light-C8M2exoo.js"),[],import.meta.url))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>T(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>T(()=>import("./github-dark-default-Cuk6v7N8.js"),[],import.meta.url))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>T(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[],import.meta.url))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>T(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[],import.meta.url))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>T(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>T(()=>import("./github-light-default-D7oLnXFd.js"),[],import.meta.url))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>T(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[],import.meta.url))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>T(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[],import.meta.url))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>T(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[],import.meta.url))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>T(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[],import.meta.url))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>T(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[],import.meta.url))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>T(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[],import.meta.url))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>T(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[],import.meta.url))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>T(()=>import("./horizon-BUw7H-hv.js"),[],import.meta.url))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>T(()=>import("./horizon-bright-CUuTKBJd.js"),[],import.meta.url))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>T(()=>import("./houston-DnULxvSX.js"),[],import.meta.url))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>T(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[],import.meta.url))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>T(()=>import("./kanagawa-lotus-C3DzagqV.js"),[],import.meta.url))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>T(()=>import("./kanagawa-wave-DFGoQZhC.js"),[],import.meta.url))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>T(()=>import("./laserwave-DUszq2jm.js"),[],import.meta.url))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>T(()=>import("./light-plus-B7mTdjB0.js"),[],import.meta.url))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>T(()=>import("./material-theme-D5KoaKCx.js"),[],import.meta.url))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>T(()=>import("./material-theme-darker-BfHTSMKl.js"),[],import.meta.url))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>T(()=>import("./material-theme-lighter-B0m2ddpp.js"),[],import.meta.url))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>T(()=>import("./material-theme-ocean-CyktbL80.js"),[],import.meta.url))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>T(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[],import.meta.url))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>T(()=>import("./min-dark-CafNBF8u.js"),[],import.meta.url))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>T(()=>import("./min-light-CTRr51gU.js"),[],import.meta.url))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>T(()=>import("./monokai-BRVnQi9A.js"),[],import.meta.url))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>T(()=>import("./night-owl-C39BiMTA.js"),[],import.meta.url))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>T(()=>import("./night-owl-light-CMTm3GFP.js"),[],import.meta.url))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>T(()=>import("./nord-Ddv68eIx.js"),[],import.meta.url))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>T(()=>import("./one-dark-pro-DVMEJ2y_.js"),[],import.meta.url))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>T(()=>import("./one-light-C3Wv6jpd.js"),[],import.meta.url))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>T(()=>import("./plastic-3e1v2bzS.js"),[],import.meta.url))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>T(()=>import("./poimandres-CS3Unz2-.js"),[],import.meta.url))},{id:"red",displayName:"Red",type:"dark",import:(()=>T(()=>import("./red-hvxz__6c.js"),[],import.meta.url))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>T(()=>import("./rose-pine-5qJOZa0Y.js"),[],import.meta.url))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>T(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[],import.meta.url))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>T(()=>import("./rose-pine-moon-C9pEdX9L.js"),[],import.meta.url))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>T(()=>import("./slack-dark-BthQWCQV.js"),[],import.meta.url))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>T(()=>import("./slack-ochin-DqwNpetd.js"),[],import.meta.url))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>T(()=>import("./snazzy-light-Bw305WKR.js"),[],import.meta.url))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>T(()=>import("./solarized-dark-CpvCGNkr.js"),[],import.meta.url))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>T(()=>import("./solarized-light-Dlz6yCKv.js"),[],import.meta.url))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>T(()=>import("./synthwave-84-CbfX1IO0.js"),[],import.meta.url))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>T(()=>import("./tokyo-night-hegEt444.js"),[],import.meta.url))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>T(()=>import("./vesper-DRje8inN.js"),[],import.meta.url))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>T(()=>import("./vitesse-black-Bkuqu6BP.js"),[],import.meta.url))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>T(()=>import("./vitesse-dark-D0r3Knsf.js"),[],import.meta.url))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>T(()=>import("./vitesse-light-CVO1_9PV.js"),[],import.meta.url))}],YH=Object.fromEntries(WH.map(e=>[e.id,e.import]));var Ty=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function XH(){return 2147483648}function KH(){return typeof performance<"u"?performance.now():Date.now()}const QH=(e,t)=>e+(t-e%t)%t;async function ZH(e){let t,n;const i={};function o(v){n=v,i.HEAPU8=new Uint8Array(v),i.HEAPU32=new Uint32Array(v)}function s(v,x,S){i.HEAPU8.copyWithin(v,x,x+S)}function l(v){try{return t.grow(v-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}function c(v){const x=i.HEAPU8.length;v=v>>>0;const S=XH();if(v>S)return!1;for(let C=1;C<=4;C*=2){let _=x*(1+.2/C);_=Math.min(_,v+100663296);const w=Math.min(S,QH(Math.max(v,_),65536));if(l(w))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(v,x,S=1024){const C=x+S;let _=x;for(;v[_]&&!(_>=C);)++_;if(_-x>16&&v.buffer&&d)return d.decode(v.subarray(x,_));let w="";for(;x<_;){let k=v[x++];if(!(k&128)){w+=String.fromCharCode(k);continue}const D=v[x++]&63;if((k&224)===192){w+=String.fromCharCode((k&31)<<6|D);continue}const M=v[x++]&63;if((k&240)===224?k=(k&15)<<12|D<<6|M:k=(k&7)<<18|D<<12|M<<6|v[x++]&63,k<65536)w+=String.fromCharCode(k);else{const O=k-65536;w+=String.fromCharCode(55296|O>>10,56320|O&1023)}}return w}function p(v,x){return v?f(i.HEAPU8,v,x):""}const m={emscripten_get_now:KH,emscripten_memcpy_big:s,emscripten_resize_heap:c,fd_write:()=>0};async function g(){const x=await e({env:m,wasi_snapshot_preview1:m});t=x.memory,o(t.buffer),Object.assign(i,x),i.UTF8ToString=p}return await g(),i}var JH=Object.defineProperty,e8=(e,t,n)=>t in e?JH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Et=(e,t,n)=>e8(e,typeof t!="symbol"?t+"":t,n);let Rt=null;function t8(e){throw new Ty(e.UTF8ToString(e.getLastOnigError()))}class Vd{constructor(t){Et(this,"utf16Length"),Et(this,"utf8Length"),Et(this,"utf16Value"),Et(this,"utf8Value"),Et(this,"utf16OffsetToUtf8"),Et(this,"utf8OffsetToUtf16");const n=t.length,i=Vd._utf8ByteLength(t),o=i!==n,s=o?new Uint32Array(n+1):null;o&&(s[n]=i);const l=o?new Uint32Array(i+1):null;o&&(l[i]=n);const c=new Uint8Array(i);let d=0;for(let f=0;f<n;f++){const p=t.charCodeAt(f);let m=p,g=!1;if(p>=55296&&p<=56319&&f+1<n){const v=t.charCodeAt(f+1);v>=56320&&v<=57343&&(m=(p-55296<<10)+65536|v-56320,g=!0)}o&&(s[f]=d,g&&(s[f+1]=d),m<=127?l[d+0]=f:m<=2047?(l[d+0]=f,l[d+1]=f):m<=65535?(l[d+0]=f,l[d+1]=f,l[d+2]=f):(l[d+0]=f,l[d+1]=f,l[d+2]=f,l[d+3]=f)),m<=127?c[d++]=m:m<=2047?(c[d++]=192|(m&1984)>>>6,c[d++]=128|(m&63)>>>0):m<=65535?(c[d++]=224|(m&61440)>>>12,c[d++]=128|(m&4032)>>>6,c[d++]=128|(m&63)>>>0):(c[d++]=240|(m&1835008)>>>18,c[d++]=128|(m&258048)>>>12,c[d++]=128|(m&4032)>>>6,c[d++]=128|(m&63)>>>0),g&&f++}this.utf16Length=n,this.utf8Length=i,this.utf16Value=t,this.utf8Value=c,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let i=0,o=t.length;i<o;i++){const s=t.charCodeAt(i);let l=s,c=!1;if(s>=55296&&s<=56319&&i+1<o){const d=t.charCodeAt(i+1);d>=56320&&d<=57343&&(l=(s-55296<<10)+65536|d-56320,c=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,c&&i++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Fd=class ui{constructor(t){if(Et(this,"id",++ui.LAST_ID),Et(this,"_onigBinding"),Et(this,"content"),Et(this,"utf16Length"),Et(this,"utf8Length"),Et(this,"utf16OffsetToUtf8"),Et(this,"utf8OffsetToUtf16"),Et(this,"ptr"),!Rt)throw new Ty("Must invoke loadWasm first.");this._onigBinding=Rt,this.content=t;const n=new Vd(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!ui._sharedPtrInUse?(ui._sharedPtr||(ui._sharedPtr=Rt.omalloc(1e4)),ui._sharedPtrInUse=!0,Rt.HEAPU8.set(n.utf8Value,ui._sharedPtr),this.ptr=ui._sharedPtr):this.ptr=n.createString(Rt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===ui._sharedPtr?ui._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Et(Fd,"LAST_ID",0);Et(Fd,"_sharedPtr",0);Et(Fd,"_sharedPtrInUse",!1);let RE=Fd;class n8{constructor(t){if(Et(this,"_onigBinding"),Et(this,"_ptr"),!Rt)throw new Ty("Must invoke loadWasm first.");const n=[],i=[];for(let c=0,d=t.length;c<d;c++){const f=new Vd(t[c]);n[c]=f.createString(Rt),i[c]=f.utf8Length}const o=Rt.omalloc(4*t.length);Rt.HEAPU32.set(n,o/4);const s=Rt.omalloc(4*t.length);Rt.HEAPU32.set(i,s/4);const l=Rt.createOnigScanner(o,s,t.length);for(let c=0,d=t.length;c<d;c++)Rt.ofree(n[c]);Rt.ofree(s),Rt.ofree(o),l===0&&t8(Rt),this._onigBinding=Rt,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,i){let o=0;if(typeof i=="number"&&(o=i),typeof t=="string"){t=new RE(t);const s=this._findNextMatchSync(t,n,!1,o);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,o)}_findNextMatchSync(t,n,i,o){const s=this._onigBinding,l=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),o);if(l===0)return null;const c=s.HEAPU32;let d=l/4;const f=c[d++],p=c[d++],m=[];for(let g=0;g<p;g++){const v=t.convertUtf8OffsetToUtf16(c[d++]),x=t.convertUtf8OffsetToUtf16(c[d++]);m[g]={start:v,end:x,length:x-v}}return{index:f,captureIndices:m}}}function i8(e){return typeof e.instantiator=="function"}function r8(e){return typeof e.default=="function"}function o8(e){return typeof e.data<"u"}function a8(e){return typeof Response<"u"&&e instanceof Response}function s8(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Sc;function OE(e){if(Sc)return Sc;async function t(){Rt=await ZH(async n=>{let i=e;return i=await i,typeof i=="function"&&(i=await i(n)),typeof i=="function"&&(i=await i(n)),i8(i)?i=await i.instantiator(n):r8(i)?i=await i.default(n):(o8(i)&&(i=i.data),a8(i)?typeof WebAssembly.instantiateStreaming=="function"?i=await l8(i)(n):i=await u8(i)(n):s8(i)?i=await em(i)(n):i instanceof WebAssembly.Module?i=await em(i)(n):"default"in i&&i.default instanceof WebAssembly.Module&&(i=await em(i.default)(n))),"instance"in i&&(i=i.instance),"exports"in i&&(i=i.exports),i})}return Sc=t(),Sc}function em(e){return t=>WebAssembly.instantiate(e,t)}function l8(e){return t=>WebAssembly.instantiateStreaming(e,t)}function u8(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let DE;function c8(e){DE=e}function d8(){return DE}async function ME(e){return e&&await OE(e),{createScanner(t){return new n8(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new RE(t)}}}const f8=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:ME,getDefaultWasmLoader:d8,loadWasm:OE,setDefaultWasmLoader:c8},Symbol.toStringTag,{value:"Module"}));var IE=BH({});VH(IE,f8);var tt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function h8(e){return Ay(e)}function Ay(e){return Array.isArray(e)?p8(e):e instanceof RegExp?e:typeof e=="object"?m8(e):e}function p8(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=Ay(e[n]);return t}function m8(e){let t={};for(let n in e)t[n]=Ay(e[n]);return t}function NE(e,...t){return t.forEach(n=>{for(let i in n)e[i]=n[i]}),e}function zE(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?zE(e.substring(0,e.length-1)):e.substr(~t+1)}var tm=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,_c=class{static hasCaptures(e){return e===null?!1:(tm.lastIndex=0,tm.test(e))}static replaceCaptures(e,t,n){return e.replace(tm,(i,o,s,l)=>{let c=n[parseInt(o||s,10)];if(c){let d=t.substring(c.start,c.end);for(;d[0]===".";)d=d.substring(1);switch(l){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return i})}};function PE(e,t){return e<t?-1:e>t?1:0}function HE(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,i=t.length;if(n===i){for(let o=0;o<n;o++){let s=PE(e[o],t[o]);if(s!==0)return s}return 0}return n-i}function P_(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function jE(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var BE=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},hd=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(v8(e),t)}static createFromParsedTheme(e,t){return x8(e,t)}_cachedMatchRoot=new BE(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,i=this._cachedMatchRoot.get(t).find(o=>g8(e.parent,o.parentScopes));return i?new UE(i.fontStyle,i.foreground,i.background):null}},nm=class Xc{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const i of n)t=new Xc(t,i);return t}static from(...t){let n=null;for(let i=0;i<t.length;i++)n=new Xc(n,t[i]);return n}push(t){return new Xc(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push(i.scopeName),i=i.parent;return i===t?n.reverse():void 0}};function g8(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let i=t[n],o=!1;if(i===">"){if(n===t.length-1)return!1;i=t[++n],o=!0}for(;e&&!y8(e.scopeName,i);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function y8(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var UE=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function v8(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let o=0,s=t.length;o<s;o++){let l=t[o];if(!l.settings)continue;let c;if(typeof l.scope=="string"){let m=l.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(l.scope)?c=l.scope:c=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let m=l.settings.fontStyle.split(" ");for(let g=0,v=m.length;g<v;g++)switch(m[g]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let f=null;typeof l.settings.foreground=="string"&&P_(l.settings.foreground)&&(f=l.settings.foreground);let p=null;typeof l.settings.background=="string"&&P_(l.settings.background)&&(p=l.settings.background);for(let m=0,g=c.length;m<g;m++){let x=c[m].trim().split(" "),S=x[x.length-1],C=null;x.length>1&&(C=x.slice(0,x.length-1),C.reverse()),n[i++]=new b8(S,C,o,d,f,p)}}return n}var b8=class{constructor(e,t,n,i,o,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=i,this.foreground=o,this.background=s}},$t=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($t||{});function x8(e,t){e.sort((d,f)=>{let p=PE(d.scope,f.scope);return p!==0||(p=HE(d.parentScopes,f.parentScopes),p!==0)?p:d.index-f.index});let n=0,i="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(n=d.fontStyle),d.foreground!==null&&(i=d.foreground),d.background!==null&&(o=d.background)}let s=new S8(t),l=new UE(n,s.getId(i),s.getId(o)),c=new C8(new ug(0,null,-1,0,0),[]);for(let d=0,f=e.length;d<f;d++){let p=e[d];c.insert(0,p.scope,p.parentScopes,p.fontStyle,s.getId(p.foreground),s.getId(p.background))}return new hd(s,l,c)}var S8=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},_8=Object.freeze([]),ug=class VE{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,i,o,s){this.scopeDepth=t,this.parentScopes=n||_8,this.fontStyle=i,this.foreground=o,this.background=s}clone(){return new VE(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let i=0,o=t.length;i<o;i++)n[i]=t[i].clone();return n}acceptOverwrite(t,n,i,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),i!==0&&(this.foreground=i),o!==0&&(this.background=o)}},C8=class cg{constructor(t,n=[],i={}){this._mainRule=t,this._children=i,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let i=0,o=0;for(;t.parentScopes[i]===">"&&i++,n.parentScopes[o]===">"&&o++,!(i>=t.parentScopes.length||o>=n.parentScopes.length);){const s=n.parentScopes[o].length-t.parentScopes[i].length;if(s!==0)return s;i++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let i=t.indexOf("."),o,s;if(i===-1?(o=t,s=""):(o=t.substring(0,i),s=t.substring(i+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(cg._cmpBySpecificity),n}insert(t,n,i,o,s,l){if(n===""){this._doInsertHere(t,i,o,s,l);return}let c=n.indexOf("."),d,f;c===-1?(d=n,f=""):(d=n.substring(0,c),f=n.substring(c+1));let p;this._children.hasOwnProperty(d)?p=this._children[d]:(p=new cg(this._mainRule.clone(),ug.cloneArr(this._rulesWithParentScopes)),this._children[d]=p),p.insert(t+1,f,i,o,s,l)}_doInsertHere(t,n,i,o,s){if(n===null){this._mainRule.acceptOverwrite(t,i,o,s);return}for(let l=0,c=this._rulesWithParentScopes.length;l<c;l++){let d=this._rulesWithParentScopes[l];if(HE(d.parentScopes,n)===0){d.acceptOverwrite(t,i,o,s);return}}i===-1&&(i=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new ug(t,n,i,o,s))}},To=class Pn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Pn.getLanguageId(t),i=Pn.getTokenType(t),o=Pn.getFontStyle(t),s=Pn.getForeground(t),l=Pn.getBackground(t);console.log({languageId:n,tokenType:i,fontStyle:o,foreground:s,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,i,o,s,l,c){let d=Pn.getLanguageId(t),f=Pn.getTokenType(t),p=Pn.containsBalancedBrackets(t)?1:0,m=Pn.getFontStyle(t),g=Pn.getForeground(t),v=Pn.getBackground(t);return n!==0&&(d=n),i!==8&&(f=i),o!==null&&(p=o?1:0),s!==-1&&(m=s),l!==0&&(g=l),c!==0&&(v=c),(d<<0|f<<8|p<<10|m<<11|g<<15|v<<24)>>>0}};function pd(e,t){const n=[],i=w8(e);let o=i.next();for(;o!==null;){let d=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=i.next()}let f=l();if(n.push({matcher:f,priority:d}),o!==",")break;o=i.next()}return n;function s(){if(o==="-"){o=i.next();const d=s();return f=>!!d&&!d(f)}if(o==="("){o=i.next();const d=c();return o===")"&&(o=i.next()),d}if(H_(o)){const d=[];do d.push(o),o=i.next();while(H_(o));return f=>t(d,f)}return null}function l(){const d=[];let f=s();for(;f;)d.push(f),f=s();return p=>d.every(m=>m(p))}function c(){const d=[];let f=l();for(;f&&(d.push(f),o==="|"||o===",");){do o=i.next();while(o==="|"||o===",");f=l()}return p=>d.some(m=>m(p))}}function H_(e){return!!e&&!!e.match(/[\w\.:]+/)}function w8(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const i=n[0];return n=t.exec(e),i}}}function FE(e){typeof e.dispose=="function"&&e.dispose()}var xl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},E8=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},k8=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},T8=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new xl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new k8;for(const n of e)A8(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof xl){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function A8(e,t,n,i){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof xl?Kc({baseGrammar:s,selfGrammar:o},i):dg(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},i);const l=n.injections(e.scopeName);if(l)for(const c of l)i.add(new xl(c))}function dg(e,t,n){if(t.repository&&t.repository[e]){const i=t.repository[e];md([i],t,n)}}function Kc(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&md(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&md(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function md(e,t,n){for(const i of e){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const o=i.repository?NE({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&md(i.patterns,{...t,repository:o},n);const s=i.include;if(!s)continue;const l=GE(s);switch(l.kind){case 0:Kc({...t,selfGrammar:t.baseGrammar},n);break;case 1:Kc(t,n);break;case 2:dg(l.ruleName,{...t,repository:o},n);break;case 3:case 4:const c=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const d={baseGrammar:t.baseGrammar,selfGrammar:c,repository:o};l.kind===4?dg(l.ruleName,d,n):Kc(d,n)}else l.kind===4?n.add(new E8(l.scopeName,l.ruleName)):n.add(new xl(l.scopeName));break}}}var L8=class{kind=0},R8=class{kind=1},O8=class{constructor(e){this.ruleName=e}kind=2},D8=class{constructor(e){this.scopeName=e}kind=3},M8=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function GE(e){if(e==="$base")return new L8;if(e==="$self")return new R8;const t=e.indexOf("#");if(t===-1)return new D8(e);if(t===0)return new O8(e.substring(1));{const n=e.substring(0,t),i=e.substring(t+1);return new M8(n,i)}}var I8=/\\(\d+)/,j_=/\\(\d+)/g,N8=-1,$E=-2;var jl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=_c.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=_c.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${zE(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:_c.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:_c.replaceCaptures(this._contentName,e,t)}},z8=class extends jl{retokenizeCapturedWithRuleId;constructor(e,t,n,i,o){super(e,t,n,i),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},P8=class extends jl{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,null),this._match=new Sl(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new _l,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},B_=class extends jl{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,i),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new _l,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},fg=class extends jl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o,s,l,c,d,f){super(e,t,n,i),this._begin=new Sl(o,this.id),this.beginCaptures=s,this._end=new Sl(l||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=d||!1,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new _l;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},gd=class extends jl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,i,o,s,l,c,d){super(e,t,n,i),this._begin=new Sl(o,this.id),this.beginCaptures=s,this.whileCaptures=c,this._while=new Sl(l,$E),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new _l;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new _l,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},qE=class Vt{static createCaptureRule(t,n,i,o,s){return t.registerRule(l=>new z8(n,l,i,o,s))}static getCompiledRuleId(t,n,i){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new P8(t.$vscodeTextmateLocation,t.id,t.name,t.match,Vt._compileCaptures(t.captures,n,i));if(typeof t.begin>"u"){t.repository&&(i=NE({},i,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new B_(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Vt._compilePatterns(s,n,i))}return t.while?new gd(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Vt._compileCaptures(t.beginCaptures||t.captures,n,i),t.while,Vt._compileCaptures(t.whileCaptures||t.captures,n,i),Vt._compilePatterns(t.patterns,n,i)):new fg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Vt._compileCaptures(t.beginCaptures||t.captures,n,i),t.end,Vt._compileCaptures(t.endCaptures||t.captures,n,i),t.applyEndPatternLast,Vt._compilePatterns(t.patterns,n,i))}),t.id}static _compileCaptures(t,n,i){let o=[];if(t){let s=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);c>s&&(s=c)}for(let l=0;l<=s;l++)o[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);let d=0;t[l].patterns&&(d=Vt.getCompiledRuleId(t[l],n,i)),o[c]=Vt.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,d)}}return o}static _compilePatterns(t,n,i){let o=[];if(t)for(let s=0,l=t.length;s<l;s++){const c=t[s];let d=-1;if(c.include){const f=GE(c.include);switch(f.kind){case 0:case 1:d=Vt.getCompiledRuleId(i[c.include],n,i);break;case 2:let p=i[f.ruleName];p&&(d=Vt.getCompiledRuleId(p,n,i));break;case 3:case 4:const m=f.scopeName,g=f.kind===4?f.ruleName:null,v=n.getExternalGrammar(m,i);if(v)if(g){let x=v.repository[g];x&&(d=Vt.getCompiledRuleId(x,n,v.repository))}else d=Vt.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else d=Vt.getCompiledRuleId(c,n,i);if(d!==-1){const f=n.getRule(d);let p=!1;if((f instanceof B_||f instanceof fg||f instanceof gd)&&f.hasMissingPatterns&&f.patterns.length===0&&(p=!0),p)continue;o.push(d)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Sl=class WE{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const i=t.length;let o=0,s=[],l=!1;for(let c=0;c<i;c++)if(t.charAt(c)==="\\"&&c+1<i){const f=t.charAt(c+1);f==="z"?(s.push(t.substring(o,c)),s.push("$(?!\\n)(?<!\\n)"),o=c+2):(f==="A"||f==="G")&&(l=!0),c++}this.hasAnchor=l,o===0?this.source=t:(s.push(t.substring(o,i)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=I8.test(this.source):this.hasBackReferences=!1}clone(){return new WE(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let i=n.map(o=>t.substring(o.start,o.end));return j_.lastIndex=0,this.source.replace(j_,(o,s)=>jE(i[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],i=[],o=[],s,l,c,d;for(s=0,l=this.source.length;s<l;s++)c=this.source.charAt(s),t[s]=c,n[s]=c,i[s]=c,o[s]=c,c==="\\"&&s+1<l&&(d=this.source.charAt(s+1),d==="A"?(t[s+1]="￿",n[s+1]="￿",i[s+1]="A",o[s+1]="A"):d==="G"?(t[s+1]="￿",n[s+1]="G",i[s+1]="￿",o[s+1]="G"):(t[s+1]=d,n[s+1]=d,i[s+1]=d,o[s+1]=d),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:i.join(""),A1_G1:o.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},_l=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new U_(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let i=this._items.map(o=>o.resolveAnchors(t,n));return new U_(e,i,this._items.map(o=>o.ruleId))}},U_=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
56
+ `)}findNextMatchSync(e,t,n){const i=this.scanner.findNextMatchSync(e,t,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},im=class{constructor(e,t){this.languageId=e,this.tokenType=t}},H8=class hg{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new im(t,8),this._embeddedLanguagesMatcher=new j8(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?hg._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new im(0,0);_getBasicScopeAttributes=new BE(t=>{const n=this._scopeToLanguage(t),i=this._toStandardTokenType(t);return new im(n,i)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(hg.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},j8=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,i])=>jE(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},V_=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function YE(e,t,n,i,o,s,l,c){const d=t.content.length;let f=!1,p=-1;if(l){const v=B8(e,t,n,i,o,s);o=v.stack,i=v.linePos,n=v.isFirstLine,p=v.anchorPosition}const m=Date.now();for(;!f;){if(c!==0&&Date.now()-m>c)return new V_(o,!0);g()}return new V_(o,!1);function g(){const v=U8(e,t,n,i,o,p);if(!v){s.produce(o,d),f=!0;return}const x=v.captureIndices,S=v.matchedRuleId,C=x&&x.length>0?x[0].end>i:!1;if(S===N8){const _=o.getRule(e);s.produce(o,x[0].start),o=o.withContentNameScopesList(o.nameScopesList),al(e,t,n,o,s,_.endCaptures,x),s.produce(o,x[0].end);const w=o;if(o=o.parent,p=w.getAnchorPos(),!C&&w.getEnterPos()===i){o=w,s.produce(o,d),f=!0;return}}else{const _=e.getRule(S);s.produce(o,x[0].start);const w=o,k=_.getName(t.content,x),D=o.contentNameScopesList.pushAttributed(k,e);if(o=o.push(S,i,p,x[0].end===d,null,D,D),_ instanceof fg){const M=_;al(e,t,n,o,s,M.beginCaptures,x),s.produce(o,x[0].end),p=x[0].end;const O=M.getContentName(t.content,x),z=D.pushAttributed(O,e);if(o=o.withContentNameScopesList(z),M.endHasBackReferences&&(o=o.withEndRule(M.getEndWithResolvedBackReferences(t.content,x))),!C&&w.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),f=!0;return}}else if(_ instanceof gd){const M=_;al(e,t,n,o,s,M.beginCaptures,x),s.produce(o,x[0].end),p=x[0].end;const O=M.getContentName(t.content,x),z=D.pushAttributed(O,e);if(o=o.withContentNameScopesList(z),M.whileHasBackReferences&&(o=o.withEndRule(M.getWhileWithResolvedBackReferences(t.content,x))),!C&&w.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),f=!0;return}}else if(al(e,t,n,o,s,_.captures,x),s.produce(o,x[0].end),o=o.pop(),!C){o=o.safePop(),s.produce(o,d),f=!0;return}}x[0].end>i&&(i=x[0].end,n=!1)}}function B8(e,t,n,i,o,s){let l=o.beginRuleCapturedEOL?0:-1;const c=[];for(let d=o;d;d=d.pop()){const f=d.getRule(e);f instanceof gd&&c.push({rule:f,stack:d})}for(let d=c.pop();d;d=c.pop()){const{ruleScanner:f,findOptions:p}=G8(d.rule,e,d.stack.endRule,n,i===l),m=f.findNextMatchSync(t,i,p);if(m){if(m.ruleId!==$E){o=d.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(s.produce(d.stack,m.captureIndices[0].start),al(e,t,n,d.stack,s,d.rule.whileCaptures,m.captureIndices),s.produce(d.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>i&&(i=m.captureIndices[0].end,n=!1))}else{o=d.stack.pop();break}}return{stack:o,linePos:i,anchorPosition:l,isFirstLine:n}}function U8(e,t,n,i,o,s){const l=V8(e,t,n,i,o,s),c=e.getInjections();if(c.length===0)return l;const d=F8(c,e,t,n,i,o,s);if(!d)return l;if(!l)return d;const f=l.captureIndices[0].start,p=d.captureIndices[0].start;return p<f||d.priorityMatch&&p===f?d:l}function V8(e,t,n,i,o,s){const l=o.getRule(e),{ruleScanner:c,findOptions:d}=XE(l,e,o.endRule,n,i===s),f=c.findNextMatchSync(t,i,d);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function F8(e,t,n,i,o,s,l){let c=Number.MAX_VALUE,d=null,f,p=0;const m=s.contentNameScopesList.getScopeNames();for(let g=0,v=e.length;g<v;g++){const x=e[g];if(!x.matcher(m))continue;const S=t.getRule(x.ruleId),{ruleScanner:C,findOptions:_}=XE(S,t,null,i,o===l),w=C.findNextMatchSync(n,o,_);if(!w)continue;const k=w.captureIndices[0].start;if(!(k>=c)&&(c=k,d=w.captureIndices,f=w.ruleId,p=x.priority,c===o))break}return d?{priorityMatch:p===-1,captureIndices:d,matchedRuleId:f}:null}function XE(e,t,n,i,o){return{ruleScanner:e.compileAG(t,n,i,o),findOptions:0}}function G8(e,t,n,i,o){return{ruleScanner:e.compileWhileAG(t,n,i,o),findOptions:0}}function al(e,t,n,i,o,s,l){if(s.length===0)return;const c=t.content,d=Math.min(s.length,l.length),f=[],p=l[0].end;for(let m=0;m<d;m++){const g=s[m];if(g===null)continue;const v=l[m];if(v.length===0)continue;if(v.start>p)break;for(;f.length>0&&f[f.length-1].endPos<=v.start;)o.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?o.produceFromScopes(f[f.length-1].scopes,v.start):o.produce(i,v.start),g.retokenizeCapturedWithRuleId){const S=g.getName(c,l),C=i.contentNameScopesList.pushAttributed(S,e),_=g.getContentName(c,l),w=C.pushAttributed(_,e),k=i.push(g.retokenizeCapturedWithRuleId,v.start,-1,!1,null,C,w),D=e.createOnigString(c.substring(0,v.end));YE(e,D,n&&v.start===0,v.start,k,o,!1,0),FE(D);continue}const x=g.getName(c,l);if(x!==null){const C=(f.length>0?f[f.length-1].scopes:i.contentNameScopesList).pushAttributed(x,e);f.push(new $8(C,v.end))}}for(;f.length>0;)o.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var $8=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function q8(e,t,n,i,o,s,l,c){return new Y8(e,t,n,i,o,s,l,c)}function F_(e,t,n,i,o){const s=pd(t,yd),l=qE.getCompiledRuleId(n,i,o.repository);for(const c of s)e.push({debugSelector:t,matcher:c.matcher,ruleId:l,grammar:o,priority:c.priority})}function yd(e,t){if(t.length<e.length)return!1;let n=0;return e.every(i=>{for(let o=n;o<t.length;o++)if(W8(t[o],i))return n=o+1,!0;return!1})}function W8(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var Y8=class{constructor(e,t,n,i,o,s,l,c){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=c,this._basicScopeAttributesProvider=new H8(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=G_(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const d of Object.keys(o)){const f=pd(d,yd);for(const p of f)this._tokenTypeMatchers.push({matcher:p.matcher,type:o[d]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],n=this._rootScopeName,i=e.lookup(n);if(i){const o=i.injections;if(o)for(let l in o)F_(t,l,o[l],this,i);const s=this._grammarRepository.injections(n);s&&s.forEach(l=>{const c=this.getExternalGrammar(l);if(c){const d=c.injectionSelector;d&&F_(t,d,c,this,c)}})}return t.sort((o,s)=>o.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=G_(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const i=this._tokenize(e,t,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,n=0){const i=this._tokenize(e,t,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,n,i){this._rootId===-1&&(this._rootId=qE.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===pg.NULL){o=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=To.set(0,f.languageId,f.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),g=this.getRule(this._rootId).getName(null,null);let v;g?v=pl.createRootAndLookUpScopeName(g,m,this):v=pl.createRoot("unknown",m),t=new pg(null,this._rootId,-1,-1,!1,null,v,v)}else o=!1,t.reset();e=e+`
57
+ `;const s=this.createOnigString(e),l=s.content.length,c=new K8(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=YE(this,s,o,0,t,c,!0,i);return FE(s),{lineLength:l,lineTokens:c,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function G_(e,t){return e=h8(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var pl=class ci{constructor(t,n,i){this.parent=t,this.scopePath=n,this.tokenAttributes=i}static fromExtension(t,n){let i=t,o=t?.scopePath??null;for(const s of n)o=nm.push(o,s.scopeNames),i=new ci(i,o,s.encodedTokenAttributes);return i}static createRoot(t,n){return new ci(null,new nm(null,t),n)}static createRootAndLookUpScopeName(t,n,i){const o=i.getMetadataForScope(t),s=new nm(null,t),l=i.themeProvider.themeMatch(s),c=ci.mergeAttributes(n,o,l);return new ci(null,s,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return ci.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,i){let o=-1,s=0,l=0;return i!==null&&(o=i.fontStyle,s=i.foregroundId,l=i.backgroundId),To.set(t,n.languageId,n.tokenType,null,o,s,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return ci._pushAttributed(this,t,n);const i=t.split(/ /g);let o=this;for(const s of i)o=ci._pushAttributed(o,s,n);return o}static _pushAttributed(t,n,i){const o=i.getMetadataForScope(n),s=t.scopePath.push(n),l=i.themeProvider.themeMatch(s),c=ci.mergeAttributes(t.tokenAttributes,o,l);return new ci(t,s,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push({encodedTokenAttributes:i.tokenAttributes,scopeNames:i.scopePath.getExtensionIfDefined(i.parent?.scopePath??null)}),i=i.parent;return i===t?n.reverse():void 0}},pg=class vo{constructor(t,n,i,o,s,l,c,d){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=l,this.nameScopesList=c,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=i,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new vo(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:vo._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?pl.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){vo._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,i,o,s,l,c){return new vo(this,t,n,i,o,s,l,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new vo(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const i=pl.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new vo(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,pl.fromExtension(i,n.contentNameScopesList))}},X8=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):pd(n,yd).map(i=>i.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>pd(n,yd).map(i=>i.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},K8=class{constructor(e,t,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const l of this._tokenTypeOverrides)l.matcher(s)&&(i=To.set(i,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(i=To.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let i=0,o=this._binaryTokens.length;i<o;i++)n[i]=this._binaryTokens[i];return n}},Q8=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,i,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,q8(e,s,t,n,i,o,this,this._onigLib))}return this._grammars.get(e)}},Z8=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Q8(hd.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(hd.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,i){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:i})}loadGrammarWithConfiguration(t,n,i){return this._loadGrammar(t,n,i.embeddedLanguages,i.tokenTypes,new X8(i.balancedBracketSelectors||[],i.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,i,o,s){const l=new T8(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(c=>this._loadSingleGrammar(c.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,i,o,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const i=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,i)}}addGrammar(t,n=[],i=0,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,i,o)}_grammarForScopeName(t,n=0,i=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,i,o,s)}},mg=pg.NULL;function vd(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},i=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[o]=s:o===i&&Object.assign(n,s);return n}function Ur(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function J8(e){return Array.isArray(e)?e:[e]}async function KE(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Gd(e){return!e||["plaintext","txt","text","plain"].includes(e)}function QE(e){return e==="ansi"||Gd(e)}function $d(e){return e==="none"}function ZE(e){return $d(e)}const e5=/(\r?\n)/g;function qd(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(e5);let i=0;const o=[];for(let s=0;s<n.length;s+=2){const l=t?n[s]+(n[s+1]||""):n[s];o.push([l,i]),i+=n[s].length,i+=n[s+1]?.length||0}return o}const $_={light:"#333333",dark:"#bbbbbb"},q_={light:"#fffffe",dark:"#1e1e1e"},W_="__shiki_resolved";function Wd(e){if(e?.[W_])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:i}=t;if(!n||!i){const c=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;c?.settings?.foreground&&(i=c.settings.foreground),c?.settings?.background&&(n=c.settings.background),!i&&t?.colors?.["editor.foreground"]&&(i=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),i||(i=t.type==="light"?$_.light:$_.dark),n||(n=t.type==="light"?q_.light:q_.dark),t.fg=i,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const s=new Map;function l(c){if(s.has(c))return s.get(c);o+=1;const d=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?l(c):(s.set(c,d),d)}t.settings=t.settings.map(c=>{const d=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),f=c.settings?.background&&!c.settings.background.startsWith("#");if(!d&&!f)return c;const p={...c,settings:{...c.settings}};if(d){const m=l(c.settings.foreground);t.colorReplacements[m]=c.settings.foreground,p.settings.foreground=m}if(f){const m=l(c.settings.background);t.colorReplacements[m]=c.settings.background,p.settings.background=m}return p});for(const c of Object.keys(t.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!t.colors[c]?.startsWith("#")){const d=l(t.colors[c]);t.colorReplacements[d]=t.colors[c],t.colors[c]=d}return Object.defineProperty(t,W_,{enumerable:!1,writable:!1,value:!0}),t}async function JE(e){return[...new Set((await Promise.all(e.filter(t=>!QE(t)).map(async t=>await KE(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function ek(e){return(await Promise.all(e.map(async t=>ZE(t)?null:Wd(await KE(t))))).filter(t=>!!t)}function tk(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new tt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var t5=class extends Z8{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,i={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=i,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=Wd(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=hd.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=tk(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,t.size)for(const o of t)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const t=[...this._langGraph.entries()],n=t.filter(([i,o])=>!o);if(n.length){const i=t.filter(([o,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(l=>n.map(([c])=>c).includes(l)):!1).filter(o=>!n.includes(o));throw new tt(`Missing languages ${n.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of t)this._resolver.addLanguage(o);for(const[i,o]of t)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},n5=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let i=1;i<=t.length;i++){const o=t.slice(0,i).join(".");n=[...n,...this._injections.get(o)||[]]}return n}};let tl=0;function i5(e){tl+=1,e.warnings!==!1&&tl>=10&&tl%10===0&&console.warn(`[Shiki] ${tl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new tt("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(Wd),o=new t5(new n5(e.engine,n),i,n,e.langAlias);let s;function l(w){return tk(w,e.langAlias)}function c(w){C();const k=o.getGrammar(typeof w=="string"?w:w.name);if(!k)throw new tt(`Language \`${w}\` not found, you may need to load it first`);return k}function d(w){if(w==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};C();const k=o.getTheme(w);if(!k)throw new tt(`Theme \`${w}\` not found, you may need to load it first`);return k}function f(w){C();const k=d(w);return s!==w&&(o.setTheme(k),s=w),{theme:k,colorMap:o.getColorMap()}}function p(){return C(),o.getLoadedThemes()}function m(){return C(),o.getLoadedLanguages()}function g(...w){C(),o.loadLanguages(w.flat(1))}async function v(...w){return g(await JE(w))}function x(...w){C();for(const k of w.flat(1))o.loadTheme(k)}async function S(...w){return C(),x(await ek(w))}function C(){if(t)throw new tt("Shiki instance has been disposed")}function _(){t||(t=!0,o.dispose(),tl-=1)}return{setTheme:f,getTheme:d,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:m,resolveLangAlias:l,loadLanguage:v,loadLanguageSync:g,loadTheme:S,loadThemeSync:x,dispose:_,[Symbol.dispose]:_}}async function r5(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,i]=await Promise.all([ek(e.themes||[]),JE(e.langs||[]),e.engine]);return i5({...e,themes:t,langs:n,engine:i})}const nk=new WeakMap;function Yd(e,t){nk.set(e,t)}function Cl(e){return nk.get(e)}var Xd=class ik{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new ik(Object.fromEntries(J8(n).map(i=>[i,mg])),t)}constructor(...t){if(t.length===2){const[n,i]=t;this.lang=i,this._stacks=n}else{const[n,i,o]=t;this.lang=i,this._stacks={[o]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return o5(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function o5(e){const t=[],n=new Set;function i(o){if(n.has(o))return;n.add(o);const s=o?.nameScopesList?.scopeName;s&&t.push(s),o.parent&&i(o.parent)}return i(e),t}function a5(e,t){if(!(e instanceof Xd))throw new tt("Invalid grammar state");return e.getInternalStack(t)}const s5=/,/,l5=/ /;function rk(e,t,n={}){const{theme:i=e.getLoadedThemes()[0]}=n;if(Gd(e.resolveLangAlias(n.lang||"text"))||$d(i))return qd(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:o,colorMap:s}=e.setTheme(i),l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new tt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new tt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return c5(t,l,o,s,n)}function u5(...e){if(e.length===2)return Cl(e[1]);const[t,n,i={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=i;if(Gd(o)||$d(s))throw new tt("Plain language does not have grammar state");if(o==="ansi")throw new tt("ANSI language does not have grammar state");const{theme:l,colorMap:c}=t.setTheme(s),d=t.getLanguage(o);return new Xd(Ly(n,d,l,c,i).stateStack,d.name,l.name)}function c5(e,t,n,i,o){const s=Ly(e,t,n,i,o),l=new Xd(s.stateStack,t.name,n.name);return Yd(s.tokens,l),s.tokens}function Ly(e,t,n,i,o){const s=vd(n,o),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:c=500,includeExplanation:d=!1}=o,f=qd(e);let p=o.grammarState?a5(o.grammarState,n.name)??mg:o.grammarContextCode!=null?Ly(o.grammarContextCode,t,n,i,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:mg,m=[];const g=[];for(let v=0,x=f.length;v<x;v++){const[S,C]=f[v];if(S===""){m=[],g.push([]);continue}if(l>0&&S.length>=l){m=[],g.push([{content:S,offset:C,color:"",fontStyle:0}]);continue}let _,w,k;d&&d!=="tokenType"&&(_=t.tokenizeLine(S,p,c),w=_.tokens,k=0);const D=t.tokenizeLine2(S,p,c),M=D.tokens.length/2;for(let O=0;O<M;O++){const z=D.tokens[2*O],j=O+1<M?D.tokens[2*O+2]:S.length;if(z===j)continue;const F=D.tokens[2*O+1],ee=Ur(i[To.getForeground(F)],s),q=To.getFontStyle(F),U={content:S.substring(z,j),offset:C+z,color:ee,fontStyle:q};if(d==="tokenType")U.type=To.getTokenType(F);else if(d){const Z=[];if(d!=="scopeName")for(const W of n.settings){let P;switch(typeof W.scope){case"string":P=W.scope.split(s5).map($=>$.trim());break;case"object":P=W.scope;break;default:continue}Z.push({settings:W,selectors:P.map($=>$.split(l5))})}U.explanation=[];let X=0;for(;z+X<j;){const W=w[k],P=S.substring(W.startIndex,W.endIndex);X+=P.length,U.explanation.push({content:P,scopes:d==="scopeName"?d5(W.scopes):f5(Z,W.scopes)}),k+=1}}m.push(U)}g.push(m),m=[],p=D.ruleStack}return{tokens:g,stateStack:p}}function d5(e){return e.map(t=>({scopeName:t}))}function f5(e,t){const n=[];for(let i=0,o=t.length;i<o;i++){const s=t[i];n[i]={scopeName:s,themeMatches:p5(e,s,t.slice(0,i))}}return n}function Y_(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function h5(e,t,n){if(!Y_(e.at(-1),t))return!1;let i=e.length-2,o=n.length-1;for(;i>=0&&o>=0;)Y_(e[i],n[o])&&(i-=1),o-=1;return i===-1}function p5(e,t,n){const i=[];for(const{selectors:o,settings:s}of e)for(const l of o)if(h5(l,t,n)){i.push(s);break}return i}function ok(e,t,n,i=rk){const o=Object.entries(n.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})),s=o.map(f=>{const p=i(e,t,{...n,theme:f.theme});return{tokens:p,state:Cl(p),theme:typeof f.theme=="string"?f.theme:f.theme.name}}),l=m5(...s.map(f=>f.tokens)),c=l[0].map((f,p)=>f.map((m,g)=>{const v={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(v.explanation=m.explanation),l.forEach((x,S)=>{const{content:C,explanation:_,offset:w,...k}=x[p][g];v.variants[o[S].color]=k}),v})),d=s[0].state?new Xd(Object.fromEntries(s.map(f=>[f.theme,f.state?.getInternalStack(f.theme)])),s[0].state.lang):void 0;return d&&Yd(c,d),c}function m5(...e){const t=e.map(()=>[]),n=e.length;for(let i=0;i<e[0].length;i++){const o=e.map(d=>d[i]),s=t.map(()=>[]);t.forEach((d,f)=>d.push(s[f]));const l=o.map(()=>0),c=o.map(d=>d[0]);for(;c.every(d=>d);){const d=Math.min(...c.map(f=>f.content.length));for(let f=0;f<n;f++){const p=c[f];p.content.length===d?(s[f].push(p),l[f]+=1,c[f]=o[f][l[f]]):(s[f].push({...p,content:p.content.slice(0,d)}),c[f]={...p,content:p.content.slice(d),offset:p.offset+d})}}}return t}const X_=/\s+/g;function ak(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(X_)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(X_);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function g5(e){const t=qd(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t.at(-1).length};let s=o,l=0;for(const c of t){if(s<c.length)break;s-=c.length,l++}return{line:l,character:s}}function i(o,s){let l=0;for(let c=0;c<o;c++)l+=t[c].length;return l+=s,l}return{lines:t,indexToPos:n,posToIndex:i}}const y5=["color","background-color"];function v5(e,t){let n=0;const i=[];for(const o of t)o>n&&i.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&i.push({...e,content:e.content.slice(n),offset:e.offset+n}),i}function b5(e,t){let n=0,i=e.length;for(;n<i;){const o=n+(i-n>>1);e[o]<=t?n=o+1:i=o}return n}function x5(e,t){const n=[...t instanceof Set?t:new Set(t)].sort((i,o)=>i-o);return n.length?e.map(i=>i.flatMap(o=>{const s=o.offset+o.content.length,l=b5(n,o.offset);let c=l;for(;c<n.length&&n[c]<s;)c++;if(l===c)return o;const d=n.slice(l,c);for(let f=0;f<d.length;f++)d[f]-=o.offset;return v5(o,d)})):e}function S5(e,t,n,i,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(p=>bd(e.variants[p])),c=new Set(l.flatMap(p=>Object.keys(p))),d={},f=(p,m)=>{const g=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":g)};return l.forEach((p,m)=>{for(const g of c){const v=p[g]||"inherit";if(m===0&&i&&y5.includes(g))if(i==="light-dark()"&&l.length>1){const x=t.findIndex(w=>w==="light"),S=t.findIndex(w=>w==="dark");if(x===-1||S===-1)throw new tt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const C=l[x][g]||"inherit",_=l[S][g]||"inherit";d[g]=`light-dark(${C}, ${_})`,o==="css-vars"&&(d[f(m,g)]=v)}else d[g]=v;else o==="css-vars"&&(d[f(m,g)]=v)}}),s.htmlStyle=d,s}function bd(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&$t.Italic&&(t["font-style"]="italic"),e.fontStyle&$t.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&$t.Underline&&n.push("underline"),e.fontStyle&$t.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function gg(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function _5(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let o=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new tt(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...i.indexToPos(l),offset:l}}else{const c=i.lines[l.line];if(c===void 0)throw new tt(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${i.lines.length}`);let d=l.character;if(d<0&&(d=c.length+d),d<0||d>c.length)throw new tt(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${c.length}`);return{...l,character:d,offset:i.posToIndex(l.line,d)}}};const i=g5(n.source),s=(n.options.decorations||[]).map(l=>({...l,start:o(l.start),end:o(l.end)}));C5(s),e.set(n.meta,{decorations:s,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return x5(n,t(this).decorations.flatMap(i=>[i.start.offset,i.end.offset]))},code(n){if(!this.options.decorations?.length)return;const i=t(this),o=[...n.children].filter(p=>p.type==="element"&&p.tagName==="span");if(o.length!==i.converter.lines.length)throw new tt(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${i.converter.lines.length}). Failed to apply decorations.`);function s(p,m,g,v){const x=o[p];let S="",C=-1,_=-1;if(m===0&&(C=0),g===0&&(_=0),g===Number.POSITIVE_INFINITY&&(_=x.children.length),C===-1||_===-1)for(let k=0;k<x.children.length;k++)S+=sk(x.children[k]),C===-1&&S.length===m&&(C=k+1),_===-1&&S.length===g&&(_=k+1);if(C===-1)throw new tt(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(_===-1)throw new tt(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const w=x.children.slice(C,_);if(!v.alwaysWrap&&w.length===x.children.length)c(x,v,"line");else if(!v.alwaysWrap&&w.length===1&&w[0].type==="element")c(w[0],v,"token");else{const k={type:"element",tagName:"span",properties:{},children:w};c(k,v,"wrapper"),x.children.splice(C,w.length,k)}}function l(p,m){o[p]=c(o[p],m,"line")}function c(p,m,g){const v=m.properties||{},x=m.transform||(S=>S);return p.tagName=m.tagName||"span",p.properties={...p.properties,...v,class:p.properties.class},m.properties?.class&&ak(p,m.properties.class),p=x(p,g)||p,p}const d=[],f=i.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of f){const{start:m,end:g}=p;if(m.line===g.line)s(m.line,m.character,g.character,p);else if(m.line<g.line){s(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let v=m.line+1;v<g.line;v++)d.unshift(()=>l(v,p));s(g.line,0,g.character,p)}}d.forEach(p=>p())}}}function C5(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new tt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=t+1;i<e.length;i++){const o=e[i],s=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,l=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,c=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,d=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(s||l||c||d){if(s&&l||c&&d||c&&n.start.offset===n.end.offset||l&&o.start.offset===o.end.offset)continue;throw new tt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function sk(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(sk).join(""):""}const w5=[_5()];function xd(e){const t=E5(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...w5]}function E5(e){const t=[],n=[],i=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:i.push(o)}return{pre:t,post:n,normal:i}}var _o=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],rm={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function k5(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const i=e.indexOf("m",n);if(i!==-1)return{sequence:e.substring(n+2,i).split(";"),startPosition:n,position:i+1}}return{position:e.length}}function K_(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(i=>Number.parseInt(i));return n.length!==3||n.some(i=>Number.isNaN(i))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function T5(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const i=Number.parseInt(n);if(!Number.isNaN(i))if(i===0)t.push({type:"resetAll"});else if(i<=9)rm[i]&&t.push({type:"setDecoration",value:rm[i]});else if(i<=29){const o=rm[i-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:_o[i-30]}});else if(i===38){const o=K_(e);o&&t.push({type:"setForegroundColor",value:o})}else if(i===39)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:_o[i-40]}});else if(i===48){const o=K_(e);o&&t.push({type:"setBackgroundColor",value:o})}else i===49?t.push({type:"resetBackgroundColor"}):i===53?t.push({type:"setDecoration",value:"overline"}):i===55?t.push({type:"resetDecoration",value:"overline"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:_o[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:_o[i-100+8]}})}return t}function A5(){let e=null,t=null,n=new Set;return{parse(i){const o=[];let s=0;do{const l=k5(i,s),c=l.sequence?i.substring(s,l.startPosition):i.substring(s);if(c.length>0&&o.push({value:c,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=T5(l.sequence);for(const f of d)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of d)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}s=l.position}while(s<i.length);return o}}}var L5={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function R5(e=L5){function t(c){return e[c]}function n(c){return`#${c.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let i;function o(){if(i)return i;i=[];for(let f=0;f<_o.length;f++)i.push(t(_o[f]));let c=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)i.push(n([c[f],c[p],c[m]]));let d=8;for(let f=0;f<24;f++,d+=10)i.push(n([d,d,d]));return i}function s(c){return o()[c]}function l(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return s(c.index)}}return{value:l}}const O5=/#([0-9a-f]{3,8})/i,D5=/var\((--[\w-]+-ansi-[\w-]+)\)/,M5={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function I5(e,t,n){const i=vd(e,n),o=qd(t),s=R5(Object.fromEntries(_o.map(c=>{const d=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`;return[c,e.colors?.[d]||M5[c]]}))),l=A5();return o.map(c=>l.parse(c[0]).map(d=>{let f,p;d.decorations.has("reverse")?(f=d.background?s.value(d.background):e.bg,p=d.foreground?s.value(d.foreground):e.fg):(f=d.foreground?s.value(d.foreground):e.fg,p=d.background?s.value(d.background):void 0),f=Ur(f,i),p=Ur(p,i),d.decorations.has("dim")&&(f=N5(f));let m=$t.None;return d.decorations.has("bold")&&(m|=$t.Bold),d.decorations.has("italic")&&(m|=$t.Italic),d.decorations.has("underline")&&(m|=$t.Underline),d.decorations.has("strikethrough")&&(m|=$t.Strikethrough),{content:d.value,offset:c[1],color:f,bgColor:p,fontStyle:m}}))}function N5(e){const t=e.match(O5);if(t){const i=t[1];if(i.length===8){const o=Math.round(Number.parseInt(i.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${i.slice(0,6)}${o}`}else{if(i.length===6)return`#${i}80`;if(i.length===4){const o=i[0],s=i[1],l=i[2],c=i[3];return`#${o}${o}${s}${s}${l}${l}${Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0")}`}else if(i.length===3){const o=i[0],s=i[1],l=i[2];return`#${o}${o}${s}${s}${l}${l}80`}}}const n=e.match(D5);return n?`var(${n[1]}-dim)`:e}function yg(e,t,n={}){const i=e.resolveLangAlias(n.lang||"text"),{theme:o=e.getLoadedThemes()[0]}=n;if(!Gd(i)&&!$d(o)&&i==="ansi"){const{theme:s}=e.setTheme(o);return I5(s,t,n)}return rk(e,t,n)}function Sd(e,t,n){let i,o,s,l,c,d;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,g=Object.entries(n.themes).filter(_=>_[1]).map(_=>({color:_[0],theme:_[1]})).sort((_,w)=>_.color===f?-1:w.color===f?1:0);if(g.length===0)throw new tt("`themes` option must not be empty");const v=ok(e,t,n,yg);if(d=Cl(v),f&&f!=="light-dark()"&&!g.some(_=>_.color===f))throw new tt(`\`themes\` option must contain the defaultColor key \`${f}\``);const x=g.map(_=>e.getTheme(_.theme)),S=g.map(_=>_.color);s=v.map(_=>_.map(w=>S5(w,S,p,f,m))),d&&Yd(s,d);const C=g.map(_=>vd(_.theme,n));o=Q_(g,x,C,p,f,"fg",m),i=Q_(g,x,C,p,f,"bg",m),l=`shiki-themes ${x.map(_=>_.name).join(" ")}`,c=f?void 0:[o,i].join(";")}else if("theme"in n){const f=vd(n.theme,n);s=yg(e,t,n);const p=e.getTheme(n.theme);i=Ur(p.bg,f),o=Ur(p.fg,f),l=p.name,d=Cl(s)}else throw new tt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:i,themeName:l,rootStyle:c,grammarState:d}}function Q_(e,t,n,i,o,s,l){return e.map((c,d)=>{const f=Ur(t[d][s],n[d])||"inherit",p=`${i+c.color}${s==="bg"?"-bg":""}:${f}`;if(d===0&&o){if(o==="light-dark()"&&e.length>1){const m=e.findIndex(v=>v.color==="light"),g=e.findIndex(v=>v.color==="dark");if(m===-1||g===-1)throw new tt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ur(t[m][s],n[m])||"inherit"}, ${Ur(t[g][s],n[g])||"inherit"});${p}`}return f}return l==="css-vars"?p:null}).filter(c=>!!c).join(";")}const lk=/^\s+$/,z5=/^(\s*)(.*?)(\s*)$/;function _d(e,t,n,i={meta:{},options:n,codeToHast:(o,s)=>_d(e,o,s),codeToTokens:(o,s)=>Sd(e,o,s)}){let o=t;for(const x of xd(n))o=x.preprocess?.call(i,o,n)||o;let{tokens:s,fg:l,bg:c,themeName:d,rootStyle:f,grammarState:p}=Sd(e,o,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:g=!1}=n;m===!0?s=H5(s):m==="never"&&(s=j5(s)),g&&(s=B5(s));const v={...i,get source(){return o}};for(const x of xd(n))s=x.tokens?.call(v,s)||s;return P5(s,{...n,fg:l,bg:c,themeName:d,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},v,p)}function P5(e,t,n,i=Cl(e)){const o=xd(t),s=[],l={type:"root",children:[]},{structure:c="classic",tabindex:d="0"}=t,f={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?f.style=t.rootStyle:f.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(f.tabindex=d.toString());for(const[S,C]of Object.entries(t.meta||{}))S.startsWith("_")||(f[S]=C);let p={type:"element",tagName:"pre",properties:f,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:s};const g=[],v={...n,structure:c,addClassToHast:ak,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return p},get code(){return m},get lines(){return g}};if(e.forEach((S,C)=>{C&&(c==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&s.push({type:"text",value:`
58
+ `}));let _={type:"element",tagName:"span",properties:{class:"line"},children:[]},w=0;for(const k of S){let D={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const M=gg(k.htmlStyle||bd(k));M&&(D.properties.style=M);for(const O of o)D=O?.span?.call(v,D,C+1,w,_,k)||D;c==="inline"?l.children.push(D):c==="classic"&&_.children.push(D),w+=k.content.length}if(c==="classic"){for(const k of o)_=k?.line?.call(v,_,C+1)||_;g.push(_),s.push(_)}else c==="inline"&&g.push(_)}),c==="classic"){for(const S of o)m=S?.code?.call(v,m)||m;p.children.push(m);for(const S of o)p=S?.pre?.call(v,p)||p;l.children.push(p)}else if(c==="inline"){const S=[];let C={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const w of l.children)w.type==="element"&&w.tagName==="br"?(S.push(C),C={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(w.type==="element"||w.type==="text")&&C.children.push(w);S.push(C);let _={type:"element",tagName:"code",properties:{},children:S};for(const w of o)_=w?.code?.call(v,_)||_;l.children=[];for(let w=0;w<_.children.length;w++){w>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const k=_.children[w];k.type==="element"&&l.children.push(...k.children)}}let x=l;for(const S of o)x=S?.root?.call(v,x)||x;return i&&Yd(x,i),x}function H5(e){return e.map(t=>{const n=[];let i="",o;return t.forEach((s,l)=>{const c=!(s.fontStyle&&(s.fontStyle&$t.Underline||s.fontStyle&$t.Strikethrough));c&&lk.test(s.content)&&t[l+1]?(o===void 0&&(o=s.offset),i+=s.content):i?(c?n.push({...s,offset:o,content:i+s.content}):n.push({content:i,offset:o},s),o=void 0,i=""):n.push(s)}),n})}function j5(e){return e.map(t=>t.flatMap(n=>{if(lk.test(n.content))return n;const i=n.content.match(z5);if(!i)return n;const[,o,s,l]=i;if(!o&&!l)return n;const c=[{...n,offset:n.offset+o.length,content:s}];return o&&c.unshift({content:o,offset:n.offset}),l&&c.push({content:l,offset:n.offset+o.length+s.length}),c}))}function B5(e){return e.map(t=>{const n=[];for(const i of t){if(n.length===0){n.push({...i});continue}const o=n.at(-1),s=gg(o.htmlStyle||bd(o)),l=gg(i.htmlStyle||bd(i)),c=o.fontStyle&&(o.fontStyle&$t.Underline||o.fontStyle&$t.Strikethrough),d=i.fontStyle&&(i.fontStyle&$t.Underline||i.fontStyle&$t.Strikethrough);!c&&!d&&s===l?o.content+=i.content:n.push({...i})}return n})}const U5=Zt;function V5(e,t,n){const i={meta:{},options:n,codeToHast:(s,l)=>_d(e,s,l),codeToTokens:(s,l)=>Sd(e,s,l)};let o=U5(_d(e,t,n,i));for(const s of xd(n))o=s.postprocess?.call(i,o,n)||o;return o}async function F5(e){const t=await r5(e);return{getLastGrammarState:(...n)=>u5(t,...n),codeToTokensBase:(n,i)=>yg(t,n,i),codeToTokensWithThemes:(n,i)=>ok(t,n,i),codeToTokens:(n,i)=>Sd(t,n,i),codeToHast:(n,i)=>_d(t,n,i),codeToHtml:(n,i)=>V5(t,n,i),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function G5(e){const t=e.langs,n=e.themes,i=e.engine;async function o(s){function l(m){if(typeof m=="string"){if(m=s.langAlias?.[m]||m,QE(m))return[];const g=t[m];if(!g)throw new tt(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return g}return m}function c(m){if(ZE(m))return"none";if(typeof m=="string"){const g=n[m];if(!g)throw new tt(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return g}return m}const d=(s.themes??[]).map(m=>c(m)),f=(s.langs??[]).map(m=>l(m)),p=await F5({engine:s.engine??i(),...s,themes:d,langs:f});return{...p,loadLanguage(...m){return p.loadLanguage(...m.map(l))},loadTheme(...m){return p.loadTheme(...m.map(c))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return o}const $5=G5({langs:lg,themes:YH,engine:()=>(0,IE.createOnigurumaEngine)(T(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))}),Z_=4294967295;var q5=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:i,regexConstructor:o}=t;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;const l=i?.get(s);if(l){if(l instanceof RegExp)return l;if(n)return null;throw l}try{const c=o(s);return i?.set(s,c),c}catch(c){if(i?.set(s,c),n)return null;throw c}})}findNextMatchSync(e,t,n){const i=typeof e=="string"?e:e.content,o=[];function s(l,c,d=0){return{index:l,captureIndices:c.indices.map(f=>f==null?{start:Z_,end:Z_,length:0}:{start:f[0]+d,end:f[1]+d,length:f[1]-f[0]})}}for(let l=0;l<this.regexps.length;l++){const c=this.regexps[l];if(c)try{c.lastIndex=t;const d=c.exec(i);if(!d)continue;if(d.index===t)return s(l,d,0);o.push([l,d,0])}catch(d){if(this.options.forgiving)continue;throw d}}if(o.length){const l=Math.min(...o.map(c=>c[1].index));for(const[c,d,f]of o)if(d.index===l)return s(c,d,f)}return null}};function Za(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function W5(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Ry=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Dt=String.raw;function Ja(e,t){if(e==null)throw new Error(t??"Value expected");return e}const uk=Dt`\[\^?`,ck=`c.? | C(?:-.?)?|${Dt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Dt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Dt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Dt`o\{[^\}]*\}?`}|${Dt`\d{1,3}`}`,Oy=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Cc=new RegExp(Dt`
59
+ \\ (?:
60
+ ${ck}
61
+ | [gk]<[^>]*>?
62
+ | [gk]'[^']*'?
63
+ | .
64
+ )
65
+ | \( (?:
66
+ \? (?:
67
+ [:=!>({]
68
+ | <[=!]
69
+ | <[^>]*>
70
+ | '[^']*'
71
+ | ~\|?
72
+ | #(?:[^)\\]|\\.?)*
73
+ | [^:)]*[:)]
74
+ )?
75
+ | \*[^\)]*\)?
76
+ )?
77
+ | (?:${Oy.source})+
78
+ | ${uk}
79
+ | .
80
+ `.replace(/\s+/g,""),"gsu"),om=new RegExp(Dt`
81
+ \\ (?:
82
+ ${ck}
83
+ | .
84
+ )
85
+ | \[:(?:\^?\p{Alpha}+|\^):\]
86
+ | ${uk}
87
+ | &&
88
+ | .
89
+ `.replace(/\s+/g,""),"gsu");function Y5(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const i=h6(n.flags),o=[i.extended],s={captureGroup:n.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(m){o.push(m)},replaceCurrentModX(m){o[o.length-1]=m},singleline:n.rules.singleline};let l=[],c;for(Cc.lastIndex=0;c=Cc.exec(e);){const m=X5(s,e,c[0],Cc.lastIndex);m.tokens?l.push(...m.tokens):m.token&&l.push(m.token),m.lastIndex!==void 0&&(Cc.lastIndex=m.lastIndex)}const d=[];let f=0;l.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++f:m.raw==="("&&d.push(m)}),f||d.forEach((m,g)=>{m.kind="capturing",m.number=g+1});const p=f||d.length;return{tokens:l.map(m=>m.type==="EscapedNumber"?m6(m,p):m).flat(),flags:i}}function X5(e,t,n,i){const[o,s]=n;if(n==="["||n==="[^"){const l=K5(t,n,i);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:J_(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:a6(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:fk(n)}}if(s==="K")return{token:hk("keep",n)};if(s==="N"||s==="R")return{token:Co("newline",n,{negate:s==="N"})};if(s==="O")return{token:Co("any",n)};if(s==="X")return{token:Co("text_segment",n)};const l=dk(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(o==="("){if(s==="*")return{token:c6(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[i]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:i+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:u6(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Ia("group",n)};if(n==="(?>")return{token:Ia("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Ia(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Ia("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Ia("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:i6(n)}}if(e.getCurrentModX()){if(n==="#"){const l=t.indexOf(`
90
+ `,i);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)){const l=/\s+/y;return l.lastIndex=i,{lastIndex:l.exec(t)?l.lastIndex:i}}}if(n===".")return{token:Co("dot",n)};if(n==="^"||n==="$"){const l=e.singleline?{"^":Dt`\A`,$:Dt`\Z`}[n]:n;return{token:J_(l,n)}}return n==="|"?{token:Z5(n)}:Oy.test(n)?{tokens:g6(n)}:{token:Zi(Za(n),n)}}function K5(e,t,n){const i=[eC(t[1]==="^",t)];let o=1,s;for(om.lastIndex=n;s=om.exec(e);){const l=s[0];if(l[0]==="["&&l[1]!==":")o++,i.push(eC(l[1]==="^",l));else if(l==="]"){if(i.at(-1).type==="CharacterClassOpen")i.push(Zi(93,l));else if(o--,i.push(J5(l)),!o)break}else{const c=Q5(l);Array.isArray(c)?i.push(...c):i.push(c)}}return{tokens:i,lastIndex:om.lastIndex||e.length}}function Q5(e){if(e[0]==="\\")return dk(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Ry.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Co("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?e6(e):e==="&&"?t6(e):Zi(Za(e),e)}function dk(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return l6(e);if("dDhHsSwW".includes(n))return d6(e);if(e.startsWith(Dt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return f6(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const i=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(i)),s=new TextEncoder;return[...o].map(l=>{const c=[...s.encode(l)].map(d=>`\\x${d.toString(16)}`).join("");return Zi(Za(l),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Zi(p6(e),e);if(tC.has(n))return Zi(tC.get(n),e);if(/\d/.test(n))return n6(t,e);if(e==="\\")throw new Error(Dt`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Zi(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Z5(e){return{type:"Alternator",raw:e}}function J_(e,t){return{type:"Assertion",kind:e,raw:t}}function fk(e){return{type:"Backreference",raw:e}}function Zi(e,t){return{type:"Character",value:e,raw:t}}function J5(e){return{type:"CharacterClassClose",raw:e}}function e6(e){return{type:"CharacterClassHyphen",raw:e}}function t6(e){return{type:"CharacterClassIntersector",raw:e}}function eC(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Co(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function hk(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ja(n.flags),raw:t}}function n6(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function i6(e){return{type:"GroupClose",raw:e}}function Ia(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function r6(e,t,n,i){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:i}}function o6(e,t,n,i){return{type:"Quantifier",kind:e,min:t,max:n,raw:i}}function a6(e){return{type:"Subroutine",raw:e}}const s6=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),tC=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function l6(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Zi(Za(t.toUpperCase())-64,e)}function u6(e,t){let{on:n,off:i}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;i??="";const o=(t.getCurrentModX()||n.includes("x"))&&!i.includes("x"),s=iC(n),l=iC(i),c={};if(s&&(c.enable=s),l&&(c.disable=l),e.endsWith(")"))return t.replaceCurrentModX(o),hk("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,Ia("group",e,{...(s||l)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function c6(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:i,args:o}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(i==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=o?o.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[l,c,d]=s,f=s6.has(n)?n.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof l=="string")throw new Error(`Named callout argument must be a number "${l}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(s.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${l}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof d=="string"&&!/^[A-Za-z_]\w*$/.test(d))throw new Error(`Named callout argument three must be a tag or number "${d}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return r6(f,i??null,o?.split(",")??null,e)}function nC(e){let t=null,n,i;if(e[0]==="{"){const{minStr:o,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,l=1e5;if(+o>l||s&&+s>l)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+o,i=s===void 0?+o:s===""?1/0:+s,n>i&&(t="possessive",[n,i]=[i,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,i=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return o6(t,n,i,e)}function d6(e){const t=e[1].toLowerCase();return Co({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function f6(e){const{p:t,neg:n,value:i}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Co("property",e,{value:i,negate:t==="P"&&!n||t==="p"&&!!n})}function iC(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function h6(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const i=e[n];if(!"imxDPSWy".includes(i))throw new Error(`Invalid flag "${i}"`);if(i==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[i]]=!0}return t}function p6(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function m6(e,t){const{raw:n,inCharClass:i}=e,o=n.slice(1);if(!i&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[fk(n)];const s=[],l=o.match(/^[0-7]+|\d/g);for(let c=0;c<l.length;c++){const d=l[c];let f;if(c===0&&d!=="8"&&d!=="9"){if(f=parseInt(d,8),f>127)throw new Error(Dt`Octal encoded byte above 177 unsupported "${n}"`)}else f=Za(d);s.push(Zi(f,(c===0?"\\":"")+d))}return s}function g6(e){const t=[],n=new RegExp(Oy,"gy");let i;for(;i=n.exec(e);){const o=i[0];if(o[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(s){const{min:l,max:c}=s.groups;if(+l>+c&&o.endsWith("?")){n.lastIndex--,t.push(nC(o.slice(0,-1)));continue}}}t.push(nC(o))}return t}function pk(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(i=>t[i]===n[i])}function y6(e){return v6.has(e.type)}const v6=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function mk(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},i=Y5(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),o=(g,v)=>{const x=i.tokens[s.nextIndex];switch(s.parent=g,s.nextIndex++,x.type){case"Alternator":return No();case"Assertion":return b6(x);case"Backreference":return x6(x,s);case"Character":return Kd(x.value,{useLastValid:!!v.isCheckingRangeEnd});case"CharacterClassHyphen":return S6(x,s,v);case"CharacterClassOpen":return _6(x,s,v);case"CharacterSet":return C6(x,s);case"Directive":return L6(x.kind,{flags:x.flags});case"GroupOpen":return w6(x,s,v);case"NamedCallout":return O6(x.kind,x.tag,x.arguments);case"Quantifier":return E6(x,s);case"Subroutine":return k6(x,s);default:throw new Error(`Unexpected token type "${x.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:o},l=M6(R6(i.flags));let c=l.body[0];for(;s.nextIndex<i.tokens.length;){const g=o(c,{});g.type==="Alternative"?(l.body.push(g),c=g):c.body.push(g)}const{capturingGroups:d,hasNumberedRef:f,namedGroupsByName:p,subroutines:m}=s;if(f&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:g}of m)if(typeof g=="number"){if(g>d.length)throw new Error("Subroutine uses a group number that's not defined");g&&(d[g-1].isSubroutined=!0)}else if(p.has(g)){if(p.get(g).length>1)throw new Error(Dt`Subroutine uses a duplicate group name "\g<${g}>"`);p.get(g)[0].isSubroutined=!0}else throw new Error(Dt`Subroutine uses a group name that's not defined "\g<${g}>"`);return l}function b6({kind:e}){return vg(Ja({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Dt`\B`||e===Dt`\Y`})}function x6({raw:e},t){const n=/^\\k[<']/.test(e),i=n?e.slice(3,-1):e.slice(1),o=(s,l=!1)=>{const c=t.capturingGroups.length;let d=!1;if(s>c)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,bg(l?c+1-s:s,{orphan:d})};if(n){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(i);if(s)return o(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(i))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(i))throw new Error(`Group name not defined to the left "${e}"`);return bg(i)}return o(+i)}function S6(e,t,n){const{tokens:i,walk:o}=t,s=t.parent,l=s.body.at(-1),c=i[t.nextIndex];if(!n.isCheckingRangeEnd&&l&&l.type!=="CharacterClass"&&l.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const d=o(s,{...n,isCheckingRangeEnd:!0});if(l.type==="Character"&&d.type==="Character")return s.body.pop(),A6(l,d);throw new Error("Invalid character class range")}return Kd(Za("-"))}function _6({negate:e},t,n){const{tokens:i,walk:o}=t,s=[Qc()],l=i[t.nextIndex];let c=aC(l);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")s.push(Qc()),t.nextIndex++;else{const f=s.at(-1);f.body.push(o(f,n))}c=aC(i[t.nextIndex],l)}const d=Qc({negate:e});return s.length===1?d.body=s[0].body:(d.kind="intersection",d.body=s.map(f=>f.body.length===1?f.body[0]:f)),t.nextIndex++,d}function C6({kind:e,negate:t,value:n},i){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:l}=i;if(e==="property"){const c=Qd(n);if(Ry.has(c)&&!l?.has(c))e="posix",n=c;else return Na(n,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:l})}return e==="posix"?D6(n,{negate:t}):xg(e,{negate:t})}function w6(e,t,n){const{tokens:i,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:l,walk:c}=t,d=I6(e),f=d.type==="AbsenceFunction",p=oC(d),m=p&&d.negate;if(d.type==="CapturingGroup"&&(o.push(d),d.name&&W5(s,d.name,[]).push(d)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let g=sC(i[t.nextIndex]);for(;g.type!=="GroupClose";){if(g.type==="Alternator")d.body.push(No()),t.nextIndex++;else{const v=d.body.at(-1),x=c(v,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(v.body.push(x),(p||n.isInLookbehind)&&!l){const S="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(rC(x)||x.type==="CapturingGroup")throw new Error(S)}else if(rC(x)||oC(x)&&x.negate)throw new Error(S)}}g=sC(i[t.nextIndex])}return t.nextIndex++,d}function E6({kind:e,min:t,max:n},i){const o=i.parent,s=o.body.at(-1);if(!s||!y6(s))throw new Error("Quantifier requires a repeatable token");const l=yk(e,t,n,s);return o.body.pop(),l}function k6({raw:e},t){const{capturingGroups:n,subroutines:i}=t;let o=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(s){const c=+s.groups.num,d=n.length;if(t.hasNumberedRef=!0,o={"":c,"+":d+c,"-":d+1-c}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const l=vk(o);return i.push(l),l}function T6(e,t){return{type:"AbsenceFunction",kind:e,body:Bl(t?.body)}}function No(e){return{type:"Alternative",body:bk(e?.body)}}function vg(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function bg(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function gk(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!N6(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Bl(t?.body)}}function Kd(e,t){const n={useLastValid:!1,...t};if(e>1114111){const i=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${i}}"`):new Error(`Invalid code point out of range in JS "\\x{${i}}"`)}return{type:"Character",value:e}}function Qc(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:bk(e?.body)}}function A6(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function xg(e,t){const n=!!t?.negate,i={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(i.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(i.variableLength=!0),i}function L6(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ja(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function R6(e){return{type:"Flags",...e}}function Wn(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Bl(e?.body)}}function xo(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Bl(e?.body)}}function O6(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function D6(e,t){const n=!!t?.negate;if(!Ry.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function yk(e,t,n,i){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:i}}function M6(e,t){return{type:"Regex",body:Bl(t?.body),flags:e}}function vk(e){return{type:"Subroutine",ref:e}}function Na(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let i=n.unicodePropertyMap?.get(Qd(e));if(!i){if(n.normalizeUnknownPropertyNames)i=z6(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Dt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:i??e,negate:n.negate}}function I6({flags:e,kind:t,name:n,negate:i,number:o}){switch(t){case"absence_repeater":return T6("repeater");case"atomic":return Wn({atomic:!0});case"capturing":return gk(o,{name:n});case"group":return Wn({flags:e});case"lookahead":case"lookbehind":return xo({behind:t==="lookbehind",negate:i});default:throw new Error(`Unexpected group kind "${t}"`)}}function Bl(e){if(e===void 0)e=[No()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function bk(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function rC(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function oC(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function N6(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function z6(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Qd(e){return e.replace(/[- _]+/g,"").toLowerCase()}function aC(e,t){const n=t;return Ja(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function sC(e){return Ja(e,"Unclosed group")}function ml(e,t,n=null){function i(s,l){for(let c=0;c<s.length;c++){const d=o(s[c],l,c,s);c=Math.max(-1,c+d)}}function o(s,l=null,c=null,d=null){let f=0,p=!1;const m={node:s,parent:l,key:c,container:d,root:e,remove(){wc(d).splice(Math.max(0,Oa(c)+f),1),f--,p=!0},removeAllNextSiblings(){return wc(d).splice(Oa(c)+1)},removeAllPrevSiblings(){const _=Oa(c)+f;return f-=_,wc(d).splice(0,Math.max(0,_))},replaceWith(_,w={}){const k=!!w.traverse;d?d[Math.max(0,Oa(c)+f)]=_:Ja(l,"Can't replace root node")[c]=_,k&&o(_,l,c,d),p=!0},replaceWithMultiple(_,w={}){const k=!!w.traverse;if(wc(d).splice(Math.max(0,Oa(c)+f),1,..._),f+=_.length-1,k){let D=0;for(let M=0;M<_.length;M++)D+=o(_[M],l,Oa(c)+M+D,d)}p=!0},skip(){p=!0}},{type:g}=s,v=t["*"],x=t[g],S=typeof v=="function"?v:v?.enter,C=typeof x=="function"?x:x?.enter;if(S?.(m,n),C?.(m,n),!p)switch(g){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":i(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(s.min,s,"min"),o(s.max,s,"max");break;case"Quantifier":o(s.body,s,"body");break;case"Regex":i(s.body,s),o(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${g}"`)}return x?.exit?.(m,n),v?.exit?.(m,n),f}return o(e),e}function wc(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Oa(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const P6=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function H6(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function j6(e,t,n,i){return e.slice(0,t)+i+e.slice(t+n.length)}const Un=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Dy(e,t,n,i){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let l=0,c="";for(const d of e.matchAll(o)){const{0:f,groups:{$skip:p}}=d;if(!p&&(!i||i===Un.DEFAULT==!l)){n instanceof Function?c+=n(d,{context:l?Un.CHAR_CLASS:Un.DEFAULT,negated:s[s.length-1]}):c+=n;continue}f[0]==="["?(l++,s.push(f[1]==="^")):f==="]"&&l&&(l--,s.pop()),c+=f}return c}function xk(e,t,n,i){Dy(e,t,n,i)}function B6(e,t,n=0,i){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let s=0,l;for(;l=o.exec(e);){const{0:c,groups:{$skip:d}}=l;if(!d&&(!i||i===Un.DEFAULT==!s))return l;c==="["?s++:c==="]"&&s&&s--,o.lastIndex==l.index&&o.lastIndex++}return null}function Ec(e,t,n){return!!B6(e,t,0,n)}function U6(e,t){const n=/\\?./gsu;n.lastIndex=t;let i=e.length,o=0,s=1,l;for(;l=n.exec(e);){const[c]=l;if(c==="[")o++;else if(o)c==="]"&&o--;else if(c==="(")s++;else if(c===")"&&(s--,!s)){i=l.index;break}}return e.slice(t,i)}const lC=new RegExp(String.raw`(?<noncapturingStart>${P6})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function V6(e,t){const n=t?.hiddenCaptures??[];let i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};const o="(?>",s="(?:(?=(",l=[0],c=[];let d=0,f=0,p=NaN,m;do{m=!1;let g=0,v=0,x=!1,S;for(lC.lastIndex=Number.isNaN(p)?0:p+s.length;S=lC.exec(e);){const{0:C,index:_,groups:{capturingStart:w,noncapturingStart:k}}=S;if(C==="[")g++;else if(g)C==="]"&&g--;else if(C===o&&!x)p=_,x=!0;else if(x&&k)v++;else if(w)x?v++:(d++,l.push(d+f));else if(C===")"&&x){if(!v){f++;const D=d+f;if(e=`${e.slice(0,p)}${s}${e.slice(p+o.length,_)}))<$$${D}>)${e.slice(_+1)}`,m=!0,c.push(D),H6(n,D),i.size){const M=new Map;i.forEach((O,z)=>{M.set(z>=D?z+1:z,O.map(j=>j>=D?j+1:j))}),i=M}break}v--}}}while(m);return n.push(...c),e=Dy(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:g,groups:{backrefNum:v,wrappedBackrefNum:x}})=>{if(v){const S=+v;if(S>l.length-1)throw new Error(`Backref "${g}" greater than number of captures`);return`\\${l[S]}`}return`\\${x}`},Un.DEFAULT),{pattern:e,captureTransfers:i,hiddenCaptures:n}}const Sk=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,am=new RegExp(String.raw`
91
+ \\(?: \d+
92
+ | c[A-Za-z]
93
+ | [gk]<[^>]+>
94
+ | [pPu]\{[^\}]+\}
95
+ | u[A-Fa-f\d]{4}
96
+ | x[A-Fa-f\d]{2}
97
+ )
98
+ | \((?: \? (?: [:=!>]
99
+ | <(?:[=!]|[^>]+>)
100
+ | [A-Za-z\-]+:
101
+ | \(DEFINE\)
102
+ ))?
103
+ | (?<qBase>${Sk})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
104
+ | \\?.
105
+ `.replace(/\s+/g,""),"gsu");function F6(e){if(!new RegExp(`${Sk}\\+`).test(e))return{pattern:e};const t=[];let n=null,i=null,o="",s=0,l;for(am.lastIndex=0;l=am.exec(e);){const{0:c,index:d,groups:{qBase:f,qMod:p,invalidQ:m}}=l;if(c==="[")s||(i=d),s++;else if(c==="]")s?s--:i=null;else if(!s)if(p==="+"&&o&&!o.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${c}"`);let g=-1;if(/^\{\d+\}$/.test(f))e=j6(e,d+f.length,p,"");else{if(o===")"||o==="]"){const v=o===")"?n:i;if(v===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,v)}(?>${e.slice(v,d)}${f})${e.slice(d+c.length)}`}else e=`${e.slice(0,d-o.length)}(?>${o}${f})${e.slice(d+c.length)}`;g+=4}am.lastIndex+=g}else c[0]==="("?t.push(d):c===")"&&(n=t.length?t.pop():null);o=c}return{pattern:e}}const jn=String.raw,G6=jn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Sg=jn`\(\?R=(?<rDepth>[^\)]+)\)|${G6}`,Zd=jn`\(\?<(?![=!])(?<captureName>[^>]+)>`,_k=jn`${Zd}|(?<unnamed>\()(?!\?)`,mo=new RegExp(jn`${Zd}|${Sg}|\(\?|\\?.`,"gsu"),sm="Cannot use multiple overlapping recursions";function $6(e,t){const{hiddenCaptures:n,mode:i}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(Sg,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if(i==="plugin"&&Ec(e,jn`\(\?\(DEFINE\)`,Un.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],l=Ec(e,jn`\\[1-9]`,Un.DEFAULT),c=new Map,d=[];let f=!1,p=0,m=0,g;for(mo.lastIndex=0;g=mo.exec(e);){const{0:v,groups:{captureName:x,rDepth:S,gRNameOrNum:C,gRDepth:_}}=g;if(v==="[")p++;else if(p)v==="]"&&p--;else if(S){if(uC(S),f)throw new Error(sm);if(l)throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const w=e.slice(0,g.index),k=e.slice(mo.lastIndex);if(Ec(k,Sg,Un.DEFAULT))throw new Error(sm);const D=+S-1;e=cC(w,k,D,!1,n,s,m),o=fC(o,w,D,s.length,0,m);break}else if(C){uC(_);let w=!1;for(const U of d)if(U.name===C||U.num===+C){if(w=!0,U.hasRecursedWithin)throw new Error(sm);break}if(!w)throw new Error(jn`Recursive \g cannot be used outside the referenced group "${i==="external"?C:jn`\g<${C}&R=${_}>`}"`);const k=c.get(C),D=U6(e,k);if(l&&Ec(D,jn`${Zd}|\((?!\?)`,Un.DEFAULT))throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const M=e.slice(k,g.index),O=D.slice(M.length+v.length),z=s.length,j=+_-1,F=cC(M,O,j,!0,n,s,m);o=fC(o,M,j,s.length-z,z,m);const ee=e.slice(0,k),q=e.slice(k+D.length);e=`${ee}${F}${q}`,mo.lastIndex+=F.length-v.length-M.length-O.length,d.forEach(U=>U.hasRecursedWithin=!0),f=!0}else if(x)m++,c.set(String(m),mo.lastIndex),c.set(x,mo.lastIndex),d.push({num:m,name:x});else if(v[0]==="("){const w=v==="(";w&&(m++,c.set(String(m),mo.lastIndex)),d.push(w?{num:m}:{})}else v===")"&&d.pop()}return n.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:n}}function uC(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function cC(e,t,n,i,o,s,l){const c=new Set;i&&xk(e+t,Zd,({groups:{captureName:f}})=>{c.add(f)},Un.DEFAULT);const d=[n,i?c:null,o,s,l];return`${e}${dC(`(?:${e}`,"forward",...d)}(?:)${dC(`${t})`,"backward",...d)}${t}`}function dC(e,t,n,i,o,s,l){const d=p=>t==="forward"?p+2:n-p+2-1;let f="";for(let p=0;p<n;p++){const m=d(p);f+=Dy(e,jn`${_k}|\\k<(?<backref>[^>]+)>`,({0:g,groups:{captureName:v,unnamed:x,backref:S}})=>{if(S&&i&&!i.has(S))return g;const C=`_$${m}`;if(x||v){const _=l+s.length+1;return s.push(_),q6(o,_),x?g:`(?<${v}${C}>`}return jn`\k<${S}${C}>`},Un.DEFAULT)}return f}function q6(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function fC(e,t,n,i,o,s){if(e.size&&i){let l=0;xk(t,_k,()=>l++,Un.DEFAULT);const c=s-l+o,d=new Map;return e.forEach((f,p)=>{const m=(i-l*n)/n,g=l*n,v=p>c+l?p+i:p,x=[];for(const S of f)if(S<=c)x.push(S);else if(S>c+l+m)x.push(S+i);else if(S<=c+l)for(let C=0;C<=n;C++)x.push(S+l*C);else for(let C=0;C<=n;C++)x.push(S+g+m*C);d.set(v,x)}),d}return e}var kt=String.fromCodePoint,ke=String.raw,Qn={},Jd=globalThis.RegExp;Qn.flagGroups=(()=>{try{new Jd("(?i:)")}catch{return!1}return!0})();Qn.unicodeSets=(()=>{try{new Jd("[[]]","v")}catch{return!1}return!0})();Qn.bugFlagVLiteralHyphenIsRange=Qn.unicodeSets?(()=>{try{new Jd(ke`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Qn.bugNestedClassIgnoresNegation=Qn.unicodeSets&&new Jd("[[^a]]","v").test("a");function Cd(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function wl(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function _g(e,t){return hC[e]>=hC[t]}function W6(e,t){if(e==null)throw new Error(t??"Value expected");return e}var hC={ES2025:2025,ES2024:2024,ES2018:2018},Y6={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function Ck(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Y6[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Qn.flagGroups?"ES2025":Qn.unicodeSets?"ES2024":"ES2018"),t}var X6="[ -\r ]",K6=new Set([kt(304),kt(305)]),qi=ke`[\p{L}\p{M}\p{N}\p{Pc}]`;function wk(e){if(K6.has(e))return[e];const t=new Set,n=e.toLowerCase(),i=n.toUpperCase(),o=J6.get(n),s=Q6.get(n),l=Z6.get(n);return[...i].length===1&&t.add(i),l&&t.add(l),o&&t.add(o),t.add(n),s&&t.add(s),[...t]}var My=new Map(`C Other
106
+ Cc Control cntrl
107
+ Cf Format
108
+ Cn Unassigned
109
+ Co Private_Use
110
+ Cs Surrogate
111
+ L Letter
112
+ LC Cased_Letter
113
+ Ll Lowercase_Letter
114
+ Lm Modifier_Letter
115
+ Lo Other_Letter
116
+ Lt Titlecase_Letter
117
+ Lu Uppercase_Letter
118
+ M Mark Combining_Mark
119
+ Mc Spacing_Mark
120
+ Me Enclosing_Mark
121
+ Mn Nonspacing_Mark
122
+ N Number
123
+ Nd Decimal_Number digit
124
+ Nl Letter_Number
125
+ No Other_Number
126
+ P Punctuation punct
127
+ Pc Connector_Punctuation
128
+ Pd Dash_Punctuation
129
+ Pe Close_Punctuation
130
+ Pf Final_Punctuation
131
+ Pi Initial_Punctuation
132
+ Po Other_Punctuation
133
+ Ps Open_Punctuation
134
+ S Symbol
135
+ Sc Currency_Symbol
136
+ Sk Modifier_Symbol
137
+ Sm Math_Symbol
138
+ So Other_Symbol
139
+ Z Separator
140
+ Zl Line_Separator
141
+ Zp Paragraph_Separator
142
+ Zs Space_Separator
143
+ ASCII
144
+ ASCII_Hex_Digit AHex
145
+ Alphabetic Alpha
146
+ Any
147
+ Assigned
148
+ Bidi_Control Bidi_C
149
+ Bidi_Mirrored Bidi_M
150
+ Case_Ignorable CI
151
+ Cased
152
+ Changes_When_Casefolded CWCF
153
+ Changes_When_Casemapped CWCM
154
+ Changes_When_Lowercased CWL
155
+ Changes_When_NFKC_Casefolded CWKCF
156
+ Changes_When_Titlecased CWT
157
+ Changes_When_Uppercased CWU
158
+ Dash
159
+ Default_Ignorable_Code_Point DI
160
+ Deprecated Dep
161
+ Diacritic Dia
162
+ Emoji
163
+ Emoji_Component EComp
164
+ Emoji_Modifier EMod
165
+ Emoji_Modifier_Base EBase
166
+ Emoji_Presentation EPres
167
+ Extended_Pictographic ExtPict
168
+ Extender Ext
169
+ Grapheme_Base Gr_Base
170
+ Grapheme_Extend Gr_Ext
171
+ Hex_Digit Hex
172
+ IDS_Binary_Operator IDSB
173
+ IDS_Trinary_Operator IDST
174
+ ID_Continue IDC
175
+ ID_Start IDS
176
+ Ideographic Ideo
177
+ Join_Control Join_C
178
+ Logical_Order_Exception LOE
179
+ Lowercase Lower
180
+ Math
181
+ Noncharacter_Code_Point NChar
182
+ Pattern_Syntax Pat_Syn
183
+ Pattern_White_Space Pat_WS
184
+ Quotation_Mark QMark
185
+ Radical
186
+ Regional_Indicator RI
187
+ Sentence_Terminal STerm
188
+ Soft_Dotted SD
189
+ Terminal_Punctuation Term
190
+ Unified_Ideograph UIdeo
191
+ Uppercase Upper
192
+ Variation_Selector VS
193
+ White_Space space
194
+ XID_Continue XIDC
195
+ XID_Start XIDS`.split(/\s/).map(e=>[Qd(e),e])),Q6=new Map([["s",kt(383)],[kt(383),"s"]]),Z6=new Map([[kt(223),kt(7838)],[kt(107),kt(8490)],[kt(229),kt(8491)],[kt(969),kt(8486)]]),J6=new Map([Hr(453),Hr(456),Hr(459),Hr(498),...lm(8072,8079),...lm(8088,8095),...lm(8104,8111),Hr(8124),Hr(8140),Hr(8188)]),e3=new Map([["alnum",ke`[\p{Alpha}\p{Nd}]`],["alpha",ke`\p{Alpha}`],["ascii",ke`\p{ASCII}`],["blank",ke`[\p{Zs}\t]`],["cntrl",ke`\p{Cc}`],["digit",ke`\p{Nd}`],["graph",ke`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ke`\p{Lower}`],["print",ke`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ke`[\p{P}\p{S}]`],["space",ke`\p{space}`],["upper",ke`\p{Upper}`],["word",ke`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ke`\p{AHex}`]]);function t3(e,t){const n=[];for(let i=e;i<=t;i++)n.push(i);return n}function Hr(e){const t=kt(e);return[t.toLowerCase(),t]}function lm(e,t){return t3(e,t).map(n=>Hr(n))}var Ek=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function n3(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};kk(e);const i={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:_g(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};ml(e,i3,i);const o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:i.subroutineRefMap};ml(e,r3,s);const l={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return ml(e,o3,l),e._originMap=s.groupOriginByCopy,e._strategy=i.strategy,e}var i3={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:i,kind:o}=e;if(o==="repeater"){const s=Wn();s.body[0].body.push(xo({negate:!0,body:i}),Na("Any"));const l=Wn();l.body[0].body.push(yk("greedy",0,1/0,s)),n(pt(l,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:i}){const o=e.body.filter(s=>s.kind==="flags");for(let s=n+1;s<t.body.length;s++){const l=t.body[s];wl(i,l,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=Ak(t.get(e));if(n){const i=Wn({flags:n});i.body[0].body=e.body,e.body=[pt(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:i,root:o,remove:s,replaceWith:l},c){const{kind:d,negate:f}=e,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:g,wordIsAscii:v}=c;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(d==="line_end")l(pt(xo({body:[No({body:[vg("string_end")]}),No({body:[Kd(10)]})]}),t));else if(d==="line_start")l(pt(Wi(ke`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(d==="search_start")if(g.has(e))o.flags.sticky=!0,s();else{const x=i[n-1];if(x&&d3(x))l(pt(xo({negate:!0}),t));else{if(m)throw new Error(ke`Uses "\G" in a way that requires a subclass`);l(jr(vg("string_start"),t)),c.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")l(pt(Wi(ke`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!v&&!p){const x=`(?:(?<=${qi})(?!${qi})|(?<!${qi})(?=${qi}))`,S=`(?:(?<=${qi})(?=${qi})|(?<!${qi})(?!${qi}))`;l(pt(Wi(f?S:x),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!cm(n)&&(n=um(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:i}=e;i&&!cm(i)&&(i=um(i,t),e.name=i),n.set(e.number,e),i&&n.set(i,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const i=Qc({body:[e]});n(pt(i,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:i,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:l,wordIsAscii:c}){const{kind:d,negate:f,value:p}=e;if(s&&(d==="digit"||p==="digit")){n(jr(xg("digit",{negate:f}),t));return}if(l&&(d==="space"||p==="space")){n(pt(dm(Wi(X6),f),t));return}if(c&&(d==="word"||p==="word")){n(jr(xg("word",{negate:f}),t));return}if(d==="any")n(jr(Na("Any"),t));else if(d==="digit")n(jr(Na("Nd",{negate:f}),t));else if(d!=="dot")if(d==="text_segment"){if(i==="strict")throw new Error(ke`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",g=ke`\p{RI}{2}|${m}(?:\u200D${m})*`;n(pt(Wi(ke`(?>\r\n|${o?ke`\p{RGI_Emoji}`:g}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")n(jr(Na("AHex",{negate:f}),t));else if(d==="newline")n(pt(Wi(f?`[^
196
+ ]`:`(?>\r
197
+ ?|[
198
+ \v\f…\u2028\u2029])`),t));else if(d==="posix")if(!o&&(p==="graph"||p==="print")){if(i==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];f&&(m=`\0-${kt(m.codePointAt(0)-1)}${kt(m.codePointAt(2)+1)}-􏿿`),n(pt(Wi(`[${m}]`),t))}else n(pt(dm(Wi(e3.get(p)),f),t));else if(d==="property")My.has(Qd(p))||(e.key="sc");else if(d==="space")n(jr(Na("space",{negate:f}),t));else if(d==="word")n(pt(dm(Wi(qi),f),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,root:n,remove:i,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:l}){const{kind:c,flags:d}=e;if(c==="flags")if(!d.enable&&!d.disable)i();else{const f=Wn({flags:d});f.body[0].body=l(),o(pt(f,t),{traverse:!0})}else if(c==="keep"){const f=n.body[0],m=n.body.length===1&&pk(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(ke`Uses "\K" in a way that's unsupported`);const g=xo({behind:!0});g.body[0].body=s(),o(pt(g,t))}else throw new Error(`Unexpected directive kind "${c}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:i}=e;if(i==="fail")n(pt(xo({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${i.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Wn();t.body[0].body.push(e.body),e.body=pt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let i=!1,o=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const l=Rk(s.body);l?(i=!0,Array.isArray(l)?n.push(...l):n.push(l)):o=!0}i&&!o&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:i}){if(t==="strict"&&n&&i)throw new Error(ke`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!cm(n)&&(n=um(n,t),e.ref=n)}},r3={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:i,ref:o}=e;i||n.set(e,[...t.get(o).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:i},{groupOriginByCopy:o,groupsByName:s,multiplexCapturesToLeftByRef:l,openRefs:c,reffedNodesByReferencer:d}){const f=o.get(e);if(f&&c.has(e.number)){const m=jr(pC(e.number),t);d.set(m,c.get(e.number)),n(m);return}c.set(e.number,e),l.set(e.number,[]),e.name&&wl(l,e.name,[]);const p=l.get(e.name??e.number);for(let m=0;m<p.length;m++){const g=p[m];if(f===g.node||f&&f===g.origin||e===g.origin){p.splice(m,1);break}}if(l.get(e.number).push({node:e,origin:f}),e.name&&l.get(e.name).push({node:e,origin:f}),e.name){const m=wl(s,e.name,new Map);let g=!1;if(f)g=!0;else for(const v of m.values())if(!v.hasDuplicateNameToRemove){g=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:g})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Cd(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},i){const{isRecursive:o,ref:s}=e;if(o){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===s||p.number===s)););i.reffedNodesByReferencer.set(e,p);return}const l=i.subroutineRefMap.get(s),c=s===0,d=c?pC(0):Tk(l,i.groupOriginByCopy,null);let f=d;if(!c){const p=Ak(l3(l,g=>g.type==="Group"&&!!g.flags)),m=p?Cd(i.globalFlags,p):i.globalFlags;a3(m,i.currentFlags)||(f=Wn({flags:u3(m)}),f.body[0].body.push(d))}n(pt(f,t),{traverse:!c})}},o3={Backreference({node:e,parent:t,replaceWith:n},i){if(e.orphan){i.highestOrphanBackref=Math.max(i.highestOrphanBackref,e.ref);return}const s=i.reffedNodesByReferencer.get(e).filter(l=>s3(l,e));if(!s.length)n(pt(xo({negate:!0}),t));else if(s.length>1){const l=Wn({atomic:!0,body:s.reverse().map(c=>No({body:[bg(c.number)]}))});n(pt(l,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let i=0;i<n;i++){const o=gk();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function kk(e){ml(e,{"*"({node:t,parent:n}){t.parent=n}})}function a3(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function s3(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const i=Lk(n.parent);for(const o of i){if(o===n)break;if(o===e||Ok(o,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function Tk(e,t,n,i){const o=Array.isArray(e)?[]:{};for(const[s,l]of Object.entries(e))s==="parent"?o.parent=Array.isArray(n)?i:n:l&&typeof l=="object"?o[s]=Tk(l,t,o,n):(s==="type"&&l==="CapturingGroup"&&t.set(o,t.get(e)??e),o[s]=l);return o}function pC(e){const t=vk(e);return t.isRecursive=!0,t}function l3(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function um(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function Ak(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:i})=>{t.forEach(o=>{i.enable?.[o]&&(delete n.disable[o],n.enable[o]=!0),i.disable?.[o]&&(n.disable[o]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function u3({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Lk(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Rk(e){const t=e.find(n=>n.kind==="search_start"||f3(n,{negate:!1})||!c3(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const i of t.body){const o=Rk(i.body);if(!o)return null;Array.isArray(o)?n.push(...o):n.push(o)}return n}return null}function Ok(e,t){const n=Lk(e)??[];for(const i of n)if(i===t||Ok(i,t))return!0;return!1}function c3({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function d3(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function f3(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&pk(e.body[0],{type:"Assertion",kind:"search_start"})}function cm(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Wi(e,t){const i=mk(e,{...t,unicodePropertyMap:My}).body;return i.length>1||i[0].body.length>1?Wn({body:i}):i[0].body[0]}function dm(e,t){return e.negate=t,e}function jr(e,t){return e.parent=t,e}function pt(e,t){return kk(e),e.parent=t,e}function h3(e,t){const n=Ck(t),i=_g(n.target,"ES2024"),o=_g(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,c=null;if(!o){const v=[e.flags.ignoreCase];ml(e,p3,{getCurrentModI:()=>v.at(-1),popModI(){v.pop()},pushModI(x){v.push(x)},setHasCasedChar(){v.at(-1)?l=!0:c=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!c)};let f=e;const p={accuracy:n.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:f,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&l&&c),useFlagMods:o,useFlagV:i,verbose:n.verbose};function m(v){return p.lastNode=f,f=v,W6(m3[v.type],`Unexpected node type "${v.type}"`)(v,p,m)}const g={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return i||(delete g.options.force.v,g.options.disable.v=!0,g.options.unicodeSetsPlugin=null),g._captureTransfers=new Map,g._hiddenCaptures=[],p.captureMap.forEach((v,x)=>{v.hidden&&g._hiddenCaptures.push(x),v.transferTo&&wl(g._captureTransfers,v.transferTo,[]).push(x)}),g}var p3={"*":{enter({node:e},t){if(gC(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Cd({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){gC(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Iy(kt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Dk(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&Ek.has(e.value)&&t.setHasCasedChar()}},m3={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?ke`\B`:ke`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:i,name:o,number:s}=e,l={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(l.hidden=!0,s>c.number&&(l.transferTo=c.number)),t.captureMap.set(s,l),`(${o?`?<${o}>`:""}${i.map(n).join("|")})`},Character({value:e},t){const n=kt(e),i=Da(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(i!==n)return i;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Iy(n)){const o=wk(n);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return n},CharacterClass(e,t,n){const{kind:i,negate:o,parent:s}=e;let{body:l}=e;if(i==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Qn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&l.some(yC)&&(l=[Kd(45),...l.filter(f=>!yC(f))]);const c=()=>`[${o?"^":""}${l.map(n).join(i==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Qn.bugNestedClassIgnoresNegation)&&!o){const p=l.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=Wn(),g=m.body[0];return m.parent=s,g.parent=m,l=l.filter(v=>!p.includes(v)),e.body=l,l.length?(e.parent=g,g.body.push(e)):m.body.pop(),p.forEach(v=>{const x=No({body:[v]});v.parent=x,x.parent=m,m.body.push(x)}),n(m)}}t.inCharClass=!0;const f=c();return t.inCharClass=!1,f}const d=l[0];if(i==="union"&&!o&&d&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(Qn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&l.length===1&&d.type!=="CharacterClassRange"))return l.map(n).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,i=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=Da(n,o),l=Da(i,o),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=Dk(e);x3(d).forEach(p=>{c.add(Array.isArray(p)?`${Da(p[0],o)}-${Da(p[1],o)}`:Da(p,o))})}return`${s}-${l}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:i},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":ke`[^\n]`;if(e==="digit")return t?ke`\D`:ke`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&Ek.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?ke`\P`:ke`\p`}{${i?`${i}=`:""}${n}}`}if(e==="word")return t?ke`\W`:ke`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:i},o,s){const l=o.currentFlags;n&&(o.currentFlags=Cd(l,n));const c=t.map(s).join("|"),d=!o.verbose&&t.length===1&&i.type!=="Quantifier"&&!e&&(!o.useFlagMods||!n)?c:`(?${S3(e,n,o.useFlagMods)}${c})`;return o.currentFlags=l,d},LookaroundAssertion({body:e,kind:t,negate:n},i,o){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,n){return n(e.body)+_3(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const i=n.recursionLimit;return t===0?`(?R=${i})`:ke`\g<${t}&R=${i}>`}},g3=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),y3=new Set(["-","\\","]","^","["]),v3=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),mC=new Map([[9,ke`\t`],[10,ke`\n`],[11,ke`\v`],[12,ke`\f`],[13,ke`\r`],[8232,ke`\u2028`],[8233,ke`\u2029`],[65279,ke`\uFEFF`]]),b3=new RegExp("^\\p{Cased}$","u");function Iy(e){return b3.test(e)}function Dk(e,t){const n=!!t?.firstOnly,i=e.min.value,o=e.max.value,s=[];if(i<65&&(o===65535||o>=131071)||i===65536&&o>=131071)return s;for(let l=i;l<=o;l++){const c=kt(l);if(!Iy(c))continue;const d=wk(c).filter(f=>{const p=f.codePointAt(0);return p<i||p>o});if(d.length&&(s.push(...d),n))break}return s}function Da(e,{escDigit:t,inCharClass:n,useFlagV:i}){if(mC.has(e))return mC.get(e);if(e<32||e>126&&e<160||e>262143||t&&C3(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=n?i?v3:y3:g3,s=kt(e);return(o.has(s)?"\\":"")+s}function x3(e){const t=e.map(o=>o.codePointAt(0)).sort((o,s)=>o-s),n=[];let i=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?i??=t[o]:i===null?n.push(t[o]):(n.push([i,t[o]]),i=null);return n}function S3(e,t,n){if(e)return">";let i="";if(t&&n){const{enable:o,disable:s}=t;i=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${i}:`}function _3({kind:e,max:t,min:n}){let i;return!n&&t===1?i="?":!n&&t===1/0?i="*":n===1&&t===1/0?i="+":n===t?i=`{${n}}`:i=`{${n},${t===1/0?"":t}}`,i+{greedy:"",lazy:"?",possessive:"+"}[e]}function gC({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function C3(e){return e>47&&e<58}function yC({type:e,value:t}){return e==="Character"&&t===45}var w3=class Cg extends RegExp{#e=new Map;#t=null;#i;#n=null;#r=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(t,n,i){const o=!!i?.lazyCompile;if(t instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,n),this.#i=s.source,s instanceof Cg&&(this.#e=s.#e,this.#n=s.#n,this.#r=s.#r,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...i};super(o?"":t,n),this.#i=t,this.#e=k3(s.hiddenCaptures,s.transfers),this.#r=s.strategy,this.rawOptions=i??{}}o||(this.#t=this)}exec(t){if(!this.#t){const{lazyCompile:o,...s}=this.rawOptions;this.#t=new Cg(this.#i,this.flags,s)}const n=this.global||this.sticky,i=this.lastIndex;if(this.#r==="clip_search"&&n&&i){this.lastIndex=0;const o=this.#o(t.slice(i));return o&&(E3(o,i,t,this.hasIndices),this.lastIndex+=i),o}return this.#o(t)}#o(t){this.#t.lastIndex=this.lastIndex;const n=super.exec.call(this.#t,t);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;const i=[...n];n.length=1;let o;this.hasIndices&&(o=[...n.indices],n.indices.length=1);const s=[0];for(let l=1;l<i.length;l++){const{hidden:c,transferTo:d}=this.#e.get(l)??{};if(c?s.push(null):(s.push(n.length),n.push(i[l]),this.hasIndices&&n.indices.push(o[l])),d&&i[l]!==void 0){const f=s[d];if(!f)throw new Error(`Invalid capture transfer to "${f}"`);if(n[f]=i[l],this.hasIndices&&(n.indices[f]=o[l]),n.groups){this.#n||(this.#n=T3(this.source));const p=this.#n.get(d);p&&(n.groups[p]=i[l],this.hasIndices&&(n.indices.groups[p]=o[l]))}}}return n}};function E3(e,t,n,i){if(e.index+=t,e.input=n,i){const o=e.indices;for(let l=0;l<o.length;l++){const c=o[l];c&&(o[l]=[c[0]+t,c[1]+t])}const s=o.groups;s&&Object.keys(s).forEach(l=>{const c=s[l];c&&(s[l]=[c[0]+t,c[1]+t])})}}function k3(e,t){const n=new Map;for(const i of e)n.set(i,{hidden:!0});for(const[i,o]of t)for(const s of o)wl(n,s,{}).transferTo=i;return n}function T3(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let i=0,o=0,s;for(;s=t.exec(e);){const{0:l,groups:{capture:c,name:d}}=s;l==="["?i++:i?l==="]"&&i--:c&&(o++,d&&n.set(o,d))}return n}function A3(e,t){const n=L3(e,t);return n.options?new w3(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function L3(e,t){const n=Ck(t),i=mk(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:My}),o=n3(i,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=h3(o,n),l=$6(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),c=F6(l.pattern),d=V6(c.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),f={pattern:d.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=d.hiddenCaptures.sort((x,S)=>x-S),m=Array.from(d.captureTransfers),g=o._strategy,v=f.pattern.length>=n.lazyCompileLength;(p.length||m.length||g||v)&&(f.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...g&&{strategy:g},...v&&{lazyCompile:v}})}return f}function R3(e,t){return A3(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function O3(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>R3(n,{target:t.target}),{createScanner(n){return new q5(n,t)},createString(n){return{content:n}}}}async function Mk(e){if(AE())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Jp.get(e);if(t!=null)return t;try{let n=zH.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(lg,e)&&(n=lg[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:o})=>{const s={name:e,data:o};return Io.has(e)||Io.set(e,s),s});return Jp.set(e,i),await i}finally{Jp.delete(e)}}function Ik(e){return Io.get(e)??Mk(e)}const wg=new Set;function El(e){const t=[],n=new Set;for(const m of D3(e.themes)){const g=Nk(m)?m.getThemes():[m];for(const v of g){if(n.has(v.name))throw new Error(`Theme collection already contains theme "${v.name}"`);n.add(v.name),t.push(v)}}const i=Object.freeze([...t]),o=Object.freeze(i.filter(m=>m.colorScheme==="light")),s=Object.freeze(i.filter(m=>m.colorScheme==="dark")),l=new Map(i.map(m=>[m.name,m])),c=Object.freeze(i.map(m=>m.name)),d=Object.freeze(o.map(m=>m.name)),f=Object.freeze(s.map(m=>m.name));function p(m){if(m==null)return i;const{colorScheme:g,collection:v}=m;return v==null?g==="light"?o:g==="dark"?s:i:i.filter(x=>x.collection!==v?!1:g==null||x.colorScheme===g)}return{getTheme(m){return l.get(m)},getThemes(m){return p(m)},getThemeNames(m){return m?.collection==null?m?.colorScheme==="light"?d:m?.colorScheme==="dark"?f:c:p(m).map(g=>g.name)},hasTheme(m){return l.has(m)},orderBy(m){return El({themes:i.map((g,v)=>({descriptor:g,index:v})).sort((g,v)=>{const x=m(g.descriptor,v.descriptor);return x!==0?x:g.index-v.index}).map(g=>g.descriptor)})},pick(m){const g=[],v=new Set;for(const x of m){if(v.has(x))throw new Error(`Theme collection pick already includes theme "${x}"`);v.add(x);const S=l.get(x);if(S==null)throw new Error(`Theme collection does not contain theme "${x}"`);g.push(S)}return El({themes:g})},registerInto(m){for(const g of i)m.registerThemeIfAbsent(g.name,g.load)}}}function D3(e){return M3(e)?[e]:e}function M3(e){return Nk(e)||I3(e)}function I3(e){return typeof e.name=="string"&&typeof e.load=="function"}function Nk(e){return typeof e.getThemes=="function"}function zk(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var N3=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},z3=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},P3=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function H3(){const e=new Map,t=new Map,n=new Map;let i=0;function o(_,w){if(e.has(_))throw new N3(_);e.set(_,w)}function s(_,w){return e.has(_)?!1:(e.set(_,w),!0)}function l(_){return e.has(_)}function c(_){const w=t.get(_);if(w!==void 0)return Promise.resolve(w);const k=n.get(_);if(k!==void 0)return k;const D=e.get(_);if(D===void 0)return Promise.reject(new z3(_));const M=i,O=D().then(z=>{const j=zk(z);return M===i&&t.set(_,j),n.get(_)===O&&n.delete(_),j}).catch(z=>{throw n.get(_)===O&&n.delete(_),z});return n.set(_,O),O}function d(_){return Promise.all(_.map(w=>c(w)))}function f(_,w){t.set(_,w)}function p(_){for(const[w,k]of _)f(w,k)}function m(_){return t.get(_)}function g(_){const w=[];for(const k of _){const D=t.get(k);if(D===void 0)throw new P3(k);w.push(D)}return w}function v(_){return t.has(_)}function x(_){for(const w of _)if(!t.has(w))return!1;return!0}function S(_){const w=t.get(_);return w!==void 0?w:c(_)}function C(){i++,t.clear(),n.clear()}return{clearResolvedThemes:C,getResolvedOrResolveTheme:S,getResolvedTheme:m,getResolvedThemes:g,hasRegisteredTheme:l,hasResolvedTheme:v,hasResolvedThemes:x,registerTheme:o,registerThemeIfAbsent:s,resolveTheme:c,resolveThemes:d,seedResolvedTheme:f,seedResolvedThemes:p}}const Zn=H3();function Eg(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=Zn.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,Zn.getResolvedTheme(n)==null&&Zn.seedResolvedTheme(n,i);wg.has(n)||(wg.add(n),t.loadThemeSync(i))}}function Pk({name:e,load:t,colorScheme:n,collection:i,displayName:o}){return{name:e,colorScheme:n,collection:i,displayName:o,load:j3(t)}}function j3(e){return async()=>Wd(zk(await e()))}const B3="pierre",U3=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],Hk=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],V3=[...Hk,...U3],F3=new Set(Hk);function G3(e){return F3.has(e)?"light":"dark"}const $3={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},q3={"pierre-dark":()=>T(()=>import("./pierre-dark-CyvmCCZW.js"),[],import.meta.url),"pierre-dark-soft":()=>T(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[],import.meta.url),"pierre-dark-vibrant":()=>T(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[],import.meta.url),"pierre-dark-protanopia-deuteranopia":()=>T(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[],import.meta.url),"pierre-dark-tritanopia":()=>T(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[],import.meta.url),"pierre-light":()=>T(()=>import("./pierre-light-480U9XYS.js"),[],import.meta.url),"pierre-light-soft":()=>T(()=>import("./pierre-light-soft-CVdyfjmI.js"),[],import.meta.url),"pierre-light-vibrant":()=>T(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[],import.meta.url),"pierre-light-protanopia-deuteranopia":()=>T(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[],import.meta.url),"pierre-light-tritanopia":()=>T(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[],import.meta.url)};function W3(e){return Pk({name:e,collection:B3,colorScheme:G3(e),displayName:$3[e],load:q3[e]})}const jk=El({themes:V3.map(e=>W3(e))}),Y3="shiki",Bk=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],X3=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],K3=new Set(Bk);function Q3(e){return K3.has(e)?"light":"dark"}const Z3={andromeeda:()=>T(()=>import("./andromeeda-C4gqWexZ.js"),[],import.meta.url),"aurora-x":()=>T(()=>import("./aurora-x-D-2ljcwZ.js"),[],import.meta.url),"ayu-dark":()=>T(()=>import("./ayu-dark-DYE7WIF3.js"),[],import.meta.url),"ayu-light":()=>T(()=>import("./ayu-light-BA47KaF1.js"),[],import.meta.url),"ayu-mirage":()=>T(()=>import("./ayu-mirage-32ctXXKs.js"),[],import.meta.url),"catppuccin-frappe":()=>T(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[],import.meta.url),"catppuccin-latte":()=>T(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[],import.meta.url),"catppuccin-macchiato":()=>T(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[],import.meta.url),"catppuccin-mocha":()=>T(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[],import.meta.url),"dark-plus":()=>T(()=>import("./dark-plus-C3mMm8J8.js"),[],import.meta.url),dracula:()=>T(()=>import("./dracula-BzJJZx-M.js"),[],import.meta.url),"dracula-soft":()=>T(()=>import("./dracula-soft-BXkSAIEj.js"),[],import.meta.url),"everforest-dark":()=>T(()=>import("./everforest-dark-BgDCqdQA.js"),[],import.meta.url),"everforest-light":()=>T(()=>import("./everforest-light-C8M2exoo.js"),[],import.meta.url),"github-dark":()=>T(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url),"github-dark-default":()=>T(()=>import("./github-dark-default-Cuk6v7N8.js"),[],import.meta.url),"github-dark-dimmed":()=>T(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[],import.meta.url),"github-dark-high-contrast":()=>T(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[],import.meta.url),"github-light":()=>T(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url),"github-light-default":()=>T(()=>import("./github-light-default-D7oLnXFd.js"),[],import.meta.url),"github-light-high-contrast":()=>T(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[],import.meta.url),"gruvbox-dark-hard":()=>T(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[],import.meta.url),"gruvbox-dark-medium":()=>T(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[],import.meta.url),"gruvbox-dark-soft":()=>T(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[],import.meta.url),"gruvbox-light-hard":()=>T(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[],import.meta.url),"gruvbox-light-medium":()=>T(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[],import.meta.url),"gruvbox-light-soft":()=>T(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[],import.meta.url),horizon:()=>T(()=>import("./horizon-BUw7H-hv.js"),[],import.meta.url),"horizon-bright":()=>T(()=>import("./horizon-bright-CUuTKBJd.js"),[],import.meta.url),houston:()=>T(()=>import("./houston-DnULxvSX.js"),[],import.meta.url),"kanagawa-dragon":()=>T(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[],import.meta.url),"kanagawa-lotus":()=>T(()=>import("./kanagawa-lotus-C3DzagqV.js"),[],import.meta.url),"kanagawa-wave":()=>T(()=>import("./kanagawa-wave-DFGoQZhC.js"),[],import.meta.url),laserwave:()=>T(()=>import("./laserwave-DUszq2jm.js"),[],import.meta.url),"light-plus":()=>T(()=>import("./light-plus-B7mTdjB0.js"),[],import.meta.url),"material-theme":()=>T(()=>import("./material-theme-D5KoaKCx.js"),[],import.meta.url),"material-theme-darker":()=>T(()=>import("./material-theme-darker-BfHTSMKl.js"),[],import.meta.url),"material-theme-lighter":()=>T(()=>import("./material-theme-lighter-B0m2ddpp.js"),[],import.meta.url),"material-theme-ocean":()=>T(()=>import("./material-theme-ocean-CyktbL80.js"),[],import.meta.url),"material-theme-palenight":()=>T(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[],import.meta.url),"min-dark":()=>T(()=>import("./min-dark-CafNBF8u.js"),[],import.meta.url),"min-light":()=>T(()=>import("./min-light-CTRr51gU.js"),[],import.meta.url),monokai:()=>T(()=>import("./monokai-BRVnQi9A.js"),[],import.meta.url),"night-owl":()=>T(()=>import("./night-owl-C39BiMTA.js"),[],import.meta.url),"night-owl-light":()=>T(()=>import("./night-owl-light-CMTm3GFP.js"),[],import.meta.url),nord:()=>T(()=>import("./nord-Ddv68eIx.js"),[],import.meta.url),"one-dark-pro":()=>T(()=>import("./one-dark-pro-DVMEJ2y_.js"),[],import.meta.url),"one-light":()=>T(()=>import("./one-light-C3Wv6jpd.js"),[],import.meta.url),plastic:()=>T(()=>import("./plastic-3e1v2bzS.js"),[],import.meta.url),poimandres:()=>T(()=>import("./poimandres-CS3Unz2-.js"),[],import.meta.url),red:()=>T(()=>import("./red-hvxz__6c.js"),[],import.meta.url),"rose-pine":()=>T(()=>import("./rose-pine-5qJOZa0Y.js"),[],import.meta.url),"rose-pine-dawn":()=>T(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[],import.meta.url),"rose-pine-moon":()=>T(()=>import("./rose-pine-moon-C9pEdX9L.js"),[],import.meta.url),"slack-dark":()=>T(()=>import("./slack-dark-BthQWCQV.js"),[],import.meta.url),"slack-ochin":()=>T(()=>import("./slack-ochin-DqwNpetd.js"),[],import.meta.url),"snazzy-light":()=>T(()=>import("./snazzy-light-Bw305WKR.js"),[],import.meta.url),"solarized-dark":()=>T(()=>import("./solarized-dark-CpvCGNkr.js"),[],import.meta.url),"solarized-light":()=>T(()=>import("./solarized-light-Dlz6yCKv.js"),[],import.meta.url),"synthwave-84":()=>T(()=>import("./synthwave-84-CbfX1IO0.js"),[],import.meta.url),"tokyo-night":()=>T(()=>import("./tokyo-night-hegEt444.js"),[],import.meta.url),vesper:()=>T(()=>import("./vesper-DRje8inN.js"),[],import.meta.url),"vitesse-black":()=>T(()=>import("./vitesse-black-Bkuqu6BP.js"),[],import.meta.url),"vitesse-dark":()=>T(()=>import("./vitesse-dark-D0r3Knsf.js"),[],import.meta.url),"vitesse-light":()=>T(()=>import("./vitesse-light-CVO1_9PV.js"),[],import.meta.url)};function vC(e){return Pk({name:e,collection:Y3,colorScheme:Q3(e),load:Z3[e]})}const Uk=El({themes:Object.freeze([...Bk.map(e=>vC(e)),...X3.map(e=>vC(e))])});El({themes:[jk,Uk]});function Vk(e){if(AE())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(Zn.hasRegisteredTheme(e))return;const t=Uk.getTheme(e);if(t!=null){Zn.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function Fk(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function J3(e){Vk(e);const t=await Zn.resolveTheme(e);return Fk(e,t),t}function ej(e){return Zn.getResolvedTheme(e)??J3(e)}let hi;async function wd({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){hi??=$5({themes:[],langs:["text"],engine:n==="shiki-wasm"?ME(T(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url)):O3()});const i=tj(hi)?await hi:hi;hi=i;const o=[];for(const l of t){if(l==="text"||l==="ansi")continue;const c=Ik(l);"then"in c?o.push(c):N_(c,i)}const s=[];for(const l of e){const c=ej(l);"then"in c?s.push(c):Eg(c,hi)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(l=>{N_(l,i)}),Promise.all(s).then(l=>{Eg(l,i)})]),i}function Gk(){if(hi!=null&&!("then"in hi))return hi}function tj(e=hi){return e!=null&&"then"in e}for(const e of jk.getThemes())Zn.registerThemeIfAbsent(e.name,e.load);function kl(e=mt){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function gl(e){for(const t of kl(e))if(!wg.has(t))return!1;return!0}function kg(e){return Zn.hasResolvedThemes(e)}function Qi(e,t){return Qa(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function ef(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function Tg(e){return Te({tagName:"div",children:[Te({tagName:"div",children:e.annotations?.map(t=>Te({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function nj(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function $k({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,o={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return Te({tagName:"div",children:[t==="custom"?Te({tagName:"slot",properties:{name:Hl}}):ij({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[rj(i)]],properties:o})}function ij({name:e,prevName:t,iconType:n}){const i=[Te({tagName:"slot",properties:{name:Sy}}),cd({name:nj(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(Te({tagName:"div",children:[Te({tagName:"bdi",children:[xi(t)]})],properties:{"data-prev-name":""}})),i.push(cd({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(Te({tagName:"div",children:[Te({tagName:"bdi",children:[xi(e)]})],properties:{"data-title":""}})),i.push(Te({tagName:"slot",properties:{name:_y}})),Te({tagName:"div",children:i,properties:{"data-header-content":""}})}function rj(e){const t=[];if(e!=null){let n=0,i=0;for(const o of e.hunks)n+=o.additionLines,i+=o.deletionLines;(i>0||n===0)&&t.push(Te({tagName:"span",children:[xi(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(Te({tagName:"span",children:[xi(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(Te({tagName:"slot",properties:{name:Cy}})),Te({tagName:"div",children:t,properties:{"data-metadata":""}})}function qk(e){return Te({tagName:"pre",properties:oj(e)})}function oj({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:o,totalLines:s,type:l,customProperties:c}){return{...c,"data-diff":l==="diff"?"":void 0,"data-file":l==="file"?"":void 0,"data-diff-type":l==="diff"?o?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}const bo=new Map;let aj=0;const nl={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",mts:"typescript",cts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Jt(e){if(bo.has(e))return bo.get(e)??"text";if(nl[e]!=null)return nl[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(bo.has(t[1]))return bo.get(t[1])??"text";if(nl[t[1]]!=null)return nl[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return bo.has(n)?bo.get(n)??"text":nl[n]??"text"}function sj(){return aj}function lj(){return Object.fromEntries(bo)}function Wk(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:kl(t),preferredHighlighter:n}}function ei(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function uj(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const o=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(o,{node:e,line:t,state:n}),new Error(o)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push(xi(`
199
+ `)),e}const kc=Symbol("no-token"),fm=Symbol("multiple-tokens");function Yk(e){const t=cj(e);if(t!=null)return t;let n=kc;const i=[];let o=[],s;const l=()=>{if(o.length===0||s==null){o=[],s=void 0;return}if(o.length===1){const d=o[0];if(d?.type==="element"){dj(d,s);for(const f of d.children)Zc(f)}else Zc(d);i.push(d),o=[],s=void 0;return}for(const d of o)Zc(d);i.push(Te({tagName:"span",properties:{"data-char":s},children:o})),o=[],s=void 0},c=d=>{if(d!==kc){if(d===fm){n=fm;return}if(n===kc){n=d;return}n!==d&&(n=fm)}};for(const d of e.children){const f=d.type==="element"?Yk(d):kc;if(c(f),typeof f!="number"){l(),i.push(d);continue}s!=null&&s!==f&&l(),s??=f,o.push(d)}return l(),e.children=i,n}function cj(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function Zc(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)Zc(t)}}function dj(e,t){e.properties["data-char"]=t}function fj(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:i=c=>c}=e,o=new Map;function s(c){return Object.entries(c).map(([d,f])=>`${d}:${f}`).join(";")}function l(c){const d=typeof c=="string"?c:s(c);let f=t+hj(d)+n;return f=i(f),o.has(f)||o.set(f,typeof c=="string"?c:{...c}),f}return{name:"@shikijs/transformers:style-to-class",pre(c){if(!c.properties.style)return;const d=l(c.properties.style);delete c.properties.style,this.addClassToHast(c,d)},tokens(c){for(const d of c)for(const f of d){if(!f.htmlStyle)continue;const p=l(f.htmlStyle);f.htmlStyle={},f.htmlAttrs||={},f.htmlAttrs.class?f.htmlAttrs.class+=` ${p}`:f.htmlAttrs.class=p}},getClassRegistry(){return o},getCSS(){let c="";for(const[d,f]of o.entries())c+=`.${d}{${typeof f=="string"?f:s(f)}}`;return c},clearRegistry(){o.clear()}}}function hj(e,t=0){let n=3735928559^t,i=1103547991^t;for(let o=0,s;o<e.length;o++)s=e.charCodeAt(o),n=Math.imul(n^s,2654435761),i=Math.imul(i^s,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&i)+(n>>>0)).toString(36).slice(0,6)}function Xk(e=!1,t=!1){const n={lineInfo:[]},i=[{line(o){return delete o.properties.class,o},pre(o){const s=yP(o),l=[];if(s!=null){let c=1;for(const d of s.children)d.type==="element"&&(e&&Yk(d),l.push(uj(d,c,n)),c++);s.children=l}return o},...e?{tokens(o){for(const s of o){let l=0;for(const c of s){const d=c;d.__lineChar??=l,l+=c.content.length}}},preprocess(o,s){s.mergeWhitespaces="never"},span(o,s,l,c,d){if(d?.offset!=null&&d.content!=null){const f=d.__lineChar;return f!=null&&(o.properties["data-char"]=f),o}return o}}:null}];return t&&i.push(pj,bC),e&&i.push({line:o=>(o.type==="element"&&o.children.length===0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]}),o)}),{state:n,transformers:i,toClass:bC}}const bC=fj({classPrefix:"hl-"}),pj={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const i={};n.color!=null&&(i.color=n.color),n.bgColor!=null&&(i["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(i["font-style"]="italic"),(n.fontStyle&2)!==0&&(i["font-weight"]="bold"),(n.fontStyle&4)!==0&&(i["text-decoration"]="underline")),Object.keys(i).length>0&&(n.htmlStyle=i)}}};function En(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const mj=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,gj=/^0(?:\.0+)?%?$/;function yj(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const i=e.slice(t+1,-1).trim();if(i.length===0)return;const o=i.lastIndexOf("/");if(o!==-1)return i.slice(o+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const s=i.split(",");if(s.length===4)return s[3]?.trim()}}function vj(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let i,o=1;return n.length===3?i=n.split("").map(s=>s+s).join(""):n.length===6?i=n:(i=n.slice(0,6),o=parseInt(n.slice(6,8),16)/255),[parseInt(i.slice(0,2),16),parseInt(i.slice(2,4),16),parseInt(i.slice(4,6),16),o]}function hm(e){if(e==null)return null;const t=vj(e);if(t==null)return null;const n=t[0]/255,i=t[1]/255,o=t[2]/255,s=l=>l<=.03928?l/12.92:((l+.055)/1.055)**2.4;return .2126*s(n)+.7152*s(i)+.0722*s(o)}function xC(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||mj.test(t))return!0;const n=yj(t);return n!=null&&gj.test(n)}function bj(e,t,n){if(t==null||n==null)return!1;const i=hm(e),o=hm(t),s=hm(n);return i==null||o==null||s==null?!1:Math.abs(i-s)<Math.abs(i-o)}const SC=new WeakMap;function pm(e){const t=SC.get(e);if(t!=null)return t;const n=e.colors??{},i={...n},o=n["editor.background"]??e.bg,s=n["editor.foreground"]??e.fg,l=n["sideBar.background"]??o,c=n["sideBar.foreground"]??s;li(i,"editor.background",o),li(i,"editor.foreground",s),li(i,"sideBar.background",l),li(i,"sideBar.foreground",c),li(i,"input.background",n["input.background"]??l),li(i,"sideBarSectionHeader.foreground",n["sideBarSectionHeader.foreground"]??c),li(i,"list.activeSelectionForeground",n["list.activeSelectionForeground"]??c),li(i,"gitDecoration.addedResourceForeground",mm(n["gitDecoration.addedResourceForeground"],n["terminal.ansiGreen"],n["editorGutter.addedBackground"])),li(i,"gitDecoration.modifiedResourceForeground",mm(n["gitDecoration.modifiedResourceForeground"],n["terminal.ansiBlue"],n["editorGutter.modifiedBackground"])),li(i,"gitDecoration.deletedResourceForeground",mm(n["gitDecoration.deletedResourceForeground"],n["terminal.ansiRed"],n["editorGutter.deletedBackground"]));const d=(xC(n["list.focusOutline"])?void 0:n["list.focusOutline"])??(xC(n.focusBorder)?void 0:n.focusBorder);d!=null?i["list.focusOutline"]=d:delete i["list.focusOutline"];const f=n["list.hoverBackground"];f!=null&&(xj(f,l)||bj(f,l,c))&&delete i["list.hoverBackground"];const p=Object.freeze({...e,colors:Object.freeze(i)});return SC.set(e,p),p}function li(e,t,n){n!=null&&n!==""&&(e[t]=n)}function mm(...e){for(const t of e)if(t!=null&&t!=="")return t}function xj(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function Kk({theme:e=mt,highlighter:t,prefix:n}){let i="";if(typeof e=="string"){const o=t.getTheme(e),s=pm(o);i+=`color:${s.fg};`,i+=`background-color:${s.bg};`,i+=`${En("global")}fg:${s.fg};`,i+=`${En("global")}bg:${s.bg};`,i+=gm(o,n)}else{let o=t.getTheme(e.dark),s=pm(o);i+=`${En("global")}dark:${s.fg};`,i+=`${En("global")}dark-bg:${s.bg};`,i+=gm(o,"dark"),o=t.getTheme(e.light),s=pm(o),i+=`${En("global")}light:${s.fg};`,i+=`${En("global")}light-bg:${s.bg};`,i+=gm(o,"light")}return i}function gm(e,t){t=t!=null?`${t}-`:"";let n="";const i=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];i!=null&&(n+=`${En("global")}${t}addition-color:${i};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(n+=`${En("global")}${t}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(n+=`${En("global")}${t}modified-color:${s};`),n}function Ag(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}const _C=10,CC=13,Sj=4,_j=40;function Cj(e){const t=[0];let n=e.indexOf("\r"),i=e.indexOf(`
200
+ `),o=0,s=0;for(;n!==-1||i!==-1;){let l;if(n!==-1&&(i===-1||n<i)?i===n+1?(l=i+1,n=e.indexOf("\r",l),i=e.indexOf(`
201
+ `,l)):(l=n+1,n=e.indexOf("\r",l)):(l=i+1,i=e.indexOf(`
202
+ `,l)),t.push(l),++s===Sj){if(l-o<=_j){for(let c=l;c<e.length;c++){const d=e.charCodeAt(c);(d===_C||d===CC)&&(d===CC&&c+1<e.length&&e.charCodeAt(c+1)===_C&&c++,t.push(c+1))}return t}o=l,s=0}}return t}function Jc(e){const t=Cj(e);return Array.from({length:t.length},(n,i)=>{const o=t[i],s=t[i+1]??e.length;return e.slice(o,s)})}const wj={forcePlainText:!1};function Qk(e,t,{theme:n=mt,tokenizeMaxLineLength:i,useTokenTransformer:o},{forcePlainText:s,startingLine:l,totalLines:c,lines:d}=wj){s?(l??=0,c??=1/0):(l=0,c=1/0);const f=l>0||c<1/0,{state:p,transformers:m}=Xk(o),g=s?"text":e.lang??Jt(e.name),v=typeof n=="string"?t.getTheme(n).type:void 0,x=Kk({theme:n,highlighter:t});p.lineInfo=w=>({type:"context",lineIndex:w-1+l,lineNumber:w+l});const S=typeof n=="string"?{lang:g,theme:n,transformers:m,defaultColor:!1,cssVariablePrefix:En("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0}:{lang:g,themes:n,transformers:m,defaultColor:!1,cssVariablePrefix:En("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0},C=Ag(t.codeToHast(f?Ej(d??Jc(e.contents),l,c):e.contents,S)),_=f?new Array(l):C;return f&&_.push(...C),{code:_,themeStyles:x,baseThemeType:v}}function Ej(e,t,n){if(e.length===0)return"";const i=Math.min(t+n,e.length);return e.slice(t,i).join("")}const Zk="-1,-1";function Lg(e){return e?.some(t=>t.lineNumber===0)??!1}function Rg(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function tf(e){return e.startingLine===0&&e.totalLines>0}function Jk(e,t){return e.endsWith(`\r
203
+ `)?t+`\r
204
+ `:e.endsWith("\r")?t+"\r":e.endsWith(`
205
+ `)?t+`
206
+ `:t}function eT(e,t){return Te({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Tl(e){return(e.lang??Jt(e.name))==="text"}function Tc(e,t){return t.cacheKey==null?e.file===t&&e.sourceContents===t.contents:e.cacheKey===t.cacheKey}let kj=-1;var Tj=class{options;onRenderUpdate;workerManager;__id=`file-renderer:${++kj}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;pendingStructuralRows;textDocumentCache=new WeakMap;editSessionActive=!1;constructor(e={theme:mt},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=gl(e.theme??mt)?Gk():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}beginEditSession(){this.editSessionActive=!0}endEditSession(){this.editSessionActive=!1}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0,this.endEditSession(),this.textDocumentCache=new WeakMap}syncEditedContentsToFile(){const{renderCache:e,lineCache:t}=this;e?.isDirty!==!0||t==null||!Tc(t,e.file)||(e.file.contents=t.lines.join(""))}hasUnkeyedFileContentsChanged(e){const{lineCache:t}=this;return e.cacheKey==null&&t!=null&&t.file===e&&t.sourceContents!==e.contents}invalidateChangedUnkeyedFile(e){this.hasUnkeyedFileContentsChanged(e)&&(this.workerManager?.cleanUpTasks(this),this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap)}clearRenderCache(){this.syncEditedContentsToFile(),this.pendingStructuralRows=void 0;const e=this.renderCache;this.renderCache=void 0,e!=null&&e.isDirty===!0&&e.file.cacheKey!=null&&this.workerManager?.evictFileFromCache(e.file.cacheKey)}hydrate(e){const{options:t}=this.getRenderOptions(e),n=ym(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let i=this.workerManager?.getFileResultCache(e);i!=null&&!Qi(t,i.options)&&(i=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!Tl(e),result:n?void 0:i?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??Jt(e.name),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getFileRenderOptions().theme??this.options.theme??mt}getEffectiveCodeOptions(){const e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getFileRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0){const o=this.workerManager.getFileRenderOptions();return this.editSessionActive&&o.useTokenTransformer!==!0?{...o,useTokenTransformer:!0}:o}const{tokenizeMaxLineLength:i=1e3}=this.options;return{theme:this.getLocalHighlightTheme(),useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:i}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!qn(e,n.file)||!Qi(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){this.invalidateChangedUnkeyedFile(e);let{lineCache:t}=this;return(t==null||!Tc(t,e))&&(t={cacheKey:e.cacheKey,file:e,sourceContents:e.contents,lines:Jc(e.contents)}),this.lineCache=t,t.lines}getLineCount(e){const t=this.getOrCreateLineCache(e);return this.textDocumentCache.get(e)?.lineCount??t.length}updateRenderCache(e,t,n=!1){if(this.pendingStructuralRows=void 0,this.renderCache==null)return;const{file:i,result:o}=this.renderCache;if(o==null)return;const s=n?new Map:void 0;this.pendingStructuralRows=s;const l=this.lineCache!=null&&Tc(this.lineCache,i)?this.lineCache:void 0;for(const[c,d]of e){if(s===void 0&&l!=null&&c<l.lines.length){const p=d.map(m=>m[2]).join("");l.lines[c]=Jk(l.lines[c]??"",p)}const f={type:"element",tagName:"div",properties:{"data-line":c+1,"data-line-type":"context","data-line-index":c},children:d.map(([p,m,g])=>p===0&&m===""?g===""?{type:"element",tagName:"br",properties:{},children:[]}:{type:"text",value:g}:{type:"element",tagName:"span",properties:{"data-char":p,style:`color:${m};`},children:[{type:"text",value:g}]})};s!==void 0?s.set(c,f):o.code[c]=f}o.baseThemeType=t,this.renderCache.isDirty=!0}applyDocumentChange(e){const t=this.pendingStructuralRows;if(this.pendingStructuralRows=void 0,this.renderCache==null)return;const{file:n,result:i}=this.renderCache;if(i==null)return;const o=this.lineCache!=null&&Tc(this.lineCache,n)?this.lineCache.lines:Jc(n.contents),s=Jc(e.getText());if(o.length!==s.length){const l=Math.min(o.length,s.length);let c=0;for(;c<l&&o[c]===s[c];)c++;let d=0;for(;d<l-c&&o[o.length-1-d]===s[s.length-1-d];)d++;const f=i.code;i.code=new Array(s.length);for(let p=0;p<c;p++)i.code[p]=f[p];for(let p=0;p<d;p++)i.code[s.length-1-p]=f[o.length-1-p];if(t!==void 0)for(const[p,m]of t)p<s.length&&(i.code[p]=m);for(let p=c;p<s.length-d;p++)i.code[p]??={type:"element",tagName:"div",properties:{"data-line":p+1,"data-line-type":"context","data-line-index":p},children:[{type:"element",tagName:"span",properties:{"data-char":0},children:[{type:"text",value:e.getLineText(p)}]}]};for(let p=0;p<i.code.length;p++){const m=i.code[p];m?.type==="element"&&(m.properties["data-line"]=p+1,m.properties["data-line-index"]=p)}this.renderCache.isDirty=!0}this.lineCache={cacheKey:n.cacheKey,file:n,sourceContents:n.contents,lines:s},this.textDocumentCache.set(n,e)}renderFile(e=this.renderCache?.file,t=ld){if(e==null)return;this.invalidateChangedUnkeyedFile(e),this.renderCache?.isDirty===!0&&!qn(e,this.renderCache.file)&&(this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap);let{options:n,forceHighlight:i}=this.getRenderOptions(e);this.renderCache?.isDirty===!0&&!Qi(n,this.renderCache.options)&&this.clearRenderCache();const o=this.getMatchingWorkerResultCache(e,n);o!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...o},i=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const s=this.getOrCreateLineCache(e),l=e.contents.length>0,c=!l||Tl(e)||ym(s.length,this.getTokenizeMaxLength()),d=!qn(e,this.renderCache.file),f=!ef(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0)(c||this.renderCache.result==null||!this.renderCache.highlighted&&(d||f))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||d||f||i)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,s)),this.renderCache.renderRange=t),!c&&l&&(!this.renderCache.highlighted||i)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??Jt(e.name);const p=this.highlighter!=null&&gl(n.theme),m=this.highlighter!=null&&fd(this.computedLang),g=!c&&m;if(this.highlighter!=null&&p&&(i||c||!this.renderCache.highlighted&&g||this.renderCache.result==null)){const{result:v,options:x}=this.renderFileWithHighlighter(e,this.highlighter,c||!m);this.renderCache={file:e,options:x,highlighted:g,result:v,renderRange:void 0}}(!p||!c&&!m)&&this.asyncHighlight(e).then(({result:v,options:x})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.applyHighlightResult(e,v,x,!c)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=ld){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=ym(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Jt(e.name);const n=this.highlighter!=null&&kg(kl(this.getLocalHighlightTheme())),i=t||this.highlighter!=null&&fd(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e);return{result:Qk(e,t,i,{forcePlainText:n}),options:i}}processFileResult(e,t,{code:n,themeStyles:i,baseThemeType:o}){const s=this.getLineCount(e),{disableFileHeader:l=!1}=this.options,c=[],d=ja(),f=Math.min(t.startingLine+t.totalLines,s);let p=0;const m=tf(t)?Rg(this.lineAnnotations):void 0;m!=null&&(d.children.push(wn("context","annotation",1)),c.push(Tg({hunkIndex:-1,lineIndex:-1,annotations:m.map(g=>ei(g))})),p++);for(let g=t.startingLine;g<f;g++){const v=g+1,x=n[g];if(x==null){const C="FileRenderer.processFileResult: Line doesnt exist";throw console.error(C,{name:e.name,lineIndex:g,lineNumber:v}),new Error(C)}d.children.push(vE("context",v,`${g}`)),c.push(x),p++;const S=this.lineAnnotations[v];S!=null&&(d.children.push(wn("context","annotation",1)),c.push(Tg({hunkIndex:0,lineIndex:v,annotations:S.map(C=>ei(C))})),p++)}return d.properties.style=`grid-row: span ${p}`,{gutterAST:d.children??[],contentAST:c,preAST:this.createPreElement(s),headerAST:l?void 0:this.renderHeader(e),totalLines:s,rowCount:p,themeStyles:i,baseThemeType:o,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return $k({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return Zt(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(Te({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=ja();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,eT(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return Zt(t?Te({tagName:"code",children:e,properties:{"data-code":""}}):e)}async initializeHighlighter(){return this.highlighter=await wd(Wk(this.computedLang,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}onHighlightSuccess(e,t,n,i=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,i)}applyHighlightResult(e,t,n,i=!0){if(this.renderCache==null)return;const o=!qn(e,this.renderCache.file)||!this.renderCache.highlighted||!Qi(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:i,result:t,renderRange:void 0},o&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!Qi(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&qn(e,n.file)&&Qi(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return qk({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function ym(e,t){return e>t}const tT=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
207
+ <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
208
+ <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
209
+ </symbol>
210
+ <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
211
+ <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
212
+ </symbol>
213
+ <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
214
+ <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
215
+ </symbol>
216
+ <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
217
+ <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
218
+ </symbol>
219
+ <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
220
+ <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
221
+ </symbol>
222
+ <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
223
+ <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
224
+ </symbol>
225
+ <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
226
+ <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
227
+ </symbol>
228
+ <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
229
+ <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
230
+ </symbol>
231
+ <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
232
+ <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
233
+ </symbol>
234
+ <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
235
+ <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
236
+ </symbol>
237
+ <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
238
+ <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
239
+ </symbol>
240
+ <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
241
+ <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
242
+ </symbol>
243
+ <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
244
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
245
+ </symbol>
246
+ <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
247
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
248
+ </symbol>
249
+ <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
250
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
251
+ </symbol>
252
+ <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
253
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
254
+ </symbol>
255
+ <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
256
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
257
+ </symbol>
258
+ </svg>`;function Aj(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}function nT(e,t){return e==null||t==null?e===t:Lj(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const wC={};function Lj(e=wC,t=wC){if(e===t)return!0;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const o of n)if(e[o]!==t[o])return!1;return!0}function iT(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function rT(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function oT(){const e=document.createElement("style");return e.setAttribute(Oz,""),e}var Rj=`@layer base {
259
+ :host {
260
+ --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
261
+ "Courier New", monospace;
262
+ --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
263
+ "Noto Sans", "Liberation Sans", Arial, sans-serif;
264
+ --diffs-mixer: light-dark(#000, #fff);
265
+ --diffs-gap-fallback: 8px;
266
+ --diffs-scrollbar-gutter-fallback: 6px;
267
+ --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
268
+ --diffs-added-light: #0dbe4e;
269
+ --diffs-added-dark: #5ecc71;
270
+ --diffs-modified-light: #009fff;
271
+ --diffs-modified-dark: #69b1ff;
272
+ --diffs-deleted-light: #ff2e3f;
273
+ --diffs-deleted-dark: #ff6762;
274
+ --diffs-warning-light: #d5a910;
275
+ --diffs-warning-dark: #ffd452;
276
+ color-scheme: light dark;
277
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
278
+ font-size: var(--diffs-font-size, 13px);
279
+ line-height: var(--diffs-line-height, 20px);
280
+ font-feature-settings: var(--diffs-font-features);
281
+ --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
282
+ --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
283
+ --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
284
+ --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
285
+ --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
286
+ --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
287
+ --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
288
+ --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
289
+ --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
290
+ --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
291
+ --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
292
+ --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
293
+ --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
294
+ --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
295
+ --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
296
+ --diffs-selection-base: var(--diffs-modified-base);
297
+ --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
298
+ background-color: var(--diffs-bg);
299
+ color: var(--diffs-fg);
300
+ display: block;
301
+ }
302
+
303
+ pre, code, [data-error-wrapper] {
304
+ isolation: isolate;
305
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
306
+ outline: none;
307
+ margin: 0;
308
+ padding: 0;
309
+ display: block;
310
+ }
311
+
312
+ pre, code {
313
+ background-color: var(--diffs-bg);
314
+ }
315
+
316
+ code {
317
+ contain: content;
318
+ }
319
+
320
+ input, button {
321
+ font-family: inherit;
322
+ font-size: inherit;
323
+ line-height: inherit;
324
+ }
325
+
326
+ *, :before, :after {
327
+ box-sizing: border-box;
328
+ }
329
+
330
+ [data-icon-sprite] {
331
+ display: none;
332
+ }
333
+
334
+ [data-diffs-header], [data-separator] {
335
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
336
+ }
337
+
338
+ [data-diffs-header][data-sticky] {
339
+ z-index: 1;
340
+ background-color: var(--diffs-bg);
341
+ position: sticky;
342
+ top: 0;
343
+ }
344
+
345
+ [data-file-info] {
346
+ color: var(--fg);
347
+ background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
348
+ border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
349
+ padding: 10px;
350
+ font-weight: 700;
351
+ }
352
+
353
+ [data-diff], [data-file] {
354
+ --diffs-grid-number-column-width: minmax(min-content, max-content);
355
+ --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
356
+
357
+ &[data-dehydrated] {
358
+ --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
359
+ }
360
+
361
+ &:hover [data-code]::-webkit-scrollbar-thumb {
362
+ background-color: var(--diffs-bg-context);
363
+ }
364
+ }
365
+
366
+ @supports (-webkit-touch-callout: none) {
367
+ :host {
368
+ --diffs-scrollbar-gutter-fallback: 0px;
369
+ }
370
+ }
371
+
372
+ [data-line] span {
373
+ color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
374
+ background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
375
+ font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
376
+ font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
377
+ text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
378
+ }
379
+
380
+ [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {
381
+ --diffs-computed-decoration-bg: var(--diffs-bg);
382
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
383
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
384
+ --diffs-computed-editor-active-line-bg: var(--diffs-computed-selected-line-bg);
385
+ --diffs-computed-hovered-line-bg: var(--diffs-computed-editor-active-line-bg);
386
+ --diffs-hover-mix-target: var(--diffs-bg-hover-override, var(--diffs-mixer));
387
+ --diffs-line-bg: var(--diffs-computed-hovered-line-bg);
388
+ color: var(--diffs-fg);
389
+ background-color: var(--diffs-line-bg, var(--diffs-bg));
390
+ }
391
+
392
+ [data-line], [data-no-newline] {
393
+ &[data-decoration-bg] {
394
+ --mix-deco-light: 92%;
395
+ --mix-deco-dark: 85%;
396
+
397
+ &[data-decoration-bg-depth="2"] {
398
+ --mix-deco-light: 88%;
399
+ --mix-deco-dark: 80%;
400
+ }
401
+
402
+ &[data-decoration-bg-depth="3"] {
403
+ --mix-deco-light: 85%;
404
+ --mix-deco-dark: 78%;
405
+ }
406
+
407
+ --diffs-hover-mix-target: var(--diffs-decoration-bg);
408
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
409
+ var(--diffs-bg) var(--mix-deco-light),
410
+ var(--diffs-decoration-bg)), color-mix(in lab,
411
+ var(--diffs-bg) var(--mix-deco-dark),
412
+ var(--diffs-decoration-bg)));
413
+ }
414
+ }
415
+
416
+ [data-line-annotation], [data-gutter-buffer="annotation"] {
417
+ --diffs-annotation-bg: var(--diffs-bg-context);
418
+ --diffs-computed-decoration-bg: var(--diffs-annotation-bg);
419
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
420
+ }
421
+
422
+ [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
423
+ --diffs-computed-decoration-bg: var(--diffs-bg-context);
424
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
425
+ }
426
+
427
+ [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
428
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
429
+ var(--diffs-bg) 78%,
430
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
431
+ var(--diffs-bg) 68%,
432
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
433
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
434
+ }
435
+
436
+ [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
437
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
438
+ var(--diffs-bg) 78%,
439
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
440
+ var(--diffs-bg) 68%,
441
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
442
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
443
+ }
444
+
445
+ [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
446
+ --diffs-computed-decoration-bg: var(--diffs-bg);
447
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
448
+ }
449
+
450
+ :where([data-background]) {
451
+ & [data-gutter-buffer], & [data-column-number] {
452
+ --mix-light: 91%;
453
+ --mix-dark: 85%;
454
+ }
455
+
456
+ & [data-line], & [data-no-newline] {
457
+ --mix-light: 88%;
458
+ --mix-dark: 80%;
459
+ }
460
+
461
+ & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
462
+ --diffs-diff-line-mix-target: var(--diffs-bg);
463
+
464
+ &[data-line-type="change-deletion"] {
465
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
466
+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
467
+
468
+ &:where([data-gutter-buffer], [data-column-number]) {
469
+ color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
470
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
471
+ }
472
+
473
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
474
+ var(--diffs-computed-decoration-bg) var(--mix-light),
475
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
476
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
477
+ var(--diffs-diff-line-mix-target)));
478
+ }
479
+
480
+ &[data-line-type="change-addition"] {
481
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
482
+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
483
+
484
+ &:where([data-gutter-buffer], [data-column-number]) {
485
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
486
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
487
+ }
488
+
489
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
490
+ var(--diffs-computed-decoration-bg) var(--mix-light),
491
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
492
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
493
+ var(--diffs-diff-line-mix-target)));
494
+ }
495
+
496
+ &[data-merge-conflict="current"] {
497
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
498
+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
499
+
500
+ &:where([data-gutter-buffer], [data-column-number]) {
501
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
502
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
503
+ }
504
+
505
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
506
+ var(--diffs-computed-decoration-bg) var(--mix-light),
507
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
508
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
509
+ var(--diffs-diff-line-mix-target)));
510
+ }
511
+
512
+ &[data-merge-conflict="incoming"] {
513
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
514
+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
515
+
516
+ &:where([data-gutter-buffer], [data-column-number]) {
517
+ color: var(--diffs-modified-base);
518
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
519
+ }
520
+
521
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
522
+ var(--diffs-computed-decoration-bg) var(--mix-light),
523
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
524
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
525
+ var(--diffs-diff-line-mix-target)));
526
+ }
527
+ }
528
+ }
529
+
530
+ [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {
531
+ --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
532
+ --diffs-selection-emphasis-mix-target: var(--diffs-selection-mix-target);
533
+
534
+ &:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
535
+ --mix-selection-light: 82%;
536
+ --mix-selection-dark: 75%;
537
+ --diffs-hover-mix-target: var(--diffs-selection-mix-target);
538
+ }
539
+
540
+ &:where([data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line])) {
541
+ --mix-selection-light: 75%;
542
+ --mix-selection-dark: 60%;
543
+ --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
544
+ --diffs-hover-mix-target: var(--diffs-selection-mix-target);
545
+ }
546
+
547
+ &:where([data-line][data-selected-line]):is([data-line-type="change-addition"], [data-line-type="change-deletion"]) {
548
+ --diffs-selection-emphasis-mix-target: light-dark(color-mix(in lab,
549
+ var(--diffs-diff-line-mix-target, var(--diffs-selection-mix-target))
550
+ var(--mix-selection-light),
551
+ var(--diffs-selection-mix-target)), var(--diffs-selection-mix-target));
552
+ }
553
+
554
+ &:where([data-editor-overlay]), &[data-selected-line] {
555
+ --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
556
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
557
+ var(--diffs-selection-mix-target)), color-mix(in lab,
558
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
559
+ var(--diffs-selection-mix-target)));
560
+ }
561
+ }
562
+
563
+ [data-line][data-editor-active-line], [data-column-number][data-editor-active-line] {
564
+ --diffs-computed-editor-active-line-bg: color-mix(in lab,
565
+ var(--diffs-computed-selected-line-bg)
566
+ var(--diffs-editor-active-line-source-mix, 100%),
567
+ var(--diffs-selection-emphasis-mix-target));
568
+ }
569
+
570
+ @media (pointer: fine) {
571
+ [data-line][data-hovered], [data-gutter-buffer][data-hovered], [data-column-number][data-hovered], [data-line-annotation][data-hovered], [data-no-newline][data-hovered], [data-merge-conflict][data-hovered], [data-merge-conflict-actions][data-hovered], [data-editor-overlay][data-hovered] {
572
+ --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
573
+ var(--diffs-computed-editor-active-line-bg) 97%,
574
+ var(--diffs-hover-mix-target)), color-mix(in lab,
575
+ var(--diffs-computed-editor-active-line-bg) 91%,
576
+ var(--diffs-hover-mix-target)));
577
+ }
578
+ }
579
+
580
+ [data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line]) {
581
+ color: var(--diffs-selection-number-fg);
582
+ }
583
+
584
+ [data-no-newline] {
585
+ user-select: none;
586
+
587
+ & span {
588
+ opacity: .6;
589
+ }
590
+ }
591
+
592
+ [data-diff-type="split"][data-overflow="scroll"] {
593
+ grid-template-columns: 1fr 1fr;
594
+ display: grid;
595
+
596
+ & [data-additions] {
597
+ border-left: 1px solid var(--diffs-bg);
598
+ }
599
+
600
+ & [data-deletions] {
601
+ border-right: 1px solid var(--diffs-bg);
602
+ }
603
+ }
604
+
605
+ [data-code] {
606
+ grid-auto-flow: dense;
607
+ grid-template-columns: var(--diffs-code-grid);
608
+ overflow: var(--diffs-overflow-override, scroll) clip;
609
+ overscroll-behavior-x: none;
610
+ tab-size: var(--diffs-tab-size, 2);
611
+ padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
612
+ padding-bottom: max(0px,
613
+ calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
614
+ var(--diffs-scrollbar-gutter)));
615
+ scrollbar-gutter: stable;
616
+ align-self: flex-start;
617
+ display: grid;
618
+ }
619
+
620
+ [data-diffs-scrollbar-measure] {
621
+ opacity: 0;
622
+ pointer-events: none;
623
+ scrollbar-gutter: auto;
624
+ grid-template-columns: none;
625
+ width: 100px;
626
+ height: 100px;
627
+ padding: 0;
628
+ position: absolute;
629
+ top: -200px;
630
+ left: -200px;
631
+ }
632
+
633
+ [data-container-size] {
634
+ container-type: inline-size;
635
+ }
636
+
637
+ [data-code]::-webkit-scrollbar {
638
+ width: 0;
639
+ height: var(--diffs-scrollbar-gutter);
640
+ }
641
+
642
+ [data-code]::-webkit-scrollbar-track {
643
+ background: none;
644
+ }
645
+
646
+ [data-code]::-webkit-scrollbar-thumb {
647
+ background-color: #0000;
648
+ background-clip: content-box;
649
+ border: 1px solid #0000;
650
+ border-radius: 3px;
651
+ }
652
+
653
+ [data-code]::-webkit-scrollbar-corner {
654
+ background-color: #0000;
655
+ }
656
+
657
+ @supports ((-moz-appearance: none)) {
658
+ [data-code] {
659
+ scrollbar-width: thin;
660
+ scrollbar-color: var(--diffs-bg-context) transparent;
661
+ padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
662
+ }
663
+ }
664
+
665
+ [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
666
+ & [data-code], &[data-overflow="wrap"], &[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
667
+ padding-top: 0;
668
+ }
669
+ }
670
+
671
+ [data-gutter] {
672
+ grid-template-rows: subgrid;
673
+ grid-template-columns: subgrid;
674
+ z-index: 3;
675
+ background-color: var(--diffs-bg);
676
+ grid-column: 1;
677
+ display: grid;
678
+ position: relative;
679
+
680
+ & [data-gutter-buffer], & [data-column-number] {
681
+ border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
682
+ }
683
+ }
684
+
685
+ [data-content] {
686
+ grid-template-rows: subgrid;
687
+ grid-template-columns: subgrid;
688
+ background-color: var(--diffs-bg);
689
+ grid-column: 2;
690
+ min-width: 0;
691
+ display: grid;
692
+ }
693
+
694
+ [data-diff-type="split"][data-overflow="wrap"], [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
695
+ grid-auto-flow: dense;
696
+ grid-template-columns: repeat(2, var(--diffs-code-grid));
697
+ padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
698
+ display: grid;
699
+
700
+ & [data-code] {
701
+ display: contents;
702
+ }
703
+
704
+ & [data-deletions] {
705
+ & [data-gutter] {
706
+ grid-column: 1;
707
+ }
708
+
709
+ & [data-content] {
710
+ border-right: 1px solid var(--diffs-bg);
711
+ grid-column: 2;
712
+ }
713
+ }
714
+
715
+ & [data-additions] {
716
+ & [data-gutter] {
717
+ border-left: 1px solid var(--diffs-bg);
718
+ grid-column: 3;
719
+ }
720
+
721
+ & [data-content] {
722
+ grid-column: 4;
723
+ }
724
+ }
725
+ }
726
+
727
+ [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] [data-content] {
728
+ overflow: clip;
729
+ }
730
+
731
+ [data-overflow="scroll"] [data-gutter] {
732
+ position: sticky;
733
+ left: 0;
734
+ }
735
+
736
+ [data-interactive-lines] [data-line] {
737
+ cursor: pointer;
738
+ }
739
+
740
+ [data-interactive-line-numbers] [data-column-number] {
741
+ cursor: pointer;
742
+ touch-action: none;
743
+ }
744
+
745
+ [data-content-buffer], [data-gutter-buffer] {
746
+ user-select: none;
747
+ min-height: 1lh;
748
+ position: relative;
749
+ }
750
+
751
+ [data-gutter-buffer] {
752
+ padding-left: 2ch;
753
+ padding-right: 1ch;
754
+
755
+ &:before {
756
+ content: "";
757
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
758
+ display: block;
759
+ }
760
+ }
761
+
762
+ [data-gutter-buffer="annotation"] {
763
+ --diffs-annotation-bg: var(--diffs-bg-context-gutter);
764
+ min-height: 0;
765
+ }
766
+
767
+ [data-gutter-buffer="buffer"] {
768
+ --diffs-line-bg: var(--diffs-bg-context-gutter);
769
+ }
770
+
771
+ [data-content-buffer] {
772
+ background-position: 5px 0;
773
+ background-size: 8px 8px;
774
+ background-origin: border-box;
775
+ background-image: repeating-linear-gradient(-45deg,
776
+ transparent,
777
+ transparent calc(3px * 1.414),
778
+ var(--diffs-bg-buffer) calc(3px * 1.414),
779
+ var(--diffs-bg-buffer) calc(4px * 1.414));
780
+ grid-column: 1;
781
+ }
782
+
783
+ [data-separator] {
784
+ box-sizing: content-box;
785
+ background-color: var(--diffs-bg);
786
+ }
787
+
788
+ [data-separator="simple"] {
789
+ min-height: 4px;
790
+ }
791
+
792
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
793
+ background-color: var(--diffs-bg-separator);
794
+ }
795
+
796
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
797
+ height: 32px;
798
+ position: relative;
799
+ }
800
+
801
+ [data-separator-wrapper] {
802
+ user-select: none;
803
+ fill: currentColor;
804
+ background-color: var(--diffs-bg);
805
+ align-items: center;
806
+ height: 100%;
807
+ display: flex;
808
+ position: absolute;
809
+ inset-inline: 0;
810
+ }
811
+
812
+ [data-content] [data-separator-wrapper] {
813
+ display: none;
814
+ }
815
+
816
+ [data-separator="metadata"] [data-separator-wrapper] {
817
+ background-color: var(--diffs-bg-separator);
818
+ height: 100%;
819
+ color: var(--diffs-fg-number);
820
+ white-space: nowrap;
821
+ text-overflow: ellipsis;
822
+ min-width: min-content;
823
+ padding-inline: 1ch;
824
+ inset-inline: 100% auto;
825
+ overflow: hidden;
826
+ }
827
+
828
+ [data-separator="line-info"] {
829
+ margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
830
+
831
+ & [data-separator-wrapper] {
832
+ min-width: 16px;
833
+ }
834
+ }
835
+
836
+ [data-separator="line-info-basic"], [data-separator="metadata"] {
837
+ margin-block: 0;
838
+ }
839
+
840
+ [data-separator="line-info"][data-separator-first] {
841
+ margin-top: 0;
842
+ }
843
+
844
+ [data-separator="line-info"][data-separator-last] {
845
+ margin-bottom: 0;
846
+ }
847
+
848
+ [data-expand-index] [data-separator-wrapper] {
849
+ grid-template-columns: 32px auto;
850
+ display: grid;
851
+ }
852
+
853
+ [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
854
+ grid-template-columns: 32px 32px auto;
855
+ }
856
+
857
+ [data-expand-button], [data-separator-content] {
858
+ background-color: var(--diffs-bg-separator);
859
+ flex: none;
860
+ align-items: center;
861
+ display: flex;
862
+ }
863
+
864
+ [data-expand-index] [data-separator-content]:hover {
865
+ cursor: pointer;
866
+ text-decoration: underline;
867
+ }
868
+
869
+ [data-expand-button] {
870
+ cursor: pointer;
871
+ min-width: 32px;
872
+ color: var(--diffs-fg-number);
873
+ border-right: 2px solid var(--diffs-bg);
874
+ flex-shrink: 0;
875
+ justify-content: center;
876
+ align-self: stretch;
877
+
878
+ &:hover {
879
+ color: var(--diffs-fg);
880
+ }
881
+
882
+ &[data-expand-all-button] {
883
+ display: none;
884
+ }
885
+ }
886
+
887
+ [data-expand-down] [data-icon] {
888
+ transform: scaleY(-1);
889
+ }
890
+
891
+ [data-separator-content] {
892
+ height: 100%;
893
+ color: var(--diffs-fg-number);
894
+ flex: auto;
895
+ justify-content: flex-start;
896
+ padding: 0 1ch;
897
+ overflow: hidden;
898
+ }
899
+
900
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
901
+ & [data-separator-content] {
902
+ user-select: none;
903
+ height: 100%;
904
+ overflow: clip;
905
+ }
906
+ }
907
+
908
+ [data-unmodified-lines] {
909
+ text-overflow: ellipsis;
910
+ white-space: nowrap;
911
+ flex: 0 auto;
912
+ min-width: 0;
913
+ display: block;
914
+ overflow: hidden;
915
+ }
916
+
917
+ @supports (width: 1cqi) {
918
+ [data-unified] {
919
+ & [data-separator="line-info"] [data-separator-wrapper] {
920
+ padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
921
+ width: 100cqi;
922
+
923
+ & [data-separator-content] {
924
+ border-radius: 6px;
925
+ }
926
+ }
927
+
928
+ & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
929
+ border-top-left-radius: unset;
930
+ border-bottom-left-radius: unset;
931
+ }
932
+ }
933
+
934
+ [data-gutter] {
935
+ & [data-separator="line-info"] [data-separator-wrapper] {
936
+ padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
937
+ }
938
+
939
+ & [data-separator="line-info"] [data-separator-content] {
940
+ border-top-left-radius: 6px;
941
+ border-bottom-left-radius: 6px;
942
+ }
943
+
944
+ & [data-separator="line-info"][data-expand-index] [data-separator-content] {
945
+ border-top-left-radius: unset;
946
+ border-bottom-left-radius: unset;
947
+ }
948
+ }
949
+
950
+ [data-additions] {
951
+ & [data-content] [data-separator="line-info"] {
952
+ background-color: var(--diffs-bg);
953
+
954
+ & [data-separator-wrapper] {
955
+ display: none;
956
+ }
957
+ }
958
+
959
+ & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
960
+ background-color: var(--diffs-bg-separator);
961
+ border-top-right-radius: 6px;
962
+ border-bottom-right-radius: 6px;
963
+ height: 100%;
964
+ display: block;
965
+
966
+ & [data-separator-content], & [data-expand-button] {
967
+ display: none;
968
+ }
969
+ }
970
+ }
971
+
972
+ [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
973
+ width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
974
+ }
975
+
976
+ [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
977
+ background-color: var(--diffs-bg-separator);
978
+ height: 100%;
979
+ margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
980
+ border-top-right-radius: 6px;
981
+ border-bottom-right-radius: 6px;
982
+ display: block;
983
+
984
+ & [data-separator-content], & [data-expand-button] {
985
+ display: none;
986
+ }
987
+ }
988
+
989
+ [data-separator="line-info"] [data-separator-wrapper] {
990
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
991
+ border-top-left-radius: 6px;
992
+ border-bottom-left-radius: 6px;
993
+ }
994
+ }
995
+
996
+ @media (pointer: fine) {
997
+ [data-separator="line-info"] [data-separator-wrapper] {
998
+ &[data-separator-multi-button] {
999
+ & [data-expand-up] {
1000
+ border-top-left-radius: 6px;
1001
+ border-bottom-left-radius: unset;
1002
+ }
1003
+
1004
+ & [data-expand-down] {
1005
+ border-bottom-left-radius: 6px;
1006
+ border-top-left-radius: unset;
1007
+ }
1008
+ }
1009
+ }
1010
+ }
1011
+ }
1012
+
1013
+ @media (pointer: coarse) {
1014
+ [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
1015
+ grid-template-columns: 34px 34px auto;
1016
+
1017
+ & [data-separator-content] {
1018
+ grid-column: unset;
1019
+ grid-row: unset;
1020
+ }
1021
+ }
1022
+
1023
+ @supports (width: 1cqi) {
1024
+ [data-separator="line-info"] [data-separator-wrapper] {
1025
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
1026
+ border-top-left-radius: 6px;
1027
+ border-bottom-left-radius: 6px;
1028
+ }
1029
+
1030
+ &[data-separator-multi-button] {
1031
+ & [data-expand-up] {
1032
+ border-top-left-radius: 6px;
1033
+ border-bottom-left-radius: 6px;
1034
+ }
1035
+
1036
+ & [data-expand-down] {
1037
+ border-bottom-left-radius: unset;
1038
+ border-top-left-radius: unset;
1039
+ }
1040
+ }
1041
+ }
1042
+ }
1043
+ }
1044
+
1045
+ @media (pointer: fine) {
1046
+ [data-separator-wrapper][data-separator-multi-button] {
1047
+ grid-template-rows: 50% 50%;
1048
+ display: grid;
1049
+
1050
+ & [data-separator-content] {
1051
+ grid-area: 1 / 2 / -1;
1052
+ min-width: min-content;
1053
+ }
1054
+
1055
+ & [data-expand-button] {
1056
+ grid-column: 1;
1057
+ }
1058
+ }
1059
+
1060
+ [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
1061
+ grid-template-columns: 34px auto;
1062
+ }
1063
+
1064
+ [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
1065
+ grid-template-columns: 100% auto;
1066
+ }
1067
+
1068
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
1069
+ & [data-separator-multi-button] {
1070
+ & [data-expand-up] {
1071
+ border-bottom: 1px solid var(--diffs-bg);
1072
+ border-right: 2px solid var(--diffs-bg);
1073
+ }
1074
+
1075
+ & [data-expand-down] {
1076
+ border-top: 1px solid var(--diffs-bg);
1077
+ border-right: 2px solid var(--diffs-bg);
1078
+ }
1079
+ }
1080
+ }
1081
+ }
1082
+
1083
+ [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
1084
+ display: none;
1085
+ }
1086
+
1087
+ [data-line-annotation] {
1088
+ min-height: var(--diffs-annotation-min-height, 0);
1089
+ z-index: 2;
1090
+ }
1091
+
1092
+ [data-merge-conflict-actions] {
1093
+ z-index: 2;
1094
+ }
1095
+
1096
+ [data-separator="custom"] {
1097
+ grid-template-columns: subgrid;
1098
+ display: grid;
1099
+ }
1100
+
1101
+ [data-line], [data-column-number], [data-no-newline] {
1102
+ padding-inline: 1ch;
1103
+ position: relative;
1104
+ }
1105
+
1106
+ [data-indicators="classic"] [data-line] {
1107
+ padding-inline-start: 2ch;
1108
+ }
1109
+
1110
+ [data-indicators="classic"] {
1111
+ & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
1112
+ &[data-no-newline], &[data-line] {
1113
+ &:before {
1114
+ user-select: none;
1115
+ width: 1ch;
1116
+ height: 1lh;
1117
+ display: inline-block;
1118
+ position: absolute;
1119
+ top: 0;
1120
+ left: 0;
1121
+ }
1122
+ }
1123
+ }
1124
+
1125
+ & [data-line-type="change-addition"] {
1126
+ &[data-line], &[data-no-newline] {
1127
+ &:before {
1128
+ content: "+";
1129
+ color: var(--diffs-addition-base);
1130
+ }
1131
+ }
1132
+ }
1133
+
1134
+ & [data-line-type="change-deletion"] {
1135
+ &[data-line], &[data-no-newline] {
1136
+ &:before {
1137
+ content: "-";
1138
+ color: var(--diffs-deletion-base);
1139
+ }
1140
+ }
1141
+ }
1142
+ }
1143
+
1144
+ [data-indicators="bars"] {
1145
+ & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
1146
+ &[data-column-number] {
1147
+ &:before {
1148
+ content: "";
1149
+ user-select: none;
1150
+ contain: strict;
1151
+ width: 4px;
1152
+ height: 100%;
1153
+ display: block;
1154
+ position: absolute;
1155
+ top: 0;
1156
+ left: 0;
1157
+ }
1158
+ }
1159
+ }
1160
+
1161
+ & [data-line-type="change-deletion"] {
1162
+ &[data-column-number] {
1163
+ &:before {
1164
+ background-image: linear-gradient(0deg,
1165
+ var(--diffs-bg-deletion) 50%,
1166
+ var(--diffs-deletion-base) 50%);
1167
+ background-repeat: repeat;
1168
+ background-size: 2px 2px;
1169
+ background-size: calc(1lh / round(1lh / 2px))
1170
+ calc(1lh / round(1lh / 2px));
1171
+ }
1172
+ }
1173
+ }
1174
+
1175
+ & [data-line-type="change-addition"] {
1176
+ &[data-column-number] {
1177
+ &:before {
1178
+ background-color: var(--diffs-addition-base);
1179
+ }
1180
+ }
1181
+ }
1182
+ }
1183
+
1184
+ [data-overflow="wrap"] {
1185
+ & [data-line] {
1186
+ white-space: pre-wrap;
1187
+ word-break: break-word;
1188
+ }
1189
+
1190
+ & [data-annotation-content] {
1191
+ word-break: break-word;
1192
+ }
1193
+ }
1194
+
1195
+ [data-overflow="scroll"] [data-line] {
1196
+ white-space: pre;
1197
+ min-height: 1lh;
1198
+ }
1199
+
1200
+ [data-column-number] {
1201
+ box-sizing: content-box;
1202
+ text-align: right;
1203
+ user-select: none;
1204
+ color: var(--diffs-fg-number);
1205
+ padding-left: 2ch;
1206
+ }
1207
+
1208
+ [data-line-number-content] {
1209
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
1210
+ z-index: 1;
1211
+ display: inline-block;
1212
+ position: relative;
1213
+ }
1214
+
1215
+ [data-disable-line-numbers] {
1216
+ & [data-gutter-buffer], & [data-column-number] {
1217
+ min-width: 4px;
1218
+ padding: 0;
1219
+
1220
+ &:before {
1221
+ min-width: 0;
1222
+ }
1223
+ }
1224
+
1225
+ & [data-line-number-content] {
1226
+ display: none;
1227
+ }
1228
+
1229
+ & [data-gutter-utility-slot] {
1230
+ right: unset;
1231
+ justify-content: flex-start;
1232
+ left: 0;
1233
+ }
1234
+
1235
+ &[data-indicators="bars"] [data-gutter-utility-slot] {
1236
+ left: 6px;
1237
+ }
1238
+ }
1239
+
1240
+ [data-file][data-disable-line-numbers] {
1241
+ & [data-gutter-buffer], & [data-column-number] {
1242
+ border-right: 0;
1243
+ min-width: 0;
1244
+ }
1245
+ }
1246
+
1247
+ [data-diff-span] {
1248
+ box-decoration-break: clone;
1249
+ border-radius: 3px;
1250
+ }
1251
+
1252
+ [data-line-type="change-addition"] [data-diff-span] {
1253
+ background-color: var(--diffs-bg-addition-emphasis);
1254
+ }
1255
+
1256
+ [data-line-type="change-deletion"] [data-diff-span] {
1257
+ background-color: var(--diffs-bg-deletion-emphasis);
1258
+ }
1259
+
1260
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
1261
+ color: var(--diffs-fg);
1262
+ padding-left: 1ch;
1263
+ }
1264
+
1265
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
1266
+ align-items: center;
1267
+ display: flex;
1268
+
1269
+ &:after {
1270
+ color: var(--diffs-fg-conflict-marker);
1271
+ font-size: .75rem;
1272
+ font-style: normal;
1273
+ line-height: 1.25rem;
1274
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1275
+ padding-left: 1ch;
1276
+ }
1277
+ }
1278
+
1279
+ [data-merge-conflict="marker-start"]:after {
1280
+ content: "(Current Change)";
1281
+ }
1282
+
1283
+ [data-merge-conflict="marker-end"]:after {
1284
+ content: "(Incoming Change)";
1285
+ }
1286
+
1287
+ [data-merge-conflict-actions-content] {
1288
+ min-height: 1.75rem;
1289
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1290
+ color: var(--diffs-fg);
1291
+ align-items: center;
1292
+ gap: .25rem;
1293
+ padding-inline: .5rem;
1294
+ font-size: .75rem;
1295
+ line-height: 1.2;
1296
+ display: flex;
1297
+ }
1298
+
1299
+ [data-merge-conflict-action] {
1300
+ appearance: none;
1301
+ color: var(--diffs-fg-number);
1302
+ font: inherit;
1303
+ cursor: pointer;
1304
+ background: none;
1305
+ border: 0;
1306
+ padding: 0;
1307
+ font-style: normal;
1308
+ }
1309
+
1310
+ [data-merge-conflict-action]:hover {
1311
+ color: var(--diffs-fg);
1312
+ }
1313
+
1314
+ [data-merge-conflict-action="current"]:hover {
1315
+ color: var(--diffs-addition-base);
1316
+ }
1317
+
1318
+ [data-merge-conflict-action="incoming"]:hover {
1319
+ color: var(--diffs-modified-base);
1320
+ }
1321
+
1322
+ [data-merge-conflict-action-separator] {
1323
+ color: var(--diffs-fg-number);
1324
+ opacity: .6;
1325
+ user-select: none;
1326
+ }
1327
+
1328
+ [data-diffs-header="default"] {
1329
+ background-color: var(--diffs-bg);
1330
+ justify-content: space-between;
1331
+ align-items: center;
1332
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1333
+ min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
1334
+ z-index: 2;
1335
+ flex-direction: row;
1336
+ padding-inline: 16px;
1337
+ display: flex;
1338
+ position: relative;
1339
+ top: 0;
1340
+ }
1341
+
1342
+ [data-header-content] {
1343
+ align-items: center;
1344
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1345
+ white-space: nowrap;
1346
+ flex-direction: row;
1347
+ min-width: 0;
1348
+ display: flex;
1349
+ }
1350
+
1351
+ [data-header-content] [data-prev-name], [data-header-content] [data-title] {
1352
+ text-overflow: ellipsis;
1353
+ white-space: nowrap;
1354
+ direction: rtl;
1355
+ min-width: 0;
1356
+ overflow: hidden;
1357
+ }
1358
+
1359
+ [data-prev-name] {
1360
+ opacity: .7;
1361
+ }
1362
+
1363
+ [data-rename-icon] {
1364
+ fill: currentColor;
1365
+ flex-grow: 0;
1366
+ flex-shrink: 0;
1367
+ }
1368
+
1369
+ [data-diffs-header="default"] [data-metadata] {
1370
+ white-space: nowrap;
1371
+ align-items: center;
1372
+ gap: 1ch;
1373
+ display: flex;
1374
+ }
1375
+
1376
+ [data-diffs-header="default"] [data-additions-count] {
1377
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1378
+ color: var(--diffs-addition-base);
1379
+ }
1380
+
1381
+ [data-diffs-header="default"] [data-deletions-count] {
1382
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1383
+ color: var(--diffs-deletion-base);
1384
+ }
1385
+
1386
+ [data-change-icon] {
1387
+ fill: currentColor;
1388
+ flex-shrink: 0;
1389
+ }
1390
+
1391
+ [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
1392
+ color: var(--diffs-modified-base);
1393
+ }
1394
+
1395
+ [data-change-icon="new"] {
1396
+ color: var(--diffs-addition-base);
1397
+ }
1398
+
1399
+ [data-change-icon="deleted"] {
1400
+ color: var(--diffs-deletion-base);
1401
+ }
1402
+
1403
+ [data-change-icon="file"] {
1404
+ opacity: .6;
1405
+ }
1406
+
1407
+ [data-annotation-content] {
1408
+ z-index: 2;
1409
+ isolation: isolate;
1410
+ white-space: normal;
1411
+ align-self: flex-start;
1412
+ min-width: 0;
1413
+ display: flow-root;
1414
+ position: relative;
1415
+ }
1416
+
1417
+ [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
1418
+ width: var(--diffs-column-content-width, auto);
1419
+ left: var(--diffs-column-number-width, 0);
1420
+ position: sticky;
1421
+ }
1422
+
1423
+ [data-annotation-slot] {
1424
+ text-wrap-mode: wrap;
1425
+ word-break: normal;
1426
+ white-space-collapse: collapse;
1427
+ }
1428
+
1429
+ [data-gutter-utility-slot] {
1430
+ touch-action: none;
1431
+ justify-content: flex-end;
1432
+ display: flex;
1433
+ position: absolute;
1434
+ top: 0;
1435
+ bottom: 0;
1436
+ right: 0;
1437
+ }
1438
+
1439
+ [data-utility-button] {
1440
+ appearance: none;
1441
+ cursor: pointer;
1442
+ width: 1lh;
1443
+ height: 1lh;
1444
+ font-size: var(--diffs-font-size, 13px);
1445
+ line-height: var(--diffs-line-height, 20px);
1446
+ background-color: var(--diffs-modified-base);
1447
+ color: var(--diffs-bg);
1448
+ fill: currentColor;
1449
+ z-index: 4;
1450
+ touch-action: none;
1451
+ border: none;
1452
+ border-radius: 4px;
1453
+ justify-content: center;
1454
+ align-items: center;
1455
+ margin-right: calc(-1lh + 1ch);
1456
+ padding: 0;
1457
+ display: flex;
1458
+ position: relative;
1459
+
1460
+ &:before {
1461
+ content: "";
1462
+ display: block;
1463
+ position: absolute;
1464
+ inset: 0 0 0 -4px;
1465
+ }
1466
+ }
1467
+
1468
+ [data-decoration-bar-stack] {
1469
+ pointer-events: none;
1470
+ isolation: isolate;
1471
+ z-index: 1;
1472
+ background-color: var(--diffs-decoration-bar-color, transparent);
1473
+ box-sizing: content-box;
1474
+ border-left: 2px solid var(--diffs-bg);
1475
+ border-right: 2px solid var(--diffs-bg);
1476
+ width: 6px;
1477
+ position: absolute;
1478
+ top: 0;
1479
+ bottom: 0;
1480
+ right: -2px;
1481
+
1482
+ [data-decoration-bar-depth="1"] & {
1483
+ background-color: color-mix(in lab,
1484
+ var(--diffs-bg) 20%,
1485
+ var(--diffs-decoration-bar-color, transparent));
1486
+ }
1487
+
1488
+ [data-decoration-bar-depth="2"] & {
1489
+ background-color: color-mix(in lab,
1490
+ var(--diffs-bg) 45%,
1491
+ var(--diffs-decoration-bar-color, transparent));
1492
+ }
1493
+
1494
+ [data-decoration-bar-depth="3"] & {
1495
+ background-color: color-mix(in lab,
1496
+ var(--diffs-bg) 65%,
1497
+ var(--diffs-decoration-bar-color, transparent));
1498
+ }
1499
+
1500
+ [data-decoration-bar-start] & {
1501
+ border-top-left-radius: 5px;
1502
+ border-top-right-radius: 5px;
1503
+ }
1504
+
1505
+ [data-decoration-bar-end] & {
1506
+ z-index: 3;
1507
+ border-bottom-right-radius: 5px;
1508
+ border-bottom-left-radius: 5px;
1509
+ }
1510
+ }
1511
+
1512
+ [data-placeholder] {
1513
+ contain: strict;
1514
+ }
1515
+
1516
+ [data-error-wrapper] {
1517
+ padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
1518
+ var(--diffs-gap-inline, var(--diffs-gap-fallback));
1519
+ scrollbar-width: none;
1520
+ max-height: 400px;
1521
+ overflow: auto;
1522
+
1523
+ & [data-error-message] {
1524
+ color: var(--diffs-deletion-base);
1525
+ font-size: 18px;
1526
+ font-weight: bold;
1527
+ }
1528
+
1529
+ & [data-error-stack] {
1530
+ color: var(--diffs-fg-number);
1531
+ }
1532
+ }
1533
+ }
1534
+
1535
+ @layer theme, rendered, unsafe;
1536
+ `;let Ac;function Al(e){if(Ac!=null)return Ac;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const n=document.createElement("div");n.setAttribute("data-code",""),n.setAttribute(Dz,"true");const i=document.createElement("div");return i.style.position="relative",i.style.width="200%",i.style.height="200%",n.appendChild(i),e.appendChild(n),Ac=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),Ac}function aT(e){return`${lE}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}const sT="@layer base, theme, rendered, unsafe;",Oj=new RegExp(`${Dj(lE)}\\s*:\\s*[^;]+;`);function lT(e){return`${sT}
1537
+ @layer unsafe {
1538
+ ${e}
1539
+ }`}function uT(e,t="system",n){return`${sT}
1540
+ @layer rendered {
1541
+ :host {${t==="system"?"":`
1542
+ color-scheme: ${t};`}
1543
+ ${aT(n)}
1544
+ ${e}
1545
+ }
1546
+ }`}function cT(e,t){const n=aT(t);return e.replace(Oj,n)}function Dj(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ed({code:e,pre:t,columnType:n,rowSpan:i,containerSize:o=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),n!=null&&e.setAttribute(`data-${n}`,""),t?.appendChild(e)),i!=null?e.style.setProperty("grid-row",`span ${i}`):e.style.removeProperty("grid-row"),o?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function dT(e,t){if(t==null)return;const n=e.shadowRoot??e.attachShadow({mode:"open"});n.innerHTML===""&&(n.innerHTML=t)}function fT(e,{type:t,diffIndicators:n,disableBackground:i,disableLineNumbers:o,overflow:s,split:l,totalLines:c,customProperties:d}){if(d!=null)for(const f in d){const p=d[f];p!=null&&e.setAttribute(f,`${p}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),n){case"bars":case"classic":e.setAttribute("data-indicators",n);break;case"none":e.removeAttribute("data-indicators");break}return o?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),i?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",l?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",s),e.style.setProperty("--diffs-min-number-column-width-default",`${`${c}`.length}ch`),e}function Ed(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}function hT(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function EC(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,themeType:e?.themeType,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:hT(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,unsafeCSS:e?.unsafeCSS,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}function Og(e,t){const n=e?.offsetHeight??0;if(e==null||n===0){t();return}e.style.minHeight=`${n}px`;try{t(),e.offsetHeight}finally{e.style.minHeight=""}}function pT({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===""){t?.remove();return}return t??=Mj(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function Mj(){const e=document.createElement("style");return e.setAttribute(Rz,""),e}let Ij;function mT(){return Ij??="safari"in window&&"pushNotification"in window.safari||/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const i=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(Rj)),i.adoptedStyleSheets=[e]}connectedCallback(){Al(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(xy,t)}const Nj=[""];let zj=-1;var gT=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file:${++zj}`;type="file";fileContainer;spriteSVG;pre;code;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;errorWrapper;placeHolder;lastRenderedHeaderHTML;cachedHeaderHTML;appliedPreAttributes;lastRowCount;mounted=!1;headerElement;headerCustom;headerPrefix;headerFilenameSuffix;headerMetadata;fileRenderer;resizeManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;file;renderRange;enabled=!0;editor;constructor(t={theme:mt},n,i=!1){this.options=t,this.workerManager=n,this.isContainerManaged=i,this.fileRenderer=new Tj(t,this.handleHighlightRender,this.workerManager),this.resizeManager=new EE,this.interactionManager=new wE("file",dd(t)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){!this.enabled||this.file==null||this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}__getCurrentFile(){return this.file}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(dd(this.options))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const n=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===n?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Qa(this.appliedThemeCSS.theme,this.options.theme??mt)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}setSelectedLines(t,n){this.interactionManager.setSelection(t,n)}setEditorActiveLine(t,n){this.interactionManager.setEditorActiveLine(t,{lineNumberOnly:n?.lineNumberOnly,side:n?.side??"additions"})}getCodeScrollLeft(){return this.code?.scrollLeft??0}setCodeScrollLeft(t){this.code!=null&&(this.code.scrollLeft=t)}__getEffectiveCodeOptions(){return{...this.options,...this.fileRenderer.getEffectiveCodeOptions()}}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t==="wrap",columnVariables:this.shouldApplyColumnVariables(t)?"apply":"measure"}),this.managersDirty=!1}shouldApplyColumnVariables(t){return t==="scroll"&&this.lineAnnotations.length>0}cleanUp(t=!1){this.emitPostRender(!0),this.editor?.cleanUp(t),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,t||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.pre=void 0,this.code=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,t?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:n,prerenderedHTML:i,preventEmit:o=!1,file:s,lineAnnotations:l}=t;if(!this.enabled)throw new Error("File.hydrate: attempting to call hydrate after cleaned up");if(this.fileContainer!=null)throw new Error("File.hydrate: hydrate can only be called before the instance has rendered or hydrated");this.hydrateElements(n,i),Pj(this.pre,s,this.options.collapsed)||Hj(this.headerElement,s,this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({file:s,lineAnnotations:l}),o||this.emitPostRender()}hydrateElements(t,n){this.fileContainer!==t&&this.emitPostRender(!0),dT(t,n);for(const i of Array.from(t.shadowRoot?.children??[])){if(i instanceof SVGElement){this.spriteSVG=i;continue}if(i instanceof HTMLElement){if(i instanceof HTMLPreElement){this.pre=i,this.appliedPreAttributes=void 0;continue}if(i instanceof HTMLStyleElement&&i.hasAttribute("data-theme-css")){this.themeCSSStyle=i;continue}if(i instanceof HTMLStyleElement&&i.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=i,this.appliedUnsafeCSS=i.textContent;continue}if("diffsHeader"in i.dataset){this.headerElement=i,this.lastRenderedHeaderHTML=void 0;continue}}}this.pre!=null&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({file:t,lineAnnotations:n}){this.lineAnnotations=n??this.lineAnnotations,this.file=t,this.fileRenderer.setOptions(EC(this.options)),this.syncInteractionOptions(),this.pre!=null&&(this.fileRenderer.hydrate(t),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(t=this.file){return t!=null?this.fileRenderer.getOrCreateLineCache(t):Nj}updateBuffers(t){this.pre!=null&&this.applyBuffers(this.pre,t)}syncRenderViewToEditor(){const t=this.editor,n=this.fileContainer,i=this.file,o=this.lineAnnotations,s=this.renderRange;t!=null&&n!=null&&i!=null&&this.fileRenderer.initializeHighlighter().then(l=>{!this.enabled||this.editor!==t||this.fileContainer!==n||this.file!==i||t.__syncRenderView(l,n,i,o,s)})}attachEditor(t){this.editor?.cleanUp(),this.editor=t,this.fileRenderer.beginEditSession();const n=this.file==null?void 0:t.__prepareFile?.(this.file);return n!==void 0&&n!==this.file?this.renderPreparedFile({file:n,forceRender:!0,preventEmit:!0,renderRange:this.renderRange}):this.fileRenderer.editorRenderReady()?this.syncRenderViewToEditor():this.rerender(),()=>{this.editor=void 0,this.fileRenderer.endEditSession()}}applyDocumentChange(t,n){this.fileRenderer.applyDocumentChange(t),n!=null&&n!==this.lineAnnotations&&this.file!=null&&(this.setLineAnnotations(n),this.fileRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations())}updateRenderCache(t,n,i){this.fileRenderer.updateRenderCache(t,n,i?.lineCountChangeInFlight)}render(t){if(!this.enabled)throw new Error("File.render: attempting to call render after cleaned up");const n=this.editor?.__prepareFile?.(t.file)??t.file;return this.renderPreparedFile(n===t.file?t:{...t,file:n})}renderPreparedFile({file:t,fileContainer:n,forceRender:i=!1,preventEmit:o=!1,containerWrapper:s,deferManagers:l=!1,lineAnnotations:c,renderRange:d}){this.editor?.__postponeBgTokenizeToNextFrame();const{collapsed:f=!1,themeType:p="system"}=this.options,m=f?void 0:d,g=this.renderRange,v=this.hasThemeChanged(),x=c!=null&&(c.length>0||this.lineAnnotations.length>0)?c!==this.lineAnnotations:!1,S=!qn(this.file,t)||this.fileRenderer.hasUnkeyedFileContentsChanged(t);if(!f&&!i&&ef(m,this.renderRange)&&!S&&!x&&!v)return this.applyCachedThemeState(p);this.renderRange=m,S&&(this.cachedHeaderHTML=void 0),this.file=t,this.fileRenderer.setOptions(EC(this.options)),this.syncInteractionOptions(),c!=null&&this.setLineAnnotations(c),this.fileRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:C=!1,disableFileHeader:_=!1}=this.options;if(_&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),n=this.getOrCreateFileContainerNode(n,s),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const w=this.fileRenderer.renderFile(t,uE);w!=null&&this.applyThemeState(n,w.themeStyles,p,w.baseThemeType),w?.headerAST!=null&&this.applyHeaderToDOM(w.headerAST,n),this.injectUnsafeCSS()}catch(w){if(C)throw w;console.error(w),w instanceof Error&&this.applyErrorToDOM(w,n)}return o||this.emitPostRender(),!0}try{const w=this.getOrCreatePreNode(n);if(!this.canPartiallyRender(i,x,S||v)||!this.applyPartialRender(g,m)){const k=this.fileRenderer.renderFile(t,m);if(k==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(n,k.themeStyles,p,k.baseThemeType),k.headerAST!=null&&this.applyHeaderToDOM(k.headerAST,n),this.applyFullRender(k,w)}this.applyBuffers(w,m),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,l||this.flushManagers(),this.editor!=null&&this.syncRenderViewToEditor()}catch(w){if(C)throw w;console.error(w),w instanceof Error&&this.applyErrorToDOM(w,n)}return o||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:n,options:{onPostRender:i}}=this;if(t){if(!this.mounted||(this.mounted=!1,n==null))return;i?.(n,this,"unmount");return}if(n==null)return;const o=this.mounted?"update":"mount";this.mounted=!0,i?.(n,this,o)}removeRenderedCode(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.code?.remove(),this.code=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(t,n,i){return!(t||n||i)}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const n=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",n.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}async primeHighlightCache(t=this.file){const{workerManager:n}=this;if(t==null||n==null||!n.isWorkingPool()||t.cacheKey==null||Tl(t))return;const i=this.options.tokenizeMaxLength??1e5;this.fileRenderer.getOrCreateLineCache(t).length>i||await n.primeFileHighlightCache(t).catch(o=>{console.error(o)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.code?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.code=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:i}of this.annotationCache.values())i.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:n}=this.options;if(n!=null&&this.lineAnnotations.length>0)for(const[i,o]of this.lineAnnotations.entries()){const s=`${i}-${ei(o)}`;let l=this.annotationCache.get(s);if(l==null||!Aj(o,l.annotation)){l?.element.remove();const c=n(o);if(c==null)continue;l={element:iT(ei(o)),annotation:o},l.element.appendChild(c),this.fileContainer.appendChild(l.element),this.annotationCache.set(s,l)}t.delete(s)}for(const[i,{element:o}]of t.entries())this.annotationCache.delete(i),o.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=t(this.interactionManager.getHoveredLine);if(n!=null&&this.gutterUtilityContent!=null)return;if(n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const i=rT();i.appendChild(n),this.fileContainer.appendChild(i),this.gutterUtilityContent=i}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,n=this.fileContainer?.shadowRoot;if(n!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===n&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=oT(),this.unsafeCSSStyle.parentNode!==n&&n.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=lT(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,n,i,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),l=o??i,c=this.options.theme??mt,d=typeof c=="string"?c:{...c},f=Al(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===l&&this.appliedThemeCSS.scrollbarGutter===f){this.appliedThemeCSS.theme=d;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:d,themeStyles:n,themeType:l,baseThemeType:o,scrollbarGutter:f};return}this.themeCSSStyle=pT({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:uT(n,l,f)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:d,themeStyles:n,themeType:l,baseThemeType:o,scrollbarGutter:f}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=cT(this.themeCSSStyle.textContent??"",Al(t)))}shouldGuardRebuildScroll(){return this.editor!=null&&mT()}applyFullRender(t,n){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,t);const i=this.code=ed({code:this.code}),o=this.fileRenderer.renderCodeAST(t);this.editor?.__captureFocusForDOMReplacement();const s=()=>{if(i.childElementCount>=2)for(let l=0;l<2;l++){const c=i.children[l],d=o[l];c.innerHTML=Zt(d.children),c.style.cssText=d.properties.style}else i.innerHTML=Zt(o);n.contains(i)||n.replaceChildren(i)};this.shouldGuardRebuildScroll()?Og(n,s):s(),this.lastRowCount=t.rowCount}applyPartialRender(t,n){if(t==null||n==null)return!1;const{file:i,code:o}=this,s=o!=null?this.getColumns(o):void 0;if(i==null||o==null||s==null)return!1;const l=t.startingLine,c=n.startingLine,d=t.totalLines===1/0?Number.POSITIVE_INFINITY:l+t.totalLines,f=n.totalLines===1/0?Number.POSITIVE_INFINITY:c+n.totalLines,p=Math.max(l,c),m=Math.min(d,f);if(m<=p)return!1;if(!this.trimDOMToOverlap(s.gutter,p,m)||!this.trimDOMToOverlap(s.content,p,m))throw new Error("File.applyPartialRender: failed to trim to overlap");let{length:g}=s.content.children;const v=(_,w)=>{if(!(w<=0))return this.fileRenderer.renderFile(i,{startingLine:_,totalLines:w,bufferBefore:0,bufferAfter:0})},x=c<p?v(c,p-c):void 0;if(x===void 0&&c<p)return!1;const S=f===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Math.max(0,f-m),C=f>m?v(m,S):void 0;return C===void 0&&f>m?!1:(this.cleanupErrorWrapper(),x!=null&&(s.gutter.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(x.gutterAST)),s.content.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(x.contentAST)),g+=x.rowCount),C!=null&&(s.gutter.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(C.gutterAST)),s.content.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(C.contentAST)),g+=C.rowCount),this.lastRowCount!==g&&(s.gutter.style.setProperty("grid-row",`span ${g}`),s.content.style.setProperty("grid-row",`span ${g}`),this.lastRowCount=g),!0)}getColumns(t){const n=t.children[0],i=t.children[1];if(!(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||n.dataset.gutter==null||i.dataset.content==null))return{gutter:n,content:i}}trimDOMToOverlap(t,n,i){const o=this.getDOMBoundaryIndices(t,[n,i]),s=o.get(n)??t.children.length,l=o.get(i)??t.children.length;if(s>l)return!1;for(let c=t.children.length-1;c>=l;c-=1)t.children[c]?.remove();for(let c=s-1;c>=0;c-=1)t.children[c]?.remove();return!0}getDOMBoundaryIndices(t,n){const i=[...new Set(n)].sort((d,f)=>d-f),o=new Map;if(i.length===0)return o;let s=0,l=i[s];const{children:c}=t;l===0&&(o.set(0,0),s+=1,l=i[s]);for(let d=0;d<c.length;d+=1){const f=c[d];if(!(f instanceof HTMLElement))continue;const p=this.getLineIndexFromDOMNode(f);if(p!=null){for(;l!=null&&p>=l;)o.set(l,d),s+=1,l=i[s];if(s>=i.length)break}}for(const d of i)o.has(d)||o.set(d,c.length);return o}getLineIndexFromDOMNode(t){const n=t.dataset.lineIndex;if(n==null)return;const i=Number(n);return Number.isNaN(i)?void 0:i}applyBuffers(t,n){if(n==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}n.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${n.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),n.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${n.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyHeaderToDOM(t,n){const{file:i}=this;if(i==null)return;this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const o=this.cachedHeaderHTML??Zt(t);if(this.cachedHeaderHTML=o,o!==this.lastRenderedHeaderHTML){const f=document.createElement("div");f.innerHTML=o;const p=f.firstElementChild;if(!(p instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(p,this.headerElement):n.shadowRoot?.prepend(p),this.headerElement=p,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged)return;const{renderHeaderPrefix:s,renderHeaderFilenameSuffix:l,renderCustomHeader:c,renderHeaderMetadata:d}=this.options;if(c!=null){const f=c(i)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,Hl,f),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0}else{const f=s?.(i)??void 0,p=l?.(i)??void 0,m=d?.(i)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,Sy,f),this.headerFilenameSuffix=this.upsertHeaderSlotElement(n,this.headerFilenameSuffix,_y,p),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,Cy,m),this.headerCustom?.remove(),this.headerCustom=void 0}}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,n,i,o){if(o==null){n?.remove();return}const s=n??this.createHeaderSlotElement(i);return n==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,o),s}replaceHeaderSlotContent(t,n){t.replaceChildren(),n instanceof Element?t.appendChild(n):t.innerText=`${n}`}createHeaderSlotElement(t){const n=document.createElement("div");return n.slot=t,n}getOrCreateFileContainerNode(t,n){const{fileContainer:i}=this,o=t??i??document.createElement("diffs-container"),s=i!==o;return i!=null&&s&&this.editor?.__captureFocusForDOMReplacement(),s&&this.emitPostRender(!0),this.fileContainer=o,i!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:n}=t;if(n!=null)for(const i of n.children)i instanceof SVGElement?this.spriteSVG??=i:Ed(i)&&i.hasAttribute("data-theme-css")?(this.themeCSSStyle??=i,this.hasAdoptedThemeCSS=!0):Ed(i)&&i.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=i,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const i=document.createElement("div");i.innerHTML=tT;const o=i.firstChild;o instanceof SVGElement&&(this.spriteSVG=o)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==n&&n.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.code=void 0,n.appendChild(this.pre)):this.pre.parentNode!==n&&(this.editor?.__captureFocusForDOMReplacement(),t.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(t){this.code=void 0;for(const n of Array.from(t.children))if(n instanceof HTMLElement&&n.hasAttribute("data-code")){this.code=n;return}}applyPreNodeAttributes(t,{totalLines:n}){const{overflow:i="scroll",disableLineNumbers:o=!1}=this.options,s={type:"file",split:!1,overflow:i,disableLineNumbers:o,diffIndicators:"none",disableBackground:!0,totalLines:n};nT(s,this.appliedPreAttributes)||(fT(t,s),this.appliedPreAttributes=s)}applyErrorToDOM(t,n){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const i=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",i.appendChild(this.errorWrapper);const o=document.createElement("div");o.dataset.errorMessage="",o.innerText=t.message,this.errorWrapper.appendChild(o);const s=document.createElement("pre");s.dataset.errorStack="",s.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(s)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Pj(e,t,n=!1){return!n&&e==null&&t!=null}function Hj(e,t,n=!1){return e==null&&t!=null&&!n}function td(e){return{...wy,...e}}function yi(e,t){const n=jj(e,t);return t?n:e.diffHeaderHeight+n}function jj(e,t){return e.paddingTop??(t?e.spacing:0)}function kd(e){return e.paddingBottom??e.spacing}function Bj(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}const Uj=5e3;let Vj=-1;function Fj(e,t){return(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS}var Gj=class extends gT{virtualizer;metrics;__id=`virtualized-file:${++Vj}`;top;height=0;cache={heights:new Map,checkpoints:[],fileAnnotationHeight:0};isVisible=!1;isSetup=!1;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n=wy,i,o=!1){super(e,i,o),this.virtualizer=t,this.metrics=n}setMetrics(e,t=!1){const n=td(e);!t&&ud(this.metrics,n)||(this.metrics=n,this.resetLayoutCache())}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache()}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}hasLineAnnotations(){return this.lineAnnotations.some(e=>e.lineNumber>0)}getLineHeight(e,t=!1){const n=this.cache.heights.get(e);if(n!=null)return n;const i=t?2:1;return this.metrics.lineHeight*i}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!Ud(t,e),i=Fj(t,e);super.setOptions(e),i&&this.resetLayoutCache(!0),n&&(this.forceRenderOverride=!0),n&&this.virtualizer.instanceChanged(this,i)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache(e=!1,t=!0){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heights.size>0&&this.cache.heights.clear(),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.renderRange!=null&&t&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;if(this.fileContainer==null||this.file==null)return this.height!==0&&(e=!0),this.height=0,e;const{overflow:t="scroll"}=this.options;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled()||this.code==null)return e;const n=this.code.children[1];if(!(n instanceof HTMLElement))return e;const i=Lg(this.lineAnnotations);if(this.renderRange!=null&&i&&tf(this.renderRange)){const o=$j(n)??0;o!==this.cache.fileAnnotationHeight&&(this.cache.fileAnnotationHeight=o,e=!0)}else!i&&this.cache.fileAnnotationHeight!==0&&(this.cache.fileAnnotationHeight=0,e=!0);for(const o of n.children){if(!(o instanceof HTMLElement))continue;const s=o.dataset.lineIndex;if(s==null)continue;const l=Number(s);let c=o.getBoundingClientRect().height,d=!1;o.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in o.nextElementSibling.dataset||"noNewline"in o.nextElementSibling.dataset)&&("noNewline"in o.nextElementSibling.dataset&&(d=!0),c+=o.nextElementSibling.getBoundingClientRect().height);const f=this.getLineHeight(l,d);c!==f&&(e=!0,c===this.metrics.lineHeight*(d?2:1)?this.cache.heights.delete(l):this.cache.heights.set(l,c))}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null||this.file==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render({file:this.file}));prepareCodeViewItem(e,t,n,i){const o=this.syncLineAnnotations(i),s=!qn(this.file,e)||this.fileRenderer.hasUnkeyedFileContentsChanged(e);let l=n?.resetFileLayoutCache===!0||s||o;n?.metrics!=null&&(this.metrics=n.metrics,l=!0);const{collapsed:c=!1}=this.options;return this.currentCollapsed!==c&&(this.currentCollapsed=c,l=!0),l&&this.resetLayoutCache(),this.file!==e&&(this.layoutDirty=!0),this.file=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e){if(this.file==null||e<1)return;const{disableFileHeader:t=!1,collapsed:n=!1}=this.options,i=this.fileRenderer.getLineCount(this.file)-1;let o=yi(this.metrics,t);if(n||i<0)return{top:o,height:0};const s=Math.min(Math.max(e-1,0),i),{overflow:l="scroll"}=this.options,{lineHeight:c}=this.metrics;if(o+=this.cache.fileAnnotationHeight,l==="scroll"&&!this.hasLineAnnotations())return{top:o+s*c,height:c};const d=this.getLayoutCheckpointBeforeLineIndex(s);o=d?.top??o;for(let f=d?.lineIndex??0;f<s;f++)o+=this.getLineHeight(f,!1);return{top:o,height:this.getLineHeight(s,!1)}}getEditorViewport(){return this.virtualizer.type==="simple"?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){if(this.file==null||this.renderRange==null)return;const{disableFileHeader:t=!1,collapsed:n=!1,overflow:i="scroll"}=this.options;if(n||this.renderRange.totalLines<=0)return;const o=this.fileRenderer.getLineCount(this.file)-1;if(o<0)return;const s=yi(this.metrics,t),l=Math.min(this.renderRange.startingLine,o),c=Math.min(l+this.renderRange.totalLines-1,o);if(c<l)return;const{fileAnnotationHeight:d}=this.cache;if(i==="scroll"&&!this.hasLineAnnotations()){const{lineHeight:p}=this.metrics,m=s+(l===0?d:this.renderRange.bufferBefore),g=l+Math.max(Math.ceil((e-m)/p),0);return g>c?void 0:{lineNumber:g+1,top:s+d+g*p}}let f=s+(l===0?d:this.renderRange.bufferBefore);for(let p=l;p<=c;p++){if(f>=e)return{lineNumber:p+1,top:f};f+=this.getLineHeight(p)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.file==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.file,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:i,totalLines:o}=t;let s=0;if(o===0){const l=e??this.virtualizer.getWindowSpecs();this.top<l.top&&(s=i)}return{topOffset:this.top+n+s,height:this.height-(n+i)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache(),this.isSetup=!1,super.cleanUp(e)}computeApproximateSize(e=!1,t=this.file){const n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;const i=this.height===0;if(this.height=0,this.cache.checkpoints=[],t==null){this.layoutDirty=!1;return}const{disableFileHeader:o=!1,collapsed:s=!1,overflow:l="scroll"}=this.options,{lineHeight:c}=this.metrics,d=this.fileRenderer.getLineCount(t),f=yi(this.metrics,o),p=kd(this.metrics);if(this.height+=f,s){this.layoutDirty=!1;return}if(this.height+=this.cache.fileAnnotationHeight,l==="scroll"&&!this.hasLineAnnotations())this.height+=d*c;else for(let m=0;m<d;m++)this.addLayoutCheckpoint(m,this.height),this.height+=this.getLineHeight(m,!1);if(d>0&&(this.height+=p),this.fileContainer!=null&&n&&!i){const m=this.fileContainer.getBoundingClientRect();m.height!==this.height?console.log("VirtualizedFile.computeApproximateSize: computed height doesnt match",{name:t.name,elementHeight:m.height,computedHeight:this.height}):console.log("VirtualizedFile.computeApproximateSize: computed height IS CORRECT")}this.layoutDirty=!1}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.file==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}applyDocumentChange(e,t,n=!1){const{renderRange:i}=this;if(this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(this.isSimpleMode(),!1),!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&i!==void 0&&this.file!==void 0){const o=this.virtualizer.getWindowSpecs(),s=this.computeRenderRangeFromWindow(this.file,this.top??0,o);s.bufferAfter!==i.bufferAfter&&this.updateBuffers(s)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}renderPreparedFile({fileContainer:e,file:t,forceRender:n=!1,lineAnnotations:i,...o}){const s=this.file==null||!qn(this.file,t)||this.fileRenderer.hasUnkeyedFileContentsChanged(t),{forceRenderOverride:l,isSetup:c}=this;this.forceRenderOverride=void 0;const d=this.syncLineAnnotations(i);if(d&&this.resetLayoutCache(),e=this.getOrCreateFileContainerNode(e),t==null)return console.error("VirtualizedFile.render: attempting to virtually render when we dont have file"),!1;if(c)this.top??=this.getVirtualizedTop(),s&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(!1),this.computeApproximateSize(!1,t));else{this.computeApproximateSize(!1,t);const v=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(v==null)throw new Error("VirtualizedFile.render: simple virtualizer is not available");v.connect(e,this),this.isVisible=v.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!s||!c))return this.file=t,s&&(this.cachedHeaderHTML=void 0),this.renderPlaceholder(this.height);const f=this.virtualizer.getWindowSpecs(),p=this.top??0,m=this.computeRenderRangeFromWindow(t,p,f),g=super.renderPreparedFile({file:t,fileContainer:e,renderRange:m,lineAnnotations:i,forceRender:(l??n)||d||s,...o});return this.isSimpleMode()&&g&&this.getSimpleVirtualizer()?.requestHeightReconcile(this),g}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}addLayoutCheckpoint(e,t){e%Uj===0&&this.cache.checkpoints.push({lineIndex:e,top:t})}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,i;for(;t<=n;){const o=t+n>>1,s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFile: invalid checkpoint index");s.lineIndex<=e?(i=s,t=o+1):n=o-1}return i}getLayoutCheckpointBeforeTop(e,t){let n=0,i=this.cache.checkpoints.length-1,o=-1;for(;n<=i;){const s=n+i>>1,l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFile: invalid checkpoint index");l.top<=e?(o=s,n=s+1):i=s-1}if(t==null)return o>=0?this.cache.checkpoints[o]:void 0;for(let s=o;s>=0;s--){const l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFile: invalid checkpoint index");if(l.lineIndex%t===0)return l}}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type==="advanced"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}computeRenderRangeFromWindow(e,t,{top:n,bottom:i}){const{disableFileHeader:o=!1,overflow:s="scroll"}=this.options,{hunkLineCount:l,lineHeight:c}=this.metrics,d=this.fileRenderer.getLineCount(e),f=this.height,p=yi(this.metrics,o),m=d>0?kd(this.metrics):0,{fileAnnotationHeight:g}=this.cache,v=p+g,x=Math.max(0,f-p-g-m),S=Lg(this.lineAnnotations),C=t+p,_=g>0&&S&&C<i&&C+g>n;if(t<n-f||t>i)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-p-m};if(d<=l)return{startingLine:0,totalLines:l,bufferBefore:0,bufferAfter:0};const w=Math.ceil(Math.max(i-n,0)/c),k=Math.ceil(w/l)*l+l,D=k/l,M=(n+i)/2;if(s==="scroll"&&!this.hasLineAnnotations()){const le=t+v,fe=le+x;if(!_&&!(le<i&&fe>n))return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-p-m};const re=Math.floor(_&&M<t+v?0:(M-(t+v))/c),de=Math.floor(re/l)-Math.floor(D/2),_e=Math.ceil(d/l),pe=Math.max(0,Math.min(de,_e))*l,Pe=de<0?k+de*l:k,je=pe===0?0:g+pe*c,st=Math.min(Pe,d-pe);return{startingLine:pe,totalLines:Pe,bufferBefore:je,bufferAfter:Math.max(0,(d-pe-st)*c)}}const O=D,z=[],j=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-k*c*2),l);let F=t+(j?.top??v),ee=j?.lineIndex??0,q,U,Z;const X=j?.lineIndex??0;for(let le=X;le<d;le++){const fe=ee%l===0,re=Math.floor(ee/l);if(fe&&(z[re]=F-(t+v),Z!=null)){if(Z<=0)break;Z--}const de=this.getLineHeight(le,!1);F>n-de&&F<i&&(q??=re),F+de>M&&(U??=re),Z==null&&F>=i&&fe&&(Z=O),ee++,F+=de}if(q==null)if(_)q=0,U=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-p-m};U??=q;const W=Math.round(U-D/2),P=Math.max(0,Math.ceil(d/l)-D),$=Math.max(0,Math.min(W,P)),ne=$*l,ue=W<0?k+W*l:k,R=z[$]??0,H=ne===0?0:g+R,Y=$+ue/l,I=Y<z.length?x-z[Y]:x-(F-t-v);return{startingLine:ne,totalLines:ue,bufferBefore:H,bufferAfter:Math.max(0,I)}}};function $j(e){let t;for(const n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===Zk&&(t=Math.max(t??0,n.getBoundingClientRect().height));return t}function wo(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function qj(e){return{...e,hunks:e.hunks.map(t=>({...t,hunkContent:t.hunkContent.map(n=>({...n}))})),deletionLines:[...e.deletionLines],additionLines:[...e.additionLines]}}function Dg(e){return e!==""?e.split(Ez):[]}function Td(e,t,n){const i=e==="clone"?qj(t):t;if(!i.isPartial)throw new Error("hydratePartialDiff: fileDiff must be partial");switch(i.type){case"change":case"rename-changed":return Wj(i,Xj(i,n),kC(i,n));case"rename-pure":{const o=kC(i,n);Kj(i,n);const s=Dg(o.contents);return i.isPartial=!1,i.deletionLines=s,i.additionLines=s,yT(i,null,o),i}}throw new Error(`hydratePartialDiff: ${i.type} diffs cannot be hydrated from loaded files`)}function Wj(e,t,n){const i=Dg(t.contents),o=Dg(n.contents),{hunks:s,splitLineCount:l,unifiedLineCount:c}=Yj(e.hunks,o.length);return e.hunks=s,e.splitLineCount=l,e.unifiedLineCount=c,e.isPartial=!1,e.deletionLines=i,e.additionLines=o,yT(e,t,n),e}function Yj(e,t){let n=0,i=0,o=0;const s=[];for(const l of e){const c=Math.max(l.additionStart-1,0),d=Math.max(l.deletionStart-1,0);let f=c,p=d,m=0,g=0,v=0,x=0;const S=[];for(const _ of l.hunkContent){if(_.type==="context"){S.push({..._,additionLineIndex:f,deletionLineIndex:p}),f+=_.lines,p+=_.lines,v+=_.lines,x+=_.lines;continue}S.push({..._,additionLineIndex:f,deletionLineIndex:p}),f+=_.additions,p+=_.deletions,m+=_.additions,g+=_.deletions,v+=Math.max(_.additions,_.deletions),x+=_.additions+_.deletions}const C=Math.max(_i(l.additionStart,l.additionCount)-o,0);s.push({...l,collapsedBefore:C,additionLineIndex:c,deletionLineIndex:d,additionLines:m,deletionLines:g,hunkContent:S,splitLineStart:n+C,unifiedLineStart:i+C,splitLineCount:v,unifiedLineCount:x}),n+=C+v,i+=C+x,o=hn(l.additionStart,l.additionCount)}if(s.length>0){const l=s[s.length-1],c=hn(l.additionStart,l.additionCount),d=Math.max(t-c,0);n+=d,i+=d}return{hunks:s,splitLineCount:n,unifiedLineCount:i}}function Xj(e,t){if(t.oldFile==null)throw new Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile`);return t.oldFile}function kC(e,t){if(t.newFile==null)throw new Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires newFile`);return t.newFile}function Kj(e,t){if(t.oldFile!==null)throw new Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile to be null`)}function Qj(e,t,n){return e.cacheKey!=null?`${e.cacheKey}:hydrated`:Zj(t,n)}function yT(e,t,n){const i=Qj(e,t,n);if(i==null){delete e.cacheKey;return}e.cacheKey=i}function Zj(e,t){return e!=null&&t!=null?e.cacheKey!=null&&t.cacheKey!=null?`${e.cacheKey}:${t.cacheKey}`:void 0:e?.cacheKey??t?.cacheKey}var Jj=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,t,n){if(t==null||n==null)for(const i of e.children??[])i instanceof HTMLElement&&("deletions"in i.dataset?t=i:"additions"in i.dataset&&(n=i));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function pi(e,t){return Qa(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function Lc(e){return Te({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Rc(e){return Te({tagName:"div",children:[Te({tagName:"span",children:[xi("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function vm(e){return Te({tagName:"div",children:[cd({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","data-expand-button":"","data-expand-both":e==="both"?"":void 0,"data-expand-up":e==="up"?"":void 0,"data-expand-down":e==="down"?"":void 0}})}function Ma({type:e,content:t,expandIndex:n,chunked:i=!1,slotName:o,isFirstHunk:s,isLastHunk:l}){let c=0;const d=[];if(e==="metadata"&&t!=null&&d.push(Te({tagName:"div",children:[xi(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const f=[];n!=null&&(i?(s||(f.push(vm("up")),c++),l||(f.push(vm("down")),c++)):(f.push(vm(!s&&!l?"both":s?"down":"up")),c++)),f.push(Te({tagName:"div",children:[Te({tagName:"span",children:[xi(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),i&&n!=null&&f.push(Te({tagName:"div",children:[xi("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),d.push(Te({tagName:"div",children:f,properties:{"data-separator-wrapper":"","data-separator-multi-button":c>1?"":void 0}}))}return e==="custom"&&o!=null&&d.push(Te({tagName:"slot",properties:{name:o}})),Te({tagName:"div",children:d,properties:{"data-separator":d.length===0?"simple":e,"data-expand-index":n,"data-separator-first":s?"":void 0,"data-separator-last":l?"":void 0}})}function eB(e,t){return`hunk-separator-${e}-${t}`}function tB(e){const t=e.at(-1);return t==null?0:Math.max(hn(t.additionStart,t.additionCount),hn(t.deletionStart,t.deletionCount))}function Mg(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function TC({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}}function Oc({item:e,arr:t,enableJoin:n,isNeutral:i=!1,isLastItem:o=!1}){const s=t[t.length-1];if(s==null||o||!n){t.push([i?0:1,e.value]);return}const l=s[0]===0;if(i===l||i&&e.value.length===1&&!l){s[1]+=e.value;return}t.push([i?0:1,e.value])}function Ll(e){return[_i(e.additionStart,e.additionCount)+1,hn(e.additionStart,e.additionCount)+1]}function ir({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:o}){const s=Math.max(t,0);if(s===0||e)return{fromStart:0,fromEnd:0,rangeSize:s,collapsedLines:s,renderAll:!1};if(n===!0||s<=o)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const l=n?.get(i),c=Math.min(Math.max(l?.fromStart??0,0),s),d=Math.min(Math.max(l?.fromEnd??0,0),s),f=c+d,p=f>=s;return{fromStart:p?s:c,fromEnd:p?0:d,rangeSize:s,collapsedLines:Math.max(s-f,0),renderAll:p}}function nB(e){const t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;const n=e.additionLines.length-hn(t.additionStart,t.additionCount),i=e.deletionLines.length-hn(t.deletionStart,t.deletionCount);return n<=0&&i<=0?!1:n!==i}function vT({fileDiff:e,errorPrefix:t}){const n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const i=e.additionLines.length-hn(n.additionStart,n.additionCount),o=e.deletionLines.length-hn(n.deletionStart,n.deletionCount);if(i<=0&&o<=0)return 0;if(i!==o)throw new Error(`${t}: trailing context mismatch (additions=${i}, deletions=${o}) for ${e.name}`);return Math.min(i,o)}function rr({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:i,errorPrefix:o}){if(t!==e.hunks.length-1)return;const s=vT({fileDiff:e,errorPrefix:o});if(s<=0)return;if(n===!0||s<=i)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const l=n?.get(e.hunks.length),c=Math.min(Math.max(l?.fromStart??0,0),s);return{fromStart:c,fromEnd:0,rangeSize:s,collapsedLines:s-c,renderAll:c>=s}}function bT({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:i}){if(n===!0||e.isPartial)return!0;for(const[c,d]of e.hunks.entries()){const[f,p]=Ll(d);if(t<f){const m=ir({isPartial:e.isPartial,rangeSize:d.collapsedBefore,expandedHunks:n,hunkIndex:c,collapsedContextThreshold:i}),g=f-m.rangeSize;return m.renderAll||t<g+m.fromStart||t>=f-m.fromEnd}if(t<p)return!0}const o=rr({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:i,errorPrefix:"isAdditionLineRenderable"});if(o==null||o.renderAll)return!0;const s=e.hunks[e.hunks.length-1],[,l]=Ll(s);return t<l+o.fromStart||t>=l+o.rangeSize}function iB({fileDiff:e,lineNumber:t,direction:n,expandedHunks:i,collapsedContextThreshold:o}){if(i===!0||e.isPartial)return t;const s=[];let l=1;for(const[d,f]of e.hunks.entries()){const[p,m]=Ll(f),g=ir({isPartial:e.isPartial,rangeSize:f.collapsedBefore,expandedHunks:i,hunkIndex:d,collapsedContextThreshold:o}),v=p-g.rangeSize;g.renderAll?s.push([v,p]):(g.fromStart>0&&s.push([v,v+g.fromStart]),g.fromEnd>0&&s.push([p-g.fromEnd,p])),s.push([p,m]),l=m}const c=rr({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:i,collapsedContextThreshold:o,errorPrefix:"getNearestRenderableAdditionLine"});if(c!=null){const d=l;l=d+c.rangeSize,c.renderAll?s.push([d,l]):c.fromStart>0&&s.push([d,d+c.fromStart])}if(t>=l)return t;if(n==="down"){for(const[d,f]of s)if(f>t)return Math.max(d,t);return}for(let d=s.length-1;d>=0;d--){const[f,p]=s[d];if(f<=t)return Math.min(p-1,t)}}function xT({type:e,metrics:t}){return t.hunkSeparatorHeight??Bj(e)}function ST({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function rB({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case"simple":return t>0;case"metadata":return n!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function oB(e){return e!=="simple"&&e!=="metadata"}function sl({type:e,metrics:t,hunkIndex:n,hunkSpecs:i}){if(!rB({type:e,hunkIndex:n,hunkSpecs:i}))return;const o=xT({type:e,metrics:t}),s=ST({type:e,metrics:t}),l=n>0?s:0,c=s;return{height:o,gapBefore:l,gapAfter:c,totalHeight:l+o+c}}function So({type:e,metrics:t}){if(!oB(e))return;const n=xT({type:e,metrics:t}),i=ST({type:e,metrics:t});return{height:n,gapBefore:i,gapAfter:0,totalHeight:i+n}}function Ao({diff:e,diffStyle:t,startingLine:n=0,totalLines:i=1/0,expandedHunks:o,collapsedContextThreshold:s=1,callback:l}){const c=aB({diff:e,diffStyle:t,startingLine:n,expandedHunks:o,collapsedContextThreshold:s}),d={viewportStart:n,viewportEnd:n+i,isWindowedHighlight:n>0||i<1/0,splitCount:c.splitCount,unifiedCount:c.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!d.isWindowedHighlight)return!1;const f=d.unifiedCount>=n+i,p=d.splitCount>=n+i;return t==="unified"?f:(t==="split"||f)&&p},shouldSkip(f,p){if(!d.isWindowedHighlight)return!1;const m=f>0&&d.unifiedCount+f<=n,g=p>0&&d.splitCount+p<=n;return t==="unified"?m:(t==="split"||m)&&g},incrementCounts(f,p){(t==="unified"||t==="both")&&(d.unifiedCount+=f),(t==="split"||t==="both")&&(d.splitCount+=p)},isInWindow(f,p){if(!d.isWindowedHighlight)return!0;const m=d.isInUnifiedWindow(f),g=d.isInSplitWindow(p);return t==="unified"?m:t==="split"?g:m||g},isInUnifiedWindow(f){return!d.isWindowedHighlight||d.unifiedCount>=n-f&&d.unifiedCount<n+i},isInSplitWindow(f){return!d.isWindowedHighlight||d.splitCount>=n-f&&d.splitCount<n+i},emit(f,p=!1){return p||(t==="unified"?d.incrementCounts(1,0):t==="split"?d.incrementCounts(0,1):d.incrementCounts(1,1)),l(f)??!1}};e:for(let f=c.hunkIndex;f<e.hunks.length;f++){let w=function(U,Z){return C==null||C.collapsedLines<=0||C.fromStart+C.fromEnd>0?0:t==="unified"?U===p.unifiedLineStart+p.unifiedLineCount-1?C.collapsedLines:0:Z===p.splitLineStart+p.splitLineCount-1?C.collapsedLines:0},D=function(){return k?0:(k=!0,S.collapsedLines)};const p=e.hunks[f];if(p==null)throw new Error("iterateOverDiff: invalid hunk index");if(d.shouldBreak())break;const m=_i(p.deletionStart,p.deletionCount),g=_i(p.additionStart,p.additionCount),v=!e.isPartial&&p.deletionCount===0?m:p.deletionLineIndex,x=!e.isPartial&&p.additionCount===0?g:p.additionLineIndex,S=ir({isPartial:e.isPartial,rangeSize:p.collapsedBefore,expandedHunks:o,hunkIndex:f,collapsedContextThreshold:s}),C=f===d.finalHunkIndex?rr({fileDiff:e,hunkIndex:f,expandedHunks:o,collapsedContextThreshold:s,errorPrefix:"iterateOverDiff"}):void 0,_=S.fromStart+S.fromEnd;let k=S.collapsedLines===0;if(d.shouldSkip(_,_))d.incrementCounts(_,_),D();else{let U=p.unifiedLineStart-S.rangeSize,Z=p.splitLineStart-S.rangeSize,X=v-S.rangeSize,W=x-S.rangeSize,P=m+1-S.rangeSize,$=g+1-S.rangeSize;if(Dc(d,S.fromStart,t,ne=>d.emit({hunkIndex:f,hunk:p,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:P+ne,lineIndex:X+ne,noEOFCR:!1,unifiedLineIndex:U+ne,splitLineIndex:Z+ne},additionLine:{unifiedLineIndex:U+ne,splitLineIndex:Z+ne,lineIndex:W+ne,lineNumber:$+ne,noEOFCR:!1}}))||(U=p.unifiedLineStart-S.fromEnd,Z=p.splitLineStart-S.fromEnd,X=v-S.fromEnd,W=x-S.fromEnd,P=m+1-S.fromEnd,$=g+1-S.fromEnd,Dc(d,S.fromEnd,t,ne=>d.emit({hunkIndex:f,hunk:p,collapsedBefore:D(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:P+ne,lineIndex:X+ne,noEOFCR:!1,unifiedLineIndex:U+ne,splitLineIndex:Z+ne},additionLine:{unifiedLineIndex:U+ne,splitLineIndex:Z+ne,lineIndex:W+ne,lineNumber:$+ne,noEOFCR:!1}}),()=>{D()})))break e}let M=p.unifiedLineStart,O=p.splitLineStart,z=v,j=x,F=m+1,ee=g+1;const q=p.hunkContent.at(-1);for(const U of p.hunkContent){if(d.shouldBreak())break e;const Z=U===q;if(U.type==="context"){if(d.shouldSkip(U.lines,U.lines))d.incrementCounts(U.lines,U.lines),D();else if(Dc(d,U.lines,t,X=>{const W=Z&&X===U.lines-1,P=M+X,$=O+X;return d.emit({hunkIndex:f,hunk:p,collapsedBefore:D(),collapsedAfter:w(P,$),type:"context",deletionLine:{lineNumber:F+X,lineIndex:z+X,noEOFCR:W&&p.noEOFCRDeletions,unifiedLineIndex:P,splitLineIndex:$},additionLine:{unifiedLineIndex:P,splitLineIndex:$,lineIndex:j+X,lineNumber:ee+X,noEOFCR:W&&p.noEOFCRAdditions}})},()=>{D()}))break e;M+=U.lines,O+=U.lines,z+=U.lines,j+=U.lines,F+=U.lines,ee+=U.lines}else{const X=Math.max(U.deletions,U.additions),W=U.deletions+U.additions;if(!d.shouldSkip(W,X)){const P=uB(d,U,t);(P[0]?.[0]??0)>0&&D();for(const[$,ne]of P)for(let ue=$;ue<ne;ue++){const R=w(M+ue,t==="unified"?O+(ue<U.deletions?ue:ue-U.deletions):O+ue);if(d.emit(cB({hunkIndex:f,hunk:p,collapsedBefore:D(),collapsedAfter:R,diffStyle:t,index:ue,unifiedLineIndex:M,splitLineIndex:O,additionLineIndex:j,deletionLineIndex:z,additionLineNumber:ee,deletionLineNumber:F,content:U,isLastContent:Z,unifiedCount:W,splitCount:X}),!0))break e}}D(),d.incrementCounts(W,X),M+=W,O+=X,z+=U.deletions,j+=U.additions,F+=U.deletions,ee+=U.additions}}if(C!=null){const{collapsedLines:U,fromStart:Z,fromEnd:X}=C,W=Z+X;if(Dc(d,W,t,P=>{const $=P===W-1;return d.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:$?U:0,type:"context-expanded",deletionLine:{lineNumber:F+P,lineIndex:z+P,noEOFCR:!1,unifiedLineIndex:M+P,splitLineIndex:O+P},additionLine:{unifiedLineIndex:M+P,splitLineIndex:O+P,lineIndex:j+P,lineNumber:ee+P,noEOFCR:!1}})},void 0,()=>d.shouldBreak()))break e}}}function aB({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:o}){if(n<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const s=sB({diff:e,expandedHunks:i,collapsedContextThreshold:o});let l=0,c=e.hunks.length-1,d=e.hunks.length;for(;l<=c;){const p=l+c>>1,m=s[p+1];if(m==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?m.unifiedCount:m.splitCount)>n?(d=p,c=p-1):l=p+1}if(d>=e.hunks.length){const p=s[e.hunks.length];if(p==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:p.splitCount,unifiedCount:p.unifiedCount}}const f=s[d];if(f==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:d,splitCount:f.splitCount,unifiedCount:f.unifiedCount}}function sB({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let i=0,o=0;const s=e.hunks.length-1,l=[{splitCount:0,unifiedCount:0}];for(let c=0;c<e.hunks.length;c++){const d=e.hunks[c];if(d==null)throw new Error("iterateOverDiff: invalid hunk summary index");const f=ir({isPartial:e.isPartial,rangeSize:d.collapsedBefore,expandedHunks:t,hunkIndex:c,collapsedContextThreshold:n}),p=f.fromStart+f.fromEnd;i+=p+d.splitLineCount,o+=p+d.unifiedLineCount;const m=c===s?rr({fileDiff:e,hunkIndex:c,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:"iterateOverDiff"}):void 0;if(m!=null){const g=m.fromStart+m.fromEnd;i+=g,o+=g}l.push({splitCount:i,unifiedCount:o})}return l}function lB(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];const i=[];function o(c){const d=Math.max(0,e.viewportStart-c),f=Math.min(t,e.viewportEnd-c);f>d&&i.push([d,f])}if(n!=="split"&&o(e.unifiedCount),n!=="unified"&&o(e.splitCount),i.length===0)return[0,0];let s=i[0][0],l=i[0][1];for(let c=1;c<i.length;c++){const d=i[c];s=Math.min(s,d[0]),l=Math.max(l,d[1])}return[s,l]}function Dc(e,t,n,i,o,s){const[l,c]=lB(e,t,n);l>0&&(e.incrementCounts(l,l),o?.());let d=l;for(;d<t;){if(s?.()===!0)return!0;if(d>=c){e.incrementCounts(t-d,t-d);break}if(e.isInWindow(0,0)){if(i(d)===!0)return!0}else e.incrementCounts(1,1);d++}return!1}function uB(e,t,n){if(!e.isWindowedHighlight)return[[0,n==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const i=n!=="split",o=n!=="unified",s=n==="unified"?"unified":"split",l=[];function c(m,g){if(m+g<=e.viewportStart||m>=e.viewportEnd)return;const v=Math.max(0,e.viewportStart-m),x=Math.min(g,e.viewportEnd-m);return x>v?[v,x]:void 0}function d(m,g){return s==="split"?m:g==="additions"?[m[0]+t.deletions,m[1]+t.deletions]:m}function f(m,g){if(m==null)return;const[v,x]=d(m,g);x>v&&l.push([v,x])}if(i&&(f(c(e.unifiedCount,t.deletions),"deletions"),f(c(e.unifiedCount+t.deletions,t.additions),"additions")),o&&(f(c(e.splitCount,t.deletions),"deletions"),f(c(e.splitCount,t.additions),"additions")),l.length===0)return l;l.sort((m,g)=>m[0]-g[0]);const p=[l[0]];for(const[m,g]of l.slice(1)){const v=p[p.length-1];m<=v[1]?v[1]=Math.max(v[1],g):p.push([m,g])}return p}function cB({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,diffStyle:o,index:s,unifiedLineIndex:l,splitLineIndex:c,additionLineIndex:d,deletionLineIndex:f,additionLineNumber:p,deletionLineNumber:m,content:g,isLastContent:v,unifiedCount:x,splitCount:S}){const C=s<g.deletions?l+s:void 0,_=o==="unified"?s>=g.deletions?l+s:void 0:s<g.additions?l+g.deletions+s:void 0,w=o==="unified"?c+(s<g.deletions?s:s-g.deletions):c+s,k=s<g.deletions?f+s:void 0,D=s<g.deletions?m+s:void 0,M=o==="unified"?s>=g.deletions?d+(s-g.deletions):void 0:s<g.additions?d+s:void 0,O=o==="unified"?s>=g.deletions?p+(s-g.deletions):void 0:s<g.additions?p+s:void 0,z=o==="unified"?v&&s===g.deletions-1&&t.noEOFCRDeletions:v&&s===S-1&&t.noEOFCRDeletions,j=o==="unified"?v&&s===x-1&&t.noEOFCRAdditions:v&&s===S-1&&t.noEOFCRAdditions,F=k!=null&&D!=null&&C!=null?{lineNumber:D,lineIndex:k,noEOFCR:z,unifiedLineIndex:C,splitLineIndex:w}:void 0,ee=M!=null&&O!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:w,lineIndex:M,lineNumber:O,noEOFCR:j}:void 0;if(F==null&&ee!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:void 0,additionLine:ee};if(F!=null&&ee==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:F,additionLine:void 0};if(F==null||ee==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:F,additionLine:ee}}const dB={forcePlainText:!1};function _T(e,t,n,{forcePlainText:i,startingLine:o,totalLines:s,expandedHunks:l,collapsedContextThreshold:c=1}=dB){i?(o??=0,s??=1/0):(o=0,s=1/0);const d=o>0||s<1/0,f=typeof n.theme=="string"?t.getTheme(n.theme).type:void 0,p=Kk({theme:n.theme,highlighter:t}),m=i&&!d&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,g={deletionLines:[],additionLines:[]},{maxLineDiffLength:v}=n,x=!i&&!e.isPartial,S=i?l:void 0,C=new Map;function _(k){const D=x?0:k,M=C.get(D)??hB();return C.set(D,M),M}function w(k,D,M,O){if(d){let z=M.at(-1);(z==null||z.targetIndex+z.count!==D)&&(z={targetIndex:D,originalOffset:O.length,count:0},M.push(z)),z.count++}O.push(k)}Ao({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:d?S:!0,collapsedContextThreshold:c,callback:({hunkIndex:k,additionLine:D,deletionLine:M,type:O})=>{const z=_(k),j=D!=null?D.splitLineIndex:M.splitLineIndex;O==="change"&&D!=null&&M!=null&&fB({additionLine:e.additionLines[D.lineIndex],deletionLine:e.deletionLines[M.lineIndex],deletionLineIndex:z.deletionContent.length,additionLineIndex:z.additionContent.length,deletionDecorations:z.deletionDecorations,additionDecorations:z.additionDecorations,lineDiffType:m,maxLineDiffLength:v}),M!=null&&(w(e.deletionLines[M.lineIndex],M.lineIndex,z.deletionSegments,z.deletionContent),z.deletionInfo.push({type:O==="change"?"change-deletion":O,lineNumber:M.lineNumber,altLineNumber:O==="change"?void 0:D.lineNumber??void 0,lineIndex:`${M.unifiedLineIndex},${j}`})),D!=null&&(w(e.additionLines[D.lineIndex],D.lineIndex,z.additionSegments,z.additionContent),z.additionInfo.push({type:O==="change"?"change-addition":O,lineNumber:D.lineNumber,altLineNumber:O==="change"?void 0:M.lineNumber??void 0,lineIndex:`${D.unifiedLineIndex},${j}`}))}});for(const k of C.values()){if(k.deletionContent.length===0&&k.additionContent.length===0)continue;const D={name:e.prevName??e.name,contents:k.deletionContent.value},M={name:e.name,contents:k.additionContent.value},{deletionLines:O,additionLines:z}=pB({deletionFile:D,deletionInfo:k.deletionInfo,deletionDecorations:k.deletionDecorations,additionFile:M,additionInfo:k.additionInfo,additionDecorations:k.additionDecorations,highlighter:t,options:n,languageOverride:i?"text":e.lang});if(x){g.deletionLines=O,g.additionLines=z;continue}if(k.deletionSegments.length>0)for(const j of k.deletionSegments)for(let F=0;F<j.count;F++)g.deletionLines[j.targetIndex+F]=O[j.originalOffset+F];else g.deletionLines.push(...O);if(k.additionSegments.length>0)for(const j of k.additionSegments)for(let F=0;F<j.count;F++)g.additionLines[j.targetIndex+F]=z[j.originalOffset+F];else g.additionLines.push(...z)}return{code:g,themeStyles:p,baseThemeType:f}}function fB({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:i,deletionDecorations:o,additionDecorations:s,lineDiffType:l,maxLineDiffLength:c}){if(e==null||t==null||l==="none"||(e=nr(e),t=nr(t),e.length>c||t.length>c))return;const d=l==="char"?aP(e,t):uP(e,t),f=[],p=[],m=l==="word-alt",g=d.at(-1);for(const x of d){const S=x===g;!x.added&&!x.removed?(Oc({item:x,arr:f,enableJoin:m,isNeutral:!0,isLastItem:S}),Oc({item:x,arr:p,enableJoin:m,isNeutral:!0,isLastItem:S})):x.removed?Oc({item:x,arr:f,enableJoin:m,isLastItem:S}):Oc({item:x,arr:p,enableJoin:m,isLastItem:S})}let v=0;for(const x of f)x[0]===1&&o.push(TC({line:n,spanStart:v,spanLength:x[1].length})),v+=x[1].length;v=0;for(const x of p)x[0]===1&&s.push(TC({line:i,spanStart:v,spanLength:x[1].length})),v+=x[1].length}function hB(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function pB({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:i,highlighter:o,deletionDecorations:s,additionDecorations:l,languageOverride:c,options:{theme:d=mt,...f}}){const p=c??Jt(e.name),m=c??Jt(t.name),{state:g,transformers:v}=Xk(f.useTokenTransformer),x=typeof d=="string"?{...f,lang:"text",theme:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:En("token"),tokenizeTimeLimit:0}:{...f,lang:"text",themes:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:En("token"),tokenizeTimeLimit:0};return{deletionLines:e.contents===""?[]:(x.lang=p,g.lineInfo=n,x.decorations=s,Ag(o.codeToHast(nr(e.contents),x))),additionLines:t.contents===""?[]:(x.lang=m,x.decorations=l,g.lineInfo=i,Ag(o.codeToHast(nr(t.contents),x)))}}function Ki(e,t){const n=Mo({name:e.prevName??e.name,contents:e.deletionLines.join("")},{name:e.name,contents:e.additionLines.join(""),lang:e.lang},t);return{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,additionLines:n.additionLines,deletionLines:n.deletionLines,type:n.type}}function mB(e,t){const n=Math.max(e,1);let i=Array.from({length:n},(o,s)=>`${" ".repeat(s+1)}
1547
+ `).join("");return i===t&&(i=Array.from({length:n},(o,s)=>`\0${" ".repeat(s)}
1548
+ `).join("")),i}function gB(e){for(const t of e)if(t.trim().length>0)return!1;return!0}function Ig(e,t){return t.length>0&&t.length<e.deletionLines.length&&gB(t)}function Ad(e,t,n){const i=e.deletionLines.join(""),o=mB(t.length,i),s=Mo({name:e.prevName??e.name,contents:i},{name:e.name,contents:o,lang:e.lang},n);return{hunks:s.hunks,splitLineCount:s.splitLineCount,unifiedLineCount:s.unifiedLineCount,additionLines:t,deletionLines:s.deletionLines,type:s.type}}function nd(e,t){return Ad(e,[""],t)}function CT(e,t){if(e.additionLines.length===0)return nd(e,t);if(Ig(e,e.additionLines))return Ad(e,e.additionLines,t);const n=e.additionLines,i=Ki(e,t);return wT(i,n),i}function yB(e){return e.length>1&&e.at(-1)===""}function wT(e,t){if(!yB(t))return;const n=t.length-e.additionLines.length;if(n<=0)return;const i=e.additionLines.length,o=e.hunks.at(-1);if(o!=null&&hn(o.additionStart,o.additionCount)===i){for(const s of o.hunkContent)if(s.type==="change"&&s.additions<s.deletions&&s.additionLineIndex+s.additions===i){e.additionLines=t,s.additions+=n,o.additionCount+=n,o.additionLines+=n,zy(e);return}}}function vB(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return Yi(e,Ki(e,n));const i=Array.from(t);if(i.length===0)return Yi(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(const s of i){const l=e.additionLines[s],c=e.deletionLines[s];if(l==null||c==null||nr(l)===nr(c))return Yi(e,Ki(e,n))}const o=bB(e,i);if(o.size===0)return Yi(e,Ki(e,n));for(const s of o)if(!SB(e,s,n))return Yi(e,Ki(e,n));return zy(e),nB(e)?Yi(e,Ki(e,n)):Yi(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function Yi(e,t){return Object.assign(e,t),t}function bB(e,t){const n=new Set;for(const i of t){const o=xB(e,i);if(o==null)return new Set;n.add(o)}return n}function xB(e,t){for(const[n,i]of e.hunks.entries()){const o=i.additionLineIndex+i.additionCount;if(t>=i.additionLineIndex&&t<o)return n}}function SB(e,t,n){const i=e.hunks[t];if(i==null)return!1;const o=e.deletionLines.slice(i.deletionLineIndex,i.deletionLineIndex+i.deletionCount),s=e.additionLines.slice(i.additionLineIndex,i.additionLineIndex+i.additionCount),l=Mo({name:e.prevName??e.name,contents:o.join("")},{name:e.name,contents:s.join(""),lang:e.lang},{...n,context:0}),c=l.hunks[0];return c==null||l.hunks.length!==1?!1:(_B(i,c),ET(e,t),!0)}function ET(e,t){const n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}const i=e.additionLines.at(-1),o=e.deletionLines.at(-1);n.noEOFCRAdditions=i!=null&&i!==""&&!i.endsWith(`
1549
+ `),n.noEOFCRDeletions=o!=null&&o!==""&&!o.endsWith(`
1550
+ `)}function _B(e,t){const n=e.additionLineIndex,i=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(o=>kT(o,n,i)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart=e.additionStart+t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=i+t.deletionLineIndex,e.deletionStart=e.deletionStart+t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,Ny(e)}function kT(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function Ny(e){let t=0,n=0;for(const i of e.hunkContent)i.type==="context"?(t+=i.lines,n+=i.lines):(t+=Math.max(i.additions,i.deletions),n+=i.additions+i.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function zy(e){let t=0,n=0,i=0;for(const o of e.hunks)o.collapsedBefore=Math.max(_i(o.additionStart,o.additionCount)-i,0),o.splitLineStart=t+o.collapsedBefore,o.unifiedLineStart=n+o.collapsedBefore,Ny(o),t+=o.collapsedBefore+o.splitLineCount,n+=o.collapsedBefore+o.unifiedLineCount,i=hn(o.additionStart,o.additionCount);if(e.hunks.length>0){const o=e.hunks[e.hunks.length-1],s=Math.max(e.additionLines.length-hn(o.additionStart,o.additionCount),0);t+=s,n+=s}e.splitLineCount=t,e.unifiedLineCount=n}const AC=new WeakMap;function CB(e){return e.length>1&&e[e.length-1]===""?e.slice(0,-1):e}function wB(e,t){const n=Math.min(e.length,t.length);let i=0;for(;i<n&&e[i]===t[i];)i++;let o=e.length,s=t.length;for(;o>i&&s>i&&e[o-1]===t[s-1];)o--,s--;if(!(i===o&&i===s))return{start:i,deletionEnd:o,additionEnd:s}}function Ng(e,t){const n=e.hunks,i=e.additionLines,o=CB(i),s=o===i?e:{...e,additionLines:o},l=MB(n,DB(s,t),e.deletionLines.length),c=zB(s,l);if(e.additionLines=o,e.hunks=c,e.editSessionDirty=!0,BB(e),wT(e,i),!!HB(n,e.hunks))return{regions:l.map(d=>d.previousSpan)}}function EB(e,t,n,i){const o=Array.from(new Set(t)).filter(d=>d>=0&&d<e.additionLines.length).sort((d,f)=>d-f);if(o.length===0)return;const{hunks:s}=e;let l,c=0;for(const d of o){for(;c<s.length;){const m=s[c];if(d<Ld(m)+m.additionCount)break;c++}const f=s[c],p=f==null?void 0:Ld(f);if(p==null||d<p||l!=null&&l!==c)return Ng(e,n);l=c}if(l!=null){if(kB(e,o,l,i,n)){e.editSessionDirty=!0;return}return Ng(e,n)}}function kB(e,t,n,i,o){if(i==null||o?.ignoreWhitespace===!0||o?.stripTrailingCr===!0)return!1;const s=TB(e),l=e.hunks[n];if(l.hunkContent.some(AB))return!1;for(const c of t){const d=i.get(c),f=e.additionLines[c];if(d==null||f==null||s.has(d)||s.has(f))return!1;let p=!1;for(const m of l.hunkContent)if(m.type==="change"&&m.additions===m.deletions&&c>=m.additionLineIndex&&c<m.additionLineIndex+m.additions){p=!0;break}if(!p)return!1}return!0}function TB(e){const t=AC.get(e);if(t?.lines===e.deletionLines)return t.set;const n=new Set(e.deletionLines);return AC.set(e,{lines:e.deletionLines,set:n}),n}function AB(e){return e?.type==="change"&&(e.additions===0||e.deletions===0)}function LB(e,t){const n=new Map,{regions:i}=t;for(let o=0;o<=i.length;o++){const s=i[o-1],l=i[o],c=o===0?e.get(0):s==null?void 0:e.get(s.lastIndex+1),d=l==null?void 0:e.get(l.firstIndex),f=c?.fromStart??0,p=d?.fromEnd??0;(f>0||p>0)&&n.set(o,{fromStart:f,fromEnd:p})}return n}function RB(e,t,n){const i=[];if(e.isPartial)return i;for(const[s,l]of e.hunks.entries()){const c=ir({isPartial:e.isPartial,rangeSize:l.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n});if(c.rangeSize<=n)continue;const d=zo(l),f=d-c.rangeSize;c.fromStart>0&&i.push([f,f+c.fromStart]),c.fromEnd>0&&i.push([d-c.fromEnd,d])}const o=rr({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:"captureExpansionAnchors"});if(o!=null&&o.fromStart>0&&o.rangeSize>n){const s=e.hunks[e.hunks.length-1],l=zo(s)+s.deletionCount;i.push([l,l+o.fromStart])}return i}function OB(e,t){const n=new Map;if(t.length===0)return n;const i=(s,l,c)=>{if(c<=l)return;let d=0,f=0;for(const[p,m]of t)m<=l||p>=c||(p<=l&&(d=Math.max(d,Math.min(m,c)-l)),m>=c&&(f=Math.max(f,c-Math.max(p,l))));(d>0||f>0)&&n.set(s,{fromStart:d,fromEnd:f})};for(const[s,l]of e.hunks.entries()){const c=zo(l);i(s,c-Math.max(l.collapsedBefore,0),c)}const o=e.hunks[e.hunks.length-1];return o!=null&&!e.isPartial&&e.deletionLines.length>0&&i(e.hunks.length,zo(o)+o.deletionCount,e.deletionLines.length),n}function LC(e,t){return e.editSessionDirty!==!0?!1:(e.editSessionDirty=void 0,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join("")===""?Ki(e,t):CT(e,t)),!0)}function DB(e,t){if(wB(e.deletionLines,e.additionLines)==null)return[];const n=Mo({name:e.prevName??e.name,contents:e.deletionLines.join("")},{name:e.name,contents:e.additionLines.join(""),lang:e.lang},t),i=[];let o=0,s=0;for(const l of n.hunks){const c=l.additionCount>0?l.additionLineIndex-o:l.deletionLineIndex-s;o+=c,s+=c;for(const d of l.hunkContent){if(d.type==="context"){o+=d.lines,s+=d.lines;continue}const f=kT(d,0,0);f.additions===0&&(f.additionLineIndex=o),f.deletions===0&&(f.deletionLineIndex=s),i.push(f),o+=f.additions,s+=f.deletions}}return i}function MB(e,t,n){const i=e.map((l,c)=>{const d=zo(l);return{deletionStart:d,deletionEnd:d+l.deletionCount,blocks:[],previousSpan:{firstIndex:c,lastIndex:c}}}),o=[];let s=0;for(const l of t){const c=l.deletionLineIndex,d=c+l.deletions;for(;s<i.length&&i[s].deletionEnd<c;)o.push(i[s]),s++;let f=o.length>0&&IB(c,d,o[o.length-1])?o.pop():void 0;for(;s<i.length&&i[s].deletionStart<=d;)f=NB(f,i[s]),s++;if(f==null){let p=c,m=d;if((l.deletions===0||l.additions===0)&&n>l.deletions){const g=o[o.length-1]?.deletionEnd??0,v=i[s]?.deletionStart??n;c>g?p--:d<v&&m++}f={deletionStart:p,deletionEnd:m,blocks:[],previousSpan:void 0}}f.deletionStart=Math.min(f.deletionStart,c),f.deletionEnd=Math.max(f.deletionEnd,d),f.blocks.push(l),o.push(f)}for(;s<i.length;)o.push(i[s]),s++;return o}function IB(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function NB(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function zB(e,t){const n=[];let i=0,o=0;for(const s of t){const l=s.deletionStart-i;if(l<0)throw new Error("buildRegionHunks: overlapping old-side regions");i+=l,o+=l;const c=o,d=[];for(const p of s.blocks){const m=p.deletionLineIndex-i,g=p.additionLineIndex-o;if(m<0||m!==g)throw new Error("buildRegionHunks: canonical block context mismatch");RC(d,m,o,i),i+=m,o+=g,d.push({...p}),i+=p.deletions,o+=p.additions}const f=s.deletionEnd-i;if(f<0)throw new Error("buildRegionHunks: block exceeds its old-side region");RC(d,f,o,i),i+=f,o+=f,n.push(PB(e,{additionStart:c,additionEnd:o,deletionStart:s.deletionStart,deletionEnd:s.deletionEnd},d))}if(e.deletionLines.length-i!==e.additionLines.length-o)throw new Error("buildRegionHunks: trailing context mismatch");return n}function PB(e,t,n){const i=t.additionEnd-t.additionStart,o=t.deletionEnd-t.deletionStart;let s=0,l=0;for(const d of n)d.type==="change"&&(s+=d.additions,l+=d.deletions);const c={collapsedBefore:0,additionStart:Mc(t.additionStart,i),additionCount:i,additionLines:s,additionLineIndex:DC(t.additionStart,i),deletionStart:Mc(t.deletionStart,o),deletionCount:o,deletionLines:l,deletionLineIndex:DC(t.deletionStart,o),hunkContent:n,hunkSpecs:`@@ -${Mc(t.deletionStart,o)},${o} +${Mc(t.additionStart,i)},${i} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return Ny(c),c}function RC(e,t,n,i){t>0&&e.push({type:"context",lines:t,additionLineIndex:n,deletionLineIndex:i})}function HB(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){const i=e[n],o=t[n];if(zo(i)!==zo(o)||i.deletionCount!==o.deletionCount||Ld(i)!==Ld(o)||i.additionCount!==o.additionCount||i.splitLineCount!==o.splitLineCount||!jB(i,o))return!0}return!1}function jB(e,t){const n=OC(e),i=OC(t);for(;;){const o=n.next(),s=i.next();if(o.done===!0||s.done===!0)return o.done===s.done;if(o.value[0]!==s.value[0]||o.value[1]!==s.value[1])return!1}}function*OC(e){for(const t of e.hunkContent){if(t.type==="context"){for(let i=0;i<t.lines;i++)yield[t.deletionLineIndex+i,t.additionLineIndex+i];continue}const n=Math.max(t.deletions,t.additions);for(let i=0;i<n;i++)yield[i<t.deletions?t.deletionLineIndex+i:void 0,i<t.additions?t.additionLineIndex+i:void 0]}}function Ld(e){return _i(e.additionStart,e.additionCount)}function zo(e){return _i(e.deletionStart,e.deletionCount)}function Mc(e,t){return t===0?e:e+1}function DC(e,t){return t===0?e-1:e}function BB(e){zy(e);for(let t=0;t<e.hunks.length;t++)ET(e,t)}function qa(e){const t=e.lang??Jt(e.name),n=e.lang??(e.prevName!=null?Jt(e.prevName):"text");return t==="text"&&n==="text"}let UB=-1;var VB=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++UB}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;editSessionActive=!1;constructor(e={theme:mt},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=gl(e.theme??mt)?Gk():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this),this.endEditSession()}beginEditSession(){this.editSessionActive=!0;const e=this.diffCache;e!=null&&!e.isPartial&&e.additionLines.length===0&&(Object.assign(e,nd(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache())}endEditSession(){this.editSessionActive=!1}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){const{renderCache:e}=this;if(e==null||qa(e.diff)||zc(e.diff,this.getTokenizeMaxLength()))return Promise.resolve();const{diff:t}=e,{workerManager:n}=this;return!this.editSessionActive&&n?.isWorkingPool()===!0&&t.cacheKey!=null?(n.evictDiffFromCache(t.cacheKey),n.primeDiffHighlightCache(t).then(()=>{this.applyRefreshedResult(t,n.getDiffResultCache(t))}).catch(i=>this.onHighlightError(i))):this.asyncHighlight(t).then(i=>this.applyRefreshedResult(t,i)).catch(i=>this.onHighlightError(i))}applyRefreshedResult(e,t){if(t==null||this.renderCache==null||this.renderCache.diff!==e||this.editSessionActive)return;const{options:n}=this.getRenderOptions(e);pi(n,t.options)&&(this.renderCache={diff:e,options:t.options,highlighted:!0,result:t.result,renderRange:void 0},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){const e=this.renderCache;this.renderCache=void 0,e!=null&&e.isDirty===!0&&e.diff.cacheKey!=null&&this.workerManager?.evictDiffFromCache(e.diff.cacheKey)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){const i={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(i.fromStart+=n),(t==="down"||t==="both")&&(i.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,i)}getExpandedHunk(e){return this.expandedHunks.get(e)??Iz}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const n=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),i=n[t.lineNumber]??[];n[t.lineNumber]=i,i.push(t)}}updateRenderCache(e,t,n=!1){if(this.renderCache==null)return!1;const{result:i,diff:o}=this.renderCache;if(i==null)return!1;if(o.isPartial)throw new Error("Could not update render cache for partial diff");const s=i.code.additionLines,l=[],c=new Map;for(const[f,p]of e){const m=s[f]?.properties??{},g=p.map(C=>C[2]).join(""),v=f<o.additionLines.length,x=v?o.additionLines[f]??"":"",S=nr(x);v&&(o.additionLines[f]=Jk(x,g),S!==g&&(l.push(f),c.set(f,x))),s[f]={type:"element",tagName:"div",properties:{"data-line":m["data-line"]??f+1,"data-line-index":m["data-line-index"]??f,"data-line-type":m["data-line-type"]??"context"},children:p.map(([C,_,w])=>C===0&&_===""?w===""?{type:"element",tagName:"br",properties:{},children:[]}:{type:"text",value:w}:{type:"element",tagName:"span",properties:{"data-char":C,style:`color:${_};`},children:[{type:"text",value:w}]})}}let d=!1;if(l.length>0)if(this.editSessionActive&&!o.isPartial){if(!n)if(o.additionLines.length<=1&&o.additionLines.join("")==="")Object.assign(o,nd(o,this.options.parseDiffOptions)),this.markEditSessionPass(o),d=!0;else if(Ig(o,o.additionLines))Object.assign(o,Ad(o,o.additionLines,this.options.parseDiffOptions)),this.markEditSessionPass(o),d=!0;else{const f=EB(o,l,this.options.parseDiffOptions,c);this.applyExpansionRemap(f),d=f!=null}}else Object.assign(o,vB(o,l,this.options.parseDiffOptions));return i.baseThemeType=t,this.renderCache.isDirty=!0,d}applyExpansionRemap(e){e!=null&&(this.expandedHunks=LB(this.expandedHunks,e))}applyDocumentChange(e){if(this.renderCache==null)return;const{diff:t,result:n}=this.renderCache;if(n==null)return;if(t.isPartial)throw new Error("Could not apply document change for partial diff");const{additionLines:i}=t;t.additionLines=qB(e,i),n.code.additionLines=$B(i,t.additionLines,n.code.additionLines,e),t.additionLines.length<=1&&t.additionLines.join("")===""?(Object.assign(t,nd(t,this.options.parseDiffOptions)),n.code.additionLines[0]=zg(0,e.getLineText(0)),this.markEditSessionPass(t)):this.editSessionActive?this.applySessionDocumentChange(t):Object.assign(t,CT(t,this.options.parseDiffOptions)),this.renderCache.isDirty=!0}applySessionDocumentChange(e){const{parseDiffOptions:t}=this.options,n=e.additionLines;if(Ig(e,n)){Object.assign(e,Ad(e,n,t)),this.markEditSessionPass(e);return}this.applyExpansionRemap(Ng(e,t))}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){const n=t==="change"?e==="deletions"?"change-deletion":"change-addition":t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>Tg(e);getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:n=!1,disableFileHeader:i=!1,disableLineNumbers:o=!1,disableVirtualizationBuffers:s=!1,collapsed:l=!1,expandUnchanged:c=!1,collapsedContextThreshold:d=1,expansionLineCount:f=100,hunkSeparators:p="line-info",lineDiffType:m="word-alt",maxLineDiffLength:g=1e3,overflow:v="scroll",stickyHeader:x=!1,theme:S=mt,headerRenderMode:C="default",tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:w=Mz,useTokenTransformer:k=!1,useCSSClasses:D=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:i,disableLineNumbers:o,disableVirtualizationBuffers:s,collapsed:l,expandUnchanged:c,collapsedContextThreshold:d,expansionLineCount:f,hunkSeparators:p,lineDiffType:m,maxLineDiffLength:g,overflow:v,stickyHeader:x,theme:this.workerManager?.getDiffRenderOptions().theme??S,headerRenderMode:C,tokenizeMaxLineLength:_,tokenizeMaxLength:w,useTokenTransformer:k,useCSSClasses:D}}async initializeHighlighter(){return this.highlighter=await wd(Wk(this.computedLang,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),n=zc(e,this.getTokenizeMaxLength());let i=this.workerManager?.getDiffResultCache(e);i!=null&&!pi(t,i.options)&&(i=void 0),this.renderCache??={diff:e,highlighted:!n&&!qa(e),options:t,result:n?void 0:i?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??Jt(e.name),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??mt}getEffectiveCodeOptions(){const e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0){const c=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&c.useTokenTransformer!==!0?{...c,useTokenTransformer:!0}:c}const{theme:i,tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:l}=this.getOptionsWithDefaults();return{theme:i,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:l}})();this.getOptionsWithDefaults();const{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!wo(e,n.diff)||!pi(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=ld){if(e==null)return;const{expandUnchanged:n,collapsedContextThreshold:i}=this.getOptionsWithDefaults();let{options:o,forceHighlight:s}=this.getRenderOptions(e);const l=this.getMatchingWorkerResultCache(e,o);l!=null&&!this.hasHighlightedRenderCache(e,o)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...l},s=!1),this.renderCache??={diff:e,highlighted:!1,options:o,result:void 0,renderRange:void 0};const c=e.additionLines.length>0||e.deletionLines.length>0,d=!c||qa(e)||zc(e,this.getTokenizeMaxLength()),f=!wo(e,this.renderCache.diff),p=!ef(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){const m=this.renderCache.result==null&&this.renderCache.highlighted&&!d&&!f&&Mg(t);m&&(this.renderCache.highlightPending=!0),!m&&(d||this.renderCache.result==null||!this.renderCache.highlighted&&(f||p))&&(this.renderCache.diff=e,this.renderCache.options=o,this.renderCache.highlighted=!1,(this.renderCache.result==null||f||p||s)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,Mg(t)||n?!0:this.expandedHunks,i)),this.renderCache.renderRange=t),!d&&c&&(!this.renderCache.highlighted||s)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLang=e.lang??Jt(e.name);const m=this.highlighter!=null&&gl(o.theme),g=this.highlighter!=null&&fd(this.computedLang),v=!d&&g;if(this.highlighter!=null&&m&&(s||d||!this.renderCache.highlighted&&v||this.renderCache.result==null)){const{result:x,options:S}=this.renderDiffWithHighlighter(e,this.highlighter,d||!g);this.renderCache={diff:e,options:S,highlighted:v,result:x,renderRange:void 0}}(!m||!d&&!g)&&this.asyncHighlight(e).then(({result:x,options:S})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.applyHighlightResult(e,x,S,!d)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=ld){const{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){const{diffIndicators:i,disableBackground:o,disableLineNumbers:s,overflow:l}=this.getOptionsWithDefaults();return qk({type:"diff",diffIndicators:i,disableBackground:o,disableLineNumbers:s,overflow:l,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){const t=zc(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Jt(e.name);const n=this.highlighter!=null&&gl(this.getLocalHighlightTheme()),i=t||this.highlighter!=null&&fd(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults(),s=_T(e,t,i,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:o});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===""&&s.code.additionLines[0]==null){let l;if(Ao({diff:e,diffStyle:"both",expandedHunks:n?!0:void 0,collapsedContextThreshold:o,callback:({additionLine:c})=>{if(c?.lineIndex===0)return l=c,!0}}),l==null)throw new Error("DiffHunksRenderer: missing empty addition line");s.code.additionLines[0]=zg(0,"",l.unifiedLineIndex,l.splitLineIndex)}return{result:s,options:i}}onHighlightSuccess(e,t,n,i=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,i)}applyHighlightResult(e,t,n,i=!0){if(this.renderCache==null)return;const o=this.renderCache.highlightPending===!0||!this.renderCache.highlighted||!pi(this.renderCache.options,n)||!wo(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:i,result:t,renderRange:void 0},o&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;const n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!pi(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&wo(e,n.diff)&&pi(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:i,baseThemeType:o}){const{diffStyle:s,disableFileHeader:l,expandUnchanged:c,expansionLineCount:d,collapsedContextThreshold:f,hunkSeparators:p}=this.getOptionsWithDefaults(),m=this.renderCache?.isDirty??!1;this.diff=e;const g=s==="unified",v=XB(e,this.options.loadDiffFiles!=null),x=!e.isPartial||v;let S=[],C=[],_=[];const w=[],{additionLines:k,deletionLines:D}=n,M={rowCount:0,hunkSeparators:p,additionsContentAST:S,deletionsContentAST:C,unifiedContentAST:_,unifiedGutterAST:ja(),deletionsGutterAST:ja(),additionsGutterAST:ja(),expansionLineCount:d,hunkData:w,incrementRowCount(P=1){M.rowCount+=P},pushToGutter(P,$){switch(P){case"unified":M.unifiedGutterAST.children.push($);break;case"deletions":M.deletionsGutterAST.children.push($);break;case"additions":M.additionsGutterAST.children.push($);break}}},O=vT({fileDiff:e,errorPrefix:"DiffHunksRenderer.processDiffResult"}),z={size:0,side:void 0,increment(){this.size+=1},flush(){if(s!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(M.pushToGutter("additions",wn(void 0,"buffer",this.size)),S?.push(Lc(this.size))):(M.pushToGutter("deletions",wn(void 0,"buffer",this.size)),C?.push(Lc(this.size))),this.size=0,this.side=void 0}}},j=(P,$,ne,ue,R)=>{M.pushToGutter(P,vE($,ne,ue,R))};function F(P){z.flush(),s==="unified"?bm("unified",P,M):(bm("deletions",P,M),bm("additions",P,M))}this.pushFileLevelAnnotations(e,s,t,M),Ao({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:c?!0:this.expandedHunks,collapsedContextThreshold:f,callback:({hunkIndex:P,hunk:$,collapsedBefore:ne,collapsedAfter:ue,additionLine:R,deletionLine:H,type:Y})=>{const I=H!=null?H.splitLineIndex:R.splitLineIndex,le=R!=null?R.unifiedLineIndex:H.unifiedLineIndex;s==="split"&&Y!=="change"&&z.flush(),ne>0&&F({hunkIndex:P,collapsedLines:ne,rangeSize:Math.max($?.collapsedBefore??0,0),hunkSpecs:$?.hunkSpecs,isFirstHunk:P===0,isLastHunk:!1,isExpandable:x});const fe=s==="unified"?le:I,re={type:Y,hunkIndex:P,lineIndex:fe,unifiedLineIndex:le,splitLineIndex:I,deletionLine:H,additionLine:R};if(s==="unified"){const He=this.getUnifiedInjectedRowsForLine?.(re);He?.before!=null&&IC(He.before,M);let Ve=H!=null?D[H.lineIndex]:void 0,rt=R!=null?k[R.lineIndex]:void 0;if(Ve==null&&rt==null){const Bt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(Bt,{file:e.name}),new Error(Bt)}const en=Y==="change"?R!=null?"change-addition":"change-deletion":Y,jt=this.getUnifiedLineDecoration({type:Y,lineType:en,additionLineIndex:R?.lineIndex,deletionLineIndex:H?.lineIndex});j("unified",jt.gutterLineType,R!=null?R.lineNumber:H.lineNumber,`${le},${I}`,jt.gutterProperties),rt!=null?rt=Nc(rt,jt.contentProperties,m&&R!=null?{"data-line":R.lineNumber,"data-line-index":`${le},${I}`}:void 0):Ve!=null&&(Ve=Nc(Ve,jt.contentProperties,m&&H!=null?{"data-line":H.lineNumber,"data-line-index":`${le},${I}`}:void 0)),Ic({diffStyle:"unified",type:Y,deletionLine:Ve,additionLine:rt,unifiedSpan:this.getAnnotations("unified",H?.lineNumber,R?.lineNumber,P,fe),createAnnotationElement:Bt=>this.createAnnotationElement(Bt),context:M}),He?.after!=null&&IC(He.after,M)}else{const He=this.getSplitInjectedRowsForLine?.(re);He?.before!=null&&NC(He.before,M,z);let Ve=H!=null?D[H.lineIndex]:void 0,rt=R!=null?k[R.lineIndex]:void 0;const en=this.getSplitLineDecoration({side:"deletions",type:Y,lineIndex:H?.lineIndex}),jt=this.getSplitLineDecoration({side:"additions",type:Y,lineIndex:R?.lineIndex});if(Ve==null&&rt==null){const dt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(dt,{file:e.name}),new Error(dt)}const Bt=(()=>{if(Y==="change"){if(rt==null)return"additions";if(Ve==null)return"deletions"}})();Bt!=null?(z.side!=null&&z.side!==Bt&&z.flush(),z.side=Bt,z.increment()):Y==="change"&&z.flush();const Wt=this.getAnnotations("split",H?.lineNumber,R?.lineNumber,P,fe);if(Wt!=null&&z.size>0&&z.flush(),H!=null){const dt=Nc(Ve,en.contentProperties,m?{"data-line":H.lineNumber,"data-line-index":`${H.unifiedLineIndex},${I}`}:void 0);j("deletions",en.gutterLineType,H.lineNumber,`${H.unifiedLineIndex},${I}`,en.gutterProperties),dt!=null&&(Ve=dt)}if(R!=null){const dt=Nc(rt,jt.contentProperties,m?{"data-line":R.lineNumber,"data-line-index":`${R.unifiedLineIndex},${I}`}:void 0);j("additions",jt.gutterLineType,R.lineNumber,`${R.unifiedLineIndex},${I}`,jt.gutterProperties),dt!=null&&(rt=dt)}Ic({diffStyle:"split",type:Y,additionLine:rt,deletionLine:Ve,...Wt,createAnnotationElement:dt=>this.createAnnotationElement(dt),context:M}),He?.after!=null&&NC(He.after,M,z)}const de=s==="split"&&$!=null&&I===$.splitLineStart+$.splitLineCount-1,_e=P===e.hunks.length-1&&$!=null&&(s==="split"?I===$.splitLineStart+$.splitLineCount-1:le===$.unifiedLineStart+$.unifiedLineCount-1),pe=de?$.noEOFCRDeletions:!1,Pe=de?$.noEOFCRAdditions:!1,je=(H?.noEOFCR??!1)||pe,st=(R?.noEOFCR??!1)||Pe;if(st||je){if(s==="split"&&z.flush(),je){const He=Y==="context"||Y==="context-expanded"?Y:"change-deletion";s==="unified"?(M.unifiedContentAST.push(Rc(He)),M.pushToGutter("unified",wn(He,"metadata",1))):(M.deletionsContentAST.push(Rc(He)),M.pushToGutter("deletions",wn(He,"metadata",1)),st||(M.pushToGutter("additions",wn(void 0,"buffer",1)),M.additionsContentAST.push(Lc(1))))}if(st){const He=Y==="context"||Y==="context-expanded"?Y:"change-addition";s==="unified"?(M.unifiedContentAST.push(Rc(He)),M.pushToGutter("unified",wn(He,"metadata",1))):(M.additionsContentAST.push(Rc(He)),M.pushToGutter("additions",wn(He,"metadata",1)),je||(M.pushToGutter("deletions",wn(void 0,"buffer",1)),M.deletionsContentAST.push(Lc(1))))}M.incrementRowCount(1)}p!=="simple"&&p!=="metadata"&&(ue>0||_e&&v)&&F({hunkIndex:Y==="context-expanded"?P:P+1,collapsedLines:_e&&v?"unknown":ue,rangeSize:O,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:x}),M.incrementRowCount(1)}}),s==="split"&&z.flush();const ee=Math.max(tB(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),q=t.bufferBefore>0||t.bufferAfter>0,U=!g&&e.type!=="deleted",Z=!g&&e.type!=="new",X=M.rowCount>0||q;S=U&&X?S:void 0,C=Z&&X?C:void 0,_=g&&X?_:void 0;const W=this.createPreElement(C!=null&&S!=null,ee);return{unifiedGutterAST:g&&X?M.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:Z&&X?M.deletionsGutterAST.children:void 0,deletionsContentAST:C,additionsGutterAST:U&&X?M.additionsGutterAST.children:void 0,additionsContentAST:S,hunkData:w,preNode:W,themeStyles:i,baseThemeType:o,headerElement:l?void 0:this.renderHeader(this.diff),totalLines:ee,rowCount:M.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const n=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,i=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(n==null||i==null)return;const o=ja(n);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,eT(i,t.rowCount)]}renderFullAST(e,t=[]){const n=this.getOptionsWithDefaults().hunkSeparators==="line-info",i=this.renderCodeAST("unified",e);if(i!=null)return t.push(Te({tagName:"code",children:i,properties:{"data-code":"","data-container-size":n?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const o=this.renderCodeAST("deletions",e);o!=null&&t.push(Te({tagName:"code",children:o,properties:{"data-code":"","data-container-size":n?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&t.push(Te({tagName:"code",children:s,properties:{"data-code":"","data-container-size":n?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Zt(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?Zt(e):Zt(Te({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}pushFileLevelAnnotations(e,t,n,i){if(!tf(n))return;const o=e.type!=="new"?MC(Rg(this.deletionAnnotations)):[],s=e.type!=="deleted"?MC(Rg(this.additionAnnotations)):[];if(o.length===0&&s.length===0)return;const l=-1,c=-1,{createAnnotationElement:d}=this;if(t==="unified"){Ic({diffStyle:t,type:"context",unifiedSpan:{type:"annotation",hunkIndex:l,lineIndex:c,annotations:o.concat(s)},createAnnotationElement:d,context:i});return}Ic({diffStyle:t,type:"context",deletionSpan:{type:"annotation",hunkIndex:l,lineIndex:c,annotations:o},additionSpan:{type:"annotation",hunkIndex:l,lineIndex:c,annotations:s},createAnnotationElement:d,context:i})}getAnnotations(e,t,n,i,o){const s={type:"annotation",hunkIndex:i,lineIndex:o,annotations:[]};if(t!=null)for(const c of this.deletionAnnotations[t]??[])s.annotations.push(ei(c));const l={type:"annotation",hunkIndex:i,lineIndex:o,annotations:[]};if(n!=null)for(const c of this.additionAnnotations[n]??[])(e==="unified"?s:l).annotations.push(ei(c));if(e==="unified")return s.annotations.length>0?s:void 0;if(!(l.annotations.length===0&&s.annotations.length===0))return{deletionSpan:s,additionSpan:l}}renderHeader(e){const{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return $k({fileOrDiff:e,mode:t,stickyHeader:n})}};function MC(e){return e?.map(t=>ei(t))??[]}const FB=new Intl.PluralRules("en-US");function GB(e){return`${e} unmodified line${FB.select(e)==="one"?"":"s"}`}function IC(e,t){for(const n of e)t.unifiedContentAST.push(n.content),t.pushToGutter("unified",n.gutter),t.incrementRowCount(1)}function NC(e,t,n){for(const{deletion:i,addition:o}of e){if(i==null&&o==null)continue;const s=i!=null&&o!=null?void 0:i==null?"deletions":"additions";(s==null||n.side!==s)&&n.flush(),i!=null&&(t.deletionsContentAST.push(i.content),t.pushToGutter("deletions",i.gutter)),o!=null&&(t.additionsContentAST.push(o.content),t.pushToGutter("additions",o.gutter)),s!=null&&(n.side=s,n.increment()),t.incrementRowCount(1)}}function Ic({diffStyle:e,type:t,deletionLine:n,additionLine:i,unifiedSpan:o,deletionSpan:s,additionSpan:l,createAnnotationElement:c,context:d}){let f=!1;if(e==="unified"){if(i!=null?d.unifiedContentAST.push(i):n!=null&&d.unifiedContentAST.push(n),o!=null){const p=t==="change"?n!=null?"change-deletion":"change-addition":t;d.unifiedContentAST.push(c(o)),d.pushToGutter("unified",wn(p,"annotation",1)),f=!0}}else if(e==="split"){if(n!=null&&d.deletionsContentAST.push(n),i!=null&&d.additionsContentAST.push(i),s!=null){const p=t==="change"?n!=null?"change-deletion":"context":t;d.deletionsContentAST.push(c(s)),d.pushToGutter("deletions",wn(p,"annotation",1)),f=!0}if(l!=null){const p=t==="change"?i!=null?"change-addition":"context":t;d.additionsContentAST.push(c(l)),d.pushToGutter("additions",wn(p,"annotation",1)),f=!0}}f&&d.incrementRowCount(1)}function bm(e,{hunkIndex:t,collapsedLines:n,rangeSize:i,hunkSpecs:o,isFirstHunk:s,isLastHunk:l,isExpandable:c},d){if(typeof n=="number"&&n<=0)return;const f=e==="unified"?d.unifiedContentAST:e==="deletions"?d.deletionsContentAST:d.additionsContentAST;if(d.hunkSeparators==="metadata"){o!=null&&(d.pushToGutter(e,Ma({type:"metadata",content:o,isFirstHunk:s,isLastHunk:l})),f.push(Ma({type:"metadata",content:o,isFirstHunk:s,isLastHunk:l})),e!=="additions"&&d.incrementRowCount(1));return}if(d.hunkSeparators==="simple"){t>0&&(d.pushToGutter(e,Ma({type:"simple",isFirstHunk:s,isLastHunk:!1})),f.push(Ma({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&d.incrementRowCount(1));return}const p=eB(e,t),m=i>d.expansionLineCount,g=c?t:void 0,v=typeof n=="number"?GB(n):"More unchanged context may be available";d.pushToGutter(e,Ma({type:d.hunkSeparators,content:v,expandIndex:g,chunked:m,slotName:p,isFirstHunk:s,isLastHunk:l})),f.push(Ma({type:d.hunkSeparators,content:v,expandIndex:g,chunked:m,slotName:p,isFirstHunk:s,isLastHunk:l})),e!=="additions"&&d.incrementRowCount(1),d.hunkData.push({slotName:p,hunkIndex:t,lines:typeof n=="number"?n:0,lineCountKnown:typeof n=="number",type:e,expandable:c?{up:!s,down:!l,chunked:m}:void 0})}function Nc(e,t,n){return e==null||e.type!=="element"||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function zC(e){return e.length>0&&e[e.length-1]===""?e.length-1:e.length}function $B(e,t,n,i){const o=zC(e),s=zC(t),l=Math.min(o,s);let c=0;for(;c<l&&e[c]===t[c];)c++;let d=0;for(;d<l-c&&e[o-1-d]===t[s-1-d];)d++;const f=new Array(t.length);for(let p=0;p<c;p++)f[p]=n[p];for(let p=0;p<d;p++)f[s-1-p]=n[o-1-p];o<e.length&&s<t.length&&(f[t.length-1]=n[e.length-1]);for(let p=e.length;p<t.length;p++)f[p]??=n[p];for(let p=c;p<t.length;p++)f[p]??=zg(p,i.getLineText(p));return f}function zg(e,t,n=e,i=e){return{type:"element",tagName:"div",properties:{"data-line":e+1,"data-line-index":`${n},${i}`,"data-line-type":"context"},children:[{type:"element",tagName:"span",properties:{"data-char":0},children:[{type:"text",value:t}]}]}}function qB(e,t){const n=[],i=YB(t);for(let o=0;o<e.lineCount;o++){const s=e.getLineText(o,!0);n.push(o<e.lineCount-1&&!WB(s)?s+i:s)}return n}function WB(e){return e.endsWith(`
1551
+ `)||e.endsWith("\r")}function YB(e){for(const t of e){if(t.endsWith(`\r
1552
+ `))return`\r
1553
+ `;if(t.endsWith(`
1554
+ `))return`
1555
+ `;if(t.endsWith("\r"))return"\r"}return`
1556
+ `}function zc(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function XB(e,t){return e.isPartial&&t&&(e.type==="change"||e.type==="rename-changed")}function KB(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function QB(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}async function Pg(e,t=300){let n;try{await Promise.race([e(),new Promise(i=>{n=setTimeout(i,t)})])}finally{n!=null&&clearTimeout(n)}}function Hg({oldFile:e,newFile:t},n){if(!(e===void 0&&t===void 0)){if(e===void 0||t===void 0)throw new Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw new Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return t===null?{oldFile:e,newFile:t}:{oldFile:e,newFile:t}}}function ZB(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:hT(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators=="function"?"custom":e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}function JB(e){return e.isPartial&&(e.type==="change"||e.type==="rename-changed"||e.type==="rename-pure")}let e4=-1;var TT=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++e4}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;pendingFiles;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(t={theme:mt},n,i=!1){this.options=t,this.workerManager=n,this.isContainerManaged=i,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new EE,this.scrollSyncManager=new Jj,this.interactionManager=new wE("diff",dd(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(t){return ZB(t)}createHunksRenderer(t){return new VB(this.getHunksRendererOptions(t),this.handleHighlightRender,this.workerManager)}getLineIndex=(t,n="additions")=>{const i=this.fileDiffCache;if(i==null)return;const o=i.hunks.at(-1);let s,l;e:for(const c of i.hunks){const d=n==="deletions"?c.deletionStart:c.additionStart,f=n==="deletions"?c.deletionCount:c.additionCount;let p=_i(d,f)+1,m=c.splitLineStart,g=c.unifiedLineStart;if(t<p){const v=p-t;s=Math.max(g-v,0),l=Math.max(m-v,0);break e}if(t>=p+f){if(c===o){const v=t-(p+f);s=g+c.unifiedLineCount+v,l=m+c.splitLineCount+v;break e}continue}for(const v of c.hunkContent)if(v.type==="context")if(t<p+v.lines){const x=t-p;l=m+x,s=g+x;break e}else p+=v.lines,m+=v.lines,g+=v.lines;else{const x=n==="deletions"?v.deletions:v.additions;if(t<p+x){const S=t-p;s=g+(n==="additions"?v.deletions:0)+S,l=m+S;break e}else p+=x,m+=Math.max(v.deletions,v.additions),g+=v.deletions+v.additions}break e}if(!(s==null||l==null))return[s,l]};setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(dd(this.options,typeof this.options.hunkSeparators=="function"||(this.options.hunkSeparators??"line-info")==="line-info"||this.options.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const n=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===n?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Qa(this.appliedThemeCSS.theme,this.options.theme??mt)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,n,i){return!(t||n||i||typeof this.options.hunkSeparators=="function")}setSelectedLines(t,n){this.lineStateRefreshPending?this.deferredSelectedLines=[t,n]:this.interactionManager.setSelection(t,n)}setEditorActiveLine(t,n){this.lineStateRefreshPending?this.deferredEditorActiveLine=[t,n]:this.interactionManager.setEditorActiveLine(t,{lineNumberOnly:n?.lineNumberOnly,side:n?.side??"additions"})}flushDeferredLineState(){const{deferredEditorActiveLine:t,deferredSelectedLines:n}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,t!=null&&this.setEditorActiveLine(...t),n!=null&&this.interactionManager.setSelection(...n)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:t="split",overflow:n="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:n==="wrap",columnVariables:this.shouldApplyColumnVariables(n)?"apply":"measure"}),n==="scroll"&&t==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(t){return typeof this.options.hunkSeparators=="function"?!0:t==="scroll"&&(this.lineAnnotations.length>0||this.pre?.hasAttribute("data-has-merge-conflict")===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(t){this.codeUnified!=null&&(this.codeUnified.scrollLeft=t),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=t),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=t)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(t=!1){eg(this.handleEditSessionRender),this.emitPostRender(!0),this.editor?.cleanUp(t),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.pendingFiles=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,t||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,t?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:t,prerenderedHTML:n,preventEmit:i=!1,lineAnnotations:o,fileDiff:s,...l}){if(!this.enabled)throw new Error("FileDiff.hydrate: attempting to call hydrate after cleaned up");if(this.fileContainer!=null)throw new Error("FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated");const c=Hg(l,"FileDiff.hydrate"),d=c?.oldFile,f=c?.newFile;this.hydrateElements(t,n),i4(this.pre,t4({fileDiff:s,oldFile:d,newFile:f}),this.options.collapsed)||r4(this.headerElement,n4({fileDiff:s,oldFile:d,newFile:f}),this.options.disableFileHeader)?this.render({...l,fileContainer:t,lineAnnotations:o,fileDiff:s,preventEmit:!0}):this.hydrationSetup({fileDiff:s,lineAnnotations:o,...c}),i||this.emitPostRender()}hydrateElements(t,n){this.fileContainer!==t&&this.emitPostRender(!0),dT(t,n);for(const i of t.shadowRoot?.children??[]){if(i instanceof SVGElement){this.spriteSVG=i;continue}if(i instanceof HTMLElement){if(i instanceof HTMLPreElement){this.pre=i;for(const o of i.children)!(o instanceof HTMLElement)||o.tagName.toLowerCase()!=="code"||("deletions"in o.dataset&&(this.codeDeletions=o),"additions"in o.dataset&&(this.codeAdditions=o),"unified"in o.dataset&&(this.codeUnified=o));continue}if("diffsHeader"in i.dataset){this.headerElement=i;continue}if(i instanceof HTMLStyleElement&&i.hasAttribute("data-theme-css")){this.themeCSSStyle=i;continue}if(i instanceof HTMLStyleElement&&i.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=i,this.appliedUnsafeCSS=i.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:t,oldFile:n,newFile:i,lineAnnotations:o}){this.lineAnnotations=o??this.lineAnnotations,this.additionFile=i,this.deletionFile=n,this.fileDiff=t??(n!==void 0&&i!==void 0?Mo(n,i,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(t,n,i)=>{this.expandHunk(t,n,i)};expandHunk=(t,n,i)=>{this.hunksRenderer.expandHunk(t,n,i),this.loadFilesIfNecessary(),this.rerender()};loadFilesIfNecessary(){const{fileDiff:t,options:{loadDiffFiles:n}}=this;t==null||n==null||!JB(t)||this.pendingFiles?.fileDiff===t||(this.pendingFiles={fileDiff:t,promise:this.loadFilesForDiff(t,n)})}async loadFilesForDiff(t,n){try{const i=await n(t);if(!this.enabled||this.fileDiff!==t)return;await this.handleFilesLoaded(t,i)}catch(i){if(this.options.disableErrorHandling===!0)throw i;console.error(i)}finally{this.pendingFiles?.fileDiff===t&&(this.pendingFiles=void 0)}}async handleFilesLoaded(t,n){this.fileDiff!==t||!t.isPartial||(Td("merge",t,n),this.setHydratedState(n),await Pg(()=>this.primeHighlightCache(t)),!(!this.enabled||this.fileDiff!==t)&&this.rerender())}setHydratedState(t){this.deletionFile=t.oldFile,this.additionFile=t.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:t,deferManagers:n=!1,forceRender:i=!1,preventEmit:o=!1,lineAnnotations:s,fileContainer:l,containerWrapper:c,renderRange:d,...f}){const p=Hg(f,"FileDiff.render"),m=p?.oldFile,g=p?.newFile;if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");t!=null&&t.cacheKey===void 0&&(t.cacheKey=t.prevName!=null?t.prevName+":"+t.name:t.name),this.editor?.__postponeBgTokenizeToNextFrame();const{collapsed:v=!1,themeType:x="system",expandUnchanged:S=!1}=this.options,C=v?void 0:d,_=this.hasThemeChanged(),w=p!=null,k=w&&(!PC(m,this.deletionFile)||!PC(g,this.additionFile));let D=t!=null&&t!==this.fileDiff;const M=s!=null&&(s.length>0||this.lineAnnotations.length>0)?s!==this.lineAnnotations:!1;if(!v&&ef(C,this.renderRange)&&!i&&!M&&!_&&(t!=null&&t===this.fileDiff||t==null&&!k))return this.applyCachedThemeState(x);let O;t==null&&w&&(k||this.fileDiff==null)&&(O=Mo(p.oldFile,p.newFile,this.options.parseDiffOptions));const{renderRange:z}=this;if(this.renderRange=C,w?(this.deletionFile=m,this.additionFile=g):t!=null&&(this.deletionFile=void 0,this.additionFile=void 0),t!=null?this.fileDiff=t:O!=null&&(D=!0,this.fileDiff=O),D&&(this.cachedHeaderHTML=void 0),s!=null&&this.setLineAnnotations(s),this.fileDiff==null)return!1;this.fileDiff.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(LC(this.fileDiff,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),S&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:j=!1,disableFileHeader:F=!1}=this.options;if(F&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),l=this.getOrCreateFileContainer(l,c),this.applyCachedThemeState(x),v){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const ee=this.hunksRenderer.renderDiff(this.fileDiff,uE);ee!=null&&this.applyThemeState(l,ee.themeStyles,x,ee.baseThemeType),ee?.headerElement!=null&&this.applyHeaderToDOM(ee.headerElement,l),this.renderSeparators([]),this.injectUnsafeCSS()}catch(ee){if(j)throw ee;console.error(ee),ee instanceof Error&&this.applyErrorToDOM(ee,l)}return o||this.emitPostRender(),!0}try{const ee=this.getOrCreatePreNode(l);if(!(this.canPartiallyRender(i,M,k||D||_)&&this.applyPartialRender({previousRenderRange:z,renderRange:C}))){const q=this.hunksRenderer.renderDiff(this.fileDiff,C);if(q==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(l,q.themeStyles,x,q.baseThemeType),q.headerElement!=null&&this.applyHeaderToDOM(q.headerElement,l),q.additionsContentAST!=null||q.deletionsContentAST!=null||q.unifiedContentAST!=null?this.applyHunksToDOM(ee,q):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(q.hunkData)}this.applyBuffers(ee,C),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,n||this.flushManagers(),this.editor!=null&&this.syncRenderViewToEditor()}catch(ee){if(j)throw ee;console.error(ee),ee instanceof Error&&this.applyErrorToDOM(ee,l)}return o||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:n,options:{onPostRender:i}}=this;if(t){if(!this.mounted||(this.mounted=!1,n==null))return;this.options.onPostRender?.(n,this,"unmount");return}if(n==null)return;const o=this.mounted?"update":"mount";this.mounted=!0,i?.(n,this,o)}get fileDiffCache(){return this.hunksRenderer.diffCache??this.fileDiff}syncRenderViewToEditor(){const t=this.editor,n=this.fileContainer,i=this.fileDiffCache,o=this.lineAnnotations,s=this.computeEditorRenderRange(this.renderRange);t!=null&&n!=null&&i!=null&&!i.isPartial&&this.hunksRenderer.initializeHighlighter().then(l=>{!this.enabled||this.editor!==t||this.fileContainer!==n||this.fileDiffCache!==i||t.__syncRenderView(l,n,i,o,s)})}computeEditorRenderRange(t){const n=this.fileDiffCache;if(t==null||n==null||Mg(t))return t;const{diffStyle:i="split",expandUnchanged:o=!1,collapsedContextThreshold:s=1}=this.options;let l,c;return Ao({diff:n,diffStyle:i,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({additionLine:d})=>{d!=null&&(l??=d.lineNumber,c=d.lineNumber)}}),l==null||c==null?{...t,startingLine:0,totalLines:0}:{...t,startingLine:l-1,totalLines:c-l+1}}attachEditor(t){if(this.type!=="file-diff")throw new Error(`FileDiff.attachEditor: cannot attach an editor to a "${this.type}" diff`);return this.editor?.cleanUp(),this.editor=t,this.hunksRenderer.beginEditSession(),this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary(),this.hunksRenderer.editorRenderReady()?this.syncRenderViewToEditor():this.rerender(),n=>{this.editor=void 0,n!==!0&&this.finishEditSession()}}finishEditSession(){this.hunksRenderer.endEditSession(),this.completeEditSession()}completeEditSession(){const t=this.fileDiffCache;if(t==null||t.editSessionDirty!==!0)return!1;const{collapsedContextThreshold:n=1}=this.options,i=RB(t,this.hunksRenderer.getExpandedHunksMap(),n);return LC(t,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(OB(t,i)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(t,n){this.hunksRenderer.applyDocumentChange(t);const i=this.hunksRenderer.diffCache;if(i!=null){const o=this.fileDiff?.cacheKey;o!=null&&i.cacheKey==null&&(i.cacheKey=o),this.fileDiff=i}n!==void 0&&n!==this.lineAnnotations&&(this.setLineAnnotations(n),this.hunksRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations()),this.rerender(),this.interactionManager.setSelectionDirty()}updateRenderCache(t,n,i={}){const{shouldRefreshDiffsView:o,lineCountChangeInFlight:s}=i;if(this.hunksRenderer.updateRenderCache(t,n,s)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}o===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle==="split"?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}isLineRenderable(t){const n=this.fileDiffCache;if(n==null)return!0;const{expandUnchanged:i=!1,collapsedContextThreshold:o=1}=this.options;return bT({fileDiff:n,lineNumber:t,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o})}getNearestRenderableLine(t,n){const i=this.fileDiffCache;if(i==null)return t;const{expandUnchanged:o=!1,collapsedContextThreshold:s=1}=this.options;return iB({fileDiff:i,lineNumber:t,direction:n,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s})}revealLine(t){const n=this.fileDiffCache,{expandUnchanged:i=!1,collapsedContextThreshold:o=1,expansionLineCount:s=100}=this.options;if(n==null||n.isPartial||i)return!1;const l=this.hunksRenderer.getExpandedHunksMap();for(const[p,m]of n.hunks.entries()){const[g,v]=Ll(m);if(t<g){const x=ir({isPartial:n.isPartial,rangeSize:m.collapsedBefore,expandedHunks:l,hunkIndex:p,collapsedContextThreshold:o}),S=g-x.rangeSize;if(x.renderAll||t<S+x.fromStart||t>=g-x.fromEnd)return!1;const C=t-(S+x.fromStart)+1,_=g-x.fromEnd-t;return C<=_?this.expandHunk(p,"up",C+s):this.expandHunk(p,"down",_+s),!0}if(t<v)return!1}const c=rr({fileDiff:n,hunkIndex:n.hunks.length-1,expandedHunks:l,collapsedContextThreshold:o,errorPrefix:"FileDiff.revealLine"});if(c==null||c.renderAll)return!1;const d=n.hunks[n.hunks.length-1],[,f]=Ll(d);return t<f+c.fromStart||t>=f+c.rangeSize?!1:(this.expandHunk(n.hunks.length,"up",t-(f+c.fromStart)+1+s),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){cE(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.separatorCache.values())t.remove();this.separatorCache.clear();for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const n=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",n.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}async primeHighlightCache(t=this.fileDiff){const{workerManager:n}=this;if(t==null||n==null||!n.isWorkingPool()||t.cacheKey==null||qa(t))return;const i=this.options.tokenizeMaxLength??1e5;Math.max(t.additionLines.length,t.deletionLines.length)>i||await n.primeDiffHighlightCache(t).catch(o=>{console.error(o)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(t){const{hunkSeparators:n}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof n!="function"){for(const{element:o}of this.separatorCache.values())o.remove();this.separatorCache.clear();return}const i=new Map(this.separatorCache);for(const o of t){const s=o.slotName;let l=this.separatorCache.get(s);if(l==null||!QB(o,l.hunkData)){l?.element.remove();const c=document.createElement("div");c.style.display="contents",c.slot=o.slotName;const d=n(o,this);d!=null&&c.appendChild(d),this.fileContainer.appendChild(c),l={element:c,hunkData:o},this.separatorCache.set(s,l)}i.delete(s)}for(const[o,{element:s}]of i.entries())this.separatorCache.delete(o),s.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:i}of this.annotationCache.values())i.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:n}=this.options;if(n!=null&&this.lineAnnotations.length>0)for(const[i,o]of this.lineAnnotations.entries()){const s=`${i}-${ei(o)}`;let l=this.annotationCache.get(s);if(l==null||!KB(o,l.annotation)){l?.element.remove();const c=n(o);if(c==null)continue;l={element:iT(ei(o)),annotation:o},l.element.appendChild(c),this.fileContainer.appendChild(l.element),this.annotationCache.set(s,l)}t.delete(s)}for(const[i,{element:o}]of t.entries())this.annotationCache.delete(i),o.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=t(this.interactionManager.getHoveredLine);if(n!=null&&this.gutterUtilityContent!=null)return;if(n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const i=rT();i.appendChild(n),this.fileContainer.appendChild(i),this.gutterUtilityContent=i}getOrCreateFileContainer(t,n){const{fileContainer:i}=this,o=t??i??document.createElement("diffs-container"),s=i!==o;return i!=null&&s&&this.editor?.__captureFocusForDOMReplacement(),s&&this.emitPostRender(!0),this.fileContainer=o,i!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:n}=t;if(n!=null)for(const i of n.children)i instanceof SVGElement?this.spriteSVG??=i:Ed(i)&&i.hasAttribute("data-theme-css")?(this.themeCSSStyle??=i,this.hasAdoptedThemeCSS=!0):Ed(i)&&i.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=i,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const i=document.createElement("div");i.innerHTML=tT;const o=i.firstChild;o instanceof SVGElement&&(this.spriteSVG=o)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==n&&n.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,n.appendChild(this.pre)):this.pre.parentNode!==n&&(this.editor?.__captureFocusForDOMReplacement(),n.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(t){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const n of Array.from(t.children))n instanceof HTMLElement&&(n.hasAttribute("data-unified")?this.codeUnified=n:n.hasAttribute("data-deletions")?this.codeDeletions=n:n.hasAttribute("data-additions")&&(this.codeAdditions=n))}applyHeaderToDOM(t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:i}=this,o=this.cachedHeaderHTML??Zt(t);if(this.cachedHeaderHTML=o,o!==this.lastRenderedHeaderHTML){const g=document.createElement("div");g.innerHTML=o;const v=g.firstElementChild;if(!(v instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(v,this.headerElement):n.shadowRoot?.prepend(v),this.headerElement=v,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged||i==null)return;const{renderCustomHeader:s,renderHeaderPrefix:l,renderHeaderFilenameSuffix:c,renderHeaderMetadata:d}=this.options;if(s!=null){const g=s(i)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,Hl,g),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}const f=l?.(i)??void 0,p=c?.(i)??void 0,m=d?.(i)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,Sy,f),this.headerFilenameSuffix=this.upsertHeaderSlotElement(n,this.headerFilenameSuffix,_y,p),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,Cy,m),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,n,i,o){if(o==null){n?.remove();return}const s=n??this.createHeaderSlotElement(i);return n==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,o),s}replaceHeaderSlotContent(t,n){t.replaceChildren(),n instanceof Element?t.appendChild(n):t.innerText=`${n}`}createHeaderSlotElement(t){const n=document.createElement("div");return n.slot=t,n}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,n=this.fileContainer?.shadowRoot;if(n!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===n&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=oT(),this.unsafeCSSStyle.parentNode!==n&&n.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=lT(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,n,i,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),l=o??i,c=this.options.theme??mt,d=typeof c=="string"?c:{...c},f=Al(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===l&&this.appliedThemeCSS.scrollbarGutter===f){this.appliedThemeCSS.theme=d;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:d,themeStyles:n,themeType:l,baseThemeType:o,scrollbarGutter:f};return}this.themeCSSStyle=pT({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:uT(n,l,f)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:d,themeStyles:n,themeType:l,baseThemeType:o,scrollbarGutter:f}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=cT(this.themeCSSStyle.textContent??"",Al(t)))}shouldGuardRebuildScroll(){return this.editor!=null&&mT()}applyHunksToDOM(t,n){this.shouldGuardRebuildScroll()?Og(t,()=>this.replaceCodeColumns(t,n)):this.replaceCodeColumns(t,n)}applyCodeColumnsInPlace(t,n,i){const o=this.getColumnPair(t);if(o==null)return!1;const s=zr(n[0]),l=zr(n[1]);return s==null||l==null?!1:(o.gutter.innerHTML=Zt(s),o.content.innerHTML=Zt(l),i!==this.lastRowCount&&(o.gutter.style.setProperty("grid-row",`span ${i}`),o.content.style.setProperty("grid-row",`span ${i}`)),!0)}replaceCodeColumns(t,n){const{overflow:i="scroll"}=this.options,o=(this.options.hunkSeparators??"line-info")==="line-info",s=i==="wrap"?n.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,n);let l=!1;const c=[],d=this.hunksRenderer.renderCodeAST("unified",n),f=this.hunksRenderer.renderCodeAST("deletions",n),p=this.hunksRenderer.renderCodeAST("additions",n);this.editor?.__captureFocusForDOMReplacement(),d!=null?(l=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=ed({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:o}),this.applyCodeColumnsInPlace(this.codeUnified,d,n.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(d)),c.push(this.codeUnified)):f!=null||p!=null?(f!=null?(l=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=ed({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:o}),this.applyCodeColumnsInPlace(this.codeDeletions,f,n.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(f)),c.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),p!=null?(l=l||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=ed({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:o}),this.applyCodeColumnsInPlace(this.codeAdditions,p,n.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(p)),c.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),c.length===0?t.textContent="":l&&t.replaceChildren(...c),this.lastRowCount=n.rowCount}applyPartialRender({previousRenderRange:t,renderRange:n}){const{pre:i,codeUnified:o,codeAdditions:s,codeDeletions:l,options:{diffStyle:c="split"}}=this;if(i==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;const d=this.getCodeColumns(c,o,l,s);if(d==null)return!1;const f=t.startingLine,p=n.startingLine,m=f+t.totalLines,g=p+n.totalLines,v=Math.max(f,p),x=Math.min(m,g);if(x<=v)return!1;const S=Math.max(0,v-f),C=Math.max(0,m-x),_=this.trimColumns({columns:d,trimStart:S,trimEnd:C,previousStart:f,overlapStart:v,overlapEnd:x,diffStyle:c});if(_<0)throw new Error("FileDiff.applyPartialRender: failed to trim to overlap");if(this.lastRowCount<_)throw new Error("FileDiff.applyPartialRender: trimmed beyond DOM row count");let w=this.lastRowCount-_;const k=(z,j)=>{if(!(j<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:z,totalLines:j,bufferBefore:0,bufferAfter:0})},D=k(p,Math.max(v-p,0));if(D==null&&p<v)return!1;const M=k(x,Math.max(g-x,0));if(M==null&&g>x)return!1;const O=(z,j)=>{if(z!=null){if(c==="unified"&&!Array.isArray(d))this.insertPartialHTML(c,d,z,j);else if(c==="split"&&Array.isArray(d))this.insertPartialHTML(c,d,z,j);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");w+=z.rowCount}};return this.cleanupErrorWrapper(),O(D,"afterbegin"),O(M,"beforeend"),this.lastRowCount!==w&&(this.applyRowSpan(c,d,w),this.lastRowCount=w),!0}insertPartialHTML(t,n,i,o){if(t==="unified"&&!Array.isArray(n)){const s=this.hunksRenderer.renderCodeAST("unified",i);this.renderPartialColumn(n,s,o)}else if(t==="split"&&Array.isArray(n)){const s=this.hunksRenderer.renderCodeAST("deletions",i),l=this.hunksRenderer.renderCodeAST("additions",i);this.renderPartialColumn(n[0],s,o),this.renderPartialColumn(n[1],l,o)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}refreshSplitDiffView(){if(this.options.diffStyle!=="split")return;const t=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(t==null)return;const n=this.getCodeColumns("split",this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;const i=(o,s)=>{if(s==null)return;const l=this.hunksRenderer.renderCodeAST(o,t),c=zr(l?.[0]),d=zr(l?.[1]);for(const[f,p]of[[s.gutter,c],[s.content,d]])if(p!=null&&f.childElementCount===p.length)for(let m=0;m<p.length;m++){const g=f.children[m],v=p[m].properties["data-line-type"];v!=null&&g.dataset.lineType!==v&&(g.dataset.lineType=v)}};i("deletions",n[0]),i("additions",n[1])}refreshUnifiedDiffView(){if(this.options.diffStyle!=="unified")return;const t=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(t==null)return;const n=this.getCodeColumns("unified",this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;const i=this.hunksRenderer.renderCodeAST("unified",t),o=zr(i?.[0]),s=zr(i?.[1]),l=()=>{for(const[c,d]of[[n.gutter,o],[n.content,s]])d!=null&&(c.innerHTML=Zt(d));t.rowCount!==this.lastRowCount&&(this.applyRowSpan("unified",n,t.rowCount),this.lastRowCount=t.rowCount)};this.shouldGuardRebuildScroll()?Og(this.pre,l):l(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(t,n,i){if(t==null||n==null)return;const o=zr(n[0]),s=zr(n[1]);if(o==null||s==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const l=s.at(0);i==="beforeend"&&l?.type==="element"&&typeof l.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(l.properties["data-buffer-size"],t.content.children[t.content.children.length-1],t.gutter.children[t.gutter.children.length-1],o,s,!0);const c=s.at(-1);i==="afterbegin"&&c?.type==="element"&&typeof c.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(c.properties["data-buffer-size"],t.content.children[0],t.gutter.children[0],o,s,!1),t.gutter.insertAdjacentHTML(i,this.hunksRenderer.renderPartialHTML(o)),t.content.insertAdjacentHTML(i,this.hunksRenderer.renderPartialHTML(s))}mergeBuffersIfNecessary(t,n,i,o,s,l){if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement))return;const c=this.getBufferSize(n.dataset);c!=null&&(l?(o.shift(),s.shift()):(o.pop(),s.pop()),this.updateBufferSize(n,c+t),this.updateBufferSize(i,c+t))}applyRowSpan(t,n,i){const o=s=>{s!=null&&(s.gutter.style.setProperty("grid-row",`span ${i}`),s.content.style.setProperty("grid-row",`span ${i}`))};if(t==="unified"&&!Array.isArray(n))o(n);else if(t==="split"&&Array.isArray(n))o(n[0]),o(n[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(t,n,i){let o=0,s=0,l=0,c=!1;const d=i>=0;if(t==null)return 0;const f=Array.from(t.content.children),p=Array.from(t.gutter.children);if(f.length!==p.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;l<f.length&&!(n<=0&&!d&&!c);){const m=p[l],g=f[l];if(l++,!(m instanceof HTMLElement)||!(g instanceof HTMLElement))throw console.error({gutterElement:m,contentElement:g}),new Error("FileDiff.trimColumnRows: invalid row elements");if(c&&(c=!1,m.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in g.dataset||m.dataset.gutterBuffer==="metadata"&&"noNewline"in g.dataset)){m.remove(),g.remove(),s++;continue}if("lineIndex"in m.dataset&&"lineIndex"in g.dataset){(n>0||d&&o>=i)&&(m.remove(),g.remove(),n>0&&(n--,n===0&&(c=!0)),s++),o++;continue}if("separator"in m.dataset&&"separator"in g.dataset){(n>0||d&&o>=i)&&(m.remove(),g.remove(),s++);continue}if(m.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in g.dataset){(n>0||d&&o>=i)&&(m.remove(),g.remove(),s++);continue}if(m.dataset.gutterBuffer==="metadata"&&"noNewline"in g.dataset){(n>0||d&&o>=i)&&(m.remove(),g.remove(),s++);continue}if(m.dataset.gutterBuffer==="buffer"&&"contentBuffer"in g.dataset){const v=this.getBufferSize(g.dataset);if(v==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(n>0){const x=Math.min(n,v),S=v-x;S>0?(this.updateBufferSize(m,S),this.updateBufferSize(g,S),s+=x):(m.remove(),g.remove(),s+=v),n-=x,n===0&&S===0&&(c=!0)}else if(d){const x=o,S=o+v-1;if(i<=x)m.remove(),g.remove(),s+=v;else if(i<=S){const C=S-i+1,_=v-C;this.updateBufferSize(m,_),this.updateBufferSize(g,_),s+=C}}o+=v;continue}throw console.error({gutterElement:m,contentElement:g}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:t,diffStyle:n,overlapEnd:i,overlapStart:o,previousStart:s,trimEnd:l,trimStart:c}){const d=Math.max(0,o-s),f=i-s;if(f<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const p=c>0,m=l>0;if(!p&&!m)return 0;const g=p?d:0,v=m?f:-1;if(n==="unified"&&!Array.isArray(t))return this.trimColumnRows(t,g,v);if(n==="split"&&Array.isArray(t)){const x=this.trimColumnRows(t[0],g,v),S=this.trimColumnRows(t[1],g,v);if(t[0]!=null&&t[1]!=null&&x!==S)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?x:S}else throw console.error({diffStyle:n,columns:t}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(t){const n=Number.parseInt(t?.bufferSize??"",10);return Number.isNaN(n)?void 0:n}updateBufferSize(t,n){t.dataset.bufferSize=`${n}`,t.style.setProperty("grid-row",`span ${n}`),t.style.setProperty("min-height",`calc(${n} * 1lh)`)}getColumnPair(t){if(t==null)return;const n=t.children[0],i=t.children[1];if(!(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||n.dataset.gutter==null||i.dataset.content==null))return{gutter:n,content:i}}getCodeColumns(t,n,i,o){if(t==="unified")return this.getColumnPair(n);{const s=this.getColumnPair(i),l=this.getColumnPair(o);return s!=null||l!=null?[s,l]:void 0}}updateBuffers(t){this.pre!=null&&this.applyBuffers(this.pre,t)}applyBuffers(t,n){if(n==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}n.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${n.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),n.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${n.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(t,{additionsContentAST:n,deletionsContentAST:i,totalLines:o},s){const{diffIndicators:l="bars",disableBackground:c=!1,disableLineNumbers:d=!1,overflow:f="scroll",diffStyle:p="split"}=this.options,m={type:"diff",diffIndicators:l,disableBackground:c,disableLineNumbers:d,overflow:f,split:p==="unified"?!1:n!=null&&i!=null,totalLines:o,customProperties:s};nT(m,this.appliedPreAttributes)||(fT(t,m),this.appliedPreAttributes=m)}applyErrorToDOM(t,n){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const i=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",i.appendChild(this.errorWrapper);const o=document.createElement("div");o.dataset.errorMessage="",o.innerText=t.message,this.errorWrapper.appendChild(o);const s=document.createElement("pre");s.dataset.errorStack="",s.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(s)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function PC(e,t){return e==null||t==null?e==null&&t==null:qn(e,t)}function t4({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function n4({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function i4(e,t,n=!1){return!n&&e==null&&t}function r4(e,t,n=!1){return e==null&&t&&!n}function zr(e){if(!(e==null||e.type!=="element"))return e.children??[]}function o4({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:i,expandUnchanged:o,expandedHunks:s,collapsedContextThreshold:l,canHydratePartialDiff:c}){let d=yi(t,n),f=d;const p=o?!0:s,m=e.hunks.length-1;for(let g=0;g<e.hunks.length;g++){const v=e.hunks[g];if(v==null)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const x=ir({isPartial:e.isPartial,rangeSize:v.collapsedBefore,expandedHunks:p,hunkIndex:g,collapsedContextThreshold:l}),S=(x.fromStart+x.fromEnd)*t.lineHeight;if(d+=S,f+=S,x.collapsedLines>0){const w=sl({type:i,metrics:t,hunkIndex:g,hunkSpecs:v.hunkSpecs})?.totalHeight??0;d+=w,f+=w}d+=v.splitLineCount*t.lineHeight,f+=v.unifiedLineCount*t.lineHeight;const C=a4(v);d+=C.split*t.lineHeight,f+=C.unified*t.lineHeight;const _=g===m?rr({fileDiff:e,hunkIndex:g,expandedHunks:p,collapsedContextThreshold:l,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(_!=null){const w=(_.fromStart+_.fromEnd)*t.lineHeight;if(d+=w,f+=w,_.collapsedLines>0){const k=So({type:i,metrics:t})?.totalHeight??0;d+=k,f+=k}}else if(g===m&&e.isPartial&&c){const w=So({type:i,metrics:t})?.totalHeight??0;d+=w,f+=w}}if(e.hunks.length>0){const g=kd(t);d+=g,f+=g}return{splitHeight:d,unifiedHeight:f}}function a4(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};const t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type==="context"){const n=t.lines>0?1:0;return{split:n,unified:n}}return s4(e,t)}function s4(e,t){const n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),i=t.deletions>0&&e.noEOFCRDeletions,o=t.additions>0&&e.noEOFCRAdditions;return{split:i||o?1:0,unified:n}}const jg=3e3;let l4=-1;var u4=class extends TT{__id=`little-virtualized-file-diff:${++l4}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;currentExpandUnchanged;pendingHydratedDiff;pendingExpansions;constructor(e,t,n,i,o=!1){super(e,i,o),this.virtualizer=t,this.metrics=td(n)}setMetrics(e,t=!1){const n=td(e);!t&&ud(this.metrics,n)||(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}setFileAnnotationHeight(e){const t=this.cache.fileAnnotationHeight;return e===t?!1:(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e=this.fileDiff){return e==null||!Lg(this.lineAnnotations)?!1:this.lineAnnotations.some(t=>t.lineNumber!==0?!1:e.type==="new"?t.side==="additions":e.type==="deleted"?t.side==="deletions":!0)}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){const t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!Ud(t,e),i=n&&m4(t,e);super.setOptions(e),i&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:g4(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,i)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1,resetRenderRange:n=!0}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&t&&(this.renderRange=void 0)}reconcileHeights(){let e=!1;const{overflow:t="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;const n=this.getDiffStyle(),i=n==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],o=this.hasFileAnnotations(this.fileDiff);if(this.renderRange!=null&&o&&tf(this.renderRange)){const s=c4(i)??0;this.setFileAnnotationHeight(s)&&(e=!0)}else!o&&this.setFileAnnotationHeight(0)&&(e=!0);for(const s of i){if(s==null)continue;const l=s.children[1];if(l instanceof HTMLElement)for(const c of l.children){if(!(c instanceof HTMLElement))continue;const d=c.dataset.lineIndex;if(d==null)continue;const f=v4(d,n);let p=c.getBoundingClientRect().height,m=!1;c.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in c.nextElementSibling.dataset||"noNewline"in c.nextElementSibling.dataset)&&("noNewline"in c.nextElementSibling.dataset&&(m=!0),p+=c.nextElementSibling.getBoundingClientRect().height);const g=this.getEstimatedLineHeight(m),v=this.cache.heightDeltas.get(f)??0,x=p-g;x!==v&&(e=!0,this.cache.measuredHeightDeltaTotal+=x-v,x===0?this.cache.heightDeltas.delete(f):this.cache.heightDeltas.set(f,x))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}prepareCodeViewItem(e,t,n,i){const o=!wo(this.fileDiff,e),s=this.syncLineAnnotations(i);let l=n?.resetDiffLayoutCache===!0||o||s,c=o||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=td(n.metrics),l=!0,c=!0);const{collapsed:d=!1,expandUnchanged:f=!1}=this.options;return this.currentCollapsed!==d&&(this.currentCollapsed=d,l=!0),this.currentExpandUnchanged!==f&&(this.currentExpandUnchanged=f,l=!0,c=!0),l&&this.resetLayoutCache({includeEstimatedHeights:c}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null||e<1)return;const n=this.getLineIndex(e,t);if(n==null)return;const{disableFileHeader:i=!1,expandUnchanged:o=!1,collapsed:s=!1,collapsedContextThreshold:l=1}=this.options,c=this.getDiffStyle(),d=this.getHunkSeparatorType(),f=c==="split"?n[1]:n[0];this.approximateLayoutCheckpoints();const p=yi(this.metrics,i),m=this.getLayoutCheckpointBeforeLineIndex(f);let g=m?.top??p+this.cache.fileAnnotationHeight;if(s)return{top:p,height:0};let v;return Ao({diff:this.fileDiff,diffStyle:c,startingLine:m?.renderedLineIndex??0,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:l,callback:({hunkIndex:x,hunk:S,collapsedBefore:C,collapsedAfter:_,deletionLine:w,additionLine:k})=>{const D=c==="split"?k?.splitLineIndex??w?.splitLineIndex:k?.unifiedLineIndex??w?.unifiedLineIndex;if(D==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(C>0){const O=sl({type:d,metrics:this.metrics,hunkIndex:x,hunkSpecs:S?.hunkSpecs});if(O!=null){if(g+=O.gapBefore,f>=D-C&&f<D)return v={top:g,height:O.height},!0;g+=O.height+O.gapAfter}}const M=this.getLineHeight(D,(k?.noEOFCR??!1)||(w?.noEOFCR??!1));if(D===f)return v={top:g,height:M},!0;if(g+=M,_>0){const O=So({type:d,metrics:this.metrics});if(O!=null){if(f>D&&f<=D+_)return v={top:g+O.gapBefore,height:O.height},!0;g+=O.totalHeight}}return!1}}),v}getEditorViewport(){return this.virtualizer.type==="simple"?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:i=!1,collapsedContextThreshold:o=1}=this.options;if(i)return;const s=this.getDiffStyle(),l=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const c=this.getLayoutCheckpointBeforeTop(e);let d=c?.top??yi(this.metrics,t)+this.cache.fileAnnotationHeight,f;return Ao({diff:this.fileDiff,diffStyle:s,startingLine:c?.renderedLineIndex??0,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:p,hunk:m,collapsedBefore:g,collapsedAfter:v,deletionLine:x,additionLine:S})=>{const C=s==="split"?S?.splitLineIndex??x?.splitLineIndex:S?.unifiedLineIndex??x?.unifiedLineIndex;if(C==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(g>0){const w=sl({type:l,metrics:this.metrics,hunkIndex:p,hunkSpecs:m?.hunkSpecs});w!=null&&(d+=w.totalHeight)}if(d>=e&&(x!=null?f={lineNumber:x.lineNumber,side:"deletions",top:d}:S!=null&&(f={lineNumber:S.lineNumber,side:"additions",top:d}),f!=null))return!0;const _=this.getLineHeight(C,(S?.noEOFCR??!1)||(x?.noEOFCR??!1));if(d+=_,v>0){const w=So({type:l,metrics:this.metrics});w!=null&&(d+=w.totalHeight)}return!1}}),f}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:i,totalLines:o}=t;let s=0;if(o===0){const l=e??this.virtualizer.getWindowSpecs();this.top<l.top&&(s=i)}return{topOffset:this.top+n+s,height:this.height-(n+i)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,n)=>{this.fileDiff!=null&&(this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.loadFilesIfNecessary(),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(!(this.fileDiff!==e||!e.isPartial)){if(this.isAdvancedMode()){const n=Td("clone",e,t);if(await Pg(()=>this.primeHighlightCache(n)),!this.enabled||this.fileDiff!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(Td("merge",e,t),this.setHydratedState(t),await Pg(()=>this.primeHighlightCache(e)),!this.enabled||this.fileDiff!==e)return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}consumeCodeViewLayoutChanges(e){let t=!1,n;const{pendingExpansions:i,pendingHydratedDiff:o}=this;if(i!=null){this.pendingExpansions=void 0;for(const s of i)this.hunksRenderer.expandHunk(s.hunkIndex,s.direction,s.expansionLineCountOverride),t=!0}return o!=null&&(this.pendingHydratedDiff=void 0,o.expectedDiff===e&&(this.setHydratedState(o.files),n=o.nextDiff)),n!=null?(this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0})):t&&(this.forceRenderOverride=!0,this.invalidateDerivedLayoutCache(!0)),n}loadFilesIfNecessary(){if(this.pendingHydratedDiff!=null){if(this.pendingHydratedDiff.expectedDiff===this.fileDiff)return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;const{pendingExpansions:t}=this,n=this.fileDiffCache;if(t==null||t.length===0||n==null)return!1;const{expansionLineCount:i=100,collapsedContextThreshold:o=1}=this.options,s=new Map(this.hunksRenderer.getExpandedHunksMap());for(const l of t){const c={...s.get(l.hunkIndex)??{fromStart:0,fromEnd:0}},d=l.expansionLineCountOverride??i;(l.direction==="up"||l.direction==="both")&&(c.fromStart+=d),(l.direction==="down"||l.direction==="both")&&(c.fromEnd+=d),s.set(l.hunkIndex,c)}return bT({fileDiff:n,lineNumber:e,expandedHunks:s,collapsedContextThreshold:o})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),!(!this.enabled||this.fileDiff==null)&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}applyDocumentChange(e,t,n=!1){const{renderRange:i}=this;if(this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&i!==void 0&&this.fileDiff!==void 0){const o=this.virtualizer.getWindowSpecs(),s=this.computeRenderRangeFromWindow(this.fileDiff,this.top??0,o);s.bufferAfter!==i.bufferAfter&&this.updateBuffers(s)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.fileDiff){const n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;const i=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}const{disableFileHeader:o=!1,collapsed:s=!1}=this.options,l=yi(this.metrics,o);if(this.height+=l,s){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!i&&this.validateComputedHeight(t),this.layoutDirty=!1}getActiveEstimatedHeight(e=this.fileDiff){this.ensureEstimatedDiffHeights(e);const t=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return t}ensureEstimatedDiffHeights(e=this.fileDiff){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:i=1}=this.options,{splitHeight:o,unifiedHeight:s}=o4({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,canHydratePartialDiff:xm(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=o,this.cache.estimatedUnifiedHeight=s}validateComputedHeight(e=this.fileDiff){if(this.fileContainer==null||e==null)return;const t=this.fileContainer.getBoundingClientRect();t.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:e.name,elementHeight:t.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:i,...o}={}){const s=Hg(o,"VirtualizedFileDiff.render"),l=s!=null,c=s?.oldFile,d=s?.newFile,f=l&&(!BC(c,this.deletionFile)||!BC(d,this.additionFile));let p=t??this.fileDiff;t==null&&l&&(f||this.fileDiff==null)&&(p=Mo(s.oldFile,s.newFile,this.options.parseDiffOptions));const{forceRenderOverride:m,isSetup:g}=this;this.forceRenderOverride=void 0;const v=this.syncLineAnnotations(i);v&&this.resetLayoutCache({includeEstimatedHeights:!1});const x=t!=null&&t!==this.fileDiff,S=p!=null&&!wo(this.fileDiff,p),C=x||f;if(S&&this.resetLayoutCache({includeEstimatedHeights:!0}),e=this.getOrCreateFileContainer(e),p==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(g)this.top??=this.getVirtualizedTop(),S&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,p));else{this.computeApproximateSize(!1,p);const M=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(M==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");M.connect(e,this),this.isVisible=M.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!C||!g))return this.fileDiff=p,s!=null&&(this.deletionFile=c,this.additionFile=d),S&&(this.cachedHeaderHTML=void 0),this.renderPlaceholder(this.height);const _=this.virtualizer.getWindowSpecs(),w=this.top??0,k=this.computeRenderRangeFromWindow(p,w,_),D=super.render({fileDiff:p,fileContainer:e,renderRange:k,lineAnnotations:i,forceRender:(m??n)||v||S,...s,...o});return this.isSimpleMode()&&D&&this.getSimpleVirtualizer()?.requestHeightReconcile(this),D}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type==="advanced"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return y4(this.options.hunkSeparators)}approximateLayoutCheckpoints(e=this.fileDiff){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e==null||e.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:i=1}=this.options,o=e.hunks.length-1,s=xm(e,this.options.loadDiffFiles!=null),l=this.getDiffStyle(),c=this.getHunkSeparatorType(),d=n?!0:this.hunksRenderer.getExpandedHunksMap(),f=d4(this.cache.heightDeltas);let p=yi(this.metrics,t)+this.cache.fileAnnotationHeight,m=0;const g=({rowCount:v,startLineIndex:x,preSeparatorHeight:S=0,postSeparatorHeight:C=0,metadataOffsets:_=[]})=>{if(v<=0)return;const w=m,k=m+v;let D=f4(w);for(;D<k;){const M=D-w,O=p+(M>0?S:0)+M*this.metrics.lineHeight+h4(_,M)*this.metrics.lineHeight+HC(f,x,x+M);this.cache.checkpoints.push({renderedLineIndex:D,lineIndex:x+M,top:O}),D+=jg}p+=S+v*this.metrics.lineHeight+_.length*this.metrics.lineHeight+HC(f,x,x+v)+C,m=k};for(let v=0;v<e.hunks.length;v++){const x=e.hunks[v];if(x==null)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const S=ir({isPartial:e.isPartial,rangeSize:x.collapsedBefore,expandedHunks:d,hunkIndex:v,collapsedContextThreshold:i}),C=S.collapsedLines>0?sl({type:c,metrics:this.metrics,hunkIndex:v,hunkSpecs:x.hunkSpecs})?.totalHeight??0:0;g({rowCount:S.fromStart,startLineIndex:(l==="split"?x.splitLineStart:x.unifiedLineStart)-S.rangeSize});let _=C;g({rowCount:S.fromEnd,startLineIndex:(l==="split"?x.splitLineStart:x.unifiedLineStart)-S.fromEnd,preSeparatorHeight:_}),S.fromEnd>0&&(_=0);const w=v===o?rr({fileDiff:e,hunkIndex:v,expandedHunks:d,collapsedContextThreshold:i,errorPrefix:"VirtualizedFileDiff"}):void 0,k=w!=null&&w.collapsedLines>0?So({type:c,metrics:this.metrics})?.totalHeight??0:v===o&&s?So({type:c,metrics:this.metrics})?.totalHeight??0:0,D=w!=null?w.fromStart+w.fromEnd:0,M=l==="split"?x.splitLineCount:x.unifiedLineCount,O=l==="split"?x.splitLineStart:x.unifiedLineStart;g({rowCount:M,startLineIndex:O,preSeparatorHeight:_,postSeparatorHeight:D===0?k:0,metadataOffsets:p4({diffStyle:l,hunk:x,rowCount:M})}),w!=null&&D>0&&g({rowCount:D,startLineIndex:O+M,postSeparatorHeight:k})}this.cache.totalLines=m}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,i;for(;t<=n;){const o=t+n>>1,s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");s.lineIndex<=e?(i=s,t=o+1):n=o-1}return i}getLayoutCheckpointBeforeTop(e,t){let n=0,i=this.cache.checkpoints.length-1,o=-1;for(;n<=i;){const s=n+i>>1,l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");l.top<=e?(o=s,n=s+1):i=s-1}if(t==null)return o>=0?this.cache.checkpoints[o]:void 0;for(let s=o;s>=0;s--){const l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(l.renderedLineIndex%t===0)return l}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(const c of e.hunks)n+=t==="split"?c.splitLineCount:c.unifiedLineCount;return n}const{expandUnchanged:i=!1,collapsedContextThreshold:o=1}=this.options,s=i?!0:this.hunksRenderer.getExpandedHunksMap();for(const[c,d]of e.hunks.entries()){const f=t==="split"?d.splitLineCount:d.unifiedLineCount;n+=f;const p=Math.max(d.collapsedBefore,0),{fromStart:m,fromEnd:g,renderAll:v}=ir({isPartial:e.isPartial,rangeSize:p,expandedHunks:s,hunkIndex:c,collapsedContextThreshold:o});p>0&&(n+=v?p:m+g)}const l=rr({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:s,collapsedContextThreshold:o,errorPrefix:"VirtualizedFileDiff"});return l!=null&&(n+=l.fromStart+l.fromEnd),n}getLayoutLineCount(e,t){const n=this.getExpandedLineCount(e,t),i=t==="split"?e.splitLineCount:e.unifiedLineCount;return Math.max(n,i,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:i}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:l=1}=this.options,{hunkLineCount:c,lineHeight:d}=this.metrics,f=this.getDiffStyle(),p=this.getHunkSeparatorType(),m=xm(e,this.options.loadDiffFiles!=null),g=this.height;let v=this.getLayoutLineCount(e,f);const x=yi(this.metrics,o),S=e.hunks.length>0?kd(this.metrics):0,{fileAnnotationHeight:C}=this.cache,_=x+C,w=Math.max(0,g-x-C-S),k=this.hasFileAnnotations(e),D=t+x,M=C>0&&k&&D<i&&D+C>n;if(t<n-g||t>i)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-x-S};if(v<=c||e.hunks.length===0)return{startingLine:0,totalLines:c,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),v=this.getLayoutLineCount(e,f);const O=Math.ceil(Math.max(i-n,0)/d),z=Math.ceil(O/c)*c+c,j=z/c,F=j,ee=[],q=(n+i)/2,U=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-z*d*2),c);let Z=t+(U?.top??_),X=U?.renderedLineIndex??0,W,P,$;if(Ao({diff:e,diffStyle:f,startingLine:U?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:l,callback:({hunkIndex:de,hunk:_e,collapsedBefore:pe,collapsedAfter:Pe,deletionLine:je,additionLine:st})=>{const He=st!=null?st.splitLineIndex:je.splitLineIndex,Ve=st!=null?st.unifiedLineIndex:je.unifiedLineIndex,rt=(st?.noEOFCR??!1)||(je?.noEOFCR??!1),en=de===e.hunks.length-1&&_e!=null&&(f==="split"?He===_e.splitLineStart+_e.splitLineCount-1:Ve===_e.unifiedLineStart+_e.unifiedLineCount-1),jt=(pe>0?sl({type:p,metrics:this.metrics,hunkIndex:de,hunkSpecs:_e?.hunkSpecs}):void 0)?.totalHeight??0;Z+=jt;const Bt=X%c===0,Wt=Math.floor(X/c);if(Bt&&(ee[Wt]=Z-(t+_+jt),$!=null)){if($<=0)return!0;$--}const dt=this.getLineHeight(f==="split"?He:Ve,rt);if(Z>n-dt&&Z<i&&(W??=Wt),P==null&&Z+dt>q&&(P=Wt),$==null&&Z>=i&&Bt&&($=F),X++,Z+=dt,Pe>0||en&&m){const ni=So({type:p,metrics:this.metrics});ni!=null&&(Z<i&&Z+ni.totalHeight>n&&(W??=Wt),P==null&&Z+ni.totalHeight>q&&(P=Wt),Z+=ni.totalHeight)}return!1}}),W==null)if(M)W=0,P=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-x-S};P??=W;const ne=Math.round(P-j/2),ue=Math.max(0,Math.ceil(v/c)-j),R=Math.max(0,Math.min(ne,ue)),H=R*c,Y=ne<0?z+ne*c:z,I=ee[R]??0,le=H===0?0:C+I,fe=R+Y/c,re=fe<ee.length?w-ee[fe]:w-(Z-t-_);return{startingLine:H,totalLines:Y,bufferBefore:le,bufferAfter:Math.max(0,re)}}};function c4(e){let t;for(const n of e){if(n==null)continue;const i=n.children[1];if(i instanceof HTMLElement)for(const o of i.children)o instanceof HTMLElement&&o.dataset.lineAnnotation===Zk&&(t=Math.max(t??0,o.getBoundingClientRect().height))}return t}function d4(e){const t=Array.from(e).sort((s,l)=>s[0]-l[0]),n=[],i=[0];let o=0;for(const[s,l]of t)n.push(s),o+=l,i.push(o);return{lineIndexes:n,prefixTotals:i}}function HC({lineIndexes:e,prefixTotals:t},n,i){if(n>=i||e.length===0)return 0;const o=jC(e,n);return(t[jC(e,i)]??0)-(t[o]??0)}function jC(e,t){let n=0,i=e.length;for(;n<i;){const o=n+i>>1,s=e[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid prefix index");s<t?n=o+1:i=o}return n}function f4(e){return Math.ceil(e/jg)*jg}function h4(e,t){let n=0;for(const i of e)i<t&&n++;return n}function p4({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];const i=t.hunkContent.at(-1);if(i==null)return[];if(i.type==="context")return[n-1];const o=Math.max(i.deletions,i.additions),s=i.deletions+i.additions;if(e==="split")return o>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];const l=[],c=n-s;return i.deletions>0&&t.noEOFCRDeletions&&l.push(c+i.deletions-1),i.additions>0&&t.noEOFCRAdditions&&l.push(n-1),l}function m4(e,t){return(e.diffStyle??"split")!==(t.diffStyle??"split")||(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??"bars")!==(t.diffIndicators??"bars")||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function g4(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function xm(e,t){return e.isPartial&&t&&(e.type==="change"||e.type==="rename-changed")}function y4(e){return typeof e=="function"?"custom":e??"line-info"}function BC(e,t){return e==null||t==null?e==null&&t==null:qn(e,t)}function v4(e,t){const[n,i]=e.split(",").map(Number);return t==="split"?i:n}function b4({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function x4(e,t){const n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:S4(n,e.startContentIndex)}}function S4(e,t){let n=e.unifiedLineStart;for(let i=0;i<t;i++){const o=e.hunkContent[i];n+=o.type==="context"?o.lines:o.deletions+o.additions}return n}function UC(e){const t=[];for(const n of e){const i=Io.get(n);if(i==null)throw new Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(i)}return t}function VC(e){for(const t of Array.isArray(e)?e:[e])if(!Io.has(t))return!1;return!0}async function FC(e){const t=[],n=[];for(const i of e){if(i==="text"||i==="ansi")continue;const o=Ik(i)??Mk(i);"then"in o?n.push(o):t.push(o)}return n.length>0&&await Promise.all(n).then(i=>{for(const o of i){if(o==null)throw new Error("resolvedLanguages: unable to resolve language");t.push(o)}}),t}function GC(e){return Zn.getResolvedThemes(e)}async function $C(e){for(const n of e)Vk(n);const t=await Zn.resolveThemes(e);for(let n=0;n<e.length;n++)Fk(e[n],t[n]);return t}function AT(e){const t=N.useRef(e);return N.useInsertionEffect(()=>{t.current=e}),N.useCallback((...n)=>t.current(...n),[])}const _4=N.createContext(void 0);function LT(){return N.useContext(_4)}const RT={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},C4={display:"contents"};function Rd(){return null}function w4({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:i,renderHeaderFilenameSuffix:o,renderHeaderMetadata:s,renderAnnotation:l,renderGutterUtility:c,renderMergeConflictUtility:d,lineAnnotations:f,getHoveredLine:p,getInstance:m}){const g=n?.(e),v=i?.(e),x=o?.(e),S=s?.(e);return A.jsxs(A.Fragment,{children:[g!=null?A.jsx("div",{slot:Hl,children:g}):A.jsxs(A.Fragment,{children:[v!=null&&A.jsx("div",{slot:"header-prefix",children:v}),x!=null&&A.jsx("div",{slot:"header-filename-suffix",children:x}),S!=null&&A.jsx("div",{slot:"header-metadata",children:S})]}),l!=null&&f?.map((C,_)=>A.jsx("div",{slot:ei(C),children:l(C)},_)),t!=null&&d!=null&&m!=null&&t.map(C=>{if(C==null)return;const _=E4(C,e);return A.jsx("div",{slot:_,style:C4,children:d(C,m)},_)}),c!=null&&A.jsx("div",{slot:"gutter-utility-slot",style:RT,children:c(p)})]})}function E4(e,t){const n=x4(e,t);return n!=null?b4({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex}):void 0}function k4({file:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:i,renderHeaderMetadata:o,renderAnnotation:s,lineAnnotations:l,renderGutterUtility:c,getHoveredLine:d}){const f=t?.(e),p=n?.(e),m=i?.(e),g=o?.(e);return A.jsxs(A.Fragment,{children:[f!=null?A.jsx("div",{slot:Hl,children:f}):A.jsxs(A.Fragment,{children:[p!=null&&A.jsx("div",{slot:"header-prefix",children:p}),m!=null&&A.jsx("div",{slot:"header-filename-suffix",children:m}),g!=null&&A.jsx("div",{slot:"header-metadata",children:g})]}),s!=null&&l?.map((v,x)=>A.jsx("div",{slot:ei(v),children:s(v)},x)),c!=null&&A.jsx("div",{slot:"gutter-utility-slot",style:RT,children:c(d)})]})}var ll={exports:{}},T4=ll.exports,qC;function A4(){return qC||(qC=1,(function(e,t){(function(n,i){i(t)})(T4,function(n){const i=Symbol("newer"),o=Symbol("older");class s{constructor(m,g){typeof m!="number"&&(g=m,m=0),this.size=0,this.limit=m,this.oldest=this.newest=void 0,this._keymap=new Map,g&&(this.assign(g),m<1&&(this.limit=this.size))}_markEntryAsUsed(m){m!==this.newest&&(m[i]&&(m===this.oldest&&(this.oldest=m[i]),m[i][o]=m[o]),m[o]&&(m[o][i]=m[i]),m[i]=void 0,m[o]=this.newest,this.newest&&(this.newest[i]=m),this.newest=m)}assign(m){let g,v=this.limit||Number.MAX_VALUE;this._keymap.clear();let x=m[Symbol.iterator]();for(let S=x.next();!S.done;S=x.next()){let C=new l(S.value[0],S.value[1]);if(this._keymap.set(C.key,C),g?(g[i]=C,C[o]=g):this.oldest=C,g=C,v--==0)throw new Error("overflow")}this.newest=g,this.size=this._keymap.size}get(m){var g=this._keymap.get(m);return g?(this._markEntryAsUsed(g),g.value):void 0}set(m,g){var v=this._keymap.get(m);return v?(v.value=g,this._markEntryAsUsed(v),this):(this._keymap.set(m,v=new l(m,g)),this.newest?(this.newest[i]=v,v[o]=this.newest):this.oldest=v,this.newest=v,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var m=this.oldest;if(m)return this.oldest[i]?(this.oldest=this.oldest[i],this.oldest[o]=void 0):(this.oldest=void 0,this.newest=void 0),m[i]=m[o]=void 0,this._keymap.delete(m.key),--this.size,[m.key,m.value]}find(m){let g=this._keymap.get(m);return g?g.value:void 0}has(m){return this._keymap.has(m)}delete(m){var g=this._keymap.get(m);return g?(this._keymap.delete(g.key),g[i]&&g[o]?(g[o][i]=g[i],g[i][o]=g[o]):g[i]?(g[i][o]=void 0,this.oldest=g[i]):g[o]?(g[o][i]=void 0,this.newest=g[o]):this.oldest=this.newest=void 0,this.size--,g.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new d(this.oldest)}values(){return new f(this.oldest)}entries(){return this}[Symbol.iterator](){return new c(this.oldest)}forEach(m,g){typeof g!="object"&&(g=this);let v=this.oldest;for(;v;)m.call(g,v.value,v.key,this),v=v[i]}toJSON(){for(var m=new Array(this.size),g=0,v=this.oldest;v;)m[g++]={key:v.key,value:v.value},v=v[i];return m}toString(){for(var m="",g=this.oldest;g;)m+=String(g.key)+":"+g.value,g=g[i],g&&(m+=" < ");return m}}n.LRUMap=s;function l(p,m){this.key=p,this.value=m,this[i]=void 0,this[o]=void 0}function c(p){this.entry=p}c.prototype[Symbol.iterator]=function(){return this},c.prototype.next=function(){let p=this.entry;return p?(this.entry=p[i],{done:!1,value:[p.key,p.value]}):{done:!0,value:void 0}};function d(p){this.entry=p}d.prototype[Symbol.iterator]=function(){return this},d.prototype.next=function(){let p=this.entry;return p?(this.entry=p[i],{done:!1,value:p.key}):{done:!0,value:void 0}};function f(p){this.entry=p}f.prototype[Symbol.iterator]=function(){return this},f.prototype.next=function(){let p=this.entry;return p?(this.entry=p[i],{done:!1,value:p.value}):{done:!0,value:void 0}}})})(ll,ll.exports)),ll.exports}var L4=A4();const WC=zd(L4),Pc=Symbol("IGNORE_RESPONSE");var Hc=class extends Error{constructor(){super("WorkerPoolManager: operation canceled because the pool terminated")}},Sm=class extends Error{constructor(){super("WorkerPoolManager: operation canceled before the task completed")}},R4=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=mt,useTokenTransformer:i=!1,lineDiffType:o="word-alt",maxLineDiffLength:s=1e3,tokenizeMaxLineLength:l=1e3,preferredHighlighter:c="shiki-js"}){this.options=e,this.preferredHighlighter=c,this.renderOptions={theme:n,useTokenTransformer:i,lineDiffType:o,maxLineDiffLength:s,tokenizeMaxLineLength:l},this.fileCache=new WC.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new WC.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey!=null?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return e.cacheKey!=null?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){const{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??mt,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??"word-alt",maxLineDiffLength:i=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:o=this.renderOptions.tokenizeMaxLineLength??1e3}){const{lifecycleGeneration:s}=this,l=++this.renderOptionsRequestVersion,c=()=>this.isCurrentLifecycle(s)&&this.renderOptionsRequestVersion===l;try{const d={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:i,tokenizeMaxLineLength:o};if(this.isInitialized()||await this.initialize(),!c()||pi(d,this.renderOptions))return;const f=kl(e);let p=[];if(Qa(d.theme,this.renderOptions.theme)||(kg(f)?p=GC(f):p=await $C(f)),!c())return;if(this.highlighter!=null)Eg(p,this.highlighter);else{const g=await wd({themes:f,langs:["text"],preferredHighlighter:this.preferredHighlighter});if(!c())return;this.highlighter=g}const m=this.setRenderOptionsOnWorkers(d,p);this.renderOptions=d,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(const g of this.themeSubscribers)g.onThemeChange();await m}catch(d){if(d instanceof Hc||!c())return;throw d}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();const n=[];for(const i of this.workers){if(!i.initialized)throw console.log({managedWorker:i}),new Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");n.push(new Promise((o,s)=>{const l=this.generateRequestId(),c={type:"set-render-options",id:l,request:{type:"set-render-options",id:l,renderOptions:e,resolvedThemes:t},resolve:o,reject:s,requestStart:Date.now()};this.activeTaskById.set(l,c),i.pendingSetupRequestId=l,i.worker.postMessage(c.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast==null&&(this._queuedBroadcast=requestAnimationFrame(this._broadcastStateChanges))}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);const e=this.getStats();for(const t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);const t=this.activeRequestByInstance.get(e);if(t!=null){const n=this.activeTaskById.get(t);Pr(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1){const{lifecycleGeneration:t}=this;this.initialized=new Promise((n,i)=>{(async()=>{try{const o=kl(this.renderOptions.theme);let s=[];if(kg(o)?s=GC(o):s=await $C(o),!this.isCurrentLifecycle(t)){n();return}let l=[];if(VC(e)?l=UC(e):l=await FC(e),!this.isCurrentLifecycle(t)){n();return}const[c]=await Promise.all([wd({themes:o,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(s,l)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=c,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(o){if(o instanceof Hc||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0;for(const s of this.queuedTasks)this.rejectRenderTaskCallbacks(s,_m(o));this.queueBroadcastStateChanges(),i(o)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;const n=[],i=void 0;this.workers.length>0&&this.terminateWorkers();for(let o=0;o<(this.options.poolSize??8);o++){const s=this.options.workerFactory(),l={worker:s,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:c})=>c)]),customExtensionsVersion:0};s.addEventListener("message",c=>{this.handleWorkerMessage(l,c.data)}),s.addEventListener("error",c=>console.error("Worker error:",c,l)),this.workers.push(l),n.push(new Promise((c,d)=>{const f=this.generateRequestId(),p={type:"initialize",id:f,request:{type:"initialize",id:f,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:void 0,customExtensionMap:i},resolve(){l.initialized=!0,c()},reject:d,requestStart:Date.now()};this.activeTaskById.set(f,p),this.executeTask(l,p)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.queuedTasks.length===0)){for(let e=0;e<this.queuedTasks.length;){const t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}const n=YC(t),i=this.getAvailableWorker(n);if(i==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,i),this.resolveLanguagesAndExecuteTask(i,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){const n=this.getFileResultCache(t);Tl(t)||n!=null&&Qi(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:"file",file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeFileHighlightCache: worker pool is not working"));const t=this.getOrCreateFileHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}const t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||Tl(e)||t!=null&&Qi(t.options,this.getFileRenderOptions()))return;const i=this.getTaskByHighlightKey(n);if(i!=null)return i.primeCache=!0,i.type==="file"?i:void 0;{const o=this.submitCacheTask({type:"file",file:e},n);return o.type==="file"?o:void 0}}getPlainFileAST(e,t,n,i){if(this.highlighter==null){this.queueInitialization();return}return Qk(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:i})}highlightDiffAST(e,t){const n=this.getDiffResultCache(t);qa(t)||n!=null&&pi(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:"diff",diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeDiffHighlightCache: worker pool is not working"));const t=this.getOrCreateDiffHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}const t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||qa(e)||t!=null&&pi(t.options,this.getDiffRenderOptions()))return;const i=this.getTaskByHighlightKey(n);if(i!=null)return i.primeCache=!0,i.type==="diff"?i:void 0;{const o=this.submitCacheTask({type:"diff",diff:e},n);return o.type==="diff"?o:void 0}}getPlainDiffAST(e,t,n,i,o){return this.highlighter!=null?_T(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:i,collapsedContextThreshold:o}):void 0}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();const e=new Hc;for(const t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(t=>{console.error(t)})}cancelActiveWorkerTasks(){const e=new Hc;for(const t of this.activeTaskById.values())"reject"in t?t.reject(e):Pr(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(const e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?"waiting":this.initialized!==!0?"initializing":"initialized",totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.getHighlightKeyForRequest(t),i=n!=null?this.getTaskByHighlightKey(n):void 0;if(i!=null){this.detachInstanceFromQueuedTasks(e,i),this.addInstanceToTask(i,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);const o=this.generateRequestId(),s=Date.now(),{renderOptionsVersion:l}=this,c=(()=>{switch(t.type){case"file":return{type:"file",id:o,request:{...t,id:o},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:l,requestStart:s};case"diff":return{type:"diff",id:o,request:{...t,id:o},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:l,requestStart:s}}})();this.enqueueRenderTask(c,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.generateRequestId(),i=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(e.type){case"file":return{type:"file",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:o,requestStart:i};case"diff":return{type:"diff",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:o,requestStart:i}}})();return this.enqueueRenderTask(s),s}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{const i=n.filter(o=>!e.langs.has(o));if(i.length>0&&(VC(i)?t.request.resolvedLanguages=UC(i):t.request.resolvedLanguages=await FC(i)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(i){this.rejectRenderTaskCallbacks(t,_m(i)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){const n=this.activeTaskById.get(t.id);try{if(n==null)throw Pc;if(t.type==="error"){const i=new Error(t.error);if(t.stack&&(i.stack=t.stack),"reject"in n)n.reject(i);else if(Pr(n))this.notifyHighlightError(n,i),this.rejectRenderTaskCallbacks(n,i);else throw new Error("handleWorkerMessage: unknown task type");throw i}else switch(t.requestType){case"initialize":if(n.type!=="initialize")throw new Error("handleWorkerMessage: task/response dont match");this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case"set-render-options":if(n.type!=="set-render-options")throw new Error("handleWorkerMessage: task/response dont match");n.resolve();break;case"file":{if(n.type!=="file")throw new Error("handleWorkerMessage: task/response dont match");const{result:i,options:o}=t;if(!this.isCurrentRenderTask(n)||!Qi(o,this.getFileRenderOptions()))throw Pc;const{request:s}=n;this.syncCustomExtensionVersion(e,s),n.cacheKeyAtDispatch!=null&&this.fileCache.set(n.cacheKeyAtDispatch,{result:i,options:o}),this.resolveRenderTaskCallbacks(n),this.notifyFileInstances(n,i,o);break}case"diff":{if(n.type!=="diff")throw new Error("handleWorkerMessage: task/response dont match");const{result:i,options:o}=t;if(!this.isCurrentRenderTask(n)||!pi(o,this.getDiffRenderOptions()))throw Pc;const{request:s}=n;this.syncCustomExtensionVersion(e,s),n.cacheKeyAtDispatch!=null&&this.diffCache.set(n.cacheKeyAtDispatch,{result:i,options:o}),this.resolveRenderTaskCallbacks(n),this.notifyDiffInstances(n,i,o);break}}}catch(i){i!==Pc&&console.error(i,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain==null&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,Pr(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(Pr(t)&&(this.rejectRenderTaskCallbacks(t,new Sm),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){O4(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(const n of YC(t))e.langs.add(n);try{t.type==="file"?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type==="diff"&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(n){console.error("Failed to post message to worker:",n),Pr(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,_m(n))):"reject"in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;const n=sj();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=lj())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(const n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let i=!0;for(const o of e)if(!n.langs.has(o)){i=!1;break}if(i)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case"file":return this.getFileHighlightKey(e.file);case"diff":return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(const t of il(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){const n=this.queuedTaskByInstance.get(e);n==null||n===t||(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){const t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new Sm),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new Sm),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,n)=>{e.callbacks.add({resolve:t,reject:n})})}resolveRenderTaskCallbacks(e){for(const t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(const n of e.callbacks)n.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){const t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(const e of Array.from(this.activeTaskById.values()))Pr(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(const t of il(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(const t of il(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(const t of il(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(const i of e.instances)this.activeRequestByInstance.get(i)===e.id&&i.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(const i of e.instances)this.activeRequestByInstance.get(i)===e.id&&i.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(const n of il(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="file"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&qn(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="diff"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&wo(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){const t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(const e of this.queuedTasks)yield e;for(const e of this.activeTaskById.values())Pr(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function O4(e){return e.type==="initialize"||e.type==="file"||e.type==="diff"}function YC(e){const t=new Set;if(e.type==="initialize"||e.type==="set-render-options")return[];switch(e.type){case"file":t.add(e.request.file.lang??Jt(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??Jt(e.request.diff.name)),t.add(e.request.diff.lang??Jt(e.request.diff.prevName??"-"));break}return t.delete("text"),Array.from(t)}function Pr(e){return e?.type==="file"||e?.type==="diff"}function il(e){return e.instances}function _m(e){return e instanceof Error?e:new Error(String(e))}let yl;function D4({poolOptions:e,highlighterOptions:t}){return yl??=new R4(e,t),yl}function M4(){yl!=null&&(yl.terminate(),yl=void 0)}const Py=N.createContext(void 0);let Cm=0;function I4({children:e,poolOptions:t,highlighterOptions:n}){const[i]=N.useState(()=>{if(!(typeof window>"u"))return D4({poolOptions:t,highlighterOptions:n})});return N.useInsertionEffect(()=>{if(i!=null)return Cm++,()=>{Cm--}},[i]),N.useEffect(()=>()=>{Cm===0&&M4()},[]),A.jsx(Py.Provider,{value:i,children:e})}var nf=kw();function OT(e,t){return typeof window>"u"&&t!=null?A.jsxs(A.Fragment,{children:[A.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):A.jsx(A.Fragment,{children:e})}const N4=N.createContext(void 0);function DT(){return N.useContext(N4)}const XC=typeof window>"u"?N.useEffect:N.useLayoutEffect;function z4({file:e,options:t,editorOptions:n,lineAnnotations:i,selectedLines:o,prerenderedHTML:s,metrics:l,hasGutterRenderUtility:c,hasCustomHeader:d,disableWorkerPool:f,edit:p}){const m=DT(),g=o!==void 0,v=N.useContext(Py),x=LT(),S=N.useRef(null),C=AT(_=>{if(_!=null){if(S.current!=null)throw new Error("File: An instance should not already exist when a node is created");m!=null?S.current=new Gj(wm({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),m,l,f?void 0:v,!0):S.current=new gT(wm({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),f?void 0:v,!0),S.current.hydrate({file:e,fileContainer:_,lineAnnotations:i,prerenderedHTML:s})}else{if(S.current==null)throw new Error("File: A File instance should exist when unmounting");S.current.cleanUp(),S.current=null}});return XC(()=>{if(S.current==null)return;const _=wm({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),w=_!==void 0&&!Ud(S.current.options,_);S.current.setOptions(_),S.current.render({file:e,lineAnnotations:i,forceRender:w}),o!==void 0&&S.current.setSelectedLines(o)}),XC(()=>{if(p&&S.current!=null){if(x===void 0)throw new Error("File: EditContext is not attached");const _=x(n??{});if(_==null)throw new Error("File: EditProvider.createEditor must return an editor instance");try{return _.edit(S.current)}catch(w){throw _.cleanUp(),w}}},[p]),{ref:C,getHoveredLine:N.useCallback(()=>S.current?.getHoveredLine(),[])}}function wm({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:i}){return t||i||n?{...e,controlledSelection:t,renderCustomHeader:n?Rd:e?.renderCustomHeader,renderGutterUtility:i?Rd:e?.renderGutterUtility}:e}function P4({file:e,lineAnnotations:t,selectedLines:n,options:i,editorOptions:o,metrics:s,className:l,style:c,renderAnnotation:d,renderCustomHeader:f,renderHeaderPrefix:p,renderHeaderFilenameSuffix:m,renderHeaderMetadata:g,prerenderedHTML:v,renderGutterUtility:x,disableWorkerPool:S=!1,edit:C=!1}){const{ref:_,getHoveredLine:w}=z4({file:e,options:i,editorOptions:o,metrics:s,lineAnnotations:t,selectedLines:n,prerenderedHTML:v,hasGutterRenderUtility:x!=null,hasCustomHeader:f!=null,disableWorkerPool:S,edit:C});return A.jsx(xy,{ref:_,className:l,style:c,children:OT(k4({file:e,renderAnnotation:d,renderCustomHeader:f,renderHeaderPrefix:p,renderHeaderFilenameSuffix:m,renderHeaderMetadata:g,renderGutterUtility:x,lineAnnotations:t,getHoveredLine:w}),v)})}const KC=typeof window>"u"?N.useEffect:N.useLayoutEffect;function H4({fileDiff:e,options:t,editorOptions:n,lineAnnotations:i,selectedLines:o,prerenderedHTML:s,metrics:l,hasGutterRenderUtility:c,hasCustomHeader:d,disableWorkerPool:f,edit:p}){const m=DT(),g=o!==void 0,v=N.useContext(Py),x=LT(),S=N.useRef(null),C=AT(_=>{if(_!=null){if(S.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");m!=null?S.current=new u4(Em({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),m,l,f?void 0:v,!0):S.current=new TT(Em({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),f?void 0:v,!0),S.current.hydrate({fileDiff:e,fileContainer:_,lineAnnotations:i,prerenderedHTML:s})}else{if(S.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");S.current.cleanUp(),S.current=null}});return KC(()=>{const{current:_}=S;if(_==null)return;const w=Em({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),k=w!==void 0&&!Ud(_.options,w);_.setOptions(w),_.render({forceRender:k,fileDiff:e,lineAnnotations:i}),o!==void 0&&_.setSelectedLines(o)}),KC(()=>{if(p&&S.current!=null){if(x===void 0)throw new Error("FileDiff: EditContext is not attached");const _=x(n??{});if(_==null)throw new Error("FileDiff: EditProvider.createEditor must return an editor instance");try{return _.edit(S.current)}catch(w){throw _.cleanUp(),w}}},[p]),{ref:C,getHoveredLine:N.useCallback(()=>S.current?.getHoveredLine(),[])}}function Em({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:i}){return t||i||n?{...e,controlledSelection:t,renderCustomHeader:n?Rd:e?.renderCustomHeader,renderGutterUtility:i?Rd:e?.renderGutterUtility}:e}function j4({fileDiff:e,options:t,editorOptions:n,metrics:i,lineAnnotations:o,selectedLines:s,className:l,style:c,prerenderedHTML:d,renderAnnotation:f,renderCustomHeader:p,renderHeaderPrefix:m,renderHeaderFilenameSuffix:g,renderHeaderMetadata:v,renderGutterUtility:x,disableWorkerPool:S=!1,edit:C=!1}){const{ref:_,getHoveredLine:w}=H4({fileDiff:e,options:t,editorOptions:n,metrics:i,lineAnnotations:o,selectedLines:s,prerenderedHTML:d,hasGutterRenderUtility:x!=null,hasCustomHeader:p!=null,disableWorkerPool:S,edit:C});return A.jsx(xy,{ref:_,className:l,style:c,children:OT(w4({fileDiff:e,renderCustomHeader:p,renderHeaderPrefix:m,renderHeaderFilenameSuffix:g,renderHeaderMetadata:v,renderAnnotation:f,renderGutterUtility:x,lineAnnotations:o,getHoveredLine:w}),d)})}function B4(e){return new Worker(""+new URL("worker-DsKBD11i.js",import.meta.url).href,{type:"module",name:e?.name})}const MT=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();const U4=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const V4=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());const QC=e=>{const t=V4(e);return t.charAt(0).toUpperCase()+t.slice(1)};var km={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const F4=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},G4=N.createContext({}),$4=()=>N.useContext(G4),q4=N.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:i,className:o="",children:s,iconNode:l,...c},d)=>{const{size:f=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,color:g="currentColor",className:v=""}=$4()??{},x=i??m?Number(n??p)*24/Number(t??f):n??p;return N.createElement("svg",{ref:d,...km,width:t??f??km.width,height:t??f??km.height,stroke:e??g,strokeWidth:x,className:MT("lucide",v,o),...!s&&!F4(c)&&{"aria-hidden":"true"},...c},[...l.map(([S,C])=>N.createElement(S,C)),...Array.isArray(s)?s:[s]])});const rf=(e,t)=>{const n=N.forwardRef(({className:i,...o},s)=>N.createElement(q4,{ref:s,iconNode:t,className:MT(`lucide-${U4(QC(e))}`,`lucide-${e}`,i),...o}));return n.displayName=QC(e),n};const W4=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Y4=rf("chevron-down",W4);const X4=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],IT=rf("grip-vertical",X4);const K4=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Q4=rf("moon",K4);const Z4=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],J4=rf("sun",Z4),eU=10,tU="line-info-basic",nU=`
1557
+ [data-expand-button]:focus-visible {
1558
+ outline: 2px solid var(--diffs-modified-base);
1559
+ outline-offset: -2px;
1560
+ }
1561
+
1562
+ [data-separator="line-info-basic"] {
1563
+ height: 24px;
1564
+ background: var(--diffs-bg-separator);
1565
+ position: relative;
1566
+ }
1567
+
1568
+ [data-diff-type="single"] [data-gutter],
1569
+ [data-diff-type="split"] [data-deletions] [data-gutter] {
1570
+ [data-separator-wrapper] {
1571
+ position: absolute;
1572
+ left: 100%;
1573
+ display: flex;
1574
+ align-items: center;
1575
+ gap: 0;
1576
+ width: max-content;
1577
+ background: transparent;
1578
+ color: var(--diffs-fg-number);
1579
+ font-size: 0.75rem;
1580
+ margin-left: calc(-2ch - 2px);
1581
+ }
1582
+
1583
+ [data-separator-wrapper][data-separator-multi-button] {
1584
+ margin-left: calc(-3ch - 2px);
1585
+ }
1586
+
1587
+ [data-expand-button],
1588
+ [data-separator-content] {
1589
+ display: flex;
1590
+ align-items: center;
1591
+ min-width: unset;
1592
+ min-height: unset;
1593
+ padding: 0;
1594
+ flex-shrink: 0;
1595
+ border: none;
1596
+ width: auto;
1597
+ height: 100%;
1598
+ background-color: transparent;
1599
+ color: inherit;
1600
+ font: inherit;
1601
+ }
1602
+
1603
+ [data-expand-button]:not([data-expand-all-button]) {
1604
+ min-width: 1.4rem;
1605
+ justify-content: center;
1606
+
1607
+ &[data-expand-down]::before {
1608
+ content: "↓";
1609
+ }
1610
+ &[data-expand-up]::before {
1611
+ content: "↑";
1612
+ }
1613
+ &[data-expand-both]::before {
1614
+ content: "↕";
1615
+ }
1616
+
1617
+ svg {
1618
+ display: none;
1619
+ }
1620
+ }
1621
+
1622
+ [data-separator-content] {
1623
+ margin-left: 0.4ch;
1624
+ }
1625
+
1626
+ [data-expand-all-button] {
1627
+ display: flex;
1628
+ position: relative;
1629
+ margin-left: 0.9rem;
1630
+ text-transform: lowercase;
1631
+
1632
+ &:hover {
1633
+ color: var(--diffs-fg);
1634
+ text-decoration: underline;
1635
+ }
1636
+ }
1637
+
1638
+ [data-expand-all-button]::before {
1639
+ content: "";
1640
+ display: block;
1641
+ position: absolute;
1642
+ top: 50%;
1643
+ left: -0.55rem;
1644
+ width: 3px;
1645
+ height: 3px;
1646
+ margin-top: -1px;
1647
+ border-radius: 2px;
1648
+ background-color: var(--diffs-fg-number);
1649
+ pointer-events: none;
1650
+ }
1651
+
1652
+ [data-separator-content]:hover,
1653
+ [data-expand-button]:hover {
1654
+ color: var(--diffs-fg);
1655
+ }
1656
+ }
1657
+ `;function iU(e){return e.isPartial&&(e.type==="change"||e.type==="rename-changed"||e.type==="rename-pure")}function rU(e){return e!=="new"&&e!=="deleted"}function Tm(e){return{name:e.path,contents:e.content,cacheKey:`${e.side}:${e.ref}:${e.path}`}}async function oU(e,t){if(e.type==="rename-pure"){const o=await t(e.name,"new");return{oldFile:null,newFile:Tm(o)}}const[n,i]=await Promise.all([t(e.name,"old"),t(e.name,"new")]);return{oldFile:Tm(n),newFile:Tm(i)}}const NT=2e3,aU=2,sU=2;function lU(e){for(const t of e){if(!zT(t))continue;const n=t.closest("[data-expand-index]");if(PT(n))return n}}function uU(e,t){if(t)return!1;for(const n of e)if(zT(n)){if(n.closest("[data-expand-all-button]"))return!1;if(n.closest("[data-expand-down]"))return!0}return!1}function cU(e){const t=e.closest("main");return t instanceof HTMLElement?t:void 0}function ZC(e,t){if(t===0)return;const{style:n}=e,i=n.scrollBehavior;n.scrollBehavior="auto",e.scrollTop+=t,n.scrollBehavior=i}function dU(e,t){if(Date.now()-e.createdAt>NT)return"done";const n=t.shadowRoot;if(n==null)return"wait";const i=hU(n,e.index);if(i===void 0)return ZC(e.scroller,e.scroller.scrollHeight-e.scrollHeight),"done";const o=i.getBoundingClientRect().top-e.top;return Math.abs(o)<aU?"ok":(ZC(e.scroller,o),"wait")}function fU(e,t,n,i,o=requestAnimationFrame){let s=0,l=!1;const c=()=>{if(!n()||Date.now()-e.createdAt>NT)return;const d=dU(e,t);if(d!=="done"){if(d==="wait")l=!0,s=0;else if(s+=1,l&&s>=sU)return;o(c)}};o(c)}function hU(e,t){if(!/^\d+$/.test(t))return;const n=e.querySelector(`[data-expand-index="${t}"]`);return PT(n)?n:void 0}function zT(e){return typeof e.closest=="function"}function PT(e){return e!=null&&typeof e.getBoundingClientRect=="function"}const HT="comprehende.theme",Hy={dark:"github-dark",light:"github-light"};function pU(e){return e==="light"||e==="dark"||e==="system"?e:"system"}function mU(e,t){return e==="system"?t?"dark":"light":e}function gU(e){document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e}function yU(){try{return pU(localStorage.getItem(HT))}catch{return"system"}}function vU(e){try{localStorage.setItem(HT,e)}catch{}}function bU(){return window.matchMedia("(prefers-color-scheme: dark)").matches}const jT=N.createContext(null);function xU(e){const[t,n]=N.useState(yU),[i,o]=N.useState(bU),s=mU(t,i),l=N.useCallback(f=>{vU(f),n(f)},[]),c=N.useCallback(()=>{l(s==="dark"?"light":"dark")},[s,l]);N.useEffect(()=>{gU(s)},[s]),N.useEffect(()=>{const f=window.matchMedia("(prefers-color-scheme: dark)"),p=()=>o(f.matches);return f.addEventListener("change",p),()=>f.removeEventListener("change",p)},[]);const d=N.useMemo(()=>({preference:t,resolved:s,setPreference:l,toggleTheme:c}),[t,s,l,c]);return A.jsx(jT.Provider,{value:d,children:e.children})}function jy(){const e=N.useContext(jT);if(e===null)throw new Error("useTheme must be used within ThemeProvider");return e}const BT=`
1658
+ [data-diffs-header],
1659
+ [data-diff],
1660
+ [data-file],
1661
+ [data-error-wrapper],
1662
+ [data-virtualizer-buffer] {
1663
+ --diffs-header-font-family: var(--font-sans) !important;
1664
+ --diffs-font-family: var(--font-mono) !important;
1665
+ --diffs-bg: var(--diff-canvas) !important;
1666
+ --diffs-light-bg: var(--diff-canvas) !important;
1667
+ --diffs-dark-bg: var(--diff-canvas) !important;
1668
+ --diffs-token-light-bg: transparent;
1669
+ --diffs-token-dark-bg: transparent;
1670
+ --diffs-bg-context-override: var(--diff-canvas);
1671
+ --diffs-bg-hover-override: var(--diff-hover);
1672
+ --diffs-bg-separator-override: var(--diff-hunk);
1673
+ --diffs-bg-buffer-override: var(--diff-hunk);
1674
+ --diffs-bg-addition-override: var(--diff-add-line);
1675
+ --diffs-bg-addition-number-override: var(--diff-add-num);
1676
+ --diffs-bg-addition-hover-override: var(--diff-add-line);
1677
+ --diffs-bg-addition-emphasis-override: var(--diff-add-word);
1678
+ --diffs-bg-deletion-override: var(--diff-del-line);
1679
+ --diffs-bg-deletion-number-override: var(--diff-del-num);
1680
+ --diffs-bg-deletion-hover-override: var(--diff-del-line);
1681
+ --diffs-bg-deletion-emphasis-override: var(--diff-del-word);
1682
+ background-color: var(--diff-canvas) !important;
1683
+ color: var(--diff-fg) !important;
1684
+ }
1685
+
1686
+ [data-line-type="change-addition"] {
1687
+ background-color: var(--diff-add-line) !important;
1688
+ }
1689
+ [data-line-type="change-addition"][data-column-number] {
1690
+ background-color: var(--diff-add-num) !important;
1691
+ }
1692
+ [data-line-type="change-deletion"] {
1693
+ background-color: var(--diff-del-line) !important;
1694
+ }
1695
+ [data-line-type="change-deletion"][data-column-number] {
1696
+ background-color: var(--diff-del-num) !important;
1697
+ }
1698
+
1699
+ [data-diff-type="split"][data-overflow="scroll"] {
1700
+ grid-template-columns: minmax(0, var(--comprehende-split-left, 1fr)) minmax(0, var(--comprehende-split-right, 1fr)) !important;
1701
+ }
1702
+
1703
+ [data-diff-type="split"][data-overflow="wrap"],
1704
+ [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
1705
+ grid-template-columns:
1706
+ var(--diffs-grid-number-column-width)
1707
+ minmax(0, var(--comprehende-split-left, 1fr))
1708
+ var(--diffs-grid-number-column-width)
1709
+ minmax(0, var(--comprehende-split-right, 1fr)) !important;
1710
+ }
1711
+ `,UT=.2,VT=.8;function Am(e){return Math.min(VT,Math.max(UT,e))}function SU(e){const t=N.useMemo(()=>{const i=typeof navigator>"u"?4:Math.max(1,navigator.hardwareConcurrency||4);return{workerFactory:()=>new B4,poolSize:Math.max(2,Math.min(6,Math.floor(i/2)))}},[]),n=N.useMemo(()=>({theme:Hy,tokenizeMaxLineLength:1e3,useTokenTransformer:!0,lineDiffType:"none"}),[]);return A.jsx(I4,{poolOptions:t,highlighterOptions:n,children:e.children})}function _U(e,t){if(e.trim()!=="")try{return Yz(e,`comprehende:${t}:${CU(e)}`)[0]?.files[0]}catch{return}}function CU(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return`${e.length.toString(16)}:${(t>>>0).toString(16)}`}function FT(e){return oU(e,qw)}const wU=N.memo(function(t){const n=N.useRef(t.onPostRender);n.current=t.onPostRender;const i=N.useMemo(()=>({theme:Hy,themeType:t.themeType,diffStyle:t.split?"split":"unified",overflow:t.wrap?"wrap":"scroll",disableFileHeader:!0,stickyHeader:!1,lineDiffType:"none",expansionLineCount:eU,hunkSeparators:tU,...t.loadFiles?{loadDiffFiles:FT}:{},unsafeCSS:`${BT}
1712
+ ${nU}`,onPostRender:(o,s,l)=>{l!=="unmount"&&n.current?.(o)}}),[t.loadFiles,t.split,t.themeType,t.wrap]);return A.jsx(j4,{className:"block w-full",fileDiff:t.fileDiff,options:i})}),EU=N.memo(function(t){const n=N.useMemo(()=>({name:t.path,contents:t.contents,cacheKey:`${t.path}:${t.contents.length}:${t.contents.slice(0,32)}:${t.annotations?.length??0}`}),[t.annotations?.length,t.contents,t.path]),i=N.useMemo(()=>({theme:Hy,themeType:t.themeType,overflow:t.wrap?"wrap":"scroll",disableFileHeader:!0,stickyHeader:!1,unsafeCSS:BT}),[t.themeType,t.wrap]);return A.jsx(P4,{className:"block w-full",file:n,options:i,lineAnnotations:t.annotations,renderAnnotation:t.annotations===void 0?void 0:kU})});function kU(e){const t=e.metadata,n=new Date(t.timestamp*1e3).toISOString().slice(0,10);return A.jsxs("div",{className:"flex min-w-0 items-baseline gap-2 px-2 py-1 font-sans text-[11px] text-muted-foreground",children:[A.jsx("code",{className:"text-primary",children:t.sha.slice(0,7)}),A.jsx("span",{className:"min-w-0 truncate",children:t.author}),A.jsx("span",{className:"shrink-0 tabular-nums",children:n}),t.lines>1?A.jsxs("span",{className:"shrink-0 tabular-nums",children:[t.lines," lines"]}):null]})}function JC(e){const{resolved:t}=jy();return A.jsx("div",{className:"min-h-0 min-w-0",children:A.jsx(EU,{path:e.path,contents:e.contents,wrap:e.wrap,themeType:t,annotations:e.annotations})})}function TU(e){const{path:t,patch:n,split:i,wrap:o,splitRatio:s,onSplitRatio:l,hydrate:c=!0}=e,{resolved:d}=jy(),f=N.useMemo(()=>_U(n,t),[n,t]),[p,m]=N.useState(f),g=N.useRef(null),v=N.useRef(null),x=N.useRef(0);N.useEffect(()=>{m(f)},[f]),N.useEffect(()=>{if(f===void 0||!c||!iU(f))return;let _=!1;return FT(f).then(w=>{if(!(_||!f.isPartial))try{m(Td("clone",f,w))}catch{}}).catch(()=>{}),()=>{_=!0}},[f,c]),N.useEffect(()=>{const _=g.current;if(_===null)return;const w=k=>{const D=k.composedPath();if(uU(D,k.shiftKey))return;const M=lU(D),O=M?.getAttribute("data-expand-index"),z=cU(_);M===void 0||O==null||z===void 0||(x.current+=1,v.current={scroller:z,top:M.getBoundingClientRect().top,index:O,scrollHeight:z.scrollHeight,createdAt:Date.now()})};return _.addEventListener("click",w,!0),()=>_.removeEventListener("click",w,!0)},[p!==void 0]);const S=_=>{const w=v.current;if(w===null)return;const k=x.current;v.current=null,fU(w,_,()=>x.current===k)};if(p===void 0)return A.jsx("p",{className:"px-3 py-2 text-xs text-warn",children:"Could not render this git patch."});const C=i&&rU(p.type);return A.jsxs("div",{ref:g,className:"relative min-w-0",style:{"--comprehende-split-left":`${s}fr`,"--comprehende-split-right":`${1-s}fr`},children:[A.jsx(wU,{fileDiff:p,split:C,wrap:o,themeType:d,loadFiles:c,onPostRender:S}),C?A.jsx(AU,{ratio:s,onRatio:l}):null]})}function AU(e){const t=N.useRef(null),n=s=>{const l=s.currentTarget.parentElement;l!==null&&(s.preventDefault(),s.currentTarget.setPointerCapture(s.pointerId),t.current={startX:s.clientX,start:e.ratio,width:l.getBoundingClientRect().width})},i=s=>{const l=t.current;l===null||l.width===0||e.onRatio(Am(l.start+(s.clientX-l.startX)/l.width))},o=()=>{t.current=null};return A.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize split diff","aria-valuemin":Math.round(UT*100),"aria-valuemax":Math.round(VT*100),"aria-valuenow":Math.round(e.ratio*100),tabIndex:0,className:it("absolute inset-y-0 z-10 flex w-3 -translate-x-1/2 cursor-col-resize touch-none items-center justify-center select-none","after:absolute after:inset-y-0 after:w-px after:bg-border hover:after:bg-primary/70 motion-safe:after:transition-colors"),style:{left:`${e.ratio*100}%`},onPointerDown:n,onPointerMove:i,onPointerUp:o,onPointerCancel:o,onDoubleClick:()=>e.onRatio(.5),onKeyDown:s=>{s.key==="ArrowLeft"?(s.preventDefault(),e.onRatio(Am(e.ratio-.05))):s.key==="ArrowRight"?(s.preventDefault(),e.onRatio(Am(e.ratio+.05))):(s.key==="Home"||s.key==="Enter")&&(s.preventDefault(),e.onRatio(.5))},children:A.jsx("div",{className:"z-10 flex h-8 w-3 items-center justify-center rounded-sm border border-border bg-card",children:A.jsx(IT,{className:"size-2.5 text-muted-foreground"})})})}const LU=.35,RU=8;function OU(e,t,n,i,o=RU){const s=n*i,l=new Uint8ClampedArray(s*4);let c=0;for(let d=0;d<s;d+=1){const f=d*4,p=e[f+3]??0,m=t[f+3]??0,g=p===0&&m===0,v=Math.abs((e[f]??0)-(t[f]??0)),x=Math.abs((e[f+1]??0)-(t[f+1]??0)),S=Math.abs((e[f+2]??0)-(t[f+2]??0)),C=Math.abs(p-m),_=Math.max(v,x,S,C);if(g||_<=o){const w=DU(t[f]??0,t[f+1]??0,t[f+2]??0),k=Math.round(w*LU);l[f]=k,l[f+1]=k,l[f+2]=k,l[f+3]=255;continue}if(c+=1,p===0&&m>0){l[f]=26,l[f+1]=127,l[f+2]=55,l[f+3]=255;continue}if(m===0&&p>0){l[f]=207,l[f+1]=34,l[f+2]=46,l[f+3]=255;continue}l[f]=200,l[f+1]=40,l[f+2]=160,l[f+3]=255}return{pixels:l,changed:c,total:s}}function DU(e,t,n){return Math.round(.2126*e+.7152*t+.0722*n)}function GT(e,t,n,i){if(e<=0||t<=0||n<=0||i<=0)return{width:0,height:0,scale:1};const o=Math.min(1,n/e,i/t);return{width:Math.max(1,Math.round(e*o)),height:Math.max(1,Math.round(t*o)),scale:o}}function MU(e,t,n,i){return GT(e,t,Math.floor(Math.max(0,n-1)/2),i)}function IU(e,t,n){const i=`${e} × ${t}`;return n>=.995?i:`${i} at ${Math.round(n*100)}%`}function NU(e){return`${e}%`}var zU=Object.defineProperty,es=(e,t)=>zU(e,"name",{value:t,configurable:!0}),$T=!!(typeof window<"u"&&window.document&&window.document.createElement);function mi(e,t,{checkForDefaultPrevented:n=!0}={}){return es(function(o){if(e?.(o),n===!1||!o||!o.defaultPrevented)return t?.(o)},"handleEvent")}es(mi,"composeEventHandlers");function PU(e){if(!$T)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}es(PU,"getOwnerWindow");function Bg(e){if(!$T)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}es(Bg,"getOwnerDocument");function qT(e,t=!1){const{activeElement:n}=Bg(e);if(!n?.nodeName)return null;if(WT(n)&&n.contentDocument)return qT(n.contentDocument.body,t);if(t){const i=n.getAttribute("aria-activedescendant");if(i){const o=Bg(n).getElementById(i);if(o)return o}}return n}es(qT,"getActiveElement");function WT(e){return e.tagName==="IFRAME"}es(WT,"isFrame");var HU=Object.defineProperty,Bn=(e,t)=>HU(e,"name",{value:t,configurable:!0});function jU(e,t){const n=N.createContext(t);n.displayName=e+"Context";const i=Bn(s=>{const{children:l,...c}=s,d=N.useMemo(()=>c,Object.values(c));return A.jsx(n.Provider,{value:d,children:l})},"Provider");i.displayName=e+"Provider";function o(s,l={}){const{optional:c=!1}=l,d=N.useContext(n);if(d)return d;if(t!==void 0)return t;if(!c)throw new Error(`\`${s}\` must be used within \`${e}\``)}return Bn(o,"useContext"),[i,o]}Bn(jU,"createContext");function By(e,t=[]){let n=[];function i(s,l){const c=N.createContext(l);c.displayName=s+"Context";const d=n.length;n=[...n,l];const f=Bn(m=>{const{scope:g,children:v,...x}=m,S=g?.[e]?.[d]||c,C=N.useMemo(()=>x,Object.values(x));return A.jsx(S.Provider,{value:C,children:v})},"Provider");f.displayName=s+"Provider";function p(m,g,v={}){const{optional:x=!1}=v,S=g?.[e]?.[d]||c,C=N.useContext(S);if(C)return C;if(l!==void 0)return l;if(!x)throw new Error(`\`${m}\` must be used within \`${s}\``)}return Bn(p,"useContext"),[f,p]}Bn(i,"createContext");const o=Bn(()=>{const s=n.map(l=>N.createContext(l));return Bn(function(c){const d=c?.[e]||s;return N.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])},"useScope")},"createScope");return o.scopeName=e,[i,YT(o,...t)]}Bn(By,"createContextScope");function YT(...e){const t=e[0];if(e.length===1)return t;const n=Bn(()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return Bn(function(s){const l=i.reduce((c,{useScope:d,scopeName:f})=>{const m=d(s)[`__scope${f}`];return{...c,...m}},{});return N.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Bn(YT,"composeContextScopes");var BU=Object.defineProperty,UU=(e,t)=>BU(e,"name",{value:t,configurable:!0}),VU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Go=VU.reduce((e,t)=>{const n=ry(`Primitive.${t}`),i=N.forwardRef((o,s)=>{const{asChild:l,...c}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(d,{...c,ref:s})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function XT(e,t){e&&nf.flushSync(()=>e.dispatchEvent(t))}UU(XT,"dispatchDiscreteCustomEvent");var FU=Object.defineProperty,GU=(e,t)=>FU(e,"name",{value:t,configurable:!0});function Ul(e){const t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>((...n)=>t.current?.(...n)),[])}GU(Ul,"useCallbackRef");var $U=Object.defineProperty,Ot=(e,t)=>$U(e,"name",{value:t,configurable:!0}),Ug="dismissableLayer.update",qU="dismissableLayer.pointerDownOutside",WU="dismissableLayer.focusOutside",ew,KT=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),YU=N.forwardRef(Ot(function(t,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,onDismiss:f,...p}=t,m=N.useContext(KT),[g,v]=N.useState(null),x=g?.ownerDocument??globalThis?.document,[,S]=N.useState({}),C=Uo(n,v),_=Array.from(m.layers),[w]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),k=w?_.indexOf(w):-1,D=g?_.indexOf(g):-1,M=m.layersWithOutsidePointerEventsDisabled.size>0,O=D>=k,z=N.useRef(!1),j=QT(U=>{l?.(U),d?.(U),U.defaultPrevented||f?.()},{ownerDocument:x,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:z,dismissableSurfaces:m.dismissableSurfaces,shouldHandlePointerDownOutside:N.useCallback(U=>{if(!(U instanceof Node))return!1;const Z=[...m.branches].some(X=>X.contains(U));return O&&!Z},[m.branches,O])}),F=ZT(U=>{if(o&&z.current)return;const Z=U.target;[...m.branches].some(W=>W.contains(Z))||(c?.(U),d?.(U),U.defaultPrevented||f?.())},x),ee=g?D===_.length-1:!1,q=Ul(U=>{U.key==="Escape"&&(s?.(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))});return N.useEffect(()=>{if(ee)return x.addEventListener("keydown",q,{capture:!0}),()=>x.removeEventListener("keydown",q,{capture:!0})},[x,ee,q]),N.useEffect(()=>{if(g)return i&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(ew=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Vg(),()=>{i&&(m.layersWithOutsidePointerEventsDisabled.delete(g),m.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=ew))}},[g,x,i,m]),N.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Vg())},[g,m]),N.useEffect(()=>{const U=Ot(()=>S({}),"handleUpdate");return document.addEventListener(Ug,U),()=>document.removeEventListener(Ug,U)},[]),A.jsx(Go.div,{...p,ref:C,style:{pointerEvents:M?O?"auto":"none":void 0,...t.style},onFocusCapture:mi(t.onFocusCapture,F.onFocusCapture),onBlurCapture:mi(t.onBlurCapture,F.onBlurCapture),onPointerDownCapture:mi(t.onPointerDownCapture,j.onPointerDownCapture)})},"DismissableLayer"));function XU(){const e=N.useContext(KT),[t,n]=N.useState(null);return N.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Ot(XU,"useDismissableLayerSurface");var KU=Ot(()=>!0,"IS_TRUE");function QT(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:l=KU}=t,c=Ul(e),d=N.useRef(!1),f=N.useRef(!1),p=N.useRef(new Map),m=N.useRef(()=>{});return N.useEffect(()=>{function g(){f.current=!1,o.current=!1,p.current.clear()}Ot(g,"resetOutsideInteraction");function v(){return Array.from(p.current.values()).some(Boolean)}Ot(v,"isOutsideInteractionIntercepted");function x(k){if(!f.current)return;const D=k.target;D instanceof Node&&[...s].some(O=>O.contains(D))||p.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}Ot(x,"handleInteractionCapture");function S(k){f.current&&p.current.set(k.type,!1)}Ot(S,"handleInteractionBubble");const C=Ot(k=>{if(k.target&&!d.current){let D=function(){n.removeEventListener("click",m.current);const O=v();g(),O||Uy(qU,c,M,{discrete:!0})};if(Ot(D,"handleAndDispatchPointerDownOutsideEvent"),!l(k.target)){n.removeEventListener("click",m.current),g(),d.current=!1;return}const M={originalEvent:k};f.current=!0,o.current=i&&k.button===0,p.current.clear(),!i||k.button!==0?D():(n.removeEventListener("click",m.current),m.current=D,n.addEventListener("click",m.current,{once:!0}))}else n.removeEventListener("click",m.current),g();d.current=!1},"handlePointerDown"),_=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of _)n.addEventListener(k,x,!0),n.addEventListener(k,S);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",C)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",C),n.removeEventListener("click",m.current);for(const k of _)n.removeEventListener(k,x,!0),n.removeEventListener(k,S)}},[n,c,i,o,s,l]),{onPointerDownCapture:Ot(()=>d.current=!0,"onPointerDownCapture")}}Ot(QT,"usePointerDownOutside");function ZT(e,t=globalThis?.document){const n=Ul(e),i=N.useRef(!1);return N.useEffect(()=>{const o=Ot(s=>{s.target&&!i.current&&Uy(WU,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:Ot(()=>i.current=!0,"onFocusCapture"),onBlurCapture:Ot(()=>i.current=!1,"onBlurCapture")}}Ot(ZT,"useFocusOutside");function Vg(){const e=new CustomEvent(Ug);document.dispatchEvent(e)}Ot(Vg,"dispatchUpdate");function Uy(e,t,n,{discrete:i}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?XT(o,s):o.dispatchEvent(s)}Ot(Uy,"handleAndDispatchCustomEvent");var Jn=globalThis?.document?N.useLayoutEffect:()=>{},QU=Object.defineProperty,ZU=(e,t)=>QU(e,"name",{value:t,configurable:!0}),JU=Ml[" useId ".trim().toString()]||(()=>{}),eV=0;function JT(e){const[t,n]=N.useState(JU());return Jn(()=>{e||n(i=>i??String(eV++))},[e]),e||(t?`radix-${t}`:"")}ZU(JT,"useId");const tV=["top","right","bottom","left"],Fr=Math.min,Ji=Math.max,Od=Math.round,jc=Math.floor,er=e=>({x:e,y:e}),nV={left:"right",right:"left",bottom:"top",top:"bottom"};function eA(e,t,n){return Ji(e,Fr(t,n))}function or(e,t){return typeof e=="function"?e(t):e}function Gr(e){return e.split("-")[0]}function ts(e){return e.split("-")[1]}function Vy(e){return e==="x"?"y":"x"}function Fy(e){return e==="y"?"height":"width"}function bi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Gy(e){return Vy(bi(e))}function iV(e,t,n){n===void 0&&(n=!1);const i=ts(e),o=Gy(e),s=Fy(o);let l=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Dd(l)),[l,Dd(l)]}function rV(e){const t=Dd(e);return[Fg(e),t,Fg(t)]}function Fg(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const tw=["left","right"],nw=["right","left"],oV=["top","bottom"],aV=["bottom","top"];function sV(e,t,n){switch(e){case"top":case"bottom":return n?t?nw:tw:t?tw:nw;case"left":case"right":return t?oV:aV;default:return[]}}function lV(e,t,n,i){const o=ts(e);let s=sV(Gr(e),n==="start",i);return o&&(s=s.map(l=>l+"-"+o),t&&(s=s.concat(s.map(Fg)))),s}function Dd(e){const t=Gr(e);return nV[t]+e.slice(t.length)}function uV(e){var t,n,i,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(i=e.bottom)!=null?i:0,left:(o=e.left)!=null?o:0}}function tA(e){return typeof e!="number"?uV(e):{top:e,right:e,bottom:e,left:e}}function Md(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function iw(e,t,n){let{reference:i,floating:o}=e;const s=bi(t),l=Gy(t),c=Fy(l),d=Gr(t),f=s==="y",p=i.x+i.width/2-o.width/2,m=i.y+i.height/2-o.height/2,g=i[c]/2-o[c]/2;let v;switch(d){case"top":v={x:p,y:i.y-o.height};break;case"bottom":v={x:p,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:m};break;case"left":v={x:i.x-o.width,y:m};break;default:v={x:i.x,y:i.y}}const x=ts(t);return x&&(v[l]+=g*(x==="end"?1:-1)*(n&&f?-1:1)),v}async function cV(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:s,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:v=0}=or(t,e),x=tA(v),C=c[g?m==="floating"?"reference":"floating":m],_=Md(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(C)))==null||n?C:C.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),w=m==="floating"?{x:i,y:o,width:l.floating.width,height:l.floating.height}:l.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),D=await(s.isElement==null?void 0:s.isElement(k))&&await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1},M=Md(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:k,strategy:d}):w);return{top:(_.top-M.top+x.top)/D.y,bottom:(M.bottom-_.bottom+x.bottom)/D.y,left:(_.left-M.left+x.left)/D.x,right:(M.right-_.right+x.right)/D.x}}const dV=50,fV=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:cV},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=iw(f,i,d),g=i,v=0;const x={};for(let S=0;S<s.length;S++){const C=s[S];if(!C)continue;const{name:_,fn:w}=C,{x:k,y:D,data:M,reset:O}=await w({x:p,y:m,initialPlacement:i,placement:g,strategy:o,middlewareData:x,rects:f,platform:c,elements:{reference:e,floating:t}});p=k??p,m=D??m,x[_]={...x[_],...M},O&&v<dV&&(v++,typeof O=="object"&&(O.placement&&(g=O.placement),O.rects&&(f=O.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:p,y:m}=iw(f,g,d)),S=-1)}return{x:p,y:m,placement:g,strategy:o,middlewareData:x}},hV=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:s,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:p=0}=or(e,t)||{};if(f==null)return{};const m=tA(p),g={x:n,y:i},v=Gy(o),x=Fy(v),S=await l.getDimensions(f),C=v==="y",_=C?"top":"left",w=C?"bottom":"right",k=C?"clientHeight":"clientWidth",D=s.reference[x]+s.reference[v]-g[v]-s.floating[x],M=g[v]-s.reference[v],O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let z=O?O[k]:0;(!z||!await(l.isElement==null?void 0:l.isElement(O)))&&(z=c.floating[k]||s.floating[x]);const j=D/2-M/2,F=z/2-S[x]/2-1,ee=Fr(m[_],F),q=Fr(m[w],F),U=z-S[x]-q,Z=z/2-S[x]/2+j,X=eA(ee,Z,U),W=!d.arrow&&ts(o)!=null&&Z!==X&&s.reference[x]/2-(Z<ee?ee:q)-S[x]/2<0,P=W?Z<ee?Z-ee:Z-U:0;return{[v]:g[v]+P,data:{[v]:X,centerOffset:Z-X-P,...W&&{alignmentOffset:P}},reset:W}}}),pV=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:s,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,...C}=or(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const _=Gr(o),w=bi(c),k=Gr(c)===c,D=await(d.isRTL==null?void 0:d.isRTL(f.floating)),M=g||(k||!S?[Dd(c)]:rV(c)),O=x!=="none";!g&&O&&M.push(...lV(c,S,x,D));const z=[c,...M],j=await d.detectOverflow(t,C),F=[];let ee=((i=s.flip)==null?void 0:i.overflows)||[];if(p&&F.push(j[_]),m){const X=iV(o,l,D);F.push(j[X[0]],j[X[1]])}if(ee=[...ee,{placement:o,overflows:F}],!F.every(X=>X<=0)){var q,U;const X=(((q=s.flip)==null?void 0:q.index)||0)+1,W=z[X];if(W&&(!(m==="alignment"?w!==bi(W):!1)||ee.every(ne=>bi(ne.placement)===w?ne.overflows[0]>0:!0)))return{data:{index:X,overflows:ee},reset:{placement:W}};let P=(U=ee.filter($=>$.overflows[0]<=0).sort(($,ne)=>$.overflows[1]-ne.overflows[1])[0])==null?void 0:U.placement;if(!P)switch(v){case"bestFit":{var Z;const $=(Z=ee.filter(ne=>{if(O){const ue=bi(ne.placement);return ue===w||ue==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(ue=>ue>0).reduce((ue,R)=>ue+R,0)]).sort((ne,ue)=>ne[1]-ue[1])[0])==null?void 0:Z[0];$&&(P=$);break}case"initialPlacement":P=c;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function rw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ow(e){return tV.some(t=>e[t]>=0)}const mV=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:o="referenceHidden",...s}=or(e,t);switch(o){case"referenceHidden":{const l=await i.detectOverflow(t,{...s,elementContext:"reference"}),c=rw(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:ow(c)}}}case"escaped":{const l=await i.detectOverflow(t,{...s,altBoundary:!0}),c=rw(l,n.floating);return{data:{escapedOffsets:c,escaped:ow(c)}}}default:return{}}}}},nA=new Set(["left","top"]);async function gV(e,t){const{placement:n,platform:i,elements:o}=e,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),l=Gr(n),c=ts(n),d=bi(n)==="y",f=nA.has(l)?-1:1,p=s&&d?-1:1,m=or(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof x=="number"&&(v=c==="end"?x*-1:x),d?{x:v*p,y:g*f}:{x:g*f,y:v*p}}const yV=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:s,placement:l,middlewareData:c}=t,d=await gV(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:l}}}}},vV=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o,platform:s}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:w=>{let{x:k,y:D}=w;return{x:k,y:D}}},...f}=or(e,t),p={x:n,y:i},m=await s.detectOverflow(t,f),g=bi(o),v=Vy(g);let x=p[v],S=p[g];const C=(w,k)=>eA(k+m[w==="y"?"top":"left"],k,k-m[w==="y"?"bottom":"right"]);l&&(x=C(v,x)),c&&(S=C(g,S));const _=d.fn({...t,[v]:x,[g]:S});return{..._,data:{x:_.x-n,y:_.y-i,enabled:{[v]:l,[g]:c}}}}}},bV=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,i;const{x:o,y:s,placement:l,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=or(e,t),g={x:o,y:s},v=bi(l),x=Vy(v);let S=g[x],C=g[v];const _=or(f,t),w=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(i=_.crossAxis)!=null?i:0};if(p){const M=x==="y"?"height":"width",O=c.reference[x]-c.floating[M]+w.mainAxis,z=c.reference[x]+c.reference[M]-w.mainAxis;S<O?S=O:S>z&&(S=z)}if(m){var k,D;const M=x==="y"?"width":"height",O=nA.has(Gr(l)),z=c.reference[v]-c.floating[M]+(O&&((k=d.offset)==null?void 0:k[v])||0)+(O?0:w.crossAxis),j=c.reference[v]+c.reference[M]+(O?0:((D=d.offset)==null?void 0:D[v])||0)-(O?w.crossAxis:0);C<z?C=z:C>j&&(C=j)}return{[x]:S,[v]:C}}}},xV=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:o,elements:s}=t,{apply:l=()=>{},...c}=or(e,t),d=await o.detectOverflow(t,c),f=Gr(n),p=ts(n),m=bi(n)==="y",{width:g,height:v}=i.floating;let x,S;f==="top"||f==="bottom"?(x=f,S=p===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(S=f,x=p==="end"?"top":"bottom");const C=v-d.top-d.bottom,_=g-d.left-d.right,w=Fr(v-d[x],C),k=Fr(g-d[S],_),D=t.middlewareData.shift,M=!D;let O=w,z=k;D!=null&&D.enabled.x&&(z=_),D!=null&&D.enabled.y&&(O=C),M&&!p&&(m?z=g-2*Ji(d.left,d.right):O=v-2*Ji(d.top,d.bottom)),await l({...t,availableWidth:z,availableHeight:O});const j=await o.getDimensions(s.floating);return g!==j.width||v!==j.height?{reset:{rects:!0}}:{}}}};function of(){return typeof window<"u"}function ns(e){return iA(e)?(e.nodeName||"").toLowerCase():"#document"}function fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sr(e){var t;return(t=(iA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function iA(e){return of()?e instanceof Node||e instanceof fn(e).Node:!1}function Ci(e){return of()?e instanceof Element||e instanceof fn(e).Element:!1}function Wr(e){return of()?e instanceof HTMLElement||e instanceof fn(e).HTMLElement:!1}function aw(e){return!of()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fn(e).ShadowRoot}function af(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=wi(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&o!=="inline"&&o!=="contents"}function SV(e){return/^(table|td|th)$/.test(ns(e))}function sf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _V=/transform|translate|scale|rotate|perspective|filter/,CV=/paint|layout|strict|content/,go=e=>!!e&&e!=="none";let Lm;function $y(e){const t=Ci(e)?wi(e):e;return go(t.transform)||go(t.translate)||go(t.scale)||go(t.rotate)||go(t.perspective)||!qy()&&(go(t.backdropFilter)||go(t.filter))||_V.test(t.willChange||"")||CV.test(t.contain||"")}function wV(e){let t=Po(e);for(;Wr(t)&&!Rl(t);){if($y(t))return t;if(sf(t))return null;t=Po(t)}return null}function qy(){return Lm==null&&(Lm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Lm}function Rl(e){return/^(html|body|#document)$/.test(ns(e))}function wi(e){return fn(e).getComputedStyle(e)}function lf(e){return Ci(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Po(e){if(ns(e)==="html")return e;const t=e.assignedSlot||e.parentNode||aw(e)&&e.host||sr(e);return aw(t)?t.host:t}function rA(e){const t=Po(e);return Rl(t)?(e.ownerDocument||e).body:Wr(t)&&af(t)?t:rA(t)}function Ol(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=rA(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),l=fn(o);if(s){const c=Gg(l);return t.concat(l,l.visualViewport||[],af(o)?o:[],c&&n?Ol(c):[])}else return t.concat(o,Ol(o,[],n))}function Gg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oA(e){const t=wi(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=Wr(e),s=o?e.offsetWidth:n,l=o?e.offsetHeight:i,c=Od(n)!==s||Od(i)!==l;return c&&(n=s,i=l),{width:n,height:i,$:c}}function Wy(e){return Ci(e)?e:e.contextElement}function Wa(e){const t=Wy(e);if(!Wr(t))return er(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:s}=oA(t);let l=(s?Od(n.width):n.width)/i,c=(s?Od(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const EV=er(0);function aA(e){const t=fn(e);return!qy()||!t.visualViewport?EV:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kV(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===fn(e)}function Ho(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Wy(e);let l=er(1);t&&(i?Ci(i)&&(l=Wa(i)):l=Wa(e));const c=kV(s,n,i)?aA(s):er(0);let d=(o.left+c.x)/l.x,f=(o.top+c.y)/l.y,p=o.width/l.x,m=o.height/l.y;if(s&&i){const g=fn(s),v=Ci(i)?fn(i):i;let x=g,S=Gg(x);for(;S&&v!==x;){const C=Wa(S),_=S.getBoundingClientRect(),w=wi(S),k=_.left+(S.clientLeft+parseFloat(w.paddingLeft))*C.x,D=_.top+(S.clientTop+parseFloat(w.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,m*=C.y,d+=k,f+=D,x=fn(S),S=Gg(x)}}return Md({width:p,height:m,x:d,y:f})}function uf(e,t){const n=lf(e).scrollLeft;return t?t.left+n:Ho(sr(e)).left+n}function sA(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-uf(e,n),o=n.top+t.scrollTop;return{x:i,y:o}}function TV(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const s=o==="fixed",l=sr(i),c=t?sf(t.floating):!1;if(i===l||c&&s)return n;let d={scrollLeft:0,scrollTop:0},f=er(1);const p=er(0),m=Wr(i);if((m||!s)&&((ns(i)!=="body"||af(l))&&(d=lf(i)),m)){const v=Ho(i);f=Wa(i),p.x=v.x+i.clientLeft,p.y=v.y+i.clientTop}const g=l&&!m&&!s?sA(l,d):er(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+g.x,y:n.y*f.y-d.scrollTop*f.y+p.y+g.y}}function AV(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function LV(e){const t=lf(e),n=e.ownerDocument.body,i=Ji(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Ji(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+uf(e);const l=-t.scrollTop;return wi(n).direction==="rtl"&&(s+=Ji(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:l}}const RV=25;function OV(e,t,n){n===void 0&&(n="viewport");const i=n==="layoutViewport",o=fn(e),s=sr(e),l=o.visualViewport;let c=s.clientWidth,d=s.clientHeight,f=0,p=0;if(l){const g=!qy()||t==="fixed";i?g||(f=-l.offsetLeft,p=-l.offsetTop):(c=l.width,d=l.height,g&&(f=l.offsetLeft,p=l.offsetTop))}if(uf(s)<=0){const g=s.ownerDocument,v=g.body,x=getComputedStyle(v),S=g.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,C=Math.abs(s.clientWidth-v.clientWidth-S),_=getComputedStyle(s).scrollbarGutter==="stable both-edges"?C/2:C;_<=RV&&(c-=_)}return{width:c,height:d,x:f,y:p}}function DV(e,t){const n=Ho(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,s=Wa(e),l=e.clientWidth*s.x,c=e.clientHeight*s.y,d=o*s.x,f=i*s.y;return{width:l,height:c,x:d,y:f}}function sw(e,t,n){let i;if(t==="viewport"||t==="layoutViewport")i=OV(e,n,t);else if(t==="document")i=LV(sr(e));else if(Ci(t))i=DV(t,n);else{const o=aA(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Md(i)}function MV(e,t){const n=t.get(e);if(n)return n;let i=Ol(e,[],!1).filter(c=>Ci(c)&&ns(c)!=="body"),o=null;const s=wi(e).position==="fixed";let l=s?Po(e):e;for(;Ci(l)&&!Rl(l);){const c=wi(l),d=$y(l),f=o?o.position:s?"fixed":"";!d&&(f==="fixed"||f==="absolute"&&c.position==="static")?i=i.filter(m=>m!==l):o=c,l=Po(l)}return t.set(e,i),i}function IV(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const l=[...n==="clippingAncestors"?sf(t)?[]:MV(t,this._c):[].concat(n),i],c=sw(t,l[0],o);let d=c.top,f=c.right,p=c.bottom,m=c.left;for(let g=1;g<l.length;g++){const v=sw(t,l[g],o);d=Ji(v.top,d),f=Fr(v.right,f),p=Fr(v.bottom,p),m=Ji(v.left,m)}return{width:f-m,height:p-d,x:m,y:d}}function NV(e){const{width:t,height:n}=oA(e);return{width:t,height:n}}function zV(e,t,n){const i=Wr(t),o=sr(t),s=n==="fixed",l=Ho(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=er(0);if((i||!s)&&((ns(t)!=="body"||af(o))&&(c=lf(t)),i)){const g=Ho(t,!0,s,t);d.x=g.x+t.clientLeft,d.y=g.y+t.clientTop}!i&&o&&(d.x=uf(o));const f=o&&!i&&!s?sA(o,c):er(0),p=l.left+c.scrollLeft-d.x-f.x,m=l.top+c.scrollTop-d.y-f.y;return{x:p,y:m,width:l.width,height:l.height}}function Rm(e){return wi(e).position==="static"}function lw(e,t){if(!Wr(e)||wi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return sr(e)===n&&(n=n.ownerDocument.body),n}function lA(e,t){const n=fn(e);if(sf(e))return n;if(!Wr(e)){let o=Po(e);for(;o&&!Rl(o);){if(Ci(o)&&!Rm(o))return o;o=Po(o)}return n}let i=lw(e,t);for(;i&&SV(i)&&Rm(i);)i=lw(i,t);return i&&Rl(i)&&Rm(i)&&!$y(i)?n:i||wV(e)||n}const PV=async function(e){const t=this.getOffsetParent||lA,n=this.getDimensions,i=await n(e.floating);return{reference:zV(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function HV(e){return wi(e).direction==="rtl"}const jV={convertOffsetParentRelativeRectToViewportRelativeRect:TV,getDocumentElement:sr,getClippingRect:IV,getOffsetParent:lA,getElementRects:PV,getClientRects:AV,getDimensions:NV,getScale:Wa,isElement:Ci,isRTL:HV};function uA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function BV(e,t,n){let i=null,o;const s=sr(e);function l(){var p;clearTimeout(o),(p=i)==null||p.disconnect(),i=null}function c(p,m){p===void 0&&(p=!1),m===void 0&&(m=1),l();const g=e.getBoundingClientRect(),{left:v,top:x,width:S,height:C}=g;if(p||t(),!S||!C)return;const _=jc(x),w=jc(s.clientWidth-(v+S)),k=jc(s.clientHeight-(x+C)),D=jc(v),O={rootMargin:-_+"px "+-w+"px "+-k+"px "+-D+"px",threshold:Ji(0,Fr(1,m))||1};let z=!0;function j(F){const ee=F[0].intersectionRatio;if(!uA(g,e.getBoundingClientRect()))return c();if(ee!==m){if(!z)return c();ee?c(!1,ee):o=setTimeout(()=>{c(!1,1e-7)},1e3)}z=!1}try{i=new IntersectionObserver(j,{...O,root:s.ownerDocument})}catch{i=new IntersectionObserver(j,O)}i.observe(e)}const d=fn(e),f=()=>c(n);return d.addEventListener("resize",f),c(!0),()=>{d.removeEventListener("resize",f),l()}}function UV(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,f=Wy(e),p=o||s?[...f?Ol(f):[],...t?Ol(t):[]]:[];p.forEach(_=>{o&&_.addEventListener("scroll",n),s&&_.addEventListener("resize",n)});const m=f&&c?BV(f,n,s):null;let g=-1,v=null;l&&(v=new ResizeObserver(_=>{let[w]=_;w&&w.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=v)==null||k.observe(t)})),n()}),f&&!d&&v.observe(f),t&&v.observe(t));let x,S=d?Ho(e):null;d&&C();function C(){const _=Ho(e);S&&!uA(S,_)&&n(),S=_,x=requestAnimationFrame(C)}return n(),()=>{var _;p.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),m?.(),(_=v)==null||_.disconnect(),v=null,d&&cancelAnimationFrame(x)}}const VV=yV,FV=vV,GV=pV,$V=xV,qV=mV,uw=hV,WV=bV,YV=(e,t,n)=>{const i=new Map,o=n??{},s={...jV,...o.platform,_c:i};return fV(e,t,{...o,platform:s})};var XV=typeof document<"u",KV=function(){},id=XV?N.useLayoutEffect:KV;function Id(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,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Id(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){const s=o[i];if(!(s==="_owner"&&e.$$typeof)&&!Id(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function cA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cw(e,t){const n=cA(e);return Math.round(t*n)/n}function Om(e){const t=N.useRef(e);return id(()=>{t.current=e}),t}function QV(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[p,m]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=N.useState(i);Id(g,i)||v(i);const[x,S]=N.useState(null),[C,_]=N.useState(null),w=N.useCallback(ne=>{ne!==O.current&&(O.current=ne,S(ne))},[]),k=N.useCallback(ne=>{ne!==z.current&&(z.current=ne,_(ne))},[]),D=s||x,M=l||C,O=N.useRef(null),z=N.useRef(null),j=N.useRef(p),F=d!=null,ee=Om(d),q=Om(o),U=Om(f),Z=N.useCallback(()=>{if(!O.current||!z.current)return;const ne={placement:t,strategy:n,middleware:g};q.current&&(ne.platform=q.current),YV(O.current,z.current,ne).then(ue=>{const R={...ue,isPositioned:U.current!==!1};X.current&&!Id(j.current,R)&&(j.current=R,nf.flushSync(()=>{m(R)}))})},[g,t,n,q,U]);id(()=>{f===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(ne=>({...ne,isPositioned:!1})))},[f]);const X=N.useRef(!1);id(()=>(X.current=!0,()=>{X.current=!1}),[]),id(()=>{if(D&&(O.current=D),M&&(z.current=M),D&&M){if(ee.current)return ee.current(D,M,Z);Z()}},[D,M,Z,ee,F]);const W=N.useMemo(()=>({reference:O,floating:z,setReference:w,setFloating:k}),[w,k]),P=N.useMemo(()=>({reference:D,floating:M}),[D,M]),$=N.useMemo(()=>{const ne={position:n,left:0,top:0};if(!P.floating)return ne;const ue=cw(P.floating,p.x),R=cw(P.floating,p.y);return c?{...ne,transform:"translate("+ue+"px, "+R+"px)",...cA(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ue,top:R}},[n,c,P.floating,p.x,p.y]);return N.useMemo(()=>({...p,update:Z,refs:W,elements:P,floatingStyles:$}),[p,Z,W,P,$])}const ZV=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:o}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?uw({element:i.current,padding:o}).fn(n):{}:i?uw({element:i,padding:o}).fn(n):{}}}},JV=(e,t)=>{const n=VV(e);return{name:n.name,fn:n.fn,options:[e,t]}},eF=(e,t)=>{const n=FV(e);return{name:n.name,fn:n.fn,options:[e,t]}},tF=(e,t)=>({fn:WV(e).fn,options:[e,t]}),nF=(e,t)=>{const n=GV(e);return{name:n.name,fn:n.fn,options:[e,t]}},iF=(e,t)=>{const n=$V(e);return{name:n.name,fn:n.fn,options:[e,t]}},rF=(e,t)=>{const n=qV(e);return{name:n.name,fn:n.fn,options:[e,t]}},oF=(e,t)=>{const n=ZV(e);return{name:n.name,fn:n.fn,options:[e,t]}};var aF=Object.defineProperty,sF=(e,t)=>aF(e,"name",{value:t,configurable:!0});function dA(e){const[t,n]=N.useState(void 0);return Jn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,c;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}sF(dA,"useSize");var lF=Object.defineProperty,Vr=(e,t)=>lF(e,"name",{value:t,configurable:!0}),fA="Popper",[hA,pA]=By(fA),[uF,mA]=hA(fA),cF=Vr(e=>{const{__scopePopper:t,children:n}=e,[i,o]=N.useState(null),[s,l]=N.useState(void 0);return A.jsx(uF,{scope:t,anchor:i,onAnchorChange:o,placementState:s,setPlacementState:l,children:n})},"Popper"),dF="PopperAnchor",fF=N.forwardRef(Vr(function(t,n){const{__scopePopper:i,virtualRef:o,...s}=t,l=mA(dF,i),c=N.useRef(null),d=l.onAnchorChange,f=N.useCallback(S=>{c.current=S,S&&d(S)},[d]),p=Uo(n,f),m=N.useRef(null);N.useEffect(()=>{if(!o)return;const S=m.current;m.current=o.current,S!==m.current&&d(m.current)});const g=l.placementState&&cf(l.placementState),v=g?.[0],x=g?.[1];return o?null:A.jsx(Go.div,{"data-radix-popper-side":v,"data-radix-popper-align":x,...s,ref:p})},"PopperAnchor")),gA="PopperContent",[hF,sG]=hA(gA),pF=N.forwardRef(Vr(function(t,n){const{__scopePopper:i,side:o="bottom",sideOffset:s=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:S,...C}=t,_=mA(gA,i),[w,k]=N.useState(null),D=Uo(n,k),[M,O]=N.useState(null),z=dA(M),j=z?.width??0,F=z?.height??0,ee=o+(l!=="center"?"-"+l:""),q=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},U=Array.isArray(p)?p:[p],Z=U.length>0,X={padding:q,boundary:U.filter(yA),altBoundary:Z},{refs:W,floatingStyles:P,placement:$,isPositioned:ne,middlewareData:ue}=QV({strategy:"fixed",placement:ee,whileElementsMounted:Vr((...pe)=>UV(...pe,{animationFrame:x==="always"}),"whileElementsMounted"),elements:{reference:_.anchor},middleware:[JV({mainAxis:s+F,alignmentAxis:c}),f&&eF({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?tF():void 0,...X}),f&&nF({...X}),iF({...X,apply:Vr(({elements:pe,rects:Pe,availableWidth:je,availableHeight:st})=>{const{width:He,height:Ve}=Pe.reference,rt=pe.floating.style;rt.setProperty("--radix-popper-available-width",`${je}px`),rt.setProperty("--radix-popper-available-height",`${st}px`),rt.setProperty("--radix-popper-anchor-width",`${He}px`),rt.setProperty("--radix-popper-anchor-height",`${Ve}px`)},"apply")}),M&&oF({element:M,padding:d}),mF({arrowWidth:j,arrowHeight:F}),v&&rF({strategy:"referenceHidden",...X,boundary:Z?X.boundary:void 0})]}),R=_.setPlacementState;Jn(()=>(R($),()=>{R(void 0)}),[$,R]);const[H,Y]=cf($),I=Ul(S);Jn(()=>{ne&&I?.()},[ne,I]);const le=ue.arrow?.x,fe=ue.arrow?.y,re=ue.arrow?.centerOffset!==0,[de,_e]=N.useState();return Jn(()=>{w&&_e(window.getComputedStyle(w).zIndex)},[w]),A.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:ne?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[ue.transformOrigin?.x,ue.transformOrigin?.y].join(" "),...ue.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:A.jsx(hF,{scope:i,placedSide:H,placedAlign:Y,onArrowChange:O,arrowX:le,arrowY:fe,shouldHideArrow:re,children:A.jsx(Go.div,{"data-side":H,"data-align":Y,...C,ref:D,style:{...C.style,animation:ne?C.style?.animation:"none"}})})})},"PopperContent"));function yA(e){return e!==null}Vr(yA,"isNotNull");var mF=Vr(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:o}=t,l=o.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,p]=cf(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(o.arrow?.x??0)+c/2,v=(o.arrow?.y??0)+d/2;let x="",S="";return f==="bottom"?(x=l?m:`${g}px`,S=`${-d}px`):f==="top"?(x=l?m:`${g}px`,S=`${i.floating.height+d}px`):f==="right"?(x=`${-d}px`,S=l?m:`${v}px`):f==="left"&&(x=`${i.floating.width+d}px`,S=l?m:`${v}px`),{data:{x,y:S}}}}),"transformOrigin");function cf(e){const[t,n="center"]=e.split("-");return[t,n]}Vr(cf,"getSideAndAlignFromPlacement");var gF=cF,yF=fF,vF=pF,bF=Object.defineProperty,xF=(e,t)=>bF(e,"name",{value:t,configurable:!0}),SF=N.forwardRef(xF(function(t,n){const{container:i,...o}=t,[s,l]=N.useState(!1);Jn(()=>l(!0),[]);const c=i||s&&globalThis?.document?.body;return c?nf.createPortal(A.jsx(Go.div,{...o,ref:n}),c):null},"Portal")),_F=Object.defineProperty,ar=(e,t)=>_F(e,"name",{value:t,configurable:!0});function vA(e,t){return N.useReducer((n,i)=>t[n][i]??n,e)}ar(vA,"useStateMachine");var bA=ar(e=>{const{present:t,children:n}=e,i=xA(t),o=typeof n=="function"?n({present:i.isPresent}):N.Children.only(n),s=SA(i.ref,_A(o));return typeof n=="function"||i.isPresent?N.cloneElement(o,{ref:s}):null},"Presence");function xA(e){const[t,n]=N.useState(),i=N.useRef(null),o=N.useRef(e),s=N.useRef("none"),l=N.useRef(void 0),c=e?"mounted":"unmounted",[d,f]=vA(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{d==="mounted"?(s.current=l.current??za(i.current),l.current=void 0):s.current="none"},[d]),Jn(()=>{const p=i.current,m=o.current;if(m!==e){const v=s.current,x=za(p);e?(l.current=x,f("MOUNT")):x==="none"||p?.display==="none"?f("UNMOUNT"):f(m&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),Jn(()=>{if(t){let p;const m=t.ownerDocument.defaultView??window,g=ar(x=>{const C=za(i.current).includes(CSS.escape(x.animationName));if(x.target===t&&C&&(f("ANIMATION_END"),!o.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",p=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},"handleAnimationEnd"),v=ar(x=>{x.target===t&&(s.current=za(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(p),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:N.useCallback(p=>{if(p){const m=getComputedStyle(p);i.current=m,l.current=za(m)}else i.current=null;n(p)},[])}}ar(xA,"usePresence");function $g(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ar($g,"setRef");function SA(...e){const t=N.useRef(e);return t.current=e,N.useCallback(n=>{const i=t.current;let o=!1;const s=i.map(l=>{const c=$g(l,n);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let l=0;l<s.length;l++){const c=s[l];typeof c=="function"?c():$g(i[l],null)}}},[])}ar(SA,"useStableComposedRefs");function za(e){return e?.animationName||"none"}ar(za,"getAnimationName");function _A(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ar(_A,"getElementRef");var CF=Object.defineProperty,wF=(e,t)=>CF(e,"name",{value:t,configurable:!0}),dw=Ml[" useEffectEvent ".trim().toString()],fw=Ml[" useInsertionEffect ".trim().toString()];function CA(e){if(typeof dw=="function")return dw(e);const t=N.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof fw=="function"?fw(()=>{t.current=e}):Jn(()=>{t.current=e}),N.useMemo(()=>((...n)=>t.current?.(...n)),[])}wF(CA,"useEffectEvent");var EF=Object.defineProperty,Vl=(e,t)=>EF(e,"name",{value:t,configurable:!0}),kF=Ml[" useInsertionEffect ".trim().toString()]||Jn;function wA({prop:e,defaultProp:t,onChange:n=Vl(()=>{},"onChange"),caller:i}){const[o,s,l]=EA({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:o,f=N.useCallback(p=>{if(c){const m=kA(p)?p(e):p;m!==e&&l.current?.(m)}else s(p)},[c,e,s,l]);return[d,f]}Vl(wA,"useControllableState");function EA({defaultProp:e,onChange:t}){const[n,i]=N.useState(e),o=N.useRef(n),s=N.useRef(t);return kF(()=>{s.current=t},[t]),N.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,i,s]}Vl(EA,"useUncontrolledState");function kA(e){return typeof e=="function"}Vl(kA,"isFunction");var hw=Symbol("RADIX:SYNC_STATE");function TF(e,t,n,i){const{prop:o,defaultProp:s,onChange:l,caller:c}=t,d=o!==void 0,f=CA(l),p=[{...n,state:s}];i&&p.push(i);const[m,g]=N.useReducer((C,_)=>{if(_.type===hw)return{...C,state:_.state};const w=e(C,_);return d&&!Object.is(w.state,C.state)&&f(w.state),w},...p),v=m.state,x=N.useRef(v);N.useEffect(()=>{x.current!==v&&(x.current=v,d||f(v))},[v,x,d]);const S=N.useMemo(()=>o!==void 0?{...m,state:o}:m,[m,o]);return N.useEffect(()=>{d&&!Object.is(o,m.state)&&g({type:hw,state:o})},[o,m.state,d]),[S,g]}Vl(TF,"useControllableStateReducer");var AF=Object.defineProperty,LF=(e,t)=>AF(e,"name",{value:t,configurable:!0}),RF=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),OF=N.forwardRef(LF(function(t,n){return A.jsx(Go.span,{...t,ref:n,style:{...RF,...t.style}})},"VisuallyHidden")),DF=OF,MF=Object.defineProperty,Mt=(e,t)=>MF(e,"name",{value:t,configurable:!0}),[Yy,lG]=By("Tooltip",[pA]),Xy=pA(),IF="TooltipProvider",NF=700,qg="tooltip.open",[zF,Ky]=Yy(IF),PF=Mt(e=>{const{__scopeTooltip:t,delayDuration:n=NF,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:s}=e,l=N.useRef(!0),c=N.useRef(!1),d=N.useRef(0);return N.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),A.jsx(zF,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:N.useCallback(()=>{i<=0||(window.clearTimeout(d.current),l.current=!1)},[i]),onClose:N.useCallback(()=>{i<=0||(window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,i))},[i]),isPointerInTransitRef:c,onPointerInTransitChange:N.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:s})},"TooltipProvider"),Wg="Tooltip",[HF,Fl]=Yy(Wg),jF=Mt(e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:o,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=e,d=Ky(Wg,e.__scopeTooltip),f=Xy(t),[p,m]=N.useState(null),[g,v]=N.useState(void 0),x=JT(),S=N.useRef(0),C=l??d.disableHoverableContent,_=c??d.delayDuration,w=N.useRef(!1),[k,D]=wA({prop:i,defaultProp:o??!1,onChange:Mt(ee=>{ee?(d.onOpen(),document.dispatchEvent(new CustomEvent(qg))):d.onClose(),s?.(ee)},"onChange"),caller:Wg}),M=N.useMemo(()=>k?w.current?"delayed-open":"instant-open":"closed",[k]),O=N.useCallback(()=>{window.clearTimeout(S.current),S.current=0,w.current=!1,D(!0)},[D]),z=N.useCallback(()=>{window.clearTimeout(S.current),S.current=0,D(!1)},[D]),j=N.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{w.current=!0,D(!0),S.current=0},_)},[_,D]);N.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]);const F=g??x;return A.jsx(gF,{...f,children:A.jsx(HF,{scope:t,contentId:F,setContentId:v,open:k,stateAttribute:M,trigger:p,onTriggerChange:m,onTriggerEnter:N.useCallback(()=>{d.isOpenDelayedRef.current?j():O()},[d.isOpenDelayedRef,j,O]),onTriggerLeave:N.useCallback(()=>{C?z():(window.clearTimeout(S.current),S.current=0)},[z,C]),onOpen:O,onClose:z,disableHoverableContent:C,children:n})})},"Tooltip"),pw="TooltipTrigger",BF=N.forwardRef(Mt(function(t,n){const{__scopeTooltip:i,...o}=t,s=Fl(pw,i),l=Ky(pw,i),c=Xy(i),d=N.useRef(null),f=Uo(n,d,s.onTriggerChange),p=N.useRef(!1),m=N.useRef(!1),g=N.useCallback(()=>p.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),A.jsx(yF,{asChild:!0,...c,children:A.jsx(Go.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:f,onPointerMove:mi(t.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!l.isPointerInTransitRef.current&&(s.onTriggerEnter(),m.current=!0)}),onPointerLeave:mi(t.onPointerLeave,()=>{s.onTriggerLeave(),m.current=!1}),onPointerDown:mi(t.onPointerDown,()=>{s.open&&s.onClose(),p.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:mi(t.onFocus,()=>{p.current||s.onOpen()}),onBlur:mi(t.onBlur,s.onClose),onClick:mi(t.onClick,s.onClose)})})},"TooltipTrigger")),TA="TooltipPortal",[UF,VF]=Yy(TA,{forceMount:void 0}),FF=Mt(e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:o}=e,s=Fl(TA,t);return A.jsx(UF,{scope:t,forceMount:n,children:A.jsx(bA,{present:n||s.open,children:A.jsx(SF,{asChild:!0,container:o,children:i})})})},"TooltipPortal"),Dl="TooltipContent",GF=N.forwardRef(Mt(function(t,n){const i=VF(Dl,t.__scopeTooltip),{forceMount:o=i.forceMount,side:s="top",...l}=t,c=Fl(Dl,t.__scopeTooltip);return A.jsx(bA,{present:o||c.open,children:c.disableHoverableContent?A.jsx(AA,{side:s,...l,ref:n}):A.jsx($F,{side:s,...l,ref:n})})},"TooltipContent")),$F=N.forwardRef(Mt(function(t,n){const i=Fl(Dl,t.__scopeTooltip),o=Ky(Dl,t.__scopeTooltip),s=N.useRef(null),l=Uo(n,s),[c,d]=N.useState(null),{trigger:f,onClose:p}=i,m=s.current,{onPointerInTransitChange:g}=o,v=N.useCallback(()=>{d(null),g(!1)},[g]),x=N.useCallback((S,C)=>{const _=S.currentTarget,w={x:S.clientX,y:S.clientY},k=LA(w,_.getBoundingClientRect()),D=RA(w,k),M=OA(C.getBoundingClientRect()),O=MA([...D,...M]);d(O),g(!0)},[g]);return N.useEffect(()=>()=>v(),[v]),N.useEffect(()=>{if(f&&m){const S=Mt(_=>x(_,m),"handleTriggerLeave"),C=Mt(_=>x(_,f),"handleContentLeave");return f.addEventListener("pointerleave",S),m.addEventListener("pointerleave",C),()=>{f.removeEventListener("pointerleave",S),m.removeEventListener("pointerleave",C)}}},[f,m,x,v]),N.useEffect(()=>{if(c){const S=Mt(C=>{const _=C.target,w={x:C.clientX,y:C.clientY},k=f?.contains(_)||m?.contains(_),D=!DA(w,c);k?v():D&&(v(),p())},"handleTrackPointerGrace");return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[f,m,c,p,v]),A.jsx(AA,{...t,ref:l})},"TooltipContentHoverable")),qF=Jw("TooltipContent"),AA=N.forwardRef(Mt(function(t,n){const{__scopeTooltip:i,children:o,"aria-label":s,id:l,onEscapeKeyDown:c,onPointerDownOutside:d,...f}=t,p=Fl(Dl,i),m=Xy(i),{onClose:g}=p;N.useEffect(()=>(document.addEventListener(qg,g),()=>document.removeEventListener(qg,g)),[g]),N.useEffect(()=>{if(p.trigger){const x=Mt(S=>{S.target instanceof Node&&S.target.contains(p.trigger)&&g()},"handleScroll");return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[p.trigger,g]);const{setContentId:v}=p;return Jn(()=>(v(l),()=>{v(void 0)}),[l,v]),A.jsx(YU,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:x=>x.preventDefault(),onDismiss:g,children:A.jsxs(vF,{"data-state":p.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:p.contentId,...m,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[A.jsx(qF,{children:o}),s?A.jsx(DF,{id:p.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function LA(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,i,o,s)){case s:return"left";case o:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}Mt(LA,"getExitSideFromRect");function RA(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}Mt(RA,"getPaddedExitPoints");function OA(e){const{top:t,right:n,bottom:i,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:i},{x:o,y:i}]}Mt(OA,"getPointsFromRect");function DA(e,t){const{x:n,y:i}=e;let o=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const c=t[s],d=t[l],f=c.x,p=c.y,m=d.x,g=d.y;p>i!=g>i&&n<(m-f)*(i-p)/(g-p)+f&&(o=!o)}return o}Mt(DA,"isPointInPolygon");function MA(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),IA(t)}Mt(MA,"getHull");function IA(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const o=e[i];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;n.length>=2;){const s=n[n.length-1],l=n[n.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Mt(IA,"getHullPresorted");var WF=PF,YF=jF,XF=BF,KF=FF,QF=GF;function ZF({delayDuration:e=400,...t}){return A.jsx(WF,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Yn({...e}){return A.jsx(YF,{"data-slot":"tooltip",...e})}function Xn({...e}){return A.jsx(XF,{"data-slot":"tooltip-trigger",...e})}function Kn({className:e,sideOffset:t=6,children:n,...i}){return A.jsx(KF,{children:A.jsx(QF,{"data-slot":"tooltip-content",sideOffset:t,className:it("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background duration-150 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=instant-open]:animate-in data-[state=instant-open]:fade-in-0",e),...i,children:n})})}const JF="_stage_2307v_2",e7={stage:JF};function t7(e){const{path:t,status:n}=e,i=n!=="added",o=n!=="deleted",s=i?jm({kind:"image",path:t,side:"old"}):void 0,l=o?jm({kind:"image",path:t,side:"new"}):void 0,c=s!==void 0&&l!==void 0,d=mw(s),f=mw(l),p=r7(),[m,g]=N.useState("side-by-side"),[v,x]=N.useState(50),S=Math.max(d.naturalWidth,f.naturalWidth),C=Math.max(d.naturalHeight,f.naturalHeight),w=m==="side-by-side"||!c?MU(S,C,p.width,p.maxHeight):GT(S,C,p.width,p.maxHeight),k=w.width>0&&(d.ok||f.ok),D=d.error&&f.error?"These images are not in this clone. Fetch Git LFS objects, then refresh.":d.error?"The old image is not in this clone. Fetch Git LFS objects, then refresh.":f.error?"The new image is not in this clone. Fetch Git LFS objects, then refresh.":null;return A.jsxs("div",{ref:p.ref,className:"min-w-0",children:[A.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-border px-3 py-2",children:[c?A.jsxs("div",{className:"flex overflow-hidden rounded-md border border-input",children:[A.jsx(Dm,{active:m==="side-by-side",onClick:()=>g("side-by-side"),hint:"Old and new at the same size",children:"Side by side"}),A.jsx(Dm,{active:m==="slider",onClick:()=>g("slider"),hint:"Drag to reveal new over old",children:"Slider"}),A.jsx(Dm,{active:m==="diff",onClick:()=>g("diff"),hint:"Pixels that differ",children:"Diff"})]}):A.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:n==="added"?"Added":"Deleted"}),k?A.jsx("span",{className:"ml-auto font-mono text-[11px] tabular-nums text-muted-foreground",children:IU(S,C,w.scale)}):null]}),D!==null?A.jsx("p",{className:"px-3 py-2 text-sm text-warn",children:D}):null,!k&&D===null?A.jsx("p",{className:"px-3 py-2 text-sm text-muted-foreground",children:"Reading image…"}):null,A.jsxs("div",{className:"flex w-full justify-center",children:[k&&(m==="side-by-side"||!c)?A.jsxs("div",{className:"flex",children:[i?A.jsx(Bc,{label:"Old",width:w.width,height:w.height,rule:o,children:s!==void 0&&!d.error?A.jsx(Nd,{src:s,alt:"Old",width:w.width,height:w.height}):A.jsx(Uc,{})}):A.jsx(Bc,{label:"Old",width:w.width,height:w.height,children:A.jsx(Uc,{text:"Added — no old image"})}),o?A.jsx(Bc,{label:"New",width:w.width,height:w.height,children:l!==void 0&&!f.error?A.jsx(Nd,{src:l,alt:"New",width:w.width,height:w.height}):A.jsx(Uc,{})}):A.jsx(Bc,{label:"New",width:w.width,height:w.height,children:A.jsx(Uc,{text:"Deleted — no new image"})})]}):null,k&&m==="slider"&&c&&s!==void 0&&l!==void 0?A.jsx(n7,{oldUrl:s,newUrl:l,width:w.width,height:w.height,wipe:v,onWipe:x}):null,k&&m==="diff"&&c&&d.element!==null&&f.element!==null?A.jsx(i7,{oldImage:d.element,newImage:f.element,naturalWidth:S,naturalHeight:C,width:w.width,height:w.height}):null]})]})}function Dm(e){return A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsx(Gt,{type:"button",size:"sm",variant:e.active?"secondary":"ghost",className:"rounded-none border-0","aria-pressed":e.active,onClick:e.onClick,children:e.children})}),A.jsx(Kn,{children:e.hint})]})}function Bc(e){return A.jsxs("figure",{className:it("w-fit shrink-0",e.rule===!0&&"border-r border-border"),children:[A.jsx("figcaption",{className:"border-b border-border px-3 py-1 font-mono text-[11px] text-muted-foreground",children:e.label}),A.jsx(Qy,{width:e.width,height:e.height,children:e.children})]})}function Qy(e){return A.jsx("div",{ref:e.ref,className:it(e7.stage,"relative shrink-0 overflow-hidden",e.className),style:{width:e.width,height:e.height},onPointerDown:e.onPointerDown,onPointerMove:e.onPointerMove,children:e.children})}function Nd(e){return A.jsx("img",{src:e.src,alt:e.alt,width:e.width,height:e.height,className:"absolute top-0 left-0 max-w-none",style:{width:e.width,height:e.height,objectFit:"contain",objectPosition:"left top"}})}function Uc(e){return A.jsx("p",{className:"flex h-full items-center px-3 text-sm text-muted-foreground",children:e.text??"Image missing"})}function n7(e){const{oldUrl:t,newUrl:n,width:i,height:o,wipe:s,onWipe:l}=e,c=N.useId(),d=N.useRef(null),f=g=>{const v=d.current;if(v===null)return;const x=v.getBoundingClientRect();x.width!==0&&l(Math.min(100,Math.max(0,(g-x.left)/x.width*100)))},p=g=>{g.preventDefault(),g.currentTarget.setPointerCapture(g.pointerId),f(g.clientX)},m=g=>{g.buttons!==0&&f(g.clientX)};return A.jsxs("figure",{className:"mx-auto w-fit shrink-0",children:[A.jsxs(Qy,{ref:d,width:i,height:o,className:"cursor-col-resize touch-none",onPointerDown:p,onPointerMove:m,children:[A.jsx(Nd,{src:t,alt:"Old",width:i,height:o}),A.jsx("div",{className:"absolute inset-y-0 left-0 overflow-hidden",style:{width:NU(s)},children:A.jsx(Nd,{src:n,alt:"New",width:i,height:o})}),A.jsxs("div",{className:"pointer-events-none absolute inset-y-0",style:{left:`${s}%`},"aria-hidden":!0,children:[A.jsx("span",{className:"absolute inset-y-0 left-0 w-px -translate-x-1/2 bg-primary"}),A.jsx("span",{className:"absolute top-1/2 left-0 size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border border-primary bg-card"})]})]}),A.jsxs("label",{className:"flex w-full items-center gap-3 px-3 py-2 font-mono text-[11px] text-muted-foreground",htmlFor:c,children:["Old",A.jsx("input",{id:c,type:"range",min:0,max:100,value:s,"aria-label":"Wipe between old and new",className:"min-w-0 flex-1 accent-primary",onChange:g=>l(Number(g.target.value))}),"New"]})]})}function i7(e){const t=N.useRef(null),[n,i]=N.useState(null);return N.useEffect(()=>{const o=t.current;if(o===null)return;const s=e.naturalWidth,l=e.naturalHeight;o.width=s,o.height=l;const c=o.getContext("2d");if(c===null)return;const d=gw(e.oldImage,s,l),f=gw(e.newImage,s,l),p=OU(d,f,s,l),m=c.createImageData(s,l);m.data.set(p.pixels),c.putImageData(m,0,0),i({changed:p.changed,total:p.total})},[e.naturalHeight,e.naturalWidth,e.newImage,e.oldImage]),A.jsxs("figure",{className:"mx-auto w-fit shrink-0",children:[A.jsx(Qy,{width:e.width,height:e.height,children:A.jsx("canvas",{ref:t,className:"block size-full"})}),n!==null?A.jsxs("figcaption",{className:"px-3 py-2 font-mono text-[11px] tabular-nums text-muted-foreground",children:[n.changed.toLocaleString()," of ",n.total.toLocaleString()," pixels differ"]}):null]})}function mw(e){const[t,n]=N.useState({ok:!1,error:!1,element:null,naturalWidth:0,naturalHeight:0});return N.useEffect(()=>{if(e===void 0){n({ok:!1,error:!1,element:null,naturalWidth:0,naturalHeight:0});return}let i=!1;return n({ok:!1,error:!1,element:null,naturalWidth:0,naturalHeight:0}),o7(e).then(o=>{i||n({ok:!0,error:!1,element:o,naturalWidth:o.naturalWidth,naturalHeight:o.naturalHeight})}).catch(()=>{i||n({ok:!1,error:!0,element:null,naturalWidth:0,naturalHeight:0})}),()=>{i=!0}},[e]),t}function r7(){const e=N.useRef(null),[t,n]=N.useState({width:0,maxHeight:0});return N.useLayoutEffect(()=>{const i=e.current;if(i===null)return;const o=()=>{const l=Math.floor(i.clientWidth),c=Math.max(120,Math.round(window.innerHeight*.7));n(d=>d.width===l&&d.maxHeight===c?d:{width:l,maxHeight:c})};o();const s=new ResizeObserver(o);return s.observe(i),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),{ref:e,width:t.width,maxHeight:t.maxHeight}}function o7(e){return new Promise((t,n)=>{const i=new Image;i.onload=()=>t(i),i.onerror=()=>n(new Error("image load failed")),i.src=e})}function gw(e,t,n){const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");return o===null?new Uint8ClampedArray(t*n*4):(o.clearRect(0,0,t,n),o.drawImage(e,0,0),o.getImageData(0,0,t,n).data)}function a7(e,t){const[n,i]=N.useState(t<=0?t:0);return N.useEffect(()=>{if(t<=0){i(0);return}i(0);const o=window.setTimeout(()=>i(t),t);return()=>window.clearTimeout(o)},[e,t]),nD(e,n,t)}const s7="_walker_1s58a_11",l7={walker:s7};function Gl(e){const t=e.layout??"well",n=e.delayMs??(t==="page"?0:Xw);if(!a7(!0,n))return null;const o=t==="inline"?"span":"div",s=t==="inline";return A.jsxs(o,{className:it("flex items-center gap-3",t==="well"&&"px-3 py-5",s&&"shrink-0 gap-0",e.className),role:s?void 0:"status","aria-live":s?void 0:"polite",children:[A.jsxs("span",{className:it("flex shrink-0 gap-[0.28rem]",s?"h-[1.1rem]":"h-7"),"aria-hidden":!0,children:[A.jsx(yw,{kind:"del",inline:s}),A.jsx(yw,{kind:"add",inline:s})]}),s?A.jsx("span",{className:"sr-only",children:e.label}):A.jsx("p",{className:"m-0 font-mono text-[11px] tracking-wide text-muted-foreground",children:e.label})]})}function yw(e){return A.jsx("span",{className:it("relative h-full overflow-hidden rounded-[1px]",e.inline?"w-0.5":"w-[3px]",e.kind==="del"?"bg-del/38":"bg-add/38"),children:A.jsx("span",{className:it("absolute inset-x-0 top-[28%] h-[44%] rounded-[inherit]",l7.walker,e.kind==="del"?"bg-del":"bg-add")})})}const u7=a1("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-[var(--motion)] ease-[var(--motion-ease)] focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive/20 text-destructive",outline:"border-border text-foreground",ghost:"text-muted-foreground"}},defaultVariants:{variant:"default"}});function c7({className:e,variant:t="default",asChild:n=!1,...i}){const o=n?Qw:"span";return A.jsx(o,{"data-slot":"badge",className:it(u7({variant:t}),e),...i})}const Mm="duration-[var(--motion)] ease-[var(--motion-ease)]";function d7(e){const{file:t,active:n,index:i,split:o,splitRatio:s,wrap:l,viewed:c,onSplitRatio:d,onOpen:f,onViewed:p}=e,m=t.kind==="lockfile",[g,v]=N.useState(c||m),[x,S]=N.useState(t.patch),[C,_]=N.useState(null),w=t.hunks[0],k=_z(t.hunks.flatMap(z=>z.lines.filter(j=>j.kind==="add").map(j=>j.text))),D=t.oldPath!==void 0?`${t.oldPath} → ${t.path}`:t.path,M=N.useId();N.useEffect(()=>{v(c||m)},[m,c]),N.useEffect(()=>{if(g||!m||x!==""||C!==null)return;let z=!1;return JO(t.path).then(j=>{z||S(j.patch)}).catch(j=>{z||_(j instanceof Error?j.message:String(j))}),()=>{z=!0}},[g,m,t.path,x,C]);const O=z=>{z.target instanceof Element&&z.target.closest("button, input, label, a")!==null||v(j=>!j)};return A.jsxs("article",{className:it("overflow-hidden rounded-lg border bg-card transition-[border-color]",Mm,n?"border-primary":"border-border"),"data-hunk":i,children:[A.jsxs("header",{className:it("sticky top-0 z-10 flex cursor-pointer flex-wrap items-center gap-x-3 gap-y-1 bg-card px-3 py-2",g?null:"border-b border-border"),onClick:O,children:[A.jsx(Gt,{type:"button",variant:"ghost",size:"icon-sm",className:"size-6","aria-expanded":!g,"aria-controls":M,"aria-label":g?"Expand file":"Collapse file",onClick:()=>v(z=>!z),children:A.jsx(Y4,{className:it("size-4 transition-transform",Mm,g&&"-rotate-90")})}),A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsx(Gt,{type:"button",variant:"link",className:it("h-auto p-0 font-mono text-sm transition-colors",Mm,c&&"text-muted-foreground"),onClick:()=>f(t.path),children:D})}),A.jsx(Kn,{children:"Open file"})]}),A.jsx("code",{className:"font-mono text-xs text-muted-foreground",children:t.kind==="image"?"image":t.kind==="lockfile"?"lockfile":t.hunkCount===1&&w!==void 0?Sz(w.header):`${t.hunkCount} hunks`}),t.kind==="image"?A.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:t.status}):A.jsxs("span",{className:"font-mono text-[11px] tabular-nums",children:[A.jsxs("span",{className:"text-del",children:["−",t.removed]})," ",A.jsxs("span",{className:"text-add",children:["+",t.added]})]}),k.length>0?k.map(z=>A.jsx(c7,{variant:"outline",className:"font-mono font-normal",children:z},z)):null,A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsxs("label",{className:"ml-auto flex shrink-0 cursor-pointer items-center gap-1.5 text-xs text-muted-foreground select-none",children:[A.jsx("input",{type:"checkbox",className:"size-3.5 accent-primary",checked:c,onChange:z=>p(t.path,z.target.checked)}),"Viewed"]})}),A.jsxs(Kn,{children:[c?"Mark as not viewed":"Mark as viewed"," (v)"]})]})]}),A.jsx("div",{id:M,hidden:g,children:g?null:t.kind==="image"?A.jsx(t7,{path:t.path,status:t.status}):C!==null?A.jsx("p",{className:"px-3 py-2 text-sm text-warn",children:C}):m&&x===""?A.jsx(Gl,{label:Do.lockfile}):A.jsx(TU,{path:t.path,patch:x,split:o,wrap:l,splitRatio:s,onSplitRatio:d,hydrate:t.complete})})]})}function f7(e){const{group:t,bucket:n,groups:i,mixed:o,strandColor:s,loading:l,hunkError:c,files:d,activeHunk:f,split:p,splitRatio:m,wrap:g,viewedPaths:v}=e,x=n==="lockfiles",S=s!==void 0||x;return A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"mb-8 flex items-stretch gap-4",children:[S?A.jsx("span",{className:"w-[3px] flex-none rounded-px bg-muted-foreground [[data-motion=group]_&]:[view-transition-name:review-strand]",style:s!==void 0?{backgroundColor:s}:void 0,"aria-hidden":!0}):null,A.jsx("div",{className:"min-w-0 flex-1 [[data-motion=group]_&]:[view-transition-name:review-copy]",children:t!==null?A.jsx(xz,{group:t,index:Ww(i,t.id),groups:i,partTitle:o?t.part:void 0,onOpenGroup:e.onOpenGroup}):x?A.jsx(Jm,{kicker:"Lockfiles",title:"Generated lockfiles"}):A.jsx(Jm,{kicker:"Unassigned",title:"Not in any group",children:A.jsx("p",{className:"font-serif text-lg leading-relaxed text-foreground",children:"These hunks are in git and in no group. Fix the review document. Never the diff."})})})]}),c!==null?A.jsx("p",{className:"mt-4 text-warn",children:c}):null,l?A.jsx("article",{className:"mt-8 overflow-hidden rounded-lg border border-border bg-card",children:A.jsx(Gl,{label:Do.group})}):null,!l&&d.length===0&&c===null?A.jsx("p",{className:"mt-8 text-muted-foreground",children:"No hunks in this group."}):null,!l&&d.length>0?A.jsxs("p",{className:"mt-8 font-mono text-xs tabular-nums text-muted-foreground",children:[d.filter(C=>v.has(C.path)).length," of ",d.length," files viewed"]}):null,!l&&d.length>0?A.jsx("div",{className:"mt-4 space-y-8",children:d.map(C=>A.jsx(d7,{file:C,active:f>=C.firstIndex&&f<C.firstIndex+C.hunkCount,index:C.firstIndex,split:p,splitRatio:m,wrap:g,viewed:v.has(C.path),onSplitRatio:e.onSplitRatio,onOpen:e.onOpenFile,onViewed:e.onViewed},C.path))}):null]})}const h7=/^[0-9a-f]{7,40}$/i;function p7(e){return h7.test(e)}function vw(e,t){const n=!p7(e)&&e!==t;return{display:n?e:tD(t),copy:t,tooltip:n?`${e} · ${t}`:t}}function rd(e){return A.jsx("kbd",{className:it("font-mono text-[10px] font-normal text-muted-foreground",e.className),children:e.children})}function m7(e){const{meta:t,wrap:n,split:i,onWrap:o,onUnified:s,onSplit:l,onRefresh:c,busy:d=!1}=e;return A.jsxs("header",{className:"flex flex-col gap-2 border-b border-border px-5 py-3 min-[800px]:flex-row min-[800px]:flex-wrap min-[800px]:items-center min-[800px]:justify-between",children:[A.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[A.jsx("span",{className:"shrink-0 font-serif text-lg leading-none text-foreground",children:"Comprehende"}),A.jsx(g7,{resolved:t.resolved}),A.jsx(v7,{meta:t})]}),A.jsxs("div",{className:"flex flex-wrap items-center gap-2 min-[800px]:justify-end",children:[A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsxs(Gt,{size:"sm",variant:n?"secondary":"outline","aria-pressed":n,"aria-label":"Wrap lines",onClick:o,children:["Wrap",A.jsx(rd,{className:"max-sm:hidden",children:"w"})]})}),A.jsx(Kn,{children:"Wrap long lines"})]}),A.jsxs("div",{className:"flex items-center gap-1.5",children:[A.jsxs("div",{className:"flex overflow-hidden rounded-md border border-input",children:[A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsx(Gt,{size:"sm",variant:i?"ghost":"secondary",className:"rounded-none border-0",onClick:s,"aria-pressed":!i,children:"Unified"})}),A.jsx(Kn,{children:"Unified diff"})]}),A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsx(Gt,{size:"sm",variant:i?"secondary":"ghost",className:"rounded-none border-0",onClick:l,"aria-pressed":i,children:"Split"})}),A.jsx(Kn,{children:"Side-by-side diff"})]})]}),A.jsx(rd,{className:"max-sm:hidden",children:"s"})]}),A.jsx(y7,{}),d?A.jsx(Gl,{layout:"inline",label:Do.review}):null,A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsxs(Gt,{size:"sm",variant:"outline",onClick:c,"aria-busy":d,children:["Refresh",A.jsx(rd,{className:"max-sm:hidden",children:"r"})]})}),A.jsx(Kn,{children:d?Do.review:"Reload review"})]})]})]})}function g7(e){const t=vw(e.resolved.baseRef,e.resolved.baseSha),n=vw(e.resolved.headRef,e.resolved.headSha);return A.jsxs("div",{className:"flex min-w-0 items-baseline gap-1.5 text-sm",children:[A.jsx(bw,{...t}),A.jsx("span",{className:"shrink-0 text-muted-foreground",children:"..."}),A.jsx(bw,{...n})]})}function bw(e){const[t,n]=N.useState(!1);return N.useEffect(()=>{if(!t)return;const i=window.setTimeout(()=>n(!1),1600);return()=>window.clearTimeout(i)},[t]),A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsx("button",{type:"button",className:"max-w-[10rem] cursor-pointer truncate rounded-sm px-0.5 font-mono text-primary hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none","aria-label":`Copy ${e.copy}`,"aria-live":"polite",onClick:()=>{n(!0),navigator.clipboard.writeText(e.copy).catch(()=>{n(!1)})},children:t?"Copied":e.display})}),A.jsx(Kn,{className:"max-w-[min(24rem,calc(100vw-2rem))] font-mono",children:e.tooltip})]})}function y7(){const{resolved:e,toggleTheme:t}=jy(),n=e==="dark"?"light":"dark";return A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsx(Gt,{size:"icon-sm",variant:"outline","aria-label":`Use ${n} theme`,onClick:t,children:e==="dark"?A.jsx(J4,{}):A.jsx(Q4,{})})}),A.jsxs(Kn,{children:["Use ",n," theme"]})]})}function v7(e){const{meta:t}=e,n=t.coverage.unassignedCount>0||t.coverage.staleCount>0,i=[`${t.coverage.assignedHunks} of ${t.coverage.totalHunks} hunks grouped`,t.coverage.unassignedCount>0?`${t.coverage.unassignedCount} unassigned`:null,t.coverage.staleCount>0?`${t.coverage.staleCount} stale`:null].filter(o=>o!==null).join(" · ");return A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsxs("span",{className:it("shrink-0 font-mono text-xs tabular-nums",n?"text-warn":"text-muted-foreground"),children:[t.coverage.assignedHunks,"/",t.coverage.totalHunks]})}),A.jsx(Kn,{children:i})]})}const b7=["png","jpg","jpeg","gif","webp","bmp","avif","ico"],x7=new Set(b7);function S7(e){const t=e.split("/").pop()??e,n=t.lastIndexOf(".");if(n<=0)return;const i=t.slice(n+1).toLowerCase();return x7.has(i)?i:void 0}function _7(e){return S7(e)!==void 0}function C7(e){const t=[];for(const n of e){const i=t[t.length-1];if(i!==void 0&&i.sha===n.sha&&i.author===n.author){i.lines+=1;continue}t.push({lineNumber:n.line,sha:n.sha,author:n.author,timestamp:n.timestamp,lines:1})}return t}var w7=Object.defineProperty,NA=(e,t)=>w7(e,"name",{value:t,configurable:!0}),xw="horizontal",E7=["horizontal","vertical"],k7=N.forwardRef(NA(function(t,n){const{decorative:i,orientation:o=xw,...s}=t,l=zA(o)?o:xw,d=i?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return A.jsx(Go.div,{"data-orientation":l,...d,...s,ref:n})},"Separator"));function zA(e){return E7.includes(e)}NA(zA,"isValidOrientation");var T7=k7;function A7({className:e,orientation:t="horizontal",decorative:n=!0,...i}){return A.jsx(T7,{"data-slot":"separator",decorative:n,orientation:t,className:it("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...i})}function L7(e){const{inspector:t,wrap:n,setInspector:i,onClose:o}=e,s=_7(t.path),[l,c]=N.useState(""),[d,f]=N.useState(null),[p,m]=N.useState(null),[g,v]=N.useState(!0),x=N.useMemo(()=>d===null?"":d.map(C=>C.text).join(`
1713
+ `),[d]),S=N.useMemo(()=>{if(d!==null)return C7(d).map(C=>({lineNumber:C.lineNumber,metadata:{sha:C.sha,author:C.author,timestamp:C.timestamp,lines:C.lines}}))},[d]);return N.useEffect(()=>{let C=!1;if(m(null),v(!0),c(""),f(null),s){v(!1);return}return t.mode==="file"?qw(t.path,t.side).then(_=>{C||(c(_.content),v(!1))}).catch(_=>{C||(m(_ instanceof Error?_.message:String(_)),v(!1))}):eD(t.path,t.side).then(_=>{C||(f(_.lines),v(!1))}).catch(_=>{C||(m(_ instanceof Error?_.message:String(_)),v(!1))}),()=>{C=!0}},[s,t]),A.jsxs("div",{className:"review-inspector flex h-full min-h-0 flex-col","aria-busy":g,children:[A.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-8 pt-6 pb-4",children:[A.jsxs(Yn,{children:[A.jsx(Xn,{asChild:!0,children:A.jsxs(Gt,{type:"button",size:"sm",variant:"outline",onClick:o,children:["Back",A.jsx(rd,{children:"esc"})]})}),A.jsx(Kn,{children:"Back to the diff"})]}),A.jsx("strong",{className:"min-w-0 truncate font-mono text-sm font-medium",children:t.path}),A.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[A.jsx(Gt,{type:"button",size:"sm",variant:t.mode==="file"?"secondary":"ghost",onClick:()=>i({...t,mode:"file"}),children:"File"}),s?null:A.jsx(Gt,{type:"button",size:"sm",variant:t.mode==="blame"?"secondary":"ghost",onClick:()=>i({...t,mode:"blame"}),children:"Blame"}),A.jsx(A7,{orientation:"vertical",className:"mx-1 h-6"}),A.jsx(Gt,{type:"button",size:"sm",variant:t.side==="old"?"secondary":"ghost",onClick:()=>i({...t,side:"old"}),children:"Old"}),A.jsx(Gt,{type:"button",size:"sm",variant:t.side==="new"?"secondary":"ghost",onClick:()=>i({...t,side:"new"}),children:"New"})]})]}),p!==null?A.jsx("p",{className:"px-8 text-warn",children:p}):null,g&&p===null&&!s?A.jsx("div",{className:"px-8 pt-2",children:A.jsx(Gl,{label:t.mode==="file"?Do.file:Do.blame})}):null,s?A.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-8 pb-8",children:A.jsx("img",{src:jm({kind:"image",path:t.path,side:t.side}),alt:`${t.side} ${t.path}`,className:"h-auto max-w-full bg-[var(--diff-canvas)]"})}):null,!s&&t.mode==="file"&&p===null&&!g?A.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-4 pb-8",children:A.jsx(JC,{path:t.path,contents:l,wrap:n})}):null,!s&&t.mode==="blame"&&p===null&&!g&&d!==null?A.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-4 pb-8",children:A.jsx(JC,{path:t.path,contents:x,wrap:n,annotations:S})}):null]})}const PA=6;function R7(e){const t=new Map(e.map(s=>[s.id,s.suggestedOrder]));if(!e.some(s=>s.part!==void 0))return[{colorIndex:0,groupIds:Sw(e.map(s=>s.id),t)}];const i=new Map;for(const s of e){const l=s.part??`\0${s.id}`,c=i.get(l)??[];c.push(s.id),i.set(l,c)}const o=[...i.entries()].map(([s,l])=>{const c=Sw(l,t);return{title:s.startsWith("\0")?void 0:s,groupIds:c,minOrder:t.get(c[0]??"")??0,sortKey:c[0]??""}});return o.sort((s,l)=>s.minOrder-l.minOrder||(s.title??s.sortKey).localeCompare(l.title??l.sortKey)),o.map((s,l)=>({colorIndex:l%PA,groupIds:s.groupIds,...s.title!==void 0?{title:s.title}:{}}))}function HA(e){const t=new Map;for(const n of e)for(const i of n.groupIds)t.set(i,n.colorIndex);return t}function df(e){return`var(--strand-${e%PA})`}function Zy(e){return e.length>1}function Sw(e,t){return[...e].sort((n,i)=>(t.get(n)??0)-(t.get(i)??0)||n.localeCompare(i))}function O7(e){const{meta:t,parts:n,onOpenGroup:i}=e,o=Zy(n),s=new Map(t.groups.map(f=>[f.id,f])),l=t.document.tickets??[],c=t.document.why,d=l.length>0?A.jsx(D7,{tickets:l,mixed:o,parts:n}):null;return A.jsxs("div",{className:"mb-8 [[data-motion=group]_&]:[view-transition-name:review-overview]",children:[c!==void 0?A.jsxs("section",{className:"mb-12 max-w-[68ch]","aria-labelledby":"review-why",children:[A.jsx("p",{id:"review-why",className:"mb-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:"Why"}),A.jsx("h1",{className:"mb-4 font-serif text-[1.75rem] leading-snug text-foreground",children:A.jsx(ko,{text:c})}),d]}):d!==null?A.jsx("div",{className:"mb-8 max-w-[68ch]",children:d}):null,A.jsxs("section",{"aria-labelledby":"review-what",children:[A.jsxs("p",{id:"review-what",className:"mb-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:["What · ",Yw(t.document.size)," · ",t.files.length," files"]}),c!==void 0?A.jsx("p",{className:"mb-8 max-w-[68ch] font-serif text-lg leading-relaxed text-foreground",children:A.jsx(ko,{text:t.document.summary})}):A.jsx("h1",{className:"mb-8 max-w-[68ch] font-serif text-[1.75rem] leading-snug text-foreground",children:A.jsx(ko,{text:t.document.summary})}),A.jsx("div",{className:o?"grid grid-flow-col auto-cols-[minmax(16rem,1fr)] items-start gap-4 overflow-x-auto pb-1":void 0,children:n.map(f=>A.jsx(M7,{part:f,mixed:o,groups:t.groups,byId:s,onOpenGroup:i},f.groupIds.join("\0")))})]})]})}function D7(e){const{tickets:t,mixed:n,parts:i}=e;return A.jsx("ul",{className:"space-y-1 font-mono text-[11px] tracking-wide text-muted-foreground",children:t.map(o=>{const s=n?i.find(l=>l.title===o.part):void 0;return A.jsxs("li",{className:"flex items-center gap-2",children:[s!==void 0?A.jsx("span",{"aria-hidden":!0,className:"size-2 shrink-0 rounded-full",style:{backgroundColor:df(s.colorIndex)}}):null,o.url!==void 0?A.jsx("a",{className:"text-primary hover:underline",href:o.url,target:"_blank",rel:"noreferrer",children:o.id}):A.jsx("span",{children:o.id}),o.title!==void 0?A.jsx("span",{children:o.title}):null,o.part!==void 0?A.jsxs("span",{children:["· ",o.part]}):null]},o.id)})})}function M7(e){const{part:t,mixed:n,groups:i,byId:o,onOpenGroup:s}=e,l=df(t.colorIndex);return A.jsxs("section",{className:it("min-w-0",n&&"rounded-md border border-border py-2"),style:n?I7(l):void 0,"aria-label":t.title,children:[n&&t.title!==void 0?A.jsxs("p",{className:"mb-1 flex items-center gap-2 px-4 pt-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:[A.jsx("span",{"aria-hidden":!0,className:"size-2 shrink-0 rounded-full",style:{backgroundColor:l}}),t.title]}):null,A.jsx("ol",{className:"m-0 list-none p-0",children:t.groupIds.map(c=>{const d=o.get(c);if(d===void 0)return null;const f=i.findIndex(p=>p.id===c)+1;return A.jsx("li",{className:"mb-2 last:mb-0",children:A.jsxs(Gt,{type:"button",variant:"ghost",className:"h-auto w-full min-w-0 items-start justify-start gap-4 rounded-md px-4 py-4 text-left font-normal whitespace-normal",onClick:()=>s(d.id),children:[A.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:cl(f)}),A.jsxs("span",{className:"min-w-0 flex-1",children:[A.jsx("strong",{className:"block font-medium text-foreground",children:d.title}),A.jsx("span",{className:"mt-1 block leading-relaxed text-muted-foreground",children:A.jsx(ko,{text:d.summary})})]})]})},d.id)})})]})}function I7(e){return{"--strand":e,borderLeftWidth:3,borderLeftColor:e,backgroundColor:`color-mix(in srgb, ${e} 8%, var(--card))`}}const N7="_itemActive_xc7sz_1",z7="_selection_xc7sz_5",jA={itemActive:N7,selection:z7};function P7(e){const{meta:t,selection:n,parts:i,onSelect:o}=e,l=Zy(i)?HA(i):new Map;return A.jsx("nav",{className:"h-full overflow-auto py-6",children:A.jsxs("div",{className:"relative",children:[A.jsx("span",{className:jA.selection,"aria-hidden":!0}),A.jsx("ul",{className:"mb-6 list-none p-0",children:A.jsx("li",{children:A.jsx(Vc,{active:n?.kind==="overview",onClick:()=>o({kind:"overview"}),title:"Overview",count:Yw(t.document.size)})})}),A.jsxs("ul",{className:"mb-6 list-none p-0",children:[t.groups.map((c,d)=>A.jsx("li",{children:A.jsx(Vc,{active:n?.kind==="group"&&n.id===c.id,onClick:()=>o({kind:"group",id:c.id}),index:cl(d+1),title:c.title,count:c.staleCount>0?`${c.staleCount} stale`:void 0,colorIndex:l.get(c.id)})},c.id)),t.unassigned.hunkCount>0?A.jsx("li",{children:A.jsx(Vc,{active:n?.kind==="unassigned",onClick:()=>o({kind:"unassigned"}),title:"Unassigned",count:String(t.unassigned.hunkCount),warn:!0})}):null,t.lockfiles.fileCount>0?A.jsx("li",{children:A.jsx(Vc,{active:n?.kind==="lockfiles",onClick:()=>o({kind:"lockfiles"}),title:"Lockfiles",count:String(t.lockfiles.fileCount),muted:!0})}):null]})]})})}function Vc(e){const t=e.colorIndex,n=t!==void 0||e.active,i=t!==void 0?df(t):e.muted?"var(--muted-foreground)":void 0;return A.jsxs(Gt,{type:"button",variant:"ghost",onClick:e.onClick,style:i!==void 0?{"--strand":i}:void 0,className:it("relative z-1 mx-3 mb-1 h-auto w-[calc(100%-24px)] min-w-0 items-start justify-start gap-2.5 rounded-md px-3 py-2 text-left font-normal whitespace-normal hover:bg-transparent",!e.active&&"hover:bg-accent",e.active&&it(jA.itemActive,"text-foreground"),e.warn&&"text-warn hover:text-warn"),children:[n?A.jsx("span",{className:it("pointer-events-none absolute inset-y-1.5 left-0 z-1 w-0.5 rounded-full bg-[var(--strand,var(--primary))] transition-opacity duration-[var(--motion)] ease-[var(--motion-ease)]",t!==void 0&&!e.active&&"opacity-45"),"aria-hidden":!0}):null,e.index!==void 0?A.jsx("span",{className:"mt-px w-5 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:e.index}):null,A.jsx("span",{className:"min-w-0 flex-1 text-left leading-snug",children:e.title}),e.count!==void 0?A.jsx("span",{className:it("shrink-0 text-[11px] tabular-nums text-muted-foreground",e.warn&&"text-warn"),children:e.count}):null]})}function Fc(e){let t=0;return e.map(n=>{const i=Cz(n.hunks.flatMap(s=>s.lines)),o={path:n.path,kind:n.kind??"text",status:n.status??"modified",patch:n.patch,added:n.added??i.added,removed:n.removed??i.removed,hunkCount:Math.max(n.hunks.length,1),firstIndex:t,complete:n.complete!==!1,hunks:n.hunks};return n.oldPath!==void 0&&(o.oldPath=n.oldPath),t+=o.hunkCount,o})}function Im(e,t){return e.findIndex(n=>t>=n.firstIndex&&t<n.firstIndex+n.hunkCount)}let Nm=0;function H7(){return typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches}function j7(e){const t=H7(),n=typeof document>"u"?void 0:document.startViewTransition;return!t&&typeof n=="function"}function zm(e,t){if(!j7()){e();return}const n=document.startViewTransition;if(typeof n!="function"){e();return}const i=document.documentElement,o=++Nm;i.dataset.motion=t;try{n.call(document,()=>{nf.flushSync(e)}).finished.finally(()=>{o===Nm&&delete i.dataset.motion})}catch{o===Nm&&delete i.dataset.motion,e()}}function Gc(e){return e.groups.length>0?{kind:"overview"}:{kind:"unassigned"}}function BA(e,t){return`comprehende.group.${e}.${t}`}function B7(e){if(e===null||e==="")return null;try{const t=JSON.parse(e);return typeof t!="object"||t===null||!("kind"in t)?null:t.kind==="overview"?{kind:"overview"}:t.kind==="unassigned"?{kind:"unassigned"}:t.kind==="lockfiles"?{kind:"lockfiles"}:t.kind==="group"&&"id"in t&&typeof t.id=="string"&&t.id!==""?{kind:"group",id:t.id}:null}catch{return null}}function U7(e){return JSON.stringify(e)}function V7(e,t){return t===null||t.kind==="group"&&!e.groups.some(n=>n.id===t.id)||t.kind==="unassigned"&&e.unassigned.hunkCount===0&&e.groups.length>0||t.kind==="lockfiles"&&(e.lockfiles?.fileCount??0)===0?Gc(e):t}function F7(e){return V7(e,$7(e.resolved.baseSha,e.resolved.headSha))}function G7(e,t){q7(e.resolved.baseSha,e.resolved.headSha,t)}function $7(e,t){try{return B7(sessionStorage.getItem(BA(e,t)))}catch{return null}}function q7(e,t,n){try{sessionStorage.setItem(BA(e,t),U7(n))}catch{}}function W7(e){const t=[{kind:"overview"},...e.groups.map(n=>({kind:"group",id:n.id}))];return e.unassigned.hunkCount>0&&t.push({kind:"unassigned"}),(e.lockfiles?.fileCount??0)>0&&t.push({kind:"lockfiles"}),t}function _w(e,t,n,i){if(e===null)return;const o=W7(e),s=o.findIndex(c=>UA(c,t)),l=o[(s+i+o.length)%o.length];l!==void 0&&n(l)}function UA(e,t){return t===null?!1:e.kind==="overview"?t.kind==="overview":e.kind==="unassigned"?t.kind==="unassigned":e.kind==="lockfiles"?t.kind==="lockfiles":t.kind==="group"&&t.id===e.id}function Y7(e,t){return`comprehende.viewed.${e}.${t}`}function X7(e){if(e===null||e==="")return new Set;try{const t=JSON.parse(e);return!Array.isArray(t)||t.some(n=>typeof n!="string")?new Set:new Set(t)}catch{return new Set}}function K7(e){return JSON.stringify([...e].sort())}function Q7(e,t,n){const i=new Set(e);return n?i.add(t):i.delete(t),i}function Cw(e){try{return VA(e),X7(sessionStorage.getItem(e))}catch{return new Set}}function Z7(e,t){try{VA(e),sessionStorage.setItem(e,K7(t))}catch{}}function VA(e){try{localStorage.removeItem(e)}catch{}}function J7(e,t){const n=e!==void 0&&t!==void 0?Y7(e,t):null,[i,o]=N.useState(()=>n===null?new Set:Cw(n));N.useEffect(()=>{o(n===null?new Set:Cw(n))},[n]);const s=N.useCallback((l,c)=>{n!==null&&o(d=>{const f=Q7(d,l,c);return Z7(n,f),f})},[n]);return{viewedPaths:i,setFileViewed:s}}function eG({className:e,...t}){return A.jsx(Vw,{"data-slot":"resizable-panel-group",className:it("flex h-full w-full aria-[orientation=vertical]:flex-col",e),...t})}function ww({...e}){return A.jsx(Fw,{"data-slot":"resizable-panel",...e})}function tG({withHandle:e=!1,className:t,...n}){return A.jsx(Gw,{"data-slot":"resizable-handle",className:it("relative flex w-2 items-center justify-center bg-transparent after:absolute after:inset-y-0 after:left-1/2 after:w-px after:-translate-x-1/2 after:bg-border after:transition-[background-color] after:duration-[var(--motion)] after:ease-[var(--motion-ease)] hover:after:bg-primary/60 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-2 aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-px aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2",t),...n,children:e?A.jsx("div",{className:"bg-border z-10 flex h-8 w-3 items-center justify-center rounded-sm border border-border",children:A.jsx(IT,{className:"size-2.5 text-muted-foreground"})}):null})}function nG(){const[e,t]=N.useState(null),[n,i]=N.useState(null),[o,s]=N.useState(null),[l,c]=N.useState([]),[d,f]=N.useState(null),[p,m]=N.useState(null),[g,v]=N.useState(!1),[x,S]=N.useState(!1),[C,_]=N.useState(.5),[w,k]=N.useState(0),[D,M]=N.useState(null),[O,z]=N.useState(!0),j=N.useRef(null),{defaultLayout:F,onLayoutChanged:ee}=qO({id:"comprehende-shell-overlay",panelIds:["stack","main"],onlySaveAfterUserInteractions:!0}),q=N.useCallback(async()=>{z(!0),i(null);try{const re=await QO();t(re),s(de=>de??F7(re))}catch(re){i(re instanceof Error?re.message:String(re))}finally{z(!1)}},[]);N.useEffect(()=>{q()},[q]),N.useEffect(()=>{e===null||o===null||G7(e,o)},[e,o]);const U=o?.kind==="group"?o.id:o?.kind==="unassigned"?"unassigned":o?.kind==="lockfiles"?"lockfiles":null;N.useEffect(()=>{if(U===null){c([]),f(null);return}let re=!1;return m(null),ZO(U).then(de=>{re||(c(de.files),f(U),k(0))}).catch(de=>{re||(c([]),f(U),m(de instanceof Error?de.message:String(de)))}),()=>{re=!0}},[U]);const Z=U!==null&&U!==d,X=N.useCallback(re=>{if(UA(re,o)&&D===null)return;zm(()=>{s(re),M(null)},D!==null?"scene":"group")},[D,o]),W=N.useCallback(re=>{zm(()=>{M({path:re,mode:"file",side:"new"})},"scene")},[]),P=N.useCallback(()=>{D!==null&&zm(()=>M(null),"scene")},[D]),{viewedPaths:$,setFileViewed:ne}=J7(e?.resolved.baseSha,e?.resolved.headSha),ue=N.useCallback(re=>{k(re),requestAnimationFrame(()=>{document.querySelector(`[data-hunk="${re}"]`)?.scrollIntoView({block:"nearest"})})},[]);N.useEffect(()=>{const re=de=>{if(de.metaKey||de.ctrlKey||de.altKey)return;const _e=de.target;if(!(_e instanceof HTMLElement&&(_e.isContentEditable||_e.closest("input, textarea, select")!==null)))if(de.key==="w")v(pe=>!pe);else if(de.key==="s")S(pe=>(pe||_(.5),!pe));else if(de.key==="r")q();else if(de.key==="o")X({kind:"overview"});else if(de.key==="u")X({kind:"unassigned"});else if(de.key==="Escape")P();else if(de.key==="[")_w(e,o,X,-1);else if(de.key==="]")_w(e,o,X,1);else{if(D!==null)return;if(de.key==="j"){const pe=Fc(l),Pe=Im(pe,w),je=pe[Math.min(pe.length-1,Math.max(Pe,0)+1)];je!==void 0&&ue(je.firstIndex)}else if(de.key==="k"){const pe=Fc(l),Pe=Im(pe,w),je=pe[Math.max(0,(Pe===-1?0:Pe)-1)];je!==void 0&&ue(je.firstIndex)}else if(de.key==="v"){const pe=Fc(l),Pe=pe[Math.max(0,Im(pe,w))];Pe!==void 0&&ne(Pe.path,!$.has(Pe.path))}}};return window.addEventListener("keydown",re),()=>window.removeEventListener("keydown",re)},[w,P,D,l,q,e,ue,X,o,ne,$]),N.useEffect(()=>{j.current?.scrollTo({top:0})},[o]);const R=N.useMemo(()=>e===null||o?.kind!=="group"?null:e.groups.find(re=>re.id===o.id)??null,[e,o]),H=N.useMemo(()=>Fc(l),[l]),Y=N.useMemo(()=>R7(e?.groups??[]),[e]),I=N.useMemo(()=>HA(Y),[Y]),le=Zy(Y),fe=le&&R!==null?I.get(R.id):void 0;return O&&e===null?A.jsxs(Ew,{children:[A.jsx("p",{className:"mb-5 font-serif text-lg leading-none text-foreground",children:"Comprehende"}),A.jsx(Gl,{layout:"page",label:Do.review})]}):n!==null&&e===null?A.jsx(Ew,{className:"text-warn",children:n}):e===null?null:A.jsx(ZF,{children:A.jsxs("div",{className:"flex h-full min-h-0 flex-col","aria-busy":O||Z,children:[A.jsx(m7,{meta:e,wrap:g,split:x,onWrap:()=>v(re=>!re),onUnified:()=>S(!1),onSplit:()=>{S(!0),x||_(.5)},onRefresh:()=>{q()},busy:O}),A.jsxs(eG,{className:"min-h-0 flex-1",defaultLayout:F,onLayoutChanged:ee,children:[A.jsx(ww,{id:"stack",defaultSize:"20",minSize:"14%",className:"min-h-0 min-w-0",children:A.jsx(P7,{meta:e,selection:o,parts:Y,onSelect:X})}),A.jsx(tG,{withHandle:!0}),A.jsx(ww,{id:"main",defaultSize:"80",minSize:"40%",className:"min-h-0 min-w-0",children:A.jsx("div",{className:"h-full min-h-0 [[data-motion=scene]_&]:[view-transition-name:review-scene]",children:D!==null?A.jsx(L7,{inspector:D,wrap:g,setInspector:M,onClose:P}):A.jsx("main",{ref:j,className:"h-full overflow-auto scroll-smooth px-10 py-8","aria-busy":Z,children:o?.kind==="overview"?A.jsx(O7,{meta:e,parts:Y,onOpenGroup:re=>X({kind:"group",id:re})}):A.jsx(f7,{group:R,bucket:o?.kind==="lockfiles"?"lockfiles":o?.kind==="unassigned"?"unassigned":void 0,groups:e.groups,mixed:le,strandColor:fe!==void 0?df(fe):void 0,loading:Z,hunkError:p,files:Z?[]:H,activeHunk:w,split:x,splitRatio:C,wrap:g,viewedPaths:$,onOpenGroup:re=>X({kind:"group",id:re}),onOpenFile:W,onSplitRatio:_,onViewed:ne})})})})]})]})})}function Ew(e){return A.jsx("div",{className:it("px-10 py-8 text-muted-foreground",e.className),children:e.children})}const FA=document.getElementById("root");if(FA===null)throw new Error("missing #root");pO.createRoot(FA).render(A.jsx(N.StrictMode,{children:A.jsx(xU,{children:A.jsx(SU,{children:A.jsx(nG,{})})})}));