@markusylisiurunen/tau 0.2.111 → 0.2.113
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.
- package/README.md +6 -2
- package/dist/core/config/content_loader.js +3 -1
- package/dist/core/config/content_loader.js.map +1 -1
- package/dist/core/diff_review/index.js.map +1 -1
- package/dist/core/diff_review/session.js +2 -2
- package/dist/core/diff_review/session.js.map +1 -1
- package/dist/core/diff_review/snapshot.js +92 -20
- package/dist/core/diff_review/snapshot.js.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/personas.js +2 -1
- package/dist/core/personas.js.map +1 -1
- package/dist/core/session/runner.js +59 -1
- package/dist/core/session/runner.js.map +1 -1
- package/dist/core/tools/catalog.js +3 -1
- package/dist/core/tools/catalog.js.map +1 -1
- package/dist/core/tools/diff_review.js +369 -0
- package/dist/core/tools/diff_review.js.map +1 -0
- package/dist/core/tools/registry.js.map +1 -1
- package/dist/core/tools/tool_names.js +2 -0
- package/dist/core/tools/tool_names.js.map +1 -1
- package/dist/core/version.js +1 -1
- package/dist/diff_tool/app/dist/assets/{angular-html-CU67Zn6k.js → angular-html-DMxchsRu.js} +1 -1
- package/dist/diff_tool/app/dist/assets/angular-ts-DzOHUlBM.js +1 -0
- package/dist/diff_tool/app/dist/assets/{index-Czg-eJwd.css → index-BuEYkrDR.css} +1 -1
- package/dist/diff_tool/app/dist/assets/index-Cpuc6JJD.js +252 -0
- package/dist/diff_tool/app/dist/index.html +2 -2
- package/dist/main.js +10 -2
- package/dist/main.js.map +1 -1
- package/dist/starter/prompts/guided-review-branch.md +7 -0
- package/dist/starter/prompts/guided-review-current-changes.md +7 -0
- package/dist/starter/prompts/guided-review-last-commit.md +7 -0
- package/dist/starter/skills/guided-review/SKILL.md +91 -0
- package/dist/tui/chat_controller/diff_review_service.js +2 -2
- package/dist/tui/chat_controller/diff_review_service.js.map +1 -1
- package/dist/tui/chat_controller.js +9 -4
- package/dist/tui/chat_controller.js.map +1 -1
- package/dist/tui/tool_ui_router.js +38 -0
- package/dist/tui/tool_ui_router.js.map +1 -1
- package/dist/tui/ui/tool_ui_registry.js +170 -0
- package/dist/tui/ui/tool_ui_registry.js.map +1 -1
- package/package.json +4 -4
- package/dist/diff_tool/app/dist/assets/angular-ts-BwZT4LLn.js +0 -1
- package/dist/diff_tool/app/dist/assets/index-D1e3Qk8w.js +0 -1887
|
@@ -0,0 +1,252 @@
|
|
|
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 Pb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bd={exports:{}},yl={};var xy;function cE(){if(xy)return yl;xy=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 d in o)d!=="key"&&(s[d]=o[d])}else s=o;return o=s.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:s}}return yl.Fragment=t,yl.jsx=i,yl.jsxs=i,yl}var wy;function dE(){return wy||(wy=1,bd.exports=cE()),bd.exports}var H=dE(),vd={exports:{}},Ee={};var Cy;function fE(){if(Cy)return Ee;Cy=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"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,D={};function x(O,X,C){this.props=O,this.context=X,this.refs=D,this.updater=C||S}x.prototype.isReactComponent={},x.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")},x.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function T(){}T.prototype=x.prototype;function k(O,X,C){this.props=O,this.context=X,this.refs=D,this.updater=C||S}var I=k.prototype=new T;I.constructor=k,A(I,x.prototype),I.isPureReactComponent=!0;var z=Array.isArray;function R(){}var $={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function Y(O,X,C){var se=C.ref;return{$$typeof:e,type:O,key:X,ref:se!==void 0?se:null,props:C}}function le(O,X){return Y(O.type,X,O.props)}function te(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function F(O){var X={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(C){return X[C]})}var ce=/\/+/g;function ie(O,X){return typeof O=="object"&&O!==null&&O.key!=null?F(""+O.key):X.toString(36)}function ne(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(R,R):(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 P(O,X,C,se,me){var de=typeof O;(de==="undefined"||de==="boolean")&&(O=null);var be=!1;if(O===null)be=!0;else switch(de){case"bigint":case"string":case"number":be=!0;break;case"object":switch(O.$$typeof){case e:case t:be=!0;break;case g:return be=O._init,P(be(O._payload),X,C,se,me)}}if(be)return me=me(O),be=se===""?"."+ie(O,0):se,z(me)?(C="",be!=null&&(C=be.replace(ce,"$&/")+"/"),P(me,X,C,"",function(Xe){return Xe})):me!=null&&(te(me)&&(me=le(me,C+(me.key==null||O&&O.key===me.key?"":(""+me.key).replace(ce,"$&/")+"/")+be)),X.push(me)),1;be=0;var Te=se===""?".":se+":";if(z(O))for(var Le=0;Le<O.length;Le++)se=O[Le],de=Te+ie(se,Le),be+=P(se,X,C,de,me);else if(Le=b(O),typeof Le=="function")for(O=Le.call(O),Le=0;!(se=O.next()).done;)se=se.value,de=Te+ie(se,Le++),be+=P(se,X,C,de,me);else if(de==="object"){if(typeof O.then=="function")return P(ne(O),X,C,se,me);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 be}function Z(O,X,C){if(O==null)return O;var se=[],me=0;return P(O,se,"","",function(de){return X.call(C,de,me++)}),se}function oe(O){if(O._status===-1){var X=O._result;X=X(),X.then(function(C){(O._status===0||O._status===-1)&&(O._status=1,O._result=C)},function(C){(O._status===0||O._status===-1)&&(O._status=2,O._result=C)}),O._status===-1&&(O._status=0,O._result=X)}if(O._status===1)return O._result.default;throw O._result}var he=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:Z,forEach:function(O,X,C){Z(O,function(){X.apply(this,arguments)},C)},count:function(O){var X=0;return Z(O,function(){X++}),X},toArray:function(O){return Z(O,function(X){return X})||[]},only:function(O){if(!te(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ee.Activity=y,Ee.Children=L,Ee.Component=x,Ee.Fragment=i,Ee.Profiler=o,Ee.PureComponent=k,Ee.StrictMode=a,Ee.Suspense=f,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(O){return $.H.useMemoCache(O)}},Ee.cache=function(O){return function(){return O.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(O,X,C){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var se=A({},O.props),me=O.key;if(X!=null)for(de in X.key!==void 0&&(me=""+X.key),X)!G.call(X,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&X.ref===void 0||(se[de]=X[de]);var de=arguments.length-2;if(de===1)se.children=C;else if(1<de){for(var be=Array(de),Te=0;Te<de;Te++)be[Te]=arguments[Te+2];se.children=be}return Y(O.type,me,se)},Ee.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},Ee.createElement=function(O,X,C){var se,me={},de=null;if(X!=null)for(se in X.key!==void 0&&(de=""+X.key),X)G.call(X,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(me[se]=X[se]);var be=arguments.length-2;if(be===1)me.children=C;else if(1<be){for(var Te=Array(be),Le=0;Le<be;Le++)Te[Le]=arguments[Le+2];me.children=Te}if(O&&O.defaultProps)for(se in be=O.defaultProps,be)me[se]===void 0&&(me[se]=be[se]);return Y(O,de,me)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(O){return{$$typeof:d,render:O}},Ee.isValidElement=te,Ee.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:oe}},Ee.memo=function(O,X){return{$$typeof:p,type:O,compare:X===void 0?null:X}},Ee.startTransition=function(O){var X=$.T,C={};$.T=C;try{var se=O(),me=$.S;me!==null&&me(C,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(R,he)}catch(de){he(de)}finally{X!==null&&C.types!==null&&(X.types=C.types),$.T=X}},Ee.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Ee.use=function(O){return $.H.use(O)},Ee.useActionState=function(O,X,C){return $.H.useActionState(O,X,C)},Ee.useCallback=function(O,X){return $.H.useCallback(O,X)},Ee.useContext=function(O){return $.H.useContext(O)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(O,X){return $.H.useDeferredValue(O,X)},Ee.useEffect=function(O,X){return $.H.useEffect(O,X)},Ee.useEffectEvent=function(O){return $.H.useEffectEvent(O)},Ee.useId=function(){return $.H.useId()},Ee.useImperativeHandle=function(O,X,C){return $.H.useImperativeHandle(O,X,C)},Ee.useInsertionEffect=function(O,X){return $.H.useInsertionEffect(O,X)},Ee.useLayoutEffect=function(O,X){return $.H.useLayoutEffect(O,X)},Ee.useMemo=function(O,X){return $.H.useMemo(O,X)},Ee.useOptimistic=function(O,X){return $.H.useOptimistic(O,X)},Ee.useReducer=function(O,X,C){return $.H.useReducer(O,X,C)},Ee.useRef=function(O){return $.H.useRef(O)},Ee.useState=function(O){return $.H.useState(O)},Ee.useSyncExternalStore=function(O,X,C){return $.H.useSyncExternalStore(O,X,C)},Ee.useTransition=function(){return $.H.useTransition()},Ee.version="19.2.6",Ee}var ky;function Yf(){return ky||(ky=1,vd.exports=fE()),vd.exports}var re=Yf(),_d={exports:{}},bl={},Sd={exports:{}},Ed={};var Ay;function hE(){return Ay||(Ay=1,(function(e){function t(P,Z){var oe=P.length;P.push(Z);e:for(;0<oe;){var he=oe-1>>>1,L=P[he];if(0<o(L,Z))P[he]=Z,P[oe]=L,oe=he;else break e}}function i(P){return P.length===0?null:P[0]}function a(P){if(P.length===0)return null;var Z=P[0],oe=P.pop();if(oe!==Z){P[0]=oe;e:for(var he=0,L=P.length,O=L>>>1;he<O;){var X=2*(he+1)-1,C=P[X],se=X+1,me=P[se];if(0>o(C,oe))se<L&&0>o(me,C)?(P[he]=me,P[se]=oe,he=se):(P[he]=C,P[X]=oe,he=X);else if(se<L&&0>o(me,oe))P[he]=me,P[se]=oe,he=se;else break e}}return Z}function o(P,Z){var oe=P.sortIndex-Z.sortIndex;return oe!==0?oe:P.id-Z.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,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],p=[],g=1,y=null,v=3,b=!1,S=!1,A=!1,D=!1,x=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function I(P){for(var Z=i(p);Z!==null;){if(Z.callback===null)a(p);else if(Z.startTime<=P)a(p),Z.sortIndex=Z.expirationTime,t(f,Z);else break;Z=i(p)}}function z(P){if(A=!1,I(P),!S)if(i(f)!==null)S=!0,R||(R=!0,F());else{var Z=i(p);Z!==null&&ne(z,Z.startTime-P)}}var R=!1,$=-1,G=5,Y=-1;function le(){return D?!0:!(e.unstable_now()-Y<G)}function te(){if(D=!1,R){var P=e.unstable_now();Y=P;var Z=!0;try{e:{S=!1,A&&(A=!1,T($),$=-1),b=!0;var oe=v;try{t:{for(I(P),y=i(f);y!==null&&!(y.expirationTime>P&&le());){var he=y.callback;if(typeof he=="function"){y.callback=null,v=y.priorityLevel;var L=he(y.expirationTime<=P);if(P=e.unstable_now(),typeof L=="function"){y.callback=L,I(P),Z=!0;break t}y===i(f)&&a(f),I(P)}else a(f);y=i(f)}if(y!==null)Z=!0;else{var O=i(p);O!==null&&ne(z,O.startTime-P),Z=!1}}break e}finally{y=null,v=oe,b=!1}Z=void 0}}finally{Z?F():R=!1}}}var F;if(typeof k=="function")F=function(){k(te)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,ie=ce.port2;ce.port1.onmessage=te,F=function(){ie.postMessage(null)}}else F=function(){x(te,0)};function ne(P,Z){$=x(function(){P(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(P){switch(v){case 1:case 2:case 3:var Z=3;break;default:Z=v}var oe=v;v=Z;try{return P()}finally{v=oe}},e.unstable_requestPaint=function(){D=!0},e.unstable_runWithPriority=function(P,Z){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var oe=v;v=P;try{return Z()}finally{v=oe}},e.unstable_scheduleCallback=function(P,Z,oe){var he=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?he+oe:he):oe=he,P){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=oe+L,P={id:g++,callback:Z,priorityLevel:P,startTime:oe,expirationTime:L,sortIndex:-1},oe>he?(P.sortIndex=oe,t(p,P),i(f)===null&&P===i(p)&&(A?(T($),$=-1):A=!0,ne(z,oe-he))):(P.sortIndex=L,t(f,P),S||b||(S=!0,R||(R=!0,F()))),P},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(P){var Z=v;return function(){var oe=v;v=Z;try{return P.apply(this,arguments)}finally{v=oe}}}})(Ed)),Ed}var Ty;function pE(){return Ty||(Ty=1,Sd.exports=hE()),Sd.exports}var xd={exports:{}},Rt={};var Ly;function mE(){if(Ly)return Rt;Ly=1;var e=Yf();function t(f){var p="https://react.dev/errors/"+f;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+p+" 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(f,p,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:f,containerInfo:p,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,p){if(f==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Rt.createPortal=function(f,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return s(f,p,null,g)},Rt.flushSync=function(f){var p=c.T,g=a.p;try{if(c.T=null,a.p=2,f)return f()}finally{c.T=p,a.p=g,a.d.f()}},Rt.preconnect=function(f,p){typeof f=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(f,p))},Rt.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},Rt.preinit=function(f,p){if(typeof f=="string"&&p&&typeof p.as=="string"){var g=p.as,y=d(g,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,b=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(f,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:b}):g==="script"&&a.d.X(f,{crossOrigin:y,integrity:v,fetchPriority:b,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Rt.preinitModule=function(f,p){if(typeof f=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=d(p.as,p.crossOrigin);a.d.M(f,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(f)},Rt.preload=function(f,p){if(typeof f=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,y=d(g,p.crossOrigin);a.d.L(f,g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Rt.preloadModule=function(f,p){if(typeof f=="string")if(p){var g=d(p.as,p.crossOrigin);a.d.m(f,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(f)},Rt.requestFormReset=function(f){a.d.r(f)},Rt.unstable_batchedUpdates=function(f,p){return f(p)},Rt.useFormState=function(f,p,g){return c.H.useFormState(f,p,g)},Rt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Rt.version="19.2.6",Rt}var Ry;function gE(){if(Ry)return xd.exports;Ry=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(),xd.exports=mE(),xd.exports}var Dy;function yE(){if(Dy)return bl;Dy=1;var e=pE(),t=Yf(),i=gE();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 d(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 f(n){if(s(n)!==n)throw Error(a(188))}function p(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 h=l.return;if(h===null)break;var m=h.alternate;if(m===null){if(u=h.return,u!==null){l=u;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===l)return f(h),n;if(m===u)return f(h),r;m=m.sibling}throw Error(a(188))}if(l.return!==u.return)l=h,u=m;else{for(var _=!1,E=h.child;E;){if(E===l){_=!0,l=h,u=m;break}if(E===u){_=!0,u=h,l=m;break}E=E.sibling}if(!_){for(E=m.child;E;){if(E===l){_=!0,l=m,u=h;break}if(E===u){_=!0,u=m,l=h;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 g(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=g(n),r!==null)return r;n=n.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),k=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function F(n){return n===null||typeof n!="object"?null:(n=te&&n[te]||n["@@iterator"],typeof n=="function"?n:null)}var ce=Symbol.for("react.client.reference");function ie(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ce?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case A:return"Fragment";case x:return"Profiler";case D:return"StrictMode";case z:return"Suspense";case R:return"SuspenseList";case Y:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case k:return n.displayName||"Context";case T:return(n._context.displayName||"Context")+".Consumer";case I:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case $:return r=n.displayName||null,r!==null?r:ie(n.type)||"Memo";case G:r=n._payload,n=n._init;try{return ie(n(r))}catch{}}return null}var ne=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},he=[],L=-1;function O(n){return{current:n}}function X(n){0>L||(n.current=he[L],he[L]=null,L--)}function C(n,r){L++,he[L]=n.current,n.current=r}var se=O(null),me=O(null),de=O(null),be=O(null);function Te(n,r){switch(C(de,r),C(me,n),C(se,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?Fg(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=Fg(r),n=Yg(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}X(se),C(se,n)}function Le(){X(se),X(me),X(de)}function Xe(n){n.memoizedState!==null&&C(be,n);var r=se.current,l=Yg(r,n.type);r!==l&&(C(me,n),C(se,l))}function et(n){me.current===n&&(X(se),X(me)),be.current===n&&(X(be),hl._currentValue=oe)}var qt,xt;function gn(n){if(qt===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);qt=r&&r[1]||"",xt=-1<l.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+qt+n+xt}var oi=!1;function si(n,r){if(!n||oi)return"";oi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(q){var V=q}Reflect.construct(n,[],ee)}else{try{ee.call()}catch(q){V=q}n.call(ee.prototype)}}else{try{throw Error()}catch(q){V=q}(ee=n())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(q){if(q&&V&&typeof q.stack=="string")return[q.stack,V.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),_=m[0],E=m[1];if(_&&E){var N=_.split(`
|
|
5
|
+
`),j=E.split(`
|
|
6
|
+
`);for(h=u=0;u<N.length&&!N[u].includes("DetermineComponentFrameRoot");)u++;for(;h<j.length&&!j[h].includes("DetermineComponentFrameRoot");)h++;if(u===N.length||h===j.length)for(u=N.length-1,h=j.length-1;1<=u&&0<=h&&N[u]!==j[h];)h--;for(;1<=u&&0<=h;u--,h--)if(N[u]!==j[h]){if(u!==1||h!==1)do if(u--,h--,0>h||N[u]!==j[h]){var Q=`
|
|
7
|
+
`+N[u].replace(" at new "," at ");return n.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",n.displayName)),Q}while(1<=u&&0<=h);break}}}finally{oi=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?gn(l):""}function ui(n,r){switch(n.tag){case 26:case 27:case 5:return gn(n.type);case 16:return gn("Lazy");case 13:return n.child!==r&&r!==null?gn("Suspense Fallback"):gn("Suspense");case 19:return gn("SuspenseList");case 0:case 15:return si(n.type,!1);case 11:return si(n.type.render,!1);case 1:return si(n.type,!0);case 31:return gn("Activity");default:return""}}function gr(n){try{var r="",l=null;do r+=ui(n,l),l=n,n=n.return;while(n);return r}catch(u){return`
|
|
8
|
+
Error generating stack: `+u.message+`
|
|
9
|
+
`+u.stack}}var ci=Object.prototype.hasOwnProperty,di=e.unstable_scheduleCallback,fi=e.unstable_cancelCallback,yr=e.unstable_shouldYield,wa=e.unstable_requestPaint,wt=e.unstable_now,Ca=e.unstable_getCurrentPriorityLevel,K=e.unstable_ImmediatePriority,ue=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,W=e.unstable_LowPriority,pe=e.unstable_IdlePriority,xe=e.log,Qe=e.unstable_setDisableYieldValue,nt=null,Be=null;function st(n){if(typeof xe=="function"&&Qe(n),Be&&typeof Be.setStrictMode=="function")try{Be.setStrictMode(nt,n)}catch{}}var Fe=Math.clz32?Math.clz32:Z1,hi=Math.log,yn=Math.LN2;function Z1(n){return n>>>=0,n===0?32:31-(hi(n)/yn|0)|0}var $l=256,ql=262144,Fl=4194304;function Gi(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 Yl(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var h=0,m=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var E=u&134217727;return E!==0?(u=E&~m,u!==0?h=Gi(u):(_&=E,_!==0?h=Gi(_):l||(l=E&~n,l!==0&&(h=Gi(l))))):(E=u&~m,E!==0?h=Gi(E):_!==0?h=Gi(_):l||(l=u&~n,l!==0&&(h=Gi(l)))),h===0?0:r!==0&&r!==h&&(r&m)===0&&(m=h&-h,l=r&-r,m>=l||m===32&&(l&4194048)!==0)?r:h}function ka(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function K1(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 Ah(){var n=Fl;return Fl<<=1,(Fl&62914560)===0&&(Fl=4194304),n}function lu(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function Aa(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function W1(n,r,l,u,h,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,j=n.hiddenUpdates;for(l=_&~l;0<l;){var Q=31-Fe(l),ee=1<<Q;E[Q]=0,N[Q]=-1;var V=j[Q];if(V!==null)for(j[Q]=null,Q=0;Q<V.length;Q++){var q=V[Q];q!==null&&(q.lane&=-536870913)}l&=~ee}u!==0&&Th(n,u,0),m!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=m&~(_&~r))}function Th(n,r,l){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-Fe(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function Lh(n,r){var l=n.entangledLanes|=r;for(n=n.entanglements;l;){var u=31-Fe(l),h=1<<u;h&r|n[u]&r&&(n[u]|=r),l&=~h}}function Rh(n,r){var l=r&-r;return l=(l&42)!==0?1:ou(l),(l&(n.suspendedLanes|r))!==0?0:l}function ou(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 su(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Dh(){var n=Z.p;return n!==0?n:(n=window.event,n===void 0?32:gy(n.type))}function Nh(n,r){var l=Z.p;try{return Z.p=n,r()}finally{Z.p=l}}var pi=Math.random().toString(36).slice(2),Ct="__reactFiber$"+pi,It="__reactProps$"+pi,br="__reactContainer$"+pi,uu="__reactEvents$"+pi,J1="__reactListeners$"+pi,e_="__reactHandles$"+pi,Oh="__reactResources$"+pi,Ta="__reactMarker$"+pi;function cu(n){delete n[Ct],delete n[It],delete n[uu],delete n[J1],delete n[e_]}function vr(n){var r=n[Ct];if(r)return r;for(var l=n.parentNode;l;){if(r=l[br]||l[Ct]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(n=ey(n);n!==null;){if(l=n[Ct])return l;n=ey(n)}return r}n=l,l=n.parentNode}return null}function _r(n){if(n=n[Ct]||n[br]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function La(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function Sr(n){var r=n[Oh];return r||(r=n[Oh]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function vt(n){n[Ta]=!0}var Mh=new Set,Ih={};function $i(n,r){Er(n,r),Er(n+"Capture",r)}function Er(n,r){for(Ih[n]=r,n=0;n<r.length;n++)Mh.add(r[n])}var t_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),zh={},Uh={};function n_(n){return ci.call(Uh,n)?!0:ci.call(zh,n)?!1:t_.test(n)?Uh[n]=!0:(zh[n]=!0,!1)}function Xl(n,r,l){if(n_(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 Ql(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 Pn(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 tn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Hh(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function i_(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 h=u.get,m=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.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 du(n){if(!n._valueTracker){var r=Hh(n)?"checked":"value";n._valueTracker=i_(n,r,""+n[r])}}function Ph(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return n&&(u=Hh(n)?n.checked?"true":"false":n.value),n=u,n!==l?(r.setValue(n),!0):!1}function Zl(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 r_=/[\n"\\]/g;function nn(n){return n.replace(r_,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function fu(n,r,l,u,h,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=""+tn(r)):n.value!==""+tn(r)&&(n.value=""+tn(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?hu(n,_,tn(r)):l!=null?hu(n,_,tn(l)):u!=null&&n.removeAttribute("value"),h==null&&m!=null&&(n.defaultChecked=!!m),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+tn(E):n.removeAttribute("name")}function Bh(n,r,l,u,h,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)){du(n);return}l=l!=null?""+tn(l):"",r=r!=null?""+tn(r):l,E||r===n.value||(n.value=r),n.defaultValue=r}u=u??h,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=_),du(n)}function hu(n,r,l){r==="number"&&Zl(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function xr(n,r,l,u){if(n=n.options,r){r={};for(var h=0;h<l.length;h++)r["$"+l[h]]=!0;for(l=0;l<n.length;l++)h=r.hasOwnProperty("$"+n[l].value),n[l].selected!==h&&(n[l].selected=h),h&&u&&(n[l].defaultSelected=!0)}else{for(l=""+tn(l),r=null,h=0;h<n.length;h++){if(n[h].value===l){n[h].selected=!0,u&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function jh(n,r,l){if(r!=null&&(r=""+tn(r),r!==n.value&&(n.value=r),l==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=l!=null?""+tn(l):""}function Vh(n,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(ne(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=tn(r),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),du(n)}function wr(n,r){if(r){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=r;return}}n.textContent=r}var a_=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 Gh(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||a_.has(r)?r==="float"?n.cssFloat=l:n[r]=(""+l).trim():n[r]=l+"px"}function $h(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 h in r)u=r[h],r.hasOwnProperty(h)&&l[h]!==u&&Gh(n,h,u)}else for(var m in r)r.hasOwnProperty(m)&&Gh(n,m,r[m])}function pu(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 l_=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"]]),o_=/^[\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 Kl(n){return o_.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Bn(){}var mu=null;function gu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Cr=null,kr=null;function qh(n){var r=_r(n);if(r&&(n=r.stateNode)){var l=n[It]||null;e:switch(n=r.stateNode,r.type){case"input":if(fu(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="'+nn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==n&&u.form===n.form){var h=u[It]||null;if(!h)throw Error(a(90));fu(u,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===n.form&&Ph(u)}break e;case"textarea":jh(n,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&xr(n,!!l.multiple,r,!1)}}}var yu=!1;function Fh(n,r,l){if(yu)return n(r,l);yu=!0;try{var u=n(r);return u}finally{if(yu=!1,(Cr!==null||kr!==null)&&(Po(),Cr&&(r=Cr,n=kr,kr=Cr=null,qh(r),n)))for(r=0;r<n.length;r++)qh(n[r])}}function Ra(n,r){var l=n.stateNode;if(l===null)return null;var u=l[It]||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 jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=!1;if(jn)try{var Da={};Object.defineProperty(Da,"passive",{get:function(){bu=!0}}),window.addEventListener("test",Da,Da),window.removeEventListener("test",Da,Da)}catch{bu=!1}var mi=null,vu=null,Wl=null;function Yh(){if(Wl)return Wl;var n,r=vu,l=r.length,u,h="value"in mi?mi.value:mi.textContent,m=h.length;for(n=0;n<l&&r[n]===h[n];n++);var _=l-n;for(u=1;u<=_&&r[l-u]===h[m-u];u++);return Wl=h.slice(n,1<u?1-u:void 0)}function Jl(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 eo(){return!0}function Xh(){return!1}function zt(n){function r(l,u,h,m,_){this._reactName=l,this._targetInst=h,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)?eo:Xh,this.isPropagationStopped=Xh,this}return y(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=eo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=eo)},persist:function(){},isPersistent:eo}),r}var qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},to=zt(qi),Na=y({},qi,{view:0,detail:0}),s_=zt(Na),_u,Su,Oa,no=y({},Na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xu,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!==Oa&&(Oa&&n.type==="mousemove"?(_u=n.screenX-Oa.screenX,Su=n.screenY-Oa.screenY):Su=_u=0,Oa=n),_u)},movementY:function(n){return"movementY"in n?n.movementY:Su}}),Qh=zt(no),u_=y({},no,{dataTransfer:0}),c_=zt(u_),d_=y({},Na,{relatedTarget:0}),Eu=zt(d_),f_=y({},qi,{animationName:0,elapsedTime:0,pseudoElement:0}),h_=zt(f_),p_=y({},qi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),m_=zt(p_),g_=y({},qi,{data:0}),Zh=zt(g_),y_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},b_={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"},v_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function __(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=v_[n])?!!r[n]:!1}function xu(){return __}var S_=y({},Na,{key:function(n){if(n.key){var r=y_[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Jl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?b_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xu,charCode:function(n){return n.type==="keypress"?Jl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Jl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),E_=zt(S_),x_=y({},no,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kh=zt(x_),w_=y({},Na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xu}),C_=zt(w_),k_=y({},qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),A_=zt(k_),T_=y({},no,{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}),L_=zt(T_),R_=y({},qi,{newState:0,oldState:0}),D_=zt(R_),N_=[9,13,27,32],wu=jn&&"CompositionEvent"in window,Ma=null;jn&&"documentMode"in document&&(Ma=document.documentMode);var O_=jn&&"TextEvent"in window&&!Ma,Wh=jn&&(!wu||Ma&&8<Ma&&11>=Ma),Jh=" ",ep=!1;function tp(n,r){switch(n){case"keyup":return N_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function np(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ar=!1;function M_(n,r){switch(n){case"compositionend":return np(r);case"keypress":return r.which!==32?null:(ep=!0,Jh);case"textInput":return n=r.data,n===Jh&&ep?null:n;default:return null}}function I_(n,r){if(Ar)return n==="compositionend"||!wu&&tp(n,r)?(n=Yh(),Wl=vu=mi=null,Ar=!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 Wh&&r.locale!=="ko"?null:r.data;default:return null}}var z_={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 ip(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!z_[n.type]:r==="textarea"}function rp(n,r,l,u){Cr?kr?kr.push(u):kr=[u]:Cr=u,r=Fo(r,"onChange"),0<r.length&&(l=new to("onChange","change",null,l,u),n.push({event:l,listeners:r}))}var Ia=null,za=null;function U_(n){Bg(n,0)}function io(n){var r=La(n);if(Ph(r))return n}function ap(n,r){if(n==="change")return r}var lp=!1;if(jn){var Cu;if(jn){var ku="oninput"in document;if(!ku){var op=document.createElement("div");op.setAttribute("oninput","return;"),ku=typeof op.oninput=="function"}Cu=ku}else Cu=!1;lp=Cu&&(!document.documentMode||9<document.documentMode)}function sp(){Ia&&(Ia.detachEvent("onpropertychange",up),za=Ia=null)}function up(n){if(n.propertyName==="value"&&io(za)){var r=[];rp(r,za,n,gu(n)),Fh(U_,r)}}function H_(n,r,l){n==="focusin"?(sp(),Ia=r,za=l,Ia.attachEvent("onpropertychange",up)):n==="focusout"&&sp()}function P_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return io(za)}function B_(n,r){if(n==="click")return io(r)}function j_(n,r){if(n==="input"||n==="change")return io(r)}function V_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Ft=typeof Object.is=="function"?Object.is:V_;function Ua(n,r){if(Ft(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 h=l[u];if(!ci.call(r,h)||!Ft(n[h],r[h]))return!1}return!0}function cp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function dp(n,r){var l=cp(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=cp(l)}}function fp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?fp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function hp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Zl(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=Zl(n.document)}return r}function Au(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 G_=jn&&"documentMode"in document&&11>=document.documentMode,Tr=null,Tu=null,Ha=null,Lu=!1;function pp(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Lu||Tr==null||Tr!==Zl(u)||(u=Tr,"selectionStart"in u&&Au(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}),Ha&&Ua(Ha,u)||(Ha=u,u=Fo(Tu,"onSelect"),0<u.length&&(r=new to("onSelect","select",null,r,l),n.push({event:r,listeners:u}),r.target=Tr)))}function Fi(n,r){var l={};return l[n.toLowerCase()]=r.toLowerCase(),l["Webkit"+n]="webkit"+r,l["Moz"+n]="moz"+r,l}var Lr={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},Ru={},mp={};jn&&(mp=document.createElement("div").style,"AnimationEvent"in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),"TransitionEvent"in window||delete Lr.transitionend.transition);function Yi(n){if(Ru[n])return Ru[n];if(!Lr[n])return n;var r=Lr[n],l;for(l in r)if(r.hasOwnProperty(l)&&l in mp)return Ru[n]=r[l];return n}var gp=Yi("animationend"),yp=Yi("animationiteration"),bp=Yi("animationstart"),$_=Yi("transitionrun"),q_=Yi("transitionstart"),F_=Yi("transitioncancel"),vp=Yi("transitionend"),_p=new Map,Du="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(" ");Du.push("scrollEnd");function bn(n,r){_p.set(n,r),$i(r,[n])}var ro=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)},rn=[],Rr=0,Nu=0;function ao(){for(var n=Rr,r=Nu=Rr=0;r<n;){var l=rn[r];rn[r++]=null;var u=rn[r];rn[r++]=null;var h=rn[r];rn[r++]=null;var m=rn[r];if(rn[r++]=null,u!==null&&h!==null){var _=u.pending;_===null?h.next=h:(h.next=_.next,_.next=h),u.pending=h}m!==0&&Sp(l,h,m)}}function lo(n,r,l,u){rn[Rr++]=n,rn[Rr++]=r,rn[Rr++]=l,rn[Rr++]=u,Nu|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Ou(n,r,l,u){return lo(n,r,l,u),oo(n)}function Xi(n,r){return lo(n,null,null,r),oo(n)}function Sp(n,r,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var h=!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||(h=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,h&&r!==null&&(h=31-Fe(l),n=m.hiddenUpdates,u=n[h],u===null?n[h]=[r]:u.push(r),r.lane=l|536870912),m):null}function oo(n){if(50<ll)throw ll=0,Vc=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Dr={};function Y_(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 Yt(n,r,l,u){return new Y_(n,r,l,u)}function Mu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Vn(n,r){var l=n.alternate;return l===null?(l=Yt(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 Ep(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 so(n,r,l,u,h,m){var _=0;if(u=n,typeof n=="function")Mu(n)&&(_=1);else if(typeof n=="string")_=WS(n,l,se.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case Y:return n=Yt(31,l,r,h),n.elementType=Y,n.lanes=m,n;case A:return Qi(l.children,h,m,r);case D:_=8,h|=24;break;case x:return n=Yt(12,l,r,h|2),n.elementType=x,n.lanes=m,n;case z:return n=Yt(13,l,r,h),n.elementType=z,n.lanes=m,n;case R:return n=Yt(19,l,r,h),n.elementType=R,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:_=10;break e;case T:_=9;break e;case I:_=11;break e;case $:_=14;break e;case G:_=16,u=null;break e}_=29,l=Error(a(130,n===null?"null":typeof n,"")),u=null}return r=Yt(_,l,r,h),r.elementType=n,r.type=u,r.lanes=m,r}function Qi(n,r,l,u){return n=Yt(7,n,u,r),n.lanes=l,n}function Iu(n,r,l){return n=Yt(6,n,null,r),n.lanes=l,n}function xp(n){var r=Yt(18,null,null,0);return r.stateNode=n,r}function zu(n,r,l){return r=Yt(4,n.children!==null?n.children:[],n.key,r),r.lanes=l,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var wp=new WeakMap;function an(n,r){if(typeof n=="object"&&n!==null){var l=wp.get(n);return l!==void 0?l:(r={value:n,source:r,stack:gr(r)},wp.set(n,r),r)}return{value:n,source:r,stack:gr(r)}}var Nr=[],Or=0,uo=null,Pa=0,ln=[],on=0,gi=null,An=1,Tn="";function Gn(n,r){Nr[Or++]=Pa,Nr[Or++]=uo,uo=n,Pa=r}function Cp(n,r,l){ln[on++]=An,ln[on++]=Tn,ln[on++]=gi,gi=n;var u=An;n=Tn;var h=32-Fe(u)-1;u&=~(1<<h),l+=1;var m=32-Fe(r)+h;if(30<m){var _=h-h%5;m=(u&(1<<_)-1).toString(32),u>>=_,h-=_,An=1<<32-Fe(r)+h|l<<h|u,Tn=m+n}else An=1<<m|l<<h|u,Tn=n}function Uu(n){n.return!==null&&(Gn(n,1),Cp(n,1,0))}function Hu(n){for(;n===uo;)uo=Nr[--Or],Nr[Or]=null,Pa=Nr[--Or],Nr[Or]=null;for(;n===gi;)gi=ln[--on],ln[on]=null,Tn=ln[--on],ln[on]=null,An=ln[--on],ln[on]=null}function kp(n,r){ln[on++]=An,ln[on++]=Tn,ln[on++]=gi,An=r.id,Tn=r.overflow,gi=n}var kt=null,We=null,Ie=!1,yi=null,sn=!1,Pu=Error(a(519));function bi(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ba(an(r,n)),Pu}function Ap(n){var r=n.stateNode,l=n.type,u=n.memoizedProps;switch(r[Ct]=n,r[It]=u,l){case"dialog":Ne("cancel",r),Ne("close",r);break;case"iframe":case"object":case"embed":Ne("load",r);break;case"video":case"audio":for(l=0;l<sl.length;l++)Ne(sl[l],r);break;case"source":Ne("error",r);break;case"img":case"image":case"link":Ne("error",r),Ne("load",r);break;case"details":Ne("toggle",r);break;case"input":Ne("invalid",r),Bh(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ne("invalid",r);break;case"textarea":Ne("invalid",r),Vh(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||$g(r.textContent,l)?(u.popover!=null&&(Ne("beforetoggle",r),Ne("toggle",r)),u.onScroll!=null&&Ne("scroll",r),u.onScrollEnd!=null&&Ne("scrollend",r),u.onClick!=null&&(r.onclick=Bn),r=!0):r=!1,r||bi(n,!0)}function Tp(n){for(kt=n.return;kt;)switch(kt.tag){case 5:case 31:case 13:sn=!1;return;case 27:case 3:sn=!0;return;default:kt=kt.return}}function Mr(n){if(n!==kt)return!1;if(!Ie)return Tp(n),Ie=!0,!1;var r=n.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||id(n.type,n.memoizedProps)),l=!l),l&&We&&bi(n),Tp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));We=Jg(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));We=Jg(n)}else r===27?(r=We,Ni(n.type)?(n=sd,sd=null,We=n):We=r):We=kt?cn(n.stateNode.nextSibling):null;return!0}function Zi(){We=kt=null,Ie=!1}function Bu(){var n=yi;return n!==null&&(Bt===null?Bt=n:Bt.push.apply(Bt,n),yi=null),n}function Ba(n){yi===null?yi=[n]:yi.push(n)}var ju=O(null),Ki=null,$n=null;function vi(n,r,l){C(ju,r._currentValue),r._currentValue=l}function qn(n){n._currentValue=ju.current,X(ju)}function Vu(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 Gu(n,r,l,u){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var m=h.dependencies;if(m!==null){var _=h.child;m=m.firstContext;e:for(;m!==null;){var E=m;m=h;for(var N=0;N<r.length;N++)if(E.context===r[N]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),Vu(m.return,l,n),u||(_=null);break e}m=E.next}}else if(h.tag===18){if(_=h.return,_===null)throw Error(a(341));_.lanes|=l,m=_.alternate,m!==null&&(m.lanes|=l),Vu(_,l,n),_=null}else _=h.child;if(_!==null)_.return=h;else for(_=h;_!==null;){if(_===n){_=null;break}if(h=_.sibling,h!==null){h.return=_.return,_=h;break}_=_.return}h=_}}function Ir(n,r,l,u){n=null;for(var h=r,m=!1;h!==null;){if(!m){if((h.flags&524288)!==0)m=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var _=h.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var E=h.type;Ft(h.pendingProps.value,_.value)||(n!==null?n.push(E):n=[E])}}else if(h===be.current){if(_=h.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(hl):n=[hl])}h=h.return}n!==null&&Gu(r,n,l,u),r.flags|=262144}function co(n){for(n=n.firstContext;n!==null;){if(!Ft(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Wi(n){Ki=n,$n=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function At(n){return Lp(Ki,n)}function fo(n,r){return Ki===null&&Wi(n),Lp(n,r)}function Lp(n,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},$n===null){if(n===null)throw Error(a(308));$n=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else $n=$n.next=r;return l}var X_=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()})}},Q_=e.unstable_scheduleCallback,Z_=e.unstable_NormalPriority,ut={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $u(){return{controller:new X_,data:new Map,refCount:0}}function ja(n){n.refCount--,n.refCount===0&&Q_(Z_,function(){n.controller.abort()})}var Va=null,qu=0,zr=0,Ur=null;function K_(n,r){if(Va===null){var l=Va=[];qu=0,zr=Xc(),Ur={status:"pending",value:void 0,then:function(u){l.push(u)}}}return qu++,r.then(Rp,Rp),r}function Rp(){if(--qu===0&&Va!==null){Ur!==null&&(Ur.status="fulfilled");var n=Va;Va=null,zr=0,Ur=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function W_(n,r){var l=[],u={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return n.then(function(){u.status="fulfilled",u.value=r;for(var h=0;h<l.length;h++)(0,l[h])(r)},function(h){for(u.status="rejected",u.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),u}var Dp=P.S;P.S=function(n,r){pg=wt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&K_(n,r),Dp!==null&&Dp(n,r)};var Ji=O(null);function Fu(){var n=Ji.current;return n!==null?n:Ye.pooledCache}function ho(n,r){r===null?C(Ji,Ji.current):C(Ji,r.pool)}function Np(){var n=Fu();return n===null?null:{parent:ut._currentValue,pool:n}}var Hr=Error(a(460)),Yu=Error(a(474)),po=Error(a(542)),mo={then:function(){}};function Op(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Mp(n,r,l){switch(l=n[l],l===void 0?n.push(r):l!==r&&(r.then(Bn,Bn),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,zp(n),n;default:if(typeof r.status=="string")r.then(Bn,Bn);else{if(n=Ye,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(u){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=u}},function(u){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,zp(n),n}throw tr=r,Hr}}function er(n){try{var r=n._init;return r(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(tr=l,Hr):l}}var tr=null;function Ip(){if(tr===null)throw Error(a(459));var n=tr;return tr=null,n}function zp(n){if(n===Hr||n===po)throw Error(a(483))}var Pr=null,Ga=0;function go(n){var r=Ga;return Ga+=1,Pr===null&&(Pr=[]),Mp(Pr,n,r)}function $a(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function yo(n,r){throw r.$$typeof===v?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Up(n){function r(U,M){if(n){var B=U.deletions;B===null?(U.deletions=[M],U.flags|=16):B.push(M)}}function l(U,M){if(!n)return null;for(;M!==null;)r(U,M),M=M.sibling;return null}function u(U){for(var M=new Map;U!==null;)U.key!==null?M.set(U.key,U):M.set(U.index,U),U=U.sibling;return M}function h(U,M){return U=Vn(U,M),U.index=0,U.sibling=null,U}function m(U,M,B){return U.index=B,n?(B=U.alternate,B!==null?(B=B.index,B<M?(U.flags|=67108866,M):B):(U.flags|=67108866,M)):(U.flags|=1048576,M)}function _(U){return n&&U.alternate===null&&(U.flags|=67108866),U}function E(U,M,B,J){return M===null||M.tag!==6?(M=Iu(B,U.mode,J),M.return=U,M):(M=h(M,B),M.return=U,M)}function N(U,M,B,J){var ye=B.type;return ye===A?Q(U,M,B.props.children,J,B.key):M!==null&&(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===G&&er(ye)===M.type)?(M=h(M,B.props),$a(M,B),M.return=U,M):(M=so(B.type,B.key,B.props,null,U.mode,J),$a(M,B),M.return=U,M)}function j(U,M,B,J){return M===null||M.tag!==4||M.stateNode.containerInfo!==B.containerInfo||M.stateNode.implementation!==B.implementation?(M=zu(B,U.mode,J),M.return=U,M):(M=h(M,B.children||[]),M.return=U,M)}function Q(U,M,B,J,ye){return M===null||M.tag!==7?(M=Qi(B,U.mode,J,ye),M.return=U,M):(M=h(M,B),M.return=U,M)}function ee(U,M,B){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Iu(""+M,U.mode,B),M.return=U,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return B=so(M.type,M.key,M.props,null,U.mode,B),$a(B,M),B.return=U,B;case S:return M=zu(M,U.mode,B),M.return=U,M;case G:return M=er(M),ee(U,M,B)}if(ne(M)||F(M))return M=Qi(M,U.mode,B,null),M.return=U,M;if(typeof M.then=="function")return ee(U,go(M),B);if(M.$$typeof===k)return ee(U,fo(U,M),B);yo(U,M)}return null}function V(U,M,B,J){var ye=M!==null?M.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return ye!==null?null:E(U,M,""+B,J);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case b:return B.key===ye?N(U,M,B,J):null;case S:return B.key===ye?j(U,M,B,J):null;case G:return B=er(B),V(U,M,B,J)}if(ne(B)||F(B))return ye!==null?null:Q(U,M,B,J,null);if(typeof B.then=="function")return V(U,M,go(B),J);if(B.$$typeof===k)return V(U,M,fo(U,B),J);yo(U,B)}return null}function q(U,M,B,J,ye){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return U=U.get(B)||null,E(M,U,""+J,ye);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case b:return U=U.get(J.key===null?B:J.key)||null,N(M,U,J,ye);case S:return U=U.get(J.key===null?B:J.key)||null,j(M,U,J,ye);case G:return J=er(J),q(U,M,B,J,ye)}if(ne(J)||F(J))return U=U.get(B)||null,Q(M,U,J,ye,null);if(typeof J.then=="function")return q(U,M,B,go(J),ye);if(J.$$typeof===k)return q(U,M,B,fo(M,J),ye);yo(M,J)}return null}function fe(U,M,B,J){for(var ye=null,ze=null,ge=M,ke=M=0,Me=null;ge!==null&&ke<B.length;ke++){ge.index>ke?(Me=ge,ge=null):Me=ge.sibling;var Ue=V(U,ge,B[ke],J);if(Ue===null){ge===null&&(ge=Me);break}n&&ge&&Ue.alternate===null&&r(U,ge),M=m(Ue,M,ke),ze===null?ye=Ue:ze.sibling=Ue,ze=Ue,ge=Me}if(ke===B.length)return l(U,ge),Ie&&Gn(U,ke),ye;if(ge===null){for(;ke<B.length;ke++)ge=ee(U,B[ke],J),ge!==null&&(M=m(ge,M,ke),ze===null?ye=ge:ze.sibling=ge,ze=ge);return Ie&&Gn(U,ke),ye}for(ge=u(ge);ke<B.length;ke++)Me=q(ge,U,ke,B[ke],J),Me!==null&&(n&&Me.alternate!==null&&ge.delete(Me.key===null?ke:Me.key),M=m(Me,M,ke),ze===null?ye=Me:ze.sibling=Me,ze=Me);return n&&ge.forEach(function(Ui){return r(U,Ui)}),Ie&&Gn(U,ke),ye}function ve(U,M,B,J){if(B==null)throw Error(a(151));for(var ye=null,ze=null,ge=M,ke=M=0,Me=null,Ue=B.next();ge!==null&&!Ue.done;ke++,Ue=B.next()){ge.index>ke?(Me=ge,ge=null):Me=ge.sibling;var Ui=V(U,ge,Ue.value,J);if(Ui===null){ge===null&&(ge=Me);break}n&&ge&&Ui.alternate===null&&r(U,ge),M=m(Ui,M,ke),ze===null?ye=Ui:ze.sibling=Ui,ze=Ui,ge=Me}if(Ue.done)return l(U,ge),Ie&&Gn(U,ke),ye;if(ge===null){for(;!Ue.done;ke++,Ue=B.next())Ue=ee(U,Ue.value,J),Ue!==null&&(M=m(Ue,M,ke),ze===null?ye=Ue:ze.sibling=Ue,ze=Ue);return Ie&&Gn(U,ke),ye}for(ge=u(ge);!Ue.done;ke++,Ue=B.next())Ue=q(ge,U,ke,Ue.value,J),Ue!==null&&(n&&Ue.alternate!==null&&ge.delete(Ue.key===null?ke:Ue.key),M=m(Ue,M,ke),ze===null?ye=Ue:ze.sibling=Ue,ze=Ue);return n&&ge.forEach(function(uE){return r(U,uE)}),Ie&&Gn(U,ke),ye}function qe(U,M,B,J){if(typeof B=="object"&&B!==null&&B.type===A&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case b:e:{for(var ye=B.key;M!==null;){if(M.key===ye){if(ye=B.type,ye===A){if(M.tag===7){l(U,M.sibling),J=h(M,B.props.children),J.return=U,U=J;break e}}else if(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===G&&er(ye)===M.type){l(U,M.sibling),J=h(M,B.props),$a(J,B),J.return=U,U=J;break e}l(U,M);break}else r(U,M);M=M.sibling}B.type===A?(J=Qi(B.props.children,U.mode,J,B.key),J.return=U,U=J):(J=so(B.type,B.key,B.props,null,U.mode,J),$a(J,B),J.return=U,U=J)}return _(U);case S:e:{for(ye=B.key;M!==null;){if(M.key===ye)if(M.tag===4&&M.stateNode.containerInfo===B.containerInfo&&M.stateNode.implementation===B.implementation){l(U,M.sibling),J=h(M,B.children||[]),J.return=U,U=J;break e}else{l(U,M);break}else r(U,M);M=M.sibling}J=zu(B,U.mode,J),J.return=U,U=J}return _(U);case G:return B=er(B),qe(U,M,B,J)}if(ne(B))return fe(U,M,B,J);if(F(B)){if(ye=F(B),typeof ye!="function")throw Error(a(150));return B=ye.call(B),ve(U,M,B,J)}if(typeof B.then=="function")return qe(U,M,go(B),J);if(B.$$typeof===k)return qe(U,M,fo(U,B),J);yo(U,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,M!==null&&M.tag===6?(l(U,M.sibling),J=h(M,B),J.return=U,U=J):(l(U,M),J=Iu(B,U.mode,J),J.return=U,U=J),_(U)):l(U,M)}return function(U,M,B,J){try{Ga=0;var ye=qe(U,M,B,J);return Pr=null,ye}catch(ge){if(ge===Hr||ge===po)throw ge;var ze=Yt(29,ge,null,U.mode);return ze.lanes=J,ze.return=U,ze}}}var nr=Up(!0),Hp=Up(!1),_i=!1;function Xu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qu(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 Si(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ei(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(He&2)!==0){var h=u.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),u.pending=r,r=oo(n),Sp(n,null,l),r}return lo(n,u,r,l),oo(n)}function qa(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,Lh(n,l)}}function Zu(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var h=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?h=m=_:m=m.next=_,l=l.next}while(l!==null);m===null?h=m=r:m=m.next=r}else h=m=r;l={baseState:u.baseState,firstBaseUpdate:h,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 Ku=!1;function Fa(){if(Ku){var n=Ur;if(n!==null)throw n}}function Ya(n,r,l,u){Ku=!1;var h=n.updateQueue;_i=!1;var m=h.firstBaseUpdate,_=h.lastBaseUpdate,E=h.shared.pending;if(E!==null){h.shared.pending=null;var N=E,j=N.next;N.next=null,_===null?m=j:_.next=j,_=N;var Q=n.alternate;Q!==null&&(Q=Q.updateQueue,E=Q.lastBaseUpdate,E!==_&&(E===null?Q.firstBaseUpdate=j:E.next=j,Q.lastBaseUpdate=N))}if(m!==null){var ee=h.baseState;_=0,Q=j=N=null,E=m;do{var V=E.lane&-536870913,q=V!==E.lane;if(q?(Oe&V)===V:(u&V)===V){V!==0&&V===zr&&(Ku=!0),Q!==null&&(Q=Q.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var fe=n,ve=E;V=r;var qe=l;switch(ve.tag){case 1:if(fe=ve.payload,typeof fe=="function"){ee=fe.call(qe,ee,V);break e}ee=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=ve.payload,V=typeof fe=="function"?fe.call(qe,ee,V):fe,V==null)break e;ee=y({},ee,V);break e;case 2:_i=!0}}V=E.callback,V!==null&&(n.flags|=64,q&&(n.flags|=8192),q=h.callbacks,q===null?h.callbacks=[V]:q.push(V))}else q={lane:V,tag:E.tag,payload:E.payload,callback:E.callback,next:null},Q===null?(j=Q=q,N=ee):Q=Q.next=q,_|=V;if(E=E.next,E===null){if(E=h.shared.pending,E===null)break;q=E,E=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);Q===null&&(N=ee),h.baseState=N,h.firstBaseUpdate=j,h.lastBaseUpdate=Q,m===null&&(h.shared.lanes=0),Ai|=_,n.lanes=_,n.memoizedState=ee}}function Pp(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Bp(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)Pp(l[n],r)}var Br=O(null),bo=O(0);function jp(n,r){n=ei,C(bo,n),C(Br,r),ei=n|r.baseLanes}function Wu(){C(bo,ei),C(Br,Br.current)}function Ju(){ei=bo.current,X(Br),X(bo)}var Xt=O(null),un=null;function xi(n){var r=n.alternate;C(at,at.current&1),C(Xt,n),un===null&&(r===null||Br.current!==null||r.memoizedState!==null)&&(un=n)}function ec(n){C(at,at.current),C(Xt,n),un===null&&(un=n)}function Vp(n){n.tag===22?(C(at,at.current),C(Xt,n),un===null&&(un=n)):wi()}function wi(){C(at,at.current),C(Xt,Xt.current)}function Qt(n){X(Xt),un===n&&(un=null),X(at)}var at=O(0);function vo(n){for(var r=n;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ld(l)||od(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 Fn=0,Ce=null,Ge=null,ct=null,_o=!1,jr=!1,ir=!1,So=0,Xa=0,Vr=null,J_=0;function it(){throw Error(a(321))}function tc(n,r){if(r===null)return!1;for(var l=0;l<r.length&&l<n.length;l++)if(!Ft(n[l],r[l]))return!1;return!0}function nc(n,r,l,u,h,m){return Fn=m,Ce=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,P.H=n===null||n.memoizedState===null?Cm:yc,ir=!1,m=l(u,h),ir=!1,jr&&(m=$p(r,l,u,h)),Gp(n),m}function Gp(n){P.H=Ka;var r=Ge!==null&&Ge.next!==null;if(Fn=0,ct=Ge=Ce=null,_o=!1,Xa=0,Vr=null,r)throw Error(a(300));n===null||dt||(n=n.dependencies,n!==null&&co(n)&&(dt=!0))}function $p(n,r,l,u){Ce=n;var h=0;do{if(jr&&(Vr=null),Xa=0,jr=!1,25<=h)throw Error(a(301));if(h+=1,ct=Ge=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}P.H=km,m=r(l,u)}while(jr);return m}function eS(){var n=P.H,r=n.useState()[0];return r=typeof r.then=="function"?Qa(r):r,n=n.useState()[0],(Ge!==null?Ge.memoizedState:null)!==n&&(Ce.flags|=1024),r}function ic(){var n=So!==0;return So=0,n}function rc(n,r,l){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~l}function ac(n){if(_o){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}_o=!1}Fn=0,ct=Ge=Ce=null,jr=!1,Xa=So=0,Vr=null}function Mt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?Ce.memoizedState=ct=n:ct=ct.next=n,ct}function lt(){if(Ge===null){var n=Ce.alternate;n=n!==null?n.memoizedState:null}else n=Ge.next;var r=ct===null?Ce.memoizedState:ct.next;if(r!==null)ct=r,Ge=n;else{if(n===null)throw Ce.alternate===null?Error(a(467)):Error(a(310));Ge=n,n={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},ct===null?Ce.memoizedState=ct=n:ct=ct.next=n}return ct}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qa(n){var r=Xa;return Xa+=1,Vr===null&&(Vr=[]),n=Mp(Vr,n,r),r=Ce,(ct===null?r.memoizedState:ct.next)===null&&(r=r.alternate,P.H=r===null||r.memoizedState===null?Cm:yc),n}function xo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Qa(n);if(n.$$typeof===k)return At(n)}throw Error(a(438,String(n)))}function lc(n){var r=null,l=Ce.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=Ce.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=Eo(),Ce.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]=le;return r.index++,l}function Yn(n,r){return typeof r=="function"?r(n):r}function wo(n){var r=lt();return oc(r,Ge,n)}function oc(n,r,l){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var h=n.baseQueue,m=u.pending;if(m!==null){if(h!==null){var _=h.next;h.next=m.next,m.next=_}r.baseQueue=h=m,u.pending=null}if(m=n.baseState,h===null)n.memoizedState=m;else{r=h.next;var E=_=null,N=null,j=r,Q=!1;do{var ee=j.lane&-536870913;if(ee!==j.lane?(Oe&ee)===ee:(Fn&ee)===ee){var V=j.revertLane;if(V===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),ee===zr&&(Q=!0);else if((Fn&V)===V){j=j.next,V===zr&&(Q=!0);continue}else ee={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},N===null?(E=N=ee,_=m):N=N.next=ee,Ce.lanes|=V,Ai|=V;ee=j.action,ir&&l(m,ee),m=j.hasEagerState?j.eagerState:l(m,ee)}else V={lane:ee,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},N===null?(E=N=V,_=m):N=N.next=V,Ce.lanes|=ee,Ai|=ee;j=j.next}while(j!==null&&j!==r);if(N===null?_=m:N.next=E,!Ft(m,n.memoizedState)&&(dt=!0,Q&&(l=Ur,l!==null)))throw l;n.memoizedState=m,n.baseState=_,n.baseQueue=N,u.lastRenderedState=m}return h===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function sc(n){var r=lt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=n;var u=l.dispatch,h=l.pending,m=r.memoizedState;if(h!==null){l.pending=null;var _=h=h.next;do m=n(m,_.action),_=_.next;while(_!==h);Ft(m,r.memoizedState)||(dt=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),l.lastRenderedState=m}return[m,u]}function qp(n,r,l){var u=Ce,h=lt(),m=Ie;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=r();var _=!Ft((Ge||h).memoizedState,l);if(_&&(h.memoizedState=l,dt=!0),h=h.queue,dc(Xp.bind(null,u,h,n),[n]),h.getSnapshot!==r||_||ct!==null&&ct.memoizedState.tag&1){if(u.flags|=2048,Gr(9,{destroy:void 0},Yp.bind(null,u,h,l,r),null),Ye===null)throw Error(a(349));m||(Fn&127)!==0||Fp(u,r,l)}return l}function Fp(n,r,l){n.flags|=16384,n={getSnapshot:r,value:l},r=Ce.updateQueue,r===null?(r=Eo(),Ce.updateQueue=r,r.stores=[n]):(l=r.stores,l===null?r.stores=[n]:l.push(n))}function Yp(n,r,l,u){r.value=l,r.getSnapshot=u,Qp(r)&&Zp(n)}function Xp(n,r,l){return l(function(){Qp(r)&&Zp(n)})}function Qp(n){var r=n.getSnapshot;n=n.value;try{var l=r();return!Ft(n,l)}catch{return!0}}function Zp(n){var r=Xi(n,2);r!==null&&jt(r,n,2)}function uc(n){var r=Mt();if(typeof n=="function"){var l=n;if(n=l(),ir){st(!0);try{l()}finally{st(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:n},r}function Kp(n,r,l,u){return n.baseState=l,oc(n,Ge,typeof u=="function"?u:Yn)}function tS(n,r,l,u,h){if(Ao(n))throw Error(a(485));if(n=r.action,n!==null){var m={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){m.listeners.push(_)}};P.T!==null?l(!0):m.isTransition=!1,u(m),l=r.pending,l===null?(m.next=r.pending=m,Wp(r,m)):(m.next=l.next,r.pending=l.next=m)}}function Wp(n,r){var l=r.action,u=r.payload,h=n.state;if(r.isTransition){var m=P.T,_={};P.T=_;try{var E=l(h,u),N=P.S;N!==null&&N(_,E),Jp(n,r,E)}catch(j){cc(n,r,j)}finally{m!==null&&_.types!==null&&(m.types=_.types),P.T=m}}else try{m=l(h,u),Jp(n,r,m)}catch(j){cc(n,r,j)}}function Jp(n,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){em(n,r,u)},function(u){return cc(n,r,u)}):em(n,r,l)}function em(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,Wp(n,l)))}function cc(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 nm(n,r){return r}function im(n,r){if(Ie){var l=Ye.formState;if(l!==null){e:{var u=Ce;if(Ie){if(We){t:{for(var h=We,m=sn;h.nodeType!==8;){if(!m){h=null;break t}if(h=cn(h.nextSibling),h===null){h=null;break t}}m=h.data,h=m==="F!"||m==="F"?h:null}if(h){We=cn(h.nextSibling),u=h.data==="F!";break e}}bi(u)}u=!1}u&&(r=l[0])}}return l=Mt(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nm,lastRenderedState:r},l.queue=u,l=Em.bind(null,Ce,u),u.dispatch=l,u=uc(!1),m=gc.bind(null,Ce,!1,u.queue),u=Mt(),h={state:r,dispatch:null,action:n,pending:null},u.queue=h,l=tS.bind(null,Ce,h,m,l),h.dispatch=l,u.memoizedState=n,[r,l,!1]}function rm(n){var r=lt();return am(r,Ge,n)}function am(n,r,l){if(r=oc(n,r,nm)[0],n=wo(Yn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Qa(r)}catch(_){throw _===Hr?po:_}else u=r;r=lt();var h=r.queue,m=h.dispatch;return l!==r.memoizedState&&(Ce.flags|=2048,Gr(9,{destroy:void 0},nS.bind(null,h,l),null)),[u,m,n]}function nS(n,r){n.action=r}function lm(n){var r=lt(),l=Ge;if(l!==null)return am(r,l,n);lt(),r=r.memoizedState,l=lt();var u=l.queue.dispatch;return l.memoizedState=n,[r,u,!1]}function Gr(n,r,l,u){return n={tag:n,create:l,deps:u,inst:r,next:null},r=Ce.updateQueue,r===null&&(r=Eo(),Ce.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 om(){return lt().memoizedState}function Co(n,r,l,u){var h=Mt();Ce.flags|=n,h.memoizedState=Gr(1|r,{destroy:void 0},l,u===void 0?null:u)}function ko(n,r,l,u){var h=lt();u=u===void 0?null:u;var m=h.memoizedState.inst;Ge!==null&&u!==null&&tc(u,Ge.memoizedState.deps)?h.memoizedState=Gr(r,m,l,u):(Ce.flags|=n,h.memoizedState=Gr(1|r,m,l,u))}function sm(n,r){Co(8390656,8,n,r)}function dc(n,r){ko(2048,8,n,r)}function iS(n){Ce.flags|=4;var r=Ce.updateQueue;if(r===null)r=Eo(),Ce.updateQueue=r,r.events=[n];else{var l=r.events;l===null?r.events=[n]:l.push(n)}}function um(n){var r=lt().memoizedState;return iS({ref:r,nextImpl:n}),function(){if((He&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function cm(n,r){return ko(4,2,n,r)}function dm(n,r){return ko(4,4,n,r)}function fm(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 hm(n,r,l){l=l!=null?l.concat([n]):null,ko(4,4,fm.bind(null,r,n),l)}function fc(){}function pm(n,r){var l=lt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&tc(r,u[1])?u[0]:(l.memoizedState=[n,r],n)}function mm(n,r){var l=lt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&tc(r,u[1]))return u[0];if(u=n(),ir){st(!0);try{n()}finally{st(!1)}}return l.memoizedState=[u,r],u}function hc(n,r,l){return l===void 0||(Fn&1073741824)!==0&&(Oe&261930)===0?n.memoizedState=r:(n.memoizedState=l,n=gg(),Ce.lanes|=n,Ai|=n,l)}function gm(n,r,l,u){return Ft(l,r)?l:Br.current!==null?(n=hc(n,l,u),Ft(n,r)||(dt=!0),n):(Fn&42)===0||(Fn&1073741824)!==0&&(Oe&261930)===0?(dt=!0,n.memoizedState=l):(n=gg(),Ce.lanes|=n,Ai|=n,r)}function ym(n,r,l,u,h){var m=Z.p;Z.p=m!==0&&8>m?m:8;var _=P.T,E={};P.T=E,gc(n,!1,r,l);try{var N=h(),j=P.S;if(j!==null&&j(E,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var Q=W_(N,u);Za(n,r,Q,Wt(n))}else Za(n,r,u,Wt(n))}catch(ee){Za(n,r,{then:function(){},status:"rejected",reason:ee},Wt())}finally{Z.p=m,_!==null&&E.types!==null&&(_.types=E.types),P.T=_}}function rS(){}function pc(n,r,l,u){if(n.tag!==5)throw Error(a(476));var h=bm(n).queue;ym(n,h,r,oe,l===null?rS:function(){return vm(n),l(u)})}function bm(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:oe},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function vm(n){var r=bm(n);r.next===null&&(r=n.alternate.memoizedState),Za(n,r.next.queue,{},Wt())}function mc(){return At(hl)}function _m(){return lt().memoizedState}function Sm(){return lt().memoizedState}function aS(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=Wt();n=Si(l);var u=Ei(r,n,l);u!==null&&(jt(u,r,l),qa(u,r,l)),r={cache:$u()},n.payload=r;return}r=r.return}}function lS(n,r,l){var u=Wt();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ao(n)?xm(r,l):(l=Ou(n,r,l,u),l!==null&&(jt(l,n,u),wm(l,r,u)))}function Em(n,r,l){var u=Wt();Za(n,r,l,u)}function Za(n,r,l,u){var h={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ao(n))xm(r,h);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(h.hasEagerState=!0,h.eagerState=E,Ft(E,_))return lo(n,r,h,0),Ye===null&&ao(),!1}catch{}if(l=Ou(n,r,h,u),l!==null)return jt(l,n,u),wm(l,r,u),!0}return!1}function gc(n,r,l,u){if(u={lane:2,revertLane:Xc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Ao(n)){if(r)throw Error(a(479))}else r=Ou(n,l,u,2),r!==null&&jt(r,n,2)}function Ao(n){var r=n.alternate;return n===Ce||r!==null&&r===Ce}function xm(n,r){jr=_o=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function wm(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,Lh(n,l)}}var Ka={readContext:At,use:xo,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};Ka.useEffectEvent=it;var Cm={readContext:At,use:xo,useCallback:function(n,r){return Mt().memoizedState=[n,r===void 0?null:r],n},useContext:At,useEffect:sm,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,Co(4194308,4,fm.bind(null,r,n),l)},useLayoutEffect:function(n,r){return Co(4194308,4,n,r)},useInsertionEffect:function(n,r){Co(4,2,n,r)},useMemo:function(n,r){var l=Mt();r=r===void 0?null:r;var u=n();if(ir){st(!0);try{n()}finally{st(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Mt();if(l!==void 0){var h=l(r);if(ir){st(!0);try{l(r)}finally{st(!1)}}}else h=r;return u.memoizedState=u.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},u.queue=n,n=n.dispatch=lS.bind(null,Ce,n),[u.memoizedState,n]},useRef:function(n){var r=Mt();return n={current:n},r.memoizedState=n},useState:function(n){n=uc(n);var r=n.queue,l=Em.bind(null,Ce,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:fc,useDeferredValue:function(n,r){var l=Mt();return hc(l,n,r)},useTransition:function(){var n=uc(!1);return n=ym.bind(null,Ce,n.queue,!0,!1),Mt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=Ce,h=Mt();if(Ie){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),Ye===null)throw Error(a(349));(Oe&127)!==0||Fp(u,r,l)}h.memoizedState=l;var m={value:l,getSnapshot:r};return h.queue=m,sm(Xp.bind(null,u,m,n),[n]),u.flags|=2048,Gr(9,{destroy:void 0},Yp.bind(null,u,m,l,r),null),l},useId:function(){var n=Mt(),r=Ye.identifierPrefix;if(Ie){var l=Tn,u=An;l=(u&~(1<<32-Fe(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=So++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=J_++,r="_"+r+"r_"+l.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:mc,useFormState:im,useActionState:im,useOptimistic:function(n){var r=Mt();r.memoizedState=r.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=gc.bind(null,Ce,!0,l),l.dispatch=r,[n,r]},useMemoCache:lc,useCacheRefresh:function(){return Mt().memoizedState=aS.bind(null,Ce)},useEffectEvent:function(n){var r=Mt(),l={impl:n};return r.memoizedState=l,function(){if((He&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},yc={readContext:At,use:xo,useCallback:pm,useContext:At,useEffect:dc,useImperativeHandle:hm,useInsertionEffect:cm,useLayoutEffect:dm,useMemo:mm,useReducer:wo,useRef:om,useState:function(){return wo(Yn)},useDebugValue:fc,useDeferredValue:function(n,r){var l=lt();return gm(l,Ge.memoizedState,n,r)},useTransition:function(){var n=wo(Yn)[0],r=lt().memoizedState;return[typeof n=="boolean"?n:Qa(n),r]},useSyncExternalStore:qp,useId:_m,useHostTransitionStatus:mc,useFormState:rm,useActionState:rm,useOptimistic:function(n,r){var l=lt();return Kp(l,Ge,n,r)},useMemoCache:lc,useCacheRefresh:Sm};yc.useEffectEvent=um;var km={readContext:At,use:xo,useCallback:pm,useContext:At,useEffect:dc,useImperativeHandle:hm,useInsertionEffect:cm,useLayoutEffect:dm,useMemo:mm,useReducer:sc,useRef:om,useState:function(){return sc(Yn)},useDebugValue:fc,useDeferredValue:function(n,r){var l=lt();return Ge===null?hc(l,n,r):gm(l,Ge.memoizedState,n,r)},useTransition:function(){var n=sc(Yn)[0],r=lt().memoizedState;return[typeof n=="boolean"?n:Qa(n),r]},useSyncExternalStore:qp,useId:_m,useHostTransitionStatus:mc,useFormState:lm,useActionState:lm,useOptimistic:function(n,r){var l=lt();return Ge!==null?Kp(l,Ge,n,r):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:lc,useCacheRefresh:Sm};km.useEffectEvent=um;function bc(n,r,l,u){r=n.memoizedState,l=l(u,r),l=l==null?r:y({},r,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var vc={enqueueSetState:function(n,r,l){n=n._reactInternals;var u=Wt(),h=Si(u);h.payload=r,l!=null&&(h.callback=l),r=Ei(n,h,u),r!==null&&(jt(r,n,u),qa(r,n,u))},enqueueReplaceState:function(n,r,l){n=n._reactInternals;var u=Wt(),h=Si(u);h.tag=1,h.payload=r,l!=null&&(h.callback=l),r=Ei(n,h,u),r!==null&&(jt(r,n,u),qa(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var l=Wt(),u=Si(l);u.tag=2,r!=null&&(u.callback=r),r=Ei(n,u,l),r!==null&&(jt(r,n,l),qa(r,n,l))}};function Am(n,r,l,u,h,m,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,m,_):r.prototype&&r.prototype.isPureReactComponent?!Ua(l,u)||!Ua(h,m):!0}function Tm(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&&vc.enqueueReplaceState(r,r.state,null)}function rr(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=y({},l));for(var h in n)l[h]===void 0&&(l[h]=n[h])}return l}function Lm(n){ro(n)}function Rm(n){console.error(n)}function Dm(n){ro(n)}function To(n,r){try{var l=n.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function Nm(n,r,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function _c(n,r,l){return l=Si(l),l.tag=3,l.payload={element:null},l.callback=function(){To(n,r)},l}function Om(n){return n=Si(n),n.tag=3,n}function Mm(n,r,l,u){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var m=u.value;n.payload=function(){return h(m)},n.callback=function(){Nm(r,l,u)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){Nm(r,l,u),typeof h!="function"&&(Ti===null?Ti=new Set([this]):Ti.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function oS(n,r,l,u,h){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Ir(r,l,h,!0),l=Xt.current,l!==null){switch(l.tag){case 31:case 13:return un===null?Bo():l.alternate===null&&rt===0&&(rt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,u===mo?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),qc(n,u,h)),!1;case 22:return l.flags|=65536,u===mo?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)),qc(n,u,h)),!1}throw Error(a(435,l.tag))}return qc(n,u,h),Bo(),!1}if(Ie)return r=Xt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,u!==Pu&&(n=Error(a(422),{cause:u}),Ba(an(n,l)))):(u!==Pu&&(r=Error(a(423),{cause:u}),Ba(an(r,l))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,u=an(u,l),h=_c(n.stateNode,u,h),Zu(n,h),rt!==4&&(rt=2)),!1;var m=Error(a(520),{cause:u});if(m=an(m,l),al===null?al=[m]:al.push(m),rt!==4&&(rt=2),r===null)return!0;u=an(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,n=h&-h,l.lanes|=n,n=_c(l.stateNode,u,n),Zu(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"&&(Ti===null||!Ti.has(m))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Om(h),Mm(h,n,l,u),Zu(l,h),!1}l=l.return}while(l!==null);return!1}var Sc=Error(a(461)),dt=!1;function Tt(n,r,l,u){r.child=n===null?Hp(r,null,l,u):nr(r,n.child,l,u)}function Im(n,r,l,u,h){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 Wi(r),u=nc(n,r,l,_,m,h),E=ic(),n!==null&&!dt?(rc(n,r,h),Xn(n,r,h)):(Ie&&E&&Uu(r),r.flags|=1,Tt(n,r,u,h),r.child)}function zm(n,r,l,u,h){if(n===null){var m=l.type;return typeof m=="function"&&!Mu(m)&&m.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=m,Um(n,r,m,u,h)):(n=so(l.type,null,u,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(m=n.child,!Lc(n,h)){var _=m.memoizedProps;if(l=l.compare,l=l!==null?l:Ua,l(_,u)&&n.ref===r.ref)return Xn(n,r,h)}return r.flags|=1,n=Vn(m,u),n.ref=r.ref,n.return=r,r.child=n}function Um(n,r,l,u,h){if(n!==null){var m=n.memoizedProps;if(Ua(m,u)&&n.ref===r.ref)if(dt=!1,r.pendingProps=u=m,Lc(n,h))(n.flags&131072)!==0&&(dt=!0);else return r.lanes=n.lanes,Xn(n,r,h)}return Ec(n,r,l,u,h)}function Hm(n,r,l,u){var h=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,h=0;u!==null;)h=h|u.lanes|u.childLanes,u=u.sibling;u=h&~m}else u=0,r.child=null;return Pm(n,r,m,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&ho(r,m!==null?m.cachePool:null),m!==null?jp(r,m):Wu(),Vp(r);else return u=r.lanes=536870912,Pm(n,r,m!==null?m.baseLanes|l:l,l,u)}else m!==null?(ho(r,m.cachePool),jp(r,m),wi(),r.memoizedState=null):(n!==null&&ho(r,null),Wu(),wi());return Tt(n,r,h,l),r.child}function Wa(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Pm(n,r,l,u,h){var m=Fu();return m=m===null?null:{parent:ut._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},n!==null&&ho(r,null),Wu(),Vp(r),n!==null&&Ir(n,r,u,!0),r.childLanes=h,null}function Lo(n,r){return r=Do({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Bm(n,r,l){return nr(r,n.child,null,l),n=Lo(r,r.pendingProps),n.flags|=2,Qt(r),r.memoizedState=null,n}function sS(n,r,l){var u=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Ie){if(u.mode==="hidden")return n=Lo(r,u),r.lanes=536870912,Wa(null,n);if(ec(r),(n=We)?(n=Wg(n,sn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:gi!==null?{id:An,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},l=xp(n),l.return=r,r.child=l,kt=r,We=null)):n=null,n===null)throw bi(r);return r.lanes=536870912,null}return Lo(r,u)}var m=n.memoizedState;if(m!==null){var _=m.dehydrated;if(ec(r),h)if(r.flags&256)r.flags&=-257,r=Bm(n,r,l);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(dt||Ir(n,r,l,!1),h=(l&n.childLanes)!==0,dt||h){if(u=Ye,u!==null&&(_=Rh(u,l),_!==0&&_!==m.retryLane))throw m.retryLane=_,Xi(n,_),jt(u,n,_),Sc;Bo(),r=Bm(n,r,l)}else n=m.treeContext,We=cn(_.nextSibling),kt=r,Ie=!0,yi=null,sn=!1,n!==null&&kp(r,n),r=Lo(r,u),r.flags|=4096;return r}return n=Vn(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function Ro(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 Ec(n,r,l,u,h){return Wi(r),l=nc(n,r,l,u,void 0,h),u=ic(),n!==null&&!dt?(rc(n,r,h),Xn(n,r,h)):(Ie&&u&&Uu(r),r.flags|=1,Tt(n,r,l,h),r.child)}function jm(n,r,l,u,h,m){return Wi(r),r.updateQueue=null,l=$p(r,u,l,h),Gp(n),u=ic(),n!==null&&!dt?(rc(n,r,m),Xn(n,r,m)):(Ie&&u&&Uu(r),r.flags|=1,Tt(n,r,l,m),r.child)}function Vm(n,r,l,u,h){if(Wi(r),r.stateNode===null){var m=Dr,_=l.contextType;typeof _=="object"&&_!==null&&(m=At(_)),m=new l(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=vc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},Xu(r),_=l.contextType,m.context=typeof _=="object"&&_!==null?At(_):Dr,m.state=r.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(bc(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&&vc.enqueueReplaceState(m,m.state,null),Ya(r,u,m,h),Fa(),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=rr(l,E);m.props=N;var j=m.context,Q=l.contextType;_=Dr,typeof Q=="object"&&Q!==null&&(_=At(Q));var ee=l.getDerivedStateFromProps;Q=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||j!==_)&&Tm(r,m,u,_),_i=!1;var V=r.memoizedState;m.state=V,Ya(r,u,m,h),Fa(),j=r.memoizedState,E||V!==j||_i?(typeof ee=="function"&&(bc(r,l,ee,u),j=r.memoizedState),(N=_i||Am(r,l,N,u,V,j,_))?(Q||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=j),m.props=u,m.state=j,m.context=_,u=N):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,Qu(n,r),_=r.memoizedProps,Q=rr(l,_),m.props=Q,ee=r.pendingProps,V=m.context,j=l.contextType,N=Dr,typeof j=="object"&&j!==null&&(N=At(j)),E=l.getDerivedStateFromProps,(j=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==ee||V!==N)&&Tm(r,m,u,N),_i=!1,V=r.memoizedState,m.state=V,Ya(r,u,m,h),Fa();var q=r.memoizedState;_!==ee||V!==q||_i||n!==null&&n.dependencies!==null&&co(n.dependencies)?(typeof E=="function"&&(bc(r,l,E,u),q=r.memoizedState),(Q=_i||Am(r,l,Q,u,V,q,N)||n!==null&&n.dependencies!==null&&co(n.dependencies))?(j||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,q,N),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,q,N)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=q),m.props=u,m.state=q,m.context=N,u=Q):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=1024),u=!1)}return m=u,Ro(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=nr(r,n.child,null,h),r.child=nr(r,null,l,h)):Tt(n,r,l,h),r.memoizedState=m.state,n=r.child):n=Xn(n,r,h),n}function Gm(n,r,l,u){return Zi(),r.flags|=256,Tt(n,r,l,u),r.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(n){return{baseLanes:n,cachePool:Np()}}function Cc(n,r,l){return n=n!==null?n.childLanes&~l:0,r&&(n|=Kt),n}function $m(n,r,l){var u=r.pendingProps,h=!1,m=(r.flags&128)!==0,_;if((_=m)||(_=n!==null&&n.memoizedState===null?!1:(at.current&2)!==0),_&&(h=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(Ie){if(h?xi(r):wi(),(n=We)?(n=Wg(n,sn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:gi!==null?{id:An,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},l=xp(n),l.return=r,r.child=l,kt=r,We=null)):n=null,n===null)throw bi(r);return od(n)?r.lanes=32:r.lanes=536870912,null}var E=u.children;return u=u.fallback,h?(wi(),h=r.mode,E=Do({mode:"hidden",children:E},h),u=Qi(u,h,l,null),E.return=r,u.return=r,E.sibling=u,r.child=E,u=r.child,u.memoizedState=wc(l),u.childLanes=Cc(n,_,l),r.memoizedState=xc,Wa(null,u)):(xi(r),kc(r,E))}var N=n.memoizedState;if(N!==null&&(E=N.dehydrated,E!==null)){if(m)r.flags&256?(xi(r),r.flags&=-257,r=Ac(n,r,l)):r.memoizedState!==null?(wi(),r.child=n.child,r.flags|=128,r=null):(wi(),E=u.fallback,h=r.mode,u=Do({mode:"visible",children:u.children},h),E=Qi(E,h,l,null),E.flags|=2,u.return=r,E.return=r,u.sibling=E,r.child=u,nr(r,n.child,null,l),u=r.child,u.memoizedState=wc(l),u.childLanes=Cc(n,_,l),r.memoizedState=xc,r=Wa(null,u));else if(xi(r),od(E)){if(_=E.nextSibling&&E.nextSibling.dataset,_)var j=_.dgst;_=j,u=Error(a(419)),u.stack="",u.digest=_,Ba({value:u,source:null,stack:null}),r=Ac(n,r,l)}else if(dt||Ir(n,r,l,!1),_=(l&n.childLanes)!==0,dt||_){if(_=Ye,_!==null&&(u=Rh(_,l),u!==0&&u!==N.retryLane))throw N.retryLane=u,Xi(n,u),jt(_,n,u),Sc;ld(E)||Bo(),r=Ac(n,r,l)}else ld(E)?(r.flags|=192,r.child=n.child,r=null):(n=N.treeContext,We=cn(E.nextSibling),kt=r,Ie=!0,yi=null,sn=!1,n!==null&&kp(r,n),r=kc(r,u.children),r.flags|=4096);return r}return h?(wi(),E=u.fallback,h=r.mode,N=n.child,j=N.sibling,u=Vn(N,{mode:"hidden",children:u.children}),u.subtreeFlags=N.subtreeFlags&65011712,j!==null?E=Vn(j,E):(E=Qi(E,h,l,null),E.flags|=2),E.return=r,u.return=r,u.sibling=E,r.child=u,Wa(null,u),u=r.child,E=n.child.memoizedState,E===null?E=wc(l):(h=E.cachePool,h!==null?(N=ut._currentValue,h=h.parent!==N?{parent:N,pool:N}:h):h=Np(),E={baseLanes:E.baseLanes|l,cachePool:h}),u.memoizedState=E,u.childLanes=Cc(n,_,l),r.memoizedState=xc,Wa(n.child,u)):(xi(r),l=n.child,n=l.sibling,l=Vn(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 kc(n,r){return r=Do({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Do(n,r){return n=Yt(22,n,null,r),n.lanes=0,n}function Ac(n,r,l){return nr(r,n.child,null,l),n=kc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function qm(n,r,l){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),Vu(n.return,r,l)}function Tc(n,r,l,u,h,m){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:h,treeForkCount:m}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=l,_.tailMode=h,_.treeForkCount=m)}function Fm(n,r,l){var u=r.pendingProps,h=u.revealOrder,m=u.tail;u=u.children;var _=at.current,E=(_&2)!==0;if(E?(_=_&1|2,r.flags|=128):_&=1,C(at,_),Tt(n,r,u,l),u=Ie?Pa:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&qm(n,l,r);else if(n.tag===19)qm(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(h){case"forwards":for(l=r.child,h=null;l!==null;)n=l.alternate,n!==null&&vo(n)===null&&(h=l),l=l.sibling;l=h,l===null?(h=r.child,r.child=null):(h=l.sibling,l.sibling=null),Tc(r,!1,h,l,m,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&vo(n)===null){r.child=h;break}n=h.sibling,h.sibling=l,l=h,h=n}Tc(r,!0,l,null,m,u);break;case"together":Tc(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Xn(n,r,l){if(n!==null&&(r.dependencies=n.dependencies),Ai|=r.lanes,(l&r.childLanes)===0)if(n!==null){if(Ir(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=Vn(n,n.pendingProps),r.child=l,l.return=r;n.sibling!==null;)n=n.sibling,l=l.sibling=Vn(n,n.pendingProps),l.return=r;l.sibling=null}return r.child}function Lc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&co(n)))}function uS(n,r,l){switch(r.tag){case 3:Te(r,r.stateNode.containerInfo),vi(r,ut,n.memoizedState.cache),Zi();break;case 27:case 5:Xe(r);break;case 4:Te(r,r.stateNode.containerInfo);break;case 10:vi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,ec(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(xi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?$m(n,r,l):(xi(r),n=Xn(n,r,l),n!==null?n.sibling:null);xi(r);break;case 19:var h=(n.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Ir(n,r,l,!1),u=(l&r.childLanes)!==0),h){if(u)return Fm(n,r,l);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),C(at,at.current),u)break;return null;case 22:return r.lanes=0,Hm(n,r,l,r.pendingProps);case 24:vi(r,ut,n.memoizedState.cache)}return Xn(n,r,l)}function Ym(n,r,l){if(n!==null)if(n.memoizedProps!==r.pendingProps)dt=!0;else{if(!Lc(n,l)&&(r.flags&128)===0)return dt=!1,uS(n,r,l);dt=(n.flags&131072)!==0}else dt=!1,Ie&&(r.flags&1048576)!==0&&Cp(r,Pa,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=er(r.elementType),r.type=n,typeof n=="function")Mu(n)?(u=rr(n,u),r.tag=1,r=Vm(null,r,n,u,l)):(r.tag=0,r=Ec(null,r,n,u,l));else{if(n!=null){var h=n.$$typeof;if(h===I){r.tag=11,r=Im(null,r,n,u,l);break e}else if(h===$){r.tag=14,r=zm(null,r,n,u,l);break e}}throw r=ie(n)||n,Error(a(306,r,""))}}return r;case 0:return Ec(n,r,r.type,r.pendingProps,l);case 1:return u=r.type,h=rr(u,r.pendingProps),Vm(n,r,u,h,l);case 3:e:{if(Te(r,r.stateNode.containerInfo),n===null)throw Error(a(387));u=r.pendingProps;var m=r.memoizedState;h=m.element,Qu(n,r),Ya(r,u,null,l);var _=r.memoizedState;if(u=_.cache,vi(r,ut,u),u!==m.cache&&Gu(r,[ut],l,!0),Fa(),u=_.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=Gm(n,r,u,l);break e}else if(u!==h){h=an(Error(a(424)),r),Ba(h),r=Gm(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,We=cn(n.firstChild),kt=r,Ie=!0,yi=null,sn=!0,l=Hp(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Zi(),u===h){r=Xn(n,r,l);break e}Tt(n,r,u,l)}r=r.child}return r;case 26:return Ro(n,r),n===null?(l=ry(r.type,null,r.pendingProps,null))?r.memoizedState=l:Ie||(l=r.type,n=r.pendingProps,u=Yo(de.current).createElement(l),u[Ct]=r,u[It]=n,Lt(u,l,n),vt(u),r.stateNode=u):r.memoizedState=ry(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Xe(r),n===null&&Ie&&(u=r.stateNode=ty(r.type,r.pendingProps,de.current),kt=r,sn=!0,h=We,Ni(r.type)?(sd=h,We=cn(u.firstChild)):We=h),Tt(n,r,r.pendingProps.children,l),Ro(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Ie&&((h=u=We)&&(u=PS(u,r.type,r.pendingProps,sn),u!==null?(r.stateNode=u,kt=r,We=cn(u.firstChild),sn=!1,h=!0):h=!1),h||bi(r)),Xe(r),h=r.type,m=r.pendingProps,_=n!==null?n.memoizedProps:null,u=m.children,id(h,m)?u=null:_!==null&&id(h,_)&&(r.flags|=32),r.memoizedState!==null&&(h=nc(n,r,eS,null,null,l),hl._currentValue=h),Ro(n,r),Tt(n,r,u,l),r.child;case 6:return n===null&&Ie&&((n=l=We)&&(l=BS(l,r.pendingProps,sn),l!==null?(r.stateNode=l,kt=r,We=null,n=!0):n=!1),n||bi(r)),null;case 13:return $m(n,r,l);case 4:return Te(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=nr(r,null,u,l):Tt(n,r,u,l),r.child;case 11:return Im(n,r,r.type,r.pendingProps,l);case 7:return Tt(n,r,r.pendingProps,l),r.child;case 8:return Tt(n,r,r.pendingProps.children,l),r.child;case 12:return Tt(n,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,vi(r,r.type,u.value),Tt(n,r,u.children,l),r.child;case 9:return h=r.type._context,u=r.pendingProps.children,Wi(r),h=At(h),u=u(h),r.flags|=1,Tt(n,r,u,l),r.child;case 14:return zm(n,r,r.type,r.pendingProps,l);case 15:return Um(n,r,r.type,r.pendingProps,l);case 19:return Fm(n,r,l);case 31:return sS(n,r,l);case 22:return Hm(n,r,l,r.pendingProps);case 24:return Wi(r),u=At(ut),n===null?(h=Fu(),h===null&&(h=Ye,m=$u(),h.pooledCache=m,m.refCount++,m!==null&&(h.pooledCacheLanes|=l),h=m),r.memoizedState={parent:u,cache:h},Xu(r),vi(r,ut,h)):((n.lanes&l)!==0&&(Qu(n,r),Ya(r,null,null,l),Fa()),h=n.memoizedState,m=r.memoizedState,h.parent!==u?(h={parent:u,cache:u},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),vi(r,ut,u)):(u=m.cache,vi(r,ut,u),u!==h.cache&&Gu(r,[ut],l,!0))),Tt(n,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Qn(n){n.flags|=4}function Rc(n,r,l,u,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(_g())n.flags|=8192;else throw tr=mo,Yu}else n.flags&=-16777217}function Xm(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!uy(r))if(_g())n.flags|=8192;else throw tr=mo,Yu}function No(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Ah():536870912,n.lanes|=r,Yr|=r)}function Ja(n,r){if(!Ie)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 Je(n){var r=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(r)for(var h=n.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags&65011712,u|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags,u|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=u,n.childLanes=l,r}function cS(n,r,l){var u=r.pendingProps;switch(Hu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(r),null;case 1:return Je(r),null;case 3:return l=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),qn(ut),Le(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(Mr(r)?Qn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Bu())),Je(r),null;case 26:var h=r.type,m=r.memoizedState;return n===null?(Qn(r),m!==null?(Je(r),Xm(r,m)):(Je(r),Rc(r,h,null,u,l))):m?m!==n.memoizedState?(Qn(r),Je(r),Xm(r,m)):(Je(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&Qn(r),Je(r),Rc(r,h,n,u,l)),null;case 27:if(et(r),l=de.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Qn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Je(r),null}n=se.current,Mr(r)?Ap(r):(n=ty(h,u,l),r.stateNode=n,Qn(r))}return Je(r),null;case 5:if(et(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Qn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Je(r),null}if(m=se.current,Mr(r))Ap(r);else{var _=Yo(de.current);switch(m){case 1:m=_.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:m=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":m=_.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":m=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);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(h,{is:u.is}):_.createElement(h)}}m[Ct]=r,m[It]=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(Lt(m,h,u),h){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Qn(r)}}return Je(r),Rc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&Qn(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(n=de.current,Mr(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,h=kt,h!==null)switch(h.tag){case 27:case 5:u=h.memoizedProps}n[Ct]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||$g(n.nodeValue,l)),n||bi(r,!0)}else n=Yo(n).createTextNode(u),n[Ct]=r,r.stateNode=n}return Je(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=Mr(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[Ct]=r}else Zi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Je(r),n=!1}else l=Bu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(Qt(r),r):(Qt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Je(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Mr(r),u!==null&&u.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[Ct]=r}else Zi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Je(r),h=!1}else h=Bu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Qt(r),r):(Qt(r),null)}return Qt(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,h=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(h=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==h&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),No(r,r.updateQueue),Je(r),null);case 4:return Le(),n===null&&Wc(r.stateNode.containerInfo),Je(r),null;case 10:return qn(r.type),Je(r),null;case 19:if(X(at),u=r.memoizedState,u===null)return Je(r),null;if(h=(r.flags&128)!==0,m=u.rendering,m===null)if(h)Ja(u,!1);else{if(rt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=vo(n),m!==null){for(r.flags|=128,Ja(u,!1),n=m.updateQueue,r.updateQueue=n,No(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)Ep(l,n),l=l.sibling;return C(at,at.current&1|2),Ie&&Gn(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&wt()>Uo&&(r.flags|=128,h=!0,Ja(u,!1),r.lanes=4194304)}else{if(!h)if(n=vo(m),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,No(r,n),Ja(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!Ie)return Je(r),null}else 2*wt()-u.renderingStartTime>Uo&&l!==536870912&&(r.flags|=128,h=!0,Ja(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=wt(),n.sibling=null,l=at.current,C(at,h?l&1|2:l&1),Ie&&Gn(r,u.treeForkCount),n):(Je(r),null);case 22:case 23:return Qt(r),Ju(),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&&(Je(r),r.subtreeFlags&6&&(r.flags|=8192)):Je(r),l=r.updateQueue,l!==null&&No(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(Ji),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),qn(ut),Je(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function dS(n,r){switch(Hu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return qn(ut),Le(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return et(r),null;case 31:if(r.memoizedState!==null){if(Qt(r),r.alternate===null)throw Error(a(340));Zi()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Qt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Zi()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return X(at),null;case 4:return Le(),null;case 10:return qn(r.type),null;case 22:case 23:return Qt(r),Ju(),n!==null&&X(Ji),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return qn(ut),null;case 25:return null;default:return null}}function Qm(n,r){switch(Hu(r),r.tag){case 3:qn(ut),Le();break;case 26:case 27:case 5:et(r);break;case 4:Le();break;case 31:r.memoizedState!==null&&Qt(r);break;case 13:Qt(r);break;case 19:X(at);break;case 10:qn(r.type);break;case 22:case 23:Qt(r),Ju(),n!==null&&X(Ji);break;case 24:qn(ut)}}function el(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var h=u.next;l=h;do{if((l.tag&n)===n){u=void 0;var m=l.create,_=l.inst;u=m(),_.destroy=u}l=l.next}while(l!==h)}}catch(E){Ve(r,r.return,E)}}function Ci(n,r,l){try{var u=r.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var m=h.next;u=m;do{if((u.tag&n)===n){var _=u.inst,E=_.destroy;if(E!==void 0){_.destroy=void 0,h=r;var N=l,j=E;try{j()}catch(Q){Ve(h,N,Q)}}}u=u.next}while(u!==m)}}catch(Q){Ve(r,r.return,Q)}}function Zm(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{Bp(r,l)}catch(u){Ve(n,n.return,u)}}}function Km(n,r,l){l.props=rr(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){Ve(n,r,u)}}function tl(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(h){Ve(n,r,h)}}function Ln(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(h){Ve(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Ve(n,r,h)}else l.current=null}function Wm(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(h){Ve(n,n.return,h)}}function Dc(n,r,l){try{var u=n.stateNode;OS(u,n.type,l,r),u[It]=r}catch(h){Ve(n,n.return,h)}}function Jm(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ni(n.type)||n.tag===4}function Nc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Jm(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&&Ni(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 Oc(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=Bn));else if(u!==4&&(u===27&&Ni(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(Oc(n,r,l),n=n.sibling;n!==null;)Oc(n,r,l),n=n.sibling}function Oo(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&&Ni(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Oo(n,r,l),n=n.sibling;n!==null;)Oo(n,r,l),n=n.sibling}function eg(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);Lt(r,u,l),r[Ct]=n,r[It]=l}catch(m){Ve(n,n.return,m)}}var Zn=!1,ft=!1,Mc=!1,tg=typeof WeakSet=="function"?WeakSet:Set,_t=null;function fS(n,r){if(n=n.containerInfo,td=es,n=hp(n),Au(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 h=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var _=0,E=-1,N=-1,j=0,Q=0,ee=n,V=null;t:for(;;){for(var q;ee!==l||h!==0&&ee.nodeType!==3||(E=_+h),ee!==m||u!==0&&ee.nodeType!==3||(N=_+u),ee.nodeType===3&&(_+=ee.nodeValue.length),(q=ee.firstChild)!==null;)V=ee,ee=q;for(;;){if(ee===n)break t;if(V===l&&++j===h&&(E=_),V===m&&++Q===u&&(N=_),(q=ee.nextSibling)!==null)break;ee=V,V=ee.parentNode}ee=q}l=E===-1||N===-1?null:{start:E,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(nd={focusedElem:n,selectionRange:l},es=!1,_t=r;_t!==null;)if(r=_t,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,_t=n;else for(;_t!==null;){switch(r=_t,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++)h=n[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,l=r,h=m.memoizedProps,m=m.memoizedState,u=l.stateNode;try{var fe=rr(l.type,h);n=u.getSnapshotBeforeUpdate(fe,m),u.__reactInternalSnapshotBeforeUpdate=n}catch(ve){Ve(l,l.return,ve)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,l=n.nodeType,l===9)ad(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ad(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,_t=n;break}_t=r.return}}function ng(n,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:Wn(n,l),u&4&&el(5,l);break;case 1:if(Wn(n,l),u&4)if(n=l.stateNode,r===null)try{n.componentDidMount()}catch(_){Ve(l,l.return,_)}else{var h=rr(l.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Ve(l,l.return,_)}}u&64&&Zm(l),u&512&&tl(l,l.return);break;case 3:if(Wn(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{Bp(n,r)}catch(_){Ve(l,l.return,_)}}break;case 27:r===null&&u&4&&eg(l);case 26:case 5:Wn(n,l),r===null&&u&4&&Wm(l),u&512&&tl(l,l.return);break;case 12:Wn(n,l);break;case 31:Wn(n,l),u&4&&ag(n,l);break;case 13:Wn(n,l),u&4&&lg(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=SS.bind(null,l),jS(n,l))));break;case 22:if(u=l.memoizedState!==null||Zn,!u){r=r!==null&&r.memoizedState!==null||ft,h=Zn;var m=ft;Zn=u,(ft=r)&&!m?Jn(n,l,(l.subtreeFlags&8772)!==0):Wn(n,l),Zn=h,ft=m}break;case 30:break;default:Wn(n,l)}}function ig(n){var r=n.alternate;r!==null&&(n.alternate=null,ig(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&cu(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 tt=null,Ut=!1;function Kn(n,r,l){for(l=l.child;l!==null;)rg(n,r,l),l=l.sibling}function rg(n,r,l){if(Be&&typeof Be.onCommitFiberUnmount=="function")try{Be.onCommitFiberUnmount(nt,l)}catch{}switch(l.tag){case 26:ft||Ln(l,r),Kn(n,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ft||Ln(l,r);var u=tt,h=Ut;Ni(l.type)&&(tt=l.stateNode,Ut=!1),Kn(n,r,l),cl(l.stateNode),tt=u,Ut=h;break;case 5:ft||Ln(l,r);case 6:if(u=tt,h=Ut,tt=null,Kn(n,r,l),tt=u,Ut=h,tt!==null)if(Ut)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(l.stateNode)}catch(m){Ve(l,r,m)}else try{tt.removeChild(l.stateNode)}catch(m){Ve(l,r,m)}break;case 18:tt!==null&&(Ut?(n=tt,Zg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),ta(n)):Zg(tt,l.stateNode));break;case 4:u=tt,h=Ut,tt=l.stateNode.containerInfo,Ut=!0,Kn(n,r,l),tt=u,Ut=h;break;case 0:case 11:case 14:case 15:Ci(2,l,r),ft||Ci(4,l,r),Kn(n,r,l);break;case 1:ft||(Ln(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Km(l,r,u)),Kn(n,r,l);break;case 21:Kn(n,r,l);break;case 22:ft=(u=ft)||l.memoizedState!==null,Kn(n,r,l),ft=u;break;default:Kn(n,r,l)}}function ag(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ta(n)}catch(l){Ve(r,r.return,l)}}}function lg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ta(n)}catch(l){Ve(r,r.return,l)}}function hS(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 Mo(n,r){var l=hS(n);r.forEach(function(u){if(!l.has(u)){l.add(u);var h=ES.bind(null,n,u);u.then(h,h)}})}function Ht(n,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var h=l[u],m=n,_=r,E=_;e:for(;E!==null;){switch(E.tag){case 27:if(Ni(E.type)){tt=E.stateNode,Ut=!1;break e}break;case 5:tt=E.stateNode,Ut=!1;break e;case 3:case 4:tt=E.stateNode.containerInfo,Ut=!0;break e}E=E.return}if(tt===null)throw Error(a(160));rg(m,_,h),tt=null,Ut=!1,m=h.alternate,m!==null&&(m.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)og(r,n),r=r.sibling}var vn=null;function og(n,r){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Ht(r,n),Pt(n),u&4&&(Ci(3,n,n.return),el(3,n),Ci(5,n,n.return));break;case 1:Ht(r,n),Pt(n),u&512&&(ft||l===null||Ln(l,l.return)),u&64&&Zn&&(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 h=vn;if(Ht(r,n),Pt(n),u&512&&(ft||l===null||Ln(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,h=h.ownerDocument||h;t:switch(u){case"title":m=h.getElementsByTagName("title")[0],(!m||m[Ta]||m[Ct]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=h.createElement(u),h.head.insertBefore(m,h.querySelector("head > title"))),Lt(m,u,l),m[Ct]=n,vt(m),u=m;break e;case"link":var _=oy("link","href",h).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=h.createElement(u),Lt(m,u,l),h.head.appendChild(m);break;case"meta":if(_=oy("meta","content",h).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=h.createElement(u),Lt(m,u,l),h.head.appendChild(m);break;default:throw Error(a(468,u))}m[Ct]=n,vt(m),u=m}n.stateNode=u}else sy(h,n.type,n.stateNode);else n.stateNode=ly(h,u,n.memoizedProps);else m!==u?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,u===null?sy(h,n.type,n.stateNode):ly(h,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Dc(n,n.memoizedProps,l.memoizedProps)}break;case 27:Ht(r,n),Pt(n),u&512&&(ft||l===null||Ln(l,l.return)),l!==null&&u&4&&Dc(n,n.memoizedProps,l.memoizedProps);break;case 5:if(Ht(r,n),Pt(n),u&512&&(ft||l===null||Ln(l,l.return)),n.flags&32){h=n.stateNode;try{wr(h,"")}catch(fe){Ve(n,n.return,fe)}}u&4&&n.stateNode!=null&&(h=n.memoizedProps,Dc(n,h,l!==null?l.memoizedProps:h)),u&1024&&(Mc=!0);break;case 6:if(Ht(r,n),Pt(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(fe){Ve(n,n.return,fe)}}break;case 3:if(Zo=null,h=vn,vn=Xo(r.containerInfo),Ht(r,n),vn=h,Pt(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{ta(r.containerInfo)}catch(fe){Ve(n,n.return,fe)}Mc&&(Mc=!1,sg(n));break;case 4:u=vn,vn=Xo(n.stateNode.containerInfo),Ht(r,n),Pt(n),vn=u;break;case 12:Ht(r,n),Pt(n);break;case 31:Ht(r,n),Pt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Mo(n,u)));break;case 13:Ht(r,n),Pt(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(zo=wt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Mo(n,u)));break;case 22:h=n.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,j=Zn,Q=ft;if(Zn=j||h,ft=Q||N,Ht(r,n),ft=Q,Zn=j,Pt(n),u&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(l===null||N||Zn||ft||ar(n)),l=null,r=n;;){if(r.tag===5||r.tag===26){if(l===null){N=l=r;try{if(m=N.stateNode,h)_=m.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{E=N.stateNode;var ee=N.memoizedProps.style,V=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;E.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(fe){Ve(N,N.return,fe)}}}else if(r.tag===6){if(l===null){N=r;try{N.stateNode.nodeValue=h?"":N.memoizedProps}catch(fe){Ve(N,N.return,fe)}}}else if(r.tag===18){if(l===null){N=r;try{var q=N.stateNode;h?Kg(q,!0):Kg(N.stateNode,!1)}catch(fe){Ve(N,N.return,fe)}}}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,Mo(n,l))));break;case 19:Ht(r,n),Pt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Mo(n,u)));break;case 30:break;case 21:break;default:Ht(r,n),Pt(n)}}function Pt(n){var r=n.flags;if(r&2){try{for(var l,u=n.return;u!==null;){if(Jm(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var h=l.stateNode,m=Nc(n);Oo(n,m,h);break;case 5:var _=l.stateNode;l.flags&32&&(wr(_,""),l.flags&=-33);var E=Nc(n);Oo(n,E,_);break;case 3:case 4:var N=l.stateNode.containerInfo,j=Nc(n);Oc(n,j,N);break;default:throw Error(a(161))}}catch(Q){Ve(n,n.return,Q)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function sg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;sg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Wn(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)ng(n,r.alternate,r),r=r.sibling}function ar(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Ci(4,r,r.return),ar(r);break;case 1:Ln(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Km(r,r.return,l),ar(r);break;case 27:cl(r.stateNode);case 26:case 5:Ln(r,r.return),ar(r);break;case 22:r.memoizedState===null&&ar(r);break;case 30:ar(r);break;default:ar(r)}n=n.sibling}}function Jn(n,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,h=n,m=r,_=m.flags;switch(m.tag){case 0:case 11:case 15:Jn(h,m,l),el(4,m);break;case 1:if(Jn(h,m,l),u=m,h=u.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(j){Ve(u,u.return,j)}if(u=m,h=u.updateQueue,h!==null){var E=u.stateNode;try{var N=h.shared.hiddenCallbacks;if(N!==null)for(h.shared.hiddenCallbacks=null,h=0;h<N.length;h++)Pp(N[h],E)}catch(j){Ve(u,u.return,j)}}l&&_&64&&Zm(m),tl(m,m.return);break;case 27:eg(m);case 26:case 5:Jn(h,m,l),l&&u===null&&_&4&&Wm(m),tl(m,m.return);break;case 12:Jn(h,m,l);break;case 31:Jn(h,m,l),l&&_&4&&ag(h,m);break;case 13:Jn(h,m,l),l&&_&4&&lg(h,m);break;case 22:m.memoizedState===null&&Jn(h,m,l),tl(m,m.return);break;case 30:break;default:Jn(h,m,l)}r=r.sibling}}function Ic(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&&ja(l))}function zc(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&ja(n))}function _n(n,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ug(n,r,l,u),r=r.sibling}function ug(n,r,l,u){var h=r.flags;switch(r.tag){case 0:case 11:case 15:_n(n,r,l,u),h&2048&&el(9,r);break;case 1:_n(n,r,l,u);break;case 3:_n(n,r,l,u),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&ja(n)));break;case 12:if(h&2048){_n(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){Ve(r,r.return,N)}}else _n(n,r,l,u);break;case 31:_n(n,r,l,u);break;case 13:_n(n,r,l,u);break;case 23:break;case 22:m=r.stateNode,_=r.alternate,r.memoizedState!==null?m._visibility&2?_n(n,r,l,u):nl(n,r):m._visibility&2?_n(n,r,l,u):(m._visibility|=2,$r(n,r,l,u,(r.subtreeFlags&10256)!==0||!1)),h&2048&&Ic(_,r);break;case 24:_n(n,r,l,u),h&2048&&zc(r.alternate,r);break;default:_n(n,r,l,u)}}function $r(n,r,l,u,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=n,_=r,E=l,N=u,j=_.flags;switch(_.tag){case 0:case 11:case 15:$r(m,_,E,N,h),el(8,_);break;case 23:break;case 22:var Q=_.stateNode;_.memoizedState!==null?Q._visibility&2?$r(m,_,E,N,h):nl(m,_):(Q._visibility|=2,$r(m,_,E,N,h)),h&&j&2048&&Ic(_.alternate,_);break;case 24:$r(m,_,E,N,h),h&&j&2048&&zc(_.alternate,_);break;default:$r(m,_,E,N,h)}r=r.sibling}}function nl(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=n,u=r,h=u.flags;switch(u.tag){case 22:nl(l,u),h&2048&&Ic(u.alternate,u);break;case 24:nl(l,u),h&2048&&zc(u.alternate,u);break;default:nl(l,u)}r=r.sibling}}var il=8192;function qr(n,r,l){if(n.subtreeFlags&il)for(n=n.child;n!==null;)cg(n,r,l),n=n.sibling}function cg(n,r,l){switch(n.tag){case 26:qr(n,r,l),n.flags&il&&n.memoizedState!==null&&JS(l,vn,n.memoizedState,n.memoizedProps);break;case 5:qr(n,r,l);break;case 3:case 4:var u=vn;vn=Xo(n.stateNode.containerInfo),qr(n,r,l),vn=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=il,il=16777216,qr(n,r,l),il=u):qr(n,r,l));break;default:qr(n,r,l)}}function dg(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 rl(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];_t=u,hg(u,n)}dg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)fg(n),n=n.sibling}function fg(n){switch(n.tag){case 0:case 11:case 15:rl(n),n.flags&2048&&Ci(9,n,n.return);break;case 3:rl(n);break;case 12:rl(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Io(n)):rl(n);break;default:rl(n)}}function Io(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];_t=u,hg(u,n)}dg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Ci(8,r,r.return),Io(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Io(r));break;default:Io(r)}n=n.sibling}}function hg(n,r){for(;_t!==null;){var l=_t;switch(l.tag){case 0:case 11:case 15:Ci(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:ja(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,_t=u;else e:for(l=n;_t!==null;){u=_t;var h=u.sibling,m=u.return;if(ig(u),u===l){_t=null;break e}if(h!==null){h.return=m,_t=h;break e}_t=m}}}var pS={getCacheForType:function(n){var r=At(ut),l=r.data.get(n);return l===void 0&&(l=n(),r.data.set(n,l)),l},cacheSignal:function(){return At(ut).controller.signal}},mS=typeof WeakMap=="function"?WeakMap:Map,He=0,Ye=null,De=null,Oe=0,je=0,Zt=null,ki=!1,Fr=!1,Uc=!1,ei=0,rt=0,Ai=0,lr=0,Hc=0,Kt=0,Yr=0,al=null,Bt=null,Pc=!1,zo=0,pg=0,Uo=1/0,Ho=null,Ti=null,mt=0,Li=null,Xr=null,ti=0,Bc=0,jc=null,mg=null,ll=0,Vc=null;function Wt(){return(He&2)!==0&&Oe!==0?Oe&-Oe:P.T!==null?Xc():Dh()}function gg(){if(Kt===0)if((Oe&536870912)===0||Ie){var n=ql;ql<<=1,(ql&3932160)===0&&(ql=262144),Kt=n}else Kt=536870912;return n=Xt.current,n!==null&&(n.flags|=32),Kt}function jt(n,r,l){(n===Ye&&(je===2||je===9)||n.cancelPendingCommit!==null)&&(Qr(n,0),Ri(n,Oe,Kt,!1)),Aa(n,l),((He&2)===0||n!==Ye)&&(n===Ye&&((He&2)===0&&(lr|=l),rt===4&&Ri(n,Oe,Kt,!1)),Rn(n))}function yg(n,r,l){if((He&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&n.expiredLanes)===0||ka(n,r),h=u?bS(n,r):$c(n,r,!0),m=u;do{if(h===0){Fr&&!u&&Ri(n,r,0,!1);break}else{if(l=n.current.alternate,m&&!gS(l)){h=$c(n,r,!1),m=!1;continue}if(h===2){if(m=r,n.errorRecoveryDisabledLanes&m)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var E=n;h=al;var N=E.current.memoizedState.isDehydrated;if(N&&(Qr(E,_).flags|=256),_=$c(E,_,!1),_!==2){if(Uc&&!N){E.errorRecoveryDisabledLanes|=m,lr|=m,h=4;break e}m=Bt,Bt=h,m!==null&&(Bt===null?Bt=m:Bt.push.apply(Bt,m))}h=_}if(m=!1,h!==2)continue}}if(h===1){Qr(n,0),Ri(n,r,0,!0);break}e:{switch(u=n,m=h,m){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ri(u,r,Kt,!ki);break e;case 2:Bt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=zo+300-wt(),10<h)){if(Ri(u,r,Kt,!ki),Yl(u,0,!0)!==0)break e;ti=r,u.timeoutHandle=Xg(bg.bind(null,u,l,Bt,Ho,Pc,r,Kt,lr,Yr,ki,m,"Throttled",-0,0),h);break e}bg(u,l,Bt,Ho,Pc,r,Kt,lr,Yr,ki,m,null,-0,0)}}break}while(!0);Rn(n)}function bg(n,r,l,u,h,m,_,E,N,j,Q,ee,V,q){if(n.timeoutHandle=-1,ee=r.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bn},cg(r,m,ee);var fe=(m&62914560)===m?zo-wt():(m&4194048)===m?pg-wt():0;if(fe=eE(ee,fe),fe!==null){ti=m,n.cancelPendingCommit=fe(kg.bind(null,n,r,m,l,u,h,_,E,N,Q,ee,null,V,q)),Ri(n,m,_,!j);return}}kg(n,r,m,l,u,h,_,E,N)}function gS(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 h=l[u],m=h.getSnapshot;h=h.value;try{if(!Ft(m(),h))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 Ri(n,r,l,u){r&=~Hc,r&=~lr,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var h=r;0<h;){var m=31-Fe(h),_=1<<m;u[m]=-1,h&=~_}l!==0&&Th(n,l,r)}function Po(){return(He&6)===0?(ol(0),!1):!0}function Gc(){if(De!==null){if(je===0)var n=De.return;else n=De,$n=Ki=null,ac(n),Pr=null,Ga=0,n=De;for(;n!==null;)Qm(n.alternate,n),n=n.return;De=null}}function Qr(n,r){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,zS(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),ti=0,Gc(),Ye=n,De=l=Vn(n.current,null),Oe=r,je=0,Zt=null,ki=!1,Fr=ka(n,r),Uc=!1,Yr=Kt=Hc=lr=Ai=rt=0,Bt=al=null,Pc=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var h=31-Fe(u),m=1<<h;r|=n[h],u&=~m}return ei=r,ao(),l}function vg(n,r){Ce=null,P.H=Ka,r===Hr||r===po?(r=Ip(),je=3):r===Yu?(r=Ip(),je=4):je=r===Sc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Zt=r,De===null&&(rt=1,To(n,an(r,n.current)))}function _g(){var n=Xt.current;return n===null?!0:(Oe&4194048)===Oe?un===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?n===un:!1}function Sg(){var n=P.H;return P.H=Ka,n===null?Ka:n}function Eg(){var n=P.A;return P.A=pS,n}function Bo(){rt=4,ki||(Oe&4194048)!==Oe&&Xt.current!==null||(Fr=!0),(Ai&134217727)===0&&(lr&134217727)===0||Ye===null||Ri(Ye,Oe,Kt,!1)}function $c(n,r,l){var u=He;He|=2;var h=Sg(),m=Eg();(Ye!==n||Oe!==r)&&(Ho=null,Qr(n,r)),r=!1;var _=rt;e:do try{if(je!==0&&De!==null){var E=De,N=Zt;switch(je){case 8:Gc(),_=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(r=!0);var j=je;if(je=0,Zt=null,Zr(n,E,N,j),l&&Fr){_=0;break e}break;default:j=je,je=0,Zt=null,Zr(n,E,N,j)}}yS(),_=rt;break}catch(Q){vg(n,Q)}while(!0);return r&&n.shellSuspendCounter++,$n=Ki=null,He=u,P.H=h,P.A=m,De===null&&(Ye=null,Oe=0,ao()),_}function yS(){for(;De!==null;)xg(De)}function bS(n,r){var l=He;He|=2;var u=Sg(),h=Eg();Ye!==n||Oe!==r?(Ho=null,Uo=wt()+500,Qr(n,r)):Fr=ka(n,r);e:do try{if(je!==0&&De!==null){r=De;var m=Zt;t:switch(je){case 1:je=0,Zt=null,Zr(n,r,m,1);break;case 2:case 9:if(Op(m)){je=0,Zt=null,wg(r);break}r=function(){je!==2&&je!==9||Ye!==n||(je=7),Rn(n)},m.then(r,r);break e;case 3:je=7;break e;case 4:je=5;break e;case 7:Op(m)?(je=0,Zt=null,wg(r)):(je=0,Zt=null,Zr(n,r,m,7));break;case 5:var _=null;switch(De.tag){case 26:_=De.memoizedState;case 5:case 27:var E=De;if(_?uy(_):E.stateNode.complete){je=0,Zt=null;var N=E.sibling;if(N!==null)De=N;else{var j=E.return;j!==null?(De=j,jo(j)):De=null}break t}}je=0,Zt=null,Zr(n,r,m,5);break;case 6:je=0,Zt=null,Zr(n,r,m,6);break;case 8:Gc(),rt=6;break e;default:throw Error(a(462))}}vS();break}catch(Q){vg(n,Q)}while(!0);return $n=Ki=null,P.H=u,P.A=h,He=l,De!==null?0:(Ye=null,Oe=0,ao(),rt)}function vS(){for(;De!==null&&!yr();)xg(De)}function xg(n){var r=Ym(n.alternate,n,ei);n.memoizedProps=n.pendingProps,r===null?jo(n):De=r}function wg(n){var r=n,l=r.alternate;switch(r.tag){case 15:case 0:r=jm(l,r,r.pendingProps,r.type,void 0,Oe);break;case 11:r=jm(l,r,r.pendingProps,r.type.render,r.ref,Oe);break;case 5:ac(r);default:Qm(l,r),r=De=Ep(r,ei),r=Ym(l,r,ei)}n.memoizedProps=n.pendingProps,r===null?jo(n):De=r}function Zr(n,r,l,u){$n=Ki=null,ac(r),Pr=null,Ga=0;var h=r.return;try{if(oS(n,h,r,l,Oe)){rt=1,To(n,an(l,n.current)),De=null;return}}catch(m){if(h!==null)throw De=h,m;rt=1,To(n,an(l,n.current)),De=null;return}r.flags&32768?(Ie||u===1?n=!0:Fr||(Oe&536870912)!==0?n=!1:(ki=n=!0,(u===2||u===9||u===3||u===6)&&(u=Xt.current,u!==null&&u.tag===13&&(u.flags|=16384))),Cg(r,n)):jo(r)}function jo(n){var r=n;do{if((r.flags&32768)!==0){Cg(r,ki);return}n=r.return;var l=cS(r.alternate,r,ei);if(l!==null){De=l;return}if(r=r.sibling,r!==null){De=r;return}De=r=n}while(r!==null);rt===0&&(rt=5)}function Cg(n,r){do{var l=dS(n.alternate,n);if(l!==null){l.flags&=32767,De=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(n=n.sibling,n!==null)){De=n;return}De=n=l}while(n!==null);rt=6,De=null}function kg(n,r,l,u,h,m,_,E,N){n.cancelPendingCommit=null;do Vo();while(mt!==0);if((He&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(m=r.lanes|r.childLanes,m|=Nu,W1(n,l,m,_,E,N),n===Ye&&(De=Ye=null,Oe=0),Xr=r,Li=n,ti=l,Bc=m,jc=h,mg=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,xS(_e,function(){return Dg(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=P.T,P.T=null,h=Z.p,Z.p=2,_=He,He|=4;try{fS(n,r,l)}finally{He=_,Z.p=h,P.T=u}}mt=1,Ag(),Tg(),Lg()}}function Ag(){if(mt===1){mt=0;var n=Li,r=Xr,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=P.T,P.T=null;var u=Z.p;Z.p=2;var h=He;He|=4;try{og(r,n);var m=nd,_=hp(n.containerInfo),E=m.focusedElem,N=m.selectionRange;if(_!==E&&E&&E.ownerDocument&&fp(E.ownerDocument.documentElement,E)){if(N!==null&&Au(E)){var j=N.start,Q=N.end;if(Q===void 0&&(Q=j),"selectionStart"in E)E.selectionStart=j,E.selectionEnd=Math.min(Q,E.value.length);else{var ee=E.ownerDocument||document,V=ee&&ee.defaultView||window;if(V.getSelection){var q=V.getSelection(),fe=E.textContent.length,ve=Math.min(N.start,fe),qe=N.end===void 0?ve:Math.min(N.end,fe);!q.extend&&ve>qe&&(_=qe,qe=ve,ve=_);var U=dp(E,ve),M=dp(E,qe);if(U&&M&&(q.rangeCount!==1||q.anchorNode!==U.node||q.anchorOffset!==U.offset||q.focusNode!==M.node||q.focusOffset!==M.offset)){var B=ee.createRange();B.setStart(U.node,U.offset),q.removeAllRanges(),ve>qe?(q.addRange(B),q.extend(M.node,M.offset)):(B.setEnd(M.node,M.offset),q.addRange(B))}}}}for(ee=[],q=E;q=q.parentNode;)q.nodeType===1&&ee.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ee.length;E++){var J=ee[E];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}es=!!td,nd=td=null}finally{He=h,Z.p=u,P.T=l}}n.current=r,mt=2}}function Tg(){if(mt===2){mt=0;var n=Li,r=Xr,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=P.T,P.T=null;var u=Z.p;Z.p=2;var h=He;He|=4;try{ng(n,r.alternate,r)}finally{He=h,Z.p=u,P.T=l}}mt=3}}function Lg(){if(mt===4||mt===3){mt=0,wa();var n=Li,r=Xr,l=ti,u=mg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?mt=5:(mt=0,Xr=Li=null,Rg(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Ti=null),su(l),r=r.stateNode,Be&&typeof Be.onCommitFiberRoot=="function")try{Be.onCommitFiberRoot(nt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=P.T,h=Z.p,Z.p=2,P.T=null;try{for(var m=n.onRecoverableError,_=0;_<u.length;_++){var E=u[_];m(E.value,{componentStack:E.stack})}}finally{P.T=r,Z.p=h}}(ti&3)!==0&&Vo(),Rn(n),h=n.pendingLanes,(l&261930)!==0&&(h&42)!==0?n===Vc?ll++:(ll=0,Vc=n):ll=0,ol(0)}}function Rg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,ja(r)))}function Vo(){return Ag(),Tg(),Lg(),Dg()}function Dg(){if(mt!==5)return!1;var n=Li,r=Bc;Bc=0;var l=su(ti),u=P.T,h=Z.p;try{Z.p=32>l?32:l,P.T=null,l=jc,jc=null;var m=Li,_=ti;if(mt=0,Xr=Li=null,ti=0,(He&6)!==0)throw Error(a(331));var E=He;if(He|=4,fg(m.current),ug(m,m.current,_,l),He=E,ol(0,!1),Be&&typeof Be.onPostCommitFiberRoot=="function")try{Be.onPostCommitFiberRoot(nt,m)}catch{}return!0}finally{Z.p=h,P.T=u,Rg(n,r)}}function Ng(n,r,l){r=an(l,r),r=_c(n.stateNode,r,2),n=Ei(n,r,2),n!==null&&(Aa(n,2),Rn(n))}function Ve(n,r,l){if(n.tag===3)Ng(n,n,l);else for(;r!==null;){if(r.tag===3){Ng(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ti===null||!Ti.has(u))){n=an(l,n),l=Om(2),u=Ei(r,l,2),u!==null&&(Mm(l,u,r,n),Aa(u,2),Rn(u));break}}r=r.return}}function qc(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new mS;var h=new Set;u.set(r,h)}else h=u.get(r),h===void 0&&(h=new Set,u.set(r,h));h.has(l)||(Uc=!0,h.add(l),n=_S.bind(null,n,r,l),r.then(n,n))}function _S(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Ye===n&&(Oe&l)===l&&(rt===4||rt===3&&(Oe&62914560)===Oe&&300>wt()-zo?(He&2)===0&&Qr(n,0):Hc|=l,Yr===Oe&&(Yr=0)),Rn(n)}function Og(n,r){r===0&&(r=Ah()),n=Xi(n,r),n!==null&&(Aa(n,r),Rn(n))}function SS(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),Og(n,l)}function ES(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,h=n.memoizedState;h!==null&&(l=h.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),Og(n,l)}function xS(n,r){return di(n,r)}var Go=null,Kr=null,Fc=!1,$o=!1,Yc=!1,Di=0;function Rn(n){n!==Kr&&n.next===null&&(Kr===null?Go=Kr=n:Kr=Kr.next=n),$o=!0,Fc||(Fc=!0,CS())}function ol(n,r){if(!Yc&&$o){Yc=!0;do for(var l=!1,u=Go;u!==null;){if(n!==0){var h=u.pendingLanes;if(h===0)var m=0;else{var _=u.suspendedLanes,E=u.pingedLanes;m=(1<<31-Fe(42|n)+1)-1,m&=h&~(_&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,Ug(u,m))}else m=Oe,m=Yl(u,u===Ye?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||ka(u,m)||(l=!0,Ug(u,m));u=u.next}while(l);Yc=!1}}function wS(){Mg()}function Mg(){$o=Fc=!1;var n=0;Di!==0&&IS()&&(n=Di);for(var r=wt(),l=null,u=Go;u!==null;){var h=u.next,m=Ig(u,r);m===0?(u.next=null,l===null?Go=h:l.next=h,h===null&&(Kr=l)):(l=u,(n!==0||(m&3)!==0)&&($o=!0)),u=h}mt!==0&&mt!==5||ol(n),Di!==0&&(Di=0)}function Ig(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,h=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var _=31-Fe(m),E=1<<_,N=h[_];N===-1?((E&l)===0||(E&u)!==0)&&(h[_]=K1(E,r)):N<=r&&(n.expiredLanes|=E),m&=~E}if(r=Ye,l=Oe,l=Yl(n,n===r?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===r&&(je===2||je===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&fi(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||ka(n,l)){if(r=l&-l,r===n.callbackPriority)return r;switch(u!==null&&fi(u),su(l)){case 2:case 8:l=ue;break;case 32:l=_e;break;case 268435456:l=pe;break;default:l=_e}return u=zg.bind(null,n),l=di(l,u),n.callbackPriority=r,n.callbackNode=l,r}return u!==null&&u!==null&&fi(u),n.callbackPriority=2,n.callbackNode=null,2}function zg(n,r){if(mt!==0&&mt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(Vo()&&n.callbackNode!==l)return null;var u=Oe;return u=Yl(n,n===Ye?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(yg(n,u,r),Ig(n,wt()),n.callbackNode!=null&&n.callbackNode===l?zg.bind(null,n):null)}function Ug(n,r){if(Vo())return null;yg(n,r,!0)}function CS(){US(function(){(He&6)!==0?di(K,wS):Mg()})}function Xc(){if(Di===0){var n=zr;n===0&&(n=$l,$l<<=1,($l&261888)===0&&($l=256)),Di=n}return Di}function Hg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Kl(""+n)}function Pg(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 kS(n,r,l,u,h){if(r==="submit"&&l&&l.stateNode===h){var m=Hg((h[It]||null).action),_=u.submitter;_&&(r=(r=_[It]||null)?Hg(r.formAction):_.getAttribute("formAction"),r!==null&&(m=r,_=null));var E=new to("action","action",null,u,h);n.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Di!==0){var N=_?Pg(h,_):new FormData(h);pc(l,{pending:!0,data:N,method:h.method,action:m},null,N)}}else typeof m=="function"&&(E.preventDefault(),N=_?Pg(h,_):new FormData(h),pc(l,{pending:!0,data:N,method:h.method,action:m},m,N))},currentTarget:h}]})}}for(var Qc=0;Qc<Du.length;Qc++){var Zc=Du[Qc],AS=Zc.toLowerCase(),TS=Zc[0].toUpperCase()+Zc.slice(1);bn(AS,"on"+TS)}bn(gp,"onAnimationEnd"),bn(yp,"onAnimationIteration"),bn(bp,"onAnimationStart"),bn("dblclick","onDoubleClick"),bn("focusin","onFocus"),bn("focusout","onBlur"),bn($_,"onTransitionRun"),bn(q_,"onTransitionStart"),bn(F_,"onTransitionCancel"),bn(vp,"onTransitionEnd"),Er("onMouseEnter",["mouseout","mouseover"]),Er("onMouseLeave",["mouseout","mouseover"]),Er("onPointerEnter",["pointerout","pointerover"]),Er("onPointerLeave",["pointerout","pointerover"]),$i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$i("onBeforeInput",["compositionend","keypress","textInput","paste"]),$i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var 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(" "),LS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sl));function Bg(n,r){r=(r&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],h=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var _=u.length-1;0<=_;_--){var E=u[_],N=E.instance,j=E.currentTarget;if(E=E.listener,N!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=j;try{m(h)}catch(Q){ro(Q)}h.currentTarget=null,m=N}else for(_=0;_<u.length;_++){if(E=u[_],N=E.instance,j=E.currentTarget,E=E.listener,N!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=j;try{m(h)}catch(Q){ro(Q)}h.currentTarget=null,m=N}}}}function Ne(n,r){var l=r[uu];l===void 0&&(l=r[uu]=new Set);var u=n+"__bubble";l.has(u)||(jg(r,n,2,!1),l.add(u))}function Kc(n,r,l){var u=0;r&&(u|=4),jg(l,n,u,r)}var qo="_reactListening"+Math.random().toString(36).slice(2);function Wc(n){if(!n[qo]){n[qo]=!0,Mh.forEach(function(l){l!=="selectionchange"&&(LS.has(l)||Kc(l,!1,n),Kc(l,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[qo]||(r[qo]=!0,Kc("selectionchange",!1,r))}}function jg(n,r,l,u){switch(gy(r)){case 2:var h=iE;break;case 8:h=rE;break;default:h=hd}l=h.bind(null,r,l,n),h=void 0,!bu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),u?h!==void 0?n.addEventListener(r,l,{capture:!0,passive:h}):n.addEventListener(r,l,!0):h!==void 0?n.addEventListener(r,l,{passive:h}):n.addEventListener(r,l,!1)}function Jc(n,r,l,u,h){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===h)break;if(_===4)for(_=u.return;_!==null;){var N=_.tag;if((N===3||N===4)&&_.stateNode.containerInfo===h)return;_=_.return}for(;E!==null;){if(_=vr(E),_===null)return;if(N=_.tag,N===5||N===6||N===26||N===27){u=m=_;continue e}E=E.parentNode}}u=u.return}Fh(function(){var j=m,Q=gu(l),ee=[];e:{var V=_p.get(n);if(V!==void 0){var q=to,fe=n;switch(n){case"keypress":if(Jl(l)===0)break e;case"keydown":case"keyup":q=E_;break;case"focusin":fe="focus",q=Eu;break;case"focusout":fe="blur",q=Eu;break;case"beforeblur":case"afterblur":q=Eu;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":q=Qh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=c_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=C_;break;case gp:case yp:case bp:q=h_;break;case vp:q=A_;break;case"scroll":case"scrollend":q=s_;break;case"wheel":q=L_;break;case"copy":case"cut":case"paste":q=m_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Kh;break;case"toggle":case"beforetoggle":q=D_}var ve=(r&4)!==0,qe=!ve&&(n==="scroll"||n==="scrollend"),U=ve?V!==null?V+"Capture":null:V;ve=[];for(var M=j,B;M!==null;){var J=M;if(B=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||B===null||U===null||(J=Ra(M,U),J!=null&&ve.push(ul(M,J,B))),qe)break;M=M.return}0<ve.length&&(V=new q(V,fe,null,l,Q),ee.push({event:V,listeners:ve}))}}if((r&7)===0){e:{if(V=n==="mouseover"||n==="pointerover",q=n==="mouseout"||n==="pointerout",V&&l!==mu&&(fe=l.relatedTarget||l.fromElement)&&(vr(fe)||fe[br]))break e;if((q||V)&&(V=Q.window===Q?Q:(V=Q.ownerDocument)?V.defaultView||V.parentWindow:window,q?(fe=l.relatedTarget||l.toElement,q=j,fe=fe?vr(fe):null,fe!==null&&(qe=s(fe),ve=fe.tag,fe!==qe||ve!==5&&ve!==27&&ve!==6)&&(fe=null)):(q=null,fe=j),q!==fe)){if(ve=Qh,J="onMouseLeave",U="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(ve=Kh,J="onPointerLeave",U="onPointerEnter",M="pointer"),qe=q==null?V:La(q),B=fe==null?V:La(fe),V=new ve(J,M+"leave",q,l,Q),V.target=qe,V.relatedTarget=B,J=null,vr(Q)===j&&(ve=new ve(U,M+"enter",fe,l,Q),ve.target=B,ve.relatedTarget=qe,J=ve),qe=J,q&&fe)t:{for(ve=RS,U=q,M=fe,B=0,J=U;J;J=ve(J))B++;J=0;for(var ye=M;ye;ye=ve(ye))J++;for(;0<B-J;)U=ve(U),B--;for(;0<J-B;)M=ve(M),J--;for(;B--;){if(U===M||M!==null&&U===M.alternate){ve=U;break t}U=ve(U),M=ve(M)}ve=null}else ve=null;q!==null&&Vg(ee,V,q,ve,!1),fe!==null&&qe!==null&&Vg(ee,qe,fe,ve,!0)}}e:{if(V=j?La(j):window,q=V.nodeName&&V.nodeName.toLowerCase(),q==="select"||q==="input"&&V.type==="file")var ze=ap;else if(ip(V))if(lp)ze=j_;else{ze=P_;var ge=H_}else q=V.nodeName,!q||q.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?j&&pu(j.elementType)&&(ze=ap):ze=B_;if(ze&&(ze=ze(n,j))){rp(ee,ze,l,Q);break e}ge&&ge(n,V,j),n==="focusout"&&j&&V.type==="number"&&j.memoizedProps.value!=null&&hu(V,"number",V.value)}switch(ge=j?La(j):window,n){case"focusin":(ip(ge)||ge.contentEditable==="true")&&(Tr=ge,Tu=j,Ha=null);break;case"focusout":Ha=Tu=Tr=null;break;case"mousedown":Lu=!0;break;case"contextmenu":case"mouseup":case"dragend":Lu=!1,pp(ee,l,Q);break;case"selectionchange":if(G_)break;case"keydown":case"keyup":pp(ee,l,Q)}var ke;if(wu)e:{switch(n){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Ar?tp(n,l)&&(Me="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Me="onCompositionStart");Me&&(Wh&&l.locale!=="ko"&&(Ar||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Ar&&(ke=Yh()):(mi=Q,vu="value"in mi?mi.value:mi.textContent,Ar=!0)),ge=Fo(j,Me),0<ge.length&&(Me=new Zh(Me,n,null,l,Q),ee.push({event:Me,listeners:ge}),ke?Me.data=ke:(ke=np(l),ke!==null&&(Me.data=ke)))),(ke=O_?M_(n,l):I_(n,l))&&(Me=Fo(j,"onBeforeInput"),0<Me.length&&(ge=new Zh("onBeforeInput","beforeinput",null,l,Q),ee.push({event:ge,listeners:Me}),ge.data=ke)),kS(ee,n,j,l,Q)}Bg(ee,r)})}function ul(n,r,l){return{instance:n,listener:r,currentTarget:l}}function Fo(n,r){for(var l=r+"Capture",u=[];n!==null;){var h=n,m=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||m===null||(h=Ra(n,l),h!=null&&u.unshift(ul(n,h,m)),h=Ra(n,r),h!=null&&u.push(ul(n,h,m))),n.tag===3)return u;n=n.return}return[]}function RS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Vg(n,r,l,u,h){for(var m=r._reactName,_=[];l!==null&&l!==u;){var E=l,N=E.alternate,j=E.stateNode;if(E=E.tag,N!==null&&N===u)break;E!==5&&E!==26&&E!==27||j===null||(N=j,h?(j=Ra(l,m),j!=null&&_.unshift(ul(l,j,N))):h||(j=Ra(l,m),j!=null&&_.push(ul(l,j,N)))),l=l.return}_.length!==0&&n.push({event:r,listeners:_})}var DS=/\r\n?/g,NS=/\u0000|\uFFFD/g;function Gg(n){return(typeof n=="string"?n:""+n).replace(DS,`
|
|
10
|
+
`).replace(NS,"")}function $g(n,r){return r=Gg(r),Gg(n)===r}function $e(n,r,l,u,h,m){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||wr(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&wr(n,""+u);break;case"className":Ql(n,"class",u);break;case"tabIndex":Ql(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Ql(n,l,u);break;case"style":$h(n,u,m);break;case"data":if(r!=="object"){Ql(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=Kl(""+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"&&$e(n,r,"name",h.name,h,null),$e(n,r,"formEncType",h.formEncType,h,null),$e(n,r,"formMethod",h.formMethod,h,null),$e(n,r,"formTarget",h.formTarget,h,null)):($e(n,r,"encType",h.encType,h,null),$e(n,r,"method",h.method,h,null),$e(n,r,"target",h.target,h,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Kl(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=Bn);break;case"onScroll":u!=null&&Ne("scroll",n);break;case"onScrollEnd":u!=null&&Ne("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(h.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=Kl(""+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":Ne("beforetoggle",n),Ne("toggle",n),Xl(n,"popover",u);break;case"xlinkActuate":Pn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Pn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Pn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Pn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Pn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Pn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Pn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Pn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Pn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Xl(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=l_.get(l)||l,Xl(n,l,u))}}function ed(n,r,l,u,h,m){switch(l){case"style":$h(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(h.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"children":typeof u=="string"?wr(n,u):(typeof u=="number"||typeof u=="bigint")&&wr(n,""+u);break;case"onScroll":u!=null&&Ne("scroll",n);break;case"onScrollEnd":u!=null&&Ne("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ih.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),r=l.slice(2,h?l.length-7:void 0),m=n[It]||null,m=m!=null?m[l]:null,typeof m=="function"&&n.removeEventListener(r,m,h),typeof u=="function")){typeof m!="function"&&m!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(r,u,h);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):Xl(n,l,u)}}}function Lt(n,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",n),Ne("load",n);var u=!1,h=!1,m;for(m in l)if(l.hasOwnProperty(m)){var _=l[m];if(_!=null)switch(m){case"src":u=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:$e(n,r,m,_,l,null)}}h&&$e(n,r,"srcSet",l.srcSet,l,null),u&&$e(n,r,"src",l.src,l,null);return;case"input":Ne("invalid",n);var E=m=_=h=null,N=null,j=null;for(u in l)if(l.hasOwnProperty(u)){var Q=l[u];if(Q!=null)switch(u){case"name":h=Q;break;case"type":_=Q;break;case"checked":N=Q;break;case"defaultChecked":j=Q;break;case"value":m=Q;break;case"defaultValue":E=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(a(137,r));break;default:$e(n,r,u,Q,l,null)}}Bh(n,m,E,N,j,_,h,!1);return;case"select":Ne("invalid",n),u=_=m=null;for(h in l)if(l.hasOwnProperty(h)&&(E=l[h],E!=null))switch(h){case"value":m=E;break;case"defaultValue":_=E;break;case"multiple":u=E;default:$e(n,r,h,E,l,null)}r=m,l=_,n.multiple=!!u,r!=null?xr(n,!!u,r,!1):l!=null&&xr(n,!!u,l,!0);return;case"textarea":Ne("invalid",n),m=h=u=null;for(_ in l)if(l.hasOwnProperty(_)&&(E=l[_],E!=null))switch(_){case"value":u=E;break;case"defaultValue":h=E;break;case"children":m=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:$e(n,r,_,E,l,null)}Vh(n,u,h,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":$e(n,r,N,u,l,null));return;case"dialog":Ne("beforetoggle",n),Ne("toggle",n),Ne("cancel",n),Ne("close",n);break;case"iframe":case"object":Ne("load",n);break;case"video":case"audio":for(u=0;u<sl.length;u++)Ne(sl[u],n);break;case"image":Ne("error",n),Ne("load",n);break;case"details":Ne("toggle",n);break;case"embed":case"source":case"link":Ne("error",n),Ne("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(j in l)if(l.hasOwnProperty(j)&&(u=l[j],u!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:$e(n,r,j,u,l,null)}return;default:if(pu(r)){for(Q in l)l.hasOwnProperty(Q)&&(u=l[Q],u!==void 0&&ed(n,r,Q,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&$e(n,r,E,u,l,null))}function OS(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 h=null,m=null,_=null,E=null,N=null,j=null,Q=null;for(q in l){var ee=l[q];if(l.hasOwnProperty(q)&&ee!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":N=ee;default:u.hasOwnProperty(q)||$e(n,r,q,null,u,ee)}}for(var V in u){var q=u[V];if(ee=l[V],u.hasOwnProperty(V)&&(q!=null||ee!=null))switch(V){case"type":m=q;break;case"name":h=q;break;case"checked":j=q;break;case"defaultChecked":Q=q;break;case"value":_=q;break;case"defaultValue":E=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,r));break;default:q!==ee&&$e(n,r,V,q,u,ee)}}fu(n,_,E,N,j,Q,m,h);return;case"select":q=_=E=V=null;for(m in l)if(N=l[m],l.hasOwnProperty(m)&&N!=null)switch(m){case"value":break;case"multiple":q=N;default:u.hasOwnProperty(m)||$e(n,r,m,null,u,N)}for(h in u)if(m=u[h],N=l[h],u.hasOwnProperty(h)&&(m!=null||N!=null))switch(h){case"value":V=m;break;case"defaultValue":E=m;break;case"multiple":_=m;default:m!==N&&$e(n,r,h,m,u,N)}r=E,l=_,u=q,V!=null?xr(n,!!l,V,!1):!!u!=!!l&&(r!=null?xr(n,!!l,r,!0):xr(n,!!l,l?[]:"",!1));return;case"textarea":q=V=null;for(E in l)if(h=l[E],l.hasOwnProperty(E)&&h!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:$e(n,r,E,null,u,h)}for(_ in u)if(h=u[_],m=l[_],u.hasOwnProperty(_)&&(h!=null||m!=null))switch(_){case"value":V=h;break;case"defaultValue":q=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==m&&$e(n,r,_,h,u,m)}jh(n,V,q);return;case"option":for(var fe in l)V=l[fe],l.hasOwnProperty(fe)&&V!=null&&!u.hasOwnProperty(fe)&&(fe==="selected"?n.selected=!1:$e(n,r,fe,null,u,V));for(N in u)V=u[N],q=l[N],u.hasOwnProperty(N)&&V!==q&&(V!=null||q!=null)&&(N==="selected"?n.selected=V&&typeof V!="function"&&typeof V!="symbol":$e(n,r,N,V,u,q));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 ve in l)V=l[ve],l.hasOwnProperty(ve)&&V!=null&&!u.hasOwnProperty(ve)&&$e(n,r,ve,null,u,V);for(j in u)if(V=u[j],q=l[j],u.hasOwnProperty(j)&&V!==q&&(V!=null||q!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(a(137,r));break;default:$e(n,r,j,V,u,q)}return;default:if(pu(r)){for(var qe in l)V=l[qe],l.hasOwnProperty(qe)&&V!==void 0&&!u.hasOwnProperty(qe)&&ed(n,r,qe,void 0,u,V);for(Q in u)V=u[Q],q=l[Q],!u.hasOwnProperty(Q)||V===q||V===void 0&&q===void 0||ed(n,r,Q,V,u,q);return}}for(var U in l)V=l[U],l.hasOwnProperty(U)&&V!=null&&!u.hasOwnProperty(U)&&$e(n,r,U,null,u,V);for(ee in u)V=u[ee],q=l[ee],!u.hasOwnProperty(ee)||V===q||V==null&&q==null||$e(n,r,ee,V,u,q)}function qg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function MS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var h=l[u],m=h.transferSize,_=h.initiatorType,E=h.duration;if(m&&E&&qg(_)){for(_=0,E=h.responseEnd,u+=1;u<l.length;u++){var N=l[u],j=N.startTime;if(j>E)break;var Q=N.transferSize,ee=N.initiatorType;Q&&qg(ee)&&(N=N.responseEnd,_+=Q*(N<E?1:(E-j)/(N-j)))}if(--u,r+=8*(m+_)/(h.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 td=null,nd=null;function Yo(n){return n.nodeType===9?n:n.ownerDocument}function Fg(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 Yg(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 id(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 rd=null;function IS(){var n=window.event;return n&&n.type==="popstate"?n===rd?!1:(rd=n,!0):(rd=null,!1)}var Xg=typeof setTimeout=="function"?setTimeout:void 0,zS=typeof clearTimeout=="function"?clearTimeout:void 0,Qg=typeof Promise=="function"?Promise:void 0,US=typeof queueMicrotask=="function"?queueMicrotask:typeof Qg<"u"?function(n){return Qg.resolve(null).then(n).catch(HS)}:Xg;function HS(n){setTimeout(function(){throw n})}function Ni(n){return n==="head"}function Zg(n,r){var l=r,u=0;do{var h=l.nextSibling;if(n.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(h),ta(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")cl(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,cl(l);for(var m=l.firstChild;m;){var _=m.nextSibling,E=m.nodeName;m[Ta]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=_}}else l==="body"&&cl(n.ownerDocument.body);l=h}while(l);ta(r)}function Kg(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 ad(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":ad(l),cu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function PS(n,r,l,u){for(;n.nodeType===1;){var h=l;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Ta])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!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var m=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=cn(n.nextSibling),n===null)break}return null}function BS(n,r,l){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=cn(n.nextSibling),n===null))return null;return n}function Wg(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=cn(n.nextSibling),n===null))return null;return n}function ld(n){return n.data==="$?"||n.data==="$~"}function od(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function jS(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 cn(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 sd=null;function Jg(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(r===0)return cn(n.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}n=n.nextSibling}return null}function ey(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=Yo(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 cl(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);cu(n)}var dn=new Map,ny=new Set;function Xo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ni=Z.d;Z.d={f:VS,r:GS,D:$S,C:qS,L:FS,m:YS,X:QS,S:XS,M:ZS};function VS(){var n=ni.f(),r=Po();return n||r}function GS(n){var r=_r(n);r!==null&&r.tag===5&&r.type==="form"?vm(r):ni.r(n)}var Wr=typeof document>"u"?null:document;function iy(n,r,l){var u=Wr;if(u&&typeof r=="string"&&r){var h=nn(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),ny.has(h)||(ny.add(h),n={rel:n,crossOrigin:l,href:r},u.querySelector(h)===null&&(r=u.createElement("link"),Lt(r,"link",n),vt(r),u.head.appendChild(r)))}}function $S(n){ni.D(n),iy("dns-prefetch",n,null)}function qS(n,r){ni.C(n,r),iy("preconnect",n,r)}function FS(n,r,l){ni.L(n,r,l);var u=Wr;if(u&&n&&r){var h='link[rel="preload"][as="'+nn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+nn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+nn(l.imageSizes)+'"]')):h+='[href="'+nn(n)+'"]';var m=h;switch(r){case"style":m=Jr(n);break;case"script":m=ea(n)}dn.has(m)||(n=y({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),dn.set(m,n),u.querySelector(h)!==null||r==="style"&&u.querySelector(dl(m))||r==="script"&&u.querySelector(fl(m))||(r=u.createElement("link"),Lt(r,"link",n),vt(r),u.head.appendChild(r)))}}function YS(n,r){ni.m(n,r);var l=Wr;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+nn(u)+'"][href="'+nn(n)+'"]',m=h;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=ea(n)}if(!dn.has(m)&&(n=y({rel:"modulepreload",href:n},r),dn.set(m,n),l.querySelector(h)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(fl(m)))return}u=l.createElement("link"),Lt(u,"link",n),vt(u),l.head.appendChild(u)}}}function XS(n,r,l){ni.S(n,r,l);var u=Wr;if(u&&n){var h=Sr(u).hoistableStyles,m=Jr(n);r=r||"default";var _=h.get(m);if(!_){var E={loading:0,preload:null};if(_=u.querySelector(dl(m)))E.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":r},l),(l=dn.get(m))&&ud(n,l);var N=_=u.createElement("link");vt(N),Lt(N,"link",n),N._p=new Promise(function(j,Q){N.onload=j,N.onerror=Q}),N.addEventListener("load",function(){E.loading|=1}),N.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Qo(_,r,u)}_={type:"stylesheet",instance:_,count:1,state:E},h.set(m,_)}}}function QS(n,r){ni.X(n,r);var l=Wr;if(l&&n){var u=Sr(l).hoistableScripts,h=ea(n),m=u.get(h);m||(m=l.querySelector(fl(h)),m||(n=y({src:n,async:!0},r),(r=dn.get(h))&&cd(n,r),m=l.createElement("script"),vt(m),Lt(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function ZS(n,r){ni.M(n,r);var l=Wr;if(l&&n){var u=Sr(l).hoistableScripts,h=ea(n),m=u.get(h);m||(m=l.querySelector(fl(h)),m||(n=y({src:n,async:!0,type:"module"},r),(r=dn.get(h))&&cd(n,r),m=l.createElement("script"),vt(m),Lt(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function ry(n,r,l,u){var h=(h=de.current)?Xo(h):null;if(!h)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Jr(l.href),l=Sr(h).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=Jr(l.href);var m=Sr(h).hoistableStyles,_=m.get(n);if(_||(h=h.ownerDocument||h,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,_),(m=h.querySelector(dl(n)))&&!m._p&&(_.instance=m,_.state.loading=5),dn.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},dn.set(n,l),m||KS(h,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=ea(l),l=Sr(h).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 Jr(n){return'href="'+nn(n)+'"'}function dl(n){return'link[rel="stylesheet"]['+n+"]"}function ay(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function KS(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}),Lt(r,"link",l),vt(r),n.head.appendChild(r))}function ea(n){return'[src="'+nn(n)+'"]'}function fl(n){return"script[async]"+n}function ly(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+nn(l.href)+'"]');if(u)return r.instance=u,vt(u),u;var h=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),vt(u),Lt(u,"style",h),Qo(u,l.precedence,n),r.instance=u;case"stylesheet":h=Jr(l.href);var m=n.querySelector(dl(h));if(m)return r.state.loading|=4,r.instance=m,vt(m),m;u=ay(l),(h=dn.get(h))&&ud(u,h),m=(n.ownerDocument||n).createElement("link"),vt(m);var _=m;return _._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),Lt(m,"link",u),r.state.loading|=4,Qo(m,l.precedence,n),r.instance=m;case"script":return m=ea(l.src),(h=n.querySelector(fl(m)))?(r.instance=h,vt(h),h):(u=l,(h=dn.get(m))&&(u=y({},l),cd(u,h)),n=n.ownerDocument||n,h=n.createElement("script"),vt(h),Lt(h,"link",u),n.head.appendChild(h),r.instance=h);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,Qo(u,l.precedence,n));return r.instance}function Qo(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=u.length?u[u.length-1]:null,m=h,_=0;_<u.length;_++){var E=u[_];if(E.dataset.precedence===r)m=E;else if(m!==h)break}m?m.parentNode.insertBefore(n,m.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(n,r.firstChild))}function ud(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function cd(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Zo=null;function oy(n,r,l){if(Zo===null){var u=new Map,h=Zo=new Map;h.set(l,u)}else h=Zo,u=h.get(l),u||(u=new Map,h.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),h=0;h<l.length;h++){var m=l[h];if(!(m[Ta]||m[Ct]||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 sy(n,r,l){n=n.ownerDocument||n,n.head.insertBefore(l,r==="title"?n.querySelector("head > title"):null)}function WS(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 uy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function JS(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 h=Jr(u.href),m=r.querySelector(dl(h));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Ko.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=m,vt(m);return}m=r.ownerDocument||r,u=ay(u),(h=dn.get(h))&&ud(u,h),m=m.createElement("link"),vt(m);var _=m;_._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),Lt(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=Ko.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var dd=0;function eE(n,r){return n.stylesheets&&n.count===0&&Jo(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&Jo(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+r);0<n.imgBytes&&dd===0&&(dd=62500*MS());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Jo(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>dd?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(h)}}:null}function Ko(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jo(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Wo=null;function Jo(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Wo=new Map,r.forEach(tE,n),Wo=null,Ko.call(n))}function tE(n,r){if(!(r.state.loading&4)){var l=Wo.get(n);if(l)var u=l.get(null);else{l=new Map,Wo.set(n,l);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<h.length;m++){var _=h[m];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),u=_)}u&&l.set(null,u)}h=r.instance,_=h.getAttribute("data-precedence"),m=l.get(_)||u,m===u&&l.set(null,h),l.set(_,h),this.count++,u=Ko.bind(this),h.addEventListener("load",u),h.addEventListener("error",u),m?m.parentNode.insertBefore(h,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var hl={$$typeof:k,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function nE(n,r,l,u,h,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=lu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lu(0),this.hiddenUpdates=lu(null),this.identifierPrefix=u,this.onUncaughtError=h,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function cy(n,r,l,u,h,m,_,E,N,j,Q,ee){return n=new nE(n,r,l,_,N,j,Q,ee,E),r=1,m===!0&&(r|=24),m=Yt(3,null,null,r),n.current=m,m.stateNode=n,r=$u(),r.refCount++,n.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:l,cache:r},Xu(m),n}function dy(n){return n?(n=Dr,n):Dr}function fy(n,r,l,u,h,m){h=dy(h),u.context===null?u.context=h:u.pendingContext=h,u=Si(r),u.payload={element:l},m=m===void 0?null:m,m!==null&&(u.callback=m),l=Ei(n,u,r),l!==null&&(jt(l,n,r),qa(l,n,r))}function hy(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<r?l:r}}function fd(n,r){hy(n,r),(n=n.alternate)&&hy(n,r)}function py(n){if(n.tag===13||n.tag===31){var r=Xi(n,67108864);r!==null&&jt(r,n,67108864),fd(n,67108864)}}function my(n){if(n.tag===13||n.tag===31){var r=Wt();r=ou(r);var l=Xi(n,r);l!==null&&jt(l,n,r),fd(n,r)}}var es=!0;function iE(n,r,l,u){var h=P.T;P.T=null;var m=Z.p;try{Z.p=2,hd(n,r,l,u)}finally{Z.p=m,P.T=h}}function rE(n,r,l,u){var h=P.T;P.T=null;var m=Z.p;try{Z.p=8,hd(n,r,l,u)}finally{Z.p=m,P.T=h}}function hd(n,r,l,u){if(es){var h=pd(u);if(h===null)Jc(n,r,u,ts,l),yy(n,u);else if(lE(h,n,r,l,u))u.stopPropagation();else if(yy(n,u),r&4&&-1<aE.indexOf(n)){for(;h!==null;){var m=_r(h);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=Gi(m.pendingLanes);if(_!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;_;){var N=1<<31-Fe(_);E.entanglements[1]|=N,_&=~N}Rn(m),(He&6)===0&&(Uo=wt()+500,ol(0))}}break;case 31:case 13:E=Xi(m,2),E!==null&&jt(E,m,2),Po(),fd(m,2)}if(m=pd(u),m===null&&Jc(n,r,u,ts,l),m===h)break;h=m}h!==null&&u.stopPropagation()}else Jc(n,r,u,null,l)}}function pd(n){return n=gu(n),md(n)}var ts=null;function md(n){if(ts=null,n=vr(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=d(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 ts=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(Ca()){case K:return 2;case ue:return 8;case _e:case W:return 32;case pe:return 268435456;default:return 32}default:return 32}}var gd=!1,Oi=null,Mi=null,Ii=null,pl=new Map,ml=new Map,zi=[],aE="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 yy(n,r){switch(n){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":pl.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ml.delete(r.pointerId)}}function gl(n,r,l,u,h,m){return n===null||n.nativeEvent!==m?(n={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:m,targetContainers:[h]},r!==null&&(r=_r(r),r!==null&&py(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function lE(n,r,l,u,h){switch(r){case"focusin":return Oi=gl(Oi,n,r,l,u,h),!0;case"dragenter":return Mi=gl(Mi,n,r,l,u,h),!0;case"mouseover":return Ii=gl(Ii,n,r,l,u,h),!0;case"pointerover":var m=h.pointerId;return pl.set(m,gl(pl.get(m)||null,n,r,l,u,h)),!0;case"gotpointercapture":return m=h.pointerId,ml.set(m,gl(ml.get(m)||null,n,r,l,u,h)),!0}return!1}function by(n){var r=vr(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,Nh(n.priority,function(){my(l)});return}}else if(r===31){if(r=d(l),r!==null){n.blockedOn=r,Nh(n.priority,function(){my(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 ns(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var l=pd(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=_r(l),r!==null&&py(r),n.blockedOn=l,!1;r.shift()}return!0}function vy(n,r,l){ns(n)&&l.delete(r)}function oE(){gd=!1,Oi!==null&&ns(Oi)&&(Oi=null),Mi!==null&&ns(Mi)&&(Mi=null),Ii!==null&&ns(Ii)&&(Ii=null),pl.forEach(vy),ml.forEach(vy)}function is(n,r){n.blockedOn===r&&(n.blockedOn=null,gd||(gd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,oE)))}var rs=null;function _y(n){rs!==n&&(rs=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){rs===n&&(rs=null);for(var r=0;r<n.length;r+=3){var l=n[r],u=n[r+1],h=n[r+2];if(typeof u!="function"){if(md(u||l)===null)continue;break}var m=_r(l);m!==null&&(n.splice(r,3),r-=3,pc(m,{pending:!0,data:h,method:l.method,action:u},u,h))}}))}function ta(n){function r(N){return is(N,n)}Oi!==null&&is(Oi,n),Mi!==null&&is(Mi,n),Ii!==null&&is(Ii,n),pl.forEach(r),ml.forEach(r);for(var l=0;l<zi.length;l++){var u=zi[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<zi.length&&(l=zi[0],l.blockedOn===null);)by(l),l.blockedOn===null&&zi.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var h=l[u],m=l[u+1],_=h[It]||null;if(typeof m=="function")_||_y(l);else if(_){var E=null;if(m&&m.hasAttribute("formAction")){if(h=m,_=m[It]||null)E=_.formAction;else if(md(h)!==null)continue}else E=_.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),_y(l)}}}function Sy(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(_){return h=_})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=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,h=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),h!==null&&(h(),h=null)}}}function yd(n){this._internalRoot=n}as.prototype.render=yd.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=Wt();fy(l,u,n,r,null,null)},as.prototype.unmount=yd.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;fy(n.current,2,null,n,null,null),Po(),r[br]=null}};function as(n){this._internalRoot=n}as.prototype.unstable_scheduleHydration=function(n){if(n){var r=Dh();n={blockedOn:null,target:n,priority:r};for(var l=0;l<zi.length&&r!==0&&r<zi[l].priority;l++);zi.splice(l,0,n),l===0&&by(n)}};var Ey=t.version;if(Ey!=="19.2.6")throw Error(a(527,Ey,"19.2.6"));Z.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=p(r),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var sE={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ls.isDisabled&&ls.supportsFiber)try{nt=ls.inject(sE),Be=ls}catch{}}return bl.createRoot=function(n,r){if(!o(n))throw Error(a(299));var l=!1,u="",h=Lm,m=Rm,_=Dm;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=cy(n,1,!1,null,null,l,u,null,h,m,_,Sy),n[br]=r.current,Wc(n),new yd(r)},bl.hydrateRoot=function(n,r,l){if(!o(n))throw Error(a(299));var u=!1,h="",m=Lm,_=Rm,E=Dm,N=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(h=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=cy(n,1,!0,r,l??null,u,h,N,m,_,E,Sy),r.context=dy(null),l=r.current,u=Wt(),u=ou(u),h=Si(u),h.callback=null,Ei(l,h,u),l=u,r.current.lanes=l,Aa(r,l),Rn(r),n[br]=r.current,Wc(n),new as(r)},bl.version="19.2.6",bl}var Ny;function bE(){if(Ny)return _d.exports;Ny=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(),_d.exports=yE(),_d.exports}var vE=bE();async function Cn(e,t={}){const i=await fetch(e,{headers:{"content-type":"application/json",...t.headers},...t}),a=await _E(i);if(!i.ok)throw new Error(a.error||i.statusText||`request to ${e} failed`);return a}async function _E(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 SE(){return Cn("/api/bootstrap")}async function EE(e){return Cn("/api/diff")}async function xE(e){return Cn("/api/state",{method:"POST",body:JSON.stringify(e)})}async function Oy(e){return Cn("/api/thread",{method:"POST",body:JSON.stringify(e)})}async function My(e){return Cn("/api/thread/reply",{method:"POST",body:JSON.stringify(e)})}async function wd(e){return Cn("/api/thread-message",{method:"POST",body:JSON.stringify({id:e})})}async function wE(e){return Cn("/api/thread/resolve",{method:"POST",body:JSON.stringify(e)})}async function CE(e){return Cn("/api/thread/collapse",{method:"POST",body:JSON.stringify(e)})}async function kE(){return Cn("/api/brief/generate",{method:"POST"})}async function AE(){return Cn("/api/review",{method:"POST"})}async function TE(){return Cn("/api/cancel",{method:"POST"})}const LE={diffStyle:"split",overflowMode:"wrap",sidebarOpen:!1,sidebarWidth:"narrow",collapsedFileIds:[],viewedFileIds:[],threads:[],brief:{content:"",loading:!1}};function RE(e){return{...e,diffStyle:e.diffStyle==="split"?"split":"stacked",overflowMode:e.overflowMode==="scroll"?"scroll":"wrap",sidebarWidth:e.sidebarWidth==="wide"?"wide":"narrow",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 Xf(e){return e.anchor.kind==="line"}function DE(e){return e.anchor.kind==="detached"}function Iy(e){return Object.fromEntries(e.map(t=>[t,!0]))}function zy(e,t){return e.includes(t)?e.filter(i=>i!==t):[...e,t]}function Cd(e){return[...new Set(e)]}function NE(e,t){return{additions:e.additions+t.additions,deletions:e.deletions+t.deletions}}function OE(e){const t=new Map;for(const i of e){if(!Xf(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 ME(e){const t=new Map;for(const i of e)Xf(i)&&t.set(i.anchor.fileId,(t.get(i.anchor.fileId)??0)+1);return t}function IE(e,t,i,a){return!a||i?.fileId!==t?e:[...e,a]}function zE(e,t,i){return{...e,threads:e.threads.map(a=>a.id===t?{...a,loading:i}:a)}}function UE(e,t){return{...e,brief:{...e.brief,loading:t}}}function HE(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 Bb=(...e)=>e.filter((t,i,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===i).join(" ").trim();const PE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const BE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,a)=>a?a.toUpperCase():i.toLowerCase());const Uy=e=>{const t=BE(e);return t.charAt(0).toUpperCase()+t.slice(1)};var kd={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 jE=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},VE=re.createContext({}),GE=()=>re.useContext(VE),$E=re.forwardRef(({color:e,size:t,strokeWidth:i,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...d},f)=>{const{size:p=24,strokeWidth:g=2,absoluteStrokeWidth:y=!1,color:v="currentColor",className:b=""}=GE()??{},S=a??y?Number(i??g)*24/Number(t??p):i??g;return re.createElement("svg",{ref:f,...kd,width:t??p??kd.width,height:t??p??kd.height,stroke:e??v,strokeWidth:S,className:Bb("lucide",b,o),...!s&&!jE(d)&&{"aria-hidden":"true"},...d},[...c.map(([A,D])=>re.createElement(A,D)),...Array.isArray(s)?s:[s]])});const kn=(e,t)=>{const i=re.forwardRef(({className:a,...o},s)=>re.createElement($E,{ref:s,iconNode:t,className:Bb(`lucide-${PE(Uy(e))}`,`lucide-${e}`,a),...o}));return i.displayName=Uy(e),i};const qE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],FE=kn("check",qE);const YE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],XE=kn("chevron-down",YE);const QE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ZE=kn("chevron-right",QE);const KE=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],jb=kn("chevrons-down-up",KE);const WE=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Vb=kn("chevrons-up-down",WE);const JE=[["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"}]],ex=kn("eye-off",JE);const tx=[["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"}]],Gb=kn("message-square",tx);const nx=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],ix=kn("panel-left",nx);const rx=[["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"}]],ax=kn("scroll-text",rx);const lx=[["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"}]],ox=kn("sparkles",lx);const sx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$b=kn("x",sx);function sa({icon:e,label:t,size:i=14,className:a="",...o}){return H.jsx("button",{type:"button",className:`icon-btn ${a}`,"aria-label":t,...o,children:H.jsx(e,{size:i})})}function qb({open:e,title:t,ariaLabel:i,closeLabel:a,widthClassName:o,bodyClassName:s,onClose:c,children:d}){return re.useEffect(()=>{if(!e)return;const f=p=>{p.key==="Escape"&&c()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[e,c]),e?H.jsx("div",{className:"dialog-backdrop",onClick:c,children:H.jsxs("div",{className:`dialog${o?` ${o}`:""}`,role:"dialog","aria-modal":"true","aria-label":i,onClick:f=>f.stopPropagation(),children:[H.jsxs("div",{className:"dialog-header",children:[H.jsx("div",{className:"dialog-heading",children:H.jsx("div",{className:"dialog-title",children:t})}),H.jsx("div",{className:"dialog-actions",children:H.jsx(sa,{icon:$b,size:16,label:a,className:"dialog-close",onClick:c})})]}),H.jsx("div",{className:`dialog-body-wrap${s?` ${s}`:""}`,children:d})]})}):null}function Fb(e,t){const i=t||{};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const ux=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dx={};function Hy(e,t){return(dx.jsx?cx:ux).test(e)}const fx=/[ \t\n\f\r]/g;function Ys(e){return typeof e=="object"?e.type==="text"?Py(e.value):!1:Py(e)}function Py(e){return e.replace(fx,"")===""}class Pl{constructor(t,i,a){this.normal=i,this.property=t,a&&(this.space=a)}}Pl.prototype.normal={};Pl.prototype.property={};Pl.prototype.space=void 0;function Yb(e,t){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new Pl(i,a,t)}function pf(e){return e.toLowerCase()}class $t{constructor(t,i){this.attribute=i,this.property=t}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let hx=0;const Ae=mr(),ht=mr(),mf=mr(),ae=mr(),Ze=mr(),fa=mr(),Jt=mr();function mr(){return 2**++hx}const gf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:ht,commaOrSpaceSeparated:Jt,commaSeparated:fa,number:ae,overloadedBoolean:mf,spaceSeparated:Ze},Symbol.toStringTag,{value:"Module"})),Ad=Object.keys(gf);class Qf extends $t{constructor(t,i,a,o){let s=-1;if(super(t,i),By(this,"space",o),typeof a=="number")for(;++s<Ad.length;){const c=Ad[s];By(this,Ad[s],(a&gf[c])===gf[c])}}}Qf.prototype.defined=!0;function By(e,t,i){i&&(e[t]=i)}function va(e){const t={},i={};for(const[a,o]of Object.entries(e.properties)){const s=new Qf(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),t[a]=s,i[pf(a)]=a,i[pf(s.attribute)]=a}return new Pl(t,i,e.space)}const Xb=va({properties:{ariaActiveDescendant:null,ariaAtomic:ht,ariaAutoComplete:null,ariaBusy:ht,ariaChecked:ht,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:Ze,ariaCurrent:null,ariaDescribedBy:Ze,ariaDetails:null,ariaDisabled:ht,ariaDropEffect:Ze,ariaErrorMessage:null,ariaExpanded:ht,ariaFlowTo:Ze,ariaGrabbed:ht,ariaHasPopup:null,ariaHidden:ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ze,ariaLevel:ae,ariaLive:null,ariaModal:ht,ariaMultiLine:ht,ariaMultiSelectable:ht,ariaOrientation:null,ariaOwns:Ze,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:ht,ariaReadOnly:ht,ariaRelevant:null,ariaRequired:ht,ariaRoleDescription:Ze,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:ht,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Qb(e,t){return t in e?e[t]:t}function Zb(e,t){return Qb(e,t.toLowerCase())}const px=va({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fa,acceptCharset:Ze,accessKey:Ze,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:Ze,autoFocus:Ae,autoPlay:Ae,blocking:Ze,capture:null,charSet:null,checked:Ae,cite:null,className:Ze,cols:ae,colSpan:null,content:null,contentEditable:ht,controls:Ae,controlsList:Ze,coords:ae|fa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:mf,draggable:ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:Ze,height:ae,hidden:mf,high:ae,href:null,hrefLang:null,htmlFor:Ze,httpEquiv:Ze,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:Ze,itemRef:Ze,itemScope:Ae,itemType:Ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,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:Ae,optimum:ae,pattern:null,ping:Ze,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:Ze,required:Ae,reversed:Ae,rows:ae,rowSpan:ae,sandbox:Ze,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:ht,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ze,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:ht,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:Zb}),mx=va({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:Jt,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:Ze,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:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,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:fa,g2:fa,glyphName:fa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:Jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,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:ae,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:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jt,rev:Jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jt,requiredFeatures:Jt,requiredFonts:Jt,requiredFormats:Jt,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:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:Jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jt,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Qb}),Kb=va({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()}}),Wb=va({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zb}),Jb=va({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gx={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"},yx=/[A-Z]/g,jy=/-[a-z]/g,bx=/^data[-\w.:]+$/i;function ev(e,t){const i=pf(t);let a=t,o=$t;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&bx.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(jy,_x);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!jy.test(s)){let c=s.replace(yx,vx);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=Qf}return new o(a,t)}function vx(e){return"-"+e.toLowerCase()}function _x(e){return e.charAt(1).toUpperCase()}const tv=Yb([Xb,px,Kb,Wb,Jb],"html"),Bl=Yb([Xb,mx,Kb,Wb,Jb],"svg");function nv(e){return e.join(" ").trim()}var na={},Td,Vy;function Sx(){if(Vy)return Td;Vy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
|
|
11
|
+
`,p="/",g="*",y="",v="comment",b="declaration";function S(D,x){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];x=x||{};var T=1,k=1;function I(ie){var ne=ie.match(t);ne&&(T+=ne.length);var P=ie.lastIndexOf(f);k=~P?ie.length-P:k+ie.length}function z(){var ie={line:T,column:k};return function(ne){return ne.position=new R(ie),Y(),ne}}function R(ie){this.start=ie,this.end={line:T,column:k},this.source=x.source}R.prototype.content=D;function $(ie){var ne=new Error(x.source+":"+T+":"+k+": "+ie);if(ne.reason=ie,ne.filename=x.source,ne.line=T,ne.column=k,ne.source=D,!x.silent)throw ne}function G(ie){var ne=ie.exec(D);if(ne){var P=ne[0];return I(P),D=D.slice(P.length),ne}}function Y(){G(i)}function le(ie){var ne;for(ie=ie||[];ne=te();)ne!==!1&&ie.push(ne);return ie}function te(){var ie=z();if(!(p!=D.charAt(0)||g!=D.charAt(1))){for(var ne=2;y!=D.charAt(ne)&&(g!=D.charAt(ne)||p!=D.charAt(ne+1));)++ne;if(ne+=2,y===D.charAt(ne-1))return $("End of comment missing");var P=D.slice(2,ne-2);return k+=2,I(P),D=D.slice(ne),k+=2,ie({type:v,comment:P})}}function F(){var ie=z(),ne=G(a);if(ne){if(te(),!G(o))return $("property missing ':'");var P=G(s),Z=ie({type:b,property:A(ne[0].replace(e,y)),value:P?A(P[0].replace(e,y)):y});return G(c),Z}}function ce(){var ie=[];le(ie);for(var ne;ne=F();)ne!==!1&&(ie.push(ne),le(ie));return ie}return Y(),ce()}function A(D){return D?D.replace(d,y):y}return Td=S,Td}var Gy;function Ex(){if(Gy)return na;Gy=1;var e=na&&na.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(na,"__esModule",{value:!0}),na.default=i;const t=e(Sx());function i(a,o){let s=null;if(!a||typeof a!="string")return s;const c=(0,t.default)(a),d=typeof o=="function";return c.forEach(f=>{if(f.type!=="declaration")return;const{property:p,value:g}=f;d?o(p,g,f):g&&(s=s||{},s[p]=g)}),s}return na}var vl={},$y;function xx(){if($y)return vl;$y=1,Object.defineProperty(vl,"__esModule",{value:!0}),vl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(p){return!p||i.test(p)||e.test(p)},c=function(p,g){return g.toUpperCase()},d=function(p,g){return"".concat(g,"-")},f=function(p,g){return g===void 0&&(g={}),s(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(o,d):p=p.replace(a,d),p.replace(t,c))};return vl.camelCase=f,vl}var _l,qy;function wx(){if(qy)return _l;qy=1;var e=_l&&_l.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Ex()),i=xx();function a(o,s){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(d,f){d&&f&&(c[(0,i.camelCase)(d,s)]=f)}),c}return a.default=a,_l=a,_l}var Cx=wx();const kx=Pb(Cx),iv=rv("end"),Zf=rv("start");function rv(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 Ax(e){const t=Zf(e),i=iv(e);if(t&&i)return{start:t,end:i}}function kl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fy(e.position):"start"in e||"end"in e?Fy(e):"line"in e||"column"in e?yf(e):""}function yf(e){return Yy(e&&e.line)+":"+Yy(e&&e.column)}function Fy(e){return yf(e&&e.start)+"-"+yf(e&&e.end)}function Yy(e){return e&&typeof e=="number"?e:1}class Ot 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 f=a.indexOf(":");f===-1?s.ruleId=a:(s.source=a.slice(0,f),s.ruleId=a.slice(f+1))}if(!s.place&&s.ancestors&&s.ancestors){const f=s.ancestors[s.ancestors.length-1];f&&(s.place=f.position)}const d=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=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=kl(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}}Ot.prototype.file="";Ot.prototype.name="";Ot.prototype.reason="";Ot.prototype.message="";Ot.prototype.stack="";Ot.prototype.column=void 0;Ot.prototype.line=void 0;Ot.prototype.ancestors=void 0;Ot.prototype.cause=void 0;Ot.prototype.fatal=void 0;Ot.prototype.place=void 0;Ot.prototype.ruleId=void 0;Ot.prototype.source=void 0;const Kf={}.hasOwnProperty,Tx=new Map,Lx=/[A-Z]/g,Rx=new Set(["table","tbody","thead","tfoot","tr"]),Dx=new Set(["td","th"]),av="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Nx(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=Bx(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=Px(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"?Bl:tv,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=lv(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function lv(e,t,i){if(t.type==="element")return Ox(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Mx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zx(e,t,i);if(t.type==="mdxjsEsm")return Ix(e,t);if(t.type==="root")return Ux(e,t,i);if(t.type==="text")return Hx(e,t)}function Ox(e,t,i){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=Bl,e.schema=o),e.ancestors.push(t);const s=sv(e,t.tagName,!1),c=jx(e,t);let d=Jf(e,t);return Rx.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!Ys(f):!0})),ov(e,c,s,t),Wf(c,d),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function Mx(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)}Dl(e,t.position)}function Ix(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Dl(e,t.position)}function zx(e,t,i){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=Bl,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:sv(e,t.name,!0),c=Vx(e,t),d=Jf(e,t);return ov(e,c,s,t),Wf(c,d),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function Ux(e,t,i){const a={};return Wf(a,Jf(e,t)),e.create(t,e.Fragment,a,i)}function Hx(e,t){return t.value}function ov(e,t,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=a)}function Wf(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function Px(e,t,i){return a;function a(o,s,c,d){const p=Array.isArray(c.children)?i:t;return d?p(s,c,d):p(s,c)}}function Bx(e,t){return i;function i(a,o,s,c){const d=Array.isArray(s.children),f=Zf(a);return t(o,s,c,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function jx(e,t){const i={};let a,o;for(o in t.properties)if(o!=="children"&&Kf.call(t.properties,o)){const s=Gx(e,o,t.properties[o]);if(s){const[c,d]=s;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&Dx.has(t.tagName)?a=d:i[c]=d}}if(a){const s=i.style||(i.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function Vx(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 d=c.properties[0];d.type,Object.assign(i,e.evaluater.evaluateExpression(d.argument))}else Dl(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 d=a.value.data.estree.body[0];d.type,s=e.evaluater.evaluateExpression(d.expression)}else Dl(e,t.position);else s=a.value===null?!0:a.value;i[o]=s}return i}function Jf(e,t){const i=[];let a=-1;const o=e.passKeys?new Map:Tx;for(;++a<t.children.length;){const s=t.children[a];let c;if(e.passKeys){const f=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(f){const p=o.get(f)||0;c=f+"-"+p,o.set(f,p+1)}}const d=lv(e,s,c);d!==void 0&&i.push(d)}return i}function Gx(e,t,i){const a=ev(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?Fb(i):nv(i)),a.property==="style"){let o=typeof i=="object"?i:$x(e,String(i));return e.stylePropertyNameCase==="css"&&(o=qx(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?gx[a.property]||a.property:a.attribute,i]}}function $x(e,t){try{return kx(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new Ot("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=av+"#cannot-parse-style-attribute",o}}function sv(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 d=Hy(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}a=c}else a=Hy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return Kf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);Dl(e)}function Dl(e,t){const i=new Ot("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=av+"#cannot-handle-mdx-estrees-without-createevaluater",i}function qx(e){const t={};let i;for(i in e)Kf.call(e,i)&&(t[Fx(i)]=e[i]);return t}function Fx(e){let t=e.replace(Lx,Yx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Yx(e){return"-"+e.toLowerCase()}const Ld={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"]},Xx={};function Qx(e,t){const i=Xx,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return uv(e,a,o)}function uv(e,t,i){if(Zx(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 Xy(e.children,t,i)}return Array.isArray(e)?Xy(e,t,i):""}function Xy(e,t,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=uv(e[o],t,i);return a.join("")}function Zx(e){return!!(e&&typeof e=="object")}const Qy=document.createElement("i");function eh(e){const t="&"+e+";";Qy.innerHTML=t;const i=Qy.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function Hn(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 hn(e,t){return e.length>0?(Hn(e,e.length,0,t),e):t}const Zy={}.hasOwnProperty;function Kx(e){const t={};let i=-1;for(;++i<e.length;)Wx(t,e[i]);return t}function Wx(e,t){let i;for(i in t){const o=(Zy.call(e,i)?e[i]:void 0)||(e[i]={}),s=t[i];let c;if(s)for(c in s){Zy.call(o,c)||(o[c]=[]);const d=s[c];Jx(o[c],Array.isArray(d)?d:d?[d]:[])}}}function Jx(e,t){let i=-1;const a=[];for(;++i<t.length;)(t[i].add==="after"?e:a).push(t[i]);Hn(e,0,0,a)}function cv(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 ha(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const In=Vi(/[A-Za-z]/),en=Vi(/[\dA-Za-z]/),ew=Vi(/[#-'*+\--9=?A-Z^-~]/);function bf(e){return e!==null&&(e<32||e===127)}const vf=Vi(/\d/),tw=Vi(/[\dA-Fa-f]/),nw=Vi(/[!-/:-@[-`{-~]/);function Se(e){return e!==null&&e<-2}function Gt(e){return e!==null&&(e<0||e===32)}function Pe(e){return e===-2||e===-1||e===32}const iw=Vi(new RegExp("\\p{P}|\\p{S}","u")),rw=Vi(/\s/);function Vi(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function _a(e){const t=[];let i=-1,a=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&en(e.charCodeAt(i+1))&&en(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 d=e.charCodeAt(i+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),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 Ke(e,t,i,a){const o=a?a-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(f){return Pe(f)?(e.enter(i),d(f)):t(f)}function d(f){return Pe(f)&&s++<o?(e.consume(f),d):(e.exit(i),t(f))}}const aw={tokenize:lw};function lw(e){const t=e.attempt(this.parser.constructs.contentInitial,a,o);let i;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function o(d){return e.enter("paragraph"),s(d)}function s(d){const f=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=f),i=f,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Se(d)?(e.consume(d),e.exit("chunkText"),s):(e.consume(d),c)}}const ow={tokenize:sw},Ky={tokenize:uw};function sw(e){const t=this,i=[];let a=0,o,s,c;return d;function d(k){if(a<i.length){const I=i[a];return t.containerState=I[1],e.attempt(I[0].continuation,f,p)(k)}return p(k)}function f(k){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&T();const I=t.events.length;let z=I,R;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){R=t.events[z][1].end;break}x(a);let $=I;for(;$<t.events.length;)t.events[$][1].end={...R},$++;return Hn(t.events,z+1,0,t.events.slice(I)),t.events.length=$,p(k)}return d(k)}function p(k){if(a===i.length){if(!o)return v(k);if(o.currentConstruct&&o.currentConstruct.concrete)return S(k);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ky,g,y)(k)}function g(k){return o&&T(),x(a),v(k)}function y(k){return t.parser.lazy[t.now().line]=a!==i.length,c=t.now().offset,S(k)}function v(k){return t.containerState={},e.attempt(Ky,b,S)(k)}function b(k){return a++,i.push([t.currentConstruct,t.containerState]),v(k)}function S(k){if(k===null){o&&T(),x(0),e.consume(k);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),A(k)}function A(k){if(k===null){D(e.exit("chunkFlow"),!0),x(0),e.consume(k);return}return Se(k)?(e.consume(k),D(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(k),A)}function D(k,I){const z=t.sliceStream(k);if(I&&z.push(null),k.previous=s,s&&(s.next=k),s=k,o.defineSkip(k.start),o.write(z),t.parser.lazy[k.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<c&&(!o.events[R][1].end||o.events[R][1].end.offset>c))return;const $=t.events.length;let G=$,Y,le;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(Y){le=t.events[G][1].end;break}Y=!0}for(x(a),R=$;R<t.events.length;)t.events[R][1].end={...le},R++;Hn(t.events,G+1,0,t.events.slice($)),t.events.length=R}}function x(k){let I=i.length;for(;I-- >k;){const z=i[I];t.containerState=z[1],z[0].exit.call(t,e)}i.length=k}function T(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function uw(e,t,i){return Ke(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Wy(e){if(e===null||Gt(e)||rw(e))return 1;if(iw(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 _f={name:"attention",resolveAll:cw,tokenize:dw};function cw(e,t){let i=-1,a,o,s,c,d,f,p,g;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;f=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 y={...e[a][1].end},v={...e[i][1].start};Jy(y,-f),Jy(v,f),c={type:f>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:v},s={type:f>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},o={type:f>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[i][1].start={...d.end},p=[],e[a][1].end.offset-e[a][1].start.offset&&(p=hn(p,[["enter",e[a][1],t],["exit",e[a][1],t]])),p=hn(p,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",s,t]]),p=hn(p,th(t.parser.constructs.insideSpan.null,e.slice(a+1,i),t)),p=hn(p,[["exit",s,t],["enter",d,t],["exit",d,t],["exit",o,t]]),e[i][1].end.offset-e[i][1].start.offset?(g=2,p=hn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])):g=0,Hn(e,a-1,i-a+3,p),i=a+p.length-g-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function dw(e,t){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=Wy(a);let s;return c;function c(f){return s=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===s)return e.consume(f),d;const p=e.exit("attentionSequence"),g=Wy(f),y=!g||g===2&&o||i.includes(f),v=!o||o===2&&g||i.includes(a);return p._open=!!(s===42?y:y&&(o||!v)),p._close=!!(s===42?v:v&&(g||!y)),t(f)}}function Jy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fw={name:"autolink",tokenize:hw};function hw(e,t,i){let a=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return In(b)?(e.consume(b),c):b===64?i(b):p(b)}function c(b){return b===43||b===45||b===46||en(b)?(a=1,d(b)):p(b)}function d(b){return b===58?(e.consume(b),a=0,f):(b===43||b===45||b===46||en(b))&&a++<32?(e.consume(b),d):(a=0,p(b))}function f(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||bf(b)?i(b):(e.consume(b),f)}function p(b){return b===64?(e.consume(b),g):ew(b)?(e.consume(b),p):i(b)}function g(b){return en(b)?y(b):i(b)}function y(b){return b===46?(e.consume(b),a=0,g):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):v(b)}function v(b){if((b===45||en(b))&&a++<63){const S=b===45?v:y;return e.consume(b),S}return i(b)}}const Xs={partial:!0,tokenize:pw};function pw(e,t,i){return a;function a(s){return Pe(s)?Ke(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Se(s)?t(s):i(s)}}const dv={continuation:{tokenize:gw},exit:yw,name:"blockQuote",tokenize:mw};function mw(e,t,i){const a=this;return o;function o(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return i(c)}function s(c){return Pe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function gw(e,t,i){const a=this;return o;function o(c){return Pe(c)?Ke(e,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(dv,t,i)(c)}}function yw(e){e.exit("blockQuote")}const fv={name:"characterEscape",tokenize:bw};function bw(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 nw(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(s)}}const hv={name:"characterReference",tokenize:vw};function vw(e,t,i){const a=this;let o=0,s,c;return d;function d(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),f}function f(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),s=31,c=en,g(y))}function p(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=tw,g):(e.enter("characterReferenceValue"),s=7,c=vf,g(y))}function g(y){if(y===59&&o){const v=e.exit("characterReferenceValue");return c===en&&!eh(a.sliceSerialize(v))?i(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(y)&&o++<s?(e.consume(y),g):i(y)}}const e0={partial:!0,tokenize:Sw},t0={concrete:!0,name:"codeFenced",tokenize:_w};function _w(e,t,i){const a=this,o={partial:!0,tokenize:z};let s=0,c=0,d;return f;function f(R){return p(R)}function p(R){const $=a.events[a.events.length-1];return s=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,d=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(R)}function g(R){return R===d?(c++,e.consume(R),g):c<3?i(R):(e.exit("codeFencedFenceSequence"),Pe(R)?Ke(e,y,"whitespace")(R):y(R))}function y(R){return R===null||Se(R)?(e.exit("codeFencedFence"),a.interrupt?t(R):e.check(e0,A,I)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(R))}function v(R){return R===null||Se(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(R)):Pe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,b,"whitespace")(R)):R===96&&R===d?i(R):(e.consume(R),v)}function b(R){return R===null||Se(R)?y(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===null||Se(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(R)):R===96&&R===d?i(R):(e.consume(R),S)}function A(R){return e.attempt(o,I,D)(R)}function D(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x}function x(R){return s>0&&Pe(R)?Ke(e,T,"linePrefix",s+1)(R):T(R)}function T(R){return R===null||Se(R)?e.check(e0,A,I)(R):(e.enter("codeFlowValue"),k(R))}function k(R){return R===null||Se(R)?(e.exit("codeFlowValue"),T(R)):(e.consume(R),k)}function I(R){return e.exit("codeFenced"),t(R)}function z(R,$,G){let Y=0;return le;function le(ne){return R.enter("lineEnding"),R.consume(ne),R.exit("lineEnding"),te}function te(ne){return R.enter("codeFencedFence"),Pe(ne)?Ke(R,F,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):F(ne)}function F(ne){return ne===d?(R.enter("codeFencedFenceSequence"),ce(ne)):G(ne)}function ce(ne){return ne===d?(Y++,R.consume(ne),ce):Y>=c?(R.exit("codeFencedFenceSequence"),Pe(ne)?Ke(R,ie,"whitespace")(ne):ie(ne)):G(ne)}function ie(ne){return ne===null||Se(ne)?(R.exit("codeFencedFence"),$(ne)):G(ne)}}}function Sw(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 Rd={name:"codeIndented",tokenize:xw},Ew={partial:!0,tokenize:ww};function xw(e,t,i){const a=this;return o;function o(p){return e.enter("codeIndented"),Ke(e,s,"linePrefix",5)(p)}function s(p){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?f(p):Se(p)?e.attempt(Ew,c,f)(p):(e.enter("codeFlowValue"),d(p))}function d(p){return p===null||Se(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),d)}function f(p){return e.exit("codeIndented"),t(p)}}function ww(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):Ke(e,s,"linePrefix",5)(c)}function s(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Se(c)?o(c):i(c)}}const Cw={name:"codeText",previous:Aw,resolve:kw,tokenize:Tw};function kw(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 Aw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Tw(e,t,i){let a=0,o,s;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),d(y)}function d(y){return y===96?(e.consume(y),a++,d):(e.exit("codeTextSequence"),f(y))}function f(y){return y===null?i(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),f):y===96?(s=e.enter("codeTextSequence"),o=0,g(y)):Se(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||Se(y)?(e.exit("codeTextData"),f(y)):(e.consume(y),p)}function g(y){return y===96?(e.consume(y),o++,g):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(s.type="codeTextData",p(y))}}class Lw{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&&Sl(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),Sl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Sl(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);Sl(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Sl(this.left,i.reverse())}}}function Sl(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 pv(e){const t={};let i=-1,a,o,s,c,d,f,p;const g=new Lw(e);for(;++i<g.length;){for(;i in t;)i=t[i];if(a=g.get(i),i&&a[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(f=a[1]._tokenizer.events,s=0,s<f.length&&f[s][1].type==="lineEndingBlank"&&(s+=2),s<f.length&&f[s][1].type==="content"))for(;++s<f.length&&f[s][1].type!=="content";)f[s][1].type==="chunkText"&&(f[s][1]._isInFirstContentOfListItem=!0,s++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,Rw(g,i)),i=t[i],p=!0);else if(a[1]._container){for(s=i,o=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(g.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={...g.get(o)[1].start},d=g.slice(o,i),d.unshift(a),g.splice(o,i-o+1,d))}}return Hn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function Rw(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 d=c.events,f=[],p={};let g,y,v=-1,b=i,S=0,A=0;const D=[A];for(;b;){for(;e.get(++o)[1]!==b;);s.push(o),b._tokenizer||(g=a.sliceStream(b),b.next||g.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=i;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(A=v+1,D.push(A),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):D.pop(),v=D.length;v--;){const x=d.slice(D[v],D[v+1]),T=s.pop();f.push([T,T+x.length-1]),e.splice(T,2,x)}for(f.reverse(),v=-1;++v<f.length;)p[S+f[v][0]]=S+f[v][1],S+=f[v][1]-f[v][0]-1;return p}const Dw={resolve:Ow,tokenize:Mw},Nw={partial:!0,tokenize:Iw};function Ow(e){return pv(e),e}function Mw(e,t){let i;return a;function a(d){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?s(d):Se(d)?e.check(Nw,c,s)(d):(e.consume(d),o)}function s(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function Iw(e,t,i){const a=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ke(e,s,"linePrefix")}function s(c){if(c===null||Se(c))return i(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,i,t)(c)}}function mv(e,t,i,a,o,s,c,d,f){const p=f||Number.POSITIVE_INFINITY;let g=0;return y;function y(x){return x===60?(e.enter(a),e.enter(o),e.enter(s),e.consume(x),e.exit(s),v):x===null||x===32||x===41||bf(x)?i(x):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),A(x))}function v(x){return x===62?(e.enter(s),e.consume(x),e.exit(s),e.exit(o),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===62?(e.exit("chunkString"),e.exit(d),v(x)):x===null||x===60||Se(x)?i(x):(e.consume(x),x===92?S:b)}function S(x){return x===60||x===62||x===92?(e.consume(x),b):b(x)}function A(x){return!g&&(x===null||x===41||Gt(x))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(x)):g<p&&x===40?(e.consume(x),g++,A):x===41?(e.consume(x),g--,A):x===null||x===32||x===40||bf(x)?i(x):(e.consume(x),x===92?D:A)}function D(x){return x===40||x===41||x===92?(e.consume(x),A):A(x)}}function gv(e,t,i,a,o,s){const c=this;let d=0,f;return p;function p(b){return e.enter(a),e.enter(o),e.consume(b),e.exit(o),e.enter(s),g}function g(b){return d>999||b===null||b===91||b===93&&!f||b===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(e.exit(s),e.enter(o),e.consume(b),e.exit(o),e.exit(a),t):Se(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||Se(b)||d++>999?(e.exit("chunkString"),g(b)):(e.consume(b),f||(f=!Pe(b)),b===92?v:y)}function v(b){return b===91||b===92||b===93?(e.consume(b),d++,y):y(b)}}function yv(e,t,i,a,o,s){let c;return d;function d(v){return v===34||v===39||v===40?(e.enter(a),e.enter(o),e.consume(v),e.exit(o),c=v===40?41:v,f):i(v)}function f(v){return v===c?(e.enter(o),e.consume(v),e.exit(o),e.exit(a),t):(e.enter(s),p(v))}function p(v){return v===c?(e.exit(s),f(c)):v===null?i(v):Se(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Ke(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||Se(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?y:g)}function y(v){return v===c||v===92?(e.consume(v),g):g(v)}}function Al(e,t){let i;return a;function a(o){return Se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):Pe(o)?Ke(e,a,i?"linePrefix":"lineSuffix")(o):t(o)}}const zw={name:"definition",tokenize:Hw},Uw={partial:!0,tokenize:Pw};function Hw(e,t,i){const a=this;let o;return s;function s(b){return e.enter("definition"),c(b)}function c(b){return gv.call(a,e,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return o=ha(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),f):i(b)}function f(b){return Gt(b)?Al(e,p)(b):p(b)}function p(b){return mv(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(Uw,y,y)(b)}function y(b){return Pe(b)?Ke(e,v,"whitespace")(b):v(b)}function v(b){return b===null||Se(b)?(e.exit("definition"),a.parser.defined.push(o),t(b)):i(b)}}function Pw(e,t,i){return a;function a(d){return Gt(d)?Al(e,o)(d):i(d)}function o(d){return yv(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return Pe(d)?Ke(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Se(d)?t(d):i(d)}}const Bw={name:"hardBreakEscape",tokenize:jw};function jw(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 Vw={name:"headingAtx",resolve:Gw,tokenize:$w};function Gw(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"},Hn(e,a,i-a+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function $w(e,t,i){let a=0;return o;function o(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Gt(g)?(e.exit("atxHeadingSequence"),d(g)):i(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),f(g)):g===null||Se(g)?(e.exit("atxHeading"),t(g)):Pe(g)?Ke(e,d,"whitespace")(g):(e.enter("atxHeadingText"),p(g))}function f(g){return g===35?(e.consume(g),f):(e.exit("atxHeadingSequence"),d(g))}function p(g){return g===null||g===35||Gt(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),p)}}const qw=["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"],n0=["pre","script","style","textarea"],Fw={concrete:!0,name:"htmlFlow",resolveTo:Qw,tokenize:Zw},Yw={partial:!0,tokenize:Ww},Xw={partial:!0,tokenize:Kw};function Qw(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 Zw(e,t,i){const a=this;let o,s,c,d,f;return p;function p(C){return g(C)}function g(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),y}function y(C){return C===33?(e.consume(C),v):C===47?(e.consume(C),s=!0,A):C===63?(e.consume(C),o=3,a.interrupt?t:L):In(C)?(e.consume(C),c=String.fromCharCode(C),D):i(C)}function v(C){return C===45?(e.consume(C),o=2,b):C===91?(e.consume(C),o=5,d=0,S):In(C)?(e.consume(C),o=4,a.interrupt?t:L):i(C)}function b(C){return C===45?(e.consume(C),a.interrupt?t:L):i(C)}function S(C){const se="CDATA[";return C===se.charCodeAt(d++)?(e.consume(C),d===se.length?a.interrupt?t:F:S):i(C)}function A(C){return In(C)?(e.consume(C),c=String.fromCharCode(C),D):i(C)}function D(C){if(C===null||C===47||C===62||Gt(C)){const se=C===47,me=c.toLowerCase();return!se&&!s&&n0.includes(me)?(o=1,a.interrupt?t(C):F(C)):qw.includes(c.toLowerCase())?(o=6,se?(e.consume(C),x):a.interrupt?t(C):F(C)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(C):s?T(C):k(C))}return C===45||en(C)?(e.consume(C),c+=String.fromCharCode(C),D):i(C)}function x(C){return C===62?(e.consume(C),a.interrupt?t:F):i(C)}function T(C){return Pe(C)?(e.consume(C),T):le(C)}function k(C){return C===47?(e.consume(C),le):C===58||C===95||In(C)?(e.consume(C),I):Pe(C)?(e.consume(C),k):le(C)}function I(C){return C===45||C===46||C===58||C===95||en(C)?(e.consume(C),I):z(C)}function z(C){return C===61?(e.consume(C),R):Pe(C)?(e.consume(C),z):k(C)}function R(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(e.consume(C),f=C,$):Pe(C)?(e.consume(C),R):G(C)}function $(C){return C===f?(e.consume(C),f=null,Y):C===null||Se(C)?i(C):(e.consume(C),$)}function G(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Gt(C)?z(C):(e.consume(C),G)}function Y(C){return C===47||C===62||Pe(C)?k(C):i(C)}function le(C){return C===62?(e.consume(C),te):i(C)}function te(C){return C===null||Se(C)?F(C):Pe(C)?(e.consume(C),te):i(C)}function F(C){return C===45&&o===2?(e.consume(C),P):C===60&&o===1?(e.consume(C),Z):C===62&&o===4?(e.consume(C),O):C===63&&o===3?(e.consume(C),L):C===93&&o===5?(e.consume(C),he):Se(C)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Yw,X,ce)(C)):C===null||Se(C)?(e.exit("htmlFlowData"),ce(C)):(e.consume(C),F)}function ce(C){return e.check(Xw,ie,X)(C)}function ie(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),ne}function ne(C){return C===null||Se(C)?ce(C):(e.enter("htmlFlowData"),F(C))}function P(C){return C===45?(e.consume(C),L):F(C)}function Z(C){return C===47?(e.consume(C),c="",oe):F(C)}function oe(C){if(C===62){const se=c.toLowerCase();return n0.includes(se)?(e.consume(C),O):F(C)}return In(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),oe):F(C)}function he(C){return C===93?(e.consume(C),L):F(C)}function L(C){return C===62?(e.consume(C),O):C===45&&o===2?(e.consume(C),L):F(C)}function O(C){return C===null||Se(C)?(e.exit("htmlFlowData"),X(C)):(e.consume(C),O)}function X(C){return e.exit("htmlFlow"),t(C)}}function Kw(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 Ww(e,t,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Xs,t,i)}}const Jw={name:"htmlText",tokenize:eC};function eC(e,t,i){const a=this;let o,s,c;return d;function d(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),f}function f(L){return L===33?(e.consume(L),p):L===47?(e.consume(L),z):L===63?(e.consume(L),k):In(L)?(e.consume(L),G):i(L)}function p(L){return L===45?(e.consume(L),g):L===91?(e.consume(L),s=0,S):In(L)?(e.consume(L),T):i(L)}function g(L){return L===45?(e.consume(L),b):i(L)}function y(L){return L===null?i(L):L===45?(e.consume(L),v):Se(L)?(c=y,Z(L)):(e.consume(L),y)}function v(L){return L===45?(e.consume(L),b):y(L)}function b(L){return L===62?P(L):L===45?v(L):y(L)}function S(L){const O="CDATA[";return L===O.charCodeAt(s++)?(e.consume(L),s===O.length?A:S):i(L)}function A(L){return L===null?i(L):L===93?(e.consume(L),D):Se(L)?(c=A,Z(L)):(e.consume(L),A)}function D(L){return L===93?(e.consume(L),x):A(L)}function x(L){return L===62?P(L):L===93?(e.consume(L),x):A(L)}function T(L){return L===null||L===62?P(L):Se(L)?(c=T,Z(L)):(e.consume(L),T)}function k(L){return L===null?i(L):L===63?(e.consume(L),I):Se(L)?(c=k,Z(L)):(e.consume(L),k)}function I(L){return L===62?P(L):k(L)}function z(L){return In(L)?(e.consume(L),R):i(L)}function R(L){return L===45||en(L)?(e.consume(L),R):$(L)}function $(L){return Se(L)?(c=$,Z(L)):Pe(L)?(e.consume(L),$):P(L)}function G(L){return L===45||en(L)?(e.consume(L),G):L===47||L===62||Gt(L)?Y(L):i(L)}function Y(L){return L===47?(e.consume(L),P):L===58||L===95||In(L)?(e.consume(L),le):Se(L)?(c=Y,Z(L)):Pe(L)?(e.consume(L),Y):P(L)}function le(L){return L===45||L===46||L===58||L===95||en(L)?(e.consume(L),le):te(L)}function te(L){return L===61?(e.consume(L),F):Se(L)?(c=te,Z(L)):Pe(L)?(e.consume(L),te):Y(L)}function F(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(e.consume(L),o=L,ce):Se(L)?(c=F,Z(L)):Pe(L)?(e.consume(L),F):(e.consume(L),ie)}function ce(L){return L===o?(e.consume(L),o=void 0,ne):L===null?i(L):Se(L)?(c=ce,Z(L)):(e.consume(L),ce)}function ie(L){return L===null||L===34||L===39||L===60||L===61||L===96?i(L):L===47||L===62||Gt(L)?Y(L):(e.consume(L),ie)}function ne(L){return L===47||L===62||Gt(L)?Y(L):i(L)}function P(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):i(L)}function Z(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),oe}function oe(L){return Pe(L)?Ke(e,he,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):he(L)}function he(L){return e.enter("htmlTextData"),c(L)}}const nh={name:"labelEnd",resolveAll:rC,resolveTo:aC,tokenize:lC},tC={tokenize:oC},nC={tokenize:sC},iC={tokenize:uC};function rC(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&&Hn(e,0,e.length,i),e}function aC(e,t){let i=e.length,a=0,o,s,c,d;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 f={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[s+a+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",f,t],["enter",p,t]],d=hn(d,e.slice(s+1,s+a+3)),d=hn(d,[["enter",g,t]]),d=hn(d,th(t.parser.constructs.insideSpan.null,e.slice(s+a+4,c-3),t)),d=hn(d,[["exit",g,t],e[c-2],e[c-1],["exit",p,t]]),d=hn(d,e.slice(c+1)),d=hn(d,[["exit",f,t]]),Hn(e,s,e.length,d),e}function lC(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 d;function d(v){return s?s._inactive?y(v):(c=a.parser.defined.includes(ha(a.sliceSerialize({start:s.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),f):i(v)}function f(v){return v===40?e.attempt(tC,g,c?g:y)(v):v===91?e.attempt(nC,g,c?p:y)(v):c?g(v):y(v)}function p(v){return e.attempt(iC,g,y)(v)}function g(v){return t(v)}function y(v){return s._balanced=!0,i(v)}}function oC(e,t,i){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return Gt(y)?Al(e,s)(y):s(y)}function s(y){return y===41?g(y):mv(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Gt(y)?Al(e,f)(y):g(y)}function d(y){return i(y)}function f(y){return y===34||y===39||y===40?yv(e,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function p(y){return Gt(y)?Al(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):i(y)}}function sC(e,t,i){const a=this;return o;function o(d){return gv.call(a,e,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return a.parser.defined.includes(ha(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):i(d)}function c(d){return i(d)}}function uC(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 cC={name:"labelStartImage",resolveAll:nh.resolveAll,tokenize:dC};function dC(e,t,i){const a=this;return o;function o(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),s}function s(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):i(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(d):t(d)}}const fC={name:"labelStartLink",resolveAll:nh.resolveAll,tokenize:hC};function hC(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 Dd={name:"lineEnding",tokenize:pC};function pC(e,t){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const ws={name:"thematicBreak",tokenize:mC};function mC(e,t,i){let a=0,o;return s;function s(p){return e.enter("thematicBreak"),c(p)}function c(p){return o=p,d(p)}function d(p){return p===o?(e.enter("thematicBreakSequence"),f(p)):a>=3&&(p===null||Se(p))?(e.exit("thematicBreak"),t(p)):i(p)}function f(p){return p===o?(e.consume(p),a++,f):(e.exit("thematicBreakSequence"),Pe(p)?Ke(e,d,"whitespace")(p):d(p))}}const Vt={continuation:{tokenize:vC},exit:SC,name:"list",tokenize:bC},gC={partial:!0,tokenize:EC},yC={partial:!0,tokenize:_C};function bC(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 d;function d(b){const S=a.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||b===a.containerState.marker:vf(b)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ws,i,p)(b):p(b);if(!a.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(b)}return i(b)}function f(b){return vf(b)&&++c<10?(e.consume(b),f):(!a.interrupt||c<2)&&(a.containerState.marker?b===a.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),p(b)):i(b)}function p(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||b,e.check(Xs,a.interrupt?i:g,e.attempt(gC,v,y))}function g(b){return a.containerState.initialBlankLine=!0,s++,v(b)}function y(b){return Pe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):i(b)}function v(b){return a.containerState.size=s+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function vC(e,t,i){const a=this;return a.containerState._closeFlow=void 0,e.check(Xs,o,s);function o(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ke(e,t,"listItemIndent",a.containerState.size+1)(d)}function s(d){return a.containerState.furtherBlankLines||!Pe(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(yC,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ke(e,e.attempt(Vt,t,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function _C(e,t,i){const a=this;return Ke(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 SC(e){e.exit(this.containerState.type)}function EC(e,t,i){const a=this;return Ke(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!Pe(s)&&c&&c[1].type==="listItemPrefixWhitespace"?t(s):i(s)}}const i0={name:"setextUnderline",resolveTo:xC,tokenize:wC};function xC(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 wC(e,t,i){const a=this;let o;return s;function s(p){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),o=p,c(p)):i(p)}function c(p){return e.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===o?(e.consume(p),d):(e.exit("setextHeadingLineSequence"),Pe(p)?Ke(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||Se(p)?(e.exit("setextHeadingLine"),t(p)):i(p)}}const CC={tokenize:kC};function kC(e){const t=this,i=e.attempt(Xs,a,e.attempt(this.parser.constructs.flowInitial,o,Ke(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Dw,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 AC={resolveAll:vv()},TC=bv("string"),LC=bv("text");function bv(e){return{resolveAll:vv(e==="text"?RC:void 0),tokenize:t};function t(i){const a=this,o=this.parser.constructs[e],s=i.attempt(o,c,d);return c;function c(g){return p(g)?s(g):d(g)}function d(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),f}function f(g){return p(g)?(i.exit("data"),s(g)):(i.consume(g),f)}function p(g){if(g===null)return!0;const y=o[g];let v=-1;if(y)for(;++v<y.length;){const b=y[v];if(!b.previous||b.previous.call(a,a.previous))return!0}return!1}}}function vv(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 RC(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,d=0,f;for(;s--;){const p=o[s];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(p===-2)f=!0,d++;else if(p!==-1){s++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(d=0),d){const p={type:i===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:a.start._bufferIndex+c,_index:a.start._index+s,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...p.start},a.start.offset===a.end.offset?Object.assign(a,p):(e.splice(i,0,["enter",p,t],["exit",p,t]),i+=2)}i++}return e}const DC={42:Vt,43:Vt,45:Vt,48:Vt,49:Vt,50:Vt,51:Vt,52:Vt,53:Vt,54:Vt,55:Vt,56:Vt,57:Vt,62:dv},NC={91:zw},OC={[-2]:Rd,[-1]:Rd,32:Rd},MC={35:Vw,42:ws,45:[i0,ws],60:Fw,61:i0,95:ws,96:t0,126:t0},IC={38:hv,92:fv},zC={[-5]:Dd,[-4]:Dd,[-3]:Dd,33:cC,38:hv,42:_f,60:[fw,Jw],91:fC,92:[Bw,fv],93:nh,95:_f,96:Cw},UC={null:[_f,AC]},HC={null:[42,95]},PC={null:[]},BC=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:HC,contentInitial:NC,disable:PC,document:DC,flow:MC,flowInitial:OC,insideSpan:UC,string:IC,text:zC},Symbol.toStringTag,{value:"Module"}));function jC(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=[],d=[];const f={attempt:$(z),check:$(R),consume:T,enter:k,exit:I,interrupt:$(R,{interrupt:!0})},p={code:null,containerState:{},defineSkip:A,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:y};let g=t.tokenize.call(p,f);return t.resolveAll&&s.push(t),p;function y(te){return c=hn(c,te),D(),c[c.length-1]!==null?[]:(G(t,0),p.events=th(s,p.events,p),p.events)}function v(te,F){return GC(b(te),F)}function b(te){return VC(c,te)}function S(){const{_bufferIndex:te,_index:F,line:ce,column:ie,offset:ne}=a;return{_bufferIndex:te,_index:F,line:ce,column:ie,offset:ne}}function A(te){o[te.line]=te.column,le()}function D(){let te;for(;a._index<c.length;){const F=c[a._index];if(typeof F=="string")for(te=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===te&&a._bufferIndex<F.length;)x(F.charCodeAt(a._bufferIndex));else x(F)}}function x(te){g=g(te)}function T(te){Se(te)?(a.line++,a.column=1,a.offset+=te===-3?2:1,le()):te!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),p.previous=te}function k(te,F){const ce=F||{};return ce.type=te,ce.start=S(),p.events.push(["enter",ce,p]),d.push(ce),ce}function I(te){const F=d.pop();return F.end=S(),p.events.push(["exit",F,p]),F}function z(te,F){G(te,F.from)}function R(te,F){F.restore()}function $(te,F){return ce;function ce(ie,ne,P){let Z,oe,he,L;return Array.isArray(ie)?X(ie):"tokenize"in ie?X([ie]):O(ie);function O(de){return be;function be(Te){const Le=Te!==null&&de[Te],Xe=Te!==null&&de.null,et=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(Xe)?Xe:Xe?[Xe]:[]];return X(et)(Te)}}function X(de){return Z=de,oe=0,de.length===0?P:C(de[oe])}function C(de){return be;function be(Te){return L=Y(),he=de,de.partial||(p.currentConstruct=de),de.name&&p.parser.constructs.disable.null.includes(de.name)?me():de.tokenize.call(F?Object.assign(Object.create(p),F):p,f,se,me)(Te)}}function se(de){return te(he,L),ne}function me(de){return L.restore(),++oe<Z.length?C(Z[oe]):P}}}function G(te,F){te.resolveAll&&!s.includes(te)&&s.push(te),te.resolve&&Hn(p.events,F,p.events.length-F,te.resolve(p.events.slice(F),p)),te.resolveTo&&(p.events=te.resolveTo(p.events,p))}function Y(){const te=S(),F=p.previous,ce=p.currentConstruct,ie=p.events.length,ne=Array.from(d);return{from:ie,restore:P};function P(){a=te,p.previous=F,p.currentConstruct=ce,p.events.length=ie,d=ne,le()}}function le(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function VC(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 d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function GC(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 $C(e){const a={constructs:Kx([BC,...(e||{}).extensions||[]]),content:o(aw),defined:[],document:o(ow),flow:o(CC),lazy:{},string:o(TC),text:o(LC)};return a;function o(s){return c;function c(d){return jC(a,s,d)}}}function qC(e){for(;!pv(e););return e}const r0=/[\0\t\n\r]/g;function FC(){let e=1,t="",i=!0,a;return o;function o(s,c,d){const f=[];let p,g,y,v,b;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,t="",i&&(s.charCodeAt(0)===65279&&y++,i=void 0);y<s.length;){if(r0.lastIndex=y,p=r0.exec(s),v=p&&p.index!==void 0?p.index:s.length,b=s.charCodeAt(v),!p){t=s.slice(y);break}if(b===10&&y===v&&a)f.push(-3),a=void 0;else switch(a&&(f.push(-5),a=void 0),y<v&&(f.push(s.slice(y,v)),e+=v-y),b){case 0:{f.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,f.push(-2);e++<g;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:a=!0,e=1}y=v+1}return d&&(a&&f.push(-5),t&&f.push(t),f.push(null)),f}}const YC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function XC(e){return e.replace(YC,QC)}function QC(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return cv(i.slice(s?2:1),s?16:10)}return eh(i)||e}const _v={}.hasOwnProperty;function ZC(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),KC(i)(qC($C(i).document().write(FC()(e,t,!0))))}function KC(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ci),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(oi),blockQuote:s(Xe),characterEscape:Y,characterReference:Y,codeFenced:s(et),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(et,c),codeText:s(qt,c),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(xt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(gn),hardBreakEscape:s(si),hardBreakTrailing:s(si),htmlFlow:s(ui,c),htmlFlowData:Y,htmlText:s(ui,c),htmlTextData:Y,image:s(gr),label:c,link:s(ci),listItem:s(fi),listItemValue:v,listOrdered:s(di,y),listUnordered:s(di),paragraph:s(yr),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(oi),strong:s(wa),thematicBreak:s(Ca)},exit:{atxHeading:f(),atxHeadingSequence:z,autolink:f(),autolinkEmail:Le,autolinkProtocol:Te,blockQuote:f(),characterEscapeValue:le,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:de,characterReference:be,codeFenced:f(D),codeFencedFence:A,codeFencedFenceInfo:b,codeFencedFenceMeta:S,codeFlowValue:le,codeIndented:f(x),codeText:f(ne),codeTextData:le,data:le,definition:f(),definitionDestinationString:I,definitionLabelString:T,definitionTitleString:k,emphasis:f(),hardBreakEscape:f(F),hardBreakTrailing:f(F),htmlFlow:f(ce),htmlFlowData:le,htmlText:f(ie),htmlTextData:le,image:f(Z),label:he,labelText:oe,lineEnding:te,link:f(P),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:se,resourceDestinationString:L,resourceTitleString:O,resource:X,setextHeading:f(G),setextHeadingLineSequence:$,setextHeadingText:R,strong:f(),thematicBreak:f()}};Sv(t,(e||{}).mdastExtensions||[]);const i={};return a;function a(K){let ue={type:"root",children:[]};const _e={stack:[ue],tokenStack:[],config:t,enter:d,exit:p,buffer:c,resume:g,data:i},W=[];let pe=-1;for(;++pe<K.length;)if(K[pe][1].type==="listOrdered"||K[pe][1].type==="listUnordered")if(K[pe][0]==="enter")W.push(pe);else{const xe=W.pop();pe=o(K,xe,pe)}for(pe=-1;++pe<K.length;){const xe=t[K[pe][0]];_v.call(xe,K[pe][1].type)&&xe[K[pe][1].type].call(Object.assign({sliceSerialize:K[pe][2].sliceSerialize},_e),K[pe][1])}if(_e.tokenStack.length>0){const xe=_e.tokenStack[_e.tokenStack.length-1];(xe[1]||a0).call(_e,void 0,xe[0])}for(ue.position={start:Hi(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:Hi(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)ue=t.transforms[pe](ue)||ue;return ue}function o(K,ue,_e){let W=ue-1,pe=-1,xe=!1,Qe,nt,Be,st;for(;++W<=_e;){const Fe=K[W];switch(Fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Fe[0]==="enter"?pe++:pe--,st=void 0;break}case"lineEndingBlank":{Fe[0]==="enter"&&(Qe&&!st&&!pe&&!Be&&(Be=W),st=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:st=void 0}if(!pe&&Fe[0]==="enter"&&Fe[1].type==="listItemPrefix"||pe===-1&&Fe[0]==="exit"&&(Fe[1].type==="listUnordered"||Fe[1].type==="listOrdered")){if(Qe){let hi=W;for(nt=void 0;hi--;){const yn=K[hi];if(yn[1].type==="lineEnding"||yn[1].type==="lineEndingBlank"){if(yn[0]==="exit")continue;nt&&(K[nt][1].type="lineEndingBlank",xe=!0),yn[1].type="lineEnding",nt=hi}else if(!(yn[1].type==="linePrefix"||yn[1].type==="blockQuotePrefix"||yn[1].type==="blockQuotePrefixWhitespace"||yn[1].type==="blockQuoteMarker"||yn[1].type==="listItemIndent"))break}Be&&(!nt||Be<nt)&&(Qe._spread=!0),Qe.end=Object.assign({},nt?K[nt][1].start:Fe[1].end),K.splice(nt||W,0,["exit",Qe,Fe[2]]),W++,_e++}if(Fe[1].type==="listItemPrefix"){const hi={type:"listItem",_spread:!1,start:Object.assign({},Fe[1].start),end:void 0};Qe=hi,K.splice(W,0,["enter",hi,Fe[2]]),W++,_e++,Be=void 0,st=!0}}}return K[ue][1]._spread=xe,_e}function s(K,ue){return _e;function _e(W){d.call(this,K(W),W),ue&&ue.call(this,W)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(K,ue,_e){this.stack[this.stack.length-1].children.push(K),this.stack.push(K),this.tokenStack.push([ue,_e||void 0]),K.position={start:Hi(ue.start),end:void 0}}function f(K){return ue;function ue(_e){K&&K.call(this,_e),p.call(this,_e)}}function p(K,ue){const _e=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==K.type&&(ue?ue.call(this,K,W[0]):(W[1]||a0).call(this,K,W[0]));else throw new Error("Cannot close `"+K.type+"` ("+kl({start:K.start,end:K.end})+"): it’s not open");_e.position.end=Hi(K.end)}function g(){return Qx(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(K){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(K),10),this.data.expectingFirstListItemValue=void 0}}function b(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=K}function S(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=K}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K.replace(/(\r?\n|\r)$/g,"")}function T(K){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ue,_e.identifier=ha(this.sliceSerialize(K)).toLowerCase()}function k(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.title=K}function I(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.url=K}function z(K){const ue=this.stack[this.stack.length-1];if(!ue.depth){const _e=this.sliceSerialize(K).length;ue.depth=_e}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function $(K){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(K).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(K){const _e=this.stack[this.stack.length-1].children;let W=_e[_e.length-1];(!W||W.type!=="text")&&(W=wt(),W.position={start:Hi(K.start),end:void 0},_e.push(W)),this.stack.push(W)}function le(K){const ue=this.stack.pop();ue.value+=this.sliceSerialize(K),ue.position.end=Hi(K.end)}function te(K){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=ue.children[ue.children.length-1];_e.position.end=Hi(K.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(Y.call(this,K),le.call(this,K))}function F(){this.data.atHardBreak=!0}function ce(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K}function ie(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K}function ne(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K}function P(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ue,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function Z(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ue,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function oe(K){const ue=this.sliceSerialize(K),_e=this.stack[this.stack.length-2];_e.label=XC(ue),_e.identifier=ha(ue).toLowerCase()}function he(){const K=this.stack[this.stack.length-1],ue=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const W=K.children;_e.children=W}else _e.alt=ue}function L(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.url=K}function O(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.title=K}function X(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function se(K){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ue,_e.identifier=ha(this.sliceSerialize(K)).toLowerCase(),this.data.referenceType="full"}function me(K){this.data.characterReferenceType=K.type}function de(K){const ue=this.sliceSerialize(K),_e=this.data.characterReferenceType;let W;_e?(W=cv(ue,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=eh(ue);const pe=this.stack[this.stack.length-1];pe.value+=W}function be(K){const ue=this.stack.pop();ue.position.end=Hi(K.end)}function Te(K){le.call(this,K);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(K)}function Le(K){le.call(this,K);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(K)}function Xe(){return{type:"blockquote",children:[]}}function et(){return{type:"code",lang:null,meta:null,value:""}}function qt(){return{type:"inlineCode",value:""}}function xt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function gn(){return{type:"emphasis",children:[]}}function oi(){return{type:"heading",depth:0,children:[]}}function si(){return{type:"break"}}function ui(){return{type:"html",value:""}}function gr(){return{type:"image",title:null,url:"",alt:null}}function ci(){return{type:"link",title:null,url:"",children:[]}}function di(K){return{type:"list",ordered:K.type==="listOrdered",start:null,spread:K._spread,children:[]}}function fi(K){return{type:"listItem",spread:K._spread,checked:null,children:[]}}function yr(){return{type:"paragraph",children:[]}}function wa(){return{type:"strong",children:[]}}function wt(){return{type:"text",value:""}}function Ca(){return{type:"thematicBreak"}}}function Hi(e){return{line:e.line,column:e.column,offset:e.offset}}function Sv(e,t){let i=-1;for(;++i<t.length;){const a=t[i];Array.isArray(a)?Sv(e,a):WC(e,a)}}function WC(e,t){let i;for(i in t)if(_v.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 a0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+kl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+kl({start:t.start,end:t.end})+") is still open")}function JC(e){const t=this;t.parser=i;function i(a){return ZC(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ek(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 tk(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
|
|
14
|
+
`}]}function nk(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 ik(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function rk(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function ak(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=_a(a.toLowerCase()),s=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=s+1,d+=1,e.footnoteCounts.set(a,d);const f={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function lk(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 ok(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function Ev(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 sk(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return Ev(e,t);const o={src:_a(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 uk(e,t){const i={src:_a(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 ck(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 dk(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return Ev(e,t);const o={href:_a(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 fk(e,t){const i={href:_a(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 hk(e,t,i){const a=e.all(t),o=i?pk(i):xv(t),s={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const g=a[d];(o||d!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
16
|
+
`}),g.type==="element"&&g.tagName==="p"&&!o?c.push(...g.children):c.push(g)}const f=a[a.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&c.push({type:"text",value:`
|
|
17
|
+
`});const p={type:"element",tagName:"li",properties:s,children:c};return e.patch(t,p),e.applyData(t,p)}function pk(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=xv(i[a])}return t}function xv(e){const t=e.spread;return t??e.children.length>1}function mk(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 gk(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function yk(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function bk(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function vk(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)},d=Zf(t.children[1]),f=iv(t.children[t.children.length-1]);d&&f&&(c.position={start:d,end:f}),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 _k(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,d=c?c.length:t.children.length;let f=-1;const p=[];for(;++f<d;){const y=t.children[f],v={},b=c?c[f]:void 0;b&&(v.align=b);let S={type:"element",tagName:s,properties:v,children:[]};y&&(S.children=e.all(y),e.patch(y,S),S=e.applyData(y,S)),p.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,g),e.applyData(t,g)}function Sk(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const l0=9,o0=32;function Ek(e){const t=String(e),i=/\r?\n|\r/g;let a=i.exec(t),o=0;const s=[];for(;a;)s.push(s0(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(t);return s.push(s0(t.slice(o),o>0,!1)),s.join("")}function s0(e,t,i){let a=0,o=e.length;if(t){let s=e.codePointAt(a);for(;s===l0||s===o0;)a++,s=e.codePointAt(a)}if(i){let s=e.codePointAt(o-1);for(;s===l0||s===o0;)o--,s=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function xk(e,t){const i={type:"text",value:Ek(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function wk(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const Ck={blockquote:ek,break:tk,code:nk,delete:ik,emphasis:rk,footnoteReference:ak,heading:lk,html:ok,imageReference:sk,image:uk,inlineCode:ck,linkReference:dk,link:fk,listItem:hk,list:mk,paragraph:gk,root:yk,strong:bk,table:vk,tableCell:Sk,tableRow:_k,text:xk,thematicBreak:wk,toml:os,yaml:os,definition:os,footnoteDefinition:os};function os(){}const wv=-1,Qs=0,Tl=1,Ds=2,ih=3,rh=4,ah=5,lh=6,Cv=7,kv=8,kk=typeof self=="object"?self:globalThis,u0=(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 kk[e](t)},Ak=(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 Qs:case wv:return i(c,o);case Tl:{const d=i([],o);for(const f of c)d.push(a(f));return d}case Ds:{const d=i({},o);for(const[f,p]of c)d[a(f)]=a(p);return d}case ih:return i(new Date(c),o);case rh:{const{source:d,flags:f}=c;return i(new RegExp(d,f),o)}case ah:{const d=i(new Map,o);for(const[f,p]of c)d.set(a(f),a(p));return d}case lh:{const d=i(new Set,o);for(const f of c)d.add(a(f));return d}case Cv:{const{name:d,message:f}=c;return i(u0(d,f),o)}case kv: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:d}=new Uint8Array(c);return i(new DataView(d),c)}}return i(u0(s,c),o)};return a},c0=e=>Ak(new Map,e)(0),ia="",{toString:Tk}={},{keys:Lk}=Object,El=e=>{const t=typeof e;if(t!=="object"||!e)return[Qs,t];const i=Tk.call(e).slice(8,-1);switch(i){case"Array":return[Tl,ia];case"Object":return[Ds,ia];case"Date":return[ih,ia];case"RegExp":return[rh,ia];case"Map":return[ah,ia];case"Set":return[lh,ia];case"DataView":return[Tl,i]}return i.includes("Array")?[Tl,i]:i.includes("Error")?[Cv,i]:[Ds,i]},ss=([e,t])=>e===Qs&&(t==="function"||t==="symbol"),Rk=(e,t,i,a)=>{const o=(c,d)=>{const f=a.push(c)-1;return i.set(d,f),f},s=c=>{if(i.has(c))return i.get(c);let[d,f]=El(c);switch(d){case Qs:{let g=c;switch(f){case"bigint":d=kv,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);g=null;break;case"undefined":return o([wv],c)}return o([d,g],c)}case Tl:{if(f){let v=c;return f==="DataView"?v=new Uint8Array(c.buffer):f==="ArrayBuffer"&&(v=new Uint8Array(c)),o([f,[...v]],c)}const g=[],y=o([d,g],c);for(const v of c)g.push(s(v));return y}case Ds:{if(f)switch(f){case"BigInt":return o([f,c.toString()],c);case"Boolean":case"Number":case"String":return o([f,c.valueOf()],c)}if(t&&"toJSON"in c)return s(c.toJSON());const g=[],y=o([d,g],c);for(const v of Lk(c))(e||!ss(El(c[v])))&&g.push([s(v),s(c[v])]);return y}case ih:return o([d,c.toISOString()],c);case rh:{const{source:g,flags:y}=c;return o([d,{source:g,flags:y}],c)}case ah:{const g=[],y=o([d,g],c);for(const[v,b]of c)(e||!(ss(El(v))||ss(El(b))))&&g.push([s(v),s(b)]);return y}case lh:{const g=[],y=o([d,g],c);for(const v of c)(e||!ss(El(v)))&&g.push(s(v));return y}}const{message:p}=c;return o([d,{name:f,message:p}],c)};return s},d0=(e,{json:t,lossy:i}={})=>{const a=[];return Rk(!(t||i),!!t,new Map,a)(e),a},Ns=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?c0(d0(e,t)):structuredClone(e):(e,t)=>c0(d0(e,t));function Dk(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 Nk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Ok(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||Dk,a=e.options.footnoteBackLabel||Nk,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const g=e.all(p),y=String(p.identifier).toUpperCase(),v=_a(y.toLowerCase());let b=0;const S=[],A=e.footnoteCounts.get(y);for(;A!==void 0&&++b<=A;){S.length>0&&S.push({type:"text",value:" "});let T=typeof i=="string"?i:i(f,b);typeof T=="string"&&(T={type:"text",value:T}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(f,b),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const D=g[g.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const T=D.children[D.children.length-1];T&&T.type==="text"?T.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...S)}else g.push(...S);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(g,!0)};e.patch(p,x),d.push(x)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ns(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
18
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
19
|
+
`}]}}const Av=(function(e){if(e==null)return Uk;if(typeof e=="function")return Zs(e);if(typeof e=="object")return Array.isArray(e)?Mk(e):Ik(e);if(typeof e=="string")return zk(e);throw new Error("Expected function, string, or object as test")});function Mk(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=Av(e[i]);return Zs(a);function a(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function Ik(e){const t=e;return Zs(i);function i(a){const o=a;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function zk(e){return Zs(t);function t(i){return i&&i.type===e}}function Zs(e){return t;function t(i,a,o){return!!(Hk(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function Uk(){return!0}function Hk(e){return e!==null&&typeof e=="object"&&"type"in e}const Tv=[],Pk=!0,f0=!1,Bk="skip";function jk(e,t,i,a){let o;typeof t=="function"&&typeof i!="function"?(a=i,i=t):o=t;const s=Av(o),c=a?-1:1;d(e,void 0,[])();function d(f,p,g){const y=f&&typeof f=="object"?f:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(f.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=Tv,S,A,D;if((!t||s(f,p,g[g.length-1]||void 0))&&(b=Vk(i(f,g)),b[0]===f0))return b;if("children"in f&&f.children){const x=f;if(x.children&&b[0]!==Bk)for(A=(a?x.children.length:-1)+c,D=g.concat(x);A>-1&&A<x.children.length;){const T=x.children[A];if(S=d(T,A,D)(),S[0]===f0)return S;A=typeof S[1]=="number"?S[1]:A+c}}return b}}}function Vk(e){return Array.isArray(e)?e:typeof e=="number"?[Pk,e]:e==null?Tv:[e]}function Lv(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),jk(e,s,d,o);function d(f,p){const g=p[p.length-1],y=g?g.children.indexOf(f):void 0;return c(f,y,g)}}const Sf={}.hasOwnProperty,Gk={};function $k(e,t){const i=t||Gk,a=new Map,o=new Map,s=new Map,c={...Ck,...i.handlers},d={all:p,applyData:Fk,definitionById:a,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:f,options:i,patch:qk,wrap:Xk};return Lv(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:o,v=String(g.identifier).toUpperCase();y.has(v)||y.set(v,g)}}),d;function f(g,y){const v=g.type,b=d.handlers[v];if(Sf.call(d.handlers,v)&&b)return b(d,g,y);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in g){const{children:A,...D}=g,x=Ns(D);return x.children=d.all(g),x}return Ns(g)}return(d.options.unknownHandler||Yk)(d,g,y)}function p(g){const y=[];if("children"in g){const v=g.children;let b=-1;for(;++b<v.length;){const S=d.one(v[b],g);if(S){if(b&&v[b-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=h0(S.value)),!Array.isArray(S)&&S.type==="element")){const A=S.children[0];A&&A.type==="text"&&(A.value=h0(A.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function qk(e,t){e.position&&(t.position=Ax(e))}function Fk(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,Ns(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function Yk(e,t){const i=t.data||{},a="value"in t&&!(Sf.call(i,"hProperties")||Sf.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 Xk(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 h0(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function p0(e,t){const i=$k(e,t),a=i.one(e,void 0),o=Ok(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 Qk(e,t){return e&&"run"in e?async function(i,a){const o=p0(i,{file:a,...t});await e.run(o,a)}:function(i,a){return p0(i,{file:a,...e||t})}}function m0(e){if(e)throw e}var Nd,g0;function Zk(){if(g0)return Nd;g0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},s=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var g=e.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!y)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,g){i&&g.name==="__proto__"?i(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},d=function(p,g){if(g==="__proto__")if(e.call(p,g)){if(a)return a(p,g).value}else return;return p[g]};return Nd=function f(){var p,g,y,v,b,S,A=arguments[0],D=1,x=arguments.length,T=!1;for(typeof A=="boolean"&&(T=A,A=arguments[1]||{},D=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});D<x;++D)if(p=arguments[D],p!=null)for(g in p)y=d(A,g),v=d(p,g),A!==v&&(T&&v&&(s(v)||(b=o(v)))?(b?(b=!1,S=y&&o(y)?y:[]):S=y&&s(y)?y:{},c(A,{name:g,newValue:f(T,S,v)})):typeof v<"u"&&c(A,{name:g,newValue:v}));return A},Nd}var Kk=Zk();const Od=Pb(Kk);function Ef(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 Wk(){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);d(null,...o);function d(f,...p){const g=e[++s];let y=-1;if(f){c(f);return}for(;++y<o.length;)(p[y]===null||p[y]===void 0)&&(p[y]=o[y]);o=p,g?Jk(g,d)(...p):c(null,...p)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Jk(e,t){let i;return a;function a(...c){const d=e.length>c.length;let f;d&&c.push(o);try{f=e.apply(this,c)}catch(p){const g=p;if(d&&i)throw g;return o(g)}d||(f&&f.then&&typeof f.then=="function"?f.then(s,o):f instanceof Error?o(f):s(f))}function o(c,...d){i||(i=!0,t(c,...d))}function s(c){o(null,c)}}const On={basename:eA,dirname:tA,extname:nA,join:iA,sep:"/"};function eA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');jl(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,d=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),d>-1&&(e.codePointAt(o)===t.codePointAt(d--)?d<0&&(a=o):(d=-1,a=c));return i===a?a=c:a<0&&(a=e.length),e.slice(i,a)}function tA(e){if(jl(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 nA(e){jl(e);let t=e.length,i=-1,a=0,o=-1,s=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){a=t+1;break}continue}i<0&&(c=!0,i=t+1),d===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 iA(...e){let t=-1,i;for(;++t<e.length;)jl(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":rA(i)}function rA(e){jl(e);const t=e.codePointAt(0)===47;let i=aA(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function aA(e,t){let i="",a=0,o=-1,s=0,c=-1,d,f;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===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(f=i.lastIndexOf("/"),f!==i.length-1){f<0?(i="",a=0):(i=i.slice(0,f),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 d===46&&s>-1?s++:s=-1}return i}function jl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lA={cwd:oA};function oA(){return"/"}function xf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function sA(e){if(typeof e=="string")e=new URL(e);else if(!xf(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 uA(e)}function uA(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 Md=["history","path","basename","stem","extname","dirname"];class Rv{constructor(t){let i;t?xf(t)?i={path:t}:typeof t=="string"||cA(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":lA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Md.length;){const s=Md[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)Md.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?On.basename(this.path):void 0}set basename(t){zd(t,"basename"),Id(t,"basename"),this.path=On.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?On.dirname(this.path):void 0}set dirname(t){y0(this.basename,"dirname"),this.path=On.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?On.extname(this.path):void 0}set extname(t){if(Id(t,"extname"),y0(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=On.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){xf(t)&&(t=sA(t)),zd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?On.basename(this.path,this.extname):void 0}set stem(t){zd(t,"stem"),Id(t,"stem"),this.path=On.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 Ot(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 Id(e,t){if(e&&e.includes(On.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+On.sep+"`")}function zd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function y0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dA=(function(e){const a=this.constructor.prototype,o=a[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),fA={}.hasOwnProperty;class oh extends dA{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=Wk()}copy(){const t=new oh;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];t.use(...a)}return t.data(Od(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(Pd("data",this.frozen),this.namespace[t]=i,this):fA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Pd("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=us(t),a=this.parser||this.Parser;return Ud("parse",a),a(String(i),i)}process(t,i){const a=this;return this.freeze(),Ud("process",this.parser||this.Parser),Hd("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const d=us(t),f=a.parse(d);a.run(f,d,function(g,y,v){if(g||!y||!v)return p(g);const b=y,S=a.stringify(b,v);mA(S)?v.value=S:v.result=S,p(g,v)});function p(g,y){g||!y?c(g):s?s(y):i(void 0,y)}}}processSync(t){let i=!1,a;return this.freeze(),Ud("processSync",this.parser||this.Parser),Hd("processSync",this.compiler||this.Compiler),this.process(t,o),v0("processSync","process",i),a;function o(s,c){i=!0,m0(s),a=c}}run(t,i,a){b0(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,d){const f=us(i);o.run(t,f,p);function p(g,y,v){const b=y||t;g?d(g):c?c(b):a(void 0,b,v)}}}runSync(t,i){let a=!1,o;return this.run(t,i,s),v0("runSync","run",a),o;function s(c,d){m0(c),o=d,a=!0}}stringify(t,i){this.freeze();const a=us(i),o=this.compiler||this.Compiler;return Hd("stringify",o),b0(t),o(t,a)}use(t,...i){const a=this.attachers,o=this.namespace;if(Pd("use",this.frozen),t!=null)if(typeof t=="function")f(t,i);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...y]=p;f(g,y)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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");d(p.plugins),p.settings&&(o.settings=Od(!0,o.settings,p.settings))}function d(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const y=p[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,g){let y=-1,v=-1;for(;++y<a.length;)if(a[y][0]===p){v=y;break}if(v===-1)a.push([p,...g]);else if(g.length>0){let[b,...S]=g;const A=a[v][1];Ef(A)&&Ef(b)&&(b=Od(!0,A,b)),a[v]=[p,b,...S]}}}}const hA=new oh().freeze();function Ud(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Hd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Pd(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 b0(e){if(!Ef(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function v0(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function us(e){return pA(e)?e:new Rv(e)}function pA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mA(e){return typeof e=="string"||gA(e)}function gA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_0=[],S0={allowDangerousHtml:!0},bA=/^(https?|ircs?|mailto|xmpp)$/i,vA=[{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 _A(e){const t=SA(e),i=EA(e);return xA(t.runSync(t.parse(i),i),e)}function SA(e){const t=e.rehypePlugins||_0,i=e.remarkPlugins||_0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...S0}:S0;return hA().use(JC).use(i).use(Qk,a).use(t)}function EA(e){const t=e.children||"",i=new Rv;return typeof t=="string"&&(i.value=t),i}function xA(e,t){const i=t.allowedElements,a=t.allowElement,o=t.components,s=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||wA;for(const g of vA)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+yA+g.id,void 0);return Lv(e,p),Nx(e,{Fragment:H.Fragment,components:o,ignoreInvalidStyle:!0,jsx:H.jsx,jsxs:H.jsxs,passKeys:!0,passNode:!0});function p(g,y,v){if(g.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let b;for(b in Ld)if(Object.hasOwn(Ld,b)&&Object.hasOwn(g.properties,b)){const S=g.properties[b],A=Ld[b];(A===null||A.includes(g.tagName))&&(g.properties[b]=f(String(S||""),b,g))}}if(g.type==="element"){let b=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!b&&a&&typeof y=="number"&&(b=!a(g,y,v)),b&&v&&typeof y=="number")return d&&g.children?v.children.splice(y,1,...g.children):v.children.splice(y,1),y}}}function wA(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||bA.test(e.slice(0,t))?e:""}const CA="modulepreload",kA=function(e){return"/"+e},E0={},w=function(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};var c=p;document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");o=p(i.map(g=>{if(g=kA(g),g in E0)return;E0[g]=!0;const y=g.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":CA,y||(b.as="script"),b.crossOrigin="",b.href=g,f&&b.setAttribute("nonce",f),document.head.appendChild(b),y)return new Promise((S,A)=>{b.addEventListener("load",S),b.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${g}`)))})}))}function s(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return o.then(d=>{for(const f of d||[])f.status==="rejected"&&s(f.reason);return t().catch(s)})};let pt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function AA(e){return sh(e)}function sh(e){return Array.isArray(e)?TA(e):e instanceof RegExp?e:typeof e=="object"?LA(e):e}function TA(e){let t=[];for(let i=0,a=e.length;i<a;i++)t[i]=sh(e[i]);return t}function LA(e){let t={};for(let i in e)t[i]=sh(e[i]);return t}function Dv(e,...t){return t.forEach(i=>{for(let a in i)e[a]=i[a]}),e}function Nv(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Nv(e.substring(0,e.length-1)):e.substr(~t+1)}var Bd=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,cs=class{static hasCaptures(e){return e===null?!1:(Bd.lastIndex=0,Bd.test(e))}static replaceCaptures(e,t,i){return e.replace(Bd,(a,o,s,c)=>{let d=i[parseInt(o||s,10)];if(d){let f=t.substring(d.start,d.end);for(;f[0]===".";)f=f.substring(1);switch(c){case"downcase":return f.toLowerCase();case"upcase":return f.toUpperCase();default:return f}}else return a})}};function Ov(e,t){return e<t?-1:e>t?1:0}function Mv(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=Ov(e[o],t[o]);if(s!==0)return s}return 0}return i-a}function x0(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 Iv(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var zv=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}},Os=class{constructor(e,t,i){this._colorMap=e,this._defaults=t,this._root=i}static createFromRawTheme(e,t){return this.createFromParsedTheme(NA(e),t)}static createFromParsedTheme(e,t){return MA(e,t)}_cachedMatchRoot=new zv(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=>RA(e.parent,o.parentScopes));return a?new Uv(a.fontStyle,a.foreground,a.background):null}},jd=class Cs{constructor(t,i){this.parent=t,this.scopeName=i}static push(t,i){for(const a of i)t=new Cs(t,a);return t}static from(...t){let i=null;for(let a=0;a<t.length;a++)i=new Cs(i,t[a]);return i}push(t){return new Cs(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 RA(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&&!DA(e.scopeName,a);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function DA(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Uv=class{constructor(e,t,i){this.fontStyle=e,this.foregroundId=t,this.backgroundId=i}};function NA(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 d;if(typeof c.scope=="string"){let y=c.scope;y=y.replace(/^[,]+/,""),y=y.replace(/[,]+$/,""),d=y.split(",")}else Array.isArray(c.scope)?d=c.scope:d=[""];let f=-1;if(typeof c.settings.fontStyle=="string"){f=0;let y=c.settings.fontStyle.split(" ");for(let v=0,b=y.length;v<b;v++)switch(y[v]){case"italic":f=f|1;break;case"bold":f=f|2;break;case"underline":f=f|4;break;case"strikethrough":f=f|8;break}}let p=null;typeof c.settings.foreground=="string"&&x0(c.settings.foreground)&&(p=c.settings.foreground);let g=null;typeof c.settings.background=="string"&&x0(c.settings.background)&&(g=c.settings.background);for(let y=0,v=d.length;y<v;y++){let S=d[y].trim().split(" "),A=S[S.length-1],D=null;S.length>1&&(D=S.slice(0,S.length-1),D.reverse()),i[a++]=new OA(A,D,o,f,p,g)}}return i}var OA=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}},Nt=(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))(Nt||{});function MA(e,t){e.sort((f,p)=>{let g=Ov(f.scope,p.scope);return g!==0||(g=Mv(f.parentScopes,p.parentScopes),g!==0)?g:f.index-p.index});let i=0,a="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let f=e.shift();f.fontStyle!==-1&&(i=f.fontStyle),f.foreground!==null&&(a=f.foreground),f.background!==null&&(o=f.background)}let s=new IA(t),c=new Uv(i,s.getId(a),s.getId(o)),d=new UA(new wf(0,null,-1,0,0),[]);for(let f=0,p=e.length;f<p;f++){let g=e[f];d.insert(0,g.scope,g.parentScopes,g.fontStyle,s.getId(g.foreground),s.getId(g.background))}return new Os(s,c,d)}var IA=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)}},zA=Object.freeze([]),wf=class Hv{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,i,a,o,s){this.scopeDepth=t,this.parentScopes=i||zA,this.fontStyle=a,this.foreground=o,this.background=s}clone(){return new Hv(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)}},UA=class Cf{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(Cf._cmpBySpecificity),i}insert(t,i,a,o,s,c){if(i===""){this._doInsertHere(t,a,o,s,c);return}let d=i.indexOf("."),f,p;d===-1?(f=i,p=""):(f=i.substring(0,d),p=i.substring(d+1));let g;this._children.hasOwnProperty(f)?g=this._children[f]:(g=new Cf(this._mainRule.clone(),wf.cloneArr(this._rulesWithParentScopes)),this._children[f]=g),g.insert(t+1,p,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,d=this._rulesWithParentScopes.length;c<d;c++){let f=this._rulesWithParentScopes[c];if(Mv(f.parentScopes,i)===0){f.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 wf(t,i,a,o,s))}},ya=class fn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const i=fn.getLanguageId(t),a=fn.getTokenType(t),o=fn.getFontStyle(t),s=fn.getForeground(t),c=fn.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,d){let f=fn.getLanguageId(t),p=fn.getTokenType(t),g=fn.containsBalancedBrackets(t)?1:0,y=fn.getFontStyle(t),v=fn.getForeground(t),b=fn.getBackground(t);return i!==0&&(f=i),a!==8&&(p=a),o!==null&&(g=o?1:0),s!==-1&&(y=s),c!==0&&(v=c),d!==0&&(b=d),(f<<0|p<<8|g<<10|y<<11|v<<15|b<<24)>>>0}};function Ms(e,t){const i=[],a=HA(e);let o=a.next();for(;o!==null;){let f=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":f=1;break;case"L":f=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=a.next()}let p=c();if(i.push({matcher:p,priority:f}),o!==",")break;o=a.next()}return i;function s(){if(o==="-"){o=a.next();const f=s();return p=>!!f&&!f(p)}if(o==="("){o=a.next();const f=d();return o===")"&&(o=a.next()),f}if(w0(o)){const f=[];do f.push(o),o=a.next();while(w0(o));return p=>t(f,p)}return null}function c(){const f=[];let p=s();for(;p;)f.push(p),p=s();return g=>f.every(y=>y(g))}function d(){const f=[];let p=c();for(;p&&(f.push(p),o==="|"||o===",");){do o=a.next();while(o==="|"||o===",");p=c()}return g=>f.some(y=>y(g))}}function w0(e){return!!e&&!!e.match(/[\w\.:]+/)}function HA(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 Pv(e){typeof e.dispose=="function"&&e.dispose()}var Nl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},PA=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},BA=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))}},jA=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Nl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new BA;for(const i of e)VA(i,this.initialScopeName,this.repo,t);for(const i of t.references)if(i instanceof Nl){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 VA(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 Nl?ks({baseGrammar:s,selfGrammar:o},a):kf(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},a);const c=i.injections(e.scopeName);if(c)for(const d of c)a.add(new Nl(d))}function kf(e,t,i){if(t.repository&&t.repository[e]){const a=t.repository[e];Is([a],t,i)}}function ks(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Is(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Is(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Is(e,t,i){for(const a of e){if(i.visitedRule.has(a))continue;i.visitedRule.add(a);const o=a.repository?Dv({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&Is(a.patterns,{...t,repository:o},i);const s=a.include;if(!s)continue;const c=Bv(s);switch(c.kind){case 0:ks({...t,selfGrammar:t.baseGrammar},i);break;case 1:ks(t,i);break;case 2:kf(c.ruleName,{...t,repository:o},i);break;case 3:case 4:const d=c.scopeName===t.selfGrammar.scopeName?t.selfGrammar:c.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(d){const f={baseGrammar:t.baseGrammar,selfGrammar:d,repository:o};c.kind===4?kf(c.ruleName,f,i):ks(f,i)}else c.kind===4?i.add(new PA(c.scopeName,c.ruleName)):i.add(new Nl(c.scopeName));break}}}var GA=class{kind=0},$A=class{kind=1},qA=class{constructor(e){this.ruleName=e}kind=2},FA=class{constructor(e){this.scopeName=e}kind=3},YA=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Bv(e){if(e==="$base")return new GA;if(e==="$self")return new $A;const t=e.indexOf("#");if(t===-1)return new FA(e);if(t===0)return new qA(e.substring(1));{const i=e.substring(0,t),a=e.substring(t+1);return new YA(i,a)}}var XA=/\\(\d+)/,C0=/\\(\d+)/g,QA=-1,jv=-2;var Vl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,i,a){this.$location=e,this.id=t,this._name=i||null,this._nameIsCapturing=cs.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=cs.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Nv(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:cs.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:cs.replaceCaptures(this._contentName,e,t)}},ZA=class extends Vl{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!")}},KA=class extends Vl{_match;captures;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,null),this._match=new Ol(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 Ml,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},k0=class extends Vl{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 Ml,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Af=class extends Vl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o,s,c,d,f,p){super(e,t,i,a),this._begin=new Ol(o,this.id),this.beginCaptures=s,this._end=new Ol(c||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=d,this.applyEndPatternLast=f||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.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 Ml;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}},zs=class extends Vl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,i,a,o,s,c,d,f){super(e,t,i,a),this._begin=new Ol(o,this.id),this.beginCaptures=s,this.whileCaptures=d,this._while=new Ol(c,jv),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.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 Ml;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 Ml,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Vv=class Dt{static createCaptureRule(t,i,a,o,s){return t.registerRule(c=>new ZA(i,c,a,o,s))}static getCompiledRuleId(t,i,a){return t.id||i.registerRule(o=>{if(t.id=o,t.match)return new KA(t.$vscodeTextmateLocation,t.id,t.name,t.match,Dt._compileCaptures(t.captures,i,a));if(typeof t.begin>"u"){t.repository&&(a=Dv({},a,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new k0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Dt._compilePatterns(s,i,a))}return t.while?new zs(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Dt._compileCaptures(t.beginCaptures||t.captures,i,a),t.while,Dt._compileCaptures(t.whileCaptures||t.captures,i,a),Dt._compilePatterns(t.patterns,i,a)):new Af(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Dt._compileCaptures(t.beginCaptures||t.captures,i,a),t.end,Dt._compileCaptures(t.endCaptures||t.captures,i,a),t.applyEndPatternLast,Dt._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 d=parseInt(c,10);d>s&&(s=d)}for(let c=0;c<=s;c++)o[c]=null;for(const c in t){if(c==="$vscodeTextmateLocation")continue;const d=parseInt(c,10);let f=0;t[c].patterns&&(f=Dt.getCompiledRuleId(t[c],i,a)),o[d]=Dt.createCaptureRule(i,t[c].$vscodeTextmateLocation,t[c].name,t[c].contentName,f)}}return o}static _compilePatterns(t,i,a){let o=[];if(t)for(let s=0,c=t.length;s<c;s++){const d=t[s];let f=-1;if(d.include){const p=Bv(d.include);switch(p.kind){case 0:case 1:f=Dt.getCompiledRuleId(a[d.include],i,a);break;case 2:let g=a[p.ruleName];g&&(f=Dt.getCompiledRuleId(g,i,a));break;case 3:case 4:const y=p.scopeName,v=p.kind===4?p.ruleName:null,b=i.getExternalGrammar(y,a);if(b)if(v){let S=b.repository[v];S&&(f=Dt.getCompiledRuleId(S,i,b.repository))}else f=Dt.getCompiledRuleId(b.repository.$self,i,b.repository);break}}else f=Dt.getCompiledRuleId(d,i,a);if(f!==-1){const p=i.getRule(f);let g=!1;if((p instanceof k0||p instanceof Af||p instanceof zs)&&p.hasMissingPatterns&&p.patterns.length===0&&(g=!0),g)continue;o.push(f)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Ol=class Gv{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 d=0;d<a;d++)if(t.charAt(d)==="\\"&&d+1<a){const p=t.charAt(d+1);p==="z"?(s.push(t.substring(o,d)),s.push("$(?!\\n)(?<!\\n)"),o=d+2):(p==="A"||p==="G")&&(c=!0),d++}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=XA.test(this.source):this.hasBackReferences=!1}clone(){return new Gv(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 C0.lastIndex=0,this.source.replace(C0,(o,s)=>Iv(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,d,f;for(s=0,c=this.source.length;s<c;s++)d=this.source.charAt(s),t[s]=d,i[s]=d,a[s]=d,o[s]=d,d==="\\"&&s+1<c&&(f=this.source.charAt(s+1),f==="A"?(t[s+1]="",i[s+1]="",a[s+1]="A",o[s+1]="A"):f==="G"?(t[s+1]="",i[s+1]="G",a[s+1]="",o[s+1]="G"):(t[s+1]=f,i[s+1]=f,a[s+1]=f,o[s+1]=f),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}},Ml=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 A0(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 A0(e,a,this._items.map(o=>o.ruleId))}},A0=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}},Vd=class{constructor(e,t){this.languageId=e,this.tokenType=t}},WA=class Tf{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,i){this._defaultAttributes=new Vd(t,8),this._embeddedLanguagesMatcher=new JA(Object.entries(i||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Tf._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Vd(0,0);_getBasicScopeAttributes=new zv(t=>{const i=this._scopeToLanguage(t),a=this._toStandardTokenType(t);return new Vd(i,a)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const i=t.match(Tf.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/},JA=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])=>Iv(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])}},T0=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function $v(e,t,i,a,o,s,c,d){const f=t.content.length;let p=!1,g=-1;if(c){const b=eT(e,t,i,a,o,s);o=b.stack,a=b.linePos,i=b.isFirstLine,g=b.anchorPosition}const y=Date.now();for(;!p;){if(d!==0&&Date.now()-y>d)return new T0(o,!0);v()}return new T0(o,!1);function v(){const b=tT(e,t,i,a,o,g);if(!b){s.produce(o,f),p=!0;return}const S=b.captureIndices,A=b.matchedRuleId,D=S&&S.length>0?S[0].end>a:!1;if(A===QA){const x=o.getRule(e);s.produce(o,S[0].start),o=o.withContentNameScopesList(o.nameScopesList),Cl(e,t,i,o,s,x.endCaptures,S),s.produce(o,S[0].end);const T=o;if(o=o.parent,g=T.getAnchorPos(),!D&&T.getEnterPos()===a){o=T,s.produce(o,f),p=!0;return}}else{const x=e.getRule(A);s.produce(o,S[0].start);const T=o,k=x.getName(t.content,S),I=o.contentNameScopesList.pushAttributed(k,e);if(o=o.push(A,a,g,S[0].end===f,null,I,I),x instanceof Af){const z=x;Cl(e,t,i,o,s,z.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const R=z.getContentName(t.content,S),$=I.pushAttributed(R,e);if(o=o.withContentNameScopesList($),z.endHasBackReferences&&(o=o.withEndRule(z.getEndWithResolvedBackReferences(t.content,S))),!D&&T.hasSameRuleAs(o)){o=o.pop(),s.produce(o,f),p=!0;return}}else if(x instanceof zs){const z=x;Cl(e,t,i,o,s,z.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const R=z.getContentName(t.content,S),$=I.pushAttributed(R,e);if(o=o.withContentNameScopesList($),z.whileHasBackReferences&&(o=o.withEndRule(z.getWhileWithResolvedBackReferences(t.content,S))),!D&&T.hasSameRuleAs(o)){o=o.pop(),s.produce(o,f),p=!0;return}}else if(Cl(e,t,i,o,s,x.captures,S),s.produce(o,S[0].end),o=o.pop(),!D){o=o.safePop(),s.produce(o,f),p=!0;return}}S[0].end>a&&(a=S[0].end,i=!1)}}function eT(e,t,i,a,o,s){let c=o.beginRuleCapturedEOL?0:-1;const d=[];for(let f=o;f;f=f.pop()){const p=f.getRule(e);p instanceof zs&&d.push({rule:p,stack:f})}for(let f=d.pop();f;f=d.pop()){const{ruleScanner:p,findOptions:g}=rT(f.rule,e,f.stack.endRule,i,a===c),y=p.findNextMatchSync(t,a,g);if(y){if(y.ruleId!==jv){o=f.stack.pop();break}y.captureIndices&&y.captureIndices.length&&(s.produce(f.stack,y.captureIndices[0].start),Cl(e,t,i,f.stack,s,f.rule.whileCaptures,y.captureIndices),s.produce(f.stack,y.captureIndices[0].end),c=y.captureIndices[0].end,y.captureIndices[0].end>a&&(a=y.captureIndices[0].end,i=!1))}else{o=f.stack.pop();break}}return{stack:o,linePos:a,anchorPosition:c,isFirstLine:i}}function tT(e,t,i,a,o,s){const c=nT(e,t,i,a,o,s),d=e.getInjections();if(d.length===0)return c;const f=iT(d,e,t,i,a,o,s);if(!f)return c;if(!c)return f;const p=c.captureIndices[0].start,g=f.captureIndices[0].start;return g<p||f.priorityMatch&&g===p?f:c}function nT(e,t,i,a,o,s){const c=o.getRule(e),{ruleScanner:d,findOptions:f}=qv(c,e,o.endRule,i,a===s),p=d.findNextMatchSync(t,a,f);return p?{captureIndices:p.captureIndices,matchedRuleId:p.ruleId}:null}function iT(e,t,i,a,o,s,c){let d=Number.MAX_VALUE,f=null,p,g=0;const y=s.contentNameScopesList.getScopeNames();for(let v=0,b=e.length;v<b;v++){const S=e[v];if(!S.matcher(y))continue;const A=t.getRule(S.ruleId),{ruleScanner:D,findOptions:x}=qv(A,t,null,a,o===c),T=D.findNextMatchSync(i,o,x);if(!T)continue;const k=T.captureIndices[0].start;if(!(k>=d)&&(d=k,f=T.captureIndices,p=T.ruleId,g=S.priority,d===o))break}return f?{priorityMatch:g===-1,captureIndices:f,matchedRuleId:p}:null}function qv(e,t,i,a,o){return{ruleScanner:e.compileAG(t,i,a,o),findOptions:0}}function rT(e,t,i,a,o){return{ruleScanner:e.compileWhileAG(t,i,a,o),findOptions:0}}function Cl(e,t,i,a,o,s,c){if(s.length===0)return;const d=t.content,f=Math.min(s.length,c.length),p=[],g=c[0].end;for(let y=0;y<f;y++){const v=s[y];if(v===null)continue;const b=c[y];if(b.length===0)continue;if(b.start>g)break;for(;p.length>0&&p[p.length-1].endPos<=b.start;)o.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop();if(p.length>0?o.produceFromScopes(p[p.length-1].scopes,b.start):o.produce(a,b.start),v.retokenizeCapturedWithRuleId){const A=v.getName(d,c),D=a.contentNameScopesList.pushAttributed(A,e),x=v.getContentName(d,c),T=D.pushAttributed(x,e),k=a.push(v.retokenizeCapturedWithRuleId,b.start,-1,!1,null,D,T),I=e.createOnigString(d.substring(0,b.end));$v(e,I,i&&b.start===0,b.start,k,o,!1,0),Pv(I);continue}const S=v.getName(d,c);if(S!==null){const D=(p.length>0?p[p.length-1].scopes:a.contentNameScopesList).pushAttributed(S,e);p.push(new aT(D,b.end))}}for(;p.length>0;)o.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}var aT=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function lT(e,t,i,a,o,s,c,d){return new sT(e,t,i,a,o,s,c,d)}function L0(e,t,i,a,o){const s=Ms(t,Us),c=Vv.getCompiledRuleId(i,a,o.repository);for(const d of s)e.push({debugSelector:t,matcher:d.matcher,ruleId:c,grammar:o,priority:d.priority})}function Us(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(oT(t[o],a))return i=o+1,!0;return!1})}function oT(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 sT=class{constructor(e,t,i,a,o,s,c,d){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=d,this._basicScopeAttributesProvider=new WA(i,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=R0(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const f of Object.keys(o)){const p=Ms(f,Us);for(const g of p)this._tokenTypeMatchers.push({matcher:g.matcher,type:o[f]})}}_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)L0(t,c,o[c],this,a);const s=this._grammarRepository.injections(i);s&&s.forEach(c=>{const d=this.getExternalGrammar(c);if(d){const f=d.injectionSelector;f&&L0(t,f,d,this,d)}})}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]=R0(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=Vv.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Lf.NULL){o=!0;const p=this._basicScopeAttributesProvider.getDefaultAttributes(),g=this.themeProvider.getDefaults(),y=ya.set(0,p.languageId,p.tokenType,null,g.fontStyle,g.foregroundId,g.backgroundId),v=this.getRule(this._rootId).getName(null,null);let b;v?b=Ll.createRootAndLookUpScopeName(v,y,this):b=Ll.createRoot("unknown",y),t=new Lf(null,this._rootId,-1,-1,!1,null,b,b)}else o=!1,t.reset();e=e+`
|
|
25
|
+
`;const s=this.createOnigString(e),c=s.content.length,d=new cT(i,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=$v(this,s,o,0,t,d,!0,a);return Pv(s),{lineLength:c,lineTokens:d,ruleStack:f.stack,stoppedEarly:f.stoppedEarly}}};function R0(e,t){return e=AA(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 Ll=class Dn{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=jd.push(o,s.scopeNames),a=new Dn(a,o,s.encodedTokenAttributes);return a}static createRoot(t,i){return new Dn(null,new jd(null,t),i)}static createRootAndLookUpScopeName(t,i,a){const o=a.getMetadataForScope(t),s=new jd(null,t),c=a.themeProvider.themeMatch(s),d=Dn.mergeAttributes(i,o,c);return new Dn(null,s,d)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Dn.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),ya.set(t,i.languageId,i.tokenType,null,o,s,c)}pushAttributed(t,i){if(t===null)return this;if(t.indexOf(" ")===-1)return Dn._pushAttributed(this,t,i);const a=t.split(/ /g);let o=this;for(const s of a)o=Dn._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),d=Dn.mergeAttributes(t.tokenAttributes,o,c);return new Dn(t,s,d)}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}},Lf=class sr{constructor(t,i,a,o,s,c,d,f){this.parent=t,this.ruleId=i,this.beginRuleCapturedEOL=s,this.endRule=c,this.nameScopesList=d,this.contentNameScopesList=f,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new sr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:sr._equals(this,t)}static _equals(t,i){return t===i?!0:this._structuralEquals(t,i)?Ll.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(){sr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,i,a,o,s,c,d){return new sr(this,t,i,a,o,s,c,d)}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 sr(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=Ll.fromExtension(t?.nameScopesList??null,i.nameScopesList);return new sr(t,i.ruleId,i.enterPos??-1,i.anchorPos??-1,i.beginRuleCapturedEOL,i.endRule,a,Ll.fromExtension(a,i.contentNameScopesList))}},uT=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(i=>i==="*"?(this.allowAny=!0,[]):Ms(i,Us).map(a=>a.matcher)),this.unbalancedBracketScopes=t.flatMap(i=>Ms(i,Us).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}},cT=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=ya.set(a,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(a=ya.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}},dT=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,lT(e,s,t,i,a,o,this,this._onigLib))}return this._grammars.get(e)}},fT=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new dT(Os.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,i){this._syncRegistry.setTheme(Os.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 uT(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,i,a,o,s){const c=new jA(this._syncRegistry,t);for(;c.Q.length>0;)c.Q.map(d=>this._loadSingleGrammar(d.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)}},Rf=Lf.NULL;const hT=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],D0={}.hasOwnProperty;function pT(e,t){const i=t||{};function a(o,...s){let c=a.invalid;const d=a.handlers;if(o&&D0.call(o,e)){const f=String(o[e]);c=D0.call(d,f)?d[f]: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 mT=/["&'<>`]/g,gT=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,yT=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,bT=/[|\\{}()[\]^$+*?.]/g,N0=new WeakMap;function vT(e,t){if(e=e.replace(t.subset?_T(t.subset):mT,a),t.subset||t.escapeOnly)return e;return e.replace(gT,i).replace(yT,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 _T(e){let t=N0.get(e);return t||(t=ST(e),N0.set(e,t)),t}function ST(e){const t=[];let i=-1;for(;++i<e.length;)t.push(e[i].replace(bT,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const ET=/[\dA-Fa-f]/;function xT(e,t,i){const a="&#x"+e.toString(16).toUpperCase();return i&&t&&!ET.test(String.fromCharCode(t))?a:a+";"}const wT=/\d/;function CT(e,t,i){const a="&#"+String(e);return i&&t&&!wT.test(String.fromCharCode(t))?a:a+";"}const kT=["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"],Gd={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:"€"},AT=["cent","copy","divide","gt","lt","not","para","times"],Fv={}.hasOwnProperty,Df={};let ds;for(ds in Gd)Fv.call(Gd,ds)&&(Df[Gd[ds]]=ds);const TT=/[^\dA-Za-z]/;function LT(e,t,i,a){const o=String.fromCharCode(e);if(Fv.call(Df,o)){const s=Df[o],c="&"+s;return i&&kT.includes(s)&&!AT.includes(s)&&(!a||t&&t!==61&&TT.test(String.fromCharCode(t)))?c:c+";"}return""}function RT(e,t,i){let a=xT(e,t,i.omitOptionalSemicolons),o;if((i.useNamedReferences||i.useShortestReferences)&&(o=LT(e,t,i.omitOptionalSemicolons,i.attribute)),(i.useShortestReferences||!o)&&i.useShortestReferences){const s=CT(e,t,i.omitOptionalSemicolons);s.length<a.length&&(a=s)}return o&&(!i.useShortestReferences||o.length<a.length)?o:a}function pa(e,t){return vT(e,Object.assign({format:RT},t))}const DT=/^>|^->|<!--|-->|--!>|<!-$/g,NT=[">"],OT=["<",">"];function MT(e,t,i,a){return a.settings.bogusComments?"<?"+pa(e.value,Object.assign({},a.settings.characterReferences,{subset:NT}))+">":"<!--"+e.value.replace(DT,o)+"-->";function o(s){return pa(s,Object.assign({},a.settings.characterReferences,{subset:OT}))}}function IT(e,t,i,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function O0(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 bt=Xv(1),Yv=Xv(-1),zT=[];function Xv(e){return t;function t(i,a,o){const s=i?i.children:zT;let c=(a||0)+e,d=s[c];if(!o)for(;d&&Ys(d);)c+=e,d=s[c];return d}}const UT={}.hasOwnProperty;function Qv(e){return t;function t(i,a,o){return UT.call(e,i.tagName)&&e[i.tagName](i,a,o)}}const uh=Qv({body:PT,caption:$d,colgroup:$d,dd:GT,dt:VT,head:$d,html:HT,li:jT,optgroup:$T,option:qT,p:BT,rp:M0,rt:M0,tbody:YT,td:I0,tfoot:XT,th:I0,thead:FT,tr:QT});function $d(e,t,i){const a=bt(i,t,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&Ys(a.value.charAt(0)))}function HT(e,t,i){const a=bt(i,t);return!a||a.type!=="comment"}function PT(e,t,i){const a=bt(i,t);return!a||a.type!=="comment"}function BT(e,t,i){const a=bt(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 jT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&a.tagName==="li"}function VT(e,t,i){const a=bt(i,t);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function GT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function M0(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function $T(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&a.tagName==="optgroup"}function qT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function FT(e,t,i){const a=bt(i,t);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function YT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function XT(e,t,i){return!bt(i,t)}function QT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&a.tagName==="tr"}function I0(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const ZT=Qv({body:JT,colgroup:e2,head:WT,html:KT,tbody:t2});function KT(e){const t=bt(e,-1);return!t||t.type!=="comment"}function WT(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 JT(e){const t=bt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Ys(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function e2(e,t,i){const a=Yv(i,t),o=bt(e,-1,!0);return i&&a&&a.type==="element"&&a.tagName==="colgroup"&&uh(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function t2(e,t,i){const a=Yv(i,t),o=bt(e,-1);return i&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&uh(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const fs={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 n2(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 d=[];let f;o.space==="html"&&e.tagName==="svg"&&(a.schema=Bl);const p=i2(a,e.properties),g=a.all(o.space==="html"&&e.tagName==="template"?e.content:e);return a.schema=o,g&&(c=!1),(p||!s||!ZT(e,t,i))&&(d.push("<",e.tagName,p?" "+p:""),c&&(o.space==="svg"||a.settings.closeSelfClosing)&&(f=p.charAt(p.length-1),(!a.settings.tightSelfClosing||f==="/"||f&&f!=='"'&&f!=="'")&&d.push(" "),d.push("/")),d.push(">")),d.push(g),!c&&(!s||!uh(e,t,i))&&d.push("</"+e.tagName+">"),d.join("")}function i2(e,t){const i=[];let a=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=r2(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 r2(e,t,i){const a=ev(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let c=e.quote,d;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 f=pa(a.attribute,Object.assign({},e.settings.characterReferences,{subset:fs.name[o][s]}));return i===!0||(i=Array.isArray(i)?(a.commaSeparated?Fb:nv)(i,{padLeft:!e.settings.tightCommaSeparatedLists}):String(i),e.settings.collapseEmptyAttributes&&!i)?f:(e.settings.preferUnquoted&&(d=pa(i,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:fs.unquoted[o][s]}))),d!==i&&(e.settings.quoteSmart&&O0(i,c)>O0(i,e.alternative)&&(c=e.alternative),d=c+pa(i,Object.assign({},e.settings.characterReferences,{subset:(c==="'"?fs.single:fs.double)[o][s],attribute:!0}))+c),f+(d&&"="+d))}const a2=["<","&"];function Zv(e,t,i,a){return i&&i.type==="element"&&(i.tagName==="script"||i.tagName==="style")?e.value:pa(e.value,Object.assign({},a.settings.characterReferences,{subset:a2}))}function l2(e,t,i,a){return a.settings.allowDangerousHtml?e.value:Zv(e,t,i,a)}function o2(e,t,i,a){return a.all(e)}const s2=pT("type",{invalid:u2,unknown:c2,handlers:{comment:MT,doctype:IT,element:n2,raw:l2,root:o2,text:Zv}});function u2(e){throw new Error("Expected node, not `"+e+"`")}function c2(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const d2={},f2={},h2=[];function ma(e,t){const i=t||d2,a=i.quote||'"',o=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:p2,all:m2,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||hT,characterReferences:i.characterReferences||f2,closeSelfClosing:i.closeSelfClosing||!1,closeEmptyElements:i.closeEmptyElements||!1},schema:i.space==="svg"?Bl:tv,quote:a,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function p2(e,t,i){return s2(e,t,i,this)}function m2(e){const t=[],i=e&&e.children||h2;let a=-1;for(;++a<i.length;)t[a]=this.one(i[a],a,e);return t.join("")}function Hs(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 ji(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function g2(e){return Array.isArray(e)?e:[e]}async function Kv(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function ch(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Wv(e){return e==="ansi"||ch(e)}function dh(e){return e==="none"}function Jv(e){return dh(e)}function e1(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 Ks(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 y2(e){const t=Ks(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 d of t){if(s<d.length)break;s-=d.length,c++}return{line:c,character:s}}function a(o,s){let c=0;for(let d=0;d<o;d++)c+=t[d].length;return c+=s,c}return{lines:t,indexToPos:i,posToIndex:a}}function b2(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(),d=c.includes("/")?c.split("/").pop():c;d&&a.add(d)}if(!i)return Array.from(a);const o=i.getBundledLanguages();return Array.from(a).filter(s=>s&&o[s])}const fh="light-dark()",v2=["color","background-color"];function _2(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 S2(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,d)=>c-d);return s.length?_2(o,s):o})):e}function E2(e,t,i,a,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},c=t.map(g=>Ps(e.variants[g])),d=new Set(c.flatMap(g=>Object.keys(g))),f={},p=(g,y)=>{const v=y==="color"?"":y==="background-color"?"-bg":`-${y}`;return i+t[g]+(y==="color"?"":v)};return c.forEach((g,y)=>{for(const v of d){const b=g[v]||"inherit";if(y===0&&a&&v2.includes(v))if(a===fh&&c.length>1){const S=t.findIndex(T=>T==="light"),A=t.findIndex(T=>T==="dark");if(S===-1||A===-1)throw new pt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const D=c[S][v]||"inherit",x=c[A][v]||"inherit";f[v]=`light-dark(${D}, ${x})`,o==="css-vars"&&(f[p(y,v)]=b)}else f[v]=b;else o==="css-vars"&&(f[p(y,v)]=b)}}),s.htmlStyle=f,s}function Ps(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Nt.Italic&&(t["font-style"]="italic"),e.fontStyle&Nt.Bold&&(t["font-weight"]="bold");const i=[];e.fontStyle&Nt.Underline&&i.push("underline"),e.fontStyle&Nt.Strikethrough&&i.push("line-through"),i.length&&(t["text-decoration"]=i.join(" "))}return t}function Nf(e){return typeof e=="string"?e:Object.entries(e).map(([t,i])=>`${t}:${i}`).join(";")}const t1=new WeakMap;function Ws(e,t){t1.set(e,t)}function Il(e){return t1.get(e)}class Sa{_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 Sa(Object.fromEntries(g2(i).map(a=>[a,Rf])),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 x2(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function x2(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 w2(e,t){if(!(e instanceof Sa))throw new pt("Invalid grammar state");return e.getInternalStack(t)}function C2(){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 pt(`Invalid decoration offset: ${c}. Code length: ${i.source.length}`);return{...o.indexToPos(c),offset:c}}else{const d=o.lines[c.line];if(d===void 0)throw new pt(`Invalid decoration position ${JSON.stringify(c)}. Lines length: ${o.lines.length}`);let f=c.character;if(f<0&&(f=d.length+f),f<0||f>d.length)throw new pt(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${d.length}`);return{...c,character:f,offset:o.posToIndex(c.line,f)}}};const o=y2(i.source),s=(i.options.decorations||[]).map(c=>({...c,start:a(c.start),end:a(c.end)}));k2(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 S2(i,o)},code(i){if(!this.options.decorations?.length)return;const a=t(this),o=Array.from(i.children).filter(g=>g.type==="element"&&g.tagName==="span");if(o.length!==a.converter.lines.length)throw new pt(`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(g,y,v,b){const S=o[g];let A="",D=-1,x=-1;if(y===0&&(D=0),v===0&&(x=0),v===Number.POSITIVE_INFINITY&&(x=S.children.length),D===-1||x===-1)for(let k=0;k<S.children.length;k++)A+=n1(S.children[k]),D===-1&&A.length===y&&(D=k+1),x===-1&&A.length===v&&(x=k+1);if(D===-1)throw new pt(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(x===-1)throw new pt(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const T=S.children.slice(D,x);if(!b.alwaysWrap&&T.length===S.children.length)d(S,b,"line");else if(!b.alwaysWrap&&T.length===1&&T[0].type==="element")d(T[0],b,"token");else{const k={type:"element",tagName:"span",properties:{},children:T};d(k,b,"wrapper"),S.children.splice(D,T.length,k)}}function c(g,y){o[g]=d(o[g],y,"line")}function d(g,y,v){const b=y.properties||{},S=y.transform||(A=>A);return g.tagName=y.tagName||"span",g.properties={...g.properties,...b,class:g.properties.class},y.properties?.class&&e1(g,y.properties.class),g=S(g,v)||g,g}const f=[],p=a.decorations.sort((g,y)=>y.start.offset-g.start.offset||g.end.offset-y.end.offset);for(const g of p){const{start:y,end:v}=g;if(y.line===v.line)s(y.line,y.character,v.character,g);else if(y.line<v.line){s(y.line,y.character,Number.POSITIVE_INFINITY,g);for(let b=y.line+1;b<v.line;b++)f.unshift(()=>c(b,g));s(v.line,0,v.character,g)}}f.forEach(g=>g())}}}function k2(e){for(let t=0;t<e.length;t++){const i=e[t];if(i.start.offset>i.end.offset)throw new pt(`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,d=o.start.offset<=i.start.offset&&i.start.offset<o.end.offset,f=o.start.offset<i.end.offset&&i.end.offset<=o.end.offset;if(s||c||d||f){if(s&&c||d&&f||d&&i.start.offset===i.end.offset||c&&o.start.offset===o.end.offset)continue;throw new pt(`Decorations ${JSON.stringify(i.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function n1(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(n1).join(""):""}const A2=[C2()];function Bs(e){const t=T2(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...A2]}function T2(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 cr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],qd={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function L2(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 z0(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 R2(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)qd[a]&&t.push({type:"setDecoration",value:qd[a]});else if(a<=29){const o=qd[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:cr[a-30]}});else if(a===38){const o=z0(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:cr[a-40]}});else if(a===48){const o=z0(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:cr[a-90+8]}}):a>=100&&a<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:cr[a-100+8]}})}return t}function D2(){let e=null,t=null,i=new Set;return{parse(a){const o=[];let s=0;do{const c=L2(a,s),d=c.sequence?a.substring(s,c.startPosition):a.substring(s);if(d.length>0&&o.push({value:d,foreground:e,background:t,decorations:new Set(i)}),c.sequence){const f=R2(c.sequence);for(const p of f)p.type==="resetAll"?(e=null,t=null,i.clear()):p.type==="resetForegroundColor"?e=null:p.type==="resetBackgroundColor"?t=null:p.type==="resetDecoration"&&i.delete(p.value);for(const p of f)p.type==="setForegroundColor"?e=p.value:p.type==="setBackgroundColor"?t=p.value:p.type==="setDecoration"&&i.add(p.value)}s=c.position}while(s<a.length);return o}}}var N2={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 O2(e=N2){function t(d){return e[d]}function i(d){return`#${d.map(f=>Math.max(0,Math.min(f,255)).toString(16).padStart(2,"0")).join("")}`}let a;function o(){if(a)return a;a=[];for(let p=0;p<cr.length;p++)a.push(t(cr[p]));let d=[0,95,135,175,215,255];for(let p=0;p<6;p++)for(let g=0;g<6;g++)for(let y=0;y<6;y++)a.push(i([d[p],d[g],d[y]]));let f=8;for(let p=0;p<24;p++,f+=10)a.push(i([f,f,f]));return a}function s(d){return o()[d]}function c(d){switch(d.type){case"named":return t(d.name);case"rgb":return i(d.rgb);case"table":return s(d.index)}}return{value:c}}const M2={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 I2(e,t,i){const a=Hs(e,i),o=Ks(t),s=Object.fromEntries(cr.map(f=>{const p=`terminal.ansi${f[0].toUpperCase()}${f.substring(1)}`,g=e.colors?.[p];return[f,g||M2[f]]})),c=O2(s),d=D2();return o.map(f=>d.parse(f[0]).map(p=>{let g,y;p.decorations.has("reverse")?(g=p.background?c.value(p.background):e.bg,y=p.foreground?c.value(p.foreground):e.fg):(g=p.foreground?c.value(p.foreground):e.fg,y=p.background?c.value(p.background):void 0),g=ji(g,a),y=ji(y,a),p.decorations.has("dim")&&(g=z2(g));let v=Nt.None;return p.decorations.has("bold")&&(v|=Nt.Bold),p.decorations.has("italic")&&(v|=Nt.Italic),p.decorations.has("underline")&&(v|=Nt.Underline),p.decorations.has("strikethrough")&&(v|=Nt.Strikethrough),{content:p.value,offset:f[1],color:g,bgColor:y,fontStyle:v}}))}function z2(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],d=a[3],f=Math.round(Number.parseInt(`${d}${d}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${s}${s}${c}${c}${f}`}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 hh(e,t,i={}){const{theme:a=e.getLoadedThemes()[0]}=i,o=e.resolveLangAlias(i.lang||"text");if(ch(o)||dh(a))return Ks(t).map(f=>[{content:f[0],offset:f[1]}]);const{theme:s,colorMap:c}=e.setTheme(a);if(o==="ansi")return I2(s,t,i);const d=e.getLanguage(i.lang||"text");if(i.grammarState){if(i.grammarState.lang!==d.name)throw new pt(`Grammar state language "${i.grammarState.lang}" does not match highlight language "${d.name}"`);if(!i.grammarState.themes.includes(s.name))throw new pt(`Grammar state themes "${i.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return H2(t,d,s,c,i)}function U2(...e){if(e.length===2)return Il(e[1]);const[t,i,a={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=a;if(ch(o)||dh(s))throw new pt("Plain language does not have grammar state");if(o==="ansi")throw new pt("ANSI language does not have grammar state");const{theme:c,colorMap:d}=t.setTheme(s),f=t.getLanguage(o);return new Sa(ph(i,f,c,d,a).stateStack,f.name,c.name)}function H2(e,t,i,a,o){const s=ph(e,t,i,a,o),c=new Sa(s.stateStack,t.name,i.name);return Ws(s.tokens,c),s.tokens}function ph(e,t,i,a,o){const s=Hs(i,o),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:d=500}=o,f=Ks(e);let p=o.grammarState?w2(o.grammarState,i.name)??Rf:o.grammarContextCode!=null?ph(o.grammarContextCode,t,i,a,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Rf,g=[];const y=[];for(let v=0,b=f.length;v<b;v++){const[S,A]=f[v];if(S===""){g=[],y.push([]);continue}if(c>0&&S.length>=c){g=[],y.push([{content:S,offset:A,color:"",fontStyle:0}]);continue}let D,x,T;o.includeExplanation&&(D=t.tokenizeLine(S,p,d),x=D.tokens,T=0);const k=t.tokenizeLine2(S,p,d),I=k.tokens.length/2;for(let z=0;z<I;z++){const R=k.tokens[2*z],$=z+1<I?k.tokens[2*z+2]:S.length;if(R===$)continue;const G=k.tokens[2*z+1],Y=ji(a[ya.getForeground(G)],s),le=ya.getFontStyle(G),te={content:S.substring(R,$),offset:A+R,color:Y,fontStyle:le};if(o.includeExplanation){const F=[];if(o.includeExplanation!=="scopeName")for(const ie of i.settings){let ne;switch(typeof ie.scope){case"string":ne=ie.scope.split(/,/).map(P=>P.trim());break;case"object":ne=ie.scope;break;default:continue}F.push({settings:ie,selectors:ne.map(P=>P.split(/ /))})}te.explanation=[];let ce=0;for(;R+ce<$;){const ie=x[T],ne=S.substring(ie.startIndex,ie.endIndex);ce+=ne.length,te.explanation.push({content:ne,scopes:o.includeExplanation==="scopeName"?P2(ie.scopes):B2(F,ie.scopes)}),T+=1}}g.push(te)}y.push(g),g=[],p=k.ruleStack}return{tokens:y,stateStack:p}}function P2(e){return e.map(t=>({scopeName:t}))}function B2(e,t){const i=[];for(let a=0,o=t.length;a<o;a++){const s=t[a];i[a]={scopeName:s,themeMatches:V2(e,s,t.slice(0,a))}}return i}function U0(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function j2(e,t,i){if(!U0(e[e.length-1],t))return!1;let a=e.length-2,o=i.length-1;for(;a>=0&&o>=0;)U0(e[a],i[o])&&(a-=1),o-=1;return a===-1}function V2(e,t,i){const a=[];for(const{selectors:o,settings:s}of e)for(const c of o)if(j2(c,t,i)){a.push(s);break}return a}function i1(e,t,i){const a=Object.entries(i.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})),o=a.map(f=>{const p=hh(e,t,{...i,theme:f.theme}),g=Il(p),y=typeof f.theme=="string"?f.theme:f.theme.name;return{tokens:p,state:g,theme:y}}),s=G2(...o.map(f=>f.tokens)),c=s[0].map((f,p)=>f.map((g,y)=>{const v={content:g.content,variants:{},offset:g.offset};return"includeExplanation"in i&&i.includeExplanation&&(v.explanation=g.explanation),s.forEach((b,S)=>{const{content:A,explanation:D,offset:x,...T}=b[p][y];v.variants[a[S].color]=T}),v})),d=o[0].state?new Sa(Object.fromEntries(o.map(f=>[f.theme,f.state?.getInternalStack(f.theme)])),o[0].state.lang):void 0;return d&&Ws(c,d),c}function G2(...e){const t=e.map(()=>[]),i=e.length;for(let a=0;a<e[0].length;a++){const o=e.map(f=>f[a]),s=t.map(()=>[]);t.forEach((f,p)=>f.push(s[p]));const c=o.map(()=>0),d=o.map(f=>f[0]);for(;d.every(f=>f);){const f=Math.min(...d.map(p=>p.content.length));for(let p=0;p<i;p++){const g=d[p];g.content.length===f?(s[p].push(g),c[p]+=1,d[p]=o[p][c[p]]):(s[p].push({...g,content:g.content.slice(0,f)}),d[p]={...g,content:g.content.slice(f),offset:g.offset+f})}}}return t}function js(e,t,i){let a,o,s,c,d,f;if("themes"in i){const{defaultColor:p="light",cssVariablePrefix:g="--shiki-",colorsRendering:y="css-vars"}=i,v=Object.entries(i.themes).filter(x=>x[1]).map(x=>({color:x[0],theme:x[1]})).sort((x,T)=>x.color===p?-1:T.color===p?1:0);if(v.length===0)throw new pt("`themes` option must not be empty");const b=i1(e,t,i);if(f=Il(b),p&&fh!==p&&!v.find(x=>x.color===p))throw new pt(`\`themes\` option must contain the defaultColor key \`${p}\``);const S=v.map(x=>e.getTheme(x.theme)),A=v.map(x=>x.color);s=b.map(x=>x.map(T=>E2(T,A,g,p,y))),f&&Ws(s,f);const D=v.map(x=>Hs(x.theme,i));o=H0(v,S,D,g,p,"fg",y),a=H0(v,S,D,g,p,"bg",y),c=`shiki-themes ${S.map(x=>x.name).join(" ")}`,d=p?void 0:[o,a].join(";")}else if("theme"in i){const p=Hs(i.theme,i);s=hh(e,t,i);const g=e.getTheme(i.theme);a=ji(g.bg,p),o=ji(g.fg,p),c=g.name,f=Il(s)}else throw new pt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:a,themeName:c,rootStyle:d,grammarState:f}}function H0(e,t,i,a,o,s,c){return e.map((d,f)=>{const p=ji(t[f][s],i[f])||"inherit",g=`${a+d.color}${s==="bg"?"-bg":""}:${p}`;if(f===0&&o){if(o===fh&&e.length>1){const y=e.findIndex(A=>A.color==="light"),v=e.findIndex(A=>A.color==="dark");if(y===-1||v===-1)throw new pt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=ji(t[y][s],i[y])||"inherit",S=ji(t[v][s],i[v])||"inherit";return`light-dark(${b}, ${S});${g}`}return p}return c==="css-vars"?g:null}).filter(d=>!!d).join(";")}function Vs(e,t,i,a={meta:{},options:i,codeToHast:(o,s)=>Vs(e,o,s),codeToTokens:(o,s)=>js(e,o,s)}){let o=t;for(const S of Bs(i))o=S.preprocess?.call(a,o,i)||o;let{tokens:s,fg:c,bg:d,themeName:f,rootStyle:p,grammarState:g}=js(e,o,i);const{mergeWhitespaces:y=!0,mergeSameStyleTokens:v=!1}=i;y===!0?s=q2(s):y==="never"&&(s=F2(s)),v&&(s=Y2(s));const b={...a,get source(){return o}};for(const S of Bs(i))s=S.tokens?.call(b,s)||s;return $2(s,{...i,fg:c,bg:d,themeName:f,rootStyle:i.rootStyle===!1?!1:i.rootStyle??p},b,g)}function $2(e,t,i,a=Il(e)){const o=Bs(t),s=[],c={type:"root",children:[]},{structure:d="classic",tabindex:f="0"}=t,p={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?p.style=t.rootStyle:p.style=`background-color:${t.bg};color:${t.fg}`),f!==!1&&f!=null&&(p.tabindex=f.toString());for(const[A,D]of Object.entries(t.meta||{}))A.startsWith("_")||(p[A]=D);let g={type:"element",tagName:"pre",properties:p,children:[],data:t.data},y={type:"element",tagName:"code",properties:{},children:s};const v=[],b={...i,structure:d,addClassToHast:e1,get source(){return i.source},get tokens(){return e},get options(){return t},get root(){return c},get pre(){return g},get code(){return y},get lines(){return v}};if(e.forEach((A,D)=>{D&&(d==="inline"?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):d==="classic"&&s.push({type:"text",value:`
|
|
34
|
+
`}));let x={type:"element",tagName:"span",properties:{class:"line"},children:[]},T=0;for(const k of A){let I={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const z=Nf(k.htmlStyle||Ps(k));z&&(I.properties.style=z);for(const R of o)I=R?.span?.call(b,I,D+1,T,x,k)||I;d==="inline"?c.children.push(I):d==="classic"&&x.children.push(I),T+=k.content.length}if(d==="classic"){for(const k of o)x=k?.line?.call(b,x,D+1)||x;v.push(x),s.push(x)}else d==="inline"&&v.push(x)}),d==="classic"){for(const A of o)y=A?.code?.call(b,y)||y;g.children.push(y);for(const A of o)g=A?.pre?.call(b,g)||g;c.children.push(g)}else if(d==="inline"){const A=[];let D={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of c.children)k.type==="element"&&k.tagName==="br"?(A.push(D),D={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&D.children.push(k);A.push(D);let T={type:"element",tagName:"code",properties:{},children:A};for(const k of o)T=k?.code?.call(b,T)||T;c.children=[];for(let k=0;k<T.children.length;k++){k>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const I=T.children[k];I.type==="element"&&c.children.push(...I.children)}}let S=c;for(const A of o)S=A?.root?.call(b,S)||S;return a&&Ws(S,a),S}function q2(e){return e.map(t=>{const i=[];let a="",o;return t.forEach((s,c)=>{const f=!(s.fontStyle&&(s.fontStyle&Nt.Underline||s.fontStyle&Nt.Strikethrough));f&&s.content.match(/^\s+$/)&&t[c+1]?(o===void 0&&(o=s.offset),a+=s.content):a?(f?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 F2(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 d=[{...i,offset:i.offset+o.length,content:s}];return o&&d.unshift({content:o,offset:i.offset}),c&&d.push({content:c,offset:i.offset+o.length+s.length}),d}))}function Y2(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=Nf(o.htmlStyle||Ps(o)),c=Nf(a.htmlStyle||Ps(a)),d=o.fontStyle&&(o.fontStyle&Nt.Underline||o.fontStyle&Nt.Strikethrough),f=a.fontStyle&&(a.fontStyle&Nt.Underline||a.fontStyle&Nt.Strikethrough);!d&&!f&&s===c?o.content+=a.content:i.push({...a})}return i})}const X2=ma;function Q2(e,t,i){const a={meta:{},options:i,codeToHast:(s,c)=>Vs(e,s,c),codeToTokens:(s,c)=>js(e,s,c)};let o=X2(Vs(e,t,i,a));for(const s of Bs(i))o=s.postprocess?.call(a,o,i)||o;return o}const P0={light:"#333333",dark:"#bbbbbb"},B0={light:"#fffffe",dark:"#1e1e1e"},j0="__shiki_resolved";function Js(e){if(e?.[j0])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 d=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;d?.settings?.foreground&&(a=d.settings.foreground),d?.settings?.background&&(i=d.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"?P0.light:P0.dark),i||(i=t.type==="light"?B0.light:B0.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(d){if(s.has(d))return s.get(d);o+=1;const f=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${f}`]?c(d):(s.set(d,f),f)}t.settings=t.settings.map(d=>{const f=d.settings?.foreground&&!d.settings.foreground.startsWith("#"),p=d.settings?.background&&!d.settings.background.startsWith("#");if(!f&&!p)return d;const g={...d,settings:{...d.settings}};if(f){const y=c(d.settings.foreground);t.colorReplacements[y]=d.settings.foreground,g.settings.foreground=y}if(p){const y=c(d.settings.background);t.colorReplacements[y]=d.settings.background,g.settings.background=y}return g});for(const d of Object.keys(t.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!t.colors[d]?.startsWith("#")){const f=c(t.colors[d]);t.colorReplacements[f]=t.colors[d],t.colors[d]=f}return Object.defineProperty(t,j0,{enumerable:!1,writable:!1,value:!0}),t}async function r1(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Wv(t)).map(async t=>await Kv(t).then(i=>Array.isArray(i)?i:[i])))).flat()))}async function a1(e){return(await Promise.all(e.map(async i=>Jv(i)?null:Js(await Kv(i))))).filter(i=>!!i)}let Z2=3;function K2(e,t=3){t>Z2||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let da=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function l1(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 da(`Circular alias \`${Array.from(i).join(" -> ")} -> ${e}\``);i.add(e)}}return e}class W2 extends fT{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=Js(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=Os.createFromRawTheme(t),this._textmateThemeCache.set(t,i)),this._syncRegistry.setTheme(i)}getGrammar(t){return t=l1(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(f=>a.map(([p])=>p).includes(f)):!1).filter(s=>!a.includes(s));throw new da(`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 J2{_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 xl=0;function eL(e){xl+=1,e.warnings!==!1&&xl>=10&&xl%10===0&&console.warn(`[Shiki] ${xl} 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 da("`engine` option is required for synchronous mode");const i=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map(Js),o=new J2(e.engine,i),s=new W2(o,a,i,e.langAlias);let c;function d(k){return l1(k,e.langAlias)}function f(k){x();const I=s.getGrammar(typeof k=="string"?k:k.name);if(!I)throw new da(`Language \`${k}\` not found, you may need to load it first`);return I}function p(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};x();const I=s.getTheme(k);if(!I)throw new da(`Theme \`${k}\` not found, you may need to load it first`);return I}function g(k){x();const I=p(k);c!==k&&(s.setTheme(I),c=k);const z=s.getColorMap();return{theme:I,colorMap:z}}function y(){return x(),s.getLoadedThemes()}function v(){return x(),s.getLoadedLanguages()}function b(...k){x(),s.loadLanguages(k.flat(1))}async function S(...k){return b(await r1(k))}function A(...k){x();for(const I of k.flat(1))s.loadTheme(I)}async function D(...k){return x(),A(await a1(k))}function x(){if(t)throw new da("Shiki instance has been disposed")}function T(){t||(t=!0,s.dispose(),xl-=1)}return{setTheme:g,getTheme:p,getLanguage:f,getLoadedThemes:y,getLoadedLanguages:v,resolveLangAlias:d,loadLanguage:S,loadLanguageSync:b,loadTheme:D,loadThemeSync:A,dispose:T,[Symbol.dispose]:T}}async function tL(e){e.engine||K2("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,i,a]=await Promise.all([a1(e.themes||[]),r1(e.langs||[]),e.engine]);return eL({...e,themes:t,langs:i,engine:a})}async function nL(e){const t=await tL(e);return{getLastGrammarState:(...i)=>U2(t,...i),codeToTokensBase:(i,a)=>hh(t,i,a),codeToTokensWithThemes:(i,a)=>i1(t,i,a),codeToTokens:(i,a)=>js(t,i,a),codeToHast:(i,a)=>Vs(t,i,a),codeToHtml:(i,a)=>Q2(t,i,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function iL(e){const t=e.langs,i=e.themes,a=e.engine;async function o(s){function c(y){if(typeof y=="string"){if(y=s.langAlias?.[y]||y,Wv(y))return[];const v=t[y];if(!v)throw new pt(`Language \`${y}\` is not included in this bundle. You may want to load it from external source.`);return v}return y}function d(y){if(Jv(y))return"none";if(typeof y=="string"){const v=i[y];if(!v)throw new pt(`Theme \`${y}\` is not included in this bundle. You may want to load it from external source.`);return v}return y}const f=(s.themes??[]).map(y=>d(y)),p=(s.langs??[]).map(y=>c(y)),g=await nL({engine:s.engine??a(),...s,themes:f,langs:p});return{...g,loadLanguage(...y){return g.loadLanguage(...y.map(c))},loadTheme(...y){return g.loadTheme(...y.map(d))},getBundledLanguages(){return t},getBundledThemes(){return i}}}return o}function rL(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 aL(e,t){const i=rL(e);async function a(o,s){const c=await i({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),d=await t?.guessEmbeddedLanguages?.(o,s.lang,c);return d&&await c.loadLanguage(...d),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 o1=[{id:"abap",name:"ABAP",import:(()=>w(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>w(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>w(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>w(()=>import("./angular-html-DMxchsRu.js").then(e=>e.a),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>w(()=>import("./angular-ts-DzOHUlBM.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>w(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>w(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>w(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>w(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>w(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>w(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>w(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>w(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>w(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>w(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>w(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>w(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>w(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>w(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>w(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>w(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>w(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>w(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>w(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>w(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>w(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>w(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>w(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>w(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>w(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>w(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>w(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>w(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>w(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>w(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>w(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>w(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>w(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>w(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>w(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>w(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>w(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>w(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>w(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>w(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>w(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>w(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>w(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>w(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>w(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>w(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>w(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>w(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>w(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>w(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>w(()=>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:(()=>w(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>w(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>w(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>w(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>w(()=>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:(()=>w(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>w(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>w(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>w(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>w(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>w(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>w(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>w(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>w(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>w(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>w(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>w(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>w(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>w(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>w(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>w(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>w(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>w(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>w(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>w(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>w(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>w(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>w(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>w(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>w(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>w(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>w(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>w(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>w(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>w(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>w(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>w(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>w(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>w(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>w(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>w(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>w(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>w(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>w(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>w(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>w(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>w(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>w(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>w(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>w(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>w(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>w(()=>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:(()=>w(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>w(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>w(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>w(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>w(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>w(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>w(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>w(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>w(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>w(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>w(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>w(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>w(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>w(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>w(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>w(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>w(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>w(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>w(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>w(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>w(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>w(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>w(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>w(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>w(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>w(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>w(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>w(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>w(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>w(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>w(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>w(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>w(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>w(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>w(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>w(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>w(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>w(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>w(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>w(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>w(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>w(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>w(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>w(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>w(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>w(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>w(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>w(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>w(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>w(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>w(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>w(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>w(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>w(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>w(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>w(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>w(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>w(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>w(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>w(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>w(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>w(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>w(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>w(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>w(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>w(()=>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:(()=>w(()=>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:(()=>w(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>w(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>w(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>w(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>w(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>w(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>w(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>w(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>w(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>w(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>w(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>w(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>w(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>w(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>w(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>w(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>w(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>w(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>w(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>w(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>w(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>w(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>w(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>w(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>w(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>w(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>w(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>w(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>w(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>w(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>w(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>w(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>w(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>w(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>w(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>w(()=>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:(()=>w(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>w(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>w(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>w(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>w(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>w(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>w(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>w(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>w(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>w(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>w(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>w(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>w(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>w(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>w(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>w(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>w(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>w(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>w(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>w(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>w(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>w(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>w(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>w(()=>import("./zig-VOosw3JB.js"),[]))}],lL=Object.fromEntries(o1.map(e=>[e.id,e.import])),oL=Object.fromEntries(o1.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Of={...lL,...oL},sL=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>w(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>w(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>w(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>w(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>w(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>w(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>w(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>w(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>w(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>w(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>w(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>w(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>w(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>w(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>w(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>w(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>w(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>w(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>w(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>w(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>w(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>w(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>w(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>w(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>w(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>w(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>w(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>w(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>w(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>w(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>w(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>w(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>w(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>w(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>w(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>w(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>w(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>w(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>w(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>w(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>w(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>w(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>w(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>w(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>w(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>w(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>w(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>w(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>w(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>w(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>w(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>w(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>w(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>w(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>w(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>w(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>w(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>w(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>w(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>w(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>w(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>w(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>w(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>w(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>w(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],s1=Object.fromEntries(sL.map(e=>[e.id,e.import]));class mh extends Error{constructor(t){super(t),this.name="ShikiError"}}function uL(){return 2147483648}function cL(){return typeof performance<"u"?performance.now():Date.now()}const dL=(e,t)=>e+(t-e%t)%t;async function fL(e){let t,i;const a={};function o(b){i=b,a.HEAPU8=new Uint8Array(b),a.HEAPU32=new Uint32Array(b)}function s(b,S,A){a.HEAPU8.copyWithin(b,S,S+A)}function c(b){try{return t.grow(b-i.byteLength+65535>>>16),o(t.buffer),1}catch{}}function d(b){const S=a.HEAPU8.length;b=b>>>0;const A=uL();if(b>A)return!1;for(let D=1;D<=4;D*=2){let x=S*(1+.2/D);x=Math.min(x,b+100663296);const T=Math.min(A,dL(Math.max(b,x),65536));if(c(T))return!0}return!1}const f=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function p(b,S,A=1024){const D=S+A;let x=S;for(;b[x]&&!(x>=D);)++x;if(x-S>16&&b.buffer&&f)return f.decode(b.subarray(S,x));let T="";for(;S<x;){let k=b[S++];if(!(k&128)){T+=String.fromCharCode(k);continue}const I=b[S++]&63;if((k&224)===192){T+=String.fromCharCode((k&31)<<6|I);continue}const z=b[S++]&63;if((k&240)===224?k=(k&15)<<12|I<<6|z:k=(k&7)<<18|I<<12|z<<6|b[S++]&63,k<65536)T+=String.fromCharCode(k);else{const R=k-65536;T+=String.fromCharCode(55296|R>>10,56320|R&1023)}}return T}function g(b,S){return b?p(a.HEAPU8,b,S):""}const y={emscripten_get_now:cL,emscripten_memcpy_big:s,emscripten_resize_heap:d,fd_write:()=>0};async function v(){const S=await e({env:y,wasi_snapshot_preview1:y});t=S.memory,o(t.buffer),Object.assign(a,S),a.UTF8ToString=g}return await v(),a}var hL=Object.defineProperty,pL=(e,t,i)=>t in e?hL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,gt=(e,t,i)=>pL(e,typeof t!="symbol"?t+"":t,i);let St=null;function mL(e){throw new mh(e.UTF8ToString(e.getLastOnigError()))}class eu{constructor(t){gt(this,"utf16Length"),gt(this,"utf8Length"),gt(this,"utf16Value"),gt(this,"utf8Value"),gt(this,"utf16OffsetToUtf8"),gt(this,"utf8OffsetToUtf16");const i=t.length,a=eu._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 d=new Uint8Array(a);let f=0;for(let p=0;p<i;p++){const g=t.charCodeAt(p);let y=g,v=!1;if(g>=55296&&g<=56319&&p+1<i){const b=t.charCodeAt(p+1);b>=56320&&b<=57343&&(y=(g-55296<<10)+65536|b-56320,v=!0)}o&&(s[p]=f,v&&(s[p+1]=f),y<=127?c[f+0]=p:y<=2047?(c[f+0]=p,c[f+1]=p):y<=65535?(c[f+0]=p,c[f+1]=p,c[f+2]=p):(c[f+0]=p,c[f+1]=p,c[f+2]=p,c[f+3]=p)),y<=127?d[f++]=y:y<=2047?(d[f++]=192|(y&1984)>>>6,d[f++]=128|(y&63)>>>0):y<=65535?(d[f++]=224|(y&61440)>>>12,d[f++]=128|(y&4032)>>>6,d[f++]=128|(y&63)>>>0):(d[f++]=240|(y&1835008)>>>18,d[f++]=128|(y&258048)>>>12,d[f++]=128|(y&4032)>>>6,d[f++]=128|(y&63)>>>0),v&&p++}this.utf16Length=i,this.utf8Length=a,this.utf16Value=t,this.utf8Value=d,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,d=!1;if(s>=55296&&s<=56319&&a+1<o){const f=t.charCodeAt(a+1);f>=56320&&f<=57343&&(c=(s-55296<<10)+65536|f-56320,d=!0)}c<=127?i+=1:c<=2047?i+=2:c<=65535?i+=3:i+=4,d&&a++}return i}createString(t){const i=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,i),i}}const tu=class Nn{constructor(t){if(gt(this,"id",++Nn.LAST_ID),gt(this,"_onigBinding"),gt(this,"content"),gt(this,"utf16Length"),gt(this,"utf8Length"),gt(this,"utf16OffsetToUtf8"),gt(this,"utf8OffsetToUtf16"),gt(this,"ptr"),!St)throw new mh("Must invoke loadWasm first.");this._onigBinding=St,this.content=t;const i=new eu(t);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!Nn._sharedPtrInUse?(Nn._sharedPtr||(Nn._sharedPtr=St.omalloc(1e4)),Nn._sharedPtrInUse=!0,St.HEAPU8.set(i.utf8Value,Nn._sharedPtr),this.ptr=Nn._sharedPtr):this.ptr=i.createString(St)}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===Nn._sharedPtr?Nn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};gt(tu,"LAST_ID",0);gt(tu,"_sharedPtr",0);gt(tu,"_sharedPtrInUse",!1);let u1=tu;class gL{constructor(t){if(gt(this,"_onigBinding"),gt(this,"_ptr"),!St)throw new mh("Must invoke loadWasm first.");const i=[],a=[];for(let d=0,f=t.length;d<f;d++){const p=new eu(t[d]);i[d]=p.createString(St),a[d]=p.utf8Length}const o=St.omalloc(4*t.length);St.HEAPU32.set(i,o/4);const s=St.omalloc(4*t.length);St.HEAPU32.set(a,s/4);const c=St.createOnigScanner(o,s,t.length);for(let d=0,f=t.length;d<f;d++)St.ofree(i[d]);St.ofree(s),St.ofree(o),c===0&&mL(St),this._onigBinding=St,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 u1(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 d=s.HEAPU32;let f=c/4;const p=d[f++],g=d[f++],y=[];for(let v=0;v<g;v++){const b=t.convertUtf8OffsetToUtf16(d[f++]),S=t.convertUtf8OffsetToUtf16(d[f++]);y[v]={start:b,end:S,length:S-b}}return{index:p,captureIndices:y}}}function yL(e){return typeof e.instantiator=="function"}function bL(e){return typeof e.default=="function"}function vL(e){return typeof e.data<"u"}function _L(e){return typeof Response<"u"&&e instanceof Response}function SL(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 hs;function EL(e){if(hs)return hs;async function t(){St=await fL(async i=>{let a=e;return a=await a,typeof a=="function"&&(a=await a(i)),typeof a=="function"&&(a=await a(i)),yL(a)?a=await a.instantiator(i):bL(a)?a=await a.default(i):(vL(a)&&(a=a.data),_L(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await xL(a)(i):a=await wL(a)(i):SL(a)?a=await Fd(a)(i):a instanceof WebAssembly.Module?a=await Fd(a)(i):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await Fd(a.default)(i))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return hs=t(),hs}function Fd(e){return t=>WebAssembly.instantiate(e,t)}function xL(e){return t=>WebAssembly.instantiateStreaming(e,t)}function wL(e){return async t=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,t)}}async function c1(e){return e&&await EL(e),{createScanner(t){return new gL(t.map(i=>typeof i=="string"?i:i.source))},createString(t){return new u1(t)}}}const d1=iL({langs:Of,themes:s1,engine:()=>c1(w(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:V0}=aL(d1,{guessEmbeddedLanguages:b2});function Ea(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function CL(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"]),Et=String.raw;function xa(e,t){if(e==null)throw new Error(t??"Value expected");return e}const f1=Et`\[\^?`,h1=`c.? | C(?:-.?)?|${Et`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Et`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Et`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Et`o\{[^\}]*\}?`}|${Et`\d{1,3}`}`,yh=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ps=new RegExp(Et`
|
|
35
|
+
\\ (?:
|
|
36
|
+
${h1}
|
|
37
|
+
| [gk]<[^>]*>?
|
|
38
|
+
| [gk]'[^']*'?
|
|
39
|
+
| .
|
|
40
|
+
)
|
|
41
|
+
| \( (?:
|
|
42
|
+
\? (?:
|
|
43
|
+
[:=!>({]
|
|
44
|
+
| <[=!]
|
|
45
|
+
| <[^>]*>
|
|
46
|
+
| '[^']*'
|
|
47
|
+
| ~\|?
|
|
48
|
+
| #(?:[^)\\]|\\.?)*
|
|
49
|
+
| [^:)]*[:)]
|
|
50
|
+
)?
|
|
51
|
+
| \*[^\)]*\)?
|
|
52
|
+
)?
|
|
53
|
+
| (?:${yh.source})+
|
|
54
|
+
| ${f1}
|
|
55
|
+
| .
|
|
56
|
+
`.replace(/\s+/g,""),"gsu"),Yd=new RegExp(Et`
|
|
57
|
+
\\ (?:
|
|
58
|
+
${h1}
|
|
59
|
+
| .
|
|
60
|
+
)
|
|
61
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
62
|
+
| ${f1}
|
|
63
|
+
| &&
|
|
64
|
+
| .
|
|
65
|
+
`.replace(/\s+/g,""),"gsu");function kL(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=qL(i.flags),o=[a.extended],s={captureGroup:i.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(y){o.push(y)},replaceCurrentModX(y){o[o.length-1]=y},singleline:i.rules.singleline};let c=[],d;for(ps.lastIndex=0;d=ps.exec(e);){const y=AL(s,e,d[0],ps.lastIndex);y.tokens?c.push(...y.tokens):y.token&&c.push(y.token),y.lastIndex!==void 0&&(ps.lastIndex=y.lastIndex)}const f=[];let p=0;c.filter(y=>y.type==="GroupOpen").forEach(y=>{y.kind==="capturing"?y.number=++p:y.raw==="("&&f.push(y)}),p||f.forEach((y,v)=>{y.kind="capturing",y.number=v+1});const g=p||f.length;return{tokens:c.map(y=>y.type==="EscapedNumber"?YL(y,g):y).flat(),flags:a}}function AL(e,t,i,a){const[o,s]=i;if(i==="["||i==="[^"){const c=TL(t,i,a);return{tokens:c.tokens,lastIndex:c.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:G0(i,i)};if(/^\\g[<']/.test(i)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:HL(i)}}if(/^\\k[<']/.test(i)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:m1(i)}}if(s==="K")return{token:g1("keep",i)};if(s==="N"||s==="R")return{token:dr("newline",i,{negate:s==="N"})};if(s==="O")return{token:dr("any",i)};if(s==="X")return{token:dr("text_segment",i)};const c=p1(i,{inCharClass:!1});return Array.isArray(c)?{tokens:c}:{token:c}}if(o==="("){if(s==="*")return{token:VL(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:jL(i,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,i==="("&&!e.captureGroup||i==="(?:")return{token:ua("group",i)};if(i==="(?>")return{token:ua("atomic",i)};if(i==="(?="||i==="(?!"||i==="(?<="||i==="(?<!")return{token:ua(i[2]==="<"?"lookbehind":"lookahead",i,{negate:i.endsWith("!")})};if(i==="("&&e.captureGroup||i.startsWith("(?<")&&i.endsWith(">")||i.startsWith("(?'")&&i.endsWith("'"))return{token:ua("capturing",i,{...i!=="("&&{name:i.slice(3,-1)}})};if(i.startsWith("(?~")){if(i==="(?~|")throw new Error(`Unsupported absence function kind "${i}"`);return{token:ua("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:IL(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:dr("dot",i)};if(i==="^"||i==="$"){const c=e.singleline?{"^":Et`\A`,$:Et`\Z`}[i]:i;return{token:G0(c,i)}}return i==="|"?{token:RL(i)}:yh.test(i)?{tokens:XL(i)}:{token:li(Ea(i),i)}}function TL(e,t,i){const a=[$0(t[1]==="^",t)];let o=1,s;for(Yd.lastIndex=i;s=Yd.exec(e);){const c=s[0];if(c[0]==="["&&c[1]!==":")o++,a.push($0(c[1]==="^",c));else if(c==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(li(93,c));else if(o--,a.push(DL(c)),!o)break}else{const d=LL(c);Array.isArray(d)?a.push(...d):a.push(d)}}return{tokens:a,lastIndex:Yd.lastIndex||e.length}}function LL(e){if(e[0]==="\\")return p1(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 dr("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?NL(e):e==="&&"?OL(e):li(Ea(e),e)}function p1(e,{inCharClass:t}){const i=e[1];if(i==="c"||i==="C")return BL(e);if("dDhHsSwW".includes(i))return GL(e);if(e.startsWith(Et`\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 $L(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 d=[...s.encode(c)].map(f=>`\\x${f.toString(16)}`).join("");return li(Ea(c),d)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(i==="u"||i==="x")return li(FL(e),e);if(q0.has(i))return li(q0.get(i),e);if(/\d/.test(i))return ML(t,e);if(e==="\\")throw new Error(Et`Incomplete escape "\"`);if(i==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return li(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function RL(e){return{type:"Alternator",raw:e}}function G0(e,t){return{type:"Assertion",kind:e,raw:t}}function m1(e){return{type:"Backreference",raw:e}}function li(e,t){return{type:"Character",value:e,raw:t}}function DL(e){return{type:"CharacterClassClose",raw:e}}function NL(e){return{type:"CharacterClassHyphen",raw:e}}function OL(e){return{type:"CharacterClassIntersector",raw:e}}function $0(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function dr(e,t,i={}){return{type:"CharacterSet",kind:e,...i,raw:t}}function g1(e,t,i={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:xa(i.flags),raw:t}}function ML(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function IL(e){return{type:"GroupClose",raw:e}}function ua(e,t,i={}){return{type:"GroupOpen",kind:e,...i,raw:t}}function zL(e,t,i,a){return{type:"NamedCallout",kind:e,tag:t,arguments:i,raw:a}}function UL(e,t,i,a){return{type:"Quantifier",kind:e,min:t,max:i,raw:a}}function HL(e){return{type:"Subroutine",raw:e}}const PL=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),q0=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function BL(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 li(Ea(t.toUpperCase())-64,e)}function jL(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=Y0(i),c=Y0(a),d={};if(s&&(d.enable=s),c&&(d.disable=c),e.endsWith(")"))return t.replaceCurrentModX(o),g1("flags",e,{flags:d});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,ua("group",e,{...(s||c)&&{flags:d}});throw new Error(`Unexpected flag modifier "${e}"`)}function VL(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(g=>g!=="").map(g=>/^[+-]?\d+$/.test(g)?+g:g):[],[c,d,f]=s,p=PL.has(i)?i.toLowerCase():"custom";switch(p){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 d=="number"||!/^[<>X]$/.test(d)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${d}"`);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 d=="number"||!/^(?:[<>!=]=|[<>])$/.test(d))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${d}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument three must be a tag or number "${f}"`);break;case"custom":throw new Error(`Undefined callout name "${i}"`);default:throw new Error(`Unexpected named callout kind "${p}"`)}return zL(p,a??null,o?.split(",")??null,e)}function F0(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 UL(t,i,a,e)}function GL(e){const t=e[1].toLowerCase();return dr({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function $L(e){const{p:t,neg:i,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return dr("property",e,{value:a,negate:t==="P"&&!i||t==="p"&&!!i})}function Y0(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 qL(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 FL(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 YL(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[m1(i)];const s=[],c=o.match(/^[0-7]+|\d/g);for(let d=0;d<c.length;d++){const f=c[d];let p;if(d===0&&f!=="8"&&f!=="9"){if(p=parseInt(f,8),p>127)throw new Error(Et`Octal encoded byte above 177 unsupported "${i}"`)}else p=Ea(f);s.push(li(p,(d===0?"\\":"")+f))}return s}function XL(e){const t=[],i=new RegExp(yh,"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:d}=s.groups;if(+c>+d&&o.endsWith("?")){i.lastIndex--,t.push(F0(o.slice(0,-1)));continue}}}t.push(F0(o))}return t}function y1(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 QL(e){return ZL.has(e.type)}const ZL=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function b1(e,t={}){const i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},a=kL(e,{flags:i.flags,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline}}),o=(v,b)=>{const S=a.tokens[s.nextIndex];switch(s.parent=v,s.nextIndex++,S.type){case"Alternator":return pr();case"Assertion":return KL(S);case"Backreference":return WL(S,s);case"Character":return nu(S.value,{useLastValid:!!b.isCheckingRangeEnd});case"CharacterClassHyphen":return JL(S,s,b);case"CharacterClassOpen":return eR(S,s,b);case"CharacterSet":return tR(S,s);case"Directive":return oR(S.kind,{flags:S.flags});case"GroupOpen":return nR(S,s,b);case"NamedCallout":return uR(S.kind,S.tag,S.arguments);case"Quantifier":return iR(S,s);case"Subroutine":return rR(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=dR(sR(a.flags));let d=c.body[0];for(;s.nextIndex<a.tokens.length;){const v=o(d,{});v.type==="Alternative"?(c.body.push(v),d=v):d.body.push(v)}const{capturingGroups:f,hasNumberedRef:p,namedGroupsByName:g,subroutines:y}=s;if(p&&g.size&&!i.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:v}of y)if(typeof v=="number"){if(v>f.length)throw new Error("Subroutine uses a group number that's not defined");v&&(f[v-1].isSubroutined=!0)}else if(g.has(v)){if(g.get(v).length>1)throw new Error(Et`Subroutine uses a duplicate group name "\g<${v}>"`);g.get(v)[0].isSubroutined=!0}else throw new Error(Et`Subroutine uses a group name that's not defined "\g<${v}>"`);return c}function KL({kind:e}){return Mf(xa({"^":"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===Et`\B`||e===Et`\Y`})}function WL({raw:e},t){const i=/^\\k[<']/.test(e),a=i?e.slice(3,-1):e.slice(1),o=(s,c=!1)=>{const d=t.capturingGroups.length;let f=!1;if(s>d)if(t.skipBackrefValidation)f=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,If(c?d+1-s:s,{orphan:f})};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 If(a)}return o(+a)}function JL(e,t,i){const{tokens:a,walk:o}=t,s=t.parent,c=s.body.at(-1),d=a[t.nextIndex];if(!i.isCheckingRangeEnd&&c&&c.type!=="CharacterClass"&&c.type!=="CharacterClassRange"&&d&&d.type!=="CharacterClassOpen"&&d.type!=="CharacterClassClose"&&d.type!=="CharacterClassIntersector"){const f=o(s,{...i,isCheckingRangeEnd:!0});if(c.type==="Character"&&f.type==="Character")return s.body.pop(),lR(c,f);throw new Error("Invalid character class range")}return nu(Ea("-"))}function eR({negate:e},t,i){const{tokens:a,walk:o}=t,s=[As()],c=a[t.nextIndex];let d=Z0(c);for(;d.type!=="CharacterClassClose";){if(d.type==="CharacterClassIntersector")s.push(As()),t.nextIndex++;else{const p=s.at(-1);p.body.push(o(p,i))}d=Z0(a[t.nextIndex],c)}const f=As({negate:e});return s.length===1?f.body=s[0].body:(f.kind="intersection",f.body=s.map(p=>p.body.length===1?p.body[0]:p)),t.nextIndex++,f}function tR({kind:e,negate:t,value:i},a){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c}=a;if(e==="property"){const d=iu(i);if(gh.has(d)&&!c?.has(d))e="posix",i=d;else return ca(i,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c})}return e==="posix"?cR(i,{negate:t}):zf(e,{negate:t})}function nR(e,t,i){const{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:c,walk:d}=t,f=fR(e),p=f.type==="AbsenceFunction",g=Q0(f),y=g&&f.negate;if(f.type==="CapturingGroup"&&(o.push(f),f.name&&CL(s,f.name,[]).push(f)),p&&i.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let v=K0(a[t.nextIndex]);for(;v.type!=="GroupClose";){if(v.type==="Alternator")f.body.push(pr()),t.nextIndex++;else{const b=f.body.at(-1),S=d(b,{...i,isInAbsenceFunction:i.isInAbsenceFunction||p,isInLookbehind:i.isInLookbehind||g,isInNegLookbehind:i.isInNegLookbehind||y});if(b.body.push(S),(g||i.isInLookbehind)&&!c){const A="Lookbehind includes a pattern not allowed by Oniguruma";if(y||i.isInNegLookbehind){if(X0(S)||S.type==="CapturingGroup")throw new Error(A)}else if(X0(S)||Q0(S)&&S.negate)throw new Error(A)}}v=K0(a[t.nextIndex])}return t.nextIndex++,f}function iR({kind:e,min:t,max:i},a){const o=a.parent,s=o.body.at(-1);if(!s||!QL(s))throw new Error("Quantifier requires a repeatable token");const c=_1(e,t,i,s);return o.body.pop(),c}function rR({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 d=+s.groups.num,f=i.length;if(t.hasNumberedRef=!0,o={"":d,"+":f+d,"-":f+1-d}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const c=S1(o);return a.push(c),c}function aR(e,t){return{type:"AbsenceFunction",kind:e,body:Gl(t?.body)}}function pr(e){return{type:"Alternative",body:E1(e?.body)}}function Mf(e,t){const i={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(i.negate=!!t?.negate),i}function If(e,t){const i=!!t?.orphan;return{type:"Backreference",ref:e,...i&&{orphan:i}}}function v1(e,t){const i={name:void 0,isSubroutined:!1,...t};if(i.name!==void 0&&!hR(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:Gl(t?.body)}}function nu(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 As(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:E1(e?.body)}}function lR(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function zf(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 oR(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:xa(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function sR(e){return{type:"Flags",...e}}function xn(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:Gl(e?.body)}}function ur(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Gl(e?.body)}}function uR(e,t,i){return{type:"NamedCallout",kind:e,tag:t,arguments:i}}function cR(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 _1(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 dR(e,t){return{type:"Regex",body:Gl(t?.body),flags:e}}function S1(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(iu(e));if(!a){if(i.normalizeUnknownPropertyNames)a=pR(e);else if(i.unicodePropertyMap&&!i.skipPropertyNameValidation)throw new Error(Et`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:i.negate}}function fR({flags:e,kind:t,name:i,negate:a,number:o}){switch(t){case"absence_repeater":return aR("repeater");case"atomic":return xn({atomic:!0});case"capturing":return v1(o,{name:i});case"group":return xn({flags:e});case"lookahead":case"lookbehind":return ur({behind:t==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${t}"`)}}function Gl(e){if(e===void 0)e=[pr()];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 E1(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 X0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Q0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function hR(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function pR(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 iu(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Z0(e,t){const i=t;return xa(e,`Unclosed character class${i?.type==="Character"&&i.value===93&&i.raw==="]"?' (started with "]")':""}`)}function K0(e){return xa(e,"Unclosed group")}function Rl(e,t,i=null){function a(s,c){for(let d=0;d<s.length;d++){const f=o(s[d],c,d,s);d=Math.max(-1,d+f)}}function o(s,c=null,d=null,f=null){let p=0,g=!1;const y={node:s,parent:c,key:d,container:f,root:e,remove(){ms(f).splice(Math.max(0,ra(d)+p),1),p--,g=!0},removeAllNextSiblings(){return ms(f).splice(ra(d)+1)},removeAllPrevSiblings(){const x=ra(d)+p;return p-=x,ms(f).splice(0,Math.max(0,x))},replaceWith(x,T={}){const k=!!T.traverse;f?f[Math.max(0,ra(d)+p)]=x:xa(c,"Can't replace root node")[d]=x,k&&o(x,c,d,f),g=!0},replaceWithMultiple(x,T={}){const k=!!T.traverse;if(ms(f).splice(Math.max(0,ra(d)+p),1,...x),p+=x.length-1,k){let I=0;for(let z=0;z<x.length;z++)I+=o(x[z],c,ra(d)+z+I,f)}g=!0},skip(){g=!0}},{type:v}=s,b=t["*"],S=t[v],A=typeof b=="function"?b:b?.enter,D=typeof S=="function"?S:S?.enter;if(A?.(y,i),D?.(y,i),!g)switch(v){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 "${v}"`)}return S?.exit?.(y,i),b?.exit?.(y,i),p}return o(e),e}function ms(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function ra(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const mR=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function gR(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function yR(e,t,i,a){return e.slice(0,t)+a+e.slice(t+i.length)}const mn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function bh(e,t,i,a){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let c=0,d="";for(const f of e.matchAll(o)){const{0:p,groups:{$skip:g}}=f;if(!g&&(!a||a===mn.DEFAULT==!c)){i instanceof Function?d+=i(f,{context:c?mn.CHAR_CLASS:mn.DEFAULT,negated:s[s.length-1]}):d+=i;continue}p[0]==="["?(c++,s.push(p[1]==="^")):p==="]"&&c&&(c--,s.pop()),d+=p}return d}function x1(e,t,i,a){bh(e,t,i,a)}function bR(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:d,groups:{$skip:f}}=c;if(!f&&(!a||a===mn.DEFAULT==!s))return c;d==="["?s++:d==="]"&&s&&s--,o.lastIndex==c.index&&o.lastIndex++}return null}function gs(e,t,i){return!!bR(e,t,0,i)}function vR(e,t){const i=/\\?./gsu;i.lastIndex=t;let a=e.length,o=0,s=1,c;for(;c=i.exec(e);){const[d]=c;if(d==="[")o++;else if(o)d==="]"&&o--;else if(d==="(")s++;else if(d===")"&&(s--,!s)){a=c.index;break}}return e.slice(t,a)}const W0=new RegExp(String.raw`(?<noncapturingStart>${mR})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function _R(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],d=[];let f=0,p=0,g=NaN,y;do{y=!1;let v=0,b=0,S=!1,A;for(W0.lastIndex=Number.isNaN(g)?0:g+s.length;A=W0.exec(e);){const{0:D,index:x,groups:{capturingStart:T,noncapturingStart:k}}=A;if(D==="[")v++;else if(v)D==="]"&&v--;else if(D===o&&!S)g=x,S=!0;else if(S&&k)b++;else if(T)S?b++:(f++,c.push(f+p));else if(D===")"&&S){if(!b){p++;const I=f+p;if(e=`${e.slice(0,g)}${s}${e.slice(g+o.length,x)}))<$$${I}>)${e.slice(x+1)}`,y=!0,d.push(I),gR(i,I),a.size){const z=new Map;a.forEach((R,$)=>{z.set($>=I?$+1:$,R.map(G=>G>=I?G+1:G))}),a=z}break}b--}}}while(y);return i.push(...d),e=bh(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:v,groups:{backrefNum:b,wrappedBackrefNum:S}})=>{if(b){const A=+b;if(A>c.length-1)throw new Error(`Backref "${v}" greater than number of captures`);return`\\${c[A]}`}return`\\${S}`},mn.DEFAULT),{pattern:e,captureTransfers:a,hiddenCaptures:i}}const w1=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Xd=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>${w1})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
80
|
+
| \\?.
|
|
81
|
+
`.replace(/\s+/g,""),"gsu");function SR(e){if(!new RegExp(`${w1}\\+`).test(e))return{pattern:e};const t=[];let i=null,a=null,o="",s=0,c;for(Xd.lastIndex=0;c=Xd.exec(e);){const{0:d,index:f,groups:{qBase:p,qMod:g,invalidQ:y}}=c;if(d==="[")s||(a=f),s++;else if(d==="]")s?s--:a=null;else if(!s)if(g==="+"&&o&&!o.startsWith("(")){if(y)throw new Error(`Invalid quantifier "${d}"`);let v=-1;if(/^\{\d+\}$/.test(p))e=yR(e,f+p.length,g,"");else{if(o===")"||o==="]"){const b=o===")"?i:a;if(b===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,b)}(?>${e.slice(b,f)}${p})${e.slice(f+d.length)}`}else e=`${e.slice(0,f-o.length)}(?>${o}${p})${e.slice(f+d.length)}`;v+=4}Xd.lastIndex+=v}else d[0]==="("?t.push(f):d===")"&&(i=t.length?t.pop():null);o=d}return{pattern:e}}const pn=String.raw,ER=pn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Uf=pn`\(\?R=(?<rDepth>[^\)]+)\)|${ER}`,ru=pn`\(\?<(?![=!])(?<captureName>[^>]+)>`,C1=pn`${ru}|(?<unnamed>\()(?!\?)`,or=new RegExp(pn`${ru}|${Uf}|\(\?|\\?.`,"gsu"),Qd="Cannot use multiple overlapping recursions";function xR(e,t){const{hiddenCaptures:i,mode:a}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(Uf,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:i};if(a==="plugin"&&gs(e,pn`\(\?\(DEFINE\)`,mn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],c=gs(e,pn`\\[1-9]`,mn.DEFAULT),d=new Map,f=[];let p=!1,g=0,y=0,v;for(or.lastIndex=0;v=or.exec(e);){const{0:b,groups:{captureName:S,rDepth:A,gRNameOrNum:D,gRDepth:x}}=v;if(b==="[")g++;else if(g)b==="]"&&g--;else if(A){if(J0(A),p)throw new Error(Qd);if(c)throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const T=e.slice(0,v.index),k=e.slice(or.lastIndex);if(gs(k,Uf,mn.DEFAULT))throw new Error(Qd);const I=+A-1;e=eb(T,k,I,!1,i,s,y),o=nb(o,T,I,s.length,0,y);break}else if(D){J0(x);let T=!1;for(const F of f)if(F.name===D||F.num===+D){if(T=!0,F.hasRecursedWithin)throw new Error(Qd);break}if(!T)throw new Error(pn`Recursive \g cannot be used outside the referenced group "${a==="external"?D:pn`\g<${D}&R=${x}>`}"`);const k=d.get(D),I=vR(e,k);if(c&&gs(I,pn`${ru}|\((?!\?)`,mn.DEFAULT))throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const z=e.slice(k,v.index),R=I.slice(z.length+b.length),$=s.length,G=+x-1,Y=eb(z,R,G,!0,i,s,y);o=nb(o,z,G,s.length-$,$,y);const le=e.slice(0,k),te=e.slice(k+I.length);e=`${le}${Y}${te}`,or.lastIndex+=Y.length-b.length-z.length-R.length,f.forEach(F=>F.hasRecursedWithin=!0),p=!0}else if(S)y++,d.set(String(y),or.lastIndex),d.set(S,or.lastIndex),f.push({num:y,name:S});else if(b[0]==="("){const T=b==="(";T&&(y++,d.set(String(y),or.lastIndex)),f.push(T?{num:y}:{})}else b===")"&&f.pop()}return i.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:i}}function J0(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 eb(e,t,i,a,o,s,c){const d=new Set;a&&x1(e+t,ru,({groups:{captureName:p}})=>{d.add(p)},mn.DEFAULT);const f=[i,a?d:null,o,s,c];return`${e}${tb(`(?:${e}`,"forward",...f)}(?:)${tb(`${t})`,"backward",...f)}${t}`}function tb(e,t,i,a,o,s,c){const f=g=>t==="forward"?g+2:i-g+2-1;let p="";for(let g=0;g<i;g++){const y=f(g);p+=bh(e,pn`${C1}|\\k<(?<backref>[^>]+)>`,({0:v,groups:{captureName:b,unnamed:S,backref:A}})=>{if(A&&a&&!a.has(A))return v;const D=`_$${y}`;if(S||b){const x=c+s.length+1;return s.push(x),wR(o,x),S?v:`(?<${b}${D}>`}return pn`\k<${A}${D}>`},mn.DEFAULT)}return p}function wR(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function nb(e,t,i,a,o,s){if(e.size&&a){let c=0;x1(t,C1,()=>c++,mn.DEFAULT);const d=s-c+o,f=new Map;return e.forEach((p,g)=>{const y=(a-c*i)/i,v=c*i,b=g>d+c?g+a:g,S=[];for(const A of p)if(A<=d)S.push(A);else if(A>d+c+y)S.push(A+a);else if(A<=d+c)for(let D=0;D<=i;D++)S.push(A+c*D);else for(let D=0;D<=i;D++)S.push(A+v+y*D);f.set(b,S)}),f}return e}var yt=String.fromCodePoint,we=String.raw,wn={},au=globalThis.RegExp;wn.flagGroups=(()=>{try{new au("(?i:)")}catch{return!1}return!0})();wn.unicodeSets=(()=>{try{new au("[[]]","v")}catch{return!1}return!0})();wn.bugFlagVLiteralHyphenIsRange=wn.unicodeSets?(()=>{try{new au(we`[\d\-a]`,"v")}catch{return!0}return!1})():!1;wn.bugNestedClassIgnoresNegation=wn.unicodeSets&&new au("[[^a]]","v").test("a");function Gs(e,{enable:t,disable:i}){return{dotAll:!i?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!i?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function zl(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}function Hf(e,t){return ib[e]>=ib[t]}function CR(e,t){if(e==null)throw new Error(t??"Value expected");return e}var ib={ES2025:2025,ES2024:2024,ES2018:2018},kR={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function k1(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!kR[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=wn.flagGroups?"ES2025":wn.unicodeSets?"ES2024":"ES2018"),t}var AR="[ -\r ]",TR=new Set([yt(304),yt(305)]),ii=we`[\p{L}\p{M}\p{N}\p{Pc}]`;function A1(e){if(TR.has(e))return[e];const t=new Set,i=e.toLowerCase(),a=i.toUpperCase(),o=DR.get(i),s=LR.get(i),c=RR.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 vh=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=>[iu(e),e])),LR=new Map([["s",yt(383)],[yt(383),"s"]]),RR=new Map([[yt(223),yt(7838)],[yt(107),yt(8490)],[yt(229),yt(8491)],[yt(969),yt(8486)]]),DR=new Map([Pi(453),Pi(456),Pi(459),Pi(498),...Zd(8072,8079),...Zd(8088,8095),...Zd(8104,8111),Pi(8124),Pi(8140),Pi(8188)]),NR=new Map([["alnum",we`[\p{Alpha}\p{Nd}]`],["alpha",we`\p{Alpha}`],["ascii",we`\p{ASCII}`],["blank",we`[\p{Zs}\t]`],["cntrl",we`\p{Cc}`],["digit",we`\p{Nd}`],["graph",we`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",we`\p{Lower}`],["print",we`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",we`[\p{P}\p{S}]`],["space",we`\p{space}`],["upper",we`\p{Upper}`],["word",we`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",we`\p{AHex}`]]);function OR(e,t){const i=[];for(let a=e;a<=t;a++)i.push(a);return i}function Pi(e){const t=yt(e);return[t.toLowerCase(),t]}function Zd(e,t){return OR(e,t).map(i=>Pi(i))}var T1=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function MR(e,t){const i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};L1(e);const a={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Hf(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};Rl(e,IR,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};Rl(e,zR,s);const c={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Rl(e,UR,c),e._originMap=s.groupOriginByCopy,e._strategy=a.strategy,e}var IR={AbsenceFunction({node:e,parent:t,replaceWith:i}){const{body:a,kind:o}=e;if(o==="repeater"){const s=xn();s.body[0].body.push(ur({negate:!0,body:a}),ca("Any"));const c=xn();c.body[0].body.push(_1("greedy",0,1/0,s)),i(ot(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];zl(a,c,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const i=D1(t.get(e));if(i){const a=xn({flags:i});a.body[0].body=e.body,e.body=[ot(a,e)]}}}},Assertion({node:e,parent:t,key:i,container:a,root:o,remove:s,replaceWith:c},d){const{kind:f,negate:p}=e,{asciiWordBoundaries:g,avoidSubclass:y,supportedGNodes:v,wordIsAscii:b}=d;if(f==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${p?"Y":"y"}"`);if(f==="line_end")c(ot(ur({body:[pr({body:[Mf("string_end")]}),pr({body:[nu(10)]})]}),t));else if(f==="line_start")c(ot(ri(we`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(f==="search_start")if(v.has(e))o.flags.sticky=!0,s();else{const S=a[i-1];if(S&&GR(S))c(ot(ur({negate:!0}),t));else{if(y)throw new Error(we`Uses "\G" in a way that requires a subclass`);c(Bi(Mf("string_start"),t)),d.strategy="clip_search"}}else if(!(f==="string_end"||f==="string_start"))if(f==="string_end_newline")c(ot(ri(we`(?=\n?\z)`),t));else if(f==="word_boundary"){if(!b&&!g){const S=`(?:(?<=${ii})(?!${ii})|(?<!${ii})(?=${ii}))`,A=`(?:(?<=${ii})(?=${ii})|(?<!${ii})(?!${ii}))`;c(ot(ri(p?A:S),t))}}else throw new Error(`Unexpected assertion kind "${f}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!Wd(i)&&(i=Kd(i,t),e.ref=i)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:i}){let{name:a}=e;a&&!Wd(a)&&(a=Kd(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=As({body:[e]});i(ot(a,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:i},{accuracy:a,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:c,wordIsAscii:d}){const{kind:f,negate:p,value:g}=e;if(s&&(f==="digit"||g==="digit")){i(Bi(zf("digit",{negate:p}),t));return}if(c&&(f==="space"||g==="space")){i(ot(Jd(ri(AR),p),t));return}if(d&&(f==="word"||g==="word")){i(Bi(zf("word",{negate:p}),t));return}if(f==="any")i(Bi(ca("Any"),t));else if(f==="digit")i(Bi(ca("Nd",{negate:p}),t));else if(f!=="dot")if(f==="text_segment"){if(a==="strict")throw new Error(we`Use of "\X" requires non-strict accuracy`);const y="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",v=we`\p{RI}{2}|${y}(?:\u200D${y})*`;i(ot(ri(we`(?>\r\n|${o?we`\p{RGI_Emoji}`:v}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(f==="hex")i(Bi(ca("AHex",{negate:p}),t));else if(f==="newline")i(ot(ri(p?`[^
|
|
172
|
+
]`:`(?>\r
|
|
173
|
+
?|[
|
|
174
|
+
\v\f
\u2028\u2029])`),t));else if(f==="posix")if(!o&&(g==="graph"||g==="print")){if(a==="strict")throw new Error(`POSIX class "${g}" requires min target ES2024 or non-strict accuracy`);let y={graph:"!-~",print:" -~"}[g];p&&(y=`\0-${yt(y.codePointAt(0)-1)}${yt(y.codePointAt(2)+1)}-`),i(ot(ri(`[${y}]`),t))}else i(ot(Jd(ri(NR.get(g)),p),t));else if(f==="property")vh.has(iu(g))||(e.key="sc");else if(f==="space")i(Bi(ca("space",{negate:p}),t));else if(f==="word")i(ot(Jd(ri(ii),p),t));else throw new Error(`Unexpected character set kind "${f}"`)},Directive({node:e,parent:t,root:i,remove:a,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:c}){const{kind:d,flags:f}=e;if(d==="flags")if(!f.enable&&!f.disable)a();else{const p=xn({flags:f});p.body[0].body=c(),o(ot(p,t),{traverse:!0})}else if(d==="keep"){const p=i.body[0],y=i.body.length===1&&y1(p,{type:"Group"})&&p.body[0].body.length===1?p.body[0]:i;if(t.parent!==y||y.body.length>1)throw new Error(we`Uses "\K" in a way that's unsupported`);const v=ur({behind:!0});v.body[0].body=s(),o(ot(v,t))}else throw new Error(`Unexpected directive kind "${d}"`)},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(ot(ur({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${a.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=xn();t.body[0].body.push(e.body),e.body=ot(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=O1(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(we`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!Wd(i)&&(i=Kd(i,t),e.ref=i)}},zR={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:d,reffedNodesByReferencer:f}){const p=o.get(e);if(p&&d.has(e.number)){const y=Bi(rb(e.number),t);f.set(y,d.get(e.number)),i(y);return}d.set(e.number,e),c.set(e.number,[]),e.name&&zl(c,e.name,[]);const g=c.get(e.name??e.number);for(let y=0;y<g.length;y++){const v=g[y];if(p===v.node||p&&p===v.origin||e===v.origin){g.splice(y,1);break}}if(c.get(e.number).push({node:e,origin:p}),e.name&&c.get(e.name).push({node:e,origin:p}),e.name){const y=zl(s,e.name,new Map);let v=!1;if(p)v=!0;else for(const b of y.values())if(!b.hasDuplicateNameToRemove){v=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:v})}},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=Gs(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 g=t;for(;(g=g.parent)&&!(g.type==="CapturingGroup"&&(g.name===s||g.number===s)););a.reffedNodesByReferencer.set(e,g);return}const c=a.subroutineRefMap.get(s),d=s===0,f=d?rb(0):R1(c,a.groupOriginByCopy,null);let p=f;if(!d){const g=D1(BR(c,v=>v.type==="Group"&&!!v.flags)),y=g?Gs(a.globalFlags,g):a.globalFlags;HR(y,a.currentFlags)||(p=xn({flags:jR(y)}),p.body[0].body.push(f))}i(ot(p,t),{traverse:!d})}},UR={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=>PR(c,e));if(!s.length)i(ot(ur({negate:!0}),t));else if(s.length>1){const c=xn({atomic:!0,body:s.reverse().map(d=>pr({body:[If(d.number)]}))});i(ot(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=v1();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function L1(e){Rl(e,{"*"({node:t,parent:i}){t.parent=i}})}function HR(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function PR(e,t){let i=t;do{if(i.type==="Regex")return!1;if(i.type==="Alternative")continue;if(i===e)return!1;const a=N1(i.parent);for(const o of a){if(o===i)break;if(o===e||M1(o,e))return!0}}while(i=i.parent);throw new Error("Unexpected path")}function R1(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]=R1(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=S1(e);return t.isRecursive=!0,t}function BR(e,t){const i=[];for(;e=e.parent;)(!t||t(e))&&i.push(e);return i}function Kd(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 D1(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 jR({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 N1(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function O1(e){const t=e.find(i=>i.kind==="search_start"||$R(i,{negate:!1})||!VR(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=O1(a.body);if(!o)return null;Array.isArray(o)?i.push(...o):i.push(o)}return i}return null}function M1(e,t){const i=N1(e)??[];for(const a of i)if(a===t||M1(a,t))return!0;return!1}function VR({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function GR(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function $R(e,t){const i={negate:null,...t};return e.type==="LookaroundAssertion"&&(i.negate===null||e.negate===i.negate)&&e.body.length===1&&y1(e.body[0],{type:"Assertion",kind:"search_start"})}function Wd(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ri(e,t){const a=b1(e,{...t,unicodePropertyMap:vh}).body;return a.length>1||a[0].body.length>1?xn({body:a}):a[0].body[0]}function Jd(e,t){return e.negate=t,e}function Bi(e,t){return e.parent=t,e}function ot(e,t){return L1(e),e.parent=t,e}function qR(e,t){const i=k1(t),a=Hf(i.target,"ES2024"),o=Hf(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,d=null;if(!o){const b=[e.flags.ignoreCase];Rl(e,FR,{getCurrentModI:()=>b.at(-1),popModI(){b.pop()},pushModI(S){b.push(S)},setHasCasedChar(){b.at(-1)?c=!0:d=!0}})}const f={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||c)&&!d)};let p=e;const g={accuracy:i.accuracy,appliedGlobalFlags:f,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:p,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&c&&d),useFlagMods:o,useFlagV:a,verbose:i.verbose};function y(b){return g.lastNode=p,p=b,CR(YR[b.type],`Unexpected node type "${b.type}"`)(b,g,y)}const v={pattern:e.body.map(y).join("|"),flags:y(e.flags),options:{...e.options}};return a||(delete v.options.force.v,v.options.disable.v=!0,v.options.unicodeSetsPlugin=null),v._captureTransfers=new Map,v._hiddenCaptures=[],g.captureMap.forEach((b,S)=>{b.hidden&&v._hiddenCaptures.push(S),b.transferTo&&zl(v._captureTransfers,b.transferTo,[]).push(S)}),v}var FR={"*":{enter({node:e},t){if(lb(e)){const i=t.getCurrentModI();t.pushModI(e.flags?Gs({ignoreCase:i},e.flags).ignoreCase:i)}},exit({node:e},t){lb(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){_h(yt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},i){t(),I1(e,{firstOnly:!0}).length&&i.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&T1.has(e.value)&&t.setHasCasedChar()}},YR={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?we`\B`:we`\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},d=t.originMap.get(e);return d&&(c.hidden=!0,s>d.number&&(c.transferTo=d.number)),t.captureMap.set(s,c),`(${o?`?<${o}>`:""}${a.map(i).join("|")})`},Character({value:e},t){const i=yt(e),a=aa(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(a!==i)return a;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&_h(i)){const o=A1(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");wn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&c.some(ob)&&(c=[nu(45),...c.filter(p=>!ob(p))]);const d=()=>`[${o?"^":""}${c.map(i).join(a==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||wn.bugNestedClassIgnoresNegation)&&!o){const g=c.filter(y=>y.type==="CharacterClass"&&y.kind==="union"&&y.negate);if(g.length){const y=xn(),v=y.body[0];return y.parent=s,v.parent=y,c=c.filter(b=>!g.includes(b)),e.body=c,c.length?(e.parent=v,v.body.push(e)):y.body.pop(),g.forEach(b=>{const S=pr({body:[b]});b.parent=S,S.parent=y,y.body.push(S)}),i(y)}}t.inCharClass=!0;const p=d();return t.inCharClass=!1,p}const f=c[0];if(a==="union"&&!o&&f&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(wn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&c.length===1&&f.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 d()},CharacterClassRange(e,t){const i=e.min.value,a=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=aa(i,o),c=aa(a,o),d=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const f=I1(e);WR(f).forEach(g=>{d.add(Array.isArray(g)?`${aa(g[0],o)}-${aa(g[1],o)}`:aa(g,o))})}return`${s}-${c}${[...d].join("")}`},CharacterSet({kind:e,negate:t,value:i,key:a},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":we`[^\n]`;if(e==="digit")return t?we`\D`:we`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&T1.has(i))throw new Error(`Unicode property "${i}" can't be case-insensitive when other chars have specific case`);return`${t?we`\P`:we`\p`}{${a?`${a}=`:""}${i}}`}if(e==="word")return t?we`\W`:we`\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=Gs(c,i));const d=t.map(s).join("|"),f=!o.verbose&&t.length===1&&a.type!=="Quantifier"&&!e&&(!o.useFlagMods||!i)?d:`(?${JR(e,i,o.useFlagMods)}${d})`;return o.currentFlags=c,f},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)+eD(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})`:we`\g<${t}&R=${a}>`}},XR=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),QR=new Set(["-","\\","]","^","["]),ZR=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),ab=new Map([[9,we`\t`],[10,we`\n`],[11,we`\v`],[12,we`\f`],[13,we`\r`],[8232,we`\u2028`],[8233,we`\u2029`],[65279,we`\uFEFF`]]),KR=new RegExp("^\\p{Cased}$","u");function _h(e){return KR.test(e)}function I1(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 d=yt(c);if(!_h(d))continue;const f=A1(d).filter(p=>{const g=p.codePointAt(0);return g<a||g>o});if(f.length&&(s.push(...f),i))break}return s}function aa(e,{escDigit:t,inCharClass:i,useFlagV:a}){if(ab.has(e))return ab.get(e);if(e<32||e>126&&e<160||e>262143||t&&tD(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=i?a?ZR:QR:XR,s=yt(e);return(o.has(s)?"\\":"")+s}function WR(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 JR(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 eD({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 lb({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function tD(e){return e>47&&e<58}function ob({type:e,value:t}){return e==="Character"&&t===45}var nD=class Pf 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 Pf&&(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=rD(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 Pf(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&&(iD(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:d,transferTo:f}=this.#t.get(c)??{};if(d?s.push(null):(s.push(i.length),i.push(a[c]),this.hasIndices&&i.indices.push(o[c])),f&&a[c]!==void 0){const p=s[f];if(!p)throw new Error(`Invalid capture transfer to "${p}"`);if(i[p]=a[c],this.hasIndices&&(i.indices[p]=o[c]),i.groups){this.#n||(this.#n=aD(this.source));const g=this.#n.get(f);g&&(i.groups[g]=a[c],this.hasIndices&&(i.indices.groups[g]=o[c]))}}}return i}};function iD(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 d=o[c];d&&(o[c]=[d[0]+t,d[1]+t])}const s=o.groups;s&&Object.keys(s).forEach(c=>{const d=s[c];d&&(s[c]=[d[0]+t,d[1]+t])})}}function rD(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)zl(i,s,{}).transferTo=a;return i}function aD(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:d,name:f}}=s;c==="["?a++:a?c==="]"&&a--:d&&(o++,f&&i.set(o,f))}return i}function lD(e,t){const i=oD(e,t);return i.options?new nD(i.pattern,i.flags,i.options):new RegExp(i.pattern,i.flags)}function oD(e,t){const i=k1(t),a=b1(e,{flags:i.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline},skipBackrefValidation:i.rules.allowOrphanBackrefs,unicodePropertyMap:vh}),o=MR(a,{accuracy:i.accuracy,asciiWordBoundaries:i.rules.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,bestEffortTarget:i.target}),s=qR(o,i),c=xR(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),d=SR(c.pattern),f=_R(d.pattern,{captureTransfers:c.captureTransfers,hiddenCaptures:c.hiddenCaptures}),p={pattern:f.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 g=f.hiddenCaptures.sort((S,A)=>S-A),y=Array.from(f.captureTransfers),v=o._strategy,b=p.pattern.length>=i.lazyCompileLength;(g.length||y.length||v||b)&&(p.options={...g.length&&{hiddenCaptures:g},...y.length&&{transfers:y},...v&&{strategy:v},...b&&{lazyCompile:b}})}return p}const sb=4294967295;class sD{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 d=o?.get(c);if(d){if(d instanceof RegExp)return d;if(a)return null;throw d}try{const f=s(c);return o?.set(c,f),f}catch(f){if(o?.set(c,f),a)return null;throw f}})}regexps;findNextMatchSync(t,i,a){const o=typeof t=="string"?t:t.content,s=[];function c(d,f,p=0){return{index:d,captureIndices:f.indices.map(g=>g==null?{start:sb,end:sb,length:0}:{start:g[0]+p,end:g[1]+p,length:g[1]-g[0]})}}for(let d=0;d<this.regexps.length;d++){const f=this.regexps[d];if(f)try{f.lastIndex=i;const p=f.exec(o);if(!p)continue;if(p.index===i)return c(d,p,0);s.push([d,p,0])}catch(p){if(this.options.forgiving)continue;throw p}}if(s.length){const d=Math.min(...s.map(f=>f[1].index));for(const[f,p,g]of s)if(p.index===d)return c(f,p,g)}return null}}function uD(e,t){return lD(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function cD(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=i=>uD(i,{target:t.target}),{createScanner(i){return new sD(i,t)},createString(i){return{content:i}}}}const ub=new Map;function dD({className:e,children:t}){const[i,a]=re.useState(null),o=e?.match(/language-([^\s]+)/)?.[1]??"text",s=String(t??"").replace(/\n$/,"");return re.useEffect(()=>{let c=!1;return a(null),fD(s,o).then(d=>{c||a(d)}),()=>{c=!0}},[s,o]),i===null?H.jsx("pre",{children:H.jsx("code",{children:t})}):H.jsx("div",{dangerouslySetInnerHTML:{__html:i}})}async function fD(e,t){const i=`${t}\0${e}`,a=ub.get(i);if(a)return a;const o=hD(e,t).catch(()=>null);return ub.set(i,o),o}async function hD(e,t){try{return await V0(e,{lang:t,theme:"github-dark-default"})}catch{return V0(e,{lang:"text",theme:"github-dark-default"})}}function Sh({content:e,className:t,variant:i}){const a=["markdown-content",i?`markdown-content-${i}`:null,t].filter(Boolean).join(" ");return H.jsx("div",{className:a,children:H.jsx(_A,{components:{pre({children:o}){if(re.isValidElement(o)){const{className:s,children:c}=o.props;return H.jsx(dD,{className:s,children:c})}return H.jsx("pre",{children:o})}},children:e})})}function pD({open:e,content:t,loading:i,onClose:a}){return H.jsx(qb,{open:e,title:"brief",ariaLabel:"Reviewer brief",closeLabel:"close brief",bodyClassName:"brief-dialog-body-wrap",onClose:a,children:i&&!t?H.jsx("div",{className:"brief-dialog-empty",children:"Generating brief…"}):H.jsx(Sh,{content:t,className:"brief-dialog-body",variant:"brief"})})}function z1({checked:e,label:t,onChange:i,className:a}){return H.jsxs("label",{className:`checkbox-btn${a?` ${a}`:""}`,children:[H.jsx("input",{type:"checkbox",className:"checkbox-input",checked:e,onChange:o=>i(o.target.checked)}),H.jsx("span",{className:"checkbox-box","aria-hidden":"true",children:e&&H.jsx(FE,{size:10,strokeWidth:3})}),H.jsx("span",{children:t})]})}function mD({open:e,thread:t,body:i,skipAgentResponse:a,onBodyChange:o,onSkipAgentResponseChange:s,onSubmit:c,onClose:d,onToggleResolved:f}){const p=re.useRef(null),g=re.useRef(null),y=t?"conversation":"new conversation",v=t?.resolved?"reopen":"resolve",b=t?"comment":"start thread",S=i.trim().length>0,A=re.useMemo(()=>t?.messages??[],[t]);re.useEffect(()=>{e&&p.current?.focus()},[e,t?.id]),re.useLayoutEffect(()=>{if(!e)return;const x=g.current;x&&(x.scrollTop=x.scrollHeight)},[A.length,e,t?.id,t?.loading]);const D=x=>{x.key==="Enter"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),S&&c()),x.key==="Escape"&&(x.preventDefault(),d())};return H.jsx(qb,{open:e,title:y,ariaLabel:y,closeLabel:"close conversation",bodyClassName:"detached-thread-dialog-body-wrap",onClose:d,children:H.jsxs("div",{className:"detached-thread-dialog-layout",children:[H.jsxs("div",{ref:g,className:"detached-thread-dialog-messages",children:[A.map((x,T)=>H.jsxs("div",{className:`detached-thread-dialog-message detached-thread-dialog-message-${x.role}`,children:[H.jsx("span",{className:"detached-thread-dialog-role",children:x.role==="user"?"you":"agent"}),H.jsx(Sh,{content:x.text,className:"detached-thread-dialog-text",variant:"thread"})]},`${x.role}:${T}:${x.text}`)),t?.loading&&H.jsxs("div",{className:"detached-thread-dialog-message detached-thread-dialog-message-assistant",children:[H.jsx("span",{className:"detached-thread-dialog-role",children:"agent"}),H.jsx("span",{className:"detached-thread-dialog-thinking",children:"thinking…"})]})]}),H.jsxs("div",{className:"detached-thread-dialog-composer",style:{borderTop:A.length===0?"none":void 0},children:[H.jsx("textarea",{ref:p,className:"text-input-area detached-thread-dialog-input",value:i,onChange:x=>o(x.target.value),onKeyDown:D,placeholder:t?"Reply…":"Start a conversation…",rows:3}),H.jsxs("div",{className:"detached-thread-dialog-actions",children:[H.jsx(z1,{checked:a,label:"skip agent reply",onChange:s}),t&&H.jsx("button",{type:"button",className:"btn detached-thread-dialog-secondary",onClick:()=>f(!t.resolved),children:v}),H.jsx("button",{type:"button",className:"btn primary",disabled:!S,onClick:c,children:b})]})]})]})})}const gD={position:"absolute",top:0,bottom:0,textAlign:"center"},yD={display:"contents"};function cb(){return null}const $s="diffs-container",bD=/(?=^From [a-f0-9]+ .+$)/m,Ts=/(?=^diff --git)/gm,db=/(?=^---\s+\S)/gm,vD=/(?=^@@ )/gm,_D=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,ef=new RegExp("(?<=\\n)"),SD=/^(---|\+\+\+)\s+([^\t\r\n]+)/,ED=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,xD=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,wD=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Eh="header-prefix",xh="header-metadata",wh="header-custom",zn={dark:"pierre-dark",light:"pierre-light"},U1="data-theme-css",H1="data-unsafe-css",CD="data-diffs-scrollbar-measure",P1="--diffs-scrollbar-gutter-measured",ga=1,kD={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},AD=Object.freeze({fromStart:0,fromEnd:0}),fb={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},TD={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Ul(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function LD(e,t){return typeof window>"u"&&t!=null?H.jsxs(H.Fragment,{children:[H.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):H.jsx(H.Fragment,{children:e})}const RD=re.createContext(void 0);function DD(){return re.useContext(RD)}const fr=new Map,tf=new Map,Bf=new Map,jf=new Set;function hb(e,t){e=Array.isArray(e)?e:[e];for(let i of e){let a;if(typeof i=="string"){if(a=fr.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,fr.has(i)||fr.set(i,a);jf.has(i)||(jf.add(i),t.loadThemeSync(a))}}const Hl=new Map,nf=new Map,ND=new Map,Vf=new Set;function pb(e,t){e=Array.isArray(e)?e:[e];for(const i of e){if(Vf.has(i.name))continue;let a=Hl.get(i.name);a==null&&(a=i,Hl.set(i.name,a)),Vf.add(a.name),t.loadLanguageSync(a.data)}}function B1(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function OD(e){if(B1())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=nf.get(e);if(t!=null)return t;try{let i=ND.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(Of,e)&&(i=Of[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 Hl.has(e)||Hl.set(e,s),s});return nf.set(e,a),await a}finally{nf.delete(e)}}function MD(e){return Hl.get(e)??OD(e)}async function ID(e){if(B1())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=tf.get(e);if(t!=null)return t;try{const i=Bf.get(e)??s1[e];if(i==null)throw new Error(`resolveTheme: No valid loader for ${e}`);const a=i().then(s=>zD(e,"default"in s?s.default:s));tf.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 fr.set(o.name,o),o}finally{tf.delete(e)}}function zD(e,t){const i=fr.get(e);return i??(t=Js(t),fr.set(e,t),t)}function UD(e){return fr.get(e)??ID(e)}function j1(e,t){if(Bf.has(e)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}Bf.set(e,t)}let Mn;async function HD({themes:e,langs:t,preferredHighlighter:i="shiki-js"}){Mn??=d1({themes:[],langs:["text"],engine:i==="shiki-wasm"?c1(w(()=>import("./wasm-CG6Dc4jp.js"),[])):cD()});const a=BD(Mn)?await Mn:Mn;Mn=a;const o=[];for(const c of t){if(c==="text"||c==="ansi")continue;const d=MD(c);"then"in d?o.push(d):pb(d,a)}const s=[];for(const c of e){const d=UD(c);"then"in d?s.push(d):hb(d,Mn)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(c=>{pb(c,a)}),Promise.all(s).then(c=>{hb(c,a)})]),a}function PD(){if(Mn!=null&&!("then"in Mn))return Mn}function BD(e=Mn){return e!=null&&"then"in e}j1("pierre-dark",async()=>{const{default:e}=await w(async()=>{const{default:t}=await import("./pierre-dark-DF2SEV7i.js");return{default:t}},[]);return{...e,name:"pierre-dark"}});j1("pierre-light",async()=>{const{default:e}=await w(async()=>{const{default:t}=await import("./pierre-light-DOlZxES8.js");return{default:t}},[]);return{...e,name:"pierre-light"}});function V1(e=zn){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function G1(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}const la=new Map,wl={"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 hr(e){if(la.has(e))return la.get(e)??"text";if(wl[e]!=null)return wl[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(la.has(t[1]))return la.get(t[1])??"text";if(wl[t[1]]!=null)return wl[t[1]]??"text"}const i=e.match(/\.([^.]+)$/)?.[1]??"";return la.has(i)?la.get(i)??"text":wl[i]??"text"}function ba(e){return e.replace(/\n$|\r\n$/,"")}function Un(e){return{type:"text",value:e}}function Re({tagName:e,children:t=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:t}}function qs({name:e,width:t=16,height:i=16,properties:a}){return Re({tagName:"svg",properties:{width:t,height:i,viewBox:"0 0 16 16",...a},children:[Re({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function jD(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 ys(e){return Re({tagName:"div",properties:{"data-gutter":""},children:e})}function VD(e,t,i,a={}){return Re({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":i,...a},children:t!=null?[Re({tagName:"span",properties:{"data-line-number-content":""},children:[Un(`${t}`)]})]:void 0})}function Sn(e,t,i){return Re({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 GD(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(Un(`
|
|
175
|
+
`)),e}const bs=Symbol("no-token"),rf=Symbol("multiple-tokens");function $1(e){const t=$D(e);if(t!=null)return t;let i=bs;const a=[];let o=[],s;const c=()=>{if(o.length===0||s==null){o=[],s=void 0;return}if(o.length===1){const f=o[0];if(f?.type==="element"){qD(f,s);for(const p of f.children)Ls(p)}else Ls(f);a.push(f),o=[],s=void 0;return}for(const f of o)Ls(f);a.push(Re({tagName:"span",properties:{"data-char":s},children:o})),o=[],s=void 0},d=f=>{if(f!==bs){if(f===rf){i=rf;return}if(i===bs){i=f;return}i!==f&&(i=rf)}};for(const f of e.children){const p=f.type==="element"?$1(f):bs;if(d(p),typeof p!="number"){c(),a.push(f);continue}s!=null&&s!==p&&c(),s??=p,o.push(f)}return c(),e.children=a,i}function $D(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function Ls(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)Ls(t)}}function qD(e,t){e.properties["data-char"]=t}function FD(e={}){const{classPrefix:t="__shiki_",classSuffix:i="",classReplacer:a=d=>d}=e,o=new Map;function s(d){return Object.entries(d).map(([f,p])=>`${f}:${p}`).join(";")}function c(d){const f=typeof d=="string"?d:s(d);let p=t+YD(f)+i;return p=a(p),o.has(p)||o.set(p,typeof d=="string"?d:{...d}),p}return{name:"@shikijs/transformers:style-to-class",pre(d){if(!d.properties.style)return;const f=c(d.properties.style);delete d.properties.style,this.addClassToHast(d,f)},tokens(d){for(const f of d)for(const p of f){if(!p.htmlStyle)continue;const g=c(p.htmlStyle);p.htmlStyle={},p.htmlAttrs||={},p.htmlAttrs.class?p.htmlAttrs.class+=` ${g}`:p.htmlAttrs.class=g}},getClassRegistry(){return o},getCSS(){let d="";for(const[f,p]of o.entries())d+=`.${f}{${typeof p=="string"?p:s(p)}}`;return d},clearRegistry(){o.clear()}}}function YD(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 XD(e=!1,t=!1){const i={lineInfo:[]},a=[{line(o){return delete o.properties.class,o},pre(o){const s=jD(o),c=[];if(s!=null){let d=1;for(const f of s.children)f.type==="element"&&(e&&$1(f),c.push(GD(f,d,i)),d++);s.children=c}return o},...e?{tokens(o){for(const s of o){let c=0;for(const d of s){const f=d;f.__lineChar??=c,c+=d.content.length}}},preprocess(o,s){s.mergeWhitespaces="never"},span(o,s,c,d,f){if(f?.offset!=null&&f.content!=null){const p=f.__lineChar;return p!=null&&(o.properties["data-char"]=p),o}return o}}:null}];return t&&a.push(QD,mb),{state:i,transformers:a,toClass:mb}}const mb=FD({classPrefix:"hl-"}),QD={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 En(e){return`--${e==="token"?"diffs-token":"diffs"}-`}function ZD({theme:e=zn,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+=`${En("global")}fg:${o.fg};`,a+=`${En("global")}bg:${o.bg};`,a+=af(o,i)}else{let o=t.getTheme(e.dark);a+=`${En("global")}dark:${o.fg};`,a+=`${En("global")}dark-bg:${o.bg};`,a+=af(o,"dark"),o=t.getTheme(e.light),a+=`${En("global")}light:${o.fg};`,a+=`${En("global")}light-bg:${o.bg};`,a+=af(o,"light")}return a}function af(e,t){t=t!=null?`${t}-`:"";let i="";const a=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];a!=null&&(i+=`${En("global")}${t}addition-color:${a};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(i+=`${En("global")}${t}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(i+=`${En("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 yb(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function lf(e,t){return G1(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function KD(e){const t=e.lang??hr(e.name),i=e.lang??(e.prevName!=null?hr(e.prevName):"text");return t==="text"&&i==="text"}function Fs({diff:e,diffStyle:t,startingLine:i=0,totalLines:a=1/0,expandedHunks:o,collapsedContextThreshold:s=ga,callback:c}){const d={finalHunk:e.hunks.at(-1),viewportStart:i,viewportEnd:i+a,isWindowedHighlight:i>0||a<1/0,splitCount:0,unifiedCount:0,shouldBreak(){if(!d.isWindowedHighlight)return!1;const g=d.unifiedCount>=i+a,y=d.splitCount>=i+a;return t==="unified"?g:(t==="split"||g)&&y},shouldSkip(g,y){if(!d.isWindowedHighlight)return!1;const v=d.unifiedCount+g<i,b=d.splitCount+y<i;return t==="unified"?v:(t==="split"||v)&&b},incrementCounts(g,y){(t==="unified"||t==="both")&&(d.unifiedCount+=g),(t==="split"||t==="both")&&(d.splitCount+=y)},isInWindow(g,y){if(!d.isWindowedHighlight)return!0;const v=d.isInUnifiedWindow(g),b=d.isInSplitWindow(y);return t==="unified"?v:t==="split"?b:v||b},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,y=!1){return y||(t==="unified"?d.incrementCounts(1,0):t==="split"?d.incrementCounts(0,1):d.incrementCounts(1,1)),c(g)??!1}};e:for(const[g,y]of e.hunks.entries()){let A=function(G,Y){return b==null||b.collapsedLines<=0||b.fromStart+b.fromEnd>0?0:t==="unified"?G===y.unifiedLineStart+y.unifiedLineCount-1?b.collapsedLines:0:Y===y.splitLineStart+y.splitLineCount-1?b.collapsedLines:0},D=function(){if(v.collapsedLines===0)return 0;const G=v.collapsedLines;return v.collapsedLines=0,G};var f=A,p=D;if(d.shouldBreak())break;const v=bb(e.isPartial,y.collapsedBefore,o,g,s),b=(()=>{if(y!==d.finalHunk||!WD(e))return;const G=e.additionLines.length-(y.additionLineIndex+y.additionCount),Y=e.deletionLines.length-(y.deletionLineIndex+y.deletionCount);if(G!==Y)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${G}, deletions=${Y}) for ${e.name}`);const le=Math.min(G,Y);return bb(e.isPartial,le,o,e.hunks.length,s)})(),S=v.fromStart+v.fromEnd;if(d.shouldSkip(S,S))d.incrementCounts(S,S),D();else{let G=y.unifiedLineStart-v.rangeSize,Y=y.splitLineStart-v.rangeSize,le=y.deletionLineIndex-v.rangeSize,te=y.additionLineIndex-v.rangeSize,F=y.deletionStart-v.rangeSize,ce=y.additionStart-v.rangeSize,ie=0;for(;ie<v.fromStart;){if(d.isInWindow(0,0)){if(d.emit({hunkIndex:g,hunk:y,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:F+ie,lineIndex:le+ie,noEOFCR:!1,unifiedLineIndex:G+ie,splitLineIndex:Y+ie},additionLine:{unifiedLineIndex:G+ie,splitLineIndex:Y+ie,lineIndex:te+ie,lineNumber:ce+ie,noEOFCR:!1}}))break e}else d.incrementCounts(1,1);ie++}for(G=y.unifiedLineStart-v.fromEnd,Y=y.splitLineStart-v.fromEnd,le=y.deletionLineIndex-v.fromEnd,te=y.additionLineIndex-v.fromEnd,F=y.deletionStart-v.fromEnd,ce=y.additionStart-v.fromEnd,ie=0;ie<v.fromEnd;){if(d.isInWindow(0,0)){if(d.emit({hunkIndex:g,hunk:y,collapsedBefore:D(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:F+ie,lineIndex:le+ie,noEOFCR:!1,unifiedLineIndex:G+ie,splitLineIndex:Y+ie},additionLine:{unifiedLineIndex:G+ie,splitLineIndex:Y+ie,lineIndex:te+ie,lineNumber:ce+ie,noEOFCR:!1}}))break e}else d.incrementCounts(1,1);ie++}}let x=y.unifiedLineStart,T=y.splitLineStart,k=y.deletionLineIndex,I=y.additionLineIndex,z=y.deletionStart,R=y.additionStart;const $=y.hunkContent.at(-1);for(const G of y.hunkContent){if(d.shouldBreak())break e;const Y=G===$;if(G.type==="context"){if(d.shouldSkip(G.lines,G.lines))d.incrementCounts(G.lines,G.lines),D();else{let le=0;for(;le<G.lines;){if(d.isInWindow(0,0)){const te=Y&&le===G.lines-1,F=x+le,ce=T+le;if(d.emit({hunkIndex:g,hunk:y,collapsedBefore:D(),collapsedAfter:A(F,ce),type:"context",deletionLine:{lineNumber:z+le,lineIndex:k+le,noEOFCR:te&&y.noEOFCRDeletions,unifiedLineIndex:F,splitLineIndex:ce},additionLine:{unifiedLineIndex:F,splitLineIndex:ce,lineIndex:I+le,lineNumber:R+le,noEOFCR:te&&y.noEOFCRAdditions}}))break e}else d.incrementCounts(1,1);le++}}x+=G.lines,T+=G.lines,k+=G.lines,I+=G.lines,z+=G.lines,R+=G.lines}else{const le=Math.max(G.deletions,G.additions),te=G.deletions+G.additions;if(!d.shouldSkip(te,le)){const F=JD(d,G,t);for(const[ce,ie]of F)for(let ne=ce;ne<ie;ne++){const P=A(x+ne,t==="unified"?T+(ne<G.deletions?ne:ne-G.deletions):T+ne);if(d.emit(eN({hunkIndex:g,hunk:y,collapsedBefore:D(),collapsedAfter:P,diffStyle:t,index:ne,unifiedLineIndex:x,splitLineIndex:T,additionLineIndex:I,deletionLineIndex:k,additionLineNumber:R,deletionLineNumber:z,content:G,isLastContent:Y,unifiedCount:te,splitCount:le}),!0))break e}}D(),d.incrementCounts(te,le),x+=te,T+=le,k+=G.deletions,I+=G.additions,z+=G.deletions,R+=G.additions}}if(b!=null){const{collapsedLines:G,fromStart:Y,fromEnd:le}=b,te=Y+le;let F=0;for(;F<te;){if(d.shouldBreak())break e;if(d.isInWindow(0,0)){const ce=F===te-1;if(d.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:ce?G:0,type:"context-expanded",deletionLine:{lineNumber:z+F,lineIndex:k+F,noEOFCR:!1,unifiedLineIndex:x+F,splitLineIndex:T+F},additionLine:{unifiedLineIndex:x+F,splitLineIndex:T+F,lineIndex:I+F,lineNumber:R+F,noEOFCR:!1}}))break e}else d.incrementCounts(1,1);F++}}}}function bb(e,t,i,a,o){if(t=Math.max(t,0),t===0||e)return{fromStart:0,fromEnd:0,rangeSize:t,collapsedLines:Math.max(t,0)};if(i===!0||t<=o)return{fromStart:t,fromEnd:0,rangeSize:t,collapsedLines:0};const s=i?.get(a),c=Math.min(Math.max(s?.fromStart??0,0),t),d=Math.min(Math.max(s?.fromEnd??0,0),t),f=c+d,p=f>=t;return{fromStart:p?t:c,fromEnd:p?0:d,rangeSize:t,collapsedLines:Math.max(t-f,0)}}function WD(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 JD(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 d(y,v){if(y+v<=e.viewportStart||y>=e.viewportEnd)return;const b=Math.max(0,e.viewportStart-y),S=Math.min(v,e.viewportEnd-y);return S>b?[b,S]:void 0}function f(y,v){return s==="split"?y:v==="additions"?[y[0]+t.deletions,y[1]+t.deletions]:y}function p(y,v){if(y==null)return;const[b,S]=f(y,v);S>b&&c.push([b,S])}if(a&&(p(d(e.unifiedCount,t.deletions),"deletions"),p(d(e.unifiedCount+t.deletions,t.additions),"additions")),o&&(p(d(e.splitCount,t.deletions),"deletions"),p(d(e.splitCount,t.additions),"additions")),c.length===0)return c;c.sort((y,v)=>y[0]-v[0]);const g=[c[0]];for(const[y,v]of c.slice(1)){const b=g[g.length-1];y<=b[1]?b[1]=Math.max(b[1],v):g.push([y,v])}return g}function eN({hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,diffStyle:o,index:s,unifiedLineIndex:c,splitLineIndex:d,additionLineIndex:f,deletionLineIndex:p,additionLineNumber:g,deletionLineNumber:y,content:v,isLastContent:b,unifiedCount:S,splitCount:A}){const D=s<v.deletions?c+s:void 0,x=o==="unified"?s>=v.deletions?c+s:void 0:s<v.additions?c+v.deletions+s:void 0,T=o==="unified"?d+(s<v.deletions?s:s-v.deletions):d+s,k=s<v.deletions?p+s:void 0,I=s<v.deletions?y+s:void 0,z=o==="unified"?s>=v.deletions?f+(s-v.deletions):void 0:s<v.additions?f+s:void 0,R=o==="unified"?s>=v.deletions?g+(s-v.deletions):void 0:s<v.additions?g+s:void 0,$=o==="unified"?b&&s===v.deletions-1&&t.noEOFCRDeletions:b&&s===A-1&&t.noEOFCRDeletions,G=o==="unified"?b&&s===S-1&&t.noEOFCRAdditions:b&&s===A-1&&t.noEOFCRAdditions,Y=k!=null&&I!=null&&D!=null?{lineNumber:I,lineIndex:k,noEOFCR:$,unifiedLineIndex:D,splitLineIndex:T}:void 0,le=z!=null&&R!=null&&x!=null?{unifiedLineIndex:x,splitLineIndex:T,lineIndex:z,lineNumber:R,noEOFCR:G}:void 0;if(Y==null&&le!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:void 0,additionLine:le};if(Y!=null&&le==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:Y,additionLine:void 0};if(Y==null||le==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:Y,additionLine:le}}class Ch{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),d=this.removeEmpty(this.tokenize(s,a)),f=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(d,f,a,o)}diffWithOptionsObj(t,i,a,o){var s;const c=T=>{if(T=this.postProcess(T,a),o){setTimeout(function(){o(T)},0);return}else return T},d=i.length,f=t.length;let p=1,g=d+f;a.maxEditLength!=null&&(g=Math.min(g,a.maxEditLength));const y=(s=a.timeout)!==null&&s!==void 0?s:1/0,v=Date.now()+y,b=[{oldPos:-1,lastComponent:void 0}];let S=this.extractCommon(b[0],i,t,0,a);if(b[0].oldPos+1>=f&&S+1>=d)return c(this.buildValues(b[0].lastComponent,i,t));let A=-1/0,D=1/0;const x=()=>{for(let T=Math.max(A,-p);T<=Math.min(D,p);T+=2){let k;const I=b[T-1],z=b[T+1];I&&(b[T-1]=void 0);let R=!1;if(z){const G=z.oldPos-T;R=z&&0<=G&&G<d}const $=I&&I.oldPos+1<f;if(!R&&!$){b[T]=void 0;continue}if(!$||R&&I.oldPos<z.oldPos?k=this.addToPath(z,!0,!1,0,a):k=this.addToPath(I,!1,!0,1,a),S=this.extractCommon(k,i,t,T,a),k.oldPos+1>=f&&S+1>=d)return c(this.buildValues(k.lastComponent,i,t))||!0;b[T]=k,k.oldPos+1>=f&&(D=Math.min(D,T-1)),S+1>=d&&(A=Math.max(A,T+1))}p++};if(o)(function T(){setTimeout(function(){if(p>g||Date.now()>v)return o(void 0);x()||T()},0)})();else for(;p<=g&&Date.now()<=v;){const T=x();if(T)return T}}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,d=a.length;let f=t.oldPos,p=f-o,g=0;for(;p+1<c&&f+1<d&&this.equals(a[f+1],i[p+1],s);)p++,f++,g++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return g&&!s.oneChangePerToken&&(t.lastComponent={count:g,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=f,p}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 d=0,f=0,p=0;for(;d<c;d++){const g=o[d];if(g.removed)g.value=this.join(a.slice(p,p+g.count)),p+=g.count;else{if(!g.added&&this.useLongestToken){let y=i.slice(f,f+g.count);y=y.map(function(v,b){const S=a[p+b];return S.length>v.length?S:v}),g.value=this.join(y)}else g.value=this.join(i.slice(f,f+g.count));f+=g.count,g.added||(p+=g.count)}}return o}}class tN extends Ch{}const nN=new tN;function iN(e,t,i){return nN.diff(e,t,i)}const vb="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 rN extends Ch{tokenize(t){const i=new RegExp(`(\\r?\\n)|[${vb}]+|[^\\S\\n\\r]+|[^${vb}]`,"ug");return t.match(i)||[]}}const aN=new rN;function lN(e,t,i){return aN.diff(e,t,i)}class oN extends Ch{constructor(){super(...arguments),this.tokenize=uN}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 sN=new oN;function _b(e,t,i){return sN.diff(e,t,i)}function uN(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 cN={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function Sb(e,t,i,a,o,s,c){let d;c?typeof c=="function"?d={callback:c}:d=c:d={},typeof d.context>"u"&&(d.context=4);const f=d.context;if(d.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(d.callback){const{callback:g}=d;_b(i,a,Object.assign(Object.assign({},d),{callback:y=>{const v=p(y);g(v)}}))}else return p(_b(i,a,d));function p(g){if(!g)return;g.push({value:"",lines:[]});function y(T){return T.map(function(k){return" "+k})}const v=[];let b=0,S=0,A=[],D=1,x=1;for(let T=0;T<g.length;T++){const k=g[T],I=k.lines||fN(k.value);if(k.lines=I,k.added||k.removed){if(!b){const z=g[T-1];b=D,S=x,z&&(A=f>0?y(z.lines.slice(-f)):[],b-=A.length,S-=A.length)}for(const z of I)A.push((k.added?"+":"-")+z);k.added?x+=I.length:D+=I.length}else{if(b)if(I.length<=f*2&&T<g.length-2)for(const z of y(I))A.push(z);else{const z=Math.min(I.length,f);for(const $ of y(I.slice(0,z)))A.push($);const R={oldStart:b,oldLines:D-b+z,newStart:S,newLines:x-S+z,lines:A};v.push(R),b=0,S=0,A=[]}D+=I.length,x+=I.length}}for(const T of v)for(let k=0;k<T.lines.length;k++)T.lines[k].endsWith(`
|
|
181
|
+
`)?T.lines[k]=T.lines[k].slice(0,-1):(T.lines.splice(k+1,0,"\"),k++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:s,hunks:v}}}function Gf(e,t){if(t||(t=cN),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=>Gf(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 dN(e,t,i,a,o,s,c){if(typeof c=="function"&&(c={callback:c}),c?.callback){const{callback:d}=c;Sb(e,t,i,a,o,s,Object.assign(Object.assign({},c),{callback:f=>{d(f?Gf(f,c.headerOptions):void 0)}}))}else{const d=Sb(e,t,i,a,o,s,c);return d?Gf(d,c?.headerOptions):void 0}}function fN(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 Eb({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 vs({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 hN={forcePlainText:!1};function pN(e,t,i,{forcePlainText:a,startingLine:o,totalLines:s,expandedHunks:c,collapsedContextThreshold:d=ga}=hN){a?(o??=0,s??=1/0):(o=0,s=1/0);const f=o>0||s<1/0,p=typeof i.theme=="string"?t.getTheme(i.theme).type:void 0,g=ZD({theme:i.theme,highlighter:t}),y=a&&!f&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,v={deletionLines:[],additionLines:[]},{maxLineDiffLength:b}=i,S=!a&&!e.isPartial,A=a?c:void 0,D=new Map;function x(k){const I=S?0:k,z=D.get(I)??gN();return D.set(I,z),z}function T(k,I,z,R){if(f){let $=z.at(-1);($==null||$.targetIndex+$.count!==I)&&($={targetIndex:I,originalOffset:R.length,count:0},z.push($)),$.count++}R.push(k)}Fs({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:f?A:!0,collapsedContextThreshold:d,callback:({hunkIndex:k,additionLine:I,deletionLine:z,type:R})=>{const $=x(k),G=I!=null?I.splitLineIndex:z.splitLineIndex;R==="change"&&I!=null&&z!=null&&mN({additionLine:e.additionLines[I.lineIndex],deletionLine:e.deletionLines[z.lineIndex],deletionLineIndex:$.deletionContent.length,additionLineIndex:$.additionContent.length,deletionDecorations:$.deletionDecorations,additionDecorations:$.additionDecorations,lineDiffType:y,maxLineDiffLength:b}),z!=null&&(T(e.deletionLines[z.lineIndex],z.lineIndex,$.deletionSegments,$.deletionContent),$.deletionInfo.push({type:R==="change"?"change-deletion":R,lineNumber:z.lineNumber,altLineNumber:R==="change"?void 0:I.lineNumber??void 0,lineIndex:`${z.unifiedLineIndex},${G}`})),I!=null&&(T(e.additionLines[I.lineIndex],I.lineIndex,$.additionSegments,$.additionContent),$.additionInfo.push({type:R==="change"?"change-addition":R,lineNumber:I.lineNumber,altLineNumber:R==="change"?void 0:z.lineNumber??void 0,lineIndex:`${I.unifiedLineIndex},${G}`}))}});for(const k of D.values()){if(k.deletionContent.length===0&&k.additionContent.length===0)continue;const I={name:e.prevName??e.name,contents:k.deletionContent.value},z={name:e.name,contents:k.additionContent.value},{deletionLines:R,additionLines:$}=yN({deletionFile:I,deletionInfo:k.deletionInfo,deletionDecorations:k.deletionDecorations,additionFile:z,additionInfo:k.additionInfo,additionDecorations:k.additionDecorations,highlighter:t,options:i,languageOverride:a?"text":e.lang});if(S){v.deletionLines=R,v.additionLines=$;continue}if(k.deletionSegments.length>0)for(const G of k.deletionSegments)for(let Y=0;Y<G.count;Y++)v.deletionLines[G.targetIndex+Y]=R[G.originalOffset+Y];else v.deletionLines.push(...R);if(k.additionSegments.length>0)for(const G of k.additionSegments)for(let Y=0;Y<G.count;Y++)v.additionLines[G.targetIndex+Y]=$[G.originalOffset+Y];else v.additionLines.push(...$)}return{code:v,themeStyles:g,baseThemeType:p}}function mN({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:a,deletionDecorations:o,additionDecorations:s,lineDiffType:c,maxLineDiffLength:d}){if(e==null||t==null||c==="none"||(e=ba(e),t=ba(t),e.length>d||t.length>d))return;const f=c==="char"?iN(e,t):lN(e,t),p=[],g=[],y=c==="word-alt",v=f.at(-1);for(const S of f){const A=S===v;!S.added&&!S.removed?(vs({item:S,arr:p,enableJoin:y,isNeutral:!0,isLastItem:A}),vs({item:S,arr:g,enableJoin:y,isNeutral:!0,isLastItem:A})):S.removed?vs({item:S,arr:p,enableJoin:y,isLastItem:A}):vs({item:S,arr:g,enableJoin:y,isLastItem:A})}let b=0;for(const S of p)S[0]===1&&o.push(Eb({line:i,spanStart:b,spanLength:S[1].length})),b+=S[1].length;b=0;for(const S of g)S[0]===1&&s.push(Eb({line:a,spanStart:b,spanLength:S[1].length})),b+=S[1].length}function gN(){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 yN({deletionFile:e,additionFile:t,deletionInfo:i,additionInfo:a,highlighter:o,deletionDecorations:s,additionDecorations:c,languageOverride:d,options:{theme:f=zn,...p}}){const g=d??hr(e.name),y=d??hr(t.name),{state:v,transformers:b}=XD(p.useTokenTransformer),S=typeof f=="string"?{...p,lang:"text",theme:f,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:En("token")}:{...p,lang:"text",themes:f,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:En("token")};return{deletionLines:e.contents===""?[]:(S.lang=g,v.lineInfo=i,S.decorations=s,gb(o.codeToHast(ba(e.contents),S))),additionLines:t.contents===""?[]:(S.lang=y,S.decorations=c,v.lineInfo=a,gb(o.codeToHast(ba(t.contents),S)))}}const bN=re.createContext(void 0);function vN(e){const t=re.useRef(e);return re.useInsertionEffect(()=>{t.current=e}),re.useCallback((...i)=>t.current(...i),[])}function _N(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function xb(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function SN(){return Re({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[qs({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var EN=class{hoveredLine;hoveredToken;pre;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;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.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.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()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e){const t=!(e===this.selectedRange||xb(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.selectedRange=e,this.renderSelection(),t&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode==="diff"&&this.hoveredLine.type==="diff-line")return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode==="file"&&this.hoveredLine.type==="line")return{lineNumber:this.hoveredLine.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&&Tb(e.composedPath())||(ai(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{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||(ai(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(ai(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){ai(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.gutterUtilityContainer?.remove(),this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine())};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:i}=this.options,a=t.composedPath();ai(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:a});const o=this.resolvePointerTarget(a);ai(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:c,onLineEnter:d,onLineLeave:f,onTokenClick:p,onTokenEnter:g,onTokenLeave:y,onHunkExpand:v,onMergeConflictActionClick:b}=this.options;switch(e){case"move":{const S=of(o)&&this.hoveredLine?.lineElement===o.lineElement;Rs(o)&&this.hoveredToken?.tokenElement===o.tokenElement||(this.hoveredToken!=null&&(y?.(this.hoveredToken,t),this.clearHoveredToken()),Rs(o)&&(this.setHoveredToken(this.toTokenEventBaseProps(o)),g?.(this.hoveredToken,t))),S||(this.hoveredLine!=null&&(this.gutterUtilityContainer?.remove(),f?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),of(o)&&(this.setHoveredLine(this.toEventBaseProps(o)),this.gutterUtilityContainer!=null&&o.numberElement.appendChild(this.gutterUtilityContainer),d?.({...this.hoveredLine,event:t})));break}case"click":{if(o==null)break;if(CN(o)&&b!=null){b(o);break}if(wN(o)&&v!=null){v(o.hunkIndex,o.all||t.shiftKey?"both":o.direction,o.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!of(o))break;Rs(o)&&p!=null&&p(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:d,onTokenEnter:f,onTokenLeave:p,onHunkExpand:g,onMergeConflictActionClick:y,enableGutterUtility:v=!1,enableLineSelection:b=!1,onGutterUtilityClick:S}=this.options,A=S!=null,D=i!=="disabled"||a!=null||o!=null||s!=null||c!=null||d!=null||f!=null||p!=null||g!=null||y!=null||v||b||A;D&&!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,ai(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const k=[];return(t==="both"||t==="click")&&(a!=null&&k.push("onLineClick"),o!=null&&k.push("onLineNumberClick"),g!=null&&k.push("expandable hunk separators"),y!=null&&k.push("merge conflict actions")),k})()),ai(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),ai(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!D&&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 x=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",T=this.pointerSession.mode==="gutterSelecting";(!b&&x||!A&&T)&&(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();Tb(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e,t):this.startLineSelectionFromPointerDown(e,t)};startLineSelectionFromPointerDown(e,t){const{enableLineSelection:i=!1}=this.options;if(!i)return;const a=this.getSelectionPointerInfo(t,!0);if(a==null)return;const{pre:o}=this;if(o==null)return;e.preventDefault();const{lineNumber:s,eventSide:c,lineIndex:d}=a;if(e.shiftKey&&this.selectedRange!=null){const f=this.getIndexesFromSelection(this.selectedRange,o.getAttribute("data-diff-type")==="split");if(f==null)return;const p=f.start<=f.end?d>=f.start:d<=f.end;this.selectionAnchor={lineNumber:p?this.selectedRange.start:this.selectedRange.end,side:p?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(s,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===s&&this.selectedRange?.end===s){const f={lineNumber:s,side:c};this.selectionAnchor=f,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:f,pending:f},this.attachDocumentPointerListeners();return}this.selectedRange=null,this.selectionAnchor={lineNumber:s,side:c},this.updateSelection(s,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e,t){const{enableLineSelection:i=!1,onGutterUtilityClick:a}=this.options;if(a==null)return;const o=this.getSelectionPointFromPath(t);o!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:o},i&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(o.lineNumber,o.side,!1),this.notifySelectionStart(this.selectedRange)),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;const i=this.getSelectionPointFromPath(e.composedPath());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;const i=this.getSelectionPointerInfo(e.composedPath(),!1);if(i==null||this.selectionAnchor==null)return;this.updateSelection(i.lineNumber,i.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;const i=this.getSelectionPointerInfo(e.composedPath(),!1);if(i==null||this.selectionAnchor==null)return;const a={lineNumber:i.lineNumber,side:i.eventSide};if(_N(this.pointerSession.pending,a))return;this.updateSelection(i.lineNumber,i.eventSide,!1),this.notifySelectionStart(this.selectedRange),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;const a=this.getSelectionPointFromPath(e.composedPath());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.selectedRange),this.notifySelectionCommitted()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()}};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.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=ma(SN());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)}}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"})}getSelectionPointerInfo(e,t){const i=this.resolvePointerTarget(e);if($f(i)&&!(t&&!i.numberColumn)&&i.splitLineIndex!=null)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:this.mode==="diff"?i.side:void 0}}getSelectionPointFromPath(e){const t=this.resolvePointerTarget(e);if($f(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}getLineIndex(e,t){const{getLineIndex:i}=this.options;return i!=null?i(e,t):[e-1,e-1]}updateSelection(e,t,i=!0){const{selectedRange:a}=this;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)}xb(a??void 0,o??void 0)||(this.selectedRange=o,i&&this.notifySelectionChangeDelta(),this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection))}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 d of e)d.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 d of t){const[f,p]=d.children,g=p.children.length;if(g!==f.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let y=0;y<g;y++){const v=p.children[y],b=f.children[y];if(!(v instanceof HTMLElement)||!(b instanceof HTMLElement))continue;const S=this.parseLineIndex(v,i);if((S??0)>c)break;if(S==null||S<s)continue;let A=o?"single":S===s?"first":S===c?"last":"";v.setAttribute("data-selected-line",A),b.setAttribute("data-selected-line",A),b.nextSibling instanceof HTMLElement&&v.nextSibling instanceof HTMLElement&&(v.nextSibling.hasAttribute("data-line-annotation")||v.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(o?(A="last",v.setAttribute("data-selected-line","first")):S===s?A="":S===c&&v.setAttribute("data-selected-line",""),v.nextSibling.setAttribute("data-selected-line",A),b.nextSibling.setAttribute("data-selected-line",A))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.selectedRange??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.selectedRange??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,d,f,p,g,y;for(const b of e){if(!(b instanceof HTMLElement))continue;if(y==null&&b.hasAttribute("data-merge-conflict-action")){const x=b.getAttribute("data-merge-conflict-action")??void 0,T=b.getAttribute("data-merge-conflict-conflict-index")??void 0,k=T!=null?Number.parseInt(T,10):NaN;kN(x)&&Number.isFinite(k)&&(y={kind:"merge-conflict-action",resolution:x,conflictIndex:k})}if(d==null&&b.hasAttribute("data-char")){d=b;const x=b.getAttribute("data-char");if(x!=null){const T=Number.parseInt(x,10);if(!Number.isNaN(T)){const k=b.textContent??"",I=T+k.length;(k.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(f={tokenElement:d,lineCharStart:T,lineCharEnd:I,tokenText:k});continue}}}const S=c==null?b.getAttribute("data-column-number")??void 0:void 0;if(S!=null){c=b,g=Number.parseInt(S,10),t=!0,i=Ab(b),s=b.getAttribute("data-line-index")??void 0;continue}const A=o==null?b.getAttribute("data-line")??void 0:void 0;if(A!=null){o=b,g=Number.parseInt(A,10),i=Ab(b),s=b.getAttribute("data-line-index")??void 0;continue}if(p==null&&(b.hasAttribute("data-expand-button")||b.hasAttribute("data-unmodified-lines"))){p={hunkIndex:void 0,direction:b.hasAttribute("data-expand-up")?"up":b.hasAttribute("data-expand-down")?"down":"both",all:b.hasAttribute("data-expand-all-button")};continue}const D=p!=null?b.getAttribute("data-expand-index")??void 0:void 0;if(p!=null&&D!=null){const x=Number.parseInt(D,10);Number.isNaN(x)||(p.hunkIndex=x);continue}if(a==null&&b.hasAttribute("data-code")){a=b;break}}if(y!=null)return y;if(p?.hunkIndex!=null)return{type:"line-info",hunkIndex:p.hunkIndex,direction:p.direction,all:p.all};if(o??=s!=null?Cb(a,`[data-line][data-line-index="${s}"]`):void 0,c??=s!=null?Cb(a,`[data-column-number][data-line-index="${s}"]`):void 0,a==null||o==null||c==null||i==null||g==null||Number.isNaN(g))return;const v=this.parseLineIndex(o,this.isSplitDiff());return f!=null?this.mode==="file"?{kind:"token",lineType:i,lineElement:o,lineNumber:g,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:v,...f}:{kind:"token",lineType:i,lineElement:o,lineNumber:g,numberColumn:t,numberElement:c,side:kb(i,a),splitLineIndex:v,...f}:this.mode==="file"?{kind:"line",lineType:i,lineElement:o,lineNumber:g,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:v}:{kind:"line",lineType:i,lineElement:o,lineNumber:g,numberColumn:t,numberElement:c,side:kb(i,a),splitLineIndex:v}}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 wb({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,enableHoverUtility:i,lineHoverHighlight:a,onGutterUtilityClick:o,onLineClick:s,onLineEnter:c,onLineLeave:d,onLineNumberClick:f,onTokenClick:p,onTokenEnter:g,onTokenLeave:y,renderGutterUtility:v,renderHoverUtility:b,__debugPointerEvents:S,enableLineSelection:A,onLineSelected:D,onLineSelectionStart:x,onLineSelectionChange:T,onLineSelectionEnd:k},I,z,R){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:xN({enableGutterUtility:t,enableHoverUtility:i,renderGutterUtility:v,renderHoverUtility:b,onGutterUtilityClick:o}),usesCustomGutterUtility:v!=null||b!=null,lineHoverHighlight:a,onGutterUtilityClick:o,onHunkExpand:I,onMergeConflictActionClick:R,onLineClick:s,onLineEnter:c,onLineLeave:d,onLineNumberClick:f,onTokenClick:p,onTokenEnter:g,onTokenLeave:y,__debugPointerEvents:S,enableLineSelection:A,onLineSelected:D,onLineSelectionStart:x,onLineSelectionChange:T,onLineSelectionEnd:k,getLineIndex:z}}function xN({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:i,renderHoverUtility:a,onGutterUtilityClick:o}){if(e!==void 0&&t!==void 0)throw new Error("Cannot use both 'enableGutterUtility' and deprecated 'enableHoverUtility'. Use only 'enableGutterUtility'.");if(i!=null&&a!=null)throw new Error("Cannot use both 'renderGutterUtility' and deprecated 'renderHoverUtility'. Use only 'renderGutterUtility'.");if(o!=null&&(i!=null||a!=null))throw new Error("Cannot use both 'onGutterUtilityClick' and render utility callbacks ('renderGutterUtility'/'renderHoverUtility'). Use only one gutter utility API.");return e??t??!1}function $f(e){return e!=null&&"kind"in e&&e.kind==="line"}function Rs(e){return e!=null&&"kind"in e&&e.kind==="token"}function of(e){return $f(e)||Rs(e)}function wN(e){return"type"in e&&e.type==="line-info"}function CN(e){return"kind"in e&&e.kind==="merge-conflict-action"}function kN(e){return e==="current"||e==="incoming"||e==="both"}function Cb(e,t){const i=e?.querySelector(t);return i instanceof HTMLElement?i:void 0}function kb(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function Ab(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 Tb(e){for(const t of e)if(t instanceof HTMLElement&&t.hasAttribute("data-utility-button"))return!0;return!1}function ai(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 AN=class{observedNodes=new Map;queuedUpdates=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear(),this.queuedUpdates.clear()}resizeObserver;setup(e,t){this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);const i=e.querySelectorAll("code"),a=new Map(this.observedNodes);this.observedNodes.clear();for(const o of i){let s=a.get(o);if(s!=null&&s.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let c=o.firstElementChild;c instanceof HTMLElement||(c=null),s!=null?(this.observedNodes.set(o,s),a.delete(o),s.numberElement!==c?(s.numberElement!=null&&this.resizeObserver.unobserve(s.numberElement),c!=null&&(this.resizeObserver.observe(c),a.delete(c),this.observedNodes.set(c,s)),s.numberElement=c):s.numberElement!=null&&(a.delete(s.numberElement),this.observedNodes.set(s.numberElement,s))):(s={type:"code",codeElement:o,numberElement:c,codeWidth:"auto",numberWidth:0},this.observedNodes.set(o,s),this.resizeObserver.observe(o),c!=null&&(this.observedNodes.set(c,s),this.resizeObserver.observe(c)))}if(i.length>1&&!t){const o=e.querySelectorAll('[data-line-annotation*=","]'),s=new Map;for(const c of o){if(!(c instanceof HTMLElement))continue;const{lineAnnotation:d=""}=c.dataset;if(!/^\d+,\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:c});continue}let f=s.get(d);f==null&&(f=[],s.set(d,f)),f.push(c)}for(const[c,d]of s){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",c,d);continue}const[f,p]=d,g=f.firstElementChild,y=p.firstElementChild;if(!(f instanceof HTMLElement)||!(p instanceof HTMLElement)||!(g instanceof HTMLElement)||!(y instanceof HTMLElement))continue;let v=a.get(g);if(v!=null){this.observedNodes.set(g,v),this.observedNodes.set(y,v),a.delete(g),a.delete(y);continue}v={type:"annotations",column1:{container:f,child:g,childHeight:g.getBoundingClientRect().height},column2:{container:p,child:y,childHeight:y.getBoundingClientRect().height},currentHeight:"auto"};const b=Math.max(v.column1.childHeight,v.column2.childHeight);this.applyNewHeight(v,b),this.observedNodes.set(g,v),this.observedNodes.set(y,v),this.resizeObserver.observe(g),this.resizeObserver.observe(y)}}for(const o of a.keys())o.isConnected&&(o.style.removeProperty("--diffs-column-content-width"),o.style.removeProperty("--diffs-column-number-width"),o.style.removeProperty("--diffs-column-width"),o.parentElement instanceof HTMLElement&&o.parentElement.style.removeProperty("--diffs-annotation-min-height")),this.resizeObserver.unobserve(o);a.clear()}handleResizeObserver=e=>{for(const t of e){const{target:i,borderBoxSize:a,contentBoxSize:o}=t;if(!(i instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",t);continue}const s=this.observedNodes.get(i);if(s==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",t);continue}if(s.type==="annotations"){const c=(()=>{if(i===s.column1.child)return s.column1;if(i===s.column2.child)return s.column2})();if(c==null){console.error("FileDiff.handleResizeObserver: Couldn't find a column for",{item:s,target:i});continue}c.childHeight=a[0].blockSize;const d=Math.max(s.column1.childHeight,s.column2.childHeight);this.applyNewHeight(s,d)}else if(s.type==="code"){const c=[i,o[0].inlineSize],d=this.queuedUpdates.get(s)??[];d.push(c),this.queuedUpdates.set(s,d)}}this.handleColumnChange()};handleColumnChange=()=>{for(const[e,t]of this.queuedUpdates)for(const[i,a]of t)if(i===e.codeElement){const o=Math.max(Math.floor(a),0);if(o!==e.codeWidth){const s=Math.max(o-e.numberWidth,0);e.codeWidth=o===0?"auto":o,e.codeElement.style.setProperty("--diffs-column-content-width",`${s>0?`${s}px`:"auto"}`),e.codeElement.style.setProperty("--diffs-column-width",`${typeof e.codeWidth=="number"?`${e.codeWidth}px`:"auto"}`)}e.numberElement!=null&&typeof e.codeWidth=="number"&&e.numberWidth===0&&t.push([e.numberElement,e.numberElement.getBoundingClientRect().width])}else if(i===e.numberElement){const o=Math.max(Math.ceil(a),0);if(o!==e.numberWidth&&(e.numberWidth=o,e.codeElement.style.setProperty("--diffs-column-number-width",`${e.numberWidth===0?"auto":`${e.numberWidth}px`}`),e.codeWidth!=="auto")){const s=Math.max(e.codeWidth-e.numberWidth,0);e.codeElement.style.setProperty("--diffs-column-content-width",`${s===0?"auto":`${s}px`}`)}}this.queuedUpdates.clear()};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`),e.column2.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`))}};function q1(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 Lb(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!Vf.has(t))return!1;return!0}function sf(e){for(const t of V1(e))if(!jf.has(t))return!1;return!0}function TN(e){return Re({tagName:"div",children:[Re({tagName:"div",children:e.annotations?.map(t=>Re({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function LN(e,t){return Re({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function RN(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 DN({fileOrDiff:e,mode:t}){const i="type"in e?e:void 0,a={"data-diffs-header":t,"data-change-type":i?.type};return Re({tagName:"div",children:[t==="custom"?Re({tagName:"slot",properties:{name:wh}}):NN({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[ON(i)]],properties:a})}function NN({name:e,prevName:t,iconType:i}){const a=[Re({tagName:"slot",properties:{name:Eh}}),qs({name:RN(i),properties:{"data-change-icon":i}})];return t!=null&&(a.push(Re({tagName:"div",children:[Re({tagName:"bdi",children:[Un(t)]})],properties:{"data-prev-name":""}})),a.push(qs({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push(Re({tagName:"div",children:[Re({tagName:"bdi",children:[Un(e)]})],properties:{"data-title":""}})),Re({tagName:"div",children:a,properties:{"data-header-content":""}})}function ON(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(Re({tagName:"span",children:[Un(`-${a}`)],properties:{"data-deletions-count":""}})),(i>0||a===0)&&t.push(Re({tagName:"span",children:[Un(`+${i}`)],properties:{"data-additions-count":""}}))}return t.push(Re({tagName:"slot",properties:{name:xh}})),Re({tagName:"div",children:t,properties:{"data-metadata":""}})}function MN(e){return Re({tagName:"pre",properties:IN(e)})}function IN({diffIndicators:e,disableBackground:t,disableLineNumbers:i,overflow:a,split:o,totalLines:s,type:c,customProperties:d}){return{...d,"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 zN(e,{theme:t,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:V1(t),preferredHighlighter:i}}function UN(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const HN=`<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 PN(e,t){return e==null||t==null?e===t:BN(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 Rb={};function BN(e=Rb,t=Rb){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 jN(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function VN(){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}function GN(){const e=document.createElement("style");return e.setAttribute(H1,""),e}let _s;function qf(e){if(_s!=null)return _s;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(CD,"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),_s=Math.max(i.offsetHeight-i.clientHeight,0),i.remove(),_s}function F1(e){return`${P1}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}var $N='@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-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);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;overflow:scroll clip}[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-content-buffer],[data-gutter-buffer]{-webkit-user-select:none;user-select:none;min-height:1lh;position:relative}[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-interactive-line-numbers] [data-column-number]{cursor:pointer}[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]{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;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(1ch - 1lh);padding:0;display:flex;position:relative}[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 Y1="@layer base, theme, rendered, unsafe;",qN=new RegExp(`${QN(P1)}\\s*:\\s*[^;]+;`);function FN(e){return`${Y1}
|
|
240
|
+
@layer unsafe {
|
|
241
|
+
${e}
|
|
242
|
+
}`}function YN(e,t="system",i){return`${Y1}
|
|
243
|
+
@layer rendered {
|
|
244
|
+
:host {${t==="system"?"":`
|
|
245
|
+
color-scheme: ${t};`}
|
|
246
|
+
${F1(i)}
|
|
247
|
+
${e}
|
|
248
|
+
}
|
|
249
|
+
}`}function XN(e,t){const i=F1(t);return e.replace(qN,i)}function QN(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uf({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 ZN({shadowRoot:e,currentNode:t,themeCSS:i}){if(i.trim()===""){t?.remove();return}return t??=KN(),t.textContent=i,t.parentNode!==e&&e.appendChild(t),t}function KN(){const e=document.createElement("style");return e.setAttribute(U1,""),e}function WN(e,t){if(t==null)return;const i=e.shadowRoot??e.attachShadow({mode:"open"});i.innerHTML===""&&(i.innerHTML=t)}function JN(e,{type:t,diffIndicators:i,disableBackground:a,disableLineNumbers:o,overflow:s,split:c,totalLines:d,customProperties:f}){if(f!=null)for(const p in f){const g=f[p];g!=null&&e.setAttribute(p,`${g}`)}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",`${`${d}`.length}ch`),e}if(typeof HTMLElement<"u"&&customElements.get($s)==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($N)),a.adoptedStyleSheets=[e]}connectedCallback(){qf(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define($s,t)}const eO=!0;function Db(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 tO(e,t){const i=e?.theme??zn,a=t?.theme??zn,o=Nb(e),s=Nb(t);return G1(i,a)&&Db(e,t,["theme","parseDiffOptions"])&&Db(o,s)}function Nb(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function nO({hunkIndex:e,lineIndex:t,conflictIndex:i}){return`merge-conflict-action-${e}-${t}-${i}`}function iO(e,t){const i=t.hunks[e.hunkIndex];if(i!=null)return{hunkIndex:e.hunkIndex,lineIndex:rO(i,e.startContentIndex)}}function rO(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 aO({fileDiff:e,actions:t,renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o,renderAnnotation:s,renderGutterUtility:c,renderHoverUtility:d,renderMergeConflictUtility:f,lineAnnotations:p,getHoveredLine:g,getInstance:y}){const v=c??d,b=i?.(e),S=a?.(e),A=o?.(e);return H.jsxs(H.Fragment,{children:[b!=null?H.jsx("div",{slot:wh,children:b}):H.jsxs(H.Fragment,{children:[S!=null&&H.jsx("div",{slot:Eh,children:S}),A!=null&&H.jsx("div",{slot:xh,children:A})]}),s!=null&&p?.map((D,x)=>H.jsx("div",{slot:Ul(D),children:s(D)},x)),t!=null&&f!=null&&y!=null&&t.map(D=>{if(D==null)return;const x=lO(D,e);return H.jsx("div",{slot:x,style:yD,children:f(D,y)},x)}),v!=null&&H.jsx("div",{slot:"gutter-utility-slot",style:gD,children:v(g)})]})}function lO(e,t){const i=iO(e,t);return i!=null?nO({hunkIndex:i.hunkIndex,lineIndex:i.lineIndex,conflictIndex:e.conflictIndex}):void 0}var oO=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 Ss(e){return Re({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Es(e){return Re({tagName:"div",children:[Re({tagName:"span",children:[Un("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function cf(e){return Re({tagName:"div",children:[qs({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 oa({type:e,content:t,expandIndex:i,chunked:a=!1,slotName:o,isFirstHunk:s,isLastHunk:c}){let d=0;const f=[];if(e==="metadata"&&t!=null&&f.push(Re({tagName:"div",children:[Un(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const p=[];i!=null&&(a?(s||(p.push(cf("up")),d++),c||(p.push(cf("down")),d++)):(p.push(cf(!s&&!c?"both":s?"down":"up")),d++)),p.push(Re({tagName:"div",children:[Re({tagName:"span",children:[Un(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),a&&i!=null&&p.push(Re({tagName:"div",children:[Un("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),f.push(Re({tagName:"div",children:p,properties:{"data-separator-wrapper":"","data-separator-multi-button":d>1?"":void 0}}))}return e==="custom"&&o!=null&&f.push(Re({tagName:"slot",properties:{name:o}})),Re({tagName:"div",children:f,properties:{"data-separator":f.length===0?"simple":e,"data-expand-index":i,"data-separator-first":s?"":void 0,"data-separator-last":c?"":void 0}})}function sO(e,t){return`hunk-separator-${e}-${t}`}function uO(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function cO(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}let dO=-1;var fO=class{__id=`diff-hunks-renderer:${++dO}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:zn},t,i){this.options=e,this.onRenderUpdate=t,this.workerManager=i,i?.isWorkingPool()!==!0&&(this.highlighter=sf(e.theme??zn)?PD():void 0)}cleanUp(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this)}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.renderCache=void 0),this.expandedHunks.set(e,a)}getExpandedHunk(e){return this.expandedHunks.get(e)??AD}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 TN(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:d=!1,collapsedContextThreshold:f=ga,expansionLineCount:p=100,hunkSeparators:g="line-info",lineDiffType:y="word-alt",maxLineDiffLength:v=1e3,overflow:b="scroll",theme:S=zn,headerRenderMode:A="default",tokenizeMaxLineLength:D=1e3,useTokenTransformer:x=!1,useCSSClasses:T=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:i,disableFileHeader:a,disableLineNumbers:o,disableVirtualizationBuffers:s,collapsed:c,expandUnchanged:d,collapsedContextThreshold:f,expansionLineCount:p,hunkSeparators:g,lineDiffType:y,maxLineDiffLength:v,overflow:b,theme:this.workerManager?.getDiffRenderOptions().theme??S,headerRenderMode:A,tokenizeMaxLineLength:D,useTokenTransformer:x,useCSSClasses:T}}async initializeHighlighter(){return this.highlighter=await HD(zN(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e);let i=this.workerManager?.getDiffResultCache(e);i!=null&&!lf(t,i.options)&&(i=void 0),this.renderCache??={diff:e,highlighted:!KD(e),options:t,result:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??hr(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:UN(this.options),tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:c}})();this.getOptionsWithDefaults();const{renderCache:i}=this;return i?.result==null?{options:t,forceRender:!0}:e!==i.diff||!lf(t,i.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderDiff(e=this.renderCache?.diff,t=fb){if(e==null)return;const{expandUnchanged:i=!1,collapsedContextThreshold:a}=this.getOptionsWithDefaults(),o=this.workerManager?.getDiffResultCache(e);o!=null&&this.renderCache==null&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o});const{options:s,forceRender:c}=this.getRenderOptions(e);if(this.renderCache??={diff:e,highlighted:!1,options:s,result:void 0,renderRange:void 0},this.workerManager?.isWorkingPool()===!0)(this.renderCache.result==null||!this.renderCache.highlighted&&(e!==this.renderCache.diff||!q1(this.renderCache.renderRange,t)))&&(this.renderCache.diff=e,this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,cO(t)||i?!0:this.expandedHunks,a),this.renderCache.renderRange=t),t.totalLines>0&&(!this.renderCache.highlighted||c)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??hr(e.name);const d=this.highlighter!=null&&sf(s.theme),f=this.highlighter!=null&&Lb(this.computedLang);if(this.highlighter!=null&&d&&(c||!this.renderCache.highlighted&&f||this.renderCache.result==null)){const{result:p,options:g}=this.renderDiffWithHighlighter(e,this.highlighter,!f);this.renderCache={diff:e,options:g,highlighted:f,result:p,renderRange:void 0}}(!d||!f)&&this.asyncHighlight(e).then(({result:p,options:g})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,p,g)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=fb){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 MN({type:"diff",diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:e,totalLines:t,customProperties:i})}async asyncHighlight(e){this.computedLang=e.lang??hr(e.name);const t=this.highlighter!=null&&sf(this.options.theme??zn),i=this.highlighter!=null&&Lb(this.computedLang);return(this.highlighter==null||!t||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,t,i=!1){const{options:a}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults();return{result:pN(e,t,a,{forcePlainText:i,expandedHunks:i?!0:void 0,collapsedContextThreshold:o}),options:a}}onHighlightSuccess(e,t,i){if(this.renderCache==null)return;const a=!this.renderCache.highlighted||!lf(this.renderCache.options,i)||this.renderCache.diff!==e;this.renderCache={diff:e,options:i,highlighted:!0,result:t,renderRange:void 0},a&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,t,{code:i,themeStyles:a,baseThemeType:o}){const{diffStyle:s,disableFileHeader:c,expandUnchanged:d,expansionLineCount:f,collapsedContextThreshold:p,hunkSeparators:g}=this.getOptionsWithDefaults();this.diff=e;const y=s==="unified";let v=[],b=[],S=[];const A=[],{additionLines:D,deletionLines:x}=i,T={rowCount:0,hunkSeparators:g,additionsContentAST:v,deletionsContentAST:b,unifiedContentAST:S,unifiedGutterAST:ys(),deletionsGutterAST:ys(),additionsGutterAST:ys(),expansionLineCount:f,hunkData:A,incrementRowCount(ce=1){T.rowCount+=ce},pushToGutter(ce,ie){switch(ce){case"unified":T.unifiedGutterAST.children.push(ie);break;case"deletions":T.deletionsGutterAST.children.push(ie);break;case"additions":T.additionsGutterAST.children.push(ie);break}}},k=hO(e),I={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"?(T.pushToGutter("additions",Sn(void 0,"buffer",this.size)),v?.push(Ss(this.size))):(T.pushToGutter("deletions",Sn(void 0,"buffer",this.size)),b?.push(Ss(this.size))),this.size=0,this.side=void 0}}},z=(ce,ie,ne,P,Z)=>{T.pushToGutter(ce,VD(ie,ne,P,Z))};function R(ce){I.flush(),s==="unified"?df("unified",ce,T):(df("deletions",ce,T),df("additions",ce,T))}Fs({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:d?!0:this.expandedHunks,collapsedContextThreshold:p,callback:({hunkIndex:ce,hunk:ie,collapsedBefore:ne,collapsedAfter:P,additionLine:Z,deletionLine:oe,type:he})=>{const L=oe!=null?oe.splitLineIndex:Z.splitLineIndex,O=Z!=null?Z.unifiedLineIndex:oe.unifiedLineIndex;s==="split"&&he!=="change"&&I.flush(),ne>0&&R({hunkIndex:ce,collapsedLines:ne,rangeSize:Math.max(ie?.collapsedBefore??0,0),hunkSpecs:ie?.hunkSpecs,isFirstHunk:ce===0,isLastHunk:!1,isExpandable:!e.isPartial});const X=s==="unified"?O:L,C={type:he,hunkIndex:ce,lineIndex:X,unifiedLineIndex:O,splitLineIndex:L,deletionLine:oe,additionLine:Z};if(s==="unified"){const de=this.getUnifiedInjectedRowsForLine?.(C);de?.before!=null&&Mb(de.before,T);let be=oe!=null?x[oe.lineIndex]:void 0,Te=Z!=null?D[Z.lineIndex]:void 0;if(be==null&&Te==null){const et="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(et,{file:e.name}),new Error(et)}const Le=he==="change"?Z!=null?"change-addition":"change-deletion":he,Xe=this.getUnifiedLineDecoration({type:he,lineType:Le,additionLineIndex:Z?.lineIndex,deletionLineIndex:oe?.lineIndex});z("unified",Xe.gutterLineType,Z!=null?Z.lineNumber:oe.lineNumber,`${O},${L}`,Xe.gutterProperties),Te!=null?Te=xs(Te,Xe.contentProperties):be!=null&&(be=xs(be,Xe.contentProperties)),zb({diffStyle:"unified",type:he,deletionLine:be,additionLine:Te,unifiedSpan:this.getAnnotations("unified",oe?.lineNumber,Z?.lineNumber,ce,X),createAnnotationElement:et=>this.createAnnotationElement(et),context:T}),de?.after!=null&&Mb(de.after,T)}else{const de=this.getSplitInjectedRowsForLine?.(C);de?.before!=null&&Ib(de.before,T,I);let be=oe!=null?x[oe.lineIndex]:void 0,Te=Z!=null?D[Z.lineIndex]:void 0;const Le=this.getSplitLineDecoration({side:"deletions",type:he,lineIndex:oe?.lineIndex}),Xe=this.getSplitLineDecoration({side:"additions",type:he,lineIndex:Z?.lineIndex});if(be==null&&Te==null){const xt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(xt,{file:e.name}),new Error(xt)}const et=(()=>{if(he==="change"){if(Te==null)return"additions";if(be==null)return"deletions"}})();if(et!=null){if(I.side!=null&&I.side!==et)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");I.side=et,I.increment()}const qt=this.getAnnotations("split",oe?.lineNumber,Z?.lineNumber,ce,X);if(qt!=null&&I.size>0&&I.flush(),oe!=null){const xt=xs(be,Le.contentProperties);z("deletions",Le.gutterLineType,oe.lineNumber,`${oe.unifiedLineIndex},${L}`,Le.gutterProperties),xt!=null&&(be=xt)}if(Z!=null){const xt=xs(Te,Xe.contentProperties);z("additions",Xe.gutterLineType,Z.lineNumber,`${Z.unifiedLineIndex},${L}`,Xe.gutterProperties),xt!=null&&(Te=xt)}zb({diffStyle:"split",type:he,additionLine:Te,deletionLine:be,...qt,createAnnotationElement:xt=>this.createAnnotationElement(xt),context:T}),de?.after!=null&&Ib(de.after,T,I)}const se=oe?.noEOFCR??!1,me=Z?.noEOFCR??!1;if(me||se){if(se){const de=he==="context"||he==="context-expanded"?he:"change-deletion";s==="unified"?(T.unifiedContentAST.push(Es(de)),T.pushToGutter("unified",Sn(de,"metadata",1))):(T.deletionsContentAST.push(Es(de)),T.pushToGutter("deletions",Sn(de,"metadata",1)),me||(T.pushToGutter("additions",Sn(void 0,"buffer",1)),T.additionsContentAST.push(Ss(1))))}if(me){const de=he==="context"||he==="context-expanded"?he:"change-addition";s==="unified"?(T.unifiedContentAST.push(Es(de)),T.pushToGutter("unified",Sn(de,"metadata",1))):(T.additionsContentAST.push(Es(de)),T.pushToGutter("additions",Sn(de,"metadata",1)),se||(T.pushToGutter("deletions",Sn(void 0,"buffer",1)),T.deletionsContentAST.push(Ss(1))))}T.incrementRowCount(1)}P>0&&g!=="simple"&&R({hunkIndex:he==="context-expanded"?ce:ce+1,collapsedLines:P,rangeSize:k,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),T.incrementRowCount(1)}}),s==="split"&&I.flush();const $=Math.max(uO(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),G=t.bufferBefore>0||t.bufferAfter>0,Y=!y&&e.type!=="deleted",le=!y&&e.type!=="new",te=T.rowCount>0||G;v=Y&&te?v:void 0,b=le&&te?b:void 0,S=y&&te?S:void 0;const F=this.createPreElement(b!=null&&v!=null,$);return{unifiedGutterAST:y&&te?T.unifiedGutterAST.children:void 0,unifiedContentAST:S,deletionsGutterAST:le&&te?T.deletionsGutterAST.children:void 0,deletionsContentAST:b,additionsGutterAST:Y&&te?T.additionsGutterAST.children:void 0,additionsContentAST:v,hunkData:A,preNode:F,themeStyles:a,baseThemeType:o,headerElement:c?void 0:this.renderHeader(this.diff),totalLines:$,rowCount:T.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=ys(i);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,LN(a,t.rowCount)]}renderFullAST(e,t=[]){const i=this.getOptionsWithDefaults().hunkSeparators==="line-info",a=this.renderCodeAST("unified",e);if(a!=null)return t.push(Re({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(Re({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(Re({tagName:"code",children:s,properties:{"data-code":"","data-container-size":i?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return ma(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?ma(e):ma(Re({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 d of this.deletionAnnotations[t]??[])s.annotations.push(Ul(d));const c={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(i!=null)for(const d of this.additionAnnotations[i]??[])(e==="unified"?s:c).annotations.push(Ul(d));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}=this.getOptionsWithDefaults();return DN({fileOrDiff:e,mode:t})}};function Ob(e){return`${e} unmodified line${e>1?"s":""}`}function Mb(e,t){for(const i of e)t.unifiedContentAST.push(i.content),t.pushToGutter("unified",i.gutter),t.incrementRowCount(1)}function Ib(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 zb({diffStyle:e,type:t,deletionLine:i,additionLine:a,unifiedSpan:o,deletionSpan:s,additionSpan:c,createAnnotationElement:d,context:f}){let p=!1;if(e==="unified"){if(a!=null?f.unifiedContentAST.push(a):i!=null&&f.unifiedContentAST.push(i),o!=null){const g=t==="change"?i!=null?"change-deletion":"change-addition":t;f.unifiedContentAST.push(d(o)),f.pushToGutter("unified",Sn(g,"annotation",1)),p=!0}}else if(e==="split"){if(i!=null&&f.deletionsContentAST.push(i),a!=null&&f.additionsContentAST.push(a),s!=null){const g=t==="change"?i!=null?"change-deletion":"context":t;f.deletionsContentAST.push(d(s)),f.pushToGutter("deletions",Sn(g,"annotation",1)),p=!0}if(c!=null){const g=t==="change"?a!=null?"change-addition":"context":t;f.additionsContentAST.push(d(c)),f.pushToGutter("additions",Sn(g,"annotation",1)),p=!0}}p&&f.incrementRowCount(1)}function df(e,{hunkIndex:t,collapsedLines:i,rangeSize:a,hunkSpecs:o,isFirstHunk:s,isLastHunk:c,isExpandable:d},f){if(i<=0)return;const p=e==="unified"?f.unifiedContentAST:e==="deletions"?f.deletionsContentAST:f.additionsContentAST;if(f.hunkSeparators==="metadata"){o!=null&&(f.pushToGutter(e,oa({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),p.push(oa({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&f.incrementRowCount(1));return}if(f.hunkSeparators==="simple"){t>0&&(f.pushToGutter(e,oa({type:"simple",isFirstHunk:s,isLastHunk:!1})),p.push(oa({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&f.incrementRowCount(1));return}const g=sO(e,t),y=a>f.expansionLineCount,v=d?t:void 0;f.pushToGutter(e,oa({type:f.hunkSeparators,content:Ob(i),expandIndex:v,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),p.push(oa({type:f.hunkSeparators,content:Ob(i),expandIndex:v,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&f.incrementRowCount(1),f.hunkData.push({slotName:g,hunkIndex:t,lines:i,type:e,expandable:d?{up:!s,down:!c,chunked:y}:void 0})}function xs(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function hO(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 pO(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function mO(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 gO(e){const t=e[0];if(t!=="+"&&t!=="-"&&t!==" "&&t!=="\\"){console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${e}"`);return}const i=e.substring(1);return{line:i===""?`
|
|
250
|
+
`:i,type:t===" "?"context":t==="\\"?"metadata":t==="+"?"addition":"deletion"}}function yO(e,t,i=!1){const a=Ts.test(e),o=e.split(a?Ts:db);let s;const c=[];for(const d of o){if(a&&!Ts.test(d)){if(s==null)s=d;else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}else if(!a&&!db.test(d)){if(s==null)s=d;else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}const f=X1(d,{cacheKey:t!=null?`${t}-${c.length}`:void 0,isGitDiff:a,throwOnError:i});f!=null&&c.push(f)}return{patchMetadata:s,files:c}}function X1(e,{cacheKey:t,isGitDiff:i=Ts.test(e),oldFile:a,newFile:o,throwOnError:s=!1}={}){let c=0;const d=e.split(vD);let f;const p=a==null||o==null;let g=0,y=0;for(const v of d){const b=v.split(ef),S=b.shift();if(S==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",v);continue}const A=S.match(_D);let D=0,x=0;if(A==null||f==null){if(f!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",v);continue}f={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:p,additionLines:!p&&a!=null&&o!=null?o.contents.split(ef):[],deletionLines:!p&&a!=null&&o!=null?a.contents.split(ef):[],cacheKey:t},f.additionLines.length===1&&o?.contents===""&&(f.additionLines.length=0),f.deletionLines.length===1&&a?.contents===""&&(f.deletionLines.length=0),b.unshift(S);for(const Y of b){const le=Y.match(i?ED:SD);if(Y.startsWith("diff --git")){const[,,te,,F]=Y.trim().match(xD)??[];f.name=F.trim(),te!==F&&(f.prevName=te.trim())}else if(le!=null){const[,te,F]=le;te==="---"&&F!=="/dev/null"?(f.prevName=F.trim(),f.name=F.trim()):te==="+++"&&F!=="/dev/null"&&(f.name=F.trim())}else if(i){if(Y.startsWith("new mode ")&&(f.mode=Y.replace("new mode","").trim()),Y.startsWith("old mode ")&&(f.prevMode=Y.replace("old mode","").trim()),Y.startsWith("new file mode")&&(f.type="new",f.mode=Y.replace("new file mode","").trim()),Y.startsWith("deleted file mode")&&(f.type="deleted",f.mode=Y.replace("deleted file mode","").trim()),Y.startsWith("similarity index")&&(Y.startsWith("similarity index 100%")?f.type="rename-pure":f.type="rename-changed"),Y.startsWith("index ")){const[,te,F,ce]=Y.trim().match(wD)??[];te!=null&&(f.prevObjectId=te),F!=null&&(f.newObjectId=F),ce!=null&&(f.mode=ce)}Y.startsWith("rename from ")&&(f.prevName=Y.replace("rename from ","").trim()),Y.startsWith("rename to ")&&(f.name=Y.replace("rename to ","").trim())}}continue}let T,k;for(;b.length>0&&(b[b.length-1]===`
|
|
251
|
+
`||b[b.length-1]==="\r"||b[b.length-1]===`\r
|
|
252
|
+
`||b[b.length-1]==="");)b.pop();const I=parseInt(A[3]),z=parseInt(A[1]);g=p?g:z-1,y=p?y:I-1;const R={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(A[4]??"1"),additionStart:I,additionLines:D,deletionCount:parseInt(A[2]??"1"),deletionStart:z,deletionLines:x,deletionLineIndex:g,additionLineIndex:y,hunkContent:[],hunkContext:A[5],hunkSpecs:S,noEOFCRAdditions:!1,noEOFCRDeletions:!1};if(isNaN(R.additionCount)||isNaN(R.deletionCount)||isNaN(R.additionStart)||isNaN(R.deletionStart)){if(s)throw Error("parsePatchContent: invalid hunk metadata");console.error("parsePatchContent: invalid hunk metadata",R);continue}let $=0,G=0;for(const Y of b){if(bO({additionCount:R.additionCount,parsedAdditionLines:$,deletionCount:R.deletionCount,parsedDeletionLines:G})&&!Y.startsWith("\\"))break;const le=gO(Y);if(le==null){console.error("processFile: invalid rawLine:",Y);continue}const{type:te,line:F}=le;if(te==="addition")(T==null||T.type!=="change")&&(T=ff("change",g,y),R.hunkContent.push(T)),y++,$++,p&&f.additionLines.push(F),T.additions++,D++,k="addition";else if(te==="deletion")(T==null||T.type!=="change")&&(T=ff("change",g,y),R.hunkContent.push(T)),g++,G++,p&&f.deletionLines.push(F),T.deletions++,x++,k="deletion";else if(te==="context")(T==null||T.type!=="context")&&(T=ff("context",g,y),R.hunkContent.push(T)),y++,g++,$++,G++,p&&(f.deletionLines.push(F),f.additionLines.push(F)),T.lines++,k="context";else if(te==="metadata"&&T!=null){if(T.type==="context"?(R.noEOFCRAdditions=!0,R.noEOFCRDeletions=!0):k==="deletion"?R.noEOFCRDeletions=!0:k==="addition"&&(R.noEOFCRAdditions=!0),p&&(k==="addition"||k==="context")){const ce=f.additionLines.length-1;ce>=0&&(f.additionLines[ce]=ba(f.additionLines[ce]))}if(p&&(k==="deletion"||k==="context")){const ce=f.deletionLines.length-1;ce>=0&&(f.deletionLines[ce]=ba(f.deletionLines[ce]))}}}R.additionLines=D,R.deletionLines=x,R.collapsedBefore=Math.max(R.additionStart-1-c,0),f.hunks.push(R),c=R.additionStart+R.additionCount-1;for(const Y of R.hunkContent)Y.type==="context"?(R.splitLineCount+=Y.lines,R.unifiedLineCount+=Y.lines):(R.splitLineCount+=Math.max(Y.additions,Y.deletions),R.unifiedLineCount+=Y.deletions+Y.additions);R.splitLineStart=f.splitLineCount+R.collapsedBefore,R.unifiedLineStart=f.unifiedLineCount+R.collapsedBefore,f.splitLineCount+=R.collapsedBefore+R.splitLineCount,f.unifiedLineCount+=R.collapsedBefore+R.unifiedLineCount}if(f!=null){if(f.hunks.length>0&&!p&&f.additionLines.length>0&&f.deletionLines.length>0){const v=f.hunks[f.hunks.length-1],b=v.additionStart+v.additionCount-1,S=f.additionLines.length,A=Math.max(S-b,0);f.splitLineCount+=A,f.unifiedLineCount+=A}return i||(f.prevName!=null&&f.name!==f.prevName?f.hunks.length>0?f.type="rename-changed":f.type="rename-pure":(a==null||a.contents==="")&&o!=null&&o.contents!==""?f.type="new":a!=null&&a.contents!==""&&(o==null||o.contents==="")&&(f.type="deleted")),f.type!=="rename-pure"&&f.type!=="rename-changed"&&(f.prevName=void 0),f}}function bO({additionCount:e,parsedAdditionLines:t,deletionCount:i,parsedDeletionLines:a}){return t>=e&&a>=i}function vO(e,t,i=!1){const a=[];for(const o of e.split(bD))try{a.push(yO(o,t!=null?`${t}-${a.length}`:void 0,i))}catch(s){if(i)throw s;console.error(s)}return a}function ff(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 Ff(e,t,i,a=!1){const o=X1(dN(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}let _O=-1;var Q1=class{static LoadedCustomComponent=eO;__id=`file-diff:${++_O}`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;lastRowCount;enabled=!0;constructor(t={theme:zn},i,a=!1){this.options=t,this.workerManager=i,this.isContainerManaged=a,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new AN,this.scrollSyncManager=new oO,this.interactionManager=new EN("diff",wb(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{...t,headerRenderMode:t.renderCustomHeader!=null?"custom":"default",hunkSeparators:typeof t.hunkSeparators=="function"?"custom":t.hunkSeparators}}createHunksRenderer(t){return new fO(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 d=i==="deletions"?c.deletionStart:c.additionStart;const f=i==="deletions"?c.deletionCount:c.additionCount;let p=c.splitLineStart,g=c.unifiedLineStart;if(t<d){const y=d-t;o=Math.max(g-y,0),s=Math.max(p-y,0);break e}if(t>=d+f){if(c===a){const y=t-(d+f);o=g+c.unifiedLineCount+y,s=p+c.splitLineCount+y;break e}continue}for(const y of c.hunkContent)if(y.type==="context")if(t<d+y.lines){const v=t-d;s=p+v,o=g+v;break e}else d+=y.lines,p+=y.lines,g+=y.lines;else{const v=i==="deletions"?y.deletions:y.additions;if(t<d+v){const b=t-d;o=g+(i==="additions"?y.deletions:0)+b,s=p+b;break e}else d+=v,p+=Math.max(y.deletions,y.additions),g+=y.deletions+y.additions}break e}if(!(o==null||s==null))return[o,s]};setOptions(t){t!=null&&(this.options=t,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.interactionManager.setOptions(wb(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.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}),!(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType))}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,i,a){return!(t||i||a||typeof this.options.hunkSeparators=="function")}setSelectedLines(t){this.interactionManager.setSelection(t)}cleanUp(t=!1){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=""),this.fileContainer=void 0,this.pre!=null&&(this.pre.innerHTML="",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.lastRenderedHeaderHTML=void 0,this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,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:d,fileDiff:f}=t;this.hydrateElements(i,a),xO(this.pre,SO({fileDiff:f,oldFile:c,newFile:d}),this.options.collapsed)||wO(this.headerElement,EO({fileDiff:f,oldFile:c,newFile:d}),this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({fileDiff:f,oldFile:c,newFile:d,lineAnnotations:s}),o||this.emitPostRender()}hydrateElements(t,i){WN(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(U1)){this.themeCSSStyle=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(H1)){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}){const{diffStyle:s="split",overflow:c="scroll"}=this.options;this.lineAnnotations=o??this.lineAnnotations,this.additionFile=a,this.deletionFile=i,this.fileDiff=t??(i!=null&&a!=null?Ff(i,a,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,c==="wrap"),c==="scroll"&&s==="split"&&this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}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,forceRender:o=!1,preventEmit:s=!1,lineAnnotations:c,fileContainer:d,containerWrapper:f,renderRange:p}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:g=!1}=this.options,y=g?void 0:p,v=t!=null&&i!=null&&(!yb(t,this.deletionFile)||!yb(i,this.additionFile));let b=a!=null&&a!==this.fileDiff;const S=c!=null&&(c.length>0||this.lineAnnotations.length>0)?c!==this.lineAnnotations:!1;if(!g&&q1(y,this.renderRange)&&!o&&!S&&(a!=null&&a===this.fileDiff||a==null&&!v))return!1;const{renderRange:A}=this;if(this.renderRange=y,this.deletionFile=t,this.additionFile=i,a!=null?this.fileDiff=a:t!=null&&i!=null&&v&&(b=!0,this.fileDiff=Ff(t,i,this.options.parseDiffOptions)),c!=null&&this.setLineAnnotations(c),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{diffStyle:D="split",disableErrorHandling:x=!1,disableFileHeader:T=!1,overflow:k="scroll",themeType:I="system"}=this.options;if(T&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),d=this.getOrCreateFileContainer(d,f),g){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const z=this.hunksRenderer.renderDiff(this.fileDiff,TD);z!=null&&this.applyThemeState(d,z.themeStyles,I,z.baseThemeType),z?.headerElement!=null&&this.applyHeaderToDOM(z.headerElement,d),this.renderSeparators([]),this.injectUnsafeCSS()}catch(z){if(x)throw z;console.error(z),z instanceof Error&&this.applyErrorToDOM(z,d)}return s||this.emitPostRender(),!0}try{const z=this.getOrCreatePreNode(d);if(!(this.canPartiallyRender(o,S,v||b)&&this.applyPartialRender({previousRenderRange:A,renderRange:y}))){const R=this.hunksRenderer.renderDiff(this.fileDiff,y);if(R==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(d,R.themeStyles,I,R.baseThemeType),R.headerElement!=null&&this.applyHeaderToDOM(R.headerElement,d),R.additionsContentAST!=null||R.deletionsContentAST!=null||R.unifiedContentAST!=null?this.applyHunksToDOM(z,R):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(R.hunkData)}this.applyBuffers(z,y),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.interactionManager.setup(z),this.resizeManager.setup(z,k==="wrap"),k==="scroll"&&D==="split"?this.scrollSyncManager.setup(z,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp()}catch(z){if(x)throw z;console.error(z),z instanceof Error&&this.applyErrorToDOM(z,d)}return s||this.emitPostRender(),!0}emitPostRender(){this.fileContainer!=null&&this.options.onPostRender?.(this.fileContainer,this)}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.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}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.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.gutterUtilityContent=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.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0}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||!mO(o,c.hunkData)){c?.element.remove();const d=document.createElement("div");d.style.display="contents",d.slot=o.slotName;const f=i(o,this);f!=null&&d.appendChild(f),this.fileContainer.appendChild(d),c={element:d,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}-${Ul(o)}`;let c=this.annotationCache.get(s);if(c==null||!pO(o,c.annotation)){c?.element.remove();const d=i(o);if(d==null)continue;c={element:jN(Ul(o)),annotation:o},c.element.appendChild(d),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 t=this.options.renderGutterUtility??this.options.renderHoverUtility;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=VN();a.appendChild(i),this.fileContainer.appendChild(a),this.gutterUtilityContent=a}getOrCreateFileContainer(t,i){const a=this.fileContainer;if(this.fileContainer=t??this.fileContainer??document.createElement($s),a!=null&&a!==this.fileContainer&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),i!=null&&this.fileContainer.parentNode!==i&&i.appendChild(this.fileContainer),this.spriteSVG==null){const o=document.createElement("div");o.innerHTML=HN;const s=o.firstChild;s instanceof SVGElement&&(this.spriteSVG=s,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}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=ma(t);if(o!==this.lastRenderedHeaderHTML){const g=document.createElement("div");g.innerHTML=o;const y=g.firstElementChild;if(!(y instanceof HTMLElement))return;this.headerElement!=null?i.shadowRoot?.replaceChild(y,this.headerElement):i.shadowRoot?.prepend(y),this.headerElement=y,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged||a==null)return;const{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderMetadata:d}=this.options;if(s!=null){const g=s(a)??void 0;this.headerCustom=this.upsertHeaderSlotElement(i,this.headerCustom,wh,g),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const f=c?.(a)??void 0,p=d?.(a)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(i,this.headerPrefix,Eh,f),this.headerMetadata=this.upsertHeaderSlotElement(i,this.headerMetadata,xh,p),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??=GN(),this.unsafeCSSStyle.parentNode!==i&&i.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=FN(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,i,a,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),c=o??a,d=qf(s);this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===i&&this.appliedThemeCSS.themeType===c&&this.appliedThemeCSS.scrollbarGutter===d||(this.themeCSSStyle=ZN({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:YN(i,c,d)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{themeStyles:i,themeType:c,baseThemeType:o,scrollbarGutter:d}:void 0)}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=XN(this.themeCSSStyle.textContent??"",qf(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 d=[],f=this.hunksRenderer.renderCodeAST("unified",i),p=this.hunksRenderer.renderCodeAST("deletions",i),g=this.hunksRenderer.renderCodeAST("additions",i);f!=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=uf({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:o}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(f),d.push(this.codeUnified)):p!=null||g!=null?(p!=null?(c=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=uf({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:o}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(p),d.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),g!=null?(c=c||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=uf({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:o}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(g),d.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),d.length===0?t.textContent="":c&&t.replaceChildren(...d),this.lastRowCount=i.rowCount}applyPartialRender({previousRenderRange:t,renderRange:i}){const{pre:a,codeUnified:o,codeAdditions:s,codeDeletions:c,options:{diffStyle:d="split"}}=this;if(a==null||t==null||i==null||!Number.isFinite(t.totalLines)||!Number.isFinite(i.totalLines)||this.lastRowCount==null)return!1;const f=this.getCodeColumns(d,o,c,s);if(f==null)return!1;const p=t.startingLine,g=i.startingLine,y=p+t.totalLines,v=g+i.totalLines,b=Math.max(p,g),S=Math.min(y,v);if(S<=b)return!1;const A=Math.max(0,b-p),D=Math.max(0,y-S),x=this.trimColumns({columns:f,trimStart:A,trimEnd:D,previousStart:p,overlapStart:b,overlapEnd:S,diffStyle:d});if(x<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<x)throw new Error("applyPartialRender: trimmed beyond DOM row count");let T=this.lastRowCount-x;const k=($,G)=>{if(!(G<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:$,totalLines:G,bufferBefore:0,bufferAfter:0})},I=k(g,Math.max(b-g,0));if(I==null&&g<b)return!1;const z=k(S,Math.max(v-S,0));if(z==null&&v>S)return!1;const R=($,G)=>{if($!=null){if(d==="unified"&&!Array.isArray(f))this.insertPartialHTML(d,f,$,G);else if(d==="split"&&Array.isArray(f))this.insertPartialHTML(d,f,$,G);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");T+=$.rowCount}};return this.cleanupErrorWrapper(),R(I,"afterbegin"),R(z,"beforeend"),this.lastRowCount!==T&&(this.applyRowSpan(d,f,T),this.lastRowCount=T),!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=Ub(i[0]),s=Ub(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 d=s.at(-1);a==="afterbegin"&&d?.type==="element"&&typeof d.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(d.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 d=this.getBufferSize(i.dataset);d!=null&&(c?(o.shift(),s.shift()):(o.pop(),s.pop()),this.updateBufferSize(i,d+t),this.updateBufferSize(a,d+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,d=!1;const f=a>=0;if(t==null)return 0;const p=Array.from(t.content.children),g=Array.from(t.gutter.children);if(p.length!==g.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;c<p.length&&!(i<=0&&!f&&!d);){const y=g[c],v=p[c];if(c++,!(y instanceof HTMLElement)||!(v instanceof HTMLElement))throw console.error({gutterElement:y,contentElement:v}),new Error("FileDiff.trimColumnRows: invalid row elements");if(d&&(d=!1,y.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset||y.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset)){y.remove(),v.remove(),s++;continue}if("lineIndex"in y.dataset&&"lineIndex"in v.dataset){(i>0||f&&o>=a)&&(y.remove(),v.remove(),i>0&&(i--,i===0&&(d=!0)),s++),o++;continue}if("separator"in y.dataset&&"separator"in v.dataset){(i>0||f&&o>=a)&&(y.remove(),v.remove(),s++);continue}if(y.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset){(i>0||f&&o>=a)&&(y.remove(),v.remove(),s++);continue}if(y.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset){(i>0||f&&o>=a)&&(y.remove(),v.remove(),s++);continue}if(y.dataset.gutterBuffer==="buffer"&&"contentBuffer"in v.dataset){const b=this.getBufferSize(v.dataset);if(b==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(i>0){const S=Math.min(i,b),A=b-S;A>0?(this.updateBufferSize(y,A),this.updateBufferSize(v,A),s+=S):(y.remove(),v.remove(),s+=b),i-=S}else if(f){const S=o,A=o+b-1;if(a<=S)y.remove(),v.remove(),s+=b;else if(a<=A){const D=A-a+1,x=b-D;this.updateBufferSize(y,x),this.updateBufferSize(v,x),s+=D}}o+=b;continue}throw console.error({gutterElement:y,contentElement:v}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:t,diffStyle:i,overlapEnd:a,overlapStart:o,previousStart:s,trimEnd:c,trimStart:d}){const f=Math.max(0,o-s),p=a-s;if(p<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const g=d>0,y=c>0;if(!g&&!y)return 0;const v=g?f:0,b=y?p:-1;if(i==="unified"&&!Array.isArray(t))return this.trimColumnRows(t,v,b);if(i==="split"&&Array.isArray(t)){const S=this.trimColumnRows(t[0],v,b),A=this.trimColumnRows(t[1],v,b);if(t[0]!=null&&t[1]!=null&&S!==A)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?S:A}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 d=c.children[0],f=c.children[1];if(!(!(d instanceof HTMLElement)||!(f instanceof HTMLElement)||d.dataset.gutter==null||f.dataset.content==null))return{gutter:d,content:f}}if(t==="unified")return s(i);{const c=s(a),d=s(o);return c!=null||d!=null?[c,d]:void 0}}applyBuffers(t,i){const{disableVirtualizationBuffers:a=!1}=this.options;if(a||i==null){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)}applyPreNodeAttributes(t,{additionsContentAST:i,deletionsContentAST:a,totalLines:o},s){const{diffIndicators:c="bars",disableBackground:d=!1,disableLineNumbers:f=!1,overflow:p="scroll",diffStyle:g="split"}=this.options,y={type:"diff",diffIndicators:c,disableBackground:d,disableLineNumbers:f,overflow:p,split:g==="unified"?!1:i!=null&&a!=null,totalLines:o,customProperties:s};PN(y,this.appliedPreAttributes)||(JN(t,y),this.appliedPreAttributes=y)}applyErrorToDOM(t,i){this.cleanupErrorWrapper();const a=this.getOrCreatePreNode(i);a.innerHTML="",a.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const o=i.shadowRoot??i.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.innerHTML="",o.appendChild(this.errorWrapper);const s=document.createElement("div");s.dataset.errorMessage="",s.innerText=t.message,this.errorWrapper.appendChild(s);const c=document.createElement("pre");c.dataset.errorStack="",c.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(c)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function SO({fileDiff:e,oldFile:t,newFile:i}){return e!=null&&e.hunks.length>0||t!=null||i!=null}function EO({fileDiff:e,oldFile:t,newFile:i}){return e!=null||t!=null||i!=null}function xO(e,t,i=!1){return!i&&e==null&&t}function wO(e,t,i=!1){return e==null&&t&&!i}function Ub(e){if(!(e==null||e.type!=="element"))return e.children??[]}function CO(e,t){const i={...kD,...t};return i.hunkSeparatorHeight=kO(e,t?.hunkSeparatorHeight),i}function kO(e,t){if(t!=null)return t;switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}let AO=-1;var TO=class extends Q1{__id=`little-virtualized-file-diff:${++AO}`;top;height=0;metrics;heightCache=new Map;isVisible=!1;isSetup=!1;virtualizer;constructor(e,t,i,a,o=!1){super(e,a,o);const{hunkSeparators:s="line-info"}=this.options;this.virtualizer=t,this.metrics=CO(typeof s=="function"?"custom":s,i)}getLineHeight(e,t=!1){const i=this.heightCache.get(e);if(i!=null)return i;const a=t?2:1;return this.metrics.lineHeight*a}setOptions(e){if(e==null)return;const t=this.options.diffStyle,i=this.options.overflow,a=this.options.collapsed;super.setOptions(e),(t!==this.options.diffStyle||i!==this.options.overflow||a!==this.options.collapsed)&&(this.heightCache.clear(),this.computeApproximateSize(),this.renderRange=void 0),this.virtualizer.instanceChanged(this)}reconcileHeights(){const{overflow:e="scroll"}=this.options;if(this.fileContainer!=null&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.fileContainer==null||this.fileDiff==null){this.height=0;return}if(e==="scroll"&&this.lineAnnotations.length===0&&!this.virtualizer.config.resizeDebugging)return;const t=this.getDiffStyle();let i=!1;const a=t==="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 d=c.dataset.lineIndex;if(d==null)continue;const f=RO(d,t);let p=c.getBoundingClientRect().height,g=!1;c.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in c.nextElementSibling.dataset||"noNewline"in c.nextElementSibling.dataset)&&("noNewline"in c.nextElementSibling.dataset&&(g=!0),p+=c.nextElementSibling.getBoundingClientRect().height);const y=this.getLineHeight(f,g);p!==y&&(i=!0,p===this.metrics.lineHeight*(g?2:1)?this.heightCache.delete(f):this.heightCache.set(f,p))}}(i||this.virtualizer.config.resizeDebugging)&&this.computeApproximateSize()}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.render());cleanUp(){this.fileContainer!=null&&this.virtualizer.disconnect(this.fileContainer),this.isSetup=!1,super.cleanUp()}expandHunk=(e,t,i)=>{this.hunksRenderer.expandHunk(e,t,i),this.computeApproximateSize(),this.renderRange=void 0,this.virtualizer.instanceChanged(this)};setVisibility(e){this.fileContainer!=null&&(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}computeApproximateSize(){const e=this.height===0;if(this.height=0,this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=ga,hunkSeparators:s="line-info"}=this.options,{diffHeaderHeight:c,fileGap:d,hunkSeparatorHeight:f}=this.metrics,p=this.getDiffStyle(),g=s!=="simple"&&s!=="metadata"&&s!=="line-info-basic"?d:0;if(t?s!=="simple"&&s!=="metadata"&&(this.height+=d):this.height+=c,!a&&(Fs({diff:this.fileDiff,diffStyle:p,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:y,collapsedBefore:v,collapsedAfter:b,deletionLine:S,additionLine:A})=>{const D=A!=null?A.splitLineIndex:S.splitLineIndex,x=A!=null?A.unifiedLineIndex:S.unifiedLineIndex,T=(A?.noEOFCR??!1)||(S?.noEOFCR??!1);v>0&&(y>0&&(this.height+=g),this.height+=f+g),this.height+=this.getLineHeight(p==="split"?D:x,T),b>0&&s!=="simple"&&(this.height+=g+f)}}),this.fileDiff.hunks.length>0&&(this.height+=d),this.fileContainer!=null&&this.virtualizer.config.resizeDebugging&&!e)){const y=this.fileContainer.getBoundingClientRect();y.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:y.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}}render({fileContainer:e,oldFile:t,newFile:i,fileDiff:a,...o}={}){const{isSetup:s}=this;if(this.fileDiff??=a??(t!=null&&i!=null?Ff(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(s?this.top??=this.virtualizer.getOffsetInScrollContainer(e):(this.computeApproximateSize(),this.virtualizer.connect(e,this),this.top??=this.virtualizer.getOffsetInScrollContainer(e),this.isVisible=this.virtualizer.isInstanceVisible(this.top,this.height),this.isSetup=!0),!this.isVisible)return this.renderPlaceholder(this.height);const c=this.virtualizer.getWindowSpecs(),d=this.computeRenderRangeFromWindow(this.fileDiff,this.top,c);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:d,oldFile:t,newFile:i,...o})}getDiffStyle(){return this.options.diffStyle??"split"}getExpandedRegion(e,t,i){if(i<=0||e)return{fromStart:0,fromEnd:0,collapsedLines:Math.max(i,0),renderAll:!1};const{expandUnchanged:a=!1,collapsedContextThreshold:o=ga}=this.options;if(a||i<=o)return{fromStart:i,fromEnd:0,collapsedLines:0,renderAll:!0};const s=this.hunksRenderer.getExpandedHunk(t),c=Math.min(Math.max(s.fromStart,0),i),d=Math.min(Math.max(s.fromEnd,0),i),f=c+d,p=f>=i;return{fromStart:c,fromEnd:d,collapsedLines:Math.max(i-f,0),renderAll:p}}getExpandedLineCount(e,t){let i=0;if(e.isPartial){for(const o of e.hunks)i+=t==="split"?o.splitLineCount:o.unifiedLineCount;return i}for(const[o,s]of e.hunks.entries()){const c=t==="split"?s.splitLineCount:s.unifiedLineCount;i+=c;const d=Math.max(s.collapsedBefore,0),{fromStart:f,fromEnd:p,renderAll:g}=this.getExpandedRegion(e.isPartial,o,d);d>0&&(i+=g?d:f+p)}const a=e.hunks.at(-1);if(a!=null&&LO(e)){const o=e.additionLines.length-(a.additionLineIndex+a.additionCount),s=e.deletionLines.length-(a.deletionLineIndex+a.deletionCount);if(a!=null&&o!==s)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${o}, deletions=${s}) for ${e.name}`);const c=Math.min(o,s);if(a!=null&&c>0){const{fromStart:d,renderAll:f}=this.getExpandedRegion(e.isPartial,e.hunks.length,c);i+=f?c:d}}return i}computeRenderRangeFromWindow(e,t,{top:i,bottom:a}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=ga,hunkSeparators:d="line-info"}=this.options,{diffHeaderHeight:f,fileGap:p,hunkLineCount:g,hunkSeparatorHeight:y,lineHeight:v}=this.metrics,b=this.getDiffStyle(),S=this.height,A=this.getExpandedLineCount(e,b),D=o?p:f;if(t<i-S||t>a)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-D-p};if(A<=g||e.hunks.length===0)return{startingLine:0,totalLines:g,bufferBefore:0,bufferAfter:0};const x=Math.ceil(Math.max(a-i,0)/v),T=Math.ceil(x/g)*g+g,k=T/g,I=k,z=[],R=(i+a)/2,$=d==="simple"||d==="metadata"||d==="line-info-basic"?0:p;let G=t+D,Y=0,le,te,F;if(Fs({diff:e,diffStyle:b,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:O,collapsedBefore:X,collapsedAfter:C,deletionLine:se,additionLine:me})=>{const de=me!=null?me.splitLineIndex:se.splitLineIndex,be=me!=null?me.unifiedLineIndex:se.unifiedLineIndex,Te=(me?.noEOFCR??!1)||(se?.noEOFCR??!1);let Le=X>0?y+$+(O>0?$:0):0;O===0&&d==="simple"&&(Le=0),G+=Le;const Xe=Y%g===0;if(Xe&&(z.push(G-(t+D+Le)),F!=null)){if(F<=0)return!0;F--}const et=this.getLineHeight(b==="split"?de:be,Te),qt=Math.floor(Y/g);return G>i-et&&G<a&&(le??=qt),te==null&&G+et>R&&(te=qt),F==null&&G>=a&&Xe&&(F=I),Y++,G+=et,C>0&&d!=="simple"&&(G+=y+$),!1}}),le==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-D-p};const ce=z.length;te??=le;const ie=Math.round(te-k/2),ne=Math.max(0,ce-k),P=Math.max(0,Math.min(ie,ne)),Z=P*g,oe=ie<0?T+ie*g:T,he=z[P]??0,L=P+oe/g;return{startingLine:Z,totalLines:oe,bufferBefore:he,bufferAfter:L<z.length?S-D-z[L]-p:S-(G-t)-p}}};function LO(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 RO(e,t){const[i,a]=e.split(",").map(Number);return t==="split"?a:i}const DO=typeof window>"u"?re.useEffect:re.useLayoutEffect;function NO({fileDiff:e,options:t,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:d,disableWorkerPool:f}){const p=DD(),g=re.useContext(bN),y=re.useRef(null),v=vN(b=>{if(b!=null){if(y.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");p!=null?y.current=new TO(hf({hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),p,s,f?void 0:g,!0):y.current=new Q1(hf({hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),f?void 0:g,!0),y.current.hydrate({fileDiff:e,fileContainer:b,lineAnnotations:i,prerenderedHTML:o})}else{if(y.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");y.current.cleanUp(),y.current=null}});return DO(()=>{const{current:b}=y;if(b==null)return;const S=hf({hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),A=!tO(b.options,S);b.setOptions(S),b.render({forceRender:A,fileDiff:e,lineAnnotations:i}),a!==void 0&&b.setSelectedLines(a)}),{ref:v,getHoveredLine:re.useCallback(()=>y.current?.getHoveredLine(),[])}}function hf({options:e,hasCustomHeader:t,hasGutterRenderUtility:i}){return i||t?{...e,renderCustomHeader:t?cb:void 0,renderGutterUtility:i?cb:void 0}:e}function OO({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:d,renderAnnotation:f,renderCustomHeader:p,renderHeaderPrefix:g,renderHeaderMetadata:y,renderGutterUtility:v,renderHoverUtility:b,disableWorkerPool:S=!1}){const{ref:A,getHoveredLine:D}=NO({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:d,hasGutterRenderUtility:v!=null||b!=null,hasCustomHeader:p!=null,disableWorkerPool:S});return H.jsx($s,{ref:A,className:s,style:c,children:LD(aO({fileDiff:e,renderCustomHeader:p,renderHeaderPrefix:g,renderHeaderMetadata:y,renderAnnotation:f,renderGutterUtility:v,lineAnnotations:a,renderHoverUtility:b,getHoveredLine:D}),d)})}const MO=re.memo(function({onSave:t,onCancel:i}){const a=re.useRef(null);re.useEffect(()=>{a.current?.focus()},[]);const o=()=>{const c=a.current?.value??"";t(c)},s=c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),o()),c.key==="Escape"&&(c.preventDefault(),i())};return H.jsxs("div",{className:"comment-editor",children:[H.jsx("textarea",{ref:a,className:"text-input-area comment-input",onKeyDown:s,placeholder:"Add a comment…",rows:2}),H.jsxs("div",{className:"comment-actions",children:[H.jsx("button",{type:"button",className:"btn ghost",onClick:i,children:"cancel"}),H.jsx("button",{type:"button",className:"btn primary",onClick:o,children:"comment"})]})]})});function kh({additions:e,deletions:t,className:i}){const a=["diff-stats",i].filter(Boolean).join(" ");return H.jsxs("span",{className:a,children:[H.jsxs("span",{className:"stat-add",children:["+",e]}),H.jsxs("span",{className:"stat-del",children:["-",t]})]})}const IO=re.memo(function({thread:t,onAddReply:i,onRequestAgent:a,onToggleResolved:o,onToggleCollapsed:s}){const[c,d]=re.useState(!1),[f,p]=re.useState(!1),g=re.useRef(null),v=t.messages[t.messages.length-1]?.role==="user"&&!t.loading&&!t.resolved,b=t.messages.length,S=`${t.resolved?"Resolved thread":"Thread"} with ${b} comment${b===1?"":"s"}`,A=t.resolved?"reopen":"resolve";re.useEffect(()=>{c&&g.current?.focus()},[c]);const D=re.useCallback(()=>{const I=g.current?.value.trim()??"";I&&(g.current&&(g.current.value=""),p(!1),d(!1),i(I))},[i]),x=re.useCallback(I=>{I.key==="Enter"&&(I.metaKey||I.ctrlKey)&&(I.preventDefault(),D())},[D]),T=re.useCallback(()=>{o(!t.resolved)},[o,t.resolved]),k=re.useCallback(()=>{g.current&&(g.current.value=""),p(!1),d(!1)},[]);return t.collapsed?H.jsx("div",{className:`thread-card collapsed${t.resolved?" resolved":""}`,children:H.jsx("div",{className:"thread-collapsed-row",children:H.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!1),"aria-label":"Expand thread","aria-expanded":!1,children:[H.jsx(Vb,{size:14}),H.jsx("span",{className:"thread-summary",children:S})]})})}):H.jsxs("div",{className:`thread-card${t.resolved?" resolved":""}`,children:[H.jsx("div",{className:"thread-header-row",children:H.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!0),"aria-label":"Collapse thread","aria-expanded":!0,children:[H.jsx(jb,{size:14}),H.jsx("span",{className:"thread-summary",children:S})]})}),H.jsxs("div",{className:"thread-messages",children:[t.messages.map((I,z)=>{const R=v&&I.role==="user"&&z===t.messages.length-1;return H.jsxs("div",{className:`thread-msg thread-msg-${I.role}`,children:[H.jsx("span",{className:"thread-msg-role",children:I.role==="user"?"you":"agent"}),H.jsx(Sh,{content:I.text,className:"thread-msg-text",variant:"thread"}),R&&H.jsx("div",{className:"thread-msg-actions",children:H.jsxs("button",{type:"button",className:"btn",onClick:a,children:[H.jsx(ox,{size:14}),"ask agent"]})})]},`${I.role}:${z}:${I.text}`)}),t.loading&&H.jsxs("div",{className:"thread-msg thread-msg-assistant",children:[H.jsx("span",{className:"thread-msg-role",children:"agent"}),H.jsx("span",{className:"thread-msg-thinking",children:"thinking…"})]})]}),H.jsx("div",{className:"thread-footer",children:c?H.jsxs(H.Fragment,{children:[H.jsx("textarea",{ref:g,className:"text-input-area thread-reply-input",onChange:I=>{const z=I.target.value.trim().length>0;p(R=>R===z?R:z)},onKeyDown:x,placeholder:"Reply…",rows:3}),H.jsxs("div",{className:"thread-actions",children:[H.jsx("button",{type:"button",className:"btn ghost",onClick:k,children:"cancel"}),H.jsx("button",{type:"button",className:"btn primary",disabled:!f,onClick:D,children:"comment"})]})]}):H.jsxs("div",{className:"thread-actions",children:[H.jsx("button",{type:"button",className:"btn ghost",onClick:T,children:A}),H.jsx("button",{type:"button",className:"btn",onClick:()=>d(!0),children:"reply"})]})})]})}),zO={theme:"github-dark-default",themeType:"dark",diffStyle:"unified",diffIndicators:"none",lineDiffType:"word-alt",disableFileHeader:!0,overflow:"wrap",unsafeCSS:[":host { --diffs-dark-bg: var(--bg); --diffs-bg: var(--bg); font-weight: var(--font-weight-code); }","pre { background-color: var(--bg) !important; --diffs-bg: var(--bg) !important; }","[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(" ")},UO=re.memo(function({file:t,diffStyle:i,overflowMode:a,collapsed:o,viewed:s,annotations:c,unresolvedThreadCount:d,onToggleCollapsed:f,onToggleViewed:p,onLineActivate:g,onSaveDraft:y,onCancelDraft:v,onAddReply:b,onRequestAgent:S,onToggleResolved:A,onToggleThreadCollapsed:D}){const x=re.useMemo(()=>({...zO,diffStyle:i==="split"?"split":"unified",overflow:a,onLineNumberClick:({lineNumber:I,annotationSide:z})=>{g(t.id,I,z)}}),[i,t.id,g,a]),T=re.useCallback(k=>{if(k.metadata.type==="draft")return H.jsx(MO,{onSave:y,onCancel:v});const{thread:I}=k.metadata;return H.jsx(IO,{thread:I,onAddReply:z=>b(I.id,z),onRequestAgent:()=>S(I.id),onToggleResolved:z=>A(I.id,z),onToggleCollapsed:z=>D(I.id,z)})},[b,v,S,y,A,D]);return H.jsxs("section",{className:`file-section${o?" collapsed":""}`,id:`file-${t.id}`,children:[H.jsxs("div",{className:"file-header",children:[H.jsxs("button",{type:"button",className:"file-toggle",onClick:()=>f(t.id),"aria-label":o?"Expand file":"Collapse file",children:[o?H.jsx(ZE,{size:14}):H.jsx(XE,{size:14}),H.jsx("span",{className:"file-path",children:t.displayPath}),d>0&&H.jsxs("span",{className:"file-thread-count","aria-label":`${d} unresolved comment thread${d===1?"":"s"}`,title:`${d} unresolved comment thread${d===1?"":"s"}`,children:[H.jsx(Gb,{size:12}),H.jsx("span",{children:d})]})]}),H.jsxs("div",{className:"file-meta",children:[H.jsx(kh,{additions:t.additions,deletions:t.deletions}),H.jsx(z1,{checked:s,label:"viewed",className:"viewed-checkbox",onChange:()=>p(t.id)})]})]}),!o&&H.jsx("div",{className:"file-body",children:H.jsx(OO,{className:"diff-view",fileDiff:t.file,options:x,lineAnnotations:c,renderAnnotation:T})})]})});function HO({open:e,widthMode:t,files:i,viewed:a,detachedThreads:o,selectedDetachedThreadId:s,onJumpToFile:c,onCreateDetachedThread:d,onOpenDetachedThread:f,onToggleWidth:p}){const g=t==="wide"?"Use narrow sidebar":"Use wide sidebar";return H.jsxs("aside",{className:`sidebar${e?" open":""}`,children:[H.jsx("button",{type:"button",className:"sidebar-width-toggle","aria-label":g,title:g,onClick:p}),H.jsxs("section",{className:"sidebar-section",children:[H.jsxs("div",{className:"sidebar-section-header",children:[H.jsx("h2",{className:"sidebar-section-title",children:"conversations"}),H.jsx("button",{type:"button",className:"btn sidebar-action",onClick:d,children:"new thread"})]}),H.jsx("div",{className:"sidebar-conversations",children:o.length===0?H.jsx("p",{className:"sidebar-empty",children:"no conversations yet"}):o.map(y=>{const v=qO(y),b=y.loading?"active":"idle";return H.jsx("button",{type:"button",className:`sidebar-thread-item${s===y.id?" selected":""}${y.resolved?" resolved":""}`,onClick:()=>f(y.id),title:v,children:H.jsxs("span",{className:"sidebar-thread-row",children:[H.jsx("span",{className:"sidebar-thread-name",children:v}),H.jsx("span",{className:`sidebar-thread-status-dot ${b}`,"aria-label":b,title:b})]})},y.id)})})]}),H.jsx("div",{className:"sidebar-divider"}),H.jsxs("section",{className:"sidebar-section",children:[H.jsx("div",{className:"sidebar-section-header",children:H.jsx("h2",{className:"sidebar-section-title",children:"files"})}),H.jsx("div",{className:"sidebar-file-list",children:i.map(y=>H.jsx("button",{type:"button",className:`sidebar-item${a[y.id]?" viewed":""}`,onClick:()=>c(y.id),children:H.jsx(PO,{path:y.displayPath,stats:H.jsx(kh,{additions:y.additions,deletions:y.deletions,className:"sidebar-stats"})})},y.id))})]})]})}function PO({path:e,stats:t}){const i=re.useRef(null),a=re.useRef(null),o=re.useRef(null),[s,c]=re.useState(()=>jO(e)),d=re.useMemo(()=>BO(),[]);return re.useLayoutEffect(()=>{const f=i.current,p=a.current,g=o.current;if(!f||!p||!g)return;const y=()=>{const b=f.clientWidth,S=g.offsetWidth,D=b-S-8;if(D<=0){c(e);return}const x=window.getComputedStyle(p);c(VO(e,D,x.font,d))};y();const v=new ResizeObserver(y);return v.observe(f),v.observe(g),()=>{v.disconnect()}},[d,e]),H.jsxs("span",{ref:i,className:"sidebar-row",children:[H.jsx("span",{ref:a,className:"sidebar-path",title:e,children:s}),H.jsx("span",{ref:o,children:t})]})}function BO(){const t=document.createElement("canvas").getContext("2d");return(i,a)=>t?(t.font=a,t.measureText(i).width):i.length*8}function jO(e){const t=e.split("/"),i=t.pop()??e;return t.length<=2?e:`${t[0]}/…/${i}`}function VO(e,t,i,a){const o=GO(e);for(const s of o)if(a(s,i)<=t)return s;return o[o.length-1]??e}function GO(e){const t=e.split("/"),i=t.pop()??e,a=t,o=[e];a.length>0&&o.push(`${a.join("/")}/${i}`),a.length>2&&(o.push(`${a[0]}/…/${a.slice(1).join("/")}/${i}`),o.push(`${a[0]}/…/${a.slice(-2).join("/")}/${i}`),o.push(`${a[0]}/…/${i}`),o.push(`${a[0]}/…/${a[a.length-1]}/${i}`)),a.length>0&&(o.push(`…/${i}`),o.push(`…/${a[a.length-1]}/${i}`));const s=$O(i);return a.length>0&&(o.push(`${a[0]}/…/${s}`),o.push(`${a[0]}/…/${a[a.length-1]}/${s}`),o.push(`…/${s}`)),o.push(s),[...new Set(o)]}function $O(e){const t=e.lastIndexOf(".");if(t<=1||t===e.length-1)return e.length<=24?e:`${e.slice(0,20)}…`;const i=e.slice(0,t),a=e.slice(t);return i.length<=18?e:`${i.slice(0,14)}…${a}`}function qO(e){const t=e.messages.find(a=>a.role==="user"),i=FO(t?.text??"");return i?i.length<=128?i:`${i.slice(0,125).trimEnd()}…`:"new conversation"}function FO(e){return e.replace(/\s+/g," ").trim()}function YO({value:e,options:t,onChange:i}){return H.jsx("div",{className:"toggle-group",role:"radiogroup",children:t.map(a=>H.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))})}function XO({fileCount:e,viewedCount:t,additions:i,deletions:a,commentCount:o,diffCommand:s,diffStyle:c,overflowMode:d,sidebarOpen:f,finished:p,status:g,briefLoading:y,hasBrief:v,hasUnresolvedFileThreads:b,onBriefClick:S,onToggleSidebar:A,onExpandAll:D,onExpandUnresolved:x,onCollapseViewed:T,onCollapseAll:k,onDiffStyleChange:I,onOverflowModeChange:z,onSubmit:R,onCancel:$}){const G=c==="split"?"split":"stacked",Y=d==="scroll"?"scroll":"wrap",le=e>0?Math.round(t/e*100):0;return H.jsxs("header",{className:"top-bar",children:[H.jsxs("div",{className:"top-bar-left",children:[H.jsx(sa,{icon:ix,label:"Toggle sidebar",className:f?"active":"",onClick:A}),H.jsxs("button",{type:"button",className:"btn top-bar-action top-bar-brief-action",onClick:S,disabled:y,children:[H.jsx(ax,{size:14}),y?"generating brief…":v?"view brief":"brief"]}),H.jsxs("div",{className:"top-bar-diff-meta","aria-label":`${i} additions and ${a} deletions${s?`, ${s}`:""}`,children:[H.jsx(kh,{additions:i,deletions:a}),s&&H.jsx("span",{className:"top-bar-meta top-bar-meta-dim top-bar-diff-command",title:s,children:s})]})]}),H.jsxs("div",{className:"top-bar-right",children:[H.jsxs("div",{className:"top-bar-viewed","aria-label":`${t} of ${e} viewed, ${o} unresolved comments`,children:[H.jsx("span",{className:"top-bar-viewed-ring",style:{background:`conic-gradient(var(--accent-add) ${le}%, var(--border) ${le}% 100%)`},"aria-hidden":"true",children:H.jsx("span",{className:"top-bar-viewed-ring-inner"})}),H.jsxs("span",{className:"top-bar-viewed-text",children:[t," of ",e," viewed"]})]}),g&&H.jsx("span",{className:"top-bar-meta top-bar-status",children:g}),H.jsxs("div",{className:"btn-group",children:[H.jsx(sa,{icon:Vb,label:"Expand all files",onClick:D}),H.jsx(sa,{icon:Gb,label:"Expand files with unresolved threads",onClick:x,disabled:!b}),H.jsx(sa,{icon:ex,label:"Collapse viewed files",onClick:T}),H.jsx(sa,{icon:jb,label:"Collapse all files",onClick:k})]}),H.jsxs("button",{type:"button",className:`top-bar-toggle${Y==="wrap"?" active":""}`,onClick:()=>z(Y==="wrap"?"scroll":"wrap"),"aria-pressed":Y==="wrap","aria-label":"Toggle wrapped diff lines",children:[H.jsx("span",{className:"top-bar-toggle-switch","aria-hidden":"true",children:H.jsx("span",{className:"top-bar-toggle-thumb"})}),H.jsx("span",{className:"top-bar-toggle-label",children:"wrap"})]}),H.jsx(YO,{value:G,options:[{value:"split",label:"split"},{value:"stacked",label:"stacked"}],onChange:I}),H.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary",onClick:R,disabled:p,children:"submit"}),H.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-cancel",onClick:$,disabled:p,"aria-label":"cancel",children:H.jsx($b,{size:14,strokeWidth:2.25})})]})]})}function QO(e,t,i){if(!e.trim())return[];const a=vO(e,i),o=ZO(t);let s=0;return a.flatMap(c=>c.files.map(d=>{const f=KO(d,o);return{id:d.cacheKey??`${d.name}::${s++}`,file:d,displayPath:f.displayPath,oldRepoPath:f.oldRepoPath,newRepoPath:f.newRepoPath,additions:Hb(d,"additions"),deletions:Hb(d,"deletions")}}))}function Hb(e,t){return e.hunks.reduce((i,a)=>i+a.hunkContent.reduce((o,s)=>o+(s.type==="change"?s[t]:0),0),0)}function ZO(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,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 KO(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,oldRepoPath:e.prevName,newRepoPath:e.name}}const WO=[];function JO(){const[e,t]=re.useState(null),[i,a]=re.useState(null),[o,s]=re.useState(LE),[c,d]=re.useState(null),[f,p]=re.useState(""),[g,y]=re.useState(!1),[v,b]=re.useState(null),[S,A]=re.useState(!1),[D,x]=re.useState(""),[T,k]=re.useState(!1),I=re.useRef(null),z=re.useRef(0),R=re.useCallback(W=>{s(RE(W))},[]),$=re.useCallback(async(W,pe={})=>{try{const xe=await W;R(xe.state)}catch(xe){pe.onError?.(),x(xe instanceof Error?xe.message:String(xe))}},[R]),G=re.useCallback((W,pe)=>{$(xE(W),pe)},[$]),Y=re.useCallback((W,pe)=>{s(xe=>zE(xe,W,pe))},[]),le=re.useCallback(W=>{s(pe=>UE(pe,W))},[]);re.useEffect(()=>{let W=!0;return(async()=>{try{const xe=await SE();if(!xe.state)throw new Error("diff tool bootstrap response did not include review state");if(!W)return;t(xe),R(xe.state);const Qe=await EE();W&&a(Qe)}catch(xe){W&&x(xe instanceof Error?xe.message:String(xe))}})(),()=>{W=!1}},[R]);const te=i&&"patch"in i?i.patch:"",F=re.useMemo(()=>QO(te,e?.files,e?.context.sessionId),[te,e]),ce=re.useMemo(()=>Iy(o.collapsedFileIds),[o.collapsedFileIds]),ie=re.useMemo(()=>Iy(o.viewedFileIds),[o.viewedFileIds]),ne=re.useMemo(()=>o.threads.filter(W=>!W.resolved),[o.threads]),P=ne.length,Z=re.useMemo(()=>[...o.threads.filter(DE)].reverse(),[o.threads]),oe=re.useMemo(()=>v?.mode!=="thread"?null:Z.find(W=>W.id===v.threadId)??null,[v,Z]),he=re.useMemo(()=>Cd(ne.filter(Xf).map(W=>W.anchor.fileId)),[ne]),L=re.useMemo(()=>ME(ne),[ne]),O=o.brief.content.trim().length>0,X=re.useMemo(()=>F.reduce(NE,{additions:0,deletions:0}),[F]),C=re.useCallback((W,pe="smooth")=>{document.getElementById(`file-${W}`)?.scrollIntoView({behavior:pe,block:"start"})},[]),se=re.useCallback(W=>{G({collapsedFileIds:zy(o.collapsedFileIds,W)})},[G,o.collapsedFileIds]),me=re.useCallback(W=>{const pe=zy(o.viewedFileIds,W),xe=pe.includes(W),Qe=xe?Cd([...o.collapsedFileIds,W]):o.collapsedFileIds;I.current=xe&&!o.collapsedFileIds.includes(W)?W:null,G({viewedFileIds:pe,collapsedFileIds:Qe},{onError:()=>{I.current=null}})},[G,o.collapsedFileIds,o.viewedFileIds]),de=re.useCallback(()=>{G({collapsedFileIds:[]})},[G]),be=re.useCallback(()=>{G({collapsedFileIds:F.map(W=>W.id)})},[G,F]),Te=re.useCallback(()=>{if(he.length===0)return;const W=new Set(he);G({collapsedFileIds:o.collapsedFileIds.filter(pe=>!W.has(pe))})},[G,he,o.collapsedFileIds]),Le=re.useCallback(()=>{G({collapsedFileIds:Cd([...o.collapsedFileIds,...o.viewedFileIds])})},[G,o.collapsedFileIds,o.viewedFileIds]);re.useLayoutEffect(()=>{const W=I.current;W&&(I.current=null,C(W,"auto"))},[o.collapsedFileIds,C]);const Xe=re.useCallback((W,pe,xe)=>{d(Qe=>Qe&&Qe.fileId===W&&Qe.lineNumber===pe&&Qe.side===xe?Qe:{fileId:W,lineNumber:pe,side:xe})},[]),et=re.useCallback(W=>{if(!c)return;const pe=W.trim();if(!pe){d(null);return}$(Oy({body:pe,anchor:{kind:"line",fileId:c.fileId,filePath:HE(c,F),lineNumber:c.lineNumber,side:c.side}}).then(xe=>(d(null),xe)))},[c,F,$]),qt=re.useCallback(()=>d(null),[]),xt=re.useCallback(()=>{z.current+=1,p(""),y(!1),b({mode:"new"})},[]),gn=re.useCallback(W=>{z.current+=1,p(""),y(!1),b({mode:"thread",threadId:W})},[]),oi=re.useCallback(()=>{z.current+=1,p(""),y(!1),b(null)},[]),si=re.useCallback(W=>{p(W)},[]),ui=re.useCallback(W=>z.current!==W?!1:(p(""),y(!1),!0),[]),gr=re.useCallback(async()=>{const W=f.trim();if(!W)return;const pe=!g,xe=z.current;x("");try{if(v?.mode==="thread"){const Be=await My({id:v.threadId,text:W});if(R(Be.state),!ui(xe)||!pe)return;Y(v.threadId,!0);try{const st=await wd(v.threadId);R(st.state)}catch(st){Y(v.threadId,!1),x(st instanceof Error?st.message:String(st))}return}const Qe=await Oy({body:W,anchor:{kind:"detached"}});R(Qe.state);const nt=[...Qe.state.threads].filter(Be=>Be.anchor.kind==="detached").at(-1);if(!ui(xe)||(b(nt?{mode:"thread",threadId:nt.id}:null),!pe||!nt))return;Y(nt.id,!0);try{const Be=await wd(nt.id);R(Be.state)}catch(Be){Y(nt.id,!1),x(Be instanceof Error?Be.message:String(Be))}}catch(Qe){x(Qe instanceof Error?Qe.message:String(Qe))}},[R,f,g,v,ui,Y]),ci=re.useCallback((W,pe)=>{$(My({id:W,text:pe}))},[$]),di=re.useCallback(W=>{x(""),Y(W,!0),$(wd(W),{onError:()=>{Y(W,!1)}})},[Y,$]),fi=re.useCallback(()=>{x(""),le(!0),$(kE(),{onError:()=>{le(!1)}})},[le,$]),yr=re.useCallback((W,pe)=>{$(wE({id:W,resolved:pe}))},[$]),wa=re.useCallback((W,pe)=>{$(CE({id:W,collapsed:pe}))},[$]),wt=re.useMemo(()=>OE(o.threads),[o.threads]),Ca=re.useMemo(()=>c?{lineNumber:c.lineNumber,side:c.side,metadata:{type:"draft",draft:c}}:null,[c]),K=re.useCallback(async()=>{A(!0),x("Returning review…");try{await AE(),x("Review returned. You can close this tab.")}catch(W){A(!1),x(W instanceof Error?W.message:String(W))}},[]),ue=re.useCallback(async()=>{A(!0),x("Cancelling…");try{await TE(),x("Cancelled. You can close this tab.")}catch(W){A(!1),x(W instanceof Error?W.message:String(W))}},[]),_e=re.useCallback(()=>{if(O){k(!0);return}fi()},[O,fi]);return H.jsxs(H.Fragment,{children:[H.jsxs("div",{className:`app${o.sidebarOpen?" sidebar-open":""}${o.sidebarWidth==="wide"?" sidebar-wide":""}`,children:[H.jsx(XO,{fileCount:F.length,viewedCount:o.viewedFileIds.length,additions:X.additions,deletions:X.deletions,commentCount:P,diffCommand:e?.context.diffCommand,diffStyle:o.diffStyle,overflowMode:o.overflowMode,sidebarOpen:o.sidebarOpen,finished:S,status:D,briefLoading:o.brief.loading,hasBrief:O,hasUnresolvedFileThreads:he.length>0,onBriefClick:_e,onToggleSidebar:()=>{G({sidebarOpen:!o.sidebarOpen})},onExpandAll:de,onExpandUnresolved:Te,onCollapseViewed:Le,onCollapseAll:be,onDiffStyleChange:W=>{G({diffStyle:W})},onOverflowModeChange:W=>{G({overflowMode:W})},onSubmit:K,onCancel:ue}),H.jsx(HO,{open:o.sidebarOpen,widthMode:o.sidebarWidth,files:F,viewed:ie,detachedThreads:Z,selectedDetachedThreadId:v?.mode==="thread"?v.threadId:null,onJumpToFile:C,onCreateDetachedThread:xt,onOpenDetachedThread:gn,onToggleWidth:()=>{G({sidebarWidth:o.sidebarWidth==="wide"?"narrow":"wide"})}}),H.jsxs("main",{className:"content",children:[F.length===0&&H.jsx("div",{className:"empty",children:D||"loading…"}),F.map(W=>{const pe=wt.get(W.id)??WO,xe=IE(pe,W.id,c,Ca);return H.jsx(UO,{file:W,diffStyle:o.diffStyle,overflowMode:o.overflowMode,collapsed:ce[W.id]??!1,viewed:ie[W.id]??!1,annotations:xe,unresolvedThreadCount:L.get(W.id)??0,onToggleCollapsed:se,onToggleViewed:me,onLineActivate:Xe,onSaveDraft:et,onCancelDraft:qt,onAddReply:ci,onRequestAgent:di,onToggleResolved:yr,onToggleThreadCollapsed:wa},W.id)})]})]}),H.jsx(pD,{open:T,content:o.brief.content,loading:o.brief.loading,onClose:()=>k(!1)}),H.jsx(mD,{open:v!==null,thread:oe,body:f,skipAgentResponse:g,onBodyChange:si,onSkipAgentResponseChange:y,onSubmit:gr,onClose:oi,onToggleResolved:W=>{oe&&yr(oe.id,W)}})]})}vE.createRoot(document.getElementById("root")).render(H.jsx(re.StrictMode,{children:H.jsx(JO,{})}));
|