@markusylisiurunen/tau 0.2.121 → 0.2.122

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,258 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DMxchsRu.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-DzOHUlBM.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(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 a(o){if(o.ep)return;o.ep=!0;const s=i(o);fetch(o.href,s)}})();function gv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hd={exports:{}},Rl={};var Zy;function YE(){if(Zy)return Rl;Zy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:s}}return Rl.Fragment=t,Rl.jsx=i,Rl.jsxs=i,Rl}var Ky;function XE(){return Ky||(Ky=1,Hd.exports=YE()),Hd.exports}var I=XE(),Ud={exports:{}},xe={};var Wy;function QE(){if(Wy)return xe;Wy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function v(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,R={};function C(O,X,T){this.props=O,this.context=X,this.refs=R,this.updater=T||S}C.prototype.isReactComponent={},C.prototype.setState=function(O,X){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,X,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function k(){}k.prototype=C.prototype;function A(O,X,T){this.props=O,this.context=X,this.refs=R,this.updater=T||S}var H=A.prototype=new k;H.constructor=A,w(H,C.prototype),H.isPureReactComponent=!0;var U=Array.isArray;function D(){}var B={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function j(O,X,T){var ue=T.ref;return{$$typeof:e,type:O,key:X,ref:ue!==void 0?ue:null,props:T}}function se(O,X){return j(O.type,X,O.props)}function Z(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function W(O){var X={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(T){return X[T]})}var Q=/\/+/g;function ie(O,X){return typeof O=="object"&&O!==null&&O.key!=null?W(""+O.key):X.toString(36)}function q(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(D,D):(O.status="pending",O.then(function(X){O.status==="pending"&&(O.status="fulfilled",O.value=X)},function(X){O.status==="pending"&&(O.status="rejected",O.reason=X)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function z(O,X,T,ue,ge){var he=typeof O;(he==="undefined"||he==="boolean")&&(O=null);var Ee=!1;if(O===null)Ee=!0;else switch(he){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(O.$$typeof){case e:case t:Ee=!0;break;case y:return Ee=O._init,z(Ee(O._payload),X,T,ue,ge)}}if(Ee)return ge=ge(O),Ee=ue===""?"."+ie(O,0):ue,U(ge)?(T="",Ee!=null&&(T=Ee.replace(Q,"$&/")+"/"),z(ge,X,T,"",function(Ve){return Ve})):ge!=null&&(Z(ge)&&(ge=se(ge,T+(ge.key==null||O&&O.key===ge.key?"":(""+ge.key).replace(Q,"$&/")+"/")+Ee)),X.push(ge)),1;Ee=0;var Re=ue===""?".":ue+":";if(U(O))for(var me=0;me<O.length;me++)ue=O[me],he=Re+ie(ue,me),Ee+=z(ue,X,T,he,ge);else if(me=v(O),typeof me=="function")for(O=me.call(O),me=0;!(ue=O.next()).done;)ue=ue.value,he=Re+ie(ue,me++),Ee+=z(ue,X,T,he,ge);else if(he==="object"){if(typeof O.then=="function")return z(q(O),X,T,ue,ge);throw X=String(O),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function $(O,X,T){if(O==null)return O;var ue=[],ge=0;return z(O,ue,"","",function(he){return X.call(T,he,ge++)}),ue}function le(O){if(O._status===-1){var X=O._result;X=X(),X.then(function(T){(O._status===0||O._status===-1)&&(O._status=1,O._result=T)},function(T){(O._status===0||O._status===-1)&&(O._status=2,O._result=T)}),O._status===-1&&(O._status=0,O._result=X)}if(O._status===1)return O._result.default;throw O._result}var fe=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},L={map:$,forEach:function(O,X,T){$(O,function(){X.apply(this,arguments)},T)},count:function(O){var X=0;return $(O,function(){X++}),X},toArray:function(O){return $(O,function(X){return X})||[]},only:function(O){if(!Z(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return xe.Activity=g,xe.Children=L,xe.Component=C,xe.Fragment=i,xe.Profiler=o,xe.PureComponent=A,xe.StrictMode=a,xe.Suspense=d,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,xe.__COMPILER_RUNTIME={__proto__:null,c:function(O){return B.H.useMemoCache(O)}},xe.cache=function(O){return function(){return O.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(O,X,T){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ue=w({},O.props),ge=O.key;if(X!=null)for(he in X.key!==void 0&&(ge=""+X.key),X)!re.call(X,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&X.ref===void 0||(ue[he]=X[he]);var he=arguments.length-2;if(he===1)ue.children=T;else if(1<he){for(var Ee=Array(he),Re=0;Re<he;Re++)Ee[Re]=arguments[Re+2];ue.children=Ee}return j(O.type,ge,ue)},xe.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},xe.createElement=function(O,X,T){var ue,ge={},he=null;if(X!=null)for(ue in X.key!==void 0&&(he=""+X.key),X)re.call(X,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(ge[ue]=X[ue]);var Ee=arguments.length-2;if(Ee===1)ge.children=T;else if(1<Ee){for(var Re=Array(Ee),me=0;me<Ee;me++)Re[me]=arguments[me+2];ge.children=Re}if(O&&O.defaultProps)for(ue in Ee=O.defaultProps,Ee)ge[ue]===void 0&&(ge[ue]=Ee[ue]);return j(O,he,ge)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(O){return{$$typeof:f,render:O}},xe.isValidElement=Z,xe.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:le}},xe.memo=function(O,X){return{$$typeof:h,type:O,compare:X===void 0?null:X}},xe.startTransition=function(O){var X=B.T,T={};B.T=T;try{var ue=O(),ge=B.S;ge!==null&&ge(T,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(D,fe)}catch(he){fe(he)}finally{X!==null&&T.types!==null&&(X.types=T.types),B.T=X}},xe.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},xe.use=function(O){return B.H.use(O)},xe.useActionState=function(O,X,T){return B.H.useActionState(O,X,T)},xe.useCallback=function(O,X){return B.H.useCallback(O,X)},xe.useContext=function(O){return B.H.useContext(O)},xe.useDebugValue=function(){},xe.useDeferredValue=function(O,X){return B.H.useDeferredValue(O,X)},xe.useEffect=function(O,X){return B.H.useEffect(O,X)},xe.useEffectEvent=function(O){return B.H.useEffectEvent(O)},xe.useId=function(){return B.H.useId()},xe.useImperativeHandle=function(O,X,T){return B.H.useImperativeHandle(O,X,T)},xe.useInsertionEffect=function(O,X){return B.H.useInsertionEffect(O,X)},xe.useLayoutEffect=function(O,X){return B.H.useLayoutEffect(O,X)},xe.useMemo=function(O,X){return B.H.useMemo(O,X)},xe.useOptimistic=function(O,X){return B.H.useOptimistic(O,X)},xe.useReducer=function(O,X,T){return B.H.useReducer(O,X,T)},xe.useRef=function(O){return B.H.useRef(O)},xe.useState=function(O){return B.H.useState(O)},xe.useSyncExternalStore=function(O,X,T){return B.H.useSyncExternalStore(O,X,T)},xe.useTransition=function(){return B.H.useTransition()},xe.version="19.2.6",xe}var Jy;function vh(){return Jy||(Jy=1,Ud.exports=QE()),Ud.exports}var te=vh(),Pd={exports:{}},Dl={},Bd={exports:{}},jd={};var e0;function ZE(){return e0||(e0=1,(function(e){function t(z,$){var le=z.length;z.push($);e:for(;0<le;){var fe=le-1>>>1,L=z[fe];if(0<o(L,$))z[fe]=$,z[le]=L,le=fe;else break e}}function i(z){return z.length===0?null:z[0]}function a(z){if(z.length===0)return null;var $=z[0],le=z.pop();if(le!==$){z[0]=le;e:for(var fe=0,L=z.length,O=L>>>1;fe<O;){var X=2*(fe+1)-1,T=z[X],ue=X+1,ge=z[ue];if(0>o(T,le))ue<L&&0>o(ge,T)?(z[fe]=ge,z[ue]=le,fe=ue):(z[fe]=T,z[X]=le,fe=X);else if(ue<L&&0>o(ge,le))z[fe]=ge,z[ue]=le,fe=ue;else break e}}return $}function o(z,$){var le=z.sortIndex-$.sortIndex;return le!==0?le:z.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 c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],y=1,g=null,b=3,v=!1,S=!1,w=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function H(z){for(var $=i(h);$!==null;){if($.callback===null)a(h);else if($.startTime<=z)a(h),$.sortIndex=$.expirationTime,t(d,$);else break;$=i(h)}}function U(z){if(w=!1,H(z),!S)if(i(d)!==null)S=!0,D||(D=!0,W());else{var $=i(h);$!==null&&q(U,$.startTime-z)}}var D=!1,B=-1,re=5,j=-1;function se(){return R?!0:!(e.unstable_now()-j<re)}function Z(){if(R=!1,D){var z=e.unstable_now();j=z;var $=!0;try{e:{S=!1,w&&(w=!1,k(B),B=-1),v=!0;var le=b;try{t:{for(H(z),g=i(d);g!==null&&!(g.expirationTime>z&&se());){var fe=g.callback;if(typeof fe=="function"){g.callback=null,b=g.priorityLevel;var L=fe(g.expirationTime<=z);if(z=e.unstable_now(),typeof L=="function"){g.callback=L,H(z),$=!0;break t}g===i(d)&&a(d),H(z)}else a(d);g=i(d)}if(g!==null)$=!0;else{var O=i(h);O!==null&&q(U,O.startTime-z),$=!1}}break e}finally{g=null,b=le,v=!1}$=void 0}}finally{$?W():D=!1}}}var W;if(typeof A=="function")W=function(){A(Z)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ie=Q.port2;Q.port1.onmessage=Z,W=function(){ie.postMessage(null)}}else W=function(){C(Z,0)};function q(z,$){B=C(function(){z(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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(z){switch(b){case 1:case 2:case 3:var $=3;break;default:$=b}var le=b;b=$;try{return z()}finally{b=le}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(z,$){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var le=b;b=z;try{return $()}finally{b=le}},e.unstable_scheduleCallback=function(z,$,le){var fe=e.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?fe+le:fe):le=fe,z){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=le+L,z={id:y++,callback:$,priorityLevel:z,startTime:le,expirationTime:L,sortIndex:-1},le>fe?(z.sortIndex=le,t(h,z),i(d)===null&&z===i(h)&&(w?(k(B),B=-1):w=!0,q(U,le-fe))):(z.sortIndex=L,t(d,z),S||v||(S=!0,D||(D=!0,W()))),z},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(z){var $=b;return function(){var le=b;b=$;try{return z.apply(this,arguments)}finally{b=le}}}})(jd)),jd}var t0;function KE(){return t0||(t0=1,Bd.exports=ZE()),Bd.exports}var Vd={exports:{}},It={};var n0;function WE(){if(n0)return It;n0=1;var e=vh();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(d,h,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:d,containerInfo:h,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return It.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,It.createPortal=function(d,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(d,h,null,y)},It.flushSync=function(d){var h=c.T,y=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=h,a.p=y,a.d.f()}},It.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(d,h))},It.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},It.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?a.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:v}):y==="script"&&a.d.X(d,{crossOrigin:g,integrity:b,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},It.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=f(h.as,h.crossOrigin);a.d.M(d,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(d)},It.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin);a.d.L(d,y,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},It.preloadModule=function(d,h){if(typeof d=="string")if(h){var y=f(h.as,h.crossOrigin);a.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(d)},It.requestFormReset=function(d){a.d.r(d)},It.unstable_batchedUpdates=function(d,h){return d(h)},It.useFormState=function(d,h,y){return c.H.useFormState(d,h,y)},It.useFormStatus=function(){return c.H.useHostTransitionStatus()},It.version="19.2.6",It}var i0;function JE(){if(i0)return Vd.exports;i0=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(),Vd.exports=WE(),Vd.exports}var r0;function ex(){if(r0)return Dl;r0=1;var e=KE(),t=vh(),i=JE();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function s(n){var r=n,l=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(l=r.return),n=r.return;while(n)}return r.tag===3?l:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(s(n)!==n)throw Error(a(188))}function h(n){var r=n.alternate;if(!r){if(r=s(n),r===null)throw Error(a(188));return r!==n?null:n}for(var l=n,u=r;;){var p=l.return;if(p===null)break;var m=p.alternate;if(m===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===l)return d(p),n;if(m===u)return d(p),r;m=m.sibling}throw Error(a(188))}if(l.return!==u.return)l=p,u=m;else{for(var _=!1,E=p.child;E;){if(E===l){_=!0,l=p,u=m;break}if(E===u){_=!0,u=p,l=m;break}E=E.sibling}if(!_){for(E=m.child;E;){if(E===l){_=!0,l=m,u=p;break}if(E===u){_=!0,u=m,l=p;break}E=E.sibling}if(!_)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),A=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function W(n){return n===null||typeof n!="object"?null:(n=Z&&n[Z]||n["@@iterator"],typeof n=="function"?n:null)}var Q=Symbol.for("react.client.reference");function ie(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Q?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case w:return"Fragment";case C:return"Profiler";case R:return"StrictMode";case U:return"Suspense";case D:return"SuspenseList";case j:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case A:return n.displayName||"Context";case k:return(n._context.displayName||"Context")+".Consumer";case H:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case B:return r=n.displayName||null,r!==null?r:ie(n.type)||"Memo";case re:r=n._payload,n=n._init;try{return ie(n(r))}catch{}}return null}var q=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},fe=[],L=-1;function O(n){return{current:n}}function X(n){0>L||(n.current=fe[L],fe[L]=null,L--)}function T(n,r){L++,fe[L]=n.current,n.current=r}var ue=O(null),ge=O(null),he=O(null),Ee=O(null);function Re(n,r){switch(T(he,r),T(ge,n),T(ue,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?vy(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=vy(r),n=_y(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}X(ue),T(ue,n)}function me(){X(ue),X(ge),X(he)}function Ve(n){n.memoizedState!==null&&T(Ee,n);var r=ue.current,l=_y(r,n.type);r!==l&&(T(ge,n),T(ue,l))}function Je(n){ge.current===n&&(X(ue),X(ge)),Ee.current===n&&(X(Ee),kl._currentValue=le)}var jt,gt;function ut(n){if(jt===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);jt=r&&r[1]||"",gt=-1<l.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+jt+n+gt}var Ln=!1;function yt(n,r){if(!n||Ln)return"";Ln=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(Y){var F=Y}Reflect.construct(n,[],ne)}else{try{ne.call()}catch(Y){F=Y}n.call(ne.prototype)}}else{try{throw Error()}catch(Y){F=Y}(ne=n())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(Y){if(Y&&F&&typeof Y.stack=="string")return[Y.stack,F.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),_=m[0],E=m[1];if(_&&E){var N=_.split(`
5
+ `),G=E.split(`
6
+ `);for(p=u=0;u<N.length&&!N[u].includes("DetermineComponentFrameRoot");)u++;for(;p<G.length&&!G[p].includes("DetermineComponentFrameRoot");)p++;if(u===N.length||p===G.length)for(u=N.length-1,p=G.length-1;1<=u&&0<=p&&N[u]!==G[p];)p--;for(;1<=u&&0<=p;u--,p--)if(N[u]!==G[p]){if(u!==1||p!==1)do if(u--,p--,0>p||N[u]!==G[p]){var K=`
7
+ `+N[u].replace(" at new "," at ");return n.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",n.displayName)),K}while(1<=u&&0<=p);break}}}finally{Ln=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?ut(l):""}function Ar(n,r){switch(n.tag){case 26:case 27:case 5:return ut(n.type);case 16:return ut("Lazy");case 13:return n.child!==r&&r!==null?ut("Suspense Fallback"):ut("Suspense");case 19:return ut("SuspenseList");case 0:case 15:return yt(n.type,!1);case 11:return yt(n.type.render,!1);case 1:return yt(n.type,!0);case 31:return ut("Activity");default:return""}}function Tr(n){try{var r="",l=null;do r+=Ar(n,l),l=n,n=n.return;while(n);return r}catch(u){return`
8
+ Error generating stack: `+u.message+`
9
+ `+u.stack}}var Ei=Object.prototype.hasOwnProperty,xi=e.unstable_scheduleCallback,tr=e.unstable_cancelCallback,Pa=e.unstable_shouldYield,Ba=e.unstable_requestPaint,xt=e.unstable_now,Zn=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,ve=e.unstable_NormalPriority,De=e.unstable_LowPriority,He=e.unstable_IdlePriority,Pt=e.log,fn=e.unstable_setDisableYieldValue,Ct=null,at=null;function Lt(n){if(typeof Pt=="function"&&fn(n),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(Ct,n)}catch{}}var Ge=Math.clz32?Math.clz32:wu,Hn=Math.log,en=Math.LN2;function wu(n){return n>>>=0,n===0?32:31-(Hn(n)/en|0)|0}var Kn=256,Lr=262144,Rr=4194304;function Wn(n){var r=n&42;if(r!==0)return r;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Dr(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var p=0,m=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var E=u&134217727;return E!==0?(u=E&~m,u!==0?p=Wn(u):(_&=E,_!==0?p=Wn(_):l||(l=E&~n,l!==0&&(p=Wn(l))))):(E=u&~m,E!==0?p=Wn(E):_!==0?p=Wn(_):l||(l=u&~n,l!==0&&(p=Wn(l)))),p===0?0:r!==0&&r!==p&&(r&m)===0&&(m=p&-p,l=r&-r,m>=l||m===32&&(l&4194048)!==0)?r:p}function ae(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function be(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 ke(){var n=Rr;return Rr<<=1,(Rr&62914560)===0&&(Rr=4194304),n}function Qe(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function Vt(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ci(n,r,l,u,p,m){var _=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var E=n.entanglements,N=n.expirationTimes,G=n.hiddenUpdates;for(l=_&~l;0<l;){var K=31-Ge(l),ne=1<<K;E[K]=0,N[K]=-1;var F=G[K];if(F!==null)for(G[K]=null,K=0;K<F.length;K++){var Y=F[K];Y!==null&&(Y.lane&=-536870913)}l&=~ne}u!==0&&tp(n,u,0),m!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=m&~(_&~r))}function tp(n,r,l){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-Ge(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function np(n,r){var l=n.entangledLanes|=r;for(n=n.entanglements;l;){var u=31-Ge(l),p=1<<u;p&r|n[u]&r&&(n[u]|=r),l&=~p}}function ip(n,r){var l=r&-r;return l=(l&42)!==0?1:ku(l),(l&(n.suspendedLanes|r))!==0?0:l}function ku(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Au(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function rp(){var n=$.p;return n!==0?n:(n=window.event,n===void 0?32:Gy(n.type))}function ap(n,r){var l=$.p;try{return $.p=n,r()}finally{$.p=l}}var wi=Math.random().toString(36).slice(2),Rt="__reactFiber$"+wi,Gt="__reactProps$"+wi,Nr="__reactContainer$"+wi,Tu="__reactEvents$"+wi,z_="__reactListeners$"+wi,H_="__reactHandles$"+wi,lp="__reactResources$"+wi,ja="__reactMarker$"+wi;function Lu(n){delete n[Rt],delete n[Gt],delete n[Tu],delete n[z_],delete n[H_]}function Or(n){var r=n[Rt];if(r)return r;for(var l=n.parentNode;l;){if(r=l[Nr]||l[Rt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(n=Ay(n);n!==null;){if(l=n[Rt])return l;n=Ay(n)}return r}n=l,l=n.parentNode}return null}function Mr(n){if(n=n[Rt]||n[Nr]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Va(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function Ir(n){var r=n[lp];return r||(r=n[lp]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function wt(n){n[ja]=!0}var op=new Set,sp={};function nr(n,r){zr(n,r),zr(n+"Capture",r)}function zr(n,r){for(sp[n]=r,n=0;n<r.length;n++)op.add(r[n])}var U_=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]*$"),up={},cp={};function P_(n){return Ei.call(cp,n)?!0:Ei.call(up,n)?!1:U_.test(n)?cp[n]=!0:(up[n]=!0,!1)}function uo(n,r,l){if(P_(r))if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+l)}}function co(n,r,l){if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+l)}}function Jn(n,r,l,u){if(u===null)n.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(r,l,""+u)}}function hn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function dp(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function B_(n,r,l){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,m=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return p.call(this)},set:function(_){l=""+_,m.call(this,_)}}),Object.defineProperty(n,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Ru(n){if(!n._valueTracker){var r=dp(n)?"checked":"value";n._valueTracker=B_(n,r,""+n[r])}}function fp(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return n&&(u=dp(n)?n.checked?"true":"false":n.value),n=u,n!==l?(r.setValue(n),!0):!1}function fo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var j_=/[\n"\\]/g;function pn(n){return n.replace(j_,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Du(n,r,l,u,p,m,_,E){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),r!=null?_==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+hn(r)):n.value!==""+hn(r)&&(n.value=""+hn(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?Nu(n,_,hn(r)):l!=null?Nu(n,_,hn(l)):u!=null&&n.removeAttribute("value"),p==null&&m!=null&&(n.defaultChecked=!!m),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+hn(E):n.removeAttribute("name")}function hp(n,r,l,u,p,m,_,E){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),r!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){Ru(n);return}l=l!=null?""+hn(l):"",r=r!=null?""+hn(r):l,E||r===n.value||(n.value=r),n.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=E?n.checked:!!u,n.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),Ru(n)}function Nu(n,r,l){r==="number"&&fo(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function Hr(n,r,l,u){if(n=n.options,r){r={};for(var p=0;p<l.length;p++)r["$"+l[p]]=!0;for(l=0;l<n.length;l++)p=r.hasOwnProperty("$"+n[l].value),n[l].selected!==p&&(n[l].selected=p),p&&u&&(n[l].defaultSelected=!0)}else{for(l=""+hn(l),r=null,p=0;p<n.length;p++){if(n[p].value===l){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}r!==null||n[p].disabled||(r=n[p])}r!==null&&(r.selected=!0)}}function pp(n,r,l){if(r!=null&&(r=""+hn(r),r!==n.value&&(n.value=r),l==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=l!=null?""+hn(l):""}function mp(n,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(q(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=hn(r),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),Ru(n)}function Ur(n,r){if(r){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=r;return}}n.textContent=r}var V_=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 gp(n,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":u?n.setProperty(r,l):typeof l!="number"||l===0||V_.has(r)?r==="float"?n.cssFloat=l:n[r]=(""+l).trim():n[r]=l+"px"}function yp(n,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in r)u=r[p],r.hasOwnProperty(p)&&l[p]!==u&&gp(n,p,u)}else for(var m in r)r.hasOwnProperty(m)&&gp(n,m,r[m])}function Ou(n){if(n.indexOf("-")===-1)return!1;switch(n){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 G_=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"]]),$_=/^[\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 ho(n){return $_.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ei(){}var Mu=null;function Iu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Pr=null,Br=null;function bp(n){var r=Mr(n);if(r&&(n=r.stateNode)){var l=n[Gt]||null;e:switch(n=r.stateNode,r.type){case"input":if(Du(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+pn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==n&&u.form===n.form){var p=u[Gt]||null;if(!p)throw Error(a(90));Du(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===n.form&&fp(u)}break e;case"textarea":pp(n,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Hr(n,!!l.multiple,r,!1)}}}var zu=!1;function vp(n,r,l){if(zu)return n(r,l);zu=!0;try{var u=n(r);return u}finally{if(zu=!1,(Pr!==null||Br!==null)&&(es(),Pr&&(r=Pr,n=Br,Br=Pr=null,bp(r),n)))for(r=0;r<n.length;r++)bp(n[r])}}function Ga(n,r){var l=n.stateNode;if(l===null)return null;var u=l[Gt]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var ti=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hu=!1;if(ti)try{var $a={};Object.defineProperty($a,"passive",{get:function(){Hu=!0}}),window.addEventListener("test",$a,$a),window.removeEventListener("test",$a,$a)}catch{Hu=!1}var ki=null,Uu=null,po=null;function _p(){if(po)return po;var n,r=Uu,l=r.length,u,p="value"in ki?ki.value:ki.textContent,m=p.length;for(n=0;n<l&&r[n]===p[n];n++);var _=l-n;for(u=1;u<=_&&r[l-u]===p[m-u];u++);return po=p.slice(n,1<u?1-u:void 0)}function mo(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function go(){return!0}function Sp(){return!1}function $t(n){function r(l,u,p,m,_){this._reactName=l,this._targetInst=p,this.type=u,this.nativeEvent=m,this.target=_,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(l=n[E],this[E]=l?l(m):m[E]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?go:Sp,this.isPropagationStopped=Sp,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=go)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=go)},persist:function(){},isPersistent:go}),r}var ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yo=$t(ir),Fa=g({},ir,{view:0,detail:0}),F_=$t(Fa),Pu,Bu,qa,bo=g({},Fa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==qa&&(qa&&n.type==="mousemove"?(Pu=n.screenX-qa.screenX,Bu=n.screenY-qa.screenY):Bu=Pu=0,qa=n),Pu)},movementY:function(n){return"movementY"in n?n.movementY:Bu}}),Ep=$t(bo),q_=g({},bo,{dataTransfer:0}),Y_=$t(q_),X_=g({},Fa,{relatedTarget:0}),ju=$t(X_),Q_=g({},ir,{animationName:0,elapsedTime:0,pseudoElement:0}),Z_=$t(Q_),K_=g({},ir,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),W_=$t(K_),J_=g({},ir,{data:0}),xp=$t(J_),eS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tS={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"},nS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iS(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=nS[n])?!!r[n]:!1}function Vu(){return iS}var rS=g({},Fa,{key:function(n){if(n.key){var r=eS[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=mo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?tS[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vu,charCode:function(n){return n.type==="keypress"?mo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?mo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),aS=$t(rS),lS=g({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cp=$t(lS),oS=g({},Fa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vu}),sS=$t(oS),uS=g({},ir,{propertyName:0,elapsedTime:0,pseudoElement:0}),cS=$t(uS),dS=g({},bo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),fS=$t(dS),hS=g({},ir,{newState:0,oldState:0}),pS=$t(hS),mS=[9,13,27,32],Gu=ti&&"CompositionEvent"in window,Ya=null;ti&&"documentMode"in document&&(Ya=document.documentMode);var gS=ti&&"TextEvent"in window&&!Ya,wp=ti&&(!Gu||Ya&&8<Ya&&11>=Ya),kp=" ",Ap=!1;function Tp(n,r){switch(n){case"keyup":return mS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var jr=!1;function yS(n,r){switch(n){case"compositionend":return Lp(r);case"keypress":return r.which!==32?null:(Ap=!0,kp);case"textInput":return n=r.data,n===kp&&Ap?null:n;default:return null}}function bS(n,r){if(jr)return n==="compositionend"||!Gu&&Tp(n,r)?(n=_p(),po=Uu=ki=null,jr=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return wp&&r.locale!=="ko"?null:r.data;default:return null}}var vS={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 Rp(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!vS[n.type]:r==="textarea"}function Dp(n,r,l,u){Pr?Br?Br.push(u):Br=[u]:Pr=u,r=os(r,"onChange"),0<r.length&&(l=new yo("onChange","change",null,l,u),n.push({event:l,listeners:r}))}var Xa=null,Qa=null;function _S(n){hy(n,0)}function vo(n){var r=Va(n);if(fp(r))return n}function Np(n,r){if(n==="change")return r}var Op=!1;if(ti){var $u;if(ti){var Fu="oninput"in document;if(!Fu){var Mp=document.createElement("div");Mp.setAttribute("oninput","return;"),Fu=typeof Mp.oninput=="function"}$u=Fu}else $u=!1;Op=$u&&(!document.documentMode||9<document.documentMode)}function Ip(){Xa&&(Xa.detachEvent("onpropertychange",zp),Qa=Xa=null)}function zp(n){if(n.propertyName==="value"&&vo(Qa)){var r=[];Dp(r,Qa,n,Iu(n)),vp(_S,r)}}function SS(n,r,l){n==="focusin"?(Ip(),Xa=r,Qa=l,Xa.attachEvent("onpropertychange",zp)):n==="focusout"&&Ip()}function ES(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return vo(Qa)}function xS(n,r){if(n==="click")return vo(r)}function CS(n,r){if(n==="input"||n==="change")return vo(r)}function wS(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var tn=typeof Object.is=="function"?Object.is:wS;function Za(n,r){if(tn(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var l=Object.keys(n),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var p=l[u];if(!Ei.call(r,p)||!tn(n[p],r[p]))return!1}return!0}function Hp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Up(n,r){var l=Hp(n);n=0;for(var u;l;){if(l.nodeType===3){if(u=n+l.textContent.length,n<=r&&u>=r)return{node:l,offset:r-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Hp(l)}}function Pp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Pp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Bp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=fo(n.document);r instanceof n.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)n=r.contentWindow;else break;r=fo(n.document)}return r}function qu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var kS=ti&&"documentMode"in document&&11>=document.documentMode,Vr=null,Yu=null,Ka=null,Xu=!1;function jp(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Xu||Vr==null||Vr!==fo(u)||(u=Vr,"selectionStart"in u&&qu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ka&&Za(Ka,u)||(Ka=u,u=os(Yu,"onSelect"),0<u.length&&(r=new yo("onSelect","select",null,r,l),n.push({event:r,listeners:u}),r.target=Vr)))}function rr(n,r){var l={};return l[n.toLowerCase()]=r.toLowerCase(),l["Webkit"+n]="webkit"+r,l["Moz"+n]="moz"+r,l}var Gr={animationend:rr("Animation","AnimationEnd"),animationiteration:rr("Animation","AnimationIteration"),animationstart:rr("Animation","AnimationStart"),transitionrun:rr("Transition","TransitionRun"),transitionstart:rr("Transition","TransitionStart"),transitioncancel:rr("Transition","TransitionCancel"),transitionend:rr("Transition","TransitionEnd")},Qu={},Vp={};ti&&(Vp=document.createElement("div").style,"AnimationEvent"in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),"TransitionEvent"in window||delete Gr.transitionend.transition);function ar(n){if(Qu[n])return Qu[n];if(!Gr[n])return n;var r=Gr[n],l;for(l in r)if(r.hasOwnProperty(l)&&l in Vp)return Qu[n]=r[l];return n}var Gp=ar("animationend"),$p=ar("animationiteration"),Fp=ar("animationstart"),AS=ar("transitionrun"),TS=ar("transitionstart"),LS=ar("transitioncancel"),qp=ar("transitionend"),Yp=new Map,Zu="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(" ");Zu.push("scrollEnd");function Rn(n,r){Yp.set(n,r),nr(r,[n])}var _o=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},mn=[],$r=0,Ku=0;function So(){for(var n=$r,r=Ku=$r=0;r<n;){var l=mn[r];mn[r++]=null;var u=mn[r];mn[r++]=null;var p=mn[r];mn[r++]=null;var m=mn[r];if(mn[r++]=null,u!==null&&p!==null){var _=u.pending;_===null?p.next=p:(p.next=_.next,_.next=p),u.pending=p}m!==0&&Xp(l,p,m)}}function Eo(n,r,l,u){mn[$r++]=n,mn[$r++]=r,mn[$r++]=l,mn[$r++]=u,Ku|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Wu(n,r,l,u){return Eo(n,r,l,u),xo(n)}function lr(n,r){return Eo(n,null,null,r),xo(n)}function Xp(n,r,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var p=!1,m=n.return;m!==null;)m.childLanes|=l,u=m.alternate,u!==null&&(u.childLanes|=l),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(p=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,p&&r!==null&&(p=31-Ge(l),n=m.hiddenUpdates,u=n[p],u===null?n[p]=[r]:u.push(r),r.lane=l|536870912),m):null}function xo(n){if(50<vl)throw vl=0,od=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Fr={};function RS(n,r,l,u){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(n,r,l,u){return new RS(n,r,l,u)}function Ju(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ni(n,r){var l=n.alternate;return l===null?(l=nn(n.tag,r,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=r,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,r=n.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function Qp(n,r){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,r=l.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Co(n,r,l,u,p,m){var _=0;if(u=n,typeof n=="function")Ju(n)&&(_=1);else if(typeof n=="string")_=IE(n,l,ue.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case j:return n=nn(31,l,r,p),n.elementType=j,n.lanes=m,n;case w:return or(l.children,p,m,r);case R:_=8,p|=24;break;case C:return n=nn(12,l,r,p|2),n.elementType=C,n.lanes=m,n;case U:return n=nn(13,l,r,p),n.elementType=U,n.lanes=m,n;case D:return n=nn(19,l,r,p),n.elementType=D,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:_=10;break e;case k:_=9;break e;case H:_=11;break e;case B:_=14;break e;case re:_=16,u=null;break e}_=29,l=Error(a(130,n===null?"null":typeof n,"")),u=null}return r=nn(_,l,r,p),r.elementType=n,r.type=u,r.lanes=m,r}function or(n,r,l,u){return n=nn(7,n,u,r),n.lanes=l,n}function ec(n,r,l){return n=nn(6,n,null,r),n.lanes=l,n}function Zp(n){var r=nn(18,null,null,0);return r.stateNode=n,r}function tc(n,r,l){return r=nn(4,n.children!==null?n.children:[],n.key,r),r.lanes=l,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Kp=new WeakMap;function gn(n,r){if(typeof n=="object"&&n!==null){var l=Kp.get(n);return l!==void 0?l:(r={value:n,source:r,stack:Tr(r)},Kp.set(n,r),r)}return{value:n,source:r,stack:Tr(r)}}var qr=[],Yr=0,wo=null,Wa=0,yn=[],bn=0,Ai=null,Un=1,Pn="";function ii(n,r){qr[Yr++]=Wa,qr[Yr++]=wo,wo=n,Wa=r}function Wp(n,r,l){yn[bn++]=Un,yn[bn++]=Pn,yn[bn++]=Ai,Ai=n;var u=Un;n=Pn;var p=32-Ge(u)-1;u&=~(1<<p),l+=1;var m=32-Ge(r)+p;if(30<m){var _=p-p%5;m=(u&(1<<_)-1).toString(32),u>>=_,p-=_,Un=1<<32-Ge(r)+p|l<<p|u,Pn=m+n}else Un=1<<m|l<<p|u,Pn=n}function nc(n){n.return!==null&&(ii(n,1),Wp(n,1,0))}function ic(n){for(;n===wo;)wo=qr[--Yr],qr[Yr]=null,Wa=qr[--Yr],qr[Yr]=null;for(;n===Ai;)Ai=yn[--bn],yn[bn]=null,Pn=yn[--bn],yn[bn]=null,Un=yn[--bn],yn[bn]=null}function Jp(n,r){yn[bn++]=Un,yn[bn++]=Pn,yn[bn++]=Ai,Un=r.id,Pn=r.overflow,Ai=n}var Dt=null,et=null,ze=!1,Ti=null,vn=!1,rc=Error(a(519));function Li(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ja(gn(r,n)),rc}function em(n){var r=n.stateNode,l=n.type,u=n.memoizedProps;switch(r[Rt]=n,r[Gt]=u,l){case"dialog":Oe("cancel",r),Oe("close",r);break;case"iframe":case"object":case"embed":Oe("load",r);break;case"video":case"audio":for(l=0;l<Sl.length;l++)Oe(Sl[l],r);break;case"source":Oe("error",r);break;case"img":case"image":case"link":Oe("error",r),Oe("load",r);break;case"details":Oe("toggle",r);break;case"input":Oe("invalid",r),hp(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Oe("invalid",r);break;case"textarea":Oe("invalid",r),mp(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||yy(r.textContent,l)?(u.popover!=null&&(Oe("beforetoggle",r),Oe("toggle",r)),u.onScroll!=null&&Oe("scroll",r),u.onScrollEnd!=null&&Oe("scrollend",r),u.onClick!=null&&(r.onclick=ei),r=!0):r=!1,r||Li(n,!0)}function tm(n){for(Dt=n.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:Dt=Dt.return}}function Xr(n){if(n!==Dt)return!1;if(!ze)return tm(n),ze=!0,!1;var r=n.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||Ed(n.type,n.memoizedProps)),l=!l),l&&et&&Li(n),tm(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));et=ky(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));et=ky(n)}else r===27?(r=et,Gi(n.type)?(n=Ad,Ad=null,et=n):et=r):et=Dt?Sn(n.stateNode.nextSibling):null;return!0}function sr(){et=Dt=null,ze=!1}function ac(){var n=Ti;return n!==null&&(Xt===null?Xt=n:Xt.push.apply(Xt,n),Ti=null),n}function Ja(n){Ti===null?Ti=[n]:Ti.push(n)}var lc=O(null),ur=null,ri=null;function Ri(n,r,l){T(lc,r._currentValue),r._currentValue=l}function ai(n){n._currentValue=lc.current,X(lc)}function oc(n,r,l){for(;n!==null;){var u=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),n===l)break;n=n.return}}function sc(n,r,l,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var m=p.dependencies;if(m!==null){var _=p.child;m=m.firstContext;e:for(;m!==null;){var E=m;m=p;for(var N=0;N<r.length;N++)if(E.context===r[N]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),oc(m.return,l,n),u||(_=null);break e}m=E.next}}else if(p.tag===18){if(_=p.return,_===null)throw Error(a(341));_.lanes|=l,m=_.alternate,m!==null&&(m.lanes|=l),oc(_,l,n),_=null}else _=p.child;if(_!==null)_.return=p;else for(_=p;_!==null;){if(_===n){_=null;break}if(p=_.sibling,p!==null){p.return=_.return,_=p;break}_=_.return}p=_}}function Qr(n,r,l,u){n=null;for(var p=r,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var _=p.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var E=p.type;tn(p.pendingProps.value,_.value)||(n!==null?n.push(E):n=[E])}}else if(p===Ee.current){if(_=p.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(kl):n=[kl])}p=p.return}n!==null&&sc(r,n,l,u),r.flags|=262144}function ko(n){for(n=n.firstContext;n!==null;){if(!tn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function cr(n){ur=n,ri=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Nt(n){return nm(ur,n)}function Ao(n,r){return ur===null&&cr(n),nm(n,r)}function nm(n,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},ri===null){if(n===null)throw Error(a(308));ri=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else ri=ri.next=r;return l}var DS=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(l,u){n.push(u)}};this.abort=function(){r.aborted=!0,n.forEach(function(l){return l()})}},NS=e.unstable_scheduleCallback,OS=e.unstable_NormalPriority,ct={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uc(){return{controller:new DS,data:new Map,refCount:0}}function el(n){n.refCount--,n.refCount===0&&NS(OS,function(){n.controller.abort()})}var tl=null,cc=0,Zr=0,Kr=null;function MS(n,r){if(tl===null){var l=tl=[];cc=0,Zr=hd(),Kr={status:"pending",value:void 0,then:function(u){l.push(u)}}}return cc++,r.then(im,im),r}function im(){if(--cc===0&&tl!==null){Kr!==null&&(Kr.status="fulfilled");var n=tl;tl=null,Zr=0,Kr=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function IS(n,r){var l=[],u={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return n.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<l.length;p++)(0,l[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),u}var rm=z.S;z.S=function(n,r){jg=xt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&MS(n,r),rm!==null&&rm(n,r)};var dr=O(null);function dc(){var n=dr.current;return n!==null?n:Ze.pooledCache}function To(n,r){r===null?T(dr,dr.current):T(dr,r.pool)}function am(){var n=dc();return n===null?null:{parent:ct._currentValue,pool:n}}var Wr=Error(a(460)),fc=Error(a(474)),Lo=Error(a(542)),Ro={then:function(){}};function lm(n){return n=n.status,n==="fulfilled"||n==="rejected"}function om(n,r,l){switch(l=n[l],l===void 0?n.push(r):l!==r&&(r.then(ei,ei),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,um(n),n;default:if(typeof r.status=="string")r.then(ei,ei);else{if(n=Ze,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,um(n),n}throw hr=r,Wr}}function fr(n){try{var r=n._init;return r(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(hr=l,Wr):l}}var hr=null;function sm(){if(hr===null)throw Error(a(459));var n=hr;return hr=null,n}function um(n){if(n===Wr||n===Lo)throw Error(a(483))}var Jr=null,nl=0;function Do(n){var r=nl;return nl+=1,Jr===null&&(Jr=[]),om(Jr,n,r)}function il(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function No(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function cm(n){function r(P,M){if(n){var V=P.deletions;V===null?(P.deletions=[M],P.flags|=16):V.push(M)}}function l(P,M){if(!n)return null;for(;M!==null;)r(P,M),M=M.sibling;return null}function u(P){for(var M=new Map;P!==null;)P.key!==null?M.set(P.key,P):M.set(P.index,P),P=P.sibling;return M}function p(P,M){return P=ni(P,M),P.index=0,P.sibling=null,P}function m(P,M,V){return P.index=V,n?(V=P.alternate,V!==null?(V=V.index,V<M?(P.flags|=67108866,M):V):(P.flags|=67108866,M)):(P.flags|=1048576,M)}function _(P){return n&&P.alternate===null&&(P.flags|=67108866),P}function E(P,M,V,ee){return M===null||M.tag!==6?(M=ec(V,P.mode,ee),M.return=P,M):(M=p(M,V),M.return=P,M)}function N(P,M,V,ee){var ye=V.type;return ye===w?K(P,M,V.props.children,ee,V.key):M!==null&&(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===re&&fr(ye)===M.type)?(M=p(M,V.props),il(M,V),M.return=P,M):(M=Co(V.type,V.key,V.props,null,P.mode,ee),il(M,V),M.return=P,M)}function G(P,M,V,ee){return M===null||M.tag!==4||M.stateNode.containerInfo!==V.containerInfo||M.stateNode.implementation!==V.implementation?(M=tc(V,P.mode,ee),M.return=P,M):(M=p(M,V.children||[]),M.return=P,M)}function K(P,M,V,ee,ye){return M===null||M.tag!==7?(M=or(V,P.mode,ee,ye),M.return=P,M):(M=p(M,V),M.return=P,M)}function ne(P,M,V){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=ec(""+M,P.mode,V),M.return=P,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case v:return V=Co(M.type,M.key,M.props,null,P.mode,V),il(V,M),V.return=P,V;case S:return M=tc(M,P.mode,V),M.return=P,M;case re:return M=fr(M),ne(P,M,V)}if(q(M)||W(M))return M=or(M,P.mode,V,null),M.return=P,M;if(typeof M.then=="function")return ne(P,Do(M),V);if(M.$$typeof===A)return ne(P,Ao(P,M),V);No(P,M)}return null}function F(P,M,V,ee){var ye=M!==null?M.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return ye!==null?null:E(P,M,""+V,ee);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return V.key===ye?N(P,M,V,ee):null;case S:return V.key===ye?G(P,M,V,ee):null;case re:return V=fr(V),F(P,M,V,ee)}if(q(V)||W(V))return ye!==null?null:K(P,M,V,ee,null);if(typeof V.then=="function")return F(P,M,Do(V),ee);if(V.$$typeof===A)return F(P,M,Ao(P,V),ee);No(P,V)}return null}function Y(P,M,V,ee,ye){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return P=P.get(V)||null,E(M,P,""+ee,ye);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case v:return P=P.get(ee.key===null?V:ee.key)||null,N(M,P,ee,ye);case S:return P=P.get(ee.key===null?V:ee.key)||null,G(M,P,ee,ye);case re:return ee=fr(ee),Y(P,M,V,ee,ye)}if(q(ee)||W(ee))return P=P.get(V)||null,K(M,P,ee,ye,null);if(typeof ee.then=="function")return Y(P,M,V,Do(ee),ye);if(ee.$$typeof===A)return Y(P,M,V,Ao(M,ee),ye);No(M,ee)}return null}function de(P,M,V,ee){for(var ye=null,Ue=null,pe=M,Ae=M=0,Ie=null;pe!==null&&Ae<V.length;Ae++){pe.index>Ae?(Ie=pe,pe=null):Ie=pe.sibling;var Pe=F(P,pe,V[Ae],ee);if(Pe===null){pe===null&&(pe=Ie);break}n&&pe&&Pe.alternate===null&&r(P,pe),M=m(Pe,M,Ae),Ue===null?ye=Pe:Ue.sibling=Pe,Ue=Pe,pe=Ie}if(Ae===V.length)return l(P,pe),ze&&ii(P,Ae),ye;if(pe===null){for(;Ae<V.length;Ae++)pe=ne(P,V[Ae],ee),pe!==null&&(M=m(pe,M,Ae),Ue===null?ye=pe:Ue.sibling=pe,Ue=pe);return ze&&ii(P,Ae),ye}for(pe=u(pe);Ae<V.length;Ae++)Ie=Y(pe,P,Ae,V[Ae],ee),Ie!==null&&(n&&Ie.alternate!==null&&pe.delete(Ie.key===null?Ae:Ie.key),M=m(Ie,M,Ae),Ue===null?ye=Ie:Ue.sibling=Ie,Ue=Ie);return n&&pe.forEach(function(Xi){return r(P,Xi)}),ze&&ii(P,Ae),ye}function _e(P,M,V,ee){if(V==null)throw Error(a(151));for(var ye=null,Ue=null,pe=M,Ae=M=0,Ie=null,Pe=V.next();pe!==null&&!Pe.done;Ae++,Pe=V.next()){pe.index>Ae?(Ie=pe,pe=null):Ie=pe.sibling;var Xi=F(P,pe,Pe.value,ee);if(Xi===null){pe===null&&(pe=Ie);break}n&&pe&&Xi.alternate===null&&r(P,pe),M=m(Xi,M,Ae),Ue===null?ye=Xi:Ue.sibling=Xi,Ue=Xi,pe=Ie}if(Pe.done)return l(P,pe),ze&&ii(P,Ae),ye;if(pe===null){for(;!Pe.done;Ae++,Pe=V.next())Pe=ne(P,Pe.value,ee),Pe!==null&&(M=m(Pe,M,Ae),Ue===null?ye=Pe:Ue.sibling=Pe,Ue=Pe);return ze&&ii(P,Ae),ye}for(pe=u(pe);!Pe.done;Ae++,Pe=V.next())Pe=Y(pe,P,Ae,Pe.value,ee),Pe!==null&&(n&&Pe.alternate!==null&&pe.delete(Pe.key===null?Ae:Pe.key),M=m(Pe,M,Ae),Ue===null?ye=Pe:Ue.sibling=Pe,Ue=Pe);return n&&pe.forEach(function(qE){return r(P,qE)}),ze&&ii(P,Ae),ye}function Xe(P,M,V,ee){if(typeof V=="object"&&V!==null&&V.type===w&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case v:e:{for(var ye=V.key;M!==null;){if(M.key===ye){if(ye=V.type,ye===w){if(M.tag===7){l(P,M.sibling),ee=p(M,V.props.children),ee.return=P,P=ee;break e}}else if(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===re&&fr(ye)===M.type){l(P,M.sibling),ee=p(M,V.props),il(ee,V),ee.return=P,P=ee;break e}l(P,M);break}else r(P,M);M=M.sibling}V.type===w?(ee=or(V.props.children,P.mode,ee,V.key),ee.return=P,P=ee):(ee=Co(V.type,V.key,V.props,null,P.mode,ee),il(ee,V),ee.return=P,P=ee)}return _(P);case S:e:{for(ye=V.key;M!==null;){if(M.key===ye)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){l(P,M.sibling),ee=p(M,V.children||[]),ee.return=P,P=ee;break e}else{l(P,M);break}else r(P,M);M=M.sibling}ee=tc(V,P.mode,ee),ee.return=P,P=ee}return _(P);case re:return V=fr(V),Xe(P,M,V,ee)}if(q(V))return de(P,M,V,ee);if(W(V)){if(ye=W(V),typeof ye!="function")throw Error(a(150));return V=ye.call(V),_e(P,M,V,ee)}if(typeof V.then=="function")return Xe(P,M,Do(V),ee);if(V.$$typeof===A)return Xe(P,M,Ao(P,V),ee);No(P,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,M!==null&&M.tag===6?(l(P,M.sibling),ee=p(M,V),ee.return=P,P=ee):(l(P,M),ee=ec(V,P.mode,ee),ee.return=P,P=ee),_(P)):l(P,M)}return function(P,M,V,ee){try{nl=0;var ye=Xe(P,M,V,ee);return Jr=null,ye}catch(pe){if(pe===Wr||pe===Lo)throw pe;var Ue=nn(29,pe,null,P.mode);return Ue.lanes=ee,Ue.return=P,Ue}}}var pr=cm(!0),dm=cm(!1),Di=!1;function hc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pc(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ni(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Oi(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Be&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=xo(n),Xp(n,null,l),r}return Eo(n,u,r,l),xo(n)}function rl(n,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,np(n,l)}}function mc(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var _={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?p=m=_:m=m.next=_,l=l.next}while(l!==null);m===null?p=m=r:m=m.next=r}else p=m=r;l={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=r:n.next=r,l.lastBaseUpdate=r}var gc=!1;function al(){if(gc){var n=Kr;if(n!==null)throw n}}function ll(n,r,l,u){gc=!1;var p=n.updateQueue;Di=!1;var m=p.firstBaseUpdate,_=p.lastBaseUpdate,E=p.shared.pending;if(E!==null){p.shared.pending=null;var N=E,G=N.next;N.next=null,_===null?m=G:_.next=G,_=N;var K=n.alternate;K!==null&&(K=K.updateQueue,E=K.lastBaseUpdate,E!==_&&(E===null?K.firstBaseUpdate=G:E.next=G,K.lastBaseUpdate=N))}if(m!==null){var ne=p.baseState;_=0,K=G=N=null,E=m;do{var F=E.lane&-536870913,Y=F!==E.lane;if(Y?(Me&F)===F:(u&F)===F){F!==0&&F===Zr&&(gc=!0),K!==null&&(K=K.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var de=n,_e=E;F=r;var Xe=l;switch(_e.tag){case 1:if(de=_e.payload,typeof de=="function"){ne=de.call(Xe,ne,F);break e}ne=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=_e.payload,F=typeof de=="function"?de.call(Xe,ne,F):de,F==null)break e;ne=g({},ne,F);break e;case 2:Di=!0}}F=E.callback,F!==null&&(n.flags|=64,Y&&(n.flags|=8192),Y=p.callbacks,Y===null?p.callbacks=[F]:Y.push(F))}else Y={lane:F,tag:E.tag,payload:E.payload,callback:E.callback,next:null},K===null?(G=K=Y,N=ne):K=K.next=Y,_|=F;if(E=E.next,E===null){if(E=p.shared.pending,E===null)break;Y=E,E=Y.next,Y.next=null,p.lastBaseUpdate=Y,p.shared.pending=null}}while(!0);K===null&&(N=ne),p.baseState=N,p.firstBaseUpdate=G,p.lastBaseUpdate=K,m===null&&(p.shared.lanes=0),Ui|=_,n.lanes=_,n.memoizedState=ne}}function fm(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function hm(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)fm(l[n],r)}var ea=O(null),Oo=O(0);function pm(n,r){n=pi,T(Oo,n),T(ea,r),pi=n|r.baseLanes}function yc(){T(Oo,pi),T(ea,ea.current)}function bc(){pi=Oo.current,X(ea),X(Oo)}var rn=O(null),_n=null;function Mi(n){var r=n.alternate;T(lt,lt.current&1),T(rn,n),_n===null&&(r===null||ea.current!==null||r.memoizedState!==null)&&(_n=n)}function vc(n){T(lt,lt.current),T(rn,n),_n===null&&(_n=n)}function mm(n){n.tag===22?(T(lt,lt.current),T(rn,n),_n===null&&(_n=n)):Ii()}function Ii(){T(lt,lt.current),T(rn,rn.current)}function an(n){X(rn),_n===n&&(_n=null),X(lt)}var lt=O(0);function Mo(n){for(var r=n;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||wd(l)||kd(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var li=0,we=null,qe=null,dt=null,Io=!1,ta=!1,mr=!1,zo=0,ol=0,na=null,zS=0;function it(){throw Error(a(321))}function _c(n,r){if(r===null)return!1;for(var l=0;l<r.length&&l<n.length;l++)if(!tn(n[l],r[l]))return!1;return!0}function Sc(n,r,l,u,p,m){return li=m,we=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,z.H=n===null||n.memoizedState===null?Wm:zc,mr=!1,m=l(u,p),mr=!1,ta&&(m=ym(r,l,u,p)),gm(n),m}function gm(n){z.H=cl;var r=qe!==null&&qe.next!==null;if(li=0,dt=qe=we=null,Io=!1,ol=0,na=null,r)throw Error(a(300));n===null||ft||(n=n.dependencies,n!==null&&ko(n)&&(ft=!0))}function ym(n,r,l,u){we=n;var p=0;do{if(ta&&(na=null),ol=0,ta=!1,25<=p)throw Error(a(301));if(p+=1,dt=qe=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}z.H=Jm,m=r(l,u)}while(ta);return m}function HS(){var n=z.H,r=n.useState()[0];return r=typeof r.then=="function"?sl(r):r,n=n.useState()[0],(qe!==null?qe.memoizedState:null)!==n&&(we.flags|=1024),r}function Ec(){var n=zo!==0;return zo=0,n}function xc(n,r,l){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~l}function Cc(n){if(Io){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Io=!1}li=0,dt=qe=we=null,ta=!1,ol=zo=0,na=null}function Bt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?we.memoizedState=dt=n:dt=dt.next=n,dt}function ot(){if(qe===null){var n=we.alternate;n=n!==null?n.memoizedState:null}else n=qe.next;var r=dt===null?we.memoizedState:dt.next;if(r!==null)dt=r,qe=n;else{if(n===null)throw we.alternate===null?Error(a(467)):Error(a(310));qe=n,n={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},dt===null?we.memoizedState=dt=n:dt=dt.next=n}return dt}function Ho(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sl(n){var r=ol;return ol+=1,na===null&&(na=[]),n=om(na,n,r),r=we,(dt===null?r.memoizedState:dt.next)===null&&(r=r.alternate,z.H=r===null||r.memoizedState===null?Wm:zc),n}function Uo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return sl(n);if(n.$$typeof===A)return Nt(n)}throw Error(a(438,String(n)))}function wc(n){var r=null,l=we.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=we.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=Ho(),we.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(n),u=0;u<n;u++)l[u]=se;return r.index++,l}function oi(n,r){return typeof r=="function"?r(n):r}function Po(n){var r=ot();return kc(r,qe,n)}function kc(n,r,l){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=n.baseQueue,m=u.pending;if(m!==null){if(p!==null){var _=p.next;p.next=m.next,m.next=_}r.baseQueue=p=m,u.pending=null}if(m=n.baseState,p===null)n.memoizedState=m;else{r=p.next;var E=_=null,N=null,G=r,K=!1;do{var ne=G.lane&-536870913;if(ne!==G.lane?(Me&ne)===ne:(li&ne)===ne){var F=G.revertLane;if(F===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),ne===Zr&&(K=!0);else if((li&F)===F){G=G.next,F===Zr&&(K=!0);continue}else ne={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},N===null?(E=N=ne,_=m):N=N.next=ne,we.lanes|=F,Ui|=F;ne=G.action,mr&&l(m,ne),m=G.hasEagerState?G.eagerState:l(m,ne)}else F={lane:ne,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},N===null?(E=N=F,_=m):N=N.next=F,we.lanes|=ne,Ui|=ne;G=G.next}while(G!==null&&G!==r);if(N===null?_=m:N.next=E,!tn(m,n.memoizedState)&&(ft=!0,K&&(l=Kr,l!==null)))throw l;n.memoizedState=m,n.baseState=_,n.baseQueue=N,u.lastRenderedState=m}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Ac(n){var r=ot(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=n;var u=l.dispatch,p=l.pending,m=r.memoizedState;if(p!==null){l.pending=null;var _=p=p.next;do m=n(m,_.action),_=_.next;while(_!==p);tn(m,r.memoizedState)||(ft=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),l.lastRenderedState=m}return[m,u]}function bm(n,r,l){var u=we,p=ot(),m=ze;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=r();var _=!tn((qe||p).memoizedState,l);if(_&&(p.memoizedState=l,ft=!0),p=p.queue,Rc(Sm.bind(null,u,p,n),[n]),p.getSnapshot!==r||_||dt!==null&&dt.memoizedState.tag&1){if(u.flags|=2048,ia(9,{destroy:void 0},_m.bind(null,u,p,l,r),null),Ze===null)throw Error(a(349));m||(li&127)!==0||vm(u,r,l)}return l}function vm(n,r,l){n.flags|=16384,n={getSnapshot:r,value:l},r=we.updateQueue,r===null?(r=Ho(),we.updateQueue=r,r.stores=[n]):(l=r.stores,l===null?r.stores=[n]:l.push(n))}function _m(n,r,l,u){r.value=l,r.getSnapshot=u,Em(r)&&xm(n)}function Sm(n,r,l){return l(function(){Em(r)&&xm(n)})}function Em(n){var r=n.getSnapshot;n=n.value;try{var l=r();return!tn(n,l)}catch{return!0}}function xm(n){var r=lr(n,2);r!==null&&Qt(r,n,2)}function Tc(n){var r=Bt();if(typeof n=="function"){var l=n;if(n=l(),mr){Lt(!0);try{l()}finally{Lt(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:n},r}function Cm(n,r,l,u){return n.baseState=l,kc(n,qe,typeof u=="function"?u:oi)}function US(n,r,l,u,p){if(Vo(n))throw Error(a(485));if(n=r.action,n!==null){var m={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){m.listeners.push(_)}};z.T!==null?l(!0):m.isTransition=!1,u(m),l=r.pending,l===null?(m.next=r.pending=m,wm(r,m)):(m.next=l.next,r.pending=l.next=m)}}function wm(n,r){var l=r.action,u=r.payload,p=n.state;if(r.isTransition){var m=z.T,_={};z.T=_;try{var E=l(p,u),N=z.S;N!==null&&N(_,E),km(n,r,E)}catch(G){Lc(n,r,G)}finally{m!==null&&_.types!==null&&(m.types=_.types),z.T=m}}else try{m=l(p,u),km(n,r,m)}catch(G){Lc(n,r,G)}}function km(n,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Am(n,r,u)},function(u){return Lc(n,r,u)}):Am(n,r,l)}function Am(n,r,l){r.status="fulfilled",r.value=l,Tm(r),n.state=l,r=n.pending,r!==null&&(l=r.next,l===r?n.pending=null:(l=l.next,r.next=l,wm(n,l)))}function Lc(n,r,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Tm(r),r=r.next;while(r!==u)}n.action=null}function Tm(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Lm(n,r){return r}function Rm(n,r){if(ze){var l=Ze.formState;if(l!==null){e:{var u=we;if(ze){if(et){t:{for(var p=et,m=vn;p.nodeType!==8;){if(!m){p=null;break t}if(p=Sn(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m==="F!"||m==="F"?p:null}if(p){et=Sn(p.nextSibling),u=p.data==="F!";break e}}Li(u)}u=!1}u&&(r=l[0])}}return l=Bt(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lm,lastRenderedState:r},l.queue=u,l=Qm.bind(null,we,u),u.dispatch=l,u=Tc(!1),m=Ic.bind(null,we,!1,u.queue),u=Bt(),p={state:r,dispatch:null,action:n,pending:null},u.queue=p,l=US.bind(null,we,p,m,l),p.dispatch=l,u.memoizedState=n,[r,l,!1]}function Dm(n){var r=ot();return Nm(r,qe,n)}function Nm(n,r,l){if(r=kc(n,r,Lm)[0],n=Po(oi)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=sl(r)}catch(_){throw _===Wr?Lo:_}else u=r;r=ot();var p=r.queue,m=p.dispatch;return l!==r.memoizedState&&(we.flags|=2048,ia(9,{destroy:void 0},PS.bind(null,p,l),null)),[u,m,n]}function PS(n,r){n.action=r}function Om(n){var r=ot(),l=qe;if(l!==null)return Nm(r,l,n);ot(),r=r.memoizedState,l=ot();var u=l.queue.dispatch;return l.memoizedState=n,[r,u,!1]}function ia(n,r,l,u){return n={tag:n,create:l,deps:u,inst:r,next:null},r=we.updateQueue,r===null&&(r=Ho(),we.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=n.next=n:(u=l.next,l.next=n,n.next=u,r.lastEffect=n),n}function Mm(){return ot().memoizedState}function Bo(n,r,l,u){var p=Bt();we.flags|=n,p.memoizedState=ia(1|r,{destroy:void 0},l,u===void 0?null:u)}function jo(n,r,l,u){var p=ot();u=u===void 0?null:u;var m=p.memoizedState.inst;qe!==null&&u!==null&&_c(u,qe.memoizedState.deps)?p.memoizedState=ia(r,m,l,u):(we.flags|=n,p.memoizedState=ia(1|r,m,l,u))}function Im(n,r){Bo(8390656,8,n,r)}function Rc(n,r){jo(2048,8,n,r)}function BS(n){we.flags|=4;var r=we.updateQueue;if(r===null)r=Ho(),we.updateQueue=r,r.events=[n];else{var l=r.events;l===null?r.events=[n]:l.push(n)}}function zm(n){var r=ot().memoizedState;return BS({ref:r,nextImpl:n}),function(){if((Be&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Hm(n,r){return jo(4,2,n,r)}function Um(n,r){return jo(4,4,n,r)}function Pm(n,r){if(typeof r=="function"){n=n();var l=r(n);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Bm(n,r,l){l=l!=null?l.concat([n]):null,jo(4,4,Pm.bind(null,r,n),l)}function Dc(){}function jm(n,r){var l=ot();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&_c(r,u[1])?u[0]:(l.memoizedState=[n,r],n)}function Vm(n,r){var l=ot();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&_c(r,u[1]))return u[0];if(u=n(),mr){Lt(!0);try{n()}finally{Lt(!1)}}return l.memoizedState=[u,r],u}function Nc(n,r,l){return l===void 0||(li&1073741824)!==0&&(Me&261930)===0?n.memoizedState=r:(n.memoizedState=l,n=Gg(),we.lanes|=n,Ui|=n,l)}function Gm(n,r,l,u){return tn(l,r)?l:ea.current!==null?(n=Nc(n,l,u),tn(n,r)||(ft=!0),n):(li&42)===0||(li&1073741824)!==0&&(Me&261930)===0?(ft=!0,n.memoizedState=l):(n=Gg(),we.lanes|=n,Ui|=n,r)}function $m(n,r,l,u,p){var m=$.p;$.p=m!==0&&8>m?m:8;var _=z.T,E={};z.T=E,Ic(n,!1,r,l);try{var N=p(),G=z.S;if(G!==null&&G(E,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var K=IS(N,u);ul(n,r,K,sn(n))}else ul(n,r,u,sn(n))}catch(ne){ul(n,r,{then:function(){},status:"rejected",reason:ne},sn())}finally{$.p=m,_!==null&&E.types!==null&&(_.types=E.types),z.T=_}}function jS(){}function Oc(n,r,l,u){if(n.tag!==5)throw Error(a(476));var p=Fm(n).queue;$m(n,p,r,le,l===null?jS:function(){return qm(n),l(u)})}function Fm(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:le},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function qm(n){var r=Fm(n);r.next===null&&(r=n.alternate.memoizedState),ul(n,r.next.queue,{},sn())}function Mc(){return Nt(kl)}function Ym(){return ot().memoizedState}function Xm(){return ot().memoizedState}function VS(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=sn();n=Ni(l);var u=Oi(r,n,l);u!==null&&(Qt(u,r,l),rl(u,r,l)),r={cache:uc()},n.payload=r;return}r=r.return}}function GS(n,r,l){var u=sn();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Vo(n)?Zm(r,l):(l=Wu(n,r,l,u),l!==null&&(Qt(l,n,u),Km(l,r,u)))}function Qm(n,r,l){var u=sn();ul(n,r,l,u)}function ul(n,r,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Vo(n))Zm(r,p);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var _=r.lastRenderedState,E=m(_,l);if(p.hasEagerState=!0,p.eagerState=E,tn(E,_))return Eo(n,r,p,0),Ze===null&&So(),!1}catch{}if(l=Wu(n,r,p,u),l!==null)return Qt(l,n,u),Km(l,r,u),!0}return!1}function Ic(n,r,l,u){if(u={lane:2,revertLane:hd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Vo(n)){if(r)throw Error(a(479))}else r=Wu(n,l,u,2),r!==null&&Qt(r,n,2)}function Vo(n){var r=n.alternate;return n===we||r!==null&&r===we}function Zm(n,r){ta=Io=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function Km(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,np(n,l)}}var cl={readContext:Nt,use:Uo,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};cl.useEffectEvent=it;var Wm={readContext:Nt,use:Uo,useCallback:function(n,r){return Bt().memoizedState=[n,r===void 0?null:r],n},useContext:Nt,useEffect:Im,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,Bo(4194308,4,Pm.bind(null,r,n),l)},useLayoutEffect:function(n,r){return Bo(4194308,4,n,r)},useInsertionEffect:function(n,r){Bo(4,2,n,r)},useMemo:function(n,r){var l=Bt();r=r===void 0?null:r;var u=n();if(mr){Lt(!0);try{n()}finally{Lt(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Bt();if(l!==void 0){var p=l(r);if(mr){Lt(!0);try{l(r)}finally{Lt(!1)}}}else p=r;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=GS.bind(null,we,n),[u.memoizedState,n]},useRef:function(n){var r=Bt();return n={current:n},r.memoizedState=n},useState:function(n){n=Tc(n);var r=n.queue,l=Qm.bind(null,we,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:Dc,useDeferredValue:function(n,r){var l=Bt();return Nc(l,n,r)},useTransition:function(){var n=Tc(!1);return n=$m.bind(null,we,n.queue,!0,!1),Bt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=we,p=Bt();if(ze){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),Ze===null)throw Error(a(349));(Me&127)!==0||vm(u,r,l)}p.memoizedState=l;var m={value:l,getSnapshot:r};return p.queue=m,Im(Sm.bind(null,u,m,n),[n]),u.flags|=2048,ia(9,{destroy:void 0},_m.bind(null,u,m,l,r),null),l},useId:function(){var n=Bt(),r=Ze.identifierPrefix;if(ze){var l=Pn,u=Un;l=(u&~(1<<32-Ge(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=zo++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=zS++,r="_"+r+"r_"+l.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Mc,useFormState:Rm,useActionState:Rm,useOptimistic:function(n){var r=Bt();r.memoizedState=r.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=Ic.bind(null,we,!0,l),l.dispatch=r,[n,r]},useMemoCache:wc,useCacheRefresh:function(){return Bt().memoizedState=VS.bind(null,we)},useEffectEvent:function(n){var r=Bt(),l={impl:n};return r.memoizedState=l,function(){if((Be&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},zc={readContext:Nt,use:Uo,useCallback:jm,useContext:Nt,useEffect:Rc,useImperativeHandle:Bm,useInsertionEffect:Hm,useLayoutEffect:Um,useMemo:Vm,useReducer:Po,useRef:Mm,useState:function(){return Po(oi)},useDebugValue:Dc,useDeferredValue:function(n,r){var l=ot();return Gm(l,qe.memoizedState,n,r)},useTransition:function(){var n=Po(oi)[0],r=ot().memoizedState;return[typeof n=="boolean"?n:sl(n),r]},useSyncExternalStore:bm,useId:Ym,useHostTransitionStatus:Mc,useFormState:Dm,useActionState:Dm,useOptimistic:function(n,r){var l=ot();return Cm(l,qe,n,r)},useMemoCache:wc,useCacheRefresh:Xm};zc.useEffectEvent=zm;var Jm={readContext:Nt,use:Uo,useCallback:jm,useContext:Nt,useEffect:Rc,useImperativeHandle:Bm,useInsertionEffect:Hm,useLayoutEffect:Um,useMemo:Vm,useReducer:Ac,useRef:Mm,useState:function(){return Ac(oi)},useDebugValue:Dc,useDeferredValue:function(n,r){var l=ot();return qe===null?Nc(l,n,r):Gm(l,qe.memoizedState,n,r)},useTransition:function(){var n=Ac(oi)[0],r=ot().memoizedState;return[typeof n=="boolean"?n:sl(n),r]},useSyncExternalStore:bm,useId:Ym,useHostTransitionStatus:Mc,useFormState:Om,useActionState:Om,useOptimistic:function(n,r){var l=ot();return qe!==null?Cm(l,qe,n,r):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:wc,useCacheRefresh:Xm};Jm.useEffectEvent=zm;function Hc(n,r,l,u){r=n.memoizedState,l=l(u,r),l=l==null?r:g({},r,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var Uc={enqueueSetState:function(n,r,l){n=n._reactInternals;var u=sn(),p=Ni(u);p.payload=r,l!=null&&(p.callback=l),r=Oi(n,p,u),r!==null&&(Qt(r,n,u),rl(r,n,u))},enqueueReplaceState:function(n,r,l){n=n._reactInternals;var u=sn(),p=Ni(u);p.tag=1,p.payload=r,l!=null&&(p.callback=l),r=Oi(n,p,u),r!==null&&(Qt(r,n,u),rl(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var l=sn(),u=Ni(l);u.tag=2,r!=null&&(u.callback=r),r=Oi(n,u,l),r!==null&&(Qt(r,n,l),rl(r,n,l))}};function eg(n,r,l,u,p,m,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,m,_):r.prototype&&r.prototype.isPureReactComponent?!Za(l,u)||!Za(p,m):!0}function tg(n,r,l,u){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==n&&Uc.enqueueReplaceState(r,r.state,null)}function gr(n,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(n=n.defaultProps){l===r&&(l=g({},l));for(var p in n)l[p]===void 0&&(l[p]=n[p])}return l}function ng(n){_o(n)}function ig(n){console.error(n)}function rg(n){_o(n)}function Go(n,r){try{var l=n.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function ag(n,r,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Pc(n,r,l){return l=Ni(l),l.tag=3,l.payload={element:null},l.callback=function(){Go(n,r)},l}function lg(n){return n=Ni(n),n.tag=3,n}function og(n,r,l,u){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var m=u.value;n.payload=function(){return p(m)},n.callback=function(){ag(r,l,u)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){ag(r,l,u),typeof p!="function"&&(Pi===null?Pi=new Set([this]):Pi.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function $S(n,r,l,u,p){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Qr(r,l,p,!0),l=rn.current,l!==null){switch(l.tag){case 31:case 13:return _n===null?ts():l.alternate===null&&rt===0&&(rt=3),l.flags&=-257,l.flags|=65536,l.lanes=p,u===Ro?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),cd(n,u,p)),!1;case 22:return l.flags|=65536,u===Ro?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),cd(n,u,p)),!1}throw Error(a(435,l.tag))}return cd(n,u,p),ts(),!1}if(ze)return r=rn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==rc&&(n=Error(a(422),{cause:u}),Ja(gn(n,l)))):(u!==rc&&(r=Error(a(423),{cause:u}),Ja(gn(r,l))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=gn(u,l),p=Pc(n.stateNode,u,p),mc(n,p),rt!==4&&(rt=2)),!1;var m=Error(a(520),{cause:u});if(m=gn(m,l),bl===null?bl=[m]:bl.push(m),rt!==4&&(rt=2),r===null)return!0;u=gn(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,n=p&-p,l.lanes|=n,n=Pc(l.stateNode,u,n),mc(l,n),!1;case 1:if(r=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Pi===null||!Pi.has(m))))return l.flags|=65536,p&=-p,l.lanes|=p,p=lg(p),og(p,n,l,u),mc(l,p),!1}l=l.return}while(l!==null);return!1}var Bc=Error(a(461)),ft=!1;function Ot(n,r,l,u){r.child=n===null?dm(r,null,l,u):pr(r,n.child,l,u)}function sg(n,r,l,u,p){l=l.render;var m=r.ref;if("ref"in u){var _={};for(var E in u)E!=="ref"&&(_[E]=u[E])}else _=u;return cr(r),u=Sc(n,r,l,_,m,p),E=Ec(),n!==null&&!ft?(xc(n,r,p),si(n,r,p)):(ze&&E&&nc(r),r.flags|=1,Ot(n,r,u,p),r.child)}function ug(n,r,l,u,p){if(n===null){var m=l.type;return typeof m=="function"&&!Ju(m)&&m.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=m,cg(n,r,m,u,p)):(n=Co(l.type,null,u,r,r.mode,p),n.ref=r.ref,n.return=r,r.child=n)}if(m=n.child,!Xc(n,p)){var _=m.memoizedProps;if(l=l.compare,l=l!==null?l:Za,l(_,u)&&n.ref===r.ref)return si(n,r,p)}return r.flags|=1,n=ni(m,u),n.ref=r.ref,n.return=r,r.child=n}function cg(n,r,l,u,p){if(n!==null){var m=n.memoizedProps;if(Za(m,u)&&n.ref===r.ref)if(ft=!1,r.pendingProps=u=m,Xc(n,p))(n.flags&131072)!==0&&(ft=!0);else return r.lanes=n.lanes,si(n,r,p)}return jc(n,r,l,u,p)}function dg(n,r,l,u){var p=u.children,m=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,n!==null){for(u=r.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~m}else u=0,r.child=null;return fg(n,r,m,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&To(r,m!==null?m.cachePool:null),m!==null?pm(r,m):yc(),mm(r);else return u=r.lanes=536870912,fg(n,r,m!==null?m.baseLanes|l:l,l,u)}else m!==null?(To(r,m.cachePool),pm(r,m),Ii(),r.memoizedState=null):(n!==null&&To(r,null),yc(),Ii());return Ot(n,r,p,l),r.child}function dl(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function fg(n,r,l,u,p){var m=dc();return m=m===null?null:{parent:ct._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},n!==null&&To(r,null),yc(),mm(r),n!==null&&Qr(n,r,u,!0),r.childLanes=p,null}function $o(n,r){return r=qo({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function hg(n,r,l){return pr(r,n.child,null,l),n=$o(r,r.pendingProps),n.flags|=2,an(r),r.memoizedState=null,n}function FS(n,r,l){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(ze){if(u.mode==="hidden")return n=$o(r,u),r.lanes=536870912,dl(null,n);if(vc(r),(n=et)?(n=wy(n,vn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Ai!==null?{id:Un,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},l=Zp(n),l.return=r,r.child=l,Dt=r,et=null)):n=null,n===null)throw Li(r);return r.lanes=536870912,null}return $o(r,u)}var m=n.memoizedState;if(m!==null){var _=m.dehydrated;if(vc(r),p)if(r.flags&256)r.flags&=-257,r=hg(n,r,l);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(ft||Qr(n,r,l,!1),p=(l&n.childLanes)!==0,ft||p){if(u=Ze,u!==null&&(_=ip(u,l),_!==0&&_!==m.retryLane))throw m.retryLane=_,lr(n,_),Qt(u,n,_),Bc;ts(),r=hg(n,r,l)}else n=m.treeContext,et=Sn(_.nextSibling),Dt=r,ze=!0,Ti=null,vn=!1,n!==null&&Jp(r,n),r=$o(r,u),r.flags|=4096;return r}return n=ni(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function Fo(n,r){var l=r.ref;if(l===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(n===null||n.ref!==l)&&(r.flags|=4194816)}}function jc(n,r,l,u,p){return cr(r),l=Sc(n,r,l,u,void 0,p),u=Ec(),n!==null&&!ft?(xc(n,r,p),si(n,r,p)):(ze&&u&&nc(r),r.flags|=1,Ot(n,r,l,p),r.child)}function pg(n,r,l,u,p,m){return cr(r),r.updateQueue=null,l=ym(r,u,l,p),gm(n),u=Ec(),n!==null&&!ft?(xc(n,r,m),si(n,r,m)):(ze&&u&&nc(r),r.flags|=1,Ot(n,r,l,m),r.child)}function mg(n,r,l,u,p){if(cr(r),r.stateNode===null){var m=Fr,_=l.contextType;typeof _=="object"&&_!==null&&(m=Nt(_)),m=new l(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Uc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},hc(r),_=l.contextType,m.context=typeof _=="object"&&_!==null?Nt(_):Fr,m.state=r.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(Hc(r,l,_,u),m.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(_=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),_!==m.state&&Uc.enqueueReplaceState(m,m.state,null),ll(r,u,m,p),al(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(n===null){m=r.stateNode;var E=r.memoizedProps,N=gr(l,E);m.props=N;var G=m.context,K=l.contextType;_=Fr,typeof K=="object"&&K!==null&&(_=Nt(K));var ne=l.getDerivedStateFromProps;K=typeof ne=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,K||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||G!==_)&&tg(r,m,u,_),Di=!1;var F=r.memoizedState;m.state=F,ll(r,u,m,p),al(),G=r.memoizedState,E||F!==G||Di?(typeof ne=="function"&&(Hc(r,l,ne,u),G=r.memoizedState),(N=Di||eg(r,l,N,u,F,G,_))?(K||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=G),m.props=u,m.state=G,m.context=_,u=N):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,pc(n,r),_=r.memoizedProps,K=gr(l,_),m.props=K,ne=r.pendingProps,F=m.context,G=l.contextType,N=Fr,typeof G=="object"&&G!==null&&(N=Nt(G)),E=l.getDerivedStateFromProps,(G=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==ne||F!==N)&&tg(r,m,u,N),Di=!1,F=r.memoizedState,m.state=F,ll(r,u,m,p),al();var Y=r.memoizedState;_!==ne||F!==Y||Di||n!==null&&n.dependencies!==null&&ko(n.dependencies)?(typeof E=="function"&&(Hc(r,l,E,u),Y=r.memoizedState),(K=Di||eg(r,l,K,u,F,Y,N)||n!==null&&n.dependencies!==null&&ko(n.dependencies))?(G||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,Y,N),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,Y,N)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&F===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&F===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=Y),m.props=u,m.state=Y,m.context=N,u=K):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&F===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&F===n.memoizedState||(r.flags|=1024),u=!1)}return m=u,Fo(n,r),u=(r.flags&128)!==0,m||u?(m=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,n!==null&&u?(r.child=pr(r,n.child,null,p),r.child=pr(r,null,l,p)):Ot(n,r,l,p),r.memoizedState=m.state,n=r.child):n=si(n,r,p),n}function gg(n,r,l,u){return sr(),r.flags|=256,Ot(n,r,l,u),r.child}var Vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(n){return{baseLanes:n,cachePool:am()}}function $c(n,r,l){return n=n!==null?n.childLanes&~l:0,r&&(n|=on),n}function yg(n,r,l){var u=r.pendingProps,p=!1,m=(r.flags&128)!==0,_;if((_=m)||(_=n!==null&&n.memoizedState===null?!1:(lt.current&2)!==0),_&&(p=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(ze){if(p?Mi(r):Ii(),(n=et)?(n=wy(n,vn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Ai!==null?{id:Un,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},l=Zp(n),l.return=r,r.child=l,Dt=r,et=null)):n=null,n===null)throw Li(r);return kd(n)?r.lanes=32:r.lanes=536870912,null}var E=u.children;return u=u.fallback,p?(Ii(),p=r.mode,E=qo({mode:"hidden",children:E},p),u=or(u,p,l,null),E.return=r,u.return=r,E.sibling=u,r.child=E,u=r.child,u.memoizedState=Gc(l),u.childLanes=$c(n,_,l),r.memoizedState=Vc,dl(null,u)):(Mi(r),Fc(r,E))}var N=n.memoizedState;if(N!==null&&(E=N.dehydrated,E!==null)){if(m)r.flags&256?(Mi(r),r.flags&=-257,r=qc(n,r,l)):r.memoizedState!==null?(Ii(),r.child=n.child,r.flags|=128,r=null):(Ii(),E=u.fallback,p=r.mode,u=qo({mode:"visible",children:u.children},p),E=or(E,p,l,null),E.flags|=2,u.return=r,E.return=r,u.sibling=E,r.child=u,pr(r,n.child,null,l),u=r.child,u.memoizedState=Gc(l),u.childLanes=$c(n,_,l),r.memoizedState=Vc,r=dl(null,u));else if(Mi(r),kd(E)){if(_=E.nextSibling&&E.nextSibling.dataset,_)var G=_.dgst;_=G,u=Error(a(419)),u.stack="",u.digest=_,Ja({value:u,source:null,stack:null}),r=qc(n,r,l)}else if(ft||Qr(n,r,l,!1),_=(l&n.childLanes)!==0,ft||_){if(_=Ze,_!==null&&(u=ip(_,l),u!==0&&u!==N.retryLane))throw N.retryLane=u,lr(n,u),Qt(_,n,u),Bc;wd(E)||ts(),r=qc(n,r,l)}else wd(E)?(r.flags|=192,r.child=n.child,r=null):(n=N.treeContext,et=Sn(E.nextSibling),Dt=r,ze=!0,Ti=null,vn=!1,n!==null&&Jp(r,n),r=Fc(r,u.children),r.flags|=4096);return r}return p?(Ii(),E=u.fallback,p=r.mode,N=n.child,G=N.sibling,u=ni(N,{mode:"hidden",children:u.children}),u.subtreeFlags=N.subtreeFlags&65011712,G!==null?E=ni(G,E):(E=or(E,p,l,null),E.flags|=2),E.return=r,u.return=r,u.sibling=E,r.child=u,dl(null,u),u=r.child,E=n.child.memoizedState,E===null?E=Gc(l):(p=E.cachePool,p!==null?(N=ct._currentValue,p=p.parent!==N?{parent:N,pool:N}:p):p=am(),E={baseLanes:E.baseLanes|l,cachePool:p}),u.memoizedState=E,u.childLanes=$c(n,_,l),r.memoizedState=Vc,dl(n.child,u)):(Mi(r),l=n.child,n=l.sibling,l=ni(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,n!==null&&(_=r.deletions,_===null?(r.deletions=[n],r.flags|=16):_.push(n)),r.child=l,r.memoizedState=null,l)}function Fc(n,r){return r=qo({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function qo(n,r){return n=nn(22,n,null,r),n.lanes=0,n}function qc(n,r,l){return pr(r,n.child,null,l),n=Fc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function bg(n,r,l){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),oc(n.return,r,l)}function Yc(n,r,l,u,p,m){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p,treeForkCount:m}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=l,_.tailMode=p,_.treeForkCount=m)}function vg(n,r,l){var u=r.pendingProps,p=u.revealOrder,m=u.tail;u=u.children;var _=lt.current,E=(_&2)!==0;if(E?(_=_&1|2,r.flags|=128):_&=1,T(lt,_),Ot(n,r,u,l),u=ze?Wa:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&bg(n,l,r);else if(n.tag===19)bg(n,l,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(l=r.child,p=null;l!==null;)n=l.alternate,n!==null&&Mo(n)===null&&(p=l),l=l.sibling;l=p,l===null?(p=r.child,r.child=null):(p=l.sibling,l.sibling=null),Yc(r,!1,p,l,m,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=r.child,r.child=null;p!==null;){if(n=p.alternate,n!==null&&Mo(n)===null){r.child=p;break}n=p.sibling,p.sibling=l,l=p,p=n}Yc(r,!0,l,null,m,u);break;case"together":Yc(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function si(n,r,l){if(n!==null&&(r.dependencies=n.dependencies),Ui|=r.lanes,(l&r.childLanes)===0)if(n!==null){if(Qr(n,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,l=ni(n,n.pendingProps),r.child=l,l.return=r;n.sibling!==null;)n=n.sibling,l=l.sibling=ni(n,n.pendingProps),l.return=r;l.sibling=null}return r.child}function Xc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&ko(n)))}function qS(n,r,l){switch(r.tag){case 3:Re(r,r.stateNode.containerInfo),Ri(r,ct,n.memoizedState.cache),sr();break;case 27:case 5:Ve(r);break;case 4:Re(r,r.stateNode.containerInfo);break;case 10:Ri(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,vc(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Mi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?yg(n,r,l):(Mi(r),n=si(n,r,l),n!==null?n.sibling:null);Mi(r);break;case 19:var p=(n.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Qr(n,r,l,!1),u=(l&r.childLanes)!==0),p){if(u)return vg(n,r,l);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),T(lt,lt.current),u)break;return null;case 22:return r.lanes=0,dg(n,r,l,r.pendingProps);case 24:Ri(r,ct,n.memoizedState.cache)}return si(n,r,l)}function _g(n,r,l){if(n!==null)if(n.memoizedProps!==r.pendingProps)ft=!0;else{if(!Xc(n,l)&&(r.flags&128)===0)return ft=!1,qS(n,r,l);ft=(n.flags&131072)!==0}else ft=!1,ze&&(r.flags&1048576)!==0&&Wp(r,Wa,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=fr(r.elementType),r.type=n,typeof n=="function")Ju(n)?(u=gr(n,u),r.tag=1,r=mg(null,r,n,u,l)):(r.tag=0,r=jc(null,r,n,u,l));else{if(n!=null){var p=n.$$typeof;if(p===H){r.tag=11,r=sg(null,r,n,u,l);break e}else if(p===B){r.tag=14,r=ug(null,r,n,u,l);break e}}throw r=ie(n)||n,Error(a(306,r,""))}}return r;case 0:return jc(n,r,r.type,r.pendingProps,l);case 1:return u=r.type,p=gr(u,r.pendingProps),mg(n,r,u,p,l);case 3:e:{if(Re(r,r.stateNode.containerInfo),n===null)throw Error(a(387));u=r.pendingProps;var m=r.memoizedState;p=m.element,pc(n,r),ll(r,u,null,l);var _=r.memoizedState;if(u=_.cache,Ri(r,ct,u),u!==m.cache&&sc(r,[ct],l,!0),al(),u=_.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=gg(n,r,u,l);break e}else if(u!==p){p=gn(Error(a(424)),r),Ja(p),r=gg(n,r,u,l);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,et=Sn(n.firstChild),Dt=r,ze=!0,Ti=null,vn=!0,l=dm(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(sr(),u===p){r=si(n,r,l);break e}Ot(n,r,u,l)}r=r.child}return r;case 26:return Fo(n,r),n===null?(l=Dy(r.type,null,r.pendingProps,null))?r.memoizedState=l:ze||(l=r.type,n=r.pendingProps,u=ss(he.current).createElement(l),u[Rt]=r,u[Gt]=n,Mt(u,l,n),wt(u),r.stateNode=u):r.memoizedState=Dy(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Ve(r),n===null&&ze&&(u=r.stateNode=Ty(r.type,r.pendingProps,he.current),Dt=r,vn=!0,p=et,Gi(r.type)?(Ad=p,et=Sn(u.firstChild)):et=p),Ot(n,r,r.pendingProps.children,l),Fo(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&ze&&((p=u=et)&&(u=EE(u,r.type,r.pendingProps,vn),u!==null?(r.stateNode=u,Dt=r,et=Sn(u.firstChild),vn=!1,p=!0):p=!1),p||Li(r)),Ve(r),p=r.type,m=r.pendingProps,_=n!==null?n.memoizedProps:null,u=m.children,Ed(p,m)?u=null:_!==null&&Ed(p,_)&&(r.flags|=32),r.memoizedState!==null&&(p=Sc(n,r,HS,null,null,l),kl._currentValue=p),Fo(n,r),Ot(n,r,u,l),r.child;case 6:return n===null&&ze&&((n=l=et)&&(l=xE(l,r.pendingProps,vn),l!==null?(r.stateNode=l,Dt=r,et=null,n=!0):n=!1),n||Li(r)),null;case 13:return yg(n,r,l);case 4:return Re(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=pr(r,null,u,l):Ot(n,r,u,l),r.child;case 11:return sg(n,r,r.type,r.pendingProps,l);case 7:return Ot(n,r,r.pendingProps,l),r.child;case 8:return Ot(n,r,r.pendingProps.children,l),r.child;case 12:return Ot(n,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,Ri(r,r.type,u.value),Ot(n,r,u.children,l),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,cr(r),p=Nt(p),u=u(p),r.flags|=1,Ot(n,r,u,l),r.child;case 14:return ug(n,r,r.type,r.pendingProps,l);case 15:return cg(n,r,r.type,r.pendingProps,l);case 19:return vg(n,r,l);case 31:return FS(n,r,l);case 22:return dg(n,r,l,r.pendingProps);case 24:return cr(r),u=Nt(ct),n===null?(p=dc(),p===null&&(p=Ze,m=uc(),p.pooledCache=m,m.refCount++,m!==null&&(p.pooledCacheLanes|=l),p=m),r.memoizedState={parent:u,cache:p},hc(r),Ri(r,ct,p)):((n.lanes&l)!==0&&(pc(n,r),ll(r,null,null,l),al()),p=n.memoizedState,m=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),Ri(r,ct,u)):(u=m.cache,Ri(r,ct,u),u!==p.cache&&sc(r,[ct],l,!0))),Ot(n,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ui(n){n.flags|=4}function Qc(n,r,l,u,p){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(Yg())n.flags|=8192;else throw hr=Ro,fc}else n.flags&=-16777217}function Sg(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!zy(r))if(Yg())n.flags|=8192;else throw hr=Ro,fc}function Yo(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?ke():536870912,n.lanes|=r,oa|=r)}function fl(n,r){if(!ze)switch(n.tailMode){case"hidden":r=n.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function tt(n){var r=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(r)for(var p=n.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=l,r}function YS(n,r,l){var u=r.pendingProps;switch(ic(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(r),null;case 1:return tt(r),null;case 3:return l=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),ai(ct),me(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(Xr(r)?ui(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,ac())),tt(r),null;case 26:var p=r.type,m=r.memoizedState;return n===null?(ui(r),m!==null?(tt(r),Sg(r,m)):(tt(r),Qc(r,p,null,u,l))):m?m!==n.memoizedState?(ui(r),tt(r),Sg(r,m)):(tt(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&ui(r),tt(r),Qc(r,p,n,u,l)),null;case 27:if(Je(r),l=he.current,p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&ui(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return tt(r),null}n=ue.current,Xr(r)?em(r):(n=Ty(p,u,l),r.stateNode=n,ui(r))}return tt(r),null;case 5:if(Je(r),p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&ui(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return tt(r),null}if(m=ue.current,Xr(r))em(r);else{var _=ss(he.current);switch(m){case 1:m=_.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:m=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":m=_.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":m=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":m=_.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?_.createElement("select",{is:u.is}):_.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?_.createElement(p,{is:u.is}):_.createElement(p)}}m[Rt]=r,m[Gt]=u;e:for(_=r.child;_!==null;){if(_.tag===5||_.tag===6)m.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===r)break e;for(;_.sibling===null;){if(_.return===null||_.return===r)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}r.stateNode=m;e:switch(Mt(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ui(r)}}return tt(r),Qc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&ui(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(n=he.current,Xr(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,p=Dt,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[Rt]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||yy(n.nodeValue,l)),n||Li(r,!0)}else n=ss(n).createTextNode(u),n[Rt]=r,r.stateNode=n}return tt(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=Xr(r),l!==null){if(n===null){if(!u)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Rt]=r}else sr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;tt(r),n=!1}else l=ac(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(an(r),r):(an(r),null);if((r.flags&128)!==0)throw Error(a(558))}return tt(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Xr(r),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Rt]=r}else sr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;tt(r),p=!1}else p=ac(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(an(r),r):(an(r),null)}return an(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),Yo(r,r.updateQueue),tt(r),null);case 4:return me(),n===null&&yd(r.stateNode.containerInfo),tt(r),null;case 10:return ai(r.type),tt(r),null;case 19:if(X(lt),u=r.memoizedState,u===null)return tt(r),null;if(p=(r.flags&128)!==0,m=u.rendering,m===null)if(p)fl(u,!1);else{if(rt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=Mo(n),m!==null){for(r.flags|=128,fl(u,!1),n=m.updateQueue,r.updateQueue=n,Yo(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)Qp(l,n),l=l.sibling;return T(lt,lt.current&1|2),ze&&ii(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&xt()>Wo&&(r.flags|=128,p=!0,fl(u,!1),r.lanes=4194304)}else{if(!p)if(n=Mo(m),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,Yo(r,n),fl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ze)return tt(r),null}else 2*xt()-u.renderingStartTime>Wo&&l!==536870912&&(r.flags|=128,p=!0,fl(u,!1),r.lanes=4194304);u.isBackwards?(m.sibling=r.child,r.child=m):(n=u.last,n!==null?n.sibling=m:r.child=m,u.last=m)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=xt(),n.sibling=null,l=lt.current,T(lt,p?l&1|2:l&1),ze&&ii(r,u.treeForkCount),n):(tt(r),null);case 22:case 23:return an(r),bc(),u=r.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(tt(r),r.subtreeFlags&6&&(r.flags|=8192)):tt(r),l=r.updateQueue,l!==null&&Yo(r,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),n!==null&&X(dr),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),ai(ct),tt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function XS(n,r){switch(ic(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return ai(ct),me(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Je(r),null;case 31:if(r.memoizedState!==null){if(an(r),r.alternate===null)throw Error(a(340));sr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(an(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));sr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return X(lt),null;case 4:return me(),null;case 10:return ai(r.type),null;case 22:case 23:return an(r),bc(),n!==null&&X(dr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return ai(ct),null;case 25:return null;default:return null}}function Eg(n,r){switch(ic(r),r.tag){case 3:ai(ct),me();break;case 26:case 27:case 5:Je(r);break;case 4:me();break;case 31:r.memoizedState!==null&&an(r);break;case 13:an(r);break;case 19:X(lt);break;case 10:ai(r.type);break;case 22:case 23:an(r),bc(),n!==null&&X(dr);break;case 24:ai(ct)}}function hl(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&n)===n){u=void 0;var m=l.create,_=l.inst;u=m(),_.destroy=u}l=l.next}while(l!==p)}}catch(E){Fe(r,r.return,E)}}function zi(n,r,l){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&n)===n){var _=u.inst,E=_.destroy;if(E!==void 0){_.destroy=void 0,p=r;var N=l,G=E;try{G()}catch(K){Fe(p,N,K)}}}u=u.next}while(u!==m)}}catch(K){Fe(r,r.return,K)}}function xg(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{hm(r,l)}catch(u){Fe(n,n.return,u)}}}function Cg(n,r,l){l.props=gr(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){Fe(n,r,u)}}function pl(n,r){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(p){Fe(n,r,p)}}function Bn(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(p){Fe(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){Fe(n,r,p)}else l.current=null}function wg(n){var r=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(p){Fe(n,n.return,p)}}function Zc(n,r,l){try{var u=n.stateNode;gE(u,n.type,l,r),u[Gt]=r}catch(p){Fe(n,n.return,p)}}function kg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Gi(n.type)||n.tag===4}function Kc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||kg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Gi(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Wc(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(n),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=ei));else if(u!==4&&(u===27&&Gi(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(Wc(n,r,l),n=n.sibling;n!==null;)Wc(n,r,l),n=n.sibling}function Xo(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?l.insertBefore(n,r):l.appendChild(n);else if(u!==4&&(u===27&&Gi(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Xo(n,r,l),n=n.sibling;n!==null;)Xo(n,r,l),n=n.sibling}function Ag(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);Mt(r,u,l),r[Rt]=n,r[Gt]=l}catch(m){Fe(n,n.return,m)}}var ci=!1,ht=!1,Jc=!1,Tg=typeof WeakSet=="function"?WeakSet:Set,kt=null;function QS(n,r){if(n=n.containerInfo,_d=ms,n=Bp(n),qu(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var _=0,E=-1,N=-1,G=0,K=0,ne=n,F=null;t:for(;;){for(var Y;ne!==l||p!==0&&ne.nodeType!==3||(E=_+p),ne!==m||u!==0&&ne.nodeType!==3||(N=_+u),ne.nodeType===3&&(_+=ne.nodeValue.length),(Y=ne.firstChild)!==null;)F=ne,ne=Y;for(;;){if(ne===n)break t;if(F===l&&++G===p&&(E=_),F===m&&++K===u&&(N=_),(Y=ne.nextSibling)!==null)break;ne=F,F=ne.parentNode}ne=Y}l=E===-1||N===-1?null:{start:E,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(Sd={focusedElem:n,selectionRange:l},ms=!1,kt=r;kt!==null;)if(r=kt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,kt=n;else for(;kt!==null;){switch(r=kt,m=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)p=n[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,l=r,p=m.memoizedProps,m=m.memoizedState,u=l.stateNode;try{var de=gr(l.type,p);n=u.getSnapshotBeforeUpdate(de,m),u.__reactInternalSnapshotBeforeUpdate=n}catch(_e){Fe(l,l.return,_e)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,l=n.nodeType,l===9)Cd(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Cd(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,kt=n;break}kt=r.return}}function Lg(n,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:fi(n,l),u&4&&hl(5,l);break;case 1:if(fi(n,l),u&4)if(n=l.stateNode,r===null)try{n.componentDidMount()}catch(_){Fe(l,l.return,_)}else{var p=gr(l.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(p,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Fe(l,l.return,_)}}u&64&&xg(l),u&512&&pl(l,l.return);break;case 3:if(fi(n,l),u&64&&(n=l.updateQueue,n!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{hm(n,r)}catch(_){Fe(l,l.return,_)}}break;case 27:r===null&&u&4&&Ag(l);case 26:case 5:fi(n,l),r===null&&u&4&&wg(l),u&512&&pl(l,l.return);break;case 12:fi(n,l);break;case 31:fi(n,l),u&4&&Ng(n,l);break;case 13:fi(n,l),u&4&&Og(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=rE.bind(null,l),CE(n,l))));break;case 22:if(u=l.memoizedState!==null||ci,!u){r=r!==null&&r.memoizedState!==null||ht,p=ci;var m=ht;ci=u,(ht=r)&&!m?hi(n,l,(l.subtreeFlags&8772)!==0):fi(n,l),ci=p,ht=m}break;case 30:break;default:fi(n,l)}}function Rg(n){var r=n.alternate;r!==null&&(n.alternate=null,Rg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Lu(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var nt=null,Ft=!1;function di(n,r,l){for(l=l.child;l!==null;)Dg(n,r,l),l=l.sibling}function Dg(n,r,l){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Ct,l)}catch{}switch(l.tag){case 26:ht||Bn(l,r),di(n,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ht||Bn(l,r);var u=nt,p=Ft;Gi(l.type)&&(nt=l.stateNode,Ft=!1),di(n,r,l),xl(l.stateNode),nt=u,Ft=p;break;case 5:ht||Bn(l,r);case 6:if(u=nt,p=Ft,nt=null,di(n,r,l),nt=u,Ft=p,nt!==null)if(Ft)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(l.stateNode)}catch(m){Fe(l,r,m)}else try{nt.removeChild(l.stateNode)}catch(m){Fe(l,r,m)}break;case 18:nt!==null&&(Ft?(n=nt,xy(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),ma(n)):xy(nt,l.stateNode));break;case 4:u=nt,p=Ft,nt=l.stateNode.containerInfo,Ft=!0,di(n,r,l),nt=u,Ft=p;break;case 0:case 11:case 14:case 15:zi(2,l,r),ht||zi(4,l,r),di(n,r,l);break;case 1:ht||(Bn(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Cg(l,r,u)),di(n,r,l);break;case 21:di(n,r,l);break;case 22:ht=(u=ht)||l.memoizedState!==null,di(n,r,l),ht=u;break;default:di(n,r,l)}}function Ng(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ma(n)}catch(l){Fe(r,r.return,l)}}}function Og(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ma(n)}catch(l){Fe(r,r.return,l)}}function ZS(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Tg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Tg),r;default:throw Error(a(435,n.tag))}}function Qo(n,r){var l=ZS(n);r.forEach(function(u){if(!l.has(u)){l.add(u);var p=aE.bind(null,n,u);u.then(p,p)}})}function qt(n,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u],m=n,_=r,E=_;e:for(;E!==null;){switch(E.tag){case 27:if(Gi(E.type)){nt=E.stateNode,Ft=!1;break e}break;case 5:nt=E.stateNode,Ft=!1;break e;case 3:case 4:nt=E.stateNode.containerInfo,Ft=!0;break e}E=E.return}if(nt===null)throw Error(a(160));Dg(m,_,p),nt=null,Ft=!1,m=p.alternate,m!==null&&(m.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Mg(r,n),r=r.sibling}var Dn=null;function Mg(n,r){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:qt(r,n),Yt(n),u&4&&(zi(3,n,n.return),hl(3,n),zi(5,n,n.return));break;case 1:qt(r,n),Yt(n),u&512&&(ht||l===null||Bn(l,l.return)),u&64&&ci&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var p=Dn;if(qt(r,n),Yt(n),u&512&&(ht||l===null||Bn(l,l.return)),u&4){var m=l!==null?l.memoizedState:null;if(u=n.memoizedState,l===null)if(u===null)if(n.stateNode===null){e:{u=n.type,l=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":m=p.getElementsByTagName("title")[0],(!m||m[ja]||m[Rt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=p.createElement(u),p.head.insertBefore(m,p.querySelector("head > title"))),Mt(m,u,l),m[Rt]=n,wt(m),u=m;break e;case"link":var _=My("link","href",p).get(u+(l.href||""));if(_){for(var E=0;E<_.length;E++)if(m=_[E],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){_.splice(E,1);break t}}m=p.createElement(u),Mt(m,u,l),p.head.appendChild(m);break;case"meta":if(_=My("meta","content",p).get(u+(l.content||""))){for(E=0;E<_.length;E++)if(m=_[E],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){_.splice(E,1);break t}}m=p.createElement(u),Mt(m,u,l),p.head.appendChild(m);break;default:throw Error(a(468,u))}m[Rt]=n,wt(m),u=m}n.stateNode=u}else Iy(p,n.type,n.stateNode);else n.stateNode=Oy(p,u,n.memoizedProps);else m!==u?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,u===null?Iy(p,n.type,n.stateNode):Oy(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Zc(n,n.memoizedProps,l.memoizedProps)}break;case 27:qt(r,n),Yt(n),u&512&&(ht||l===null||Bn(l,l.return)),l!==null&&u&4&&Zc(n,n.memoizedProps,l.memoizedProps);break;case 5:if(qt(r,n),Yt(n),u&512&&(ht||l===null||Bn(l,l.return)),n.flags&32){p=n.stateNode;try{Ur(p,"")}catch(de){Fe(n,n.return,de)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,Zc(n,p,l!==null?l.memoizedProps:p)),u&1024&&(Jc=!0);break;case 6:if(qt(r,n),Yt(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(de){Fe(n,n.return,de)}}break;case 3:if(ds=null,p=Dn,Dn=us(r.containerInfo),qt(r,n),Dn=p,Yt(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{ma(r.containerInfo)}catch(de){Fe(n,n.return,de)}Jc&&(Jc=!1,Ig(n));break;case 4:u=Dn,Dn=us(n.stateNode.containerInfo),qt(r,n),Yt(n),Dn=u;break;case 12:qt(r,n),Yt(n);break;case 31:qt(r,n),Yt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Qo(n,u)));break;case 13:qt(r,n),Yt(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ko=xt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Qo(n,u)));break;case 22:p=n.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,G=ci,K=ht;if(ci=G||p,ht=K||N,qt(r,n),ht=K,ci=G,Yt(n),u&8192)e:for(r=n.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||N||ci||ht||yr(n)),l=null,r=n;;){if(r.tag===5||r.tag===26){if(l===null){N=l=r;try{if(m=N.stateNode,p)_=m.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{E=N.stateNode;var ne=N.memoizedProps.style,F=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;E.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(de){Fe(N,N.return,de)}}}else if(r.tag===6){if(l===null){N=r;try{N.stateNode.nodeValue=p?"":N.memoizedProps}catch(de){Fe(N,N.return,de)}}}else if(r.tag===18){if(l===null){N=r;try{var Y=N.stateNode;p?Cy(Y,!0):Cy(N.stateNode,!1)}catch(de){Fe(N,N.return,de)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=n.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,Qo(n,l))));break;case 19:qt(r,n),Yt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Qo(n,u)));break;case 30:break;case 21:break;default:qt(r,n),Yt(n)}}function Yt(n){var r=n.flags;if(r&2){try{for(var l,u=n.return;u!==null;){if(kg(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var p=l.stateNode,m=Kc(n);Xo(n,m,p);break;case 5:var _=l.stateNode;l.flags&32&&(Ur(_,""),l.flags&=-33);var E=Kc(n);Xo(n,E,_);break;case 3:case 4:var N=l.stateNode.containerInfo,G=Kc(n);Wc(n,G,N);break;default:throw Error(a(161))}}catch(K){Fe(n,n.return,K)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Ig(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Ig(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function fi(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Lg(n,r.alternate,r),r=r.sibling}function yr(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:zi(4,r,r.return),yr(r);break;case 1:Bn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Cg(r,r.return,l),yr(r);break;case 27:xl(r.stateNode);case 26:case 5:Bn(r,r.return),yr(r);break;case 22:r.memoizedState===null&&yr(r);break;case 30:yr(r);break;default:yr(r)}n=n.sibling}}function hi(n,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=n,m=r,_=m.flags;switch(m.tag){case 0:case 11:case 15:hi(p,m,l),hl(4,m);break;case 1:if(hi(p,m,l),u=m,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(G){Fe(u,u.return,G)}if(u=m,p=u.updateQueue,p!==null){var E=u.stateNode;try{var N=p.shared.hiddenCallbacks;if(N!==null)for(p.shared.hiddenCallbacks=null,p=0;p<N.length;p++)fm(N[p],E)}catch(G){Fe(u,u.return,G)}}l&&_&64&&xg(m),pl(m,m.return);break;case 27:Ag(m);case 26:case 5:hi(p,m,l),l&&u===null&&_&4&&wg(m),pl(m,m.return);break;case 12:hi(p,m,l);break;case 31:hi(p,m,l),l&&_&4&&Ng(p,m);break;case 13:hi(p,m,l),l&&_&4&&Og(p,m);break;case 22:m.memoizedState===null&&hi(p,m,l),pl(m,m.return);break;case 30:break;default:hi(p,m,l)}r=r.sibling}}function ed(n,r){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&el(l))}function td(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&el(n))}function Nn(n,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)zg(n,r,l,u),r=r.sibling}function zg(n,r,l,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Nn(n,r,l,u),p&2048&&hl(9,r);break;case 1:Nn(n,r,l,u);break;case 3:Nn(n,r,l,u),p&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&el(n)));break;case 12:if(p&2048){Nn(n,r,l,u),n=r.stateNode;try{var m=r.memoizedProps,_=m.id,E=m.onPostCommit;typeof E=="function"&&E(_,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(N){Fe(r,r.return,N)}}else Nn(n,r,l,u);break;case 31:Nn(n,r,l,u);break;case 13:Nn(n,r,l,u);break;case 23:break;case 22:m=r.stateNode,_=r.alternate,r.memoizedState!==null?m._visibility&2?Nn(n,r,l,u):ml(n,r):m._visibility&2?Nn(n,r,l,u):(m._visibility|=2,ra(n,r,l,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&ed(_,r);break;case 24:Nn(n,r,l,u),p&2048&&td(r.alternate,r);break;default:Nn(n,r,l,u)}}function ra(n,r,l,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=n,_=r,E=l,N=u,G=_.flags;switch(_.tag){case 0:case 11:case 15:ra(m,_,E,N,p),hl(8,_);break;case 23:break;case 22:var K=_.stateNode;_.memoizedState!==null?K._visibility&2?ra(m,_,E,N,p):ml(m,_):(K._visibility|=2,ra(m,_,E,N,p)),p&&G&2048&&ed(_.alternate,_);break;case 24:ra(m,_,E,N,p),p&&G&2048&&td(_.alternate,_);break;default:ra(m,_,E,N,p)}r=r.sibling}}function ml(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=n,u=r,p=u.flags;switch(u.tag){case 22:ml(l,u),p&2048&&ed(u.alternate,u);break;case 24:ml(l,u),p&2048&&td(u.alternate,u);break;default:ml(l,u)}r=r.sibling}}var gl=8192;function aa(n,r,l){if(n.subtreeFlags&gl)for(n=n.child;n!==null;)Hg(n,r,l),n=n.sibling}function Hg(n,r,l){switch(n.tag){case 26:aa(n,r,l),n.flags&gl&&n.memoizedState!==null&&zE(l,Dn,n.memoizedState,n.memoizedProps);break;case 5:aa(n,r,l);break;case 3:case 4:var u=Dn;Dn=us(n.stateNode.containerInfo),aa(n,r,l),Dn=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=gl,gl=16777216,aa(n,r,l),gl=u):aa(n,r,l));break;default:aa(n,r,l)}}function Ug(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function yl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];kt=u,Bg(u,n)}Ug(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Pg(n),n=n.sibling}function Pg(n){switch(n.tag){case 0:case 11:case 15:yl(n),n.flags&2048&&zi(9,n,n.return);break;case 3:yl(n);break;case 12:yl(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Zo(n)):yl(n);break;default:yl(n)}}function Zo(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];kt=u,Bg(u,n)}Ug(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:zi(8,r,r.return),Zo(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Zo(r));break;default:Zo(r)}n=n.sibling}}function Bg(n,r){for(;kt!==null;){var l=kt;switch(l.tag){case 0:case 11:case 15:zi(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:el(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,kt=u;else e:for(l=n;kt!==null;){u=kt;var p=u.sibling,m=u.return;if(Rg(u),u===l){kt=null;break e}if(p!==null){p.return=m,kt=p;break e}kt=m}}}var KS={getCacheForType:function(n){var r=Nt(ct),l=r.data.get(n);return l===void 0&&(l=n(),r.data.set(n,l)),l},cacheSignal:function(){return Nt(ct).controller.signal}},WS=typeof WeakMap=="function"?WeakMap:Map,Be=0,Ze=null,Ne=null,Me=0,$e=0,ln=null,Hi=!1,la=!1,nd=!1,pi=0,rt=0,Ui=0,br=0,id=0,on=0,oa=0,bl=null,Xt=null,rd=!1,Ko=0,jg=0,Wo=1/0,Jo=null,Pi=null,bt=0,Bi=null,sa=null,mi=0,ad=0,ld=null,Vg=null,vl=0,od=null;function sn(){return(Be&2)!==0&&Me!==0?Me&-Me:z.T!==null?hd():rp()}function Gg(){if(on===0)if((Me&536870912)===0||ze){var n=Lr;Lr<<=1,(Lr&3932160)===0&&(Lr=262144),on=n}else on=536870912;return n=rn.current,n!==null&&(n.flags|=32),on}function Qt(n,r,l){(n===Ze&&($e===2||$e===9)||n.cancelPendingCommit!==null)&&(ua(n,0),ji(n,Me,on,!1)),Vt(n,l),((Be&2)===0||n!==Ze)&&(n===Ze&&((Be&2)===0&&(br|=l),rt===4&&ji(n,Me,on,!1)),jn(n))}function $g(n,r,l){if((Be&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&n.expiredLanes)===0||ae(n,r),p=u?tE(n,r):ud(n,r,!0),m=u;do{if(p===0){la&&!u&&ji(n,r,0,!1);break}else{if(l=n.current.alternate,m&&!JS(l)){p=ud(n,r,!1),m=!1;continue}if(p===2){if(m=r,n.errorRecoveryDisabledLanes&m)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var E=n;p=bl;var N=E.current.memoizedState.isDehydrated;if(N&&(ua(E,_).flags|=256),_=ud(E,_,!1),_!==2){if(nd&&!N){E.errorRecoveryDisabledLanes|=m,br|=m,p=4;break e}m=Xt,Xt=p,m!==null&&(Xt===null?Xt=m:Xt.push.apply(Xt,m))}p=_}if(m=!1,p!==2)continue}}if(p===1){ua(n,0),ji(n,r,0,!0);break}e:{switch(u=n,m=p,m){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:ji(u,r,on,!Hi);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=Ko+300-xt(),10<p)){if(ji(u,r,on,!Hi),Dr(u,0,!0)!==0)break e;mi=r,u.timeoutHandle=Sy(Fg.bind(null,u,l,Xt,Jo,rd,r,on,br,oa,Hi,m,"Throttled",-0,0),p);break e}Fg(u,l,Xt,Jo,rd,r,on,br,oa,Hi,m,null,-0,0)}}break}while(!0);jn(n)}function Fg(n,r,l,u,p,m,_,E,N,G,K,ne,F,Y){if(n.timeoutHandle=-1,ne=r.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ei},Hg(r,m,ne);var de=(m&62914560)===m?Ko-xt():(m&4194048)===m?jg-xt():0;if(de=HE(ne,de),de!==null){mi=m,n.cancelPendingCommit=de(Jg.bind(null,n,r,m,l,u,p,_,E,N,K,ne,null,F,Y)),ji(n,m,_,!G);return}}Jg(n,r,m,l,u,p,_,E,N)}function JS(n){for(var r=n;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var p=l[u],m=p.getSnapshot;p=p.value;try{if(!tn(m(),p))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function ji(n,r,l,u){r&=~id,r&=~br,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var p=r;0<p;){var m=31-Ge(p),_=1<<m;u[m]=-1,p&=~_}l!==0&&tp(n,l,r)}function es(){return(Be&6)===0?(_l(0),!1):!0}function sd(){if(Ne!==null){if($e===0)var n=Ne.return;else n=Ne,ri=ur=null,Cc(n),Jr=null,nl=0,n=Ne;for(;n!==null;)Eg(n.alternate,n),n=n.return;Ne=null}}function ua(n,r){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,vE(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),mi=0,sd(),Ze=n,Ne=l=ni(n.current,null),Me=r,$e=0,ln=null,Hi=!1,la=ae(n,r),nd=!1,oa=on=id=br=Ui=rt=0,Xt=bl=null,rd=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var p=31-Ge(u),m=1<<p;r|=n[p],u&=~m}return pi=r,So(),l}function qg(n,r){we=null,z.H=cl,r===Wr||r===Lo?(r=sm(),$e=3):r===fc?(r=sm(),$e=4):$e=r===Bc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ln=r,Ne===null&&(rt=1,Go(n,gn(r,n.current)))}function Yg(){var n=rn.current;return n===null?!0:(Me&4194048)===Me?_n===null:(Me&62914560)===Me||(Me&536870912)!==0?n===_n:!1}function Xg(){var n=z.H;return z.H=cl,n===null?cl:n}function Qg(){var n=z.A;return z.A=KS,n}function ts(){rt=4,Hi||(Me&4194048)!==Me&&rn.current!==null||(la=!0),(Ui&134217727)===0&&(br&134217727)===0||Ze===null||ji(Ze,Me,on,!1)}function ud(n,r,l){var u=Be;Be|=2;var p=Xg(),m=Qg();(Ze!==n||Me!==r)&&(Jo=null,ua(n,r)),r=!1;var _=rt;e:do try{if($e!==0&&Ne!==null){var E=Ne,N=ln;switch($e){case 8:sd(),_=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(r=!0);var G=$e;if($e=0,ln=null,ca(n,E,N,G),l&&la){_=0;break e}break;default:G=$e,$e=0,ln=null,ca(n,E,N,G)}}eE(),_=rt;break}catch(K){qg(n,K)}while(!0);return r&&n.shellSuspendCounter++,ri=ur=null,Be=u,z.H=p,z.A=m,Ne===null&&(Ze=null,Me=0,So()),_}function eE(){for(;Ne!==null;)Zg(Ne)}function tE(n,r){var l=Be;Be|=2;var u=Xg(),p=Qg();Ze!==n||Me!==r?(Jo=null,Wo=xt()+500,ua(n,r)):la=ae(n,r);e:do try{if($e!==0&&Ne!==null){r=Ne;var m=ln;t:switch($e){case 1:$e=0,ln=null,ca(n,r,m,1);break;case 2:case 9:if(lm(m)){$e=0,ln=null,Kg(r);break}r=function(){$e!==2&&$e!==9||Ze!==n||($e=7),jn(n)},m.then(r,r);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:lm(m)?($e=0,ln=null,Kg(r)):($e=0,ln=null,ca(n,r,m,7));break;case 5:var _=null;switch(Ne.tag){case 26:_=Ne.memoizedState;case 5:case 27:var E=Ne;if(_?zy(_):E.stateNode.complete){$e=0,ln=null;var N=E.sibling;if(N!==null)Ne=N;else{var G=E.return;G!==null?(Ne=G,ns(G)):Ne=null}break t}}$e=0,ln=null,ca(n,r,m,5);break;case 6:$e=0,ln=null,ca(n,r,m,6);break;case 8:sd(),rt=6;break e;default:throw Error(a(462))}}nE();break}catch(K){qg(n,K)}while(!0);return ri=ur=null,z.H=u,z.A=p,Be=l,Ne!==null?0:(Ze=null,Me=0,So(),rt)}function nE(){for(;Ne!==null&&!Pa();)Zg(Ne)}function Zg(n){var r=_g(n.alternate,n,pi);n.memoizedProps=n.pendingProps,r===null?ns(n):Ne=r}function Kg(n){var r=n,l=r.alternate;switch(r.tag){case 15:case 0:r=pg(l,r,r.pendingProps,r.type,void 0,Me);break;case 11:r=pg(l,r,r.pendingProps,r.type.render,r.ref,Me);break;case 5:Cc(r);default:Eg(l,r),r=Ne=Qp(r,pi),r=_g(l,r,pi)}n.memoizedProps=n.pendingProps,r===null?ns(n):Ne=r}function ca(n,r,l,u){ri=ur=null,Cc(r),Jr=null,nl=0;var p=r.return;try{if($S(n,p,r,l,Me)){rt=1,Go(n,gn(l,n.current)),Ne=null;return}}catch(m){if(p!==null)throw Ne=p,m;rt=1,Go(n,gn(l,n.current)),Ne=null;return}r.flags&32768?(ze||u===1?n=!0:la||(Me&536870912)!==0?n=!1:(Hi=n=!0,(u===2||u===9||u===3||u===6)&&(u=rn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Wg(r,n)):ns(r)}function ns(n){var r=n;do{if((r.flags&32768)!==0){Wg(r,Hi);return}n=r.return;var l=YS(r.alternate,r,pi);if(l!==null){Ne=l;return}if(r=r.sibling,r!==null){Ne=r;return}Ne=r=n}while(r!==null);rt===0&&(rt=5)}function Wg(n,r){do{var l=XS(n.alternate,n);if(l!==null){l.flags&=32767,Ne=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(n=n.sibling,n!==null)){Ne=n;return}Ne=n=l}while(n!==null);rt=6,Ne=null}function Jg(n,r,l,u,p,m,_,E,N){n.cancelPendingCommit=null;do is();while(bt!==0);if((Be&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(m=r.lanes|r.childLanes,m|=Ku,Ci(n,l,m,_,E,N),n===Ze&&(Ne=Ze=null,Me=0),sa=r,Bi=n,mi=l,ad=m,ld=p,Vg=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,lE(ve,function(){return ry(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=z.T,z.T=null,p=$.p,$.p=2,_=Be,Be|=4;try{QS(n,r,l)}finally{Be=_,$.p=p,z.T=u}}bt=1,ey(),ty(),ny()}}function ey(){if(bt===1){bt=0;var n=Bi,r=sa,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var u=$.p;$.p=2;var p=Be;Be|=4;try{Mg(r,n);var m=Sd,_=Bp(n.containerInfo),E=m.focusedElem,N=m.selectionRange;if(_!==E&&E&&E.ownerDocument&&Pp(E.ownerDocument.documentElement,E)){if(N!==null&&qu(E)){var G=N.start,K=N.end;if(K===void 0&&(K=G),"selectionStart"in E)E.selectionStart=G,E.selectionEnd=Math.min(K,E.value.length);else{var ne=E.ownerDocument||document,F=ne&&ne.defaultView||window;if(F.getSelection){var Y=F.getSelection(),de=E.textContent.length,_e=Math.min(N.start,de),Xe=N.end===void 0?_e:Math.min(N.end,de);!Y.extend&&_e>Xe&&(_=Xe,Xe=_e,_e=_);var P=Up(E,_e),M=Up(E,Xe);if(P&&M&&(Y.rangeCount!==1||Y.anchorNode!==P.node||Y.anchorOffset!==P.offset||Y.focusNode!==M.node||Y.focusOffset!==M.offset)){var V=ne.createRange();V.setStart(P.node,P.offset),Y.removeAllRanges(),_e>Xe?(Y.addRange(V),Y.extend(M.node,M.offset)):(V.setEnd(M.node,M.offset),Y.addRange(V))}}}}for(ne=[],Y=E;Y=Y.parentNode;)Y.nodeType===1&&ne.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ne.length;E++){var ee=ne[E];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}ms=!!_d,Sd=_d=null}finally{Be=p,$.p=u,z.T=l}}n.current=r,bt=2}}function ty(){if(bt===2){bt=0;var n=Bi,r=sa,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var u=$.p;$.p=2;var p=Be;Be|=4;try{Lg(n,r.alternate,r)}finally{Be=p,$.p=u,z.T=l}}bt=3}}function ny(){if(bt===4||bt===3){bt=0,Ba();var n=Bi,r=sa,l=mi,u=Vg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?bt=5:(bt=0,sa=Bi=null,iy(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Pi=null),Au(l),r=r.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(Ct,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=z.T,p=$.p,$.p=2,z.T=null;try{for(var m=n.onRecoverableError,_=0;_<u.length;_++){var E=u[_];m(E.value,{componentStack:E.stack})}}finally{z.T=r,$.p=p}}(mi&3)!==0&&is(),jn(n),p=n.pendingLanes,(l&261930)!==0&&(p&42)!==0?n===od?vl++:(vl=0,od=n):vl=0,_l(0)}}function iy(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,el(r)))}function is(){return ey(),ty(),ny(),ry()}function ry(){if(bt!==5)return!1;var n=Bi,r=ad;ad=0;var l=Au(mi),u=z.T,p=$.p;try{$.p=32>l?32:l,z.T=null,l=ld,ld=null;var m=Bi,_=mi;if(bt=0,sa=Bi=null,mi=0,(Be&6)!==0)throw Error(a(331));var E=Be;if(Be|=4,Pg(m.current),zg(m,m.current,_,l),Be=E,_l(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Ct,m)}catch{}return!0}finally{$.p=p,z.T=u,iy(n,r)}}function ay(n,r,l){r=gn(l,r),r=Pc(n.stateNode,r,2),n=Oi(n,r,2),n!==null&&(Vt(n,2),jn(n))}function Fe(n,r,l){if(n.tag===3)ay(n,n,l);else for(;r!==null;){if(r.tag===3){ay(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Pi===null||!Pi.has(u))){n=gn(l,n),l=lg(2),u=Oi(r,l,2),u!==null&&(og(l,u,r,n),Vt(u,2),jn(u));break}}r=r.return}}function cd(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new WS;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(l)||(nd=!0,p.add(l),n=iE.bind(null,n,r,l),r.then(n,n))}function iE(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Ze===n&&(Me&l)===l&&(rt===4||rt===3&&(Me&62914560)===Me&&300>xt()-Ko?(Be&2)===0&&ua(n,0):id|=l,oa===Me&&(oa=0)),jn(n)}function ly(n,r){r===0&&(r=ke()),n=lr(n,r),n!==null&&(Vt(n,r),jn(n))}function rE(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),ly(n,l)}function aE(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),ly(n,l)}function lE(n,r){return xi(n,r)}var rs=null,da=null,dd=!1,as=!1,fd=!1,Vi=0;function jn(n){n!==da&&n.next===null&&(da===null?rs=da=n:da=da.next=n),as=!0,dd||(dd=!0,sE())}function _l(n,r){if(!fd&&as){fd=!0;do for(var l=!1,u=rs;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var _=u.suspendedLanes,E=u.pingedLanes;m=(1<<31-Ge(42|n)+1)-1,m&=p&~(_&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,cy(u,m))}else m=Me,m=Dr(u,u===Ze?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||ae(u,m)||(l=!0,cy(u,m));u=u.next}while(l);fd=!1}}function oE(){oy()}function oy(){as=dd=!1;var n=0;Vi!==0&&bE()&&(n=Vi);for(var r=xt(),l=null,u=rs;u!==null;){var p=u.next,m=sy(u,r);m===0?(u.next=null,l===null?rs=p:l.next=p,p===null&&(da=l)):(l=u,(n!==0||(m&3)!==0)&&(as=!0)),u=p}bt!==0&&bt!==5||_l(n),Vi!==0&&(Vi=0)}function sy(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var _=31-Ge(m),E=1<<_,N=p[_];N===-1?((E&l)===0||(E&u)!==0)&&(p[_]=be(E,r)):N<=r&&(n.expiredLanes|=E),m&=~E}if(r=Ze,l=Me,l=Dr(n,n===r?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===r&&($e===2||$e===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&tr(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||ae(n,l)){if(r=l&-l,r===n.callbackPriority)return r;switch(u!==null&&tr(u),Au(l)){case 2:case 8:l=ce;break;case 32:l=ve;break;case 268435456:l=He;break;default:l=ve}return u=uy.bind(null,n),l=xi(l,u),n.callbackPriority=r,n.callbackNode=l,r}return u!==null&&u!==null&&tr(u),n.callbackPriority=2,n.callbackNode=null,2}function uy(n,r){if(bt!==0&&bt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(is()&&n.callbackNode!==l)return null;var u=Me;return u=Dr(n,n===Ze?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:($g(n,u,r),sy(n,xt()),n.callbackNode!=null&&n.callbackNode===l?uy.bind(null,n):null)}function cy(n,r){if(is())return null;$g(n,r,!0)}function sE(){_E(function(){(Be&6)!==0?xi(J,oE):oy()})}function hd(){if(Vi===0){var n=Zr;n===0&&(n=Kn,Kn<<=1,(Kn&261888)===0&&(Kn=256)),Vi=n}return Vi}function dy(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ho(""+n)}function fy(n,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,n.id&&l.setAttribute("form",n.id),r.parentNode.insertBefore(l,r),n=new FormData(n),l.parentNode.removeChild(l),n}function uE(n,r,l,u,p){if(r==="submit"&&l&&l.stateNode===p){var m=dy((p[Gt]||null).action),_=u.submitter;_&&(r=(r=_[Gt]||null)?dy(r.formAction):_.getAttribute("formAction"),r!==null&&(m=r,_=null));var E=new yo("action","action",null,u,p);n.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Vi!==0){var N=_?fy(p,_):new FormData(p);Oc(l,{pending:!0,data:N,method:p.method,action:m},null,N)}}else typeof m=="function"&&(E.preventDefault(),N=_?fy(p,_):new FormData(p),Oc(l,{pending:!0,data:N,method:p.method,action:m},m,N))},currentTarget:p}]})}}for(var pd=0;pd<Zu.length;pd++){var md=Zu[pd],cE=md.toLowerCase(),dE=md[0].toUpperCase()+md.slice(1);Rn(cE,"on"+dE)}Rn(Gp,"onAnimationEnd"),Rn($p,"onAnimationIteration"),Rn(Fp,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(AS,"onTransitionRun"),Rn(TS,"onTransitionStart"),Rn(LS,"onTransitionCancel"),Rn(qp,"onTransitionEnd"),zr("onMouseEnter",["mouseout","mouseover"]),zr("onMouseLeave",["mouseout","mouseover"]),zr("onPointerEnter",["pointerout","pointerover"]),zr("onPointerLeave",["pointerout","pointerover"]),nr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),nr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),nr("onBeforeInput",["compositionend","keypress","textInput","paste"]),nr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),nr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),nr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="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(" "),fE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sl));function hy(n,r){r=(r&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],p=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var _=u.length-1;0<=_;_--){var E=u[_],N=E.instance,G=E.currentTarget;if(E=E.listener,N!==m&&p.isPropagationStopped())break e;m=E,p.currentTarget=G;try{m(p)}catch(K){_o(K)}p.currentTarget=null,m=N}else for(_=0;_<u.length;_++){if(E=u[_],N=E.instance,G=E.currentTarget,E=E.listener,N!==m&&p.isPropagationStopped())break e;m=E,p.currentTarget=G;try{m(p)}catch(K){_o(K)}p.currentTarget=null,m=N}}}}function Oe(n,r){var l=r[Tu];l===void 0&&(l=r[Tu]=new Set);var u=n+"__bubble";l.has(u)||(py(r,n,2,!1),l.add(u))}function gd(n,r,l){var u=0;r&&(u|=4),py(l,n,u,r)}var ls="_reactListening"+Math.random().toString(36).slice(2);function yd(n){if(!n[ls]){n[ls]=!0,op.forEach(function(l){l!=="selectionchange"&&(fE.has(l)||gd(l,!1,n),gd(l,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[ls]||(r[ls]=!0,gd("selectionchange",!1,r))}}function py(n,r,l,u){switch(Gy(r)){case 2:var p=BE;break;case 8:p=jE;break;default:p=Nd}l=p.bind(null,r,l,n),p=void 0,!Hu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(r,l,{capture:!0,passive:p}):n.addEventListener(r,l,!0):p!==void 0?n.addEventListener(r,l,{passive:p}):n.addEventListener(r,l,!1)}function bd(n,r,l,u,p){var m=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var _=u.tag;if(_===3||_===4){var E=u.stateNode.containerInfo;if(E===p)break;if(_===4)for(_=u.return;_!==null;){var N=_.tag;if((N===3||N===4)&&_.stateNode.containerInfo===p)return;_=_.return}for(;E!==null;){if(_=Or(E),_===null)return;if(N=_.tag,N===5||N===6||N===26||N===27){u=m=_;continue e}E=E.parentNode}}u=u.return}vp(function(){var G=m,K=Iu(l),ne=[];e:{var F=Yp.get(n);if(F!==void 0){var Y=yo,de=n;switch(n){case"keypress":if(mo(l)===0)break e;case"keydown":case"keyup":Y=aS;break;case"focusin":de="focus",Y=ju;break;case"focusout":de="blur",Y=ju;break;case"beforeblur":case"afterblur":Y=ju;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Ep;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=Y_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=sS;break;case Gp:case $p:case Fp:Y=Z_;break;case qp:Y=cS;break;case"scroll":case"scrollend":Y=F_;break;case"wheel":Y=fS;break;case"copy":case"cut":case"paste":Y=W_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Cp;break;case"toggle":case"beforetoggle":Y=pS}var _e=(r&4)!==0,Xe=!_e&&(n==="scroll"||n==="scrollend"),P=_e?F!==null?F+"Capture":null:F;_e=[];for(var M=G,V;M!==null;){var ee=M;if(V=ee.stateNode,ee=ee.tag,ee!==5&&ee!==26&&ee!==27||V===null||P===null||(ee=Ga(M,P),ee!=null&&_e.push(El(M,ee,V))),Xe)break;M=M.return}0<_e.length&&(F=new Y(F,de,null,l,K),ne.push({event:F,listeners:_e}))}}if((r&7)===0){e:{if(F=n==="mouseover"||n==="pointerover",Y=n==="mouseout"||n==="pointerout",F&&l!==Mu&&(de=l.relatedTarget||l.fromElement)&&(Or(de)||de[Nr]))break e;if((Y||F)&&(F=K.window===K?K:(F=K.ownerDocument)?F.defaultView||F.parentWindow:window,Y?(de=l.relatedTarget||l.toElement,Y=G,de=de?Or(de):null,de!==null&&(Xe=s(de),_e=de.tag,de!==Xe||_e!==5&&_e!==27&&_e!==6)&&(de=null)):(Y=null,de=G),Y!==de)){if(_e=Ep,ee="onMouseLeave",P="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(_e=Cp,ee="onPointerLeave",P="onPointerEnter",M="pointer"),Xe=Y==null?F:Va(Y),V=de==null?F:Va(de),F=new _e(ee,M+"leave",Y,l,K),F.target=Xe,F.relatedTarget=V,ee=null,Or(K)===G&&(_e=new _e(P,M+"enter",de,l,K),_e.target=V,_e.relatedTarget=Xe,ee=_e),Xe=ee,Y&&de)t:{for(_e=hE,P=Y,M=de,V=0,ee=P;ee;ee=_e(ee))V++;ee=0;for(var ye=M;ye;ye=_e(ye))ee++;for(;0<V-ee;)P=_e(P),V--;for(;0<ee-V;)M=_e(M),ee--;for(;V--;){if(P===M||M!==null&&P===M.alternate){_e=P;break t}P=_e(P),M=_e(M)}_e=null}else _e=null;Y!==null&&my(ne,F,Y,_e,!1),de!==null&&Xe!==null&&my(ne,Xe,de,_e,!0)}}e:{if(F=G?Va(G):window,Y=F.nodeName&&F.nodeName.toLowerCase(),Y==="select"||Y==="input"&&F.type==="file")var Ue=Np;else if(Rp(F))if(Op)Ue=CS;else{Ue=ES;var pe=SS}else Y=F.nodeName,!Y||Y.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?G&&Ou(G.elementType)&&(Ue=Np):Ue=xS;if(Ue&&(Ue=Ue(n,G))){Dp(ne,Ue,l,K);break e}pe&&pe(n,F,G),n==="focusout"&&G&&F.type==="number"&&G.memoizedProps.value!=null&&Nu(F,"number",F.value)}switch(pe=G?Va(G):window,n){case"focusin":(Rp(pe)||pe.contentEditable==="true")&&(Vr=pe,Yu=G,Ka=null);break;case"focusout":Ka=Yu=Vr=null;break;case"mousedown":Xu=!0;break;case"contextmenu":case"mouseup":case"dragend":Xu=!1,jp(ne,l,K);break;case"selectionchange":if(kS)break;case"keydown":case"keyup":jp(ne,l,K)}var Ae;if(Gu)e:{switch(n){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else jr?Tp(n,l)&&(Ie="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Ie="onCompositionStart");Ie&&(wp&&l.locale!=="ko"&&(jr||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&jr&&(Ae=_p()):(ki=K,Uu="value"in ki?ki.value:ki.textContent,jr=!0)),pe=os(G,Ie),0<pe.length&&(Ie=new xp(Ie,n,null,l,K),ne.push({event:Ie,listeners:pe}),Ae?Ie.data=Ae:(Ae=Lp(l),Ae!==null&&(Ie.data=Ae)))),(Ae=gS?yS(n,l):bS(n,l))&&(Ie=os(G,"onBeforeInput"),0<Ie.length&&(pe=new xp("onBeforeInput","beforeinput",null,l,K),ne.push({event:pe,listeners:Ie}),pe.data=Ae)),uE(ne,n,G,l,K)}hy(ne,r)})}function El(n,r,l){return{instance:n,listener:r,currentTarget:l}}function os(n,r){for(var l=r+"Capture",u=[];n!==null;){var p=n,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=Ga(n,l),p!=null&&u.unshift(El(n,p,m)),p=Ga(n,r),p!=null&&u.push(El(n,p,m))),n.tag===3)return u;n=n.return}return[]}function hE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function my(n,r,l,u,p){for(var m=r._reactName,_=[];l!==null&&l!==u;){var E=l,N=E.alternate,G=E.stateNode;if(E=E.tag,N!==null&&N===u)break;E!==5&&E!==26&&E!==27||G===null||(N=G,p?(G=Ga(l,m),G!=null&&_.unshift(El(l,G,N))):p||(G=Ga(l,m),G!=null&&_.push(El(l,G,N)))),l=l.return}_.length!==0&&n.push({event:r,listeners:_})}var pE=/\r\n?/g,mE=/\u0000|\uFFFD/g;function gy(n){return(typeof n=="string"?n:""+n).replace(pE,`
10
+ `).replace(mE,"")}function yy(n,r){return r=gy(r),gy(n)===r}function Ye(n,r,l,u,p,m){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Ur(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Ur(n,""+u);break;case"className":co(n,"class",u);break;case"tabIndex":co(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":co(n,l,u);break;case"style":yp(n,u,m);break;case"data":if(r!=="object"){co(n,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){n.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=ho(""+u),n.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(l,"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 m=="function"&&(l==="formAction"?(r!=="input"&&Ye(n,r,"name",p.name,p,null),Ye(n,r,"formEncType",p.formEncType,p,null),Ye(n,r,"formMethod",p.formMethod,p,null),Ye(n,r,"formTarget",p.formTarget,p,null)):(Ye(n,r,"encType",p.encType,p,null),Ye(n,r,"method",p.method,p,null),Ye(n,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=ho(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=ei);break;case"onScroll":u!=null&&Oe("scroll",n);break;case"onScrollEnd":u!=null&&Oe("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}l=ho(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""+u):n.removeAttribute(l);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":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":u===!0?n.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,u):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(l,u):n.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(l):n.setAttribute(l,u);break;case"popover":Oe("beforetoggle",n),Oe("toggle",n),uo(n,"popover",u);break;case"xlinkActuate":Jn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Jn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Jn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Jn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Jn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Jn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Jn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Jn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Jn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":uo(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=G_.get(l)||l,uo(n,l,u))}}function vd(n,r,l,u,p,m){switch(l){case"style":yp(n,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"children":typeof u=="string"?Ur(n,u):(typeof u=="number"||typeof u=="bigint")&&Ur(n,""+u);break;case"onScroll":u!=null&&Oe("scroll",n);break;case"onScrollEnd":u!=null&&Oe("scrollend",n);break;case"onClick":u!=null&&(n.onclick=ei);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sp.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),r=l.slice(2,p?l.length-7:void 0),m=n[Gt]||null,m=m!=null?m[l]:null,typeof m=="function"&&n.removeEventListener(r,m,p),typeof u=="function")){typeof m!="function"&&m!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(r,u,p);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):uo(n,l,u)}}}function Mt(n,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",n),Oe("load",n);var u=!1,p=!1,m;for(m in l)if(l.hasOwnProperty(m)){var _=l[m];if(_!=null)switch(m){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ye(n,r,m,_,l,null)}}p&&Ye(n,r,"srcSet",l.srcSet,l,null),u&&Ye(n,r,"src",l.src,l,null);return;case"input":Oe("invalid",n);var E=m=_=p=null,N=null,G=null;for(u in l)if(l.hasOwnProperty(u)){var K=l[u];if(K!=null)switch(u){case"name":p=K;break;case"type":_=K;break;case"checked":N=K;break;case"defaultChecked":G=K;break;case"value":m=K;break;case"defaultValue":E=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(a(137,r));break;default:Ye(n,r,u,K,l,null)}}hp(n,m,E,N,G,_,p,!1);return;case"select":Oe("invalid",n),u=_=m=null;for(p in l)if(l.hasOwnProperty(p)&&(E=l[p],E!=null))switch(p){case"value":m=E;break;case"defaultValue":_=E;break;case"multiple":u=E;default:Ye(n,r,p,E,l,null)}r=m,l=_,n.multiple=!!u,r!=null?Hr(n,!!u,r,!1):l!=null&&Hr(n,!!u,l,!0);return;case"textarea":Oe("invalid",n),m=p=u=null;for(_ in l)if(l.hasOwnProperty(_)&&(E=l[_],E!=null))switch(_){case"value":u=E;break;case"defaultValue":p=E;break;case"children":m=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:Ye(n,r,_,E,l,null)}mp(n,u,p,m);return;case"option":for(N in l)l.hasOwnProperty(N)&&(u=l[N],u!=null)&&(N==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":Ye(n,r,N,u,l,null));return;case"dialog":Oe("beforetoggle",n),Oe("toggle",n),Oe("cancel",n),Oe("close",n);break;case"iframe":case"object":Oe("load",n);break;case"video":case"audio":for(u=0;u<Sl.length;u++)Oe(Sl[u],n);break;case"image":Oe("error",n),Oe("load",n);break;case"details":Oe("toggle",n);break;case"embed":case"source":case"link":Oe("error",n),Oe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in l)if(l.hasOwnProperty(G)&&(u=l[G],u!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ye(n,r,G,u,l,null)}return;default:if(Ou(r)){for(K in l)l.hasOwnProperty(K)&&(u=l[K],u!==void 0&&vd(n,r,K,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&Ye(n,r,E,u,l,null))}function gE(n,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,m=null,_=null,E=null,N=null,G=null,K=null;for(Y in l){var ne=l[Y];if(l.hasOwnProperty(Y)&&ne!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":N=ne;default:u.hasOwnProperty(Y)||Ye(n,r,Y,null,u,ne)}}for(var F in u){var Y=u[F];if(ne=l[F],u.hasOwnProperty(F)&&(Y!=null||ne!=null))switch(F){case"type":m=Y;break;case"name":p=Y;break;case"checked":G=Y;break;case"defaultChecked":K=Y;break;case"value":_=Y;break;case"defaultValue":E=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(a(137,r));break;default:Y!==ne&&Ye(n,r,F,Y,u,ne)}}Du(n,_,E,N,G,K,m,p);return;case"select":Y=_=E=F=null;for(m in l)if(N=l[m],l.hasOwnProperty(m)&&N!=null)switch(m){case"value":break;case"multiple":Y=N;default:u.hasOwnProperty(m)||Ye(n,r,m,null,u,N)}for(p in u)if(m=u[p],N=l[p],u.hasOwnProperty(p)&&(m!=null||N!=null))switch(p){case"value":F=m;break;case"defaultValue":E=m;break;case"multiple":_=m;default:m!==N&&Ye(n,r,p,m,u,N)}r=E,l=_,u=Y,F!=null?Hr(n,!!l,F,!1):!!u!=!!l&&(r!=null?Hr(n,!!l,r,!0):Hr(n,!!l,l?[]:"",!1));return;case"textarea":Y=F=null;for(E in l)if(p=l[E],l.hasOwnProperty(E)&&p!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ye(n,r,E,null,u,p)}for(_ in u)if(p=u[_],m=l[_],u.hasOwnProperty(_)&&(p!=null||m!=null))switch(_){case"value":F=p;break;case"defaultValue":Y=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==m&&Ye(n,r,_,p,u,m)}pp(n,F,Y);return;case"option":for(var de in l)F=l[de],l.hasOwnProperty(de)&&F!=null&&!u.hasOwnProperty(de)&&(de==="selected"?n.selected=!1:Ye(n,r,de,null,u,F));for(N in u)F=u[N],Y=l[N],u.hasOwnProperty(N)&&F!==Y&&(F!=null||Y!=null)&&(N==="selected"?n.selected=F&&typeof F!="function"&&typeof F!="symbol":Ye(n,r,N,F,u,Y));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 _e in l)F=l[_e],l.hasOwnProperty(_e)&&F!=null&&!u.hasOwnProperty(_e)&&Ye(n,r,_e,null,u,F);for(G in u)if(F=u[G],Y=l[G],u.hasOwnProperty(G)&&F!==Y&&(F!=null||Y!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(a(137,r));break;default:Ye(n,r,G,F,u,Y)}return;default:if(Ou(r)){for(var Xe in l)F=l[Xe],l.hasOwnProperty(Xe)&&F!==void 0&&!u.hasOwnProperty(Xe)&&vd(n,r,Xe,void 0,u,F);for(K in u)F=u[K],Y=l[K],!u.hasOwnProperty(K)||F===Y||F===void 0&&Y===void 0||vd(n,r,K,F,u,Y);return}}for(var P in l)F=l[P],l.hasOwnProperty(P)&&F!=null&&!u.hasOwnProperty(P)&&Ye(n,r,P,null,u,F);for(ne in u)F=u[ne],Y=l[ne],!u.hasOwnProperty(ne)||F===Y||F==null&&Y==null||Ye(n,r,ne,F,u,Y)}function by(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var p=l[u],m=p.transferSize,_=p.initiatorType,E=p.duration;if(m&&E&&by(_)){for(_=0,E=p.responseEnd,u+=1;u<l.length;u++){var N=l[u],G=N.startTime;if(G>E)break;var K=N.transferSize,ne=N.initiatorType;K&&by(ne)&&(N=N.responseEnd,_+=K*(N<E?1:(E-G)/(N-G)))}if(--u,r+=8*(m+_)/(p.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var _d=null,Sd=null;function ss(n){return n.nodeType===9?n:n.ownerDocument}function vy(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _y(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function Ed(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var xd=null;function bE(){var n=window.event;return n&&n.type==="popstate"?n===xd?!1:(xd=n,!0):(xd=null,!1)}var Sy=typeof setTimeout=="function"?setTimeout:void 0,vE=typeof clearTimeout=="function"?clearTimeout:void 0,Ey=typeof Promise=="function"?Promise:void 0,_E=typeof queueMicrotask=="function"?queueMicrotask:typeof Ey<"u"?function(n){return Ey.resolve(null).then(n).catch(SE)}:Sy;function SE(n){setTimeout(function(){throw n})}function Gi(n){return n==="head"}function xy(n,r){var l=r,u=0;do{var p=l.nextSibling;if(n.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(p),ma(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")xl(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,xl(l);for(var m=l.firstChild;m;){var _=m.nextSibling,E=m.nodeName;m[ja]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=_}}else l==="body"&&xl(n.ownerDocument.body);l=p}while(l);ma(r)}function Cy(n,r){var l=n;n=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=u}while(l)}function Cd(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Cd(l),Lu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function EE(n,r,l,u){for(;n.nodeType===1;){var p=l;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[ja])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var m=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=Sn(n.nextSibling),n===null)break}return null}function xE(n,r,l){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=Sn(n.nextSibling),n===null))return null;return n}function wy(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Sn(n.nextSibling),n===null))return null;return n}function wd(n){return n.data==="$?"||n.data==="$~"}function kd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function CE(n,r){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Sn(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var Ad=null;function ky(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(r===0)return Sn(n.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}n=n.nextSibling}return null}function Ay(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return n;r--}else l!=="/$"&&l!=="/&"||r++}n=n.previousSibling}return null}function Ty(n,r,l){switch(r=ss(l),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function xl(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Lu(n)}var En=new Map,Ly=new Set;function us(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var gi=$.d;$.d={f:wE,r:kE,D:AE,C:TE,L:LE,m:RE,X:NE,S:DE,M:OE};function wE(){var n=gi.f(),r=es();return n||r}function kE(n){var r=Mr(n);r!==null&&r.tag===5&&r.type==="form"?qm(r):gi.r(n)}var fa=typeof document>"u"?null:document;function Ry(n,r,l){var u=fa;if(u&&typeof r=="string"&&r){var p=pn(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),Ly.has(p)||(Ly.add(p),n={rel:n,crossOrigin:l,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),Mt(r,"link",n),wt(r),u.head.appendChild(r)))}}function AE(n){gi.D(n),Ry("dns-prefetch",n,null)}function TE(n,r){gi.C(n,r),Ry("preconnect",n,r)}function LE(n,r,l){gi.L(n,r,l);var u=fa;if(u&&n&&r){var p='link[rel="preload"][as="'+pn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+pn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+pn(l.imageSizes)+'"]')):p+='[href="'+pn(n)+'"]';var m=p;switch(r){case"style":m=ha(n);break;case"script":m=pa(n)}En.has(m)||(n=g({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),En.set(m,n),u.querySelector(p)!==null||r==="style"&&u.querySelector(Cl(m))||r==="script"&&u.querySelector(wl(m))||(r=u.createElement("link"),Mt(r,"link",n),wt(r),u.head.appendChild(r)))}}function RE(n,r){gi.m(n,r);var l=fa;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+pn(u)+'"][href="'+pn(n)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=pa(n)}if(!En.has(m)&&(n=g({rel:"modulepreload",href:n},r),En.set(m,n),l.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(wl(m)))return}u=l.createElement("link"),Mt(u,"link",n),wt(u),l.head.appendChild(u)}}}function DE(n,r,l){gi.S(n,r,l);var u=fa;if(u&&n){var p=Ir(u).hoistableStyles,m=ha(n);r=r||"default";var _=p.get(m);if(!_){var E={loading:0,preload:null};if(_=u.querySelector(Cl(m)))E.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":r},l),(l=En.get(m))&&Td(n,l);var N=_=u.createElement("link");wt(N),Mt(N,"link",n),N._p=new Promise(function(G,K){N.onload=G,N.onerror=K}),N.addEventListener("load",function(){E.loading|=1}),N.addEventListener("error",function(){E.loading|=2}),E.loading|=4,cs(_,r,u)}_={type:"stylesheet",instance:_,count:1,state:E},p.set(m,_)}}}function NE(n,r){gi.X(n,r);var l=fa;if(l&&n){var u=Ir(l).hoistableScripts,p=pa(n),m=u.get(p);m||(m=l.querySelector(wl(p)),m||(n=g({src:n,async:!0},r),(r=En.get(p))&&Ld(n,r),m=l.createElement("script"),wt(m),Mt(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function OE(n,r){gi.M(n,r);var l=fa;if(l&&n){var u=Ir(l).hoistableScripts,p=pa(n),m=u.get(p);m||(m=l.querySelector(wl(p)),m||(n=g({src:n,async:!0,type:"module"},r),(r=En.get(p))&&Ld(n,r),m=l.createElement("script"),wt(m),Mt(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function Dy(n,r,l,u){var p=(p=he.current)?us(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=ha(l.href),l=Ir(p).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=ha(l.href);var m=Ir(p).hoistableStyles,_=m.get(n);if(_||(p=p.ownerDocument||p,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,_),(m=p.querySelector(Cl(n)))&&!m._p&&(_.instance=m,_.state.loading=5),En.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},En.set(n,l),m||ME(p,n,l,_.state))),r&&u===null)throw Error(a(528,""));return _}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=pa(l),l=Ir(p).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function ha(n){return'href="'+pn(n)+'"'}function Cl(n){return'link[rel="stylesheet"]['+n+"]"}function Ny(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function ME(n,r,l,u){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=n.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),Mt(r,"link",l),wt(r),n.head.appendChild(r))}function pa(n){return'[src="'+pn(n)+'"]'}function wl(n){return"script[async]"+n}function Oy(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+pn(l.href)+'"]');if(u)return r.instance=u,wt(u),u;var p=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),wt(u),Mt(u,"style",p),cs(u,l.precedence,n),r.instance=u;case"stylesheet":p=ha(l.href);var m=n.querySelector(Cl(p));if(m)return r.state.loading|=4,r.instance=m,wt(m),m;u=Ny(l),(p=En.get(p))&&Td(u,p),m=(n.ownerDocument||n).createElement("link"),wt(m);var _=m;return _._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),Mt(m,"link",u),r.state.loading|=4,cs(m,l.precedence,n),r.instance=m;case"script":return m=pa(l.src),(p=n.querySelector(wl(m)))?(r.instance=p,wt(p),p):(u=l,(p=En.get(m))&&(u=g({},l),Ld(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),wt(p),Mt(p,"link",u),n.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,cs(u,l.precedence,n));return r.instance}function cs(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,_=0;_<u.length;_++){var E=u[_];if(E.dataset.precedence===r)m=E;else if(m!==p)break}m?m.parentNode.insertBefore(n,m.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(n,r.firstChild))}function Td(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Ld(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var ds=null;function My(n,r,l){if(ds===null){var u=new Map,p=ds=new Map;p.set(l,u)}else p=ds,u=p.get(l),u||(u=new Map,p.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),p=0;p<l.length;p++){var m=l[p];if(!(m[ja]||m[Rt]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var _=m.getAttribute(r)||"";_=n+_;var E=u.get(_);E?E.push(m):u.set(_,[m])}}return u}function Iy(n,r,l){n=n.ownerDocument||n,n.head.insertBefore(l,r==="title"?n.querySelector("head > title"):null)}function IE(n,r,l){if(l===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function zy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function zE(n,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=ha(u.href),m=r.querySelector(Cl(p));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=fs.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=m,wt(m);return}m=r.ownerDocument||r,u=Ny(u),(p=En.get(p))&&Td(u,p),m=m.createElement("link"),wt(m);var _=m;_._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),Mt(m,"link",u),l.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=fs.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var Rd=0;function HE(n,r){return n.stylesheets&&n.count===0&&ps(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&ps(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+r);0<n.imgBytes&&Rd===0&&(Rd=62500*yE());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&ps(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>Rd?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function fs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ps(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var hs=null;function ps(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,hs=new Map,r.forEach(UE,n),hs=null,fs.call(n))}function UE(n,r){if(!(r.state.loading&4)){var l=hs.get(n);if(l)var u=l.get(null);else{l=new Map,hs.set(n,l);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var _=p[m];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),u=_)}u&&l.set(null,u)}p=r.instance,_=p.getAttribute("data-precedence"),m=l.get(_)||u,m===u&&l.set(null,p),l.set(_,p),this.count++,u=fs.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),m?m.parentNode.insertBefore(p,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),r.state.loading|=4}}var kl={$$typeof:A,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function PE(n,r,l,u,p,m,_,E,N){this.tag=1,this.containerInfo=n,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=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Hy(n,r,l,u,p,m,_,E,N,G,K,ne){return n=new PE(n,r,l,_,N,G,K,ne,E),r=1,m===!0&&(r|=24),m=nn(3,null,null,r),n.current=m,m.stateNode=n,r=uc(),r.refCount++,n.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:l,cache:r},hc(m),n}function Uy(n){return n?(n=Fr,n):Fr}function Py(n,r,l,u,p,m){p=Uy(p),u.context===null?u.context=p:u.pendingContext=p,u=Ni(r),u.payload={element:l},m=m===void 0?null:m,m!==null&&(u.callback=m),l=Oi(n,u,r),l!==null&&(Qt(l,n,r),rl(l,n,r))}function By(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<r?l:r}}function Dd(n,r){By(n,r),(n=n.alternate)&&By(n,r)}function jy(n){if(n.tag===13||n.tag===31){var r=lr(n,67108864);r!==null&&Qt(r,n,67108864),Dd(n,67108864)}}function Vy(n){if(n.tag===13||n.tag===31){var r=sn();r=ku(r);var l=lr(n,r);l!==null&&Qt(l,n,r),Dd(n,r)}}var ms=!0;function BE(n,r,l,u){var p=z.T;z.T=null;var m=$.p;try{$.p=2,Nd(n,r,l,u)}finally{$.p=m,z.T=p}}function jE(n,r,l,u){var p=z.T;z.T=null;var m=$.p;try{$.p=8,Nd(n,r,l,u)}finally{$.p=m,z.T=p}}function Nd(n,r,l,u){if(ms){var p=Od(u);if(p===null)bd(n,r,u,gs,l),$y(n,u);else if(GE(p,n,r,l,u))u.stopPropagation();else if($y(n,u),r&4&&-1<VE.indexOf(n)){for(;p!==null;){var m=Mr(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=Wn(m.pendingLanes);if(_!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;_;){var N=1<<31-Ge(_);E.entanglements[1]|=N,_&=~N}jn(m),(Be&6)===0&&(Wo=xt()+500,_l(0))}}break;case 31:case 13:E=lr(m,2),E!==null&&Qt(E,m,2),es(),Dd(m,2)}if(m=Od(u),m===null&&bd(n,r,u,gs,l),m===p)break;p=m}p!==null&&u.stopPropagation()}else bd(n,r,u,null,l)}}function Od(n){return n=Iu(n),Md(n)}var gs=null;function Md(n){if(gs=null,n=Or(n),n!==null){var r=s(n);if(r===null)n=null;else{var l=r.tag;if(l===13){if(n=c(r),n!==null)return n;n=null}else if(l===31){if(n=f(r),n!==null)return n;n=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return gs=n,null}function Gy(n){switch(n){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(Zn()){case J:return 2;case ce:return 8;case ve:case De:return 32;case He:return 268435456;default:return 32}default:return 32}}var Id=!1,$i=null,Fi=null,qi=null,Al=new Map,Tl=new Map,Yi=[],VE="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 $y(n,r){switch(n){case"focusin":case"focusout":$i=null;break;case"dragenter":case"dragleave":Fi=null;break;case"mouseover":case"mouseout":qi=null;break;case"pointerover":case"pointerout":Al.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tl.delete(r.pointerId)}}function Ll(n,r,l,u,p,m){return n===null||n.nativeEvent!==m?(n={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:m,targetContainers:[p]},r!==null&&(r=Mr(r),r!==null&&jy(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),n)}function GE(n,r,l,u,p){switch(r){case"focusin":return $i=Ll($i,n,r,l,u,p),!0;case"dragenter":return Fi=Ll(Fi,n,r,l,u,p),!0;case"mouseover":return qi=Ll(qi,n,r,l,u,p),!0;case"pointerover":var m=p.pointerId;return Al.set(m,Ll(Al.get(m)||null,n,r,l,u,p)),!0;case"gotpointercapture":return m=p.pointerId,Tl.set(m,Ll(Tl.get(m)||null,n,r,l,u,p)),!0}return!1}function Fy(n){var r=Or(n.target);if(r!==null){var l=s(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){n.blockedOn=r,ap(n.priority,function(){Vy(l)});return}}else if(r===31){if(r=f(l),r!==null){n.blockedOn=r,ap(n.priority,function(){Vy(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function ys(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var l=Od(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);Mu=u,l.target.dispatchEvent(u),Mu=null}else return r=Mr(l),r!==null&&jy(r),n.blockedOn=l,!1;r.shift()}return!0}function qy(n,r,l){ys(n)&&l.delete(r)}function $E(){Id=!1,$i!==null&&ys($i)&&($i=null),Fi!==null&&ys(Fi)&&(Fi=null),qi!==null&&ys(qi)&&(qi=null),Al.forEach(qy),Tl.forEach(qy)}function bs(n,r){n.blockedOn===r&&(n.blockedOn=null,Id||(Id=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$E)))}var vs=null;function Yy(n){vs!==n&&(vs=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vs===n&&(vs=null);for(var r=0;r<n.length;r+=3){var l=n[r],u=n[r+1],p=n[r+2];if(typeof u!="function"){if(Md(u||l)===null)continue;break}var m=Mr(l);m!==null&&(n.splice(r,3),r-=3,Oc(m,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function ma(n){function r(N){return bs(N,n)}$i!==null&&bs($i,n),Fi!==null&&bs(Fi,n),qi!==null&&bs(qi,n),Al.forEach(r),Tl.forEach(r);for(var l=0;l<Yi.length;l++){var u=Yi[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<Yi.length&&(l=Yi[0],l.blockedOn===null);)Fy(l),l.blockedOn===null&&Yi.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var p=l[u],m=l[u+1],_=p[Gt]||null;if(typeof m=="function")_||Yy(l);else if(_){var E=null;if(m&&m.hasAttribute("formAction")){if(p=m,_=m[Gt]||null)E=_.formAction;else if(Md(p)!==null)continue}else E=_.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),Yy(l)}}}function Xy(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(_){return p=_})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function zd(n){this._internalRoot=n}_s.prototype.render=zd.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=sn();Py(l,u,n,r,null,null)},_s.prototype.unmount=zd.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Py(n.current,2,null,n,null,null),es(),r[Nr]=null}};function _s(n){this._internalRoot=n}_s.prototype.unstable_scheduleHydration=function(n){if(n){var r=rp();n={blockedOn:null,target:n,priority:r};for(var l=0;l<Yi.length&&r!==0&&r<Yi[l].priority;l++);Yi.splice(l,0,n),l===0&&Fy(n)}};var Qy=t.version;if(Qy!=="19.2.6")throw Error(a(527,Qy,"19.2.6"));$.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=h(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var FE={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ss=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ss.isDisabled&&Ss.supportsFiber)try{Ct=Ss.inject(FE),at=Ss}catch{}}return Dl.createRoot=function(n,r){if(!o(n))throw Error(a(299));var l=!1,u="",p=ng,m=ig,_=rg;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=Hy(n,1,!1,null,null,l,u,null,p,m,_,Xy),n[Nr]=r.current,yd(n),new zd(r)},Dl.hydrateRoot=function(n,r,l){if(!o(n))throw Error(a(299));var u=!1,p="",m=ng,_=ig,E=rg,N=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(N=l.formState)),r=Hy(n,1,!0,r,l??null,u,p,N,m,_,E,Xy),r.context=Uy(null),l=r.current,u=sn(),u=ku(u),p=Ni(u),p.callback=null,Oi(l,p,u),l=u,r.current.lanes=l,Vt(r,l),jn(r),n[Nr]=r.current,yd(n),new _s(r)},Dl.version="19.2.6",Dl}var a0;function tx(){if(a0)return Pd.exports;a0=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(),Pd.exports=ex(),Pd.exports}var nx=tx();async function Tn(e,t={}){const i=await fetch(e,{headers:{"content-type":"application/json",...t.headers},...t}),a=await ix(i);if(!i.ok)throw new Error(a.error||i.statusText||`request to ${e} failed`);return a}async function ix(e){const t=await e.text();if(!t)return{};try{return JSON.parse(t)}catch{throw new Error("server returned an invalid JSON response")}}async function rx(){return Tn("/api/bootstrap")}async function ax(e){return Tn("/api/diff")}async function lx(e){return Tn("/api/state",{method:"POST",body:JSON.stringify(e)})}async function l0(e){return Tn("/api/thread",{method:"POST",body:JSON.stringify(e)})}async function Gd(e){return Tn("/api/thread/reply",{method:"POST",body:JSON.stringify(e)})}async function ox(e){return Tn("/api/thread-message",{method:"POST",body:JSON.stringify({id:e})})}async function sx(e){return Tn("/api/thread-message/delete",{method:"POST",body:JSON.stringify(e)})}async function ux(e){return Tn("/api/thread/resolve",{method:"POST",body:JSON.stringify(e)})}async function cx(e){return Tn("/api/thread/collapse",{method:"POST",body:JSON.stringify(e)})}async function dx(){return Tn("/api/brief/generate",{method:"POST"})}async function fx(e){return Tn("/api/review",{method:"POST",body:JSON.stringify({message:e})})}async function hx(){return Tn("/api/cancel",{method:"POST"})}const px=["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","horizon-bright","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"],_h="github-dark-dimmed",mx={diffStyle:"split",overflowMode:"wrap",codeTheme:_h,sidebarOpen:!1,collapsedFileIds:[],viewedFileIds:[],threads:[],brief:{content:"",loading:!1}},gx=new Set(px);function yx(e){return{...e,diffStyle:e.diffStyle==="split"?"split":"stacked",overflowMode:e.overflowMode==="scroll"?"scroll":"wrap",codeTheme:_x(e.codeTheme),threads:e.threads.map(t=>({...t,anchor:t.anchor.kind==="line"?{...t.anchor}:{kind:"detached"},resolved:!!t.resolved,collapsed:!!t.collapsed})),brief:{...e.brief.threadId?{threadId:e.brief.threadId}:{},content:e.brief.content,loading:!!e.brief.loading}}}function Sh(e){return e.anchor.kind==="line"}function bx(e){return e.anchor.kind==="detached"}function o0(e){return Object.fromEntries(e.map(t=>[t,!0]))}function s0(e,t){return e.includes(t)?e.filter(i=>i!==t):[...e,t]}function $d(e){return[...new Set(e)]}function vx(e,t){return{additions:e.additions+t.additions,deletions:e.deletions+t.deletions}}function _x(e){return gx.has(e)?e:_h}function Sx(e){const t=new Map;for(const i of e){if(!Sh(i))continue;const a={lineNumber:i.anchor.lineNumber,side:i.anchor.side,metadata:{type:"thread",thread:i}},o=t.get(i.anchor.fileId);o?o.push(a):t.set(i.anchor.fileId,[a])}return t}function Ex(e){const t=new Map;for(const i of e)Sh(i)&&t.set(i.anchor.fileId,(t.get(i.anchor.fileId)??0)+1);return t}function xx(e,t,i,a){return!a||i?.fileId!==t?e:[...e,a]}function Cx(e,t,i){return{...e,threads:e.threads.map(a=>a.id===t?{...a,loading:i}:a)}}function wx(e,t){return{...e,brief:{...e.brief,loading:t}}}function kx(e,t){const i=t.find(a=>a.id===e.fileId);return e.side==="deletions"?i?.oldRepoPath??i?.newRepoPath??e.fileId:i?.newRepoPath??i?.oldRepoPath??e.fileId}const yv=(...e)=>e.filter((t,i,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===i).join(" ").trim();const Ax=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Tx=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,a)=>a?a.toUpperCase():i.toLowerCase());const u0=e=>{const t=Tx(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Fd={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 Lx=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Rx=te.createContext({}),Dx=()=>te.useContext(Rx),Nx=te.forwardRef(({color:e,size:t,strokeWidth:i,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...f},d)=>{const{size:h=24,strokeWidth:y=2,absoluteStrokeWidth:g=!1,color:b="currentColor",className:v=""}=Dx()??{},S=a??g?Number(i??y)*24/Number(t??h):i??y;return te.createElement("svg",{ref:d,...Fd,width:t??h??Fd.width,height:t??h??Fd.height,stroke:e??b,strokeWidth:S,className:yv("lucide",v,o),...!s&&!Lx(f)&&{"aria-hidden":"true"},...f},[...c.map(([w,R])=>te.createElement(w,R)),...Array.isArray(s)?s:[s]])});const Wt=(e,t)=>{const i=te.forwardRef(({className:a,...o},s)=>te.createElement(Nx,{ref:s,iconNode:t,className:yv(`lucide-${Ax(u0(e))}`,`lucide-${e}`,a),...o}));return i.displayName=u0(e),i};const Ox=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mx=Wt("check",Ox);const Ix=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bv=Wt("chevron-down",Ix);const zx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Hx=Wt("chevron-right",zx);const Ux=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],vv=Wt("chevrons-down-up",Ux);const Px=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],_v=Wt("chevrons-up-down",Px);const Bx=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],jx=Wt("eye-off",Bx);const Vx=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],Gx=Wt("file-diff",Vx);const $x=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Sv=Wt("message-square",$x);const Fx=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],qx=Wt("messages-square",Fx);const Yx=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Xx=Wt("panel-left",Yx);const Qx=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Zx=Wt("scroll-text",Qx);const Kx=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Wx=Wt("sparkles",Kx);const Jx=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ev=Wt("trash",Jx);const eC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xv=Wt("x",eC);function Ea({icon:e,label:t,size:i=14,className:a="",...o}){return I.jsx("button",{type:"button",className:`icon-btn ${a}`,"aria-label":t,...o,children:I.jsx(e,{size:i})})}function Cv({open:e,title:t,ariaLabel:i,closeLabel:a,widthClassName:o,bodyClassName:s,onClose:c,children:f}){return te.useEffect(()=>{if(!e)return;const d=h=>{h.key==="Escape"&&c()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,c]),e?I.jsx("div",{className:"dialog-backdrop",onClick:c,children:I.jsxs("div",{className:`dialog${o?` ${o}`:""}`,role:"dialog","aria-modal":"true","aria-label":i,onClick:d=>d.stopPropagation(),children:[I.jsxs("div",{className:"dialog-header",children:[I.jsx("div",{className:"dialog-heading",children:I.jsx("div",{className:"dialog-title",children:t})}),I.jsx("div",{className:"dialog-actions",children:I.jsx(Ea,{icon:xv,size:16,label:a,className:"dialog-close",onClick:c})})]}),I.jsx("div",{className:`dialog-body-wrap${s?` ${s}`:""}`,children:f})]})}):null}function wv(e,t){const i=t||{};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const tC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iC={};function c0(e,t){return(iC.jsx?nC:tC).test(e)}const rC=/[ \t\n\f\r]/g;function cu(e){return typeof e=="object"?e.type==="text"?d0(e.value):!1:d0(e)}function d0(e){return e.replace(rC,"")===""}class ro{constructor(t,i,a){this.normal=i,this.property=t,a&&(this.space=a)}}ro.prototype.normal={};ro.prototype.property={};ro.prototype.space=void 0;function kv(e,t){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new ro(i,a,t)}function Mf(e){return e.toLowerCase()}class Jt{constructor(t,i){this.attribute=i,this.property=t}}Jt.prototype.attribute="";Jt.prototype.booleanish=!1;Jt.prototype.boolean=!1;Jt.prototype.commaOrSpaceSeparated=!1;Jt.prototype.commaSeparated=!1;Jt.prototype.defined=!1;Jt.prototype.mustUseProperty=!1;Jt.prototype.number=!1;Jt.prototype.overloadedBoolean=!1;Jt.prototype.property="";Jt.prototype.spaceSeparated=!1;Jt.prototype.space=void 0;let aC=0;const Te=kr(),pt=kr(),If=kr(),oe=kr(),Ke=kr(),Ta=kr(),un=kr();function kr(){return 2**++aC}const zf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Te,booleanish:pt,commaOrSpaceSeparated:un,commaSeparated:Ta,number:oe,overloadedBoolean:If,spaceSeparated:Ke},Symbol.toStringTag,{value:"Module"})),qd=Object.keys(zf);class Eh extends Jt{constructor(t,i,a,o){let s=-1;if(super(t,i),f0(this,"space",o),typeof a=="number")for(;++s<qd.length;){const c=qd[s];f0(this,qd[s],(a&zf[c])===zf[c])}}}Eh.prototype.defined=!0;function f0(e,t,i){i&&(e[t]=i)}function Ma(e){const t={},i={};for(const[a,o]of Object.entries(e.properties)){const s=new Eh(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),t[a]=s,i[Mf(a)]=a,i[Mf(s.attribute)]=a}return new ro(t,i,e.space)}const Av=Ma({properties:{ariaActiveDescendant:null,ariaAtomic:pt,ariaAutoComplete:null,ariaBusy:pt,ariaChecked:pt,ariaColCount:oe,ariaColIndex:oe,ariaColSpan:oe,ariaControls:Ke,ariaCurrent:null,ariaDescribedBy:Ke,ariaDetails:null,ariaDisabled:pt,ariaDropEffect:Ke,ariaErrorMessage:null,ariaExpanded:pt,ariaFlowTo:Ke,ariaGrabbed:pt,ariaHasPopup:null,ariaHidden:pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ke,ariaLevel:oe,ariaLive:null,ariaModal:pt,ariaMultiLine:pt,ariaMultiSelectable:pt,ariaOrientation:null,ariaOwns:Ke,ariaPlaceholder:null,ariaPosInSet:oe,ariaPressed:pt,ariaReadOnly:pt,ariaRelevant:null,ariaRequired:pt,ariaRoleDescription:Ke,ariaRowCount:oe,ariaRowIndex:oe,ariaRowSpan:oe,ariaSelected:pt,ariaSetSize:oe,ariaSort:null,ariaValueMax:oe,ariaValueMin:oe,ariaValueNow:oe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Tv(e,t){return t in e?e[t]:t}function Lv(e,t){return Tv(e,t.toLowerCase())}const lC=Ma({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ta,acceptCharset:Ke,accessKey:Ke,action:null,allow:null,allowFullScreen:Te,allowPaymentRequest:Te,allowUserMedia:Te,alt:null,as:null,async:Te,autoCapitalize:null,autoComplete:Ke,autoFocus:Te,autoPlay:Te,blocking:Ke,capture:null,charSet:null,checked:Te,cite:null,className:Ke,cols:oe,colSpan:null,content:null,contentEditable:pt,controls:Te,controlsList:Ke,coords:oe|Ta,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Te,defer:Te,dir:null,dirName:null,disabled:Te,download:If,draggable:pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Te,formTarget:null,headers:Ke,height:oe,hidden:If,high:oe,href:null,hrefLang:null,htmlFor:Ke,httpEquiv:Ke,id:null,imageSizes:null,imageSrcSet:null,inert:Te,inputMode:null,integrity:null,is:null,isMap:Te,itemId:null,itemProp:Ke,itemRef:Ke,itemScope:Te,itemType:Ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Te,low:oe,manifest:null,max:null,maxLength:oe,media:null,method:null,min:null,minLength:oe,multiple:Te,muted:Te,name:null,nonce:null,noModule:Te,noValidate:Te,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:Te,optimum:oe,pattern:null,ping:Ke,placeholder:null,playsInline:Te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Te,referrerPolicy:null,rel:Ke,required:Te,reversed:Te,rows:oe,rowSpan:oe,sandbox:Ke,scope:null,scoped:Te,seamless:Te,selected:Te,shadowRootClonable:Te,shadowRootDelegatesFocus:Te,shadowRootMode:null,shape:null,size:oe,sizes:null,slot:null,span:oe,spellCheck:pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:oe,step:null,style:null,tabIndex:oe,target:null,title:null,translate:null,type:null,typeMustMatch:Te,useMap:null,value:pt,width:oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ke,axis:null,background:null,bgColor:null,border:oe,borderColor:null,bottomMargin:oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Te,declare:Te,event:null,face:null,frame:null,frameBorder:null,hSpace:oe,leftMargin:oe,link:null,longDesc:null,lowSrc:null,marginHeight:oe,marginWidth:oe,noResize:Te,noHref:Te,noShade:Te,noWrap:Te,object:null,profile:null,prompt:null,rev:null,rightMargin:oe,rules:null,scheme:null,scrolling:pt,standby:null,summary:null,text:null,topMargin:oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Te,disableRemotePlayback:Te,prefix:null,property:null,results:oe,security:null,unselectable:null},space:"html",transform:Lv}),oC=Ma({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:un,accentHeight:oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:oe,amplitude:oe,arabicForm:null,ascent:oe,attributeName:null,attributeType:null,azimuth:oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:oe,by:null,calcMode:null,capHeight:oe,className:Ke,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:oe,diffuseConstant:oe,direction:null,display:null,dur:null,divisor:oe,dominantBaseline:null,download:Te,dx:null,dy:null,edgeMode:null,editable:null,elevation:oe,enableBackground:null,end:null,event:null,exponent:oe,externalResourcesRequired:null,fill:null,fillOpacity:oe,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:Ta,g2:Ta,glyphName:Ta,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:oe,horizOriginX:oe,horizOriginY:oe,id:null,ideographic:oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:oe,k:oe,k1:oe,k2:oe,k3:oe,k4:oe,kernelMatrix:un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:oe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:oe,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:oe,overlineThickness:oe,paintOrder:null,panose1:null,path:null,pathLength:oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:oe,pointsAtY:oe,pointsAtZ:oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:un,rev:un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:un,requiredFeatures:un,requiredFonts:un,requiredFormats:un,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:oe,specularExponent:oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:oe,strikethroughThickness:oe,string:null,stroke:null,strokeDashArray:un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:oe,strokeOpacity:oe,strokeWidth:null,style:null,surfaceScale:oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:un,tabIndex:oe,tableValues:null,target:null,targetX:oe,targetY:oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:oe,underlineThickness:oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:oe,values:null,vAlphabetic:oe,vMathematical:oe,vectorEffect:null,vHanging:oe,vIdeographic:oe,version:null,vertAdvY:oe,vertOriginX:oe,vertOriginY:oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Tv}),Rv=Ma({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()}}),Dv=Ma({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Lv}),Nv=Ma({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),sC={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"},uC=/[A-Z]/g,h0=/-[a-z]/g,cC=/^data[-\w.:]+$/i;function Ov(e,t){const i=Mf(t);let a=t,o=Jt;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&cC.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(h0,fC);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!h0.test(s)){let c=s.replace(uC,dC);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=Eh}return new o(a,t)}function dC(e){return"-"+e.toLowerCase()}function fC(e){return e.charAt(1).toUpperCase()}const Mv=kv([Av,lC,Rv,Dv,Nv],"html"),ao=kv([Av,oC,Rv,Dv,Nv],"svg");function Iv(e){return e.join(" ").trim()}var ga={},Yd,p0;function hC(){if(p0)return Yd;p0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
11
+ `,h="/",y="*",g="",b="comment",v="declaration";function S(R,C){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];C=C||{};var k=1,A=1;function H(ie){var q=ie.match(t);q&&(k+=q.length);var z=ie.lastIndexOf(d);A=~z?ie.length-z:A+ie.length}function U(){var ie={line:k,column:A};return function(q){return q.position=new D(ie),j(),q}}function D(ie){this.start=ie,this.end={line:k,column:A},this.source=C.source}D.prototype.content=R;function B(ie){var q=new Error(C.source+":"+k+":"+A+": "+ie);if(q.reason=ie,q.filename=C.source,q.line=k,q.column=A,q.source=R,!C.silent)throw q}function re(ie){var q=ie.exec(R);if(q){var z=q[0];return H(z),R=R.slice(z.length),q}}function j(){re(i)}function se(ie){var q;for(ie=ie||[];q=Z();)q!==!1&&ie.push(q);return ie}function Z(){var ie=U();if(!(h!=R.charAt(0)||y!=R.charAt(1))){for(var q=2;g!=R.charAt(q)&&(y!=R.charAt(q)||h!=R.charAt(q+1));)++q;if(q+=2,g===R.charAt(q-1))return B("End of comment missing");var z=R.slice(2,q-2);return A+=2,H(z),R=R.slice(q),A+=2,ie({type:b,comment:z})}}function W(){var ie=U(),q=re(a);if(q){if(Z(),!re(o))return B("property missing ':'");var z=re(s),$=ie({type:v,property:w(q[0].replace(e,g)),value:z?w(z[0].replace(e,g)):g});return re(c),$}}function Q(){var ie=[];se(ie);for(var q;q=W();)q!==!1&&(ie.push(q),se(ie));return ie}return j(),Q()}function w(R){return R?R.replace(f,g):g}return Yd=S,Yd}var m0;function pC(){if(m0)return ga;m0=1;var e=ga&&ga.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(ga,"__esModule",{value:!0}),ga.default=i;const t=e(hC());function i(a,o){let s=null;if(!a||typeof a!="string")return s;const c=(0,t.default)(a),f=typeof o=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:y}=d;f?o(h,y,d):y&&(s=s||{},s[h]=y)}),s}return ga}var Nl={},g0;function mC(){if(g0)return Nl;g0=1,Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(h){return!h||i.test(h)||e.test(h)},c=function(h,y){return y.toUpperCase()},f=function(h,y){return"".concat(y,"-")},d=function(h,y){return y===void 0&&(y={}),s(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(o,f):h=h.replace(a,f),h.replace(t,c))};return Nl.camelCase=d,Nl}var Ol,y0;function gC(){if(y0)return Ol;y0=1;var e=Ol&&Ol.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(pC()),i=mC();function a(o,s){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(f,d){f&&d&&(c[(0,i.camelCase)(f,s)]=d)}),c}return a.default=a,Ol=a,Ol}var yC=gC();const bC=gv(yC),zv=Hv("end"),xh=Hv("start");function Hv(e){return t;function t(i){const a=i&&i.position&&i.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function vC(e){const t=xh(e),i=zv(e);if(t&&i)return{start:t,end:i}}function $l(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?b0(e.position):"start"in e||"end"in e?b0(e):"line"in e||"column"in e?Hf(e):""}function Hf(e){return v0(e&&e.line)+":"+v0(e&&e.column)}function b0(e){return Hf(e&&e.start)+"-"+Hf(e&&e.end)}function v0(e){return e&&typeof e=="number"?e:1}class Ut extends Error{constructor(t,i,a){super(),typeof i=="string"&&(a=i,i=void 0);let o="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof t=="string"?o=t:!s.cause&&t&&(c=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof a=="string"){const d=a.indexOf(":");d===-1?s.ruleId=a:(s.source=a.slice(0,d),s.ruleId=a.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=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=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=$l(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=c&&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}}Ut.prototype.file="";Ut.prototype.name="";Ut.prototype.reason="";Ut.prototype.message="";Ut.prototype.stack="";Ut.prototype.column=void 0;Ut.prototype.line=void 0;Ut.prototype.ancestors=void 0;Ut.prototype.cause=void 0;Ut.prototype.fatal=void 0;Ut.prototype.place=void 0;Ut.prototype.ruleId=void 0;Ut.prototype.source=void 0;const Ch={}.hasOwnProperty,_C=new Map,SC=/[A-Z]/g,EC=new Set(["table","tbody","thead","tfoot","tr"]),xC=new Set(["td","th"]),Uv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function CC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=NC(i,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");a=DC(i,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ao:Mv,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Pv(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function Pv(e,t,i){if(t.type==="element")return wC(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return TC(e,t,i);if(t.type==="mdxjsEsm")return AC(e,t);if(t.type==="root")return LC(e,t,i);if(t.type==="text")return RC(e,t)}function wC(e,t,i){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=ao,e.schema=o),e.ancestors.push(t);const s=jv(e,t.tagName,!1),c=OC(e,t);let f=kh(e,t);return EC.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!cu(d):!0})),Bv(e,c,s,t),wh(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function kC(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Zl(e,t.position)}function AC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zl(e,t.position)}function TC(e,t,i){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=ao,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:jv(e,t.name,!0),c=MC(e,t),f=kh(e,t);return Bv(e,c,s,t),wh(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function LC(e,t,i){const a={};return wh(a,kh(e,t)),e.create(t,e.Fragment,a,i)}function RC(e,t){return t.value}function Bv(e,t,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=a)}function wh(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function DC(e,t,i){return a;function a(o,s,c,f){const h=Array.isArray(c.children)?i:t;return f?h(s,c,f):h(s,c)}}function NC(e,t){return i;function i(a,o,s,c){const f=Array.isArray(s.children),d=xh(a);return t(o,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function OC(e,t){const i={};let a,o;for(o in t.properties)if(o!=="children"&&Ch.call(t.properties,o)){const s=IC(e,o,t.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&xC.has(t.tagName)?a=f:i[c]=f}}if(a){const s=i.style||(i.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function MC(e,t){const i={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const s=a.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else Zl(e,t.position);else{const o=a.name;let s;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Zl(e,t.position);else s=a.value===null?!0:a.value;i[o]=s}return i}function kh(e,t){const i=[];let a=-1;const o=e.passKeys?new Map:_C;for(;++a<t.children.length;){const s=t.children[a];let c;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const h=o.get(d)||0;c=d+"-"+h,o.set(d,h+1)}}const f=Pv(e,s,c);f!==void 0&&i.push(f)}return i}function IC(e,t,i){const a=Ov(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?wv(i):Iv(i)),a.property==="style"){let o=typeof i=="object"?i:zC(e,String(i));return e.stylePropertyNameCase==="css"&&(o=HC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?sC[a.property]||a.property:a.attribute,i]}}function zC(e,t){try{return bC(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new Ut("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Uv+"#cannot-parse-style-attribute",o}}function jv(e,t,i){let a;if(!i)a={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,c;for(;++s<o.length;){const f=c0(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}a=c}else a=c0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return Ch.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);Zl(e)}function Zl(e,t){const i=new Ut("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Uv+"#cannot-handle-mdx-estrees-without-createevaluater",i}function HC(e){const t={};let i;for(i in e)Ch.call(e,i)&&(t[UC(i)]=e[i]);return t}function UC(e){let t=e.replace(SC,PC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function PC(e){return"-"+e.toLowerCase()}const Xd={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"]},BC={};function jC(e,t){const i=BC,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return Vv(e,a,o)}function Vv(e,t,i){if(VC(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _0(e.children,t,i)}return Array.isArray(e)?_0(e,t,i):""}function _0(e,t,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=Vv(e[o],t,i);return a.join("")}function VC(e){return!!(e&&typeof e=="object")}const S0=document.createElement("i");function Ah(e){const t="&"+e+";";S0.innerHTML=t;const i=S0.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function Qn(e,t,i,a){const o=e.length;let s=0,c;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(t,i),e.splice(...c);else for(i&&e.splice(t,i);s<a.length;)c=a.slice(s,s+1e4),c.unshift(t,0),e.splice(...c),s+=1e4,t+=1e4}function Cn(e,t){return e.length>0?(Qn(e,e.length,0,t),e):t}const E0={}.hasOwnProperty;function GC(e){const t={};let i=-1;for(;++i<e.length;)$C(t,e[i]);return t}function $C(e,t){let i;for(i in t){const o=(E0.call(e,i)?e[i]:void 0)||(e[i]={}),s=t[i];let c;if(s)for(c in s){E0.call(o,c)||(o[c]=[]);const f=s[c];FC(o[c],Array.isArray(f)?f:f?[f]:[])}}}function FC(e,t){let i=-1;const a=[];for(;++i<t.length;)(t[i].add==="after"?e:a).push(t[i]);Qn(e,0,0,a)}function Gv(e,t){const i=Number.parseInt(e,t);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function La(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const qn=er(/[A-Za-z]/),dn=er(/[\dA-Za-z]/),qC=er(/[#-'*+\--9=?A-Z^-~]/);function Uf(e){return e!==null&&(e<32||e===127)}const Pf=er(/\d/),YC=er(/[\dA-Fa-f]/),XC=er(/[!-/:-@[-`{-~]/);function Se(e){return e!==null&&e<-2}function Kt(e){return e!==null&&(e<0||e===32)}function je(e){return e===-2||e===-1||e===32}const QC=er(new RegExp("\\p{P}|\\p{S}","u")),ZC=er(/\s/);function er(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Ia(e){const t=[];let i=-1,a=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&dn(e.charCodeAt(i+1))&&dn(e.charCodeAt(i+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(i+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),o=1):c="�"}else c=String.fromCharCode(s);c&&(t.push(e.slice(a,i),encodeURIComponent(c)),a=i+o+1,c=""),o&&(i+=o,o=0)}return t.join("")+e.slice(a)}function We(e,t,i,a){const o=a?a-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return je(d)?(e.enter(i),f(d)):t(d)}function f(d){return je(d)&&s++<o?(e.consume(d),f):(e.exit(i),t(d))}}const KC={tokenize:WC};function WC(e){const t=e.attempt(this.parser.constructs.contentInitial,a,o);let i;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),We(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=d),i=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Se(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const JC={tokenize:ew},x0={tokenize:tw};function ew(e){const t=this,i=[];let a=0,o,s,c;return f;function f(A){if(a<i.length){const H=i[a];return t.containerState=H[1],e.attempt(H[0].continuation,d,h)(A)}return h(A)}function d(A){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&k();const H=t.events.length;let U=H,D;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){D=t.events[U][1].end;break}C(a);let B=H;for(;B<t.events.length;)t.events[B][1].end={...D},B++;return Qn(t.events,U+1,0,t.events.slice(H)),t.events.length=B,h(A)}return f(A)}function h(A){if(a===i.length){if(!o)return b(A);if(o.currentConstruct&&o.currentConstruct.concrete)return S(A);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(x0,y,g)(A)}function y(A){return o&&k(),C(a),b(A)}function g(A){return t.parser.lazy[t.now().line]=a!==i.length,c=t.now().offset,S(A)}function b(A){return t.containerState={},e.attempt(x0,v,S)(A)}function v(A){return a++,i.push([t.currentConstruct,t.containerState]),b(A)}function S(A){if(A===null){o&&k(),C(0),e.consume(A);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),w(A)}function w(A){if(A===null){R(e.exit("chunkFlow"),!0),C(0),e.consume(A);return}return Se(A)?(e.consume(A),R(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(A),w)}function R(A,H){const U=t.sliceStream(A);if(H&&U.push(null),A.previous=s,s&&(s.next=A),s=A,o.defineSkip(A.start),o.write(U),t.parser.lazy[A.start.line]){let D=o.events.length;for(;D--;)if(o.events[D][1].start.offset<c&&(!o.events[D][1].end||o.events[D][1].end.offset>c))return;const B=t.events.length;let re=B,j,se;for(;re--;)if(t.events[re][0]==="exit"&&t.events[re][1].type==="chunkFlow"){if(j){se=t.events[re][1].end;break}j=!0}for(C(a),D=B;D<t.events.length;)t.events[D][1].end={...se},D++;Qn(t.events,re+1,0,t.events.slice(B)),t.events.length=D}}function C(A){let H=i.length;for(;H-- >A;){const U=i[H];t.containerState=U[1],U[0].exit.call(t,e)}i.length=A}function k(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function tw(e,t,i){return We(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function C0(e){if(e===null||Kt(e)||ZC(e))return 1;if(QC(e))return 2}function Th(e,t,i){const a=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!a.includes(s)&&(t=s(t,i),a.push(s))}return t}const Bf={name:"attention",resolveAll:nw,tokenize:iw};function nw(e,t){let i=-1,a,o,s,c,f,d,h,y;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(a=i;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[a][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;d=e[a][1].end.offset-e[a][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const g={...e[a][1].end},b={...e[i][1].start};w0(g,-d),w0(b,d),c={type:d>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},o={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[i][1].start={...f.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=Cn(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=Cn(h,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",s,t]]),h=Cn(h,Th(t.parser.constructs.insideSpan.null,e.slice(a+1,i),t)),h=Cn(h,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,h=Cn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])):y=0,Qn(e,a-1,i-a+3,h),i=a+h.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function iw(e,t){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=C0(a);let s;return c;function c(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const h=e.exit("attentionSequence"),y=C0(d),g=!y||y===2&&o||i.includes(d),b=!o||o===2&&y||i.includes(a);return h._open=!!(s===42?g:g&&(o||!b)),h._close=!!(s===42?b:b&&(y||!g)),t(d)}}function w0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const rw={name:"autolink",tokenize:aw};function aw(e,t,i){let a=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 qn(v)?(e.consume(v),c):v===64?i(v):h(v)}function c(v){return v===43||v===45||v===46||dn(v)?(a=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),a=0,d):(v===43||v===45||v===46||dn(v))&&a++<32?(e.consume(v),f):(a=0,h(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||Uf(v)?i(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),y):qC(v)?(e.consume(v),h):i(v)}function y(v){return dn(v)?g(v):i(v)}function g(v){return v===46?(e.consume(v),a=0,y):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):b(v)}function b(v){if((v===45||dn(v))&&a++<63){const S=v===45?b:g;return e.consume(v),S}return i(v)}}const du={partial:!0,tokenize:lw};function lw(e,t,i){return a;function a(s){return je(s)?We(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Se(s)?t(s):i(s)}}const $v={continuation:{tokenize:sw},exit:uw,name:"blockQuote",tokenize:ow};function ow(e,t,i){const a=this;return o;function o(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return i(c)}function s(c){return je(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function sw(e,t,i){const a=this;return o;function o(c){return je(c)?We(e,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt($v,t,i)(c)}}function uw(e){e.exit("blockQuote")}const Fv={name:"characterEscape",tokenize:cw};function cw(e,t,i){return a;function a(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return XC(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(s)}}const qv={name:"characterReference",tokenize:dw};function dw(e,t,i){const a=this;let o=0,s,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,c=dn,y(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=YC,y):(e.enter("characterReferenceValue"),s=7,c=Pf,y(g))}function y(g){if(g===59&&o){const b=e.exit("characterReferenceValue");return c===dn&&!Ah(a.sliceSerialize(b))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&o++<s?(e.consume(g),y):i(g)}}const k0={partial:!0,tokenize:hw},A0={concrete:!0,name:"codeFenced",tokenize:fw};function fw(e,t,i){const a=this,o={partial:!0,tokenize:U};let s=0,c=0,f;return d;function d(D){return h(D)}function h(D){const B=a.events[a.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,f=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(D)}function y(D){return D===f?(c++,e.consume(D),y):c<3?i(D):(e.exit("codeFencedFenceSequence"),je(D)?We(e,g,"whitespace")(D):g(D))}function g(D){return D===null||Se(D)?(e.exit("codeFencedFence"),a.interrupt?t(D):e.check(k0,w,H)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Se(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):je(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),We(e,v,"whitespace")(D)):D===96&&D===f?i(D):(e.consume(D),b)}function v(D){return D===null||Se(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||Se(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===f?i(D):(e.consume(D),S)}function w(D){return e.attempt(o,H,R)(D)}function R(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),C}function C(D){return s>0&&je(D)?We(e,k,"linePrefix",s+1)(D):k(D)}function k(D){return D===null||Se(D)?e.check(k0,w,H)(D):(e.enter("codeFlowValue"),A(D))}function A(D){return D===null||Se(D)?(e.exit("codeFlowValue"),k(D)):(e.consume(D),A)}function H(D){return e.exit("codeFenced"),t(D)}function U(D,B,re){let j=0;return se;function se(q){return D.enter("lineEnding"),D.consume(q),D.exit("lineEnding"),Z}function Z(q){return D.enter("codeFencedFence"),je(q)?We(D,W,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):W(q)}function W(q){return q===f?(D.enter("codeFencedFenceSequence"),Q(q)):re(q)}function Q(q){return q===f?(j++,D.consume(q),Q):j>=c?(D.exit("codeFencedFenceSequence"),je(q)?We(D,ie,"whitespace")(q):ie(q)):re(q)}function ie(q){return q===null||Se(q)?(D.exit("codeFencedFence"),B(q)):re(q)}}}function hw(e,t,i){const a=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}const Qd={name:"codeIndented",tokenize:mw},pw={partial:!0,tokenize:gw};function mw(e,t,i){const a=this;return o;function o(h){return e.enter("codeIndented"),We(e,s,"linePrefix",5)(h)}function s(h){const y=a.events[a.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?d(h):Se(h)?e.attempt(pw,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Se(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function gw(e,t,i){const a=this;return o;function o(c){return a.parser.lazy[a.now().line]?i(c):Se(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):We(e,s,"linePrefix",5)(c)}function s(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Se(c)?o(c):i(c)}}const yw={name:"codeText",previous:vw,resolve:bw,tokenize:_w};function bw(e){let t=e.length-4,i=3,a,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=i;++a<t;)if(e[a][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[t][1].type="codeTextPadding",i+=2,t-=2;break}}for(a=i-1,t++;++a<=t;)o===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(o=a):(a===t||e[a][1].type==="lineEnding")&&(e[o][1].type="codeTextData",a!==o+2&&(e[o][1].end=e[a-1][1].end,e.splice(o+2,a-o-2),t-=a-o-2,a=o+2),o=void 0);return e}function vw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _w(e,t,i){let a=0,o,s;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(s=e.enter("codeTextSequence"),o=0,y(g)):Se(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Se(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function y(g){return g===96?(e.consume(g),o++,y):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(s.type="codeTextData",h(g))}}class Sw{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,i){const a=i??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,i,a){const o=i||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return a&&Ml(this.left,a),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),Ml(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ml(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 i=this.left.splice(t,Number.POSITIVE_INFINITY);Ml(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ml(this.left,i.reverse())}}}function Ml(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function Yv(e){const t={};let i=-1,a,o,s,c,f,d,h;const y=new Sw(e);for(;++i<y.length;){for(;i in t;)i=t[i];if(a=y.get(i),i&&a[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(d=a[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(a[0]==="enter")a[1].contentType&&(Object.assign(t,Ew(y,i)),i=t[i],h=!0);else if(a[1]._container){for(s=i,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(a[1].end={...y.get(o)[1].start},f=y.slice(o,i),f.unshift(a),y.splice(o,i-o+1,f))}}return Qn(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function Ew(e,t){const i=e.get(t)[1],a=e.get(t)[2];let o=t-1;const s=[];let c=i._tokenizer;c||(c=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],h={};let y,g,b=-1,v=i,S=0,w=0;const R=[w];for(;v;){for(;e.get(++o)[1]!==v;);s.push(o),v._tokenizer||(y=a.sliceStream(v),v.next||y.push(null),g&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=v,v=v.next}for(v=i;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(w=b+1,R.push(w),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):R.pop(),b=R.length;b--;){const C=f.slice(R[b],R[b+1]),k=s.pop();d.push([k,k+C.length-1]),e.splice(k,2,C)}for(d.reverse(),b=-1;++b<d.length;)h[S+d[b][0]]=S+d[b][1],S+=d[b][1]-d[b][0]-1;return h}const xw={resolve:ww,tokenize:kw},Cw={partial:!0,tokenize:Aw};function ww(e){return Yv(e),e}function kw(e,t){let i;return a;function a(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):Se(f)?e.check(Cw,c,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function Aw(e,t,i){const a=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),We(e,s,"linePrefix")}function s(c){if(c===null||Se(c))return i(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,i,t)(c)}}function Xv(e,t,i,a,o,s,c,f,d){const h=d||Number.POSITIVE_INFINITY;let y=0;return g;function g(C){return C===60?(e.enter(a),e.enter(o),e.enter(s),e.consume(C),e.exit(s),b):C===null||C===32||C===41||Uf(C)?i(C):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(C))}function b(C){return C===62?(e.enter(s),e.consume(C),e.exit(s),e.exit(o),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===62?(e.exit("chunkString"),e.exit(f),b(C)):C===null||C===60||Se(C)?i(C):(e.consume(C),C===92?S:v)}function S(C){return C===60||C===62||C===92?(e.consume(C),v):v(C)}function w(C){return!y&&(C===null||C===41||Kt(C))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(C)):y<h&&C===40?(e.consume(C),y++,w):C===41?(e.consume(C),y--,w):C===null||C===32||C===40||Uf(C)?i(C):(e.consume(C),C===92?R:w)}function R(C){return C===40||C===41||C===92?(e.consume(C),w):w(C)}}function Qv(e,t,i,a,o,s){const c=this;let f=0,d;return h;function h(v){return e.enter(a),e.enter(o),e.consume(v),e.exit(o),e.enter(s),y}function y(v){return f>999||v===null||v===91||v===93&&!d||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(v):v===93?(e.exit(s),e.enter(o),e.consume(v),e.exit(o),e.exit(a),t):Se(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||Se(v)||f++>999?(e.exit("chunkString"),y(v)):(e.consume(v),d||(d=!je(v)),v===92?b:g)}function b(v){return v===91||v===92||v===93?(e.consume(v),f++,g):g(v)}}function Zv(e,t,i,a,o,s){let c;return f;function f(b){return b===34||b===39||b===40?(e.enter(a),e.enter(o),e.consume(b),e.exit(o),c=b===40?41:b,d):i(b)}function d(b){return b===c?(e.enter(o),e.consume(b),e.exit(o),e.exit(a),t):(e.enter(s),h(b))}function h(b){return b===c?(e.exit(s),d(c)):b===null?i(b):Se(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),We(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||Se(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?g:y)}function g(b){return b===c||b===92?(e.consume(b),y):y(b)}}function Fl(e,t){let i;return a;function a(o){return Se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):je(o)?We(e,a,i?"linePrefix":"lineSuffix")(o):t(o)}}const Tw={name:"definition",tokenize:Rw},Lw={partial:!0,tokenize:Dw};function Rw(e,t,i){const a=this;let o;return s;function s(v){return e.enter("definition"),c(v)}function c(v){return Qv.call(a,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return o=La(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):i(v)}function d(v){return Kt(v)?Fl(e,h)(v):h(v)}function h(v){return Xv(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return e.attempt(Lw,g,g)(v)}function g(v){return je(v)?We(e,b,"whitespace")(v):b(v)}function b(v){return v===null||Se(v)?(e.exit("definition"),a.parser.defined.push(o),t(v)):i(v)}}function Dw(e,t,i){return a;function a(f){return Kt(f)?Fl(e,o)(f):i(f)}function o(f){return Zv(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return je(f)?We(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Se(f)?t(f):i(f)}}const Nw={name:"hardBreakEscape",tokenize:Ow};function Ow(e,t,i){return a;function a(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Se(s)?(e.exit("hardBreakEscape"),t(s)):i(s)}}const Mw={name:"headingAtx",resolve:Iw,tokenize:zw};function Iw(e,t){let i=e.length-2,a=3,o,s;return e[a][1].type==="whitespace"&&(a+=2),i-2>a&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(a===i-1||i-4>a&&e[i-2][1].type==="whitespace")&&(i-=a+1===i?2:4),i>a&&(o={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},s={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Qn(e,a,i-a+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function zw(e,t,i){let a=0;return o;function o(y){return e.enter("atxHeading"),s(y)}function s(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&a++<6?(e.consume(y),c):y===null||Kt(y)?(e.exit("atxHeadingSequence"),f(y)):i(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),d(y)):y===null||Se(y)?(e.exit("atxHeading"),t(y)):je(y)?We(e,f,"whitespace")(y):(e.enter("atxHeadingText"),h(y))}function d(y){return y===35?(e.consume(y),d):(e.exit("atxHeadingSequence"),f(y))}function h(y){return y===null||y===35||Kt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),h)}}const Hw=["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"],T0=["pre","script","style","textarea"],Uw={concrete:!0,name:"htmlFlow",resolveTo:jw,tokenize:Vw},Pw={partial:!0,tokenize:$w},Bw={partial:!0,tokenize:Gw};function jw(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 Vw(e,t,i){const a=this;let o,s,c,f,d;return h;function h(T){return y(T)}function y(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),b):T===47?(e.consume(T),s=!0,w):T===63?(e.consume(T),o=3,a.interrupt?t:L):qn(T)?(e.consume(T),c=String.fromCharCode(T),R):i(T)}function b(T){return T===45?(e.consume(T),o=2,v):T===91?(e.consume(T),o=5,f=0,S):qn(T)?(e.consume(T),o=4,a.interrupt?t:L):i(T)}function v(T){return T===45?(e.consume(T),a.interrupt?t:L):i(T)}function S(T){const ue="CDATA[";return T===ue.charCodeAt(f++)?(e.consume(T),f===ue.length?a.interrupt?t:W:S):i(T)}function w(T){return qn(T)?(e.consume(T),c=String.fromCharCode(T),R):i(T)}function R(T){if(T===null||T===47||T===62||Kt(T)){const ue=T===47,ge=c.toLowerCase();return!ue&&!s&&T0.includes(ge)?(o=1,a.interrupt?t(T):W(T)):Hw.includes(c.toLowerCase())?(o=6,ue?(e.consume(T),C):a.interrupt?t(T):W(T)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(T):s?k(T):A(T))}return T===45||dn(T)?(e.consume(T),c+=String.fromCharCode(T),R):i(T)}function C(T){return T===62?(e.consume(T),a.interrupt?t:W):i(T)}function k(T){return je(T)?(e.consume(T),k):se(T)}function A(T){return T===47?(e.consume(T),se):T===58||T===95||qn(T)?(e.consume(T),H):je(T)?(e.consume(T),A):se(T)}function H(T){return T===45||T===46||T===58||T===95||dn(T)?(e.consume(T),H):U(T)}function U(T){return T===61?(e.consume(T),D):je(T)?(e.consume(T),U):A(T)}function D(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(e.consume(T),d=T,B):je(T)?(e.consume(T),D):re(T)}function B(T){return T===d?(e.consume(T),d=null,j):T===null||Se(T)?i(T):(e.consume(T),B)}function re(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Kt(T)?U(T):(e.consume(T),re)}function j(T){return T===47||T===62||je(T)?A(T):i(T)}function se(T){return T===62?(e.consume(T),Z):i(T)}function Z(T){return T===null||Se(T)?W(T):je(T)?(e.consume(T),Z):i(T)}function W(T){return T===45&&o===2?(e.consume(T),z):T===60&&o===1?(e.consume(T),$):T===62&&o===4?(e.consume(T),O):T===63&&o===3?(e.consume(T),L):T===93&&o===5?(e.consume(T),fe):Se(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Pw,X,Q)(T)):T===null||Se(T)?(e.exit("htmlFlowData"),Q(T)):(e.consume(T),W)}function Q(T){return e.check(Bw,ie,X)(T)}function ie(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),q}function q(T){return T===null||Se(T)?Q(T):(e.enter("htmlFlowData"),W(T))}function z(T){return T===45?(e.consume(T),L):W(T)}function $(T){return T===47?(e.consume(T),c="",le):W(T)}function le(T){if(T===62){const ue=c.toLowerCase();return T0.includes(ue)?(e.consume(T),O):W(T)}return qn(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),le):W(T)}function fe(T){return T===93?(e.consume(T),L):W(T)}function L(T){return T===62?(e.consume(T),O):T===45&&o===2?(e.consume(T),L):W(T)}function O(T){return T===null||Se(T)?(e.exit("htmlFlowData"),X(T)):(e.consume(T),O)}function X(T){return e.exit("htmlFlow"),t(T)}}function Gw(e,t,i){const a=this;return o;function o(c){return Se(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):i(c)}function s(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}function $w(e,t,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(du,t,i)}}const Fw={name:"htmlText",tokenize:qw};function qw(e,t,i){const a=this;let o,s,c;return f;function f(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),d}function d(L){return L===33?(e.consume(L),h):L===47?(e.consume(L),U):L===63?(e.consume(L),A):qn(L)?(e.consume(L),re):i(L)}function h(L){return L===45?(e.consume(L),y):L===91?(e.consume(L),s=0,S):qn(L)?(e.consume(L),k):i(L)}function y(L){return L===45?(e.consume(L),v):i(L)}function g(L){return L===null?i(L):L===45?(e.consume(L),b):Se(L)?(c=g,$(L)):(e.consume(L),g)}function b(L){return L===45?(e.consume(L),v):g(L)}function v(L){return L===62?z(L):L===45?b(L):g(L)}function S(L){const O="CDATA[";return L===O.charCodeAt(s++)?(e.consume(L),s===O.length?w:S):i(L)}function w(L){return L===null?i(L):L===93?(e.consume(L),R):Se(L)?(c=w,$(L)):(e.consume(L),w)}function R(L){return L===93?(e.consume(L),C):w(L)}function C(L){return L===62?z(L):L===93?(e.consume(L),C):w(L)}function k(L){return L===null||L===62?z(L):Se(L)?(c=k,$(L)):(e.consume(L),k)}function A(L){return L===null?i(L):L===63?(e.consume(L),H):Se(L)?(c=A,$(L)):(e.consume(L),A)}function H(L){return L===62?z(L):A(L)}function U(L){return qn(L)?(e.consume(L),D):i(L)}function D(L){return L===45||dn(L)?(e.consume(L),D):B(L)}function B(L){return Se(L)?(c=B,$(L)):je(L)?(e.consume(L),B):z(L)}function re(L){return L===45||dn(L)?(e.consume(L),re):L===47||L===62||Kt(L)?j(L):i(L)}function j(L){return L===47?(e.consume(L),z):L===58||L===95||qn(L)?(e.consume(L),se):Se(L)?(c=j,$(L)):je(L)?(e.consume(L),j):z(L)}function se(L){return L===45||L===46||L===58||L===95||dn(L)?(e.consume(L),se):Z(L)}function Z(L){return L===61?(e.consume(L),W):Se(L)?(c=Z,$(L)):je(L)?(e.consume(L),Z):j(L)}function W(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(e.consume(L),o=L,Q):Se(L)?(c=W,$(L)):je(L)?(e.consume(L),W):(e.consume(L),ie)}function Q(L){return L===o?(e.consume(L),o=void 0,q):L===null?i(L):Se(L)?(c=Q,$(L)):(e.consume(L),Q)}function ie(L){return L===null||L===34||L===39||L===60||L===61||L===96?i(L):L===47||L===62||Kt(L)?j(L):(e.consume(L),ie)}function q(L){return L===47||L===62||Kt(L)?j(L):i(L)}function z(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):i(L)}function $(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),le}function le(L){return je(L)?We(e,fe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):fe(L)}function fe(L){return e.enter("htmlTextData"),c(L)}}const Lh={name:"labelEnd",resolveAll:Zw,resolveTo:Kw,tokenize:Ww},Yw={tokenize:Jw},Xw={tokenize:ek},Qw={tokenize:tk};function Zw(e){let t=-1;const i=[];for(;++t<e.length;){const a=e[t][1];if(i.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const o=a.type==="labelImage"?4:2;a.type="data",t+=o}}return e.length!==i.length&&Qn(e,0,e.length,i),e}function Kw(e,t){let i=e.length,a=0,o,s,c,f;for(;i--;)if(o=e[i][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=i,o.type!=="labelLink")){a=2;break}}else o.type==="labelEnd"&&(c=i);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[s+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=Cn(f,e.slice(s+1,s+a+3)),f=Cn(f,[["enter",y,t]]),f=Cn(f,Th(t.parser.constructs.insideSpan.null,e.slice(s+a+4,c-3),t)),f=Cn(f,[["exit",y,t],e[c-2],e[c-1],["exit",h,t]]),f=Cn(f,e.slice(c+1)),f=Cn(f,[["exit",d,t]]),Qn(e,s,e.length,f),e}function Ww(e,t,i){const a=this;let o=a.events.length,s,c;for(;o--;)if((a.events[o][1].type==="labelImage"||a.events[o][1].type==="labelLink")&&!a.events[o][1]._balanced){s=a.events[o][1];break}return f;function f(b){return s?s._inactive?g(b):(c=a.parser.defined.includes(La(a.sliceSerialize({start:s.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):i(b)}function d(b){return b===40?e.attempt(Yw,y,c?y:g)(b):b===91?e.attempt(Xw,y,c?h:g)(b):c?y(b):g(b)}function h(b){return e.attempt(Qw,y,g)(b)}function y(b){return t(b)}function g(b){return s._balanced=!0,i(b)}}function Jw(e,t,i){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return Kt(g)?Fl(e,s)(g):s(g)}function s(g){return g===41?y(g):Xv(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return Kt(g)?Fl(e,d)(g):y(g)}function f(g){return i(g)}function d(g){return g===34||g===39||g===40?Zv(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function h(g){return Kt(g)?Fl(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):i(g)}}function ek(e,t,i){const a=this;return o;function o(f){return Qv.call(a,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return a.parser.defined.includes(La(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):i(f)}function c(f){return i(f)}}function tk(e,t,i){return a;function a(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):i(s)}}const nk={name:"labelStartImage",resolveAll:Lh.resolveAll,tokenize:ik};function ik(e,t,i){const a=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(f):t(f)}}const rk={name:"labelStartLink",resolveAll:Lh.resolveAll,tokenize:ak};function ak(e,t,i){const a=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(c):t(c)}}const Zd={name:"lineEnding",tokenize:lk};function lk(e,t){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),We(e,t,"linePrefix")}}const Gs={name:"thematicBreak",tokenize:ok};function ok(e,t,i){let a=0,o;return s;function s(h){return e.enter("thematicBreak"),c(h)}function c(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):a>=3&&(h===null||Se(h))?(e.exit("thematicBreak"),t(h)):i(h)}function d(h){return h===o?(e.consume(h),a++,d):(e.exit("thematicBreakSequence"),je(h)?We(e,f,"whitespace")(h):f(h))}}const Zt={continuation:{tokenize:dk},exit:hk,name:"list",tokenize:ck},sk={partial:!0,tokenize:pk},uk={partial:!0,tokenize:fk};function ck(e,t,i){const a=this,o=a.events[a.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(v){const S=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:Pf(v)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Gs,i,h)(v):h(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return i(v)}function d(v){return Pf(v)&&++c<10?(e.consume(v),d):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):i(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(du,a.interrupt?i:y,e.attempt(sk,b,g))}function y(v){return a.containerState.initialBlankLine=!0,s++,b(v)}function g(v){return je(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):i(v)}function b(v){return a.containerState.size=s+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function dk(e,t,i){const a=this;return a.containerState._closeFlow=void 0,e.check(du,o,s);function o(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,We(e,t,"listItemIndent",a.containerState.size+1)(f)}function s(f){return a.containerState.furtherBlankLines||!je(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(uk,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,We(e,e.attempt(Zt,t,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function fk(e,t,i){const a=this;return We(e,o,"listItemIndent",a.containerState.size+1);function o(s){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(s):i(s)}}function hk(e){e.exit(this.containerState.type)}function pk(e,t,i){const a=this;return We(e,o,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=a.events[a.events.length-1];return!je(s)&&c&&c[1].type==="listItemPrefixWhitespace"?t(s):i(s)}}const L0={name:"setextUnderline",resolveTo:mk,tokenize:gk};function mk(e,t){let i=e.length,a,o,s;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){a=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!s&&e[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,t]),e.splice(s+1,0,["exit",e[a][1],t]),e[a][1].end={...e[s][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function gk(e,t,i){const a=this;let o;return s;function s(h){let y=a.events.length,g;for(;y--;)if(a.events[y][1].type!=="lineEnding"&&a.events[y][1].type!=="linePrefix"&&a.events[y][1].type!=="content"){g=a.events[y][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),o=h,c(h)):i(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),je(h)?We(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Se(h)?(e.exit("setextHeadingLine"),t(h)):i(h)}}const yk={tokenize:bk};function bk(e){const t=this,i=e.attempt(du,a,e.attempt(this.parser.constructs.flowInitial,o,We(e,e.attempt(this.parser.constructs.flow,o,e.attempt(xw,o)),"linePrefix")));return i;function a(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,i}}const vk={resolveAll:Wv()},_k=Kv("string"),Sk=Kv("text");function Kv(e){return{resolveAll:Wv(e==="text"?Ek:void 0),tokenize:t};function t(i){const a=this,o=this.parser.constructs[e],s=i.attempt(o,c,f);return c;function c(y){return h(y)?s(y):f(y)}function f(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),d}function d(y){return h(y)?(i.exit("data"),s(y)):(i.consume(y),d)}function h(y){if(y===null)return!0;const g=o[y];let b=-1;if(g)for(;++b<g.length;){const v=g[b];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function Wv(e){return t;function t(i,a){let o=-1,s;for(;++o<=i.length;)s===void 0?i[o]&&i[o][1].type==="data"&&(s=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==s+2&&(i[s][1].end=i[o-1][1].end,i.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(i,a):i}}function Ek(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const a=e[i-1][1],o=t.sliceStream(a);let s=o.length,c=-1,f=0,d;for(;s--;){const h=o[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){s++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(f=0),f){const h={type:i===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:a.start._bufferIndex+c,_index:a.start._index+s,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(i,0,["enter",h,t],["exit",h,t]),i+=2)}i++}return e}const xk={42:Zt,43:Zt,45:Zt,48:Zt,49:Zt,50:Zt,51:Zt,52:Zt,53:Zt,54:Zt,55:Zt,56:Zt,57:Zt,62:$v},Ck={91:Tw},wk={[-2]:Qd,[-1]:Qd,32:Qd},kk={35:Mw,42:Gs,45:[L0,Gs],60:Uw,61:L0,95:Gs,96:A0,126:A0},Ak={38:qv,92:Fv},Tk={[-5]:Zd,[-4]:Zd,[-3]:Zd,33:nk,38:qv,42:Bf,60:[rw,Fw],91:rk,92:[Nw,Fv],93:Lh,95:Bf,96:yw},Lk={null:[Bf,vk]},Rk={null:[42,95]},Dk={null:[]},Nk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Rk,contentInitial:Ck,disable:Dk,document:xk,flow:kk,flowInitial:wk,insideSpan:Lk,string:Ak,text:Tk},Symbol.toStringTag,{value:"Module"}));function Ok(e,t,i){let a={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},s=[];let c=[],f=[];const d={attempt:B(U),check:B(D),consume:k,enter:A,exit:H,interrupt:B(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:g};let y=t.tokenize.call(h,d);return t.resolveAll&&s.push(t),h;function g(Z){return c=Cn(c,Z),R(),c[c.length-1]!==null?[]:(re(t,0),h.events=Th(s,h.events,h),h.events)}function b(Z,W){return Ik(v(Z),W)}function v(Z){return Mk(c,Z)}function S(){const{_bufferIndex:Z,_index:W,line:Q,column:ie,offset:q}=a;return{_bufferIndex:Z,_index:W,line:Q,column:ie,offset:q}}function w(Z){o[Z.line]=Z.column,se()}function R(){let Z;for(;a._index<c.length;){const W=c[a._index];if(typeof W=="string")for(Z=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===Z&&a._bufferIndex<W.length;)C(W.charCodeAt(a._bufferIndex));else C(W)}}function C(Z){y=y(Z)}function k(Z){Se(Z)?(a.line++,a.column=1,a.offset+=Z===-3?2:1,se()):Z!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=Z}function A(Z,W){const Q=W||{};return Q.type=Z,Q.start=S(),h.events.push(["enter",Q,h]),f.push(Q),Q}function H(Z){const W=f.pop();return W.end=S(),h.events.push(["exit",W,h]),W}function U(Z,W){re(Z,W.from)}function D(Z,W){W.restore()}function B(Z,W){return Q;function Q(ie,q,z){let $,le,fe,L;return Array.isArray(ie)?X(ie):"tokenize"in ie?X([ie]):O(ie);function O(he){return Ee;function Ee(Re){const me=Re!==null&&he[Re],Ve=Re!==null&&he.null,Je=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(Ve)?Ve:Ve?[Ve]:[]];return X(Je)(Re)}}function X(he){return $=he,le=0,he.length===0?z:T(he[le])}function T(he){return Ee;function Ee(Re){return L=j(),fe=he,he.partial||(h.currentConstruct=he),he.name&&h.parser.constructs.disable.null.includes(he.name)?ge():he.tokenize.call(W?Object.assign(Object.create(h),W):h,d,ue,ge)(Re)}}function ue(he){return Z(fe,L),q}function ge(he){return L.restore(),++le<$.length?T($[le]):z}}}function re(Z,W){Z.resolveAll&&!s.includes(Z)&&s.push(Z),Z.resolve&&Qn(h.events,W,h.events.length-W,Z.resolve(h.events.slice(W),h)),Z.resolveTo&&(h.events=Z.resolveTo(h.events,h))}function j(){const Z=S(),W=h.previous,Q=h.currentConstruct,ie=h.events.length,q=Array.from(f);return{from:ie,restore:z};function z(){a=Z,h.previous=W,h.currentConstruct=Q,h.events.length=ie,f=q,se()}}function se(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function Mk(e,t){const i=t.start._index,a=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let c;if(i===o)c=[e[i].slice(a,s)];else{if(c=e.slice(i,o),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function Ik(e,t){let i=-1;const a=[];let o;for(;++i<e.length;){const s=e[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
12
+ `;break}case-3:{c=`\r
13
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,a.push(c)}return a.join("")}function zk(e){const a={constructs:GC([Nk,...(e||{}).extensions||[]]),content:o(KC),defined:[],document:o(JC),flow:o(yk),lazy:{},string:o(_k),text:o(Sk)};return a;function o(s){return c;function c(f){return Ok(a,s,f)}}}function Hk(e){for(;!Yv(e););return e}const R0=/[\0\t\n\r]/g;function Uk(){let e=1,t="",i=!0,a;return o;function o(s,c,f){const d=[];let h,y,g,b,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,t="",i&&(s.charCodeAt(0)===65279&&g++,i=void 0);g<s.length;){if(R0.lastIndex=g,h=R0.exec(s),b=h&&h.index!==void 0?h.index:s.length,v=s.charCodeAt(b),!h){t=s.slice(g);break}if(v===10&&g===b&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),g<b&&(d.push(s.slice(g,b)),e+=b-g),v){case 0:{d.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,d.push(-2);e++<y;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}g=b+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Pk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bk(e){return e.replace(Pk,jk)}function jk(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return Gv(i.slice(s?2:1),s?16:10)}return Ah(i)||e}const Jv={}.hasOwnProperty;function Vk(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),Gk(i)(Hk(zk(i).document().write(Uk()(e,t,!0))))}function Gk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ei),autolinkProtocol:j,autolinkEmail:j,atxHeading:s(Ln),blockQuote:s(Ve),characterEscape:j,characterReference:j,codeFenced:s(Je),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Je,c),codeText:s(jt,c),codeTextData:j,data:j,codeFlowValue:j,definition:s(gt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(ut),hardBreakEscape:s(yt),hardBreakTrailing:s(yt),htmlFlow:s(Ar,c),htmlFlowData:j,htmlText:s(Ar,c),htmlTextData:j,image:s(Tr),label:c,link:s(Ei),listItem:s(tr),listItemValue:b,listOrdered:s(xi,g),listUnordered:s(xi),paragraph:s(Pa),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Ln),strong:s(Ba),thematicBreak:s(Zn)},exit:{atxHeading:d(),atxHeadingSequence:U,autolink:d(),autolinkEmail:me,autolinkProtocol:Re,blockQuote:d(),characterEscapeValue:se,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:he,characterReference:Ee,codeFenced:d(R),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:se,codeIndented:d(C),codeText:d(q),codeTextData:se,data:se,definition:d(),definitionDestinationString:H,definitionLabelString:k,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(W),hardBreakTrailing:d(W),htmlFlow:d(Q),htmlFlowData:se,htmlText:d(ie),htmlTextData:se,image:d($),label:fe,labelText:le,lineEnding:Z,link:d(z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:L,resourceTitleString:O,resource:X,setextHeading:d(re),setextHeadingLineSequence:B,setextHeadingText:D,strong:d(),thematicBreak:d()}};e1(t,(e||{}).mdastExtensions||[]);const i={};return a;function a(J){let ce={type:"root",children:[]};const ve={stack:[ce],tokenStack:[],config:t,enter:f,exit:h,buffer:c,resume:y,data:i},De=[];let He=-1;for(;++He<J.length;)if(J[He][1].type==="listOrdered"||J[He][1].type==="listUnordered")if(J[He][0]==="enter")De.push(He);else{const Pt=De.pop();He=o(J,Pt,He)}for(He=-1;++He<J.length;){const Pt=t[J[He][0]];Jv.call(Pt,J[He][1].type)&&Pt[J[He][1].type].call(Object.assign({sliceSerialize:J[He][2].sliceSerialize},ve),J[He][1])}if(ve.tokenStack.length>0){const Pt=ve.tokenStack[ve.tokenStack.length-1];(Pt[1]||D0).call(ve,void 0,Pt[0])}for(ce.position={start:Qi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Qi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<t.transforms.length;)ce=t.transforms[He](ce)||ce;return ce}function o(J,ce,ve){let De=ce-1,He=-1,Pt=!1,fn,Ct,at,Lt;for(;++De<=ve;){const Ge=J[De];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?He++:He--,Lt=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(fn&&!Lt&&!He&&!at&&(at=De),Lt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Lt=void 0}if(!He&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||He===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(fn){let Hn=De;for(Ct=void 0;Hn--;){const en=J[Hn];if(en[1].type==="lineEnding"||en[1].type==="lineEndingBlank"){if(en[0]==="exit")continue;Ct&&(J[Ct][1].type="lineEndingBlank",Pt=!0),en[1].type="lineEnding",Ct=Hn}else if(!(en[1].type==="linePrefix"||en[1].type==="blockQuotePrefix"||en[1].type==="blockQuotePrefixWhitespace"||en[1].type==="blockQuoteMarker"||en[1].type==="listItemIndent"))break}at&&(!Ct||at<Ct)&&(fn._spread=!0),fn.end=Object.assign({},Ct?J[Ct][1].start:Ge[1].end),J.splice(Ct||De,0,["exit",fn,Ge[2]]),De++,ve++}if(Ge[1].type==="listItemPrefix"){const Hn={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};fn=Hn,J.splice(De,0,["enter",Hn,Ge[2]]),De++,ve++,at=void 0,Lt=!0}}}return J[ce][1]._spread=Pt,ve}function s(J,ce){return ve;function ve(De){f.call(this,J(De),De),ce&&ce.call(this,De)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(J,ce,ve){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ce,ve||void 0]),J.position={start:Qi(ce.start),end:void 0}}function d(J){return ce;function ce(ve){J&&J.call(this,ve),h.call(this,ve)}}function h(J,ce){const ve=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==J.type&&(ce?ce.call(this,J,De[0]):(De[1]||D0).call(this,J,De[0]));else throw new Error("Cannot close `"+J.type+"` ("+$l({start:J.start,end:J.end})+"): it’s not open");ve.position.end=Qi(J.end)}function y(){return jC(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function v(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=J}function S(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=J}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J.replace(/(\r?\n|\r)$/g,"")}function k(J){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ce,ve.identifier=La(this.sliceSerialize(J)).toLowerCase()}function A(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.title=J}function H(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.url=J}function U(J){const ce=this.stack[this.stack.length-1];if(!ce.depth){const ve=this.sliceSerialize(J).length;ce.depth=ve}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function B(J){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function j(J){const ve=this.stack[this.stack.length-1].children;let De=ve[ve.length-1];(!De||De.type!=="text")&&(De=xt(),De.position={start:Qi(J.start),end:void 0},ve.push(De)),this.stack.push(De)}function se(J){const ce=this.stack.pop();ce.value+=this.sliceSerialize(J),ce.position.end=Qi(J.end)}function Z(J){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=ce.children[ce.children.length-1];ve.position.end=Qi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(j.call(this,J),se.call(this,J))}function W(){this.data.atHardBreak=!0}function Q(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J}function ie(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J}function q(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J}function z(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ce,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function $(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ce,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function le(J){const ce=this.sliceSerialize(J),ve=this.stack[this.stack.length-2];ve.label=Bk(ce),ve.identifier=La(ce).toLowerCase()}function fe(){const J=this.stack[this.stack.length-1],ce=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const De=J.children;ve.children=De}else ve.alt=ce}function L(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.url=J}function O(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.title=J}function X(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ue(J){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ce,ve.identifier=La(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function ge(J){this.data.characterReferenceType=J.type}function he(J){const ce=this.sliceSerialize(J),ve=this.data.characterReferenceType;let De;ve?(De=Gv(ce,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=Ah(ce);const He=this.stack[this.stack.length-1];He.value+=De}function Ee(J){const ce=this.stack.pop();ce.position.end=Qi(J.end)}function Re(J){se.call(this,J);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(J)}function me(J){se.call(this,J);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(J)}function Ve(){return{type:"blockquote",children:[]}}function Je(){return{type:"code",lang:null,meta:null,value:""}}function jt(){return{type:"inlineCode",value:""}}function gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ut(){return{type:"emphasis",children:[]}}function Ln(){return{type:"heading",depth:0,children:[]}}function yt(){return{type:"break"}}function Ar(){return{type:"html",value:""}}function Tr(){return{type:"image",title:null,url:"",alt:null}}function Ei(){return{type:"link",title:null,url:"",children:[]}}function xi(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function tr(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Pa(){return{type:"paragraph",children:[]}}function Ba(){return{type:"strong",children:[]}}function xt(){return{type:"text",value:""}}function Zn(){return{type:"thematicBreak"}}}function Qi(e){return{line:e.line,column:e.column,offset:e.offset}}function e1(e,t){let i=-1;for(;++i<t.length;){const a=t[i];Array.isArray(a)?e1(e,a):$k(e,a)}}function $k(e,t){let i;for(i in t)if(Jv.call(t,i))switch(i){case"canContainEols":{const a=t[i];a&&e[i].push(...a);break}case"transforms":{const a=t[i];a&&e[i].push(...a);break}case"enter":case"exit":{const a=t[i];a&&Object.assign(e[i],a);break}}}function D0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$l({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$l({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$l({start:t.start,end:t.end})+") is still open")}function Fk(e){const t=this;t.parser=i;function i(a){return Vk(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qk(e,t){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,i),e.applyData(t,i)}function Yk(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
14
+ `}]}function Xk(e,t){const i=t.value?t.value+`
15
+ `:"",a={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(a.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:a,children:[{type:"text",value:i}]};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 Qk(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Zk(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Kk(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=Ia(a.toLowerCase()),s=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=s+1,f+=1,e.footnoteCounts.set(a,f);const d={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function Wk(e,t){const i={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Jk(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function t1(e,t){const i=t.referenceType;let a="]";if(i==="collapsed"?a+="[]":i==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const o=e.all(t),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=a:o.push({type:"text",value:a}),o}function eA(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return t1(e,t);const o={src:Ia(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,s),e.applyData(t,s)}function tA(e,t){const i={src:Ia(t.url)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function nA(e,t){const i={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,i);const a={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(t,a),e.applyData(t,a)}function iA(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return t1(e,t);const o={href:Ia(a.url||"")};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function rA(e,t){const i={href:Ia(t.url)};t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function aA(e,t,i){const a=e.all(t),o=i?lA(i):n1(t),s={},c=[];if(typeof t.checked=="boolean"){const y=a[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const y=a[f];(o||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
16
+ `}),y.type==="element"&&y.tagName==="p"&&!o?c.push(...y.children):c.push(y)}const d=a[a.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
17
+ `});const h={type:"element",tagName:"li",properties:s,children:c};return e.patch(t,h),e.applyData(t,h)}function lA(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const i=e.children;let a=-1;for(;!t&&++a<i.length;)t=n1(i[a])}return t}function n1(e){const t=e.spread;return t??e.children.length>1}function oA(e,t){const i={},a=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(i.start=t.start);++o<a.length;){const c=a[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:i,children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function sA(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function uA(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function cA(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function dA(e,t){const i=e.all(t),a=i.shift(),o=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=xh(t.children[1]),d=zv(t.children[t.children.length-1]);f&&d&&(c.position={start:f,end:d}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function fA(e,t,i){const a=i?i.children:void 0,s=(a?a.indexOf(t):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const g=t.children[d],b={},v=c?c[d]:void 0;v&&(b.align=v);let S={type:"element",tagName:s,properties:b,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),h.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,y),e.applyData(t,y)}function hA(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const N0=9,O0=32;function pA(e){const t=String(e),i=/\r?\n|\r/g;let a=i.exec(t),o=0;const s=[];for(;a;)s.push(M0(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(t);return s.push(M0(t.slice(o),o>0,!1)),s.join("")}function M0(e,t,i){let a=0,o=e.length;if(t){let s=e.codePointAt(a);for(;s===N0||s===O0;)a++,s=e.codePointAt(a)}if(i){let s=e.codePointAt(o-1);for(;s===N0||s===O0;)o--,s=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function mA(e,t){const i={type:"text",value:pA(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function gA(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const yA={blockquote:qk,break:Yk,code:Xk,delete:Qk,emphasis:Zk,footnoteReference:Kk,heading:Wk,html:Jk,imageReference:eA,image:tA,inlineCode:nA,linkReference:iA,link:rA,listItem:aA,list:oA,paragraph:sA,root:uA,strong:cA,table:dA,tableCell:hA,tableRow:fA,text:mA,thematicBreak:gA,toml:Es,yaml:Es,definition:Es,footnoteDefinition:Es};function Es(){}const i1=-1,fu=0,ql=1,Qs=2,Rh=3,Dh=4,Nh=5,Oh=6,r1=7,a1=8,bA=typeof self=="object"?self:globalThis,I0=(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 bA[e](t)},vA=(e,t)=>{const i=(o,s)=>(e.set(s,o),o),a=o=>{if(e.has(o))return e.get(o);const[s,c]=t[o];switch(s){case fu:case i1:return i(c,o);case ql:{const f=i([],o);for(const d of c)f.push(a(d));return f}case Qs:{const f=i({},o);for(const[d,h]of c)f[a(d)]=a(h);return f}case Rh:return i(new Date(c),o);case Dh:{const{source:f,flags:d}=c;return i(new RegExp(f,d),o)}case Nh:{const f=i(new Map,o);for(const[d,h]of c)f.set(a(d),a(h));return f}case Oh:{const f=i(new Set,o);for(const d of c)f.add(a(d));return f}case r1:{const{name:f,message:d}=c;return i(I0(f,d),o)}case a1:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(I0(s,c),o)};return a},z0=e=>vA(new Map,e)(0),ya="",{toString:_A}={},{keys:SA}=Object,Il=e=>{const t=typeof e;if(t!=="object"||!e)return[fu,t];const i=_A.call(e).slice(8,-1);switch(i){case"Array":return[ql,ya];case"Object":return[Qs,ya];case"Date":return[Rh,ya];case"RegExp":return[Dh,ya];case"Map":return[Nh,ya];case"Set":return[Oh,ya];case"DataView":return[ql,i]}return i.includes("Array")?[ql,i]:i.includes("Error")?[r1,i]:[Qs,i]},xs=([e,t])=>e===fu&&(t==="function"||t==="symbol"),EA=(e,t,i,a)=>{const o=(c,f)=>{const d=a.push(c)-1;return i.set(f,d),d},s=c=>{if(i.has(c))return i.get(c);let[f,d]=Il(c);switch(f){case fu:{let y=c;switch(d){case"bigint":f=a1,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);y=null;break;case"undefined":return o([i1],c)}return o([f,y],c)}case ql:{if(d){let b=c;return d==="DataView"?b=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(c)),o([d,[...b]],c)}const y=[],g=o([f,y],c);for(const b of c)y.push(s(b));return g}case Qs:{if(d)switch(d){case"BigInt":return o([d,c.toString()],c);case"Boolean":case"Number":case"String":return o([d,c.valueOf()],c)}if(t&&"toJSON"in c)return s(c.toJSON());const y=[],g=o([f,y],c);for(const b of SA(c))(e||!xs(Il(c[b])))&&y.push([s(b),s(c[b])]);return g}case Rh:return o([f,c.toISOString()],c);case Dh:{const{source:y,flags:g}=c;return o([f,{source:y,flags:g}],c)}case Nh:{const y=[],g=o([f,y],c);for(const[b,v]of c)(e||!(xs(Il(b))||xs(Il(v))))&&y.push([s(b),s(v)]);return g}case Oh:{const y=[],g=o([f,y],c);for(const b of c)(e||!xs(Il(b)))&&y.push(s(b));return g}}const{message:h}=c;return o([f,{name:d,message:h}],c)};return s},H0=(e,{json:t,lossy:i}={})=>{const a=[];return EA(!(t||i),!!t,new Map,a)(e),a},Zs=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?z0(H0(e,t)):structuredClone(e):(e,t)=>z0(H0(e,t));function xA(e,t){const i=[{type:"text",value:"↩"}];return t>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),i}function CA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function wA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||xA,a=e.options.footnoteBackLabel||CA,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const y=e.all(h),g=String(h.identifier).toUpperCase(),b=Ia(g.toLowerCase());let v=0;const S=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++v<=w;){S.length>0&&S.push({type:"text",value:" "});let k=typeof i=="string"?i:i(d,v);typeof k=="string"&&(k={type:"text",value:k}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(d,v),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const R=y[y.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const k=R.children[R.children.length-1];k&&k.type==="text"?k.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...S)}else y.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(y,!0)};e.patch(h,C),f.push(C)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Zs(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
18
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
19
+ `}]}}const l1=(function(e){if(e==null)return LA;if(typeof e=="function")return hu(e);if(typeof e=="object")return Array.isArray(e)?kA(e):AA(e);if(typeof e=="string")return TA(e);throw new Error("Expected function, string, or object as test")});function kA(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=l1(e[i]);return hu(a);function a(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function AA(e){const t=e;return hu(i);function i(a){const o=a;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function TA(e){return hu(t);function t(i){return i&&i.type===e}}function hu(e){return t;function t(i,a,o){return!!(RA(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function LA(){return!0}function RA(e){return e!==null&&typeof e=="object"&&"type"in e}const o1=[],DA=!0,U0=!1,NA="skip";function OA(e,t,i,a){let o;typeof t=="function"&&typeof i!="function"?(a=i,i=t):o=t;const s=l1(o),c=a?-1:1;f(e,void 0,[])();function f(d,h,y){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const v=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=o1,S,w,R;if((!t||s(d,h,y[y.length-1]||void 0))&&(v=MA(i(d,y)),v[0]===U0))return v;if("children"in d&&d.children){const C=d;if(C.children&&v[0]!==NA)for(w=(a?C.children.length:-1)+c,R=y.concat(C);w>-1&&w<C.children.length;){const k=C.children[w];if(S=f(k,w,R)(),S[0]===U0)return S;w=typeof S[1]=="number"?S[1]:w+c}}return v}}}function MA(e){return Array.isArray(e)?e:typeof e=="number"?[DA,e]:e==null?o1:[e]}function s1(e,t,i,a){let o,s,c;typeof t=="function"&&typeof i!="function"?(s=void 0,c=t,o=i):(s=t,c=i,o=a),OA(e,s,f,o);function f(d,h){const y=h[h.length-1],g=y?y.children.indexOf(d):void 0;return c(d,g,y)}}const jf={}.hasOwnProperty,IA={};function zA(e,t){const i=t||IA,a=new Map,o=new Map,s=new Map,c={...yA,...i.handlers},f={all:h,applyData:UA,definitionById:a,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:i,patch:HA,wrap:BA};return s1(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?a:o,b=String(y.identifier).toUpperCase();g.has(b)||g.set(b,y)}}),f;function d(y,g){const b=y.type,v=f.handlers[b];if(jf.call(f.handlers,b)&&v)return v(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in y){const{children:w,...R}=y,C=Zs(R);return C.children=f.all(y),C}return Zs(y)}return(f.options.unknownHandler||PA)(f,y,g)}function h(y){const g=[];if("children"in y){const b=y.children;let v=-1;for(;++v<b.length;){const S=f.one(b[v],y);if(S){if(v&&b[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=P0(S.value)),!Array.isArray(S)&&S.type==="element")){const w=S.children[0];w&&w.type==="text"&&(w.value=P0(w.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function HA(e,t){e.position&&(t.position=vC(e))}function UA(e,t){let i=t;if(e&&e.data){const a=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof a=="string")if(i.type==="element")i.tagName=a;else{const c="children"in i?i.children:[i];i={type:"element",tagName:a,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,Zs(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function PA(e,t){const i=t.data||{},a="value"in t&&!(jf.call(i,"hProperties")||jf.call(i,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function BA(e,t){const i=[];let a=-1;for(t&&i.push({type:"text",value:`
20
+ `});++a<e.length;)a&&i.push({type:"text",value:`
21
+ `}),i.push(e[a]);return t&&e.length>0&&i.push({type:"text",value:`
22
+ `}),i}function P0(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function B0(e,t){const i=zA(e,t),a=i.one(e,void 0),o=wA(i),s=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
23
+ `},o),s}function jA(e,t){return e&&"run"in e?async function(i,a){const o=B0(i,{file:a,...t});await e.run(o,a)}:function(i,a){return B0(i,{file:a,...e||t})}}function j0(e){if(e)throw e}var Kd,V0;function VA(){if(V0)return Kd;V0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},s=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var y=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!g)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},c=function(h,y){i&&y.name==="__proto__"?i(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(e.call(h,y)){if(a)return a(h,y).value}else return;return h[y]};return Kd=function d(){var h,y,g,b,v,S,w=arguments[0],R=1,C=arguments.length,k=!1;for(typeof w=="boolean"&&(k=w,w=arguments[1]||{},R=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});R<C;++R)if(h=arguments[R],h!=null)for(y in h)g=f(w,y),b=f(h,y),w!==b&&(k&&b&&(s(b)||(v=o(b)))?(v?(v=!1,S=g&&o(g)?g:[]):S=g&&s(g)?g:{},c(w,{name:y,newValue:d(k,S,b)})):typeof b<"u"&&c(w,{name:y,newValue:b}));return w},Kd}var GA=VA();const Wd=gv(GA);function Vf(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 $A(){const e=[],t={run:i,use:a};return t;function i(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(d,...h){const y=e[++s];let g=-1;if(d){c(d);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,y?FA(y,f)(...h):c(null,...h)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function FA(e,t){let i;return a;function a(...c){const f=e.length>c.length;let d;f&&c.push(o);try{d=e.apply(this,c)}catch(h){const y=h;if(f&&i)throw y;return o(y)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,o):d instanceof Error?o(d):s(d))}function o(c,...f){i||(i=!0,t(c,...f))}function s(c){o(null,c)}}const $n={basename:qA,dirname:YA,extname:XA,join:QA,sep:"/"};function qA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');lo(e);let i=0,a=-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){i=o+1;break}}else a<0&&(s=!0,a=o+1);return a<0?"":e.slice(i,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(a=o):(f=-1,a=c));return i===a?a=c:a<0&&(a=e.length),e.slice(i,a)}function YA(e){if(lo(e),e.length===0)return".";let t=-1,i=e.length,a;for(;--i;)if(e.codePointAt(i)===47){if(a){t=i;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function XA(e){lo(e);let t=e.length,i=-1,a=0,o=-1,s=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}i<0&&(c=!0,i=t+1),f===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||i<0||s===0||s===1&&o===i-1&&o===a+1?"":e.slice(o,i)}function QA(...e){let t=-1,i;for(;++t<e.length;)lo(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":ZA(i)}function ZA(e){lo(e);const t=e.codePointAt(0)===47;let i=KA(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function KA(e,t){let i="",a=0,o=-1,s=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(i.length<2||a!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(d=i.lastIndexOf("/"),d!==i.length-1){d<0?(i="",a=0):(i=i.slice(0,d),a=i.length-1-i.lastIndexOf("/")),o=c,s=0;continue}}else if(i.length>0){i="",a=0,o=c,s=0;continue}}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),a=c-o-1;o=c,s=0}else f===46&&s>-1?s++:s=-1}return i}function lo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WA={cwd:JA};function JA(){return"/"}function Gf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eT(e){if(typeof e=="string")e=new URL(e);else if(!Gf(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 tT(e)}function tT(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let i=-1;for(;++i<t.length;)if(t.codePointAt(i)===37&&t.codePointAt(i+1)===50){const a=t.codePointAt(i+2);if(a===70||a===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 Jd=["history","path","basename","stem","extname","dirname"];class u1{constructor(t){let i;t?Gf(t)?i={path:t}:typeof t=="string"||nT(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":WA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Jd.length;){const s=Jd[a];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let o;for(o in i)Jd.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?$n.basename(this.path):void 0}set basename(t){tf(t,"basename"),ef(t,"basename"),this.path=$n.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$n.dirname(this.path):void 0}set dirname(t){G0(this.basename,"dirname"),this.path=$n.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$n.extname(this.path):void 0}set extname(t){if(ef(t,"extname"),G0(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=$n.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Gf(t)&&(t=eT(t)),tf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$n.basename(this.path,this.extname):void 0}set stem(t){tf(t,"stem"),ef(t,"stem"),this.path=$n.join(this.dirname||"",t+(this.extname||""))}fail(t,i,a){const o=this.message(t,i,a);throw o.fatal=!0,o}info(t,i,a){const o=this.message(t,i,a);return o.fatal=void 0,o}message(t,i,a){const o=new Ut(t,i,a);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 ef(e,t){if(e&&e.includes($n.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$n.sep+"`")}function tf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function G0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function nT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iT=(function(e){const a=this.constructor.prototype,o=a[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),rT={}.hasOwnProperty;class Mh extends iT{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=$A()}copy(){const t=new Mh;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];t.use(...a)}return t.data(Wd(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(af("data",this.frozen),this.namespace[t]=i,this):rT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(af("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[i,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const o=i.call(t,...a);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const i=Cs(t),a=this.parser||this.Parser;return nf("parse",a),a(String(i),i)}process(t,i){const a=this;return this.freeze(),nf("process",this.parser||this.Parser),rf("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const f=Cs(t),d=a.parse(f);a.run(d,f,function(y,g,b){if(y||!g||!b)return h(y);const v=g,S=a.stringify(v,b);oT(S)?b.value=S:b.result=S,h(y,b)});function h(y,g){y||!g?c(y):s?s(g):i(void 0,g)}}}processSync(t){let i=!1,a;return this.freeze(),nf("processSync",this.parser||this.Parser),rf("processSync",this.compiler||this.Compiler),this.process(t,o),F0("processSync","process",i),a;function o(s,c){i=!0,j0(s),a=c}}run(t,i,a){$0(t),this.freeze();const o=this.transformers;return!a&&typeof i=="function"&&(a=i,i=void 0),a?s(void 0,a):new Promise(s);function s(c,f){const d=Cs(i);o.run(t,d,h);function h(y,g,b){const v=g||t;y?f(y):c?c(v):a(void 0,v,b)}}}runSync(t,i){let a=!1,o;return this.run(t,i,s),F0("runSync","run",a),o;function s(c,f){j0(c),o=f,a=!0}}stringify(t,i){this.freeze();const a=Cs(i),o=this.compiler||this.Compiler;return rf("stringify",o),$0(t),o(t,a)}use(t,...i){const a=this.attachers,o=this.namespace;if(af("use",this.frozen),t!=null)if(typeof t=="function")d(t,i);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...g]=h;d(y,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))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");f(h.plugins),h.settings&&(o.settings=Wd(!0,o.settings,h.settings))}function f(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const g=h[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,y){let g=-1,b=-1;for(;++g<a.length;)if(a[g][0]===h){b=g;break}if(b===-1)a.push([h,...y]);else if(y.length>0){let[v,...S]=y;const w=a[b][1];Vf(w)&&Vf(v)&&(v=Wd(!0,w,v)),a[b]=[h,v,...S]}}}}const aT=new Mh().freeze();function nf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function af(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 $0(e){if(!Vf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function F0(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cs(e){return lT(e)?e:new u1(e)}function lT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oT(e){return typeof e=="string"||sT(e)}function sT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",q0=[],Y0={allowDangerousHtml:!0},cT=/^(https?|ircs?|mailto|xmpp)$/i,dT=[{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 fT(e){const t=hT(e),i=pT(e);return mT(t.runSync(t.parse(i),i),e)}function hT(e){const t=e.rehypePlugins||q0,i=e.remarkPlugins||q0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Y0}:Y0;return aT().use(Fk).use(i).use(jA,a).use(t)}function pT(e){const t=e.children||"",i=new u1;return typeof t=="string"&&(i.value=t),i}function mT(e,t){const i=t.allowedElements,a=t.allowElement,o=t.components,s=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||gT;for(const y of dT)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+uT+y.id,void 0);return s1(e,h),CC(e,{Fragment:I.Fragment,components:o,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function h(y,g,b){if(y.type==="raw"&&b&&typeof g=="number")return c?b.children.splice(g,1):b.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let v;for(v in Xd)if(Object.hasOwn(Xd,v)&&Object.hasOwn(y.properties,v)){const S=y.properties[v],w=Xd[v];(w===null||w.includes(y.tagName))&&(y.properties[v]=d(String(S||""),v,y))}}if(y.type==="element"){let v=i?!i.includes(y.tagName):s?s.includes(y.tagName):!1;if(!v&&a&&typeof g=="number"&&(v=!a(y,g,b)),v&&b&&typeof g=="number")return f&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function gT(e){const t=e.indexOf(":"),i=e.indexOf("?"),a=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||i!==-1&&t>i||a!==-1&&t>a||cT.test(e.slice(0,t))?e:""}const yT="modulepreload",bT=function(e){return"/"+e},X0={},x=function(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let h=function(y){return Promise.all(y.map(g=>Promise.resolve(g).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};var c=h;document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=f?.nonce||f?.getAttribute("nonce");o=h(i.map(y=>{if(y=bT(y),y in X0)return;X0[y]=!0;const g=y.endsWith(".css"),b=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${b}`))return;const v=document.createElement("link");if(v.rel=g?"stylesheet":yT,g||(v.as="script"),v.crossOrigin="",v.href=y,d&&v.setAttribute("nonce",d),document.head.appendChild(v),g)return new Promise((S,w)=>{v.addEventListener("load",S),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${y}`)))})}))}function s(f){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=f,window.dispatchEvent(d),!d.defaultPrevented)throw f}return o.then(f=>{for(const d of f||[])d.status==="rejected"&&s(d.reason);return t().catch(s)})};let mt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function vT(e){return Ih(e)}function Ih(e){return Array.isArray(e)?_T(e):e instanceof RegExp?e:typeof e=="object"?ST(e):e}function _T(e){let t=[];for(let i=0,a=e.length;i<a;i++)t[i]=Ih(e[i]);return t}function ST(e){let t={};for(let i in e)t[i]=Ih(e[i]);return t}function c1(e,...t){return t.forEach(i=>{for(let a in i)e[a]=i[a]}),e}function d1(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?d1(e.substring(0,e.length-1)):e.substr(~t+1)}var lf=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ws=class{static hasCaptures(e){return e===null?!1:(lf.lastIndex=0,lf.test(e))}static replaceCaptures(e,t,i){return e.replace(lf,(a,o,s,c)=>{let f=i[parseInt(o||s,10)];if(f){let d=t.substring(f.start,f.end);for(;d[0]===".";)d=d.substring(1);switch(c){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return a})}};function f1(e,t){return e<t?-1:e>t?1:0}function h1(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let i=e.length,a=t.length;if(i===a){for(let o=0;o<i;o++){let s=f1(e[o],t[o]);if(s!==0)return s}return 0}return i-a}function Q0(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 p1(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var m1=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}},Ks=class{constructor(e,t,i){this._colorMap=e,this._defaults=t,this._root=i}static createFromRawTheme(e,t){return this.createFromParsedTheme(CT(e),t)}static createFromParsedTheme(e,t){return kT(e,t)}_cachedMatchRoot=new m1(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,a=this._cachedMatchRoot.get(t).find(o=>ET(e.parent,o.parentScopes));return a?new g1(a.fontStyle,a.foreground,a.background):null}},of=class $s{constructor(t,i){this.parent=t,this.scopeName=i}static push(t,i){for(const a of i)t=new $s(t,a);return t}static from(...t){let i=null;for(let a=0;a<t.length;a++)i=new $s(i,t[a]);return i}push(t){return new $s(this,t)}getSegments(){let t=this;const i=[];for(;t;)i.push(t.scopeName),t=t.parent;return i.reverse(),i}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const i=[];let a=this;for(;a&&a!==t;)i.push(a.scopeName),a=a.parent;return a===t?i.reverse():void 0}};function ET(e,t){if(t.length===0)return!0;for(let i=0;i<t.length;i++){let a=t[i],o=!1;if(a===">"){if(i===t.length-1)return!1;a=t[++i],o=!0}for(;e&&!xT(e.scopeName,a);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function xT(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var g1=class{constructor(e,t,i){this.fontStyle=e,this.foregroundId=t,this.backgroundId=i}};function CT(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,i=[],a=0;for(let o=0,s=t.length;o<s;o++){let c=t[o];if(!c.settings)continue;let f;if(typeof c.scope=="string"){let g=c.scope;g=g.replace(/^[,]+/,""),g=g.replace(/[,]+$/,""),f=g.split(",")}else Array.isArray(c.scope)?f=c.scope:f=[""];let d=-1;if(typeof c.settings.fontStyle=="string"){d=0;let g=c.settings.fontStyle.split(" ");for(let b=0,v=g.length;b<v;b++)switch(g[b]){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 h=null;typeof c.settings.foreground=="string"&&Q0(c.settings.foreground)&&(h=c.settings.foreground);let y=null;typeof c.settings.background=="string"&&Q0(c.settings.background)&&(y=c.settings.background);for(let g=0,b=f.length;g<b;g++){let S=f[g].trim().split(" "),w=S[S.length-1],R=null;S.length>1&&(R=S.slice(0,S.length-1),R.reverse()),i[a++]=new wT(w,R,o,d,h,y)}}return i}var wT=class{constructor(e,t,i,a,o,s){this.scope=e,this.parentScopes=t,this.index=i,this.fontStyle=a,this.foreground=o,this.background=s}},Ht=(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))(Ht||{});function kT(e,t){e.sort((d,h)=>{let y=f1(d.scope,h.scope);return y!==0||(y=h1(d.parentScopes,h.parentScopes),y!==0)?y:d.index-h.index});let i=0,a="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(i=d.fontStyle),d.foreground!==null&&(a=d.foreground),d.background!==null&&(o=d.background)}let s=new AT(t),c=new g1(i,s.getId(a),s.getId(o)),f=new LT(new $f(0,null,-1,0,0),[]);for(let d=0,h=e.length;d<h;d++){let y=e[d];f.insert(0,y.scope,y.parentScopes,y.fontStyle,s.getId(y.foreground),s.getId(y.background))}return new Ks(s,c,f)}var AT=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,i=e.length;t<i;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)}},TT=Object.freeze([]),$f=class y1{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,i,a,o,s){this.scopeDepth=t,this.parentScopes=i||TT,this.fontStyle=a,this.foreground=o,this.background=s}clone(){return new y1(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let i=[];for(let a=0,o=t.length;a<o;a++)i[a]=t[a].clone();return i}acceptOverwrite(t,i,a,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,i!==-1&&(this.fontStyle=i),a!==0&&(this.foreground=a),o!==0&&(this.background=o)}},LT=class Ff{constructor(t,i=[],a={}){this._mainRule=t,this._children=a,this._rulesWithParentScopes=i}_rulesWithParentScopes;static _cmpBySpecificity(t,i){if(t.scopeDepth!==i.scopeDepth)return i.scopeDepth-t.scopeDepth;let a=0,o=0;for(;t.parentScopes[a]===">"&&a++,i.parentScopes[o]===">"&&o++,!(a>=t.parentScopes.length||o>=i.parentScopes.length);){const s=i.parentScopes[o].length-t.parentScopes[a].length;if(s!==0)return s;a++,o++}return i.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let a=t.indexOf("."),o,s;if(a===-1?(o=t,s=""):(o=t.substring(0,a),s=t.substring(a+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const i=this._rulesWithParentScopes.concat(this._mainRule);return i.sort(Ff._cmpBySpecificity),i}insert(t,i,a,o,s,c){if(i===""){this._doInsertHere(t,a,o,s,c);return}let f=i.indexOf("."),d,h;f===-1?(d=i,h=""):(d=i.substring(0,f),h=i.substring(f+1));let y;this._children.hasOwnProperty(d)?y=this._children[d]:(y=new Ff(this._mainRule.clone(),$f.cloneArr(this._rulesWithParentScopes)),this._children[d]=y),y.insert(t+1,h,a,o,s,c)}_doInsertHere(t,i,a,o,s){if(i===null){this._mainRule.acceptOverwrite(t,a,o,s);return}for(let c=0,f=this._rulesWithParentScopes.length;c<f;c++){let d=this._rulesWithParentScopes[c];if(h1(d.parentScopes,i)===0){d.acceptOverwrite(t,a,o,s);return}}a===-1&&(a=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new $f(t,i,a,o,s))}},Na=class xn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const i=xn.getLanguageId(t),a=xn.getTokenType(t),o=xn.getFontStyle(t),s=xn.getForeground(t),c=xn.getBackground(t);console.log({languageId:i,tokenType:a,fontStyle:o,foreground:s,background:c})}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,i,a,o,s,c,f){let d=xn.getLanguageId(t),h=xn.getTokenType(t),y=xn.containsBalancedBrackets(t)?1:0,g=xn.getFontStyle(t),b=xn.getForeground(t),v=xn.getBackground(t);return i!==0&&(d=i),a!==8&&(h=a),o!==null&&(y=o?1:0),s!==-1&&(g=s),c!==0&&(b=c),f!==0&&(v=f),(d<<0|h<<8|y<<10|g<<11|b<<15|v<<24)>>>0}};function Ws(e,t){const i=[],a=RT(e);let o=a.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=a.next()}let h=c();if(i.push({matcher:h,priority:d}),o!==",")break;o=a.next()}return i;function s(){if(o==="-"){o=a.next();const d=s();return h=>!!d&&!d(h)}if(o==="("){o=a.next();const d=f();return o===")"&&(o=a.next()),d}if(Z0(o)){const d=[];do d.push(o),o=a.next();while(Z0(o));return h=>t(d,h)}return null}function c(){const d=[];let h=s();for(;h;)d.push(h),h=s();return y=>d.every(g=>g(y))}function f(){const d=[];let h=c();for(;h&&(d.push(h),o==="|"||o===",");){do o=a.next();while(o==="|"||o===",");h=c()}return y=>d.some(g=>g(y))}}function Z0(e){return!!e&&!!e.match(/[\w\.:]+/)}function RT(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,i=t.exec(e);return{next:()=>{if(!i)return null;const a=i[0];return i=t.exec(e),a}}}function b1(e){typeof e.dispose=="function"&&e.dispose()}var Kl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},DT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},NT=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))}},OT=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Kl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new NT;for(const i of e)MT(i,this.initialScopeName,this.repo,t);for(const i of t.references)if(i instanceof Kl){if(this.seenFullScopeRequests.has(i.scopeName))continue;this.seenFullScopeRequests.add(i.scopeName),this.Q.push(i)}else{if(this.seenFullScopeRequests.has(i.scopeName)||this.seenPartialScopeRequests.has(i.toKey()))continue;this.seenPartialScopeRequests.add(i.toKey()),this.Q.push(i)}}};function MT(e,t,i,a){const o=i.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=i.lookup(t);e instanceof Kl?Fs({baseGrammar:s,selfGrammar:o},a):qf(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},a);const c=i.injections(e.scopeName);if(c)for(const f of c)a.add(new Kl(f))}function qf(e,t,i){if(t.repository&&t.repository[e]){const a=t.repository[e];Js([a],t,i)}}function Fs(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Js(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Js(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Js(e,t,i){for(const a of e){if(i.visitedRule.has(a))continue;i.visitedRule.add(a);const o=a.repository?c1({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&Js(a.patterns,{...t,repository:o},i);const s=a.include;if(!s)continue;const c=v1(s);switch(c.kind){case 0:Fs({...t,selfGrammar:t.baseGrammar},i);break;case 1:Fs(t,i);break;case 2:qf(c.ruleName,{...t,repository:o},i);break;case 3:case 4:const f=c.scopeName===t.selfGrammar.scopeName?t.selfGrammar:c.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(f){const d={baseGrammar:t.baseGrammar,selfGrammar:f,repository:o};c.kind===4?qf(c.ruleName,d,i):Fs(d,i)}else c.kind===4?i.add(new DT(c.scopeName,c.ruleName)):i.add(new Kl(c.scopeName));break}}}var IT=class{kind=0},zT=class{kind=1},HT=class{constructor(e){this.ruleName=e}kind=2},UT=class{constructor(e){this.scopeName=e}kind=3},PT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function v1(e){if(e==="$base")return new IT;if(e==="$self")return new zT;const t=e.indexOf("#");if(t===-1)return new UT(e);if(t===0)return new HT(e.substring(1));{const i=e.substring(0,t),a=e.substring(t+1);return new PT(i,a)}}var BT=/\\(\d+)/,K0=/\\(\d+)/g,jT=-1,_1=-2;var oo=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,i,a){this.$location=e,this.id=t,this._name=i||null,this._nameIsCapturing=ws.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=ws.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${d1(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:ws.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ws.replaceCaptures(this._contentName,e,t)}},VT=class extends oo{retokenizeCapturedWithRuleId;constructor(e,t,i,a,o){super(e,t,i,a),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,i,a){throw new Error("Not supported!")}},GT=class extends oo{_match;captures;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,null),this._match=new Wl(a,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,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Jl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},W0=class extends oo{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,a),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 i of this.patterns)e.getRule(i).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Jl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Yf=class extends oo{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o,s,c,f,d,h){super(e,t,i,a),this._begin=new Wl(o,this.id),this.beginCaptures=s,this._end=new Wl(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=f,this.applyEndPatternLast=d||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.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,i,a){return this._getCachedCompiledPatterns(e,t).compileAG(e,i,a)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Jl;for(const i of this.patterns)e.getRule(i).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}},eu=class extends oo{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,i,a,o,s,c,f,d){super(e,t,i,a),this._begin=new Wl(o,this.id),this.beginCaptures=s,this.whileCaptures=f,this._while=new Wl(c,_1),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,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Jl;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,i,a){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,i,a)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Jl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},S1=class zt{static createCaptureRule(t,i,a,o,s){return t.registerRule(c=>new VT(i,c,a,o,s))}static getCompiledRuleId(t,i,a){return t.id||i.registerRule(o=>{if(t.id=o,t.match)return new GT(t.$vscodeTextmateLocation,t.id,t.name,t.match,zt._compileCaptures(t.captures,i,a));if(typeof t.begin>"u"){t.repository&&(a=c1({},a,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new W0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,zt._compilePatterns(s,i,a))}return t.while?new eu(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,zt._compileCaptures(t.beginCaptures||t.captures,i,a),t.while,zt._compileCaptures(t.whileCaptures||t.captures,i,a),zt._compilePatterns(t.patterns,i,a)):new Yf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,zt._compileCaptures(t.beginCaptures||t.captures,i,a),t.end,zt._compileCaptures(t.endCaptures||t.captures,i,a),t.applyEndPatternLast,zt._compilePatterns(t.patterns,i,a))}),t.id}static _compileCaptures(t,i,a){let o=[];if(t){let s=0;for(const c in t){if(c==="$vscodeTextmateLocation")continue;const f=parseInt(c,10);f>s&&(s=f)}for(let c=0;c<=s;c++)o[c]=null;for(const c in t){if(c==="$vscodeTextmateLocation")continue;const f=parseInt(c,10);let d=0;t[c].patterns&&(d=zt.getCompiledRuleId(t[c],i,a)),o[f]=zt.createCaptureRule(i,t[c].$vscodeTextmateLocation,t[c].name,t[c].contentName,d)}}return o}static _compilePatterns(t,i,a){let o=[];if(t)for(let s=0,c=t.length;s<c;s++){const f=t[s];let d=-1;if(f.include){const h=v1(f.include);switch(h.kind){case 0:case 1:d=zt.getCompiledRuleId(a[f.include],i,a);break;case 2:let y=a[h.ruleName];y&&(d=zt.getCompiledRuleId(y,i,a));break;case 3:case 4:const g=h.scopeName,b=h.kind===4?h.ruleName:null,v=i.getExternalGrammar(g,a);if(v)if(b){let S=v.repository[b];S&&(d=zt.getCompiledRuleId(S,i,v.repository))}else d=zt.getCompiledRuleId(v.repository.$self,i,v.repository);break}}else d=zt.getCompiledRuleId(f,i,a);if(d!==-1){const h=i.getRule(d);let y=!1;if((h instanceof W0||h instanceof Yf||h instanceof eu)&&h.hasMissingPatterns&&h.patterns.length===0&&(y=!0),y)continue;o.push(d)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Wl=class E1{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,i){if(t&&typeof t=="string"){const a=t.length;let o=0,s=[],c=!1;for(let f=0;f<a;f++)if(t.charAt(f)==="\\"&&f+1<a){const h=t.charAt(f+1);h==="z"?(s.push(t.substring(o,f)),s.push("$(?!\\n)(?<!\\n)"),o=f+2):(h==="A"||h==="G")&&(c=!0),f++}this.hasAnchor=c,o===0?this.source=t:(s.push(t.substring(o,a)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=i,typeof this.source=="string"?this.hasBackReferences=BT.test(this.source):this.hasBackReferences=!1}clone(){return new E1(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,i){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let a=i.map(o=>t.substring(o.start,o.end));return K0.lastIndex=0,this.source.replace(K0,(o,s)=>p1(a[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=[],i=[],a=[],o=[],s,c,f,d;for(s=0,c=this.source.length;s<c;s++)f=this.source.charAt(s),t[s]=f,i[s]=f,a[s]=f,o[s]=f,f==="\\"&&s+1<c&&(d=this.source.charAt(s+1),d==="A"?(t[s+1]="￿",i[s+1]="￿",a[s+1]="A",o[s+1]="A"):d==="G"?(t[s+1]="￿",i[s+1]="G",a[s+1]="￿",o[s+1]="G"):(t[s+1]=d,i[s+1]=d,a[s+1]=d,o[s+1]=d),s++);return{A0_G0:t.join(""),A0_G1:i.join(""),A1_G0:a.join(""),A1_G1:o.join("")}}resolveAnchors(t,i){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?i?this._anchorCache.A1_G1:this._anchorCache.A1_G0:i?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Jl=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(i=>i.source);this._cached=new J0(e,t,this._items.map(i=>i.ruleId))}return this._cached}compileAG(e,t,i){return this._hasAnchors?t?i?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,i)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,i)),this._anchorCache.A1_G0):i?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,i)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,i)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,i){let a=this._items.map(o=>o.resolveAnchors(t,i));return new J0(e,a,this._items.map(o=>o.ruleId))}},J0=class{constructor(e,t,i){this.regExps=t,this.rules=i,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,i=this.rules.length;t<i;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
24
+ `)}findNextMatchSync(e,t,i){const a=this.scanner.findNextMatchSync(e,t,i);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},sf=class{constructor(e,t){this.languageId=e,this.tokenType=t}},$T=class Xf{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,i){this._defaultAttributes=new sf(t,8),this._embeddedLanguagesMatcher=new FT(Object.entries(i||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Xf._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new sf(0,0);_getBasicScopeAttributes=new m1(t=>{const i=this._scopeToLanguage(t),a=this._toStandardTokenType(t);return new sf(i,a)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const i=t.match(Xf.STANDARD_TOKEN_TYPE_REGEXP);if(!i)return 8;switch(i[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/},FT=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(([i,a])=>p1(i));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])}},eb=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function x1(e,t,i,a,o,s,c,f){const d=t.content.length;let h=!1,y=-1;if(c){const v=qT(e,t,i,a,o,s);o=v.stack,a=v.linePos,i=v.isFirstLine,y=v.anchorPosition}const g=Date.now();for(;!h;){if(f!==0&&Date.now()-g>f)return new eb(o,!0);b()}return new eb(o,!1);function b(){const v=YT(e,t,i,a,o,y);if(!v){s.produce(o,d),h=!0;return}const S=v.captureIndices,w=v.matchedRuleId,R=S&&S.length>0?S[0].end>a:!1;if(w===jT){const C=o.getRule(e);s.produce(o,S[0].start),o=o.withContentNameScopesList(o.nameScopesList),Pl(e,t,i,o,s,C.endCaptures,S),s.produce(o,S[0].end);const k=o;if(o=o.parent,y=k.getAnchorPos(),!R&&k.getEnterPos()===a){o=k,s.produce(o,d),h=!0;return}}else{const C=e.getRule(w);s.produce(o,S[0].start);const k=o,A=C.getName(t.content,S),H=o.contentNameScopesList.pushAttributed(A,e);if(o=o.push(w,a,y,S[0].end===d,null,H,H),C instanceof Yf){const U=C;Pl(e,t,i,o,s,U.beginCaptures,S),s.produce(o,S[0].end),y=S[0].end;const D=U.getContentName(t.content,S),B=H.pushAttributed(D,e);if(o=o.withContentNameScopesList(B),U.endHasBackReferences&&(o=o.withEndRule(U.getEndWithResolvedBackReferences(t.content,S))),!R&&k.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),h=!0;return}}else if(C instanceof eu){const U=C;Pl(e,t,i,o,s,U.beginCaptures,S),s.produce(o,S[0].end),y=S[0].end;const D=U.getContentName(t.content,S),B=H.pushAttributed(D,e);if(o=o.withContentNameScopesList(B),U.whileHasBackReferences&&(o=o.withEndRule(U.getWhileWithResolvedBackReferences(t.content,S))),!R&&k.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),h=!0;return}}else if(Pl(e,t,i,o,s,C.captures,S),s.produce(o,S[0].end),o=o.pop(),!R){o=o.safePop(),s.produce(o,d),h=!0;return}}S[0].end>a&&(a=S[0].end,i=!1)}}function qT(e,t,i,a,o,s){let c=o.beginRuleCapturedEOL?0:-1;const f=[];for(let d=o;d;d=d.pop()){const h=d.getRule(e);h instanceof eu&&f.push({rule:h,stack:d})}for(let d=f.pop();d;d=f.pop()){const{ruleScanner:h,findOptions:y}=ZT(d.rule,e,d.stack.endRule,i,a===c),g=h.findNextMatchSync(t,a,y);if(g){if(g.ruleId!==_1){o=d.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(s.produce(d.stack,g.captureIndices[0].start),Pl(e,t,i,d.stack,s,d.rule.whileCaptures,g.captureIndices),s.produce(d.stack,g.captureIndices[0].end),c=g.captureIndices[0].end,g.captureIndices[0].end>a&&(a=g.captureIndices[0].end,i=!1))}else{o=d.stack.pop();break}}return{stack:o,linePos:a,anchorPosition:c,isFirstLine:i}}function YT(e,t,i,a,o,s){const c=XT(e,t,i,a,o,s),f=e.getInjections();if(f.length===0)return c;const d=QT(f,e,t,i,a,o,s);if(!d)return c;if(!c)return d;const h=c.captureIndices[0].start,y=d.captureIndices[0].start;return y<h||d.priorityMatch&&y===h?d:c}function XT(e,t,i,a,o,s){const c=o.getRule(e),{ruleScanner:f,findOptions:d}=C1(c,e,o.endRule,i,a===s),h=f.findNextMatchSync(t,a,d);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function QT(e,t,i,a,o,s,c){let f=Number.MAX_VALUE,d=null,h,y=0;const g=s.contentNameScopesList.getScopeNames();for(let b=0,v=e.length;b<v;b++){const S=e[b];if(!S.matcher(g))continue;const w=t.getRule(S.ruleId),{ruleScanner:R,findOptions:C}=C1(w,t,null,a,o===c),k=R.findNextMatchSync(i,o,C);if(!k)continue;const A=k.captureIndices[0].start;if(!(A>=f)&&(f=A,d=k.captureIndices,h=k.ruleId,y=S.priority,f===o))break}return d?{priorityMatch:y===-1,captureIndices:d,matchedRuleId:h}:null}function C1(e,t,i,a,o){return{ruleScanner:e.compileAG(t,i,a,o),findOptions:0}}function ZT(e,t,i,a,o){return{ruleScanner:e.compileWhileAG(t,i,a,o),findOptions:0}}function Pl(e,t,i,a,o,s,c){if(s.length===0)return;const f=t.content,d=Math.min(s.length,c.length),h=[],y=c[0].end;for(let g=0;g<d;g++){const b=s[g];if(b===null)continue;const v=c[g];if(v.length===0)continue;if(v.start>y)break;for(;h.length>0&&h[h.length-1].endPos<=v.start;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?o.produceFromScopes(h[h.length-1].scopes,v.start):o.produce(a,v.start),b.retokenizeCapturedWithRuleId){const w=b.getName(f,c),R=a.contentNameScopesList.pushAttributed(w,e),C=b.getContentName(f,c),k=R.pushAttributed(C,e),A=a.push(b.retokenizeCapturedWithRuleId,v.start,-1,!1,null,R,k),H=e.createOnigString(f.substring(0,v.end));x1(e,H,i&&v.start===0,v.start,A,o,!1,0),b1(H);continue}const S=b.getName(f,c);if(S!==null){const R=(h.length>0?h[h.length-1].scopes:a.contentNameScopesList).pushAttributed(S,e);h.push(new KT(R,v.end))}}for(;h.length>0;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var KT=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function WT(e,t,i,a,o,s,c,f){return new eL(e,t,i,a,o,s,c,f)}function tb(e,t,i,a,o){const s=Ws(t,tu),c=S1.getCompiledRuleId(i,a,o.repository);for(const f of s)e.push({debugSelector:t,matcher:f.matcher,ruleId:c,grammar:o,priority:f.priority})}function tu(e,t){if(t.length<e.length)return!1;let i=0;return e.every(a=>{for(let o=i;o<t.length;o++)if(JT(t[o],a))return i=o+1,!0;return!1})}function JT(e,t){if(!e)return!1;if(e===t)return!0;const i=t.length;return e.length>i&&e.substr(0,i)===t&&e[i]==="."}var eL=class{constructor(e,t,i,a,o,s,c,f){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=f,this._basicScopeAttributesProvider=new $T(i,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=nb(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const d of Object.keys(o)){const h=Ws(d,tu);for(const y of h)this._tokenTypeMatchers.push({matcher:y.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=[],i=this._rootScopeName,a=e.lookup(i);if(a){const o=a.injections;if(o)for(let c in o)tb(t,c,o[c],this,a);const s=this._grammarRepository.injections(i);s&&s.forEach(c=>{const f=this.getExternalGrammar(c);if(f){const d=f.injectionSelector;d&&tb(t,d,f,this,f)}})}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,i=e(t);return this._ruleId2desc[t]=i,i}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const i=this._grammarRepository.lookup(e);if(i)return this._includedGrammars[e]=nb(i,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,i=0){const a=this._tokenize(e,t,!1,i);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(e,t,i=0){const a=this._tokenize(e,t,!0,i);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(e,t,i,a){this._rootId===-1&&(this._rootId=S1.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Qf.NULL){o=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),y=this.themeProvider.getDefaults(),g=Na.set(0,h.languageId,h.tokenType,null,y.fontStyle,y.foregroundId,y.backgroundId),b=this.getRule(this._rootId).getName(null,null);let v;b?v=Yl.createRootAndLookUpScopeName(b,g,this):v=Yl.createRoot("unknown",g),t=new Qf(null,this._rootId,-1,-1,!1,null,v,v)}else o=!1,t.reset();e=e+`
25
+ `;const s=this.createOnigString(e),c=s.content.length,f=new nL(i,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=x1(this,s,o,0,t,f,!0,a);return b1(s),{lineLength:c,lineTokens:f,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function nb(e,t){return e=vT(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 Yl=class Vn{constructor(t,i,a){this.parent=t,this.scopePath=i,this.tokenAttributes=a}static fromExtension(t,i){let a=t,o=t?.scopePath??null;for(const s of i)o=of.push(o,s.scopeNames),a=new Vn(a,o,s.encodedTokenAttributes);return a}static createRoot(t,i){return new Vn(null,new of(null,t),i)}static createRootAndLookUpScopeName(t,i,a){const o=a.getMetadataForScope(t),s=new of(null,t),c=a.themeProvider.themeMatch(s),f=Vn.mergeAttributes(i,o,c);return new Vn(null,s,f)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Vn.equals(this,t)}static equals(t,i){do{if(t===i||!t&&!i)return!0;if(!t||!i||t.scopeName!==i.scopeName||t.tokenAttributes!==i.tokenAttributes)return!1;t=t.parent,i=i.parent}while(!0)}static mergeAttributes(t,i,a){let o=-1,s=0,c=0;return a!==null&&(o=a.fontStyle,s=a.foregroundId,c=a.backgroundId),Na.set(t,i.languageId,i.tokenType,null,o,s,c)}pushAttributed(t,i){if(t===null)return this;if(t.indexOf(" ")===-1)return Vn._pushAttributed(this,t,i);const a=t.split(/ /g);let o=this;for(const s of a)o=Vn._pushAttributed(o,s,i);return o}static _pushAttributed(t,i,a){const o=a.getMetadataForScope(i),s=t.scopePath.push(i),c=a.themeProvider.themeMatch(s),f=Vn.mergeAttributes(t.tokenAttributes,o,c);return new Vn(t,s,f)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const i=[];let a=this;for(;a&&a!==t;)i.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(a.parent?.scopePath??null)}),a=a.parent;return a===t?i.reverse():void 0}},Qf=class _r{constructor(t,i,a,o,s,c,f,d){this.parent=t,this.ruleId=i,this.beginRuleCapturedEOL=s,this.endRule=c,this.nameScopesList=f,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new _r(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:_r._equals(this,t)}static _equals(t,i){return t===i?!0:this._structuralEquals(t,i)?Yl.equals(t.contentNameScopesList,i.contentNameScopesList):!1}static _structuralEquals(t,i){do{if(t===i||!t&&!i)return!0;if(!t||!i||t.depth!==i.depth||t.ruleId!==i.ruleId||t.endRule!==i.endRule)return!1;t=t.parent,i=i.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){_r._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,i,a,o,s,c,f){return new _r(this,t,i,a,o,s,c,f)}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,i){return this.parent&&(i=this.parent._writeString(t,i)),t[i++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,i}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 _r(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let i=this;for(;i&&i._enterPos===t._enterPos;){if(i.ruleId===t.ruleId)return!0;i=i.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,i){const a=Yl.fromExtension(t?.nameScopesList??null,i.nameScopesList);return new _r(t,i.ruleId,i.enterPos??-1,i.anchorPos??-1,i.beginRuleCapturedEOL,i.endRule,a,Yl.fromExtension(a,i.contentNameScopesList))}},tL=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(i=>i==="*"?(this.allowAny=!0,[]):Ws(i,tu).map(a=>a.matcher)),this.unbalancedBracketScopes=t.flatMap(i=>Ws(i,tu).map(a=>a.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}},nL=class{constructor(e,t,i,a){this.balancedBracketSelectors=a,this._emitBinaryTokens=e,this._tokenTypeOverrides=i,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 a=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 c of this._tokenTypeOverrides)c.matcher(s)&&(a=Na.set(a,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(a=Na.set(a,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=t;return}const i=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:i}),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 i=new Uint32Array(this._binaryTokens.length);for(let a=0,o=this._binaryTokens.length;a<o;a++)i[a]=this._binaryTokens[a];return i}},iL=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,i,a,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,WT(e,s,t,i,a,o,this,this._onigLib))}return this._grammars.get(e)}},rL=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new iL(Ks.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,i){this._syncRegistry.setTheme(Ks.createFromRawTheme(t,i))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,i,a){return this.loadGrammarWithConfiguration(t,i,{embeddedLanguages:a})}loadGrammarWithConfiguration(t,i,a){return this._loadGrammar(t,i,a.embeddedLanguages,a.tokenTypes,new tL(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,i,a,o,s){const c=new OT(this._syncRegistry,t);for(;c.Q.length>0;)c.Q.map(f=>this._loadSingleGrammar(f.scopeName)),c.processQueue();return this._grammarForScopeName(t,i,a,o,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const i=this._options.loadGrammar(t);if(i){const a=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(i,a)}}addGrammar(t,i=[],a=0,o=null){return this._syncRegistry.addGrammar(t,i),this._grammarForScopeName(t.scopeName,a,o)}_grammarForScopeName(t,i=0,a=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(t,i,a,o,s)}},Zf=Qf.NULL;const aL=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],ib={}.hasOwnProperty;function lL(e,t){const i=t||{};function a(o,...s){let c=a.invalid;const f=a.handlers;if(o&&ib.call(o,e)){const d=String(o[e]);c=ib.call(f,d)?f[d]:a.unknown}if(c)return c.call(this,o,...s)}return a.handlers=i.handlers||{},a.invalid=i.invalid,a.unknown=i.unknown,a}const oL=/["&'<>`]/g,sL=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,uL=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,cL=/[|\\{}()[\]^$+*?.]/g,rb=new WeakMap;function dL(e,t){if(e=e.replace(t.subset?fL(t.subset):oL,a),t.subset||t.escapeOnly)return e;return e.replace(sL,i).replace(uL,a);function i(o,s,c){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,c.charCodeAt(s+2),t)}function a(o,s,c){return t.format(o.charCodeAt(0),c.charCodeAt(s+1),t)}}function fL(e){let t=rb.get(e);return t||(t=hL(e),rb.set(e,t)),t}function hL(e){const t=[];let i=-1;for(;++i<e.length;)t.push(e[i].replace(cL,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const pL=/[\dA-Fa-f]/;function mL(e,t,i){const a="&#x"+e.toString(16).toUpperCase();return i&&t&&!pL.test(String.fromCharCode(t))?a:a+";"}const gL=/\d/;function yL(e,t,i){const a="&#"+String(e);return i&&t&&!gL.test(String.fromCharCode(t))?a:a+";"}const bL=["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"],uf={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:"€"},vL=["cent","copy","divide","gt","lt","not","para","times"],w1={}.hasOwnProperty,Kf={};let ks;for(ks in uf)w1.call(uf,ks)&&(Kf[uf[ks]]=ks);const _L=/[^\dA-Za-z]/;function SL(e,t,i,a){const o=String.fromCharCode(e);if(w1.call(Kf,o)){const s=Kf[o],c="&"+s;return i&&bL.includes(s)&&!vL.includes(s)&&(!a||t&&t!==61&&_L.test(String.fromCharCode(t)))?c:c+";"}return""}function EL(e,t,i){let a=mL(e,t,i.omitOptionalSemicolons),o;if((i.useNamedReferences||i.useShortestReferences)&&(o=SL(e,t,i.omitOptionalSemicolons,i.attribute)),(i.useShortestReferences||!o)&&i.useShortestReferences){const s=yL(e,t,i.omitOptionalSemicolons);s.length<a.length&&(a=s)}return o&&(!i.useShortestReferences||o.length<a.length)?o:a}function Ra(e,t){return dL(e,Object.assign({format:EL},t))}const xL=/^>|^->|<!--|-->|--!>|<!-$/g,CL=[">"],wL=["<",">"];function kL(e,t,i,a){return a.settings.bogusComments?"<?"+Ra(e.value,Object.assign({},a.settings.characterReferences,{subset:CL}))+">":"<!--"+e.value.replace(xL,o)+"-->";function o(s){return Ra(s,Object.assign({},a.settings.characterReferences,{subset:wL}))}}function AL(e,t,i,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function ab(e,t){const i=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,o=i.indexOf(t);for(;o!==-1;)a++,o=i.indexOf(t,o+t.length);return a}const Et=A1(1),k1=A1(-1),TL=[];function A1(e){return t;function t(i,a,o){const s=i?i.children:TL;let c=(a||0)+e,f=s[c];if(!o)for(;f&&cu(f);)c+=e,f=s[c];return f}}const LL={}.hasOwnProperty;function T1(e){return t;function t(i,a,o){return LL.call(e,i.tagName)&&e[i.tagName](i,a,o)}}const zh=T1({body:DL,caption:cf,colgroup:cf,dd:IL,dt:ML,head:cf,html:RL,li:OL,optgroup:zL,option:HL,p:NL,rp:lb,rt:lb,tbody:PL,td:ob,tfoot:BL,th:ob,thead:UL,tr:jL});function cf(e,t,i){const a=Et(i,t,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&cu(a.value.charAt(0)))}function RL(e,t,i){const a=Et(i,t);return!a||a.type!=="comment"}function DL(e,t,i){const a=Et(i,t);return!a||a.type!=="comment"}function NL(e,t,i){const a=Et(i,t);return a?a.type==="element"&&(a.tagName==="address"||a.tagName==="article"||a.tagName==="aside"||a.tagName==="blockquote"||a.tagName==="details"||a.tagName==="div"||a.tagName==="dl"||a.tagName==="fieldset"||a.tagName==="figcaption"||a.tagName==="figure"||a.tagName==="footer"||a.tagName==="form"||a.tagName==="h1"||a.tagName==="h2"||a.tagName==="h3"||a.tagName==="h4"||a.tagName==="h5"||a.tagName==="h6"||a.tagName==="header"||a.tagName==="hgroup"||a.tagName==="hr"||a.tagName==="main"||a.tagName==="menu"||a.tagName==="nav"||a.tagName==="ol"||a.tagName==="p"||a.tagName==="pre"||a.tagName==="section"||a.tagName==="table"||a.tagName==="ul"):!i||!(i.type==="element"&&(i.tagName==="a"||i.tagName==="audio"||i.tagName==="del"||i.tagName==="ins"||i.tagName==="map"||i.tagName==="noscript"||i.tagName==="video"))}function OL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&a.tagName==="li"}function ML(e,t,i){const a=Et(i,t);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function IL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function lb(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function zL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&a.tagName==="optgroup"}function HL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function UL(e,t,i){const a=Et(i,t);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function PL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function BL(e,t,i){return!Et(i,t)}function jL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&a.tagName==="tr"}function ob(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const VL=T1({body:FL,colgroup:qL,head:$L,html:GL,tbody:YL});function GL(e){const t=Et(e,-1);return!t||t.type!=="comment"}function $L(e){const t=new Set;for(const a of e.children)if(a.type==="element"&&(a.tagName==="base"||a.tagName==="title")){if(t.has(a.tagName))return!1;t.add(a.tagName)}const i=e.children[0];return!i||i.type==="element"}function FL(e){const t=Et(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&cu(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function qL(e,t,i){const a=k1(i,t),o=Et(e,-1,!0);return i&&a&&a.type==="element"&&a.tagName==="colgroup"&&zh(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function YL(e,t,i){const a=k1(i,t),o=Et(e,-1);return i&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&zh(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const As={name:[[`
26
+ \f\r &/=>`.split(""),`
27
+ \f\r "&'/=>\``.split("")],[`\0
28
+ \f\r "&'/<=>`.split(""),`\0
29
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
30
+ \f\r &>`.split(""),`\0
31
+ \f\r "&'<=>\``.split("")],[`\0
32
+ \f\r "&'<=>\``.split(""),`\0
33
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function XL(e,t,i,a){const o=a.schema,s=o.space==="svg"?!1:a.settings.omitOptionalTags;let c=o.space==="svg"?a.settings.closeEmptyElements:a.settings.voids.includes(e.tagName.toLowerCase());const f=[];let d;o.space==="html"&&e.tagName==="svg"&&(a.schema=ao);const h=QL(a,e.properties),y=a.all(o.space==="html"&&e.tagName==="template"?e.content:e);return a.schema=o,y&&(c=!1),(h||!s||!VL(e,t,i))&&(f.push("<",e.tagName,h?" "+h:""),c&&(o.space==="svg"||a.settings.closeSelfClosing)&&(d=h.charAt(h.length-1),(!a.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&f.push(" "),f.push("/")),f.push(">")),f.push(y),!c&&(!s||!zh(e,t,i))&&f.push("</"+e.tagName+">"),f.join("")}function QL(e,t){const i=[];let a=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=ZL(e,o,t[o]);s&&i.push(s)}}for(;++a<i.length;){const s=e.settings.tightAttributes?i[a].charAt(i[a].length-1):void 0;a!==i.length-1&&s!=='"'&&s!=="'"&&(i[a]+=" ")}return i.join("")}function ZL(e,t,i){const a=Ov(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let c=e.quote,f;if(a.overloadedBoolean&&(i===a.attribute||i==="")?i=!0:(a.boolean||a.overloadedBoolean)&&(typeof i!="string"||i===a.attribute||i==="")&&(i=!!i),i==null||i===!1||typeof i=="number"&&Number.isNaN(i))return"";const d=Ra(a.attribute,Object.assign({},e.settings.characterReferences,{subset:As.name[o][s]}));return i===!0||(i=Array.isArray(i)?(a.commaSeparated?wv:Iv)(i,{padLeft:!e.settings.tightCommaSeparatedLists}):String(i),e.settings.collapseEmptyAttributes&&!i)?d:(e.settings.preferUnquoted&&(f=Ra(i,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:As.unquoted[o][s]}))),f!==i&&(e.settings.quoteSmart&&ab(i,c)>ab(i,e.alternative)&&(c=e.alternative),f=c+Ra(i,Object.assign({},e.settings.characterReferences,{subset:(c==="'"?As.single:As.double)[o][s],attribute:!0}))+c),d+(f&&"="+f))}const KL=["<","&"];function L1(e,t,i,a){return i&&i.type==="element"&&(i.tagName==="script"||i.tagName==="style")?e.value:Ra(e.value,Object.assign({},a.settings.characterReferences,{subset:KL}))}function WL(e,t,i,a){return a.settings.allowDangerousHtml?e.value:L1(e,t,i,a)}function JL(e,t,i,a){return a.all(e)}const e2=lL("type",{invalid:t2,unknown:n2,handlers:{comment:kL,doctype:AL,element:XL,raw:WL,root:JL,text:L1}});function t2(e){throw new Error("Expected node, not `"+e+"`")}function n2(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const i2={},r2={},a2=[];function Da(e,t){const i=t||i2,a=i.quote||'"',o=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:l2,all:o2,settings:{omitOptionalTags:i.omitOptionalTags||!1,allowParseErrors:i.allowParseErrors||!1,allowDangerousCharacters:i.allowDangerousCharacters||!1,quoteSmart:i.quoteSmart||!1,preferUnquoted:i.preferUnquoted||!1,tightAttributes:i.tightAttributes||!1,upperDoctype:i.upperDoctype||!1,tightDoctype:i.tightDoctype||!1,bogusComments:i.bogusComments||!1,tightCommaSeparatedLists:i.tightCommaSeparatedLists||!1,tightSelfClosing:i.tightSelfClosing||!1,collapseEmptyAttributes:i.collapseEmptyAttributes||!1,allowDangerousHtml:i.allowDangerousHtml||!1,voids:i.voids||aL,characterReferences:i.characterReferences||r2,closeSelfClosing:i.closeSelfClosing||!1,closeEmptyElements:i.closeEmptyElements||!1},schema:i.space==="svg"?ao:Mv,quote:a,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function l2(e,t,i){return e2(e,t,i,this)}function o2(e){const t=[],i=e&&e.children||a2;let a=-1;for(;++a<i.length;)t[a]=this.one(i[a],a,e);return t.join("")}function nu(e,t){const i=typeof e=="string"?{}:{...e.colorReplacements},a=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?i[o]=s:o===a&&Object.assign(i,s);return i}function Wi(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function s2(e){return Array.isArray(e)?e:[e]}async function R1(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Hh(e){return!e||["plaintext","txt","text","plain"].includes(e)}function D1(e){return e==="ansi"||Hh(e)}function Uh(e){return e==="none"}function N1(e){return Uh(e)}function O1(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const i=Array.isArray(t)?t:t.split(/\s+/g);for(const a of i)a&&!e.properties.class.includes(a)&&e.properties.class.push(a);return e}function pu(e,t=!1){if(e.length===0)return[["",0]];const i=e.split(/(\r?\n)/g);let a=0;const o=[];for(let s=0;s<i.length;s+=2){const c=t?i[s]+(i[s+1]||""):i[s];o.push([c,a]),a+=i[s].length,a+=i[s+1]?.length||0}return o}function u2(e){const t=pu(e,!0).map(([o])=>o);function i(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=o,c=0;for(const f of t){if(s<f.length)break;s-=f.length,c++}return{line:c,character:s}}function a(o,s){let c=0;for(let f=0;f<o;f++)c+=t[f].length;return c+=s,c}return{lines:t,indexToPos:i,posToIndex:a}}function c2(e,t,i){const a=new Set;for(const s of e.matchAll(/:?lang=["']([^"']+)["']/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/\\begin\{([\w-]+)\}/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const c=s[1].toLowerCase().trim(),f=c.includes("/")?c.split("/").pop():c;f&&a.add(f)}if(!i)return Array.from(a);const o=i.getBundledLanguages();return Array.from(a).filter(s=>s&&o[s])}const Ph="light-dark()",d2=["color","background-color"];function f2(e,t){let i=0;const a=[];for(const o of t)o>i&&a.push({...e,content:e.content.slice(i,o),offset:e.offset+i}),i=o;return i<e.content.length&&a.push({...e,content:e.content.slice(i),offset:e.offset+i}),a}function h2(e,t){const i=Array.from(t instanceof Set?t:new Set(t)).sort((a,o)=>a-o);return i.length?e.map(a=>a.flatMap(o=>{const s=i.filter(c=>o.offset<c&&c<o.offset+o.content.length).map(c=>c-o.offset).sort((c,f)=>c-f);return s.length?f2(o,s):o})):e}function p2(e,t,i,a,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},c=t.map(y=>iu(e.variants[y])),f=new Set(c.flatMap(y=>Object.keys(y))),d={},h=(y,g)=>{const b=g==="color"?"":g==="background-color"?"-bg":`-${g}`;return i+t[y]+(g==="color"?"":b)};return c.forEach((y,g)=>{for(const b of f){const v=y[b]||"inherit";if(g===0&&a&&d2.includes(b))if(a===Ph&&c.length>1){const S=t.findIndex(k=>k==="light"),w=t.findIndex(k=>k==="dark");if(S===-1||w===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const R=c[S][b]||"inherit",C=c[w][b]||"inherit";d[b]=`light-dark(${R}, ${C})`,o==="css-vars"&&(d[h(g,b)]=v)}else d[b]=v;else o==="css-vars"&&(d[h(g,b)]=v)}}),s.htmlStyle=d,s}function iu(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Ht.Italic&&(t["font-style"]="italic"),e.fontStyle&Ht.Bold&&(t["font-weight"]="bold");const i=[];e.fontStyle&Ht.Underline&&i.push("underline"),e.fontStyle&Ht.Strikethrough&&i.push("line-through"),i.length&&(t["text-decoration"]=i.join(" "))}return t}function Wf(e){return typeof e=="string"?e:Object.entries(e).map(([t,i])=>`${t}:${i}`).join(";")}const M1=new WeakMap;function mu(e,t){M1.set(e,t)}function eo(e){return M1.get(e)}class za{_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,i){return new za(Object.fromEntries(s2(i).map(a=>[a,Zf])),t)}constructor(...t){if(t.length===2){const[i,a]=t;this.lang=a,this._stacks=i}else{const[i,a,o]=t;this.lang=a,this._stacks={[o]:i}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return m2(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function m2(e){const t=[],i=new Set;function a(o){if(i.has(o))return;i.add(o);const s=o?.nameScopesList?.scopeName;s&&t.push(s),o.parent&&a(o.parent)}return a(e),t}function g2(e,t){if(!(e instanceof za))throw new mt("Invalid grammar state");return e.getInternalStack(t)}function y2(){const e=new WeakMap;function t(i){if(!e.has(i.meta)){let a=function(c){if(typeof c=="number"){if(c<0||c>i.source.length)throw new mt(`Invalid decoration offset: ${c}. Code length: ${i.source.length}`);return{...o.indexToPos(c),offset:c}}else{const f=o.lines[c.line];if(f===void 0)throw new mt(`Invalid decoration position ${JSON.stringify(c)}. Lines length: ${o.lines.length}`);let d=c.character;if(d<0&&(d=f.length+d),d<0||d>f.length)throw new mt(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${f.length}`);return{...c,character:d,offset:o.posToIndex(c.line,d)}}};const o=u2(i.source),s=(i.options.decorations||[]).map(c=>({...c,start:a(c.start),end:a(c.end)}));b2(s),e.set(i.meta,{decorations:s,converter:o,source:i.source})}return e.get(i.meta)}return{name:"shiki:decorations",tokens(i){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(c=>[c.start.offset,c.end.offset]);return h2(i,o)},code(i){if(!this.options.decorations?.length)return;const a=t(this),o=Array.from(i.children).filter(y=>y.type==="element"&&y.tagName==="span");if(o.length!==a.converter.lines.length)throw new mt(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${a.converter.lines.length}). Failed to apply decorations.`);function s(y,g,b,v){const S=o[y];let w="",R=-1,C=-1;if(g===0&&(R=0),b===0&&(C=0),b===Number.POSITIVE_INFINITY&&(C=S.children.length),R===-1||C===-1)for(let A=0;A<S.children.length;A++)w+=I1(S.children[A]),R===-1&&w.length===g&&(R=A+1),C===-1&&w.length===b&&(C=A+1);if(R===-1)throw new mt(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(C===-1)throw new mt(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const k=S.children.slice(R,C);if(!v.alwaysWrap&&k.length===S.children.length)f(S,v,"line");else if(!v.alwaysWrap&&k.length===1&&k[0].type==="element")f(k[0],v,"token");else{const A={type:"element",tagName:"span",properties:{},children:k};f(A,v,"wrapper"),S.children.splice(R,k.length,A)}}function c(y,g){o[y]=f(o[y],g,"line")}function f(y,g,b){const v=g.properties||{},S=g.transform||(w=>w);return y.tagName=g.tagName||"span",y.properties={...y.properties,...v,class:y.properties.class},g.properties?.class&&O1(y,g.properties.class),y=S(y,b)||y,y}const d=[],h=a.decorations.sort((y,g)=>g.start.offset-y.start.offset||y.end.offset-g.end.offset);for(const y of h){const{start:g,end:b}=y;if(g.line===b.line)s(g.line,g.character,b.character,y);else if(g.line<b.line){s(g.line,g.character,Number.POSITIVE_INFINITY,y);for(let v=g.line+1;v<b.line;v++)d.unshift(()=>c(v,y));s(b.line,0,b.character,y)}}d.forEach(y=>y())}}}function b2(e){for(let t=0;t<e.length;t++){const i=e[t];if(i.start.offset>i.end.offset)throw new mt(`Invalid decoration range: ${JSON.stringify(i.start)} - ${JSON.stringify(i.end)}`);for(let a=t+1;a<e.length;a++){const o=e[a],s=i.start.offset<=o.start.offset&&o.start.offset<i.end.offset,c=i.start.offset<o.end.offset&&o.end.offset<=i.end.offset,f=o.start.offset<=i.start.offset&&i.start.offset<o.end.offset,d=o.start.offset<i.end.offset&&i.end.offset<=o.end.offset;if(s||c||f||d){if(s&&c||f&&d||f&&i.start.offset===i.end.offset||c&&o.start.offset===o.end.offset)continue;throw new mt(`Decorations ${JSON.stringify(i.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function I1(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(I1).join(""):""}const v2=[y2()];function ru(e){const t=_2(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...v2]}function _2(e){const t=[],i=[],a=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":i.push(o);break;default:a.push(o)}return{pre:t,post:i,normal:a}}var Er=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],df={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function S2(e,t){const i=e.indexOf("\x1B",t);if(i!==-1&&e[i+1]==="["){const a=e.indexOf("m",i);if(a!==-1)return{sequence:e.substring(i+2,a).split(";"),startPosition:i,position:a+1}}return{position:e.length}}function sb(e){const t=e.shift();if(t==="2"){const i=e.splice(0,3).map(a=>Number.parseInt(a));return i.length!==3||i.some(a=>Number.isNaN(a))?void 0:{type:"rgb",rgb:i}}else if(t==="5"){const i=e.shift();if(i)return{type:"table",index:Number(i)}}}function E2(e){const t=[];for(;e.length>0;){const i=e.shift();if(!i)continue;const a=Number.parseInt(i);if(!Number.isNaN(a))if(a===0)t.push({type:"resetAll"});else if(a<=9)df[a]&&t.push({type:"setDecoration",value:df[a]});else if(a<=29){const o=df[a-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(a<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Er[a-30]}});else if(a===38){const o=sb(e);o&&t.push({type:"setForegroundColor",value:o})}else if(a===39)t.push({type:"resetForegroundColor"});else if(a<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Er[a-40]}});else if(a===48){const o=sb(e);o&&t.push({type:"setBackgroundColor",value:o})}else a===49?t.push({type:"resetBackgroundColor"}):a===53?t.push({type:"setDecoration",value:"overline"}):a===55?t.push({type:"resetDecoration",value:"overline"}):a>=90&&a<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Er[a-90+8]}}):a>=100&&a<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Er[a-100+8]}})}return t}function x2(){let e=null,t=null,i=new Set;return{parse(a){const o=[];let s=0;do{const c=S2(a,s),f=c.sequence?a.substring(s,c.startPosition):a.substring(s);if(f.length>0&&o.push({value:f,foreground:e,background:t,decorations:new Set(i)}),c.sequence){const d=E2(c.sequence);for(const h of d)h.type==="resetAll"?(e=null,t=null,i.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&i.delete(h.value);for(const h of d)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&i.add(h.value)}s=c.position}while(s<a.length);return o}}}var C2={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 w2(e=C2){function t(f){return e[f]}function i(f){return`#${f.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let a;function o(){if(a)return a;a=[];for(let h=0;h<Er.length;h++)a.push(t(Er[h]));let f=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let y=0;y<6;y++)for(let g=0;g<6;g++)a.push(i([f[h],f[y],f[g]]));let d=8;for(let h=0;h<24;h++,d+=10)a.push(i([d,d,d]));return a}function s(f){return o()[f]}function c(f){switch(f.type){case"named":return t(f.name);case"rgb":return i(f.rgb);case"table":return s(f.index)}}return{value:c}}const k2={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 A2(e,t,i){const a=nu(e,i),o=pu(t),s=Object.fromEntries(Er.map(d=>{const h=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`,y=e.colors?.[h];return[d,y||k2[d]]})),c=w2(s),f=x2();return o.map(d=>f.parse(d[0]).map(h=>{let y,g;h.decorations.has("reverse")?(y=h.background?c.value(h.background):e.bg,g=h.foreground?c.value(h.foreground):e.fg):(y=h.foreground?c.value(h.foreground):e.fg,g=h.background?c.value(h.background):void 0),y=Wi(y,a),g=Wi(g,a),h.decorations.has("dim")&&(y=T2(y));let b=Ht.None;return h.decorations.has("bold")&&(b|=Ht.Bold),h.decorations.has("italic")&&(b|=Ht.Italic),h.decorations.has("underline")&&(b|=Ht.Underline),h.decorations.has("strikethrough")&&(b|=Ht.Strikethrough),{content:h.value,offset:d[1],color:y,bgColor:g,fontStyle:b}}))}function T2(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const a=t[1];if(a.length===8){const o=Math.round(Number.parseInt(a.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${a.slice(0,6)}${o}`}else{if(a.length===6)return`#${a}80`;if(a.length===4){const o=a[0],s=a[1],c=a[2],f=a[3],d=Math.round(Number.parseInt(`${f}${f}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${s}${s}${c}${c}${d}`}else if(a.length===3){const o=a[0],s=a[1],c=a[2];return`#${o}${o}${s}${s}${c}${c}80`}}}const i=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return i?`var(${i[1]}-dim)`:e}function Bh(e,t,i={}){const{theme:a=e.getLoadedThemes()[0]}=i,o=e.resolveLangAlias(i.lang||"text");if(Hh(o)||Uh(a))return pu(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:s,colorMap:c}=e.setTheme(a);if(o==="ansi")return A2(s,t,i);const f=e.getLanguage(i.lang||"text");if(i.grammarState){if(i.grammarState.lang!==f.name)throw new mt(`Grammar state language "${i.grammarState.lang}" does not match highlight language "${f.name}"`);if(!i.grammarState.themes.includes(s.name))throw new mt(`Grammar state themes "${i.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return R2(t,f,s,c,i)}function L2(...e){if(e.length===2)return eo(e[1]);const[t,i,a={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=a;if(Hh(o)||Uh(s))throw new mt("Plain language does not have grammar state");if(o==="ansi")throw new mt("ANSI language does not have grammar state");const{theme:c,colorMap:f}=t.setTheme(s),d=t.getLanguage(o);return new za(jh(i,d,c,f,a).stateStack,d.name,c.name)}function R2(e,t,i,a,o){const s=jh(e,t,i,a,o),c=new za(s.stateStack,t.name,i.name);return mu(s.tokens,c),s.tokens}function jh(e,t,i,a,o){const s=nu(i,o),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:f=500}=o,d=pu(e);let h=o.grammarState?g2(o.grammarState,i.name)??Zf:o.grammarContextCode!=null?jh(o.grammarContextCode,t,i,a,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Zf,y=[];const g=[];for(let b=0,v=d.length;b<v;b++){const[S,w]=d[b];if(S===""){y=[],g.push([]);continue}if(c>0&&S.length>=c){y=[],g.push([{content:S,offset:w,color:"",fontStyle:0}]);continue}let R,C,k;o.includeExplanation&&(R=t.tokenizeLine(S,h,f),C=R.tokens,k=0);const A=t.tokenizeLine2(S,h,f),H=A.tokens.length/2;for(let U=0;U<H;U++){const D=A.tokens[2*U],B=U+1<H?A.tokens[2*U+2]:S.length;if(D===B)continue;const re=A.tokens[2*U+1],j=Wi(a[Na.getForeground(re)],s),se=Na.getFontStyle(re),Z={content:S.substring(D,B),offset:w+D,color:j,fontStyle:se};if(o.includeExplanation){const W=[];if(o.includeExplanation!=="scopeName")for(const ie of i.settings){let q;switch(typeof ie.scope){case"string":q=ie.scope.split(/,/).map(z=>z.trim());break;case"object":q=ie.scope;break;default:continue}W.push({settings:ie,selectors:q.map(z=>z.split(/ /))})}Z.explanation=[];let Q=0;for(;D+Q<B;){const ie=C[k],q=S.substring(ie.startIndex,ie.endIndex);Q+=q.length,Z.explanation.push({content:q,scopes:o.includeExplanation==="scopeName"?D2(ie.scopes):N2(W,ie.scopes)}),k+=1}}y.push(Z)}g.push(y),y=[],h=A.ruleStack}return{tokens:g,stateStack:h}}function D2(e){return e.map(t=>({scopeName:t}))}function N2(e,t){const i=[];for(let a=0,o=t.length;a<o;a++){const s=t[a];i[a]={scopeName:s,themeMatches:M2(e,s,t.slice(0,a))}}return i}function ub(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function O2(e,t,i){if(!ub(e[e.length-1],t))return!1;let a=e.length-2,o=i.length-1;for(;a>=0&&o>=0;)ub(e[a],i[o])&&(a-=1),o-=1;return a===-1}function M2(e,t,i){const a=[];for(const{selectors:o,settings:s}of e)for(const c of o)if(O2(c,t,i)){a.push(s);break}return a}function z1(e,t,i){const a=Object.entries(i.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),o=a.map(d=>{const h=Bh(e,t,{...i,theme:d.theme}),y=eo(h),g=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:h,state:y,theme:g}}),s=I2(...o.map(d=>d.tokens)),c=s[0].map((d,h)=>d.map((y,g)=>{const b={content:y.content,variants:{},offset:y.offset};return"includeExplanation"in i&&i.includeExplanation&&(b.explanation=y.explanation),s.forEach((v,S)=>{const{content:w,explanation:R,offset:C,...k}=v[h][g];b.variants[a[S].color]=k}),b})),f=o[0].state?new za(Object.fromEntries(o.map(d=>[d.theme,d.state?.getInternalStack(d.theme)])),o[0].state.lang):void 0;return f&&mu(c,f),c}function I2(...e){const t=e.map(()=>[]),i=e.length;for(let a=0;a<e[0].length;a++){const o=e.map(d=>d[a]),s=t.map(()=>[]);t.forEach((d,h)=>d.push(s[h]));const c=o.map(()=>0),f=o.map(d=>d[0]);for(;f.every(d=>d);){const d=Math.min(...f.map(h=>h.content.length));for(let h=0;h<i;h++){const y=f[h];y.content.length===d?(s[h].push(y),c[h]+=1,f[h]=o[h][c[h]]):(s[h].push({...y,content:y.content.slice(0,d)}),f[h]={...y,content:y.content.slice(d),offset:y.offset+d})}}}return t}function au(e,t,i){let a,o,s,c,f,d;if("themes"in i){const{defaultColor:h="light",cssVariablePrefix:y="--shiki-",colorsRendering:g="css-vars"}=i,b=Object.entries(i.themes).filter(C=>C[1]).map(C=>({color:C[0],theme:C[1]})).sort((C,k)=>C.color===h?-1:k.color===h?1:0);if(b.length===0)throw new mt("`themes` option must not be empty");const v=z1(e,t,i);if(d=eo(v),h&&Ph!==h&&!b.find(C=>C.color===h))throw new mt(`\`themes\` option must contain the defaultColor key \`${h}\``);const S=b.map(C=>e.getTheme(C.theme)),w=b.map(C=>C.color);s=v.map(C=>C.map(k=>p2(k,w,y,h,g))),d&&mu(s,d);const R=b.map(C=>nu(C.theme,i));o=cb(b,S,R,y,h,"fg",g),a=cb(b,S,R,y,h,"bg",g),c=`shiki-themes ${S.map(C=>C.name).join(" ")}`,f=h?void 0:[o,a].join(";")}else if("theme"in i){const h=nu(i.theme,i);s=Bh(e,t,i);const y=e.getTheme(i.theme);a=Wi(y.bg,h),o=Wi(y.fg,h),c=y.name,d=eo(s)}else throw new mt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:a,themeName:c,rootStyle:f,grammarState:d}}function cb(e,t,i,a,o,s,c){return e.map((f,d)=>{const h=Wi(t[d][s],i[d])||"inherit",y=`${a+f.color}${s==="bg"?"-bg":""}:${h}`;if(d===0&&o){if(o===Ph&&e.length>1){const g=e.findIndex(w=>w.color==="light"),b=e.findIndex(w=>w.color==="dark");if(g===-1||b===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=Wi(t[g][s],i[g])||"inherit",S=Wi(t[b][s],i[b])||"inherit";return`light-dark(${v}, ${S});${y}`}return h}return c==="css-vars"?y:null}).filter(f=>!!f).join(";")}function lu(e,t,i,a={meta:{},options:i,codeToHast:(o,s)=>lu(e,o,s),codeToTokens:(o,s)=>au(e,o,s)}){let o=t;for(const S of ru(i))o=S.preprocess?.call(a,o,i)||o;let{tokens:s,fg:c,bg:f,themeName:d,rootStyle:h,grammarState:y}=au(e,o,i);const{mergeWhitespaces:g=!0,mergeSameStyleTokens:b=!1}=i;g===!0?s=H2(s):g==="never"&&(s=U2(s)),b&&(s=P2(s));const v={...a,get source(){return o}};for(const S of ru(i))s=S.tokens?.call(v,s)||s;return z2(s,{...i,fg:c,bg:f,themeName:d,rootStyle:i.rootStyle===!1?!1:i.rootStyle??h},v,y)}function z2(e,t,i,a=eo(e)){const o=ru(t),s=[],c={type:"root",children:[]},{structure:f="classic",tabindex:d="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(h.tabindex=d.toString());for(const[w,R]of Object.entries(t.meta||{}))w.startsWith("_")||(h[w]=R);let y={type:"element",tagName:"pre",properties:h,children:[],data:t.data},g={type:"element",tagName:"code",properties:{},children:s};const b=[],v={...i,structure:f,addClassToHast:O1,get source(){return i.source},get tokens(){return e},get options(){return t},get root(){return c},get pre(){return y},get code(){return g},get lines(){return b}};if(e.forEach((w,R)=>{R&&(f==="inline"?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):f==="classic"&&s.push({type:"text",value:`
34
+ `}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},k=0;for(const A of w){let H={type:"element",tagName:"span",properties:{...A.htmlAttrs},children:[{type:"text",value:A.content}]};const U=Wf(A.htmlStyle||iu(A));U&&(H.properties.style=U);for(const D of o)H=D?.span?.call(v,H,R+1,k,C,A)||H;f==="inline"?c.children.push(H):f==="classic"&&C.children.push(H),k+=A.content.length}if(f==="classic"){for(const A of o)C=A?.line?.call(v,C,R+1)||C;b.push(C),s.push(C)}else f==="inline"&&b.push(C)}),f==="classic"){for(const w of o)g=w?.code?.call(v,g)||g;y.children.push(g);for(const w of o)y=w?.pre?.call(v,y)||y;c.children.push(y)}else if(f==="inline"){const w=[];let R={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const A of c.children)A.type==="element"&&A.tagName==="br"?(w.push(R),R={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(A.type==="element"||A.type==="text")&&R.children.push(A);w.push(R);let k={type:"element",tagName:"code",properties:{},children:w};for(const A of o)k=A?.code?.call(v,k)||k;c.children=[];for(let A=0;A<k.children.length;A++){A>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const H=k.children[A];H.type==="element"&&c.children.push(...H.children)}}let S=c;for(const w of o)S=w?.root?.call(v,S)||S;return a&&mu(S,a),S}function H2(e){return e.map(t=>{const i=[];let a="",o;return t.forEach((s,c)=>{const d=!(s.fontStyle&&(s.fontStyle&Ht.Underline||s.fontStyle&Ht.Strikethrough));d&&s.content.match(/^\s+$/)&&t[c+1]?(o===void 0&&(o=s.offset),a+=s.content):a?(d?i.push({...s,offset:o,content:a+s.content}):i.push({content:a,offset:o},s),o=void 0,a=""):i.push(s)}),i})}function U2(e){return e.map(t=>t.flatMap(i=>{if(i.content.match(/^\s+$/))return i;const a=i.content.match(/^(\s*)(.*?)(\s*)$/);if(!a)return i;const[,o,s,c]=a;if(!o&&!c)return i;const f=[{...i,offset:i.offset+o.length,content:s}];return o&&f.unshift({content:o,offset:i.offset}),c&&f.push({content:c,offset:i.offset+o.length+s.length}),f}))}function P2(e){return e.map(t=>{const i=[];for(const a of t){if(i.length===0){i.push({...a});continue}const o=i[i.length-1],s=Wf(o.htmlStyle||iu(o)),c=Wf(a.htmlStyle||iu(a)),f=o.fontStyle&&(o.fontStyle&Ht.Underline||o.fontStyle&Ht.Strikethrough),d=a.fontStyle&&(a.fontStyle&Ht.Underline||a.fontStyle&Ht.Strikethrough);!f&&!d&&s===c?o.content+=a.content:i.push({...a})}return i})}const B2=Da;function j2(e,t,i){const a={meta:{},options:i,codeToHast:(s,c)=>lu(e,s,c),codeToTokens:(s,c)=>au(e,s,c)};let o=B2(lu(e,t,i,a));for(const s of ru(i))o=s.postprocess?.call(a,o,i)||o;return o}const db={light:"#333333",dark:"#bbbbbb"},fb={light:"#fffffe",dark:"#1e1e1e"},hb="__shiki_resolved";function gu(e){if(e?.[hb])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:i,fg:a}=t;if(!i||!a){const f=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;f?.settings?.foreground&&(a=f.settings.foreground),f?.settings?.background&&(i=f.settings.background),!a&&t?.colors?.["editor.foreground"]&&(a=t.colors["editor.foreground"]),!i&&t?.colors?.["editor.background"]&&(i=t.colors["editor.background"]),a||(a=t.type==="light"?db.light:db.dark),i||(i=t.type==="light"?fb.light:fb.dark),t.fg=a,t.bg=i}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 c(f){if(s.has(f))return s.get(f);o+=1;const d=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?c(f):(s.set(f,d),d)}t.settings=t.settings.map(f=>{const d=f.settings?.foreground&&!f.settings.foreground.startsWith("#"),h=f.settings?.background&&!f.settings.background.startsWith("#");if(!d&&!h)return f;const y={...f,settings:{...f.settings}};if(d){const g=c(f.settings.foreground);t.colorReplacements[g]=f.settings.foreground,y.settings.foreground=g}if(h){const g=c(f.settings.background);t.colorReplacements[g]=f.settings.background,y.settings.background=g}return y});for(const f of Object.keys(t.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!t.colors[f]?.startsWith("#")){const d=c(t.colors[f]);t.colorReplacements[d]=t.colors[f],t.colors[f]=d}return Object.defineProperty(t,hb,{enumerable:!1,writable:!1,value:!0}),t}async function H1(e){return Array.from(new Set((await Promise.all(e.filter(t=>!D1(t)).map(async t=>await R1(t).then(i=>Array.isArray(i)?i:[i])))).flat()))}async function U1(e){return(await Promise.all(e.map(async i=>N1(i)?null:gu(await R1(i))))).filter(i=>!!i)}let V2=3;function G2(e,t=3){t>V2||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let ka=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function P1(e,t){if(!t)return e;if(t[e]){const i=new Set([e]);for(;t[e];){if(e=t[e],i.has(e))throw new ka(`Circular alias \`${Array.from(i).join(" -> ")} -> ${e}\``);i.add(e)}}return e}class $2 extends rL{constructor(t,i,a,o={}){super(t),this._resolver=t,this._themes=i,this._langs=a,this._alias=o,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const i=gu(t);return i.name&&(this._resolvedThemes.set(i.name,i),this._loadedThemesCache=null),i}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let i=this._textmateThemeCache.get(t);i||(i=Ks.createFromRawTheme(t),this._textmateThemeCache.set(t,i)),this._syncRegistry.setTheme(i)}getGrammar(t){return t=P1(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const i=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const a={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,a);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,i.size)for(const s of i)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const i=Array.from(this._langGraph.entries()),a=i.filter(([o,s])=>!s);if(a.length){const o=i.filter(([s,c])=>c?(c.embeddedLanguages||c.embeddedLangs)?.some(d=>a.map(([h])=>h).includes(d)):!1).filter(s=>!a.includes(s));throw new ka(`Missing languages ${a.map(([s])=>`\`${s}\``).join(", ")}, required by ${o.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[o,s]of i)this._resolver.addLanguage(s);for(const[o,s]of i)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const i=t.embeddedLanguages??t.embeddedLangs;if(i)for(const a of i)this._langGraph.set(a,this._langMap.get(a))}}class F2{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,i){this._onigLib={createOnigScanner:a=>t.createScanner(a),createOnigString:a=>t.createString(a)},i.forEach(a=>this.addLanguage(a))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(i=>{this._langs.set(i,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(i=>{this._injections.get(i)||this._injections.set(i,[]),this._injections.get(i).push(t.scopeName)})}getInjections(t){const i=t.split(".");let a=[];for(let o=1;o<=i.length;o++){const s=i.slice(0,o).join(".");a=[...a,...this._injections.get(s)||[]]}return a}}let zl=0;function q2(e){zl+=1,e.warnings!==!1&&zl>=10&&zl%10===0&&console.warn(`[Shiki] ${zl} 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 ka("`engine` option is required for synchronous mode");const i=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map(gu),o=new F2(e.engine,i),s=new $2(o,a,i,e.langAlias);let c;function f(A){return P1(A,e.langAlias)}function d(A){C();const H=s.getGrammar(typeof A=="string"?A:A.name);if(!H)throw new ka(`Language \`${A}\` not found, you may need to load it first`);return H}function h(A){if(A==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};C();const H=s.getTheme(A);if(!H)throw new ka(`Theme \`${A}\` not found, you may need to load it first`);return H}function y(A){C();const H=h(A);c!==A&&(s.setTheme(H),c=A);const U=s.getColorMap();return{theme:H,colorMap:U}}function g(){return C(),s.getLoadedThemes()}function b(){return C(),s.getLoadedLanguages()}function v(...A){C(),s.loadLanguages(A.flat(1))}async function S(...A){return v(await H1(A))}function w(...A){C();for(const H of A.flat(1))s.loadTheme(H)}async function R(...A){return C(),w(await U1(A))}function C(){if(t)throw new ka("Shiki instance has been disposed")}function k(){t||(t=!0,s.dispose(),zl-=1)}return{setTheme:y,getTheme:h,getLanguage:d,getLoadedThemes:g,getLoadedLanguages:b,resolveLangAlias:f,loadLanguage:S,loadLanguageSync:v,loadTheme:R,loadThemeSync:w,dispose:k,[Symbol.dispose]:k}}async function Y2(e){e.engine||G2("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,i,a]=await Promise.all([U1(e.themes||[]),H1(e.langs||[]),e.engine]);return q2({...e,themes:t,langs:i,engine:a})}async function X2(e){const t=await Y2(e);return{getLastGrammarState:(...i)=>L2(t,...i),codeToTokensBase:(i,a)=>Bh(t,i,a),codeToTokensWithThemes:(i,a)=>z1(t,i,a),codeToTokens:(i,a)=>au(t,i,a),codeToHast:(i,a)=>lu(t,i,a),codeToHtml:(i,a)=>j2(t,i,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Q2(e){const t=e.langs,i=e.themes,a=e.engine;async function o(s){function c(g){if(typeof g=="string"){if(g=s.langAlias?.[g]||g,D1(g))return[];const b=t[g];if(!b)throw new mt(`Language \`${g}\` is not included in this bundle. You may want to load it from external source.`);return b}return g}function f(g){if(N1(g))return"none";if(typeof g=="string"){const b=i[g];if(!b)throw new mt(`Theme \`${g}\` is not included in this bundle. You may want to load it from external source.`);return b}return g}const d=(s.themes??[]).map(g=>f(g)),h=(s.langs??[]).map(g=>c(g)),y=await X2({engine:s.engine??a(),...s,themes:d,langs:h});return{...y,loadLanguage(...g){return y.loadLanguage(...g.map(c))},loadTheme(...g){return y.loadTheme(...g.map(f))},getBundledLanguages(){return t},getBundledThemes(){return i}}}return o}function Z2(e){let t;async function i(a={}){if(t){const o=await t;return await Promise.all([o.loadTheme(...a.themes||[]),o.loadLanguage(...a.langs||[])]),o}else{t=e({...a,themes:[],langs:[]});const o=await t;return await Promise.all([o.loadTheme(...a.themes||[]),o.loadLanguage(...a.langs||[])]),o}}return i}function K2(e,t){const i=Z2(e);async function a(o,s){const c=await i({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),f=await t?.guessEmbeddedLanguages?.(o,s.lang,c);return f&&await c.loadLanguage(...f),c}return{getSingletonHighlighter(o){return i(o)},async codeToHtml(o,s){return(await a(o,s)).codeToHtml(o,s)},async codeToHast(o,s){return(await a(o,s)).codeToHast(o,s)},async codeToTokens(o,s){return(await a(o,s)).codeToTokens(o,s)},async codeToTokensBase(o,s){return(await a(o,s)).codeToTokensBase(o,s)},async codeToTokensWithThemes(o,s){return(await a(o,s)).codeToTokensWithThemes(o,s)},async getLastGrammarState(o,s){return(await i({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(o,s)}}}const B1=[{id:"abap",name:"ABAP",import:(()=>x(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>x(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>x(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>x(()=>import("./angular-html-DMxchsRu.js").then(e=>e.a),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>x(()=>import("./angular-ts-DzOHUlBM.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>x(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>x(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>x(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>x(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>x(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>x(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>x(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>x(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>x(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>x(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>x(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>x(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>x(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>x(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>x(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>x(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>x(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>x(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>x(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>x(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>x(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>x(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>x(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>x(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>x(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>x(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>x(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>x(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>x(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>x(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>x(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>x(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>x(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>x(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>x(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>x(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>x(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>x(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>x(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>x(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>x(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>x(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>x(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>x(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>x(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>x(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>x(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>x(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>x(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>x(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>x(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>x(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>x(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>x(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>x(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>x(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>x(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>x(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>x(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>x(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>x(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>x(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>x(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>x(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>x(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>x(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>x(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>x(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>x(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>x(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>x(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>x(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>x(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>x(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>x(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>x(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>x(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>x(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>x(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>x(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>x(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>x(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>x(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>x(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>x(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>x(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>x(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>x(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>x(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>x(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>x(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>x(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>x(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>x(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>x(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>x(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>x(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>x(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>x(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>x(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>x(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>x(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>x(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>x(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>x(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>x(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>x(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>x(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>x(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>x(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>x(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>x(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>x(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>x(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>x(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>x(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>x(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>x(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>x(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>x(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>x(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>x(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>x(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>x(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>x(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>x(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>x(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>x(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>x(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>x(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>x(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>x(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>x(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>x(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>x(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>x(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>x(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>x(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>x(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>x(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>x(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>x(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>x(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>x(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>x(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>x(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>x(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>x(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>x(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>x(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>x(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>x(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>x(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>x(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>x(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>x(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>x(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>x(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>x(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>x(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>x(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>x(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>x(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>x(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>x(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>x(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>x(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>x(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>x(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>x(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>x(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>x(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>x(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>x(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>x(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>x(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>x(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>x(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>x(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>x(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>x(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>x(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>x(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>x(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>x(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>x(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>x(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>x(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>x(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>x(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>x(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>x(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>x(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>x(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>x(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>x(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>x(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>x(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>x(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>x(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>x(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>x(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>x(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>x(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>x(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>x(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>x(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>x(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>x(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>x(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>x(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>x(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>x(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>x(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>x(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>x(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>x(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>x(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>x(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>x(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>x(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>x(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>x(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>x(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>x(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>x(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>x(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>x(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>x(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>x(()=>import("./zig-VOosw3JB.js"),[]))}],W2=Object.fromEntries(B1.map(e=>[e.id,e.import])),J2=Object.fromEntries(B1.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Jf={...W2,...J2},eR=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>x(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>x(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>x(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>x(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>x(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>x(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>x(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>x(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>x(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>x(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>x(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>x(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>x(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>x(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>x(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>x(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>x(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>x(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>x(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>x(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>x(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>x(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>x(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>x(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>x(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>x(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>x(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>x(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>x(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>x(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>x(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>x(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>x(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>x(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>x(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>x(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>x(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>x(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>x(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>x(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>x(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>x(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>x(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>x(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>x(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>x(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>x(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>x(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>x(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>x(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>x(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>x(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>x(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>x(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>x(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>x(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>x(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>x(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>x(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>x(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>x(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>x(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],j1=Object.fromEntries(eR.map(e=>[e.id,e.import]));class Vh extends Error{constructor(t){super(t),this.name="ShikiError"}}function tR(){return 2147483648}function nR(){return typeof performance<"u"?performance.now():Date.now()}const iR=(e,t)=>e+(t-e%t)%t;async function rR(e){let t,i;const a={};function o(v){i=v,a.HEAPU8=new Uint8Array(v),a.HEAPU32=new Uint32Array(v)}function s(v,S,w){a.HEAPU8.copyWithin(v,S,S+w)}function c(v){try{return t.grow(v-i.byteLength+65535>>>16),o(t.buffer),1}catch{}}function f(v){const S=a.HEAPU8.length;v=v>>>0;const w=tR();if(v>w)return!1;for(let R=1;R<=4;R*=2){let C=S*(1+.2/R);C=Math.min(C,v+100663296);const k=Math.min(w,iR(Math.max(v,C),65536));if(c(k))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(v,S,w=1024){const R=S+w;let C=S;for(;v[C]&&!(C>=R);)++C;if(C-S>16&&v.buffer&&d)return d.decode(v.subarray(S,C));let k="";for(;S<C;){let A=v[S++];if(!(A&128)){k+=String.fromCharCode(A);continue}const H=v[S++]&63;if((A&224)===192){k+=String.fromCharCode((A&31)<<6|H);continue}const U=v[S++]&63;if((A&240)===224?A=(A&15)<<12|H<<6|U:A=(A&7)<<18|H<<12|U<<6|v[S++]&63,A<65536)k+=String.fromCharCode(A);else{const D=A-65536;k+=String.fromCharCode(55296|D>>10,56320|D&1023)}}return k}function y(v,S){return v?h(a.HEAPU8,v,S):""}const g={emscripten_get_now:nR,emscripten_memcpy_big:s,emscripten_resize_heap:f,fd_write:()=>0};async function b(){const S=await e({env:g,wasi_snapshot_preview1:g});t=S.memory,o(t.buffer),Object.assign(a,S),a.UTF8ToString=y}return await b(),a}var aR=Object.defineProperty,lR=(e,t,i)=>t in e?aR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,_t=(e,t,i)=>lR(e,typeof t!="symbol"?t+"":t,i);let At=null;function oR(e){throw new Vh(e.UTF8ToString(e.getLastOnigError()))}class yu{constructor(t){_t(this,"utf16Length"),_t(this,"utf8Length"),_t(this,"utf16Value"),_t(this,"utf8Value"),_t(this,"utf16OffsetToUtf8"),_t(this,"utf8OffsetToUtf16");const i=t.length,a=yu._utf8ByteLength(t),o=a!==i,s=o?new Uint32Array(i+1):null;o&&(s[i]=a);const c=o?new Uint32Array(a+1):null;o&&(c[a]=i);const f=new Uint8Array(a);let d=0;for(let h=0;h<i;h++){const y=t.charCodeAt(h);let g=y,b=!1;if(y>=55296&&y<=56319&&h+1<i){const v=t.charCodeAt(h+1);v>=56320&&v<=57343&&(g=(y-55296<<10)+65536|v-56320,b=!0)}o&&(s[h]=d,b&&(s[h+1]=d),g<=127?c[d+0]=h:g<=2047?(c[d+0]=h,c[d+1]=h):g<=65535?(c[d+0]=h,c[d+1]=h,c[d+2]=h):(c[d+0]=h,c[d+1]=h,c[d+2]=h,c[d+3]=h)),g<=127?f[d++]=g:g<=2047?(f[d++]=192|(g&1984)>>>6,f[d++]=128|(g&63)>>>0):g<=65535?(f[d++]=224|(g&61440)>>>12,f[d++]=128|(g&4032)>>>6,f[d++]=128|(g&63)>>>0):(f[d++]=240|(g&1835008)>>>18,f[d++]=128|(g&258048)>>>12,f[d++]=128|(g&4032)>>>6,f[d++]=128|(g&63)>>>0),b&&h++}this.utf16Length=i,this.utf8Length=a,this.utf16Value=t,this.utf8Value=f,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=c}static _utf8ByteLength(t){let i=0;for(let a=0,o=t.length;a<o;a++){const s=t.charCodeAt(a);let c=s,f=!1;if(s>=55296&&s<=56319&&a+1<o){const d=t.charCodeAt(a+1);d>=56320&&d<=57343&&(c=(s-55296<<10)+65536|d-56320,f=!0)}c<=127?i+=1:c<=2047?i+=2:c<=65535?i+=3:i+=4,f&&a++}return i}createString(t){const i=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,i),i}}const bu=class Gn{constructor(t){if(_t(this,"id",++Gn.LAST_ID),_t(this,"_onigBinding"),_t(this,"content"),_t(this,"utf16Length"),_t(this,"utf8Length"),_t(this,"utf16OffsetToUtf8"),_t(this,"utf8OffsetToUtf16"),_t(this,"ptr"),!At)throw new Vh("Must invoke loadWasm first.");this._onigBinding=At,this.content=t;const i=new yu(t);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!Gn._sharedPtrInUse?(Gn._sharedPtr||(Gn._sharedPtr=At.omalloc(1e4)),Gn._sharedPtrInUse=!0,At.HEAPU8.set(i.utf8Value,Gn._sharedPtr),this.ptr=Gn._sharedPtr):this.ptr=i.createString(At)}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===Gn._sharedPtr?Gn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};_t(bu,"LAST_ID",0);_t(bu,"_sharedPtr",0);_t(bu,"_sharedPtrInUse",!1);let V1=bu;class sR{constructor(t){if(_t(this,"_onigBinding"),_t(this,"_ptr"),!At)throw new Vh("Must invoke loadWasm first.");const i=[],a=[];for(let f=0,d=t.length;f<d;f++){const h=new yu(t[f]);i[f]=h.createString(At),a[f]=h.utf8Length}const o=At.omalloc(4*t.length);At.HEAPU32.set(i,o/4);const s=At.omalloc(4*t.length);At.HEAPU32.set(a,s/4);const c=At.createOnigScanner(o,s,t.length);for(let f=0,d=t.length;f<d;f++)At.ofree(i[f]);At.ofree(s),At.ofree(o),c===0&&oR(At),this._onigBinding=At,this._ptr=c}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,i,a){let o=0;if(typeof a=="number"&&(o=a),typeof t=="string"){t=new V1(t);const s=this._findNextMatchSync(t,i,!1,o);return t.dispose(),s}return this._findNextMatchSync(t,i,!1,o)}_findNextMatchSync(t,i,a,o){const s=this._onigBinding,c=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(i),o);if(c===0)return null;const f=s.HEAPU32;let d=c/4;const h=f[d++],y=f[d++],g=[];for(let b=0;b<y;b++){const v=t.convertUtf8OffsetToUtf16(f[d++]),S=t.convertUtf8OffsetToUtf16(f[d++]);g[b]={start:v,end:S,length:S-v}}return{index:h,captureIndices:g}}}function uR(e){return typeof e.instantiator=="function"}function cR(e){return typeof e.default=="function"}function dR(e){return typeof e.data<"u"}function fR(e){return typeof Response<"u"&&e instanceof Response}function hR(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 Ts;function pR(e){if(Ts)return Ts;async function t(){At=await rR(async i=>{let a=e;return a=await a,typeof a=="function"&&(a=await a(i)),typeof a=="function"&&(a=await a(i)),uR(a)?a=await a.instantiator(i):cR(a)?a=await a.default(i):(dR(a)&&(a=a.data),fR(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await mR(a)(i):a=await gR(a)(i):hR(a)?a=await ff(a)(i):a instanceof WebAssembly.Module?a=await ff(a)(i):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await ff(a.default)(i))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return Ts=t(),Ts}function ff(e){return t=>WebAssembly.instantiate(e,t)}function mR(e){return t=>WebAssembly.instantiateStreaming(e,t)}function gR(e){return async t=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,t)}}async function G1(e){return e&&await pR(e),{createScanner(t){return new sR(t.map(i=>typeof i=="string"?i:i.source))},createString(t){return new V1(t)}}}const $1=Q2({langs:Jf,themes:j1,engine:()=>G1(x(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:pb}=K2($1,{guessEmbeddedLanguages:c2});function Ha(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function yR(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}const Gh=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Tt=String.raw;function Ua(e,t){if(e==null)throw new Error(t??"Value expected");return e}const F1=Tt`\[\^?`,q1=`c.? | C(?:-.?)?|${Tt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Tt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Tt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Tt`o\{[^\}]*\}?`}|${Tt`\d{1,3}`}`,$h=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Ls=new RegExp(Tt`
35
+ \\ (?:
36
+ ${q1}
37
+ | [gk]<[^>]*>?
38
+ | [gk]'[^']*'?
39
+ | .
40
+ )
41
+ | \( (?:
42
+ \? (?:
43
+ [:=!>({]
44
+ | <[=!]
45
+ | <[^>]*>
46
+ | '[^']*'
47
+ | ~\|?
48
+ | #(?:[^)\\]|\\.?)*
49
+ | [^:)]*[:)]
50
+ )?
51
+ | \*[^\)]*\)?
52
+ )?
53
+ | (?:${$h.source})+
54
+ | ${F1}
55
+ | .
56
+ `.replace(/\s+/g,""),"gsu"),hf=new RegExp(Tt`
57
+ \\ (?:
58
+ ${q1}
59
+ | .
60
+ )
61
+ | \[:(?:\^?\p{Alpha}+|\^):\]
62
+ | ${F1}
63
+ | &&
64
+ | .
65
+ `.replace(/\s+/g,""),"gsu");function bR(e,t={}){const i={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const a=HR(i.flags),o=[a.extended],s={captureGroup:i.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(g){o.push(g)},replaceCurrentModX(g){o[o.length-1]=g},singleline:i.rules.singleline};let c=[],f;for(Ls.lastIndex=0;f=Ls.exec(e);){const g=vR(s,e,f[0],Ls.lastIndex);g.tokens?c.push(...g.tokens):g.token&&c.push(g.token),g.lastIndex!==void 0&&(Ls.lastIndex=g.lastIndex)}const d=[];let h=0;c.filter(g=>g.type==="GroupOpen").forEach(g=>{g.kind==="capturing"?g.number=++h:g.raw==="("&&d.push(g)}),h||d.forEach((g,b)=>{g.kind="capturing",g.number=b+1});const y=h||d.length;return{tokens:c.map(g=>g.type==="EscapedNumber"?PR(g,y):g).flat(),flags:a}}function vR(e,t,i,a){const[o,s]=i;if(i==="["||i==="[^"){const c=_R(t,i,a);return{tokens:c.tokens,lastIndex:c.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:mb(i,i)};if(/^\\g[<']/.test(i)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:RR(i)}}if(/^\\k[<']/.test(i)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:X1(i)}}if(s==="K")return{token:Q1("keep",i)};if(s==="N"||s==="R")return{token:xr("newline",i,{negate:s==="N"})};if(s==="O")return{token:xr("any",i)};if(s==="X")return{token:xr("text_segment",i)};const c=Y1(i,{inCharClass:!1});return Array.isArray(c)?{tokens:c}:{token:c}}if(o==="("){if(s==="*")return{token:MR(i)};if(i==="(?{")throw new Error(`Unsupported callout "${i}"`);if(i.startsWith("(?#")){if(t[a]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:a+1}}if(/^\(\?[-imx]+[:)]$/.test(i))return{token:OR(i,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,i==="("&&!e.captureGroup||i==="(?:")return{token:xa("group",i)};if(i==="(?>")return{token:xa("atomic",i)};if(i==="(?="||i==="(?!"||i==="(?<="||i==="(?<!")return{token:xa(i[2]==="<"?"lookbehind":"lookahead",i,{negate:i.endsWith("!")})};if(i==="("&&e.captureGroup||i.startsWith("(?<")&&i.endsWith(">")||i.startsWith("(?'")&&i.endsWith("'"))return{token:xa("capturing",i,{...i!=="("&&{name:i.slice(3,-1)}})};if(i.startsWith("(?~")){if(i==="(?~|")throw new Error(`Unsupported absence function kind "${i}"`);return{token:xa("absence_repeater",i)}}throw i==="(?("?new Error(`Unsupported conditional "${i}"`):new Error(`Invalid or unsupported group option "${i}"`)}if(i===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:AR(i)}}if(e.getCurrentModX()){if(i==="#"){const c=t.indexOf(`
66
+ `,a);return{lastIndex:c===-1?t.length:c}}if(/^\s$/.test(i)){const c=/\s+/y;return c.lastIndex=a,{lastIndex:c.exec(t)?c.lastIndex:a}}}if(i===".")return{token:xr("dot",i)};if(i==="^"||i==="$"){const c=e.singleline?{"^":Tt`\A`,$:Tt`\Z`}[i]:i;return{token:mb(c,i)}}return i==="|"?{token:ER(i)}:$h.test(i)?{tokens:BR(i)}:{token:Si(Ha(i),i)}}function _R(e,t,i){const a=[gb(t[1]==="^",t)];let o=1,s;for(hf.lastIndex=i;s=hf.exec(e);){const c=s[0];if(c[0]==="["&&c[1]!==":")o++,a.push(gb(c[1]==="^",c));else if(c==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(Si(93,c));else if(o--,a.push(xR(c)),!o)break}else{const f=SR(c);Array.isArray(f)?a.push(...f):a.push(f)}}return{tokens:a,lastIndex:hf.lastIndex||e.length}}function SR(e){if(e[0]==="\\")return Y1(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Gh.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return xr("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?CR(e):e==="&&"?wR(e):Si(Ha(e),e)}function Y1(e,{inCharClass:t}){const i=e[1];if(i==="c"||i==="C")return NR(e);if("dDhHsSwW".includes(i))return IR(e);if(e.startsWith(Tt`\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 zR(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const a=e.split(/\\x/).slice(1).map(c=>parseInt(c,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(a)),s=new TextEncoder;return[...o].map(c=>{const f=[...s.encode(c)].map(d=>`\\x${d.toString(16)}`).join("");return Si(Ha(c),f)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(i==="u"||i==="x")return Si(UR(e),e);if(yb.has(i))return Si(yb.get(i),e);if(/\d/.test(i))return kR(t,e);if(e==="\\")throw new Error(Tt`Incomplete escape "\"`);if(i==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Si(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function ER(e){return{type:"Alternator",raw:e}}function mb(e,t){return{type:"Assertion",kind:e,raw:t}}function X1(e){return{type:"Backreference",raw:e}}function Si(e,t){return{type:"Character",value:e,raw:t}}function xR(e){return{type:"CharacterClassClose",raw:e}}function CR(e){return{type:"CharacterClassHyphen",raw:e}}function wR(e){return{type:"CharacterClassIntersector",raw:e}}function gb(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function xr(e,t,i={}){return{type:"CharacterSet",kind:e,...i,raw:t}}function Q1(e,t,i={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ua(i.flags),raw:t}}function kR(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function AR(e){return{type:"GroupClose",raw:e}}function xa(e,t,i={}){return{type:"GroupOpen",kind:e,...i,raw:t}}function TR(e,t,i,a){return{type:"NamedCallout",kind:e,tag:t,arguments:i,raw:a}}function LR(e,t,i,a){return{type:"Quantifier",kind:e,min:t,max:i,raw:a}}function RR(e){return{type:"Subroutine",raw:e}}const DR=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),yb=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function NR(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 Si(Ha(t.toUpperCase())-64,e)}function OR(e,t){let{on:i,off:a}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;a??="";const o=(t.getCurrentModX()||i.includes("x"))&&!a.includes("x"),s=vb(i),c=vb(a),f={};if(s&&(f.enable=s),c&&(f.disable=c),e.endsWith(")"))return t.replaceCurrentModX(o),Q1("flags",e,{flags:f});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,xa("group",e,{...(s||c)&&{flags:f}});throw new Error(`Unexpected flag modifier "${e}"`)}function MR(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:i,tag:a,args:o}=t.groups;if(!i)throw new Error(`Invalid named callout "${e}"`);if(a==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=o?o.split(",").filter(y=>y!=="").map(y=>/^[+-]?\d+$/.test(y)?+y:y):[],[c,f,d]=s,h=DR.has(i)?i.toLowerCase():"custom";switch(h){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 c=="string")throw new Error(`Named callout argument must be a number "${c}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);if(s.length===2&&(typeof f=="number"||!/^[<>X]$/.test(f)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${f}"`);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 c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${c}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);if(typeof f=="number"||!/^(?:[<>!=]=|[<>])$/.test(f))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${f}"`);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 "${i}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return TR(h,a??null,o?.split(",")??null,e)}function bb(e){let t=null,i,a;if(e[0]==="{"){const{minStr:o,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,c=1e5;if(+o>c||s&&+s>c)throw new Error("Quantifier value unsupported in Oniguruma");if(i=+o,a=s===void 0?+o:s===""?1/0:+s,i>a&&(t="possessive",[i,a]=[a,i]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else i=e[0]==="+"?1:0,a=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return LR(t,i,a,e)}function IR(e){const t=e[1].toLowerCase();return xr({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function zR(e){const{p:t,neg:i,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return xr("property",e,{value:a,negate:t==="P"&&!i||t==="p"&&!!i})}function vb(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 HR(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let i=0;i<e.length;i++){const a=e[i];if(!"imxDPSWy".includes(a))throw new Error(`Invalid flag "${a}"`);if(a==="y"){if(!/^y{[gw]}/.test(e.slice(i)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[i+2]==="g"?"grapheme":"word",i+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[a]]=!0}return t}function UR(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 PR(e,t){const{raw:i,inCharClass:a}=e,o=i.slice(1);if(!a&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[X1(i)];const s=[],c=o.match(/^[0-7]+|\d/g);for(let f=0;f<c.length;f++){const d=c[f];let h;if(f===0&&d!=="8"&&d!=="9"){if(h=parseInt(d,8),h>127)throw new Error(Tt`Octal encoded byte above 177 unsupported "${i}"`)}else h=Ha(d);s.push(Si(h,(f===0?"\\":"")+d))}return s}function BR(e){const t=[],i=new RegExp($h,"gy");let a;for(;a=i.exec(e);){const o=a[0];if(o[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(s){const{min:c,max:f}=s.groups;if(+c>+f&&o.endsWith("?")){i.lastIndex--,t.push(bb(o.slice(0,-1)));continue}}}t.push(bb(o))}return t}function Z1(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const i=e.body[0];return!t||Object.keys(t).every(a=>t[a]===i[a])}function jR(e){return VR.has(e.type)}const VR=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function K1(e,t={}){const i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},a=bR(e,{flags:i.flags,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline}}),o=(b,v)=>{const S=a.tokens[s.nextIndex];switch(s.parent=b,s.nextIndex++,S.type){case"Alternator":return wr();case"Assertion":return GR(S);case"Backreference":return $R(S,s);case"Character":return vu(S.value,{useLastValid:!!v.isCheckingRangeEnd});case"CharacterClassHyphen":return FR(S,s,v);case"CharacterClassOpen":return qR(S,s,v);case"CharacterSet":return YR(S,s);case"Directive":return JR(S.kind,{flags:S.flags});case"GroupOpen":return XR(S,s,v);case"NamedCallout":return tD(S.kind,S.tag,S.arguments);case"Quantifier":return QR(S,s);case"Subroutine":return ZR(S,s);default:throw new Error(`Unexpected token type "${S.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:i.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:i.skipBackrefValidation,skipLookbehindValidation:i.skipLookbehindValidation,skipPropertyNameValidation:i.skipPropertyNameValidation,subroutines:[],tokens:a.tokens,unicodePropertyMap:i.unicodePropertyMap,walk:o},c=iD(eD(a.flags));let f=c.body[0];for(;s.nextIndex<a.tokens.length;){const b=o(f,{});b.type==="Alternative"?(c.body.push(b),f=b):f.body.push(b)}const{capturingGroups:d,hasNumberedRef:h,namedGroupsByName:y,subroutines:g}=s;if(h&&y.size&&!i.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:b}of g)if(typeof b=="number"){if(b>d.length)throw new Error("Subroutine uses a group number that's not defined");b&&(d[b-1].isSubroutined=!0)}else if(y.has(b)){if(y.get(b).length>1)throw new Error(Tt`Subroutine uses a duplicate group name "\g<${b}>"`);y.get(b)[0].isSubroutined=!0}else throw new Error(Tt`Subroutine uses a group name that's not defined "\g<${b}>"`);return c}function GR({kind:e}){return eh(Ua({"^":"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===Tt`\B`||e===Tt`\Y`})}function $R({raw:e},t){const i=/^\\k[<']/.test(e),a=i?e.slice(3,-1):e.slice(1),o=(s,c=!1)=>{const f=t.capturingGroups.length;let d=!1;if(s>f)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,th(c?f+1-s:s,{orphan:d})};if(i){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(a);if(s)return o(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(a))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(a))throw new Error(`Group name not defined to the left "${e}"`);return th(a)}return o(+a)}function FR(e,t,i){const{tokens:a,walk:o}=t,s=t.parent,c=s.body.at(-1),f=a[t.nextIndex];if(!i.isCheckingRangeEnd&&c&&c.type!=="CharacterClass"&&c.type!=="CharacterClassRange"&&f&&f.type!=="CharacterClassOpen"&&f.type!=="CharacterClassClose"&&f.type!=="CharacterClassIntersector"){const d=o(s,{...i,isCheckingRangeEnd:!0});if(c.type==="Character"&&d.type==="Character")return s.body.pop(),WR(c,d);throw new Error("Invalid character class range")}return vu(Ha("-"))}function qR({negate:e},t,i){const{tokens:a,walk:o}=t,s=[qs()],c=a[t.nextIndex];let f=Eb(c);for(;f.type!=="CharacterClassClose";){if(f.type==="CharacterClassIntersector")s.push(qs()),t.nextIndex++;else{const h=s.at(-1);h.body.push(o(h,i))}f=Eb(a[t.nextIndex],c)}const d=qs({negate:e});return s.length===1?d.body=s[0].body:(d.kind="intersection",d.body=s.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,d}function YR({kind:e,negate:t,value:i},a){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c}=a;if(e==="property"){const f=_u(i);if(Gh.has(f)&&!c?.has(f))e="posix",i=f;else return Ca(i,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c})}return e==="posix"?nD(i,{negate:t}):nh(e,{negate:t})}function XR(e,t,i){const{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:c,walk:f}=t,d=rD(e),h=d.type==="AbsenceFunction",y=Sb(d),g=y&&d.negate;if(d.type==="CapturingGroup"&&(o.push(d),d.name&&yR(s,d.name,[]).push(d)),h&&i.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let b=xb(a[t.nextIndex]);for(;b.type!=="GroupClose";){if(b.type==="Alternator")d.body.push(wr()),t.nextIndex++;else{const v=d.body.at(-1),S=f(v,{...i,isInAbsenceFunction:i.isInAbsenceFunction||h,isInLookbehind:i.isInLookbehind||y,isInNegLookbehind:i.isInNegLookbehind||g});if(v.body.push(S),(y||i.isInLookbehind)&&!c){const w="Lookbehind includes a pattern not allowed by Oniguruma";if(g||i.isInNegLookbehind){if(_b(S)||S.type==="CapturingGroup")throw new Error(w)}else if(_b(S)||Sb(S)&&S.negate)throw new Error(w)}}b=xb(a[t.nextIndex])}return t.nextIndex++,d}function QR({kind:e,min:t,max:i},a){const o=a.parent,s=o.body.at(-1);if(!s||!jR(s))throw new Error("Quantifier requires a repeatable token");const c=J1(e,t,i,s);return o.body.pop(),c}function ZR({raw:e},t){const{capturingGroups:i,subroutines:a}=t;let o=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(s){const f=+s.groups.num,d=i.length;if(t.hasNumberedRef=!0,o={"":f,"+":d+f,"-":d+1-f}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const c=e_(o);return a.push(c),c}function KR(e,t){return{type:"AbsenceFunction",kind:e,body:so(t?.body)}}function wr(e){return{type:"Alternative",body:t_(e?.body)}}function eh(e,t){const i={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(i.negate=!!t?.negate),i}function th(e,t){const i=!!t?.orphan;return{type:"Backreference",ref:e,...i&&{orphan:i}}}function W1(e,t){const i={name:void 0,isSubroutined:!1,...t};if(i.name!==void 0&&!aD(i.name))throw new Error(`Group name "${i.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...i.name&&{name:i.name},...i.isSubroutined&&{isSubroutined:i.isSubroutined},body:so(t?.body)}}function vu(e,t){const i={useLastValid:!1,...t};if(e>1114111){const a=e.toString(16);if(i.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${a}}"`):new Error(`Invalid code point out of range in JS "\\x{${a}}"`)}return{type:"Character",value:e}}function qs(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:t_(e?.body)}}function WR(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function nh(e,t){const i=!!t?.negate,a={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(a.negate=i),(e==="text_segment"||e==="newline"&&!i)&&(a.variableLength=!0),a}function JR(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ua(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function eD(e){return{type:"Flags",...e}}function In(e){const t=e?.atomic,i=e?.flags;if(t&&i)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...i&&{flags:i},body:so(e?.body)}}function Sr(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:so(e?.body)}}function tD(e,t,i){return{type:"NamedCallout",kind:e,tag:t,arguments:i}}function nD(e,t){const i=!!t?.negate;if(!Gh.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:i}}function J1(e,t,i,a){if(t>i)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:i,body:a}}function iD(e,t){return{type:"Regex",body:so(t?.body),flags:e}}function e_(e){return{type:"Subroutine",ref:e}}function Ca(e,t){const i={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let a=i.unicodePropertyMap?.get(_u(e));if(!a){if(i.normalizeUnknownPropertyNames)a=lD(e);else if(i.unicodePropertyMap&&!i.skipPropertyNameValidation)throw new Error(Tt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:i.negate}}function rD({flags:e,kind:t,name:i,negate:a,number:o}){switch(t){case"absence_repeater":return KR("repeater");case"atomic":return In({atomic:!0});case"capturing":return W1(o,{name:i});case"group":return In({flags:e});case"lookahead":case"lookbehind":return Sr({behind:t==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${t}"`)}}function so(e){if(e===void 0)e=[wr()];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 t_(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 _b(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Sb(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function aD(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function lD(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 _u(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Eb(e,t){const i=t;return Ua(e,`Unclosed character class${i?.type==="Character"&&i.value===93&&i.raw==="]"?' (started with "]")':""}`)}function xb(e){return Ua(e,"Unclosed group")}function Xl(e,t,i=null){function a(s,c){for(let f=0;f<s.length;f++){const d=o(s[f],c,f,s);f=Math.max(-1,f+d)}}function o(s,c=null,f=null,d=null){let h=0,y=!1;const g={node:s,parent:c,key:f,container:d,root:e,remove(){Rs(d).splice(Math.max(0,ba(f)+h),1),h--,y=!0},removeAllNextSiblings(){return Rs(d).splice(ba(f)+1)},removeAllPrevSiblings(){const C=ba(f)+h;return h-=C,Rs(d).splice(0,Math.max(0,C))},replaceWith(C,k={}){const A=!!k.traverse;d?d[Math.max(0,ba(f)+h)]=C:Ua(c,"Can't replace root node")[f]=C,A&&o(C,c,f,d),y=!0},replaceWithMultiple(C,k={}){const A=!!k.traverse;if(Rs(d).splice(Math.max(0,ba(f)+h),1,...C),h+=C.length-1,A){let H=0;for(let U=0;U<C.length;U++)H+=o(C[U],c,ba(f)+U+H,d)}y=!0},skip(){y=!0}},{type:b}=s,v=t["*"],S=t[b],w=typeof v=="function"?v:v?.enter,R=typeof S=="function"?S:S?.enter;if(w?.(g,i),R?.(g,i),!y)switch(b){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":a(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":a(s.body,s),o(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${b}"`)}return S?.exit?.(g,i),v?.exit?.(g,i),h}return o(e),e}function Rs(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function ba(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const oD=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function sD(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function uD(e,t,i,a){return e.slice(0,t)+a+e.slice(t+i.length)}const kn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Fh(e,t,i,a){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let c=0,f="";for(const d of e.matchAll(o)){const{0:h,groups:{$skip:y}}=d;if(!y&&(!a||a===kn.DEFAULT==!c)){i instanceof Function?f+=i(d,{context:c?kn.CHAR_CLASS:kn.DEFAULT,negated:s[s.length-1]}):f+=i;continue}h[0]==="["?(c++,s.push(h[1]==="^")):h==="]"&&c&&(c--,s.pop()),f+=h}return f}function n_(e,t,i,a){Fh(e,t,i,a)}function cD(e,t,i=0,a){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=i;let s=0,c;for(;c=o.exec(e);){const{0:f,groups:{$skip:d}}=c;if(!d&&(!a||a===kn.DEFAULT==!s))return c;f==="["?s++:f==="]"&&s&&s--,o.lastIndex==c.index&&o.lastIndex++}return null}function Ds(e,t,i){return!!cD(e,t,0,i)}function dD(e,t){const i=/\\?./gsu;i.lastIndex=t;let a=e.length,o=0,s=1,c;for(;c=i.exec(e);){const[f]=c;if(f==="[")o++;else if(o)f==="]"&&o--;else if(f==="(")s++;else if(f===")"&&(s--,!s)){a=c.index;break}}return e.slice(t,a)}const Cb=new RegExp(String.raw`(?<noncapturingStart>${oD})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function fD(e,t){const i=t?.hiddenCaptures??[];let a=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:i};const o="(?>",s="(?:(?=(",c=[0],f=[];let d=0,h=0,y=NaN,g;do{g=!1;let b=0,v=0,S=!1,w;for(Cb.lastIndex=Number.isNaN(y)?0:y+s.length;w=Cb.exec(e);){const{0:R,index:C,groups:{capturingStart:k,noncapturingStart:A}}=w;if(R==="[")b++;else if(b)R==="]"&&b--;else if(R===o&&!S)y=C,S=!0;else if(S&&A)v++;else if(k)S?v++:(d++,c.push(d+h));else if(R===")"&&S){if(!v){h++;const H=d+h;if(e=`${e.slice(0,y)}${s}${e.slice(y+o.length,C)}))<$$${H}>)${e.slice(C+1)}`,g=!0,f.push(H),sD(i,H),a.size){const U=new Map;a.forEach((D,B)=>{U.set(B>=H?B+1:B,D.map(re=>re>=H?re+1:re))}),a=U}break}v--}}}while(g);return i.push(...f),e=Fh(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:b,groups:{backrefNum:v,wrappedBackrefNum:S}})=>{if(v){const w=+v;if(w>c.length-1)throw new Error(`Backref "${b}" greater than number of captures`);return`\\${c[w]}`}return`\\${S}`},kn.DEFAULT),{pattern:e,captureTransfers:a,hiddenCaptures:i}}const i_=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,pf=new RegExp(String.raw`
67
+ \\(?: \d+
68
+ | c[A-Za-z]
69
+ | [gk]<[^>]+>
70
+ | [pPu]\{[^\}]+\}
71
+ | u[A-Fa-f\d]{4}
72
+ | x[A-Fa-f\d]{2}
73
+ )
74
+ | \((?: \? (?: [:=!>]
75
+ | <(?:[=!]|[^>]+>)
76
+ | [A-Za-z\-]+:
77
+ | \(DEFINE\)
78
+ ))?
79
+ | (?<qBase>${i_})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
80
+ | \\?.
81
+ `.replace(/\s+/g,""),"gsu");function hD(e){if(!new RegExp(`${i_}\\+`).test(e))return{pattern:e};const t=[];let i=null,a=null,o="",s=0,c;for(pf.lastIndex=0;c=pf.exec(e);){const{0:f,index:d,groups:{qBase:h,qMod:y,invalidQ:g}}=c;if(f==="[")s||(a=d),s++;else if(f==="]")s?s--:a=null;else if(!s)if(y==="+"&&o&&!o.startsWith("(")){if(g)throw new Error(`Invalid quantifier "${f}"`);let b=-1;if(/^\{\d+\}$/.test(h))e=uD(e,d+h.length,y,"");else{if(o===")"||o==="]"){const v=o===")"?i:a;if(v===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,v)}(?>${e.slice(v,d)}${h})${e.slice(d+f.length)}`}else e=`${e.slice(0,d-o.length)}(?>${o}${h})${e.slice(d+f.length)}`;b+=4}pf.lastIndex+=b}else f[0]==="("?t.push(d):f===")"&&(i=t.length?t.pop():null);o=f}return{pattern:e}}const wn=String.raw,pD=wn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,ih=wn`\(\?R=(?<rDepth>[^\)]+)\)|${pD}`,Su=wn`\(\?<(?![=!])(?<captureName>[^>]+)>`,r_=wn`${Su}|(?<unnamed>\()(?!\?)`,vr=new RegExp(wn`${Su}|${ih}|\(\?|\\?.`,"gsu"),mf="Cannot use multiple overlapping recursions";function mD(e,t){const{hiddenCaptures:i,mode:a}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(ih,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:i};if(a==="plugin"&&Ds(e,wn`\(\?\(DEFINE\)`,kn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],c=Ds(e,wn`\\[1-9]`,kn.DEFAULT),f=new Map,d=[];let h=!1,y=0,g=0,b;for(vr.lastIndex=0;b=vr.exec(e);){const{0:v,groups:{captureName:S,rDepth:w,gRNameOrNum:R,gRDepth:C}}=b;if(v==="[")y++;else if(y)v==="]"&&y--;else if(w){if(wb(w),h)throw new Error(mf);if(c)throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const k=e.slice(0,b.index),A=e.slice(vr.lastIndex);if(Ds(A,ih,kn.DEFAULT))throw new Error(mf);const H=+w-1;e=kb(k,A,H,!1,i,s,g),o=Tb(o,k,H,s.length,0,g);break}else if(R){wb(C);let k=!1;for(const W of d)if(W.name===R||W.num===+R){if(k=!0,W.hasRecursedWithin)throw new Error(mf);break}if(!k)throw new Error(wn`Recursive \g cannot be used outside the referenced group "${a==="external"?R:wn`\g<${R}&R=${C}>`}"`);const A=f.get(R),H=dD(e,A);if(c&&Ds(H,wn`${Su}|\((?!\?)`,kn.DEFAULT))throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const U=e.slice(A,b.index),D=H.slice(U.length+v.length),B=s.length,re=+C-1,j=kb(U,D,re,!0,i,s,g);o=Tb(o,U,re,s.length-B,B,g);const se=e.slice(0,A),Z=e.slice(A+H.length);e=`${se}${j}${Z}`,vr.lastIndex+=j.length-v.length-U.length-D.length,d.forEach(W=>W.hasRecursedWithin=!0),h=!0}else if(S)g++,f.set(String(g),vr.lastIndex),f.set(S,vr.lastIndex),d.push({num:g,name:S});else if(v[0]==="("){const k=v==="(";k&&(g++,f.set(String(g),vr.lastIndex)),d.push(k?{num:g}:{})}else v===")"&&d.pop()}return i.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:i}}function wb(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 kb(e,t,i,a,o,s,c){const f=new Set;a&&n_(e+t,Su,({groups:{captureName:h}})=>{f.add(h)},kn.DEFAULT);const d=[i,a?f:null,o,s,c];return`${e}${Ab(`(?:${e}`,"forward",...d)}(?:)${Ab(`${t})`,"backward",...d)}${t}`}function Ab(e,t,i,a,o,s,c){const d=y=>t==="forward"?y+2:i-y+2-1;let h="";for(let y=0;y<i;y++){const g=d(y);h+=Fh(e,wn`${r_}|\\k<(?<backref>[^>]+)>`,({0:b,groups:{captureName:v,unnamed:S,backref:w}})=>{if(w&&a&&!a.has(w))return b;const R=`_$${g}`;if(S||v){const C=c+s.length+1;return s.push(C),gD(o,C),S?b:`(?<${v}${R}>`}return wn`\k<${w}${R}>`},kn.DEFAULT)}return h}function gD(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function Tb(e,t,i,a,o,s){if(e.size&&a){let c=0;n_(t,r_,()=>c++,kn.DEFAULT);const f=s-c+o,d=new Map;return e.forEach((h,y)=>{const g=(a-c*i)/i,b=c*i,v=y>f+c?y+a:y,S=[];for(const w of h)if(w<=f)S.push(w);else if(w>f+c+g)S.push(w+a);else if(w<=f+c)for(let R=0;R<=i;R++)S.push(w+c*R);else for(let R=0;R<=i;R++)S.push(w+b+g*R);d.set(v,S)}),d}return e}var St=String.fromCodePoint,Ce=String.raw,zn={},Eu=globalThis.RegExp;zn.flagGroups=(()=>{try{new Eu("(?i:)")}catch{return!1}return!0})();zn.unicodeSets=(()=>{try{new Eu("[[]]","v")}catch{return!1}return!0})();zn.bugFlagVLiteralHyphenIsRange=zn.unicodeSets?(()=>{try{new Eu(Ce`[\d\-a]`,"v")}catch{return!0}return!1})():!1;zn.bugNestedClassIgnoresNegation=zn.unicodeSets&&new Eu("[[^a]]","v").test("a");function ou(e,{enable:t,disable:i}){return{dotAll:!i?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!i?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function to(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}function rh(e,t){return Lb[e]>=Lb[t]}function yD(e,t){if(e==null)throw new Error(t??"Value expected");return e}var Lb={ES2025:2025,ES2024:2024,ES2018:2018},bD={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function a_(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!bD[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=zn.flagGroups?"ES2025":zn.unicodeSets?"ES2024":"ES2018"),t}var vD="[ -\r ]",_D=new Set([St(304),St(305)]),yi=Ce`[\p{L}\p{M}\p{N}\p{Pc}]`;function l_(e){if(_D.has(e))return[e];const t=new Set,i=e.toLowerCase(),a=i.toUpperCase(),o=xD.get(i),s=SD.get(i),c=ED.get(i);return[...a].length===1&&t.add(a),c&&t.add(c),o&&t.add(o),t.add(i),s&&t.add(s),[...t]}var qh=new Map(`C Other
82
+ Cc Control cntrl
83
+ Cf Format
84
+ Cn Unassigned
85
+ Co Private_Use
86
+ Cs Surrogate
87
+ L Letter
88
+ LC Cased_Letter
89
+ Ll Lowercase_Letter
90
+ Lm Modifier_Letter
91
+ Lo Other_Letter
92
+ Lt Titlecase_Letter
93
+ Lu Uppercase_Letter
94
+ M Mark Combining_Mark
95
+ Mc Spacing_Mark
96
+ Me Enclosing_Mark
97
+ Mn Nonspacing_Mark
98
+ N Number
99
+ Nd Decimal_Number digit
100
+ Nl Letter_Number
101
+ No Other_Number
102
+ P Punctuation punct
103
+ Pc Connector_Punctuation
104
+ Pd Dash_Punctuation
105
+ Pe Close_Punctuation
106
+ Pf Final_Punctuation
107
+ Pi Initial_Punctuation
108
+ Po Other_Punctuation
109
+ Ps Open_Punctuation
110
+ S Symbol
111
+ Sc Currency_Symbol
112
+ Sk Modifier_Symbol
113
+ Sm Math_Symbol
114
+ So Other_Symbol
115
+ Z Separator
116
+ Zl Line_Separator
117
+ Zp Paragraph_Separator
118
+ Zs Space_Separator
119
+ ASCII
120
+ ASCII_Hex_Digit AHex
121
+ Alphabetic Alpha
122
+ Any
123
+ Assigned
124
+ Bidi_Control Bidi_C
125
+ Bidi_Mirrored Bidi_M
126
+ Case_Ignorable CI
127
+ Cased
128
+ Changes_When_Casefolded CWCF
129
+ Changes_When_Casemapped CWCM
130
+ Changes_When_Lowercased CWL
131
+ Changes_When_NFKC_Casefolded CWKCF
132
+ Changes_When_Titlecased CWT
133
+ Changes_When_Uppercased CWU
134
+ Dash
135
+ Default_Ignorable_Code_Point DI
136
+ Deprecated Dep
137
+ Diacritic Dia
138
+ Emoji
139
+ Emoji_Component EComp
140
+ Emoji_Modifier EMod
141
+ Emoji_Modifier_Base EBase
142
+ Emoji_Presentation EPres
143
+ Extended_Pictographic ExtPict
144
+ Extender Ext
145
+ Grapheme_Base Gr_Base
146
+ Grapheme_Extend Gr_Ext
147
+ Hex_Digit Hex
148
+ IDS_Binary_Operator IDSB
149
+ IDS_Trinary_Operator IDST
150
+ ID_Continue IDC
151
+ ID_Start IDS
152
+ Ideographic Ideo
153
+ Join_Control Join_C
154
+ Logical_Order_Exception LOE
155
+ Lowercase Lower
156
+ Math
157
+ Noncharacter_Code_Point NChar
158
+ Pattern_Syntax Pat_Syn
159
+ Pattern_White_Space Pat_WS
160
+ Quotation_Mark QMark
161
+ Radical
162
+ Regional_Indicator RI
163
+ Sentence_Terminal STerm
164
+ Soft_Dotted SD
165
+ Terminal_Punctuation Term
166
+ Unified_Ideograph UIdeo
167
+ Uppercase Upper
168
+ Variation_Selector VS
169
+ White_Space space
170
+ XID_Continue XIDC
171
+ XID_Start XIDS`.split(/\s/).map(e=>[_u(e),e])),SD=new Map([["s",St(383)],[St(383),"s"]]),ED=new Map([[St(223),St(7838)],[St(107),St(8490)],[St(229),St(8491)],[St(969),St(8486)]]),xD=new Map([Zi(453),Zi(456),Zi(459),Zi(498),...gf(8072,8079),...gf(8088,8095),...gf(8104,8111),Zi(8124),Zi(8140),Zi(8188)]),CD=new Map([["alnum",Ce`[\p{Alpha}\p{Nd}]`],["alpha",Ce`\p{Alpha}`],["ascii",Ce`\p{ASCII}`],["blank",Ce`[\p{Zs}\t]`],["cntrl",Ce`\p{Cc}`],["digit",Ce`\p{Nd}`],["graph",Ce`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ce`\p{Lower}`],["print",Ce`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ce`[\p{P}\p{S}]`],["space",Ce`\p{space}`],["upper",Ce`\p{Upper}`],["word",Ce`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ce`\p{AHex}`]]);function wD(e,t){const i=[];for(let a=e;a<=t;a++)i.push(a);return i}function Zi(e){const t=St(e);return[t.toLowerCase(),t]}function gf(e,t){return wD(e,t).map(i=>Zi(i))}var o_=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function kD(e,t){const i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};s_(e);const a={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:rh(i.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Xl(e,AD,a);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:a.subroutineRefMap};Xl(e,TD,s);const c={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Xl(e,LD,c),e._originMap=s.groupOriginByCopy,e._strategy=a.strategy,e}var AD={AbsenceFunction({node:e,parent:t,replaceWith:i}){const{body:a,kind:o}=e;if(o==="repeater"){const s=In();s.body[0].body.push(Sr({negate:!0,body:a}),Ca("Any"));const c=In();c.body[0].body.push(J1("greedy",0,1/0,s)),i(st(c,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:i},{flagDirectivesByAlt:a}){const o=e.body.filter(s=>s.kind==="flags");for(let s=i+1;s<t.body.length;s++){const c=t.body[s];to(a,c,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const i=c_(t.get(e));if(i){const a=In({flags:i});a.body[0].body=e.body,e.body=[st(a,e)]}}}},Assertion({node:e,parent:t,key:i,container:a,root:o,remove:s,replaceWith:c},f){const{kind:d,negate:h}=e,{asciiWordBoundaries:y,avoidSubclass:g,supportedGNodes:b,wordIsAscii:v}=f;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(d==="line_end")c(st(Sr({body:[wr({body:[eh("string_end")]}),wr({body:[vu(10)]})]}),t));else if(d==="line_start")c(st(bi(Ce`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(d==="search_start")if(b.has(e))o.flags.sticky=!0,s();else{const S=a[i-1];if(S&&ID(S))c(st(Sr({negate:!0}),t));else{if(g)throw new Error(Ce`Uses "\G" in a way that requires a subclass`);c(Ki(eh("string_start"),t)),f.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")c(st(bi(Ce`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!v&&!y){const S=`(?:(?<=${yi})(?!${yi})|(?<!${yi})(?=${yi}))`,w=`(?:(?<=${yi})(?=${yi})|(?<!${yi})(?!${yi}))`;c(st(bi(h?w:S),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!bf(i)&&(i=yf(i,t),e.ref=i)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:i}){let{name:a}=e;a&&!bf(a)&&(a=yf(a,t),e.name=a),i.set(e.number,e),a&&i.set(a,e)},CharacterClassRange({node:e,parent:t,replaceWith:i}){if(t.kind==="intersection"){const a=qs({body:[e]});i(st(a,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:i},{accuracy:a,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:c,wordIsAscii:f}){const{kind:d,negate:h,value:y}=e;if(s&&(d==="digit"||y==="digit")){i(Ki(nh("digit",{negate:h}),t));return}if(c&&(d==="space"||y==="space")){i(st(vf(bi(vD),h),t));return}if(f&&(d==="word"||y==="word")){i(Ki(nh("word",{negate:h}),t));return}if(d==="any")i(Ki(Ca("Any"),t));else if(d==="digit")i(Ki(Ca("Nd",{negate:h}),t));else if(d!=="dot")if(d==="text_segment"){if(a==="strict")throw new Error(Ce`Use of "\X" requires non-strict accuracy`);const g="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",b=Ce`\p{RI}{2}|${g}(?:\u200D${g})*`;i(st(bi(Ce`(?>\r\n|${o?Ce`\p{RGI_Emoji}`:b}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")i(Ki(Ca("AHex",{negate:h}),t));else if(d==="newline")i(st(bi(h?`[^
172
+ ]`:`(?>\r
173
+ ?|[
174
+ \v\f…\u2028\u2029])`),t));else if(d==="posix")if(!o&&(y==="graph"||y==="print")){if(a==="strict")throw new Error(`POSIX class "${y}" requires min target ES2024 or non-strict accuracy`);let g={graph:"!-~",print:" -~"}[y];h&&(g=`\0-${St(g.codePointAt(0)-1)}${St(g.codePointAt(2)+1)}-􏿿`),i(st(bi(`[${g}]`),t))}else i(st(vf(bi(CD.get(y)),h),t));else if(d==="property")qh.has(_u(y))||(e.key="sc");else if(d==="space")i(Ki(Ca("space",{negate:h}),t));else if(d==="word")i(st(vf(bi(yi),h),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,root:i,remove:a,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:c}){const{kind:f,flags:d}=e;if(f==="flags")if(!d.enable&&!d.disable)a();else{const h=In({flags:d});h.body[0].body=c(),o(st(h,t),{traverse:!0})}else if(f==="keep"){const h=i.body[0],g=i.body.length===1&&Z1(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:i;if(t.parent!==g||g.body.length>1)throw new Error(Ce`Uses "\K" in a way that's unsupported`);const b=Sr({behind:!0});b.body[0].body=s(),o(st(b,t))}else throw new Error(`Unexpected directive kind "${f}"`)},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(i=>delete e[i]),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:i}=e.flags;t?.extended&&delete t.extended,i?.extended&&delete i.extended,t?.dotAll&&i?.dotAll&&delete t.dotAll,t?.ignoreCase&&i?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,i&&!Object.keys(i).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:i}=e;i==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:i}){const{kind:a}=e;if(a==="fail")i(st(Sr({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${a.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=In();t.body[0].body.push(e.body),e.body=st(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const i=[];let a=!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 c=f_(s.body);c?(a=!0,Array.isArray(c)?i.push(...c):i.push(c)):o=!0}a&&!o&&i.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:i,strategy:a}){if(t==="strict"&&i&&a)throw new Error(Ce`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!bf(i)&&(i=yf(i,t),e.ref=i)}},TD={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:i}){const{orphan:a,ref:o}=e;a||i.set(e,[...t.get(o).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:i,skip:a},{groupOriginByCopy:o,groupsByName:s,multiplexCapturesToLeftByRef:c,openRefs:f,reffedNodesByReferencer:d}){const h=o.get(e);if(h&&f.has(e.number)){const g=Ki(Rb(e.number),t);d.set(g,f.get(e.number)),i(g);return}f.set(e.number,e),c.set(e.number,[]),e.name&&to(c,e.name,[]);const y=c.get(e.name??e.number);for(let g=0;g<y.length;g++){const b=y[g];if(h===b.node||h&&h===b.origin||e===b.origin){y.splice(g,1);break}}if(c.get(e.number).push({node:e,origin:h}),e.name&&c.get(e.name).push({node:e,origin:h}),e.name){const g=to(s,e.name,new Map);let b=!1;if(h)b=!0;else for(const v of g.values())if(!v.hasDuplicateNameToRemove){b=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:b})}},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=ou(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:i},a){const{isRecursive:o,ref:s}=e;if(o){let y=t;for(;(y=y.parent)&&!(y.type==="CapturingGroup"&&(y.name===s||y.number===s)););a.reffedNodesByReferencer.set(e,y);return}const c=a.subroutineRefMap.get(s),f=s===0,d=f?Rb(0):u_(c,a.groupOriginByCopy,null);let h=d;if(!f){const y=c_(ND(c,b=>b.type==="Group"&&!!b.flags)),g=y?ou(a.globalFlags,y):a.globalFlags;RD(g,a.currentFlags)||(h=In({flags:OD(g)}),h.body[0].body.push(d))}i(st(h,t),{traverse:!f})}},LD={Backreference({node:e,parent:t,replaceWith:i},a){if(e.orphan){a.highestOrphanBackref=Math.max(a.highestOrphanBackref,e.ref);return}const s=a.reffedNodesByReferencer.get(e).filter(c=>DD(c,e));if(!s.length)i(st(Sr({negate:!0}),t));else if(s.length>1){const c=In({atomic:!0,body:s.reverse().map(f=>wr({body:[th(f.number)]}))});i(st(c,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 i=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let a=0;a<i;a++){const o=W1();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function s_(e){Xl(e,{"*"({node:t,parent:i}){t.parent=i}})}function RD(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function DD(e,t){let i=t;do{if(i.type==="Regex")return!1;if(i.type==="Alternative")continue;if(i===e)return!1;const a=d_(i.parent);for(const o of a){if(o===i)break;if(o===e||h_(o,e))return!0}}while(i=i.parent);throw new Error("Unexpected path")}function u_(e,t,i,a){const o=Array.isArray(e)?[]:{};for(const[s,c]of Object.entries(e))s==="parent"?o.parent=Array.isArray(i)?a:i:c&&typeof c=="object"?o[s]=u_(c,t,o,i):(s==="type"&&c==="CapturingGroup"&&t.set(o,t.get(e)??e),o[s]=c);return o}function Rb(e){const t=e_(e);return t.isRecursive=!0,t}function ND(e,t){const i=[];for(;e=e.parent;)(!t||t(e))&&i.push(e);return i}function yf(e,t){if(t.has(e))return t.get(e);const i=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,i),i}function c_(e){const t=["dotAll","ignoreCase"],i={enable:{},disable:{}};return e.forEach(({flags:a})=>{t.forEach(o=>{a.enable?.[o]&&(delete i.disable[o],i.enable[o]=!0),a.disable?.[o]&&(i.disable[o]=!0)})}),Object.keys(i.enable).length||delete i.enable,Object.keys(i.disable).length||delete i.disable,i.enable||i.disable?i:null}function OD({dotAll:e,ignoreCase:t}){const i={};return(e||t)&&(i.enable={},e&&(i.enable.dotAll=!0),t&&(i.enable.ignoreCase=!0)),(!e||!t)&&(i.disable={},!e&&(i.disable.dotAll=!0),!t&&(i.disable.ignoreCase=!0)),i}function d_(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function f_(e){const t=e.find(i=>i.kind==="search_start"||zD(i,{negate:!1})||!MD(i));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 i=[];for(const a of t.body){const o=f_(a.body);if(!o)return null;Array.isArray(o)?i.push(...o):i.push(o)}return i}return null}function h_(e,t){const i=d_(e)??[];for(const a of i)if(a===t||h_(a,t))return!0;return!1}function MD({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function ID(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function zD(e,t){const i={negate:null,...t};return e.type==="LookaroundAssertion"&&(i.negate===null||e.negate===i.negate)&&e.body.length===1&&Z1(e.body[0],{type:"Assertion",kind:"search_start"})}function bf(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function bi(e,t){const a=K1(e,{...t,unicodePropertyMap:qh}).body;return a.length>1||a[0].body.length>1?In({body:a}):a[0].body[0]}function vf(e,t){return e.negate=t,e}function Ki(e,t){return e.parent=t,e}function st(e,t){return s_(e),e.parent=t,e}function HD(e,t){const i=a_(t),a=rh(i.target,"ES2024"),o=rh(i.target,"ES2025"),s=i.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let c=null,f=null;if(!o){const v=[e.flags.ignoreCase];Xl(e,UD,{getCurrentModI:()=>v.at(-1),popModI(){v.pop()},pushModI(S){v.push(S)},setHasCasedChar(){v.at(-1)?c=!0:f=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||c)&&!f)};let h=e;const y={accuracy:i.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&c&&f),useFlagMods:o,useFlagV:a,verbose:i.verbose};function g(v){return y.lastNode=h,h=v,yD(PD[v.type],`Unexpected node type "${v.type}"`)(v,y,g)}const b={pattern:e.body.map(g).join("|"),flags:g(e.flags),options:{...e.options}};return a||(delete b.options.force.v,b.options.disable.v=!0,b.options.unicodeSetsPlugin=null),b._captureTransfers=new Map,b._hiddenCaptures=[],y.captureMap.forEach((v,S)=>{v.hidden&&b._hiddenCaptures.push(S),v.transferTo&&to(b._captureTransfers,v.transferTo,[]).push(S)}),b}var UD={"*":{enter({node:e},t){if(Nb(e)){const i=t.getCurrentModI();t.pushModI(e.flags?ou({ignoreCase:i},e.flags).ignoreCase:i)}},exit({node:e},t){Nb(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Yh(St(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},i){t(),p_(e,{firstOnly:!0}).length&&i.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&o_.has(e.value)&&t.setHasCasedChar()}},PD={Alternative({body:e},t,i){return e.map(i).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Ce`\B`:Ce`\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,i){const{body:a,name:o,number:s}=e,c={ignoreCase:t.currentFlags.ignoreCase},f=t.originMap.get(e);return f&&(c.hidden=!0,s>f.number&&(c.transferTo=f.number)),t.captureMap.set(s,c),`(${o?`?<${o}>`:""}${a.map(i).join("|")})`},Character({value:e},t){const i=St(e),a=va(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(a!==i)return a;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Yh(i)){const o=l_(i);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return i},CharacterClass(e,t,i){const{kind:a,negate:o,parent:s}=e;let{body:c}=e;if(a==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");zn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&c.some(Ob)&&(c=[vu(45),...c.filter(h=>!Ob(h))]);const f=()=>`[${o?"^":""}${c.map(i).join(a==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||zn.bugNestedClassIgnoresNegation)&&!o){const y=c.filter(g=>g.type==="CharacterClass"&&g.kind==="union"&&g.negate);if(y.length){const g=In(),b=g.body[0];return g.parent=s,b.parent=g,c=c.filter(v=>!y.includes(v)),e.body=c,c.length?(e.parent=b,b.body.push(e)):g.body.pop(),y.forEach(v=>{const S=wr({body:[v]});v.parent=S,S.parent=g,g.body.push(S)}),i(g)}}t.inCharClass=!0;const h=f();return t.inCharClass=!1,h}const d=c[0];if(a==="union"&&!o&&d&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(zn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&c.length===1&&d.type!=="CharacterClassRange"))return c.map(i).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return f()},CharacterClassRange(e,t){const i=e.min.value,a=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=va(i,o),c=va(a,o),f=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=p_(e);$D(d).forEach(y=>{f.add(Array.isArray(y)?`${va(y[0],o)}-${va(y[1],o)}`:va(y,o))})}return`${s}-${c}${[...f].join("")}`},CharacterSet({kind:e,negate:t,value:i,key:a},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":Ce`[^\n]`;if(e==="digit")return t?Ce`\D`:Ce`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&o_.has(i))throw new Error(`Unicode property "${i}" can't be case-insensitive when other chars have specific case`);return`${t?Ce`\P`:Ce`\p`}{${a?`${a}=`:""}${i}}`}if(e==="word")return t?Ce`\W`:Ce`\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:i,parent:a},o,s){const c=o.currentFlags;i&&(o.currentFlags=ou(c,i));const f=t.map(s).join("|"),d=!o.verbose&&t.length===1&&a.type!=="Quantifier"&&!e&&(!o.useFlagMods||!i)?f:`(?${FD(e,i,o.useFlagMods)}${f})`;return o.currentFlags=c,d},LookaroundAssertion({body:e,kind:t,negate:i},a,o){return`(?${`${t==="lookahead"?"":"<"}${i?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,i){return i(e.body)+qD(e)},Subroutine({isRecursive:e,ref:t},i){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const a=i.recursionLimit;return t===0?`(?R=${a})`:Ce`\g<${t}&R=${a}>`}},BD=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),jD=new Set(["-","\\","]","^","["]),VD=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Db=new Map([[9,Ce`\t`],[10,Ce`\n`],[11,Ce`\v`],[12,Ce`\f`],[13,Ce`\r`],[8232,Ce`\u2028`],[8233,Ce`\u2029`],[65279,Ce`\uFEFF`]]),GD=new RegExp("^\\p{Cased}$","u");function Yh(e){return GD.test(e)}function p_(e,t){const i=!!t?.firstOnly,a=e.min.value,o=e.max.value,s=[];if(a<65&&(o===65535||o>=131071)||a===65536&&o>=131071)return s;for(let c=a;c<=o;c++){const f=St(c);if(!Yh(f))continue;const d=l_(f).filter(h=>{const y=h.codePointAt(0);return y<a||y>o});if(d.length&&(s.push(...d),i))break}return s}function va(e,{escDigit:t,inCharClass:i,useFlagV:a}){if(Db.has(e))return Db.get(e);if(e<32||e>126&&e<160||e>262143||t&&YD(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=i?a?VD:jD:BD,s=St(e);return(o.has(s)?"\\":"")+s}function $D(e){const t=e.map(o=>o.codePointAt(0)).sort((o,s)=>o-s),i=[];let a=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?a??=t[o]:a===null?i.push(t[o]):(i.push([a,t[o]]),a=null);return i}function FD(e,t,i){if(e)return">";let a="";if(t&&i){const{enable:o,disable:s}=t;a=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${a}:`}function qD({kind:e,max:t,min:i}){let a;return!i&&t===1?a="?":!i&&t===1/0?a="*":i===1&&t===1/0?a="+":i===t?a=`{${i}}`:a=`{${i},${t===1/0?"":t}}`,a+{greedy:"",lazy:"?",possessive:"+"}[e]}function Nb({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function YD(e){return e>47&&e<58}function Ob({type:e,value:t}){return e==="Character"&&t===45}var XD=class ah extends RegExp{#t=new Map;#e=null;#i;#n=null;#r=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(t,i,a){const o=!!a?.lazyCompile;if(t instanceof RegExp){if(a)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,i),this.#i=s.source,s instanceof ah&&(this.#t=s.#t,this.#n=s.#n,this.#r=s.#r,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...a};super(o?"":t,i),this.#i=t,this.#t=ZD(s.hiddenCaptures,s.transfers),this.#r=s.strategy,this.rawOptions=a??{}}o||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:o,...s}=this.rawOptions;this.#e=new ah(this.#i,this.flags,s)}const i=this.global||this.sticky,a=this.lastIndex;if(this.#r==="clip_search"&&i&&a){this.lastIndex=0;const o=this.#a(t.slice(a));return o&&(QD(o,a,t,this.hasIndices),this.lastIndex+=a),o}return this.#a(t)}#a(t){this.#e.lastIndex=this.lastIndex;const i=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!i||!this.#t.size)return i;const a=[...i];i.length=1;let o;this.hasIndices&&(o=[...i.indices],i.indices.length=1);const s=[0];for(let c=1;c<a.length;c++){const{hidden:f,transferTo:d}=this.#t.get(c)??{};if(f?s.push(null):(s.push(i.length),i.push(a[c]),this.hasIndices&&i.indices.push(o[c])),d&&a[c]!==void 0){const h=s[d];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(i[h]=a[c],this.hasIndices&&(i.indices[h]=o[c]),i.groups){this.#n||(this.#n=KD(this.source));const y=this.#n.get(d);y&&(i.groups[y]=a[c],this.hasIndices&&(i.indices.groups[y]=o[c]))}}}return i}};function QD(e,t,i,a){if(e.index+=t,e.input=i,a){const o=e.indices;for(let c=0;c<o.length;c++){const f=o[c];f&&(o[c]=[f[0]+t,f[1]+t])}const s=o.groups;s&&Object.keys(s).forEach(c=>{const f=s[c];f&&(s[c]=[f[0]+t,f[1]+t])})}}function ZD(e,t){const i=new Map;for(const a of e)i.set(a,{hidden:!0});for(const[a,o]of t)for(const s of o)to(i,s,{}).transferTo=a;return i}function KD(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,i=new Map;let a=0,o=0,s;for(;s=t.exec(e);){const{0:c,groups:{capture:f,name:d}}=s;c==="["?a++:a?c==="]"&&a--:f&&(o++,d&&i.set(o,d))}return i}function WD(e,t){const i=JD(e,t);return i.options?new XD(i.pattern,i.flags,i.options):new RegExp(i.pattern,i.flags)}function JD(e,t){const i=a_(t),a=K1(e,{flags:i.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline},skipBackrefValidation:i.rules.allowOrphanBackrefs,unicodePropertyMap:qh}),o=kD(a,{accuracy:i.accuracy,asciiWordBoundaries:i.rules.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,bestEffortTarget:i.target}),s=HD(o,i),c=mD(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),f=hD(c.pattern),d=fD(f.pattern,{captureTransfers:c.captureTransfers,hiddenCaptures:c.hiddenCaptures}),h={pattern:d.pattern,flags:`${i.hasIndices?"d":""}${i.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(i.avoidSubclass){if(i.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const y=d.hiddenCaptures.sort((S,w)=>S-w),g=Array.from(d.captureTransfers),b=o._strategy,v=h.pattern.length>=i.lazyCompileLength;(y.length||g.length||b||v)&&(h.options={...y.length&&{hiddenCaptures:y},...g.length&&{transfers:g},...b&&{strategy:b},...v&&{lazyCompile:v}})}return h}const Mb=4294967295;class eN{constructor(t,i={}){this.patterns=t,this.options=i;const{forgiving:a=!1,cache:o,regexConstructor:s}=i;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(c=>{if(typeof c!="string")return c;const f=o?.get(c);if(f){if(f instanceof RegExp)return f;if(a)return null;throw f}try{const d=s(c);return o?.set(c,d),d}catch(d){if(o?.set(c,d),a)return null;throw d}})}regexps;findNextMatchSync(t,i,a){const o=typeof t=="string"?t:t.content,s=[];function c(f,d,h=0){return{index:f,captureIndices:d.indices.map(y=>y==null?{start:Mb,end:Mb,length:0}:{start:y[0]+h,end:y[1]+h,length:y[1]-y[0]})}}for(let f=0;f<this.regexps.length;f++){const d=this.regexps[f];if(d)try{d.lastIndex=i;const h=d.exec(o);if(!h)continue;if(h.index===i)return c(f,h,0);s.push([f,h,0])}catch(h){if(this.options.forgiving)continue;throw h}}if(s.length){const f=Math.min(...s.map(d=>d[1].index));for(const[d,h,y]of s)if(h.index===f)return c(d,h,y)}return null}}function tN(e,t){return WD(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function nN(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=i=>tN(i,{target:t.target}),{createScanner(i){return new eN(i,t)},createString(i){return{content:i}}}}const Ib=new Map;function iN({className:e,children:t}){const[i,a]=te.useState(null),o=e?.match(/language-([^\s]+)/)?.[1]??"text",s=String(t??"").replace(/\n$/,"");return te.useEffect(()=>{let c=!1;return a(null),rN(s,o).then(f=>{c||a(f)}),()=>{c=!0}},[s,o]),i===null?I.jsx("pre",{children:I.jsx("code",{children:t})}):I.jsx("div",{dangerouslySetInnerHTML:{__html:i}})}async function rN(e,t){const i=`${t}\0${e}`,a=Ib.get(i);if(a)return a;const o=aN(e,t).catch(()=>null);return Ib.set(i,o),o}async function aN(e,t){try{return await pb(e,{lang:t,theme:"github-dark-default"})}catch{return pb(e,{lang:"text",theme:"github-dark-default"})}}function Xh({content:e,className:t,variant:i}){const a=["markdown-content",i?`markdown-content-${i}`:null,t].filter(Boolean).join(" ");return I.jsx("div",{className:a,children:I.jsx(fT,{components:{pre({children:o}){if(te.isValidElement(o)){const{className:s,children:c}=o.props;return I.jsx(iN,{className:s,children:c})}return I.jsx("pre",{children:o})}},children:e})})}function lN({open:e,content:t,loading:i,onClose:a}){return I.jsx(Cv,{open:e,title:"brief",ariaLabel:"Reviewer brief",closeLabel:"close brief",bodyClassName:"brief-dialog-body-wrap",onClose:a,children:i&&!t?I.jsx("div",{className:"brief-dialog-empty",children:"Generating brief…"}):I.jsx(Xh,{content:t,className:"brief-dialog-body",variant:"brief"})})}function xu({checked:e,label:t,onChange:i,className:a}){return I.jsxs("label",{className:`checkbox-btn${a?` ${a}`:""}`,children:[I.jsx("input",{type:"checkbox",className:"checkbox-input",checked:e,onChange:o=>i(o.target.checked)}),I.jsx("span",{className:"checkbox-box","aria-hidden":"true",children:e&&I.jsx(Mx,{size:10,strokeWidth:3})}),I.jsx("span",{children:t})]})}function oN({open:e,thread:t,body:i,skipAgentResponse:a,onBodyChange:o,onSkipAgentResponseChange:s,onSubmit:c,onClose:f,onToggleResolved:d,onDeleteMessage:h}){const y=te.useRef(null),g=te.useRef(null),b=t?"conversation":"new conversation",v=t?.resolved?"reopen":"resolve",S=t?"comment":"start thread",w=i.trim().length>0,R=te.useMemo(()=>t?.messages??[],[t]);te.useEffect(()=>{e&&y.current?.focus()},[e,t?.id]),te.useLayoutEffect(()=>{if(!e)return;const k=g.current;k&&(k.scrollTop=k.scrollHeight)},[R.length,e,t?.id,t?.loading]);const C=k=>{k.key==="Enter"&&(k.metaKey||k.ctrlKey)&&(k.preventDefault(),w&&c()),k.key==="Escape"&&(k.preventDefault(),f())};return I.jsx(Cv,{open:e,title:b,ariaLabel:b,closeLabel:"close conversation",bodyClassName:"detached-thread-dialog-body-wrap",onClose:f,children:I.jsxs("div",{className:"detached-thread-dialog-layout",children:[I.jsxs("div",{ref:g,className:"detached-thread-dialog-messages",children:[R.map((k,A)=>I.jsxs("div",{className:`detached-thread-dialog-message detached-thread-dialog-message-${k.role}`,children:[I.jsxs("div",{className:"detached-thread-dialog-message-header",children:[I.jsx("span",{className:"detached-thread-dialog-role",children:k.role==="user"?"you":"agent"}),I.jsx("button",{type:"button",className:"detached-thread-dialog-delete",onClick:()=>h(A),"aria-label":`Delete ${k.role==="user"?"your":"agent"} comment`,title:"delete comment",children:I.jsx(Ev,{size:14})})]}),I.jsx(Xh,{content:k.text,className:"detached-thread-dialog-text",variant:"thread"})]},`${k.role}:${A}:${k.text}`)),t?.loading&&I.jsxs("div",{className:"detached-thread-dialog-message detached-thread-dialog-message-assistant",children:[I.jsx("span",{className:"detached-thread-dialog-role",children:"agent"}),I.jsx("span",{className:"detached-thread-dialog-thinking",children:"thinking…"})]})]}),I.jsxs("div",{className:"detached-thread-dialog-composer",style:{borderTop:R.length===0?"none":void 0},children:[I.jsx("textarea",{ref:y,className:"text-input-area detached-thread-dialog-input",value:i,onChange:k=>o(k.target.value),onKeyDown:C,placeholder:t?"Reply…":"Start a conversation…",rows:3}),I.jsxs("div",{className:"detached-thread-dialog-actions",children:[I.jsx(xu,{checked:a,label:"skip agent reply",onChange:s}),t&&I.jsx("button",{type:"button",className:"btn detached-thread-dialog-secondary",onClick:()=>d(!t.resolved),children:v}),I.jsx("button",{type:"button",className:"btn primary",disabled:!w,onClick:c,children:S})]})]})]})})}const sN={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},uN={display:"contents"};function zb(){return null}const su="diffs-container";(()=>{try{return!1}catch{return!1}})();const cN=/(?=^From [a-f0-9]+ .+$)/m,m_=/(?=^diff --git)/gm,Hb=/(?=^---\s+\S)/gm,dN=/^(---|\+\+\+)\s+([^\t\r\n]+)/,fN=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,hN=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,pN=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Qh="header-prefix",Zh="header-metadata",Kh="header-custom",An={dark:"pierre-dark",light:"pierre-light"},lh="data-theme-css",oh="data-unsafe-css",mN="data-diffs-scrollbar-measure",g_="--diffs-scrollbar-gutter-measured",cn=1,sh=1e5,gN={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},yN=Object.freeze({fromStart:0,fromEnd:0}),Ub={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},bN={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function no(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function vN({hunkIndex:e,lineIndex:t,conflictIndex:i}){return`merge-conflict-action-${e}-${t}-${i}`}function _N(e,t){const i=t.hunks[e.hunkIndex];if(i!=null)return{hunkIndex:e.hunkIndex,lineIndex:SN(i,e.startContentIndex)}}function SN(e,t){let i=e.unifiedLineStart;for(let a=0;a<t;a++){const o=e.hunkContent[a];i+=o.type==="context"?o.lines:o.deletions+o.additions}return i}function EN({fileDiff:e,actions:t,renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o,renderAnnotation:s,renderGutterUtility:c,renderMergeConflictUtility:f,lineAnnotations:d,getHoveredLine:h,getInstance:y}){const g=i?.(e),b=a?.(e),v=o?.(e);return I.jsxs(I.Fragment,{children:[g!=null?I.jsx("div",{slot:Kh,children:g}):I.jsxs(I.Fragment,{children:[b!=null&&I.jsx("div",{slot:Qh,children:b}),v!=null&&I.jsx("div",{slot:Zh,children:v})]}),s!=null&&d?.map((S,w)=>I.jsx("div",{slot:no(S),children:s(S)},w)),t!=null&&f!=null&&y!=null&&t.map(S=>{if(S==null)return;const w=xN(S,e);return I.jsx("div",{slot:w,style:uN,children:f(S,y)},w)}),c!=null&&I.jsx("div",{slot:"gutter-utility-slot",style:sN,children:c(h)})]})}function xN(e,t){const i=_N(e,t);return i!=null?vN({hunkIndex:i.hunkIndex,lineIndex:i.lineIndex,conflictIndex:e.conflictIndex}):void 0}function CN(e){const t=te.useRef(e);return te.useInsertionEffect(()=>{t.current=e}),te.useCallback((...i)=>t.current(...i),[])}function Wh(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}const Cr=new Map,_f=new Map,uh=new Map,ch=new Set;function Pb(e,t){e=Array.isArray(e)?e:[e];for(let i of e){let a;if(typeof i=="string"){if(a=Cr.get(i),a==null)throw new Error(`loadResolvedThemes: ${i} is not resolved, you must resolve it before calling loadResolvedThemes`)}else a=i,i=i.name,Cr.has(i)||Cr.set(i,a);ch.has(i)||(ch.add(i),t.loadThemeSync(a))}}const io=new Map,Sf=new Map,wN=new Map,dh=new Set;function Bb(e,t){e=Array.isArray(e)?e:[e];for(const i of e){if(dh.has(i.name))continue;let a=io.get(i.name);a==null&&(a=i,io.set(i.name,a)),dh.add(a.name),t.loadLanguageSync(a.data)}}function y_(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function kN(e){if(y_())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=Sf.get(e);if(t!=null)return t;try{let i=wN.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(Jf,e)&&(i=Jf[e]),i==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const a=i().then(({default:o})=>{const s={name:e,data:o};return io.has(e)||io.set(e,s),s});return Sf.set(e,a),await a}finally{Sf.delete(e)}}function AN(e){return io.get(e)??kN(e)}async function TN(e){if(y_())throw new Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=_f.get(e);if(t!=null)return t;try{const i=uh.get(e)??j1[e];if(i==null)throw new Error(`resolveTheme: No valid loader for ${e}`);const a=i().then(s=>LN(e,"default"in s?s.default:s));_f.set(e,a);const o=await a;if(o.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${o.name}`);return Cr.set(o.name,o),o}finally{_f.delete(e)}}function LN(e,t){const i=Cr.get(e);return i??(t=gu(t),Cr.set(e,t),t)}function RN(e){return Cr.get(e)??TN(e)}function Cu(e,t){if(uh.has(e)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}uh.set(e,t)}let Fn;async function b_({themes:e,langs:t,preferredHighlighter:i="shiki-js"}){Fn??=$1({themes:[],langs:["text"],engine:i==="shiki-wasm"?G1(x(()=>import("./wasm-CG6Dc4jp.js"),[])):nN()});const a=NN(Fn)?await Fn:Fn;Fn=a;const o=[];for(const c of t){if(c==="text"||c==="ansi")continue;const f=AN(c);"then"in f?o.push(f):Bb(f,a)}const s=[];for(const c of e){const f=RN(c);"then"in f?s.push(f):Pb(f,Fn)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(c=>{Bb(c,a)}),Promise.all(s).then(c=>{Pb(c,a)})]),a}function DN(){if(Fn!=null&&!("then"in Fn))return Fn}function NN(e=Fn){return e!=null&&"then"in e}async function ON(e){await b_(e)}Cu("pierre-dark",async()=>{const{default:e}=await x(async()=>{const{default:t}=await import("./pierre-dark-Dy3oF52j.js");return{default:t}},[]);return{...e,name:"pierre-dark"}});Cu("pierre-dark-soft",async()=>{const{default:e}=await x(async()=>{const{default:t}=await import("./pierre-dark-soft-K7D5SChL.js");return{default:t}},[]);return{...e,name:"pierre-dark-soft"}});Cu("pierre-light",async()=>{const{default:e}=await x(async()=>{const{default:t}=await import("./pierre-light-DhMpYZcV.js");return{default:t}},[]);return{...e,name:"pierre-light"}});Cu("pierre-light-soft",async()=>{const{default:e}=await x(async()=>{const{default:t}=await import("./pierre-light-soft-cPlVRKcQ.js");return{default:t}},[]);return{...e,name:"pierre-light-soft"}});function v_(e=An){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function jb(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}const _a=new Map,Hl={"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",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 Ji(e){if(_a.has(e))return _a.get(e)??"text";if(Hl[e]!=null)return Hl[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(_a.has(t[1]))return _a.get(t[1])??"text";if(Hl[t[1]]!=null)return Hl[t[1]]??"text"}const i=e.match(/\.([^.]+)$/)?.[1]??"";return _a.has(i)?_a.get(i)??"text":Hl[i]??"text"}function Oa(e){return e.replace(/\n$|\r\n$/,"")}function Yn(e){return{type:"text",value:e}}function Le({tagName:e,children:t=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:t}}function uu({name:e,width:t=16,height:i=16,properties:a}){return Le({tagName:"svg",properties:{width:t,height:i,viewBox:"0 0 16 16",...a},children:[Le({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function MN(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 Ns(e){return Le({tagName:"div",properties:{"data-gutter":""},children:e})}function IN(e,t,i,a={}){return Le({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":i,...a},children:t!=null?[Le({tagName:"span",properties:{"data-line-number-content":""},children:[Yn(`${t}`)]})]:void 0})}function On(e,t,i){return Le({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":i,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${i};`:`grid-row: span ${i};min-height:calc(${i} * 1lh);`}})}function zN(e,t,i){const a=typeof i.lineInfo=="function"?i.lineInfo(t):i.lineInfo[t-1];if(a==null){const o=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(o,{node:e,line:t,state:i}),new Error(o)}return e.tagName="div",e.properties["data-line"]=a.lineNumber,e.properties["data-alt-line"]=a.altLineNumber,e.properties["data-line-type"]=a.type,e.properties["data-line-index"]=a.lineIndex,e.children.length===0&&e.children.push(Yn(`
175
+ `)),e}const Os=Symbol("no-token"),Ef=Symbol("multiple-tokens");function __(e){const t=HN(e);if(t!=null)return t;let i=Os;const a=[];let o=[],s;const c=()=>{if(o.length===0||s==null){o=[],s=void 0;return}if(o.length===1){const d=o[0];if(d?.type==="element"){UN(d,s);for(const h of d.children)Ys(h)}else Ys(d);a.push(d),o=[],s=void 0;return}for(const d of o)Ys(d);a.push(Le({tagName:"span",properties:{"data-char":s},children:o})),o=[],s=void 0},f=d=>{if(d!==Os){if(d===Ef){i=Ef;return}if(i===Os){i=d;return}i!==d&&(i=Ef)}};for(const d of e.children){const h=d.type==="element"?__(d):Os;if(f(h),typeof h!="number"){c(),a.push(d);continue}s!=null&&s!==h&&c(),s??=h,o.push(d)}return c(),e.children=a,i}function HN(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function Ys(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)Ys(t)}}function UN(e,t){e.properties["data-char"]=t}function PN(e={}){const{classPrefix:t="__shiki_",classSuffix:i="",classReplacer:a=f=>f}=e,o=new Map;function s(f){return Object.entries(f).map(([d,h])=>`${d}:${h}`).join(";")}function c(f){const d=typeof f=="string"?f:s(f);let h=t+BN(d)+i;return h=a(h),o.has(h)||o.set(h,typeof f=="string"?f:{...f}),h}return{name:"@shikijs/transformers:style-to-class",pre(f){if(!f.properties.style)return;const d=c(f.properties.style);delete f.properties.style,this.addClassToHast(f,d)},tokens(f){for(const d of f)for(const h of d){if(!h.htmlStyle)continue;const y=c(h.htmlStyle);h.htmlStyle={},h.htmlAttrs||={},h.htmlAttrs.class?h.htmlAttrs.class+=` ${y}`:h.htmlAttrs.class=y}},getClassRegistry(){return o},getCSS(){let f="";for(const[d,h]of o.entries())f+=`.${d}{${typeof h=="string"?h:s(h)}}`;return f},clearRegistry(){o.clear()}}}function BN(e,t=0){let i=3735928559^t,a=1103547991^t;for(let o=0,s;o<e.length;o++)s=e.charCodeAt(o),i=Math.imul(i^s,2654435761),a=Math.imul(a^s,1597334677);return i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(a^a>>>13,3266489909),a=Math.imul(a^a>>>16,2246822507),a^=Math.imul(i^i>>>13,3266489909),(4294967296*(2097151&a)+(i>>>0)).toString(36).slice(0,6)}function jN(e=!1,t=!1){const i={lineInfo:[]},a=[{line(o){return delete o.properties.class,o},pre(o){const s=MN(o),c=[];if(s!=null){let f=1;for(const d of s.children)d.type==="element"&&(e&&__(d),c.push(zN(d,f,i)),f++);s.children=c}return o},...e?{tokens(o){for(const s of o){let c=0;for(const f of s){const d=f;d.__lineChar??=c,c+=f.content.length}}},preprocess(o,s){s.mergeWhitespaces="never"},span(o,s,c,f,d){if(d?.offset!=null&&d.content!=null){const h=d.__lineChar;return h!=null&&(o.properties["data-char"]=h),o}return o}}:null}];return t&&a.push(VN,Vb),{state:i,transformers:a,toClass:Vb}}const Vb=PN({classPrefix:"hl-"}),VN={name:"token-style-normalizer",tokens(e){for(const t of e)for(const i of t){if(i.htmlStyle!=null)continue;const a={};i.color!=null&&(a.color=i.color),i.bgColor!=null&&(a["background-color"]=i.bgColor),i.fontStyle!=null&&i.fontStyle!==0&&((i.fontStyle&1)!==0&&(a["font-style"]="italic"),(i.fontStyle&2)!==0&&(a["font-weight"]="bold"),(i.fontStyle&4)!==0&&(a["text-decoration"]="underline")),Object.keys(a).length>0&&(i.htmlStyle=a)}}};function Mn(e){return`--${e==="token"?"diffs-token":"diffs"}-`}function GN({theme:e=An,highlighter:t,prefix:i}){let a="";if(typeof e=="string"){const o=t.getTheme(e);a+=`color:${o.fg};`,a+=`background-color:${o.bg};`,a+=`${Mn("global")}fg:${o.fg};`,a+=`${Mn("global")}bg:${o.bg};`,a+=xf(o,i)}else{let o=t.getTheme(e.dark);a+=`${Mn("global")}dark:${o.fg};`,a+=`${Mn("global")}dark-bg:${o.bg};`,a+=xf(o,"dark"),o=t.getTheme(e.light),a+=`${Mn("global")}light:${o.fg};`,a+=`${Mn("global")}light-bg:${o.bg};`,a+=xf(o,"light")}return a}function xf(e,t){t=t!=null?`${t}-`:"";let i="";const a=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];a!=null&&(i+=`${Mn("global")}${t}addition-color:${a};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(i+=`${Mn("global")}${t}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(i+=`${Mn("global")}${t}modified-color:${s};`),i}function Gb(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")}function Bl(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function Ul(e,t){return Wh(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function fh(e){const t=e.lang??Ji(e.name),i=e.lang??(e.prevName!=null?Ji(e.prevName):"text");return t==="text"&&i==="text"}function Cf(e){return{...gN,...e}}function wa(e,t){const i=$N(e,t);return t?i:e.diffHeaderHeight+i}function $N(e,t){return e.paddingTop??(t?e.spacing:0)}function S_(e){return e.paddingBottom??e.spacing}function FN(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}function Xn({isPartial:e,rangeSize:t,expandedHunks:i,hunkIndex:a,collapsedContextThreshold:o}){const s=Math.max(t,0);if(s===0||e)return{fromStart:0,fromEnd:0,rangeSize:s,collapsedLines:s,renderAll:!1};if(i===!0||s<=o)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const c=i?.get(a),f=Math.min(Math.max(c?.fromStart??0,0),s),d=Math.min(Math.max(c?.fromEnd??0,0),s),h=f+d,y=h>=s;return{fromStart:y?s:f,fromEnd:y?0:d,rangeSize:s,collapsedLines:Math.max(s-h,0),renderAll:y}}function E_({type:e,metrics:t}){return t.hunkSeparatorHeight??FN(e)}function x_({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function qN({type:e,hunkIndex:t,hunkSpecs:i}){switch(e){case"simple":return t>0;case"metadata":return i!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function YN(e){return e!=="simple"&&e!=="metadata"}function jl({type:e,metrics:t,hunkIndex:i,hunkSpecs:a}){if(!qN({type:e,hunkIndex:i,hunkSpecs:a}))return;const o=E_({type:e,metrics:t}),s=x_({type:e,metrics:t}),c=i>0?s:0,f=s;return{height:o,gapBefore:c,gapAfter:f,totalHeight:c+o+f}}function Vl({type:e,metrics:t}){if(!YN(e))return;const i=E_({type:e,metrics:t}),a=x_({type:e,metrics:t});return{height:i,gapBefore:a,gapAfter:0,totalHeight:a+i}}function Ql({diff:e,diffStyle:t,startingLine:i=0,totalLines:a=1/0,expandedHunks:o,collapsedContextThreshold:s=cn,callback:c}){const f=XN({diff:e,diffStyle:t,startingLine:i,expandedHunks:o,collapsedContextThreshold:s}),d={finalHunk:e.hunks.at(-1),viewportStart:i,viewportEnd:i+a,isWindowedHighlight:i>0||a<1/0,splitCount:f.splitCount,unifiedCount:f.unifiedCount,shouldBreak(){if(!d.isWindowedHighlight)return!1;const g=d.unifiedCount>=i+a,b=d.splitCount>=i+a;return t==="unified"?g:(t==="split"||g)&&b},shouldSkip(g,b){if(!d.isWindowedHighlight)return!1;const v=d.unifiedCount+g<i,S=d.splitCount+b<i;return t==="unified"?v:(t==="split"||v)&&S},incrementCounts(g,b){(t==="unified"||t==="both")&&(d.unifiedCount+=g),(t==="split"||t==="both")&&(d.splitCount+=b)},isInWindow(g,b){if(!d.isWindowedHighlight)return!0;const v=d.isInUnifiedWindow(g),S=d.isInSplitWindow(b);return t==="unified"?v:t==="split"?S:v||S},isInUnifiedWindow(g){return!d.isWindowedHighlight||d.unifiedCount>=i-g&&d.unifiedCount<i+a},isInSplitWindow(g){return!d.isWindowedHighlight||d.splitCount>=i-g&&d.splitCount<i+a},emit(g,b=!1){return b||(t==="unified"?d.incrementCounts(1,0):t==="split"?d.incrementCounts(0,1):d.incrementCounts(1,1)),c(g)??!1}};e:for(let g=f.hunkIndex;g<e.hunks.length;g++){let R=function(j,se){return S==null||S.collapsedLines<=0||S.fromStart+S.fromEnd>0?0:t==="unified"?j===b.unifiedLineStart+b.unifiedLineCount-1?S.collapsedLines:0:se===b.splitLineStart+b.splitLineCount-1?S.collapsedLines:0},C=function(){if(v.collapsedLines===0)return 0;const j=v.collapsedLines;return v.collapsedLines=0,j};var h=R,y=C;const b=e.hunks[g];if(b==null)throw new Error("iterateOverDiff: invalid hunk index");if(d.shouldBreak())break;const v=Xn({isPartial:e.isPartial,rangeSize:b.collapsedBefore,expandedHunks:o,hunkIndex:g,collapsedContextThreshold:s}),S=(()=>{if(b!==d.finalHunk||!C_(e))return;const j=e.additionLines.length-(b.additionLineIndex+b.additionCount),se=e.deletionLines.length-(b.deletionLineIndex+b.deletionCount);if(j!==se)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${j}, deletions=${se}) for ${e.name}`);const Z=Math.min(j,se);return Xn({isPartial:e.isPartial,rangeSize:Z,expandedHunks:o,hunkIndex:e.hunks.length,collapsedContextThreshold:s})})(),w=v.fromStart+v.fromEnd;if(d.shouldSkip(w,w))d.incrementCounts(w,w),C();else{let j=b.unifiedLineStart-v.rangeSize,se=b.splitLineStart-v.rangeSize,Z=b.deletionLineIndex-v.rangeSize,W=b.additionLineIndex-v.rangeSize,Q=b.deletionStart-v.rangeSize,ie=b.additionStart-v.rangeSize;const[q,z]=Ms(d,v.fromStart,t);q>0&&d.incrementCounts(q,q);let $=q;for(;$<v.fromStart;){if($>=z){d.incrementCounts(v.fromStart-$,v.fromStart-$);break}if(d.isInWindow(0,0)){if(d.emit({hunkIndex:g,hunk:b,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:Q+$,lineIndex:Z+$,noEOFCR:!1,unifiedLineIndex:j+$,splitLineIndex:se+$},additionLine:{unifiedLineIndex:j+$,splitLineIndex:se+$,lineIndex:W+$,lineNumber:ie+$,noEOFCR:!1}}))break e}else d.incrementCounts(1,1);$++}j=b.unifiedLineStart-v.fromEnd,se=b.splitLineStart-v.fromEnd,Z=b.deletionLineIndex-v.fromEnd,W=b.additionLineIndex-v.fromEnd,Q=b.deletionStart-v.fromEnd,ie=b.additionStart-v.fromEnd;const[le,fe]=Ms(d,v.fromEnd,t);for(le>0&&d.incrementCounts(le,le),$=le;$<v.fromEnd;){if($>=fe){d.incrementCounts(v.fromEnd-$,v.fromEnd-$);break}if(d.isInWindow(0,0)){if(d.emit({hunkIndex:g,hunk:b,collapsedBefore:C(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:Q+$,lineIndex:Z+$,noEOFCR:!1,unifiedLineIndex:j+$,splitLineIndex:se+$},additionLine:{unifiedLineIndex:j+$,splitLineIndex:se+$,lineIndex:W+$,lineNumber:ie+$,noEOFCR:!1}}))break e}else d.incrementCounts(1,1);$++}}let k=b.unifiedLineStart,A=b.splitLineStart,H=b.deletionLineIndex,U=b.additionLineIndex,D=b.deletionStart,B=b.additionStart;const re=b.hunkContent.at(-1);for(const j of b.hunkContent){if(d.shouldBreak())break e;const se=j===re;if(j.type==="context"){if(d.shouldSkip(j.lines,j.lines))d.incrementCounts(j.lines,j.lines),C();else{const[Z,W]=Ms(d,j.lines,t);Z>0&&d.incrementCounts(Z,Z);let Q=Z;for(;Q<j.lines;){if(Q>=W){d.incrementCounts(j.lines-Q,j.lines-Q);break}if(d.isInWindow(0,0)){const ie=se&&Q===j.lines-1,q=k+Q,z=A+Q;if(d.emit({hunkIndex:g,hunk:b,collapsedBefore:C(),collapsedAfter:R(q,z),type:"context",deletionLine:{lineNumber:D+Q,lineIndex:H+Q,noEOFCR:ie&&b.noEOFCRDeletions,unifiedLineIndex:q,splitLineIndex:z},additionLine:{unifiedLineIndex:q,splitLineIndex:z,lineIndex:U+Q,lineNumber:B+Q,noEOFCR:ie&&b.noEOFCRAdditions}}))break e}else d.incrementCounts(1,1);Q++}}k+=j.lines,A+=j.lines,H+=j.lines,U+=j.lines,D+=j.lines,B+=j.lines}else{const Z=Math.max(j.deletions,j.additions),W=j.deletions+j.additions;if(!d.shouldSkip(W,Z)){const Q=KN(d,j,t);for(const[ie,q]of Q)for(let z=ie;z<q;z++){const $=R(k+z,t==="unified"?A+(z<j.deletions?z:z-j.deletions):A+z);if(d.emit(WN({hunkIndex:g,hunk:b,collapsedBefore:C(),collapsedAfter:$,diffStyle:t,index:z,unifiedLineIndex:k,splitLineIndex:A,additionLineIndex:U,deletionLineIndex:H,additionLineNumber:B,deletionLineNumber:D,content:j,isLastContent:se,unifiedCount:W,splitCount:Z}),!0))break e}}C(),d.incrementCounts(W,Z),k+=W,A+=Z,H+=j.deletions,U+=j.additions,D+=j.deletions,B+=j.additions}}if(S!=null){const{collapsedLines:j,fromStart:se,fromEnd:Z}=S,W=se+Z,[Q,ie]=Ms(d,W,t);Q>0&&d.incrementCounts(Q,Q);let q=Q;for(;q<W;){if(d.shouldBreak())break e;if(q>=ie){d.incrementCounts(W-q,W-q);break}if(d.isInWindow(0,0)){const z=q===W-1;if(d.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:z?j:0,type:"context-expanded",deletionLine:{lineNumber:D+q,lineIndex:H+q,noEOFCR:!1,unifiedLineIndex:k+q,splitLineIndex:A+q},additionLine:{unifiedLineIndex:k+q,splitLineIndex:A+q,lineIndex:U+q,lineNumber:B+q,noEOFCR:!1}}))break e}else d.incrementCounts(1,1);q++}}}}function XN({diff:e,diffStyle:t,startingLine:i,expandedHunks:a,collapsedContextThreshold:o}){if(i<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const s=QN({diff:e,expandedHunks:a,collapsedContextThreshold:o});let c=0,f=e.hunks.length-1,d=e.hunks.length;for(;c<=f;){const y=c+f>>1,g=s[y+1];if(g==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?g.unifiedCount:g.splitCount)>i?(d=y,f=y-1):c=y+1}if(d>=e.hunks.length){const y=s[e.hunks.length];if(y==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:y.splitCount,unifiedCount:y.unifiedCount}}const h=s[d];if(h==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:d,splitCount:h.splitCount,unifiedCount:h.unifiedCount}}function QN({diff:e,expandedHunks:t,collapsedContextThreshold:i}){let a=0,o=0;const s=e.hunks.length-1,c=[{splitCount:0,unifiedCount:0}];for(let f=0;f<e.hunks.length;f++){const d=e.hunks[f];if(d==null)throw new Error("iterateOverDiff: invalid hunk summary index");const h=Xn({isPartial:e.isPartial,rangeSize:d.collapsedBefore,expandedHunks:t,hunkIndex:f,collapsedContextThreshold:i}),y=h.fromStart+h.fromEnd;if(a+=y+d.splitLineCount,o+=y+d.unifiedLineCount,f===s&&C_(e)){const g=ZN(e,d),b=Xn({isPartial:e.isPartial,rangeSize:g,expandedHunks:t,hunkIndex:e.hunks.length,collapsedContextThreshold:i}),v=b.fromStart+b.fromEnd;a+=v,o+=v}c.push({splitCount:a,unifiedCount:o})}return c}function Ms(e,t,i){if(!e.isWindowedHighlight||t<=0)return[0,t];const a=[];function o(f){const d=Math.max(0,e.viewportStart-f),h=Math.min(t,e.viewportEnd-f);h>d&&a.push([d,h])}if(i!=="split"&&o(e.unifiedCount),i!=="unified"&&o(e.splitCount),a.length===0)return[0,0];let s=a[0][0],c=a[0][1];for(let f=1;f<a.length;f++){const d=a[f];s=Math.min(s,d[0]),c=Math.max(c,d[1])}return[s,c]}function ZN(e,t){const i=e.additionLines.length-(t.additionLineIndex+t.additionCount),a=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(i!==a)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${i}, deletions=${a}) for ${e.name}`);return Math.min(i,a)}function C_(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function KN(e,t,i){if(!e.isWindowedHighlight)return[[0,i==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const a=i!=="split",o=i!=="unified",s=i==="unified"?"unified":"split",c=[];function f(g,b){if(g+b<=e.viewportStart||g>=e.viewportEnd)return;const v=Math.max(0,e.viewportStart-g),S=Math.min(b,e.viewportEnd-g);return S>v?[v,S]:void 0}function d(g,b){return s==="split"?g:b==="additions"?[g[0]+t.deletions,g[1]+t.deletions]:g}function h(g,b){if(g==null)return;const[v,S]=d(g,b);S>v&&c.push([v,S])}if(a&&(h(f(e.unifiedCount,t.deletions),"deletions"),h(f(e.unifiedCount+t.deletions,t.additions),"additions")),o&&(h(f(e.splitCount,t.deletions),"deletions"),h(f(e.splitCount,t.additions),"additions")),c.length===0)return c;c.sort((g,b)=>g[0]-b[0]);const y=[c[0]];for(const[g,b]of c.slice(1)){const v=y[y.length-1];g<=v[1]?v[1]=Math.max(v[1],b):y.push([g,b])}return y}function WN({hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,diffStyle:o,index:s,unifiedLineIndex:c,splitLineIndex:f,additionLineIndex:d,deletionLineIndex:h,additionLineNumber:y,deletionLineNumber:g,content:b,isLastContent:v,unifiedCount:S,splitCount:w}){const R=s<b.deletions?c+s:void 0,C=o==="unified"?s>=b.deletions?c+s:void 0:s<b.additions?c+b.deletions+s:void 0,k=o==="unified"?f+(s<b.deletions?s:s-b.deletions):f+s,A=s<b.deletions?h+s:void 0,H=s<b.deletions?g+s:void 0,U=o==="unified"?s>=b.deletions?d+(s-b.deletions):void 0:s<b.additions?d+s:void 0,D=o==="unified"?s>=b.deletions?y+(s-b.deletions):void 0:s<b.additions?y+s:void 0,B=o==="unified"?v&&s===b.deletions-1&&t.noEOFCRDeletions:v&&s===w-1&&t.noEOFCRDeletions,re=o==="unified"?v&&s===S-1&&t.noEOFCRAdditions:v&&s===w-1&&t.noEOFCRAdditions,j=A!=null&&H!=null&&R!=null?{lineNumber:H,lineIndex:A,noEOFCR:B,unifiedLineIndex:R,splitLineIndex:k}:void 0,se=U!=null&&D!=null&&C!=null?{unifiedLineIndex:C,splitLineIndex:k,lineIndex:U,lineNumber:D,noEOFCR:re}:void 0;if(j==null&&se!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:void 0,additionLine:se};if(j!=null&&se==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:j,additionLine:void 0};if(j==null||se==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:j,additionLine:se}}class Jh{diff(t,i,a={}){let o;typeof a=="function"?(o=a,a={}):"callback"in a&&(o=a.callback);const s=this.castInput(t,a),c=this.castInput(i,a),f=this.removeEmpty(this.tokenize(s,a)),d=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(f,d,a,o)}diffWithOptionsObj(t,i,a,o){var s;const c=k=>{if(k=this.postProcess(k,a),o){setTimeout(function(){o(k)},0);return}else return k},f=i.length,d=t.length;let h=1,y=f+d;a.maxEditLength!=null&&(y=Math.min(y,a.maxEditLength));const g=(s=a.timeout)!==null&&s!==void 0?s:1/0,b=Date.now()+g,v=[{oldPos:-1,lastComponent:void 0}];let S=this.extractCommon(v[0],i,t,0,a);if(v[0].oldPos+1>=d&&S+1>=f)return c(this.buildValues(v[0].lastComponent,i,t));let w=-1/0,R=1/0;const C=()=>{for(let k=Math.max(w,-h);k<=Math.min(R,h);k+=2){let A;const H=v[k-1],U=v[k+1];H&&(v[k-1]=void 0);let D=!1;if(U){const re=U.oldPos-k;D=U&&0<=re&&re<f}const B=H&&H.oldPos+1<d;if(!D&&!B){v[k]=void 0;continue}if(!B||D&&H.oldPos<U.oldPos?A=this.addToPath(U,!0,!1,0,a):A=this.addToPath(H,!1,!0,1,a),S=this.extractCommon(A,i,t,k,a),A.oldPos+1>=d&&S+1>=f)return c(this.buildValues(A.lastComponent,i,t))||!0;v[k]=A,A.oldPos+1>=d&&(R=Math.min(R,k-1)),S+1>=f&&(w=Math.max(w,k+1))}h++};if(o)(function k(){setTimeout(function(){if(h>y||Date.now()>b)return o(void 0);C()||k()},0)})();else for(;h<=y&&Date.now()<=b;){const k=C();if(k)return k}}addToPath(t,i,a,o,s){const c=t.lastComponent;return c&&!s.oneChangePerToken&&c.added===i&&c.removed===a?{oldPos:t.oldPos+o,lastComponent:{count:c.count+1,added:i,removed:a,previousComponent:c.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:i,removed:a,previousComponent:c}}}extractCommon(t,i,a,o,s){const c=i.length,f=a.length;let d=t.oldPos,h=d-o,y=0;for(;h+1<c&&d+1<f&&this.equals(a[d+1],i[h+1],s);)h++,d++,y++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return y&&!s.oneChangePerToken&&(t.lastComponent={count:y,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,h}equals(t,i,a){return a.comparator?a.comparator(t,i):t===i||!!a.ignoreCase&&t.toLowerCase()===i.toLowerCase()}removeEmpty(t){const i=[];for(let a=0;a<t.length;a++)t[a]&&i.push(t[a]);return i}castInput(t,i){return t}tokenize(t,i){return Array.from(t)}join(t){return t.join("")}postProcess(t,i){return t}get useLongestToken(){return!1}buildValues(t,i,a){const o=[];let s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=s;o.reverse();const c=o.length;let f=0,d=0,h=0;for(;f<c;f++){const y=o[f];if(y.removed)y.value=this.join(a.slice(h,h+y.count)),h+=y.count;else{if(!y.added&&this.useLongestToken){let g=i.slice(d,d+y.count);g=g.map(function(b,v){const S=a[h+v];return S.length>b.length?S:b}),y.value=this.join(g)}else y.value=this.join(i.slice(d,d+y.count));d+=y.count,y.added||(h+=y.count)}}return o}}class JN extends Jh{}const eO=new JN;function tO(e,t,i){return eO.diff(e,t,i)}const $b="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 nO extends Jh{tokenize(t){const i=new RegExp(`(\\r?\\n)|[${$b}]+|[^\\S\\n\\r]+|[^${$b}]`,"ug");return t.match(i)||[]}}const iO=new nO;function rO(e,t,i){return iO.diff(e,t,i)}class aO extends Jh{constructor(){super(...arguments),this.tokenize=oO}equals(t,i,a){return a.ignoreWhitespace?((!a.newlineIsToken||!t.includes(`
176
+ `))&&(t=t.trim()),(!a.newlineIsToken||!i.includes(`
177
+ `))&&(i=i.trim())):a.ignoreNewlineAtEof&&!a.newlineIsToken&&(t.endsWith(`
178
+ `)&&(t=t.slice(0,-1)),i.endsWith(`
179
+ `)&&(i=i.slice(0,-1))),super.equals(t,i,a)}}const lO=new aO;function Fb(e,t,i){return lO.diff(e,t,i)}function oO(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
180
+ `));const i=[],a=e.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(let o=0;o<a.length;o++){const s=a[o];o%2&&!t.newlineIsToken?i[i.length-1]+=s:i.push(s)}return i}const sO={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function qb(e,t,i,a,o,s,c){let f;c?typeof c=="function"?f={callback:c}:f=c:f={},typeof f.context>"u"&&(f.context=4);const d=f.context;if(f.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(f.callback){const{callback:y}=f;Fb(i,a,Object.assign(Object.assign({},f),{callback:g=>{const b=h(g);y(b)}}))}else return h(Fb(i,a,f));function h(y){if(!y)return;y.push({value:"",lines:[]});function g(k){return k.map(function(A){return" "+A})}const b=[];let v=0,S=0,w=[],R=1,C=1;for(let k=0;k<y.length;k++){const A=y[k],H=A.lines||cO(A.value);if(A.lines=H,A.added||A.removed){if(!v){const U=y[k-1];v=R,S=C,U&&(w=d>0?g(U.lines.slice(-d)):[],v-=w.length,S-=w.length)}for(const U of H)w.push((A.added?"+":"-")+U);A.added?C+=H.length:R+=H.length}else{if(v)if(H.length<=d*2&&k<y.length-2)for(const U of g(H))w.push(U);else{const U=Math.min(H.length,d);for(const B of g(H.slice(0,U)))w.push(B);const D={oldStart:v,oldLines:R-v+U,newStart:S,newLines:C-S+U,lines:w};b.push(D),v=0,S=0,w=[]}R+=H.length,C+=H.length}}for(const k of b)for(let A=0;A<k.lines.length;A++)k.lines[A].endsWith(`
181
+ `)?k.lines[A]=k.lines[A].slice(0,-1):(k.lines.splice(A+1,0,"\"),A++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:s,hunks:b}}}function hh(e,t){if(t||(t=sO),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)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(a=>hh(a,t)).join(`
182
+ `)}const i=[];t.includeIndex&&e.oldFileName==e.newFileName&&i.push("Index: "+e.oldFileName),t.includeUnderline&&i.push("==================================================================="),t.includeFileHeaders&&(i.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),i.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let a=0;a<e.hunks.length;a++){const o=e.hunks[a];o.oldLines===0&&(o.oldStart-=1),o.newLines===0&&(o.newStart-=1),i.push("@@ -"+o.oldStart+","+o.oldLines+" +"+o.newStart+","+o.newLines+" @@");for(const s of o.lines)i.push(s)}return i.join(`
183
+ `)+`
184
+ `}function uO(e,t,i,a,o,s,c){if(typeof c=="function"&&(c={callback:c}),c?.callback){const{callback:f}=c;qb(e,t,i,a,o,s,Object.assign(Object.assign({},c),{callback:d=>{f(d?hh(d,c.headerOptions):void 0)}}))}else{const f=qb(e,t,i,a,o,s,c);return f?hh(f,c?.headerOptions):void 0}}function cO(e){const t=e.endsWith(`
185
+ `),i=e.split(`
186
+ `).map(a=>a+`
187
+ `);return t?i.pop():i.push(i.pop().slice(0,-1)),i}function Yb({line:e,spanStart:t,spanLength:i}){return{start:{line:e,character:t},end:{line:e,character:t+i},properties:{"data-diff-span":""},alwaysWrap:!0}}function Is({item:e,arr:t,enableJoin:i,isNeutral:a=!1,isLastItem:o=!1}){const s=t[t.length-1];if(s==null||o||!i){t.push([a?0:1,e.value]);return}const c=s[0]===0;if(a===c||a&&e.value.length===1&&!c){s[1]+=e.value;return}t.push([a?0:1,e.value])}const dO={forcePlainText:!1};function fO(e,t,i,{forcePlainText:a,startingLine:o,totalLines:s,expandedHunks:c,collapsedContextThreshold:f=cn}=dO){a?(o??=0,s??=1/0):(o=0,s=1/0);const d=o>0||s<1/0,h=typeof i.theme=="string"?t.getTheme(i.theme).type:void 0,y=GN({theme:i.theme,highlighter:t}),g=a&&!d&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,b={deletionLines:[],additionLines:[]},{maxLineDiffLength:v}=i,S=!a&&!e.isPartial,w=a?c:void 0,R=new Map;function C(A){const H=S?0:A,U=R.get(H)??pO();return R.set(H,U),U}function k(A,H,U,D){if(d){let B=U.at(-1);(B==null||B.targetIndex+B.count!==H)&&(B={targetIndex:H,originalOffset:D.length,count:0},U.push(B)),B.count++}D.push(A)}Ql({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:d?w:!0,collapsedContextThreshold:f,callback:({hunkIndex:A,additionLine:H,deletionLine:U,type:D})=>{const B=C(A),re=H!=null?H.splitLineIndex:U.splitLineIndex;D==="change"&&H!=null&&U!=null&&hO({additionLine:e.additionLines[H.lineIndex],deletionLine:e.deletionLines[U.lineIndex],deletionLineIndex:B.deletionContent.length,additionLineIndex:B.additionContent.length,deletionDecorations:B.deletionDecorations,additionDecorations:B.additionDecorations,lineDiffType:g,maxLineDiffLength:v}),U!=null&&(k(e.deletionLines[U.lineIndex],U.lineIndex,B.deletionSegments,B.deletionContent),B.deletionInfo.push({type:D==="change"?"change-deletion":D,lineNumber:U.lineNumber,altLineNumber:D==="change"?void 0:H.lineNumber??void 0,lineIndex:`${U.unifiedLineIndex},${re}`})),H!=null&&(k(e.additionLines[H.lineIndex],H.lineIndex,B.additionSegments,B.additionContent),B.additionInfo.push({type:D==="change"?"change-addition":D,lineNumber:H.lineNumber,altLineNumber:D==="change"?void 0:U.lineNumber??void 0,lineIndex:`${H.unifiedLineIndex},${re}`}))}});for(const A of R.values()){if(A.deletionContent.length===0&&A.additionContent.length===0)continue;const H={name:e.prevName??e.name,contents:A.deletionContent.value},U={name:e.name,contents:A.additionContent.value},{deletionLines:D,additionLines:B}=mO({deletionFile:H,deletionInfo:A.deletionInfo,deletionDecorations:A.deletionDecorations,additionFile:U,additionInfo:A.additionInfo,additionDecorations:A.additionDecorations,highlighter:t,options:i,languageOverride:a?"text":e.lang});if(S){b.deletionLines=D,b.additionLines=B;continue}if(A.deletionSegments.length>0)for(const re of A.deletionSegments)for(let j=0;j<re.count;j++)b.deletionLines[re.targetIndex+j]=D[re.originalOffset+j];else b.deletionLines.push(...D);if(A.additionSegments.length>0)for(const re of A.additionSegments)for(let j=0;j<re.count;j++)b.additionLines[re.targetIndex+j]=B[re.originalOffset+j];else b.additionLines.push(...B)}return{code:b,themeStyles:y,baseThemeType:h}}function hO({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:a,deletionDecorations:o,additionDecorations:s,lineDiffType:c,maxLineDiffLength:f}){if(e==null||t==null||c==="none"||(e=Oa(e),t=Oa(t),e.length>f||t.length>f))return;const d=c==="char"?tO(e,t):rO(e,t),h=[],y=[],g=c==="word-alt",b=d.at(-1);for(const S of d){const w=S===b;!S.added&&!S.removed?(Is({item:S,arr:h,enableJoin:g,isNeutral:!0,isLastItem:w}),Is({item:S,arr:y,enableJoin:g,isNeutral:!0,isLastItem:w})):S.removed?Is({item:S,arr:h,enableJoin:g,isLastItem:w}):Is({item:S,arr:y,enableJoin:g,isLastItem:w})}let v=0;for(const S of h)S[0]===1&&o.push(Yb({line:i,spanStart:v,spanLength:S[1].length})),v+=S[1].length;v=0;for(const S of y)S[0]===1&&s.push(Yb({line:a,spanStart:v,spanLength:S[1].length})),v+=S[1].length}function pO(){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 mO({deletionFile:e,additionFile:t,deletionInfo:i,additionInfo:a,highlighter:o,deletionDecorations:s,additionDecorations:c,languageOverride:f,options:{theme:d=An,...h}}){const y=f??Ji(e.name),g=f??Ji(t.name),{state:b,transformers:v}=jN(h.useTokenTransformer),S=typeof d=="string"?{...h,lang:"text",theme:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:Mn("token")}:{...h,lang:"text",themes:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:Mn("token")};return{deletionLines:e.contents===""?[]:(S.lang=y,b.lineInfo=i,S.decorations=s,Gb(o.codeToHast(Oa(e.contents),S))),additionLines:t.contents===""?[]:(S.lang=g,S.decorations=c,b.lineInfo=a,Gb(o.codeToHast(Oa(t.contents),S)))}}const gO=te.createContext(void 0);function ph(e,t,i){if(e===t||e==null||t==null)return e===t;const a=new Set(i),o=Object.keys(e),s=new Set(Object.keys(t));for(const c of o)if(s.delete(c),!a.has(c)&&(!(c in t)||e[c]!==t[c]))return!1;for(const c of Array.from(s))if(!a.has(c))return!1;return!0}function w_(e,t){const i=e?.theme??An,a=t?.theme??An,o=Xb(e),s=Xb(t);return Wh(i,a)&&ph(e,t,["theme","parseDiffOptions"])&&ph(o,s)}function Xb(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Qb(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Zb(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}function yO(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function bO(){return Le({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[uu({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var vO=class{hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;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(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:i=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),i?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.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const i=!(e===this.selectedRange||Qb(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),i&&t?.notify!==!1&&this.notifySelectionCommitted())}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:i,onLineNumberClick:a,onTokenClick:o,onMergeConflictActionClick:s}=this.options;t==null&&i==null&&a==null&&s==null&&o==null||this.options.onGutterUtilityClick!=null&&Hs(e.composedPath())||(vi(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:i,onLineLeave:a,onTokenEnter:o,onTokenLeave:s,enableGutterUtility:c=!1}=this.options;t==="disabled"&&!c&&i==null&&a==null&&o==null&&s==null||(vi(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(vi(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){vi(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:i}=this.options,a=t.composedPath();vi(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:a});const o=this.resolvePointerTarget(a);vi(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:c,onLineEnter:f,onLineLeave:d,onTokenClick:h,onTokenEnter:y,onTokenLeave:g,onHunkExpand:b,onMergeConflictActionClick:v}=this.options;switch(e){case"move":{const S=wf(o)&&this.hoveredLine?.lineElement===o.lineElement;Xs(o)&&this.hoveredToken?.tokenElement===o.tokenElement||(this.hoveredToken!=null&&(g?.(this.hoveredToken,t),this.clearHoveredToken()),Xs(o)&&(this.setHoveredToken(this.toTokenEventBaseProps(o)),y?.(this.hoveredToken,t))),S||(this.hoveredLine!=null&&(d?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),wf(o)?(this.setHoveredLine(this.toEventBaseProps(o)),this.placeUtility(),f?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(o==null)break;if(EO(o)&&v!=null){v(o);break}if(SO(o)&&b!=null){b(o.hunkIndex,o.all||t.shiftKey?"both":o.direction,o.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!wf(o))break;Xs(o)&&h!=null&&h(this.toTokenEventBaseProps(o),t);const S=this.toEventBaseProps(o);c!=null&&o.numberColumn?c({...S,event:t}):s?.({...S,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:i="disabled",onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:f,onTokenEnter:d,onTokenLeave:h,onHunkExpand:y,onMergeConflictActionClick:g,enableGutterUtility:b=!1,enableLineSelection:v=!1,onGutterUtilityClick:S}=this.options,w=S!=null,R=i!=="disabled"||a!=null||o!=null||s!=null||c!=null||f!=null||d!=null||h!=null||y!=null||g!=null||b||v||w;R&&!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,vi(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const A=[];return(t==="both"||t==="click")&&(a!=null&&A.push("onLineClick"),o!=null&&A.push("onLineNumberClick"),y!=null&&A.push("expandable hunk separators"),g!=null&&A.push("merge conflict actions")),A})()),vi(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),vi(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!R&&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 C=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",k=this.pointerSession.mode==="gutterSelecting";(!v&&C||!w&&k)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:i=!1}=this.options,a=e!=null,o=t!=null||i;a&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!a&&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();Hs(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 i=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(i==null)return;const{pre:a}=this;if(a==null)return;e.preventDefault();const{lineNumber:o,eventSide:s,lineIndex:c}=i;if(e.shiftKey&&this.selectedRange!=null){const f=this.getIndexesFromSelection(this.selectedRange,a.getAttribute("data-diff-type")==="split");if(f==null)return;const d=f.start<=f.end?c>=f.start:c<=f.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 f={lineNumber:o,side:s};this.selectionAnchor=f,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:f,pending:f},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{enableLineSelection:t=!1,onGutterUtilityClick:i}=this.options;if(i==null)return;const a=this.currentSelectionEnds(),o=a?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),s=a?.top??o;o==null||s==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:s,current:o},t&&(this.selectionAnchor={lineNumber:s.lineNumber,side:s.side},this.updateSelection(o.lineNumber,o.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(i==null)return;this.pointerSession.current=i,t===!0&&this.updateSelection(i.lineNumber,i.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(i==null||this.selectionAnchor==null)return;this.updateSelection(i.lineNumber,i.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(i==null||this.selectionAnchor==null)return;const a={lineNumber:i.lineNumber,side:i.eventSide};if(yO(this.pointerSession.pending,a))return;this.updateSelection(i.lineNumber,i.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:i}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const a=this.resolveSelectionPoint(e,{source:"coordinates-first"});a!=null&&(this.pointerSession.current=a,t&&this.updateSelection(a.lineNumber,a.side)),i?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),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.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.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=Da(bO());const i=t.firstElementChild;if(!(i instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");i.remove(),this.gutterUtilityButton=i}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Gl(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},i={lineNumber:e.end,side:e.endSide??e.side},a=this.selectionPointRowIndex(t),o=this.selectionPointRowIndex(i);if(!(a==null||o==null))return a>o?{top:i,bottom:t}:{top:t,bottom:i}}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 i=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,a=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${i}"]`);for(const o of a){if(!(o instanceof HTMLElement))continue;const s=this.resolvePointerTarget(zs(o));if(Gl(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 i=this.resolvePointerTarget(e);if(Gl(i)&&!(t&&!i.numberColumn)&&i.splitLineIndex!=null)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:this.mode==="diff"?i.side:void 0}}resolveSelectionInfo(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionInfoFromPath(i,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Gl(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionPointFromPath(i):void 0}resolveSelectionPath(e,t){const i=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),i);case"coordinates-first":{const a=this.pathFromCoordinates(e,i);return a!==void 0?a??void 0:this.pathFromEventPath(e.composedPath(),i)}}}pathFromCoordinates(e,t){const i=this.hitTest(e);if(i!==void 0)return i===null?null:this.pathFromElement(i,t)??null}pathFromEventPath(e,t){if(!(t&&Hs(e))){for(const i of e)if(i instanceof Element)return this.pathFromElement(i,t)}}pathFromElement(e,t){const i=zs(e);if(t&&Hs(i))return;const a=CO(e);return a!=null?zs(a):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=kO(wO(e));if(t==null)return;const i=this.targetForSelectionPoint(t);return i!=null?zs(i.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),i=Jb(t)?t:Jb(document)?document:void 0;if(i!=null)return i.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:i}=this.options;return i!=null?i(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,i=!0){const a=this.getCurrentSelectionRange();let o;if(e==null)o=null;else{const s=this.selectionAnchor?.side??t,c=this.selectionAnchor?.lineNumber??e;o=this.buildSelectionRange(c,e,s,t)}Qb(a??void 0,o??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=o:(this.selectedRange=o,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),i&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const i=this.getLineIndex(e.start,e.side),a=this.getLineIndex(e.end,e.endSide??e.side);return i!=null&&a!=null?{start:t?i[1]:i[0],end:t?a[1]:a[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const f of e)f.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const i=this.pre.getAttribute("data-diff-type")==="split",a=this.getIndexesFromSelection(this.selectedRange,i);if(a==null)throw console.error({rowRange:a,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const o=a.start===a.end,s=Math.min(a.start,a.end),c=Math.max(a.start,a.end);for(const f of t){const[d,h]=f.children,y=h.children.length;if(y!==d.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let g=0;g<y;g++){const b=h.children[g],v=d.children[g];if(!(b instanceof HTMLElement)||!(v instanceof HTMLElement))continue;const S=this.parseLineIndex(b,i);if((S??0)>c)break;if(S==null||S<s)continue;let w=o?"single":S===s?"first":S===c?"last":"";b.setAttribute("data-selected-line",w),v.setAttribute("data-selected-line",w),v.nextSibling instanceof HTMLElement&&b.nextSibling instanceof HTMLElement&&(b.nextSibling.hasAttribute("data-line-annotation")||b.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(o?(w="last",b.setAttribute("data-selected-line","first")):S===s?w="":S===c&&b.setAttribute("data-selected-line",""),b.nextSibling.setAttribute("data-selected-line",w),v.nextSibling.setAttribute("data-selected-line",w))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}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:i,side:a,tokenElement:o,tokenText:s}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,tokenElement:o,tokenText:s}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,side:a,tokenElement:o,tokenText:s}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,i,a){return{start:e,end:t,...i!=null?{side:i}:{},...i!==a&&a!=null?{endSide:a}:{}}}resolvePointerTarget(e){let t=!1,i,a,o,s,c,f,d,h,y,g;for(const v of e){if(!(v instanceof HTMLElement))continue;if(g==null&&v.hasAttribute("data-merge-conflict-action")){const C=v.getAttribute("data-merge-conflict-action")??void 0,k=v.getAttribute("data-merge-conflict-conflict-index")??void 0,A=k!=null?Number.parseInt(k,10):NaN;xO(C)&&Number.isFinite(A)&&(g={kind:"merge-conflict-action",resolution:C,conflictIndex:A})}if(f==null&&v.hasAttribute("data-char")){f=v;const C=v.getAttribute("data-char");if(C!=null){const k=Number.parseInt(C,10);if(!Number.isNaN(k)){const A=v.textContent??"",H=k+A.length;(A.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(d={tokenElement:f,lineCharStart:k,lineCharEnd:H,tokenText:A});continue}}}const S=c==null?v.getAttribute("data-column-number")??void 0:void 0;if(S!=null){c=v,y=Number.parseInt(S,10),t=!0,i=tv(v),s=v.getAttribute("data-line-index")??void 0;continue}const w=o==null?v.getAttribute("data-line")??void 0:void 0;if(w!=null){o=v,y=Number.parseInt(w,10),i=tv(v),s=v.getAttribute("data-line-index")??void 0;continue}if(h==null&&(v.hasAttribute("data-expand-button")||v.hasAttribute("data-unmodified-lines"))){h={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 R=h!=null?v.getAttribute("data-expand-index")??void 0:void 0;if(h!=null&&R!=null){const C=Number.parseInt(R,10);Number.isNaN(C)||(h.hunkIndex=C);continue}if(a==null&&v.hasAttribute("data-code")){a=v;break}}if(g!=null)return g;if(h?.hunkIndex!=null)return{type:"line-info",hunkIndex:h.hunkIndex,direction:h.direction,all:h.all};if(o??=s!=null?Wb(a,`[data-line][data-line-index="${s}"]`):void 0,c??=s!=null?Wb(a,`[data-column-number][data-line-index="${s}"]`):void 0,a==null||o==null||c==null||i==null||y==null||Number.isNaN(y))return;const b=this.parseLineIndex(o,this.isSplitDiff());return d!=null?this.mode==="file"?{kind:"token",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:b,...d}:{kind:"token",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:ev(i,a),splitLineIndex:b,...d}:this.mode==="file"?{kind:"line",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:b}:{kind:"line",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:ev(i,a),splitLineIndex:b}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const i=(e.getAttribute("data-line-index")??"").split(",").map(a=>Number.parseInt(a,10)).filter(a=>!Number.isNaN(a));if(t&&i.length===2)return i[1];if(!t)return i[0]}};function Kb({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:i,onGutterUtilityClick:a,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,onTokenClick:d,onTokenEnter:h,onTokenLeave:y,renderGutterUtility:g,__debugPointerEvents:b,enableLineSelection:v,controlledSelection:S,onLineSelected:w,onLineSelectionStart:R,onLineSelectionChange:C,onLineSelectionEnd:k},A,H,U){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:_O({enableGutterUtility:t,renderGutterUtility:g,onGutterUtilityClick:a}),usesCustomGutterUtility:g!=null,lineHoverHighlight:i,onGutterUtilityClick:a,onHunkExpand:A,onMergeConflictActionClick:U,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,onTokenClick:d,onTokenEnter:h,onTokenLeave:y,__debugPointerEvents:b,enableLineSelection:v,controlledSelection:S,onLineSelected:w,onLineSelectionStart:R,onLineSelectionChange:C,onLineSelectionEnd:k,getLineIndex:H}}function _O({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:i}){if(i!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Gl(e){return e!=null&&"kind"in e&&e.kind==="line"}function Xs(e){return e!=null&&"kind"in e&&e.kind==="token"}function wf(e){return Gl(e)||Xs(e)}function SO(e){return"type"in e&&e.type==="line-info"}function EO(e){return"kind"in e&&e.kind==="merge-conflict-action"}function xO(e){return e==="current"||e==="incoming"||e==="both"}function Wb(e,t){const i=e?.querySelector(t);return i instanceof HTMLElement?i:void 0}function zs(e){const t=[];let i=e;for(;i!=null;)t.push(i),i=i.parentNode;return t}function CO(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const i=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(i instanceof HTMLElement))return;const a=i.previousElementSibling;return a instanceof HTMLElement&&(a.hasAttribute("data-line")||a.hasAttribute("data-column-number"))?a:void 0}function wO(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const i=e.getAttribute("name")??void 0;return i!=null&&i.startsWith("annotation-")?i:void 0}}function kO(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const i=Number.parseInt(t[2],10);if(Number.isFinite(i))return{lineNumber:i,side:t[1]}}function Jb(e){return e!=null&&typeof e.elementFromPoint=="function"}function ev(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function tv(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 Hs(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}function vi(e="none",t,...i){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...i)}var AO=class _i{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=_i.resizeObserver??new ResizeObserver(_i.handleSharedResizeEntries);return _i.resizeObserver=t,t}static handleSharedResizeEntries(t){const i=new Map;for(const a of t){const o=_i.managersByElement.get(a.target);if(o==null)continue;const s=i.get(o);s==null?i.set(o,[a]):s.push(a)}for(const[a,o]of i)a.handleResizeEntries(o)}observedNodes=new Map;setup(t,i){const a=new Set;let o=0;const s=new Map(this.observedNodes);this.observedNodes.clear();for(const c of t.children){if(o===2)break;const f=(()=>{if(c instanceof HTMLElement&&c.tagName==="CODE")return c})();if(f==null)continue;o++;let d=s.get(f);if(d!=null&&d.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let h=f.firstElementChild;h instanceof HTMLElement||(h=null),d!=null?(this.observedNodes.set(f,d),s.delete(f),d.numberElement!==h?(d.numberElement!=null&&(this.unobserve(d.numberElement),s.delete(d.numberElement)),h!=null&&(this.observe(h),s.delete(h),this.observedNodes.set(h,d)),d.numberElement=h,d.numberWidth=0):d.numberElement!=null?(s.delete(d.numberElement),this.observedNodes.set(d.numberElement,d)):d.numberWidth=0):(d={type:"code",codeElement:f,numberElement:h,codeWidth:"auto",numberWidth:0},this.observedNodes.set(f,d),this.observe(f),h!=null&&(this.observedNodes.set(h,d),this.observe(h)))}if(o>1&&!i){const c=t.querySelectorAll('[data-line-annotation*=","]'),f=new Map;for(const d of c){if(!(d instanceof HTMLElement))continue;const h=d.getAttribute("data-line-annotation")??"";if(!/^\d+,\d+$/.test(h)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:h,element:d});continue}let y=f.get(h);y==null&&(y=[],f.set(h,y)),y.push(d)}for(const[d,h]of f){if(h.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",d,h);continue}const[y,g]=h,b=y.firstElementChild,v=g.firstElementChild;if(!(y instanceof HTMLElement)||!(g instanceof HTMLElement)||!(b instanceof HTMLElement)||!(v instanceof HTMLElement))continue;let S=s.get(b);if(S!=null){this.observedNodes.set(b,S),this.observedNodes.set(v,S),s.delete(b),s.delete(v);continue}const w=b.getBoundingClientRect().height,R=v.getBoundingClientRect().height;S={type:"annotations",column1:{container:y,child:b,childHeight:w},column2:{container:g,child:v,childHeight:R},currentHeight:"auto"},a.add({child1:b,child2:v,item:S,newHeight:Math.max(w,R)})}for(const d of a)this.applyNewHeight(d.item,d.newHeight),this.observedNodes.set(d.child1,d.item),this.observedNodes.set(d.child2,d.item),this.observe(d.child1),this.observe(d.child2);a.clear()}for(const[c,f]of s)this.unobserve(c),f.type==="code"?RO(f):DO(f);s.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:i}=_i,a=i.get(t);if(a!==this){if(a!=null&&a!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");i.set(t,this),_i.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:i,resizeObserver:a}=_i,o=i.get(t);if(o!=null){if(o!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");i.delete(t),a?.unobserve(t),a!=null&&i.size===0&&(a.disconnect(),_i.resizeObserver=void 0)}}handleResizeEntries(t){const i=new Map,a=new Set;for(const o of t){const{target:s,borderBoxSize:c,contentBoxSize:f}=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 h=(()=>{if(s===d.column1.child)return d.column1;if(s===d.column2.child)return d.column2})();if(h==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:d,target:s});continue}h.childHeight=c[0].blockSize,a.add(d)}else if(d.type==="code"){const h=i.get(d)??{},y=f[0].inlineSize;s===d.codeElement?h.codeInlineSize=y:s===d.numberElement&&(h.numberInlineSize=y),i.set(d,h)}}this.applyAnnotationUpdates(a),a.clear(),this.applyColumnUpdates(i),i.clear()}applyAnnotationUpdates(t){for(const i of t)this.applyNewHeight(i,Math.max(i.column1.childHeight,i.column2.childHeight))}applyColumnUpdates=t=>{for(const[i,a]of t){const o=a.codeInlineSize!=null?TO(a.codeInlineSize):i.codeWidth,s=a.numberInlineSize!=null?LO(a.numberInlineSize):i.numberWidth,c=o!==i.codeWidth,f=s!==i.numberWidth;if(!(!c&&!f)&&(i.codeWidth=o,i.numberWidth=s,c&&i.codeElement.style.setProperty("--diffs-column-width",`${typeof o=="number"?`${o}px`:"auto"}`),f&&i.codeElement.style.setProperty("--diffs-column-number-width",`${s===0?"auto":`${s}px`}`),c||f&&o!=="auto")){const d=typeof o=="number"?Math.max(o-s,0):0;i.codeElement.style.setProperty("--diffs-column-content-width",`${d>0?`${d}px`:"auto"}`)}}};applyNewHeight(t,i){i!==t.currentHeight&&(t.currentHeight=Math.max(i,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 TO(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function LO(e){return Math.max(Math.ceil(e),0)}function RO(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function DO(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")}function k_(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 nv(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!dh.has(t))return!1;return!0}function kf(e){for(const t of v_(e))if(!ch.has(t))return!1;return!0}function NO(e){return Le({tagName:"div",children:[Le({tagName:"div",children:e.annotations?.map(t=>Le({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function OO(e,t){return Le({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function MO(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 IO({fileOrDiff:e,mode:t,stickyHeader:i}){const a="type"in e?e:void 0,o={"data-diffs-header":t,"data-change-type":a?.type,"data-sticky":i?"":void 0};return Le({tagName:"div",children:[t==="custom"?Le({tagName:"slot",properties:{name:Kh}}):zO({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:a?.type??"file"}),...t==="custom"?[]:[HO(a)]],properties:o})}function zO({name:e,prevName:t,iconType:i}){const a=[Le({tagName:"slot",properties:{name:Qh}}),uu({name:MO(i),properties:{"data-change-icon":i}})];return t!=null&&(a.push(Le({tagName:"div",children:[Le({tagName:"bdi",children:[Yn(t)]})],properties:{"data-prev-name":""}})),a.push(uu({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push(Le({tagName:"div",children:[Le({tagName:"bdi",children:[Yn(e)]})],properties:{"data-title":""}})),Le({tagName:"div",children:a,properties:{"data-header-content":""}})}function HO(e){const t=[];if(e!=null){let i=0,a=0;for(const o of e.hunks)i+=o.additionLines,a+=o.deletionLines;(a>0||i===0)&&t.push(Le({tagName:"span",children:[Yn(`-${a}`)],properties:{"data-deletions-count":""}})),(i>0||a===0)&&t.push(Le({tagName:"span",children:[Yn(`+${i}`)],properties:{"data-additions-count":""}}))}return t.push(Le({tagName:"slot",properties:{name:Zh}})),Le({tagName:"div",children:t,properties:{"data-metadata":""}})}function UO(e){return Le({tagName:"pre",properties:PO(e)})}function PO({diffIndicators:e,disableBackground:t,disableLineNumbers:i,overflow:a,split:o,totalLines:s,type:c,customProperties:f}){return{...f,"data-diff":c==="diff"?"":void 0,"data-file":c==="file"?"":void 0,"data-diff-type":c==="diff"?o?"split":"single":void 0,"data-overflow":a,"data-disable-line-numbers":i?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}function BO(e,{theme:t,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:v_(t),preferredHighlighter:i}}function jO(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const VO=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
188
+ <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
189
+ <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"/>
190
+ </symbol>
191
+ <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
192
+ <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"/>
193
+ </symbol>
194
+ <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
195
+ <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"/>
196
+ </symbol>
197
+ <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
198
+ <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"/>
199
+ </symbol>
200
+ <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
201
+ <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"/>
202
+ </symbol>
203
+ <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
204
+ <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"/>
205
+ </symbol>
206
+ <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
207
+ <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"/>
208
+ </symbol>
209
+ <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
210
+ <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"/>
211
+ </symbol>
212
+ <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
213
+ <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"/>
214
+ </symbol>
215
+ <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
216
+ <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"/>
217
+ </symbol>
218
+ <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
219
+ <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"/>
220
+ </symbol>
221
+ <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
222
+ <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"/>
223
+ </symbol>
224
+ <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
225
+ <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"/>
226
+ </symbol>
227
+ <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
228
+ <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"/>
229
+ </symbol>
230
+ <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
231
+ <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"/>
232
+ </symbol>
233
+ <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
234
+ <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"/>
235
+ </symbol>
236
+ <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
237
+ <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"/>
238
+ </symbol>
239
+ </svg>`;function GO(e,t){return e==null||t==null?e===t:$O(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 iv={};function $O(e=iv,t=iv){if(e===t)return!0;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(const o of i)if(e[o]!==t[o])return!1;return!0}function FO(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function qO(){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 YO(){const e=document.createElement("style");return e.setAttribute(oh,""),e}let Us;function mh(e){if(Us!=null)return Us;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const i=document.createElement("div");i.setAttribute("data-code",""),i.setAttribute(mN,"true");const a=document.createElement("div");return a.style.position="relative",a.style.width="200%",a.style.height="200%",i.appendChild(a),e.appendChild(i),Us=Math.max(i.offsetHeight-i.clientHeight,0),i.remove(),Us}function A_(e){return`${g_}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}var XO='@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;--diffs-header-font-fallback:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-scrollbar-gutter-fallback:6px;--diffs-scrollbar-gutter:var(--diffs-scrollbar-gutter-override,var(--diffs-scrollbar-gutter-measured,var(--diffs-scrollbar-gutter-fallback)));--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--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))));--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))));--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))));--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))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--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))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--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)))));--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)))));--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)))));--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))));--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)));--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))));--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)));--diffs-selection-base:var(--diffs-modified-base);--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)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-diffs-header][data-sticky]{z-index:1;background-color:var(--diffs-bg);position:sticky;top:0}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr}[data-dehydrated]:is([data-diff],[data-file]){--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}:is([data-diff],[data-file]):hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}@supports (-webkit-touch-callout:none){:host{--diffs-scrollbar-gutter-fallback:0px}}[data-line] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit));font-weight:light-dark(var(--diffs-token-light-font-weight,inherit),var(--diffs-token-dark-font-weight,inherit));font-style:light-dark(var(--diffs-token-light-font-style,inherit),var(--diffs-token-dark-font-style,inherit));-webkit-text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit));text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}@media (pointer:fine){:is([data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]):where([data-hovered]){--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-selected-line-bg) 97%, var(--diffs-bg-hover-override,var(--diffs-mixer))),color-mix(in lab, var(--diffs-computed-selected-line-bg) 91%, var(--diffs-bg-hover-override,var(--diffs-mixer))));--diffs-line-bg:var(--diffs-computed-hovered-line-bg,inherit)}}[data-decoration-bg]:is([data-line],[data-no-newline]){--mix-deco-light:92%;--mix-deco-dark:85%}[data-decoration-bg][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]){--mix-deco-light:88%;--mix-deco-dark:80%}[data-decoration-bg][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]){--mix-deco-light:85%;--mix-deco-dark:78%}@media (pointer:fine){[data-decoration-bg][data-hovered]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:85%;--mix-deco-dark:85%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:83%;--mix-deco-dark:83%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:81%;--mix-deco-dark:81%}}[data-decoration-bg]:is([data-line],[data-no-newline]){--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-computed-diff-line-bg:var(--diffs-annotation-bg);--diffs-computed-selected-line-bg:var(--diffs-annotation-bg);--diffs-line-bg:var(--diffs-annotation-bg)}[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]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-computed-diff-line-bg:var(--diffs-bg-context);--diffs-computed-selected-line-bg:var(--diffs-bg-context);--diffs-line-bg:var(--diffs-bg-context)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);--diffs-line-bg:var(--diffs-bg)}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number]{--mix-light:91%;--mix-dark:85%}:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--mix-light:88%;--mix-dark:80%}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg)}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base))}@media (pointer:fine){[data-line-type=change-deletion][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:75%}}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base))}@media (pointer:fine){[data-line-type=change-addition][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base))}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}@media (pointer:fine){[data-merge-conflict=current][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base))}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}@media (pointer:fine){[data-merge-conflict=incoming][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base))}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--mix-selection-light:82%;--mix-selection-dark:75%}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:75%;--mix-selection-dark:70%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base))}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:70%;--mix-selection-dark:55%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)));--diffs-line-bg:var(--diffs-computed-selected-line-bg,inherit)}[data-selected-line]:is([data-gutter-buffer],[data-column-number]){color:var(--diffs-selection-number-fg)}[data-no-newline]{-webkit-user-select:none;user-select:none}[data-no-newline] span{opacity:.6}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid}[data-diff-type=split][data-overflow=scroll] [data-additions]{border-left:1px solid var(--diffs-bg)}[data-diff-type=split][data-overflow=scroll] [data-deletions]{border-right:1px solid var(--diffs-bg)}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overflow:var(--diffs-overflow-override,scroll) clip;overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - var(--diffs-scrollbar-gutter)));scrollbar-gutter:stable;align-self:flex-start;display:grid}[data-diffs-scrollbar-measure]{opacity:0;pointer-events:none;scrollbar-gutter:auto;grid-template-columns:none;width:100px;height:100px;padding:0;position:absolute;top:-200px;left:-200px}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:var(--diffs-scrollbar-gutter)}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]) [data-code],[data-overflow=wrap]:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]){padding-top:0}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative}[data-gutter] [data-gutter-buffer],[data-gutter] [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-diff-type=split][data-overflow=wrap]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid}[data-diff-type=split][data-overflow=wrap] [data-deletions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-gutter]{grid-column:1}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}[data-diff-type=split][data-overflow=wrap] [data-additions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-content]{grid-column:4}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-interactive-line-numbers] [data-column-number]{cursor:pointer;touch-action:none}[data-content-buffer],[data-gutter-buffer]{-webkit-user-select:none;user-select:none;min-height:1lh;position:relative}[data-gutter-buffer]{padding-left:2ch;padding-right:1ch}[data-gutter-buffer]:before{content:"";min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));display:block}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent 4.242px, var(--diffs-bg-buffer) 4.242px, var(--diffs-bg-buffer) 5.656px);grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{-webkit-user-select:none;user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback))}[data-separator=line-info] [data-separator-wrapper]{min-width:16px}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch}[data-expand-button]:hover{color:var(--diffs-fg)}[data-expand-button][data-expand-all-button]{display:none}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-content]{-webkit-user-select:none;user-select:none;height:100%;overflow:clip}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified] [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi}:is([data-unified] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content]{border-radius:6px}[data-unified] [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-gutter] [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}[data-gutter] [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-gutter] [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-additions] [data-content] [data-separator=line-info]{background-color:var(--diffs-bg)}:is([data-additions] [data-content] [data-separator=line-info]) [data-separator-wrapper]{display:none}[data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block}:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block}:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}@media (pointer:fine){[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto}:is([data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]) [data-separator-content]{grid-column:unset;grid-row:unset}@supports (width:1cqi){:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up],[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid}[data-separator-wrapper][data-separator-multi-button] [data-separator-content]{grid-area:1/2/-1;min-width:min-content}[data-separator-wrapper][data-separator-multi-button] [data-expand-button]{grid-column:1}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}:is([data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion]),[data-line]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion])):before{-webkit-user-select:none;user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}:is([data-line]:is([data-indicators=classic] [data-line-type=change-addition]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition])):before{content:"+";color:var(--diffs-addition-base)}:is([data-line]:is([data-indicators=classic] [data-line-type=change-deletion]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-deletion])):before{content:"-";color:var(--diffs-deletion-base)}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion],[data-indicators=bars] [data-line-type=change-addition]):before{content:"";-webkit-user-select:none;user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion]):before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh/round(1lh / 2px)) calc(1lh/round(1lh / 2px))}[data-column-number]:is([data-indicators=bars] [data-line-type=change-addition]):before{background-color:var(--diffs-addition-base)}[data-overflow=wrap] [data-line],[data-overflow=wrap] [data-annotation-content]{white-space:pre-wrap;word-break:break-word}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;-webkit-user-select:none;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]{min-width:4px;padding:0}:is([data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]):before{min-width:0}[data-disable-line-numbers] [data-line-number-content]{display:none}[data-disable-line-numbers] [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}[data-disable-line-numbers][data-indicators=bars] [data-gutter-utility-slot]{left:6px}[data-file][data-disable-line-numbers] [data-gutter-buffer],[data-file][data-disable-line-numbers] [data-column-number]{border-right:0;min-width:0}[data-diff-span]{-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex}:is([data-merge-conflict=marker-start],[data-merge-conflict=marker-end]):after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}[data-merge-conflict=marker-start]:after{content:"(Current Change)"}[data-merge-conflict=marker-end]:after{content:"(Incoming Change)"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;-webkit-user-select:none;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + var(--diffs-gap-block,var(--diffs-gap-fallback))*3);z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{touch-action:none;justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;touch-action:none;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(1ch - 1lh);padding:0;display:flex;position:relative}[data-utility-button]:before{content:"";display:block;position:absolute;inset:0 0 0 -4px}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px}[data-decoration-bar-depth="1"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] [data-decoration-bar-stack]{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] [data-decoration-bar-stack]{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto}[data-error-wrapper] [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}[data-error-wrapper] [data-error-stack]{color:var(--diffs-fg-number)}}@layer theme,rendered,unsafe;';const T_="@layer base, theme, rendered, unsafe;",QO=new RegExp(`${JO(g_)}\\s*:\\s*[^;]+;`);function ZO(e){return`${T_}
240
+ @layer unsafe {
241
+ ${e}
242
+ }`}function KO(e,t="system",i){return`${T_}
243
+ @layer rendered {
244
+ :host {${t==="system"?"":`
245
+ color-scheme: ${t};`}
246
+ ${A_(i)}
247
+ ${e}
248
+ }
249
+ }`}function WO(e,t){const i=A_(t);return e.replace(QO,i)}function JO(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Af({code:e,pre:t,columnType:i,rowSpan:a,containerSize:o=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),i!=null&&e.setAttribute(`data-${i}`,""),t?.appendChild(e)),a!=null?e.style.setProperty("grid-row",`span ${a}`):e.style.removeProperty("grid-row"),o?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function eM({shadowRoot:e,currentNode:t,themeCSS:i}){if(i.trim()===""){t?.remove();return}return t??=tM(),t.textContent=i,t.parentNode!==e&&e.appendChild(t),t}function tM(){const e=document.createElement("style");return e.setAttribute(lh,""),e}function nM(e,t){if(t==null)return;const i=e.shadowRoot??e.attachShadow({mode:"open"});i.innerHTML===""&&(i.innerHTML=t)}function iM(e,{type:t,diffIndicators:i,disableBackground:a,disableLineNumbers:o,overflow:s,split:c,totalLines:f,customProperties:d}){if(d!=null)for(const h in d){const y=d[h];y!=null&&e.setAttribute(h,`${y}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),i){case"bars":case"classic":e.setAttribute("data-indicators",i);break;case"none":e.removeAttribute("data-indicators");break}return o?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),a?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",c?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",s),e.tabIndex=0,e.style.setProperty("--diffs-min-number-column-width-default",`${`${f}`.length}ch`),e}if(typeof HTMLElement<"u"&&customElements.get(su)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const a=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(XO)),a.adoptedStyleSheets=[e]}connectedCallback(){mh(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(su,t)}const rM=!0;function aM({fileDiff:e,metrics:t,disableFileHeader:i,hunkSeparators:a,expandUnchanged:o,expandedHunks:s,collapsedContextThreshold:c}){let f=wa(t,i),d=f;const h=o?!0:s,y=e.hunks.length-1;for(let g=0;g<e.hunks.length;g++){const b=e.hunks[g];if(b==null)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const v=Xn({isPartial:e.isPartial,rangeSize:b.collapsedBefore,expandedHunks:h,hunkIndex:g,collapsedContextThreshold:c}),S=(v.fromStart+v.fromEnd)*t.lineHeight;if(f+=S,d+=S,v.collapsedLines>0){const R=jl({type:a,metrics:t,hunkIndex:g,hunkSpecs:b.hunkSpecs})?.totalHeight??0;f+=R,d+=R}f+=b.splitLineCount*t.lineHeight,d+=b.unifiedLineCount*t.lineHeight;const w=lM(b);if(f+=w.split*t.lineHeight,d+=w.unified*t.lineHeight,g===y&&sM(e)){const R=Xn({isPartial:e.isPartial,rangeSize:uM(e,b),expandedHunks:h,hunkIndex:e.hunks.length,collapsedContextThreshold:c}),C=(R.fromStart+R.fromEnd)*t.lineHeight;if(f+=C,d+=C,R.collapsedLines>0){const k=Vl({type:a,metrics:t})?.totalHeight??0;f+=k,d+=k}}}if(e.hunks.length>0){const g=S_(t);f+=g,d+=g}return{splitHeight:f,unifiedHeight:d}}function lM(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 i=t.lines>0?1:0;return{split:i,unified:i}}return oM(e,t)}function oM(e,t){const i=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),a=t.deletions>0&&e.noEOFCRDeletions,o=t.additions>0&&e.noEOFCRAdditions;return{split:a||o?1:0,unified:i}}function sM(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function uM(e,t){const i=e.additionLines.length-(t.additionLineIndex+t.additionCount),a=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(i!==a)throw new Error(`computeEstimatedDiffHeights: trailing context mismatch (additions=${i}, deletions=${a}) for ${e.name}`);return Math.min(i,a)}const cM=new TextEncoder,dM=new TextDecoder("utf-8",{ignoreBOM:!0}),fM=/[\uD800-\uDFFF]/,gh=1024;let Aa=new Uint8Array(gh);function L_(){Aa.length!==gh&&(Aa=new Uint8Array(gh))}function vt(e){if(e.length===0)return e;if(fM.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;Aa.length<t&&(Aa=new Uint8Array(t));const{written:i}=cM.encodeInto(e,Aa);return dM.decode(Aa.subarray(0,i))}function hM(e,t,i){try{return pM(e,t,i)}finally{L_()}}function pM(e,t,i=!1){const a=_M(e),o=a?N_(e,"diff --git"):e.split(Hb);let s;const c=[];for(const f of o){if(a&&!m_.test(f)){if(s==null)s=vt(f);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}else if(!a&&!Hb.test(f)){if(s==null)s=vt(f);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}const d=R_(f,{cacheKey:t!=null?`${t}-${c.length}`:void 0,isGitDiff:a,throwOnError:i});d!=null&&c.push(d)}return{patchMetadata:s,files:c}}function mM(e,t){try{return R_(e,t)}finally{L_()}}function R_(e,{cacheKey:t,isGitDiff:i=m_.test(e),oldFile:a,newFile:o,throwOnError:s=!1}={}){let c=0;const f=N_(e,"@@ ");let d;const h=a==null||o==null;let y=0,g=0;for(const b of f){const v=D_(b),S=v[0];if(S==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",b);continue}const w=bM(S);let R=0,C=0;if(w==null||d==null){if(d!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",b);continue}d={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:h,additionLines:!h&&a!=null&&o!=null?rv(o.contents):[],deletionLines:!h&&a!=null&&o!=null?rv(a.contents):[],cacheKey:lv(t)},d.additionLines.length===1&&o?.contents===""&&(d.additionLines.length=0),d.deletionLines.length===1&&a?.contents===""&&(d.deletionLines.length=0);for(const j of v){if(j.startsWith("diff --git")){const Z=j.trim().match(hN),W=Z?.[1]??Z?.[2],Q=Z?.[3]??Z?.[4];if(W==null||Q==null){if(s)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",j);continue}d.name=vt(Q.trim()),W!==Q&&(d.prevName=vt(W.trim()));continue}const se=j.startsWith("---")||j.startsWith("+++")?j.match(i?fN:dN):null;if(se!=null){const[,Z,W]=se;if(Z==="---"&&W!=="/dev/null"){const Q=vt(W.trim());d.prevName=Q,d.name=Q}else Z==="+++"&&W!=="/dev/null"&&(d.name=vt(W.trim()))}else if(i){if(j.startsWith("new mode ")&&(d.mode=vt(j.slice(8).trim())),j.startsWith("old mode ")&&(d.prevMode=vt(j.slice(8).trim())),j.startsWith("new file mode")&&(d.type="new",d.mode=vt(j.slice(13).trim())),j.startsWith("deleted file mode")&&(d.type="deleted",d.mode=vt(j.slice(17).trim())),j.startsWith("similarity index")&&(j.startsWith("similarity index 100%")?d.type="rename-pure":d.type="rename-changed"),j.startsWith("index ")){const[,Z,W,Q]=j.trim().match(pN)??[];Z!=null&&(d.prevObjectId=vt(Z)),W!=null&&(d.newObjectId=vt(W)),Q!=null&&(d.mode=vt(Q))}j.startsWith("rename from ")&&(d.prevName=vt(j.slice(12).trim())),j.startsWith("rename to ")&&(d.name=vt(j.slice(10).trim()))}}continue}let k,A;for(;v.length>0&&(v[v.length-1]===`
250
+ `||v[v.length-1]==="\r"||v[v.length-1]===`\r
251
+ `||v[v.length-1]==="");)v.pop();const{additionStart:H,deletionStart:U}=w;y=h?y:U-1,g=h?g:H-1;const D={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:w.additionCount,additionStart:H,additionLines:R,deletionCount:w.deletionCount,deletionStart:U,deletionLines:C,deletionLineIndex:y,additionLineIndex:g,hunkContent:[],hunkContext:lv(w.hunkContext),hunkSpecs:vt(S),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let B=0,re=0;for(let j=1;j<v.length;j++){const se=v[j];if(B>=D.additionCount&&re>=D.deletionCount&&!se.startsWith("\\"))break;const Z=se[0];if(Z!=="+"&&Z!=="-"&&Z!==" "&&Z!=="\\"){console.error(`parseLineType: Invalid firstChar: "${Z}", full line: "${se}"`),console.error("processFile: invalid rawLine:",se);continue}const W=SM(Z);if(W==="addition"){const Q=Tf(se);(k==null||k.type!=="change")&&(k=Lf("change",y,g),D.hunkContent.push(k)),g++,B++,h&&d.additionLines.push(Q),k.additions++,R++,A="addition"}else if(W==="deletion"){const Q=Tf(se);(k==null||k.type!=="change")&&(k=Lf("change",y,g),D.hunkContent.push(k)),y++,re++,h&&d.deletionLines.push(Q),k.deletions++,C++,A="deletion"}else if(W==="context"){const Q=Tf(se);(k==null||k.type!=="context")&&(k=Lf("context",y,g),D.hunkContent.push(k)),g++,y++,B++,re++,h&&(d.deletionLines.push(Q),d.additionLines.push(Q)),k.lines++,A="context"}else if(W==="metadata"&&k!=null){if(k.type==="context"?(D.noEOFCRAdditions=!0,D.noEOFCRDeletions=!0):A==="deletion"?D.noEOFCRDeletions=!0:A==="addition"&&(D.noEOFCRAdditions=!0),h&&(A==="addition"||A==="context")){const Q=d.additionLines.length-1;Q>=0&&(d.additionLines[Q]=Oa(d.additionLines[Q]))}if(h&&(A==="deletion"||A==="context")){const Q=d.deletionLines.length-1;Q>=0&&(d.deletionLines[Q]=Oa(d.deletionLines[Q]))}}}D.additionLines=R,D.deletionLines=C,D.collapsedBefore=Math.max(D.additionStart-1-c,0),d.hunks.push(D),c=D.additionStart+D.additionCount-1;for(const j of D.hunkContent)j.type==="context"?(D.splitLineCount+=j.lines,D.unifiedLineCount+=j.lines):(D.splitLineCount+=Math.max(j.additions,j.deletions),D.unifiedLineCount+=j.deletions+j.additions);D.splitLineStart=d.splitLineCount+D.collapsedBefore,D.unifiedLineStart=d.unifiedLineCount+D.collapsedBefore,d.splitLineCount+=D.collapsedBefore+D.splitLineCount,d.unifiedLineCount+=D.collapsedBefore+D.unifiedLineCount}if(d!=null){if(d.hunks.length>0&&!h&&d.additionLines.length>0&&d.deletionLines.length>0){const b=d.hunks[d.hunks.length-1],v=b.additionStart+b.additionCount-1,S=d.additionLines.length,w=Math.max(S-v,0);d.splitLineCount+=w,d.unifiedLineCount+=w}return i||(d.prevName!=null&&d.name!==d.prevName?d.hunks.length>0?d.type="rename-changed":d.type="rename-pure":(a==null||a.contents==="")&&o!=null&&o.contents!==""?d.type="new":a!=null&&a.contents!==""&&(o==null||o.contents==="")&&(d.type="deleted")),d.type!=="rename-pure"&&d.type!=="rename-changed"&&(d.prevName=void 0),d}}function gM(e,t,i=!1){const a=[],o=yM(e)?e.split(cN):[e];for(const s of o)try{a.push(hM(s,t!=null?`${t}-${a.length}`:void 0,i))}catch(c){if(i)throw c;console.error(c)}return a}function yM(e){return e.startsWith("From ")||e.includes(`
252
+ From `)}function rv(e){const t=D_(e);for(let i=0;i<t.length;i++)t[i]=vt(t[i]);return t}function D_(e){if(e.length===0)return[""];const t=[];let i=0;for(;;){const a=e.indexOf(`
253
+ `,i);if(a===-1)break;t.push(e.slice(i,a+1)),i=a+1}return i<e.length&&t.push(e.slice(i)),t}function bM(e){if(!e.startsWith("@@ -"))return;let t=4;const i=Ps(e,t);if(i==null)return;const a=i.value;t=i.endIndex;let o=1;if(e[t]===","){const y=Ps(e,t+1);if(y==null)return;o=y.value,t=y.endIndex}if(e[t]!==" "||e[t+1]!=="+")return;t+=2;const s=Ps(e,t);if(s==null)return;const c=s.value;t=s.endIndex;let f=1;if(e[t]===","){const y=Ps(e,t+1);if(y==null)return;f=y.value,t=y.endIndex}if(e[t]!==" "||e[t+1]!=="@"||e[t+2]!=="@")return;let d;const h=t+3;return e[h]===" "&&(d=vM(e.slice(h+1))),{additionCount:f,additionStart:c,deletionCount:o,deletionStart:a,hunkContext:d}}function Ps(e,t){let i=t,a=0;for(;i<e.length;i++){const o=e.charCodeAt(i)-48;if(o<0||o>9)break;a=a*10+o}if(i!==t)return{value:a,endIndex:i}}function vM(e){return e.endsWith(`\r
254
+ `)?e.slice(0,-2):e.endsWith(`
255
+ `)?e.slice(0,-1):e}function _M(e){return e.startsWith("diff --git")||e.includes(`
256
+ diff --git`)}function N_(e,t){if(e.length===0)return[""];const i=`
257
+ ${t}`,a=e.startsWith(t)?0:av(e,i,0);if(a===-1)return[e];const o=[];a>0&&o.push(e.slice(0,a));let s=a;for(;;){const c=av(e,i,s+1);if(c===-1)break;o.push(e.slice(s,c)),s=c}return o.push(e.slice(s)),o}function av(e,t,i){const a=e.indexOf(t,i);return a===-1?-1:a+1}function lv(e){return e==null?e:vt(e)}function SM(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function Tf(e){const t=e.slice(1);return vt(t===""?`
258
+ `:t)}function Lf(e,t,i){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:i,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:i,deletionLineIndex:t}}function yh(e,t,i,a=!1){const o=mM(uO(e.name,t.name,e.contents,t.contents,e.header,t.header,i),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:a});if(o==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return t.lang!=null&&(o.lang=t.lang),o}var EM=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,i){if(t==null||i==null)for(const a of e.children??[])a instanceof HTMLElement&&("deletions"in a.dataset?t=a:"additions"in a.dataset&&(i=a));if(i==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!==i&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=i,i.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 Bs(e){return Le({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function js(e){return Le({tagName:"div",children:[Le({tagName:"span",children:[Yn("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function Rf(e){return Le({tagName:"div",children:[uu({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 Sa({type:e,content:t,expandIndex:i,chunked:a=!1,slotName:o,isFirstHunk:s,isLastHunk:c}){let f=0;const d=[];if(e==="metadata"&&t!=null&&d.push(Le({tagName:"div",children:[Yn(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const h=[];i!=null&&(a?(s||(h.push(Rf("up")),f++),c||(h.push(Rf("down")),f++)):(h.push(Rf(!s&&!c?"both":s?"down":"up")),f++)),h.push(Le({tagName:"div",children:[Le({tagName:"span",children:[Yn(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),a&&i!=null&&h.push(Le({tagName:"div",children:[Yn("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),d.push(Le({tagName:"div",children:h,properties:{"data-separator-wrapper":"","data-separator-multi-button":f>1?"":void 0}}))}return e==="custom"&&o!=null&&d.push(Le({tagName:"slot",properties:{name:o}})),Le({tagName:"div",children:d,properties:{"data-separator":d.length===0?"simple":e,"data-expand-index":i,"data-separator-first":s?"":void 0,"data-separator-last":c?"":void 0}})}function xM(e,t){return`hunk-separator-${e}-${t}`}function CM(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function wM(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}let kM=-1;var AM=class{__id=`diff-hunks-renderer:${++kM}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:An},t,i){this.options=e,this.onRenderUpdate=t,this.workerManager=i,i?.isWorkingPool()!==!0&&(this.highlighter=kf(e.theme??An)?DN():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)}clearRenderCache(){this.renderCache=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,i=this.getOptionsWithDefaults().expansionLineCount){const a={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(a.fromStart+=i),(t==="down"||t==="both")&&(a.fromEnd+=i),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,a)}getExpandedHunk(e){return this.expandedHunks.get(e)??yN}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const i=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),a=i[t.lineNumber]??[];i[t.lineNumber]=a,a.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t!=="change"?{gutterLineType:t}:{gutterLineType:e==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement(e){return NO(e)}getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:i=!1,disableFileHeader:a=!1,disableLineNumbers:o=!1,disableVirtualizationBuffers:s=!1,collapsed:c=!1,expandUnchanged:f=!1,collapsedContextThreshold:d=cn,expansionLineCount:h=100,hunkSeparators:y="line-info",lineDiffType:g="word-alt",maxLineDiffLength:b=1e3,overflow:v="scroll",stickyHeader:S=!1,theme:w=An,headerRenderMode:R="default",tokenizeMaxLineLength:C=1e3,tokenizeMaxLength:k=sh,useTokenTransformer:A=!1,useCSSClasses:H=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:i,disableFileHeader:a,disableLineNumbers:o,disableVirtualizationBuffers:s,collapsed:c,expandUnchanged:f,collapsedContextThreshold:d,expansionLineCount:h,hunkSeparators:y,lineDiffType:g,maxLineDiffLength:b,overflow:v,stickyHeader:S,theme:this.workerManager?.getDiffRenderOptions().theme??w,headerRenderMode:R,tokenizeMaxLineLength:C,tokenizeMaxLength:k,useTokenTransformer:A,useCSSClasses:H}}async initializeHighlighter(){return this.highlighter=await b_(BO(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),i=Nf(e,this.getTokenizeMaxLength());let a=this.workerManager?.getDiffResultCache(e);a!=null&&!Ul(t,a.options)&&(a=void 0),this.renderCache??={diff:e,highlighted:!i&&!fh(e),options:t,result:i?void 0:a?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!i&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??Ji(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:a,tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:c}=this.getOptionsWithDefaults();return{theme:a,useTokenTransformer:jO(this.options),tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:c}})();this.getOptionsWithDefaults();const{renderCache:i}=this;return i?.result==null?{options:t,forceHighlight:!0}:!Bl(e,i.diff)||!Ul(t,i.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=Ub){if(e==null)return;const{expandUnchanged:i=!1,collapsedContextThreshold:a}=this.getOptionsWithDefaults();let{options:o,forceHighlight:s}=this.getRenderOptions(e);const c=this.getMatchingWorkerResultCache(e,o);c!=null&&!this.hasHighlightedRenderCache(e,o)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...c},s=!1),this.renderCache??={diff:e,highlighted:!1,options:o,result:void 0,renderRange:void 0};const f=e.additionLines.length>0||e.deletionLines.length>0,d=!f||fh(e)||Nf(e,this.getTokenizeMaxLength()),h=!Bl(e,this.renderCache.diff),y=!k_(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(d||this.renderCache.result==null||!this.renderCache.highlighted&&(h||y))&&(this.renderCache.diff=e,this.renderCache.options=o,this.renderCache.highlighted=!1,(this.renderCache.result==null||h||y||s)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,wM(t)||i?!0:this.expandedHunks,a)),this.renderCache.renderRange=t),!d&&f&&(!this.renderCache.highlighted||s)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??Ji(e.name);const g=this.highlighter!=null&&kf(o.theme),b=this.highlighter!=null&&nv(this.computedLang),v=!d&&b;if(this.highlighter!=null&&g&&(s||d||!this.renderCache.highlighted&&v||this.renderCache.result==null)){const{result:S,options:w}=this.renderDiffWithHighlighter(e,this.highlighter,d||!b);this.renderCache={diff:e,options:w,highlighted:v,result:S,renderRange:void 0}}(!g||!d&&!b)&&this.asyncHighlight(e).then(({result:S,options:w})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,S,w,!d)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=Ub){const{result:i}=await this.asyncHighlight(e);return this.processDiffResult(e,t,i)}createPreElement(e,t,i){const{diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c}=this.getOptionsWithDefaults();return UO({type:"diff",diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:e,totalLines:t,customProperties:i})}async asyncHighlight(e){const t=Nf(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Ji(e.name);const i=this.highlighter!=null&&kf(this.options.theme??An),a=t||this.highlighter!=null&&nv(this.computedLang);return(this.highlighter==null||!i||!a)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,i=!1){const{options:a}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults();return{result:fO(e,t,a,{forcePlainText:i,expandedHunks:i?!0:void 0,collapsedContextThreshold:o}),options:a}}onHighlightSuccess(e,t,i,a=!0){if(this.renderCache==null)return;const o=!this.renderCache.highlighted||!Ul(this.renderCache.options,i)||!Bl(this.renderCache.diff,e);this.renderCache={diff:e,options:i,highlighted:a,result:t,renderRange:void 0},o&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const i=this.workerManager?.getDiffResultCache(e);if(!(i==null||!Ul(t,i.options)))return i}hasHighlightedRenderCache(e,t){const{renderCache:i}=this;return i?.result!=null&&i.highlighted&&Bl(e,i.diff)&&Ul(t,i.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??sh}processDiffResult(e,t,{code:i,themeStyles:a,baseThemeType:o}){const{diffStyle:s,disableFileHeader:c,expandUnchanged:f,expansionLineCount:d,collapsedContextThreshold:h,hunkSeparators:y}=this.getOptionsWithDefaults();this.diff=e;const g=s==="unified";let b=[],v=[],S=[];const w=[],{additionLines:R,deletionLines:C}=i,k={rowCount:0,hunkSeparators:y,additionsContentAST:b,deletionsContentAST:v,unifiedContentAST:S,unifiedGutterAST:Ns(),deletionsGutterAST:Ns(),additionsGutterAST:Ns(),expansionLineCount:d,hunkData:w,incrementRowCount(Q=1){k.rowCount+=Q},pushToGutter(Q,ie){switch(Q){case"unified":k.unifiedGutterAST.children.push(ie);break;case"deletions":k.deletionsGutterAST.children.push(ie);break;case"additions":k.additionsGutterAST.children.push(ie);break}}},A=TM(e),H={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"?(k.pushToGutter("additions",On(void 0,"buffer",this.size)),b?.push(Bs(this.size))):(k.pushToGutter("deletions",On(void 0,"buffer",this.size)),v?.push(Bs(this.size))),this.size=0,this.side=void 0}}},U=(Q,ie,q,z,$)=>{k.pushToGutter(Q,IN(ie,q,z,$))};function D(Q){H.flush(),s==="unified"?Df("unified",Q,k):(Df("deletions",Q,k),Df("additions",Q,k))}Ql({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:f?!0:this.expandedHunks,collapsedContextThreshold:h,callback:({hunkIndex:Q,hunk:ie,collapsedBefore:q,collapsedAfter:z,additionLine:$,deletionLine:le,type:fe})=>{const L=le!=null?le.splitLineIndex:$.splitLineIndex,O=$!=null?$.unifiedLineIndex:le.unifiedLineIndex;s==="split"&&fe!=="change"&&H.flush(),q>0&&D({hunkIndex:Q,collapsedLines:q,rangeSize:Math.max(ie?.collapsedBefore??0,0),hunkSpecs:ie?.hunkSpecs,isFirstHunk:Q===0,isLastHunk:!1,isExpandable:!e.isPartial});const X=s==="unified"?O:L,T={type:fe,hunkIndex:Q,lineIndex:X,unifiedLineIndex:O,splitLineIndex:L,deletionLine:le,additionLine:$};if(s==="unified"){const me=this.getUnifiedInjectedRowsForLine?.(T);me?.before!=null&&sv(me.before,k);let Ve=le!=null?C[le.lineIndex]:void 0,Je=$!=null?R[$.lineIndex]:void 0;if(Ve==null&&Je==null){const ut="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(ut,{file:e.name}),new Error(ut)}const jt=fe==="change"?$!=null?"change-addition":"change-deletion":fe,gt=this.getUnifiedLineDecoration({type:fe,lineType:jt,additionLineIndex:$?.lineIndex,deletionLineIndex:le?.lineIndex});U("unified",gt.gutterLineType,$!=null?$.lineNumber:le.lineNumber,`${O},${L}`,gt.gutterProperties),Je!=null?Je=Vs(Je,gt.contentProperties):Ve!=null&&(Ve=Vs(Ve,gt.contentProperties)),cv({diffStyle:"unified",type:fe,deletionLine:Ve,additionLine:Je,unifiedSpan:this.getAnnotations("unified",le?.lineNumber,$?.lineNumber,Q,X),createAnnotationElement:ut=>this.createAnnotationElement(ut),context:k}),me?.after!=null&&sv(me.after,k)}else{const me=this.getSplitInjectedRowsForLine?.(T);me?.before!=null&&uv(me.before,k,H);let Ve=le!=null?C[le.lineIndex]:void 0,Je=$!=null?R[$.lineIndex]:void 0;const jt=this.getSplitLineDecoration({side:"deletions",type:fe,lineIndex:le?.lineIndex}),gt=this.getSplitLineDecoration({side:"additions",type:fe,lineIndex:$?.lineIndex});if(Ve==null&&Je==null){const yt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(yt,{file:e.name}),new Error(yt)}const ut=(()=>{if(fe==="change"){if(Je==null)return"additions";if(Ve==null)return"deletions"}})();if(ut!=null){if(H.side!=null&&H.side!==ut)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");H.side=ut,H.increment()}const Ln=this.getAnnotations("split",le?.lineNumber,$?.lineNumber,Q,X);if(Ln!=null&&H.size>0&&H.flush(),le!=null){const yt=Vs(Ve,jt.contentProperties);U("deletions",jt.gutterLineType,le.lineNumber,`${le.unifiedLineIndex},${L}`,jt.gutterProperties),yt!=null&&(Ve=yt)}if($!=null){const yt=Vs(Je,gt.contentProperties);U("additions",gt.gutterLineType,$.lineNumber,`${$.unifiedLineIndex},${L}`,gt.gutterProperties),yt!=null&&(Je=yt)}cv({diffStyle:"split",type:fe,additionLine:Je,deletionLine:Ve,...Ln,createAnnotationElement:yt=>this.createAnnotationElement(yt),context:k}),me?.after!=null&&uv(me.after,k,H)}const ue=s==="split"&&ie!=null&&L===ie.splitLineStart+ie.splitLineCount-1,ge=ue?ie.noEOFCRDeletions:!1,he=ue?ie.noEOFCRAdditions:!1,Ee=(le?.noEOFCR??!1)||ge,Re=($?.noEOFCR??!1)||he;if(Re||Ee){if(s==="split"&&H.flush(),Ee){const me=fe==="context"||fe==="context-expanded"?fe:"change-deletion";s==="unified"?(k.unifiedContentAST.push(js(me)),k.pushToGutter("unified",On(me,"metadata",1))):(k.deletionsContentAST.push(js(me)),k.pushToGutter("deletions",On(me,"metadata",1)),Re||(k.pushToGutter("additions",On(void 0,"buffer",1)),k.additionsContentAST.push(Bs(1))))}if(Re){const me=fe==="context"||fe==="context-expanded"?fe:"change-addition";s==="unified"?(k.unifiedContentAST.push(js(me)),k.pushToGutter("unified",On(me,"metadata",1))):(k.additionsContentAST.push(js(me)),k.pushToGutter("additions",On(me,"metadata",1)),Ee||(k.pushToGutter("deletions",On(void 0,"buffer",1)),k.deletionsContentAST.push(Bs(1))))}k.incrementRowCount(1)}z>0&&y!=="simple"&&D({hunkIndex:fe==="context-expanded"?Q:Q+1,collapsedLines:z,rangeSize:A,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),k.incrementRowCount(1)}}),s==="split"&&H.flush();const B=Math.max(CM(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),re=t.bufferBefore>0||t.bufferAfter>0,j=!g&&e.type!=="deleted",se=!g&&e.type!=="new",Z=k.rowCount>0||re;b=j&&Z?b:void 0,v=se&&Z?v:void 0,S=g&&Z?S:void 0;const W=this.createPreElement(v!=null&&b!=null,B);return{unifiedGutterAST:g&&Z?k.unifiedGutterAST.children:void 0,unifiedContentAST:S,deletionsGutterAST:se&&Z?k.deletionsGutterAST.children:void 0,deletionsContentAST:v,additionsGutterAST:j&&Z?k.additionsGutterAST.children:void 0,additionsContentAST:b,hunkData:w,preNode:W,themeStyles:a,baseThemeType:o,headerElement:c?void 0:this.renderHeader(this.diff),totalLines:B,rowCount:k.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const i=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,a=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(i==null||a==null)return;const o=Ns(i);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,OO(a,t.rowCount)]}renderFullAST(e,t=[]){const i=this.getOptionsWithDefaults().hunkSeparators==="line-info",a=this.renderCodeAST("unified",e);if(a!=null)return t.push(Le({tagName:"code",children:a,properties:{"data-code":"","data-container-size":i?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const o=this.renderCodeAST("deletions",e);o!=null&&t.push(Le({tagName:"code",children:o,properties:{"data-code":"","data-container-size":i?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&t.push(Le({tagName:"code",children:s,properties:{"data-code":"","data-container-size":i?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Da(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?Da(e):Da(Le({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}getAnnotations(e,t,i,a,o){const s={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(t!=null)for(const f of this.deletionAnnotations[t]??[])s.annotations.push(no(f));const c={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(i!=null)for(const f of this.additionAnnotations[i]??[])(e==="unified"?s:c).annotations.push(no(f));if(e==="unified")return s.annotations.length>0?s:void 0;if(!(c.annotations.length===0&&s.annotations.length===0))return{deletionSpan:s,additionSpan:c}}renderHeader(e){const{headerRenderMode:t,stickyHeader:i}=this.getOptionsWithDefaults();return IO({fileOrDiff:e,mode:t,stickyHeader:i})}};function ov(e){return`${e} unmodified line${e>1?"s":""}`}function sv(e,t){for(const i of e)t.unifiedContentAST.push(i.content),t.pushToGutter("unified",i.gutter),t.incrementRowCount(1)}function uv(e,t,i){for(const{deletion:a,addition:o}of e){if(a==null&&o==null)continue;const s=a!=null&&o!=null?void 0:a==null?"deletions":"additions";(s==null||i.side!==s)&&i.flush(),a!=null&&(t.deletionsContentAST.push(a.content),t.pushToGutter("deletions",a.gutter)),o!=null&&(t.additionsContentAST.push(o.content),t.pushToGutter("additions",o.gutter)),s!=null&&(i.side=s,i.increment()),t.incrementRowCount(1)}}function cv({diffStyle:e,type:t,deletionLine:i,additionLine:a,unifiedSpan:o,deletionSpan:s,additionSpan:c,createAnnotationElement:f,context:d}){let h=!1;if(e==="unified"){if(a!=null?d.unifiedContentAST.push(a):i!=null&&d.unifiedContentAST.push(i),o!=null){const y=t==="change"?i!=null?"change-deletion":"change-addition":t;d.unifiedContentAST.push(f(o)),d.pushToGutter("unified",On(y,"annotation",1)),h=!0}}else if(e==="split"){if(i!=null&&d.deletionsContentAST.push(i),a!=null&&d.additionsContentAST.push(a),s!=null){const y=t==="change"?i!=null?"change-deletion":"context":t;d.deletionsContentAST.push(f(s)),d.pushToGutter("deletions",On(y,"annotation",1)),h=!0}if(c!=null){const y=t==="change"?a!=null?"change-addition":"context":t;d.additionsContentAST.push(f(c)),d.pushToGutter("additions",On(y,"annotation",1)),h=!0}}h&&d.incrementRowCount(1)}function Df(e,{hunkIndex:t,collapsedLines:i,rangeSize:a,hunkSpecs:o,isFirstHunk:s,isLastHunk:c,isExpandable:f},d){if(i<=0)return;const h=e==="unified"?d.unifiedContentAST:e==="deletions"?d.deletionsContentAST:d.additionsContentAST;if(d.hunkSeparators==="metadata"){o!=null&&(d.pushToGutter(e,Sa({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),h.push(Sa({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1));return}if(d.hunkSeparators==="simple"){t>0&&(d.pushToGutter(e,Sa({type:"simple",isFirstHunk:s,isLastHunk:!1})),h.push(Sa({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&d.incrementRowCount(1));return}const y=xM(e,t),g=a>d.expansionLineCount,b=f?t:void 0;d.pushToGutter(e,Sa({type:d.hunkSeparators,content:ov(i),expandIndex:b,chunked:g,slotName:y,isFirstHunk:s,isLastHunk:c})),h.push(Sa({type:d.hunkSeparators,content:ov(i),expandIndex:b,chunked:g,slotName:y,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1),d.hunkData.push({slotName:y,hunkIndex:t,lines:i,type:e,expandable:f?{up:!s,down:!c,chunked:g}:void 0})}function Vs(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function Nf(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function TM(e){const t=e.hunks.at(-1);if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const i=e.additionLines.length-(t.additionLineIndex+t.additionCount),a=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(i!==a)throw new Error(`DiffHunksRenderer.processDiffResult: trailing context mismatch (additions=${i}, deletions=${a}) for ${e.name}`);return Math.min(i,a)}function LM(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function RM(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function DM(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:e?.useTokenTransformer,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,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}let NM=-1;var O_=class{static LoadedCustomComponent=rM;__id=`file-diff:${++NM}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(t={theme:An},i,a=!1){this.options=t,this.workerManager=i,this.isContainerManaged=a,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new AO,this.scrollSyncManager=new EM,this.interactionManager=new vO("diff",Kb(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 DM(t)}createHunksRenderer(t){return new AM(this.getHunksRendererOptions(t),this.handleHighlightRender,this.workerManager)}getLineIndex=(t,i="additions")=>{if(this.fileDiff==null)return;const a=this.fileDiff.hunks.at(-1);let o,s;e:for(const c of this.fileDiff.hunks){let f=i==="deletions"?c.deletionStart:c.additionStart;const d=i==="deletions"?c.deletionCount:c.additionCount;let h=c.splitLineStart,y=c.unifiedLineStart;if(t<f){const g=f-t;o=Math.max(y-g,0),s=Math.max(h-g,0);break e}if(t>=f+d){if(c===a){const g=t-(f+d);o=y+c.unifiedLineCount+g,s=h+c.splitLineCount+g;break e}continue}for(const g of c.hunkContent)if(g.type==="context")if(t<f+g.lines){const b=t-f;s=h+b,o=y+b;break e}else f+=g.lines,h+=g.lines,y+=g.lines;else{const b=i==="deletions"?g.deletions:g.additions;if(t<f+b){const v=t-f;o=y+(i==="additions"?g.deletions:0)+v,s=h+v;break e}else f+=b,h+=Math.max(g.deletions,g.additions),y+=g.deletions+g.additions}break e}if(!(o==null||s==null))return[o,s]};setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Kb(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 i=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===i?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Wh(this.appliedThemeCSS.theme,this.options.theme??An)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,i,a){return!(t||i||a||typeof this.options.hunkSeparators=="function")}setSelectedLines(t,i){this.interactionManager.setSelection(t,i)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:t="split",overflow:i="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,i==="wrap"),i==="scroll"&&t==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(t=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,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=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),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.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:i,prerenderedHTML:a,preventEmit:o=!1,lineAnnotations:s,oldFile:c,newFile:f,fileDiff:d}=t;this.hydrateElements(i,a),IM(this.pre,OM({fileDiff:d,oldFile:c,newFile:f}),this.options.collapsed)||zM(this.headerElement,MM({fileDiff:d,oldFile:c,newFile:f}),this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({fileDiff:d,oldFile:c,newFile:f,lineAnnotations:s}),o||this.emitPostRender()}hydrateElements(t,i){this.fileContainer!==t&&this.emitPostRender(!0),nM(t,i);for(const a of t.shadowRoot?.children??[]){if(a instanceof SVGElement){this.spriteSVG=a;continue}if(a instanceof HTMLElement){if(a instanceof HTMLPreElement){this.pre=a;for(const o of a.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 a.dataset){this.headerElement=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(lh)){this.themeCSSStyle=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(oh)){this.unsafeCSSStyle=a,this.appliedUnsafeCSS=a.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:t,oldFile:i,newFile:a,lineAnnotations:o}){this.lineAnnotations=o??this.lineAnnotations,this.additionFile=a,this.deletionFile=i,this.fileDiff=t??(i!=null&&a!=null?yh(i,a,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,i,a)=>{this.expandHunk(t,i,a)};expandHunk=(t,i,a)=>{this.hunksRenderer.expandHunk(t,i,a),this.rerender()};render({oldFile:t,newFile:i,fileDiff:a,deferManagers:o=!1,forceRender:s=!1,preventEmit:c=!1,lineAnnotations:f,fileContainer:d,containerWrapper:h,renderRange:y}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:g=!1,themeType:b="system"}=this.options,v=g?void 0:y,S=this.hasThemeChanged(),w=t!=null&&i!=null&&(!jb(t,this.deletionFile)||!jb(i,this.additionFile));let R=a!=null&&a!==this.fileDiff;const C=f!=null&&(f.length>0||this.lineAnnotations.length>0)?f!==this.lineAnnotations:!1;if(!g&&k_(v,this.renderRange)&&!s&&!C&&!S&&(a!=null&&a===this.fileDiff||a==null&&!w))return this.applyCachedThemeState(b);const{renderRange:k}=this;if(this.renderRange=v,this.deletionFile=t,this.additionFile=i,a!=null?this.fileDiff=a:t!=null&&i!=null&&w&&(R=!0,this.fileDiff=yh(t,i,this.options.parseDiffOptions)),R&&(this.cachedHeaderHTML=void 0),f!=null&&this.setLineAnnotations(f),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:A=!1,disableFileHeader:H=!1}=this.options;if(H&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),d=this.getOrCreateFileContainer(d,h),this.applyCachedThemeState(b),g){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const U=this.hunksRenderer.renderDiff(this.fileDiff,bN);U!=null&&this.applyThemeState(d,U.themeStyles,b,U.baseThemeType),U?.headerElement!=null&&this.applyHeaderToDOM(U.headerElement,d),this.renderSeparators([]),this.injectUnsafeCSS()}catch(U){if(A)throw U;console.error(U),U instanceof Error&&this.applyErrorToDOM(U,d)}return c||this.emitPostRender(),!0}try{const U=this.getOrCreatePreNode(d);if(!(this.canPartiallyRender(s,C,w||R||S)&&this.applyPartialRender({previousRenderRange:k,renderRange:v}))){const D=this.hunksRenderer.renderDiff(this.fileDiff,v);if(D==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(d,D.themeStyles,b,D.baseThemeType),D.headerElement!=null&&this.applyHeaderToDOM(D.headerElement,d),D.additionsContentAST!=null||D.deletionsContentAST!=null||D.unifiedContentAST!=null?this.applyHunksToDOM(U,D):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(D.hunkData)}this.applyBuffers(U,v),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,o||this.flushManagers()}catch(U){if(A)throw U;console.error(U),U instanceof Error&&this.applyErrorToDOM(U,d)}return c||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:i,options:{onPostRender:a}}=this;if(t){if(!this.mounted||(this.mounted=!1,i==null))return;this.options.onPostRender?.(i,this,"unmount");return}if(i==null)return;const o=this.mounted?"update":"mount";this.mounted=!0,a?.(i,this,o)}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 i=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",i.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}primeHighlightCache(){const{fileDiff:t,workerManager:i}=this;if(t==null||i==null||fh(t))return;const a=this.options.tokenizeMaxLength??sh;Math.max(t.additionLines.length,t.deletionLines.length)>a||i.primeDiffHighlightCache(t)}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.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.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:i}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof i!="function"){for(const{element:o}of this.separatorCache.values())o.remove();this.separatorCache.clear();return}const a=new Map(this.separatorCache);for(const o of t){const s=o.slotName;let c=this.separatorCache.get(s);if(c==null||!RM(o,c.hunkData)){c?.element.remove();const f=document.createElement("div");f.style.display="contents",f.slot=o.slotName;const d=i(o,this);d!=null&&f.appendChild(d),this.fileContainer.appendChild(f),c={element:f,hunkData:o},this.separatorCache.set(s,c)}a.delete(s)}for(const[o,{element:s}]of a.entries())this.separatorCache.delete(o),s.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:a}of this.annotationCache.values())a.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:i}=this.options;if(i!=null&&this.lineAnnotations.length>0)for(const[a,o]of this.lineAnnotations.entries()){const s=`${a}-${no(o)}`;let c=this.annotationCache.get(s);if(c==null||!LM(o,c.annotation)){c?.element.remove();const f=i(o);if(f==null)continue;c={element:FO(no(o)),annotation:o},c.element.appendChild(f),this.fileContainer.appendChild(c.element),this.annotationCache.set(s,c)}t.delete(s)}for(const[a,{element:o}]of t.entries())this.annotationCache.delete(a),o.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const i=t(this.interactionManager.getHoveredLine);if(i!=null&&this.gutterUtilityContent!=null)return;if(i==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const a=qO();a.appendChild(i),this.fileContainer.appendChild(a),this.gutterUtilityContent=a}getOrCreateFileContainer(t,i){const{fileContainer:a}=this,o=t??a??document.createElement(su),s=a!==o;return s&&this.emitPostRender(!0),this.fileContainer=o,a!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),i!=null&&this.fileContainer.parentNode!==i&&i.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:i}=t;if(i!=null)for(const a of i.children)a instanceof SVGElement?this.spriteSVG??=a:Zb(a)&&a.hasAttribute(lh)?(this.themeCSSStyle??=a,this.hasAdoptedThemeCSS=!0):Zb(a)&&a.hasAttribute(oh)&&(this.unsafeCSSStyle??=a,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const i=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const a=document.createElement("div");a.innerHTML=VO;const o=a.firstChild;o instanceof SVGElement&&(this.spriteSVG=o)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==i&&i.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const i=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,i.appendChild(this.pre)):this.pre.parentNode!==i&&(i.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 i of Array.from(t.children))i instanceof HTMLElement&&(i.hasAttribute("data-unified")?this.codeUnified=i:i.hasAttribute("data-deletions")?this.codeDeletions=i:i.hasAttribute("data-additions")&&(this.codeAdditions=i))}applyHeaderToDOM(t,i){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:a}=this,o=this.cachedHeaderHTML??Da(t);if(this.cachedHeaderHTML=o,o!==this.lastRenderedHeaderHTML){const y=document.createElement("div");y.innerHTML=o;const g=y.firstElementChild;if(!(g instanceof HTMLElement))return;this.headerElement!=null?i.shadowRoot?.replaceChild(g,this.headerElement):i.shadowRoot?.prepend(g),this.headerElement=g,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged||a==null)return;const{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderMetadata:f}=this.options;if(s!=null){const y=s(a)??void 0;this.headerCustom=this.upsertHeaderSlotElement(i,this.headerCustom,Kh,y),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const d=c?.(a)??void 0,h=f?.(a)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(i,this.headerPrefix,Qh,d),this.headerMetadata=this.upsertHeaderSlotElement(i,this.headerMetadata,Zh,h),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,i,a,o){if(o==null){i?.remove();return}const s=i??this.createHeaderSlotElement(a);return i==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,o),s}replaceHeaderSlotContent(t,i){t.replaceChildren(),i instanceof Element?t.appendChild(i):t.innerText=`${i}`}createHeaderSlotElement(t){const i=document.createElement("div");return i.slot=t,i}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,i=this.fileContainer?.shadowRoot;if(i!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===i&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=YO(),this.unsafeCSSStyle.parentNode!==i&&i.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=ZO(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,i,a,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),c=o??a,f=this.options.theme??An,d=typeof f=="string"?f:{...f},h=mh(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===i&&this.appliedThemeCSS.themeType===c&&this.appliedThemeCSS.scrollbarGutter===h){this.appliedThemeCSS.theme=d;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:d,themeStyles:i,themeType:c,baseThemeType:o,scrollbarGutter:h};return}this.themeCSSStyle=eM({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:KO(i,c,h)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:d,themeStyles:i,themeType:c,baseThemeType:o,scrollbarGutter:h}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=WO(this.themeCSSStyle.textContent??"",mh(t)))}applyHunksToDOM(t,i){const{overflow:a="scroll"}=this.options,o=(this.options.hunkSeparators??"line-info")==="line-info",s=a==="wrap"?i.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,i);let c=!1;const f=[],d=this.hunksRenderer.renderCodeAST("unified",i),h=this.hunksRenderer.renderCodeAST("deletions",i),y=this.hunksRenderer.renderCodeAST("additions",i);d!=null?(c=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=Af({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:o}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(d),f.push(this.codeUnified)):h!=null||y!=null?(h!=null?(c=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Af({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:o}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(h),f.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),y!=null?(c=c||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Af({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:o}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(y),f.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),f.length===0?t.textContent="":c&&t.replaceChildren(...f),this.lastRowCount=i.rowCount}applyPartialRender({previousRenderRange:t,renderRange:i}){const{pre:a,codeUnified:o,codeAdditions:s,codeDeletions:c,options:{diffStyle:f="split"}}=this;if(a==null||t==null||i==null||!Number.isFinite(t.totalLines)||!Number.isFinite(i.totalLines)||this.lastRowCount==null)return!1;const d=this.getCodeColumns(f,o,c,s);if(d==null)return!1;const h=t.startingLine,y=i.startingLine,g=h+t.totalLines,b=y+i.totalLines,v=Math.max(h,y),S=Math.min(g,b);if(S<=v)return!1;const w=Math.max(0,v-h),R=Math.max(0,g-S),C=this.trimColumns({columns:d,trimStart:w,trimEnd:R,previousStart:h,overlapStart:v,overlapEnd:S,diffStyle:f});if(C<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<C)throw new Error("applyPartialRender: trimmed beyond DOM row count");let k=this.lastRowCount-C;const A=(B,re)=>{if(!(re<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:B,totalLines:re,bufferBefore:0,bufferAfter:0})},H=A(y,Math.max(v-y,0));if(H==null&&y<v)return!1;const U=A(S,Math.max(b-S,0));if(U==null&&b>S)return!1;const D=(B,re)=>{if(B!=null){if(f==="unified"&&!Array.isArray(d))this.insertPartialHTML(f,d,B,re);else if(f==="split"&&Array.isArray(d))this.insertPartialHTML(f,d,B,re);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");k+=B.rowCount}};return this.cleanupErrorWrapper(),D(H,"afterbegin"),D(U,"beforeend"),this.lastRowCount!==k&&(this.applyRowSpan(f,d,k),this.lastRowCount=k),!0}insertPartialHTML(t,i,a,o){if(t==="unified"&&!Array.isArray(i)){const s=this.hunksRenderer.renderCodeAST("unified",a);this.renderPartialColumn(i,s,o)}else if(t==="split"&&Array.isArray(i)){const s=this.hunksRenderer.renderCodeAST("deletions",a),c=this.hunksRenderer.renderCodeAST("additions",a);this.renderPartialColumn(i[0],s,o),this.renderPartialColumn(i[1],c,o)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(t,i,a){if(t==null||i==null)return;const o=dv(i[0]),s=dv(i[1]);if(o==null||s==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const c=s.at(0);a==="beforeend"&&c?.type==="element"&&typeof c.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(c.properties["data-buffer-size"],t.content.children[t.content.children.length-1],t.gutter.children[t.gutter.children.length-1],o,s,!0);const f=s.at(-1);a==="afterbegin"&&f?.type==="element"&&typeof f.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(f.properties["data-buffer-size"],t.content.children[0],t.gutter.children[0],o,s,!1),t.gutter.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(o)),t.content.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(s))}mergeBuffersIfNecessary(t,i,a,o,s,c){if(!(i instanceof HTMLElement)||!(a instanceof HTMLElement))return;const f=this.getBufferSize(i.dataset);f!=null&&(c?(o.shift(),s.shift()):(o.pop(),s.pop()),this.updateBufferSize(i,f+t),this.updateBufferSize(a,f+t))}applyRowSpan(t,i,a){const o=s=>{s!=null&&(s.gutter.style.setProperty("grid-row",`span ${a}`),s.content.style.setProperty("grid-row",`span ${a}`))};if(t==="unified"&&!Array.isArray(i))o(i);else if(t==="split"&&Array.isArray(i))o(i[0]),o(i[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(t,i,a){let o=0,s=0,c=0,f=!1;const d=a>=0;if(t==null)return 0;const h=Array.from(t.content.children),y=Array.from(t.gutter.children);if(h.length!==y.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;c<h.length&&!(i<=0&&!d&&!f);){const g=y[c],b=h[c];if(c++,!(g instanceof HTMLElement)||!(b instanceof HTMLElement))throw console.error({gutterElement:g,contentElement:b}),new Error("FileDiff.trimColumnRows: invalid row elements");if(f&&(f=!1,g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in b.dataset||g.dataset.gutterBuffer==="metadata"&&"noNewline"in b.dataset)){g.remove(),b.remove(),s++;continue}if("lineIndex"in g.dataset&&"lineIndex"in b.dataset){(i>0||d&&o>=a)&&(g.remove(),b.remove(),i>0&&(i--,i===0&&(f=!0)),s++),o++;continue}if("separator"in g.dataset&&"separator"in b.dataset){(i>0||d&&o>=a)&&(g.remove(),b.remove(),s++);continue}if(g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in b.dataset){(i>0||d&&o>=a)&&(g.remove(),b.remove(),s++);continue}if(g.dataset.gutterBuffer==="metadata"&&"noNewline"in b.dataset){(i>0||d&&o>=a)&&(g.remove(),b.remove(),s++);continue}if(g.dataset.gutterBuffer==="buffer"&&"contentBuffer"in b.dataset){const v=this.getBufferSize(b.dataset);if(v==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(i>0){const S=Math.min(i,v),w=v-S;w>0?(this.updateBufferSize(g,w),this.updateBufferSize(b,w),s+=S):(g.remove(),b.remove(),s+=v),i-=S,i===0&&w===0&&(f=!0)}else if(d){const S=o,w=o+v-1;if(a<=S)g.remove(),b.remove(),s+=v;else if(a<=w){const R=w-a+1,C=v-R;this.updateBufferSize(g,C),this.updateBufferSize(b,C),s+=R}}o+=v;continue}throw console.error({gutterElement:g,contentElement:b}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:t,diffStyle:i,overlapEnd:a,overlapStart:o,previousStart:s,trimEnd:c,trimStart:f}){const d=Math.max(0,o-s),h=a-s;if(h<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const y=f>0,g=c>0;if(!y&&!g)return 0;const b=y?d:0,v=g?h:-1;if(i==="unified"&&!Array.isArray(t))return this.trimColumnRows(t,b,v);if(i==="split"&&Array.isArray(t)){const S=this.trimColumnRows(t[0],b,v),w=this.trimColumnRows(t[1],b,v);if(t[0]!=null&&t[1]!=null&&S!==w)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?S:w}else throw console.error({diffStyle:i,columns:t}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(t){const i=Number.parseInt(t?.bufferSize??"",10);return Number.isNaN(i)?void 0:i}updateBufferSize(t,i){t.dataset.bufferSize=`${i}`,t.style.setProperty("grid-row",`span ${i}`),t.style.setProperty("min-height",`calc(${i} * 1lh)`)}getCodeColumns(t,i,a,o){function s(c){if(c==null)return;const f=c.children[0],d=c.children[1];if(!(!(f instanceof HTMLElement)||!(d instanceof HTMLElement)||f.dataset.gutter==null||d.dataset.content==null))return{gutter:f,content:d}}if(t==="unified")return s(i);{const c=s(a),f=s(o);return c!=null||f!=null?[c,f]:void 0}}applyBuffers(t,i){if(i==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}i.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${i.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),i.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${i.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:i,deletionsContentAST:a,totalLines:o},s){const{diffIndicators:c="bars",disableBackground:f=!1,disableLineNumbers:d=!1,overflow:h="scroll",diffStyle:y="split"}=this.options,g={type:"diff",diffIndicators:c,disableBackground:f,disableLineNumbers:d,overflow:h,split:y==="unified"?!1:i!=null&&a!=null,totalLines:o,customProperties:s};GO(g,this.appliedPreAttributes)||(iM(t,g),this.appliedPreAttributes=g)}applyErrorToDOM(t,i){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const a=i.shadowRoot??i.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",a.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 OM({fileDiff:e,oldFile:t,newFile:i}){return e!=null&&e.hunks.length>0||t!=null||i!=null}function MM({fileDiff:e,oldFile:t,newFile:i}){return e!=null||t!=null||i!=null}function IM(e,t,i=!1){return!i&&e==null&&t}function zM(e,t,i=!1){return e==null&&t&&!i}function dv(e){if(!(e==null||e.type!=="element"))return e.children??[]}const bh=5e3;let HM=-1;var UM=class extends O_{__id=`little-virtualized-file-diff:${++HM}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,i,a,o=!1){super(e,a,o),this.virtualizer=t,this.metrics=Cf(i)}setMetrics(e,t=!1){const i=Cf(e);!t&&ph(this.metrics,i)||(this.metrics=i,this.resetLayoutCache({includeEstimatedHeights:!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,i=!w_(t,e),a=i&&$M(t,e);super.setOptions(e),a&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:FM(t,e)}),i&&(this.forceRenderOverride=!0),i&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,a)}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}={}){this.layoutDirty=!0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}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 i=this.getDiffStyle(),a=i==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(const o of a){if(o==null)continue;const s=o.children[1];if(s instanceof HTMLElement)for(const c of s.children){if(!(c instanceof HTMLElement))continue;const f=c.dataset.lineIndex;if(f==null)continue;const d=YM(f,i);let h=c.getBoundingClientRect().height,y=!1;c.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in c.nextElementSibling.dataset||"noNewline"in c.nextElementSibling.dataset)&&("noNewline"in c.nextElementSibling.dataset&&(y=!0),h+=c.nextElementSibling.getBoundingClientRect().height);const g=this.getEstimatedLineHeight(y),b=this.cache.heightDeltas.get(d)??0,v=h-g;v!==b&&(e=!0,this.cache.measuredHeightDeltaTotal+=v-b,v===0?this.cache.heightDeltas.delete(d):this.cache.heightDeltas.set(d,v))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,i){const a=!Bl(this.fileDiff,e);let o=i?.resetDiffLayoutCache===!0||a,s=a||i?.resetDiffLayoutCache===!0&&i.includeEstimatedDiffHeights;i?.metrics!=null&&(this.metrics=Cf(i.metrics),o=!0,s=!0);const{collapsed:c=!1}=this.options;return this.currentCollapsed!==c&&(this.currentCollapsed=c,o=!0),o&&this.resetLayoutCache({includeEstimatedHeights:s}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null)return;const i=this.getLineIndex(e,t);if(i==null)return;const{disableFileHeader:a=!1,expandUnchanged:o=!1,collapsed:s=!1,collapsedContextThreshold:c=cn}=this.options,f=this.getDiffStyle(),d=this.getHunkSeparatorType(),h=f==="split"?i[1]:i[0];this.approximateLayoutCheckpoints();const y=this.getLayoutCheckpointBeforeLineIndex(h);let g=y?.top??wa(this.metrics,a);if(s)return{top:g,height:0};let b;return Ql({diff:this.fileDiff,diffStyle:f,startingLine:y?.renderedLineIndex??0,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:v,hunk:S,collapsedBefore:w,collapsedAfter:R,deletionLine:C,additionLine:k})=>{const A=f==="split"?k?.splitLineIndex??C?.splitLineIndex:k?.unifiedLineIndex??C?.unifiedLineIndex;if(A==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(w>0){const U=jl({type:d,metrics:this.metrics,hunkIndex:v,hunkSpecs:S?.hunkSpecs});if(U!=null){if(g+=U.gapBefore,h>=A-w&&h<A)return b={top:g,height:U.height},!0;g+=U.height+U.gapAfter}}const H=this.getLineHeight(A,(k?.noEOFCR??!1)||(C?.noEOFCR??!1));if(A===h)return b={top:g,height:H},!0;if(g+=H,R>0){const U=Vl({type:d,metrics:this.metrics});if(U!=null){if(h>A&&h<=A+R)return b={top:g+U.gapBefore,height:U.height},!0;g+=U.totalHeight}}return!1}}),b}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=cn}=this.options;if(a)return;const s=this.getDiffStyle(),c=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const f=this.getLayoutCheckpointBeforeTop(e);let d=f?.top??wa(this.metrics,t),h;return Ql({diff:this.fileDiff,diffStyle:s,startingLine:f?.renderedLineIndex??0,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:y,hunk:g,collapsedBefore:b,collapsedAfter:v,deletionLine:S,additionLine:w})=>{const R=s==="split"?w?.splitLineIndex??S?.splitLineIndex:w?.unifiedLineIndex??S?.unifiedLineIndex;if(R==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(b>0){const k=jl({type:c,metrics:this.metrics,hunkIndex:y,hunkSpecs:g?.hunkSpecs});k!=null&&(d+=k.totalHeight)}if(d>=e&&(S!=null?h={lineNumber:S.lineNumber,side:"deletions",top:d}:w!=null&&(h={lineNumber:w.lineNumber,side:"additions",top:d}),h!=null))return!0;const C=this.getLineHeight(R,(w?.noEOFCR??!1)||(S?.noEOFCR??!1));if(d+=C,v>0){const k=Vl({type:c,metrics:this.metrics});k!=null&&(d+=k.totalHeight)}return!1}}),h}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:i,bufferAfter:a,totalLines:o}=t;let s=0;if(o===0){const c=e??this.virtualizer.getWindowSpecs();this.top<c.top&&(s=a)}return{topOffset:this.top+i+s,height:this.height-(i+a)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,i)=>{this.hunksRenderer.expandHunk(e,t,i),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};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))}computeApproximateSize(e=!1){const t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;const i=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}const{disableFileHeader:a=!1,collapsed:o=!1}=this.options,s=wa(this.metrics,a);if(this.height+=s,o){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!i&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();const e=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(e==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return e}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:i=cn}=this.options,{splitHeight:a,unifiedHeight:o}=aM({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i});this.cache.estimatedSplitHeight=a,this.cache.estimatedUnifiedHeight=o}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;const e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,oldFile:t,newFile:i,fileDiff:a,forceRender:o=!1,...s}={}){const{forceRenderOverride:c,isSetup:f}=this;if(this.forceRenderOverride=void 0,this.fileDiff??=a??(t!=null&&i!=null?yh(t,i,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(f)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const g=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(g==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");g.connect(e,this),this.isVisible=g.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const d=this.virtualizer.getWindowSpecs(),h=this.top??0,y=this.computeRenderRangeFromWindow(this.fileDiff,h,d);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:y,oldFile:t,newFile:i,forceRender:c??o,...s})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}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}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return qM(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:i=cn}=this.options,a=this.getDiffStyle(),o=this.getHunkSeparatorType(),s=t?!0:this.hunksRenderer.getExpandedHunksMap(),c=PM(this.cache.heightDeltas);let f=wa(this.metrics,e),d=0;const h=({rowCount:y,startLineIndex:g,preSeparatorHeight:b=0,postSeparatorHeight:v=0,metadataOffsets:S=[]})=>{if(y<=0)return;const w=d,R=d+y;let C=BM(w);for(;C<R;){const k=C-w,A=f+(k>0?b:0)+k*this.metrics.lineHeight+jM(S,k)*this.metrics.lineHeight+fv(c,g,g+k);this.cache.checkpoints.push({renderedLineIndex:C,lineIndex:g+k,top:A}),C+=bh}f+=b+y*this.metrics.lineHeight+S.length*this.metrics.lineHeight+fv(c,g,g+y)+v,d=R};for(let y=0;y<this.fileDiff.hunks.length;y++){const g=this.fileDiff.hunks[y];if(g==null)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const b=Xn({isPartial:this.fileDiff.isPartial,rangeSize:g.collapsedBefore,expandedHunks:s,hunkIndex:y,collapsedContextThreshold:i}),v=b.collapsedLines>0?jl({type:o,metrics:this.metrics,hunkIndex:y,hunkSpecs:g.hunkSpecs})?.totalHeight??0:0;h({rowCount:b.fromStart,startLineIndex:(a==="split"?g.splitLineStart:g.unifiedLineStart)-b.rangeSize});let S=v;h({rowCount:b.fromEnd,startLineIndex:(a==="split"?g.splitLineStart:g.unifiedLineStart)-b.fromEnd,preSeparatorHeight:S}),b.fromEnd>0&&(S=0);const w=GM({fileDiff:this.fileDiff,hunk:g,hunkIndex:y,expandedHunks:s,collapsedContextThreshold:i}),R=w!=null&&w.collapsedLines>0?Vl({type:o,metrics:this.metrics})?.totalHeight??0:0,C=w!=null?w.fromStart+w.fromEnd:0,k=a==="split"?g.splitLineCount:g.unifiedLineCount,A=a==="split"?g.splitLineStart:g.unifiedLineStart;h({rowCount:k,startLineIndex:A,preSeparatorHeight:S,postSeparatorHeight:C===0?R:0,metadataOffsets:VM({diffStyle:a,hunk:g,rowCount:k})}),w!=null&&C>0&&h({rowCount:C,startLineIndex:A+k,postSeparatorHeight:R})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,i=this.cache.checkpoints.length-1,a;for(;t<=i;){const o=t+i>>1,s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");s.lineIndex<=e?(a=s,t=o+1):i=o-1}return a}getLayoutCheckpointBeforeTop(e,t){let i=0,a=this.cache.checkpoints.length-1,o=-1;for(;i<=a;){const s=i+a>>1,c=this.cache.checkpoints[s];if(c==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");c.top<=e?(o=s,i=s+1):a=s-1}if(t==null)return o>=0?this.cache.checkpoints[o]:void 0;for(let s=o;s>=0;s--){const c=this.cache.checkpoints[s];if(c==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(c.renderedLineIndex%t===0)return c}}getExpandedLineCount(e,t){let i=0;if(e.isPartial){for(const f of e.hunks)i+=t==="split"?f.splitLineCount:f.unifiedLineCount;return i}const{expandUnchanged:a=!1,collapsedContextThreshold:o=cn}=this.options,s=a?!0:this.hunksRenderer.getExpandedHunksMap();for(const[f,d]of e.hunks.entries()){const h=t==="split"?d.splitLineCount:d.unifiedLineCount;i+=h;const y=Math.max(d.collapsedBefore,0),{fromStart:g,fromEnd:b,renderAll:v}=Xn({isPartial:e.isPartial,rangeSize:y,expandedHunks:s,hunkIndex:f,collapsedContextThreshold:o});y>0&&(i+=v?y:g+b)}const c=e.hunks.at(-1);if(c!=null&&M_(e)){const f=e.additionLines.length-(c.additionLineIndex+c.additionCount),d=e.deletionLines.length-(c.deletionLineIndex+c.deletionCount);if(c!=null&&f!==d)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${f}, deletions=${d}) for ${e.name}`);const h=Math.min(f,d);if(c!=null&&h>0){const{fromStart:y,renderAll:g}=Xn({isPartial:e.isPartial,rangeSize:h,expandedHunks:s,hunkIndex:e.hunks.length,collapsedContextThreshold:o});i+=g?h:y}}return i}computeRenderRangeFromWindow(e,t,{top:i,bottom:a}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=cn}=this.options,{hunkLineCount:f,lineHeight:d}=this.metrics,h=this.getDiffStyle(),y=this.getHunkSeparatorType(),g=this.height;let b=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,h);const v=wa(this.metrics,o),S=e.hunks.length>0?S_(this.metrics):0;if(t<i-g||t>a)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-v-S};if(b<=f||e.hunks.length===0)return{startingLine:0,totalLines:f,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),b=this.cache.totalLines>0?this.cache.totalLines:b;const w=Math.ceil(Math.max(a-i,0)/d),R=Math.ceil(w/f)*f+f,C=R/f,k=C,A=[],H=(i+a)/2,U=this.getLayoutCheckpointBeforeTop(Math.max(0,i-t-R*d*2),f);let D=t+(U?.top??v),B=U?.renderedLineIndex??0,re,j,se;if(Ql({diff:e,diffStyle:h,startingLine:U?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:le,hunk:fe,collapsedBefore:L,collapsedAfter:O,deletionLine:X,additionLine:T})=>{const ue=T!=null?T.splitLineIndex:X.splitLineIndex,ge=T!=null?T.unifiedLineIndex:X.unifiedLineIndex,he=(T?.noEOFCR??!1)||(X?.noEOFCR??!1),Ee=(L>0?jl({type:y,metrics:this.metrics,hunkIndex:le,hunkSpecs:fe?.hunkSpecs}):void 0)?.totalHeight??0;D+=Ee;const Re=B%f===0,me=Math.floor(B/f);if(Re&&(A[me]=D-(t+v+Ee),se!=null)){if(se<=0)return!0;se--}const Ve=this.getLineHeight(h==="split"?ue:ge,he);return D>i-Ve&&D<a&&(re??=me),j==null&&D+Ve>H&&(j=me),se==null&&D>=a&&Re&&(se=k),B++,D+=Ve,O>0&&(D+=Vl({type:y,metrics:this.metrics})?.totalHeight??0),!1}}),re==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-v-S};j??=re;const Z=Math.round(j-C/2),W=Math.max(0,Math.ceil(b/f)-C),Q=Math.max(0,Math.min(Z,W)),ie=Q*f,q=Z<0?R+Z*f:R,z=A[Q]??0,$=Q+q/f;return{startingLine:ie,totalLines:q,bufferBefore:z,bufferAfter:$<A.length?g-v-A[$]-S:g-(D-t)-S}}};function PM(e){const t=Array.from(e).sort((s,c)=>s[0]-c[0]),i=[],a=[0];let o=0;for(const[s,c]of t)i.push(s),o+=c,a.push(o);return{lineIndexes:i,prefixTotals:a}}function fv({lineIndexes:e,prefixTotals:t},i,a){if(i>=a||e.length===0)return 0;const o=hv(e,i);return(t[hv(e,a)]??0)-(t[o]??0)}function hv(e,t){let i=0,a=e.length;for(;i<a;){const o=i+a>>1,s=e[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid prefix index");s<t?i=o+1:a=o}return i}function BM(e){return Math.ceil(e/bh)*bh}function jM(e,t){let i=0;for(const a of e)a<t&&i++;return i}function VM({diffStyle:e,hunk:t,rowCount:i}){if(i<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];const a=t.hunkContent.at(-1);if(a==null)return[];if(a.type==="context")return[i-1];const o=Math.max(a.deletions,a.additions),s=a.deletions+a.additions;if(e==="split")return o>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[i-1]:[];const c=[],f=i-s;return a.deletions>0&&t.noEOFCRDeletions&&c.push(f+a.deletions-1),a.additions>0&&t.noEOFCRAdditions&&c.push(i-1),c}function GM({fileDiff:e,hunk:t,hunkIndex:i,expandedHunks:a,collapsedContextThreshold:o}){if(i!==e.hunks.length-1||!M_(e))return;const s=e.additionLines.length-(t.additionLineIndex+t.additionCount),c=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(s!==c)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${s}, deletions=${c}) for ${e.name}`);return Xn({isPartial:e.isPartial,rangeSize:Math.min(s,c),expandedHunks:a,hunkIndex:e.hunks.length,collapsedContextThreshold:o})}function $M(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.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??cn)!==(t.collapsedContextThreshold??cn)||e.unsafeCSS!==t.unsafeCSS}function FM(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??cn)!==(t.collapsedContextThreshold??cn)}function qM(e){return typeof e=="function"?"custom":e??"line-info"}function M_(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function YM(e,t){const[i,a]=e.split(",").map(Number);return t==="split"?a:i}function XM(e,t){return typeof window>"u"&&t!=null?I.jsxs(I.Fragment,{children:[I.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):I.jsx(I.Fragment,{children:e})}const QM=te.createContext(void 0);function ZM(){return te.useContext(QM)}const KM=typeof window>"u"?te.useEffect:te.useLayoutEffect;function WM({fileDiff:e,options:t,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:f,disableWorkerPool:d}){const h=ZM(),y=a!==void 0,g=te.useContext(gO),b=te.useRef(null),v=CN(S=>{if(S!=null){if(b.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");h!=null?b.current=new UM(Of({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),h,s,d?void 0:g,!0):b.current=new O_(Of({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),d?void 0:g,!0),b.current.hydrate({fileDiff:e,fileContainer:S,lineAnnotations:i,prerenderedHTML:o})}else{if(b.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");b.current.cleanUp(),b.current=null}});return KM(()=>{const{current:S}=b;if(S==null)return;const w=Of({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),R=!w_(S.options,w);S.setOptions(w),S.render({forceRender:R,fileDiff:e,lineAnnotations:i}),a!==void 0&&S.setSelectedLines(a)}),{ref:v,getHoveredLine:te.useCallback(()=>b.current?.getHoveredLine(),[])}}function Of({options:e,controlledSelection:t,hasCustomHeader:i,hasGutterRenderUtility:a}){return!t&&!a&&!i?e:{...e,controlledSelection:t,renderCustomHeader:i?zb:e?.renderCustomHeader,renderGutterUtility:a?zb:e?.renderGutterUtility}}function JM({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:f,renderAnnotation:d,renderCustomHeader:h,renderHeaderPrefix:y,renderHeaderMetadata:g,renderGutterUtility:b,disableWorkerPool:v=!1}){const{ref:S,getHoveredLine:w}=WM({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:f,hasGutterRenderUtility:b!=null,hasCustomHeader:h!=null,disableWorkerPool:v});return I.jsx(su,{ref:S,className:s,style:c,children:XM(EN({fileDiff:e,renderCustomHeader:h,renderHeaderPrefix:y,renderHeaderMetadata:g,renderAnnotation:d,renderGutterUtility:b,lineAnnotations:a,getHoveredLine:w}),f)})}const e8=te.memo(function({onSave:t,onCancel:i}){const a=te.useRef(null),[o,s]=te.useState(!1);te.useEffect(()=>{a.current?.focus()},[]);const c=()=>{const d=a.current?.value??"";t(d,o)},f=d=>{d.key==="Enter"&&(d.metaKey||d.ctrlKey)&&(d.preventDefault(),c()),d.key==="Escape"&&(d.preventDefault(),i())};return I.jsxs("div",{className:"comment-editor",children:[I.jsx("textarea",{ref:a,className:"text-input-area comment-input",onKeyDown:f,placeholder:"Add a comment…",rows:2}),I.jsxs("div",{className:"comment-actions",children:[I.jsx(xu,{checked:o,label:"ask agent",onChange:s}),I.jsx("button",{type:"button",className:"btn ghost",onClick:i,children:"cancel"}),I.jsx("button",{type:"button",className:"btn primary",onClick:c,children:"comment"})]})]})});function ep({additions:e,deletions:t,className:i}){const a=["diff-stats",i].filter(Boolean).join(" ");return I.jsxs("span",{className:a,children:[I.jsxs("span",{className:"stat-add",children:["+",e]}),I.jsxs("span",{className:"stat-del",children:["-",t]})]})}const t8=te.memo(function({thread:t,onAddReply:i,onRequestAgent:a,onToggleResolved:o,onToggleCollapsed:s,onDeleteMessage:c}){const[f,d]=te.useState(!1),[h,y]=te.useState(!1),[g,b]=te.useState(!1),v=te.useRef(null),w=t.messages[t.messages.length-1]?.role==="user"&&!t.loading&&!t.resolved,R=t.messages.length,C=`${t.resolved?"Resolved thread":"Thread"} with ${R} comment${R===1?"":"s"}`,k=t.resolved?"reopen":"resolve";te.useEffect(()=>{f&&v.current?.focus()},[f]);const A=te.useCallback(()=>{const B=v.current?.value.trim()??"";B&&(v.current&&(v.current.value=""),y(!1),d(!1),i(B,g),b(!1))},[i,g]),H=te.useCallback(B=>{B.key==="Enter"&&(B.metaKey||B.ctrlKey)&&(B.preventDefault(),A())},[A]),U=te.useCallback(()=>{o(!t.resolved)},[o,t.resolved]),D=te.useCallback(()=>{v.current&&(v.current.value=""),y(!1),b(!1),d(!1)},[]);return t.collapsed?I.jsx("div",{className:`thread-card collapsed${t.resolved?" resolved":""}`,children:I.jsx("div",{className:"thread-collapsed-row",children:I.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!1),"aria-label":"Expand thread","aria-expanded":!1,children:[I.jsx(_v,{size:14}),I.jsx("span",{className:"thread-summary",children:C})]})})}):I.jsxs("div",{className:`thread-card${t.resolved?" resolved":""}`,children:[I.jsx("div",{className:"thread-header-row",children:I.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!0),"aria-label":"Collapse thread","aria-expanded":!0,children:[I.jsx(vv,{size:14}),I.jsx("span",{className:"thread-summary",children:C})]})}),I.jsxs("div",{className:"thread-messages",children:[t.messages.map((B,re)=>I.jsxs("div",{className:`thread-msg thread-msg-${B.role}`,children:[I.jsxs("div",{className:"thread-msg-header",children:[I.jsx("span",{className:"thread-msg-role",children:B.role==="user"?"you":"agent"}),I.jsx("button",{type:"button",className:"thread-msg-delete",onClick:()=>c(re),"aria-label":`Delete ${B.role==="user"?"your":"agent"} comment`,title:"delete comment",children:I.jsx(Ev,{size:13})})]}),I.jsx(Xh,{content:B.text,className:"thread-msg-text",variant:"thread"})]},`${B.role}:${re}:${B.text}`)),t.loading&&I.jsxs("div",{className:"thread-msg thread-msg-assistant",children:[I.jsx("span",{className:"thread-msg-role",children:"agent"}),I.jsx("span",{className:"thread-msg-thinking",children:"thinking…"})]})]}),I.jsx("div",{className:"thread-footer",children:f?I.jsxs(I.Fragment,{children:[I.jsx("textarea",{ref:v,className:"text-input-area thread-reply-input",onChange:B=>{const re=B.target.value.trim().length>0;y(j=>j===re?j:re)},onKeyDown:H,placeholder:"Reply…",rows:3}),I.jsxs("div",{className:"thread-actions",children:[I.jsx(xu,{checked:g,label:"ask agent",onChange:b}),I.jsx("button",{type:"button",className:"btn ghost",onClick:D,children:"cancel"}),I.jsx("button",{type:"button",className:"btn primary",disabled:!h,onClick:A,children:"comment"})]})]}):I.jsxs("div",{className:"thread-actions",children:[I.jsx("button",{type:"button",className:"btn ghost",onClick:U,children:k}),I.jsx("button",{type:"button",className:"btn",onClick:()=>d(!0),children:"reply"}),w&&I.jsxs("button",{type:"button",className:"btn",onClick:a,children:[I.jsx(Wx,{size:14}),"ask agent"]})]})})]})}),n8={theme:_h,themeType:"dark",diffStyle:"unified",diffIndicators:"none",hunkSeparators:"line-info-basic",lineDiffType:"word-alt",disableFileHeader:!0,overflow:"wrap",unsafeCSS:[":host { --diffs-dark-bg: var(--bg); --diffs-bg: var(--bg); --diffs-annotation-bg-override: color-mix(in srgb, var(--bg) 96%, var(--text)); --diffs-bg-separator-override: color-mix(in srgb, var(--bg) 92%, var(--text)); --diffs-bg-context-override: var(--diffs-annotation-bg-override); --diffs-bg-context-gutter-override: var(--diffs-annotation-bg-override); font-weight: var(--font-weight-code); }","pre { background-color: var(--bg) !important; --diffs-bg: var(--bg) !important; }","[data-line-annotation], [data-gutter-buffer='annotation'] { --diffs-annotation-bg: var(--diffs-annotation-bg-override); }","[data-annotation-slot], [data-annotation-content] { font-family: var(--font-family-ui); }","[data-annotation-slot] code, [data-annotation-slot] pre, [data-annotation-content] code, [data-annotation-content] pre { font-family: var(--font-family-code); }","[data-overflow='wrap'] [data-code] { overflow-x: hidden; }","[data-overflow='wrap'] [data-annotation-content] { width: auto; }"].join(" ")},i8=te.memo(function({file:t,diffStyle:i,overflowMode:a,codeTheme:o,collapsed:s,viewed:c,annotations:f,unresolvedThreadCount:d,renderReady:h,onToggleCollapsed:y,onToggleViewed:g,onLineActivate:b,onSaveDraft:v,onCancelDraft:S,onAddReply:w,onRequestAgent:R,onToggleResolved:C,onToggleThreadCollapsed:k,onDeleteThreadMessage:A}){const H=te.useMemo(()=>({...n8,theme:o,diffStyle:i==="split"?"split":"unified",overflow:a,onLineNumberClick:({lineNumber:B,annotationSide:re})=>{b(t.id,B,re)}}),[o,i,t.id,b,a]),U=te.useCallback(D=>{if(D.metadata.type==="draft")return I.jsx(e8,{onSave:v,onCancel:S});const{thread:B}=D.metadata;return I.jsx(t8,{thread:B,onAddReply:(re,j)=>w(B.id,re,j),onRequestAgent:()=>R(B.id),onToggleResolved:re=>C(B.id,re),onToggleCollapsed:re=>k(B.id,re),onDeleteMessage:re=>A(B.id,re)})},[w,S,R,v,A,C,k]);return I.jsxs("section",{className:`file-section${s?" collapsed":""}`,id:`file-${t.id}`,children:[I.jsxs("div",{className:"file-header",children:[I.jsxs("button",{type:"button",className:"file-toggle",onClick:()=>y(t.id),"aria-label":s?"Expand file":"Collapse file",children:[s?I.jsx(Hx,{size:14}):I.jsx(bv,{size:14}),I.jsx("span",{className:"file-path",children:t.displayPath}),d>0&&I.jsxs("span",{className:"file-thread-count","aria-label":`${d} unresolved comment thread${d===1?"":"s"}`,title:`${d} unresolved comment thread${d===1?"":"s"}`,children:[I.jsx(Sv,{size:12}),I.jsx("span",{children:d})]})]}),I.jsxs("div",{className:"file-meta",children:[I.jsx(ep,{additions:t.additions,deletions:t.deletions}),I.jsx(xu,{checked:c,label:"viewed",className:"viewed-checkbox",onChange:()=>g(t.id)})]})]}),!s&&I.jsx("div",{className:"file-body",children:h?I.jsx(JM,{className:"diff-view",fileDiff:t.file,options:H,lineAnnotations:f,renderAnnotation:U}):I.jsx("div",{className:"diff-placeholder",children:"preparing diff…"})})]})});function r8({open:e,files:t,viewed:i,threads:a,selectedThreadId:o,onJumpToFile:s,onCreateDetachedThread:c,onOpenThread:f}){const d=l8(t);return I.jsxs("aside",{className:`sidebar${e?" open":""}`,children:[I.jsxs("section",{className:"sidebar-section",children:[I.jsxs("div",{className:"sidebar-section-header",children:[I.jsx("h2",{className:"sidebar-section-title",children:"conversations"}),I.jsx("button",{type:"button",className:"btn sidebar-action",onClick:c,children:"new thread"})]}),I.jsx("div",{className:"sidebar-conversations",children:a.length===0?I.jsx("p",{className:"sidebar-empty",children:"no conversations yet"}):a.map(h=>{const y=m8(h),g=h.loading?"active":"idle",b=h.anchor.kind==="line"?Gx:qx,v=h.anchor.kind==="line"?"diff comment":"thread";return I.jsx("button",{type:"button",className:`sidebar-thread-item${o===h.id?" selected":""}${h.resolved?" resolved":""}`,onClick:()=>f(h),title:y,children:I.jsxs("span",{className:"sidebar-thread-row",children:[I.jsx(b,{className:"sidebar-thread-kind",size:13,"aria-label":v}),I.jsx("span",{className:"sidebar-thread-name",children:y}),I.jsx("span",{className:`sidebar-thread-status-dot ${g}`,"aria-label":g,title:g})]})},h.id)})})]}),I.jsx("div",{className:"sidebar-divider"}),I.jsxs("section",{className:"sidebar-section",children:[I.jsx("div",{className:"sidebar-section-header",children:I.jsx("h2",{className:"sidebar-section-title",children:"files"})}),I.jsx("div",{className:"sidebar-file-list",children:d.map((h,y)=>I.jsxs("div",{className:"sidebar-file-group",children:[I.jsx(a8,{directory:h.directory}),h.files.map(g=>I.jsx("button",{type:"button",className:`sidebar-item${i[g.id]?" viewed":""}`,onClick:()=>s(g.id),title:g.displayPath,children:I.jsxs("span",{className:"sidebar-row",children:[I.jsx("span",{className:`sidebar-file-status ${g.status}`,"aria-label":g.status,children:p8(g.status)}),I.jsx("span",{className:"sidebar-file-name",children:f8(g)}),I.jsx(ep,{additions:g.additions,deletions:g.deletions,className:"sidebar-stats"})]})},g.id))]},`${h.directory}:${y}`))})]})]})}function a8({directory:e}){const t=te.useRef(null),[i,a]=te.useState(()=>u8(e)),o=te.useMemo(()=>s8(),[]);return te.useLayoutEffect(()=>{const s=t.current;if(!s)return;const c=()=>{const d=window.getComputedStyle(s);a(c8(e,s.clientWidth,d.font,o))};c();const f=new ResizeObserver(c);return f.observe(s),()=>{f.disconnect()}},[e,o]),I.jsx("div",{ref:t,className:"sidebar-file-directory",title:e,children:i})}function l8(e){const t=[];for(const i of e){const a=o8(i.newRepoPath),o=t[t.length-1];if(o?.directory===a){o.files.push(i);continue}t.push({directory:a,files:[i]})}return t}function o8(e){const t=e.lastIndexOf("/");return t<0?"./":`${e.slice(0,t)}/`}function s8(){const t=document.createElement("canvas").getContext("2d");return(i,a)=>t?(t.font=a,t.measureText(i).width):i.length*8}function u8(e){const t=I_(e);return t.length<=2?e:`${t[0]}/…/${t[t.length-1]}/`}function c8(e,t,i,a){const o=d8(e);for(const s of o)if(a(s,i)<=t)return s;return o[o.length-1]??e}function d8(e){const t=I_(e),i=[e];return t.length>2&&(i.push(`${t[0]}/…/${t.slice(1).join("/")}/`),i.push(`${t[0]}/…/${t.slice(-2).join("/")}/`),i.push(`${t[0]}/…/${t[t.length-1]}/`)),t.length>0&&i.push(`…/${t[t.length-1]}/`),[...new Set(i)]}function I_(e){return e==="./"?[]:e.split("/").filter(Boolean)}function f8(e){return h8(e.newRepoPath)}function h8(e){const t=e.lastIndexOf("/");return t<0?e:e.slice(t+1)}function p8(e){switch(e){case"added":return"A";case"deleted":return"D";case"renamed":return"R";case"copied":return"C";case"type-changed":return"T";case"unmerged":return"U";case"modified":return"M";case"unknown":return"?"}}function m8(e){const t=e.messages.find(a=>a.role==="user"),i=g8(t?.text??"");return i?i.length<=128?i:`${i.slice(0,125).trimEnd()}…`:"new conversation"}function g8(e){return e.replace(/\s+/g," ").trim()}function y8({value:e,options:t,onChange:i}){return I.jsx("div",{className:"toggle-group",role:"radiogroup",children:t.map(a=>I.jsx("button",{type:"button",role:"radio","aria-checked":e===a.value,className:`toggle-group-item${e===a.value?" active":""}`,onClick:()=>i(a.value),children:a.label},a.value))})}const b8=48;function v8(e,t){const i=e?.trim();if(!i)return;const a=t??[];if(a.length===0||i==="current working tree")return{label:"current working tree",title:i};if(i.length<=b8)return{label:i,title:i};const o=a.indexOf("--"),s=o>=0?a.slice(0,o):a,c=o>=0?a.slice(o+1):[],f=s.find(d=>d!=="--"&&!d.startsWith("-"));return f&&c.length>0?{label:`${f} · ${pv(c.length)}`,title:i}:f?{label:`git diff ${f}`,title:i}:c.length>0?{label:`working tree · ${pv(c.length)}`,title:i}:{label:"custom diff",title:i}}function pv(e){return`${e} path${e===1?"":"s"}`}function _8({fileCount:e,viewedCount:t,additions:i,deletions:a,commentCount:o,diffArgs:s,diffCommand:c,diffStyle:f,overflowMode:d,sidebarOpen:h,finished:y,status:g,briefLoading:b,hasBrief:v,hasUnresolvedFileThreads:S,onBriefClick:w,onToggleSidebar:R,onExpandAll:C,onExpandUnresolved:k,onCollapseViewed:A,onCollapseAll:H,onDiffStyleChange:U,onOverflowModeChange:D,onSubmit:B,onOpenSubmitPopover:re,onCancel:j}){const se=f==="split"?"split":"stacked",Z=d==="scroll"?"scroll":"wrap",W=e>0?Math.round(t/e*100):0,Q=v8(c,s);return I.jsxs("header",{className:"top-bar",children:[I.jsxs("div",{className:"top-bar-left",children:[I.jsx(Ea,{icon:Xx,label:"Toggle sidebar",className:h?"active":"",onClick:R}),I.jsxs("button",{type:"button",className:"btn top-bar-action top-bar-brief-action",onClick:w,disabled:b,children:[I.jsx(Zx,{size:14}),b?"generating brief…":v?"view brief":"brief"]}),I.jsxs("div",{className:"top-bar-diff-meta","aria-label":`${i} additions and ${a} deletions${Q?`, ${Q.title}`:""}`,children:[I.jsx(ep,{additions:i,deletions:a}),Q&&I.jsx("span",{className:"top-bar-meta top-bar-meta-dim top-bar-diff-command",title:Q.title,children:Q.label})]})]}),I.jsxs("div",{className:"top-bar-right",children:[I.jsxs("div",{className:"top-bar-viewed","aria-label":`${t} of ${e} viewed, ${o} unresolved comments`,children:[I.jsx("span",{className:"top-bar-viewed-ring",style:{background:`conic-gradient(var(--accent-add) ${W}%, var(--border) ${W}% 100%)`},"aria-hidden":"true",children:I.jsx("span",{className:"top-bar-viewed-ring-inner"})}),I.jsxs("span",{className:"top-bar-viewed-text",children:[t," of ",e," viewed"]})]}),g&&I.jsx("span",{className:"top-bar-meta top-bar-status",children:g}),I.jsxs("div",{className:"btn-group",children:[I.jsx(Ea,{icon:_v,label:"Expand all files",onClick:C}),I.jsx(Ea,{icon:Sv,label:"Expand files with unresolved threads",onClick:k,disabled:!S}),I.jsx(Ea,{icon:jx,label:"Collapse viewed files",onClick:A}),I.jsx(Ea,{icon:vv,label:"Collapse all files",onClick:H})]}),I.jsxs("button",{type:"button",className:`top-bar-toggle${Z==="wrap"?" active":""}`,onClick:()=>D(Z==="wrap"?"scroll":"wrap"),"aria-pressed":Z==="wrap","aria-label":"Toggle wrapped diff lines",children:[I.jsx("span",{className:"top-bar-toggle-switch","aria-hidden":"true",children:I.jsx("span",{className:"top-bar-toggle-thumb"})}),I.jsx("span",{className:"top-bar-toggle-label",children:"wrap"})]}),I.jsx(y8,{value:se,options:[{value:"split",label:"split"},{value:"stacked",label:"stacked"}],onChange:U}),I.jsxs("div",{className:"top-bar-submit-group",children:[I.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary top-bar-submit-main",onClick:B,disabled:y,children:"submit"}),I.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary top-bar-submit-menu",onClick:ie=>re(ie.currentTarget.getBoundingClientRect()),disabled:y,"aria-label":"submit with message",children:I.jsx(bv,{size:14})})]}),I.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-cancel",onClick:j,disabled:y,"aria-label":"cancel",children:I.jsx(xv,{size:14,strokeWidth:2.25})})]})]})}function S8(e,t,i){if(!e.trim())return[];const a=gM(e,i),o=x8(t);let s=0;return a.flatMap(c=>c.files.map(f=>{const d=C8(f,o);return{id:f.cacheKey??`${f.name}::${s++}`,file:f,displayPath:d.displayPath,status:d.status,oldRepoPath:d.oldRepoPath,newRepoPath:d.newRepoPath,additions:mv(f,"additions"),deletions:mv(f,"deletions")}}))}function E8(e){return e.prevName&&e.prevName!==e.name?"renamed":"modified"}function mv(e,t){return e.hunks.reduce((i,a)=>i+a.hunkContent.reduce((o,s)=>o+(s.type==="change"?s[t]:0),0),0)}function x8(e){const t=new Map;for(const i of e??[]){const a={displayPath:i.oldPath&&i.newPath&&i.oldPath!==i.newPath?`${i.oldPath} → ${i.newPath}`:i.path,status:i.status,oldRepoPath:i.oldPath,newRepoPath:i.newPath??i.path};t.set(i.path,a),i.newPath&&t.set(i.newPath,a),i.oldPath&&t.set(i.oldPath,a)}return t}function C8(e,t){const i=t.get(e.name)||(e.prevName?t.get(e.prevName):void 0);return i||{displayPath:e.prevName&&e.prevName!==e.name?`${e.prevName} → ${e.name}`:e.name,status:E8(e),oldRepoPath:e.prevName,newRepoPath:e.name}}function w8(e,t){const[i,a]=te.useState(!1);return te.useEffect(()=>{if(e.length===0){a(!1);return}let o=!0;return a(!1),k8(e,t).then(()=>{o&&a(!0)}),()=>{o=!1}},[t,e]),i}async function k8(e,t){await Promise.all([document.fonts?.ready??Promise.resolve(),ON({themes:[t],langs:A8(e)}).catch(()=>{})])}function A8(e){const t=new Set;for(const i of e)t.add(i.file.lang??Ji(i.file.name));return[...t]}const T8=[];function L8(){const[e,t]=te.useState(null),[i,a]=te.useState(null),[o,s]=te.useState(mx),[c,f]=te.useState(null),[d,h]=te.useState(""),[y,g]=te.useState(!1),[b,v]=te.useState(null),[S,w]=te.useState(!1),[R,C]=te.useState(""),[k,A]=te.useState(!1),[H,U]=te.useState(!1),[D,B]=te.useState(null),[re,j]=te.useState(""),se=te.useRef(null),Z=te.useRef(null),W=te.useRef(0),Q=te.useCallback(ae=>{s(yx(ae))},[]),ie=te.useCallback(async(ae,be={})=>{try{const ke=await ae;Q(ke.state)}catch(ke){be.onError?.(),C(ke instanceof Error?ke.message:String(ke))}},[Q]),q=te.useCallback((ae,be)=>{ie(lx(ae),be)},[ie]),z=te.useCallback((ae,be)=>{s(ke=>Cx(ke,ae,be))},[]),$=te.useCallback(ae=>{s(be=>wx(be,ae))},[]),le=te.useCallback(async ae=>{z(ae,!0);try{const be=await ox(ae);Q(be.state)}catch(be){z(ae,!1),C(be instanceof Error?be.message:String(be))}},[Q,z]);te.useEffect(()=>{let ae=!0;return(async()=>{try{const ke=await rx();if(!ke.state)throw new Error("diff tool bootstrap response did not include review state");if(!ae)return;t(ke),Q(ke.state);const Qe=await ax();ae&&a(Qe)}catch(ke){ae&&C(ke instanceof Error?ke.message:String(ke))}})(),()=>{ae=!1}},[Q]);const fe=i&&"patch"in i?i.patch:"",L=te.useMemo(()=>S8(fe,e?.files,e?.context.sessionId),[fe,e]),O=w8(L,o.codeTheme),X=te.useMemo(()=>o0(o.collapsedFileIds),[o.collapsedFileIds]),T=te.useMemo(()=>o0(o.viewedFileIds),[o.viewedFileIds]),ue=te.useMemo(()=>o.threads.filter(ae=>!ae.resolved),[o.threads]),ge=ue.length,he=te.useMemo(()=>[...o.threads].reverse(),[o.threads]),Ee=te.useMemo(()=>o.threads.filter(bx),[o.threads]),Re=te.useMemo(()=>b?.mode!=="thread"?null:Ee.find(ae=>ae.id===b.threadId)??null,[b,Ee]),me=te.useMemo(()=>$d(ue.filter(Sh).map(ae=>ae.anchor.fileId)),[ue]),Ve=te.useMemo(()=>Ex(ue),[ue]),Je=o.brief.content.trim().length>0,jt=te.useMemo(()=>L.reduce(vx,{additions:0,deletions:0}),[L]),gt=te.useCallback((ae,be="smooth")=>{document.getElementById(`file-${ae}`)?.scrollIntoView({behavior:be,block:"start"})},[]),ut=te.useCallback(ae=>{q({collapsedFileIds:s0(o.collapsedFileIds,ae)})},[q,o.collapsedFileIds]),Ln=te.useCallback(ae=>{const be=s0(o.viewedFileIds,ae),ke=be.includes(ae),Qe=ke?$d([...o.collapsedFileIds,ae]):o.collapsedFileIds;Z.current=ke&&!o.collapsedFileIds.includes(ae)?ae:null,q({viewedFileIds:be,collapsedFileIds:Qe},{onError:()=>{Z.current=null}})},[q,o.collapsedFileIds,o.viewedFileIds]),yt=te.useCallback(()=>{q({collapsedFileIds:[]})},[q]),Ar=te.useCallback(()=>{q({collapsedFileIds:L.map(ae=>ae.id)})},[q,L]),Tr=te.useCallback(()=>{if(me.length===0)return;const ae=new Set(me);q({collapsedFileIds:o.collapsedFileIds.filter(be=>!ae.has(be))})},[q,me,o.collapsedFileIds]),Ei=te.useCallback(()=>{q({collapsedFileIds:$d([...o.collapsedFileIds,...o.viewedFileIds])})},[q,o.collapsedFileIds,o.viewedFileIds]);te.useLayoutEffect(()=>{const ae=Z.current;ae&&(Z.current=null,gt(ae,"auto"))},[o.collapsedFileIds,gt]);const xi=te.useCallback((ae,be,ke)=>{f(Qe=>Qe&&Qe.fileId===ae&&Qe.lineNumber===be&&Qe.side===ke?Qe:{fileId:ae,lineNumber:be,side:ke})},[]),tr=te.useCallback((ae,be)=>{if(!c)return;const ke=ae.trim();if(!ke){f(null);return}const Qe={kind:"line",fileId:c.fileId,filePath:kx(c,L),lineNumber:c.lineNumber,side:c.side};(async()=>{try{const Ci=await l0({body:ke,anchor:Qe});if(Q(Ci.state),f(null),!be)return;await le(Ci.threadId)}catch(Ci){C(Ci instanceof Error?Ci.message:String(Ci))}})()},[Q,c,L,le]),Pa=te.useCallback(()=>f(null),[]),Ba=te.useCallback(()=>{W.current+=1,h(""),g(!1),v({mode:"new"})},[]),xt=te.useCallback(ae=>{W.current+=1,h(""),g(!1),v({mode:"thread",threadId:ae})},[]),Zn=te.useCallback(()=>{W.current+=1,h(""),g(!1),v(null)},[]);te.useEffect(()=>{b?.mode==="thread"&&!Re&&Zn()},[Zn,b,Re]);const J=te.useCallback(ae=>{if(ae.anchor.kind==="detached"){xt(ae.id);return}Zn();const be=ae.anchor.fileId;if(o.collapsedFileIds.includes(be)){Z.current=be,q({collapsedFileIds:o.collapsedFileIds.filter(ke=>ke!==be)});return}gt(be)},[q,Zn,xt,o.collapsedFileIds,gt]),ce=te.useCallback(ae=>{h(ae)},[]),ve=te.useCallback(ae=>W.current!==ae?!1:(h(""),g(!1),!0),[]),De=te.useCallback(async()=>{const ae=d.trim();if(!ae)return;const be=!y,ke=W.current;C("");try{if(b?.mode==="thread"){const Vt=await Gd({id:b.threadId,text:ae});if(Q(Vt.state),!ve(ke)||!be)return;await le(b.threadId);return}const Qe=await l0({body:ae,anchor:{kind:"detached"}});if(Q(Qe.state),!ve(ke)||(v({mode:"thread",threadId:Qe.threadId}),!be))return;await le(Qe.threadId)}catch(Qe){C(Qe instanceof Error?Qe.message:String(Qe))}},[Q,d,y,b,le,ve]),He=te.useCallback((ae,be,ke)=>{if(!ke){ie(Gd({id:ae,text:be}));return}(async()=>{try{const Vt=await Gd({id:ae,text:be});Q(Vt.state),await le(ae)}catch(Vt){C(Vt instanceof Error?Vt.message:String(Vt))}})()},[Q,le,ie]),Pt=te.useCallback(ae=>{C(""),le(ae)},[le]),fn=te.useCallback(()=>{C(""),$(!0),ie(dx(),{onError:()=>{$(!1)}})},[$,ie]),Ct=te.useCallback((ae,be)=>{ie(ux({id:ae,resolved:be}))},[ie]),at=te.useCallback((ae,be)=>{ie(cx({id:ae,collapsed:be}))},[ie]),Lt=te.useCallback((ae,be)=>{ie(sx({id:ae,messageIndex:be}))},[ie]),Ge=te.useMemo(()=>Sx(o.threads),[o.threads]),Hn=te.useMemo(()=>c?{lineNumber:c.lineNumber,side:c.side,metadata:{type:"draft",draft:c}}:null,[c]),en=te.useCallback(ae=>{B(ae),U(!0)},[]),wu=te.useCallback(()=>{U(!1)},[]),Kn=te.useCallback(async ae=>{w(!0),U(!1),C("Returning review…");try{await fx(ae),C("Review returned. You can close this tab.")}catch(be){w(!1),C(be instanceof Error?be.message:String(be))}},[]),Lr=te.useCallback(()=>{Kn("")},[Kn]),Rr=te.useCallback(()=>{Kn(re)},[re,Kn]);te.useEffect(()=>{if(!H)return;const ae=ke=>{const Qe=ke.target;Qe instanceof Node&&se.current?.contains(Qe)||U(!1)},be=ke=>{ke.key==="Escape"&&U(!1)};return window.addEventListener("pointerdown",ae),window.addEventListener("keydown",be),()=>{window.removeEventListener("pointerdown",ae),window.removeEventListener("keydown",be)}},[H]);const Wn=te.useCallback(async()=>{w(!0),C("Cancelling…");try{await hx(),C("Cancelled. You can close this tab.")}catch(ae){w(!1),C(ae instanceof Error?ae.message:String(ae))}},[]),Dr=te.useCallback(()=>{if(Je){A(!0);return}fn()},[Je,fn]);return I.jsxs(I.Fragment,{children:[I.jsxs("div",{className:`app${o.sidebarOpen?" sidebar-open":""}`,children:[I.jsx(_8,{fileCount:L.length,viewedCount:o.viewedFileIds.length,additions:jt.additions,deletions:jt.deletions,commentCount:ge,diffArgs:e?.context.diffArgs,diffCommand:e?.context.diffCommand,diffStyle:o.diffStyle,overflowMode:o.overflowMode,sidebarOpen:o.sidebarOpen,finished:S,status:R,briefLoading:o.brief.loading,hasBrief:Je,hasUnresolvedFileThreads:me.length>0,onBriefClick:Dr,onToggleSidebar:()=>{q({sidebarOpen:!o.sidebarOpen})},onExpandAll:yt,onExpandUnresolved:Tr,onCollapseViewed:Ei,onCollapseAll:Ar,onDiffStyleChange:ae=>{q({diffStyle:ae})},onOverflowModeChange:ae=>{q({overflowMode:ae})},onSubmit:Lr,onOpenSubmitPopover:en,onCancel:Wn}),I.jsx(r8,{open:o.sidebarOpen,files:L,viewed:T,threads:he,selectedThreadId:b?.mode==="thread"?b.threadId:null,onJumpToFile:gt,onCreateDetachedThread:Ba,onOpenThread:J}),I.jsxs("main",{className:"content",children:[L.length===0&&I.jsx("div",{className:"empty",children:R||"loading…"}),L.map(ae=>{const be=Ge.get(ae.id)??T8,ke=xx(be,ae.id,c,Hn);return I.jsx(i8,{file:ae,diffStyle:o.diffStyle,overflowMode:o.overflowMode,codeTheme:o.codeTheme,collapsed:X[ae.id]??!1,viewed:T[ae.id]??!1,annotations:ke,unresolvedThreadCount:Ve.get(ae.id)??0,renderReady:O,onToggleCollapsed:ut,onToggleViewed:Ln,onLineActivate:xi,onSaveDraft:tr,onCancelDraft:Pa,onAddReply:He,onRequestAgent:Pt,onToggleResolved:Ct,onToggleThreadCollapsed:at,onDeleteThreadMessage:Lt},ae.id)})]})]}),I.jsx(lN,{open:k,content:o.brief.content,loading:o.brief.loading,onClose:()=>A(!1)}),H&&D?I.jsxs("div",{ref:se,className:"submit-popover",style:{top:D.bottom+6,right:window.innerWidth-D.right},children:[I.jsx("textarea",{className:"text-input-area submit-popover-input",value:re,onChange:ae=>j(ae.target.value),placeholder:"Optional message…",rows:5}),I.jsxs("div",{className:"submit-popover-actions",children:[I.jsx("button",{type:"button",className:"btn ghost",onClick:wu,children:"cancel"}),I.jsx("button",{type:"button",className:"btn primary",disabled:S,onClick:Rr,children:"submit"})]})]}):null,I.jsx(oN,{open:b!==null,thread:Re,body:d,skipAgentResponse:y,onBodyChange:ce,onSkipAgentResponseChange:g,onSubmit:De,onClose:Zn,onToggleResolved:ae=>{Re&&Ct(Re.id,ae)},onDeleteMessage:ae=>{Re&&Lt(Re.id,ae)}}),null]})}nx.createRoot(document.getElementById("root")).render(I.jsx(te.StrictMode,{children:I.jsx(L8,{})}));